https://bugs.webkit.org/show_bug.cgi?id=135403
Reviewed by Darin Adler.
Source/WebCore:
When italics is specified on a font, and the font isn't coming from the cache, we ask
the SimpleFontData to provide a non-synthetic-italic version of itself. Our current
implementation doesn't preserve whether or not the SimpleFontData includes vertical
glyphs (glyphs that are not rotated when drawn in the vertical writing mode), which
determines which baseline we use to lay out the text. By passing "false" to
the isTextOrientationFallback argument to SimpleFontData::create(), we preserve this
hasVerticalGlyphs flag.
Test: fast/text/international/synthesized-italic-vertical-latin-double.html
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::nonSyntheticItalicFontData):
* testing/Internals.cpp:
(WebCore::Internals::invalidateFontCache): Add "invalidateFontCache" to window.internals.
* testing/Internals.h: Ditto.
* testing/Internals.idl: Ditto.
LayoutTests:
Laying out the same string twice (where there is a cache collision) should be rendered
the same as laying out similar strings (where there is no cache collision).
* fast/text/international/synthesized-italic-vertical-latin-double-expected.html: Added.
* fast/text/international/synthesized-italic-vertical-latin-double.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172504
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-08-12 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Fonts forced to use non synthetic italics might be laid out with the incorrect baseline
+ https://bugs.webkit.org/show_bug.cgi?id=135403
+
+ Reviewed by Darin Adler.
+
+ Laying out the same string twice (where there is a cache collision) should be rendered
+ the same as laying out similar strings (where there is no cache collision).
+
+ * fast/text/international/synthesized-italic-vertical-latin-double-expected.html: Added.
+ * fast/text/international/synthesized-italic-vertical-latin-double.html: Added.
+
2014-08-12 Renata Hodovan <rhodovan.u-szeged@partner.samsung.com>
Make sure that begin time cannot be greater than SMILTime::indefiniteValue unintentionally.
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <style>
+ html {
+ -webkit-writing-mode: vertical-lr;
+ }
+ p {
+ font-size: 30px;
+ font-style: italic;
+ }
+ </style>
+</head>
+<body>
+ <script>
+ if (window.internals)
+ window.internals.invalidateFontCache();
+ </script>
+ <p style="color: white;">ABC丹</p>
+ <p>ABC羽</p>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <style>
+ html {
+ -webkit-writing-mode: vertical-lr;
+ }
+ p {
+ font-size: 30px;
+ font-style: italic;
+ }
+ </style>
+</head>
+<body>
+ <script>
+ if (window.internals)
+ window.internals.invalidateFontCache();
+ </script>
+ <p style="color: white;">ABC丹羽 亮介</p>
+ <p>ABC羽</p>
+</body>
+</html>
+2014-08-12 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Fonts forced to use non synthetic italics might be laid out with the incorrect baseline
+ https://bugs.webkit.org/show_bug.cgi?id=135403
+
+ Reviewed by Darin Adler.
+
+ When italics is specified on a font, and the font isn't coming from the cache, we ask
+ the SimpleFontData to provide a non-synthetic-italic version of itself. Our current
+ implementation doesn't preserve whether or not the SimpleFontData includes vertical
+ glyphs (glyphs that are not rotated when drawn in the vertical writing mode), which
+ determines which baseline we use to lay out the text. By passing "false" to
+ the isTextOrientationFallback argument to SimpleFontData::create(), we preserve this
+ hasVerticalGlyphs flag.
+
+ Test: fast/text/international/synthesized-italic-vertical-latin-double.html
+
+ * platform/graphics/SimpleFontData.cpp:
+ (WebCore::SimpleFontData::nonSyntheticItalicFontData):
+ * testing/Internals.cpp:
+ (WebCore::Internals::invalidateFontCache): Add "invalidateFontCache" to window.internals.
+ * testing/Internals.h: Ditto.
+ * testing/Internals.idl: Ditto.
+
2014-08-12 Peyton Randolph <prandolph@apple.com>
Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture.
#if PLATFORM(COCOA)
nonSyntheticItalicFontPlatformData.m_syntheticOblique = false;
#endif
- m_derivedFontData->nonSyntheticItalic = create(nonSyntheticItalicFontPlatformData, isCustomFont(), false, true);
+ m_derivedFontData->nonSyntheticItalic = create(nonSyntheticItalicFontPlatformData, isCustomFont());
}
return m_derivedFontData->nonSyntheticItalic;
}
#include "Element.h"
#include "EventHandler.h"
#include "ExceptionCode.h"
+#include "FontCache.h"
#include "FormController.h"
#include "FrameLoader.h"
#include "FrameView.h"
document->frame()->editor().setMarkedTextMatchesAreHighlighted(flag);
}
+void Internals::invalidateFontCache()
+{
+ fontCache().invalidate();
+}
+
void Internals::setScrollViewPosition(long x, long y, ExceptionCode& ec)
{
Document* document = contextDocument();
void addTextMatchMarker(const Range*, bool isActive);
void setMarkedTextMatchesAreHighlighted(bool, ExceptionCode&);
+ void invalidateFontCache();
+
void setScrollViewPosition(long x, long y, ExceptionCode&);
void setPagination(const String& mode, int gap, ExceptionCode& ec) { setPagination(mode, gap, 0, ec); }
void setPagination(const String& mode, int gap, int pageLength, ExceptionCode&);
void addTextMatchMarker(Range range, boolean isActive);
[RaisesException] void setMarkedTextMatchesAreHighlighted(boolean flag);
+ void invalidateFontCache();
+
[RaisesException] void setScrollViewPosition(long x, long y);
[RaisesException] void setPagination(DOMString mode, long gap, optional long pageLength);