Changeset 94695 in webkit
- Timestamp:
- Sep 7, 2011 11:59:55 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r94689 r94695 1 2011-09-03 Robert Hogan <robert@webkit.org> 2 3 Elements with position:absolute don't move to correct position after images load 4 https://bugs.webkit.org/show_bug.cgi?id=54611 5 6 Reviewed by Simon Fraser. 7 8 * fast/block/positioning/absolute-layout-after-image-load-expected.txt: Added. 9 * fast/block/positioning/absolute-layout-after-image-load.html: Added. 10 * fast/block/positioning/resources/absolute-layout-after-image-load-2.html: Added. 11 * fast/block/positioning/positioned-float-layout-after-image-load-expected.txt: Added. 12 * fast/block/positioning/positioned-float-layout-after-image-load.html: Added. 13 * fast/block/positioning/resources/positioned-float-layout-after-image-load-2.html: Added. 14 1 15 2011-09-07 Pavel Podivilov <podivilov@chromium.org> 2 16 -
trunk/Source/WebCore/ChangeLog
r94694 r94695 1 2011-09-03 Robert Hogan <robert@webkit.org> 2 3 Elements with position:absolute don't move to correct position after images load 4 https://bugs.webkit.org/show_bug.cgi?id=54611 5 6 Reviewed by Simon Fraser. 7 8 Test: fast/block/positioning/absolute-layout-after-image-load.html 9 fast/block/positioning/positioned-float-layout-after-image-load.html 10 11 In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 12 this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 13 the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 14 There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Do the same 15 for positioned floats in RenderBlock::positionedFloatsNeedRelayout(), although currently layoutPositionedObjects() 16 takes care of it this at least ensures no regression in future. 17 18 Note: Although the issue is encountered only on first load without a fragment identifier, it 19 happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 20 because scrolling to the fragment always happens before the image has loaded, rendering the page 21 and clearing the initial dirty bits in the positioned element's renderer. When the image finally 22 loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 23 re-rendered. 24 25 * rendering/RenderBlock.cpp: 26 (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 27 deciding whether to mark children for layout 28 (WebCore::RenderBlock::positionedFloatsNeedRelayout): ditto 29 1 30 2011-09-07 Anna Cavender <annacc@chromium.org> 2 31 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r94582 r94695 2217 2217 return true; 2218 2218 2219 if (positionedObject->style()->hasStaticBlockPosition(isHorizontalWritingMode()) && positionedObject->parent() != this && positionedObject->parent()->isBlockFlow())2219 if (positionedObject->style()->hasStaticBlockPosition(isHorizontalWritingMode()) && positionedObject->parent() != this) 2220 2220 return true; 2221 2221 … … 2245 2245 // objects that are positioned implicitly like this. Such objects are rare, and so in typical DHTML menu usage (where everything is 2246 2246 // positioned explicitly) this should not incur a performance penalty. 2247 if (relayoutChildren || (r->style()->hasStaticBlockPosition(isHorizontalWritingMode()) && r->parent() != this && r->parent()->isBlockFlow()))2247 if (relayoutChildren || (r->style()->hasStaticBlockPosition(isHorizontalWritingMode()) && r->parent() != this)) 2248 2248 r->setChildNeedsLayout(true, false); 2249 2249
Note: See TracChangeset
for help on using the changeset viewer.