Changeset 167988 in webkit
- Timestamp:
- Apr 30, 2014 1:23:00 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r167983 r167988 1 2014-04-30 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [CSS Grid Layout] Wrap some specific grid code under compilation flag 4 https://bugs.webkit.org/show_bug.cgi?id=132341 5 6 Reviewed by Benjamin Poulain. 7 8 Some static variables in RenderBox are only used for CSS Grid Layout code. Wrap them and the related methods 9 under ENABLE_CSS_GRID_LAYOUT compilation flag. 10 11 * rendering/RenderBox.cpp: 12 (WebCore::RenderBox::willBeDestroyed): 13 (WebCore::RenderBox::containingBlockLogicalWidthForContent): 14 (WebCore::RenderBox::containingBlockLogicalHeightForContent): 15 (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight): 16 (WebCore::RenderBox::computePercentageLogicalHeight): 17 * rendering/RenderBox.h: 18 1 19 2014-04-29 Commit Queue <commit-queue@webkit.org> 2 20 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r167930 r167988 75 75 static OverrideSizeMap* gOverrideWidthMap = 0; 76 76 77 #if ENABLE(CSS_GRID_LAYOUT) 77 78 // Used by grid elements to properly size their grid items. 78 static OverrideSizeMap* gOverrideContainingBlockLogicalHeightMap = 0;79 static OverrideSizeMap* gOverrideContainingBlockLogicalWidthMap = 0;80 79 static OverrideSizeMap* gOverrideContainingBlockLogicalHeightMap = nullptr; 80 static OverrideSizeMap* gOverrideContainingBlockLogicalWidthMap = nullptr; 81 #endif 81 82 82 83 // Size of border belt for autoscroll. When mouse pointer in border belt, … … 217 218 218 219 clearOverrideSize(); 220 #if ENABLE(CSS_GRID_LAYOUT) 219 221 clearContainingBlockOverrideSize(); 222 #endif 220 223 221 224 RenderBlock::removePercentHeightDescendantIfNeeded(*this); … … 1031 1034 } 1032 1035 1036 #if ENABLE(CSS_GRID_LAYOUT) 1033 1037 LayoutUnit RenderBox::overrideContainingBlockContentLogicalWidth() const 1034 1038 { … … 1079 1083 gOverrideContainingBlockLogicalHeightMap->remove(this); 1080 1084 } 1085 #endif // ENABLE(CSS_GRID_LAYOUT) 1081 1086 1082 1087 LayoutUnit RenderBox::adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const … … 1773 1778 LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const 1774 1779 { 1780 #if ENABLE(CSS_GRID_LAYOUT) 1775 1781 if (hasOverrideContainingBlockLogicalWidth()) 1776 1782 return overrideContainingBlockContentLogicalWidth(); 1783 #endif 1777 1784 1778 1785 RenderBlock* cb = containingBlock(); … … 1782 1789 LayoutUnit RenderBox::containingBlockLogicalHeightForContent(AvailableLogicalHeightType heightType) const 1783 1790 { 1791 #if ENABLE(CSS_GRID_LAYOUT) 1784 1792 if (hasOverrideContainingBlockLogicalHeight()) 1785 1793 return overrideContainingBlockContentLogicalHeight(); 1794 #endif 1786 1795 1787 1796 RenderBlock* cb = containingBlock(); … … 1820 1829 LayoutUnit RenderBox::perpendicularContainingBlockLogicalHeight() const 1821 1830 { 1831 #if ENABLE(CSS_GRID_LAYOUT) 1822 1832 if (hasOverrideContainingBlockLogicalHeight()) 1823 1833 return overrideContainingBlockContentLogicalHeight(); 1834 #endif 1824 1835 1825 1836 RenderBlock* cb = containingBlock(); … … 2759 2770 if (isHorizontal != cb->isHorizontalWritingMode()) 2760 2771 availableHeight = containingBlockChild->containingBlockLogicalWidthForContent(); 2772 #if ENABLE(CSS_GRID_LAYOUT) 2761 2773 else if (hasOverrideContainingBlockLogicalHeight()) 2762 2774 availableHeight = overrideContainingBlockContentLogicalHeight(); 2775 #endif 2763 2776 else if (cb->isTableCell()) { 2764 2777 if (!skippedAutoHeightContainingBlock) { -
trunk/Source/WebCore/rendering/RenderBox.h
r167803 r167988 330 330 void clearOverrideLogicalContentWidth(); 331 331 332 #if ENABLE(CSS_GRID_LAYOUT) 332 333 LayoutUnit overrideContainingBlockContentLogicalWidth() const; 333 334 LayoutUnit overrideContainingBlockContentLogicalHeight() const; … … 338 339 void clearContainingBlockOverrideSize(); 339 340 void clearOverrideContainingBlockContentLogicalHeight(); 341 #endif 340 342 341 343 virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const override;
Note: See TracChangeset
for help on using the changeset viewer.