Skip to content

Commit 8e8bffd

Browse files
author
keishi@chromium.org
committed
Revert of Go back to old underline position and thickness logic (patchset #2 id:20001 of https://codereview.chromium.org/550163003/)
Reason for revert: Many tests failed on WinXP because of different underline position. Original issue's description: > Go back to old underline position and thickness logic > > In r174431 from May this year we changed the underline position and > thickness logic to respect the underline data specified in the font. > While this improved rendering for certain fonts and scripts it did cause > a regression for others. This change reverts to the old behavior while > we figure out how to handle fonts with inaccurate or undesirable > metrics. > > BUG=408075 > R=scottmg@chromium.org, cpu@chromium.org > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181591 TBR=scottmg@chromium.org,cpu@chromium.org,eae@chromium.org NOTREECHECKS=true NOTRY=true BUG=408075 Review URL: https://codereview.chromium.org/557653002 git-svn-id: svn://svn.chromium.org/blink/trunk@181607 bbb929c8-8fbe-4397-9dbb-9b2b20218538
1 parent f5115d0 commit 8e8bffd

File tree

2 files changed

+7
-98
lines changed

2 files changed

+7
-98
lines changed

LayoutTests/TestExpectations

-98
Original file line numberDiff line numberDiff line change
@@ -1049,104 +1049,6 @@ crbug.com/350853 fast/multicol/widows2.html [ Skip ]
10491049
crbug.com/350853 fast/pagination/auto-height.html [ Skip ]
10501050
crbug.com/350853 fast/pagination/auto-height-with-break.html [ Skip ]
10511051

1052-
crbug.com/408075 css1/basic/containment.html [ NeedsRebaseline ]
1053-
crbug.com/408075 css1/basic/inheritance.html [ NeedsRebaseline ]
1054-
crbug.com/408075 css1/box_properties/acid_test.html [ NeedsRebaseline ]
1055-
crbug.com/408075 css2.1/t0602-c13-inh-underlin-00-e.html [ NeedsRebaseline ]
1056-
crbug.com/408075 css2.1/t09-c5526c-display-00-e.html [ NeedsRebaseline ]
1057-
crbug.com/408075 editing/deleting/delete-4083333-fix.html [ NeedsRebaseline ]
1058-
crbug.com/408075 editing/inserting/insert-div-022.html [ NeedsRebaseline ]
1059-
crbug.com/408075 editing/inserting/insert-div-023.html [ NeedsRebaseline ]
1060-
crbug.com/408075 editing/inserting/insert-div-024.html [ NeedsRebaseline ]
1061-
crbug.com/408075 editing/inserting/insert-div-026.html [ NeedsRebaseline ]
1062-
crbug.com/408075 editing/inserting/return-key-with-selection-001.html [ NeedsRebaseline ]
1063-
crbug.com/408075 editing/inserting/return-key-with-selection-002.html [ NeedsRebaseline ]
1064-
crbug.com/408075 editing/inserting/return-key-with-selection-003.html [ NeedsRebaseline ]
1065-
crbug.com/408075 editing/pasteboard/paste-4038267-fix.html [ NeedsRebaseline ]
1066-
crbug.com/408075 editing/pasteboard/paste-line-endings-001.html [ NeedsRebaseline ]
1067-
crbug.com/408075 editing/pasteboard/paste-line-endings-002.html [ NeedsRebaseline ]
1068-
crbug.com/408075 editing/pasteboard/paste-line-endings-003.html [ NeedsRebaseline ]
1069-
crbug.com/408075 editing/pasteboard/paste-line-endings-004.html [ NeedsRebaseline ]
1070-
crbug.com/408075 editing/pasteboard/paste-line-endings-005.html [ NeedsRebaseline ]
1071-
crbug.com/408075 editing/pasteboard/paste-line-endings-006.html [ NeedsRebaseline ]
1072-
crbug.com/408075 editing/pasteboard/paste-line-endings-007.html [ NeedsRebaseline ]
1073-
crbug.com/408075 editing/pasteboard/paste-line-endings-008.html [ NeedsRebaseline ]
1074-
crbug.com/408075 editing/pasteboard/paste-line-endings-009.html [ NeedsRebaseline ]
1075-
crbug.com/408075 editing/pasteboard/paste-line-endings-010.html [ NeedsRebaseline ]
1076-
crbug.com/408075 editing/pasteboard/paste-match-style-002.html [ NeedsRebaseline ]
1077-
crbug.com/408075 editing/pasteboard/paste-text-019.html [ NeedsRebaseline ]
1078-
crbug.com/408075 editing/selection/select-text-overflow-ellipsis.html [ NeedsRebaseline ]
1079-
crbug.com/408075 editing/style/block-styles-007.html [ NeedsRebaseline ]
1080-
crbug.com/408075 editing/style/smoosh-styles-003.html [ NeedsRebaseline ]
1081-
crbug.com/408075 editing/style/style-3998892-fix.html [ NeedsRebaseline ]
1082-
crbug.com/408075 fast/block/basic/011.html [ NeedsRebaseline ]
1083-
crbug.com/408075 fast/block/float/centered-float-avoidance-complexity.html [ NeedsRebaseline ]
1084-
crbug.com/408075 fast/block/float/float-in-float-hit-testing.html [ NeedsRebaseline ]
1085-
crbug.com/408075 fast/block/float/float-in-float-painting.html [ NeedsRebaseline ]
1086-
crbug.com/408075 fast/block/positioning/auto/007.html [ NeedsRebaseline ]
1087-
crbug.com/408075 fast/block/positioning/auto/vertical-lr/007.html [ NeedsRebaseline ]
1088-
crbug.com/408075 fast/block/positioning/auto/vertical-rl/007.html [ NeedsRebaseline ]
1089-
crbug.com/408075 fast/css3-text/css3-text-decoration/repaint/repaint-text-decoration-style.html [ NeedsRebaseline ]
1090-
crbug.com/408075 fast/css3-text/css3-text-decoration/text-decoration-style.html [ NeedsRebaseline ]
1091-
crbug.com/408075 fast/css/acid2.html [ NeedsRebaseline ]
1092-
crbug.com/408075 fast/css/clip-zooming.html [ NeedsRebaseline ]
1093-
crbug.com/408075 fast/css/css-properties-position-relative-as-parent-fixed.html [ NeedsRebaseline ]
1094-
crbug.com/408075 fast/css/first-line-text-decoration.html [ NeedsRebaseline ]
1095-
crbug.com/408075 fast/css/first-line-text-decoration-inherited-from-parent.html [ NeedsRebaseline ]
1096-
crbug.com/408075 fast/css/line-thickness-underline-strikethrough-overline.html [ NeedsRebaseline ]
1097-
crbug.com/408075 fast/dom/clone-node-dynamic-style.html [ NeedsRebaseline ]
1098-
crbug.com/408075 fast/repaint/shadow-multiple.html [ NeedsRebaseline ]
1099-
crbug.com/408075 fast/text-autosizing/hackernews-comments.html [ NeedsRebaseline ]
1100-
crbug.com/408075 fast/text/decorations-transformed.html [ NeedsRebaseline ]
1101-
crbug.com/408075 fast/text/decorations-with-text-combine.html [ NeedsRebaseline ]
1102-
crbug.com/408075 fast/text/international/rtl-white-space-pre-wrap.html [ NeedsRebaseline ]
1103-
crbug.com/408075 fast/text/line-breaks.html [ NeedsRebaseline ]
1104-
crbug.com/408075 fast/text/stroking-decorations.html [ NeedsRebaseline ]
1105-
crbug.com/408075 fast/text/trailing-white-space-2.html [ NeedsRebaseline ]
1106-
crbug.com/408075 fast/text/trailing-white-space.html [ NeedsRebaseline ]
1107-
crbug.com/408075 fast/transforms/transforms-with-zoom.html [ NeedsRebaseline ]
1108-
crbug.com/408075 http/tests/misc/acid2.html [ NeedsRebaseline ]
1109-
crbug.com/408075 ietestcenter/css3/text/textshadow-002.htm [ NeedsRebaseline ]
1110-
crbug.com/408075 [ Win7 Linux Mac Android ] svg/custom/svg-fonts-without-missing-glyph.xhtml [ NeedsRebaseline ]
1111-
crbug.com/408075 svg/wicd/test-rightsizing-a.xhtml [ NeedsRebaseline ]
1112-
crbug.com/408075 svg/wicd/test-scalable-background-image1.xhtml [ NeedsRebaseline ]
1113-
crbug.com/408075 svg/wicd/test-scalable-background-image2.xhtml [ NeedsRebaseline ]
1114-
crbug.com/408075 svg/zoom/text/zoom-foreignObject.svg [ NeedsRebaseline ]
1115-
crbug.com/408075 tables/mozilla/bugs/bug128229.html [ NeedsRebaseline ]
1116-
crbug.com/408075 tables/mozilla/bugs/bug22019.html [ NeedsRebaseline ]
1117-
crbug.com/408075 tables/mozilla/bugs/bug5538.html [ NeedsRebaseline ]
1118-
crbug.com/408075 tables/mozilla/bugs/bug73321.html [ NeedsRebaseline ]
1119-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-cell.html [ NeedsRebaseline ]
1120-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-column-group.html [ NeedsRebaseline ]
1121-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-column.html [ NeedsRebaseline ]
1122-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table.html [ NeedsRebaseline ]
1123-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-quirks.html [ NeedsRebaseline ]
1124-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-row-group.html [ NeedsRebaseline ]
1125-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-row.html [ NeedsRebaseline ]
1126-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_fixed-bg.html [ NeedsRebaseline ]
1127-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_layers-hide.html [ NeedsRebaseline ]
1128-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-cell.html [ NeedsRebaseline ]
1129-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-column-group.html [ NeedsRebaseline ]
1130-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-column.html [ NeedsRebaseline ]
1131-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-row-group.html [ NeedsRebaseline ]
1132-
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-row.html [ NeedsRebaseline ]
1133-
crbug.com/408075 tables/mozilla/marvin/backgr_index.html [ NeedsRebaseline ]
1134-
crbug.com/408075 tables/mozilla/marvin/backgr_layers-opacity.html [ NeedsRebaseline ]
1135-
crbug.com/408075 tables/mozilla/marvin/backgr_position-table.html [ NeedsRebaseline ]
1136-
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-cell.html [ NeedsRebaseline ]
1137-
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-column-group.html [ NeedsRebaseline ]
1138-
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-column.html [ NeedsRebaseline ]
1139-
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table.html [ NeedsRebaseline ]
1140-
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-row-group.html [ NeedsRebaseline ]
1141-
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-row.html [ NeedsRebaseline ]
1142-
crbug.com/408075 virtual/antialiasedtext/fast/text/decorations-transformed.html [ NeedsRebaseline ]
1143-
crbug.com/408075 virtual/antialiasedtext/fast/text/decorations-with-text-combine.html [ NeedsRebaseline ]
1144-
crbug.com/408075 virtual/antialiasedtext/fast/text/international/rtl-white-space-pre-wrap.html [ NeedsRebaseline ]
1145-
crbug.com/408075 virtual/antialiasedtext/fast/text/line-breaks.html [ NeedsRebaseline ]
1146-
crbug.com/408075 virtual/antialiasedtext/fast/text/stroking-decorations.html [ NeedsRebaseline ]
1147-
crbug.com/408075 virtual/antialiasedtext/fast/text/trailing-white-space-2.html [ NeedsRebaseline ]
1148-
crbug.com/408075 virtual/antialiasedtext/fast/text/trailing-white-space.html [ NeedsRebaseline ]
1149-
11501052
crbug.com/374569 [ Win ] http/tests/navigation/beacon-cross-origin.html [ Pass Failure Timeout ]
11511053
crbug.com/374572 svg/filters/feImage-target-reappend-to-document.svg [ Pass Failure ]
11521054
crbug.com/374572 svg/dynamic-updates/SVGImageElement-svgdom-preserveAspectRatio-prop.html [ Pass ImageOnlyFailure ]

Source/platform/fonts/skia/SimpleFontDataSkia.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ void SimpleFontData::platformInit()
131131
m_fontMetrics.setLineGap(lineGap);
132132
m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
133133

134+
SkScalar underlineThickness, underlinePosition;
135+
if (metrics.hasUnderlineThickness(&underlineThickness)
136+
&& metrics.hasUnderlinePosition(&underlinePosition)) {
137+
m_fontMetrics.setUnderlineThickness(SkScalarToFloat(underlineThickness));
138+
m_fontMetrics.setUnderlinePosition(SkScalarToFloat(-underlinePosition));
139+
}
140+
134141
if (platformData().orientation() == Vertical && !isTextOrientationFallback()) {
135142
static const uint32_t vheaTag = SkSetFourByteTag('v', 'h', 'e', 'a');
136143
static const uint32_t vorgTag = SkSetFourByteTag('V', 'O', 'R', 'G');

0 commit comments

Comments
 (0)