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

Side by Side Diff: WebCore/html/HTMLElement.cpp

Issue 28077: WebKit side of merge from r41149 to r41181. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/WebKit/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « WebCore/html/HTMLElement.h ('k') | WebCore/inspector/InspectorController.cpp » ('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 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return 3; 89 return 3;
90 if (hasLocalName(centerTag) || hasLocalName(nobrTag)) 90 if (hasLocalName(centerTag) || hasLocalName(nobrTag))
91 return 5; 91 return 5;
92 if (hasLocalName(noembedTag) || hasLocalName(noframesTag)) 92 if (hasLocalName(noembedTag) || hasLocalName(noframesTag))
93 return 10; 93 return 10;
94 94
95 // Same values as <span>. This way custom tag name elements will behave lik e inline spans. 95 // Same values as <span>. This way custom tag name elements will behave lik e inline spans.
96 return 1; 96 return 1;
97 } 97 }
98 98
99 PassRefPtr<Node> HTMLElement::cloneNode(bool deep)
100 {
101 RefPtr<HTMLElement> clone = HTMLElementFactory::createHTMLElement(tagQName() , document(), 0, false);
102 if (!clone)
103 return 0;
104
105 if (namedAttrMap)
106 clone->attributes()->setAttributes(*namedAttrMap);
107
108 clone->copyNonAttributeProperties(this);
109
110 if (deep)
111 cloneChildNodes(clone.get());
112
113 return clone.release();
114 }
115
116 bool HTMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry & result) const 99 bool HTMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry & result) const
117 { 100 {
118 if (attrName == alignAttr || 101 if (attrName == alignAttr ||
119 attrName == contenteditableAttr) { 102 attrName == contenteditableAttr) {
120 result = eUniversal; 103 result = eUniversal;
121 return false; 104 return false;
122 } 105 }
123 if (attrName == dirAttr) { 106 if (attrName == dirAttr) {
124 result = hasLocalName(bdoTag) ? eBDO : eUniversal; 107 result = hasLocalName(bdoTag) ? eBDO : eUniversal;
125 return false; 108 return false;
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 // For use in the debugger 1002 // For use in the debugger
1020 void dumpInnerHTML(WebCore::HTMLElement*); 1003 void dumpInnerHTML(WebCore::HTMLElement*);
1021 1004
1022 void dumpInnerHTML(WebCore::HTMLElement* element) 1005 void dumpInnerHTML(WebCore::HTMLElement* element)
1023 { 1006 {
1024 printf("%s\n", element->innerHTML().ascii().data()); 1007 printf("%s\n", element->innerHTML().ascii().data());
1025 } 1008 }
1026 #endif 1009 #endif
1027 1010
1028 1011
OLDNEW
« no previous file with comments | « WebCore/html/HTMLElement.h ('k') | WebCore/inspector/InspectorController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698