| 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 } | 517 } |
| 518 return false; | 518 return false; |
| 519 } | 519 } |
| 520 | 520 |
| 521 Element* TreeScope::getElementByAccessKey(const String& key) const | 521 Element* TreeScope::getElementByAccessKey(const String& key) const |
| 522 { | 522 { |
| 523 if (key.isEmpty()) | 523 if (key.isEmpty()) |
| 524 return 0; | 524 return 0; |
| 525 Element* result = 0; | 525 Element* result = 0; |
| 526 Node& root = rootNode(); | 526 Node& root = rootNode(); |
| 527 for (Element* element = ElementTraversal::firstWithin(root); element; elemen
t = ElementTraversal::next(*element, &root)) { | 527 for (Element& element : ElementTraversal::descendantsOf(root)) { |
| 528 if (equalIgnoringCase(element->fastGetAttribute(accesskeyAttr), key)) | 528 if (equalIgnoringCase(element.fastGetAttribute(accesskeyAttr), key)) |
| 529 result = element; | 529 result = &element; |
| 530 for (ShadowRoot* shadowRoot = element->youngestShadowRoot(); shadowRoot;
shadowRoot = shadowRoot->olderShadowRoot()) { | 530 for (ShadowRoot* shadowRoot = element.youngestShadowRoot(); shadowRoot;
shadowRoot = shadowRoot->olderShadowRoot()) { |
| 531 if (Element* shadowResult = shadowRoot->getElementByAccessKey(key)) | 531 if (Element* shadowResult = shadowRoot->getElementByAccessKey(key)) |
| 532 result = shadowResult; | 532 result = shadowResult; |
| 533 } | 533 } |
| 534 } | 534 } |
| 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)) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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 |