| 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/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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  211     PaintPropertyTreeBuilderContext& context) { |  211     PaintPropertyTreeBuilderContext& context) { | 
|  212   bool usesPaintOffsetTranslation = false; |  212   bool usesPaintOffsetTranslation = false; | 
|  213   if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() && |  213   if (RuntimeEnabledFeatures::rootLayerScrollingEnabled() && | 
|  214       object.isLayoutView()) { |  214       object.isLayoutView()) { | 
|  215     // Root layer scrolling always creates a translation node for LayoutView to |  215     // Root layer scrolling always creates a translation node for LayoutView to | 
|  216     // ensure fixed and absolute contexts use the correct transform space. |  216     // ensure fixed and absolute contexts use the correct transform space. | 
|  217     usesPaintOffsetTranslation = true; |  217     usesPaintOffsetTranslation = true; | 
|  218   } else if (object.isBoxModelObject() && |  218   } else if (object.isBoxModelObject() && | 
|  219              context.current.paintOffset != LayoutPoint()) { |  219              context.current.paintOffset != LayoutPoint()) { | 
|  220     // TODO(trchen): Eliminate PaintLayer dependency. |  220     // TODO(trchen): Eliminate PaintLayer dependency. | 
 |  221     // TODO(chrishtr): When changing the condition here, make sure to update | 
 |  222     // the condition in LayoutBoxModelObject::styleDidChange() above | 
 |  223     // setNeedsPaintPropertyUpdate(). | 
|  221     PaintLayer* layer = toLayoutBoxModelObject(object).layer(); |  224     PaintLayer* layer = toLayoutBoxModelObject(object).layer(); | 
|  222     if (layer && layer->paintsWithTransform(GlobalPaintNormalPhase)) |  225     if (layer && | 
 |  226         layer->paintsWithTransform(GlobalPaintFlattenCompositingLayers)) | 
|  223       usesPaintOffsetTranslation = true; |  227       usesPaintOffsetTranslation = true; | 
|  224   } |  228   } | 
|  225  |  229  | 
|  226   // We should use the same subpixel paint offset values for snapping |  230   // We should use the same subpixel paint offset values for snapping | 
|  227   // regardless of whether a transform is present. If there is a transform |  231   // regardless of whether a transform is present. If there is a transform | 
|  228   // we round the paint offset but keep around the residual fractional |  232   // we round the paint offset but keep around the residual fractional | 
|  229   // component for the transformed content to paint with.  In spv1 this was |  233   // component for the transformed content to paint with.  In spv1 this was | 
|  230   // called "subpixel accumulation". For more information, see |  234   // called "subpixel accumulation". For more information, see | 
|  231   // PaintLayer::subpixelAccumulation() and |  235   // PaintLayer::subpixelAccumulation() and | 
|  232   // PaintLayerPainter::paintFragmentByApplyingTransform. |  236   // PaintLayerPainter::paintFragmentByApplyingTransform. | 
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  905 #endif |  909 #endif | 
|  906  |  910  | 
|  907   updateOverflowClip(object, context); |  911   updateOverflowClip(object, context); | 
|  908   updatePerspective(object, context); |  912   updatePerspective(object, context); | 
|  909   updateSvgLocalToBorderBoxTransform(object, context); |  913   updateSvgLocalToBorderBoxTransform(object, context); | 
|  910   updateScrollAndScrollTranslation(object, context); |  914   updateScrollAndScrollTranslation(object, context); | 
|  911   updateOutOfFlowContext(object, context); |  915   updateOutOfFlowContext(object, context); | 
|  912 } |  916 } | 
|  913  |  917  | 
|  914 }  // namespace blink |  918 }  // namespace blink | 
| OLD | NEW |