Source/WebCore/ChangeLog

 12011-01-28 takano takumi <takano@apple.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Implement text-combine rendering code
 6 https://bugs.webkit.org/show_bug.cgi?id=50621
 7
 8 Test: fast/text/international/text-combine-image-test.html
 9
 10 * Android.mk: Added RenderCombineText.cpp/h
 11 * CMakeLists.txt: Added RenderCombineText.cpp/h
 12 * GNUmakefile.am: Added RenderCombineText.cpp/h
 13 * WebCore.exp.in:
 14 * WebCore.gypi: Added RenderCombineText.cpp/h
 15 * WebCore.pro: Added RenderCombineText.cpp/h
 16 * WebCore.vcproj/WebCore.vcproj: Added RenderCombineText.cpp/h
 17 * WebCore.xcodeproj/project.pbxproj: Added RenderCombineText.cpp/h
 18 * css/CSSFontFaceSource.cpp:
 19 (WebCore::CSSFontFaceSource::getFontData):
 20 - Added fontDescription.widthVariant to SimpleFontData creation.
 21 * css/CSSStyleSelector.cpp:
 22 (WebCore::CSSStyleSelector::applyProperty):
 23 - Changed to set "Unique" flag to RenderStyle in case of TextCombine.
 24 * dom/Text.cpp:
 25 (WebCore::Text::createRenderer):
 26 - Changed to create RenderCombineText in case of TextCombine.
 27 * loader/cache/CachedFont.cpp:
 28 (WebCore::CachedFont::platformDataFromCustomData):
 29 - Added FontWidthVariant as an argument for FontPlatformData creation.
 30 * loader/cache/CachedFont.h:
 31 - Ditto.
 32 * platform/graphics/Font.h:
 33 (WebCore::Font::widthVariant):
 34 - The accessor to FontWidthVariant member variable.
 35 * platform/graphics/FontCache.cpp:
 36 - Made cache to incorporate FontWidthVariant value.
 37 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
 38 (WebCore::FontPlatformDataCacheKey::operator==):
 39 (WebCore::computeHash):
 40 (WebCore::FontCache::getCachedFontPlatformData):
 41 * platform/graphics/FontDescription.h:
 42 - Add a member variable that holds a width variant - none, half-width, third-width, and quarter-width.
 43 (WebCore::FontDescription::FontDescription):
 44 (WebCore::FontDescription::widthVariant):
 45 (WebCore::FontDescription::setWidthVariant):
 46 (WebCore::FontDescription::operator==):
 47 * platform/graphics/FontWidthVariant.h: Added.
 48 * platform/graphics/cairo/FontCustomPlatformData.h:
 49 - Changed to carry FontWidthVariant value.
 50 * platform/graphics/cocoa/FontPlatformData.h:
 51 - Changed to carry FontWidthVariant value.
 52 (WebCore::FontPlatformData::FontPlatformData):
 53 (WebCore::FontPlatformData::widthVariant):
 54 (WebCore::FontPlatformData::hash):
 55 (WebCore::FontPlatformData::operator==):
 56 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
 57 (WebCore::FontPlatformData::FontPlatformData):
 58 - Changed to carry FontWidthVariant value.
 59 (WebCore::FontPlatformData::operator=):
 60 - Ditto.
 61 (WebCore::mapFontWidthVariantToCTFeatureSelector):
 62 - A function to map a FontWidthVariant value to a CoreText's text spacing feature selector.
 63 (WebCore::FontPlatformData::ctFont):
 64 - Changed to create CTFont with text spacing variant based on FontWidthVariant.
 65 * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
 66 (WebCore::FontCustomPlatformData::fontPlatformData):
 67 - Changed to carry FontWidthVariant value.
 68 * platform/graphics/haiku/FontCustomPlatformData.cpp:
 69 (WebCore::FontCustomPlatformData::fontPlatformData):
 70 - Changed to carry FontWidthVariant value.
 71 * platform/graphics/haiku/FontCustomPlatformData.h:
 72 * platform/graphics/mac/FontCacheMac.mm:
 73 (WebCore::FontCache::createFontPlatformData):
 74 - Changed to carry FontWidthVariant value.
 75 * platform/graphics/mac/FontCustomPlatformData.cpp:
 76 (WebCore::FontCustomPlatformData::fontPlatformData):
 77 - Changed to carry FontWidthVariant value.
 78 * platform/graphics/mac/FontCustomPlatformData.h:
 79 - Ditto.
 80 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
 81 (WebCore::shouldUseCoreText):
 82 - Changed to skip CT path when width variant is specified.
 83 * platform/graphics/pango/FontCustomPlatformDataPango.cpp:
 84 (WebCore::FontCustomPlatformData::fontPlatformData):
 85 - Ditto.
 86 * platform/graphics/qt/FontCustomPlatformData.h:
 87 - Ditto.
 88 * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
 89 (WebCore::FontCustomPlatformData::fontPlatformData):
 90 - Ditto.
 91 * platform/graphics/skia/FontCustomPlatformData.cpp:
 92 (WebCore::FontCustomPlatformData::fontPlatformData):
 93 - Ditto.
 94 * platform/graphics/skia/FontCustomPlatformData.h:
 95 - Ditto.
 96 * platform/graphics/win/FontCustomPlatformData.cpp:
 97 (WebCore::FontCustomPlatformData::fontPlatformData):
 98 - Ditto.
 99 * platform/graphics/win/FontCustomPlatformData.h:
 100 - Ditto.
 101 * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
 102 - Ditto.
 103 (WebCore::FontCustomPlatformData::fontPlatformData):
 104 - Ditto.
 105 * platform/graphics/win/FontCustomPlatformDataCairo.h:
 106 - Ditto.
 107 * platform/graphics/wince/FontCustomPlatformData.cpp:
 108 (WebCore::FontCustomPlatformData::fontPlatformData):
 109 - Ditto.
 110 * platform/graphics/wince/FontCustomPlatformData.h:
 111 - Ditto.
 112 * platform/graphics/wx/FontCustomPlatformData.cpp:
 113 (WebCore::FontCustomPlatformData::fontPlatformData):
 114 - Ditto.
 115 * platform/graphics/wx/FontCustomPlatformData.h:
 116 - Ditto.
 117 * rendering/InlineTextBox.cpp:
 118 (WebCore::InlineTextBox::paint):
 119 - In case of RenderCombineText, we don't rotate text even in vertical writing. Also, we render original text
 120 instead of text returned from text().
 121 * rendering/RenderBlock.cpp:
 122 (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
 123 - Made to call RenderCombinedText's prepareTextCombine() here.
 124 * rendering/RenderBlockLineLayout.cpp:
 125 (WebCore::textWidth):
 126 - Made to always use the render object's width() in case of TextCombine.
 127 (WebCore::RenderBlock::findNextLineBreak):
 128 - Made to call RenderCombinedText's prepareTextCombine() here.
 129 * rendering/RenderCombineText.cpp: Added. A subclass of RenderText.
 130 (WebCore::RenderCombineText::RenderCombineText):
 131 (WebCore::RenderCombineText::styleDidChange):
 132 - Clear the flag that indicated the font has been prepared for combining. The font will be reinitialized in
 133 the next call of RenderBlock::findNextLineBreak().
 134 (WebCore::RenderCombineText::setTextInternal):
 135 - Ditto.
 136 (WebCore::RenderCombineText::width):
 137 - Returns 1-em width in case of font combine.
 138 (WebCore::RenderCombineText::adjustTextOrigin):
 139 - Adjust drawing origin point in case of font combine.
 140 (WebCore::RenderCombineText::charactersToRender):
 141 - Return original text instead of current text in case of font combine.
 142 (WebCore::RenderCombineText::combineText):
 143 - This function tries to pack passed text with; 1) the current font as is, 2) the font created
 144 from the descriptor with half-width variant specified, 3) the font with third-width variant, 4) the font
 145 with quarter-width variant.
 146 - If a suitable font successfully found, replace the current font with the new font. If no appropriate font found,
 147 we give up text-combine as the CSS spec describes.
 148 - If a new font found, we replace the text with 0xFFFC. This is needed for a combined text block to be able to
 149 behave like a single character against text decorations.
 150 * rendering/RenderCombineText.h: Added.
 151 (WebCore::RenderCombineText::isCombined):
 152 (WebCore::RenderCombineText::combinedTextWidth):
 153 - Returns 1-em width in case of font combine.
 154 (WebCore::RenderCombineText::renderName):
 155 (WebCore::toRenderCombineText):
 156 * rendering/RenderText.cpp:
 157 (WebCore::RenderText::widthFromCache):
 158 - Made to call RenderCombineText's combinedTextWidth when the text is combined.
 159 * rendering/RenderingAllInOne.cpp: Added RenderCombineText.cpp
 160 * rendering/style/RenderStyle.h:
 161 (WebCore::InheritedFlags::hasTextCombine):
 162 - Added for a quick test of TextCombine.
 163
