[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:49:30 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 0452cfefe754d94468cc0edf61a0fec00747b41c
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 21 10:42:44 2010 +0000
2010-10-21 takano takumi <takano1 at asia.apple.com>
Reviewed by Dan Bernstein.
Need to swap glyphs for vertical writing
https://bugs.webkit.org/show_bug.cgi?id=46973
* fast/text/international/vertical-text-glyph-test.html: Added.
* fast/text/international/vertical-text-metrics-test.html: Added.
* platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum: Added.
* platform/mac/fast/text/international/vertical-text-glyph-test-expected.png: Added.
* platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt: Added.
* platform/mac/fast/text/international/vertical-text-metrics-test-expected.txt: Added.
2010-10-21 takano takumi <takano1 at asia.apple.com>
Reviewed by Dan Bernstein.
Need to swap glyphs for vertical writing
https://bugs.webkit.org/show_bug.cgi?id=46973
Made changes to pass the writing-mode orientation flag in RenderStyle down to FontPlatformData,
and ultimately to CoreText APIs in both font complex path and fast path.
Tests: fast/text/international/vertical-text-glyph-test.html
fast/text/international/vertical-text-metrics-test.html
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj: Added platform/graphics/FontOrientation.h.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): Added font orientation parameter to SimpleFontData.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty): Set appropriate font orientation to the font description
when writing-mode is being specified.
* loader/CachedFont.cpp:
(WebCore::CachedFont::platformDataFromCustomData): Made to pass font orientation to FontPlatformData.
* loader/CachedFont.h:
* platform/graphics/FontCache.cpp: Added font orientation to FontPlatformDataCacheKey
(WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
(WebCore::FontPlatformDataCacheKey::operator==):
(WebCore::computeHash):
(WebCore::FontCache::getCachedFontPlatformData):
* platform/graphics/FontDescription.h: Added font orientation support to FontDescription class
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::orientation):
(WebCore::FontDescription::setOrientation):
(WebCore::FontDescription::operator==):
* platform/graphics/FontOrientation.h: Added.
* platform/graphics/SimpleFontData.h:
* platform/graphics/cairo/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/cairo/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
* platform/graphics/cocoa/FontPlatformData.h: Added font orientation support to FontPlatformData class
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::orientation):
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::operator==):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm: Added font orientation support
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::allowsLigatures): Don't allow ligatures when the font is vertical orientation.
(WebCore::FontPlatformData::description):
* platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/haiku/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/haiku/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
* platform/graphics/mac/FontCacheMac.mm: Added font orientation parameter when creating FontPlatformData object.
(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/mac/FontCustomPlatformData.cpp: Added font orientation parameter when creating FontPlatformData object.
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h: Changed to pass font orientation parameter to fontPlatformData()
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill): Changed to use CoreText to extract glyphs when the current font is vertical orientation.
CoreText automatically swaps glyphs with vertical variants when the font orientation is vertical.
* platform/graphics/mac/SimpleFontDataCoreText.cpp: Added vertical form attribute to the attribute dictionary for a CTLine.
(WebCore::SimpleFontData::getCFStringAttributes):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformBoundsForGlyph): Changed to use CoreText (from CG) to support vertical metrics.
(WebCore::SimpleFontData::platformWidthForGlyph): Made to use CoreText, instead of wkGetGlyphTransformedAdvances,
to get vertical metrics when the font orientation is vertical.
* platform/graphics/qt/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
* platform/graphics/qt/FontCustomPlatformDataQt.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/skia/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/skia/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
* platform/graphics/win/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
* platform/graphics/win/FontCustomPlatformDataCairo.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.h: Changed to pass font orientation to fontPlatformData()
* platform/graphics/wince/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/wince/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
* platform/graphics/wx/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/wx/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 85def69..74a1fe3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-21 takano takumi <takano1 at asia.apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Need to swap glyphs for vertical writing
+ https://bugs.webkit.org/show_bug.cgi?id=46973
+
+ * fast/text/international/vertical-text-glyph-test.html: Added.
+ * fast/text/international/vertical-text-metrics-test.html: Added.
+ * platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum: Added.
+ * platform/mac/fast/text/international/vertical-text-glyph-test-expected.png: Added.
+ * platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt: Added.
+ * platform/mac/fast/text/international/vertical-text-metrics-test-expected.txt: Added.
+
2010-10-21 Julie Parent <jparent at chromium.org>
Reviewed by Tony Chang.
diff --git a/LayoutTests/fast/text/international/vertical-text-glyph-test.html b/LayoutTests/fast/text/international/vertical-text-glyph-test.html
new file mode 100644
index 0000000..dad92fa
--- /dev/null
+++ b/LayoutTests/fast/text/international/vertical-text-glyph-test.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8">
+<title>Vertical text metrics test</title>
+<style>
+body {
+ font-family: "HiraMinPro-W3";
+ font-size: large;
+}
+#horizontal_TB {
+ -webkit-writing-mode: horizontal-tb;
+}
+#horizontal_BT {
+ -webkit-writing-mode: horizontal-bt;
+}
+#vertical_RL {
+ -webkit-writing-mode: vertical-rl;
+}
+#vertical_LR {
+ -webkit-writing-mode: vertical-lr;
+}
+#horizontal_TB_complex {
+ -webkit-writing-mode: horizontal-tb;
+ text-rendering: optimizelegibility;
+}
+#horizontal_BT_complex {
+ -webkit-writing-mode: horizontal-bt;
+ text-rendering: optimizelegibility;
+}
+#vertical_RL_complex {
+ -webkit-writing-mode: vertical-rl;
+ text-rendering: optimizelegibility;
+}
+#vertical_LR_complex {
+ -webkit-writing-mode: vertical-lr;
+ text-rendering: optimizelegibility;
+}
+</style>
+</head>
+<body onload="test()">
+<p>Simple text path</p>
+<span id="vertical_RL">abあ「」。</span><br>
+<br>
+<hr>
+<p>Complex text path</p>
+<span id="vertical_RL_complex">abあ「」。1⃝</span><br>
+<br>
+<hr>
+</body>
+</html>
diff --git a/LayoutTests/fast/text/international/vertical-text-metrics-test.html b/LayoutTests/fast/text/international/vertical-text-metrics-test.html
new file mode 100644
index 0000000..b29ecae
--- /dev/null
+++ b/LayoutTests/fast/text/international/vertical-text-metrics-test.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8">
+<title>Vertical text metrics test</title>
+<script>
+function print(message)
+{
+ var paragraph = document.createElement("li");
+ paragraph.appendChild(document.createTextNode(message));
+ document.getElementById("console").appendChild(paragraph);
+}
+function test()
+{
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var pElems = document.getElementsByTagName("span");
+ for ( i = 0 ; i < pElems.length ; ++i )
+ {
+ var elem = pElems[i];
+ print("width=" + elem.offsetWidth);
+ }
+}
+</script>
+<style>
+body {
+ font-family: "HiraMinPro-W3";
+ font-size: large;
+}
+#horizontal_TB {
+ -webkit-writing-mode: horizontal-tb;
+}
+#horizontal_BT {
+ -webkit-writing-mode: horizontal-bt;
+}
+#vertical_RL {
+ -webkit-writing-mode: vertical-rl;
+}
+#vertical_LR {
+ -webkit-writing-mode: vertical-lr;
+}
+#horizontal_TB_complex {
+ -webkit-writing-mode: horizontal-tb;
+ text-rendering: optimizelegibility;
+}
+#horizontal_BT_complex {
+ -webkit-writing-mode: horizontal-bt;
+ text-rendering: optimizelegibility;
+}
+#vertical_RL_complex {
+ -webkit-writing-mode: vertical-rl;
+ text-rendering: optimizelegibility;
+}
+#vertical_LR_complex {
+ -webkit-writing-mode: vertical-lr;
+ text-rendering: optimizelegibility;
+}
+</style>
+</head>
+<body onload="test()">
+<p>Simple text path</p>
+<span id="horizontal_TB">abあ「」。</span><br>
+<span id="horizontal_BT">abあ「」。</span><br>
+<span id="vertical_RL">abあ「」。</span><br>
+<span id="vertical_LR">abあ「」。</span><br>
+<br>
+<hr>
+<p>Complex text path</p>
+<span id="horizontal_TB_complex">abあ「」。1⃝</span><br>
+<span id="horizontal_BT_complex">abあ「」。1⃝</span><br>
+<span id="vertical_RL_complex">abあ「」。1⃝</span><br>
+<span id="vertical_LR_complex">abあ「」。1⃝</span><br>
+<br>
+<hr>
+<p><ol id=console></ol></p>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum
new file mode 100644
index 0000000..3e6afcf
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.checksum
@@ -0,0 +1 @@
+83a57acedeb979e93959cf59fe59cdfc
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.png b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.png
new file mode 100644
index 0000000..cd38515
Binary files /dev/null and b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt
new file mode 100644
index 0000000..76e348d
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt
@@ -0,0 +1,26 @@
+CONSOLE MESSAGE: line 41: ReferenceError: Can't find variable: test
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x442
+ RenderBlock {HTML} at (0,0) size 800x442
+ RenderBody {BODY} at (8,18) size 784x415
+ RenderBlock {P} at (0,0) size 784x27
+ RenderText {#text} at (0,4) size 139x19
+ text run at (0,4) width 139: "Simple text path"
+ RenderBlock (anonymous) at (0,45) size 784x129
+ RenderBlock {SPAN} at (0,0) size 27x95
+ RenderText {#text} at (4,0) size 95x19
+ text run at (4,0) width 95: "ab\x{3042}\x{300C}\x{300D}\x{3002}"
+ RenderBR {BR} at (27,79) size 0x19
+ RenderBR {BR} at (0,106) size 0x19
+ RenderBlock {HR} at (0,183) size 784x2 [border: (1px inset #000000)]
+ RenderBlock {P} at (0,203) size 784x27
+ RenderText {#text} at (0,4) size 157x19
+ text run at (0,4) width 157: "Complex text path"
+ RenderBlock (anonymous) at (0,248) size 784x156
+ RenderBlock {SPAN} at (0,0) size 27x122
+ RenderText {#text} at (4,0) size 122x19
+ text run at (4,0) width 122: "ab\x{3042}\x{300C}\x{300D}\x{3002}1\x{20DD}"
+ RenderBR {BR} at (27,106) size 0x19
+ RenderBR {BR} at (0,133) size 0x19
+ RenderBlock {HR} at (0,413) size 784x2 [border: (1px inset #000000)]
diff --git a/LayoutTests/platform/mac/fast/text/international/vertical-text-metrics-test-expected.txt b/LayoutTests/platform/mac/fast/text/international/vertical-text-metrics-test-expected.txt
new file mode 100644
index 0000000..9edca9f
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/international/vertical-text-metrics-test-expected.txt
@@ -0,0 +1,23 @@
+Simple text path
+
+abあ「」。
+abあ「」。
+abあ「」。
+abあ「」。
+
+Complex text path
+
+abあ「」。1⃝
+abあ「」。1⃝
+abあ「」。1⃝
+abあ「」。1⃝
+
+width=93
+width=93
+width=27
+width=27
+width=103
+width=103
+width=27
+width=27
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bcbb125..98ceacd 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,90 @@
+2010-10-21 takano takumi <takano1 at asia.apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Need to swap glyphs for vertical writing
+ https://bugs.webkit.org/show_bug.cgi?id=46973
+
+ Made changes to pass the writing-mode orientation flag in RenderStyle down to FontPlatformData,
+ and ultimately to CoreText APIs in both font complex path and fast path.
+
+ Tests: fast/text/international/vertical-text-glyph-test.html
+ fast/text/international/vertical-text-metrics-test.html
+
+ * WebCore.exp.in:
+ * WebCore.xcodeproj/project.pbxproj: Added platform/graphics/FontOrientation.h.
+ * css/CSSFontFaceSource.cpp:
+ (WebCore::CSSFontFaceSource::getFontData): Added font orientation parameter to SimpleFontData.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty): Set appropriate font orientation to the font description
+ when writing-mode is being specified.
+ * loader/CachedFont.cpp:
+ (WebCore::CachedFont::platformDataFromCustomData): Made to pass font orientation to FontPlatformData.
+ * loader/CachedFont.h:
+ * platform/graphics/FontCache.cpp: Added font orientation to FontPlatformDataCacheKey
+ (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
+ (WebCore::FontPlatformDataCacheKey::operator==):
+ (WebCore::computeHash):
+ (WebCore::FontCache::getCachedFontPlatformData):
+ * platform/graphics/FontDescription.h: Added font orientation support to FontDescription class
+ (WebCore::FontDescription::FontDescription):
+ (WebCore::FontDescription::orientation):
+ (WebCore::FontDescription::setOrientation):
+ (WebCore::FontDescription::operator==):
+ * platform/graphics/FontOrientation.h: Added.
+ * platform/graphics/SimpleFontData.h:
+ * platform/graphics/cairo/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/cairo/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
+ * platform/graphics/cocoa/FontPlatformData.h: Added font orientation support to FontPlatformData class
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::orientation):
+ (WebCore::FontPlatformData::hash):
+ (WebCore::FontPlatformData::operator==):
+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Added font orientation support
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::operator=):
+ (WebCore::FontPlatformData::allowsLigatures): Don't allow ligatures when the font is vertical orientation.
+ (WebCore::FontPlatformData::description):
+ * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/haiku/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/haiku/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
+ * platform/graphics/mac/FontCacheMac.mm: Added font orientation parameter when creating FontPlatformData object.
+ (WebCore::FontCache::getFontDataForCharacters):
+ (WebCore::FontCache::createFontPlatformData):
+ * platform/graphics/mac/FontCustomPlatformData.cpp: Added font orientation parameter when creating FontPlatformData object.
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/mac/FontCustomPlatformData.h: Changed to pass font orientation parameter to fontPlatformData()
+ * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
+ (WebCore::GlyphPage::fill): Changed to use CoreText to extract glyphs when the current font is vertical orientation.
+ CoreText automatically swaps glyphs with vertical variants when the font orientation is vertical.
+ * platform/graphics/mac/SimpleFontDataCoreText.cpp: Added vertical form attribute to the attribute dictionary for a CTLine.
+ (WebCore::SimpleFontData::getCFStringAttributes):
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::SimpleFontData::platformBoundsForGlyph): Changed to use CoreText (from CG) to support vertical metrics.
+ (WebCore::SimpleFontData::platformWidthForGlyph): Made to use CoreText, instead of wkGetGlyphTransformedAdvances,
+ to get vertical metrics when the font orientation is vertical.
+ * platform/graphics/qt/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
+ * platform/graphics/qt/FontCustomPlatformDataQt.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/skia/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/skia/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
+ * platform/graphics/win/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/win/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
+ * platform/graphics/win/FontCustomPlatformDataCairo.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/win/FontCustomPlatformDataCairo.h: Changed to pass font orientation to fontPlatformData()
+ * platform/graphics/wince/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/wince/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
+ * platform/graphics/wx/FontCustomPlatformData.cpp: Changed to pass font orientation to fontPlatformData()
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/wx/FontCustomPlatformData.h: Changed to pass font orientation to fontPlatformData()
+
2010-10-20 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 6948d67..19b6e86 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -384,7 +384,7 @@ __ZN7WebCore16DeviceMotionData12Acceleration6createEbdbdbd
__ZN7WebCore16DeviceMotionData12RotationRate6createEbdbdbd
__ZN7WebCore16DeviceMotionData6createEN3WTF10PassRefPtrINS0_12AccelerationEEES4_NS2_INS0_12RotationRateEEEbd
__ZN7WebCore16FontFallbackList15releaseFontDataEv
-__ZN7WebCore16FontPlatformDataC1EP6NSFontbb
+__ZN7WebCore16FontPlatformDataC1EP6NSFontbbNS_15FontOrientationE
__ZN7WebCore16FontPlatformDataD1Ev
__ZN7WebCore16HTMLInputElement13setAutofilledEb
__ZN7WebCore16LegacyWebArchive19createFromSelectionEPNS_5FrameE
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 5bc440b..860273d 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -5526,6 +5526,7 @@
F5C041E70FFCA96D00839D4A /* JSHTMLDataListElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041E20FFCA96D00839D4A /* JSHTMLDataListElement.h */; };
F5D3A57C106B83B300545297 /* DateComponents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D3A57A106B83B300545297 /* DateComponents.cpp */; };
F5D3A57D106B83B300545297 /* DateComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D3A57B106B83B300545297 /* DateComponents.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ F7A034C4126BF6BE007DC19E /* FontOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = F7A034C3126BF6BE007DC19E /* FontOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; };
F916C48D0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */; };
F916C48E0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */; };
F98FFF4411A2676200F548E8 /* CSSOMUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F98FFF4211A2676200F548E8 /* CSSOMUtils.cpp */; };
@@ -11577,6 +11578,7 @@
F5C2869502846DCD018635CA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
F5D3A57A106B83B300545297 /* DateComponents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateComponents.cpp; sourceTree = "<group>"; };
F5D3A57B106B83B300545297 /* DateComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateComponents.h; sourceTree = "<group>"; };
+ F7A034C3126BF6BE007DC19E /* FontOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontOrientation.h; sourceTree = "<group>"; };
F8216299029F4FB501000131 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLHttpRequestProgressEvent.cpp; sourceTree = "<group>"; };
F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSXMLHttpRequestProgressEvent.h; sourceTree = "<group>"; };
@@ -16511,6 +16513,7 @@
B2C3DA580D006CD600EF6F26 /* FontFamily.cpp */,
B2C3DA590D006CD600EF6F26 /* FontFamily.h */,
72626E010EF022FE00A07E20 /* FontFastPath.cpp */,
+ F7A034C3126BF6BE007DC19E /* FontOrientation.h */,
37ACCE410DA2980F0089E602 /* FontRenderingMode.h */,
B2C3DA5A0D006CD600EF6F26 /* FontSelector.h */,
37202198106213C600F25C4B /* FontSmoothingMode.h */,
@@ -21122,6 +21125,7 @@
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */,
9728C3141268E4390041E89B /* MarkupAccumulator.h in Headers */,
+ F7A034C4126BF6BE007DC19E /* FontOrientation.h in Headers */,
081CDFB8126ECFDB00D215CA /* DeprecatedSVGAnimatedProperty.h in Headers */,
081CDFB9126ECFDB00D215CA /* DeprecatedSVGAnimatedPropertyTraits.h in Headers */,
081CDFBA126ECFDB00D215CA /* DeprecatedSVGAnimatedTemplate.h in Headers */,
diff --git a/WebCore/css/CSSFontFaceSource.cpp b/WebCore/css/CSSFontFaceSource.cpp
index ad9bebc..4fdcc03 100644
--- a/WebCore/css/CSSFontFaceSource.cpp
+++ b/WebCore/css/CSSFontFaceSource.cpp
@@ -162,7 +162,7 @@ SimpleFontData* CSSFontFaceSource::getFontData(const FontDescription& fontDescri
if (!m_font->ensureCustomFontData())
return 0;
- fontData.set(new SimpleFontData(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic, fontDescription.renderingMode()), true, false));
+ fontData.set(new SimpleFontData(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic, fontDescription.orientation(), fontDescription.renderingMode()), true, false));
}
} else {
#if ENABLE(SVG_FONTS)
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 35406d5..da88214 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -5571,10 +5571,14 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
#endif
// CSS Text Layout Module Level 3: Vertical writing support
- case CSSPropertyWebkitWritingMode:
+ case CSSPropertyWebkitWritingMode: {
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(writingMode, WritingMode)
+ FontDescription fontDescription = m_style->fontDescription();
+ fontDescription.setOrientation(m_style->isHorizontalWritingMode() ? Horizontal : Vertical);
+ if (m_style->setFontDescription(fontDescription))
+ m_fontDirty = true;
return;
-
+ }
#if ENABLE(SVG)
default:
// Try the SVG properties
diff --git a/WebCore/loader/CachedFont.cpp b/WebCore/loader/CachedFont.cpp
index ef88af8..9095a1e 100644
--- a/WebCore/loader/CachedFont.cpp
+++ b/WebCore/loader/CachedFont.cpp
@@ -117,7 +117,7 @@ bool CachedFont::ensureCustomFontData()
return m_fontData;
}
-FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, bool italic, FontRenderingMode renderingMode)
+FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, FontRenderingMode renderingMode)
{
#if ENABLE(SVG_FONTS)
if (m_externalSVGDocument)
@@ -125,7 +125,7 @@ FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, b
#endif
#ifdef STORE_FONT_CUSTOM_PLATFORM_DATA
ASSERT(m_fontData);
- return m_fontData->fontPlatformData(static_cast<int>(size), bold, italic, renderingMode);
+ return m_fontData->fontPlatformData(static_cast<int>(size), bold, italic, orientation, renderingMode);
#else
return FontPlatformData();
#endif
diff --git a/WebCore/loader/CachedFont.h b/WebCore/loader/CachedFont.h
index 95c2423..8dc8874 100644
--- a/WebCore/loader/CachedFont.h
+++ b/WebCore/loader/CachedFont.h
@@ -27,6 +27,7 @@
#define CachedFont_h
#include "CachedResource.h"
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include <wtf/Vector.h>
@@ -62,7 +63,7 @@ public:
void beginLoadIfNeeded(CachedResourceLoader* dl);
bool ensureCustomFontData();
- FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
#if ENABLE(SVG_FONTS)
bool isSVGFont() const { return m_isSVGFont; }
diff --git a/WebCore/platform/graphics/FontCache.cpp b/WebCore/platform/graphics/FontCache.cpp
index ff865c2..e772ba1 100644
--- a/WebCore/platform/graphics/FontCache.cpp
+++ b/WebCore/platform/graphics/FontCache.cpp
@@ -55,13 +55,14 @@ FontCache::FontCache()
struct FontPlatformDataCacheKey : FastAllocBase {
FontPlatformDataCacheKey(const AtomicString& family = AtomicString(), unsigned size = 0, unsigned weight = 0, bool italic = false,
- bool isPrinterFont = false, FontRenderingMode renderingMode = NormalRenderingMode)
+ bool isPrinterFont = false, FontRenderingMode renderingMode = NormalRenderingMode, FontOrientation orientation = Horizontal)
: m_size(size)
, m_weight(weight)
, m_family(family)
, m_italic(italic)
, m_printerFont(isPrinterFont)
, m_renderingMode(renderingMode)
+ , m_orientation(orientation)
{
}
@@ -72,7 +73,7 @@ struct FontPlatformDataCacheKey : FastAllocBase {
{
return equalIgnoringCase(m_family, other.m_family) && m_size == other.m_size &&
m_weight == other.m_weight && m_italic == other.m_italic && m_printerFont == other.m_printerFont &&
- m_renderingMode == other.m_renderingMode;
+ m_renderingMode == other.m_renderingMode && m_orientation == other.m_orientation;
}
unsigned m_size;
@@ -81,6 +82,7 @@ struct FontPlatformDataCacheKey : FastAllocBase {
bool m_italic;
bool m_printerFont;
FontRenderingMode m_renderingMode;
+ FontOrientation m_orientation;
private:
static unsigned hashTableDeletedSize() { return 0xFFFFFFFFU; }
@@ -92,7 +94,7 @@ inline unsigned computeHash(const FontPlatformDataCacheKey& fontKey)
CaseFoldingHash::hash(fontKey.m_family),
fontKey.m_size,
fontKey.m_weight,
- static_cast<unsigned>(fontKey.m_italic) << 2 | static_cast<unsigned>(fontKey.m_printerFont) << 1 | static_cast<unsigned>(fontKey.m_renderingMode)
+ static_cast<unsigned>(fontKey.m_orientation) << 3 | static_cast<unsigned>(fontKey.m_italic) << 2 | static_cast<unsigned>(fontKey.m_printerFont) << 1 | static_cast<unsigned>(fontKey.m_renderingMode)
};
return StringImpl::computeHash(reinterpret_cast<UChar*>(hashCodes), sizeof(hashCodes) / sizeof(UChar));
}
@@ -191,7 +193,7 @@ FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& fo
}
FontPlatformDataCacheKey key(familyName, fontDescription.computedPixelSize(), fontDescription.weight(), fontDescription.italic(),
- fontDescription.usePrinterFont(), fontDescription.renderingMode());
+ fontDescription.usePrinterFont(), fontDescription.renderingMode(), fontDescription.orientation());
FontPlatformData* result = 0;
bool foundResult;
FontPlatformDataCache::iterator it = gFontPlatformDataCache->find(key);
diff --git a/WebCore/platform/graphics/FontDescription.h b/WebCore/platform/graphics/FontDescription.h
index 48fcaad..12900bf 100644
--- a/WebCore/platform/graphics/FontDescription.h
+++ b/WebCore/platform/graphics/FontDescription.h
@@ -26,6 +26,7 @@
#define FontDescription_h
#include "FontFamily.h"
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include "FontSmoothingMode.h"
#include "FontTraitsMask.h"
@@ -55,6 +56,7 @@ public:
FontDescription()
: m_specifiedSize(0)
, m_computedSize(0)
+ , m_orientation(Horizontal)
, m_italic(false)
, m_smallCaps(false)
, m_isAbsoluteSize(false)
@@ -94,6 +96,7 @@ public:
FontTraitsMask traitsMask() const;
bool isSpecifiedFont() const { return m_isSpecifiedFont; }
+ FontOrientation orientation() const { return m_orientation; }
void setFamily(const FontFamily& family) { m_familyList = family; }
void setComputedSize(float s) { m_computedSize = s; }
@@ -113,6 +116,7 @@ public:
void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoothing; }
void setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = rendering; }
void setIsSpecifiedFont(bool isSpecifiedFont) { m_isSpecifiedFont = isSpecifiedFont; }
+ void setOrientation(FontOrientation orientation) { m_orientation = orientation; }
private:
FontFamily m_familyList; // The list of font families to be used.
@@ -121,6 +125,8 @@ private:
// rounding, minimum font sizes, and zooming.
float m_computedSize; // Computed size adjusted for the minimum font size and the zoom factor.
+ FontOrientation m_orientation;
+
bool m_italic : 1;
bool m_smallCaps : 1;
bool m_isAbsoluteSize : 1; // Whether or not CSS specified an explicit size
@@ -155,7 +161,8 @@ inline bool FontDescription::operator==(const FontDescription& other) const
&& m_keywordSize == other.m_keywordSize
&& m_fontSmoothing == other.m_fontSmoothing
&& m_textRendering == other.m_textRendering
- && m_isSpecifiedFont == other.m_isSpecifiedFont;
+ && m_isSpecifiedFont == other.m_isSpecifiedFont
+ && m_orientation == other.m_orientation;
}
}
diff --git a/WebCore/platform/graphics/FontOrientation.h b/WebCore/platform/graphics/FontOrientation.h
new file mode 100644
index 0000000..12cf5c1
--- /dev/null
+++ b/WebCore/platform/graphics/FontOrientation.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FontOrientation_h
+#define FontOrientation_h
+
+namespace WebCore {
+
+enum FontOrientation { Horizontal, Vertical };
+
+} // namespace WebCore
+
+#endif // FontOrientation_h
diff --git a/WebCore/platform/graphics/SimpleFontData.h b/WebCore/platform/graphics/SimpleFontData.h
index 535554f..b67939c 100644
--- a/WebCore/platform/graphics/SimpleFontData.h
+++ b/WebCore/platform/graphics/SimpleFontData.h
@@ -37,7 +37,7 @@
typedef struct OpaqueATSUStyle* ATSUStyle;
#endif
-#if USE(CORE_TEXT)
+#if PLATFORM(MAC)
#include <wtf/RetainPtr.h>
#endif
@@ -130,7 +130,7 @@ public:
NSFont* getNSFont() const { return m_platformData.nsFont(); }
#endif
-#if USE(CORE_TEXT)
+#if PLATFORM(MAC)
CFDictionaryRef getCFStringAttributes(TypesettingFeatures) const;
#endif
@@ -234,7 +234,7 @@ public:
private:
#endif
-#if USE(CORE_TEXT)
+#if PLATFORM(MAC)
mutable HashMap<unsigned, RetainPtr<CFDictionaryRef> > m_CFStringAttributes;
#endif
diff --git a/WebCore/platform/graphics/cairo/FontCustomPlatformData.cpp b/WebCore/platform/graphics/cairo/FontCustomPlatformData.cpp
index 0d195cb..800907a 100644
--- a/WebCore/platform/graphics/cairo/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/cairo/FontCustomPlatformData.cpp
@@ -58,7 +58,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
cairo_font_face_destroy(m_fontFace);
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
{
return FontPlatformData(m_fontFace, size, bold, italic);
}
diff --git a/WebCore/platform/graphics/cairo/FontCustomPlatformData.h b/WebCore/platform/graphics/cairo/FontCustomPlatformData.h
index c48d110..dac31f8 100644
--- a/WebCore/platform/graphics/cairo/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/cairo/FontCustomPlatformData.h
@@ -22,6 +22,7 @@
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
@@ -38,7 +39,7 @@ struct FontCustomPlatformData : Noncopyable {
public:
FontCustomPlatformData(FT_Face, SharedBuffer*);
~FontCustomPlatformData();
- FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
static bool supportsFormat(const String&);
private:
diff --git a/WebCore/platform/graphics/cocoa/FontPlatformData.h b/WebCore/platform/graphics/cocoa/FontPlatformData.h
index 034e23b..7fe2ff8 100644
--- a/WebCore/platform/graphics/cocoa/FontPlatformData.h
+++ b/WebCore/platform/graphics/cocoa/FontPlatformData.h
@@ -24,6 +24,7 @@
#ifndef FontPlatformData_h
#define FontPlatformData_h
+#include "FontOrientation.h"
#include <wtf/text/StringImpl.h>
#ifdef __OBJC__
@@ -58,9 +59,10 @@ inline CTFontRef toCTFontRef(NSFont *nsFont) { return reinterpret_cast<CTFontRef
class FontPlatformData {
public:
- FontPlatformData(float size, bool syntheticBold, bool syntheticOblique)
+ FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation = Horizontal)
: m_syntheticBold(syntheticBold)
, m_syntheticOblique(syntheticOblique)
+ , m_orientation(orientation)
, m_atsuFontID(0)
, m_size(size)
, m_font(0)
@@ -71,11 +73,12 @@ class FontPlatformData {
{
}
- FontPlatformData(NSFont *nsFont, bool syntheticBold = false, bool syntheticOblique = false);
+ FontPlatformData(NSFont *nsFont, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = Horizontal);
- FontPlatformData(CGFontRef cgFont, ATSUFontID fontID, float size, bool syntheticBold, bool syntheticOblique)
+ FontPlatformData(CGFontRef cgFont, ATSUFontID fontID, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation)
: m_syntheticBold(syntheticBold)
, m_syntheticOblique(syntheticOblique)
+ , m_orientation(orientation)
, m_atsuFontID(fontID)
, m_size(size)
, m_font(0)
@@ -94,9 +97,11 @@ class FontPlatformData {
float size() const { return m_size; }
bool syntheticBold() const { return m_syntheticBold; }
bool syntheticOblique() const { return m_syntheticOblique; }
+ FontOrientation orientation() const { return m_orientation; }
bool m_syntheticBold;
bool m_syntheticOblique;
+ FontOrientation m_orientation;
ATSUFontID m_atsuFontID;
float m_size;
@@ -104,7 +109,7 @@ class FontPlatformData {
unsigned hash() const
{
ASSERT(m_font != 0 || m_cgFont == 0);
- uintptr_t hashCodes[2] = { (uintptr_t)m_font, m_syntheticBold << 1 | m_syntheticOblique };
+ uintptr_t hashCodes[2] = { (uintptr_t)m_font, m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique };
return StringImpl::computeHash(reinterpret_cast<UChar*>(hashCodes), sizeof(hashCodes) / sizeof(UChar));
}
@@ -113,7 +118,7 @@ class FontPlatformData {
bool operator==(const FontPlatformData& other) const
{
return m_font == other.m_font && m_syntheticBold == other.m_syntheticBold && m_syntheticOblique == other.m_syntheticOblique &&
- m_cgFont == other.m_cgFont && m_size == other.m_size && m_atsuFontID == other.m_atsuFontID;
+ m_cgFont == other.m_cgFont && m_size == other.m_size && m_atsuFontID == other.m_atsuFontID && m_orientation == other.m_orientation;
}
NSFont *font() const { return m_font; }
diff --git a/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm b/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
index bd49dcc..e2566ae 100644
--- a/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
+++ b/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
@@ -44,9 +44,10 @@ void FontPlatformData::loadFont(NSFont* nsFont, float, NSFont*& outNSFont, CGFon
}
#endif // PLATFORM(MAC)
-FontPlatformData::FontPlatformData(NSFont *nsFont, bool syntheticBold, bool syntheticOblique)
+FontPlatformData::FontPlatformData(NSFont *nsFont, bool syntheticBold, bool syntheticOblique, FontOrientation orientation)
: m_syntheticBold(syntheticBold)
, m_syntheticOblique(syntheticOblique)
+ , m_orientation(orientation)
, m_font(nsFont)
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
// FIXME: Chromium: The following code isn't correct for the Chromium port since the sandbox might
@@ -83,6 +84,7 @@ FontPlatformData::FontPlatformData(const FontPlatformData& f)
m_cgFont = f.m_cgFont;
m_atsuFontID = f.m_atsuFontID;
m_isColorBitmapFont = f.m_isColorBitmapFont;
+ m_orientation = f.m_orientation;
#if USE(CORE_TEXT)
m_CTFont = f.m_CTFont;
#endif
@@ -112,6 +114,7 @@ const FontPlatformData& FontPlatformData::operator=(const FontPlatformData& f)
CFRelease(m_font);
m_font = f.m_font;
m_isColorBitmapFont = f.m_isColorBitmapFont;
+ m_orientation = f.m_orientation;
#if USE(CORE_TEXT)
m_CTFont = f.m_CTFont;
#endif
@@ -169,7 +172,7 @@ bool FontPlatformData::roundsGlyphAdvances() const
bool FontPlatformData::allowsLigatures() const
{
- return ![[m_font coveredCharacterSet] characterIsMember:'a'];
+ return m_orientation == Horizontal && ![[m_font coveredCharacterSet] characterIsMember:'a'];
}
#if USE(CORE_TEXT)
@@ -187,7 +190,8 @@ CTFontRef FontPlatformData::ctFont() const
String FontPlatformData::description() const
{
RetainPtr<CFStringRef> cgFontDescription(AdoptCF, CFCopyDescription(cgFont()));
- return String(cgFontDescription.get()) + " " + String::number(m_size) + (m_syntheticBold ? " synthetic bold" : "") + (m_syntheticOblique ? " synthetic oblique" : "");
+ return String(cgFontDescription.get()) + " " + String::number(m_size)
+ + (m_syntheticBold ? " synthetic bold" : "") + (m_syntheticOblique ? " synthetic oblique" : "") + (m_orientation ? " vertical orientation" : "");
}
#endif
diff --git a/WebCore/platform/graphics/gtk/FontCustomPlatformDataPango.cpp b/WebCore/platform/graphics/gtk/FontCustomPlatformDataPango.cpp
index d5f3173..a158689 100644
--- a/WebCore/platform/graphics/gtk/FontCustomPlatformDataPango.cpp
+++ b/WebCore/platform/graphics/gtk/FontCustomPlatformDataPango.cpp
@@ -30,7 +30,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
{
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
{
return FontPlatformData(m_fontFace, size, bold, italic);
}
diff --git a/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp b/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp
index 4b39fdd..ce7ec46 100644
--- a/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp
@@ -31,7 +31,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
{
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
{
return FontPlatformData(size, bold, italic);
}
diff --git a/WebCore/platform/graphics/haiku/FontCustomPlatformData.h b/WebCore/platform/graphics/haiku/FontCustomPlatformData.h
index a7dfe37..cc348e3 100644
--- a/WebCore/platform/graphics/haiku/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/haiku/FontCustomPlatformData.h
@@ -21,6 +21,7 @@
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
@@ -37,7 +38,7 @@ namespace WebCore {
static bool supportsFormat(const String&);
- FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
};
FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*);
diff --git a/WebCore/platform/graphics/mac/FontCacheMac.mm b/WebCore/platform/graphics/mac/FontCacheMac.mm
index 0747dd7..313db1c 100644
--- a/WebCore/platform/graphics/mac/FontCacheMac.mm
+++ b/WebCore/platform/graphics/mac/FontCacheMac.mm
@@ -142,7 +142,8 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, cons
FontPlatformData alternateFont(substituteFont,
!font.isPlatformFont() && isAppKitFontWeightBold(weight) && !isAppKitFontWeightBold(substituteFontWeight),
- !font.isPlatformFont() && (traits & NSFontItalicTrait) && !(substituteFontTraits & NSFontItalicTrait));
+ !font.isPlatformFont() && (traits & NSFontItalicTrait) && !(substituteFontTraits & NSFontItalicTrait),
+ platformData.m_orientation);
return getCachedFontData(&alternateFont);
}
@@ -210,7 +211,7 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD
bool syntheticBold = isAppKitFontWeightBold(weight) && !isAppKitFontWeightBold(actualWeight);
bool syntheticOblique = (traits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait);
- return new FontPlatformData(platformFont, syntheticBold, syntheticOblique);
+ return new FontPlatformData(platformFont, syntheticBold, syntheticOblique, fontDescription.orientation());
}
} // namespace WebCore
diff --git a/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp b/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp
index a600d73..cead71b 100644
--- a/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp
@@ -38,9 +38,9 @@ FontCustomPlatformData::~FontCustomPlatformData()
CGFontRelease(m_cgFont);
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontRenderingMode)
{
- return FontPlatformData(m_cgFont, (ATSUFontID)m_atsFont, size, bold, italic);
+ return FontPlatformData(m_cgFont, (ATSUFontID)m_atsFont, size, bold, italic, orientation);
}
FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
diff --git a/WebCore/platform/graphics/mac/FontCustomPlatformData.h b/WebCore/platform/graphics/mac/FontCustomPlatformData.h
index 90440d5..7702457 100644
--- a/WebCore/platform/graphics/mac/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/mac/FontCustomPlatformData.h
@@ -21,6 +21,7 @@
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include <CoreFoundation/CFBase.h>
#include <wtf/Forward.h>
@@ -41,7 +42,7 @@ struct FontCustomPlatformData : Noncopyable {
{}
~FontCustomPlatformData();
- FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
static bool supportsFormat(const String&);
diff --git a/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp b/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
index 143e665..48ad1c0 100644
--- a/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
+++ b/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp
@@ -40,15 +40,70 @@ bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned b
bool haveGlyphs = false;
#ifndef BUILDING_ON_TIGER
- Vector<CGGlyph, 512> glyphs(bufferLength);
- wkGetGlyphsForCharacters(fontData->platformData().cgFont(), buffer, glyphs.data(), bufferLength);
+ if (fontData->platformData().orientation() == Horizontal) {
+ Vector<CGGlyph, 512> glyphs(bufferLength);
+ wkGetGlyphsForCharacters(fontData->platformData().cgFont(), buffer, glyphs.data(), bufferLength);
+ for (unsigned i = 0; i < length; ++i) {
+ if (!glyphs[i])
+ setGlyphDataForIndex(offset + i, 0, 0);
+ else {
+ setGlyphDataForIndex(offset + i, glyphs[i], fontData);
+ haveGlyphs = true;
+ }
+ }
+ } else {
+ // We ask CoreText for possible vertical variant glyphs
+ RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, buffer, bufferLength, kCFAllocatorNull));
+ RetainPtr<CFAttributedStringRef> attributedString(AdoptCF, CFAttributedStringCreate(kCFAllocatorDefault, string.get(), fontData->getCFStringAttributes(0)));
+ RetainPtr<CTLineRef> line(AdoptCF, CTLineCreateWithAttributedString(attributedString.get()));
- for (unsigned i = 0; i < length; ++i) {
- if (!glyphs[i])
- setGlyphDataForIndex(offset + i, 0, 0);
- else {
- setGlyphDataForIndex(offset + i, glyphs[i], fontData);
- haveGlyphs = true;
+ CFArrayRef runArray = CTLineGetGlyphRuns(line.get());
+ CFIndex runCount = CFArrayGetCount(runArray);
+
+ // Initialize glyph entries
+ for (unsigned index = 0; index < length; ++index)
+ setGlyphDataForIndex(offset + index, 0, 0);
+
+ Vector<CGGlyph, 512> glyphVector;
+ Vector<CFIndex, 512> indexVector;
+ bool done = false;
+ for (CFIndex r = 0; r < runCount && !done ; ++r) {
+ // CTLine could map characters over multiple fonts using its own font fallback list.
+ // We need to pick runs that use the exact font we need, i.e., fontData->platformData().ctFont().
+ CTRunRef ctRun = static_cast<CTRunRef>(CFArrayGetValueAtIndex(runArray, r));
+ ASSERT(CFGetTypeID(ctRun) == CTRunGetTypeID());
+
+ CFDictionaryRef attributes = CTRunGetAttributes(ctRun);
+ CTFontRef runFont = static_cast<CTFontRef>(CFDictionaryGetValue(attributes, kCTFontAttributeName));
+ RetainPtr<CGFontRef> runCGFont(AdoptCF, CTFontCopyGraphicsFont(runFont, 0));
+ // Use CGFont here as CFEqual for CTFont counts all attributes for font.
+ if (CFEqual(fontData->platformData().cgFont(), runCGFont.get())) {
+ // This run uses the font we want. Extract glyphs.
+ CFIndex glyphCount = CTRunGetGlyphCount(ctRun);
+ const CGGlyph* glyphs = CTRunGetGlyphsPtr(ctRun);
+ if (!glyphs) {
+ glyphVector.resize(glyphCount);
+ CTRunGetGlyphs(ctRun, CFRangeMake(0, 0), glyphVector.data());
+ glyphs = glyphVector.data();
+ }
+ const CFIndex* stringIndices = CTRunGetStringIndicesPtr(ctRun);
+ if (!stringIndices) {
+ indexVector.resize(glyphCount);
+ CTRunGetStringIndices(ctRun, CFRangeMake(0, 0), indexVector.data());
+ stringIndices = indexVector.data();
+ }
+
+ for (CFIndex i = 0; i < glyphCount; ++i) {
+ if (stringIndices[i] >= static_cast<CFIndex>(length)) {
+ done = true;
+ break;
+ }
+ if (glyphs[i]) {
+ setGlyphDataForIndex(offset + stringIndices[i], glyphs[i], fontData);
+ haveGlyphs = true;
+ }
+ }
+ }
}
}
#else
diff --git a/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp b/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp
index 4fb525f..01d75ee 100644
--- a/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp
+++ b/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp
@@ -30,8 +30,6 @@
#import "config.h"
#import "SimpleFontData.h"
-#if USE(CORE_TEXT)
-
#import "Font.h"
#import "FontCache.h"
#import "FontDescription.h"
@@ -60,16 +58,16 @@ CFDictionaryRef SimpleFontData::getCFStringAttributes(TypesettingFeatures typese
if (!(typesettingFeatures & Kerning)) {
static const float kerningAdjustmentValue = 0;
static CFNumberRef kerningAdjustment = CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &kerningAdjustmentValue);
- static const void* keysWithKerningDisabled[] = { kCTFontAttributeName, kCTKernAttributeName, kCTLigatureAttributeName };
+ static const void* keysWithKerningDisabled[] = { kCTFontAttributeName, kCTKernAttributeName, kCTLigatureAttributeName, kCTVerticalFormsAttributeName };
const void* valuesWithKerningDisabled[] = { platformData().ctFont(), kerningAdjustment, allowLigatures
- ? ligaturesAllowed : ligaturesNotAllowed };
+ ? ligaturesAllowed : ligaturesNotAllowed, platformData().orientation() == Vertical ? kCFBooleanTrue : kCFBooleanFalse };
attributesDictionary.adoptCF(CFDictionaryCreate(0, keysWithKerningDisabled, valuesWithKerningDisabled,
sizeof(keysWithKerningDisabled) / sizeof(*keysWithKerningDisabled),
&kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
} else {
// By omitting the kCTKernAttributeName attribute, we get Core Text's standard kerning.
- static const void* keysWithKerningEnabled[] = { kCTFontAttributeName, kCTLigatureAttributeName };
- const void* valuesWithKerningEnabled[] = { platformData().ctFont(), allowLigatures ? ligaturesAllowed : ligaturesNotAllowed };
+ static const void* keysWithKerningEnabled[] = { kCTFontAttributeName, kCTLigatureAttributeName, kCTVerticalFormsAttributeName };
+ const void* valuesWithKerningEnabled[] = { platformData().ctFont(), allowLigatures ? ligaturesAllowed : ligaturesNotAllowed, platformData().orientation() == Vertical ? kCFBooleanTrue : kCFBooleanFalse };
attributesDictionary.adoptCF(CFDictionaryCreate(0, keysWithKerningEnabled, valuesWithKerningEnabled,
sizeof(keysWithKerningEnabled) / sizeof(*keysWithKerningEnabled),
&kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
@@ -79,5 +77,3 @@ CFDictionaryRef SimpleFontData::getCFStringAttributes(TypesettingFeatures typese
}
} // namespace WebCore
-
-#endif
diff --git a/WebCore/platform/graphics/mac/SimpleFontDataMac.mm b/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
index 94fcc5e..c916825 100644
--- a/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
+++ b/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
@@ -417,11 +417,9 @@ FloatRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
{
FloatRect boundingBox;
#ifndef BUILDING_ON_TIGER
- CGRect box;
- CGFontGetGlyphBBoxes(platformData().cgFont(), &glyph, 1, &box);
- float pointSize = platformData().m_size;
- CGFloat scale = pointSize / unitsPerEm();
- boundingBox = CGRectApplyAffineTransform(box, CGAffineTransformMakeScale(scale, -scale));
+ boundingBox = CTFontGetBoundingRectsForGlyphs(m_platformData.ctFont(),
+ m_platformData.orientation() == Vertical ? kCTFontVerticalOrientation : kCTFontHorizontalOrientation, &glyph, 0, 1);
+ boundingBox.setY(-boundingBox.bottom());
#else
// FIXME: Custom fonts don't have NSFonts, so this function doesn't compute correct bounds for these on Tiger.
if (!m_platformData.font())
@@ -437,14 +435,18 @@ FloatRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
{
- NSFont* font = platformData().font();
- float pointSize = platformData().m_size;
- CGAffineTransform m = CGAffineTransformMakeScale(pointSize, pointSize);
CGSize advance;
- if (!wkGetGlyphTransformedAdvances(platformData().cgFont(), font, &m, &glyph, &advance)) {
- LOG_ERROR("Unable to cache glyph widths for %@ %f", [font displayName], pointSize);
- advance.width = 0;
- }
+ if (m_platformData.orientation() == Horizontal) {
+ NSFont* font = platformData().font();
+ float pointSize = platformData().m_size;
+ CGAffineTransform m = CGAffineTransformMakeScale(pointSize, pointSize);
+ if (!wkGetGlyphTransformedAdvances(platformData().cgFont(), font, &m, &glyph, &advance)) {
+ LOG_ERROR("Unable to cache glyph widths for %@ %f", [font displayName], pointSize);
+ advance.width = 0;
+ }
+ } else
+ CTFontGetAdvancesForGlyphs(m_platformData.ctFont(), kCTFontVerticalOrientation, &glyph, &advance, 1);
+
return advance.width + m_syntheticBoldOffset;
}
diff --git a/WebCore/platform/graphics/qt/FontCustomPlatformData.h b/WebCore/platform/graphics/qt/FontCustomPlatformData.h
index 019a6bc..6c41d47 100644
--- a/WebCore/platform/graphics/qt/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/qt/FontCustomPlatformData.h
@@ -22,6 +22,7 @@
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
@@ -37,7 +38,7 @@ struct FontCustomPlatformData : Noncopyable {
// for use with QFontDatabase::addApplicationFont/removeApplicationFont
int m_handle;
- FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
static bool supportsFormat(const String&);
};
diff --git a/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp b/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp
index dbf0b16..e2f009b 100644
--- a/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp
+++ b/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp
@@ -34,7 +34,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
QFontDatabase::removeApplicationFont(m_handle);
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
{
QFont font;
font.setFamily(QFontDatabase::applicationFontFamilies(m_handle)[0]);
diff --git a/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp b/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp
index 8301871..3410673 100644
--- a/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp
@@ -64,7 +64,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
#endif
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode mode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode mode)
{
#if OS(WINDOWS)
ASSERT(m_fontReference);
diff --git a/WebCore/platform/graphics/skia/FontCustomPlatformData.h b/WebCore/platform/graphics/skia/FontCustomPlatformData.h
index 94d7ec3..b809382 100644
--- a/WebCore/platform/graphics/skia/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/skia/FontCustomPlatformData.h
@@ -32,6 +32,7 @@
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
@@ -62,7 +63,7 @@ struct FontCustomPlatformData : Noncopyable {
~FontCustomPlatformData();
- FontPlatformData fontPlatformData(int size, bool bold, bool italic,
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal,
FontRenderingMode = NormalRenderingMode);
static bool supportsFormat(const String&);
diff --git a/WebCore/platform/graphics/win/FontCustomPlatformData.cpp b/WebCore/platform/graphics/win/FontCustomPlatformData.cpp
index 6e59ad7..9cae99b 100644
--- a/WebCore/platform/graphics/win/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/win/FontCustomPlatformData.cpp
@@ -59,7 +59,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
}
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode renderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode renderingMode)
{
ASSERT(m_fontReference);
ASSERT(T2embedLibrary());
diff --git a/WebCore/platform/graphics/win/FontCustomPlatformData.h b/WebCore/platform/graphics/win/FontCustomPlatformData.h
index d19a8a5..1bdf270 100644
--- a/WebCore/platform/graphics/win/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/win/FontCustomPlatformData.h
@@ -21,6 +21,7 @@
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include "PlatformString.h"
#include <wtf/Forward.h>
@@ -42,7 +43,7 @@ struct FontCustomPlatformData : Noncopyable {
~FontCustomPlatformData();
- FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
static bool supportsFormat(const String&);
diff --git a/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp b/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp
index 02c5b99..c3decbf 100644
--- a/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp
+++ b/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp
@@ -32,7 +32,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
cairo_font_face_destroy(m_fontFace);
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation)
{
return FontPlatformData(m_fontFace, size, bold, italic);
}
diff --git a/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.h b/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.h
index 525957f..3ab52b8 100644
--- a/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.h
+++ b/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.h
@@ -22,6 +22,7 @@
#ifndef FontCustomPlatformDataCairo_h
#define FontCustomPlatformDataCairo_h
+#include "FontDescription.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
@@ -39,7 +40,7 @@ struct FontCustomPlatformData : Noncopyable {
}
~FontCustomPlatformData();
- FontPlatformData fontPlatformData(int size, bool bold, bool italic);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal);
static bool supportsFormat(const String&);
diff --git a/WebCore/platform/graphics/wince/FontCustomPlatformData.cpp b/WebCore/platform/graphics/wince/FontCustomPlatformData.cpp
index 3605c72..f61ae8e 100644
--- a/WebCore/platform/graphics/wince/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/wince/FontCustomPlatformData.cpp
@@ -45,7 +45,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
g_customFontCache->unregisterFont(m_name);
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode renderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode renderingMode)
{
FontDescription fontDesc;
fontDesc.setComputedSize(size);
diff --git a/WebCore/platform/graphics/wince/FontCustomPlatformData.h b/WebCore/platform/graphics/wince/FontCustomPlatformData.h
index 5ce0ea6..abdc0f2 100644
--- a/WebCore/platform/graphics/wince/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/wince/FontCustomPlatformData.h
@@ -21,6 +21,7 @@
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
+#include "FontDescription.h"
#include "FontRenderingMode.h"
#include "PlatformString.h"
#include <wtf/Noncopyable.h>
@@ -44,7 +45,7 @@ namespace WebCore {
~FontCustomPlatformData();
- FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation fontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
static bool supportsFormat(const String&);
diff --git a/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp b/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp
index 4cebe43..6133372 100644
--- a/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp
@@ -31,7 +31,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
{
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontRenderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
{
return FontPlatformData(size, bold, italic);
}
diff --git a/WebCore/platform/graphics/wx/FontCustomPlatformData.h b/WebCore/platform/graphics/wx/FontCustomPlatformData.h
index a7dfe37..cc348e3 100644
--- a/WebCore/platform/graphics/wx/FontCustomPlatformData.h
+++ b/WebCore/platform/graphics/wx/FontCustomPlatformData.h
@@ -21,6 +21,7 @@
#ifndef FontCustomPlatformData_h
#define FontCustomPlatformData_h
+#include "FontOrientation.h"
#include "FontRenderingMode.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
@@ -37,7 +38,7 @@ namespace WebCore {
static bool supportsFormat(const String&);
- FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
};
FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list