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

Side by Side Diff: Source/core/html/HTMLElement.cpp

Issue 327133002: Intorudce DECLARE/DEFINE_ELEMENT_FACTORY_WITH_TAGNAME macros. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a duplicated symbol issue Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/HTMLHeadingElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "wtf/text/CString.h" 56 #include "wtf/text/CString.h"
57 57
58 namespace WebCore { 58 namespace WebCore {
59 59
60 using namespace HTMLNames; 60 using namespace HTMLNames;
61 using namespace WTF; 61 using namespace WTF;
62 62
63 using std::min; 63 using std::min;
64 using std::max; 64 using std::max;
65 65
66 PassRefPtrWillBeRawPtr<HTMLElement> HTMLElement::create(const QualifiedName& tag Name, Document& document) 66 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLElement);
67 {
68 return adoptRefWillBeRefCountedGarbageCollected(new HTMLElement(tagName, doc ument));
69 }
70 67
71 String HTMLElement::nodeName() const 68 String HTMLElement::nodeName() const
72 { 69 {
73 // FIXME: Would be nice to have an atomicstring lookup based off uppercase 70 // FIXME: Would be nice to have an atomicstring lookup based off uppercase
74 // chars that does not have to copy the string on a hit in the hash. 71 // chars that does not have to copy the string on a hit in the hash.
75 // FIXME: We should have a way to detect XHTML elements and replace the hasP refix() check with it. 72 // FIXME: We should have a way to detect XHTML elements and replace the hasP refix() check with it.
76 if (document().isHTMLDocument()) { 73 if (document().isHTMLDocument()) {
77 if (!tagQName().hasPrefix()) 74 if (!tagQName().hasPrefix())
78 return tagQName().localNameUpper(); 75 return tagQName().localNameUpper();
79 return Element::nodeName().upper(); 76 return Element::nodeName().upper();
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 #ifndef NDEBUG 958 #ifndef NDEBUG
962 959
963 // For use in the debugger 960 // For use in the debugger
964 void dumpInnerHTML(WebCore::HTMLElement*); 961 void dumpInnerHTML(WebCore::HTMLElement*);
965 962
966 void dumpInnerHTML(WebCore::HTMLElement* element) 963 void dumpInnerHTML(WebCore::HTMLElement* element)
967 { 964 {
968 printf("%s\n", element->innerHTML().ascii().data()); 965 printf("%s\n", element->innerHTML().ascii().data());
969 } 966 }
970 #endif 967 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/HTMLHeadingElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698