Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1546 { | 1546 { |
| 1547 cancelProgrammaticScrollAnimation(); | 1547 cancelProgrammaticScrollAnimation(); |
| 1548 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); | 1548 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); |
| 1549 m_maintainScrollPositionAnchor = nullptr; | 1549 m_maintainScrollPositionAnchor = nullptr; |
| 1550 | 1550 |
| 1551 DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint) ; | 1551 DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint) ; |
| 1552 if (newScrollPosition == scrollPositionDouble()) | 1552 if (newScrollPosition == scrollPositionDouble()) |
| 1553 return; | 1553 return; |
| 1554 | 1554 |
| 1555 if (scrollBehavior == ScrollBehaviorAuto) { | 1555 if (scrollBehavior == ScrollBehaviorAuto) { |
| 1556 RenderObject* renderer = m_frame->document()->documentElement() ? m_fram e->document()->documentElement()->renderer() : 0; | 1556 RenderObject* renderer = m_frame->document()->body() ? m_frame->document ()->body()->renderer() : 0; |
|
jochen (gone - plz use gerrit)
2015/02/04 12:49:17
should this maybe depend on the ScrollTopLeftInter
ajuma
2015/02/04 15:08:10
Good point, done.
| |
| 1557 if (renderer && renderer->style()->scrollBehavior() == ScrollBehaviorSmo oth) | 1557 if (renderer && renderer->style()->scrollBehavior() == ScrollBehaviorSmo oth) |
| 1558 scrollBehavior = ScrollBehaviorSmooth; | 1558 scrollBehavior = ScrollBehaviorSmooth; |
| 1559 else | 1559 else |
| 1560 scrollBehavior = ScrollBehaviorInstant; | 1560 scrollBehavior = ScrollBehaviorInstant; |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 if (scrollBehavior == ScrollBehaviorInstant) { | 1563 if (scrollBehavior == ScrollBehaviorInstant) { |
| 1564 DoubleSize newOffset(newScrollPosition.x(), newScrollPosition.y()); | 1564 DoubleSize newOffset(newScrollPosition.x(), newScrollPosition.y()); |
| 1565 updateScrollbars(newOffset); | 1565 updateScrollbars(newOffset); |
| 1566 } else { | 1566 } else { |
| (...skipping 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4042 { | 4042 { |
| 4043 Settings* settings = frame().settings(); | 4043 Settings* settings = frame().settings(); |
| 4044 if (!settings || !settings->rootLayerScrolls()) | 4044 if (!settings || !settings->rootLayerScrolls()) |
| 4045 return this; | 4045 return this; |
| 4046 | 4046 |
| 4047 RenderView* renderView = this->renderView(); | 4047 RenderView* renderView = this->renderView(); |
| 4048 return renderView ? renderView->scrollableArea() : nullptr; | 4048 return renderView ? renderView->scrollableArea() : nullptr; |
| 4049 } | 4049 } |
| 4050 | 4050 |
| 4051 } // namespace blink | 4051 } // namespace blink |
| OLD | NEW |