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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
535 return result; | 535 return result; |
536 } | 536 } |
537 | 537 |
538 void TreeScope::setNeedsStyleRecalcForViewportUnits() | 538 void TreeScope::setNeedsStyleRecalcForViewportUnits() |
539 { | 539 { |
540 for (Element* element = ElementTraversal::firstWithin(rootNode()); element; element = ElementTraversal::nextIncludingPseudo(*element)) { | 540 for (Element* element = ElementTraversal::firstWithin(rootNode()); element; element = ElementTraversal::nextIncludingPseudo(*element)) { |
541 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root ->olderShadowRoot()) | 541 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root ->olderShadowRoot()) |
542 root->setNeedsStyleRecalcForViewportUnits(); | 542 root->setNeedsStyleRecalcForViewportUnits(); |
543 RenderStyle* style = element->renderStyle(); | 543 RenderStyle* style = element->renderStyle(); |
544 if (style && style->hasViewportUnits()) | 544 if (style && style->hasViewportUnits()) |
545 element->setNeedsStyleRecalc(LocalStyleChange); | 545 element->setNeedsStyleRecalc(StyleChangeReasonForTracing::create(Sty leChangeReason::ViewportUnits), LocalStyleChange); |
esprehn
2014/09/26 03:53:01
Can we make this the second argument instead? Now
kouhei (in TOK)
2014/09/29 02:05:32
Done.
| |
546 } | 546 } |
547 } | 547 } |
548 | 548 |
549 void TreeScope::trace(Visitor* visitor) | 549 void TreeScope::trace(Visitor* visitor) |
550 { | 550 { |
551 visitor->trace(m_rootNode); | 551 visitor->trace(m_rootNode); |
552 visitor->trace(m_document); | 552 visitor->trace(m_document); |
553 visitor->trace(m_parentTreeScope); | 553 visitor->trace(m_parentTreeScope); |
554 visitor->trace(m_idTargetObserverRegistry); | 554 visitor->trace(m_idTargetObserverRegistry); |
555 visitor->trace(m_selection); | 555 visitor->trace(m_selection); |
556 visitor->trace(m_elementsById); | 556 visitor->trace(m_elementsById); |
557 visitor->trace(m_imageMapsByName); | 557 visitor->trace(m_imageMapsByName); |
558 visitor->trace(m_labelsByForAttribute); | 558 visitor->trace(m_labelsByForAttribute); |
559 visitor->trace(m_scopedStyleResolver); | 559 visitor->trace(m_scopedStyleResolver); |
560 } | 560 } |
561 | 561 |
562 } // namespace blink | 562 } // namespace blink |
OLD | NEW |