WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-88684-20120710170938.patch (text/plain), 4.28 KB, created by
Xianzhu Wang
on 2012-07-10 17:09:39 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Xianzhu Wang
Created:
2012-07-10 17:09:39 PDT
Size:
4.28 KB
patch
obsolete
>Subversion Revision: 122278 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 516a1395a33a47ae6231190678e1de7196f76b83..c42d5ef0e2cfdc3f708a782c80aaabe3465bf85a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2012-07-10 Xianzhu Wang <wangxianzhu@chromium.org> >+ >+ [Chromium] Sometimes bottom of text is truncated when page has a fractional scale >+ https://bugs.webkit.org/show_bug.cgi?id=88684 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When the page has a fractional scale, the ascent and descent part of the fonts might be fractional. >+ If the descent part is scaled down, the bottom of the text might be truncated when displayed. >+ To avoid that, borrow one unit from the ascent when possible. >+ >+ Test: platform/chromium/fast/text/descent-clip-in-scaled-page.html >+ >+ * platform/graphics/skia/SimpleFontDataSkia.cpp: >+ (WebCore::SimpleFontData::platformInit): >+ > 2012-07-10 Philip Rogers <pdr@google.com> > > Crash due to SVG animation element not removed from target (before reset) >diff --git a/Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp b/Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp >index b4d20b03a6c7c7355c7b1ca58aa3e0a396f22fea..8acc1da7a69609e3cf10a1d6a453698df57d1a51 100644 >--- a/Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp >+++ b/Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp >@@ -94,6 +94,15 @@ void SimpleFontData::platformInit() > SkScalar height = -metrics.fAscent + metrics.fDescent + metrics.fLeading; > ascent = SkScalarRound(-metrics.fAscent); > descent = SkScalarRound(height) - ascent; >+ >+ // If the descent is rounded down, the descent part of the glyph may be >+ // truncated when displayed in a 'overflow: hidden' container. >+ // To avoid that, borrow 1 unit from the ascent when possible. >+ // FIXME: This can be removed if sub-pixel ascent/descent is supported. >+ if (descent < SkScalarToFloat(metrics.fDescent) && ascent >= 1) { >+ descent++; >+ ascent--; >+ } > } > > m_fontMetrics.setAscent(ascent); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index b1adce8b7209296b3256298c1de54f49cf2cd86e..93b4b923c3ee5b33f26beb333b25e05d6ee1922e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2012-07-10 Xianzhu Wang <wangxianzhu@chromium.org> >+ >+ [Chromium] Sometimes bottom of text is truncated when page has a fractional scale >+ https://bugs.webkit.org/show_bug.cgi?id=88684 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/chromium/fast/text/descent-clip-in-scaled-page-expected.html: Added. >+ * platform/chromium/fast/text/descent-clip-in-scaled-page.html: Added. >+ > 2012-07-10 Philip Rogers <pdr@google.com> > > Crash due to SVG animation element not removed from target (before reset) >diff --git a/LayoutTests/platform/chromium/fast/text/descent-clip-in-scaled-page-expected.html b/LayoutTests/platform/chromium/fast/text/descent-clip-in-scaled-page-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..a6b977a295e85b7c074cd4b2c64d6f56f81595f1 >--- /dev/null >+++ b/LayoutTests/platform/chromium/fast/text/descent-clip-in-scaled-page-expected.html >@@ -0,0 +1,18 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<style> >+ div { >+ font-family: ahem; >+ font-size: 16px; >+ } >+</style> >+<script> >+ if (window.internals) >+ window.internals.settings.setPageScaleFactor(1.7, 0, 0); >+</script> >+</head> >+<body> >+ <div>pppp</div> >+</body> >+</html> >diff --git a/LayoutTests/platform/chromium/fast/text/descent-clip-in-scaled-page.html b/LayoutTests/platform/chromium/fast/text/descent-clip-in-scaled-page.html >new file mode 100644 >index 0000000000000000000000000000000000000000..21db3159afed75e99326956c0649a34c38dff72f >--- /dev/null >+++ b/LayoutTests/platform/chromium/fast/text/descent-clip-in-scaled-page.html >@@ -0,0 +1,19 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<style> >+ div { >+ font-family: ahem; >+ font-size: 16px; >+ overflow: hidden; >+ } >+</style> >+<script> >+ if (window.internals) >+ window.internals.settings.setPageScaleFactor(1.7, 0, 0); >+</script> >+</head> >+<body> >+ <div>pppp</div> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 88684
:
151557
|
151563
|
151734
|
151988
|
152001
|
152085
|
152309
|
152339
|
155634