| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/frame/RootFrameViewport.h" | 5 #include "core/frame/RootFrameViewport.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/layout/ScrollAlignment.h" | 8 #include "core/layout/ScrollAlignment.h" |
| 9 #include "platform/geometry/DoubleRect.h" | 9 #include "platform/geometry/DoubleRect.h" |
| 10 #include "platform/geometry/FloatRect.h" | 10 #include "platform/geometry/FloatRect.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 visualResult.didScrollY || layoutResult.didScrollY, | 296 visualResult.didScrollY || layoutResult.didScrollY, |
| 297 layoutResult.unusedScrollDeltaX + unscrollableAxisDelta.width(), | 297 layoutResult.unusedScrollDeltaX + unscrollableAxisDelta.width(), |
| 298 layoutResult.unusedScrollDeltaY + unscrollableAxisDelta.height()); | 298 layoutResult.unusedScrollDeltaY + unscrollableAxisDelta.height()); |
| 299 } | 299 } |
| 300 | 300 |
| 301 bool RootFrameViewport::scrollAnimatorEnabled() const | 301 bool RootFrameViewport::scrollAnimatorEnabled() const |
| 302 { | 302 { |
| 303 return layoutViewport().scrollAnimatorEnabled(); | 303 return layoutViewport().scrollAnimatorEnabled(); |
| 304 } | 304 } |
| 305 | 305 |
| 306 HostWindow* RootFrameViewport::hostWindow() const | 306 HostWindow* RootFrameViewport::getHostWindow() const |
| 307 { | 307 { |
| 308 return layoutViewport().hostWindow(); | 308 return layoutViewport().getHostWindow(); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void RootFrameViewport::serviceScrollAnimations(double monotonicTime) | 311 void RootFrameViewport::serviceScrollAnimations(double monotonicTime) |
| 312 { | 312 { |
| 313 ScrollableArea::serviceScrollAnimations(monotonicTime); | 313 ScrollableArea::serviceScrollAnimations(monotonicTime); |
| 314 layoutViewport().serviceScrollAnimations(monotonicTime); | 314 layoutViewport().serviceScrollAnimations(monotonicTime); |
| 315 visualViewport().serviceScrollAnimations(monotonicTime); | 315 visualViewport().serviceScrollAnimations(monotonicTime); |
| 316 } | 316 } |
| 317 | 317 |
| 318 void RootFrameViewport::updateCompositorScrollAnimations() | 318 void RootFrameViewport::updateCompositorScrollAnimations() |
| 319 { | 319 { |
| 320 ScrollableArea::updateCompositorScrollAnimations(); | 320 ScrollableArea::updateCompositorScrollAnimations(); |
| 321 layoutViewport().updateCompositorScrollAnimations(); | 321 layoutViewport().updateCompositorScrollAnimations(); |
| 322 visualViewport().updateCompositorScrollAnimations(); | 322 visualViewport().updateCompositorScrollAnimations(); |
| 323 } | 323 } |
| 324 | 324 |
| 325 void RootFrameViewport::cancelProgrammaticScrollAnimation() | 325 void RootFrameViewport::cancelProgrammaticScrollAnimation() |
| 326 { | 326 { |
| 327 ScrollableArea::cancelProgrammaticScrollAnimation(); | 327 ScrollableArea::cancelProgrammaticScrollAnimation(); |
| 328 layoutViewport().cancelProgrammaticScrollAnimation(); | 328 layoutViewport().cancelProgrammaticScrollAnimation(); |
| 329 visualViewport().cancelProgrammaticScrollAnimation(); | 329 visualViewport().cancelProgrammaticScrollAnimation(); |
| 330 } | 330 } |
| 331 | 331 |
| 332 Widget* RootFrameViewport::widget() | 332 Widget* RootFrameViewport::getWidget() |
| 333 { | 333 { |
| 334 return visualViewport().widget(); | 334 return visualViewport().getWidget(); |
| 335 } | 335 } |
| 336 | 336 |
| 337 void RootFrameViewport::clearScrollAnimators() | 337 void RootFrameViewport::clearScrollAnimators() |
| 338 { | 338 { |
| 339 ScrollableArea::clearScrollAnimators(); | 339 ScrollableArea::clearScrollAnimators(); |
| 340 layoutViewport().clearScrollAnimators(); | 340 layoutViewport().clearScrollAnimators(); |
| 341 visualViewport().clearScrollAnimators(); | 341 visualViewport().clearScrollAnimators(); |
| 342 } | 342 } |
| 343 | 343 |
| 344 DEFINE_TRACE(RootFrameViewport) | 344 DEFINE_TRACE(RootFrameViewport) |
| 345 { | 345 { |
| 346 visitor->trace(m_visualViewport); | 346 visitor->trace(m_visualViewport); |
| 347 visitor->trace(m_layoutViewport); | 347 visitor->trace(m_layoutViewport); |
| 348 ScrollableArea::trace(visitor); | 348 ScrollableArea::trace(visitor); |
| 349 } | 349 } |
| 350 | 350 |
| 351 } // namespace blink | 351 } // namespace blink |
| OLD | NEW |