Closed Bug 1275450 Opened 4 years ago Closed 4 years ago

reftest for a empty size mask-image

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: u459114, Assigned: u459114)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

css-masking spec[1] said:
A mask reference that is an empty image (zero width or zero height), that fails to download, is not a reference to an mask element, is non-existent, or that cannot be displayed (e.g. because it is not in a supported image format) still counts as an image layer of transparent black.

Have a test case to verify this logic

[1] https://drafts.fxtf.org/css-masking-1/
Comment on attachment 8757784 [details]
MozReview Request: Bug 1275450 - Part 1. Generate a transparent black mask layer when there is no resolvable mask source or image

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56206/diff/1-2/
Attachment #8757784 - Attachment description: MozReview Request: Bug 1275450 - Part 1. Generate transparent black mask layer when a mask-image refers to unresolvable url → MozReview Request: Bug 1275450 - Part 1. Generate a transparent black mask layer when there is no resolvable mask source or image
Attachment #8757785 - Attachment description: MozReview Request: Bug 1275450 - Part 2. Reftest for unresolvable mask-image URL → MozReview Request: Bug 1275450 - Part 2. Reftest for unresolvable mask-reference
Comment on attachment 8757785 [details]
MozReview Request: Bug 1275450 - Part 2. Reftest for unresolvable mask-reference

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56208/diff/1-2/
Comment on attachment 8757785 [details]
MozReview Request: Bug 1275450 - Part 2. Reftest for unresolvable mask-reference

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56208/diff/2-3/
Attachment #8757784 - Flags: review?(mstange)
Attachment #8757785 - Flags: review?(mstange)
Assignee: nobody → cku
Duplicate of this bug: 1250421
Blocks: mask-image
Comment on attachment 8757785 [details]
MozReview Request: Bug 1275450 - Part 2. Reftest for unresolvable mask-reference

https://reviewboard.mozilla.org/r/56208/#review52948

Can you also add tests with multiple layers and different composite modes?

::: layout/reftests/w3c-css/submitted/masking/mask-image-4a.html:5
(Diff revision 4)
> +<!DOCTYPE html>
> +<html>
> +  <head>
> +    <meta charset="utf-8">
> +    <title>CSS Masking: mask-image: unresovlabe mask url</title>

typo in the word "unresolvable"
Attachment #8757785 - Flags: review?(mstange) → review+
Comment on attachment 8757784 [details]
MozReview Request: Bug 1275450 - Part 1. Generate a transparent black mask layer when there is no resolvable mask source or image

https://reviewboard.mozilla.org/r/56206/#review52950

::: layout/svg/nsSVGIntegrationUtils.cpp:613
(Diff revision 3)
> +  // Always create a mask surface when we have any item in maskFrame even if
> +  // all of those items are non-resolvable <mask-sources> or <images>.
> +  // According to css-masking spec, we still need to create a transparent
> +  // black mask layer under this condition.

Well, we need to behave "as if" we created a transparent black mask layer. If we can find out that the result will be "draw nothing", we can just draw nothing instead of having an empty mask surface.
Attachment #8757784 - Flags: review?(mstange) → review+
Comment on attachment 8757784 [details]
MozReview Request: Bug 1275450 - Part 1. Generate a transparent black mask layer when there is no resolvable mask source or image

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56206/diff/3-4/
Comment on attachment 8757785 [details]
MozReview Request: Bug 1275450 - Part 2. Reftest for unresolvable mask-reference

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56208/diff/4-5/
Comment on attachment 8757784 [details]
MozReview Request: Bug 1275450 - Part 1. Generate a transparent black mask layer when there is no resolvable mask source or image

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56206/diff/4-5/
Comment on attachment 8757785 [details]
MozReview Request: Bug 1275450 - Part 2. Reftest for unresolvable mask-reference

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56208/diff/5-6/
Pushed by cku@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/619441944e8a
Part 1. Generate a transparent black mask layer when there is no resolvable mask source or image r=mstange
https://hg.mozilla.org/integration/mozilla-inbound/rev/5abd097ad9e0
Part 2. Reftest for unresolvable mask-reference r=mstange
https://hg.mozilla.org/mozilla-central/rev/619441944e8a
https://hg.mozilla.org/mozilla-central/rev/5abd097ad9e0
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Depends on: 1293929
You need to log in before you can comment on or make changes to this bug.