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 4219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4230 if (!parentStyle.isHorizontalWritingMode()) | 4230 if (!parentStyle.isHorizontalWritingMode()) |
4231 return rect.transposedRect(); | 4231 return rect.transposedRect(); |
4232 return rect; | 4232 return rect; |
4233 } | 4233 } |
4234 | 4234 |
4235 LayoutRect LayoutBox::visualOverflowRectForPropagation(const ComputedStyle& pare
ntStyle) const | 4235 LayoutRect LayoutBox::visualOverflowRectForPropagation(const ComputedStyle& pare
ntStyle) const |
4236 { | 4236 { |
4237 // If the writing modes of the child and parent match, then we don't have to | 4237 // If the writing modes of the child and parent match, then we don't have to |
4238 // do anything fancy. Just return the result. | 4238 // do anything fancy. Just return the result. |
4239 LayoutRect rect = visualOverflowRect(); | 4239 LayoutRect rect = visualOverflowRect(); |
4240 if (parentStyle.writingMode() == style()->writingMode()) | 4240 if (parentStyle.getWritingMode() == style()->getWritingMode()) |
4241 return rect; | 4241 return rect; |
4242 | 4242 |
4243 // We are putting ourselves into our parent's coordinate space. If there is
a flipped block mismatch | 4243 // We are putting ourselves into our parent's coordinate space. If there is
a flipped block mismatch |
4244 // in a particular axis, then we have to flip the rect along that axis. | 4244 // in a particular axis, then we have to flip the rect along that axis. |
4245 if (style()->writingMode() == RightToLeftWritingMode || parentStyle.writingM
ode() == RightToLeftWritingMode) | 4245 if (style()->getWritingMode() == RightToLeftWritingMode || parentStyle.getWr
itingMode() == RightToLeftWritingMode) |
4246 rect.setX(size().width() - rect.maxX()); | 4246 rect.setX(size().width() - rect.maxX()); |
4247 | 4247 |
4248 return rect; | 4248 return rect; |
4249 } | 4249 } |
4250 | 4250 |
4251 LayoutRect LayoutBox::logicalLayoutOverflowRectForPropagation(const ComputedStyl
e& parentStyle) const | 4251 LayoutRect LayoutBox::logicalLayoutOverflowRectForPropagation(const ComputedStyl
e& parentStyle) const |
4252 { | 4252 { |
4253 LayoutRect rect = layoutOverflowRectForPropagation(parentStyle); | 4253 LayoutRect rect = layoutOverflowRectForPropagation(parentStyle); |
4254 if (!parentStyle.isHorizontalWritingMode()) | 4254 if (!parentStyle.isHorizontalWritingMode()) |
4255 return rect.transposedRect(); | 4255 return rect.transposedRect(); |
(...skipping 24 matching lines...) Expand all Loading... |
4280 | 4280 |
4281 if (isInFlowPositioned()) | 4281 if (isInFlowPositioned()) |
4282 rect.move(offsetForInFlowPosition()); | 4282 rect.move(offsetForInFlowPosition()); |
4283 | 4283 |
4284 // Now we need to flip back. | 4284 // Now we need to flip back. |
4285 flipForWritingMode(rect); | 4285 flipForWritingMode(rect); |
4286 } | 4286 } |
4287 | 4287 |
4288 // If the writing modes of the child and parent match, then we don't have to | 4288 // If the writing modes of the child and parent match, then we don't have to |
4289 // do anything fancy. Just return the result. | 4289 // do anything fancy. Just return the result. |
4290 if (parentStyle.writingMode() == style()->writingMode()) | 4290 if (parentStyle.getWritingMode() == style()->getWritingMode()) |
4291 return rect; | 4291 return rect; |
4292 | 4292 |
4293 // We are putting ourselves into our parent's coordinate space. If there is
a flipped block mismatch | 4293 // We are putting ourselves into our parent's coordinate space. If there is
a flipped block mismatch |
4294 // in a particular axis, then we have to flip the rect along that axis. | 4294 // in a particular axis, then we have to flip the rect along that axis. |
4295 if (style()->writingMode() == RightToLeftWritingMode || parentStyle.writingM
ode() == RightToLeftWritingMode) | 4295 if (style()->getWritingMode() == RightToLeftWritingMode || parentStyle.getWr
itingMode() == RightToLeftWritingMode) |
4296 rect.setX(size().width() - rect.maxX()); | 4296 rect.setX(size().width() - rect.maxX()); |
4297 | 4297 |
4298 return rect; | 4298 return rect; |
4299 } | 4299 } |
4300 | 4300 |
4301 LayoutRect LayoutBox::noOverflowRect() const | 4301 LayoutRect LayoutBox::noOverflowRect() const |
4302 { | 4302 { |
4303 // Because of the special coordinate system used for overflow rectangles and
many other | 4303 // Because of the special coordinate system used for overflow rectangles and
many other |
4304 // rectangles (not quite logical, not quite physical), we need to flip the b
lock progression | 4304 // rectangles (not quite logical, not quite physical), we need to flip the b
lock progression |
4305 // coordinate in vertical-rl and horizontal-bt writing modes. In other words
, the rectangle | 4305 // coordinate in vertical-rl and horizontal-bt writing modes. In other words
, the rectangle |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4682 } | 4682 } |
4683 | 4683 |
4684 void LayoutBox::IntrinsicSizingInfo::transpose() | 4684 void LayoutBox::IntrinsicSizingInfo::transpose() |
4685 { | 4685 { |
4686 size = size.transposedSize(); | 4686 size = size.transposedSize(); |
4687 aspectRatio = aspectRatio.transposedSize(); | 4687 aspectRatio = aspectRatio.transposedSize(); |
4688 std::swap(hasWidth, hasHeight); | 4688 std::swap(hasWidth, hasHeight); |
4689 } | 4689 } |
4690 | 4690 |
4691 } // namespace blink | 4691 } // namespace blink |
OLD | NEW |