summaryrefslogtreecommitdiffstats
path: root/layout/generic
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-10-24 10:42:23 +0000
committerMoonchild <moonchild@palemoon.org>2020-10-24 10:42:23 +0000
commite1db27e19989db11fef70f439cf95821316535b3 (patch)
treeabac2c9f5115323a8816d3ef600d8cb2bca5a33e /layout/generic
parenta98d06380fe706e3b1b602411c597b9882516b3e (diff)
parenta5203631d8cded437c05243cde17cddeba13e3ec (diff)
downloadUXP-RELBASE_20201024.tar
UXP-RELBASE_20201024.tar.gz
UXP-RELBASE_20201024.tar.lz
UXP-RELBASE_20201024.tar.xz
UXP-RELBASE_20201024.zip
Merge branch 'redwood' into releaseRELBASE_20201024RC_20201024
Diffstat (limited to 'layout/generic')
-rw-r--r--layout/generic/nsFrame.cpp3
-rw-r--r--layout/generic/nsTextFrame.cpp11
2 files changed, 10 insertions, 4 deletions
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index cb70f8b1e..5296126ac 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1833,8 +1833,7 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
nscolor
nsIFrame::GetCaretColorAt(int32_t aOffset)
{
- // Use text color.
- return StyleColor()->mColor;
+ return nsLayoutUtils::GetColor(this, eCSSProperty_caret_color);
}
bool
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index a47b87e38..c7b55961c 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -3949,11 +3949,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);