Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1775213002: Fix premature termination of scroll animations while selecting text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 3725 matching lines...) Expand 10 before | Expand all | Expand 10 after
3736 3736
3737 Widget* FrameView::widget() 3737 Widget* FrameView::widget()
3738 { 3738 {
3739 return this; 3739 return this;
3740 } 3740 }
3741 3741
3742 LayoutRect FrameView::scrollIntoView(const LayoutRect& rectInContent, const Scro llAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType) 3742 LayoutRect FrameView::scrollIntoView(const LayoutRect& rectInContent, const Scro llAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType)
3743 { 3743 {
3744 LayoutRect viewRect(visibleContentRect()); 3744 LayoutRect viewRect(visibleContentRect());
3745 LayoutRect exposeRect = ScrollAlignment::getRectToExpose(viewRect, rectInCon tent, alignX, alignY); 3745 LayoutRect exposeRect = ScrollAlignment::getRectToExpose(viewRect, rectInCon tent, alignX, alignY);
3746 3746 if (exposeRect != viewRect)
3747 double xOffset = exposeRect.x(); 3747 setScrollPosition(DoublePoint(exposeRect.x(), exposeRect.y()), scrollTyp e);
3748 double yOffset = exposeRect.y();
3749
3750 setScrollPosition(DoublePoint(xOffset, yOffset), scrollType);
3751 3748
3752 // Scrolling the FrameView cannot change the input rect's location relative to the document. 3749 // Scrolling the FrameView cannot change the input rect's location relative to the document.
3753 return rectInContent; 3750 return rectInContent;
3754 } 3751 }
3755 3752
3756 IntRect FrameView::scrollCornerRect() const 3753 IntRect FrameView::scrollCornerRect() const
3757 { 3754 {
3758 IntRect cornerRect; 3755 IntRect cornerRect;
3759 3756
3760 if (hasOverlayScrollbars()) 3757 if (hasOverlayScrollbars())
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
4114 return m_hiddenForThrottling && m_crossOriginForThrottling; 4111 return m_hiddenForThrottling && m_crossOriginForThrottling;
4115 } 4112 }
4116 4113
4117 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4114 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4118 { 4115 {
4119 ASSERT(layoutView()); 4116 ASSERT(layoutView());
4120 return *layoutView(); 4117 return *layoutView();
4121 } 4118 }
4122 4119
4123 } // namespace blink 4120 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698