| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 326 |
| 327 Element* TreeScope::FindAnchor(const String& name) { | 327 Element* TreeScope::FindAnchor(const String& name) { |
| 328 if (name.IsEmpty()) | 328 if (name.IsEmpty()) |
| 329 return nullptr; | 329 return nullptr; |
| 330 if (Element* element = GetElementById(AtomicString(name))) | 330 if (Element* element = GetElementById(AtomicString(name))) |
| 331 return element; | 331 return element; |
| 332 for (HTMLAnchorElement& anchor : | 332 for (HTMLAnchorElement& anchor : |
| 333 Traversal<HTMLAnchorElement>::StartsAfter(RootNode())) { | 333 Traversal<HTMLAnchorElement>::StartsAfter(RootNode())) { |
| 334 if (RootNode().GetDocument().InQuirksMode()) { | 334 if (RootNode().GetDocument().InQuirksMode()) { |
| 335 // Quirks mode, case insensitive comparison of names. | 335 // Quirks mode, case insensitive comparison of names. |
| 336 if (EqualIgnoringCase(anchor.GetName(), name)) | 336 if (DeprecatedEqualIgnoringCase(anchor.GetName(), name)) |
| 337 return &anchor; | 337 return &anchor; |
| 338 } else { | 338 } else { |
| 339 // Strict mode, names need to match exactly. | 339 // Strict mode, names need to match exactly. |
| 340 if (anchor.GetName() == name) | 340 if (anchor.GetName() == name) |
| 341 return &anchor; | 341 return &anchor; |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 return nullptr; | 344 return nullptr; |
| 345 } | 345 } |
| 346 | 346 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 } | 496 } |
| 497 return false; | 497 return false; |
| 498 } | 498 } |
| 499 | 499 |
| 500 Element* TreeScope::GetElementByAccessKey(const String& key) const { | 500 Element* TreeScope::GetElementByAccessKey(const String& key) const { |
| 501 if (key.IsEmpty()) | 501 if (key.IsEmpty()) |
| 502 return nullptr; | 502 return nullptr; |
| 503 Element* result = nullptr; | 503 Element* result = nullptr; |
| 504 Node& root = RootNode(); | 504 Node& root = RootNode(); |
| 505 for (Element& element : ElementTraversal::DescendantsOf(root)) { | 505 for (Element& element : ElementTraversal::DescendantsOf(root)) { |
| 506 if (EqualIgnoringCase(element.FastGetAttribute(accesskeyAttr), key)) | 506 if (DeprecatedEqualIgnoringCase(element.FastGetAttribute(accesskeyAttr), |
| 507 key)) |
| 507 result = &element; | 508 result = &element; |
| 508 for (ShadowRoot* shadow_root = element.YoungestShadowRoot(); shadow_root; | 509 for (ShadowRoot* shadow_root = element.YoungestShadowRoot(); shadow_root; |
| 509 shadow_root = shadow_root->OlderShadowRoot()) { | 510 shadow_root = shadow_root->OlderShadowRoot()) { |
| 510 if (Element* shadow_result = shadow_root->GetElementByAccessKey(key)) | 511 if (Element* shadow_result = shadow_root->GetElementByAccessKey(key)) |
| 511 result = shadow_result; | 512 result = shadow_result; |
| 512 } | 513 } |
| 513 } | 514 } |
| 514 return result; | 515 return result; |
| 515 } | 516 } |
| 516 | 517 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 535 visitor->Trace(id_target_observer_registry_); | 536 visitor->Trace(id_target_observer_registry_); |
| 536 visitor->Trace(selection_); | 537 visitor->Trace(selection_); |
| 537 visitor->Trace(elements_by_id_); | 538 visitor->Trace(elements_by_id_); |
| 538 visitor->Trace(image_maps_by_name_); | 539 visitor->Trace(image_maps_by_name_); |
| 539 visitor->Trace(scoped_style_resolver_); | 540 visitor->Trace(scoped_style_resolver_); |
| 540 visitor->Trace(radio_button_group_scope_); | 541 visitor->Trace(radio_button_group_scope_); |
| 541 visitor->Trace(svg_tree_scoped_resources_); | 542 visitor->Trace(svg_tree_scoped_resources_); |
| 542 } | 543 } |
| 543 | 544 |
| 544 } // namespace blink | 545 } // namespace blink |
| OLD | NEW |