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

Issue 14839007: Devirtualize Document class type checking (Closed)

Created:
7 years, 7 months ago by esprehn
Modified:
7 years, 7 months ago
CC:
blink-reviews, pdr, feature-media-reviews_chromium.org, Stephen Chennney, f(malita), inferno, cevans
Visibility:
Public.

Description

Devirtualize Document class type checking Document has a bunch of virtual bool is*Document() methods on it, but it also has two bools for XHTML and HTML documents which is silly. We can merge them all together into an enum of values and devirtualize the type checking methods. This patch introduces the DocumentClass enum that is used to signal what subclass of Document, or HTMLDocument, is being implemented. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=149828

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Try again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -30 lines) Patch
M Source/core/dom/Document.h View 4 chunks +22 lines, -13 lines 0 comments Download
M Source/core/dom/Document.cpp View 3 chunks +3 lines, -4 lines 0 comments Download
Source/core/html/HTMLDocument.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLDocument.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
Source/core/html/ImageDocument.h View 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/html/ImageDocument.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/MediaDocument.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/MediaDocument.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/PluginDocument.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/PluginDocument.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGDocument.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/svg/SVGDocument.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
esprehn
7 years, 7 months ago (2013-05-06 23:19:48 UTC) #1
abarth-chromium
lgtm ok
7 years, 7 months ago (2013-05-06 23:26:46 UTC) #2
eseidel
Eh. Seems OK. I'm not sure why the bools existed in the first place. Historically ...
7 years, 7 months ago (2013-05-06 23:28:30 UTC) #3
eseidel
7 years, 7 months ago (2013-05-06 23:28:41 UTC) #4
esprehn
isHTMLDocument is called in a bunch of performance critical places (ex. CSS parsing) so I ...
7 years, 7 months ago (2013-05-06 23:40:00 UTC) #5
arv (Not doing code reviews)
LGTM Does this impact performance?
7 years, 7 months ago (2013-05-06 23:59:25 UTC) #6
esprehn
On 2013/05/06 23:59:25, arv wrote: > LGTM > > Does this impact performance? The ones ...
7 years, 7 months ago (2013-05-07 00:07:08 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/14839007/3001
7 years, 7 months ago (2013-05-07 00:11:07 UTC) #8
commit-bot: I haz the power
7 years, 7 months ago (2013-05-07 00:47:00 UTC) #9
Message was sent while issue was closed.
Change committed as 149828

Powered by Google App Engine
This is Rietveld 408576698