OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/paint/PaintPropertyTreeBuilder.h" | 5 #include "core/paint/PaintPropertyTreeBuilder.h" |
6 | 6 |
7 #include "core/dom/DOMNodeIds.h" | 7 #include "core/dom/DOMNodeIds.h" |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 PaintPropertyTreeBuilderContext& context) { | 744 PaintPropertyTreeBuilderContext& context) { |
745 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { | 745 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
746 bool needsScrollProperties = false; | 746 bool needsScrollProperties = false; |
747 if (object.hasOverflowClip()) { | 747 if (object.hasOverflowClip()) { |
748 auto ancestorReasons = | 748 auto ancestorReasons = |
749 context.current.scroll->mainThreadScrollingReasons(); | 749 context.current.scroll->mainThreadScrollingReasons(); |
750 auto reasons = mainThreadScrollingReasons(object, ancestorReasons); | 750 auto reasons = mainThreadScrollingReasons(object, ancestorReasons); |
751 bool scrollNodeNeededForMainThreadReasons = ancestorReasons != reasons; | 751 bool scrollNodeNeededForMainThreadReasons = ancestorReasons != reasons; |
752 | 752 |
753 const LayoutBox& box = toLayoutBox(object); | 753 const LayoutBox& box = toLayoutBox(object); |
754 const auto* scrollableArea = box.getScrollableArea(); | 754 auto* scrollableArea = box.getScrollableArea(); |
755 IntSize scrollOffset = box.scrolledContentOffset(); | 755 IntSize scrollOffset = box.scrolledContentOffset(); |
756 if (scrollNodeNeededForMainThreadReasons || !scrollOffset.isZero() || | 756 if (scrollNodeNeededForMainThreadReasons || !scrollOffset.isZero() || |
757 scrollableArea->scrollsOverflow()) { | 757 scrollableArea->scrollsOverflow()) { |
758 needsScrollProperties = true; | 758 needsScrollProperties = true; |
759 auto& properties = | 759 auto& properties = |
760 object.getMutableForPainting().ensurePaintProperties(); | 760 object.getMutableForPainting().ensurePaintProperties(); |
761 | 761 |
762 IntSize scrollClip = scrollableArea->visibleContentRect().size(); | 762 IntSize scrollClip = scrollableArea->visibleContentRect().size(); |
763 IntSize scrollBounds = scrollableArea->contentsSize(); | 763 IntSize scrollBounds = scrollableArea->contentsSize(); |
764 bool userScrollableHorizontal = | 764 bool userScrollableHorizontal = |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 updateOverflowClip(object, context); | 977 updateOverflowClip(object, context); |
978 updatePerspective(object, context); | 978 updatePerspective(object, context); |
979 updateSvgLocalToBorderBoxTransform(object, context); | 979 updateSvgLocalToBorderBoxTransform(object, context); |
980 updateScrollAndScrollTranslation(object, context); | 980 updateScrollAndScrollTranslation(object, context); |
981 updateOutOfFlowContext(object, context); | 981 updateOutOfFlowContext(object, context); |
982 | 982 |
983 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 983 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
984 } | 984 } |
985 | 985 |
986 } // namespace blink | 986 } // namespace blink |
OLD | NEW |