Changeset 103955 in webkit
- Timestamp:
- Jan 3, 2012 12:08:14 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r103954 r103955 1 2012-01-03 Julien Chaffraix <jchaffraix@webkit.org> 2 3 RenderLayer::backgroundClipRect should not check parent() 4 https://bugs.webkit.org/show_bug.cgi?id=73731 5 6 Reviewed by Simon Fraser. 7 8 Clean-up only, no expected change in behavior. 9 10 * rendering/RenderLayer.cpp: 11 (WebCore::backgroundClipRectForPosition): Changed RenderObject::isPositioned() to 12 a check for AbsolutePosition for consistency but also as this is equivalent due to: 13 - the previous check for FixedPosition. 14 - RenderView, which is positioned, will never goes to this code as it has no parent(). 15 16 (WebCore::RenderLayer::backgroundClipRect): Removed the parent() check. While at 17 it, also moved the inline initialization of |backgroundClipRect| to its own function 18 and removed a |view| check as the associated ASSERT seems to never have been reached. 19 1 20 2012-01-03 Alexey Proskuryakov <ap@apple.com> 2 21 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r103800 r103955 3698 3698 } 3699 3699 3700 static inline ClipRect backgroundClipRectForPosition(const ClipRects& parentRects, EPosition position) 3701 { 3702 if (position == FixedPosition) 3703 return parentRects.fixedClipRect(); 3704 3705 if (position == AbsolutePosition) 3706 return parentRects.posClipRect(); 3707 3708 return parentRects.overflowClipRect(); 3709 } 3710 3700 3711 ClipRect RenderLayer::backgroundClipRect(const RenderLayer* rootLayer, RenderRegion* region, bool temporaryClipRects, OverlayScrollbarSizeRelevancy relevancy) const 3701 3712 { 3702 ClipRect backgroundRect; 3703 if (parent()) { 3704 ClipRects parentRects; 3705 parentClipRects(rootLayer, region, parentRects, temporaryClipRects, relevancy); 3706 backgroundRect = renderer()->style()->position() == FixedPosition ? parentRects.fixedClipRect() : 3707 (renderer()->isPositioned() ? parentRects.posClipRect() : 3708 parentRects.overflowClipRect()); 3709 RenderView* view = renderer()->view(); 3710 ASSERT(view); 3711 if (view && parentRects.fixed() && rootLayer->renderer() == view) 3712 backgroundRect.move(view->frameView()->scrollXForFixedPosition(), view->frameView()->scrollYForFixedPosition()); 3713 } 3714 return backgroundRect; 3713 ASSERT(parent()); 3714 ClipRects parentRects; 3715 parentClipRects(rootLayer, region, parentRects, temporaryClipRects, relevancy); 3716 ClipRect backgroundClipRect = backgroundClipRectForPosition(parentRects, renderer()->style()->position()); 3717 RenderView* view = renderer()->view(); 3718 ASSERT(view); 3719 if (parentRects.fixed() && rootLayer->renderer() == view) 3720 backgroundClipRect.move(view->frameView()->scrollXForFixedPosition(), view->frameView()->scrollYForFixedPosition()); 3721 return backgroundClipRect; 3715 3722 } 3716 3723
Note: See TracChangeset
for help on using the changeset viewer.