Skip to content

Commit

Permalink
Revert of Go back to old underline position and thickness logic (patc…
Browse files Browse the repository at this point in the history
…hset #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
> [email protected], [email protected]
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181591

[email protected],[email protected],[email protected]
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
  • Loading branch information
[email protected] committed Sep 9, 2014
1 parent f5115d0 commit 8e8bffd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 98 deletions.
98 changes: 0 additions & 98 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1049,104 +1049,6 @@ crbug.com/350853 fast/multicol/widows2.html [ Skip ]
crbug.com/350853 fast/pagination/auto-height.html [ Skip ]
crbug.com/350853 fast/pagination/auto-height-with-break.html [ Skip ]

crbug.com/408075 css1/basic/containment.html [ NeedsRebaseline ]
crbug.com/408075 css1/basic/inheritance.html [ NeedsRebaseline ]
crbug.com/408075 css1/box_properties/acid_test.html [ NeedsRebaseline ]
crbug.com/408075 css2.1/t0602-c13-inh-underlin-00-e.html [ NeedsRebaseline ]
crbug.com/408075 css2.1/t09-c5526c-display-00-e.html [ NeedsRebaseline ]
crbug.com/408075 editing/deleting/delete-4083333-fix.html [ NeedsRebaseline ]
crbug.com/408075 editing/inserting/insert-div-022.html [ NeedsRebaseline ]
crbug.com/408075 editing/inserting/insert-div-023.html [ NeedsRebaseline ]
crbug.com/408075 editing/inserting/insert-div-024.html [ NeedsRebaseline ]
crbug.com/408075 editing/inserting/insert-div-026.html [ NeedsRebaseline ]
crbug.com/408075 editing/inserting/return-key-with-selection-001.html [ NeedsRebaseline ]
crbug.com/408075 editing/inserting/return-key-with-selection-002.html [ NeedsRebaseline ]
crbug.com/408075 editing/inserting/return-key-with-selection-003.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-4038267-fix.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-001.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-002.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-003.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-004.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-005.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-006.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-007.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-008.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-009.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-line-endings-010.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-match-style-002.html [ NeedsRebaseline ]
crbug.com/408075 editing/pasteboard/paste-text-019.html [ NeedsRebaseline ]
crbug.com/408075 editing/selection/select-text-overflow-ellipsis.html [ NeedsRebaseline ]
crbug.com/408075 editing/style/block-styles-007.html [ NeedsRebaseline ]
crbug.com/408075 editing/style/smoosh-styles-003.html [ NeedsRebaseline ]
crbug.com/408075 editing/style/style-3998892-fix.html [ NeedsRebaseline ]
crbug.com/408075 fast/block/basic/011.html [ NeedsRebaseline ]
crbug.com/408075 fast/block/float/centered-float-avoidance-complexity.html [ NeedsRebaseline ]
crbug.com/408075 fast/block/float/float-in-float-hit-testing.html [ NeedsRebaseline ]
crbug.com/408075 fast/block/float/float-in-float-painting.html [ NeedsRebaseline ]
crbug.com/408075 fast/block/positioning/auto/007.html [ NeedsRebaseline ]
crbug.com/408075 fast/block/positioning/auto/vertical-lr/007.html [ NeedsRebaseline ]
crbug.com/408075 fast/block/positioning/auto/vertical-rl/007.html [ NeedsRebaseline ]
crbug.com/408075 fast/css3-text/css3-text-decoration/repaint/repaint-text-decoration-style.html [ NeedsRebaseline ]
crbug.com/408075 fast/css3-text/css3-text-decoration/text-decoration-style.html [ NeedsRebaseline ]
crbug.com/408075 fast/css/acid2.html [ NeedsRebaseline ]
crbug.com/408075 fast/css/clip-zooming.html [ NeedsRebaseline ]
crbug.com/408075 fast/css/css-properties-position-relative-as-parent-fixed.html [ NeedsRebaseline ]
crbug.com/408075 fast/css/first-line-text-decoration.html [ NeedsRebaseline ]
crbug.com/408075 fast/css/first-line-text-decoration-inherited-from-parent.html [ NeedsRebaseline ]
crbug.com/408075 fast/css/line-thickness-underline-strikethrough-overline.html [ NeedsRebaseline ]
crbug.com/408075 fast/dom/clone-node-dynamic-style.html [ NeedsRebaseline ]
crbug.com/408075 fast/repaint/shadow-multiple.html [ NeedsRebaseline ]
crbug.com/408075 fast/text-autosizing/hackernews-comments.html [ NeedsRebaseline ]
crbug.com/408075 fast/text/decorations-transformed.html [ NeedsRebaseline ]
crbug.com/408075 fast/text/decorations-with-text-combine.html [ NeedsRebaseline ]
crbug.com/408075 fast/text/international/rtl-white-space-pre-wrap.html [ NeedsRebaseline ]
crbug.com/408075 fast/text/line-breaks.html [ NeedsRebaseline ]
crbug.com/408075 fast/text/stroking-decorations.html [ NeedsRebaseline ]
crbug.com/408075 fast/text/trailing-white-space-2.html [ NeedsRebaseline ]
crbug.com/408075 fast/text/trailing-white-space.html [ NeedsRebaseline ]
crbug.com/408075 fast/transforms/transforms-with-zoom.html [ NeedsRebaseline ]
crbug.com/408075 http/tests/misc/acid2.html [ NeedsRebaseline ]
crbug.com/408075 ietestcenter/css3/text/textshadow-002.htm [ NeedsRebaseline ]
crbug.com/408075 [ Win7 Linux Mac Android ] svg/custom/svg-fonts-without-missing-glyph.xhtml [ NeedsRebaseline ]
crbug.com/408075 svg/wicd/test-rightsizing-a.xhtml [ NeedsRebaseline ]
crbug.com/408075 svg/wicd/test-scalable-background-image1.xhtml [ NeedsRebaseline ]
crbug.com/408075 svg/wicd/test-scalable-background-image2.xhtml [ NeedsRebaseline ]
crbug.com/408075 svg/zoom/text/zoom-foreignObject.svg [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/bugs/bug128229.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/bugs/bug22019.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/bugs/bug5538.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/bugs/bug73321.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-cell.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-column-group.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-column.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-quirks.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-row-group.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_border-table-row.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_fixed-bg.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_layers-hide.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-cell.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-column-group.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-column.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-row-group.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla_expected_failures/marvin/backgr_position-table-row.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_index.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_layers-opacity.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_position-table.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-cell.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-column-group.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-column.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-row-group.html [ NeedsRebaseline ]
crbug.com/408075 tables/mozilla/marvin/backgr_simple-table-row.html [ NeedsRebaseline ]
crbug.com/408075 virtual/antialiasedtext/fast/text/decorations-transformed.html [ NeedsRebaseline ]
crbug.com/408075 virtual/antialiasedtext/fast/text/decorations-with-text-combine.html [ NeedsRebaseline ]
crbug.com/408075 virtual/antialiasedtext/fast/text/international/rtl-white-space-pre-wrap.html [ NeedsRebaseline ]
crbug.com/408075 virtual/antialiasedtext/fast/text/line-breaks.html [ NeedsRebaseline ]
crbug.com/408075 virtual/antialiasedtext/fast/text/stroking-decorations.html [ NeedsRebaseline ]
crbug.com/408075 virtual/antialiasedtext/fast/text/trailing-white-space-2.html [ NeedsRebaseline ]
crbug.com/408075 virtual/antialiasedtext/fast/text/trailing-white-space.html [ NeedsRebaseline ]

crbug.com/374569 [ Win ] http/tests/navigation/beacon-cross-origin.html [ Pass Failure Timeout ]
crbug.com/374572 svg/filters/feImage-target-reappend-to-document.svg [ Pass Failure ]
crbug.com/374572 svg/dynamic-updates/SVGImageElement-svgdom-preserveAspectRatio-prop.html [ Pass ImageOnlyFailure ]
Expand Down
7 changes: 7 additions & 0 deletions Source/platform/fonts/skia/SimpleFontDataSkia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ void SimpleFontData::platformInit()
m_fontMetrics.setLineGap(lineGap);
m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));

SkScalar underlineThickness, underlinePosition;
if (metrics.hasUnderlineThickness(&underlineThickness)
&& metrics.hasUnderlinePosition(&underlinePosition)) {
m_fontMetrics.setUnderlineThickness(SkScalarToFloat(underlineThickness));
m_fontMetrics.setUnderlinePosition(SkScalarToFloat(-underlinePosition));
}

if (platformData().orientation() == Vertical && !isTextOrientationFallback()) {
static const uint32_t vheaTag = SkSetFourByteTag('v', 'h', 'e', 'a');
static const uint32_t vorgTag = SkSetFourByteTag('V', 'O', 'R', 'G');
Expand Down

0 comments on commit 8e8bffd

Please sign in to comment.