Chromium Code Reviews| 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 <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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 } | 475 } |
| 476 | 476 |
| 477 // TODO(trchen): Can't omit effect node if we have 3D children. | 477 // TODO(trchen): Can't omit effect node if we have 3D children. |
| 478 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { | 478 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
| 479 const ClipPaintPropertyNode* outputClip = context.inputClipOfCurrentEffect; | 479 const ClipPaintPropertyNode* outputClip = context.inputClipOfCurrentEffect; |
| 480 | 480 |
| 481 bool effectNodeNeeded = false; | 481 bool effectNodeNeeded = false; |
| 482 | 482 |
| 483 // Can't omit effect node if we have paint children with exotic blending. | 483 // Can't omit effect node if we have paint children with exotic blending. |
| 484 if (object.isSVG()) { | 484 if (object.isSVG()) { |
| 485 // Yes, including LayoutSVGRoot, because SVG layout objects don't create | 485 // This handles SVGRoot objects which have PaintLayers. |
| 486 // PaintLayer so PaintLayer::hasNonIsolatedDescendantWithBlendMode() | 486 if (object.isBoxModelObject() && object.hasLayer()) { |
| 487 // doesn't catch SVG descendants. | 487 PaintLayer* layer = toLayoutBoxModelObject(object).layer(); |
| 488 if (layer->hasNonIsolatedDescendantWithBlendMode()) | |
|
trchen
2017/03/31 21:08:31
if (object->hasNonIsolatedDescendantWithBlendMode(
chrishtr
2017/03/31 21:28:34
Done.
| |
| 489 effectNodeNeeded = true; | |
| 490 } | |
| 488 if (SVGLayoutSupport::isIsolationRequired(&object)) | 491 if (SVGLayoutSupport::isIsolationRequired(&object)) |
|
trchen
2017/03/31 21:08:31
else if (SVGLayoutSupport::isIsolationRequired(&ob
chrishtr
2017/03/31 21:28:34
Done.
| |
| 489 effectNodeNeeded = true; | 492 effectNodeNeeded = true; |
| 490 } else if (PaintLayer* layer = toLayoutBoxModelObject(object).layer()) { | 493 } else if (PaintLayer* layer = toLayoutBoxModelObject(object).layer()) { |
| 491 if (layer->hasNonIsolatedDescendantWithBlendMode()) | 494 if (layer->hasNonIsolatedDescendantWithBlendMode()) |
| 492 effectNodeNeeded = true; | 495 effectNodeNeeded = true; |
| 493 } | 496 } |
| 494 | 497 |
| 495 SkBlendMode blendMode = object.isBlendingAllowed() | 498 SkBlendMode blendMode = object.isBlendingAllowed() |
| 496 ? WebCoreCompositeToSkiaComposite( | 499 ? WebCoreCompositeToSkiaComposite( |
| 497 CompositeSourceOver, style.blendMode()) | 500 CompositeSourceOver, style.blendMode()) |
| 498 : SkBlendMode::kSrcOver; | 501 : SkBlendMode::kSrcOver; |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1132 updateOverflowClip(object, context); | 1135 updateOverflowClip(object, context); |
| 1133 updatePerspective(object, context); | 1136 updatePerspective(object, context); |
| 1134 updateSvgLocalToBorderBoxTransform(object, context); | 1137 updateSvgLocalToBorderBoxTransform(object, context); |
| 1135 updateScrollAndScrollTranslation(object, context); | 1138 updateScrollAndScrollTranslation(object, context); |
| 1136 updateOutOfFlowContext(object, context); | 1139 updateOutOfFlowContext(object, context); |
| 1137 | 1140 |
| 1138 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 1141 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
| 1139 } | 1142 } |
| 1140 | 1143 |
| 1141 } // namespace blink | 1144 } // namespace blink |
| OLD | NEW |