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

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

Issue 2570423003: Remove paintOffsetTranslation for fixed-position elements. (Closed)
Patch Set: none Created 3 years, 11 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 "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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 const LayoutObject& object, 212 const LayoutObject& object,
213 PaintPropertyTreeBuilderContext& context) { 213 PaintPropertyTreeBuilderContext& context) {
214 bool usesPaintOffsetTranslation = false; 214 bool usesPaintOffsetTranslation = false;
215 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() && 215 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
216 object.isLayoutView()) { 216 object.isLayoutView()) {
217 // Root layer scrolling always creates a translation node for LayoutView to 217 // Root layer scrolling always creates a translation node for LayoutView to
218 // ensure fixed and absolute contexts use the correct transform space. 218 // ensure fixed and absolute contexts use the correct transform space.
219 usesPaintOffsetTranslation = true; 219 usesPaintOffsetTranslation = true;
220 } else if (object.isBoxModelObject() && 220 } else if (object.isBoxModelObject() &&
221 context.current.paintOffset != LayoutPoint()) { 221 context.current.paintOffset != LayoutPoint()) {
222 // TODO(trchen): Eliminate PaintLayer dependency.
223 // TODO(chrishtr): When changing the condition here, make sure to update
224 // the condition in LayoutBoxModelObject::styleDidChange() above
225 // setNeedsPaintPropertyUpdate().
226 PaintLayer* layer = toLayoutBoxModelObject(object).layer(); 222 PaintLayer* layer = toLayoutBoxModelObject(object).layer();
227 if (layer && 223 if (layer &&
228 layer->paintsWithTransform(GlobalPaintFlattenCompositingLayers)) 224 layer->paintsWithTransform(GlobalPaintFlattenCompositingLayers))
229 usesPaintOffsetTranslation = true; 225 usesPaintOffsetTranslation = true;
230 } 226 }
231 227
232 // We should use the same subpixel paint offset values for snapping 228 // We should use the same subpixel paint offset values for snapping
233 // regardless of whether a transform is present. If there is a transform 229 // regardless of whether a transform is present. If there is a transform
234 // we round the paint offset but keep around the residual fractional 230 // we round the paint offset but keep around the residual fractional
235 // component for the transformed content to paint with. In spv1 this was 231 // component for the transformed content to paint with. In spv1 this was
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 updateOverflowClip(object, context); 984 updateOverflowClip(object, context);
989 updatePerspective(object, context); 985 updatePerspective(object, context);
990 updateSvgLocalToBorderBoxTransform(object, context); 986 updateSvgLocalToBorderBoxTransform(object, context);
991 updateScrollAndScrollTranslation(object, context); 987 updateScrollAndScrollTranslation(object, context);
992 updateOutOfFlowContext(object, context); 988 updateOutOfFlowContext(object, context);
993 989
994 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 990 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
995 } 991 }
996 992
997 } // namespace blink 993 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698