Changeset 153330 in webkit
- Timestamp:
- Jul 25, 2013 9:40:40 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r153297 r153330 1 2013-07-25 Bear Travis <betravis@adobe.com> 2 3 [CSS Shapes] Shape methods and member variables should be guarded with the CSS_SHAPES flag 4 https://bugs.webkit.org/show_bug.cgi?id=117277 5 6 Reviewed by Alexandru Chiculita. 7 8 This patch adds some compile guards that were missing from the RenderStyle and 9 StyleRareNonInheritedData files. When the compile guard caused parameters to 10 not be used, the parameters were marked using UNUSED_PARAM. 11 12 * css/CSSPropertyNames.in: Inserting a line to trigger build. 13 * rendering/RenderBlock.cpp: 14 (WebCore::shapeInfoRequiresRelayout): 15 (WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout): 16 (WebCore::RenderBlock::logicalRightFloatOffsetForLine): 17 * rendering/RenderBox.cpp: 18 (WebCore::isCandidateForOpaquenessTest): 19 * rendering/RenderBox.h: 20 * rendering/RenderObject.h: 21 * rendering/style/RenderStyle.cpp: 22 (WebCore::RenderStyle::changeRequiresLayout): 23 (WebCore::RenderStyle::changeRequiresRepaint): 24 * rendering/style/RenderStyle.h: 25 * rendering/style/StyleRareNonInheritedData.cpp: 26 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 27 (WebCore::StyleRareNonInheritedData::operator==): 28 * rendering/style/StyleRareNonInheritedData.h: 29 1 30 2013-07-24 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 31 -
trunk/Source/WebCore/css/CSSPropertyNames.in
r152479 r153330 8 8 // http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp 9 9 // 10 10 11 11 12 // high-priority property names have to be listed first, to simplify the check -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r153060 r153330 1469 1469 #endif 1470 1470 1471 #if ENABLE(CSS_SHAPES) 1471 1472 static inline bool shapeInfoRequiresRelayout(const RenderBlock* block) 1472 1473 { 1473 #if !ENABLE(CSS_SHAPES)1474 return false;1475 #else1476 1474 ShapeInsideInfo* info = block->shapeInsideInfo(); 1477 1475 if (info) … … 1480 1478 info = block->layoutShapeInsideInfo(); 1481 1479 return info && info->needsLayout(); 1480 } 1482 1481 #endif 1483 }1484 1482 1485 1483 bool RenderBlock::updateRegionsAndShapesBeforeChildLayout(RenderFlowThread* flowThread) … … 1487 1485 #if ENABLE(CSS_SHAPES) 1488 1486 if (!flowThread && !shapeInsideInfo()) 1487 return shapeInfoRequiresRelayout(this); 1489 1488 #else 1490 1489 if (!flowThread) 1490 return false; 1491 1491 #endif 1492 return shapeInfoRequiresRelayout(this);1493 1492 1494 1493 LayoutUnit oldHeight = logicalHeight(); … … 1510 1509 setLogicalHeight(oldHeight); 1511 1510 setLogicalTop(oldTop); 1512 1511 1512 #if ENABLE(CSS_SHAPES) 1513 1513 return shapeInfoRequiresRelayout(this); 1514 #else 1515 return false; 1516 #endif 1514 1517 } 1515 1518 … … 4550 4553 } 4551 4554 } 4555 #else 4556 UNUSED_PARAM(offsetMode); 4552 4557 #endif 4553 4558 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r153089 r153330 1225 1225 if (childStyle->position() != StaticPosition && childBox->containingBlock() != childBox->parent()) 1226 1226 return false; 1227 if (childStyle->visibility() != VISIBLE || childStyle->shapeOutside())1227 if (childStyle->visibility() != VISIBLE) 1228 1228 return false; 1229 #if ENABLE(CSS_SHAPES) 1230 if (childStyle->shapeOutside()) 1231 return false; 1232 #endif 1229 1233 if (!childBox->width() || !childBox->height()) 1230 1234 return false; -
trunk/Source/WebCore/rendering/RenderBox.h
r153089 r153330 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() || isFloatingWithShapeOutside(); } 52 virtual bool requiresLayer() const OVERRIDE 53 { 54 return isRoot() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip() 55 || hasTransform() || hasHiddenBackface() || hasReflection() || style()->specifiesColumns() 56 #if ENABLE(CSS_SHAPES) 57 || isFloatingWithShapeOutside() 58 #endif 59 || !style()->hasAutoZIndex(); 60 } 53 61 54 62 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const OVERRIDE; -
trunk/Source/WebCore/rendering/RenderObject.h
r152320 r153330 865 865 866 866 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOutOfFlowPositioned()); } 867 #if ENABLE(CSS_SHAPES) 867 868 bool isFloatingWithShapeOutside() const { return isBox() && isFloating() && style()->shapeOutside(); } 869 #endif 868 870 869 871 bool isTransparent() const { return style()->opacity() < 1.0f; } -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r152911 r153330 403 403 404 404 if (rareNonInheritedData->m_wrapFlow != other->rareNonInheritedData->m_wrapFlow 405 || rareNonInheritedData->m_wrapThrough != other->rareNonInheritedData->m_wrapThrough 406 || rareNonInheritedData->m_shapeMargin != other->rareNonInheritedData->m_shapeMargin 405 || rareNonInheritedData->m_wrapThrough != other->rareNonInheritedData->m_wrapThrough) 406 return true; 407 408 #if ENABLE(CSS_SHAPES) 409 if (rareNonInheritedData->m_shapeMargin != other->rareNonInheritedData->m_shapeMargin 407 410 || rareNonInheritedData->m_shapePadding != other->rareNonInheritedData->m_shapePadding) 408 411 return true; 412 #endif 409 413 410 414 if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other->rareNonInheritedData->m_deprecatedFlexibleBox.get() … … 696 700 || rareInheritedData->m_imageRendering != other->rareInheritedData->m_imageRendering) 697 701 return true; 698 702 703 #if ENABLE(CSS_SHAPES) 699 704 // FIXME: The current spec is being reworked to remove dependencies between exclusions and affected 700 705 // content. There's a proposal to use floats instead. In that case, wrap-shape should actually relayout … … 704 709 if (rareNonInheritedData->m_shapeOutside != other->rareNonInheritedData->m_shapeOutside) 705 710 return true; 711 #endif 706 712 707 713 if (rareNonInheritedData->m_clipPath != other->rareNonInheritedData->m_clipPath) … … 1739 1745 } 1740 1746 1747 #if ENABLE(CSS_SHAPES) 1741 1748 ShapeValue* RenderStyle::initialShapeInside() 1742 1749 { … … 1744 1751 return sOutsideValue.get(); 1745 1752 } 1753 #endif 1746 1754 1747 1755 void RenderStyle::setColumnStylesFromPaginationMode(const Pagination::Mode& paginationMode) -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r152911 r153330 1466 1466 #endif 1467 1467 1468 #if ENABLE(CSS_SHAPES) 1468 1469 void setShapeInside(PassRefPtr<ShapeValue> value) 1469 1470 { … … 1492 1493 static ShapeValue* initialShapeOutside() { return 0; } 1493 1494 1494 void setClipPath(PassRefPtr<ClipPathOperation> operation)1495 {1496 if (rareNonInheritedData->m_clipPath != operation)1497 rareNonInheritedData.access()->m_clipPath = operation;1498 }1499 ClipPathOperation* clipPath() const { return rareNonInheritedData->m_clipPath.get(); }1500 1501 static ClipPathOperation* initialClipPath() { return 0; }1502 1503 1495 Length shapePadding() const { return rareNonInheritedData->m_shapePadding; } 1504 1496 void setShapePadding(Length shapePadding) { SET_VAR(rareNonInheritedData, m_shapePadding, shapePadding); } … … 1508 1500 void setShapeMargin(Length shapeMargin) { SET_VAR(rareNonInheritedData, m_shapeMargin, shapeMargin); } 1509 1501 static Length initialShapeMargin() { return Length(0, Fixed); } 1502 #endif 1503 1504 void setClipPath(PassRefPtr<ClipPathOperation> operation) 1505 { 1506 if (rareNonInheritedData->m_clipPath != operation) 1507 rareNonInheritedData.access()->m_clipPath = operation; 1508 } 1509 ClipPathOperation* clipPath() const { return rareNonInheritedData->m_clipPath.get(); } 1510 1511 static ClipPathOperation* initialClipPath() { return 0; } 1510 1512 1511 1513 bool hasContent() const { return contentData(); } -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r151394 r153330 47 47 , m_mask(FillLayer(MaskFillLayer)) 48 48 , m_pageSize() 49 #if ENABLE(CSS_SHAPES) 49 50 , m_shapeInside(RenderStyle::initialShapeInside()) 50 51 , m_shapeOutside(RenderStyle::initialShapeOutside()) 51 52 , m_shapeMargin(RenderStyle::initialShapeMargin()) 52 53 , m_shapePadding(RenderStyle::initialShapePadding()) 54 #endif 53 55 , m_clipPath(RenderStyle::initialClipPath()) 54 56 , m_visitedLinkBackgroundColor(RenderStyle::initialBackgroundColor()) … … 121 123 , m_maskBoxImage(o.m_maskBoxImage) 122 124 , m_pageSize(o.m_pageSize) 125 #if ENABLE(CSS_SHAPES) 123 126 , m_shapeInside(o.m_shapeInside) 124 127 , m_shapeOutside(o.m_shapeOutside) 125 128 , m_shapeMargin(o.m_shapeMargin) 126 129 , m_shapePadding(o.m_shapePadding) 130 #endif 127 131 , m_clipPath(o.m_clipPath) 128 132 #if ENABLE(CSS3_TEXT) … … 210 214 && m_maskBoxImage == o.m_maskBoxImage 211 215 && m_pageSize == o.m_pageSize 216 #if ENABLE(CSS_SHAPES) 212 217 && m_shapeInside == o.m_shapeInside 213 218 && m_shapeOutside == o.m_shapeOutside 214 219 && m_shapeMargin == o.m_shapeMargin 215 220 && m_shapePadding == o.m_shapePadding 221 #endif 216 222 && m_clipPath == o.m_clipPath 217 223 #if ENABLE(CSS3_TEXT) -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r151402 r153330 137 137 LengthSize m_pageSize; 138 138 139 #if ENABLE(CSS_SHAPES) 139 140 RefPtr<ShapeValue> m_shapeInside; 140 141 RefPtr<ShapeValue> m_shapeOutside; 141 142 Length m_shapeMargin; 142 143 Length m_shapePadding; 144 #endif 143 145 144 146 RefPtr<ClipPathOperation> m_clipPath;
Note: See TracChangeset
for help on using the changeset viewer.