| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011, 2014 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2014 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 473 |
| 474 template <std::unique_ptr<const QualifiedName* []> getAttrs(), unsigned length> | 474 template <std::unique_ptr<const QualifiedName* []> getAttrs(), unsigned length> |
| 475 static void adjustAttributes(AtomicHTMLToken* token) { | 475 static void adjustAttributes(AtomicHTMLToken* token) { |
| 476 static PrefixedNameToQualifiedNameMap* caseMap = 0; | 476 static PrefixedNameToQualifiedNameMap* caseMap = 0; |
| 477 if (!caseMap) { | 477 if (!caseMap) { |
| 478 caseMap = new PrefixedNameToQualifiedNameMap; | 478 caseMap = new PrefixedNameToQualifiedNameMap; |
| 479 std::unique_ptr<const QualifiedName* []> attrs = getAttrs(); | 479 std::unique_ptr<const QualifiedName* []> attrs = getAttrs(); |
| 480 mapLoweredLocalNameToName(caseMap, attrs.get(), length); | 480 mapLoweredLocalNameToName(caseMap, attrs.get(), length); |
| 481 } | 481 } |
| 482 | 482 |
| 483 for (unsigned i = 0; i < token->attributes().size(); ++i) { | 483 for (auto& tokenAttribute : token->attributes()) { |
| 484 Attribute& tokenAttribute = token->attributes().at(i); | |
| 485 const QualifiedName& casedName = caseMap->get(tokenAttribute.localName()); | 484 const QualifiedName& casedName = caseMap->get(tokenAttribute.localName()); |
| 486 if (!casedName.localName().isNull()) | 485 if (!casedName.localName().isNull()) |
| 487 tokenAttribute.parserSetName(casedName); | 486 tokenAttribute.parserSetName(casedName); |
| 488 } | 487 } |
| 489 } | 488 } |
| 490 | 489 |
| 491 static void adjustSVGAttributes(AtomicHTMLToken* token) { | 490 static void adjustSVGAttributes(AtomicHTMLToken* token) { |
| 492 adjustAttributes<SVGNames::getSVGAttrs, SVGNames::SVGAttrsCount>(token); | 491 adjustAttributes<SVGNames::getSVGAttrs, SVGNames::SVGAttrsCount>(token); |
| 493 } | 492 } |
| 494 | 493 |
| (...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2755 DEFINE_STRINGIFY(AfterFramesetMode) | 2754 DEFINE_STRINGIFY(AfterFramesetMode) |
| 2756 DEFINE_STRINGIFY(AfterAfterBodyMode) | 2755 DEFINE_STRINGIFY(AfterAfterBodyMode) |
| 2757 DEFINE_STRINGIFY(AfterAfterFramesetMode) | 2756 DEFINE_STRINGIFY(AfterAfterFramesetMode) |
| 2758 #undef DEFINE_STRINGIFY | 2757 #undef DEFINE_STRINGIFY |
| 2759 } | 2758 } |
| 2760 return "<unknown>"; | 2759 return "<unknown>"; |
| 2761 } | 2760 } |
| 2762 #endif | 2761 #endif |
| 2763 | 2762 |
| 2764 } // namespace blink | 2763 } // namespace blink |
| OLD | NEW |