Diff
Modified: trunk/Source/WebCore/ChangeLog (125202 => 125203)
--- trunk/Source/WebCore/ChangeLog 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/ChangeLog 2012-08-09 21:25:32 UTC (rev 125203)
@@ -1,3 +1,32 @@
+2012-08-09 Huang Dongsung <[email protected]>
+
+ Extract the definition of NativeImagePtr from ImageSource.h into NativeImagePtr.h.
+ https://bugs.webkit.org/show_bug.cgi?id=93466
+
+ Reviewed by Adam Barth.
+
+ Image.h includes ImageSource.h in order to know the definition of NativeImagePtr.
+ But Image does not need to know the definition of ImageSource. So, this patch
+ extracts the definition of NativeImagePtr from ImageSource.h into NativeImagePtr.h.
+
+ This is a preparation for asynchronous image decoding. Async decoding
+ will need a callback function, which sends a NativeImagePtr to clients, and the
+ callback must know the definition of NativeImagePtr, not ImageSource.
+
+ No new tests, behavior is unchanged.
+
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/BitmapImage.h:
+ * platform/graphics/Image.h:
+ * platform/graphics/ImageSource.h:
+ (WebCore):
+ * platform/graphics/NativeImagePtr.h: Added.
+ (WebCore):
+
2012-08-09 Robert Hogan <[email protected]>
CSS 2.1 failure: 'Text-indent' only affects a line if it is the first formatted line of an element
Modified: trunk/Source/WebCore/GNUmakefile.list.am (125202 => 125203)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-08-09 21:25:32 UTC (rev 125203)
@@ -3241,6 +3241,7 @@
Source/WebCore/platform/graphics/ColorSpace.h \
Source/WebCore/platform/graphics/DashArray.h \
Source/WebCore/platform/graphics/Extensions3D.h \
+ Source/WebCore/platform/graphics/NativeImagePtr.h \
Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp \
Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp \
Source/WebCore/platform/graphics/cairo/CairoUtilities.h \
Modified: trunk/Source/WebCore/Target.pri (125202 => 125203)
--- trunk/Source/WebCore/Target.pri 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/Target.pri 2012-08-09 21:25:32 UTC (rev 125203)
@@ -2086,6 +2086,7 @@
platform/graphics/IntPointHash.h \
platform/graphics/IntRect.h \
platform/graphics/MediaPlayer.h \
+ platform/graphics/NativeImagePtr.h \
platform/graphics/opentype/OpenTypeVerticalData.h \
platform/graphics/Path.h \
platform/graphics/PathTraversalState.h \
Modified: trunk/Source/WebCore/WebCore.gypi (125202 => 125203)
--- trunk/Source/WebCore/WebCore.gypi 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/WebCore.gypi 2012-08-09 21:25:32 UTC (rev 125203)
@@ -3532,6 +3532,7 @@
'platform/graphics/IntRect.cpp',
'platform/graphics/MediaPlayer.cpp',
'platform/graphics/MediaPlayerPrivate.h',
+ 'platform/graphics/NativeImagePtr.h' ,
'platform/graphics/Path.cpp',
'platform/graphics/PathTraversalState.cpp',
'platform/graphics/PathTraversalState.h',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (125202 => 125203)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-08-09 21:25:32 UTC (rev 125203)
@@ -29549,6 +29549,10 @@
RelativePath="..\platform\graphics\MediaPlayer.h"
>
</File>
+ <File
+ RelativePath="..\platform\graphics\NativeImagePtr.h"
+ >
+ </File>
<File
RelativePath="..\platform\graphics\Path.cpp"
>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (125202 => 125203)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-08-09 21:25:32 UTC (rev 125203)
@@ -4826,6 +4826,7 @@
B27535740B053814002CE64F /* IntRect.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535460B053814002CE64F /* IntRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
B27535750B053814002CE64F /* IntSize.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535470B053814002CE64F /* IntSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
B27535760B053814002CE64F /* IntSizeHash.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535480B053814002CE64F /* IntSizeHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 6B3480940EEF50D400AC1B41 /* NativeImagePtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
B27535770B053814002CE64F /* ColorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354A0B053814002CE64F /* ColorMac.mm */; };
B27535780B053814002CE64F /* FloatPointMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354B0B053814002CE64F /* FloatPointMac.mm */; };
B27535790B053814002CE64F /* FloatRectMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354C0B053814002CE64F /* FloatRectMac.mm */; };
@@ -12063,6 +12064,7 @@
B27535460B053814002CE64F /* IntRect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntRect.h; sourceTree = "<group>"; };
B27535470B053814002CE64F /* IntSize.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntSize.h; sourceTree = "<group>"; };
B27535480B053814002CE64F /* IntSizeHash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntSizeHash.h; sourceTree = "<group>"; };
+ 6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NativeImagePtr.h; sourceTree = "<group>"; };
B275354A0B053814002CE64F /* ColorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ColorMac.mm; sourceTree = "<group>"; };
B275354B0B053814002CE64F /* FloatPointMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FloatPointMac.mm; sourceTree = "<group>"; };
B275354C0B053814002CE64F /* FloatRectMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FloatRectMac.mm; sourceTree = "<group>"; };
@@ -19832,6 +19834,7 @@
E4B41E0C0CBF90BD00AF2ECE /* MediaPlayer.cpp */,
E4B41E0D0CBF90BD00AF2ECE /* MediaPlayer.h */,
079F5E4B0F3BEBEA005E0782 /* MediaPlayerPrivate.h */,
+ 6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */,
B27535520B053814002CE64F /* Path.cpp */,
B27535530B053814002CE64F /* Path.h */,
A88DD4880B4629B000C02990 /* PathTraversalState.cpp */,
@@ -24326,6 +24329,7 @@
C6F08FBD1430FE8F00685849 /* MutationRecord.h in Headers */,
A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */,
A818721E0977D3C0005826D9 /* NameNodeList.h in Headers */,
+ 6B3480940EEF50D400AC1B41 /* NativeImagePtr.h in Headers */,
E10B9B6C0B747599003ED890 /* NativeXPathNSResolver.h in Headers */,
93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */,
979F43D41075E44A0000F83B /* NavigationScheduler.h in Headers */,
Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.h (125202 => 125203)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.h 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.h 2012-08-09 21:25:32 UTC (rev 125203)
@@ -31,6 +31,7 @@
#include "Image.h"
#include "Color.h"
#include "ImageOrientation.h"
+#include "ImageSource.h"
#include "IntSize.h"
#if PLATFORM(MAC)
Modified: trunk/Source/WebCore/platform/graphics/Image.h (125202 => 125203)
--- trunk/Source/WebCore/platform/graphics/Image.h 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/platform/graphics/Image.h 2012-08-09 21:25:32 UTC (rev 125203)
@@ -30,8 +30,9 @@
#include "Color.h"
#include "ColorSpace.h"
#include "GraphicsTypes.h"
-#include "ImageSource.h"
+#include "ImageOrientation.h"
#include "IntRect.h"
+#include "NativeImagePtr.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
Modified: trunk/Source/WebCore/platform/graphics/ImageSource.h (125202 => 125203)
--- trunk/Source/WebCore/platform/graphics/ImageSource.h 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/platform/graphics/ImageSource.h 2012-08-09 21:25:32 UTC (rev 125203)
@@ -28,31 +28,15 @@
#define ImageSource_h
#include "ImageOrientation.h"
+#include "NativeImagePtr.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
#include <wtf/Vector.h>
-#if PLATFORM(WX)
-class wxBitmap;
-class wxGraphicsBitmap;
-#elif USE(CG)
+#if USE(CG)
typedef struct CGImageSource* CGImageSourceRef;
-typedef struct CGImage* CGImageRef;
typedef const struct __CFData* CFDataRef;
-#elif PLATFORM(QT)
-#include <qglobal.h>
-QT_BEGIN_NAMESPACE
-class QImage;
-QT_END_NAMESPACE
-#elif USE(CAIRO)
-#include "NativeImageCairo.h"
-#elif USE(SKIA)
-namespace WebCore {
-class NativeImageSkia;
-}
-#elif OS(WINCE)
-#include "SharedBitmap.h"
#endif
namespace WebCore {
@@ -64,35 +48,10 @@
#if USE(CG)
typedef CGImageSourceRef NativeImageSourcePtr;
-typedef CGImageRef NativeImagePtr;
-#elif PLATFORM(OPENVG)
-class ImageDecoder;
-class TiledImageOpenVG;
-typedef ImageDecoder* NativeImageSourcePtr;
-typedef TiledImageOpenVG* NativeImagePtr;
#else
class ImageDecoder;
typedef ImageDecoder* NativeImageSourcePtr;
-#if PLATFORM(WX)
-#if USE(WXGC)
-typedef wxGraphicsBitmap* NativeImagePtr;
-#else
-typedef wxBitmap* NativeImagePtr;
#endif
-#elif USE(CAIRO)
-typedef WebCore::NativeImageCairo* NativeImagePtr;
-#elif USE(SKIA)
-typedef WebCore::NativeImageSkia* NativeImagePtr;
-#elif OS(WINCE)
-typedef RefPtr<SharedBitmap> NativeImagePtr;
-#elif PLATFORM(BLACKBERRY)
-class ImageDecoder;
-typedef ImageDecoder* NativeImageSourcePtr;
-typedef void* NativeImagePtr;
-#elif PLATFORM(QT)
-typedef QImage* NativeImagePtr;
-#endif
-#endif
// Right now GIFs are the only recognized image format that supports animation.
// The animation system and the constants below are designed with this in mind.
Added: trunk/Source/WebCore/platform/graphics/NativeImagePtr.h (0 => 125203)
--- trunk/Source/WebCore/platform/graphics/NativeImagePtr.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/NativeImagePtr.h 2012-08-09 21:25:32 UTC (rev 125203)
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2007-2008 Torch Mobile, Inc.
+ * Copyright (C) 2012 Company 100 Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef NativeImagePtr_h
+#define NativeImagePtr_h
+
+#if PLATFORM(WX)
+class wxBitmap;
+class wxGraphicsBitmap;
+#elif USE(CG)
+typedef struct CGImage* CGImageRef;
+#elif PLATFORM(QT)
+#include <qglobal.h>
+QT_BEGIN_NAMESPACE
+class QImage;
+QT_END_NAMESPACE
+#elif USE(CAIRO)
+#include "NativeImageCairo.h"
+#elif USE(SKIA)
+namespace WebCore {
+class NativeImageSkia;
+}
+#elif OS(WINCE)
+#include "SharedBitmap.h"
+#endif
+
+namespace WebCore {
+
+#if USE(CG)
+typedef CGImageRef NativeImagePtr;
+#elif PLATFORM(OPENVG)
+class TiledImageOpenVG;
+typedef TiledImageOpenVG* NativeImagePtr;
+#elif PLATFORM(WX)
+#if USE(WXGC)
+typedef wxGraphicsBitmap* NativeImagePtr;
+#else
+typedef wxBitmap* NativeImagePtr;
+#endif
+#elif USE(CAIRO)
+typedef WebCore::NativeImageCairo* NativeImagePtr;
+#elif USE(SKIA)
+typedef WebCore::NativeImageSkia* NativeImagePtr;
+#elif OS(WINCE)
+typedef RefPtr<SharedBitmap> NativeImagePtr;
+#elif PLATFORM(BLACKBERRY)
+typedef void* NativeImagePtr;
+#elif PLATFORM(QT)
+typedef QImage* NativeImagePtr;
+#endif
+
+}
+
+#endif
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp (125202 => 125203)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp 2012-08-09 21:12:44 UTC (rev 125202)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp 2012-08-09 21:25:32 UTC (rev 125203)
@@ -33,6 +33,7 @@
#include "Extensions3DOpenGL.h"
#include "GraphicsContext3DPrivate.h"
#include "Image.h"
+#include "ImageSource.h"
#include "NotImplemented.h"
#include "OpenGLShims.h"
#include "PlatformContextCairo.h"