Summary: | [CSS Shapes] Dynamically created element with image valued shape-outside doesn't update automatically | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Hans Muller <giles_joplin> | ||||||
Component: | CSS | Assignee: | Hans Muller <giles_joplin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bdakin, commit-queue, dino, esprehn+autocc, glenn, hyatt, kling, kondapallykalyan, simon.fraser, zalan | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Hans Muller
2014-02-04 09:05:58 PST
Created attachment 223141 [details]
Patch
Corrected the way shape-outside handles the completion of an image load. Move the shape-outside imageChanged() logic from RenderBlock to RenderBox and call markShapeOutsideDependentsForLayout() instead of parent()->setNeedsLayoutAndPrefWidthsRecalc(). The latter did not deal with descendants of the shape element's siblings correctly and it failed when the shape element was inserted dynamically. The markShapeOutsideDependentsForLayout() method can't be called during layout, so the imageChanged() code checks for that. The only scenario where imageChanged() can be called during layout (that I've discovered so far anyway) is when an SVG Image is renderered with drawImage(). The Shape::createRasterShape() does, and the corresponding imageChanged() notification can be safely ignored.
Moving this up to RenderBox seems okay to me. Could someone with better layout-fu have a look? (CC'd) Comment on attachment 223141 [details] Patch Clearing flags on attachment: 223141 Committed r163458: <http://trac.webkit.org/changeset/163458> All reviewed patches have been landed. Closing bug. |