diff --git a/layout/reftests/outline/outline-auto-follows-border-radius-non-native-02.html b/layout/reftests/outline/outline-auto-follows-border-radius-non-native-02.html new file mode 100644 index 000000000000..f03c1694b22b --- /dev/null +++ b/layout/reftests/outline/outline-auto-follows-border-radius-non-native-02.html @@ -0,0 +1,14 @@ + + +
diff --git a/layout/reftests/outline/outline-auto-follows-border-radius-non-native-notref.html b/layout/reftests/outline/outline-auto-follows-border-radius-non-native-notref.html index 82ed30b855e6..7cfe639cd451 100644 --- a/layout/reftests/outline/outline-auto-follows-border-radius-non-native-notref.html +++ b/layout/reftests/outline/outline-auto-follows-border-radius-non-native-notref.html @@ -1,10 +1,12 @@ diff --git a/layout/reftests/outline/outline-auto-follows-border-radius-non-native.html b/layout/reftests/outline/outline-auto-follows-border-radius-non-native.html index e244a4ea3fb6..baff30d54f93 100644 --- a/layout/reftests/outline/outline-auto-follows-border-radius-non-native.html +++ b/layout/reftests/outline/outline-auto-follows-border-radius-non-native.html @@ -1,11 +1,13 @@ diff --git a/layout/reftests/outline/reftest.list b/layout/reftests/outline/reftest.list index c0426a6e7a43..49bf63df7de1 100644 --- a/layout/reftests/outline/reftest.list +++ b/layout/reftests/outline/reftest.list @@ -11,6 +11,7 @@ fuzzy-if(gtkWidget,0-136,0-120) fuzzy-if(Android,0-255,0-356) fuzzy-if(d2d,0-16, pref(layout.css.outline-style-auto.enabled,true) skip-if(!gtkWidget&&!winWidget&&!cocoaWidget) == outline-auto-001.html outline-auto-001-ref.html # only works on platforms that supports StyleAppearance::FocusOutline pref(layout.css.outline-style-auto.enabled,false) == outline-auto-001.html outline-auto-001-solid-ref.html skip-if(nativeThemePref) != outline-auto-follows-border-radius-non-native.html outline-auto-follows-border-radius-non-native-notref.html +skip-if(nativeThemePref) == outline-auto-follows-border-radius-non-native-02.html outline-auto-follows-border-radius-non-native.html == outline-initial-1a.html outline-initial-1-ref.html == outline-initial-1b.html outline-initial-1-ref.html == outline-on-table.html outline-on-table-ref.html diff --git a/widget/nsNativeBasicTheme.cpp b/widget/nsNativeBasicTheme.cpp index 9f41e1ecb7c7..a7105b85eb9a 100644 --- a/widget/nsNativeBasicTheme.cpp +++ b/widget/nsNativeBasicTheme.cpp @@ -1395,13 +1395,19 @@ void nsNativeBasicTheme::PaintAutoStyleOutline(nsIFrame* aFrame, StrokeOptions(width)); } + nsPresContext* pc = aFrame->PresContext(); + const nscoord offset = aFrame->StyleOutline()->mOutlineOffset.ToAppUnits(); + const Float devPixelOffset = pc->AppUnitsToFloatDevPixels(offset); + RectCornerRadii innerRadii; - nsCSSRendering::ComputePixelRadii( - cssRadii, aFrame->PresContext()->AppUnitsPerDevPixel(), &innerRadii); + nsCSSRendering::ComputePixelRadii(cssRadii, pc->AppUnitsPerDevPixel(), + &innerRadii); RectCornerRadii outerRadii; - Float borderSizes[4] = {halfWidth, halfWidth, halfWidth, halfWidth}; - nsCSSBorderRenderer::ComputeOuterRadii(innerRadii, borderSizes, &outerRadii); + const Float widths[4] = { + halfWidth + devPixelOffset, halfWidth + devPixelOffset, + halfWidth + devPixelOffset, halfWidth + devPixelOffset}; + nsCSSBorderRenderer::ComputeOuterRadii(innerRadii, widths, &outerRadii); RefPtr