| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 void PaintPropertyTreeBuilder::updateLocalBorderBoxContext( | 519 void PaintPropertyTreeBuilder::updateLocalBorderBoxContext( |
| 520 const LayoutObject& object, | 520 const LayoutObject& object, |
| 521 PaintPropertyTreeBuilderContext& context) { | 521 PaintPropertyTreeBuilderContext& context) { |
| 522 if (!object.needsPaintPropertyUpdate() && !context.forceSubtreeUpdate) | 522 if (!object.needsPaintPropertyUpdate() && !context.forceSubtreeUpdate) |
| 523 return; | 523 return; |
| 524 | 524 |
| 525 // Avoid adding an ObjectPaintProperties for non-boxes to save memory, since | 525 // Avoid adding an ObjectPaintProperties for non-boxes to save memory, since |
| 526 // we don't need them at the moment. | 526 // we don't need them at the moment. |
| 527 if (!object.isBox() && !object.hasLayer()) { | 527 if (!object.isBox() && !object.hasLayer()) { |
| 528 if (auto* properties = object.getMutableForPainting().paintProperties()) | 528 if (auto* properties = object.getMutableForPainting().paintProperties()) |
| 529 properties->clearLocalBorderBoxProperties(); | 529 context.forceSubtreeUpdate |= properties->clearLocalBorderBoxProperties(); |
| 530 } else { | 530 } else { |
| 531 auto& properties = object.getMutableForPainting().ensurePaintProperties(); | 531 auto& properties = object.getMutableForPainting().ensurePaintProperties(); |
| 532 properties.updateLocalBorderBoxProperties( | 532 context.forceSubtreeUpdate |= properties.updateLocalBorderBoxProperties( |
| 533 context.current.paintOffset, context.current.transform, | 533 context.current.paintOffset, context.current.transform, |
| 534 context.current.clip, context.currentEffect, context.current.scroll); | 534 context.current.clip, context.currentEffect, context.current.scroll); |
| 535 } | 535 } |
| 536 } | 536 } |
| 537 | 537 |
| 538 // TODO(trchen): Remove this once we bake the paint offset into frameRect. | 538 // TODO(trchen): Remove this once we bake the paint offset into frameRect. |
| 539 void PaintPropertyTreeBuilder::updateScrollbarPaintOffset( | 539 void PaintPropertyTreeBuilder::updateScrollbarPaintOffset( |
| 540 const LayoutObject& object, | 540 const LayoutObject& object, |
| 541 PaintPropertyTreeBuilderContext& context) { | 541 PaintPropertyTreeBuilderContext& context) { |
| 542 if (!object.needsPaintPropertyUpdate() && !context.forceSubtreeUpdate) | 542 if (!object.needsPaintPropertyUpdate() && !context.forceSubtreeUpdate) |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 #endif | 952 #endif |
| 953 | 953 |
| 954 updateOverflowClip(object, context); | 954 updateOverflowClip(object, context); |
| 955 updatePerspective(object, context); | 955 updatePerspective(object, context); |
| 956 updateSvgLocalToBorderBoxTransform(object, context); | 956 updateSvgLocalToBorderBoxTransform(object, context); |
| 957 updateScrollAndScrollTranslation(object, context); | 957 updateScrollAndScrollTranslation(object, context); |
| 958 updateOutOfFlowContext(object, context); | 958 updateOutOfFlowContext(object, context); |
| 959 } | 959 } |
| 960 | 960 |
| 961 } // namespace blink | 961 } // namespace blink |
| OLD | NEW |