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

Side by Side Diff: Source/core/layout/LayoutObject.cpp

Issue 1332233002: Invalidate whitespace text on text color changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated patch to skip brs, updated expectations Created 5 years, 3 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
« no previous file with comments | « LayoutTests/paint/invalidation/text-decoration-invalidation-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 diff.setNeedsPaintInvalidationLayer(); 1726 diff.setNeedsPaintInvalidationLayer();
1727 } 1727 }
1728 1728
1729 // If backdrop filter changed, and the layer does not paint into its own sep arate backing or it paints with filters, then we need to invalidate paints. 1729 // If backdrop filter changed, and the layer does not paint into its own sep arate backing or it paints with filters, then we need to invalidate paints.
1730 if (diff.backdropFilterChanged() && hasLayer()) { 1730 if (diff.backdropFilterChanged() && hasLayer()) {
1731 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer(); 1731 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer();
1732 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithBackdropFilters()) 1732 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithBackdropFilters())
1733 diff.setNeedsPaintInvalidationLayer(); 1733 diff.setNeedsPaintInvalidationLayer();
1734 } 1734 }
1735 1735
1736 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) { 1736 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) {
chrishtr 2015/09/11 19:54:49 Let's change to textDecorationOrColorChanged().
1737 if (style()->hasBorder() || style()->hasOutline() 1737 if (style()->hasBorder() || style()->hasOutline()
1738 || style()->isBackgroundColorCurrentColor() 1738 || style()->isBackgroundColorCurrentColor()
1739 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace())) 1739 || (isText() && !isBR()))
1740 diff.setNeedsPaintInvalidationObject(); 1740 diff.setNeedsPaintInvalidationObject();
1741 } 1741 }
1742 1742
1743 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual 1743 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual
1744 // style changing, since it depends on whether we decide to composite these elements. When the 1744 // style changing, since it depends on whether we decide to composite these elements. When the
1745 // layer status of one of these elements changes, we need to force a layout. 1745 // layer status of one of these elements changes, we need to force a layout.
1746 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { 1746 if (!diff.needsFullLayout() && style() && isBoxModelObject()) {
1747 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoDeprecatedPaintLayer; 1747 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoDeprecatedPaintLayer;
1748 if (hasLayer() != requiresLayer) 1748 if (hasLayer() != requiresLayer)
1749 diff.setNeedsFullLayout(); 1749 diff.setNeedsFullLayout();
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
3407 const blink::LayoutObject* root = object1; 3407 const blink::LayoutObject* root = object1;
3408 while (root->parent()) 3408 while (root->parent())
3409 root = root->parent(); 3409 root = root->parent();
3410 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3410 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3411 } else { 3411 } else {
3412 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3412 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3413 } 3413 }
3414 } 3414 }
3415 3415
3416 #endif 3416 #endif
OLDNEW
« no previous file with comments | « LayoutTests/paint/invalidation/text-decoration-invalidation-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698