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

Side by Side Diff: Source/core/dom/Node.cpp

Issue 22604008: Allow SVG images to not taint the canvas with drawImage/drawPattern (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase after r156375 Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/html/HTMLAnchorElement.cpp » ('j') | 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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "core/dom/TextEvent.h" 64 #include "core/dom/TextEvent.h"
65 #include "core/dom/TouchEvent.h" 65 #include "core/dom/TouchEvent.h"
66 #include "core/dom/TreeScopeAdopter.h" 66 #include "core/dom/TreeScopeAdopter.h"
67 #include "core/dom/UIEvent.h" 67 #include "core/dom/UIEvent.h"
68 #include "core/dom/UserActionElementSet.h" 68 #include "core/dom/UserActionElementSet.h"
69 #include "core/dom/WheelEvent.h" 69 #include "core/dom/WheelEvent.h"
70 #include "core/dom/shadow/ElementShadow.h" 70 #include "core/dom/shadow/ElementShadow.h"
71 #include "core/dom/shadow/InsertionPoint.h" 71 #include "core/dom/shadow/InsertionPoint.h"
72 #include "core/dom/shadow/ShadowRoot.h" 72 #include "core/dom/shadow/ShadowRoot.h"
73 #include "core/editing/htmlediting.h" 73 #include "core/editing/htmlediting.h"
74 #include "core/html/HTMLAnchorElement.h"
74 #include "core/html/HTMLFrameOwnerElement.h" 75 #include "core/html/HTMLFrameOwnerElement.h"
75 #include "core/html/HTMLStyleElement.h" 76 #include "core/html/HTMLStyleElement.h"
76 #include "core/html/RadioNodeList.h" 77 #include "core/html/RadioNodeList.h"
77 #include "core/inspector/InspectorCounters.h" 78 #include "core/inspector/InspectorCounters.h"
78 #include "core/page/ContextMenuController.h" 79 #include "core/page/ContextMenuController.h"
79 #include "core/page/EventHandler.h" 80 #include "core/page/EventHandler.h"
80 #include "core/page/Frame.h" 81 #include "core/page/Frame.h"
81 #include "core/page/Page.h" 82 #include "core/page/Page.h"
82 #include "core/page/Settings.h" 83 #include "core/page/Settings.h"
83 #include "core/platform/Partitions.h" 84 #include "core/platform/Partitions.h"
84 #include "core/rendering/FlowThreadController.h" 85 #include "core/rendering/FlowThreadController.h"
85 #include "core/rendering/RenderBox.h" 86 #include "core/rendering/RenderBox.h"
87 #include "core/svg/graphics/SVGImage.h"
86 #include "wtf/HashSet.h" 88 #include "wtf/HashSet.h"
87 #include "wtf/PassOwnPtr.h" 89 #include "wtf/PassOwnPtr.h"
88 #include "wtf/RefCountedLeakCounter.h" 90 #include "wtf/RefCountedLeakCounter.h"
89 #include "wtf/UnusedParam.h" 91 #include "wtf/UnusedParam.h"
90 #include "wtf/Vector.h" 92 #include "wtf/Vector.h"
91 #include "wtf/text/CString.h" 93 #include "wtf/text/CString.h"
92 #include "wtf/text/StringBuilder.h" 94 #include "wtf/text/StringBuilder.h"
93 95
94 using namespace std; 96 using namespace std;
95 97
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 777 }
776 778
777 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) { 779 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) {
778 if (root->childNeedsDistributionRecalc()) 780 if (root->childNeedsDistributionRecalc())
779 root->recalcDistribution(); 781 root->recalcDistribution();
780 } 782 }
781 783
782 clearChildNeedsDistributionRecalc(); 784 clearChildNeedsDistributionRecalc();
783 } 785 }
784 786
787 void Node::setIsLink(bool isLink)
788 {
789 setFlag(isLink && !SVGImage::isInSVGImage(toElement(this)), IsLinkFlag);
790 }
791
785 void Node::markAncestorsWithChildNeedsDistributionRecalc() 792 void Node::markAncestorsWithChildNeedsDistributionRecalc()
786 { 793 {
787 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode()) 794 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode())
788 node->setChildNeedsDistributionRecalc(); 795 node->setChildNeedsDistributionRecalc();
789 if (document()->childNeedsDistributionRecalc()) 796 if (document()->childNeedsDistributionRecalc())
790 document()->scheduleStyleRecalc(); 797 document()->scheduleStyleRecalc();
791 } 798 }
792 799
793 inline void Node::setStyleChange(StyleChangeType changeType) 800 inline void Node::setStyleChange(StyleChangeType changeType)
794 { 801 {
(...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 node->showTreeForThis(); 2770 node->showTreeForThis();
2764 } 2771 }
2765 2772
2766 void showNodePath(const WebCore::Node* node) 2773 void showNodePath(const WebCore::Node* node)
2767 { 2774 {
2768 if (node) 2775 if (node)
2769 node->showNodePathForThis(); 2776 node->showNodePathForThis();
2770 } 2777 }
2771 2778
2772 #endif 2779 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/html/HTMLAnchorElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698