| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 const IntRect&) const {} | 673 const IntRect&) const {} |
| 674 | 674 |
| 675 LocalFrame* VisualViewport::MainFrame() const { | 675 LocalFrame* VisualViewport::MainFrame() const { |
| 676 return GetPage().MainFrame() && GetPage().MainFrame()->IsLocalFrame() | 676 return GetPage().MainFrame() && GetPage().MainFrame()->IsLocalFrame() |
| 677 ? GetPage().DeprecatedLocalMainFrame() | 677 ? GetPage().DeprecatedLocalMainFrame() |
| 678 : 0; | 678 : 0; |
| 679 } | 679 } |
| 680 | 680 |
| 681 bool VisualViewport::ScheduleAnimation() { | 681 bool VisualViewport::ScheduleAnimation() { |
| 682 if (PlatformChromeClient* client = GetChromeClient()) { | 682 if (PlatformChromeClient* client = GetChromeClient()) { |
| 683 client->ScheduleAnimation(MainFrame()); | 683 client->ScheduleAnimation(MainFrame()->View()); |
| 684 return true; | 684 return true; |
| 685 } | 685 } |
| 686 return false; | 686 return false; |
| 687 } | 687 } |
| 688 | 688 |
| 689 void VisualViewport::ClampToBoundaries() { | 689 void VisualViewport::ClampToBoundaries() { |
| 690 SetLocation(FloatPoint(offset_)); | 690 SetLocation(FloatPoint(offset_)); |
| 691 } | 691 } |
| 692 | 692 |
| 693 FloatRect VisualViewport::ViewportToRootFrame( | 693 FloatRect VisualViewport::ViewportToRootFrame( |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 } else if (graphics_layer == root_transform_layer_.get()) { | 856 } else if (graphics_layer == root_transform_layer_.get()) { |
| 857 name = "Root Transform Layer"; | 857 name = "Root Transform Layer"; |
| 858 } else { | 858 } else { |
| 859 NOTREACHED(); | 859 NOTREACHED(); |
| 860 } | 860 } |
| 861 | 861 |
| 862 return name; | 862 return name; |
| 863 } | 863 } |
| 864 | 864 |
| 865 } // namespace blink | 865 } // namespace blink |
| OLD | NEW |