| OLD | NEW |
| 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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 layerRects, currentLayer, adjustedLayerOffset, containerRect); | 932 layerRects, currentLayer, adjustedLayerOffset, containerRect); |
| 933 } | 933 } |
| 934 | 934 |
| 935 void LayoutBox::computeSelfHitTestRects(Vector<LayoutRect>& rects, | 935 void LayoutBox::computeSelfHitTestRects(Vector<LayoutRect>& rects, |
| 936 const LayoutPoint& layerOffset) const { | 936 const LayoutPoint& layerOffset) const { |
| 937 if (!size().isEmpty()) | 937 if (!size().isEmpty()) |
| 938 rects.push_back(LayoutRect(layerOffset, size())); | 938 rects.push_back(LayoutRect(layerOffset, size())); |
| 939 } | 939 } |
| 940 | 940 |
| 941 int LayoutBox::verticalScrollbarWidth() const { | 941 int LayoutBox::verticalScrollbarWidth() const { |
| 942 if (!hasOverflowClip() || style()->overflowY() == EOverflow::Overlay) | 942 if (!hasOverflowClip() || style()->overflowY() == EOverflow::kOverlay) |
| 943 return 0; | 943 return 0; |
| 944 | 944 |
| 945 return getScrollableArea()->verticalScrollbarWidth(); | 945 return getScrollableArea()->verticalScrollbarWidth(); |
| 946 } | 946 } |
| 947 | 947 |
| 948 int LayoutBox::horizontalScrollbarHeight() const { | 948 int LayoutBox::horizontalScrollbarHeight() const { |
| 949 if (!hasOverflowClip() || style()->overflowX() == EOverflow::Overlay) | 949 if (!hasOverflowClip() || style()->overflowX() == EOverflow::kOverlay) |
| 950 return 0; | 950 return 0; |
| 951 | 951 |
| 952 return getScrollableArea()->horizontalScrollbarHeight(); | 952 return getScrollableArea()->horizontalScrollbarHeight(); |
| 953 } | 953 } |
| 954 | 954 |
| 955 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, | 955 ScrollResult LayoutBox::scroll(ScrollGranularity granularity, |
| 956 const FloatSize& delta) { | 956 const FloatSize& delta) { |
| 957 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 957 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
| 958 DisableCompositingQueryAsserts disabler; | 958 DisableCompositingQueryAsserts disabler; |
| 959 | 959 |
| (...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3208 // always make ourselves be a percentage of the cell's current content | 3208 // always make ourselves be a percentage of the cell's current content |
| 3209 // height. | 3209 // height. |
| 3210 if (!cb->hasOverrideLogicalContentHeight()) { | 3210 if (!cb->hasOverrideLogicalContentHeight()) { |
| 3211 // https://drafts.csswg.org/css-tables-3/#row-layout: | 3211 // https://drafts.csswg.org/css-tables-3/#row-layout: |
| 3212 // For the purpose of calculating [the minimum height of a row], | 3212 // For the purpose of calculating [the minimum height of a row], |
| 3213 // descendants of table cells whose height depends on percentages | 3213 // descendants of table cells whose height depends on percentages |
| 3214 // of their parent cell's height are considered to have an auto | 3214 // of their parent cell's height are considered to have an auto |
| 3215 // height if they have overflow set to visible or hidden or if | 3215 // height if they have overflow set to visible or hidden or if |
| 3216 // they are replaced elements, and a 0px height if they have not. | 3216 // they are replaced elements, and a 0px height if they have not. |
| 3217 LayoutTableCell* cell = toLayoutTableCell(cb); | 3217 LayoutTableCell* cell = toLayoutTableCell(cb); |
| 3218 if (style()->overflowY() != EOverflow::Visible && | 3218 if (style()->overflowY() != EOverflow::kVisible && |
| 3219 style()->overflowY() != EOverflow::Hidden && | 3219 style()->overflowY() != EOverflow::kHidden && |
| 3220 !shouldBeConsideredAsReplaced() && | 3220 !shouldBeConsideredAsReplaced() && |
| 3221 (!cell->style()->logicalHeight().isAuto() || | 3221 (!cell->style()->logicalHeight().isAuto() || |
| 3222 !cell->table()->style()->logicalHeight().isAuto())) | 3222 !cell->table()->style()->logicalHeight().isAuto())) |
| 3223 return LayoutUnit(); | 3223 return LayoutUnit(); |
| 3224 return LayoutUnit(-1); | 3224 return LayoutUnit(-1); |
| 3225 } | 3225 } |
| 3226 availableHeight = cb->overrideLogicalContentHeight(); | 3226 availableHeight = cb->overrideLogicalContentHeight(); |
| 3227 } | 3227 } |
| 3228 } else { | 3228 } else { |
| 3229 availableHeight = cb->availableLogicalHeightForPercentageComputation(); | 3229 availableHeight = cb->availableLogicalHeightForPercentageComputation(); |
| (...skipping 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5694 block->adjustChildDebugRect(rect); | 5694 block->adjustChildDebugRect(rect); |
| 5695 | 5695 |
| 5696 return rect; | 5696 return rect; |
| 5697 } | 5697 } |
| 5698 | 5698 |
| 5699 bool LayoutBox::shouldClipOverflow() const { | 5699 bool LayoutBox::shouldClipOverflow() const { |
| 5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); | 5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); |
| 5701 } | 5701 } |
| 5702 | 5702 |
| 5703 } // namespace blink | 5703 } // namespace blink |
| OLD | NEW |