Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1470 // Text nodes share style with their parents but the checked styles don't | 1470 // Text nodes share style with their parents but the checked styles don't |
| 1471 // apply to them, hence the !isText() check. | 1471 // apply to them, hence the !isText() check. |
| 1472 if (!isText() && (diff.transformChanged() || diff.opacityChanged() || | 1472 if (!isText() && (diff.transformChanged() || diff.opacityChanged() || |
| 1473 diff.zIndexChanged() || diff.filterChanged() || | 1473 diff.zIndexChanged() || diff.filterChanged() || |
| 1474 diff.backdropFilterChanged())) { | 1474 diff.backdropFilterChanged())) { |
| 1475 // We don't need to invalidate paint of objects on SPv2 when only paint | 1475 // We don't need to invalidate paint of objects on SPv2 when only paint |
| 1476 // property or paint order change. Mark the painting layer needing repaint | 1476 // property or paint order change. Mark the painting layer needing repaint |
| 1477 // for changed paint property or paint order. Raster invalidation will be | 1477 // for changed paint property or paint order. Raster invalidation will be |
| 1478 // issued if needed during paint. | 1478 // issued if needed during paint. |
| 1479 ObjectPaintInvalidator(*this).slowSetPaintingLayerNeedsRepaint(); | 1479 ObjectPaintInvalidator(*this).slowSetPaintingLayerNeedsRepaint(); |
| 1480 | |
| 1481 // When transform, opacity, etc. change, paint properties will also change | |
| 1482 // so we need to mark this object as needing an update. | |
| 1483 // TODO(pdr): Also update in the non-spv2 codepath? | |
|
pdr.
2016/11/11 23:50:27
Xianzhu, do we need to do this (also setNeedsPaint
Xianzhu
2016/11/12 00:30:48
We still need to go through the traditional path f
| |
| 1484 getMutableForPainting().setNeedsPaintPropertyUpdate(); | |
| 1480 } | 1485 } |
| 1481 } else { | 1486 } else { |
| 1482 // If transform changed, and the layer does not paint into its own separate | 1487 // If transform changed, and the layer does not paint into its own separate |
| 1483 // backing, then we need to invalidate paints. | 1488 // backing, then we need to invalidate paints. |
| 1484 if (diff.transformChanged()) { | 1489 if (diff.transformChanged()) { |
| 1485 // Text nodes share style with their parents but transforms don't apply to | 1490 // Text nodes share style with their parents but transforms don't apply to |
| 1486 // them, hence the !isText() check. | 1491 // them, hence the !isText() check. |
| 1487 if (!isText() && (!hasLayer() || | 1492 if (!isText() && (!hasLayer() || |
| 1488 !toLayoutBoxModelObject(this) | 1493 !toLayoutBoxModelObject(this) |
| 1489 ->layer() | 1494 ->layer() |
| (...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3547 const blink::LayoutObject* root = object1; | 3552 const blink::LayoutObject* root = object1; |
| 3548 while (root->parent()) | 3553 while (root->parent()) |
| 3549 root = root->parent(); | 3554 root = root->parent(); |
| 3550 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3555 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3551 } else { | 3556 } else { |
| 3552 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3557 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3553 } | 3558 } |
| 3554 } | 3559 } |
| 3555 | 3560 |
| 3556 #endif | 3561 #endif |
| OLD | NEW |