Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2569013006: Changed EOverflow to an enum class and renamed its members (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 layerRects, currentLayer, adjustedLayerOffset, containerRect); 922 layerRects, currentLayer, adjustedLayerOffset, containerRect);
923 } 923 }
924 924
925 void LayoutBox::computeSelfHitTestRects(Vector<LayoutRect>& rects, 925 void LayoutBox::computeSelfHitTestRects(Vector<LayoutRect>& rects,
926 const LayoutPoint& layerOffset) const { 926 const LayoutPoint& layerOffset) const {
927 if (!size().isEmpty()) 927 if (!size().isEmpty())
928 rects.append(LayoutRect(layerOffset, size())); 928 rects.append(LayoutRect(layerOffset, size()));
929 } 929 }
930 930
931 int LayoutBox::verticalScrollbarWidth() const { 931 int LayoutBox::verticalScrollbarWidth() const {
932 if (!hasOverflowClip() || style()->overflowY() == OverflowOverlay) 932 if (!hasOverflowClip() || style()->overflowY() == EOverflow::Overlay)
933 return 0; 933 return 0;
934 934
935 return getScrollableArea()->verticalScrollbarWidth(); 935 return getScrollableArea()->verticalScrollbarWidth();
936 } 936 }
937 937
938 int LayoutBox::horizontalScrollbarHeight() const { 938 int LayoutBox::horizontalScrollbarHeight() const {
939 if (!hasOverflowClip() || style()->overflowX() == OverflowOverlay) 939 if (!hasOverflowClip() || style()->overflowX() == EOverflow::Overlay)
940 return 0; 940 return 0;
941 941
942 return getScrollableArea()->horizontalScrollbarHeight(); 942 return getScrollableArea()->horizontalScrollbarHeight();
943 } 943 }
944 944
945 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, 945 ScrollResult LayoutBox::scroll(ScrollGranularity granularity,
946 const FloatSize& delta) { 946 const FloatSize& delta) {
947 // Presumably the same issue as in setScrollTop. See crbug.com/343132. 947 // Presumably the same issue as in setScrollTop. See crbug.com/343132.
948 DisableCompositingQueryAsserts disabler; 948 DisableCompositingQueryAsserts disabler;
949 949
(...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 // overflow has to be treated differently, since WinIE lets scrolled 3189 // overflow has to be treated differently, since WinIE lets scrolled
3190 // overflow regions shrink as needed. 3190 // overflow regions shrink as needed.
3191 // While we can't get all cases right, we can at least detect when the 3191 // While we can't get all cases right, we can at least detect when the
3192 // cell has a specified height or when the table has a specified height. 3192 // cell has a specified height or when the table has a specified height.
3193 // In these cases we want to initially have no size and allow the 3193 // In these cases we want to initially have no size and allow the
3194 // flexing of the table or the cell to its specified height to cause us 3194 // flexing of the table or the cell to its specified height to cause us
3195 // to grow to fill the space. This could end up being wrong in some 3195 // to grow to fill the space. This could end up being wrong in some
3196 // cases, but it is preferable to the alternative (sizing intrinsically 3196 // cases, but it is preferable to the alternative (sizing intrinsically
3197 // and making the row end up too big). 3197 // and making the row end up too big).
3198 LayoutTableCell* cell = toLayoutTableCell(cb); 3198 LayoutTableCell* cell = toLayoutTableCell(cb);
3199 if (style()->overflowY() != OverflowVisible && 3199 if (style()->overflowY() != EOverflow::Visible &&
3200 style()->overflowY() != OverflowHidden && 3200 style()->overflowY() != EOverflow::Hidden &&
3201 (!cell->style()->logicalHeight().isAuto() || 3201 (!cell->style()->logicalHeight().isAuto() ||
3202 !cell->table()->style()->logicalHeight().isAuto())) 3202 !cell->table()->style()->logicalHeight().isAuto()))
3203 return LayoutUnit(); 3203 return LayoutUnit();
3204 return LayoutUnit(-1); 3204 return LayoutUnit(-1);
3205 } 3205 }
3206 availableHeight = cb->overrideLogicalContentHeight(); 3206 availableHeight = cb->overrideLogicalContentHeight();
3207 } 3207 }
3208 } else { 3208 } else {
3209 availableHeight = cb->availableLogicalHeightForPercentageComputation(); 3209 availableHeight = cb->availableLogicalHeightForPercentageComputation();
3210 } 3210 }
(...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after
5656 LayoutRect rect = frameRect(); 5656 LayoutRect rect = frameRect();
5657 5657
5658 LayoutBlock* block = containingBlock(); 5658 LayoutBlock* block = containingBlock();
5659 if (block) 5659 if (block)
5660 block->adjustChildDebugRect(rect); 5660 block->adjustChildDebugRect(rect);
5661 5661
5662 return rect; 5662 return rect;
5663 } 5663 }
5664 5664
5665 } // namespace blink 5665 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698