Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2578393002: Update paint property subtrees on paint offset changes (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 // This is a weird quirk that table cells paint as children of table rows, 914 // This is a weird quirk that table cells paint as children of table rows,
915 // but their location have the row's location baked-in. 915 // but their location have the row's location baked-in.
916 // Similar adjustment is done in LayoutTableCell::offsetFromContainer(). 916 // Similar adjustment is done in LayoutTableCell::offsetFromContainer().
917 if (boxModelObject.isTableCell()) { 917 if (boxModelObject.isTableCell()) {
918 LayoutObject* parentRow = boxModelObject.parent(); 918 LayoutObject* parentRow = boxModelObject.parent();
919 DCHECK(parentRow && parentRow->isTableRow()); 919 DCHECK(parentRow && parentRow->isTableRow());
920 context.current.paintOffset.moveBy( 920 context.current.paintOffset.moveBy(
921 -toLayoutBox(parentRow)->physicalLocation()); 921 -toLayoutBox(parentRow)->physicalLocation());
922 } 922 }
923 } 923 }
924
925 // Many paint properties depend on paint offset so we force an update of
926 // the entire subtree on paint offset changes.
927 if (object.previousPaintOffset() != context.current.paintOffset)
928 context.forceSubtreeUpdate = true;
pdr. 2016/12/16 03:24:09 This is the main change in this patch. Instead of
924 } 929 }
925 930
926 void PaintPropertyTreeBuilder::updatePropertiesForSelf( 931 void PaintPropertyTreeBuilder::updatePropertiesForSelf(
927 const LayoutObject& object, 932 const LayoutObject& object,
928 PaintPropertyTreeBuilderContext& context) { 933 PaintPropertyTreeBuilderContext& context) {
929 if (!object.isBoxModelObject() && !object.isSVG()) 934 if (!object.isBoxModelObject() && !object.isSVG())
930 return; 935 return;
931 936
932 #if DCHECK_IS_ON() 937 #if DCHECK_IS_ON()
933 FindObjectPropertiesNeedingUpdateScope checkNeedsUpdateScope(object, context); 938 FindObjectPropertiesNeedingUpdateScope checkNeedsUpdateScope(object, context);
(...skipping 18 matching lines...) Expand all
952 #endif 957 #endif
953 958
954 updateOverflowClip(object, context); 959 updateOverflowClip(object, context);
955 updatePerspective(object, context); 960 updatePerspective(object, context);
956 updateSvgLocalToBorderBoxTransform(object, context); 961 updateSvgLocalToBorderBoxTransform(object, context);
957 updateScrollAndScrollTranslation(object, context); 962 updateScrollAndScrollTranslation(object, context);
958 updateOutOfFlowContext(object, context); 963 updateOutOfFlowContext(object, context);
959 } 964 }
960 965
961 } // namespace blink 966 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698