Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 512
513 std::unique_ptr<const QualifiedName* []> attrs = 513 std::unique_ptr<const QualifiedName* []> attrs =
514 XLinkNames::getXLinkAttrs(); 514 XLinkNames::getXLinkAttrs();
515 addNamesWithPrefix(map, xlinkAtom, attrs.get(), 515 addNamesWithPrefix(map, xlinkAtom, attrs.get(),
516 XLinkNames::XLinkAttrsCount); 516 XLinkNames::XLinkAttrsCount);
517 517
518 std::unique_ptr<const QualifiedName* []> xmlAttrs = XMLNames::getXMLAttrs(); 518 std::unique_ptr<const QualifiedName* []> xmlAttrs = XMLNames::getXMLAttrs();
519 addNamesWithPrefix(map, xmlAtom, xmlAttrs.get(), XMLNames::XMLAttrsCount); 519 addNamesWithPrefix(map, xmlAtom, xmlAttrs.get(), XMLNames::XMLAttrsCount);
520 520
521 map->insert(WTF::xmlnsAtom, XMLNSNames::xmlnsAttr); 521 map->insert(WTF::xmlnsAtom, XMLNSNames::xmlnsAttr);
522 map->insert("xmlns:xlink", QualifiedName(xmlnsAtom, xlinkAtom, 522 map->insert(
523 XMLNSNames::xmlnsNamespaceURI)); 523 "xmlns:xlink",
524 QualifiedName(xmlnsAtom, xlinkAtom, XMLNSNames::xmlnsNamespaceURI));
524 } 525 }
525 526
526 for (unsigned i = 0; i < token->attributes().size(); ++i) { 527 for (unsigned i = 0; i < token->attributes().size(); ++i) {
527 Attribute& tokenAttribute = token->attributes().at(i); 528 Attribute& tokenAttribute = token->attributes().at(i);
528 const QualifiedName& name = map->get(tokenAttribute.localName()); 529 const QualifiedName& name = map->get(tokenAttribute.localName());
529 if (!name.localName().isNull()) 530 if (!name.localName().isNull())
530 tokenAttribute.parserSetName(name); 531 tokenAttribute.parserSetName(name);
531 } 532 }
532 } 533 }
533 534
(...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 token->name() == menuTag || token->name() == metaTag || 2643 token->name() == menuTag || token->name() == metaTag ||
2643 token->name() == nobrTag || token->name() == olTag || 2644 token->name() == nobrTag || token->name() == olTag ||
2644 token->name() == pTag || token->name() == preTag || 2645 token->name() == pTag || token->name() == preTag ||
2645 token->name() == rubyTag || token->name() == sTag || 2646 token->name() == rubyTag || token->name() == sTag ||
2646 token->name() == smallTag || token->name() == spanTag || 2647 token->name() == smallTag || token->name() == spanTag ||
2647 token->name() == strongTag || token->name() == strikeTag || 2648 token->name() == strongTag || token->name() == strikeTag ||
2648 token->name() == subTag || token->name() == supTag || 2649 token->name() == subTag || token->name() == supTag ||
2649 token->name() == tableTag || token->name() == ttTag || 2650 token->name() == tableTag || token->name() == ttTag ||
2650 token->name() == uTag || token->name() == ulTag || 2651 token->name() == uTag || token->name() == ulTag ||
2651 token->name() == varTag || 2652 token->name() == varTag ||
2652 (token->name() == fontTag && (token->getAttributeItem(colorAttr) || 2653 (token->name() == fontTag &&
2653 token->getAttributeItem(faceAttr) || 2654 (token->getAttributeItem(colorAttr) ||
2654 token->getAttributeItem(sizeAttr)))) { 2655 token->getAttributeItem(faceAttr) ||
2656 token->getAttributeItem(sizeAttr)))) {
2655 parseError(token); 2657 parseError(token);
2656 m_tree.openElements()->popUntilForeignContentScopeMarker(); 2658 m_tree.openElements()->popUntilForeignContentScopeMarker();
2657 processStartTag(token); 2659 processStartTag(token);
2658 return; 2660 return;
2659 } 2661 }
2660 const AtomicString& currentNamespace = 2662 const AtomicString& currentNamespace =
2661 adjustedCurrentNode->namespaceURI(); 2663 adjustedCurrentNode->namespaceURI();
2662 if (currentNamespace == MathMLNames::mathmlNamespaceURI) 2664 if (currentNamespace == MathMLNames::mathmlNamespaceURI)
2663 adjustMathMLAttributes(token); 2665 adjustMathMLAttributes(token);
2664 if (currentNamespace == SVGNames::svgNamespaceURI) { 2666 if (currentNamespace == SVGNames::svgNamespaceURI) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
2754 DEFINE_STRINGIFY(AfterFramesetMode) 2756 DEFINE_STRINGIFY(AfterFramesetMode)
2755 DEFINE_STRINGIFY(AfterAfterBodyMode) 2757 DEFINE_STRINGIFY(AfterAfterBodyMode)
2756 DEFINE_STRINGIFY(AfterAfterFramesetMode) 2758 DEFINE_STRINGIFY(AfterAfterFramesetMode)
2757 #undef DEFINE_STRINGIFY 2759 #undef DEFINE_STRINGIFY
2758 } 2760 }
2759 return "<unknown>"; 2761 return "<unknown>";
2760 } 2762 }
2761 #endif 2763 #endif
2762 2764
2763 } // namespace blink 2765 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698