Changeset 165964 in webkit
- Timestamp:
- Mar 20, 2014 8:01:12 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 18 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r165963 r165964 1 2014-03-20 Radu Stavila <stavila@adobe.com> 2 3 [CSS Regions] The height of a scrollable element flowed inside a scrollable region is not computed correctly 4 https://bugs.webkit.org/show_bug.cgi?id=129487 5 6 Reviewed by Andrei Bucur. 7 8 Added tests for different situations using scrollable regions and fixed a couple existing tests. 9 10 * fast/regions/clip-to-padding-box-margins.html: overflow-x and overflow-y cannot be hidden & visible. 11 * fast/regions/scrollable-last-region-expected.html: "hack" no longer needed now that the scroll content size is properly computed. 12 * fast/regions/scrollable-region-content-size-expected.html: Added. 13 * fast/regions/scrollable-region-content-size-horiz-bt-expected.html: Added. 14 * fast/regions/scrollable-region-content-size-horiz-bt.html: Added. 15 * fast/regions/scrollable-region-content-size-no-overflow-expected.html: Added. 16 * fast/regions/scrollable-region-content-size-no-overflow-horiz-bt-expected.html: Added. 17 * fast/regions/scrollable-region-content-size-no-overflow-horiz-bt.html: Added. 18 * fast/regions/scrollable-region-content-size-no-overflow-vert-rl-expected.html: Added. 19 * fast/regions/scrollable-region-content-size-no-overflow-vert-rl.html: Added. 20 * fast/regions/scrollable-region-content-size-no-overflow.html: Added. 21 * fast/regions/scrollable-region-content-size-relative-expected.html: Added. 22 * fast/regions/scrollable-region-content-size-relative.html: Added. 23 * fast/regions/scrollable-region-content-size-vert-rl-expected.html: Added. 24 * fast/regions/scrollable-region-content-size-vert-rl.html: Added. 25 * fast/regions/scrollable-region-content-size-vertical-lr-expected.html: Added. 26 * fast/regions/scrollable-region-content-size-vertical-lr.html: Added. 27 * fast/regions/scrollable-region-content-size.html: Added. 28 * fast/regions/scrollable-region-scrollable-content-expected.html: Added. 29 * fast/regions/scrollable-region-scrollable-content.html: Added. 30 1 31 2014-03-20 Zalan Bujtas <zalan@apple.com> 2 32 -
trunk/LayoutTests/fast/regions/clip-to-padding-box-margins.html
r163880 r165964 17 17 padding: 10px 20px 30px 40px; 18 18 border: double 10px Gray; 19 overflow-x: hidden; 20 overflow-y: visible; 19 overflow: hidden; 21 20 background-color: #eee; 22 21 } -
trunk/LayoutTests/fast/regions/scrollable-last-region-expected.html
r165130 r165964 78 78 <div id="container3" class="container"> 79 79 <div>lacus nisl, rutrum sit amet euismod a, vulputate quis elit. Fusce commodo dui quis lacus viverra vel egestas velit tempus. Donec ut sapien sit amet purus luctus fermentum. Donec eleifend pretium neque quis bibendum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam congue dapibus mi, id ultricies est sagittis et. Integer posuere, eros vitae laoreet congue, tortor purus euismod nibh, eu porta purus arcu id turpis. Donec vitae ultricies nibh. Nullam in urna dolor, at fringilla lorem. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> 80 <div style="color:red ; height:491px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent interdum, sapien vitae faucibus suscipit, massa urna sagittis libero, ac imperdiet elit lacus a ligula. Mauris a orci sem. Nullam ullamcorper ornare porttitor. Morbi laoreet pellentesque diam, vitae hendrerit sem fringilla id. Maecenas rutrum lacinia lobortis. Praesent elit lectus, porttitor sed semper vel, fringilla id dolor. Sed lacus nisl, rutrum sit amet euismod a, vulputate quis elit. Fusce commodo dui quis lacus viverra vel egestas velit tempus. Donec ut sapien sit amet purus luctus fermentum. Donec eleifend pretium neque quis bibendum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam congue dapibus mi, id ultricies est sagittis et. Integer posuere, eros vitae laoreet congue, tortor purus euismod nibh, eu porta purus arcu id turpis. Donec vitae ultricies nibh. Nullam in urna dolor, at fringilla lorem. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>80 <div style="color:red">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent interdum, sapien vitae faucibus suscipit, massa urna sagittis libero, ac imperdiet elit lacus a ligula. Mauris a orci sem. Nullam ullamcorper ornare porttitor. Morbi laoreet pellentesque diam, vitae hendrerit sem fringilla id. Maecenas rutrum lacinia lobortis. Praesent elit lectus, porttitor sed semper vel, fringilla id dolor. Sed lacus nisl, rutrum sit amet euismod a, vulputate quis elit. Fusce commodo dui quis lacus viverra vel egestas velit tempus. Donec ut sapien sit amet purus luctus fermentum. Donec eleifend pretium neque quis bibendum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam congue dapibus mi, id ultricies est sagittis et. Integer posuere, eros vitae laoreet congue, tortor purus euismod nibh, eu porta purus arcu id turpis. Donec vitae ultricies nibh. Nullam in urna dolor, at fringilla lorem. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div> 81 81 </div> 82 82 </div> -
trunk/Source/WebCore/ChangeLog
r165963 r165964 1 2014-03-20 Radu Stavila <stavila@adobe.com> 2 3 [CSS Regions] The height of a scrollable element flowed inside a scrollable region is not computed correctly 4 https://bugs.webkit.org/show_bug.cgi?id=129487 5 6 Reviewed by Andrei Bucur. 7 8 When propagating the layout overflow from the flowed element up to the flow thread itself, 9 the region's logical bottom padding and the element's logical bottom margin must be taken into consideration. 10 However, if the flowed element has overflow, the overflow will be painted over the region's padding 11 and the element's margin, in order to be compatible with the non-regions case. 12 More info can be found here: http://lists.w3.org/Archives/Public/www-style/2014Jan/0089.html 13 14 Tests: fast/regions/scrollable-region-content-size-horiz-bt.html 15 fast/regions/scrollable-region-content-size-no-overflow-horiz-bt.html 16 fast/regions/scrollable-region-content-size-no-overflow-vert-rl.html 17 fast/regions/scrollable-region-content-size-no-overflow.html 18 fast/regions/scrollable-region-content-size-relative.html 19 fast/regions/scrollable-region-content-size-vert-rl.html 20 fast/regions/scrollable-region-content-size-vertical-lr.html 21 fast/regions/scrollable-region-content-size.html 22 fast/regions/scrollable-region-scrollable-content.html 23 24 * rendering/RenderFlowThread.cpp: 25 (WebCore::RenderFlowThread::addRegionsOverflowFromChild): 26 * rendering/RenderRegion.cpp: 27 (WebCore::RenderRegion::rectFlowPortionForBox): 28 1 29 2014-03-20 Zalan Bujtas <zalan@apple.com> 2 30 -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r165893 r165964 1343 1343 LayoutRect childLayoutOverflowRect = region->layoutOverflowRectForBoxForPropagation(child); 1344 1344 childLayoutOverflowRect.move(delta); 1345 1346 // When propagating the layout overflow to the flow thread object, make sure to include 1347 // the logical bottom padding of the scrollable region and the bottom margin of the flowed element. 1348 // In order to behave in a similar manner to the non-regions case, content overflowing the box 1349 // flowed into the region must be painted on top of the region's padding and the box's margin. 1350 // See http://lists.w3.org/Archives/Public/www-style/2014Jan/0089.html 1351 if (box->isRenderNamedFlowThread()) { 1352 ASSERT(box == this); 1353 RenderBlockFlow& fragmentContainer = toRenderNamedFlowFragment(region)->fragmentContainer(); 1354 LayoutUnit spacingAfterLayout = fragmentContainer.paddingAfter() + child->marginAfter(); 1355 if (isHorizontalWritingMode()) { 1356 if (fragmentContainer.scrollsOverflowY()) { 1357 LayoutUnit layoutMaxLogicalY = child->frameRect().maxY() + spacingAfterLayout; 1358 LayoutUnit maxYDiff = layoutMaxLogicalY - childLayoutOverflowRect.maxY(); 1359 if (maxYDiff > 0) 1360 childLayoutOverflowRect.expand(0, maxYDiff); 1361 } 1362 } else { 1363 if (fragmentContainer.scrollsOverflowX()) { 1364 LayoutUnit layoutMaxLogicalY = child->frameRect().maxX() + spacingAfterLayout; 1365 LayoutUnit maxYDiff = layoutMaxLogicalY - childLayoutOverflowRect.maxX(); 1366 if (maxYDiff > 0) 1367 childLayoutOverflowRect.expand(maxYDiff, 0); 1368 } 1369 } 1370 } 1371 1345 1372 region->addLayoutOverflowForBox(box, childLayoutOverflowRect); 1346 1373 -
trunk/Source/WebCore/rendering/RenderRegion.cpp
r165890 r165964 490 490 } 491 491 492 if (shouldClipFlowThreadContent()) {493 LayoutRect portionRect;494 if (isRenderNamedFlowFragment())495 portionRect = toRenderNamedFlowFragment(this)->flowThreadPortionRectForClipping(this == startRegion, this == endRegion);496 else497 portionRect = flowThreadPortionRect();498 499 mappedRect.intersect(portionRect);500 }501 502 492 return mappedRect.isEmpty() ? mappedRect : m_flowThread->mapFromFlowThreadToLocal(box, mappedRect); 503 493 }
Note: See TracChangeset
for help on using the changeset viewer.