11642011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
2165
3166 Unreviewed, rolling out r76893.
76925

Source/WebCore/Android.mk

@@LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
666666 rendering/RenderBox.cpp \
667667 rendering/RenderBoxModelObject.cpp \
668668 rendering/RenderButton.cpp \
 669 rendering/RenderCombineText.cpp \
669670 rendering/RenderCounter.cpp \
670671 rendering/RenderEmbeddedObject.cpp \
671672 rendering/RenderFieldset.cpp \
76925

Source/WebCore/CMakeLists.txt

@@SET(WebCore_SOURCES
14691469 rendering/RenderBox.cpp
14701470 rendering/RenderBoxModelObject.cpp
14711471 rendering/RenderButton.cpp
 1472 rendering/RenderCombineText.cpp
14721473 rendering/RenderCounter.cpp
14731474 rendering/RenderDataGrid.cpp
14741475 rendering/RenderDetails.cpp
76925

Source/WebCore/GNUmakefile.am

@@webcore_sources += \
27402740 Source/WebCore/rendering/RenderBR.h \
27412741 Source/WebCore/rendering/RenderButton.cpp \
27422742 Source/WebCore/rendering/RenderButton.h \
 2743 Source/WebCore/rendering/RenderCombineText.cpp \
 2744 Source/WebCore/rendering/RenderCombineText.h \
27432745 Source/WebCore/rendering/RenderCounter.cpp \
27442746 Source/WebCore/rendering/RenderCounter.h \
27452747 Source/WebCore/rendering/RenderDataGrid.cpp \
76925

Source/WebCore/WebCore.exp.in

@@__ZN7WebCore16DeviceMotionData12Accelera
408408__ZN7WebCore16DeviceMotionData12RotationRate6createEbdbdbd
409409__ZN7WebCore16DeviceMotionData6createEN3WTF10PassRefPtrINS0_12AccelerationEEES4_NS2_INS0_12RotationRateEEEbd
410410__ZN7WebCore16FontFallbackList15releaseFontDataEv
411 __ZN7WebCore16FontPlatformDataC1EP6NSFontfbbNS_15FontOrientationE
 411__ZN7WebCore16FontPlatformDataC1EP6NSFontfbbNS_15FontOrientationENS_16FontWidthVariantE
412412__ZN7WebCore16FontPlatformDataD1Ev
413413__ZN7WebCore16HTMLInputElement13setAutofilledEb
414414__ZN7WebCore16LegacyWebArchive19createFromSelectionEPNS_5FrameE
76925

Source/WebCore/WebCore.gypi

38203820 'rendering/RenderBoxModelObject.h',
38213821 'rendering/RenderButton.cpp',
38223822 'rendering/RenderButton.h',
 3823 'rendering/RenderCombineText.cpp',
 3824 'rendering/RenderCombineText.h',
38233825 'rendering/RenderCounter.cpp',
38243826 'rendering/RenderCounter.h',
38253827 'rendering/RenderDataGrid.cpp',
76925

Source/WebCore/WebCore.pro

@@SOURCES += \
13061306 rendering/RenderBoxModelObject.cpp \
13071307 rendering/RenderBR.cpp \
13081308 rendering/RenderButton.cpp \
 1309 rendering/RenderCombineText.cpp \
13091310 rendering/RenderCounter.cpp \
13101311 rendering/RenderDataGrid.cpp \
13111312 rendering/RenderDetails.cpp \

@@HEADERS += \
22752276 rendering/RenderBoxModelObject.h \
22762277 rendering/RenderBR.h \
22772278 rendering/RenderButton.h \
 2279 rendering/RenderCombineText.h \
22782280 rendering/RenderCounter.h \
22792281 rendering/RenderDataGrid.h \
22802282 rendering/RenderDetails.h \
76925

Source/WebCore/WebCore.vcproj/WebCore.vcproj

3305833058 >
3305933059 </File>
3306033060 <File
 33061 RelativePath="..\rendering\RenderCombineText.cpp"
 33062 >
 33063 <FileConfiguration
 33064 Name="Debug|Win32"
 33065 ExcludedFromBuild="true"
 33066 >
 33067 <Tool
 33068 Name="VCCLCompilerTool"
 33069 />
 33070 </FileConfiguration>
 33071 <FileConfiguration
 33072 Name="Release|Win32"
 33073 ExcludedFromBuild="true"
 33074 >
 33075 <Tool
 33076 Name="VCCLCompilerTool"
 33077 />
 33078 </FileConfiguration>
 33079 <FileConfiguration
 33080 Name="Debug_Cairo_CFLite|Win32"
 33081 ExcludedFromBuild="true"
 33082 >
 33083 <Tool
 33084 Name="VCCLCompilerTool"
 33085 />
 33086 </FileConfiguration>
 33087 <FileConfiguration
 33088 Name="Release_Cairo_CFLite|Win32"
 33089 ExcludedFromBuild="true"
 33090 >
 33091 <Tool
 33092 Name="VCCLCompilerTool"
 33093 />
 33094 </FileConfiguration>
 33095 <FileConfiguration
 33096 Name="Debug_All|Win32"
 33097 ExcludedFromBuild="true"
 33098 >
 33099 <Tool
 33100 Name="VCCLCompilerTool"
 33101 />
 33102 </FileConfiguration>
 33103 <FileConfiguration
 33104 Name="Release_LTCG|Win32"
 33105 ExcludedFromBuild="true"
 33106 >
 33107 <Tool
 33108 Name="VCCLCompilerTool"
 33109 />
 33110 </FileConfiguration>
 33111 </File>
 33112 <File
 33113 RelativePath="..\rendering\RenderCombineText.h"
 33114 >
 33115 </File>
 33116 <File
3306133117 RelativePath="..\rendering\RenderCounter.cpp"
3306233118 >
3306333119 <FileConfiguration
76925

Source/WebCore/WebCore.xcodeproj/project.pbxproj

57025702 F5C041E70FFCA96D00839D4A /* JSHTMLDataListElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041E20FFCA96D00839D4A /* JSHTMLDataListElement.h */; };
57035703 F5D3A57C106B83B300545297 /* DateComponents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D3A57A106B83B300545297 /* DateComponents.cpp */; };
57045704 F5D3A57D106B83B300545297 /* DateComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D3A57B106B83B300545297 /* DateComponents.h */; settings = {ATTRIBUTES = (Private, ); }; };
 5705 F70E78F812ED1CE40074D4B9 /* RenderCombineText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F70E78F612ED1CE40074D4B9 /* RenderCombineText.cpp */; };
 5706 F70E78F912ED1CE40074D4B9 /* RenderCombineText.h in Headers */ = {isa = PBXBuildFile; fileRef = F70E78F712ED1CE40074D4B9 /* RenderCombineText.h */; };
 5707 F70E78FB12ED1CFA0074D4B9 /* FontWidthVariant.h in Headers */ = {isa = PBXBuildFile; fileRef = F70E78FA12ED1CFA0074D4B9 /* FontWidthVariant.h */; settings = {ATTRIBUTES = (Private, ); }; };
57055708 F7A034C4126BF6BE007DC19E /* FontOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = F7A034C3126BF6BE007DC19E /* FontOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; };
57065709 F916C48D0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */; };
57075710 F916C48E0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */; };

1209512098 F5C2869502846DCD018635CA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
1209612099 F5D3A57A106B83B300545297 /* DateComponents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateComponents.cpp; sourceTree = "<group>"; };
1209712100 F5D3A57B106B83B300545297 /* DateComponents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateComponents.h; sourceTree = "<group>"; };
 12101 F70E78F612ED1CE40074D4B9 /* RenderCombineText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderCombineText.cpp; sourceTree = "<group>"; };
 12102 F70E78F712ED1CE40074D4B9 /* RenderCombineText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderCombineText.h; sourceTree = "<group>"; };
 12103 F70E78FA12ED1CFA0074D4B9 /* FontWidthVariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontWidthVariant.h; sourceTree = "<group>"; };
1209812104 F7A034C3126BF6BE007DC19E /* FontOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontOrientation.h; sourceTree = "<group>"; };
1209912105 F8216299029F4FB501000131 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1210012106 F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLHttpRequestProgressEvent.cpp; sourceTree = "<group>"; };

1748317489 B2C3DA5A0D006CD600EF6F26 /* FontSelector.h */,
1748417490 37202198106213C600F25C4B /* FontSmoothingMode.h */,
1748517491 3784C34A0E11AA34007D8D48 /* FontTraitsMask.h */,
 17492 F70E78FA12ED1CFA0074D4B9 /* FontWidthVariant.h */,
