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

Side by Side Diff: third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp

Issue 2107153002: SVG object with same idrefs get conflicted even they are under different shadow root Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename the method in TreeScope class Created 4 years, 5 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 | « third_party/WebKit/Source/core/svg/SVGUseElement.cpp ('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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 SVGElement* svgTarget = target && target->isSVGElement() ? toSVGElement(targ et) : nullptr; 238 SVGElement* svgTarget = target && target->isSVGElement() ? toSVGElement(targ et) : nullptr;
239 239
240 if (svgTarget && !svgTarget->inShadowIncludingDocument()) 240 if (svgTarget && !svgTarget->inShadowIncludingDocument())
241 svgTarget = nullptr; 241 svgTarget = nullptr;
242 242
243 if (svgTarget != targetElement()) 243 if (svgTarget != targetElement())
244 setTargetElement(svgTarget); 244 setTargetElement(svgTarget);
245 245
246 if (!svgTarget) { 246 if (!svgTarget) {
247 // Do not register as pending if we are already pending this resource. 247 // Do not register as pending if we are already pending this resource.
248 if (document().accessSVGExtensions().isElementPendingResource(this, id)) 248 if (treeScope().accessSVGTreeScopedResources().isElementPendingResource( this, id))
249 return; 249 return;
250 250
251 if (!id.isEmpty()) { 251 if (!id.isEmpty()) {
252 document().accessSVGExtensions().addPendingResource(id, this); 252 treeScope().accessSVGTreeScopedResources().addPendingResource(id, th is);
253 ASSERT(hasPendingResources()); 253 ASSERT(hasPendingResources());
254 } 254 }
255 } else { 255 } else {
256 // Register us with the target in the dependencies map. Any change of hr efElement 256 // Register us with the target in the dependencies map. Any change of hr efElement
257 // that leads to relayout/repainting now informs us, so we can react to it. 257 // that leads to relayout/repainting now informs us, so we can react to it.
258 addReferenceTo(svgTarget); 258 addReferenceTo(svgTarget);
259 } 259 }
260 connectEventBaseConditions(); 260 connectEventBaseConditions();
261 } 261 }
262 262
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 void SVGSMILElement::connectEventBaseConditions() 621 void SVGSMILElement::connectEventBaseConditions()
622 { 622 {
623 disconnectEventBaseConditions(); 623 disconnectEventBaseConditions();
624 for (unsigned n = 0; n < m_conditions.size(); ++n) { 624 for (unsigned n = 0; n < m_conditions.size(); ++n) {
625 Condition* condition = m_conditions[n].get(); 625 Condition* condition = m_conditions[n].get();
626 if (condition->getType() == Condition::EventBase) { 626 if (condition->getType() == Condition::EventBase) {
627 ASSERT(!condition->syncBase()); 627 ASSERT(!condition->syncBase());
628 SVGElement* eventBase = eventBaseFor(*condition); 628 SVGElement* eventBase = eventBaseFor(*condition);
629 if (!eventBase) { 629 if (!eventBase) {
630 if (!condition->baseID().isEmpty() && !document().accessSVGExten sions().isElementPendingResource(this, AtomicString(condition->baseID()))) 630 if (!condition->baseID().isEmpty() && !treeScope().accessSVGTree ScopedResources().isElementPendingResource(this, AtomicString(condition->baseID( ))))
631 document().accessSVGExtensions().addPendingResource(AtomicSt ring(condition->baseID()), this); 631 treeScope().accessSVGTreeScopedResources().addPendingResourc e(AtomicString(condition->baseID()), this);
632 continue; 632 continue;
633 } 633 }
634 ASSERT(!condition->eventListener()); 634 ASSERT(!condition->eventListener());
635 condition->setEventListener(ConditionEventListener::create(this, con dition)); 635 condition->setEventListener(ConditionEventListener::create(this, con dition));
636 eventBase->addEventListener(AtomicString(condition->name()), conditi on->eventListener(), false); 636 eventBase->addEventListener(AtomicString(condition->name()), conditi on->eventListener(), false);
637 addReferenceTo(eventBase); 637 addReferenceTo(eventBase);
638 } 638 }
639 } 639 }
640 } 640 }
641 641
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 { 1357 {
1358 visitor->trace(m_targetElement); 1358 visitor->trace(m_targetElement);
1359 visitor->trace(m_timeContainer); 1359 visitor->trace(m_timeContainer);
1360 visitor->trace(m_conditions); 1360 visitor->trace(m_conditions);
1361 visitor->trace(m_syncBaseDependents); 1361 visitor->trace(m_syncBaseDependents);
1362 SVGElement::trace(visitor); 1362 SVGElement::trace(visitor);
1363 SVGTests::trace(visitor); 1363 SVGTests::trace(visitor);
1364 } 1364 }
1365 1365
1366 } // namespace blink 1366 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGUseElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698