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

Side by Side Diff: Source/core/page/FrameView.cpp

Issue 18358004: Call didProgrammaticallyScroll only when ProgrammaticScrollNotifications is enabled, which is an ex… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test. Created 7 years, 5 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 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 void FrameView::setScrollPosition(const IntPoint& scrollPoint) 1573 void FrameView::setScrollPosition(const IntPoint& scrollPoint)
1574 { 1574 {
1575 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); 1575 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e);
1576 m_maintainScrollPositionAnchor = 0; 1576 m_maintainScrollPositionAnchor = 0;
1577 1577
1578 IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint); 1578 IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
1579 1579
1580 if (newScrollPosition == scrollPosition()) 1580 if (newScrollPosition == scrollPosition())
1581 return; 1581 return;
1582 1582
1583 if (Page* page = m_frame->page()) 1583 Page* page = m_frame->page();
1584 if (page && RuntimeEnabledFeatures::programmaticScrollNotificationsEnabled() )
1584 page->chrome().client()->didProgrammaticallyScroll(m_frame.get(), newScr ollPosition); 1585 page->chrome().client()->didProgrammaticallyScroll(m_frame.get(), newScr ollPosition);
1585 1586
1586 if (requestScrollPositionUpdate(newScrollPosition)) 1587 if (requestScrollPositionUpdate(newScrollPosition))
1587 return; 1588 return;
1588 1589
1589 ScrollView::setScrollPosition(newScrollPosition); 1590 ScrollView::setScrollPosition(newScrollPosition);
1590 } 1591 }
1591 1592
1592 void FrameView::setScrollPositionNonProgrammatically(const IntPoint& scrollPoint ) 1593 void FrameView::setScrollPositionNonProgrammatically(const IntPoint& scrollPoint )
1593 { 1594 {
(...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 } 3417 }
3417 3418
3418 AXObjectCache* FrameView::axObjectCache() const 3419 AXObjectCache* FrameView::axObjectCache() const
3419 { 3420 {
3420 if (frame() && frame()->document()) 3421 if (frame() && frame()->document())
3421 return frame()->document()->existingAXObjectCache(); 3422 return frame()->document()->existingAXObjectCache();
3422 return 0; 3423 return 0;
3423 } 3424 }
3424 3425
3425 } // namespace WebCore 3426 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/tests/ProgrammaticScrollTest.cpp ('k') | Source/core/page/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698