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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 } | 500 } |
501 } | 501 } |
502 return result; | 502 return result; |
503 } | 503 } |
504 | 504 |
505 void TreeScope::setNeedsStyleRecalcForViewportUnits() | 505 void TreeScope::setNeedsStyleRecalcForViewportUnits() |
506 { | 506 { |
507 for (Element* element = ElementTraversal::firstWithin(rootNode()); element;
element = ElementTraversal::nextIncludingPseudo(*element)) { | 507 for (Element* element = ElementTraversal::firstWithin(rootNode()); element;
element = ElementTraversal::nextIncludingPseudo(*element)) { |
508 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root
->olderShadowRoot()) | 508 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root
->olderShadowRoot()) |
509 root->setNeedsStyleRecalcForViewportUnits(); | 509 root->setNeedsStyleRecalcForViewportUnits(); |
510 LayoutStyle* style = element->layoutStyle(); | 510 const LayoutStyle* style = element->layoutStyle(); |
511 if (style && style->hasViewportUnits()) | 511 if (style && style->hasViewportUnits()) |
512 element->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForT
racing::create(StyleChangeReason::ViewportUnits)); | 512 element->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForT
racing::create(StyleChangeReason::ViewportUnits)); |
513 } | 513 } |
514 } | 514 } |
515 | 515 |
516 void TreeScope::trace(Visitor* visitor) | 516 void TreeScope::trace(Visitor* visitor) |
517 { | 517 { |
518 visitor->trace(m_rootNode); | 518 visitor->trace(m_rootNode); |
519 visitor->trace(m_document); | 519 visitor->trace(m_document); |
520 visitor->trace(m_parentTreeScope); | 520 visitor->trace(m_parentTreeScope); |
521 visitor->trace(m_idTargetObserverRegistry); | 521 visitor->trace(m_idTargetObserverRegistry); |
522 visitor->trace(m_selection); | 522 visitor->trace(m_selection); |
523 visitor->trace(m_elementsById); | 523 visitor->trace(m_elementsById); |
524 visitor->trace(m_imageMapsByName); | 524 visitor->trace(m_imageMapsByName); |
525 visitor->trace(m_labelsByForAttribute); | 525 visitor->trace(m_labelsByForAttribute); |
526 visitor->trace(m_scopedStyleResolver); | 526 visitor->trace(m_scopedStyleResolver); |
527 } | 527 } |
528 | 528 |
529 } // namespace blink | 529 } // namespace blink |
OLD | NEW |