New issue
Advanced search Search tips

Issue 738160 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Rename LayoutBox::ScrollRectToVisible()

Project Member Reported by sunyunjia@chromium.org, Jun 29 2017

Issue description

Both LayoutObject and LayoutBox have method ScrollRectoToVisible, and they are two different methods. As LayoutBox inherits from LayoutObject, LayoutObject::ScrollRectToVisible() is hidden by LayoutBox::ScrollRectToVisible(). This is really misleading as

ToLayoutBox(GetLayoutObject())->ScrollRectToVisible(...) and GetLayoutObject()->ScrollRectToVisible(...) are calling two different methods.


 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/362b47ac957198045b609a69409ceedf1085b886

commit 362b47ac957198045b609a69409ceedf1085b886
Author: Sandra Sun <sunyunjia@chromium.org>
Date: Tue Jul 25 17:20:16 2017

Rename LayoutBox::ScrollRectToVisible to ...Recursive

Both LayoutObject and LayoutBox have method ScrollRectoToVisible, and they are
two different methods. As LayoutBox inherits from LayoutObject,
LayoutObject::ScrollRectToVisible() is hidden by
LayoutBox::ScrollRectToVisible(). This is really misleading as

ToLayoutBox(GetLayoutObject())->ScrollRectToVisible(...) and
GetLayoutObject()->ScrollRectToVisible(...) are calling two different methods.

In this patch, we rename LayoutBox::ScrollRectToVisible(...) to
ScrollRectToVisibleRecursive(), as it recursively calls itself up the chain
until the rect is visible.

Bug:  738160 
Change-Id: Ia61d46675d3e9734855bf9b88c00b998d6b80874
Reviewed-on: https://chromium-review.googlesource.com/582395
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Sandra Sun <sunyunjia@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489349}
[modify] https://crrev.com/362b47ac957198045b609a69409ceedf1085b886/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/362b47ac957198045b609a69409ceedf1085b886/third_party/WebKit/Source/core/layout/LayoutBox.h
[modify] https://crrev.com/362b47ac957198045b609a69409ceedf1085b886/third_party/WebKit/Source/core/layout/LayoutObject.cpp

Status: Fixed (was: Started)

Sign in to add a comment