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. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 } | 623 } |
624 // TODO(crbug.com/365897): we should get rid of detached layout subtrees, at | 624 // TODO(crbug.com/365897): we should get rid of detached layout subtrees, at |
625 // which point this code should not be reached. | 625 // which point this code should not be reached. |
626 return nullptr; | 626 return nullptr; |
627 } | 627 } |
628 | 628 |
629 bool LayoutObject::ScrollRectToVisible(const LayoutRect& rect, | 629 bool LayoutObject::ScrollRectToVisible(const LayoutRect& rect, |
630 const ScrollAlignment& align_x, | 630 const ScrollAlignment& align_x, |
631 const ScrollAlignment& align_y, | 631 const ScrollAlignment& align_y, |
632 ScrollType scroll_type, | 632 ScrollType scroll_type, |
633 bool make_visible_in_visual_viewport) { | 633 bool make_visible_in_visual_viewport, |
| 634 ScrollBehavior scroll_behavior) { |
634 LayoutBox* enclosing_box = this->EnclosingBox(); | 635 LayoutBox* enclosing_box = this->EnclosingBox(); |
635 if (!enclosing_box) | 636 if (!enclosing_box) |
636 return false; | 637 return false; |
637 | 638 |
638 enclosing_box->ScrollRectToVisible(rect, align_x, align_y, scroll_type, | 639 enclosing_box->ScrollRectToVisible(rect, align_x, align_y, scroll_type, |
639 make_visible_in_visual_viewport); | 640 make_visible_in_visual_viewport, |
| 641 scroll_behavior); |
640 return true; | 642 return true; |
641 } | 643 } |
642 | 644 |
643 LayoutBox* LayoutObject::EnclosingBox() const { | 645 LayoutBox* LayoutObject::EnclosingBox() const { |
644 LayoutObject* curr = const_cast<LayoutObject*>(this); | 646 LayoutObject* curr = const_cast<LayoutObject*>(this); |
645 while (curr) { | 647 while (curr) { |
646 if (curr->IsBox()) | 648 if (curr->IsBox()) |
647 return ToLayoutBox(curr); | 649 return ToLayoutBox(curr); |
648 curr = curr->Parent(); | 650 curr = curr->Parent(); |
649 } | 651 } |
(...skipping 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3646 const blink::LayoutObject* root = object1; | 3648 const blink::LayoutObject* root = object1; |
3647 while (root->Parent()) | 3649 while (root->Parent()) |
3648 root = root->Parent(); | 3650 root = root->Parent(); |
3649 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3651 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3650 } else { | 3652 } else { |
3651 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3653 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3652 } | 3654 } |
3653 } | 3655 } |
3654 | 3656 |
3655 #endif | 3657 #endif |
OLD | NEW |