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

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

Issue 1320553004: LayoutObject::adjustStyleDifference doesn't check backgroundColor when repainting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improving code styling 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
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 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 1696
1697 // If filter changed, and the layer does not paint into its own separate bac king or it paints with filters, then we need to invalidate paints. 1697 // If filter changed, and the layer does not paint into its own separate bac king or it paints with filters, then we need to invalidate paints.
1698 if (diff.filterChanged() && hasLayer()) { 1698 if (diff.filterChanged() && hasLayer()) {
1699 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer(); 1699 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer();
1700 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithFilters()) 1700 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithFilters())
1701 diff.setNeedsPaintInvalidationLayer(); 1701 diff.setNeedsPaintInvalidationLayer();
1702 } 1702 }
1703 1703
1704 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) { 1704 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) {
1705 if (style()->hasBorder() || style()->hasOutline() 1705 if (style()->hasBorder() || style()->hasOutline()
1706 || style()->isBackgroundColorCurrentColor()
1706 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace())) 1707 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace()))
1707 diff.setNeedsPaintInvalidationObject(); 1708 diff.setNeedsPaintInvalidationObject();
1708 } 1709 }
1709 1710
1710 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual 1711 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual
1711 // style changing, since it depends on whether we decide to composite these elements. When the 1712 // style changing, since it depends on whether we decide to composite these elements. When the
1712 // layer status of one of these elements changes, we need to force a layout. 1713 // layer status of one of these elements changes, we need to force a layout.
1713 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { 1714 if (!diff.needsFullLayout() && style() && isBoxModelObject()) {
1714 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoDeprecatedPaintLayer; 1715 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoDeprecatedPaintLayer;
1715 if (hasLayer() != requiresLayer) 1716 if (hasLayer() != requiresLayer)
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
3384 const blink::LayoutObject* root = object1; 3385 const blink::LayoutObject* root = object1;
3385 while (root->parent()) 3386 while (root->parent())
3386 root = root->parent(); 3387 root = root->parent();
3387 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3388 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3388 } else { 3389 } else {
3389 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3390 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3390 } 3391 }
3391 } 3392 }
3392 3393
3393 #endif 3394 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/background-currentColor-repaint-expected.txt ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698