Respect ::-moz-selection background for images.

RESOLVED FIXED in Firefox 61

Status

()

defect
RESOLVED FIXED
a year ago
11 months ago

People

(Reporter: emilio, Assigned: emilio)

Tracking

unspecified
mozilla61
Points:
---

Firefox Tracking Flags

(firefox61 fixed)

Details

Attachments

(1 attachment)

Test-case:

<!doctype html>
<style>
::selection {
  color: white;
  background: green;
}
::-moz-selection {
  color: white;
  background: green;
}
</style>

<p>
Some text <img src="https://placehold.it/200x200"> some.
</p>

When selecting over the image the overlay should be of the selection background.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment on attachment 8962529 [details]
Bug 1449010: Respect ::selection background styles for image overlays.

https://reviewboard.mozilla.org/r/231324/#review237366

I don't see any reason to change the existing blending as part of this bug. We can do it later if we decide that it's inferior to what blink/WebKit are doing.

The generic cleanup changes (last bit of nsFrame.cpp and nsImageFrame.cpp) would be better as a separate patch, just for slightly saner history :)
Attachment #8962529 - Flags: review?(matt.woodrow) → review+

Comment 4

a year ago
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0765c7dabbea
Some minor cleanup in selection-related code. r=matwoodrow
https://hg.mozilla.org/integration/mozilla-inbound/rev/6d2897cca552
Respect ::selection background styles for image overlays. r=mattwoodrow
(Assignee)

Comment 5

a year ago
(In reply to Matt Woodrow (:mattwoodrow) from comment #3)
> Comment on attachment 8962529 [details]
> Bug 1449010: Respect ::selection background styles for image overlays.
> 
> https://reviewboard.mozilla.org/r/231324/#review237366
> 
> I don't see any reason to change the existing blending as part of this bug.
> We can do it later if we decide that it's inferior to what blink/WebKit are
> doing.

Yeah, agreed.

> The generic cleanup changes (last bit of nsFrame.cpp and nsImageFrame.cpp)
> would be better as a separate patch, just for slightly saner history :)

Thanks! Did it that way.

I decided to split this from the unprefixing patches and land ahead adding ::-moz-selection to the tests to reduce a bit my local patch queue.

Comment 6

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0765c7dabbea
https://hg.mozilla.org/mozilla-central/rev/6d2897cca552
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
(Assignee)

Updated

a year ago
Duplicate of this bug: 292563
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/10316 for changes under testing/web-platform/tests
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.