Closed
Bug 1421382
Opened 7 years ago
Closed 2 years ago
Fallback on facebook in XULTextBox caused by <input type=file>
Categories
(Core :: Graphics: WebRender, defect, P2)
Core
Graphics: WebRender
Tracking
()
RESOLVED
INVALID
People
(Reporter: jrmuizel, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [wr-reserve])
Attachments
(1 file)
(deleted),
text/x-review-board-request
|
Details |
See https://searchfox.org/mozilla-central/rev/7a8c667bdd2a4a32746c9862356e199627c0896d/layout/forms/nsFileControlFrame.cpp#145 and https://searchfox.org/mozilla-central/rev/7a8c667bdd2a4a32746c9862356e199627c0896d/layout/forms/nsFileControlFrame.cpp#484
This shows up here https://jrmuizel.github.io/webrender/facebook-refresh.html
Updated•7 years ago
|
Flags: needinfo?(emilio)
Updated•7 years ago
|
Whiteboard: [wr-mvp] [triage]
Updated•7 years ago
|
Blocks: stage-wr-nightly
Priority: -- → P3
Whiteboard: [wr-mvp] [triage] → [wr-mvp] [triage][wr-reserve-candidate]
Updated•7 years ago
|
Whiteboard: [wr-mvp] [triage][wr-reserve-candidate] → [wr-reserve]
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
So I gave this a try, and it looks nice except for a tiny thing (actually not so tiny...).
Worst part is, we actually re-reflow (an repaint?) when creating the label, .
That label is given a crop="center" attribute. That means that when the content overflows the text area, we crop in the middle of the file instead of in to the right, that is, if I upload mysuperlongfile.txt, and it doesn't fit, the label renders my...file.txt.
Chrome does it in special painting code[1]. We do it on nsTextBoxFrame[2], which is obviously the thing we're trying to kill...
So here's the question... Jeff, do you think it is doable / worth to override the nsFileControlFrame so that it creates a display list so that the text is cropped to the center or what not? Alternatively, we may get away with regressing this crop to center thing, but that's not great...
[1]: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/paint/FileUploadControlPainter.cpp?l=46&rcl=0d3eb1e182a841e43ec018cc68a176f813d66d24
[2]: https://searchfox.org/mozilla-central/rev/9f3bd430c2b132c86c46126a0548661de876799a/layout/xul/nsTextBoxFrame.cpp#756
Flags: needinfo?(emilio) → needinfo?(jmuizelaar)
Comment 4•7 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #3)
> So I gave this a try, and it looks nice except for a tiny thing (actually
> not so tiny...).
>
> Worst part is, we actually re-reflow (an repaint?) when creating the label, .
Err, I forgot to fill this part. Anyway, you can imagine... We load the binding, post a reflow callback and all the stuff, then when we arrive there end up painting the cropped value.
Comment 5•7 years ago
|
||
If the patch in bug 1413271 fixes this, maybe we don't even need to worry about anything here. I don't know how much the extra reflow matters if it only happens on pages with file inputs, and in any case, that part is not a webrender regression.
Reporter | ||
Comment 6•7 years ago
|
||
Unfortunately, I don't feel equipped to really make any kind of call on what we should do here.
Flags: needinfo?(jmuizelaar)
Updated•7 years ago
|
Blocks: webrender-site-issues
Updated•7 years ago
|
Priority: P3 → P2
Updated•7 years ago
|
Reporter | ||
Comment 7•6 years ago
|
||
I don't think this needs to block release.
No longer blocks: stage-wr-nightly
Comment 8•6 years ago
|
||
fixed? (xul text should be native now)
Blocks: stage-wr-next
Flags: needinfo?(jmuizelaar)
Comment 9•6 years ago
|
||
The text seems fixed but I still see a red highlight on the Browse button on the file upload field on https://bugzilla.mozilla.org/attachment.cgi?bugid=1421382&action=enter
Flags: needinfo?(jmuizelaar)
Updated•2 years ago
|
Severity: normal → S3
Comment 10•2 years ago
|
||
I don't think this is relevant now.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•