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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2723053002: Use the correct case converter for |localName| and |tagName| (Closed)
Patch Set: Oops... Created 3 years, 9 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 688
689 Element* Document::rootScroller() const { 689 Element* Document::rootScroller() const {
690 return m_rootScrollerController->get(); 690 return m_rootScrollerController->get();
691 } 691 }
692 692
693 bool Document::isInMainFrame() const { 693 bool Document::isInMainFrame() const {
694 return frame() && frame()->isMainFrame(); 694 return frame() && frame()->isMainFrame();
695 } 695 }
696 696
697 AtomicString Document::convertLocalName(const AtomicString& name) { 697 AtomicString Document::convertLocalName(const AtomicString& name) {
698 return isHTMLDocument() ? name.lower() : name; 698 return isHTMLDocument() ? name.lowerASCII() : name;
699 } 699 }
700 700
701 // https://dom.spec.whatwg.org/#dom-document-createelement 701 // https://dom.spec.whatwg.org/#dom-document-createelement
702 Element* Document::createElement(const AtomicString& name, 702 Element* Document::createElement(const AtomicString& name,
703 ExceptionState& exceptionState) { 703 ExceptionState& exceptionState) {
704 if (!isValidName(name)) { 704 if (!isValidName(name)) {
705 exceptionState.throwDOMException( 705 exceptionState.throwDOMException(
706 InvalidCharacterError, 706 InvalidCharacterError,
707 "The tag name provided ('" + name + "') is not a valid name."); 707 "The tag name provided ('" + name + "') is not a valid name.");
708 return nullptr; 708 return nullptr;
(...skipping 5953 matching lines...) Expand 10 before | Expand all | Expand 10 after
6662 } 6662 }
6663 6663
6664 void showLiveDocumentInstances() { 6664 void showLiveDocumentInstances() {
6665 WeakDocumentSet& set = liveDocumentSet(); 6665 WeakDocumentSet& set = liveDocumentSet();
6666 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6666 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6667 for (blink::Document* document : set) 6667 for (blink::Document* document : set)
6668 fprintf(stderr, "- Document %p URL: %s\n", document, 6668 fprintf(stderr, "- Document %p URL: %s\n", document,
6669 document->url().getString().utf8().data()); 6669 document->url().getString().utf8().data());
6670 } 6670 }
6671 #endif 6671 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698