1748617493 BCE04C930DAFF902007A0F41 /* GeneratedImage.cpp */,
1748717494 BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */,
1748817495 BCE04C890DAFF7A0007A0F41 /* Generator.h */,

1873718744 BCEA4825097D93020094C9E4 /* RenderBR.h */,
1873818745 BCEA4826097D93020094C9E4 /* RenderButton.cpp */,
1873918746 BCEA4827097D93020094C9E4 /* RenderButton.h */,
 18747 F70E78F612ED1CE40074D4B9 /* RenderCombineText.cpp */,
 18748 F70E78F712ED1CE40074D4B9 /* RenderCombineText.h */,
1874018749 9392F1430AD185FE00691BD4 /* RenderCounter.cpp */,
1874118750 9392F1410AD185F400691BD4 /* RenderCounter.h */,
1874218751 BC77CEC70FF01CBE0070887B /* RenderDataGrid.cpp */,

2244122450 BC9585E112F0989500755821 /* PlatformGestureEvent.h in Headers */,
2244222451 E134F5AB12EE343F004EC58D /* IntRectHash.h in Headers */,
2244322452 977E2DCE12F0E28300C13379 /* HTMLSourceTracker.h in Headers */,
 22453 F70E78F912ED1CE40074D4B9 /* RenderCombineText.h in Headers */,
 22454 F70E78FB12ED1CFA0074D4B9 /* FontWidthVariant.h in Headers */,
2244422455 );
2244522456 runOnlyForDeploymentPostprocessing = 0;
2244622457 };

2513625147 BC8AE34E12EA096A00EB3AE6 /* ScrollableArea.cpp in Sources */,
2513725148 4F2D205512EAE7B3005C2874 /* InspectorAgent.cpp in Sources */,
2513825149 977E2DCD12F0E28300C13379 /* HTMLSourceTracker.cpp in Sources */,
 25150 F70E78F812ED1CE40074D4B9 /* RenderCombineText.cpp in Sources */,
2513925151 );
2514025152 runOnlyForDeploymentPostprocessing = 0;
2514125153 };
76925

Source/WebCore/css/CSSFontFaceSource.cpp

@@SimpleFontData* CSSFontFaceSource::getFo
115115 }
116116
117117 // See if we have a mapping in our FontData cache.
118  unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 3 | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
 118 unsigned hashKey = (fontDescription.computedPixelSize() + 1) << 5 | fontDescription.widthVariant() << 3 | (fontDescription.orientation() == Vertical ? 4 : 0) | (syntheticBold ? 2 : 0) | (syntheticItalic ? 1 : 0);
119119 if (SimpleFontData* cachedData = m_fontDataTable.get(hashKey))
120120 return cachedData;
121121

@@SimpleFontData* CSSFontFaceSource::getFo
162162 if (!m_font->ensureCustomFontData())
163163 return 0;
164164
165  fontData.set(new SimpleFontData(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic, fontDescription.orientation(), fontDescription.renderingMode()), true, false));
 165 fontData.set(new SimpleFontData(m_font->platformDataFromCustomData(fontDescription.computedPixelSize(), syntheticBold, syntheticItalic, fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.renderingMode()), true, false));
166166 }
167167 } else {
168168#if ENABLE(SVG_FONTS)
76925

Source/WebCore/css/CSSStyleSelector.cpp

@@void CSSStyleSelector::applyProperty(int
57645764
57655765 case CSSPropertyWebkitTextCombine:
57665766 HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textCombine, TextCombine)
 5767 if (m_style->hasTextCombine())
 5768 m_style->setUnique(); // The style could be modified in RenderCombineText depending on text metrics.
57675769 return;
57685770
57695771 case CSSPropertyWebkitTextEmphasisPosition:
76925

Source/WebCore/dom/Text.cpp

2323#include "Text.h"
2424
2525#include "ExceptionCode.h"
 26#include "RenderCombineText.h"
2627#include "RenderText.h"
2728#include "TextBreakIterator.h"
2829#include <wtf/text/CString.h>

@@bool Text::rendererIsNeeded(RenderStyle
237238 return true;
238239}
239240
240 RenderObject* Text::createRenderer(RenderArena* arena, RenderStyle*)
 241RenderObject* Text::createRenderer(RenderArena* arena, RenderStyle* style)
241242{
242243#if ENABLE(SVG)
243244 Node* parentOrHost = parentOrHostNode();

@@RenderObject* Text::createRenderer(Rende
248249 )
249250 return new (arena) RenderSVGInlineText(this, dataImpl());
250251#endif
251 
 252
 253 if (style->hasTextCombine())
 254 return new (arena) RenderCombineText(this, dataImpl());
 255
252256 return new (arena) RenderText(this, dataImpl());
253257}
254258
76925

Source/WebCore/loader/cache/CachedFont.cpp

@@bool CachedFont::ensureCustomFontData()
117117 return m_fontData;
118118}
119119
120 FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, FontRenderingMode renderingMode)
 120FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode renderingMode)
121121{
122122#if ENABLE(SVG_FONTS)
123123 if (m_externalSVGDocument)

@@FontPlatformData CachedFont::platformDat
125125#endif
126126#ifdef STORE_FONT_CUSTOM_PLATFORM_DATA
127127 ASSERT(m_fontData);
128  return m_fontData->fontPlatformData(static_cast<int>(size), bold, italic, orientation, renderingMode);
 128 return m_fontData->fontPlatformData(static_cast<int>(size), bold, italic, orientation, widthVariant, renderingMode);
129129#else
130130 return FontPlatformData();
131131#endif
76925

Source/WebCore/loader/cache/CachedFont.h

2929#include "CachedResource.h"
3030#include "FontOrientation.h"
3131#include "FontRenderingMode.h"
 32#include "FontWidthVariant.h"
3233#include <wtf/Vector.h>
3334
3435#if ENABLE(SVG_FONTS)

@@public:
6364 void beginLoadIfNeeded(CachedResourceLoader* dl);
6465
6566 bool ensureCustomFontData();
66  FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
 67 FontPlatformData platformDataFromCustomData(float size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
6768
6869#if ENABLE(SVG_FONTS)
6970 bool isSVGFont() const { return m_isSVGFont; }
76925

Source/WebCore/platform/graphics/Font.h

@@public:
123123
124124 bool italic() const { return m_fontDescription.italic(); }
125125 FontWeight weight() const { return m_fontDescription.weight(); }
 126 FontWidthVariant widthVariant() const { return m_fontDescription.widthVariant(); }
126127
127128 bool isPlatformFont() const { return m_isPlatformFont; }
128129
76925

Source/WebCore/platform/graphics/FontCache.cpp

@@struct FontPlatformDataCacheKey {
5757 WTF_MAKE_FAST_ALLOCATED;
5858public:
5959 FontPlatformDataCacheKey(const AtomicString& family = AtomicString(), unsigned size = 0, unsigned weight = 0, bool italic = false,
60  bool isPrinterFont = false, FontRenderingMode renderingMode = NormalRenderingMode, FontOrientation orientation = Horizontal)
 60 bool isPrinterFont = false, FontRenderingMode renderingMode = NormalRenderingMode, FontOrientation orientation = Horizontal, FontWidthVariant widthVariant = RegularWidth)
6161 : m_size(size)
6262 , m_weight(weight)
6363 , m_family(family)

@@public:
6565 , m_printerFont(isPrinterFont)
6666 , m_renderingMode(renderingMode)
6767 , m_orientation(orientation)
 68 , m_widthVariant(widthVariant)
6869 {
6970 }
7071

@@public:
7576 {
7677 return equalIgnoringCase(m_family, other.m_family) && m_size == other.m_size &&
7778 m_weight == other.m_weight && m_italic == other.m_italic && m_printerFont == other.m_printerFont &&
78  m_renderingMode == other.m_renderingMode && m_orientation == other.m_orientation;
 79 m_renderingMode == other.m_renderingMode && m_orientation == other.m_orientation && m_widthVariant == other.m_widthVariant;
7980 }
8081
8182 unsigned m_size;

@@public:
8586 bool m_printerFont;
8687 FontRenderingMode m_renderingMode;
8788 FontOrientation m_orientation;
 89 FontWidthVariant m_widthVariant;
8890
8991private:
9092 static unsigned hashTableDeletedSize() { return 0xFFFFFFFFU; }

@@private:
9294
9395inline unsigned computeHash(const FontPlatformDataCacheKey& fontKey)
9496{
95  unsigned hashCodes[4] = {
 97 unsigned hashCodes[5] = {
9698 CaseFoldingHash::hash(fontKey.m_family),
9799 fontKey.m_size,
98100 fontKey.m_weight,
 101 fontKey.m_widthVariant,
99102 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)
100103 };
101104 return WTF::StringHasher::createBlobHash<sizeof(hashCodes)>(hashCodes);

@@FontPlatformData* FontCache::getCachedFo
195198 }
196199
197200 FontPlatformDataCacheKey key(familyName, fontDescription.computedPixelSize(), fontDescription.weight(), fontDescription.italic(),
198  fontDescription.usePrinterFont(), fontDescription.renderingMode(), fontDescription.orientation());
 201 fontDescription.usePrinterFont(), fontDescription.renderingMode(), fontDescription.orientation(), fontDescription.widthVariant());
199202 FontPlatformData* result = 0;
200203 bool foundResult;
201204 FontPlatformDataCache::iterator it = gFontPlatformDataCache->find(key);
76925

Source/WebCore/platform/graphics/FontDescription.h

3030#include "FontRenderingMode.h"
3131#include "FontSmoothingMode.h"
3232#include "FontTraitsMask.h"
 33#include "FontWidthVariant.h"
3334#include "TextRenderingMode.h"
3435
3536namespace WebCore {

@@public:
5758 : m_specifiedSize(0)
5859 , m_computedSize(0)
5960 , m_orientation(Horizontal)
 61 , m_widthVariant(RegularWidth)
6062 , m_italic(false)
6163 , m_smallCaps(false)
6264 , m_isAbsoluteSize(false)

@@public:
9799 FontTraitsMask traitsMask() const;
98100 bool isSpecifiedFont() const { return m_isSpecifiedFont; }
99101 FontOrientation orientation() const { return m_orientation; }
 102 FontWidthVariant widthVariant() const { return m_widthVariant; }
100103
101104 void setFamily(const FontFamily& family) { m_familyList = family; }
102105 void setComputedSize(float s) { m_computedSize = s; }

@@public:
117120 void setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = rendering; }
118121 void setIsSpecifiedFont(bool isSpecifiedFont) { m_isSpecifiedFont = isSpecifiedFont; }
119122 void setOrientation(FontOrientation orientation) { m_orientation = orientation; }
 123 void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = widthVariant; }
