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