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. |
dsinclair
2014/09/05 19:35:10
Is there a crbug that can be referenced?
| |
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 2876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3454 { | 3453 { |
3455 if (object1) { | 3454 if (object1) { |
3456 const blink::RenderObject* root = object1; | 3455 const blink::RenderObject* root = object1; |
3457 while (root->parent()) | 3456 while (root->parent()) |
3458 root = root->parent(); | 3457 root = root->parent(); |
3459 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3458 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3460 } | 3459 } |
3461 } | 3460 } |
3462 | 3461 |
3463 #endif | 3462 #endif |
OLD | NEW |