Closed Bug 1395748 Opened 3 years ago Closed 3 years ago
text-layers: shadows with selections are mishandled
59 bytes, text/x-review-board-request
Using webrendest layers-free, the following cases are mishandled: 1. If you select some text with a shadow, the shadow will be applied multiple times (once for each "segment" of the selection). 2. If you apply text-shadows with the ::-moz-selection pseudo-selector, the shadow will apply to the entire run (and not just the selected portion). Both of these are the consequence of us mishandling shadows in the selected case. In particular we slurp up shadows from PaintOneShadow, and we assume they apply to the entire nsTextFrame. However nsTextFrame::PaintTextWithSelectionColors applies shadows segment-by-segment for the selection (for instance, if you selected only part of a textFrame, then there will be 3 selection segments, two of which have no selection). Fixing this will likely require scoping TextShadows to TextRunFragments, rather than an entire TextDrawTarget?
Priority: -- → P3
Assignee: nobody → a.beingessner
Status: NEW → ASSIGNED
Priority: P2 → P1
Target Milestone: --- → mozilla57
Comment on attachment 8907286 [details] Bug 1395748 - Fix text selection shadow interaction. https://reviewboard.mozilla.org/r/178964/#review184488
Attachment #8907286 - Flags: review?(jmuizelaar) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/065ea3d56a52 Fix text selection shadow interaction. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.