Commit 414e7c87 authored by eae@chromium.org's avatar eae@chromium.org

Don't round x-axis for text runs when subpixel font scaling is enabled

When subpixel font scaling is enabled text runs are positioned at
subpixel boundaries on the x-axis and thus there is no reason to snap
the x value.
We still round the y-axis to ensure consistent line heights.

BUG=164167
R=leviw@chromium.org, mstensho@opera.com

Review URL: https://codereview.chromium.org/300623007

git-svn-id: svn://svn.chromium.org/blink/trunk@174992 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent bac15b18
...@@ -210,7 +210,7 @@ crbug.com/318980 [ Linux ] editing/selection/7152-1.html [ Pass ] ...@@ -210,7 +210,7 @@ crbug.com/318980 [ Linux ] editing/selection/7152-1.html [ Pass ]
crbug.com/318980 [ Linux ] editing/selection/linux_selection_color.html [ Pass ] crbug.com/318980 [ Linux ] editing/selection/linux_selection_color.html [ Pass ]
crbug.com/318980 [ Linux ] fast/forms/input-disabled-color.html [ Pass ] crbug.com/318980 [ Linux ] fast/forms/input-disabled-color.html [ Pass ]
crbug.com/318980 [ Linux ] fast/ruby/select-ruby.html [ Pass ] crbug.com/318980 [ Linux ] fast/ruby/select-ruby.html [ Pass ]
crbug.com/318980 [ Linux ] fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html [ Pass ] #crbug.com/318980 [ Linux ] fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html [ Pass ]
crbug.com/318980 [ Linux ] svg/W3C-SVG-1.1/text-tselect-02-f.svg [ Pass ] crbug.com/318980 [ Linux ] svg/W3C-SVG-1.1/text-tselect-02-f.svg [ Pass ]
# Untriaged Linux-specific Aura failures # Untriaged Linux-specific Aura failures
...@@ -279,7 +279,7 @@ crbug.com/237270 http/tests/images/png-partial-load.html [ Pass Timeout ] ...@@ -279,7 +279,7 @@ crbug.com/237270 http/tests/images/png-partial-load.html [ Pass Timeout ]
crbug.com/237270 http/tests/images/png-partial-load-no-alpha.html [ Pass Timeout ] crbug.com/237270 http/tests/images/png-partial-load-no-alpha.html [ Pass Timeout ]
# FIXME: This is flaky on XP, too, but we omit that until things are rebaselined. # FIXME: This is flaky on XP, too, but we omit that until things are rebaselined.
crbug.com/317806 [ Mac ] fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html [ Pass ImageOnlyFailure ] #crbug.com/317806 [ Mac ] fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html [ Pass ImageOnlyFailure ]
crbug.com/341435 http/tests/images/image-with-origin-header.html [ Pass Timeout ] crbug.com/341435 http/tests/images/image-with-origin-header.html [ Pass Timeout ]
...@@ -859,19 +859,48 @@ crbug.com/316150 inspector/timeline/timeline-network-received-data.html [ Failur ...@@ -859,19 +859,48 @@ crbug.com/316150 inspector/timeline/timeline-network-received-data.html [ Failur
# Macs do not support keyboard events to show a context menu. # Macs do not support keyboard events to show a context menu.
crbug.com/345913 [ Mac ] editing/spelling/spelling-on-context-menu-key.html [ Failure ] crbug.com/345913 [ Mac ] editing/spelling/spelling-on-context-menu-key.html [ Failure ]
crbug.com/164167 [ Mac ] css3/unicode-bidi-isolate-basic.html [ NeedsRebaseline ] crbug.com/164167 css1/box_properties/float_on_text_elements.html [ NeedsRebaseline ]
crbug.com/164167 editing/selection/3690703-2.html [ NeedsRebaseline ]
crbug.com/164167 editing/selection/3690703.html [ NeedsRebaseline ]
crbug.com/164167 editing/selection/3690719.html [ NeedsRebaseline ]
crbug.com/164167 fast/backgrounds/background-inherit-color-bug.html [ NeedsRebaseline ]
crbug.com/164167 fast/block/float/016.html [ NeedsRebaseline ]
crbug.com/164167 fast/borders/border-antialiasing.html [ NeedsRebaseline ] crbug.com/164167 fast/borders/border-antialiasing.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/overflow-across-columns-percent-height.html [ NeedsRebaseline ] crbug.com/164167 fast/multicol/column-rules.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/scrolling-overflow.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/overflow-unsplittable.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/nested-columns.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/vertical-rl/nested-columns.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/column-rules-stacking.html [ NeedsRebaseline ] crbug.com/164167 fast/multicol/column-rules-stacking.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/vertical-lr/nested-columns.html [ NeedsRebaseline ] crbug.com/164167 fast/multicol/nested-columns.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/span/anonymous-style-inheritance.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/overflow-across-columns.html [ NeedsRebaseline ] crbug.com/164167 fast/multicol/overflow-across-columns.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/column-rules.html [ NeedsRebaseline ] crbug.com/164167 fast/multicol/overflow-across-columns-percent-height.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/overflow-unsplittable.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/positive-leading.html [ NeedsRebaseline ] crbug.com/164167 fast/multicol/positive-leading.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/scrolling-overflow.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/span/anonymous-style-inheritance.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/vertical-lr/float-multicol.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/vertical-lr/nested-columns.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/vertical-rl/float-multicol.html [ NeedsRebaseline ]
crbug.com/164167 fast/multicol/vertical-rl/nested-columns.html [ NeedsRebaseline ]
crbug.com/164167 fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html [ NeedsManualRebaseline ]
crbug.com/164167 fast/table/frame-and-rules.html [ NeedsRebaseline ]
crbug.com/164167 fast/text/international/thai-line-breaks.html [ NeedsRebaseline ]
crbug.com/164167 fast/writing-mode/Kusa-Makura-background-canvas.html [ NeedsRebaseline ]
crbug.com/164167 [ Mac ] css3/unicode-bidi-isolate-basic.html [ NeedsRebaseline ]
crbug.com/164167 media/audio-repaint.html [ NeedsRebaseline ]
crbug.com/164167 media/video-zoom-controls.html [ NeedsRebaseline ]
crbug.com/164167 svg/custom/svg-fonts-in-html.html [ NeedsRebaseline ]
crbug.com/164167 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ NeedsRebaseline ]
crbug.com/164167 svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml [ NeedsRebaseline ]
crbug.com/164167 svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml [ NeedsRebaseline ]
crbug.com/164167 svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml [ NeedsRebaseline ]
crbug.com/164167 tables/mozilla/bugs/bug131020.html [ NeedsRebaseline ]
crbug.com/164167 tables/mozilla/bugs/bug3309-1.html [ NeedsRebaseline ]
crbug.com/164167 tables/mozilla/bugs/bug6304.html [ NeedsRebaseline ]
crbug.com/164167 tables/mozilla/bugs/bug8381.html [ NeedsRebaseline ]
crbug.com/164167 [ Win7 ] virtual/windows-directwrite/fast/text/international/bidi-LDB-2-CSS.html [ NeedsRebaseline ]
crbug.com/164167 [ Win7 ] virtual/windows-directwrite/fast/text/international/bidi-LDB-2-formatting-characters.html [ NeedsRebaseline ]
crbug.com/164167 [ Win7 ] virtual/windows-directwrite/fast/text/international/bidi-LDB-2-HTML.html [ NeedsRebaseline ]
crbug.com/164167 [ Win7 ] virtual/windows-directwrite/fast/text/international/thai-line-breaks.html [ NeedsRebaseline ]
crbug.com/164167 [ Win7 ] virtual/windows-directwrite/fast/text/softHyphen.html [ NeedsRebaseline ]
crbug.com/164167 [ Win7 ] virtual/windows-directwrite/fast/text/sub-pixel/text-scaling-pixel.html [ NeedsRebaseline ]
crbug.com/316349 inspector-protocol/page/enable-disable.html [ Failure Pass ] crbug.com/316349 inspector-protocol/page/enable-disable.html [ Failure Pass ]
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<head> <head>
<style> <style>
.block { .block {
overflow: auto; overflow: hidden;
margin: 0 1px; margin: 0 0.6px;
} }
</style> </style>
</head> </head>
......
...@@ -478,7 +478,13 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, ...@@ -478,7 +478,13 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
LayoutUnit paintEnd = isHorizontal() ? paintInfo.rect.maxX() : paintInfo.rect.maxY(); LayoutUnit paintEnd = isHorizontal() ? paintInfo.rect.maxX() : paintInfo.rect.maxY();
LayoutUnit paintStart = isHorizontal() ? paintInfo.rect.x() : paintInfo.rect.y(); LayoutUnit paintStart = isHorizontal() ? paintInfo.rect.x() : paintInfo.rect.y();
LayoutPoint adjustedPaintOffset = roundedIntPoint(paintOffset); // When subpixel font scaling is enabled text runs are positioned at
// subpixel boundaries on the x-axis and thus there is no reason to
// snap the x value. We still round the y-axis to ensure consistent
// line heights.
LayoutPoint adjustedPaintOffset = RuntimeEnabledFeatures::subpixelFontScalingEnabled()
? LayoutPoint(paintOffset.x(), paintOffset.y().round())
: roundedIntPoint(paintOffset);
if (logicalStart >= paintEnd || logicalStart + logicalExtent <= paintStart) if (logicalStart >= paintEnd || logicalStart + logicalExtent <= paintStart)
return; return;
...@@ -517,7 +523,6 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, ...@@ -517,7 +523,6 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
adjustedPaintOffset.move(0, styleToUse->isHorizontalWritingMode() ? 0 : -logicalHeight()); adjustedPaintOffset.move(0, styleToUse->isHorizontalWritingMode() ? 0 : -logicalHeight());
FloatPoint boxOrigin = locationIncludingFlipping(); FloatPoint boxOrigin = locationIncludingFlipping();
// FIXME: Shouldn't these offsets be rounded?
boxOrigin.move(adjustedPaintOffset.x().toFloat(), adjustedPaintOffset.y().toFloat()); boxOrigin.move(adjustedPaintOffset.x().toFloat(), adjustedPaintOffset.y().toFloat());
FloatRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight())); FloatRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight()));
......
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