| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 return toRenderBoxModelObject(curr); | 443 return toRenderBoxModelObject(curr); |
| 444 curr = curr->parent(); | 444 curr = curr->parent(); |
| 445 } | 445 } |
| 446 | 446 |
| 447 ASSERT_NOT_REACHED(); | 447 ASSERT_NOT_REACHED(); |
| 448 return 0; | 448 return 0; |
| 449 } | 449 } |
| 450 | 450 |
| 451 RenderBox* RenderObject::enclosingScrollableBox() const | 451 RenderBox* RenderObject::enclosingScrollableBox() const |
| 452 { | 452 { |
| 453 for (RenderObject* ancestor = parent(); ancestor; ancestor = ancestor->paren
t()) { | 453 // FIXME(sky): Remove. |
| 454 if (!ancestor->isBox()) | |
| 455 continue; | |
| 456 | |
| 457 RenderBox* ancestorBox = toRenderBox(ancestor); | |
| 458 if (ancestorBox->canBeScrolledAndHasScrollableArea()) | |
| 459 return ancestorBox; | |
| 460 } | |
| 461 | |
| 462 return 0; | 454 return 0; |
| 463 } | 455 } |
| 464 | 456 |
| 465 bool RenderObject::skipInvalidationWhenLaidOutChildren() const | 457 bool RenderObject::skipInvalidationWhenLaidOutChildren() const |
| 466 { | 458 { |
| 467 if (!neededLayoutBecauseOfChildren()) | 459 if (!neededLayoutBecauseOfChildren()) |
| 468 return false; | 460 return false; |
| 469 | 461 |
| 470 // SVG renderers need to be invalidated when their children are laid out. | 462 // SVG renderers need to be invalidated when their children are laid out. |
| 471 // RenderBlocks with line boxes are responsible to invalidate them so we can
't ignore them. | 463 // RenderBlocks with line boxes are responsible to invalidate them so we can
't ignore them. |
| (...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2060 { | 2052 { |
| 2061 if (object1) { | 2053 if (object1) { |
| 2062 const blink::RenderObject* root = object1; | 2054 const blink::RenderObject* root = object1; |
| 2063 while (root->parent()) | 2055 while (root->parent()) |
| 2064 root = root->parent(); | 2056 root = root->parent(); |
| 2065 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2057 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2066 } | 2058 } |
| 2067 } | 2059 } |
| 2068 | 2060 |
| 2069 #endif | 2061 #endif |
| OLD | NEW |