120124
121125private:
122126 FontFamily m_familyList; // The list of font families to be used.

@@private:
126130 float m_computedSize; // Computed size adjusted for the minimum font size and the zoom factor.
127131
128132 FontOrientation m_orientation;
 133
 134 FontWidthVariant m_widthVariant;
129135
130136 bool m_italic : 1;
131137 bool m_smallCaps : 1;

@@inline bool FontDescription::operator==(
162168 && m_fontSmoothing == other.m_fontSmoothing
163169 && m_textRendering == other.m_textRendering
164170 && m_isSpecifiedFont == other.m_isSpecifiedFont
165  && m_orientation == other.m_orientation;
 171 && m_orientation == other.m_orientation
 172 && m_widthVariant == other.m_widthVariant;
166173}
167174
168175}
76925

Source/WebCore/platform/graphics/FontWidthVariant.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef FontWidthVariant_h
 27#define FontWidthVariant_h
 28
 29namespace WebCore {
 30
 31enum FontWidthVariant { RegularWidth, HalfWidth, ThirdWidth, QuarterWidth };
 32
 33} // namespace WebCore
 34
 35#endif // FontWidthVariant_h
0

Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h

2424
2525#include "FontOrientation.h"
2626#include "FontRenderingMode.h"
 27#include "FontWidthVariant.h"
2728#include <wtf/Forward.h>
2829#include <wtf/Noncopyable.h>
2930

@@struct FontCustomPlatformData {
4041public:
4142 FontCustomPlatformData(FT_Face, SharedBuffer*);
4243 ~FontCustomPlatformData();
43  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
 44 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
4445 static bool supportsFormat(const String&);
4546
4647private:
76925

Source/WebCore/platform/graphics/cocoa/FontPlatformData.h

2525#define FontPlatformData_h
2626
2727#include "FontOrientation.h"
 28#include "FontWidthVariant.h"
2829#include <wtf/text/StringImpl.h>
2930
3031#ifdef __OBJC__

@@inline CTFontRef toCTFontRef(NSFont *nsF
5960
6061class FontPlatformData {
6162 public:
62  FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation = Horizontal)
 63 FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation = Horizontal, FontWidthVariant widthVariant = RegularWidth)
6364 : m_syntheticBold(syntheticBold)
6465 , m_syntheticOblique(syntheticOblique)
6566 , m_orientation(orientation)
6667 , m_size(size)
 68 , m_widthVariant(widthVariant)
6769 , m_font(0)
6870#ifdef BUILDING_ON_TIGER
6971 , m_cgFont(0)

@@class FontPlatformData {
7274 {
7375 }
7476
75  FontPlatformData(NSFont *nsFont, float size, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = Horizontal);
 77 FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = Horizontal, FontWidthVariant = RegularWidth);
7678
77  FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation)
 79 FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant)
7880 : m_syntheticBold(syntheticBold)
7981 , m_syntheticOblique(syntheticOblique)
8082 , m_orientation(orientation)
8183 , m_size(size)
 84 , m_widthVariant(widthVariant)
8285 , m_font(0)
8386 , m_cgFont(cgFont)
8487 , m_isColorBitmapFont(false)

@@class FontPlatformData {
9699 bool syntheticBold() const { return m_syntheticBold; }
97100 bool syntheticOblique() const { return m_syntheticOblique; }
98101 FontOrientation orientation() const { return m_orientation; }
 102 FontWidthVariant widthVariant() const { return m_widthVariant; }
99103
100104 bool m_syntheticBold;
101105 bool m_syntheticOblique;
102106 FontOrientation m_orientation;
103107
104108 float m_size;
 109
 110 FontWidthVariant m_widthVariant;
105111
106112 unsigned hash() const
107113 {
108114 ASSERT(m_font != 0 || m_cgFont == 0);
109  uintptr_t hashCodes[2] = { (uintptr_t)m_font, m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique };
 115 uintptr_t hashCodes[3] = { (uintptr_t)m_font, m_widthVariant, m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique };
110116 return WTF::StringHasher::createBlobHash<sizeof(hashCodes)>(hashCodes);
111117 }
112118

@@class FontPlatformData {
115121 bool operator==(const FontPlatformData& other) const
116122 {
117123 return m_font == other.m_font && m_syntheticBold == other.m_syntheticBold && m_syntheticOblique == other.m_syntheticOblique &&
118  m_cgFont == other.m_cgFont && m_size == other.m_size && m_orientation == other.m_orientation;
 124 m_cgFont == other.m_cgFont && m_size == other.m_size && m_orientation == other.m_orientation && m_widthVariant == other.m_widthVariant;
119125 }
120126
121127 NSFont *font() const { return m_font; }
76925

Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm

3030
3131namespace WebCore {
3232
 33// These CoreText Text Spacing feature selectors are not defined in CoreText.
 34enum TextSpacingCTFeatureSelector { TextSpacingProportional, TextSpacingFullWidth, TextSpacingHalfWidth, TextSpacingThirdWidth, TextSpacingQuarterWidth };
 35
3336#if PLATFORM(MAC)
3437void FontPlatformData::loadFont(NSFont* nsFont, float, NSFont*& outNSFont, CGFontRef& cgFont)
3538{

@@void FontPlatformData::loadFont(NSFont*
4245}
4346#endif // PLATFORM(MAC)
4447
45 FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation)
 48FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant)
4649 : m_syntheticBold(syntheticBold)
4750 , m_syntheticOblique(syntheticOblique)
4851 , m_size(size)
 52 , m_widthVariant(widthVariant)
4953 , m_font(nsFont)
5054#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
5155 // FIXME: Chromium: The following code isn't correct for the Chromium port since the sandbox might

@@FontPlatformData::FontPlatformData(const
7983 m_syntheticBold = f.m_syntheticBold;
8084 m_syntheticOblique = f.m_syntheticOblique;
8185 m_size = f.m_size;
 86 m_widthVariant = f.m_widthVariant;
8287 m_cgFont = f.m_cgFont;
8388 m_isColorBitmapFont = f.m_isColorBitmapFont;
8489 m_orientation = f.m_orientation;

@@const FontPlatformData& FontPlatformData
99104 m_syntheticBold = f.m_syntheticBold;
100105 m_syntheticOblique = f.m_syntheticOblique;
101106 m_size = f.m_size;
 107 m_widthVariant = f.m_widthVariant;
102108 m_cgFont = f.m_cgFont;
103109 if (m_font == f.m_font)
104110 return *this;

@@bool FontPlatformData::allowsLigatures()
165171 return ![[m_font coveredCharacterSet] characterIsMember:'a'];
166172}
167173
 174inline int mapFontWidthVariantToCTFeatureSelector(FontWidthVariant variant)
 175{
 176 switch(variant) {
 177 case RegularWidth:
 178 return TextSpacingProportional;
 179
 180 case HalfWidth:
 181 return TextSpacingHalfWidth;
 182
 183 case ThirdWidth:
 184 return TextSpacingThirdWidth;
 185
 186 case QuarterWidth:
 187 return TextSpacingQuarterWidth;
 188 }
 189
 190 ASSERT_NOT_REACHED();
 191 return TextSpacingProportional;
 192}
 193
168194CTFontRef FontPlatformData::ctFont() const
169195{
170  if (m_font)
171  return toCTFontRef(m_font);
172  if (!m_CTFont)
173  m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, 0));
 196 if (m_widthVariant == RegularWidth) {
 197 if (m_font)
 198 return toCTFontRef(m_font);
 199 if (!m_CTFont)
 200 m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, 0));
 201 return m_CTFont.get();
 202 }
 203
 204 if (!m_CTFont) {
 205 int featureTypeValue = kTextSpacingType;
 206 int featureSelectorValue = mapFontWidthVariantToCTFeatureSelector(m_widthVariant);
 207 RetainPtr<CTFontRef> sourceFont(AdoptCF, CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, 0));
 208 RetainPtr<CTFontDescriptorRef> sourceDescriptor(AdoptCF, CTFontCopyFontDescriptor(sourceFont.get()));
 209 RetainPtr<CFNumberRef> featureType(AdoptCF, CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &featureTypeValue));
 210 RetainPtr<CFNumberRef> featureSelector(AdoptCF, CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &featureSelectorValue));
 211 RetainPtr<CTFontDescriptorRef> newDescriptor(AdoptCF, CTFontDescriptorCreateCopyWithFeature(sourceDescriptor.get(), featureType.get(), featureSelector.get()));
 212 RetainPtr<CTFontRef> newFont(AdoptCF, CTFontCreateWithFontDescriptor(newDescriptor.get(), m_size, 0));
 213
 214 m_CTFont = newFont.get() ? newFont : sourceFont;
 215 }
