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 4445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4456 // If the writing modes of the child and parent match, then we don't have to | 4456 // If the writing modes of the child and parent match, then we don't have to |
4457 // do anything fancy. Just return the result. | 4457 // do anything fancy. Just return the result. |
4458 LayoutRect rect = visualOverflowRect(); | 4458 LayoutRect rect = visualOverflowRect(); |
4459 if (parentStyle.writingMode() == style()->writingMode()) | 4459 if (parentStyle.writingMode() == style()->writingMode()) |
4460 return rect; | 4460 return rect; |
4461 | 4461 |
4462 // We are putting ourselves into our parent's coordinate space. If there is
a flipped block mismatch | 4462 // We are putting ourselves into our parent's coordinate space. If there is
a flipped block mismatch |
4463 // in a particular axis, then we have to flip the rect along that axis. | 4463 // in a particular axis, then we have to flip the rect along that axis. |
4464 if (style()->writingMode() == RightToLeftWritingMode || parentStyle.writingM
ode() == RightToLeftWritingMode) | 4464 if (style()->writingMode() == RightToLeftWritingMode || parentStyle.writingM
ode() == RightToLeftWritingMode) |
4465 rect.setX(size().width() - rect.maxX()); | 4465 rect.setX(size().width() - rect.maxX()); |
4466 else if (style()->writingMode() == BottomToTopWritingMode || parentStyle.wri
tingMode() == BottomToTopWritingMode) | |
4467 rect.setY(size().height() - rect.maxY()); | |
4468 | 4466 |
4469 return rect; | 4467 return rect; |
4470 } | 4468 } |
4471 | 4469 |
4472 LayoutRect LayoutBox::logicalLayoutOverflowRectForPropagation(const ComputedStyl
e& parentStyle) const | 4470 LayoutRect LayoutBox::logicalLayoutOverflowRectForPropagation(const ComputedStyl
e& parentStyle) const |
4473 { | 4471 { |
4474 LayoutRect rect = layoutOverflowRectForPropagation(parentStyle); | 4472 LayoutRect rect = layoutOverflowRectForPropagation(parentStyle); |
4475 if (!parentStyle.isHorizontalWritingMode()) | 4473 if (!parentStyle.isHorizontalWritingMode()) |
4476 return rect.transposedRect(); | 4474 return rect.transposedRect(); |
4477 return rect; | 4475 return rect; |
(...skipping 30 matching lines...) Expand all Loading... |
4508 | 4506 |
4509 // If the writing modes of the child and parent match, then we don't have to | 4507 // If the writing modes of the child and parent match, then we don't have to |
4510 // do anything fancy. Just return the result. | 4508 // do anything fancy. Just return the result. |
4511 if (parentStyle.writingMode() == style()->writingMode()) | 4509 if (parentStyle.writingMode() == style()->writingMode()) |
4512 return rect; | 4510 return rect; |
4513 | 4511 |
4514 // We are putting ourselves into our parent's coordinate space. If there is
a flipped block mismatch | 4512 // We are putting ourselves into our parent's coordinate space. If there is
a flipped block mismatch |
4515 // in a particular axis, then we have to flip the rect along that axis. | 4513 // in a particular axis, then we have to flip the rect along that axis. |
4516 if (style()->writingMode() == RightToLeftWritingMode || parentStyle.writingM
ode() == RightToLeftWritingMode) | 4514 if (style()->writingMode() == RightToLeftWritingMode || parentStyle.writingM
ode() == RightToLeftWritingMode) |
4517 rect.setX(size().width() - rect.maxX()); | 4515 rect.setX(size().width() - rect.maxX()); |
4518 else if (style()->writingMode() == BottomToTopWritingMode || parentStyle.wri
tingMode() == BottomToTopWritingMode) | |
4519 rect.setY(size().height() - rect.maxY()); | |
4520 | 4516 |
4521 return rect; | 4517 return rect; |
4522 } | 4518 } |
4523 | 4519 |
4524 LayoutRect LayoutBox::noOverflowRect() const | 4520 LayoutRect LayoutBox::noOverflowRect() const |
4525 { | 4521 { |
4526 // Because of the special coordinate system used for overflow rectangles and
many other | 4522 // Because of the special coordinate system used for overflow rectangles and
many other |
4527 // rectangles (not quite logical, not quite physical), we need to flip the b
lock progression | 4523 // rectangles (not quite logical, not quite physical), we need to flip the b
lock progression |
4528 // coordinate in vertical-rl and horizontal-bt writing modes. In other words
, the rectangle | 4524 // coordinate in vertical-rl and horizontal-bt writing modes. In other words
, the rectangle |
4529 // returned is physical, except for the block direction progression coordina
te (y in horizontal | 4525 // returned is physical, except for the block direction progression coordina
te (y in horizontal |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4840 StyleImage* borderImage = style()->borderImage().image(); | 4836 StyleImage* borderImage = style()->borderImage().image(); |
4841 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4837 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4842 } | 4838 } |
4843 | 4839 |
4844 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const | 4840 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const |
4845 { | 4841 { |
4846 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; | 4842 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; |
4847 } | 4843 } |
4848 | 4844 |
4849 } // namespace blink | 4845 } // namespace blink |
OLD | NEW |