| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 // 2. The author has disabled viewport zoom. | 794 // 2. The author has disabled viewport zoom. |
| 795 const PageScaleConstraints& constraints = | 795 const PageScaleConstraints& constraints = |
| 796 frameHost().pageScaleConstraintsSet().pageDefinedConstraints(); | 796 frameHost().pageScaleConstraintsSet().pageDefinedConstraints(); |
| 797 | 797 |
| 798 return mainFrame()->view()->layoutSize().width() == m_size.width() || | 798 return mainFrame()->view()->layoutSize().width() == m_size.width() || |
| 799 (constraints.minimumScale == constraints.maximumScale && | 799 (constraints.minimumScale == constraints.maximumScale && |
| 800 constraints.minimumScale != -1); | 800 constraints.minimumScale != -1); |
| 801 } | 801 } |
| 802 | 802 |
| 803 CompositorAnimationHost* VisualViewport::compositorAnimationHost() const { | 803 CompositorAnimationHost* VisualViewport::compositorAnimationHost() const { |
| 804 DCHECK(frameHost().page().mainFrame()->isLocalFrame()); |
| 804 ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); | 805 ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); |
| 805 return c ? c->compositorAnimationHost() : nullptr; | 806 return c ? c->compositorAnimationHost() : nullptr; |
| 806 } | 807 } |
| 807 | 808 |
| 808 CompositorAnimationTimeline* VisualViewport::compositorAnimationTimeline() | 809 CompositorAnimationTimeline* VisualViewport::compositorAnimationTimeline() |
| 809 const { | 810 const { |
| 811 DCHECK(frameHost().page().mainFrame()->isLocalFrame()); |
| 810 ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); | 812 ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); |
| 811 return c ? c->compositorAnimationTimeline() : nullptr; | 813 return c ? c->compositorAnimationTimeline() : nullptr; |
| 812 } | 814 } |
| 813 | 815 |
| 814 void VisualViewport::notifyRootFrameViewport() const { | 816 void VisualViewport::notifyRootFrameViewport() const { |
| 815 if (!mainFrame() || !mainFrame()->view()) | 817 if (!mainFrame() || !mainFrame()->view()) |
| 816 return; | 818 return; |
| 817 | 819 |
| 818 RootFrameViewport* rootFrameViewport = | 820 RootFrameViewport* rootFrameViewport = |
| 819 mainFrame()->view()->getRootFrameViewport(); | 821 mainFrame()->view()->getRootFrameViewport(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 841 } else if (graphicsLayer == m_rootTransformLayer.get()) { | 843 } else if (graphicsLayer == m_rootTransformLayer.get()) { |
| 842 name = "Root Transform Layer"; | 844 name = "Root Transform Layer"; |
| 843 } else { | 845 } else { |
| 844 ASSERT_NOT_REACHED(); | 846 ASSERT_NOT_REACHED(); |
| 845 } | 847 } |
| 846 | 848 |
| 847 return name; | 849 return name; |
| 848 } | 850 } |
| 849 | 851 |
| 850 } // namespace blink | 852 } // namespace blink |
| OLD | NEW |