WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
47746
Respect charset in handleDataURL
https://bugs.webkit.org/show_bug.cgi?id=47746
Summary
Respect charset in handleDataURL
Kwang Yul Seo
Reported
2010-10-15 15:50:43 PDT
We must use TextEncoding(charset) to encode data URL again. Otherwise TextEncoding::encode() returns an empty string because encoding name is not specified. Also use "US-ASCII" as fallback charset as extractCharsetFromMediaType can be empty.
Attachments
Patch
(2.15 KB, patch)
2010-10-15 15:52 PDT
,
Kwang Yul Seo
no flags
Details
Formatted Diff
Diff
Patch
(2.38 KB, patch)
2010-11-27 17:29 PST
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Patch
(2.64 KB, patch)
2010-12-27 07:46 PST
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kwang Yul Seo
Comment 1
2010-10-15 15:52:48 PDT
Created
attachment 70909
[details]
Patch
Darin Adler
Comment 2
2010-10-15 15:54:59 PDT
Comment on
attachment 70909
[details]
Patch Is there a regression test that covers this? If so, where is the patch to the expected results to show the progression?
Kwang Yul Seo
Comment 3
2010-10-15 15:56:03 PDT
(In reply to
comment #2
)
> (From update of
attachment 70909
[details]
) > Is there a regression test that covers this? If so, where is the patch to the expected results to show the progression?
We need this patch to pass Acid 3 test 97 (data URL).
Kwang Yul Seo
Comment 4
2010-10-15 15:59:06 PDT
(In reply to
comment #2
)
> (From update of
attachment 70909
[details]
) > Is there a regression test that covers this? If so, where is the patch to the expected results to show the progression?
r69183
passed all LayoutTests. I think we need to add a new test case for this.
Kwang Yul Seo
Comment 5
2010-10-15 16:00:05 PDT
Adding Patrick to CC.
Patrick R. Gansterer
Comment 6
2010-11-27 17:29:19 PST
Created
attachment 74968
[details]
Patch I added an additonal change to the patch (we don't need to declare the default charset twice). (In reply to
comment #2
)
> (From update of
attachment 70909
[details]
) > Is there a regression test that covers this? If so, where is the patch to the expected results to show the progression?
The reason for this is, that none of the current ports with a buildbot uses this functionality. I've run the GTK LayoutTests on the patch which introduced DataURL.cpp. I thought GTK uses the curl backend, but this was wrong and so I didn't see the regression :-(. I did a small test and changed a port with LayoutTests to use DataURL.cpp: This patch fixed over 130 layout tests. So I don't think that we need additional tests. We only need to run the existing ones.
Patrick R. Gansterer
Comment 7
2010-11-30 01:52:57 PST
@darin: ping
Eric Seidel (no email)
Comment 8
2010-12-13 00:37:19 PST
Comment on
attachment 74968
[details]
Patch The ChangeLog needs to mention that this fixes 130 layout tests, and for which port. Otherwise the change looks fine. (Every change requires a test, or explanation of why testing is impossible.) In this case, you have many tests, you just didn't explain that you're fixing them (which is importnat both for reviewers and folks looking back through teh svn history).
Patrick R. Gansterer
Comment 9
2010-12-27 07:46:15 PST
Created
attachment 77507
[details]
Patch
Eric Seidel (no email)
Comment 10
2011-01-06 12:39:16 PST
Comment on
attachment 77507
[details]
Patch What do other ports do when extractCharsetFromMediaType returns empty? Do they already assume ASCII? If so, how? Seems like it should be possible to write a test for this which would fail on other ports as well, no?
Adam Barth
Comment 11
2011-04-26 15:30:05 PDT
Comment on
attachment 77507
[details]
Patch 130! Wow!
Adam Barth
Comment 12
2011-04-26 15:30:28 PDT
> Seems like it should be possible to write a test for this which would fail on other ports as well, no?
Not very many folks use this file.
WebKit Commit Bot
Comment 13
2011-04-26 16:26:18 PDT
Comment on
attachment 77507
[details]
Patch Clearing flags on attachment: 77507 Committed
r84976
: <
http://trac.webkit.org/changeset/84976
>
WebKit Commit Bot
Comment 14
2011-04-26 16:26:23 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