Closed
Bug 1305036
Opened 8 years ago
Closed 7 years ago
text-overflow: ellipsis is painted as solid bar with skia backend (missing w/ some other backends), if an element with position:fixed and background-color is in DOM before
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: fr33k4t3k, Assigned: lsalzman)
References
(Blocks 1 open bug)
Details
(Keywords: regression, testcase, Whiteboard: [gfx-noted])
Attachments
(3 files)
(deleted),
image/png
|
Details | |
(deleted),
text/html
|
Details | |
(deleted),
patch
|
mstange
:
review+
gchang
:
approval-mozilla-esr52+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160823121617
Steps to reproduce:
my basic code:
#fixed {
position: fixed;
top: 0;
right: 0;
width: 100px;
height: 100px;
background-color: green;
}
#overflow {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
width: 100px;
}
<div id="fixed"></div>
<div id="overflow">abcdefghijklmnopqrstuvwxyz</div>
Actual results:
text gets cut, but no dots are displayed
Comment 2•8 years ago
|
||
The testcase works fine for me on Linux, in both v49 and Nightly.
(In reply to Mats Palmgren (:mats) from comment #2)
> The testcase works fine for me on Linux, in both v49 and Nightly.
then it seems to be windows related; I tested on win10 with v48.0.0.2 and v50.0a2 and it doesn't work as expected.
Comment 4•8 years ago
|
||
I do see an issue on Linux, and I think it's a manifestation of the same underlying problem that's causing trouble on Windows.
Specifically, I see a soloid horizontal bar instead of an ellipsis. Mozregression dates this to bug 1278957 (which switched us to using the skia backend on Linux). I only see this horizontal-bar glitch with the specific conditions in this bug's testcase, too (position:fixed element, with background-color, in DOM before the ellipsis element). If I vary any of those factors, I see a normal ellipsis.
So I suspect some version of this bug (no-ellipsis or bar-ellipsis) reproduces with an Azure backend of "direct2d1.1" (the preferred backend on windows) and skia (the new preferred backend on Linux), though not with cairo (the old preferred backend on Linux). There might be another factor as well, if Mats really isn't seeing any issues on Linux, though.
Comment 5•8 years ago
|
||
Some kind of graphics / layers issue then?
Component: Layout → Graphics: Layers
Updated•8 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: text-overflow: ellipsis doesn't work if an element with position:fixed and background-color is in DOM before → text-overflow: ellipsis is painted as solid bar with skia backend (missing w/ other backends), if an element with position:fixed and background-color is in DOM before
Updated•8 years ago
|
Summary: text-overflow: ellipsis is painted as solid bar with skia backend (missing w/ other backends), if an element with position:fixed and background-color is in DOM before → text-overflow: ellipsis is painted as solid bar with skia backend (missing w/ some other backends), if an element with position:fixed and background-color is in DOM before
Regression range on Windows:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=35046df9df1f&tochange=70a113676b21
I think it's due to bug 1148855.
Blocks: 1148855
Keywords: regression
Comment 8•8 years ago
|
||
FYI, the text-overflow display item class is here:
http://searchfox.org/mozilla-central/rev/c31ad35f39c6187b2e121aa6d3a39b7f67397010/layout/generic/TextOverflow.cpp#164
Assignee | ||
Comment 9•8 years ago
|
||
Markus, can you take a look if this is related to bug 1148855 as Loic thinks?
Though, I can't reproduce this one on Linux with Skia or Cairo content with Nightly.
Has STR: --- → yes
Flags: needinfo?(mstange)
Keywords: testcase
Priority: -- → P3
Whiteboard: [gfx-noted]
status-firefox49:
--- → affected
status-firefox50:
--- → affected
status-firefox51:
--- → affected
status-firefox52:
--- → affected
Version: 50 Branch → 49 Branch
Too late to fix in 49.
Updated•8 years ago
|
Version: 49 Branch → 40 Branch
Comment 11•8 years ago
|
||
(In reply to Lee Salzman [:lsalzman] from comment #9)
> Markus, can you take a look if this is related to bug 1148855 as Loic thinks?
Yes, I think Loic is right. If I turn on layer borders, I can see that we create a separate layer for the ellipsis item now. We wouldn't have done that before bug 1148855.
(If the page were horizontally scrollable to the left, then the ellipsis could conceivably overlap with the fixed layer, and apparently it's above the fixed layer in z-order, so we need to pull it out into a separate layer.)
> Though, I can't reproduce this one on Linux with Skia or Cairo content with
> Nightly.
I can't reproduce it on Mac either.
Flags: needinfo?(mstange)
While this is uncovered by the layerization change, it sounds like it is an underlying issue in graphics, only on some backends. A good background task.
Assignee: nobody → lsalzman
status-firefox53:
--- → fix-optional
Updated•8 years ago
|
Blocks: text-overflow
Assignee | ||
Comment 13•7 years ago
|
||
We were trying to render the ellipsis with subpixel AA into a BGRA surface. So when composited, this just showed up as a black (or transparent) mess in the places that should have been anti-aliased. This was because nsDisplayTextOverflowMarker, which was doing the drawing, did not implement GetComponentAlphaBounds.
If subpixel AA was not enabled, everything would seem to work, and thus that was why it was not reproducible in some configurations.
Attachment #8873600 -
Flags: review?(mstange)
Updated•7 years ago
|
Attachment #8873600 -
Flags: review?(mstange) → review+
Comment 14•7 years ago
|
||
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f6c73141311
implement nsDisplayTextOverflowMarker::GetComponentAlphaBounds to handle ellipsis with subpixel AA. r=mstange
Assignee | ||
Updated•7 years ago
|
status-firefox54:
--- → affected
status-firefox55:
--- → affected
status-firefox-esr45:
--- → affected
status-firefox-esr52:
--- → affected
Component: Graphics: Layers → Layout: Text
OS: Unspecified → All
Hardware: Unspecified → All
Updated•7 years ago
|
Comment 15•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Wontfix for 54, since we are building the release candidate today.
Comment 17•7 years ago
|
||
Given that ESR52 has a high number of Skia users, is this something we should consider backporting there?
Flags: needinfo?(lsalzman)
Assignee | ||
Comment 18•7 years ago
|
||
Comment on attachment 8873600 [details] [diff] [review]
implement nsDisplayTextOverflowMarker::GetComponentAlphaBounds to handle ellipsis with subpixel AA
[Approval Request Comment]
User impact if declined: Ellipsis fail to show up with text-overflow.
Fix Landed on Version: 55
Risk to taking this patch (and alternatives if risky): none
String or UUID changes made by this patch: none
Flags: needinfo?(lsalzman)
Attachment #8873600 -
Flags: approval-mozilla-esr52?
Comment 19•7 years ago
|
||
Comment on attachment 8873600 [details] [diff] [review]
implement nsDisplayTextOverflowMarker::GetComponentAlphaBounds to handle ellipsis with subpixel AA
Per comment #17, ESR52 has a high number of Skia users. Let's uplift it to ESR52.3.
Attachment #8873600 -
Flags: approval-mozilla-esr52? → approval-mozilla-esr52+
Comment 20•7 years ago
|
||
bugherder uplift |
You need to log in
before you can comment on or make changes to this bug.
Description
•