Changeset 164336 in webkit
- Timestamp:
- Feb 18, 2014 5:55:33 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r164332 r164336 1 2014-02-18 Simon Fraser <simon.fraser@apple.com> 2 3 border-box clip-paths jump around when outline changes 4 https://bugs.webkit.org/show_bug.cgi?id=128929 5 6 Reviewed by Dirk Schulze. 7 8 Test comparing a border-box clip path with and without an outline. 9 10 * css3/masking/clip-path-root-relative-bounds-expected.html: Added. 11 * css3/masking/clip-path-root-relative-bounds.html: Added. 12 1 13 2014-02-18 James Craig <jcraig@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r164332 r164336 1 2014-02-18 Simon Fraser <simon.fraser@apple.com> 2 3 border-box clip-paths jump around when outline changes 4 https://bugs.webkit.org/show_bug.cgi?id=128929 5 6 Reviewed by Dirk Schulze. 7 8 computeReferenceBox() for clip paths was using "rootRelativeBounds" 9 to position the border-box. This bounds is an enclosing bounds for 10 the layer and its descendants, including outlines and absolute descendants, 11 so it is not the correct box to use to offset the border-box. 12 13 The caller has offsetFromRoot(), which is the correct thing to use, 14 so use it. 15 16 Test: css3/masking/clip-path-root-relative-bounds.html 17 18 * rendering/RenderLayer.cpp: 19 (WebCore::computeReferenceBox): 20 (WebCore::RenderLayer::setupClipPath): 21 1 22 2014-02-18 James Craig <jcraig@apple.com> 2 23 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r164275 r164336 3789 3789 3790 3790 template <class ReferenceBoxClipPathOperation> 3791 static inline LayoutRect computeReferenceBox(const RenderObject& renderer, const ReferenceBoxClipPathOperation& clippingPath, const Layout Rect& rootRelativeBounds)3791 static inline LayoutRect computeReferenceBox(const RenderObject& renderer, const ReferenceBoxClipPathOperation& clippingPath, const LayoutPoint& offsetFromRoot, const LayoutRect& rootRelativeBounds) 3792 3792 { 3793 3793 LayoutRect referenceBox; … … 3797 3797 case ContentBox: 3798 3798 referenceBox = box.contentBoxRect(); 3799 referenceBox.moveBy( rootRelativeBounds.location());3799 referenceBox.moveBy(offsetFromRoot); 3800 3800 break; 3801 3801 case PaddingBox: 3802 3802 referenceBox = box.paddingBoxRect(); 3803 referenceBox.moveBy( rootRelativeBounds.location());3803 referenceBox.moveBy(offsetFromRoot); 3804 3804 break; 3805 3805 // fill, stroke, view-box compute to border-box for HTML elements. … … 3809 3809 case BorderBox: 3810 3810 referenceBox = box.borderBoxRect(); 3811 referenceBox.moveBy( rootRelativeBounds.location());3811 referenceBox.moveBy(offsetFromRoot); 3812 3812 break; 3813 3813 case MarginBox: … … 3842 3842 ShapeClipPathOperation& clippingPath = toShapeClipPathOperation(*(style.clipPath())); 3843 3843 3844 LayoutRect referenceBox = computeReferenceBox(renderer(), clippingPath, rootRelativeBounds);3844 LayoutRect referenceBox = computeReferenceBox(renderer(), clippingPath, offsetFromRoot, rootRelativeBounds); 3845 3845 context->save(); 3846 3846 context->clipPath(clippingPath.pathForReferenceRect(referenceBox), clippingPath.windRule()); … … 3851 3851 BoxClipPathOperation& clippingPath = toBoxClipPathOperation(*(style.clipPath())); 3852 3852 3853 LayoutRect referenceBox = computeReferenceBox(renderer(), clippingPath, rootRelativeBounds);3853 LayoutRect referenceBox = computeReferenceBox(renderer(), clippingPath, offsetFromRoot, rootRelativeBounds); 3854 3854 // FIXME This does not properly compute the rounded corners as specified in all conditions. 3855 3855 // https://bugs.webkit.org/show_bug.cgi?id=127982
Note: See TracChangeset
for help on using the changeset viewer.