174216 return m_CTFont.get();
175217}
176218
76925

Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp

@@FontCustomPlatformData::~FontCustomPlatf
5959 cairo_font_face_destroy(m_fontFace);
6060}
6161
62 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
 62FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode)
6363{
6464 return FontPlatformData(m_fontFace, size, bold, italic);
6565}
76925

Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.cpp

@@FontCustomPlatformData::~FontCustomPlatf
3131{
3232}
3333
34 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
 34FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode)
3535{
3636 return FontPlatformData(size, bold, italic);
3737}
76925

Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.h

2323
2424#include "FontOrientation.h"
2525#include "FontRenderingMode.h"
 26#include "FontWidthVariant.h"
2627#include <wtf/Forward.h>
2728
2829namespace WebCore {

@@namespace WebCore {
3839
3940 static bool supportsFormat(const String&);
4041
41  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
 42 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
4243 };
4344
4445 FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*);
76925

Source/WebCore/platform/graphics/mac/FontCacheMac.mm

@@FontPlatformData* FontCache::createFontP
211211 bool syntheticBold = isAppKitFontWeightBold(weight) && !isAppKitFontWeightBold(actualWeight);
212212 bool syntheticOblique = (traits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait);
213213
214  return new FontPlatformData(platformFont, size, syntheticBold, syntheticOblique, fontDescription.orientation());
 214 return new FontPlatformData(platformFont, size, syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription.widthVariant());
215215}
216216
217217} // namespace WebCore
76925

Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp

@@FontCustomPlatformData::~FontCustomPlatf
3838 CGFontRelease(m_cgFont);
3939}
4040
41 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontRenderingMode)
 41FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant, FontRenderingMode)
4242{
43  return FontPlatformData(m_cgFont, size, bold, italic, orientation);
 43 return FontPlatformData(m_cgFont, size, bold, italic, orientation, widthVariant);
4444}
4545
4646FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
76925

Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h

2323
2424#include "FontOrientation.h"
2525#include "FontRenderingMode.h"
 26#include "FontWidthVariant.h"
2627#include <CoreFoundation/CFBase.h>
2728#include <wtf/Forward.h>
2829#include <wtf/Noncopyable.h>

@@public:
4748
4849 ~FontCustomPlatformData();
4950
50  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
 51 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
5152
5253 static bool supportsFormat(const String&);
5354
76925

Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp

@@namespace WebCore {
3939#ifndef BUILDING_ON_TIGER
4040static bool shouldUseCoreText(UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
4141{
42  if (fontData->orientation() == Vertical && !fontData->isBrokenIdeographFont()) {
43  // Ideographs don't have a vertical variant.
 42 if (fontData->platformData().widthVariant() != RegularWidth || (fontData->orientation() == Vertical && !fontData->isBrokenIdeographFont())) {
 43 // Ideographs don't have a vertical variant or width variants.
4444 for (unsigned i = 0; i < bufferLength; ++i) {
4545 if (!Font::isCJKIdeograph(buffer[i]))
4646 return true;
76925

Source/WebCore/platform/graphics/pango/FontCustomPlatformDataPango.cpp

@@FontCustomPlatformData::~FontCustomPlatf
3030{
3131}
3232
33 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
 33FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode)
3434{
3535 return FontPlatformData(m_fontFace, size, bold, italic);
3636}
76925

Source/WebCore/platform/graphics/qt/FontCustomPlatformData.h

2424
2525#include "FontOrientation.h"
2626#include "FontRenderingMode.h"
 27#include "FontWidthVariant.h"
2728#include <wtf/FastAllocBase.h>
2829#include <wtf/Forward.h>
2930#include <wtf/Noncopyable.h>

@@public:
4243 // for use with QFontDatabase::addApplicationFont/removeApplicationFont
4344 int m_handle;
4445
45  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
 46 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
4647
4748 static bool supportsFormat(const String&);
4849};
76925

Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp

@@FontCustomPlatformData::~FontCustomPlatf
3434 QFontDatabase::removeApplicationFont(m_handle);
3535}
3636
37 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
 37FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode)
3838{
3939 QFont font;
4040 font.setFamily(QFontDatabase::applicationFontFamilies(m_handle)[0]);
76925

Source/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp

@@FontCustomPlatformData::~FontCustomPlatf
6565#endif
6666}
6767
68 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontRenderingMode mode)
 68FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant, FontRenderingMode mode)
6969{
7070#if OS(WINDOWS)
7171 ASSERT(m_fontReference);
76925

Source/WebCore/platform/graphics/skia/FontCustomPlatformData.h

3434
3535#include "FontOrientation.h"
3636#include "FontRenderingMode.h"
 37#include "FontWidthVariant.h"
3738#include <wtf/Forward.h>
3839#include <wtf/Noncopyable.h>
3940

@@public:
6566
6667 ~FontCustomPlatformData();
6768
68  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal,
 69 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth,
6970 FontRenderingMode = NormalRenderingMode);
7071
7172 static bool supportsFormat(const String&);
76925

Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp

@@FontCustomPlatformData::~FontCustomPlatf
5959 }
6060}
6161
62 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode renderingMode)
 62FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode renderingMode)
6363{
6464 ASSERT(m_fontReference);
6565 ASSERT(T2embedLibrary());
76925

Source/WebCore/platform/graphics/win/FontCustomPlatformData.h

2323
2424#include "FontOrientation.h"
2525#include "FontRenderingMode.h"
 26#include "FontWidthVariant.h"
2627#include "PlatformString.h"
2728#include <wtf/Forward.h>
2829#include <wtf/Noncopyable.h>

@@public:
4546
4647 ~FontCustomPlatformData();
4748
48  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
 49 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
4950
5051 static bool supportsFormat(const String&);
5152
76925

Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp

@@FontCustomPlatformData::~FontCustomPlatf
3232 cairo_font_face_destroy(m_fontFace);
3333}
3434
35 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation)
 35FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant)
