diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp
index 00307e123b0d0bac93ad694e75141faca9bc4d56..86495743d49022626646d872f1ff46ed21aefe89 100644
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -4065,7 +4065,7 @@ static void GetColorAndStyle(const nsIFrame* aFrame, WritingMode aTableWM,
     return;
   }
   *aColor = aFrame->Style()->GetVisitedDependentColor(
-      nsStyleBorder::BorderColorFieldFor(physicalSide));
+      nsStyleBorder::BorderColorFieldFor(physicalSide), aFrame);
 
   if (aWidth) {
     *aWidth = styleData->GetComputedBorderWidth(physicalSide);
