[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: innerHTML bug
From:       Maciej Stachowiak <mjs () apple ! com>
Date:       2007-08-19 0:34:00
Message-ID: 51D5E639-690A-4D43-BA56-BE8DACAEA4B6 () apple ! com
[Download RAW message or body]


On Aug 8, 2007, at 7:35 AM, Maksim Orlovich wrote:

>> I don't remember but I think someone worked on innerHTML recently?
>> It doesn't seem to reflect changes made to the render tree like it  
>> does
>> with other browsers,
>> I can't log into ingdirect.fr.
>>
>> Testcase attached.
>>
>> Basically foo.style.color = "#101065"; works but later on innerHTML
>> doesn't show that new color.
>> Any ideas? I'm not sure how CSS changes are applied to both trees...
>
> It's a super-weird quirk we don't really implement... When you do this
> construct it actually changes the style attribute (!). Unfortunately I
> can't think of a nice way of implementing this :( Obviously special- 
> casing
> access to ATTR_STYLE over the place would suck, since the attribute  
> code
> is way complex as-is, and updating the string form would be expensive.
> Urgh. This needs a notion of a special computed attribute type or
> something.

In WebCore we handle this through lazy updating of the style  
attribute. See WebCore/dom/StyledElement.cpp and related code in  
element.cpp. It might be useful to make this concept a bit more  
general in the future, since HTML5 classList may make it desirable to  
do similar lazy updating for the class attribute.

Regards,
Maciej

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic