Bug 68438 - Some CSS properties are not correctly applied if a style sheet is dynamically added after the page has rendered
Summary: Some CSS properties are not correctly applied if a style sheet is dynamically...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2011-09-20 07:30 PDT by Mirko Tschäni
Modified: 2011-09-20 17:40 PDT (History)
3 users (show)

See Also:


Attachments
two html files. broken.html reproduces the bug, working.html works as expected (1.99 KB, application/zip)
2011-09-20 07:31 PDT, Mirko Tschäni
no flags Details
Reduction based on the previous attachment (793 bytes, text/html)
2011-09-20 17:39 PDT, Julien Chaffraix
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mirko Tschäni 2011-09-20 07:30:18 PDT
When a CSS style sheet is added after the page has been rendered (using dom manipulation), the resulting rendering is incorrect in some cases (i.e. when using the float property in some combinations).
In the DOM (and in the web inspector) all properties are visible correctly but the rendering in the browser window is wrong.

Expected behavior: the resulting rendering should be equal no matter in what order elements are generated.
Observed behavior: if the dynamic style sheet is generated from a script called from a timeout, the rendering is different than if the script is called directly during load

See attached files (working.html and broken.html).

working.html works as expected, in broken.html the "float" css property does not have the desired effect on the rendering.
Comment 1 Mirko Tschäni 2011-09-20 07:31:13 PDT
Created attachment 108000 [details]
two html files. broken.html reproduces the bug, working.html works as expected
Comment 2 Julien Chaffraix 2011-09-20 17:39:03 PDT
Confirmed on ToT. FF and Opera both behave properly. Adding the new <style> element triggers a re-layout but it is not done properly.
Comment 3 Julien Chaffraix 2011-09-20 17:39:47 PDT
Created attachment 108086 [details]
Reduction based on the previous attachment