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. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 4759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4770 | 4770 |
4771 LayoutRect RenderBox::noOverflowRect() const | 4771 LayoutRect RenderBox::noOverflowRect() const |
4772 { | 4772 { |
4773 // Because of the special coodinate system used for overflow rectangles and
many other | 4773 // Because of the special coodinate system used for overflow rectangles and
many other |
4774 // rectangles (not quite logical, not quite physical), we need to flip the b
lock progression | 4774 // rectangles (not quite logical, not quite physical), we need to flip the b
lock progression |
4775 // coordinate in vertical-rl and horizontal-bt writing modes. In other words
, the rectangle | 4775 // coordinate in vertical-rl and horizontal-bt writing modes. In other words
, the rectangle |
4776 // returned is physical, except for the block direction progression coordina
te (y in horizontal | 4776 // returned is physical, except for the block direction progression coordina
te (y in horizontal |
4777 // writing modes, x in vertical writing modes), which is always "logical top
". Apart from the | 4777 // writing modes, x in vertical writing modes), which is always "logical top
". Apart from the |
4778 // flipping, this method does the same as clientBoxRect(). | 4778 // flipping, this method does the same as clientBoxRect(). |
4779 | 4779 |
4780 LayoutUnit left = borderLeft(); | 4780 LayoutUnit left = borderLeft() + (style()->shouldPlaceBlockDirectionScrollba
rOnLogicalLeft() ? verticalScrollbarWidth() : 0); |
4781 LayoutUnit top = borderTop(); | 4781 LayoutUnit top = borderTop(); |
4782 LayoutUnit right = borderRight(); | 4782 LayoutUnit right = borderRight(); |
4783 LayoutUnit bottom = borderBottom(); | 4783 LayoutUnit bottom = borderBottom(); |
4784 LayoutRect rect(left, top, width() - left - right, height() - top - bottom); | 4784 LayoutRect rect(left, top, width() - left - right, height() - top - bottom); |
4785 flipForWritingMode(rect); | 4785 flipForWritingMode(rect); |
4786 // Subtract space occupied by scrollbars. Order is important here: first fli
p, then subtract | 4786 // Subtract space occupied by scrollbars. Order is important here: first fli
p, then subtract |
4787 // scrollbars. This may seem backwards and weird, since one would think that
a horizontal | 4787 // scrollbars. This may seem backwards and weird, since one would think that
a horizontal |
4788 // scrollbar at the physical bottom in horizontal-bt ought to be at the logi
cal top (physical | 4788 // scrollbar at the physical bottom in horizontal-bt ought to be at the logi
cal top (physical |
4789 // bottom), between the logical top (physical bottom) border and the logical
top (physical | 4789 // bottom), between the logical top (physical bottom) border and the logical
top (physical |
4790 // bottom) padding. But this is how the rest of the code expects us to behav
e. This is highly | 4790 // bottom) padding. But this is how the rest of the code expects us to behav
e. This is highly |
4791 // related to https://bugs.webkit.org/show_bug.cgi?id=76129 | 4791 // related to https://bugs.webkit.org/show_bug.cgi?id=76129 |
4792 // FIXME: when the above mentioned bug is fixed, it should hopefully be poss
ible to call | 4792 // FIXME: when the above mentioned bug is fixed, it should hopefully be poss
ible to call |
4793 // clientBoxRect() or paddingBoxRect() in this method, rather than fiddling
with the edges on | 4793 // clientBoxRect() or paddingBoxRect() in this method, rather than fiddling
with the edges on |
4794 // our own. | 4794 // our own. |
4795 rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight()); | 4795 if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) |
| 4796 rect.contract(0, horizontalScrollbarHeight()); |
| 4797 else |
| 4798 rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight()); |
4796 return rect; | 4799 return rect; |
4797 } | 4800 } |
4798 | 4801 |
4799 LayoutRect RenderBox::overflowRectForPaintRejection() const | 4802 LayoutRect RenderBox::overflowRectForPaintRejection() const |
4800 { | 4803 { |
4801 LayoutRect overflowRect = visualOverflowRect(); | 4804 LayoutRect overflowRect = visualOverflowRect(); |
4802 if (!m_overflow || !usesCompositedScrolling()) | 4805 if (!m_overflow || !usesCompositedScrolling()) |
4803 return overflowRect; | 4806 return overflowRect; |
4804 | 4807 |
4805 overflowRect.unite(layoutOverflowRect()); | 4808 overflowRect.unite(layoutOverflowRect()); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4980 return 0; | 4983 return 0; |
4981 | 4984 |
4982 if (!layoutState && !flowThreadContainingBlock()) | 4985 if (!layoutState && !flowThreadContainingBlock()) |
4983 return 0; | 4986 return 0; |
4984 | 4987 |
4985 RenderBlock* containerBlock = containingBlock(); | 4988 RenderBlock* containerBlock = containingBlock(); |
4986 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4989 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4987 } | 4990 } |
4988 | 4991 |
4989 } // namespace WebCore | 4992 } // namespace WebCore |
OLD | NEW |