Changeset 105903 in webkit
- Timestamp:
- Jan 25, 2012 11:27:54 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r105902 r105903 1 2012-01-25 Tony Chang <tony@chromium.org> 2 3 support overflow:auto and overflow:scroll in new flexbox 4 https://bugs.webkit.org/show_bug.cgi?id=76953 5 6 Reviewed by David Hyatt. 7 8 * css3/flexbox/flexbox-overflow-auto-expected.html: Added. 9 * css3/flexbox/flexbox-overflow-auto.html: Added. 10 1 11 2012-01-25 Sheriff Bot <webkit.review.bot@gmail.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r105902 r105903 1 2012-01-25 Tony Chang <tony@chromium.org> 2 3 support overflow:auto and overflow:scroll in new flexbox 4 https://bugs.webkit.org/show_bug.cgi?id=76953 5 6 Reviewed by David Hyatt. 7 8 Tests: css3/flexbox/flexbox-overflow-auto-expected.html 9 css3/flexbox/flexbox-overflow-auto.html 10 11 * rendering/RenderBox.cpp: 12 (WebCore::RenderBox::addLayoutOverflow): In the case of reverse flexboxen, we can overflow up or to the left (like horizontal-bt or rtl content). 13 * rendering/RenderFlexibleBox.cpp: 14 (WebCore::RenderFlexibleBox::layoutBlock): Call updateScrollInfoAfterLayout() to add overflow scrollbars. 15 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): In row-reverse, offset the start of the content by the scrollbar. 16 (WebCore::RenderFlexibleBox::layoutColumnReverse): In column-reverse, offset the start of the content by the scrollbar. 17 * rendering/RenderFlexibleBox.h: 18 (RenderFlexibleBox): Make isHorizontalFlow public. 19 * rendering/style/RenderStyle.h: 20 (WebCore::RenderStyleBitfields::isReverseFlexDirection): Convenience method. 21 1 22 2012-01-25 Sheriff Bot <webkit.review.bot@gmail.com> 2 23 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r105394 r105903 43 43 #include "RenderArena.h" 44 44 #include "RenderBoxRegionInfo.h" 45 #include "RenderFlexibleBox.h" 45 46 #include "RenderFlowThread.h" 46 47 #include "RenderInline.h" … … 3594 3595 bool hasTopOverflow = !style()->isLeftToRightDirection() && !isHorizontalWritingMode(); 3595 3596 bool hasLeftOverflow = !style()->isLeftToRightDirection() && isHorizontalWritingMode(); 3597 if (isFlexibleBox() && style()->isReverseFlexDirection()) { 3598 RenderFlexibleBox* flexibleBox = static_cast<RenderFlexibleBox*>(this); 3599 if (flexibleBox->isHorizontalFlow()) 3600 hasLeftOverflow = true; 3601 else 3602 hasTopOverflow = true; 3603 } 3596 3604 3597 3605 if (!hasTopOverflow) -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r105694 r105903 176 176 m_overflow.clear(); 177 177 178 // For overflow:scroll blocks, ensure we have both scrollbars in place always. 179 if (scrollsOverflow()) { 180 if (style()->overflowX() == OSCROLL) 181 layer()->setHasHorizontalScrollbar(true); 182 if (style()->overflowY() == OSCROLL) 183 layer()->setHasVerticalScrollbar(true); 184 } 185 178 186 layoutFlexItems(relayoutChildren); 179 187 … … 191 199 192 200 updateLayerTransform(); 201 202 // Update our scroll information if we're overflow:auto/scroll/hidden now that we know if 203 // we overflow or not. 204 if (hasOverflowClip()) 205 layer()->updateScrollInfoAfterLayout(); 193 206 194 207 repainter.repaintAfterLayout(); … … 637 650 LayoutUnit mainAxisOffset = flowAwareBorderStart() + flowAwarePaddingStart(); 638 651 mainAxisOffset += initialPackingOffset(availableFreeSpace, totalPositiveFlexibility, style()->flexPack(), childSizes.size()); 652 if (style()->flexDirection() == FlowRowReverse) 653 mainAxisOffset += isHorizontalFlow() ? verticalScrollbarWidth() : horizontalScrollbarHeight(); 639 654 640 655 LayoutUnit crossAxisOffset = flowAwareBorderBefore() + flowAwarePaddingBefore(); … … 700 715 LayoutUnit mainAxisOffset = logicalHeight() - flowAwareBorderEnd() - flowAwarePaddingEnd(); 701 716 mainAxisOffset -= initialPackingOffset(availableFreeSpace, totalPositiveFlexibility, style()->flexPack(), childSizes.size()); 717 mainAxisOffset -= isHorizontalFlow() ? verticalScrollbarWidth() : horizontalScrollbarHeight(); 702 718 703 719 LayoutUnit crossAxisOffset = flowAwareBorderBefore() + flowAwarePaddingBefore(); -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r104645 r105903 47 47 virtual void layoutBlock(bool relayoutChildren, int pageLogicalHeight = 0, BlockLayoutPass = NormalLayoutPass); 48 48 49 bool isHorizontalFlow() const; 50 49 51 private: 50 52 class TreeOrderIterator; … … 54 56 bool hasOrthogonalFlow(RenderBox* child) const; 55 57 bool isColumnFlow() const; 56 bool isHorizontalFlow() const;57 58 bool isLeftToRightFlow() const; 58 59 Length crossAxisLength() const; -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r105901 r105903 809 809 EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(rareNonInheritedData->m_flexibleBox->m_flexDirection); } 810 810 bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; } 811 bool isReverseFlexDirection() const { return flexDirection() == FlowRowReverse || flexDirection() == FlowColumnReverse; } 811 812 EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedData->m_flexibleBox->m_flexWrap); } 812 813
Note: See TracChangeset
for help on using the changeset viewer.