3636{
3737 return FontPlatformData(m_fontFace, size, bold, italic);
3838}
76925

Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.h

@@public:
4242 }
4343 ~FontCustomPlatformData();
4444
45  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal);
 45 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth);
4646
4747 static bool supportsFormat(const String&);
4848
76925

Source/WebCore/platform/graphics/wince/FontCustomPlatformData.cpp

@@FontCustomPlatformData::~FontCustomPlatf
4545 g_customFontCache->unregisterFont(m_name);
4646}
4747
48 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode renderingMode)
 48FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode renderingMode)
4949{
5050 FontDescription fontDesc;
5151 fontDesc.setComputedSize(size);
76925

Source/WebCore/platform/graphics/wince/FontCustomPlatformData.h

2323
2424#include "FontDescription.h"
2525#include "FontRenderingMode.h"
 26#include "FontWidthVariant.h"
2627#include "PlatformString.h"
2728#include <wtf/Noncopyable.h>
2829

@@namespace WebCore {
4748
4849 ~FontCustomPlatformData();
4950
50  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation fontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
 51 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
5152
5253 static bool supportsFormat(const String&);
5354
76925

Source/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp

@@FontCustomPlatformData::~FontCustomPlatf
3131{
3232}
3333
34 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
 34FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode)
3535{
3636 return FontPlatformData(size, bold, italic);
3737}
76925

Source/WebCore/platform/graphics/wx/FontCustomPlatformData.h

2323
2424#include "FontOrientation.h"
2525#include "FontRenderingMode.h"
 26#include "FontWidthVariant.h"
2627#include <wtf/Forward.h>
2728
2829namespace WebCore {

@@namespace WebCore {
3839
3940 static bool supportsFormat(const String&);
4041
41  FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
 42 FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
4243 };
4344
4445 FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*);
76925

Source/WebCore/rendering/InlineTextBox.cpp

3636#include "PaintInfo.h"
3737#include "RenderArena.h"
3838#include "RenderBlock.h"
 39#include "RenderCombineText.h"
3940#include "RenderRubyRun.h"
4041#include "RenderRubyText.h"
4142#include "RenderTheme.h"

@@void InlineTextBox::paint(PaintInfo& pai
486487 IntRect boxRect(boxOrigin, IntSize(logicalWidth(), logicalHeight()));
487488 IntPoint textOrigin = IntPoint(boxOrigin.x(), boxOrigin.y() + styleToUse->fontMetrics().ascent());
488489
489  if (!isHorizontal()) {
 490 RenderCombineText* combinedText = styleToUse->hasTextCombine() ? toRenderCombineText(textRenderer()) : 0;
 491 bool shouldRotate = !isHorizontal() && (!combinedText || !combinedText->isCombined());
 492 if (shouldRotate) {
490493 context->save();
491494 context->translate(boxRect.x(), boxRect.bottom());
492495 context->rotate(static_cast<float>(deg2rad(90.)));

@@void InlineTextBox::paint(PaintInfo& pai
502505 int d = styleToUse->textDecorationsInEffect();
503506 const Font& font = styleToUse->font();
504507
 508 if (combinedText)
 509 combinedText->adjustTextOrigin(textOrigin, boxRect);
 510
505511 // 1. Paint backgrounds behind text if needed. Examples of such backgrounds include selection
506512 // and composition underlines.
507513 if (paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseTextClip && !isPrinting) {

@@void InlineTextBox::paint(PaintInfo& pai
601607 }
602608 }
603609
604  const UChar* characters = textRenderer()->text()->characters() + m_start;
605610 int length = m_len;
 611 const UChar* characters;
 612 if (!combinedText)
 613 characters = textRenderer()->text()->characters() + m_start;
 614 else
 615 combinedText->charactersToRender(m_start, characters, length);
 616
606617 BufferForAppendingHyphen charactersWithHyphen;
607618 if (hasHyphen())
608619 adjustCharactersAndLengthForHyphen(charactersWithHyphen, styleToUse, characters, length);

@@void InlineTextBox::paint(PaintInfo& pai
703714 }
704715 }
705716
706  if (!isHorizontal())
 717 if (shouldRotate)
707718 context->restore();
708719}
709720
76925

Source/WebCore/rendering/RenderBlock.cpp

3636#include "HitTestResult.h"
3737#include "InlineTextBox.h"
3838#include "PaintInfo.h"
 39#include "RenderCombineText.h"
3940#include "RenderFlexibleBox.h"
4041#include "RenderImage.h"
4142#include "RenderInline.h"

@@void RenderBlock::computeInlinePreferred
47944795 continue;
47954796 }
47964797
 4798 if (t->style()->hasTextCombine())
 4799 toRenderCombineText(t)->combineText();
 4800
47974801 // Determine if we have a breakable character. Pass in
47984802 // whether or not we should ignore any spaces at the front
47994803 // of the string. If those are going to be stripped out,
76925

Source/WebCore/rendering/RenderBlockLineLayout.cpp

2929#include "InlineTextBox.h"
3030#include "Logging.h"
3131#include "RenderArena.h"
 32#include "RenderCombineText.h"
3233#include "RenderInline.h"
3334#include "RenderLayer.h"
3435#include "RenderListMarker.h"

@@void RenderBlock::fitBelowFloats(int wid
13831384
13841385static inline unsigned textWidth(RenderText* text, unsigned from, unsigned len, const Font& font, int xPos, bool isFixedPitch, bool collapseWhiteSpace)
13851386{
1386  if (isFixedPitch || (!from && len == text->textLength()))
 1387 if (isFixedPitch || (!from && len == text->textLength()) || text->style()->hasTextCombine())
13871388 return text->width(from, len, font, xPos);
13881389 return font.width(TextRun(text->characters() + from, len, !collapseWhiteSpace, xPos));
13891390}

@@InlineIterator RenderBlock::findNextLine
16351636 bool isSVGText = t->isSVGInlineText();
16361637#endif
16371638
 1639 RenderStyle* style = t->style(firstLine);
 1640 if (style->hasTextCombine())
 1641 toRenderCombineText(o)->combineText();
 1642
16381643 int strlen = t->textLength();
16391644 int len = strlen - pos;
16401645 const UChar* str = t->characters();
16411646
1642  RenderStyle* style = t->style(firstLine);
16431647 const Font& f = style->font();
16441648 bool isFixedPitch = f.isFixedPitch();
16451649 bool canHyphenate = style->hyphens() == HyphensAuto && WebCore::canHyphenate(style->hyphenationLocale());
76925

Source/WebCore/rendering/RenderCombineText.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * This library is free software; you can redistribute it and/or
 5 * modify it under the terms of the GNU Library General Public
 6 * License as published by the Free Software Foundation; either
 7 * version 2 of the License, or (at your option) any later version.
 8 *
 9 * This library is distributed in the hope that it will be useful,
 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 12 * Library General Public License for more details.
 13 *
 14 * You should have received a copy of the GNU Library General Public License
 15 * along with this library; see the file COPYING.LIB. If not, write to
 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 17 * Boston, MA 02110-1301, USA.
 18 *
 19 */
 20
 21#include "config.h"
 22#include "RenderCombineText.h"
 23
 24#include "TextRun.h"
 25
 26namespace WebCore {
 27
 28const float textCombineMargin = 1.1; // Allow em + 10% margin
 29
 30RenderCombineText::RenderCombineText(Node* node, PassRefPtr<StringImpl> string)
 31 : RenderText(node, string)
 32 , m_combinedTextWidth(0)
 33 , m_isCombined(false)
 34 , m_needsFontUpdate(false)
 35{
 36}
 37
 38void RenderCombineText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
 39{
 40 RenderText::styleDidChange(diff, oldStyle);
 41
 42 m_needsFontUpdate = true;
 43}
 44
 45void RenderCombineText::setTextInternal(PassRefPtr<StringImpl> text)
 46{
 47 RenderText::setTextInternal(text);
 48
 49 m_needsFontUpdate = true;
 50}
 51
 52unsigned RenderCombineText::width(unsigned from, unsigned length, const Font& font, int xPosition, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
 53{
 54 if (!characters())
 55 return 0;
 56
 57 if (m_isCombined)
 58 return font.size();
 59
 60 return RenderText::width(from, length, font, xPosition, fallbackFonts, glyphOverflow);
 61}
 62
 63void RenderCombineText::adjustTextOrigin(IntPoint& textOrigin, const IntRect& boxRect) const
 64{
 65 if (m_isCombined)
 66 textOrigin.move(boxRect.height() / 2 - ceilf(m_combinedTextWidth) / 2, style()->font().pixelSize());
 67}
 68
 69void RenderCombineText::charactersToRender(int start, const UChar*& characters, int& length) const
 70{
 71 if (m_isCombined) {
 72 length = originalText()->length();
 73 characters = originalText()->characters();
 74 return;
 75 }
 76
 77 characters = text()->characters() + start;
 78}
 79
 80void RenderCombineText::combineText()
 81{
 82 if (!m_needsFontUpdate)
 83 return;
 84
 85 m_isCombined = false;
 86 m_needsFontUpdate = false;
 87
 88 // CSS3 spec says text-combine works only in vertical writing mode.
 89 if (style()->isHorizontalWritingMode())
 90 return;
 91
 92 TextRun run = TextRun(String(text()));
 93 float emWidth = style()->font().fontDescription().computedSize() * textCombineMargin;
 94 m_combinedTextWidth = style()->font().floatWidth(run);
 95 m_isCombined = m_combinedTextWidth <= emWidth;
 96
 97 if (!m_isCombined) {
 98 // Need to try compressed glyphs.
 99 static const FontWidthVariant widthVariants[] = { HalfWidth, ThirdWidth, QuarterWidth };
 100 FontDescription compressedFontDescription = style()->font().fontDescription();
 101 for (size_t i = 0 ; i < WTF_ARRAY_LENGTH(widthVariants) ; ++i) {
 102 compressedFontDescription.setWidthVariant(widthVariants[i]);
 103 Font compressedFont = Font(compressedFontDescription, style()->font().letterSpacing(), style()->font().wordSpacing());
 104 compressedFont.update(style()->font().fontSelector());
 105 float runWidth = compressedFont.floatWidth(run);
 106 if (runWidth <= emWidth) {
 107 m_combinedTextWidth = runWidth;
 108 m_isCombined = true;
 109
 110 // Replace my font with the new one.
 111 if (style()->setFontDescription(compressedFontDescription))
 112 style()->font().update(style()->font().fontSelector());
 113
 114 break;
 115 }
 116 }
 117 }
 118
 119 if (m_isCombined) {
 120 static const UChar newCharacter = objectReplacementCharacter;
 121 DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&newCharacter, 1));
 122 RenderText::setTextInternal(objectReplacementCharacterString.impl());
 123 }
 124}
 125
 126} // namespace WebCore
0

Source/WebCore/rendering/RenderCombineText.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * This library is free software; you can redistribute it and/or
 5 * modify it under the terms of the GNU Library General Public
 6 * License as published by the Free Software Foundation; either
 7 * version 2 of the License, or (at your option) any later version.
 8 *
 9 * This library is distributed in the hope that it will be useful,
 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 12 * Library General Public License for more details.
 13 *
 14 * You should have received a copy of the GNU Library General Public License
 15 * along with this library; see the file COPYING.LIB. If not, write to
 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 17 * Boston, MA 02110-1301, USA.
 18 *
 19 */
 20
 21#ifndef RenderCombineText_h
 22#define RenderCombineText_h
 23
 24#include "RenderText.h"
 25
 26namespace WebCore {
 27
 28class RenderCombineText : public RenderText {
 29public:
 30 RenderCombineText(Node*, PassRefPtr<StringImpl>);
 31
 32 void combineText();
 33 void adjustTextOrigin(IntPoint& textOrigin, const IntRect& boxRect) const;
 34 void charactersToRender(int start, const UChar*& characters, int& length) const;
 35 bool isCombined() const { return m_isCombined; }
 36 int combinedTextWidth(const Font& font) const { return font.size(); }
 37
 38private:
 39 virtual unsigned width(unsigned from, unsigned length, const Font&, int xPosition, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
 40 virtual const char* renderName() const { return "RenderCombineText"; }
 41 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
 42 virtual void setTextInternal(PassRefPtr<StringImpl>);
 43
 44 float m_combinedTextWidth;
 45 bool m_isCombined : 1;
 46 bool m_needsFontUpdate : 1;
 47};
 48
 49inline RenderCombineText* toRenderCombineText(RenderObject* object)
 50{
 51 ASSERT(!object || object->isText());
 52 return static_cast<RenderCombineText*>(object);
 53}
 54
 55inline const RenderCombineText* toRenderCombineText(const RenderObject* object)
 56{
 57 ASSERT(!object || object->isText());
 58 return static_cast<const RenderCombineText*>(object);
 59}
 60
 61// This will catch anyone doing an unnecessary cast.
 62void toRenderCombineText(const RenderCombineText*);
 63
 64} // namespace WebCore
 65
 66#endif // RenderCombineText_h
0

Source/WebCore/rendering/RenderText.cpp

3535#include "Range.h"
3636#include "RenderArena.h"
3737#include "RenderBlock.h"
 38#include "RenderCombineText.h"
3839#include "RenderLayer.h"
3940#include "RenderView.h"
4041#include "Text.h"

@@IntRect RenderText::localCaretRect(Inlin
561562
562563ALWAYS_INLINE int RenderText::widthFromCache(const Font& f, int start, int len, int xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
563564{
 565 if (style()->hasTextCombine()) {
 566 const RenderCombineText* combineText = toRenderCombineText(this);
 567 if (combineText->isCombined())
 568 return combineText->combinedTextWidth(f);
 569 }
 570
564571 if (f.isFixedPitch() && !f.isSmallCaps() && m_isAllASCII) {
565572 int monospaceCharacterWidth = f.spaceWidth();
566573 int tabWidth = allowTabs() ? monospaceCharacterWidth * 8 : 0;
76925

Source/WebCore/rendering/RenderingAllInOne.cpp

4545#include "RenderBox.cpp"
4646#include "RenderBoxModelObject.cpp"
4747#include "RenderButton.cpp"
 48#include "RenderCombineText.cpp"
4849#include "RenderCounter.cpp"
4950#include "RenderDataGrid.cpp"
5051#include "RenderDetails.cpp"
76925

Source/WebCore/rendering/style/RenderStyle.h

@@public:
728728 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rareNonInheritedData->m_maskBoxImage.hasImage(); }
729729
730730 TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInheritedData->m_textCombine); }
 731 bool hasTextCombine() const { return textCombine() != TextCombineNone; }
731732 // End CSS3 Getters
732733
733734 // Apple-specific property getter methods
76925

LayoutTests/ChangeLog

 12011-01-28 takano takumi <takano@apple.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Implement text-combine rendering code
 6 https://bugs.webkit.org/show_bug.cgi?id=50621
 7
 8 * fast/text/international/text-combine-image-test.html: Added.
 9 * platform/mac/fast/text/international/text-combine-image-test-expected.checksum: Added.
 10 * platform/mac/fast/text/international/text-combine-image-test-expected.png: Added.
 11 * platform/mac/fast/text/international/text-combine-image-test-expected.txt: Added.
 12
1132011-01-27 Ryosuke Niwa <rniwa@webkit.org>
214
315 Unreviewed Chromium test expectation update.
76925

LayoutTests/fast/text/international/text-combine-image-test.html

 1<!DOCTYPE html>
 2<html>
 3<head>
 4<meta http-equiv="content-type" content="text/html; charset=utf-8">
 5<title>text-combine image test</title>
 6<style>
 7body {
 8 -webkit-writing-mode: vertical-rl;
 9}
 10
 11#Hira24 {
 12 font-family: "HiraMinPro-W3";
 13 font-size: 24pt;
 14}
 15
 16#Hira24_float {
 17 font-family: "HiraMinPro-W3";
 18 font-size: 18pt;
 19 float: right;
 20 border: solid 1px;
 21 border-color: red;
 22}
 23
 24#Times24 {
 25 font-family: "Times";
 26 font-size: 24pt;
 27}
 28
 29#combine {
 30 -webkit-text-combine: horizontal;
 31}
 32
 33</style>
 34</head>
 35<body>
 36<hr>
 37<span id="Hira24">OFF=西暦2010年1月20日365回</span>
 38<hr>
 39<span id="Hira24"><span id="combine">ON</span>=西暦<span id="combine">2010</span>年<span id="combine">1</span>月<span id="combine">20</span>日<span id="combine">365</span>回</span>
 40<hr>
 41<span id="Times24"><span id="combine">Times</span>=西暦<span id="combine">2010</span>年<span id="combine">1</span>月<span id="combine">20</span>日<span id="combine">365</span>回</span>
 42<hr>
 43<p>
 44<span id="Hira24_float">float:right:<span id="combine">2010</span>年<span id="combine">1</span>月<span id="combine">20</span>日</span>
 45その女がねかしつけに来てくれるまで、わたしはけっしてねどこにははいらなかった。冬のあらしがだんごのような雪をふきつけて窓ガラスを白くするじぶんになると、この女の人は両手の間にわたしの足をおさえて、歌を歌いながら暖めてくれた。その歌の節も文句も、いまに忘れずにいる。
 46</p>
 47</body>
 48</html>
