Use the appropriate color based on visitedness for border-collapse borders. (Bug 147777) r=bernd
authorL. David Baron <dbaron@dbaron.org>
Fri, 02 Apr 2010 18:58:26 -0700
changeset 40181 65629d0a492e2dd9e1ba044e4bf4692e86e65a17
parent 40180 aaa79216677b77734c4cd802f6c44ccff015f8ca
child 40182 44d198975192f39ffd86f4d70f616a8d96a130c7
push idunknown
push userunknown
push dateunknown
reviewersbernd
bugs147777
milestone1.9.3a4pre
Use the appropriate color based on visitedness for border-collapse borders. (Bug 147777) r=bernd
layout/tables/nsTableFrame.cpp
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -68,16 +68,17 @@
 #include "nsFrameManager.h"
 #include "nsCSSRendering.h"
 #include "nsLayoutErrors.h"
 #include "nsAutoPtr.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsStyleSet.h"
 #include "nsDisplayList.h"
 #include "nsIScrollableFrame.h"
+#include "nsCSSProps.h"
 
 using namespace mozilla;
 
 /********************************************************************************
  ** nsTableReflowState                                                         **
  ********************************************************************************/
 
 struct nsTableReflowState {
@@ -4474,21 +4475,18 @@ GetColorAndStyle(const nsIFrame*  aFrame
     }
   }
   aStyle = styleData->GetBorderStyle(aSide);
 
   if ((NS_STYLE_BORDER_STYLE_NONE == aStyle) ||
       (NS_STYLE_BORDER_STYLE_HIDDEN == aStyle)) {
     return;
   }
-  PRBool foreground;
-  styleData->GetBorderColor(aSide, aColor, foreground);
-  if (foreground) {
-    aColor = aFrame->GetStyleColor()->mColor;
-  }
+  aColor = aFrame->GetStyleContext()->GetVisitedDependentColor(
+             nsCSSProps::SubpropertyEntryFor(eCSSProperty_border_color)[aSide]);
 }
 
 /** coerce the paint style as required by CSS2.1
   * @param aFrame           - query the info for this frame 
   * @param aSide            - the side of the frame
   * @param aStyle           - the border style
   * @param aColor           - the border color
   * @param aTableIsLTR      - table direction is LTR