make pseudo-elements non-anonymous

Maciej Stachowiak mjs at apple.com
Wed Mar 3 00:45:21 CET 2004


On Mar 2, 2004, at 1:49 PM, David Hyatt wrote:

> Consider this example:
>
>
> <head>
> <style>
> p:first-letter { font-size: 150%; float: left; border: 3px solid 
> green; padding: 5px; }
> </style>
> </head>
> <body>
> <p><a href="http://www.apple.com">Click here</a> to visit apple.com 
> etc. etc.</p>
>
>
> If the "C" first-letter container has <p> as its DOM element, then the 
> DOM will deliver mouse events to the <p> when you're over the 
> border/padding area of the first-letter, bypassing the anchor 
> entirely.
>
> Of course this also doesn't work right now (with the first-letter 
> container being anonymous), but it feels conceptually cleaner to me to 
> leave the generated content container for first-letter without a DOM 
> element.

I think it does currently work, we walk up the render tree for 
anonymous elements when mouse tracking, so we will hit the <a> and 
deliver mouse events there. This is particularly memorable to me 
because I just recently fixed the case where the anonymous content is 
in it's own layer (i.e. it is positioned), the normal case already 
worked fine.

I think you are right though that the proposal would break the example 
you gave.

Regards,
Maciej



More information about the Khtml-devel mailing list