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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 { | 1543 { |
1544 cancelProgrammaticScrollAnimation(); | 1544 cancelProgrammaticScrollAnimation(); |
1545 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); | 1545 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru
e); |
1546 m_maintainScrollPositionAnchor = nullptr; | 1546 m_maintainScrollPositionAnchor = nullptr; |
1547 | 1547 |
1548 DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint)
; | 1548 DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint)
; |
1549 if (newScrollPosition == scrollPositionDouble()) | 1549 if (newScrollPosition == scrollPositionDouble()) |
1550 return; | 1550 return; |
1551 | 1551 |
1552 if (scrollBehavior == ScrollBehaviorAuto) { | 1552 if (scrollBehavior == ScrollBehaviorAuto) { |
1553 RenderObject* renderer = m_frame->document()->documentElement() ? m_fram
e->document()->documentElement()->renderer() : 0; | 1553 Element* scrollElement = RuntimeEnabledFeatures::scrollTopLeftInteropEna
bled() ? m_frame->document()->documentElement() : m_frame->document()->body(); |
| 1554 RenderObject* renderer = scrollElement ? scrollElement->renderer() : nul
lptr; |
1554 if (renderer && renderer->style()->scrollBehavior() == ScrollBehaviorSmo
oth) | 1555 if (renderer && renderer->style()->scrollBehavior() == ScrollBehaviorSmo
oth) |
1555 scrollBehavior = ScrollBehaviorSmooth; | 1556 scrollBehavior = ScrollBehaviorSmooth; |
1556 else | 1557 else |
1557 scrollBehavior = ScrollBehaviorInstant; | 1558 scrollBehavior = ScrollBehaviorInstant; |
1558 } | 1559 } |
1559 | 1560 |
1560 if (scrollBehavior == ScrollBehaviorInstant) { | 1561 if (scrollBehavior == ScrollBehaviorInstant) { |
1561 DoubleSize newOffset(newScrollPosition.x(), newScrollPosition.y()); | 1562 DoubleSize newOffset(newScrollPosition.x(), newScrollPosition.y()); |
1562 updateScrollbars(newOffset); | 1563 updateScrollbars(newOffset); |
1563 } else { | 1564 } else { |
(...skipping 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4039 { | 4040 { |
4040 Settings* settings = frame().settings(); | 4041 Settings* settings = frame().settings(); |
4041 if (!settings || !settings->rootLayerScrolls()) | 4042 if (!settings || !settings->rootLayerScrolls()) |
4042 return this; | 4043 return this; |
4043 | 4044 |
4044 RenderView* renderView = this->renderView(); | 4045 RenderView* renderView = this->renderView(); |
4045 return renderView ? renderView->scrollableArea() : nullptr; | 4046 return renderView ? renderView->scrollableArea() : nullptr; |
4046 } | 4047 } |
4047 | 4048 |
4048 } // namespace blink | 4049 } // namespace blink |
OLD | NEW |