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

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

Issue 2474813002: Clamping shouldn't clear the fragment anchor. (Closed)
Patch Set: address review comments Created 4 years, 1 month 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 3617 matching lines...) Expand 10 before | Expand all | Expand 10 after
3628 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 3628 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
3629 // Don't scroll the FrameView! 3629 // Don't scroll the FrameView!
3630 ASSERT_NOT_REACHED(); 3630 ASSERT_NOT_REACHED();
3631 } 3631 }
3632 3632
3633 m_scrollOffset = offset; 3633 m_scrollOffset = offset;
3634 3634
3635 if (!scrollbarsSuppressed()) 3635 if (!scrollbarsSuppressed())
3636 m_pendingScrollDelta += scrollDelta; 3636 m_pendingScrollDelta += scrollDelta;
3637 3637
3638 clearFragmentAnchor(); 3638 if (scrollTypeClearsFragmentAnchor(scrollType))
3639 clearFragmentAnchor();
3639 updateLayersAndCompositingAfterScrollIfNeeded(scrollDelta); 3640 updateLayersAndCompositingAfterScrollIfNeeded(scrollDelta);
3640 3641
3641 Document* document = m_frame->document(); 3642 Document* document = m_frame->document();
3642 document->enqueueScrollEventForNode(document); 3643 document->enqueueScrollEventForNode(document);
3643 3644
3644 m_frame->eventHandler().dispatchFakeMouseMoveEventSoon(); 3645 m_frame->eventHandler().dispatchFakeMouseMoveEventSoon();
3645 Page* page = frame().page(); 3646 Page* page = frame().page();
3646 if (page) 3647 if (page)
3647 page->chromeClient().clearToolTip(*m_frame); 3648 page->chromeClient().clearToolTip(*m_frame);
3648 3649
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
4510 DCHECK(m_frame->isMainFrame()); 4511 DCHECK(m_frame->isMainFrame());
4511 return m_initialViewportSize.width(); 4512 return m_initialViewportSize.width();
4512 } 4513 }
4513 4514
4514 int FrameView::initialViewportHeight() const { 4515 int FrameView::initialViewportHeight() const {
4515 DCHECK(m_frame->isMainFrame()); 4516 DCHECK(m_frame->isMainFrame());
4516 return m_initialViewportSize.height(); 4517 return m_initialViewportSize.height();
4517 } 4518 }
4518 4519
4519 } // namespace blink 4520 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698