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

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

Issue 18863002: Merge 153364 "Call didProgrammaticallyScroll only when Programma..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1537/
Patch Set: 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 | Annotate | Revision Log
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 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 void FrameView::setScrollPosition(const IntPoint& scrollPoint) 1572 void FrameView::setScrollPosition(const IntPoint& scrollPoint)
1573 { 1573 {
1574 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); 1574 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e);
1575 m_maintainScrollPositionAnchor = 0; 1575 m_maintainScrollPositionAnchor = 0;
1576 1576
1577 IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint); 1577 IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
1578 1578
1579 if (newScrollPosition == scrollPosition()) 1579 if (newScrollPosition == scrollPosition())
1580 return; 1580 return;
1581 1581
1582 if (Page* page = m_frame->page()) 1582 Page* page = m_frame->page();
1583 if (page && RuntimeEnabledFeatures::programmaticScrollNotificationsEnabled() )
1583 page->chrome().client()->didProgrammaticallyScroll(m_frame.get(), newScr ollPosition); 1584 page->chrome().client()->didProgrammaticallyScroll(m_frame.get(), newScr ollPosition);
1584 1585
1585 if (requestScrollPositionUpdate(newScrollPosition)) 1586 if (requestScrollPositionUpdate(newScrollPosition))
1586 return; 1587 return;
1587 1588
1588 ScrollView::setScrollPosition(newScrollPosition); 1589 ScrollView::setScrollPosition(newScrollPosition);
1589 } 1590 }
1590 1591
1591 void FrameView::setScrollPositionNonProgrammatically(const IntPoint& scrollPoint ) 1592 void FrameView::setScrollPositionNonProgrammatically(const IntPoint& scrollPoint )
1592 { 1593 {
(...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after
3417 } 3418 }
3418 3419
3419 AXObjectCache* FrameView::axObjectCache() const 3420 AXObjectCache* FrameView::axObjectCache() const
3420 { 3421 {
3421 if (frame() && frame()->document()) 3422 if (frame() && frame()->document())
3422 return frame()->document()->existingAXObjectCache(); 3423 return frame()->document()->existingAXObjectCache();
3423 return 0; 3424 return 0;
3424 } 3425 }
3425 3426
3426 } // namespace WebCore 3427 } // 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