Changeset 48474 in webkit
- Timestamp:
- Sep 17, 2009, 10:33:48 AM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r48472 r48474 1 2009-09-17 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 FontDescription.h includes RenderStyleConstants.h, which violates layering 6 https://bugs.webkit.org/show_bug.cgi?id=29327 7 8 * GNUmakefile.am: Added FontSmoothingMode.h. 9 * WebCore.gypi: Added FontSmoothingMode.h. 10 * WebCore.vcproj/WebCore.vcproj: Added FontSmoothingMode.h. 11 * WebCore.xcodeproj/project.pbxproj: Added FontSmoothingMode.h and made 12 it a private header. 13 * css/CSSComputedStyleDeclaration.cpp: 14 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the 15 font smoothing mode via the font description. 16 * css/CSSPrimitiveValueMappings.h: Include FontSmoothingMode.h 17 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated for the rename 18 of FontSmoothing to FontSmoothingMode. 19 (WebCore::CSSPrimitiveValue::operator FontSmoothingMode): Ditto. 20 * css/CSSStyleSelector.cpp: 21 (WebCore::CSSStyleSelector::applyProperty): Get the font smoothing mode 22 via the font description. 23 * platform/graphics/FontDescription.h: Do not include 24 RenderStyleConstants.h. 25 (WebCore::FontDescription::fontSmoothing): Updated for the rename of 26 FontSmoothing to FontSmoothingMode. 27 (WebCore::FontDescription::setFontSmoothing): Ditto. 28 * platform/graphics/FontSmoothingMode.h: Added. 29 (WebCore::FontSmoothingMode): Moved the FontSmoothing enum from 30 RenderStyleConstants here and renamed it to this. 31 * rendering/style/RenderStyle.h: 32 (WebCore::InheritedFlags::fontSmoothing): Removed this getter, since 33 this can be accessed via the font description. 34 * rendering/style/RenderStyleConstants.h: Moved the FontSmoothing enum 35 from here to FontSmoothingMode.h. 36 1 37 2009-09-17 Kevin Ollivier <kevino@theolliviers.com> 2 38 -
trunk/WebCore/GNUmakefile.am
r48270 r48474 1487 1487 WebCore/platform/graphics/FontRenderingMode.h \ 1488 1488 WebCore/platform/graphics/FontSelector.h \ 1489 WebCore/platform/graphics/FontSmoothingMode.h \ 1489 1490 WebCore/platform/graphics/FontTraitsMask.h \ 1490 1491 WebCore/platform/graphics/GeneratedImage.cpp \ -
trunk/WebCore/WebCore.gypi
r48469 r48474 2067 2067 'platform/graphics/FontRenderingMode.h', 2068 2068 'platform/graphics/FontSelector.h', 2069 'platform/graphics/FontSmoothingMode.h', 2069 2070 'platform/graphics/FontTraitsMask.h', 2070 2071 'platform/graphics/GeneratedImage.cpp', -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r48431 r48474 18535 18535 <File 18536 18536 RelativePath="..\platform\graphics\FontSelector.h" 18537 > 18538 </File> 18539 <File 18540 RelativePath="..\platform\graphics\FontSmoothingMode.h" 18537 18541 > 18538 18542 </File> -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r48454 r48474 656 656 371F53E90D2704F900ECE0D5 /* CSSUnicodeRangeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F53E70D2704F900ECE0D5 /* CSSUnicodeRangeValue.h */; }; 657 657 371F53EA0D2704F900ECE0D5 /* CSSUnicodeRangeValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F53E80D2704F900ECE0D5 /* CSSUnicodeRangeValue.cpp */; }; 658 37202199106213C600F25C4B /* FontSmoothingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 37202198106213C600F25C4B /* FontSmoothingMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 658 659 3724CA570E68A7E400DB4384 /* CoreTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3724CA540E68A7E400DB4384 /* CoreTextController.h */; }; 659 660 3724CA580E68A7E400DB4384 /* CoreTextController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3724CA550E68A7E400DB4384 /* CoreTextController.cpp */; }; … … 5809 5810 371F53E70D2704F900ECE0D5 /* CSSUnicodeRangeValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSUnicodeRangeValue.h; sourceTree = "<group>"; }; 5810 5811 371F53E80D2704F900ECE0D5 /* CSSUnicodeRangeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSUnicodeRangeValue.cpp; sourceTree = "<group>"; }; 5812 37202198106213C600F25C4B /* FontSmoothingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontSmoothingMode.h; sourceTree = "<group>"; }; 5811 5813 3724CA540E68A7E400DB4384 /* CoreTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreTextController.h; sourceTree = "<group>"; }; 5812 5814 3724CA550E68A7E400DB4384 /* CoreTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoreTextController.cpp; sourceTree = "<group>"; }; … … 13918 13920 37ACCE410DA2980F0089E602 /* FontRenderingMode.h */, 13919 13921 B2C3DA5A0D006CD600EF6F26 /* FontSelector.h */, 13922 37202198106213C600F25C4B /* FontSmoothingMode.h */, 13920 13923 3784C34A0E11AA34007D8D48 /* FontTraitsMask.h */, 13921 13924 BCE04C930DAFF902007A0F41 /* GeneratedImage.cpp */, … … 17824 17827 510D4A50103177A20049EA54 /* WebSocketChannelClient.h in Headers */, 17825 17828 51ABAE451043AB4A008C5260 /* WebSocketHandshake.h in Headers */, 17829 37202199106213C600F25C4B /* FontSmoothingMode.h in Headers */, 17826 17830 ); 17827 17831 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r48441 r48474 1123 1123 return CSSPrimitiveValue::create(style->resize()); 1124 1124 case CSSPropertyWebkitFontSmoothing: 1125 return CSSPrimitiveValue::create(style->font Smoothing());1125 return CSSPrimitiveValue::create(style->fontDescription().fontSmoothing()); 1126 1126 case CSSPropertyZIndex: 1127 1127 if (style->hasAutoZIndex()) -
trunk/WebCore/css/CSSPrimitiveValueMappings.h
r48441 r48474 31 31 #include "CSSPrimitiveValue.h" 32 32 #include "CSSValueKeywords.h" 33 #include "FontSmoothingMode.h" 33 34 #include "GraphicsTypes.h" 34 35 #include "Path.h" … … 1799 1800 } 1800 1801 1801 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontSmoothing smoothing)1802 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontSmoothingMode smoothing) 1802 1803 : m_type(CSS_IDENT) 1803 1804 { … … 1821 1822 } 1822 1823 1823 template<> inline CSSPrimitiveValue::operator FontSmoothing () const1824 template<> inline CSSPrimitiveValue::operator FontSmoothingMode() const 1824 1825 { 1825 1826 switch (m_value.ident) { -
trunk/WebCore/css/CSSStyleSelector.cpp
r48442 r48474 3499 3499 FontDescription fontDescription = m_style->fontDescription(); 3500 3500 if (isInherit) 3501 fontDescription.setFontSmoothing(m_parentStyle->font Smoothing());3501 fontDescription.setFontSmoothing(m_parentStyle->fontDescription().fontSmoothing()); 3502 3502 else if (isInitial) 3503 3503 fontDescription.setFontSmoothing(AutoSmoothing); … … 3506 3506 return; 3507 3507 int id = primitiveValue->getIdent(); 3508 FontSmoothing smoothing;3508 FontSmoothingMode smoothing; 3509 3509 switch (id) { 3510 3510 case CSSValueAuto: -
trunk/WebCore/platform/graphics/FontDescription.h
r48441 r48474 28 28 #include "FontFamily.h" 29 29 #include "FontRenderingMode.h" 30 #include "FontSmoothingMode.h" 30 31 #include "FontTraitsMask.h" 31 #include "RenderStyleConstants.h"32 32 33 33 namespace WebCore { … … 87 87 FontRenderingMode renderingMode() const { return static_cast<FontRenderingMode>(m_renderingMode); } 88 88 unsigned keywordSize() const { return m_keywordSize; } 89 FontSmoothing fontSmoothing() const { return static_cast<FontSmoothing>(m_fontSmoothing); }89 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMode>(m_fontSmoothing); } 90 90 91 91 FontTraitsMask traitsMask() const; … … 102 102 void setRenderingMode(FontRenderingMode mode) { m_renderingMode = mode; } 103 103 void setKeywordSize(unsigned s) { m_keywordSize = s; } 104 void setFontSmoothing(FontSmoothing smoothing) { m_fontSmoothing = smoothing; }104 void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoothing; } 105 105 106 106 private: … … 125 125 // (e.g., 13px monospace vs. 16px everything else). Sizes are 1-8 (like the HTML size values for <font>). 126 126 127 unsigned m_fontSmoothing : 2; // FontSmoothing 127 unsigned m_fontSmoothing : 2; // FontSmoothingMode 128 128 }; 129 129 -
trunk/WebCore/rendering/style/RenderStyle.h
r48441 r48474 435 435 const FontDescription& fontDescription() const { return inherited->font.fontDescription(); } 436 436 int fontSize() const { return inherited->font.pixelSize(); } 437 FontSmoothing fontSmoothing() const { return inherited->font.fontDescription().fontSmoothing(); }438 437 439 438 const Color& color() const { return inherited->color; } -
trunk/WebCore/rendering/style/RenderStyleConstants.h
r48441 r48474 322 322 }; 323 323 324 enum FontSmoothing {325 AutoSmoothing, NoSmoothing, Antialiased, SubpixelAntialiased326 };327 328 324 } // namespace WebCore 329 325
Note:
See TracChangeset
for help on using the changeset viewer.