| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 { | 615 { |
| 616 for (const LayoutObject* current = this; current; current = current->parent(
)) { | 616 for (const LayoutObject* current = this; current; current = current->parent(
)) { |
| 617 if (current->hasLayer()) | 617 if (current->hasLayer()) |
| 618 return toLayoutBoxModelObject(current)->layer(); | 618 return toLayoutBoxModelObject(current)->layer(); |
| 619 } | 619 } |
| 620 // FIXME: we should get rid of detached layout subtrees, at which point this
code should | 620 // FIXME: we should get rid of detached layout subtrees, at which point this
code should |
| 621 // not be reached. crbug.com/411429 | 621 // not be reached. crbug.com/411429 |
| 622 return nullptr; | 622 return nullptr; |
| 623 } | 623 } |
| 624 | 624 |
| 625 bool LayoutObject::scrollRectToVisible(const LayoutRect& rect, const ScrollAlign
ment& alignX, const ScrollAlignment& alignY) | 625 bool LayoutObject::scrollRectToVisible(const LayoutRect& rect, const ScrollAlign
ment& alignX, const ScrollAlignment& alignY, ScrollType scrollType) |
| 626 { | 626 { |
| 627 LayoutBox* enclosingBox = this->enclosingBox(); | 627 LayoutBox* enclosingBox = this->enclosingBox(); |
| 628 if (!enclosingBox) | 628 if (!enclosingBox) |
| 629 return false; | 629 return false; |
| 630 | 630 |
| 631 enclosingBox->scrollRectToVisible(rect, alignX, alignY); | 631 enclosingBox->scrollRectToVisible(rect, alignX, alignY, scrollType); |
| 632 return true; | 632 return true; |
| 633 } | 633 } |
| 634 | 634 |
| 635 LayoutBox* LayoutObject::enclosingBox() const | 635 LayoutBox* LayoutObject::enclosingBox() const |
| 636 { | 636 { |
| 637 LayoutObject* curr = const_cast<LayoutObject*>(this); | 637 LayoutObject* curr = const_cast<LayoutObject*>(this); |
| 638 while (curr) { | 638 while (curr) { |
| 639 if (curr->isBox()) | 639 if (curr->isBox()) |
| 640 return toLayoutBox(curr); | 640 return toLayoutBox(curr); |
| 641 curr = curr->parent(); | 641 curr = curr->parent(); |
| (...skipping 2779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3421 const blink::LayoutObject* root = object1; | 3421 const blink::LayoutObject* root = object1; |
| 3422 while (root->parent()) | 3422 while (root->parent()) |
| 3423 root = root->parent(); | 3423 root = root->parent(); |
| 3424 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3424 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3425 } else { | 3425 } else { |
| 3426 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3426 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3427 } | 3427 } |
| 3428 } | 3428 } |
| 3429 | 3429 |
| 3430 #endif | 3430 #endif |
| OLD | NEW |