Skip to content
Permalink
Browse files
…tation CSS property.

Reviewed by Dan Bernstein.

This patch adds support for two values of the text-orientation property (the ones that actually matter): vertical-right and upright.
The TextOrientation is part of the FontDescription and used to look up fonts (similar to FontOrientation).

Orientation of non-CJK characters is done using fallback font data of the appropriate orientation type, e.g., verticalRightOrientation and
uprightOrientation fallback font data.  Vertical right is just implemented as a normal horizontal font.  Upright is implemented as a
vertically oriented font that rotates all glyphs.

The main complication implementing text-orientation is that fonts have "baked-in" vertical glyphs for letters that are hardcoded to
a vertical right facing.  This means that you can use those special vertical glyphs for vertical-right orientation without having to
fall back, but then for upright orientation you have to ignore them and still fall back.  As you can see from the test case, this doesn't
work very well, but hopefully it won't be all that common.  Limitations of CoreText prevent this case from rendering properly in either the
simple or complex code paths, although the simple code path at least gets close.

Added fast/blockflow/text-orientation-basic.html

Source/WebCore:

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyDeclarations):
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::platformDataFromCustomData):
* loader/cache/CachedFont.h:
* platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
(WebCore::FontPlatformDataCacheKey::operator==):
(WebCore::computeHash):
(WebCore::FontCache::getCachedFontPlatformData):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::textOrientation):
(WebCore::FontDescription::setTextOrientation):
(WebCore::FontDescription::operator==):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataForCharacter):
(WebCore::offsetToMiddleOfGlyph):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::SimpleFontData):
(WebCore::SimpleFontData::verticalRightOrientationFontData):
(WebCore::SimpleFontData::uprightOrientationFontData):
(WebCore::SimpleFontData::brokenIdeographFontData):
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::hasVerticalGlyphs):
(WebCore::SimpleFontData::isTextOrientationFallback):
* platform/graphics/cairo/FontCustomPlatformData.h:
* platform/graphics/cocoa/FontPlatformData.h:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::textOrientation):
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::operator==):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/haiku/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/haiku/FontCustomPlatformData.h:
* platform/graphics/mac/ComplexTextControllerCoreText.cpp:
(WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h:
* platform/graphics/mac/FontMac.mm:
(WebCore::showGlyphsWithAdvances):
(WebCore::Font::drawGlyphs):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::shouldUseCoreText):
(WebCore::GlyphPage::fill):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::SimpleFontData::getCFStringAttributes):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
(WebCore::SimpleFontData::platformBoundsForGlyph):
(WebCore::SimpleFontData::platformWidthForGlyph):
* platform/graphics/pango/FontCustomPlatformDataPango.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/qt/FontCustomPlatformData.h:
* platform/graphics/qt/FontCustomPlatformDataQt.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/skia/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/skia/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.h:
* platform/graphics/wince/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/wince/FontCustomPlatformData.h:
* platform/text/TextOrientation.h: Added.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::requiresIdeographicBaseline):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::initialTextOrientation):

LayoutTests:

* fast/blockflow/text-orientation-basic.html: Added.
* platform/mac/fast/blockflow/text-orientation-basic-expected.checksum: Added.
* platform/mac/fast/blockflow/text-orientation-basic-expected.png: Added.
* platform/mac/fast/blockflow/text-orientation-basic-expected.txt: Added.



Canonical link: https://commits.webkit.org/70476@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
David Hyatt committed Mar 8, 2011
1 parent 7907972 commit 87bbc4890843318a5f4deed7b17c93815f6e392d
Showing 50 changed files with 554 additions and 121 deletions.
@@ -1,3 +1,29 @@
2011-03-08 David Hyatt <hyatt@apple.com>

Reviewed by Dan Bernstein.

https://bugs.webkit.org/show_bug.cgi?id=48540, support the text-orientation CSS property.

This patch adds support for two values of the text-orientation property (the ones that actually matter): vertical-right and upright.
The TextOrientation is part of the FontDescription and used to look up fonts (similar to FontOrientation).

Orientation of non-CJK characters is done using fallback font data of the appropriate orientation type, e.g., verticalRightOrientation and
uprightOrientation fallback font data. Vertical right is just implemented as a normal horizontal font. Upright is implemented as a
vertically oriented font that rotates all glyphs.

The main complication implementing text-orientation is that fonts have "baked-in" vertical glyphs for letters that are hardcoded to
a vertical right facing. This means that you can use those special vertical glyphs for vertical-right orientation without having to
fall back, but then for upright orientation you have to ignore them and still fall back. As you can see from the test case, this doesn't
work very well, but hopefully it won't be all that common. Limitations of CoreText prevent this case from rendering properly in either the
simple or complex code paths, although the simple code path at least gets close.

