| 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 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 return snapSizeToPixel(clientHeight(), y() + clientTop()); | 378 return snapSizeToPixel(clientHeight(), y() + clientTop()); |
| 379 } | 379 } |
| 380 | 380 |
| 381 int RenderBox::scrollWidth() const | 381 int RenderBox::scrollWidth() const |
| 382 { | 382 { |
| 383 if (hasOverflowClip()) | 383 if (hasOverflowClip()) |
| 384 return layer()->scrollWidth(); | 384 return layer()->scrollWidth(); |
| 385 // For objects with visible overflow, this matches IE. | 385 // For objects with visible overflow, this matches IE. |
| 386 // FIXME: Need to work right with writing modes. | 386 // FIXME: Need to work right with writing modes. |
| 387 if (style()->isLeftToRightDirection()) | 387 if (style()->isLeftToRightDirection()) |
| 388 return snapSizeToPixel(max(clientWidth(), layoutOverflowRect().maxX() -
borderLeft()), clientLeft()); | 388 return snapSizeToPixel(max(clientWidth(), layoutOverflowRect().maxX() -
borderLeft()), x() + clientLeft()); |
| 389 return clientWidth() - min(ZERO_LAYOUT_UNIT, layoutOverflowRect().x() - bord
erLeft()); | 389 return clientWidth() - min(ZERO_LAYOUT_UNIT, layoutOverflowRect().x() - bord
erLeft()); |
| 390 } | 390 } |
| 391 | 391 |
| 392 int RenderBox::scrollHeight() const | 392 int RenderBox::scrollHeight() const |
| 393 { | 393 { |
| 394 if (hasOverflowClip()) | 394 if (hasOverflowClip()) |
| 395 return layer()->scrollHeight(); | 395 return layer()->scrollHeight(); |
| 396 // For objects with visible overflow, this matches IE. | 396 // For objects with visible overflow, this matches IE. |
| 397 // FIXME: Need to work right with writing modes. | 397 // FIXME: Need to work right with writing modes. |
| 398 return snapSizeToPixel(max(clientHeight(), layoutOverflowRect().maxY() - bor
derTop()), clientTop()); | 398 return snapSizeToPixel(max(clientHeight(), layoutOverflowRect().maxY() - bor
derTop()), y() + clientTop()); |
| 399 } | 399 } |
| 400 | 400 |
| 401 int RenderBox::scrollLeft() const | 401 int RenderBox::scrollLeft() const |
| 402 { | 402 { |
| 403 return hasOverflowClip() ? layer()->scrollXOffset() : 0; | 403 return hasOverflowClip() ? layer()->scrollXOffset() : 0; |
| 404 } | 404 } |
| 405 | 405 |
| 406 int RenderBox::scrollTop() const | 406 int RenderBox::scrollTop() const |
| 407 { | 407 { |
| 408 return hasOverflowClip() ? layer()->scrollYOffset() : 0; | 408 return hasOverflowClip() ? layer()->scrollYOffset() : 0; |
| (...skipping 3576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3985 } | 3985 } |
| 3986 | 3986 |
| 3987 if (didSplitParentAnonymousBoxes) | 3987 if (didSplitParentAnonymousBoxes) |
| 3988 markBoxForRelayoutAfterSplit(this); | 3988 markBoxForRelayoutAfterSplit(this); |
| 3989 | 3989 |
| 3990 ASSERT(beforeChild->parent() == this); | 3990 ASSERT(beforeChild->parent() == this); |
| 3991 return beforeChild; | 3991 return beforeChild; |
| 3992 } | 3992 } |
| 3993 | 3993 |
| 3994 } // namespace WebCore | 3994 } // namespace WebCore |
| OLD | NEW |