Closed
Bug 1424177
Opened 7 years ago
Closed 7 years ago
Some Bugzilla drop-down menu widgets are missing outlines when WebRender is enabled
Categories
(Core :: Graphics: WebRender, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: cpeterson, Assigned: mtseng)
References
Details
(Whiteboard: [wr-mvp] [triage])
Attachments
(3 files, 1 obsolete file)
5.03 KB,
image/png
|
Details | |
5.22 KB,
patch
|
mtseng
:
review+
|
Details | Diff | Splinter Review |
1.66 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
STR:
1. Enable WebRender
2. Load a Bugzilla bug
3. Edit the bug
4. Examine the bug's drop-down menu widgets
RESULT:
Some of the drop-down menu widgets (such as the Priority and Severity fields) are missing one or more sides of their outline. If you zoom the page, more or different widgets' outlines disappear.
I can reproduce this problem on Windows but not Mac. See the attached screenshot.
Updated•7 years ago
|
Whiteboard: [wr-mvp] [triage]
Updated•7 years ago
|
Blocks: stage-wr-nightly
Priority: -- → P1
Assignee | ||
Comment 2•7 years ago
|
||
Those drop-down menus are native widget in windows. We use fallback render for native widget in webrender. And the result of fallback render is missing border. Maybe some clipping or rounding issue. I'll keep investigating.
Assignee | ||
Comment 3•7 years ago
|
||
We round the size of display item's bounds as draw target size for fallback. But for
some item, such as native widget, it might draw larger than the draw target because
it paint area is determined by rounding the bounds of display item (rounding the rect
might get one pixel wider than rounding the size). So, this patch always use the result
of rounding the bounds instead of rounding the size to prevent some content get clipped.
MozReview-Commit-ID: Dam5l91Y93Y
Attachment #8942555 -
Flags: review?(bugmail)
Assignee | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment on attachment 8942555 [details] [diff] [review]
Slightly enlarge drawtarget size when fallback.
Review of attachment 8942555 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ +530,5 @@
> + // Some display item may draw exceed the paintSize, we need prepare a larger
> + // draw target to contain the result.
> + auto scaledBounds = bounds * LayoutDeviceToLayerScale(1);
> + scaledBounds.Scale(scale.width, scale.height);
> + LayerIntSize dtSize = RoundedToInt(scaledBounds).Size();
Does it make sense to get rid of paintSize entirely and use this calculation instead? It seems like the only difference is that for paintSize we're doing the width*scale directly, but here we're scaling the whole bounds and then recomputing the size from the scaled rect. It seems like this second approach is always going to be more correct, and we just do this instead of what we're currently doing for paintSize.
Comment 6•7 years ago
|
||
Also, can we add a reftest that exercises this code, since we don't seem to have one already?
Comment 7•7 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #5)
> Does it make sense to get rid of paintSize entirely and use this calculation
> instead? It seems like the only difference is that for paintSize we're doing
> the width*scale directly, but here we're scaling the whole bounds and then
> recomputing the size from the scaled rect. It seems like this second
> approach is always going to be more correct, and we just do this instead of
> what we're currently doing for paintSize.
To save time I did a try push with this suggestion, but it looks like it causes a bunch of failures: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9c131982f5c9f67a1ff850ee69f17f06653c23f9. So never mind that, I guess.
Updated•7 years ago
|
Attachment #8942555 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 8•7 years ago
|
||
MozReview-Commit-ID: Dam5l91Y93Y
Attachment #8942777 -
Flags: review+
Assignee | ||
Updated•7 years ago
|
Attachment #8942555 -
Attachment is obsolete: true
Assignee | ||
Comment 9•7 years ago
|
||
MozReview-Commit-ID: GfMRLGCia4Y
Attachment #8942778 -
Flags: review?(bugmail)
Assignee | ||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Comment on attachment 8942778 [details] [diff] [review]
Add reftest.
Review of attachment 8942778 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8942778 -
Flags: review?(bugmail) → review+
Comment 12•7 years ago
|
||
Pushed by mtseng@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c4c4ce0c895b
Slightly enlarge drawtarget size when fallback. r=kats
https://hg.mozilla.org/integration/mozilla-inbound/rev/e0a2cfd2fc7a
Add reftest. r=kats
Comment 13•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c4c4ce0c895b
https://hg.mozilla.org/mozilla-central/rev/e0a2cfd2fc7a
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•