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

Issue 406843002: Optimize hasTagName when called on an HTMLElement / SVGElement (Closed)

Created:
6 years, 5 months ago by Inactive
Modified:
6 years, 5 months ago
CC:
abarth-chromium, blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-rendering, dglazkov+blink, krit, eae+blinkwatch, ed+blinkwatch_opera.com, eric.carlson_apple.com, feature-media-reviews_chromium.org, f(malita), fs, gasubic, gyuyoung.kim_webkit.org, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr., philipj_slow, rwlbuis, rune+blink, Stephen Chennney, sof, nessy, vcarbune.chromium, zoltan1
Project:
blink
Visibility:
Public.

Description

Optimize hasTagName when called on an HTMLElement / SVGElement This CL adds new hasTagName() functions that have the efficiency of hasLocalName(), but are safe. We can always use hasTagName(), and we'll get a compile time error if we try to use an SVG tag name with an HTML element. This makes the code safer and no longer requires good understanding of hasTagName() vs hasLocalName() to write efficient code. This CL drops support for hasLocalName(QualifiedName) as calling hasTagName() is now as efficient. This is based on WebKit r165699 by darin@apple.com: http://trac.webkit.org/changeset/165699 R=esprehn@chromium.org, adamk@chromium.org, eseidel@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178540

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -241 lines) Patch
M Source/build/scripts/templates/ElementTypeHelpers.h.tmpl View 2 chunks +7 lines, -23 lines 0 comments Download
M Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl View 1 chunk +4 lines, -4 lines 0 comments Download
M Source/build/scripts/templates/MakeQualifiedNames.h.tmpl View 3 chunks +5 lines, -2 lines 0 comments Download
M Source/core/dom/Element.h View 4 chunks +9 lines, -6 lines 0 comments Download
M Source/core/dom/ElementTraversal.h View 1 chunk +24 lines, -24 lines 0 comments Download
M Source/core/dom/Node.h View 4 chunks +5 lines, -1 line 0 comments Download
M Source/core/editing/ApplyStyleCommand.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/editing/InsertListCommand.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/InsertListCommand.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/editing/markup.cpp View 1 chunk +4 lines, -3 lines 0 comments Download
M Source/core/html/HTMLCollection.cpp View 4 chunks +57 lines, -57 lines 0 comments Download
M Source/core/html/HTMLElement.h View 4 chunks +10 lines, -4 lines 0 comments Download
M Source/core/html/HTMLElement.cpp View 6 chunks +37 lines, -29 lines 0 comments Download
M Source/core/html/HTMLFrameElementBase.h View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/html/HTMLMediaElement.h View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/html/HTMLPlugInElement.h View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/html/HTMLTableCellElement.h View 1 chunk +1 line, -6 lines 0 comments Download
M Source/core/html/HTMLTableCellElement.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLTableColElement.h View 1 chunk +1 line, -6 lines 0 comments Download
M Source/core/html/HTMLTableColElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLTableRowsCollection.cpp View 5 chunks +15 lines, -23 lines 0 comments Download
M Source/core/html/HTMLTableSectionElement.h View 1 chunk +1 line, -6 lines 0 comments Download
M Source/core/html/HTMLUnknownElement.h View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/html/LabelableElement.h View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/html/parser/HTMLTreeBuilder.cpp View 3 chunks +4 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderObject.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/compositing/CompositedLayerMapping.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGElement.h View 5 chunks +14 lines, -3 lines 0 comments Download
M Source/core/xml/parser/XMLDocumentParser.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/web/WebSearchableFormData.cpp View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Inactive
6 years, 5 months ago (2014-07-20 20:45:23 UTC) #1
abarth-chromium
lgtm
6 years, 5 months ago (2014-07-21 06:10:48 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/406843002/1
6 years, 5 months ago (2014-07-21 06:11:08 UTC) #3
commit-bot: I haz the power
6 years, 5 months ago (2014-07-21 07:19:17 UTC) #4
Message was sent while issue was closed.
Change committed as 178540

Powered by Google App Engine
This is Rietveld 408576698