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

Side by Side Diff: third_party/WebKit/Source/core/dom/TreeScope.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 void TreeScope::setNeedsStyleRecalcForViewportUnits() 486 void TreeScope::setNeedsStyleRecalcForViewportUnits()
487 { 487 {
488 for (Element* element = ElementTraversal::firstWithin(rootNode()); element; element = ElementTraversal::nextIncludingPseudo(*element)) { 488 for (Element* element = ElementTraversal::firstWithin(rootNode()); element; element = ElementTraversal::nextIncludingPseudo(*element)) {
489 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root ->olderShadowRoot()) 489 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root ->olderShadowRoot())
490 root->setNeedsStyleRecalcForViewportUnits(); 490 root->setNeedsStyleRecalcForViewportUnits();
491 const ComputedStyle* style = element->computedStyle(); 491 const ComputedStyle* style = element->computedStyle();
492 if (style && style->hasViewportUnits()) 492 if (style && style->hasViewportUnits())
493 element->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForT racing::create(StyleChangeReason::ViewportUnits)); 493 element->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForT racing::create(StyleChangeReason::ViewportUnits));
494 } 494 }
495 } 495 }
496 const SVGTreeScopeResources* TreeScope::svgExtensions()
497 {
498 return m_svgTreeScopedResources.get();
499 }
500
501 SVGTreeScopeResources& TreeScope::accessSVGTreeScopedResources()
502 {
503 if (!m_svgTreeScopedResources)
504 m_svgTreeScopedResources = new SVGTreeScopeResources(this);
505 return *m_svgTreeScopedResources;
506 }
507
496 508
497 DEFINE_TRACE(TreeScope) 509 DEFINE_TRACE(TreeScope)
498 { 510 {
499 visitor->trace(m_rootNode); 511 visitor->trace(m_rootNode);
500 visitor->trace(m_document); 512 visitor->trace(m_document);
501 visitor->trace(m_parentTreeScope); 513 visitor->trace(m_parentTreeScope);
502 visitor->trace(m_idTargetObserverRegistry); 514 visitor->trace(m_idTargetObserverRegistry);
503 visitor->trace(m_selection); 515 visitor->trace(m_selection);
504 visitor->trace(m_elementsById); 516 visitor->trace(m_elementsById);
505 visitor->trace(m_imageMapsByName); 517 visitor->trace(m_imageMapsByName);
506 visitor->trace(m_scopedStyleResolver); 518 visitor->trace(m_scopedStyleResolver);
507 visitor->trace(m_radioButtonGroupScope); 519 visitor->trace(m_radioButtonGroupScope);
520 visitor->trace(m_svgTreeScopedResources);
508 } 521 }
509 522
510 } // namespace blink 523 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/TreeScope.h ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698