0

LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.checksum

 1979b9476b03277b942201e289b7383d6
02\ No newline at end of file
0

LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.txt

 1layer at (0,0) size 800x600
 2 RenderView at (0,0) size 800x600
 3layer at (440,0) size 360x600
 4 RenderBlock {HTML} at (0,0) size 360x600
 5 RenderBody {BODY} at (8,8) size 336x584
 6 RenderBlock {HR} at (0,0) size 2x584 [border: (1px inset #000000)]
 7 RenderBlock (anonymous) at (10,0) size 48x584
 8 RenderInline {SPAN} at (0,0) size 32x474
 9 RenderText {#text} at (8,0) size 32x474
 10 text run at (8,0) width 474: "OFF=\x{897F}\x{66A6}2010\x{5E74}1\x{6708}20\x{65E5}365\x{56DE}"
 11 RenderText {#text} at (0,0) size 0x0
 12 RenderBlock {HR} at (66,0) size 2x584 [border: (1px inset #000000)]
 13 RenderBlock (anonymous) at (76,0) size 48x584
 14 RenderInline {SPAN} at (0,0) size 32x380
 15 RenderInline {SPAN} at (0,0) size 32x32
 16 RenderCombineText {#text} at (8,0) size 32x32
 17 text run at (8,0) width 32: "\x{FFFC}"
 18 RenderText {#text} at (8,32) size 32x88
 19 text run at (8,32) width 88: "=\x{897F}\x{66A6}"
 20 RenderInline {SPAN} at (0,0) size 32x32
 21 RenderCombineText {#text} at (8,120) size 32x32
 22 text run at (8,120) width 32: "\x{FFFC}"
 23 RenderText {#text} at (8,152) size 32x33
 24 text run at (8,152) width 33: "\x{5E74}"
 25 RenderInline {SPAN} at (0,0) size 32x32
 26 RenderCombineText {#text} at (8,185) size 32x32
 27 text run at (8,185) width 32: "\x{FFFC}"
 28 RenderText {#text} at (8,217) size 32x33
 29 text run at (8,217) width 33: "\x{6708}"
 30 RenderInline {SPAN} at (0,0) size 32x32
 31 RenderCombineText {#text} at (8,250) size 32x32
 32 text run at (8,250) width 32: "\x{FFFC}"
 33 RenderText {#text} at (8,282) size 32x33
 34 text run at (8,282) width 33: "\x{65E5}"
 35 RenderInline {SPAN} at (0,0) size 32x32
 36 RenderCombineText {#text} at (8,315) size 32x32
 37 text run at (8,315) width 32: "\x{FFFC}"
 38 RenderText {#text} at (8,347) size 32x33
 39 text run at (8,347) width 33: "\x{56DE}"
 40 RenderText {#text} at (0,0) size 0x0
 41 RenderBlock {HR} at (132,0) size 2x584 [border: (1px inset #000000)]
 42 RenderBlock (anonymous) at (142,0) size 48x584
 43 RenderInline {SPAN} at (0,0) size 37x472
 44 RenderInline {SPAN} at (0,0) size 37x80
 45 RenderCombineText {#text} at (5,0) size 37x80
 46 text run at (5,0) width 80: "Times"
 47 RenderText {#text} at (5,80) size 37x84
 48 text run at (5,80) width 84: "=\x{897F}\x{66A6}"
 49 RenderInline {SPAN} at (0,0) size 37x64
 50 RenderCombineText {#text} at (5,164) size 37x64
 51 text run at (5,164) width 64: "2010"
 52 RenderText {#text} at (5,228) size 37x33
 53 text run at (5,228) width 33: "\x{5E74}"
 54 RenderInline {SPAN} at (0,0) size 37x32
 55 RenderCombineText {#text} at (5,261) size 37x32
 56 text run at (5,261) width 32: "\x{FFFC}"
 57 RenderText {#text} at (5,293) size 37x33
 58 text run at (5,293) width 33: "\x{6708}"
 59 RenderInline {SPAN} at (0,0) size 37x32
 60 RenderCombineText {#text} at (5,326) size 37x32
 61 text run at (5,326) width 32: "\x{FFFC}"
 62 RenderText {#text} at (5,358) size 37x33
 63 text run at (5,358) width 33: "\x{65E5}"
 64 RenderInline {SPAN} at (0,0) size 37x48
 65 RenderCombineText {#text} at (5,391) size 37x48
 66 text run at (5,391) width 48: "365"
 67 RenderText {#text} at (5,439) size 37x33
 68 text run at (5,439) width 33: "\x{56DE}"
 69 RenderText {#text} at (0,0) size 0x0
 70 RenderBlock {HR} at (198,0) size 2x584 [border: (1px inset #000000)]
 71 RenderBlock {P} at (216,0) size 120x584
 72 RenderBlock (floating) {SPAN} at (0,316) size 38x268 [border: (1px solid #FF0000)]
 73 RenderText {#text} at (7,1) size 24x119
 74 text run at (7,1) width 119: "float:right:"
 75 RenderInline {SPAN} at (0,0) size 24x24
 76 RenderCombineText {#text} at (7,120) size 24x24
 77 text run at (7,120) width 24: "\x{FFFC}"
 78 RenderText {#text} at (7,144) size 24x25
 79 text run at (7,144) width 25: "\x{5E74}"
 80 RenderInline {SPAN} at (0,0) size 24x24
 81 RenderCombineText {#text} at (7,169) size 24x24
 82 text run at (7,169) width 24: "\x{FFFC}"
 83 RenderText {#text} at (7,193) size 24x25
 84 text run at (7,193) width 25: "\x{6708}"
 85 RenderInline {SPAN} at (0,0) size 24x24
 86 RenderCombineText {#text} at (7,218) size 24x24
 87 text run at (7,218) width 24: "\x{FFFC}"
 88 RenderText {#text} at (7,242) size 24x25
 89 text run at (7,242) width 25: "\x{65E5}"
 90 RenderText {#text} at (3,0) size 114x548
 91 text run at (3,0) width 291: "\x{305D}\x{306E}\x{5973}\x{304C}\x{306D}\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}\x{3001}"
 92 text run at (27,0) width 274: "\x{308F}\x{305F}\x{3057}\x{306F}\x{3051}\x{3063}\x{3057}\x{3066}\x{306D}\x{3069}\x{3053}\x{306B}\x{306F}\x{306F}\x{3044}\x{3089}\x{306A}"
 93 text run at (51,0) width 548: "\x{304B}\x{3063}\x{305F}\x{3002}\x{51AC}\x{306E}\x{3042}\x{3089}\x{3057}\x{304C}\x{3060}\x{3093}\x{3054}\x{306E}\x{3088}\x{3046}\x{306A}\x{96EA}\x{3092}\x{3075}\x{304D}\x{3064}\x{3051}\x{3066}\x{7A93}\x{30AC}\x{30E9}\x{30B9}\x{3092}\x{767D}\x{304F}\x{3059}\x{308B}\x{3058}"
 94 text run at (75,0) width 548: "\x{3076}\x{3093}\x{306B}\x{306A}\x{308B}\x{3068}\x{3001}\x{3053}\x{306E}\x{5973}\x{306E}\x{4EBA}\x{306F}\x{4E21}\x{624B}\x{306E}\x{9593}\x{306B}\x{308F}\x{305F}\x{3057}\x{306E}\x{8DB3}\x{3092}\x{304A}\x{3055}\x{3048}\x{3066}\x{3001}\x{6B4C}\x{3092}\x{6B4C}\x{3044}\x{306A}"
 95 text run at (99,0) width 468: "\x{304C}\x{3089}\x{6696}\x{3081}\x{3066}\x{304F}\x{308C}\x{305F}\x{3002}\x{305D}\x{306E}\x{6B4C}\x{306E}\x{7BC0}\x{3082}\x{6587}\x{53E5}\x{3082}\x{3001}\x{3044}\x{307E}\x{306B}\x{5FD8}\x{308C}\x{305A}\x{306B}\x{3044}\x{308B}\x{3002}"
0

LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.png

INVALID: Image lacks a checksum. This will fail with a MISSING error in run-webkit-tests. Always generate new png files using run-webkit-tests.