Changeset 147495 in webkit
- Timestamp:
- Apr 2, 2013 2:18:09 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147494 r147495 1 2013-04-02 Bem Jones-Bey <bjonesbe@adobe.com> 2 3 [CSS Exclusions] refactor shape-outside code to use isFloatingWithShapeOutside() helper method 4 https://bugs.webkit.org/show_bug.cgi?id=113799 5 6 Reviewed by Dirk Schulze. 7 8 When reviewing my patch for bug 110349, Julien mentioned that the 9 common test for floating with shape outside should be factored out. 10 This patch does that. 11 12 No new functionality, so no new tests. 13 14 * rendering/ExclusionShapeOutsideInfo.cpp: 15 (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Use helper method. 16 * rendering/RenderBox.h: 17 (WebCore::RenderBox::exclusionShapeOutsideInfo): Ditto. 18 * rendering/RenderLayer.cpp: 19 (WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto. 20 * rendering/RenderObject.h: 21 (WebCore::RenderObject::hasPaintOffset): Ditto. 22 (WebCore::RenderObject::isFloatingWithShapeOutside): Add method to 23 encapsulate the common test. 24 1 25 2013-04-02 Jer Noble <jer.noble@apple.com> 2 26 -
trunk/Source/WebCore/rendering/ExclusionShapeOutsideInfo.cpp
r145982 r147495 40 40 { 41 41 ExclusionShapeValue* value = box->style()->shapeOutside(); 42 return (box->isFloating () && value&& value->type() == ExclusionShapeValue::SHAPE) ? value->shape() : 0;42 return (box->isFloatingWithShapeOutside() && value->type() == ExclusionShapeValue::SHAPE) ? value->shape() : 0; 43 43 } 44 44 -
trunk/Source/WebCore/rendering/RenderBox.h
r147261 r147495 50 50 // hasAutoZIndex only returns true if the element is positioned or a flex-item since 51 51 // position:static elements that are not flex-items get their z-index coerced to auto. 52 virtual bool requiresLayer() const OVERRIDE { return isRoot() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip() || hasTransform() || hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !style()->hasAutoZIndex() || (style()->shapeOutside() && isFloating()); }52 virtual bool requiresLayer() const OVERRIDE { return isRoot() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip() || hasTransform() || hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !style()->hasAutoZIndex() || isFloatingWithShapeOutside(); } 53 53 54 54 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const OVERRIDE; … … 583 583 ExclusionShapeOutsideInfo* exclusionShapeOutsideInfo() const 584 584 { 585 return style()->shapeOutside() && ExclusionShapeOutsideInfo::isEnabledFor(this) ? ExclusionShapeOutsideInfo::info(this) : 0;585 return isFloatingWithShapeOutside() && ExclusionShapeOutsideInfo::isEnabledFor(this) ? ExclusionShapeOutsideInfo::info(this) : 0; 586 586 } 587 587 #endif -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r147472 r147495 5848 5848 && !needsCompositedScrolling() 5849 5849 #if ENABLE(CSS_EXCLUSIONS) 5850 && ! (renderer()->isFloating() && renderer()->style()->shapeOutside())5850 && !renderer()->isFloatingWithShapeOutside() 5851 5851 #endif 5852 5852 ; -
trunk/Source/WebCore/rendering/RenderObject.h
r147414 r147495 555 555 // Shape outside on a float can reposition the float in much the 556 556 // same way as relative positioning, so treat it as such. 557 positioned = positioned || (m_bitfields.floating() && m_bitfields.isBox() && style()->shapeOutside());557 positioned = positioned || isFloatingWithShapeOutside(); 558 558 #endif 559 559 return positioned; … … 880 880 881 881 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOutOfFlowPositioned()); } 882 bool isFloatingWithShapeOutside() const { return isBox() && isFloating() && style()->shapeOutside(); } 882 883 883 884 bool isTransparent() const { return style()->opacity() < 1.0f; }
Note: See TracChangeset
for help on using the changeset viewer.