Commit cfa25f50 authored by Ionel Popescu's avatar Ionel Popescu Committed by Commit Bot

Update default outline-offset for links to 1px.

This CL updates the default outline-offset for links to 1px
in order to improve text visibility.

Bug: 1055241
Change-Id: I8bfa522b9fbe1910e649b653a74261f87ae986ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076664
Commit-Queue: Ionel Popescu <iopopesc@microsoft.com>
Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745341}
parent 21cb1ffb
...@@ -2216,10 +2216,13 @@ int ComputedStyle::GetDefaultOffsetForFocusRing() const { ...@@ -2216,10 +2216,13 @@ int ComputedStyle::GetDefaultOffsetForFocusRing() const {
if (!::features::IsFormControlsRefreshEnabled()) if (!::features::IsFormControlsRefreshEnabled())
return 0; return 0;
// For FormControlsRefresh checkbox and radio have a 2px inner padding.
if (EffectiveAppearance() == kCheckboxPart || if (EffectiveAppearance() == kCheckboxPart ||
EffectiveAppearance() == kRadioPart) EffectiveAppearance() == kRadioPart) {
return 2; return 2;
} else if (IsLink()) {
return 1;
}
return 0; return 0;
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
}, },
{ {
"object": "NGPhysicalBoxFragment LayoutInline A", "object": "NGPhysicalBoxFragment LayoutInline A",
"rect": [382, 970, 44, 23], "rect": [381, 969, 46, 25],
"reason": "appeared" "reason": "appeared"
}, },
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
}, },
{ {
"object": "NGPhysicalBoxFragment LayoutInline A", "object": "NGPhysicalBoxFragment LayoutInline A",
"rect": [382, 970, 44, 23], "rect": [381, 969, 46, 25],
"reason": "appeared" "reason": "appeared"
}, },
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
}, },
{ {
"object": "NGPhysicalBoxFragment LayoutInline A", "object": "NGPhysicalBoxFragment LayoutInline A",
"rect": [381, 990, 49, 23], "rect": [380, 989, 51, 25],
"reason": "appeared" "reason": "appeared"
}, },
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
}, },
{ {
"object": "NGPhysicalBoxFragment LayoutInline A", "object": "NGPhysicalBoxFragment LayoutInline A",
"rect": [383, 1010, 48, 23], "rect": [382, 1009, 50, 25],
"reason": "appeared" "reason": "appeared"
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment