Changeset 165130 in webkit
- Timestamp:
- Mar 5, 2014 2:02:55 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r165127 r165130 1 2014-03-05 Radu Stavila <stavila@adobe.com> 2 3 [CSS Regions] Scrollable regions 4 https://bugs.webkit.org/show_bug.cgi?id=129301 5 6 Reviewed by David Hyatt. 7 8 Added tests for scrolling elements flowed into regions. 9 10 * fast/regions/scrollable-last-region-expected.html: Added. 11 * fast/regions/scrollable-last-region.html: Added. 12 * fast/regions/scrollable-single-region-bt-expected.html: Added. 13 * fast/regions/scrollable-single-region-bt.html: Added. 14 * fast/regions/scrollable-single-region-expected.html: Added. 15 * fast/regions/scrollable-single-region-lr-expected.html: Added. 16 * fast/regions/scrollable-single-region-lr.html: Added. 17 * fast/regions/scrollable-single-region-relative-element-expected.html: Added. 18 * fast/regions/scrollable-single-region-relative-element.html: Added. 19 * fast/regions/scrollable-single-region-rl-expected.html: Added. 20 * fast/regions/scrollable-single-region-rl.html: Added. 21 * fast/regions/scrollable-single-region.html: Added. 22 1 23 2014-03-05 Zalan Bujtas <zalan@apple.com> 2 24 -
trunk/Source/WebCore/ChangeLog
r165127 r165130 1 2014-03-05 Radu Stavila <stavila@adobe.com> 2 3 [CSS Regions] Scrollable regions 4 https://bugs.webkit.org/show_bug.cgi?id=129301 5 6 Reviewed by David Hyatt. 7 8 Named flow fragments do not inherit the overflow property from the fragment container. 9 When asked if the flow thread content should be clipped, the named flow fragments 10 will respond using the overflow property of the named flow fragment container. 11 12 When painting the flow thread layer inside the region, the scrolled content offset of 13 the region must be used to offset the flow thread's layer. 14 15 Tests: fast/regions/scrollable-last-region.html 16 fast/regions/scrollable-single-region-bt.html 17 fast/regions/scrollable-single-region-lr.html 18 fast/regions/scrollable-single-region-relative-element.html 19 fast/regions/scrollable-single-region-rl.html 20 fast/regions/scrollable-single-region.html 21 22 * rendering/RenderLayer.cpp: 23 (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer): 24 (WebCore::RenderLayer::calculateClipRects): 25 * rendering/RenderNamedFlowFragment.cpp: 26 (WebCore::RenderNamedFlowFragment::createStyle): 27 (WebCore::RenderNamedFlowFragment::shouldClipFlowThreadContent): 28 * rendering/RenderNamedFlowFragment.h: 29 * rendering/RenderNamedFlowThread.cpp: 30 (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment): 31 * rendering/RenderRegion.cpp: 32 (WebCore::RenderRegion::shouldClipFlowThreadContent): 33 * rendering/RenderRegion.h: 34 1 35 2014-03-05 Zalan Bujtas <zalan@apple.com> 2 36 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r165127 r165130 5291 5291 LayoutPoint portionLocation = flowThreadPortionRect.location(); 5292 5292 LayoutRect regionContentBox = namedFlowFragment->fragmentContainer().contentBoxRect(); 5293 LayoutSize moveOffset = portionLocation - regionContentBox.location(); 5293 IntSize scrolledContentOffset = namedFlowFragment->fragmentContainer().hasOverflowClip() ? namedFlowFragment->fragmentContainer().scrolledContentOffset() : IntSize(); 5294 LayoutSize moveOffset = portionLocation - regionContentBox.location() + scrolledContentOffset; 5294 5295 5295 5296 ClipRect newOverflowClipRect = clipRects.overflowClipRect(); … … 6787 6788 LayoutRect regionContentBox = toRenderBox(region->layerOwner()).contentBoxRect(); 6788 6789 LayoutSize moveOffset = region->flowThreadPortionLocation() - (paintOffset + regionContentBox.location()); 6790 if (region->fragmentContainer().hasOverflowClip()) 6791 moveOffset += region->fragmentContainer().scrolledContentOffset(); 6792 6789 6793 IntPoint adjustedPaintOffset = roundedIntPoint(-moveOffset); 6790 6794 paintDirtyRect.move(moveOffset); -
trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp
r164988 r165130 63 63 style.get().setRegionThread(parentStyle.regionThread()); 64 64 style.get().setRegionFragment(parentStyle.regionFragment()); 65 style.get().setOverflowX(parentStyle.overflowX());66 style.get().setOverflowY(parentStyle.overflowY());67 65 #if ENABLE(CSS_SHAPES) && ENABLE(CSS_SHAPE_INSIDE) 68 66 style.get().setShapeInside(parentStyle.shapeInside()); … … 246 244 ASSERT(fragmentContainer().layer()); 247 245 return *fragmentContainer().layer(); 246 } 247 248 bool RenderNamedFlowFragment::shouldClipFlowThreadContent() const 249 { 250 if (fragmentContainer().hasOverflowClip()) 251 return true; 252 253 return isLastRegion() && (style().regionFragment() == BreakRegionFragment); 248 254 } 249 255 -
trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h
r164988 r165130 67 67 RenderBlockFlow& fragmentContainer() const; 68 68 RenderLayer& fragmentContainerLayer() const; 69 70 virtual bool shouldClipFlowThreadContent() const override; 69 71 70 72 bool isPseudoElementRegion() const { return parent() && parent()->isPseudoElement(); } -
trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp
r164988 r165130 298 298 // Now flip it again. 299 299 flipForWritingModeLocalCoordinates(visualOverflowRect); 300 301 // Take the scrolled offset of the region into consideration. 302 RenderBlockFlow& fragmentContainer = fragment.fragmentContainer(); 303 if (fragmentContainer.hasOverflowClip()) { 304 IntSize scrolledContentOffset = fragmentContainer.scrolledContentOffset(); 305 if (style().isFlippedBlocksWritingMode()) 306 scrolledContentOffset = -scrolledContentOffset; 307 308 visualOverflowRect.inflateX(scrolledContentOffset.width()); 309 visualOverflowRect.inflateY(scrolledContentOffset.height()); 310 } 300 311 301 312 // Layers are in physical coordinates so the origin must be moved to the physical top-left of the flowthread. -
trunk/Source/WebCore/rendering/RenderRegion.cpp
r164988 r165130 203 203 bool RenderRegion::shouldClipFlowThreadContent() const 204 204 { 205 if (hasOverflowClip()) 206 return true; 207 208 // regionFragment is CSSRegions specific therefore we take it into account only in these cases. 209 return isRenderNamedFlowFragment() ? isLastRegion() && style().regionFragment() == BreakRegionFragment : false; 205 return hasOverflowClip(); 210 206 } 211 207 -
trunk/Source/WebCore/rendering/RenderRegion.h
r164988 r165130 78 78 bool isFirstRegion() const; 79 79 bool isLastRegion() const; 80 bool shouldClipFlowThreadContent() const;80 virtual bool shouldClipFlowThreadContent() const; 81 81 82 82 // These methods represent the width and height of a "page" and for a RenderRegion they are just the
Note: See TracChangeset
for help on using the changeset viewer.