mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #1671 - Unprefix ::-moz-selection
This actually keeps both pseudo-elements for now, since the prefixed version is still used internally, but we need the unprefixed version for web compat. Note: while unprefixing a non-spec-compliant pseudo here, it's exactly in line with what other browsers do. Nobody is following the spec here and at least we'll be doing what everyone else is with our unprefixed version.
This commit is contained in:
parent
317b96a1be
commit
e3f6690ee7
5 changed files with 17 additions and 5 deletions
|
|
@ -3947,11 +3947,18 @@ nsTextPaintStyle::InitSelectionColorsAndShadow()
|
|||
if (selectionElement &&
|
||||
selectionStatus == nsISelectionController::SELECTION_ON) {
|
||||
RefPtr<nsStyleContext> sc = nullptr;
|
||||
// Probe for both selection and -moz-selection
|
||||
sc = mPresContext->StyleSet()->
|
||||
ProbePseudoElementStyle(selectionElement,
|
||||
CSSPseudoElementType::mozSelection,
|
||||
CSSPseudoElementType::selection,
|
||||
mFrame->StyleContext());
|
||||
// Use -moz-selection pseudo class.
|
||||
if (!sc) {
|
||||
sc = mPresContext->StyleSet()->
|
||||
ProbePseudoElementStyle(selectionElement,
|
||||
CSSPseudoElementType::mozSelection,
|
||||
mFrame->StyleContext());
|
||||
}
|
||||
// Use selection pseudo class.
|
||||
if (sc) {
|
||||
mSelectionBGColor =
|
||||
sc->GetVisitedDependentColor(eCSSProperty_background_color);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue