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

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

Issue 766023002: Rename 'instant' value of scroll-behavior CSS property to 'auto' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 cancelProgrammaticScrollAnimation(); 1518 cancelProgrammaticScrollAnimation();
1519 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); 1519 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e);
1520 m_maintainScrollPositionAnchor = nullptr; 1520 m_maintainScrollPositionAnchor = nullptr;
1521 1521
1522 DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint) ; 1522 DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint) ;
1523 if (newScrollPosition == scrollPositionDouble()) 1523 if (newScrollPosition == scrollPositionDouble())
1524 return; 1524 return;
1525 1525
1526 if (scrollBehavior == ScrollBehaviorAuto) { 1526 if (scrollBehavior == ScrollBehaviorAuto) {
1527 RenderObject* renderer = m_frame->document()->documentElement() ? m_fram e->document()->documentElement()->renderer() : 0; 1527 RenderObject* renderer = m_frame->document()->documentElement() ? m_fram e->document()->documentElement()->renderer() : 0;
1528 if (renderer) 1528 if (renderer && renderer->style()->scrollBehavior() == ScrollBehaviorSmo oth)
1529 scrollBehavior = renderer->style()->scrollBehavior(); 1529 scrollBehavior = ScrollBehaviorSmooth;
1530 else 1530 else
1531 scrollBehavior = ScrollBehaviorInstant; 1531 scrollBehavior = ScrollBehaviorInstant;
1532 } 1532 }
1533 1533
1534 if (scrollBehavior == ScrollBehaviorInstant) { 1534 if (scrollBehavior == ScrollBehaviorInstant) {
1535 DoubleSize newOffset(newScrollPosition.x(), newScrollPosition.y()); 1535 DoubleSize newOffset(newScrollPosition.x(), newScrollPosition.y());
1536 updateScrollbars(newOffset); 1536 updateScrollbars(newOffset);
1537 } else { 1537 } else {
1538 programmaticallyScrollSmoothlyToOffset(toFloatPoint(newScrollPosition)); 1538 programmaticallyScrollSmoothlyToOffset(toFloatPoint(newScrollPosition));
1539 } 1539 }
(...skipping 2422 matching lines...) Expand 10 before | Expand all | Expand 10 after
3962 return; 3962 return;
3963 3963
3964 ScrollableArea::setScrollOrigin(origin); 3964 ScrollableArea::setScrollOrigin(origin);
3965 3965
3966 // Update if the scroll origin changes, since our position will be different if the content size did not change. 3966 // Update if the scroll origin changes, since our position will be different if the content size did not change.
3967 if (updatePositionAtAll && updatePositionSynchronously) 3967 if (updatePositionAtAll && updatePositionSynchronously)
3968 updateScrollbars(scrollOffsetDouble()); 3968 updateScrollbars(scrollOffsetDouble());
3969 } 3969 }
3970 3970
3971 } // namespace blink 3971 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698