Added fast/blockflow/text-orientation-basic.html

* fast/blockflow/text-orientation-basic.html: Added.
* platform/mac/fast/blockflow/text-orientation-basic-expected.checksum: Added.
* platform/mac/fast/blockflow/text-orientation-basic-expected.png: Added.
* platform/mac/fast/blockflow/text-orientation-basic-expected.txt: Added.

2011-03-08 Nico Weber <thakis@chromium.org>

Reviewed by James Robinson.
@@ -0,0 +1,21 @@
<body>
<p>This test shows the following bugs with text-orientation. The far right test mis-renders differently in both the simple and complex text paths.
The simple text path mis-renders because <tt>CTFontGetVerticalTranslationsForGlyphs</tt> returns incorrect values for horizontal glyphs that have vertical
counterparts. The complex text code path mis-renders because of API deficiency. There is no way to tell CoreText to use upright horizontal glyphs when
rendering a vertical line.
</p>
<div style="-webkit-writing-mode:vertical-lr; height:600px; font-size:36px">
<div style="display:inline-block; border:1px solid green">
<span style="font-family:'Times New Roman'">Hello world</span><br>
<span style="font-family:'Times New Roman'; -webkit-text-orientation:upright">Hello world</span><br>
<span style="font-family:'Hiragino Kaku Gothic Pro'">Hello world</span><br>
<span style="font-family:'Hiragino Kaku Gothic Pro'; -webkit-text-orientation:upright">Hello world</span><br>
</div>

