innerHTML bug

Allan Sandfeld Jensen kde at carewolf.com
Wed Aug 8 21:16:58 BST 2007


On Wednesday 08 August 2007 16:35, 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.
>
> P.S. Allan: this seems related to what you told me you were planning, no?

No. The test-case is wrong.. Setting foo.style.anything should not change the 
style attribute. foo.style is the calculated style, not the style attribute.
Maybe the original bug however is related to the bug we talked about. The 
issue is that KHTML forgets any changes made to the style whenever the style 
is recalculated, which can happen when style.display changes, or any other 
time when a user-event triggers a restyle.

`Allan




More information about the kfm-devel mailing list