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.
Created attachment 108000 [details] two html files. broken.html reproduces the bug, working.html works as expected
Confirmed on ToT. FF and Opera both behave properly. Adding the new <style> element triggers a re-layout but it is not done properly.
Created attachment 108086 [details] Reduction based on the previous attachment