<div style="display:inline-block; border:1px solid green; text-rendering:optimizeLegibility">
<span style="font-family:'Times New Roman'">Hello world</span><br>
<span style="font-family:'Times New Roman'; -webkit-text-orientation:upright">Hello world</span><br>
<span style="font-family:'Hiragino Kaku Gothic Pro'">Hello world</span><br>
<span style="font-family:'Hiragino Kaku Gothic Pro'; -webkit-text-orientation:upright">Hello world</span><br>
</div>
</div>
@@ -0,0 +1 @@
e3718efd04c70365f76d63bb6200cf20
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,56 @@
layer at (0,0) size 785x704
RenderView at (0,0) size 785x600
layer at (0,0) size 785x704
RenderBlock {HTML} at (0,0) size 785x704
RenderBody {BODY} at (8,8) size 769x688
RenderBlock {P} at (0,0) size 769x72
RenderText {#text} at (0,0) size 751x36
text run at (0,0) width 358: "This test shows the following bugs with text-orientation. "
text run at (358,0) width 393: "The far right test mis-renders differently in both the simple and"
text run at (0,18) width 389: "complex text paths. The simple text path mis-renders because "
RenderInline {TT} at (0,0) size 304x15
RenderText {#text} at (389,20) size 304x15
text run at (389,20) width 304: "CTFontGetVerticalTranslationsForGlyphs"
RenderText {#text} at (693,18) size 757x54
text run at (693,18) width 47: " returns"
text run at (0,36) width 434: "incorrect values for horizontal glyphs that have vertical counterparts. "
text run at (434,36) width 323: "The complex text code path mis-renders because of"
text run at (0,54) width 103: "API deficiency. "
text run at (103,54) width 603: "There is no way to tell CoreText to use upright horizontal glyphs when rendering a vertical line."
RenderBlock {DIV} at (0,88) size 388x600
RenderBlock {DIV} at (0,0) size 194x401 [border: (1px solid #008000)]
RenderInline {SPAN} at (0,0) size 40x173
RenderText {#text} at (2,1) size 40x173
text run at (2,1) width 173: "Hello world"
RenderBR {BR} at (10,174) size 0x0
RenderInline {SPAN} at (0,0) size 40x254
RenderText {#text} at (44,1) size 40x254
text run at (44,1) width 254: "Hello world"
RenderBR {BR} at (64,254) size 0x1
RenderInline {SPAN} at (0,0) size 36x199
RenderText {#text} at (94,1) size 36x199
text run at (94,1) width 199: "Hello world"
RenderBR {BR} at (112,199) size 0x1
RenderInline {SPAN} at (0,0) size 36x399
RenderText {#text} at (148,1) size 36x399
text run at (148,1) width 399: "Hello world"
RenderBR {BR} at (166,399) size 0x1
RenderText {#text} at (0,0) size 0x0
RenderBlock {DIV} at (194,0) size 194x257 [border: (1px solid #008000)]
RenderInline {SPAN} at (0,0) size 40x173
RenderText {#text} at (2,1) size 40x173
text run at (2,1) width 173: "Hello world"
RenderBR {BR} at (10,174) size 0x0
RenderInline {SPAN} at (0,0) size 40x255
RenderText {#text} at (44,1) size 40x255
text run at (44,1) width 255: "Hello world"
RenderBR {BR} at (64,256) size 0x0
RenderInline {SPAN} at (0,0) size 36x198
RenderText {#text} at (94,1) size 36x198
text run at (94,1) width 198: "Hello world"
RenderBR {BR} at (112,199) size 0x0
RenderInline {SPAN} at (0,0) size 36x222
RenderText {#text} at (148,1) size 36x222
text run at (148,1) width 222: "Hello world"
RenderBR {BR} at (166,223) size 0x0
RenderText {#text} at (0,0) size 0x0
@@ -1,3 +1,121 @@
2011-03-08 David Hyatt <hyatt@apple.com>

Reviewed by Dan Bernstein.

https://bugs.webkit.org/show_bug.cgi?id=48540, support the text-orientation CSS property.

This patch adds support for two values of the text-orientation property (the ones that actually matter): vertical-right and upright.
The TextOrientation is part of the FontDescription and used to look up fonts (similar to FontOrientation).

Orientation of non-CJK characters is done using fallback font data of the appropriate orientation type, e.g., verticalRightOrientation and
uprightOrientation fallback font data. Vertical right is just implemented as a normal horizontal font. Upright is implemented as a
vertically oriented font that rotates all glyphs.

The main complication implementing text-orientation is that fonts have "baked-in" vertical glyphs for letters that are hardcoded to
a vertical right facing. This means that you can use those special vertical glyphs for vertical-right orientation without having to
fall back, but then for upright orientation you have to ignore them and still fall back. As you can see from the test case, this doesn't
work very well, but hopefully it won't be all that common. Limitations of CoreText prevent this case from rendering properly in either the
simple or complex code paths, although the simple code path at least gets close.

Added fast/blockflow/text-orientation-basic.html

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyDeclarations):
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::platformDataFromCustomData):
* loader/cache/CachedFont.h:
* platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
(WebCore::FontPlatformDataCacheKey::operator==):
(WebCore::computeHash):
(WebCore::FontCache::getCachedFontPlatformData):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::textOrientation):
(WebCore::FontDescription::setTextOrientation):
(WebCore::FontDescription::operator==):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataForCharacter):
(WebCore::offsetToMiddleOfGlyph):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::SimpleFontData):
(WebCore::SimpleFontData::verticalRightOrientationFontData):
(WebCore::SimpleFontData::uprightOrientationFontData):
(WebCore::SimpleFontData::brokenIdeographFontData):
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::hasVerticalGlyphs):
(WebCore::SimpleFontData::isTextOrientationFallback):
* platform/graphics/cairo/FontCustomPlatformData.h:
* platform/graphics/cocoa/FontPlatformData.h:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::textOrientation):
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::operator==):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/haiku/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/haiku/FontCustomPlatformData.h:
* platform/graphics/mac/ComplexTextControllerCoreText.cpp:
(WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h:
* platform/graphics/mac/FontMac.mm:
(WebCore::showGlyphsWithAdvances):
(WebCore::Font::drawGlyphs):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::shouldUseCoreText):
(WebCore::GlyphPage::fill):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::SimpleFontData::getCFStringAttributes):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
(WebCore::SimpleFontData::platformBoundsForGlyph):
(WebCore::SimpleFontData::platformWidthForGlyph):
* platform/graphics/pango/FontCustomPlatformDataPango.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/qt/FontCustomPlatformData.h:
* platform/graphics/qt/FontCustomPlatformDataQt.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/skia/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/skia/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.h:
* platform/graphics/wince/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/wince/FontCustomPlatformData.h:
* platform/text/TextOrientation.h: Added.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::requiresIdeographicBaseline):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::initialTextOrientation):

2011-03-08 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Darin Adler.
@@ -421,7 +421,7 @@ __ZN7WebCore16DeviceMotionData12Acceleration6createEbdbdbd
__ZN7WebCore16DeviceMotionData12RotationRate6createEbdbdbd
__ZN7WebCore16DeviceMotionData6createEN3WTF10PassRefPtrINS0_12AccelerationEEES4_NS2_INS0_12RotationRateEEEbd
__ZN7WebCore16FontFallbackList15releaseFontDataEv
__ZN7WebCore16FontPlatformDataC1EP6NSFontfbbNS_15FontOrientationENS_16FontWidthVariantE
__ZN7WebCore16FontPlatformDataC1EP6NSFontfbbNS_15FontOrientationENS_15TextOrientationENS_16FontWidthVariantE
__ZN7WebCore16FontPlatformDataD1Ev
__ZN7WebCore16HTMLInputElement13setAutofilledEb
__ZN7WebCore16LegacyWebArchive19createFromSelectionEPNS_5FrameE
@@ -5161,6 +5161,7 @@
BCD0E0FC0E972C3500265DEA /* SecurityOriginHash.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD0E0F90E972C3500265DEA /* SecurityOriginHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCD0FBD00DBD625E00B2F630 /* DOMAbstractView.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCD0FBCF0DBD625E00B2F630 /* DOMAbstractView.mm */; };
BCD0FC4F0DBD720B00B2F630 /* DOMRGBColorInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD0FC4E0DBD720B00B2F630 /* DOMRGBColorInternal.h */; };
BCD3F9831326C93700098A60 /* TextOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD3F9821326C93700098A60 /* TextOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCD41ABB0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD41ABA0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp */; };
BCD533640ED6848900887468 /* CachedScriptSourceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD533630ED6848900887468 /* CachedScriptSourceProvider.h */; };
BCD9C2620C17AA67005C90A2 /* JSDOMWindowCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */; };
@@ -11548,6 +11549,7 @@
BCD0E0F90E972C3500265DEA /* SecurityOriginHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecurityOriginHash.h; sourceTree = "<group>"; };
BCD0FBCF0DBD625E00B2F630 /* DOMAbstractView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMAbstractView.mm; sourceTree = "<group>"; };
BCD0FC4E0DBD720B00B2F630 /* DOMRGBColorInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMRGBColorInternal.h; sourceTree = "<group>"; };
BCD3F9821326C93700098A60 /* TextOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextOrientation.h; sourceTree = "<group>"; };
BCD41ABA0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFrameSetElementCustom.cpp; sourceTree = "<group>"; };
BCD533630ED6848900887468 /* CachedScriptSourceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedScriptSourceProvider.h; sourceTree = "<group>"; };
BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowCustom.cpp; sourceTree = "<group>"; };
@@ -17676,6 +17678,7 @@
C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */,
B2C3DA180D006C1D00EF6F26 /* TextEncodingRegistry.cpp */,
B2C3DA190D006C1D00EF6F26 /* TextEncodingRegistry.h */,
BCD3F9821326C93700098A60 /* TextOrientation.h */,
B2C3DA1A0D006C1D00EF6F26 /* TextStream.cpp */,
B2C3DA1B0D006C1D00EF6F26 /* TextStream.h */,
B2C3DA1C0D006C1D00EF6F26 /* UnicodeRange.cpp */,
@@ -22568,6 +22571,7 @@
593D3EB1132532950057E7EE /* JavaString.h in Headers */,
598D77DF132541FA00761B22 /* JavaArrayJSC.h in Headers */,
598D77E31325420E00761B22 /* JavaFieldJSC.h in Headers */,
BCD3F9831326C93700098A60 /* TextOrientation.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -228,6 +228,7 @@ static const int computedProperties[] = {
CSSPropertyWebkitTextEmphasisPosition,
CSSPropertyWebkitTextEmphasisStyle,
CSSPropertyWebkitTextFillColor,
CSSPropertyWebkitTextOrientation,
CSSPropertyWebkitTextSecurity,
CSSPropertyWebkitTextStrokeColor,
CSSPropertyWebkitTextStrokeWidth,
@@ -1633,6 +1634,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
return primitiveValueCache->createValue(style->writingMode());
case CSSPropertyWebkitTextCombine:
return primitiveValueCache->createValue(style->textCombine());
case CSSPropertyWebkitTextOrientation:
return CSSPrimitiveValue::create(style->fontDescription().textOrientation());

case CSSPropertyContent:
return contentToCSSValue(style.get(), primitiveValueCache);
@@ -115,7 +115,8 @@ SimpleFontData* CSSFontFaceSource::getFontData(const FontDescription& fontDescri
}

// See if we have a mapping in our FontData cache.
unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 5 | fontDescription.widthVariant() << 3 | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 6 | fontDescription.widthVariant() << 4
| (fontDescription.textOrientation() == TextOrientationUpright ? 8 : 0) | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
if (SimpleFontData* cachedData = m_fontDataTable.get(hashKey))
return cachedData;

@@ -162,7 +163,8 @@ SimpleFontData* CSSFontFaceSource::getFontData(const FontDescription& fontDescri
if (!m_font->ensureCustomFontData())
return 0;

fontData.set(new SimpleFontData(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic, fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false));
fontData.set(new SimpleFontData(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic, fontDescription.orientation(),
fontDescription.textOrientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false));
}
} else {
#if ENABLE(SVG_FONTS)

0 comments on commit 87bbc48

Please sign in to comment.