| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 void InlineBox::clearKnownToHaveNoOverflow() | 304 void InlineBox::clearKnownToHaveNoOverflow() |
| 305 { | 305 { |
| 306 m_bitfields.setKnownToHaveNoOverflow(false); | 306 m_bitfields.setKnownToHaveNoOverflow(false); |
| 307 if (parent() && parent()->knownToHaveNoOverflow()) | 307 if (parent() && parent()->knownToHaveNoOverflow()) |
| 308 parent()->clearKnownToHaveNoOverflow(); | 308 parent()->clearKnownToHaveNoOverflow(); |
| 309 } | 309 } |
| 310 | 310 |
| 311 FloatPointWillBeLayoutPoint InlineBox::locationIncludingFlipping() | 311 FloatPointWillBeLayoutPoint InlineBox::locationIncludingFlipping() |
| 312 { | 312 { |
| 313 return logicalPointToPhysicalPoint(m_topLeft.toFloatPoint()); |
| 314 } |
| 315 |
| 316 FloatPointWillBeLayoutPoint InlineBox::logicalPointToPhysicalPoint(const FloatPo
int& point) |
| 317 { |
| 313 if (!UNLIKELY(layoutObject().hasFlippedBlocksWritingMode())) | 318 if (!UNLIKELY(layoutObject().hasFlippedBlocksWritingMode())) |
| 314 return FloatPointWillBeLayoutPoint(x(), y()); | 319 return FloatPointWillBeLayoutPoint(point.x(), point.y()); |
| 315 | 320 |
| 316 LayoutBlockFlow& block = root().block(); | 321 LayoutBlockFlow& block = root().block(); |
| 317 if (block.style()->isHorizontalWritingMode()) | 322 if (block.style()->isHorizontalWritingMode()) |
| 318 return FloatPointWillBeLayoutPoint(x(), block.size().height() - size().h
eight() - y()); | 323 return FloatPointWillBeLayoutPoint(point.x(), block.size().height() - si
ze().height() - point.y()); |
| 319 | 324 |
| 320 return FloatPointWillBeLayoutPoint(block.size().width() - size().width() - x
(), y()); | 325 return FloatPointWillBeLayoutPoint(block.size().width() - size().width() - p
oint.x(), point.y()); |
| 326 } |
| 327 |
| 328 LayoutRect InlineBox::logicalRectToPhysicalRect(const LayoutRect& current) |
| 329 { |
| 330 LayoutRect retval = current; |
| 331 if (!isHorizontal()) { |
| 332 retval = retval.transposedRect(); |
| 333 } |
| 334 retval.setLocation(logicalPointToPhysicalPoint(FloatPoint(retval.location())
).toLayoutPoint()); |
| 335 return retval; |
| 321 } | 336 } |
| 322 | 337 |
| 323 void InlineBox::flipForWritingMode(FloatRect& rect) | 338 void InlineBox::flipForWritingMode(FloatRect& rect) |
| 324 { | 339 { |
| 325 if (!UNLIKELY(layoutObject().hasFlippedBlocksWritingMode())) | 340 if (!UNLIKELY(layoutObject().hasFlippedBlocksWritingMode())) |
| 326 return; | 341 return; |
| 327 root().block().flipForWritingMode(rect); | 342 root().block().flipForWritingMode(rect); |
| 328 } | 343 } |
| 329 | 344 |
| 330 FloatPoint InlineBox::flipForWritingMode(const FloatPoint& point) | 345 FloatPoint InlineBox::flipForWritingMode(const FloatPoint& point) |
| (...skipping 27 matching lines...) Expand all Loading... |
| 358 b->showTreeForThis(); | 373 b->showTreeForThis(); |
| 359 } | 374 } |
| 360 | 375 |
| 361 void showLineTree(const blink::InlineBox* b) | 376 void showLineTree(const blink::InlineBox* b) |
| 362 { | 377 { |
| 363 if (b) | 378 if (b) |
| 364 b->showLineTreeForThis(); | 379 b->showLineTreeForThis(); |
| 365 } | 380 } |
| 366 | 381 |
| 367 #endif | 382 #endif |
| OLD | NEW |