Closed
Bug 1042411
Opened 11 years ago
Closed 11 years ago
"ASSERTION: It is assumed the initial operator is OPERATOR_OVER, when it is restored later"
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: jruderman, Assigned: cabanier)
References
Details
(Keywords: assertion, testcase)
Attachments
(3 files, 6 obsolete files)
###!!! ASSERTION: It is assumed the initial operator is OPERATOR_OVER, when it is restored later: 'ctx->CurrentOperator() == gfxContext::OPERATOR_OVER', file layout/base/nsCSSRendering.cpp, line 2838
The testcase uses the "background-blend-mode" CSS property, which was added in bug 841601 and enabled in bug 970600.
Reporter | ||
Comment 1•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → cabanier
Assignee | ||
Comment 2•11 years ago
|
||
I'm unsure how to write a test for this. Are asserts logged as part of testing?
Attachment #8462750 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8462750 -
Flags: review?(roc)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8462750 -
Attachment is obsolete: true
Attachment #8462787 -
Flags: review?(roc)
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8462787 -
Flags: review?(roc)
Assignee | ||
Comment 5•11 years ago
|
||
removed debug code + extra tabs
Attachment #8462787 -
Attachment is obsolete: true
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8462790 -
Attachment is obsolete: true
Attachment #8462791 -
Flags: review?(roc)
Comment on attachment 8462791 [details] [diff] [review]
Fix that isolates moz-element drawing + test
Review of attachment 8462791 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/nsCSSRendering.cpp
@@ +4785,5 @@
>
> + gfxContext* ctx = aRenderingContext.ThebesContext();
> + gfxContext::GraphicsOperator op = ctx->CurrentOperator();
> + if (op != gfxContext::OPERATOR_OVER) {
> + ctx->PushGroup(gfxContentType::COLOR);
This needs to be COLOR_ALPHA.
@@ +4795,5 @@
> filter, aDest, aFill, aAnchor, aDirtyRect,
> ConvertImageRendererToDrawFlags(mFlags));
> +
> + if (op != gfxContext::OPERATOR_OVER) {
> + ctx->PopGroupToSource();
Er, don't you need to call ctx->Paint() here?
Your test should have caught these bugs... The problem is probably that your -moz-element reference doesn't paint anything!
Attachment #8462791 -
Flags: review?(roc) → review-
Reporter | ||
Comment 8•11 years ago
|
||
> I'm unsure how to write a test for this. Are asserts logged as part of testing?
Yes, most of our test suites (including reftest) count asserts and fail unless the test is annotated as expecting that number of asserts. I see that you made a reftest pair to ensure the correct behavior, which is even better.
Assignee | ||
Comment 9•11 years ago
|
||
You're right. The "paint" call was needed.
I updated the code and the test so it draws something.
try build: https://tbpl.mozilla.org/?tree=Try&rev=b3fc9c6293dd
Attachment #8462791 -
Attachment is obsolete: true
Attachment #8463213 -
Flags: review?(roc)
Comment on attachment 8463213 [details] [diff] [review]
Fix that isolates moz-element drawing + test
Review of attachment 8463213 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/nsCSSRendering.cpp
@@ +4785,5 @@
>
> + gfxContext* ctx = aRenderingContext.ThebesContext();
> + gfxContext::GraphicsOperator op = ctx->CurrentOperator();
> + if (op != gfxContext::OPERATOR_OVER) {
> + ctx->PushGroup(gfxContentType::COLOR);
This should be COLOR_ALPHA. Your test should test something that isn't fully opaque.
Attachment #8463213 -
Flags: review?(roc) → review-
Assignee | ||
Comment 11•11 years ago
|
||
I was wondering what that parameter did. I couldn't find documentation so picked the API that sounded right.
Update code + made test transparent + verified that the test was broken without the fix
try run: https://tbpl.mozilla.org/?tree=Try&rev=2ccbf0faea91
Attachment #8463213 -
Attachment is obsolete: true
Attachment #8463506 -
Flags: review?(roc)
Comment on attachment 8463506 [details] [diff] [review]
Fix that isolates moz-element drawing + test
Review of attachment 8463506 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/nsCSSRendering.cpp
@@ +4785,5 @@
>
> + gfxContext* ctx = aRenderingContext.ThebesContext();
> + gfxContext::GraphicsOperator op = ctx->CurrentOperator();
> + if (op != gfxContext::OPERATOR_OVER) {
> + ctx->PushGroup(gfxContentType::ALPHA);
COLOR_ALPHA. I mean it :-).
The temporary buffer needs both color channels and an alpha channel. That's what COLOR_ALPHA means. I'm not sure how this passes your test...
Attachment #8463506 -
Flags: review?(roc) → review-
Assignee | ||
Comment 13•11 years ago
|
||
argh, sorry about that. Updated patch is attached.
try run: https://tbpl.mozilla.org/?tree=Try&rev=30aaecebdb73
Attachment #8463506 -
Attachment is obsolete: true
Attachment #8463682 -
Flags: review?(roc)
Attachment #8463682 -
Flags: review?(roc) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 14•11 years ago
|
||
Keywords: checkin-needed
Comment 15•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•