Bug 141857 - REGRESSION (r177494): -webkit-mask-image: with data URI fails on non-local files
Summary: REGRESSION (r177494): -webkit-mask-image: with data URI fails on non-local files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-02-20 16:18 PST by Simon Fraser (smfr)
Modified: 2015-04-20 23:48 PDT (History)
9 users (show)

See Also:


Attachments
Testcase (3.50 KB, text/html)
2015-02-20 16:18 PST, Simon Fraser (smfr)
no flags Details
provisional patch, needs test (2.83 KB, patch)
2015-02-23 10:58 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (5.27 KB, patch)
2015-04-20 15:45 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2015-02-20 16:18:31 PST
Created attachment 247007 [details]
Testcase

r177494 broke -webkit-mask-image: with data URIs for non-local files.
Comment 1 Simon Fraser (smfr) 2015-02-20 16:20:15 PST
rdar://problem/19738198
Comment 2 Dirk Schulze 2015-02-20 20:41:27 PST
(In reply to comment #0)
> Created attachment 247007 [details]
> Testcase
> 
> r177494 broke -webkit-mask-image: with data URIs for non-local files.

What do you mean with "for non-local"? I know that we added tests to confirm that data URIs are not broken. Did you break down the issue to r177494?

Question to the test, does masking itself not work or is the image not loaded correctly? If I interpret the test correctly then the former.
Comment 3 Simon Fraser (smfr) 2015-02-23 10:34:19 PST
(In reply to comment #2)
> (In reply to comment #0)
> > Created attachment 247007 [details]
> > Testcase
> > 
> > r177494 broke -webkit-mask-image: with data URIs for non-local files.
> What do you mean with "for non-local"?

We don't do same-origin testing for file: urls, so to see the bug you have to load from an http(s) url.

> I know that we added tests to confirm
> that data URIs are not broken. Did you break down the issue to r177494?

Yes, it was blamed to that revision.

> Question to the test, does masking itself not work or is the image not
> loaded correctly? If I interpret the test correctly then the former.

The masking doesn't work (second square with little arrows is missing in a nightly).
Comment 4 Simon Fraser (smfr) 2015-02-23 10:58:50 PST
Created attachment 247128 [details]
provisional patch, needs test
Comment 5 WebKit Commit Bot 2015-02-23 11:00:32 PST
Attachment 247128 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Dirk Schulze 2015-02-24 13:48:29 PST
Comment on attachment 247128 [details]
provisional patch, needs test

View in context: https://bugs.webkit.org/attachment.cgi?id=247128&action=review

> Source/WebCore/css/CSSParser.cpp:9584
> +        if (protocolIs(value->string, "data"))

I need to ask Radu here as well, but is special casing "data" going to be future proof? Are there other things to consider?
Comment 7 Simon Fraser (smfr) 2015-02-28 13:36:41 PST
Dirk, any update?
Comment 8 Radu Stavila 2015-03-06 06:24:41 PST
Comment on attachment 247128 [details]
provisional patch, needs test

View in context: https://bugs.webkit.org/attachment.cgi?id=247128&action=review

I think this should be ok. Thanks for taking care of this, Simon.

> Source/WebCore/css/CSSParser.cpp:9587
> +            resourceValue = CSSPrimitiveValue::create(completeURL(value->string));

This might also need the CSSPrimitiveValue::CSS_URI second parameter.
Comment 9 Simon Fraser (smfr) 2015-04-20 15:08:36 PDT
This also broke mobile twitter:
https://mobile.twitter.com/Paul2eD/status/580757901377048577
Comment 10 Simon Fraser (smfr) 2015-04-20 15:45:58 PDT
Created attachment 251196 [details]
Patch
Comment 11 Dirk Schulze 2015-04-20 22:59:51 PDT
Comment on attachment 251196 [details]
Patch

LGTM
Comment 12 WebKit Commit Bot 2015-04-20 23:48:21 PDT
Comment on attachment 251196 [details]
Patch

Clearing flags on attachment: 251196

Committed r183053: <http://trac.webkit.org/changeset/183053>
Comment 13 WebKit Commit Bot 2015-04-20 23:48:26 PDT
All reviewed patches have been landed.  Closing bug.