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

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

Issue 2854493002: Store previous painting clip rects on FragmentData. (Closed)
Patch Set: none Created 3 years, 7 months 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 <memory> 7 #include <memory>
8 #include "core/dom/DOMNodeIds.h" 8 #include "core/dom/DOMNodeIds.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 1184
1185 void PaintPropertyTreeBuilder::UpdatePaintProperties( 1185 void PaintPropertyTreeBuilder::UpdatePaintProperties(
1186 const LayoutObject& object, 1186 const LayoutObject& object,
1187 PaintPropertyTreeBuilderContext& full_context) { 1187 PaintPropertyTreeBuilderContext& full_context) {
1188 bool needs_paint_properties = 1188 bool needs_paint_properties =
1189 NeedsPaintOffsetTranslation(object) || NeedsTransform(object) || 1189 NeedsPaintOffsetTranslation(object) || NeedsTransform(object) ||
1190 NeedsEffect(object) || NeedsTransformForNonRootSVG(object) || 1190 NeedsEffect(object) || NeedsTransformForNonRootSVG(object) ||
1191 NeedsFilter(object) || NeedsCssClip(object) || 1191 NeedsFilter(object) || NeedsCssClip(object) ||
1192 NeedsScrollbarPaintOffset(object) || NeedsOverflowScroll(object) || 1192 NeedsScrollbarPaintOffset(object) || NeedsOverflowScroll(object) ||
1193 NeedsPerspective(object) || NeedsSVGLocalToBorderBoxTransform(object) || 1193 NeedsPerspective(object) || NeedsSVGLocalToBorderBoxTransform(object) ||
1194 NeedsScrollTranslation(object) || NeedsCssClipFixedPosition(object); 1194 NeedsScrollTranslation(object) ||
1195 NeedsCssClipFixedPosition(object)
1196 // These are neeed because we store previous painting clip rects on
wkorman 2017/05/01 20:29:24 neeed -> needed
1197 // ObjectPaintProperties.
wkorman 2017/05/01 20:29:24 Comment looks stale -- we're storing them in Fragm
1198 ||
1199 (object.HasLayer() &&
1200 ToLayoutBoxModelObject(object).Layer()->SupportsSubsequenceCaching()) ||
wkorman 2017/05/01 20:29:24 How does subsequence caching support on a layer me
chrishtr 2017/05/01 21:43:54 I no longer need this code actually, now that the
1201 object.HasClipRelatedProperty();
1195 1202
1196 bool had_paint_properties = object.PaintProperties(); 1203 bool had_paint_properties = object.PaintProperties();
1197 1204
1198 if (needs_paint_properties) { 1205 if (needs_paint_properties) {
1199 object.GetMutableForPainting().EnsurePaintProperties(); 1206 object.GetMutableForPainting().EnsurePaintProperties();
1200 } else { 1207 } else {
1201 object.GetMutableForPainting().ClearPaintProperties(); 1208 object.GetMutableForPainting().ClearPaintProperties();
1202 if (had_paint_properties) 1209 if (had_paint_properties)
1203 full_context.force_subtree_update = true; 1210 full_context.force_subtree_update = true;
1204 } 1211 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 context.force_subtree_update); 1277 context.force_subtree_update);
1271 1278
1272 context.force_subtree_update |= object.SubtreeNeedsPaintPropertyUpdate(); 1279 context.force_subtree_update |= object.SubtreeNeedsPaintPropertyUpdate();
1273 } 1280 }
1274 1281
1275 if (object.CanContainAbsolutePositionObjects()) 1282 if (object.CanContainAbsolutePositionObjects())
1276 context.container_for_absolute_position = &object; 1283 context.container_for_absolute_position = &object;
1277 } 1284 }
1278 1285
1279 } // namespace blink 1286 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698