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

Issue 202893002: Replace elementHasLegalLinkAttribute() helper with virtual function (Closed)

Created:
6 years, 9 months ago by Inactive
Modified:
6 years, 9 months ago
Reviewers:
tkent, adamk
CC:
blink-reviews, gavinp+prerender_chromium.org, sof, eae+blinkwatch, dglazkov+blink, adamk+blink_chromium.org, Inactive, rwlbuis
Visibility:
Public.

Description

Replace elementHasLegalLinkAttribute() helper with virtual function Replace elementHasLegalLinkAttribute() helper with virtual function on Element: hasLegalLinkAttribute(). elementHasLegalLinkAttribute() was a bit complex due to all the branching. Using a virtual function distributes the code to each class and results in clearer code. R=tkent, adamk Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169412

Patch Set 1 #

Total comments: 2

Patch Set 2 : Take tkent's feedback into consideration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -124 lines) Patch
M Source/core/dom/Element.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLAnchorElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLAnchorElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLAppletElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLAppletElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLBodyElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLBodyElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFormElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLFormElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFrameElementBase.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLFrameElementBase.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLInputElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLLinkElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLLinkElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLModElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLModElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLObjectElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLObjectElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLQuoteElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLQuoteElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLScriptElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLScriptElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTableCellElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLTableCellElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTableElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLTableElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTableRowElement.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTableRowElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/forms/ImageInputType.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/ImageInputType.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/forms/InputType.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/InputType.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
D Source/web/DOMUtilitiesPrivate.h View 1 chunk +0 lines, -54 lines 0 comments Download
D Source/web/DOMUtilitiesPrivate.cpp View 1 chunk +0 lines, -62 lines 0 comments Download
M Source/web/WebFrameImpl.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M Source/web/WebPageSerializerImpl.cpp View 2 chunks +1 line, -2 lines 0 comments Download
M Source/web/WebPasswordFormData.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M Source/web/web.gypi View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Inactive
Note the similarity with isURLAttribute() virtual function. I kept them separate because they give slightly ...
6 years, 9 months ago (2014-03-18 01:04:54 UTC) #1
tkent
lgtm https://codereview.chromium.org/202893002/diff/1/Source/core/html/HTMLInputElement.cpp File Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/202893002/diff/1/Source/core/html/HTMLInputElement.cpp#newcode1211 Source/core/html/HTMLInputElement.cpp:1211: return (isImageButton() && name == srcAttr) || HTMLTextFormControlElement::hasLegalLinkAttribute(name); ...
6 years, 9 months ago (2014-03-18 01:23:30 UTC) #2
Inactive
https://codereview.chromium.org/202893002/diff/1/Source/core/html/HTMLInputElement.cpp File Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/202893002/diff/1/Source/core/html/HTMLInputElement.cpp#newcode1211 Source/core/html/HTMLInputElement.cpp:1211: return (isImageButton() && name == srcAttr) || HTMLTextFormControlElement::hasLegalLinkAttribute(name); On ...
6 years, 9 months ago (2014-03-18 02:10:22 UTC) #3
tkent
lgtm. Thanks!
6 years, 9 months ago (2014-03-18 02:11:36 UTC) #4
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-18 02:12:08 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/202893002/20001
6 years, 9 months ago (2014-03-18 03:19:43 UTC) #6
commit-bot: I haz the power
6 years, 9 months ago (2014-03-18 04:26:10 UTC) #7
Message was sent while issue was closed.
Change committed as 169412

Powered by Google App Engine
This is Rietveld 408576698