Changeset 64677 in webkit
- Timestamp:
- Aug 4, 2010, 2:22:24 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64676 r64677 1 2010-08-04 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 Allow the language for hyphenation to be specified 6 https://bugs.webkit.org/show_bug.cgi?id=43467 7 8 * fast/text/hyphenate-locale.html: Added. 9 * platform/mac/fast/text/hyphenate-locale-expected.checksum: Added. 10 * platform/mac/fast/text/hyphenate-locale-expected.png: Added. 11 * platform/mac/fast/text/hyphenate-locale-expected.txt: Added. 12 1 13 2010-08-04 Dimitri Glazkov <dglazkov@chromium.org> 2 14 -
trunk/WebCore/ChangeLog
r64674 r64677 1 2010-08-04 Dan Bernstein <mitz@apple.com> 2 3 Allow the language for hyphenation to be specified 4 https://bugs.webkit.org/show_bug.cgi?id=43467 5 6 Test: fast/text/hyphenate-locale.html 7 8 Added a -webkit-hyphenate-locale property whose value can be either auto or a locale identifier 9 string. The initial value is auto and the property is inherited. When the value is a locale 10 identifier, hyphenation should follow the rules for the specified locale. 11 12 * WebCore.xcodeproj/project.pbxproj: Added AtomicStringKeyedMRUCache.h. 13 * css/CSSComputedStyleDeclaration.cpp: 14 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle -webkit-hyphenate-locale. 15 Updated for the renaming of RenderStyle::hyphenateCharacter() to hyphenationString(). 16 * css/CSSParser.cpp: 17 (WebCore::CSSParser::parseValue): Parse -webkit-hyphenate-locale. 18 * css/CSSPropertyNames.in: Added -webkit-hyphenate-locale. 19 * css/CSSStyleSelector.cpp: 20 (WebCore::CSSStyleSelector::applyProperty): Apply the -webkit-hyphenate-locale property to the 21 RenderStyle. Updated for the renaming of RenderStyle::hyphenateCharacter() to hyphenationString(). 22 * platform/text/AtomicStringKeyedMRUCache.h: Added. 23 (WebCore::AtomicStringKeyedMRUCache::get): 24 * platform/text/Hyphenation.cpp: 25 (WebCore::canHyphenate): Added an implementation that returns false. 26 (WebCore::lastHyphenLocation): Now asserts that it is not called, because it is an error to call 27 this function if canHyphenate() returned false. 28 * platform/text/Hyphenation.h: 29 Added canHyphenate(). Returns true if hyphenation is possible for the given locale identifier. 30 * platform/text/android/HyphenationAndroid.cpp: 31 (WebCore::canHyphenate): Added an implementation that returns true and a FIXME. 32 (WebCore::lastHyphenLocation): Added unused localeIdentifier parameter. 33 * platform/text/cf/HyphenationCF.cpp: 34 (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForNullKey): Returns 35 the CFLocaleRef for the current search locale. 36 (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForKey): Returns a 37 CFLocaleRef for the locale identifier. 38 (WebCore::canHyphenate): Added. Returns true. 39 (WebCore::lastHyphenLocation): Added localeIdentifier parameter, used to pass a CFLocaleRef to 40 the hyphenation function. 41 * platform/text/mac/HyphenationMac.mm: 42 (WebCore::AtomicStringKeyedMRUCache<bool>::createValueForNullKey): Returns whether the current 43 search locale is english. 44 (WebCore::AtomicStringKeyedMRUCache<bool>::createValueForKey): Returns whether the locale identifier 45 string identifies locale with the English language. 46 (WebCore::canHyphenate): Added. Returns true if the locale language is English. 47 (WebCore::lastHyphenLocation): Added localeIdentifier parameter and an assertion that its language 48 is English. 49 * rendering/RenderBlockLineLayout.cpp: 50 (WebCore::tryHyphenating): Added a locale identifier parameter, which is passed down to 51 lastHyphenLocation(). Added 1 to the value passed for the beforeIndex parameter to lastHyphenLocation(), 52 because the latter only returns values smaller than that index. The Mac implementation could 53 return a value equal to beforeIndex, but that is fixed in the WebKitSystemInterface part of this patch. 54 (WebCore::RenderBlock::findNextLineBreak): Only set canHyphenate to true if hyphenation is possible 55 for the specified hyphenation locale. Pass the hyphenation locale to tryHyphenating(). 56 * rendering/style/RenderStyle.cpp: 57 (WebCore::RenderStyle::diff): Compare hyphenation locales. 58 (WebCore::RenderStyle::hyphenString): Updated for the renaming of hyphenateCharacter() to 59 hyphenationString(). 60 * rendering/style/RenderStyle.h: 61 (WebCore::InheritedFlags::hyphenationString): Renamed hyphenateCharacter() to this. 62 (WebCore::InheritedFlags::hyphenationLocale): Added this accessor. 63 (WebCore::InheritedFlags::setHyphenationString): Renamed setHyphenateCharacter() to this. 64 (WebCore::InheritedFlags::setHyphenationLocale): Added this accessor. 65 (WebCore::InheritedFlags::initialHyphenationString): Renamed initialHyphenateCharacter() to this. 66 (WebCore::InheritedFlags::initialHyphenateLocale): Added. Returns the null atom, which represents a 67 value of auto. 68 * rendering/style/StyleRareInheritedData.cpp: 69 (WebCore::StyleRareInheritedData::StyleRareInheritedData): Copy the hyphenation locale. Updated for 70 rename. 71 (WebCore::StyleRareInheritedData::operator==): Compare the hyphenation locales. Updated for rename. 72 * rendering/style/StyleRareInheritedData.h: 73 1 74 2010-08-04 Tony Gentilcore <tonyg@chromium.org> 2 75 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r64642 r64677 795 795 37C238221098C84200EF9F72 /* ComplexTextControllerCoreText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.cpp */; }; 796 796 37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */; settings = {ATTRIBUTES = (Private, ); }; }; 797 37C61F0112095C87007A3C67 /* AtomicStringKeyedMRUCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */; }; 797 798 37F818FD0D657606005E1F05 /* WebCoreURLResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */; settings = {ATTRIBUTES = (Private, ); }; }; 798 799 37F818FE0D657606005E1F05 /* WebCoreURLResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */; }; … … 6516 6517 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextControllerCoreText.cpp; sourceTree = "<group>"; }; 6517 6518 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypesettingFeatures.h; sourceTree = "<group>"; }; 6519 37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtomicStringKeyedMRUCache.h; sourceTree = "<group>"; }; 6518 6520 37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreURLResponse.h; sourceTree = "<group>"; }; 6519 6521 37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponse.mm; sourceTree = "<group>"; }; … … 15636 15638 0FC705200EB1815600B90AD8 /* AtomicStringHash.h */, 15637 15639 B2C3D9EF0D006C1D00EF6F26 /* AtomicStringImpl.h */, 15640 37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */, 15638 15641 B2C3D9F00D006C1D00EF6F26 /* Base64.cpp */, 15639 15642 B2C3D9F10D006C1D00EF6F26 /* Base64.h */, … … 19987 19990 97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */, 19988 19991 CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */, 19992 37C61F0112095C87007A3C67 /* AtomicStringKeyedMRUCache.h in Headers */, 19989 19993 ); 19990 19994 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r63342 r64677 911 911 return CSSPrimitiveValue::create(style->hyphens()); 912 912 case CSSPropertyWebkitHyphenateCharacter: 913 if (style->hyphenat eCharacter().isNull())913 if (style->hyphenationString().isNull()) 914 914 return CSSPrimitiveValue::createIdentifier(CSSValueAuto); 915 return CSSPrimitiveValue::create(style->hyphenateCharacter(), CSSPrimitiveValue::CSS_STRING); 915 return CSSPrimitiveValue::create(style->hyphenationString(), CSSPrimitiveValue::CSS_STRING); 916 case CSSPropertyWebkitHyphenateLocale: 917 if (style->hyphenationLocale().isNull()) 918 return CSSPrimitiveValue::createIdentifier(CSSValueAuto); 919 return CSSPrimitiveValue::create(style->hyphenationLocale(), CSSPrimitiveValue::CSS_STRING); 916 920 case CSSPropertyWebkitBorderFit: 917 921 if (style->borderFit() == BorderFitBorder) -
trunk/WebCore/css/CSSParser.cpp
r64071 r64677 1573 1573 1574 1574 case CSSPropertyWebkitHyphenateCharacter: 1575 if (id == CSSValueAuto || value->unit == CSSPrimitiveValue::CSS_STRING) 1576 validPrimitive = true; 1577 break; 1578 1579 case CSSPropertyWebkitHyphenateLocale: 1575 1580 if (id == CSSValueAuto || value->unit == CSSPrimitiveValue::CSS_STRING) 1576 1581 validPrimitive = true; -
trunk/WebCore/css/CSSPropertyNames.in
r63342 r64677 218 218 -webkit-highlight 219 219 -webkit-hyphenate-character 220 -webkit-hyphenate-locale 220 221 -webkit-hyphens 221 222 -webkit-line-break -
trunk/WebCore/css/CSSStyleSelector.cpp
r64518 r64677 5216 5216 } 5217 5217 case CSSPropertyWebkitHyphenateCharacter: { 5218 HANDLE_INHERIT_AND_INITIAL(hyphenat eCharacter, HyphenateCharacter);5218 HANDLE_INHERIT_AND_INITIAL(hyphenationString, HyphenationString); 5219 5219 if (primitiveValue->getIdent() == CSSValueAuto) 5220 m_style->setHyphenat eCharacter(nullAtom);5220 m_style->setHyphenationString(nullAtom); 5221 5221 else 5222 m_style->setHyphenateCharacter(primitiveValue->getStringValue()); 5222 m_style->setHyphenationString(primitiveValue->getStringValue()); 5223 return; 5224 } 5225 case CSSPropertyWebkitHyphenateLocale: { 5226 HANDLE_INHERIT_AND_INITIAL(hyphenationLocale, HyphenationLocale); 5227 if (primitiveValue->getIdent() == CSSValueAuto) 5228 m_style->setHyphenationLocale(nullAtom); 5229 else 5230 m_style->setHyphenationLocale(primitiveValue->getStringValue()); 5223 5231 return; 5224 5232 } -
trunk/WebCore/platform/text/Hyphenation.cpp
r61548 r64677 31 31 namespace WebCore { 32 32 33 size_t lastHyphenLocation(const UChar* /* characters */, size_t /* length */, size_t /* beforeIndex*/)33 bool canHyphenate(const AtomicString& /* localeIdentifier */) 34 34 { 35 notImplemented(); 35 return false; 36 } 37 38 size_t lastHyphenLocation(const UChar* /* characters */, size_t /* length */, size_t /* beforeIndex */, const AtomicString& /* localeIdentifier */) 39 { 40 ASSERT_NOT_REACHED(); 36 41 return 0; 37 42 } -
trunk/WebCore/platform/text/Hyphenation.h
r61548 r64677 31 31 namespace WebCore { 32 32 33 size_t lastHyphenLocation(const UChar*, size_t length, size_t beforeIndex); 33 class AtomicString; 34 35 bool canHyphenate(const AtomicString& localeIdentifier); 36 size_t lastHyphenLocation(const UChar*, size_t length, size_t beforeIndex, const AtomicString& localeIdentifier); 34 37 35 38 } // namespace WebCore -
trunk/WebCore/platform/text/android/HyphenationAndroid.cpp
r64087 r64677 58 58 } 59 59 60 size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex) 60 bool canHyphenate(const AtomicString& /* localeIdentifier */) 61 { 62 // FIXME: Check that the locale identifier matches the available dictionary. 63 return true; 64 } 65 66 size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex, const AtomicString& /* localeIdentifier */) 61 67 { 62 68 static const size_t minWordLen = 5; -
trunk/WebCore/platform/text/cf/HyphenationCF.cpp
r61548 r64677 29 29 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 30 30 31 #include "AtomicString.h" 32 #include "AtomicStringKeyedMRUCache.h" 31 33 #include "TextBreakIteratorInternalICU.h" 34 #include <wtf/ListHashSet.h> 32 35 #include <wtf/RetainPtr.h> 33 36 34 37 namespace WebCore { 35 38 36 static CFLocaleRef createCurrentSearchLocale() 39 template<> 40 RetainPtr<CFLocaleRef> AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForNullKey() 37 41 { 38 RetainPtr<CFStringRef> localeIdentifier(AdoptCF, CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, (const UInt8*)currentSearchLocaleID(), strlen(currentSearchLocaleID()), kCFStringEncodingASCII, false, kCFAllocatorNull)); 39 return CFLocaleCreate(kCFAllocatorDefault, localeIdentifier.get()); 42 RetainPtr<CFStringRef> cfLocaleIdentifier(AdoptCF, CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(currentSearchLocaleID()), strlen(currentSearchLocaleID()), kCFStringEncodingASCII, false, kCFAllocatorNull)); 43 RetainPtr<CFLocaleRef> locale(AdoptCF, CFLocaleCreate(kCFAllocatorDefault, cfLocaleIdentifier.get())); 44 return locale; 40 45 } 41 46 42 size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex) 47 template<> 48 RetainPtr<CFLocaleRef> AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForKey(const AtomicString& localeIdentifier) 49 { 50 RetainPtr<CFStringRef> cfLocaleIdentifier(AdoptCF, localeIdentifier.createCFString()); 51 RetainPtr<CFLocaleRef> locale(AdoptCF, CFLocaleCreate(kCFAllocatorDefault, cfLocaleIdentifier.get())); 52 return locale; 53 } 54 55 bool canHyphenate(const AtomicString& /* localeIdentifer */) 56 { 57 return true; 58 } 59 60 size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex, const AtomicString& localeIdentifier) 43 61 { 44 62 RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, characters, length, kCFAllocatorNull)); 45 63 46 static CFLocaleRef locale = createCurrentSearchLocale(); 64 DEFINE_STATIC_LOCAL(AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >, cfLocaleCache, ()); 65 RetainPtr<CFLocaleRef> locale = cfLocaleCache.get(localeIdentifier); 47 66 48 CFIndex result = CFStringGetHyphenationLocationBeforeIndex(string.get(), beforeIndex, CFRangeMake(0, length), 0, locale , 0);67 CFIndex result = CFStringGetHyphenationLocationBeforeIndex(string.get(), beforeIndex, CFRangeMake(0, length), 0, locale.get(), 0); 49 68 return result == kCFNotFound ? 0 : result; 50 69 } -
trunk/WebCore/platform/text/mac/HyphenationMac.mm
r61548 r64677 29 29 #if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) 30 30 31 #import "AtomicString.h" 32 #import "AtomicStringKeyedMRUCache.h" 31 33 #import "TextBreakIteratorInternalICU.h" 32 34 #import "WebCoreSystemInterface.h" … … 35 37 namespace WebCore { 36 38 37 size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex) 39 template<> 40 bool AtomicStringKeyedMRUCache<bool>::createValueForNullKey() 38 41 { 39 static bool localeIsEnglish = !strcmp("en", currentSearchLocaleID()); 40 if (!localeIsEnglish) 41 return 0; 42 return !strcmp(currentSearchLocaleID(), "en"); 43 } 44 45 template<> 46 bool AtomicStringKeyedMRUCache<bool>::createValueForKey(const AtomicString& localeIdentifier) 47 { 48 RetainPtr<CFStringRef> cfLocaleIdentifier(AdoptCF, localeIdentifier.createCFString()); 49 RetainPtr<CFDictionaryRef> components(AdoptCF, CFLocaleCreateComponentsFromLocaleIdentifier(kCFAllocatorDefault, cfLocaleIdentifier.get())); 50 CFStringRef language = reinterpret_cast<CFStringRef>(CFDictionaryGetValue(components.get(), kCFLocaleLanguageCode)); 51 static CFStringRef englishLanguage = CFSTR("en"); 52 return language && CFEqual(language, englishLanguage); 53 } 54 55 bool canHyphenate(const AtomicString& localeIdentifier) 56 { 57 DEFINE_STATIC_LOCAL(AtomicStringKeyedMRUCache<bool>, isEnglishCache, ()); 58 return isEnglishCache.get(localeIdentifier); 59 } 60 61 size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex, const AtomicString& localeIdentifier) 62 { 63 ASSERT(canHyphenate(localeIdentifier)); 42 64 43 65 RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, characters, length, kCFAllocatorNull)); -
trunk/WebCore/rendering/RenderBlockLineLayout.cpp
r62510 r64677 1323 1323 } 1324 1324 1325 static void tryHyphenating(RenderText* text, const Font& font, int lastSpace, int pos, int xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)1325 static void tryHyphenating(RenderText* text, const Font& font, const AtomicString& localeIdentifier, int lastSpace, int pos, int xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated) 1326 1326 { 1327 1327 const AtomicString& hyphenString = text->style()->hyphenString(); … … 1332 1332 return; 1333 1333 1334 prefixLength = 1 + lastHyphenLocation(text->characters() + lastSpace + 1, pos - lastSpace - 1, prefixLength - 1);1334 prefixLength = 1 + lastHyphenLocation(text->characters() + lastSpace + 1, pos - lastSpace - 1, prefixLength, localeIdentifier); 1335 1335 if (prefixLength <= 1) 1336 1336 return; … … 1566 1566 const Font& f = style->font(); 1567 1567 bool isFixedPitch = f.isFixedPitch(); 1568 bool canHyphenate = style->hyphens() == HyphensAuto ;1568 bool canHyphenate = style->hyphens() == HyphensAuto && WebCore::canHyphenate(style->hyphenationLocale()); 1569 1569 1570 1570 int lastSpace = pos; … … 1712 1712 if (lineWasTooWide || w + tmpW > width) { 1713 1713 if (canHyphenate && w + tmpW > width) { 1714 tryHyphenating(t, f, lastSpace, pos, w + tmpW - additionalTmpW, width, isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, nextBreakable, hyphenated);1714 tryHyphenating(t, f, style->hyphenationLocale(), lastSpace, pos, w + tmpW - additionalTmpW, width, isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, nextBreakable, hyphenated); 1715 1715 if (hyphenated) 1716 1716 goto end; … … 1826 1826 1827 1827 if (canHyphenate && w + tmpW > width) { 1828 tryHyphenating(t, f, lastSpace, pos, w + tmpW - additionalTmpW, width, isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, nextBreakable, hyphenated);1828 tryHyphenating(t, f, style->hyphenationLocale(), lastSpace, pos, w + tmpW - additionalTmpW, width, isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, nextBreakable, hyphenated); 1829 1829 if (hyphenated) 1830 1830 goto end; -
trunk/WebCore/rendering/style/RenderStyle.cpp
r62551 r64677 386 386 rareInheritedData->textSecurity != other->rareInheritedData->textSecurity || 387 387 rareInheritedData->hyphens != other->rareInheritedData->hyphens || 388 rareInheritedData->hyphenateCharacter != other->rareInheritedData->hyphenateCharacter) 388 rareInheritedData->hyphenationString != other->rareInheritedData->hyphenationString || 389 rareInheritedData->hyphenationLocale != other->rareInheritedData->hyphenationLocale) 389 390 return StyleDifferenceLayout; 390 391 … … 833 834 ASSERT(hyphens() == HyphensAuto); 834 835 835 const AtomicString& hyphenat eCharacter = rareInheritedData.get()->hyphenateCharacter;836 if (!hyphenat eCharacter.isNull())837 return hyphenat eCharacter;836 const AtomicString& hyphenationString = rareInheritedData.get()->hyphenationString; 837 if (!hyphenationString.isNull()) 838 return hyphenationString; 838 839 839 840 // FIXME: This should depend on locale. -
trunk/WebCore/rendering/style/RenderStyle.h
r63653 r64677 649 649 const AtomicString& highlight() const { return rareInheritedData->highlight; } 650 650 Hyphens hyphens() const { return static_cast<Hyphens>(rareInheritedData->hyphens); } 651 const AtomicString& hyphenateCharacter() const { return rareInheritedData->hyphenateCharacter; } 651 const AtomicString& hyphenationString() const { return rareInheritedData->hyphenationString; } 652 const AtomicString& hyphenationLocale() const { return rareInheritedData->hyphenationLocale; } 652 653 EBorderFit borderFit() const { return static_cast<EBorderFit>(rareNonInheritedData->m_borderFit); } 653 654 EResize resize() const { return static_cast<EResize>(rareInheritedData->resize); } … … 989 990 void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highlight, h); } 990 991 void setHyphens(Hyphens h) { SET_VAR(rareInheritedData, hyphens, h); } 991 void setHyphenateCharacter(const AtomicString& h) { SET_VAR(rareInheritedData, hyphenateCharacter, h); } 992 void setHyphenationString(const AtomicString& h) { SET_VAR(rareInheritedData, hyphenationString, h); } 993 void setHyphenationLocale(const AtomicString& h) { SET_VAR(rareInheritedData, hyphenationLocale, h); } 992 994 void setBorderFit(EBorderFit b) { SET_VAR(rareNonInheritedData, m_borderFit, b); } 993 995 void setResize(EResize r) { SET_VAR(rareInheritedData, resize, r); } … … 1198 1200 static const AtomicString& initialHighlight() { return nullAtom; } 1199 1201 static Hyphens initialHyphens() { return HyphensManual; } 1200 static const AtomicString& initialHyphenateCharacter() { return nullAtom; } 1202 static const AtomicString& initialHyphenationString() { return nullAtom; } 1203 static const AtomicString& initialHyphenationLocale() { return nullAtom; } 1201 1204 static EBorderFit initialBorderFit() { return BorderFitBorder; } 1202 1205 static EResize initialResize() { return RESIZE_NONE; } -
trunk/WebCore/rendering/style/StyleRareInheritedData.cpp
r61548 r64677 72 72 , colorSpace(o.colorSpace) 73 73 , hyphens(o.hyphens) 74 , hyphenateCharacter(o.hyphenateCharacter) 74 , hyphenationString(o.hyphenationString) 75 , hyphenationLocale(o.hyphenationLocale) 75 76 { 76 77 } … … 113 114 && colorSpace == o.colorSpace 114 115 && hyphens == o.hyphens 115 && hyphenateCharacter == o.hyphenateCharacter; 116 && hyphenationString == o.hyphenationString 117 && hyphenationLocale == o.hyphenationLocale; 116 118 } 117 119 -
trunk/WebCore/rendering/style/StyleRareInheritedData.h
r61548 r64677 80 80 unsigned hyphens : 2; // Hyphens 81 81 82 AtomicString hyphenateCharacter; 82 AtomicString hyphenationString; 83 AtomicString hyphenationLocale; 83 84 84 85 private: -
trunk/WebKitLibraries/ChangeLog
r64593 r64677 1 2010-08-04 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 WebKitSystemInterface part of: Allow the language for hyphenation to be specified 6 https://bugs.webkit.org/show_bug.cgi?id=43467 7 8 * WebKitSystemInterface.h: 9 * libWebKitSystemInterfaceLeopard.a: 10 * libWebKitSystemInterfaceSnowLeopard.a: 11 * libWebKitSystemInterfaceTiger.a: 12 1 13 2010-08-03 Beth Dakin <bdakin@apple.com> 2 14 -
trunk/WebKitLibraries/WebKitSystemInterface.h
r62356 r64677 1 1 /* 2 2 WebKitSystemInterface.h 3 Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.3 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 4 4 5 5 Public header file. … … 211 211 WKMediaUIPartSeekBackButton, 212 212 WKMediaUIPartSeekForwardButton, 213 WKMediaUIPart Slider,214 WKMediaUIPart SliderThumb,213 WKMediaUIPartTimelineSlider, 214 WKMediaUIPartTimelineSliderThumb, 215 215 WKMediaUIPartRewindButton, 216 216 WKMediaUIPartSeekToRealtimeButton, … … 221 221 WKMediaUIPartBackground, 222 222 WKMediaUIPartCurrentTimeDisplay, 223 WKMediaUIPartTimeRemainingDisplay 223 WKMediaUIPartTimeRemainingDisplay, 224 WKMediaUIPartStatusDisplay, 225 WKMediaUIPartControlsPanel, 226 WKMediaUIPartVolumeSliderContainer, 227 WKMediaUIPartVolumeSlider, 228 WKMediaUIPartVolumeSliderThumb 224 229 } WKMediaUIPart; 225 230 … … 252 257 WKMediaUIControlVolumeUpButton, 253 258 WKMediaUIControlVolumeDownButton 254 255 259 } WKMediaUIControlType; 256 260
Note:
See TracChangeset
for help on using the changeset viewer.