Open
Bug 1286731
Opened 9 years ago
Updated 3 years ago
Return correct DrawResult from nsCSSRendering::PaintBackgroundWithSC
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
NEW
People
(Reporter: u459114, Unassigned)
Details
nsCSSRendering::PaintBackgroundWithSC calls DrawBackground at [1], and store the drawing result in 'result' variable by "&=" operator, which I think is not correct.
Let's said we have 2 background images need to be drawn:
The fist background image is not decoded complete yet, then we will get result to be set as DrawResult::NOT_READY now.
Next, we start to draw the second background image, and this image is ready to draw, so 'result' is overwrite as DrawResult::SUCCESS. The caller of PaintBackgroundWithSC have no idea that we still have an image is not drawn correctly yet.
I propose
1. Change DrawResult to bit field, so that we can store more information in it.
2. Change "&=" operator at [1] to "|=" operator.
[1] https://dxr.mozilla.org/mozilla-central/source/layout/base/nsCSSRendering.cpp#3123
Comment 1•9 years ago
|
||
DrawResult overloads the & operator
https://dxr.mozilla.org/mozilla-central/source/image/DrawResult.h
so wouldn't the result of
NOT_READY & SUCCESS
be NOT_READY?
Updated•9 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•