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

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

Issue 1455153003: Fix animation of 'color' w/ currentColor for SVG 'fill' and 'stroke' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Draft4 Created 5 years 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 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 } 1790 }
1791 1791
1792 // Optimization: for decoration/color property changes, invalidation is only needed if we have style or text affected by these properties. 1792 // Optimization: for decoration/color property changes, invalidation is only needed if we have style or text affected by these properties.
1793 if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) { 1793 if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) {
1794 if (style()->hasBorder() || style()->hasOutline() 1794 if (style()->hasBorder() || style()->hasOutline()
1795 || style()->isBackgroundColorCurrentColor() 1795 || style()->isBackgroundColorCurrentColor()
1796 // Skip any text nodes that do not contain text boxes. Whitespace ca nnot be 1796 // Skip any text nodes that do not contain text boxes. Whitespace ca nnot be
1797 // skipped or we will miss invalidating decorations (e.g., underline s). 1797 // skipped or we will miss invalidating decorations (e.g., underline s).
1798 || (isText() && !isBR() && toLayoutText(this)->hasTextBoxes()) 1798 || (isText() && !isBR() && toLayoutText(this)->hasTextBoxes())
1799 // Caret is painted in text color. 1799 // Caret is painted in text color.
1800 || (isLayoutBlock() && toLayoutBlock(this)->hasCaret())) 1800 || (isLayoutBlock() && toLayoutBlock(this)->hasCaret())
1801 || (isSVG() && style()->svgStyle().isFillColorCurrentColor())
1802 || (isSVG() && style()->svgStyle().isStrokeColorCurrentColor()))
1801 diff.setNeedsPaintInvalidationObject(); 1803 diff.setNeedsPaintInvalidationObject();
1802 } 1804 }
1803 1805
1804 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual 1806 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual
1805 // style changing, since it depends on whether we decide to composite these elements. When the 1807 // style changing, since it depends on whether we decide to composite these elements. When the
1806 // layer status of one of these elements changes, we need to force a layout. 1808 // layer status of one of these elements changes, we need to force a layout.
1807 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { 1809 if (!diff.needsFullLayout() && style() && isBoxModelObject()) {
1808 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoPaintLayer; 1810 bool requiresLayer = toLayoutBoxModelObject(this)->layerTypeRequired() ! = NoPaintLayer;
1809 if (hasLayer() != requiresLayer) 1811 if (hasLayer() != requiresLayer)
1810 diff.setNeedsFullLayout(); 1812 diff.setNeedsFullLayout();
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
3488 const blink::LayoutObject* root = object1; 3490 const blink::LayoutObject* root = object1;
3489 while (root->parent()) 3491 while (root->parent())
3490 root = root->parent(); 3492 root = root->parent();
3491 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3493 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3492 } else { 3494 } else {
3493 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3495 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3494 } 3496 }
3495 } 3497 }
3496 3498
3497 #endif 3499 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698