Changeset 169904 in webkit
- Timestamp:
- Jun 12, 2014, 11:50:18 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 12 edited
-
CMakeLists.txt (modified) (1 diff)
-
ChangeLog (modified) (1 diff)
-
WebCore.vcxproj/WebCore.vcxproj (modified) (1 diff)
-
WebCore.vcxproj/WebCore.vcxproj.filters (modified) (1 diff)
-
WebCore.xcodeproj/project.pbxproj (modified) (4 diffs)
-
css/CSSComputedStyleDeclaration.cpp (modified) (1 diff)
-
css/CSSCrossfadeValue.cpp (modified) (1 diff)
-
css/CSSFilterImageValue.cpp (modified) (1 diff)
-
css/StyleResolver.h (modified) (1 diff)
-
page/animation/CSSPropertyAnimation.cpp (modified) (1 diff)
-
rendering/shapes/ShapeOutsideInfo.cpp (modified) (3 diffs)
-
rendering/style/ShapeValue.cpp (added)
-
rendering/style/ShapeValue.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r169841 r169904 2395 2395 rendering/style/SVGRenderStyleDefs.cpp 2396 2396 rendering/style/ShadowData.cpp 2397 rendering/style/ShapeValue.cpp 2397 2398 rendering/style/StyleBackgroundData.cpp 2398 2399 rendering/style/StyleBoxData.cpp -
trunk/Source/WebCore/ChangeLog
r169898 r169904 1 2014-06-12 Anders Carlsson <andersca@apple.com> 2 3 Add ShapeValue.cpp and move ShapeValue::isImageValid() there 4 https://bugs.webkit.org/show_bug.cgi?id=133809 5 6 Reviewed by Antti Koivisto. 7 8 This gets rid of CachedImage.h (and ResourceRequest and friends) from RenderStyle.h. 9 10 * CMakeLists.txt: 11 * WebCore.vcxproj/WebCore.vcxproj: 12 * WebCore.vcxproj/WebCore.vcxproj.filters: 13 * WebCore.xcodeproj/project.pbxproj: 14 * css/CSSComputedStyleDeclaration.cpp: 15 (WebCore::shapePropertyValue): 16 * css/CSSCrossfadeValue.cpp: 17 * css/CSSFilterImageValue.cpp: 18 * css/StyleResolver.h: 19 * page/animation/CSSPropertyAnimation.cpp: 20 (WebCore::blendFunc): 21 * rendering/ShapeValue.cpp: Added. 22 (WebCore::ShapeValue::isImageValid): 23 * rendering/shapes/ShapeOutsideInfo.cpp: 24 (WebCore::referenceBox): 25 (WebCore::ShapeOutsideInfo::computedShape): 26 (WebCore::ShapeOutsideInfo::isEnabledFor): 27 * rendering/style/ShapeValue.h: 28 (WebCore::ShapeValue::type): 29 (WebCore::ShapeValue::setImage): 30 (WebCore::ShapeValue::ShapeValue): 31 (WebCore::ShapeValue::isImageValid): Deleted. 32 1 33 2014-06-12 Zalan Bujtas <zalan@apple.com> 2 34 -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r169826 r169904 11543 11543 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild> 11544 11544 </ClCompile> 11545 <ClCompile Include="..\rendering\style\ShapeValue.cpp" /> 11545 11546 <ClCompile Include="..\rendering\style\StyleAllInOne.cpp" /> 11546 11547 <ClCompile Include="..\rendering\style\StyleBackgroundData.cpp"> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r169637 r169904 2791 2791 <Filter>rendering\style</Filter> 2792 2792 </ClCompile> 2793 <ClCompile Include="..\rendering\style\ShapeValue.cpp"> 2794 <Filter>rendering\style</Filter> 2795 </ClCompile> 2793 2796 <ClCompile Include="..\rendering\style\StyleAllInOne.cpp"> 2794 2797 <Filter>rendering\style</Filter> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r169826 r169904 792 792 1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AB1AE790C051FDE00139F4F /* zoomOutCursor.png */; }; 793 793 1AB33DA512551E320024457A /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AB33DA412551E320024457A /* IOKit.framework */; }; 794 1AB5EBD0194A1D170059AC70 /* ShapeValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB5EBCF194A1D170059AC70 /* ShapeValue.cpp */; }; 794 795 1AB7FC680A8B92EC00D9D37B /* XPathEvaluator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB7FC470A8B92EC00D9D37B /* XPathEvaluator.cpp */; }; 795 796 1AB7FC690A8B92EC00D9D37B /* XPathEvaluator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB7FC480A8B92EC00D9D37B /* XPathEvaluator.h */; }; … … 7718 7719 1AB1AE790C051FDE00139F4F /* zoomOutCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoomOutCursor.png; sourceTree = "<group>"; }; 7719 7720 1AB33DA412551E320024457A /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; 7721 1AB5EBCF194A1D170059AC70 /* ShapeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ShapeValue.cpp; path = style/ShapeValue.cpp; sourceTree = "<group>"; }; 7720 7722 1AB7FC470A8B92EC00D9D37B /* XPathEvaluator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XPathEvaluator.cpp; sourceTree = "<group>"; }; 7721 7723 1AB7FC480A8B92EC00D9D37B /* XPathEvaluator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XPathEvaluator.h; sourceTree = "<group>"; }; … … 20869 20871 BC5EB8C10E82031B00B25965 /* ShadowData.cpp */, 20870 20872 BC5EB8C20E82031B00B25965 /* ShadowData.h */, 20873 1AB5EBCF194A1D170059AC70 /* ShapeValue.cpp */, 20871 20874 FD1AF14E1656F12100C6D4F7 /* ShapeValue.h */, 20872 20875 BC5EB6A00E81DC4F00B25965 /* StyleBackgroundData.cpp */, … … 29703 29706 CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */, 29704 29707 F55B3DDF1251F12D003EF269 /* WeekInputType.cpp in Sources */, 29708 1AB5EBD0194A1D170059AC70 /* ShapeValue.cpp in Sources */, 29705 29709 85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */, 29706 29710 93EC44A1188F4BB800661DF1 /* WheelEventDeltaTracker.cpp in Sources */, -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r169407 r169904 1623 1623 return cssValuePool().createIdentifierValue(CSSValueNone); 1624 1624 1625 if (shapeValue->type() == ShapeValue:: Box)1625 if (shapeValue->type() == ShapeValue::Type::Box) 1626 1626 return cssValuePool().createValue(shapeValue->cssBox()); 1627 1627 1628 if (shapeValue->type() == ShapeValue:: Image)1628 if (shapeValue->type() == ShapeValue::Type::Image) 1629 1629 return shapeValue->image() ? shapeValue->image()->cssValue() : cssValuePool().createIdentifierValue(CSSValueNone); 1630 1630 1631 ASSERT(shapeValue->type() == ShapeValue:: Shape);1631 ASSERT(shapeValue->type() == ShapeValue::Type::Shape); 1632 1632 1633 1633 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); -
trunk/Source/WebCore/css/CSSCrossfadeValue.cpp
r166642 r169904 30 30 #include "AnimationUtilities.h" 31 31 #include "CSSImageValue.h" 32 #include "CachedImage.h" 32 33 #include "CachedResourceLoader.h" 33 34 #include "CrossfadeGeneratedImage.h" -
trunk/Source/WebCore/css/CSSFilterImageValue.cpp
r166642 r169904 31 31 32 32 #include "CSSImageValue.h" 33 #include "CachedImage.h" 33 34 #include "CachedResourceLoader.h" 34 35 #include "CrossfadeGeneratedImage.h" -
trunk/Source/WebCore/css/StyleResolver.h
r169547 r169904 91 91 class ViewportStyleResolver; 92 92 class WebKitCSSFilterValue; 93 struct ResourceLoaderOptions; 93 94 94 95 class MediaQueryResult { -
trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
r169333 r169904 146 146 return to; 147 147 148 if (from->type() != ShapeValue:: Shape || to->type() != ShapeValue::Shape)148 if (from->type() != ShapeValue::Type::Shape || to->type() != ShapeValue::Type::Shape) 149 149 return to; 150 150 -
trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
r169606 r169904 76 76 { 77 77 if (shapeValue.cssBox() == BoxMissing) { 78 if (shapeValue.type() == ShapeValue:: Image)78 if (shapeValue.type() == ShapeValue::Type::Image) 79 79 return ContentBox; 80 80 return MarginBox; … … 176 176 177 177 switch (shapeValue.type()) { 178 case ShapeValue:: Shape:178 case ShapeValue::Type::Shape: 179 179 ASSERT(shapeValue.shape()); 180 180 m_shape = Shape::createShape(shapeValue.shape(), m_referenceBoxLogicalSize, writingMode, margin); 181 181 break; 182 case ShapeValue:: Image:182 case ShapeValue::Type::Image: 183 183 ASSERT(shapeValue.isImageValid()); 184 184 m_shape = createShapeForImage(shapeValue.image(), shapeImageThreshold, writingMode, margin); 185 185 break; 186 case ShapeValue:: Box: {186 case ShapeValue::Type::Box: { 187 187 RoundedRect shapeRect = computeRoundedRectForBoxShape(referenceBox(shapeValue), m_renderer); 188 188 if (!containingBlockStyle.isHorizontalWritingMode()) … … 295 295 296 296 switch (shapeValue->type()) { 297 case ShapeValue:: Shape: return shapeValue->shape();298 case ShapeValue:: Image: return shapeValue->isImageValid() && checkShapeImageOrigin(box.document(), *(shapeValue->image()));299 case ShapeValue:: Box: return true;297 case ShapeValue::Type::Shape: return shapeValue->shape(); 298 case ShapeValue::Type::Image: return shapeValue->isImageValid() && checkShapeImageOrigin(box.document(), *(shapeValue->image())); 299 case ShapeValue::Type::Box: return true; 300 300 } 301 301 -
trunk/Source/WebCore/rendering/style/ShapeValue.h
r167518 r169904 33 33 #include "BasicShapes.h" 34 34 #include "CSSValueKeywords.h" 35 #include "CachedImage.h"36 35 #include "StyleImage.h" 37 36 #include <wtf/PassRefPtr.h> … … 41 40 class ShapeValue : public RefCounted<ShapeValue> { 42 41 public: 43 enum ShapeValueType {42 enum class Type { 44 43 // The None value is defined by a null ShapeValue* 45 44 Shape, … … 63 62 } 64 63 65 ShapeValueType type() const { return m_type; }64 Type type() const { return m_type; } 66 65 BasicShape* shape() const { return m_shape.get(); } 67 66 CSSBoxType cssBox() const { return m_cssBox; } … … 69 68 StyleImage* image() const { return m_image.get(); } 70 69 71 bool isImageValid() const 72 { 73 if (!image()) 74 return false; 75 if (image()->isCachedImage() || image()->isCachedImageSet()) 76 return image()->cachedImage() && image()->cachedImage()->hasImage(); 77 return image()->isGeneratedImage(); 78 } 70 bool isImageValid() const; 79 71 80 72 void setImage(PassRefPtr<StyleImage> image) 81 73 { 82 ASSERT(type() == Image);74 ASSERT(type() == Type::Image); 83 75 if (m_image != image) 84 76 m_image = image; … … 89 81 private: 90 82 ShapeValue(PassRefPtr<BasicShape> shape, CSSBoxType cssBox) 91 : m_type( Shape)83 : m_type(Type::Shape) 92 84 , m_shape(shape) 93 85 , m_cssBox(cssBox) 94 86 { 95 87 } 96 ShapeValue( ShapeValueType type)88 ShapeValue(Type type) 97 89 : m_type(type) 98 90 , m_cssBox(BoxMissing) … … 100 92 } 101 93 ShapeValue(PassRefPtr<StyleImage> image) 102 : m_type( Image)94 : m_type(Type::Image) 103 95 , m_image(image) 104 96 , m_cssBox(BoxMissing) 105 97 { 106 98 } 99 107 100 ShapeValue(CSSBoxType cssBox) 108 : m_type( Box)101 : m_type(Type::Box) 109 102 , m_cssBox(cssBox) 110 103 { 111 104 } 112 105 113 ShapeValueType m_type;106 Type m_type; 114 107 RefPtr<BasicShape> m_shape; 115 108 RefPtr<StyleImage> m_image;
Note:
See TracChangeset
for help on using the changeset viewer.