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

Issue 287313003: Add toWebTextAreaElement (Closed)

Created:
6 years, 7 months ago by keishi
Modified:
6 years, 7 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, abarth-chromium
Visibility:
Public.

Description

Add toWebTextAreaElement We should check isHTMLTextAreaElement before casting. BUG=358235

Patch Set 1 #

Total comments: 4

Patch Set 2 : ../.. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -0 lines) Patch
M Source/web/WebTextAreaElement.cpp View 1 1 chunk +8 lines, -0 lines 0 comments Download
M public/web/WebTextAreaElement.h View 1 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
keishi
Chromium side: https://codereview.chromium.org/295603002/
6 years, 7 months ago (2014-05-19 05:25:19 UTC) #1
tkent
https://codereview.chromium.org/287313003/diff/1/Source/web/WebTextAreaElement.cpp File Source/web/WebTextAreaElement.cpp (right): https://codereview.chromium.org/287313003/diff/1/Source/web/WebTextAreaElement.cpp#newcode61 Source/web/WebTextAreaElement.cpp:61: if (!isHTMLTextAreaElement(*webElement->unwrap<Element>())) This will crash if webElement is nullptr. ...
6 years, 7 months ago (2014-05-19 05:29:50 UTC) #2
antmod.bom2216
6 years, 7 months ago (2014-05-19 06:05:07 UTC) #3
keishi
https://codereview.chromium.org/287313003/diff/1/Source/web/WebTextAreaElement.cpp File Source/web/WebTextAreaElement.cpp (right): https://codereview.chromium.org/287313003/diff/1/Source/web/WebTextAreaElement.cpp#newcode61 Source/web/WebTextAreaElement.cpp:61: if (!isHTMLTextAreaElement(*webElement->unwrap<Element>())) On 2014/05/19 05:29:51, tkent wrote: > This ...
6 years, 7 months ago (2014-05-19 08:24:00 UTC) #4
tkent
lgtm. toWebTextAreaElement doesn't follow Blink's common toFoo behavior. However it's acceptable because of consistency with ...
6 years, 7 months ago (2014-05-19 08:44:14 UTC) #5
Ilya Sherman
On 2014/05/19 08:44:14, tkent wrote: > lgtm. > > toWebTextAreaElement doesn't follow Blink's common toFoo ...
6 years, 7 months ago (2014-05-19 08:45:17 UTC) #6
tkent
On 2014/05/19 08:45:17, Ilya Sherman wrote: > > toWebTextAreaElement doesn't follow Blink's common toFoo behavior. ...
6 years, 7 months ago (2014-05-19 08:55:50 UTC) #7
Ilya Sherman
6 years, 7 months ago (2014-05-19 09:15:14 UTC) #8
On 2014/05/19 08:55:50, tkent wrote:
> On 2014/05/19 08:45:17, Ilya Sherman wrote:
> > > toWebTextAreaElement doesn't follow Blink's common toFoo behavior. 
However
> > it's
> > > acceptable because of consistency with toWebInputElement.
> > 
> > What is the common toFoo behavior in Blink?  Perhaps it would make sense to
> > update toWebInputElement to match?
> 
> In Blink, toFoo function should be a wrapper of static_cast<Foo*> with
> ASSERT_WITH_SECURITY_IMPLICATION.
> The assertion fails if the specified pointer is neither Foo* nor nullptr.
> http://src.chromium.org/viewvc/blink/trunk/Source/wtf/Assertions.h#l367

Ah.  I guess that's semantically different from what we're trying to express,
since we don't know whether the field is a textarea or not.  Is there an isFoo
concept in Blink?

Powered by Google App Engine
This is Rietveld 408576698