WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
66321
Handle "form" attribute updates in parseMappedAttribute() instead of attributeChanged() to better match HTMLElement practices
https://bugs.webkit.org/show_bug.cgi?id=66321
Summary
Handle "form" attribute updates in parseMappedAttribute() instead of attribut...
Adam Klein
Reported
2011-08-16 11:35:22 PDT
Handle "form" attribute updates in parseMappedAttribute() instead of attributeChanged() to better match HTMLElement practices
Attachments
Patch
(4.95 KB, patch)
2011-08-16 11:38 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Patch
(12.34 KB, patch)
2011-08-17 14:05 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Patch
(12.33 KB, patch)
2011-08-17 14:07 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Patch for landing
(12.75 KB, patch)
2011-08-17 14:40 PDT
,
Adam Klein
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Adam Klein
Comment 1
2011-08-16 11:38:23 PDT
Created
attachment 104072
[details]
Patch
Adam Klein
Comment 2
2011-08-16 11:39:58 PDT
Background: I was trying to understand the implementation of WebKit's form attribute, and was confused by the fact that formAttr didn't show up in parseMappedAttribute. This change should be a no-op, but imho makes the code easier to understand.
Darin Adler
Comment 3
2011-08-17 09:44:49 PDT
Comment on
attachment 104072
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=104072&action=review
Do we have test coverage for this? I suggest removing the three things done by attributeChanged one at a time and verifying that in each case an existing regression test fails. If not, then we should add regression tests. Since the benefit level of this is low (makes the code slightly more consistent and elegant) we want to be doubly sure we are not breaking anything. I’m going to say review+ but I do not think this should go in unless we are sure we have test coverage.
> Source/WebCore/html/HTMLObjectElement.cpp:90 > + if (attr->name() == formAttr) { > + formAttributeChanged(); > + } else if (attr->name() == typeAttr) {
WebKit coding style says to not use braces around a single-line body like this one.
Adam Klein
Comment 4
2011-08-17 14:05:43 PDT
Created
attachment 104236
[details]
Patch
Adam Klein
Comment 5
2011-08-17 14:07:38 PDT
Created
attachment 104237
[details]
Patch
Adam Klein
Comment 6
2011-08-17 14:09:57 PDT
(In reply to
comment #3
)
> (From update of
attachment 104072
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=104072&action=review
> > Do we have test coverage for this? I suggest removing the three things done by attributeChanged one at a time and verifying that in each case an existing regression test fails. If not, then we should add regression tests. Since the benefit level of this is low (makes the code slightly more consistent and elegant) we want to be doubly sure we are not breaking anything.
Thanks for the suggestion! Though this looked at first glance to be covered, it turns out only one of the three things done by these attributeChanged was covered. I've added coverage for both of those.
> I’m going to say review+ but I do not think this should go in unless we are sure we have test coverage.
Thanks. Care to look again?
> > Source/WebCore/html/HTMLObjectElement.cpp:90 > > + if (attr->name() == formAttr) { > > + formAttributeChanged(); > > + } else if (attr->name() == typeAttr) { > > WebKit coding style says to not use braces around a single-line body like this one.
Fixed.
Erik Arvidsson
Comment 7
2011-08-17 14:31:02 PDT
Comment on
attachment 104237
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=104237&action=review
> LayoutTests/fast/forms/script-tests/form-attribute.js:100 > + '<object id=objectElement name=victim />';
object requires a closing tag... this works in innerHTML because it is the last element and we hit the error case.
Adam Klein
Comment 8
2011-08-17 14:40:52 PDT
Created
attachment 104249
[details]
Patch for landing
Adam Klein
Comment 9
2011-08-17 14:41:29 PDT
(In reply to
comment #7
)
> (From update of
attachment 104237
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=104237&action=review
> > > LayoutTests/fast/forms/script-tests/form-attribute.js:100 > > + '<object id=objectElement name=victim />'; > > object requires a closing tag... this works in innerHTML because it is the last element and we hit the error case.
Fixed here and in above, where this already existed in the test.
WebKit Review Bot
Comment 10
2011-08-18 03:22:15 PDT
Comment on
attachment 104249
[details]
Patch for landing Clearing flags on attachment: 104249 Committed
r93292
: <
http://trac.webkit.org/changeset/93292
>
WebKit Review Bot
Comment 11
2011-08-18 03:22:20 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug