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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 // the initial viewport width. | 788 // the initial viewport width. |
789 // 2. The author has disabled viewport zoom. | 789 // 2. The author has disabled viewport zoom. |
790 const PageScaleConstraints& constraints = | 790 const PageScaleConstraints& constraints = |
791 frameHost().pageScaleConstraintsSet().pageDefinedConstraints(); | 791 frameHost().pageScaleConstraintsSet().pageDefinedConstraints(); |
792 | 792 |
793 return mainFrame()->view()->layoutSize().width() == m_size.width() || | 793 return mainFrame()->view()->layoutSize().width() == m_size.width() || |
794 (constraints.minimumScale == constraints.maximumScale && | 794 (constraints.minimumScale == constraints.maximumScale && |
795 constraints.minimumScale != -1); | 795 constraints.minimumScale != -1); |
796 } | 796 } |
797 | 797 |
| 798 CompositorAnimationHost* VisualViewport::compositorAnimationHost() const { |
| 799 ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); |
| 800 return c ? c->compositorAnimationHost() : nullptr; |
| 801 } |
| 802 |
798 CompositorAnimationTimeline* VisualViewport::compositorAnimationTimeline() | 803 CompositorAnimationTimeline* VisualViewport::compositorAnimationTimeline() |
799 const { | 804 const { |
800 ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); | 805 ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); |
801 return c ? c->compositorAnimationTimeline() : nullptr; | 806 return c ? c->compositorAnimationTimeline() : nullptr; |
802 } | 807 } |
803 | 808 |
804 void VisualViewport::notifyRootFrameViewport() const { | 809 void VisualViewport::notifyRootFrameViewport() const { |
805 if (!mainFrame() || !mainFrame()->view()) | 810 if (!mainFrame() || !mainFrame()->view()) |
806 return; | 811 return; |
807 | 812 |
(...skipping 23 matching lines...) Expand all Loading... |
831 } else if (graphicsLayer == m_rootTransformLayer.get()) { | 836 } else if (graphicsLayer == m_rootTransformLayer.get()) { |
832 name = "Root Transform Layer"; | 837 name = "Root Transform Layer"; |
833 } else { | 838 } else { |
834 ASSERT_NOT_REACHED(); | 839 ASSERT_NOT_REACHED(); |
835 } | 840 } |
836 | 841 |
837 return name; | 842 return name; |
838 } | 843 } |
839 | 844 |
840 } // namespace blink | 845 } // namespace blink |
OLD | NEW |