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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
630 } | 630 } |
631 return rect; | 631 return rect; |
632 } | 632 } |
633 | 633 |
634 RefPtr<WebTaskRunner> VisualViewport::GetTimerTaskRunner() const { | 634 RefPtr<WebTaskRunner> VisualViewport::GetTimerTaskRunner() const { |
635 return TaskRunnerHelper::Get(TaskType::kUnspecedTimer, MainFrame()); | 635 return TaskRunnerHelper::Get(TaskType::kUnspecedTimer, MainFrame()); |
636 } | 636 } |
637 | 637 |
638 void VisualViewport::UpdateScrollOffset(const ScrollOffset& position, | 638 void VisualViewport::UpdateScrollOffset(const ScrollOffset& position, |
639 ScrollType scroll_type) { | 639 ScrollType scroll_type) { |
640 if (DidSetScaleOrLocation(scale_, FloatPoint(position)) && | 640 if (!DidSetScaleOrLocation(scale_, FloatPoint(position))) |
641 scroll_type != kAnchoringScroll) | 641 return; |
642 if (IsExplicitScrollType(scroll_type)) { | |
pdr.
2017/04/26 00:28:32
This will no longer call NotifyRootFrameViewport w
skobes
2017/04/26 01:28:57
Yes, I think it was a mistake to call it for kClam
| |
642 NotifyRootFrameViewport(); | 643 NotifyRootFrameViewport(); |
644 if (scroll_type != kCompositorScroll && LayerForScrolling()) | |
645 LayerForScrolling()->PlatformLayer()->ShowScrollbars(); | |
646 } | |
643 } | 647 } |
644 | 648 |
645 GraphicsLayer* VisualViewport::LayerForContainer() const { | 649 GraphicsLayer* VisualViewport::LayerForContainer() const { |
646 return inner_viewport_container_layer_.get(); | 650 return inner_viewport_container_layer_.get(); |
647 } | 651 } |
648 | 652 |
649 GraphicsLayer* VisualViewport::LayerForScrolling() const { | 653 GraphicsLayer* VisualViewport::LayerForScrolling() const { |
650 return inner_viewport_scroll_layer_.get(); | 654 return inner_viewport_scroll_layer_.get(); |
651 } | 655 } |
652 | 656 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
852 } else if (graphics_layer == root_transform_layer_.get()) { | 856 } else if (graphics_layer == root_transform_layer_.get()) { |
853 name = "Root Transform Layer"; | 857 name = "Root Transform Layer"; |
854 } else { | 858 } else { |
855 ASSERT_NOT_REACHED(); | 859 ASSERT_NOT_REACHED(); |
856 } | 860 } |
857 | 861 |
858 return name; | 862 return name; |
859 } | 863 } |
860 | 864 |
861 } // namespace blink | 865 } // namespace blink |
OLD | NEW |