| 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 | 555 |
| 556 return 0; | 556 return 0; |
| 557 } | 557 } |
| 558 | 558 |
| 559 RenderLayer* RenderObject::enclosingLayer() const | 559 RenderLayer* RenderObject::enclosingLayer() const |
| 560 { | 560 { |
| 561 for (const RenderObject* current = this; current; current = current->parent(
)) { | 561 for (const RenderObject* current = this; current; current = current->parent(
)) { |
| 562 if (current->hasLayer()) | 562 if (current->hasLayer()) |
| 563 return toRenderLayerModelObject(current)->layer(); | 563 return toRenderLayerModelObject(current)->layer(); |
| 564 } | 564 } |
| 565 // FIXME: We should remove the one caller that triggers this case and make | 565 // FIXME: we should get rid of detached render subtrees, at which point this
code should |
| 566 // this function return a reference. | 566 // not be reached. crbug.com/411429 |
| 567 ASSERT(!m_parent && !isRenderView()); | |
| 568 return 0; | 567 return 0; |
| 569 } | 568 } |
| 570 | 569 |
| 571 bool RenderObject::scrollRectToVisible(const LayoutRect& rect, const ScrollAlign
ment& alignX, const ScrollAlignment& alignY) | 570 bool RenderObject::scrollRectToVisible(const LayoutRect& rect, const ScrollAlign
ment& alignX, const ScrollAlignment& alignY) |
| 572 { | 571 { |
| 573 RenderBox* enclosingBox = this->enclosingBox(); | 572 RenderBox* enclosingBox = this->enclosingBox(); |
| 574 if (!enclosingBox) | 573 if (!enclosingBox) |
| 575 return false; | 574 return false; |
| 576 | 575 |
| 577 enclosingBox->scrollRectToVisible(rect, alignX, alignY); | 576 enclosingBox->scrollRectToVisible(rect, alignX, alignY); |
| (...skipping 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3446 { | 3445 { |
| 3447 if (object1) { | 3446 if (object1) { |
| 3448 const blink::RenderObject* root = object1; | 3447 const blink::RenderObject* root = object1; |
| 3449 while (root->parent()) | 3448 while (root->parent()) |
| 3450 root = root->parent(); | 3449 root = root->parent(); |
| 3451 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3450 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3452 } | 3451 } |
| 3453 } | 3452 } |
| 3454 | 3453 |
| 3455 #endif | 3454 #endif |
| OLD | NEW |