Bug 1326189 - apply caret-color to visited link. draft
authorXidorn Quan <me@upsuper.org>
Thu, 19 Jan 2017 23:07:25 +0800
changeset 463664 6dbd2ddda19b5c74f822df0f753253e21a81fb1a
parent 463663 168ea3e9ff0bad286676173263613703187ab8f1
child 463665 995ae4f32b9881e1520cf8a903aeaab8b335575c
push id42137
push userjichen@mozilla.com
push dateThu, 19 Jan 2017 15:08:06 +0000
bugs1326189
milestone53.0a1
Bug 1326189 - apply caret-color to visited link. 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))