make pseudo-elements non-anonymous

David Hyatt hyatt at apple.com
Wed Mar 3 01:55:33 CET 2004


But you are of course right that a non-floating first-letter inside a 
link will regress with this patch.

dave

On Mar 2, 2004, at 3:51 PM, David Hyatt wrote:

> The example actually doesn't work right now because the first-letter 
> floats, and thus nodeAtPoint is called by the <p> and not the <a>.  
> It's pretty easy to patch this case though.
>
> dave
>
> On Mar 2, 2004, at 3:45 PM, Maciej Stachowiak wrote:
>
>>
>> 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
>>
>> _______________________________________________
>> Khtml-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/khtml-devel
>
> _______________________________________________
> Khtml-devel at kde.org
> https://mail.kde.org/mailman/listinfo/khtml-devel



More information about the Khtml-devel mailing list