Bug 1326189 part 1 - Apply :visited style for caret-color. r=dholbert draft
authorXidorn Quan <me@upsuper.org>
Thu, 19 Jan 2017 23:07:25 +0800
changeset 464848 6600f3fddd08dbb79d7a43b7ba49c19f3abc3b54
parent 463578 26f064614428e7552ab0063de71a684671a6a640
child 464849 5e968e38e924e7c741cf1d3a5c414650d2b093b0
push id42456
push userxquan@mozilla.com
push dateMon, 23 Jan 2017 04:22:23 +0000
reviewersdholbert
bugs1326189
milestone53.0a1
Bug 1326189 part 1 - Apply :visited style for caret-color. r=dholbert MozReview-Commit-ID: DQqSdCz2TEC
layout/generic/nsFrame.cpp
layout/style/nsCSSVisitedDependentPropList.h
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1879,17 +1879,17 @@ nsIFrame::DisplayCaret(nsDisplayListBuil
     return;
 
   aList->AppendNewToTop(new (aBuilder) nsDisplayCaret(aBuilder, this));
 }
 
 nscolor
 nsIFrame::GetCaretColorAt(int32_t aOffset)
 {
-  return StyleColor()->CalcComplexColor(StyleUserInterface()->mCaretColor);
+  return nsLayoutUtils::GetColor(this, &nsStyleUserInterface::mCaretColor);
 }
 
 bool
 nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder,
                                         const nsDisplayListSet& aLists,
                                         bool aForceBackground)
 {
   // Here we don't try to detect background propagation. Frames that might
--- a/layout/style/nsCSSVisitedDependentPropList.h
+++ b/layout/style/nsCSSVisitedDependentPropList.h
@@ -28,8 +28,9 @@ STYLE_STRUCT(Border, (mBorderTopColor,
                       mBorderLeftColor))
 STYLE_STRUCT(Outline, (mOutlineColor))
 STYLE_STRUCT(Column, (mColumnRuleColor))
 STYLE_STRUCT(Text, (mTextEmphasisColor,
                     mWebkitTextFillColor,
                     mWebkitTextStrokeColor))
 STYLE_STRUCT(TextReset, (mTextDecorationColor))
 STYLE_STRUCT(SVG, (mFill, mStroke))
+STYLE_STRUCT(UserInterface, (mCaretColor))