mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Backed out changeset 6c09d8b07585 (bug 1596050) for reftest failures at layout/reftests/high-contrast/selection-001.html on a CLOSED TREE
This commit is contained in:
parent
fb0cdfff2e
commit
311cd41f69
@ -2373,18 +2373,13 @@ already_AddRefed<ComputedStyle> nsIFrame::ComputeSelectionStyle(
|
||||
aSelectionStatus != nsISelectionController::SELECTION_DISABLED) {
|
||||
return nullptr;
|
||||
}
|
||||
// When in high-contrast mode, the style system ends up ignoring the color
|
||||
// declarations, which means that the ::selection style becomes the inherited
|
||||
// color, and default background. That's no good.
|
||||
if (!PresContext()->PrefSheetPrefs().mUseDocumentColors) {
|
||||
return nullptr;
|
||||
}
|
||||
Element* element = FindElementAncestorForMozSelection(GetContent());
|
||||
if (!element) {
|
||||
return nullptr;
|
||||
}
|
||||
return PresContext()->StyleSet()->ProbePseudoElementStyle(
|
||||
RefPtr<ComputedStyle> sc = PresContext()->StyleSet()->ProbePseudoElementStyle(
|
||||
*element, PseudoStyleType::selection, Style());
|
||||
return sc.forget();
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
default-preferences test-pref(browser.display.document_color_use,2) test-pref(browser.display.permit_backplate,true)
|
||||
|
||||
# There are several platform-specific fuzzy-if notations below due to
|
||||
# anti-aliasing, extra visual overflow, and slightly inacurate reftest
|
||||
# anti-aliasing, extra visual overflow, and slightly inacurrate reftest
|
||||
# mocking. You can read more about the annotations and their specifics here:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1539212#c25
|
||||
|
||||
@ -16,6 +16,3 @@ fuzzy-if(cocoaWidget,255-255,52-52) fuzzy-if(winWidget,15-15,48-48) == backplate
|
||||
fuzzy-if(cocoaWidget,255-255,2842-2842) fuzzy-if(gtkWidget,255-255,620-620) fuzzy-if(winWidget||Android,255-255,480-481) == backplate-bg-image-008.html backplate-bg-image-008-ref.html
|
||||
fuzzy-if(cocoaWidget,255-255,504-504) fuzzy-if(gtkWidget,255-255,1050-1050) fuzzy-if(winWidget||Android,255-255,480-480) == backplate-bg-image-009.html backplate-bg-image-009-ref.html
|
||||
fuzzy-if(cocoaWidget,255-255,621-621) fuzzy-if(winWidget,255-255,128-128) fuzzy-if(Android,255-255,240-240) == backplate-bg-image-010.html backplate-bg-image-010-ref.html
|
||||
|
||||
== selection-001.html selection-001-ref.html
|
||||
pref(browser.display.document_color_use,0) != selection-001.html selection-001-ref.html
|
||||
|
@ -1,13 +0,0 @@
|
||||
<!doctype html>
|
||||
<title>Test reference</title>
|
||||
<p>
|
||||
Some selected text
|
||||
</p>
|
||||
<script>
|
||||
onload = function() {
|
||||
getSelection().removeAllRanges();
|
||||
let r = document.createRange();
|
||||
r.selectNode(document.documentElement);
|
||||
getSelection().addRange(r);
|
||||
}
|
||||
</script>
|
@ -1,19 +0,0 @@
|
||||
<!doctype html>
|
||||
<title>::selection should use native colors in high contrast mode</title>
|
||||
<style>
|
||||
::selection {
|
||||
background: purple;
|
||||
color: blue;
|
||||
}
|
||||
</style>
|
||||
<p>
|
||||
Some selected text
|
||||
</p>
|
||||
<script>
|
||||
onload = function() {
|
||||
getSelection().removeAllRanges();
|
||||
let r = document.createRange();
|
||||
r.selectNode(document.documentElement);
|
||||
getSelection().addRange(r);
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user