| 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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 GraphicsContext&, | 667 GraphicsContext&, |
| 668 GraphicsLayerPaintingPhase, | 668 GraphicsLayerPaintingPhase, |
| 669 const IntRect&) const {} | 669 const IntRect&) const {} |
| 670 | 670 |
| 671 LocalFrame* VisualViewport::MainFrame() const { | 671 LocalFrame* VisualViewport::MainFrame() const { |
| 672 return GetPage().MainFrame() && GetPage().MainFrame()->IsLocalFrame() | 672 return GetPage().MainFrame() && GetPage().MainFrame()->IsLocalFrame() |
| 673 ? GetPage().DeprecatedLocalMainFrame() | 673 ? GetPage().DeprecatedLocalMainFrame() |
| 674 : 0; | 674 : 0; |
| 675 } | 675 } |
| 676 | 676 |
| 677 FrameViewBase* VisualViewport::GetFrameViewBase() { | 677 bool VisualViewport::ScheduleAnimation() { |
| 678 return MainFrame()->View(); | 678 return MainFrame()->ScheduleAnimation(GetHostWindow()); |
| 679 } | 679 } |
| 680 | 680 |
| 681 void VisualViewport::ClampToBoundaries() { | 681 void VisualViewport::ClampToBoundaries() { |
| 682 SetLocation(FloatPoint(offset_)); | 682 SetLocation(FloatPoint(offset_)); |
| 683 } | 683 } |
| 684 | 684 |
| 685 FloatRect VisualViewport::ViewportToRootFrame( | 685 FloatRect VisualViewport::ViewportToRootFrame( |
| 686 const FloatRect& rect_in_viewport) const { | 686 const FloatRect& rect_in_viewport) const { |
| 687 FloatRect rect_in_root_frame = rect_in_viewport; | 687 FloatRect rect_in_root_frame = rect_in_viewport; |
| 688 rect_in_root_frame.Scale(1 / Scale()); | 688 rect_in_root_frame.Scale(1 / Scale()); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 } else if (graphics_layer == root_transform_layer_.get()) { | 848 } else if (graphics_layer == root_transform_layer_.get()) { |
| 849 name = "Root Transform Layer"; | 849 name = "Root Transform Layer"; |
| 850 } else { | 850 } else { |
| 851 ASSERT_NOT_REACHED(); | 851 ASSERT_NOT_REACHED(); |
| 852 } | 852 } |
| 853 | 853 |
| 854 return name; | 854 return name; |
| 855 } | 855 } |
| 856 | 856 |
| 857 } // namespace blink | 857 } // namespace blink |
| OLD | NEW |