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 4544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4555 | 4555 |
4556 LayoutRect RenderBox::noOverflowRect() const | 4556 LayoutRect RenderBox::noOverflowRect() const |
4557 { | 4557 { |
4558 // Because of the special coodinate system used for overflow rectangles and
many other | 4558 // Because of the special coodinate system used for overflow rectangles and
many other |
4559 // rectangles (not quite logical, not quite physical), we need to flip the b
lock progression | 4559 // rectangles (not quite logical, not quite physical), we need to flip the b
lock progression |
4560 // coordinate in vertical-rl and horizontal-bt writing modes. In other words
, the rectangle | 4560 // coordinate in vertical-rl and horizontal-bt writing modes. In other words
, the rectangle |
4561 // returned is physical, except for the block direction progression coordina
te (y in horizontal | 4561 // returned is physical, except for the block direction progression coordina
te (y in horizontal |
4562 // writing modes, x in vertical writing modes), which is always "logical top
". Apart from the | 4562 // writing modes, x in vertical writing modes), which is always "logical top
". Apart from the |
4563 // flipping, this method does the same as clientBoxRect(). | 4563 // flipping, this method does the same as clientBoxRect(). |
4564 | 4564 |
4565 LayoutUnit left = borderLeft(); | 4565 LayoutUnit left = borderLeft() + (style()->shouldPlaceBlockDirectionScrollba
rOnLogicalLeft() ? verticalScrollbarWidth() : 0); |
4566 LayoutUnit top = borderTop(); | 4566 LayoutUnit top = borderTop(); |
4567 LayoutUnit right = borderRight(); | 4567 LayoutUnit right = borderRight(); |
4568 LayoutUnit bottom = borderBottom(); | 4568 LayoutUnit bottom = borderBottom(); |
4569 LayoutRect rect(left, top, width() - left - right, height() - top - bottom); | 4569 LayoutRect rect(left, top, width() - left - right, height() - top - bottom); |
4570 flipForWritingMode(rect); | 4570 flipForWritingMode(rect); |
4571 // Subtract space occupied by scrollbars. Order is important here: first fli
p, then subtract | 4571 // Subtract space occupied by scrollbars. Order is important here: first fli
p, then subtract |
4572 // scrollbars. This may seem backwards and weird, since one would think that
a horizontal | 4572 // scrollbars. This may seem backwards and weird, since one would think that
a horizontal |
4573 // scrollbar at the physical bottom in horizontal-bt ought to be at the logi
cal top (physical | 4573 // scrollbar at the physical bottom in horizontal-bt ought to be at the logi
cal top (physical |
4574 // bottom), between the logical top (physical bottom) border and the logical
top (physical | 4574 // bottom), between the logical top (physical bottom) border and the logical
top (physical |
4575 // bottom) padding. But this is how the rest of the code expects us to behav
e. This is highly | 4575 // bottom) padding. But this is how the rest of the code expects us to behav
e. This is highly |
4576 // related to https://bugs.webkit.org/show_bug.cgi?id=76129 | 4576 // related to https://bugs.webkit.org/show_bug.cgi?id=76129 |
4577 // FIXME: when the above mentioned bug is fixed, it should hopefully be poss
ible to call | 4577 // FIXME: when the above mentioned bug is fixed, it should hopefully be poss
ible to call |
4578 // clientBoxRect() or paddingBoxRect() in this method, rather than fiddling
with the edges on | 4578 // clientBoxRect() or paddingBoxRect() in this method, rather than fiddling
with the edges on |
4579 // our own. | 4579 // our own. |
4580 rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight()); | 4580 if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) |
| 4581 rect.contract(0, horizontalScrollbarHeight()); |
| 4582 else |
| 4583 rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight()); |
4581 return rect; | 4584 return rect; |
4582 } | 4585 } |
4583 | 4586 |
4584 LayoutRect RenderBox::overflowRectForPaintRejection() const | 4587 LayoutRect RenderBox::overflowRectForPaintRejection() const |
4585 { | 4588 { |
4586 LayoutRect overflowRect = visualOverflowRect(); | 4589 LayoutRect overflowRect = visualOverflowRect(); |
4587 if (!m_overflow || !usesCompositedScrolling()) | 4590 if (!m_overflow || !usesCompositedScrolling()) |
4588 return overflowRect; | 4591 return overflowRect; |
4589 | 4592 |
4590 overflowRect.unite(layoutOverflowRect()); | 4593 overflowRect.unite(layoutOverflowRect()); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4765 return 0; | 4768 return 0; |
4766 | 4769 |
4767 if (!layoutState && !flowThreadContainingBlock()) | 4770 if (!layoutState && !flowThreadContainingBlock()) |
4768 return 0; | 4771 return 0; |
4769 | 4772 |
4770 RenderBlock* containerBlock = containingBlock(); | 4773 RenderBlock* containerBlock = containingBlock(); |
4771 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4774 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4772 } | 4775 } |
4773 | 4776 |
4774 } // namespace WebCore | 4777 } // namespace WebCore |
OLD | NEW |