| 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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 // A document is considered adapted to small screen UAs if one of these hold
s: | 714 // A document is considered adapted to small screen UAs if one of these hold
s: |
| 715 // 1. The author specified viewport has a constrained width that is equal to | 715 // 1. The author specified viewport has a constrained width that is equal to |
| 716 // the initial viewport width. | 716 // the initial viewport width. |
| 717 // 2. The author has disabled viewport zoom. | 717 // 2. The author has disabled viewport zoom. |
| 718 const PageScaleConstraints& constraints = frameHost().pageScaleConstraintsSe
t().pageDefinedConstraints(); | 718 const PageScaleConstraints& constraints = frameHost().pageScaleConstraintsSe
t().pageDefinedConstraints(); |
| 719 | 719 |
| 720 return mainFrame()->view()->layoutSize().width() == m_size.width() | 720 return mainFrame()->view()->layoutSize().width() == m_size.width() |
| 721 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 721 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 722 } | 722 } |
| 723 | 723 |
| 724 CompositorAnimationTimeline* VisualViewport::compositorAnimationTimeline() const |
| 725 { |
| 726 ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); |
| 727 return c ? c->compositorAnimationTimeline() : nullptr; |
| 728 } |
| 729 |
| 724 String VisualViewport::debugName(const GraphicsLayer* graphicsLayer) const | 730 String VisualViewport::debugName(const GraphicsLayer* graphicsLayer) const |
| 725 { | 731 { |
| 726 String name; | 732 String name; |
| 727 if (graphicsLayer == m_innerViewportContainerLayer.get()) { | 733 if (graphicsLayer == m_innerViewportContainerLayer.get()) { |
| 728 name = "Inner Viewport Container Layer"; | 734 name = "Inner Viewport Container Layer"; |
| 729 } else if (graphicsLayer == m_overscrollElasticityLayer.get()) { | 735 } else if (graphicsLayer == m_overscrollElasticityLayer.get()) { |
| 730 name = "Overscroll Elasticity Layer"; | 736 name = "Overscroll Elasticity Layer"; |
| 731 } else if (graphicsLayer == m_pageScaleLayer.get()) { | 737 } else if (graphicsLayer == m_pageScaleLayer.get()) { |
| 732 name = "Page Scale Layer"; | 738 name = "Page Scale Layer"; |
| 733 } else if (graphicsLayer == m_innerViewportScrollLayer.get()) { | 739 } else if (graphicsLayer == m_innerViewportScrollLayer.get()) { |
| 734 name = "Inner Viewport Scroll Layer"; | 740 name = "Inner Viewport Scroll Layer"; |
| 735 } else if (graphicsLayer == m_overlayScrollbarHorizontal.get()) { | 741 } else if (graphicsLayer == m_overlayScrollbarHorizontal.get()) { |
| 736 name = "Overlay Scrollbar Horizontal Layer"; | 742 name = "Overlay Scrollbar Horizontal Layer"; |
| 737 } else if (graphicsLayer == m_overlayScrollbarVertical.get()) { | 743 } else if (graphicsLayer == m_overlayScrollbarVertical.get()) { |
| 738 name = "Overlay Scrollbar Vertical Layer"; | 744 name = "Overlay Scrollbar Vertical Layer"; |
| 739 } else if (graphicsLayer == m_rootTransformLayer) { | 745 } else if (graphicsLayer == m_rootTransformLayer) { |
| 740 name = "Root Transform Layer"; | 746 name = "Root Transform Layer"; |
| 741 } else { | 747 } else { |
| 742 ASSERT_NOT_REACHED(); | 748 ASSERT_NOT_REACHED(); |
| 743 } | 749 } |
| 744 | 750 |
| 745 return name; | 751 return name; |
| 746 } | 752 } |
| 747 | 753 |
| 748 } // namespace blink | 754 } // namespace blink |
| OLD | NEW |