Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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::svgTreeScopedResources() | |
|
hayato
2016/07/04 04:27:29
Could we rename this to TreeScope::svgExtensions()
taijin
2016/07/05 06:37:14
Sure, thanks, will do it:)
| |
| 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 |
| OLD | NEW |