WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
133336
Ignore usemap attributes without '#' in img element
https://bugs.webkit.org/show_bug.cgi?id=133336
Summary
Ignore usemap attributes without '#' in img element
Jinwoo Song
Reported
2014-05-27 21:30:03 PDT
HTML5 specification says we should ignore usemap attributes without #.
http://www.w3.org/TR/html5/infrastructure.html#valid-hash-name-reference
Attachments
Patch
(4.36 KB, patch)
2014-05-27 21:31 PDT
,
Jinwoo Song
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion
(497.81 KB, application/zip)
2014-05-27 22:54 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
(498.80 KB, application/zip)
2014-05-27 23:57 PDT
,
Build Bot
no flags
Details
Patch
(4.31 KB, patch)
2014-05-28 00:03 PDT
,
Jinwoo Song
no flags
Details
Formatted Diff
Diff
Patch
(4.31 KB, patch)
2014-05-28 00:48 PDT
,
Jinwoo Song
no flags
Details
Formatted Diff
Diff
Patch
(5.52 KB, patch)
2014-06-01 23:22 PDT
,
Jinwoo Song
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Jinwoo Song
Comment 1
2014-05-27 21:31:40 PDT
Created
attachment 232166
[details]
Patch
Build Bot
Comment 2
2014-05-27 22:54:25 PDT
Comment on
attachment 232166
[details]
Patch
Attachment 232166
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/5169700786929664
New failing tests: fast/images/image-map-multiple-xhtml.xhtml
Build Bot
Comment 3
2014-05-27 22:54:28 PDT
Created
attachment 232171
[details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 4
2014-05-27 23:56:59 PDT
Comment on
attachment 232166
[details]
Patch
Attachment 232166
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/4660278742482944
New failing tests: fast/images/image-map-multiple-xhtml.xhtml
Build Bot
Comment 5
2014-05-27 23:57:04 PDT
Created
attachment 232174
[details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Jinwoo Song
Comment 6
2014-05-28 00:03:13 PDT
Created
attachment 232175
[details]
Patch
Jinwoo Song
Comment 7
2014-05-28 00:48:40 PDT
Created
attachment 232176
[details]
Patch
Ryosuke Niwa
Comment 8
2014-05-28 18:25:01 PDT
Comment on
attachment 232176
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=232176&action=review
> Source/WebCore/dom/TreeScope.cpp:210 > + if (m_rootNode.document().isHTMLDocument() && hashPos == notFound) > + return nullptr;
What do other browsers do? I'm very afraid that this is not a backwards compatible change.
Jinwoo Song
Comment 9
2014-05-28 18:33:11 PDT
Comment on
attachment 232176
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=232176&action=review
>> Source/WebCore/dom/TreeScope.cpp:210 >> + return nullptr; > > What do other browsers do? I'm very afraid that this is not a backwards compatible change.
FireFox and IE.10 does not support usemap attribute if it has not '#'. Blink works as WebKit as of now.
Darin Adler
Comment 10
2014-05-30 11:58:19 PDT
Comment on
attachment 232176
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=232176&action=review
>>> Source/WebCore/dom/TreeScope.cpp:210 >>> + return nullptr; >> >> What do other browsers do? I'm very afraid that this is not a backwards compatible change. > > FireFox and IE.10 does not support usemap attribute if it has not '#'. Blink works as WebKit as of now.
Why specific to HTML documents? That part seems wrong to me.
> Source/WebCore/dom/TreeScope.cpp:211 > String name = (hashPos == notFound ? url : url.substring(hashPos + 1)).impl();
If we’re exiting when hashPos is notFound, then we should be removing the ? : expression here.
Darin Adler
Comment 11
2014-05-30 11:59:14 PDT
Comment on
attachment 232176
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=232176&action=review
>>>> Source/WebCore/dom/TreeScope.cpp:210 >>>> + return nullptr; >>> >>> What do other browsers do? I'm very afraid that this is not a backwards compatible change. >> >> FireFox and IE.10 does not support usemap attribute if it has not '#'. Blink works as WebKit as of now. > > Why specific to HTML documents? That part seems wrong to me.
Given the many years of support for this in WebKit, it’s likely that some WebKit-specific content is accidentally depending on the old behavior. We’ll have to find some way of researching that question.
Jinwoo Song
Comment 12
2014-06-01 23:22:05 PDT
Created
attachment 232368
[details]
Patch Applied Darin's comments.
Jinwoo Song
Comment 13
2014-06-01 23:24:33 PDT
Comment on
attachment 232176
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=232176&action=review
>> Source/WebCore/dom/TreeScope.cpp:211 >> String name = (hashPos == notFound ? url : url.substring(hashPos + 1)).impl(); > > If we’re exiting when hashPos is notFound, then we should be removing the ? : expression here.
I also agree that we need a way to handle this kind of issues. Specially, if there it is impossible to provide the legacy behavior like this, how can we apply the latest spec to the implementation?
Ryosuke Niwa
Comment 14
2014-08-19 04:13:54 PDT
r=me if we believe websites don't rely on this feature.
WebKit Commit Bot
Comment 15
2014-08-19 21:32:27 PDT
Comment on
attachment 232368
[details]
Patch Clearing flags on attachment: 232368 Committed
r172796
: <
http://trac.webkit.org/changeset/172796
>
WebKit Commit Bot
Comment 16
2014-08-19 21:32:32 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