Title: [166633] trunk/Source/WebCore
Revision
166633
Author
[email protected]
Date
2014-04-02 00:05:14 -0700 (Wed, 02 Apr 2014)

Log Message

Operator stretching: expose a math data API
https://bugs.webkit.org/show_bug.cgi?id=130572

Reviewed by Chris Fleizach.

We expose a new SimpleFontData API to give access to the data from the
OpenType MATH table. The class OpenTypeMathData will
be implemented in bug 130324. On Darwin platform, we also implement the
missing FontPlatformData::openTypeTable function which will be necessary
to load the OpenType MATH table. The changes are intended to be used
for MathML operator stretching (bug 130322) so tests are not added yet.

* CMakeLists.txt: add new OpenTypeMathData files.
* WebCore.vcxproj/WebCore.vcxproj: ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
* WebCore.xcodeproj/project.pbxproj: ditto.
* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
* platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::SimpleFontData):
(WebCore::SimpleFontData::mathData): Initialize and return the math data.
* platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
* platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
(WebCore::OpenTypeMathData::OpenTypeMathData):
* platform/graphics/opentype/OpenTypeMathData.h: Added.
(WebCore::OpenTypeMathData::create):
(WebCore::OpenTypeMathData::hasMathData):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (166632 => 166633)


--- trunk/Source/WebCore/CMakeLists.txt	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/CMakeLists.txt	2014-04-02 07:05:14 UTC (rev 166633)
@@ -1948,6 +1948,8 @@
     platform/graphics/filters/SourceGraphic.cpp
     platform/graphics/filters/SpotLightSource.cpp
 
+    platform/graphics/opentype/OpenTypeMathData.cpp
+
     platform/graphics/texmap/TextureMapper.cpp
     platform/graphics/texmap/TextureMapperBackingStore.cpp
     platform/graphics/texmap/TextureMapperFPSCounter.cpp

Modified: trunk/Source/WebCore/ChangeLog (166632 => 166633)


--- trunk/Source/WebCore/ChangeLog	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/ChangeLog	2014-04-02 07:05:14 UTC (rev 166633)
@@ -1,3 +1,34 @@
+2014-04-02  Frédéric Wang  <[email protected]>
+
+        Operator stretching: expose a math data API
+        https://bugs.webkit.org/show_bug.cgi?id=130572
+
+        Reviewed by Chris Fleizach.
+
+        We expose a new SimpleFontData API to give access to the data from the
+        OpenType MATH table. The class OpenTypeMathData will
+        be implemented in bug 130324. On Darwin platform, we also implement the
+        missing FontPlatformData::openTypeTable function which will be necessary
+        to load the OpenType MATH table. The changes are intended to be used
+        for MathML operator stretching (bug 130322) so tests are not added yet.
+
+        * CMakeLists.txt: add new OpenTypeMathData files.
+        * WebCore.vcxproj/WebCore.vcxproj: ditto.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
+        * WebCore.xcodeproj/project.pbxproj: ditto.
+        * platform/graphics/FontPlatformData.cpp:
+        (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
+        * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
+        * platform/graphics/SimpleFontData.cpp:
+        (WebCore::SimpleFontData::SimpleFontData):
+        (WebCore::SimpleFontData::mathData): Initialize and return the math data.
+        * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
+        * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
+        (WebCore::OpenTypeMathData::OpenTypeMathData):
+        * platform/graphics/opentype/OpenTypeMathData.h: Added.
+        (WebCore::OpenTypeMathData::create):
+        (WebCore::OpenTypeMathData::hasMathData):
+
 2014-04-01  Mihnea Ovidenie  <[email protected]>
 
         [CSSRegions] Displaying region's children in another region not supported

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (166632 => 166633)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-04-02 07:05:14 UTC (rev 166633)
@@ -7989,6 +7989,7 @@
     <ClCompile Include="..\platform\graphics\win\IntRectWin.cpp" />
     <ClCompile Include="..\platform\graphics\win\IntSizeWin.cpp" />
     <ClCompile Include="..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.cpp" />
+    <ClCompile Include="..\platform\graphics\opentype\OpenTypeMathData.cpp" />
     <ClCompile Include="..\platform\graphics\opentype\OpenTypeUtilities.cpp" />
     <ClCompile Include="..\platform\graphics\opentype\OpenTypeVerticalData.cpp" />
     <ClCompile Include="..\platform\graphics\win\SimpleFontDataCairoWin.cpp">
@@ -19406,6 +19407,7 @@
     <ClInclude Include="..\platform\graphics\win\FullScreenControllerClient.h" />
     <ClInclude Include="..\platform\graphics\win\LocalWindowsContext.h" />
     <CustomBuildStep Include="..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.h" />
+    <ClInclude Include="..\platform\graphics\opentype\OpenTypeMathData.h" />
     <ClInclude Include="..\platform\graphics\opentype\OpenTypeTypes.h" />
     <ClInclude Include="..\platform\graphics\opentype\OpenTypeUtilities.h" />
     <ClInclude Include="..\platform\graphics\opentype\OpenTypeVerticalData.h" />

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (166632 => 166633)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-04-02 07:05:14 UTC (rev 166633)
@@ -1482,6 +1482,9 @@
     <ClCompile Include="..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.cpp">
       <Filter>platform\graphics\win</Filter>
     </ClCompile>
+    <ClCompile Include="..\platform\graphics\opentype\OpenTypeMathData.cpp">
+      <Filter>platform\graphics\win</Filter>
+    </ClCompile>
     <ClCompile Include="..\platform\graphics\opentype\OpenTypeUtilities.cpp">
       <Filter>platform\graphics\win</Filter>
     </ClCompile>
@@ -8449,6 +8452,9 @@
     <ClInclude Include="..\platform\graphics\win\LocalWindowsContext.h">
       <Filter>platform\graphics\win</Filter>
     </ClInclude>
+    <ClInclude Include="..\platform\graphics\opentype\OpenTypeMathData.h">
+      <Filter>platform\graphics\win</Filter>
+    </ClInclude>
     <ClInclude Include="..\platform\graphics\opentype\OpenTypeTypes.h">
       <Filter>platform\graphics\win</Filter>
     </ClInclude>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (166632 => 166633)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-04-02 07:05:14 UTC (rev 166633)
@@ -4594,6 +4594,8 @@
 		B2C3DA630D006CD600EF6F26 /* FontCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA520D006CD600EF6F26 /* FontCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2C3DA640D006CD600EF6F26 /* SimpleFontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */; };
 		B2C3DA650D006CD600EF6F26 /* SimpleFontData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA540D006CD600EF6F26 /* SimpleFontData.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		B2D3DA640D006CD600EF6F27 /* OpenTypeMathData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2D3DA530D006CD600EF6F27 /* OpenTypeMathData.cpp */; };
+		B2D3DA650D006CD600EF6F27 /* OpenTypeMathData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2D3DA540D006CD600EF6F27 /* OpenTypeMathData.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2C3DA660D006CD600EF6F26 /* FontDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA550D006CD600EF6F26 /* FontDescription.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2C3DA670D006CD600EF6F26 /* FontGlyphs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA560D006CD600EF6F26 /* FontGlyphs.cpp */; };
 		B2C3DA680D006CD600EF6F26 /* FontGlyphs.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA570D006CD600EF6F26 /* FontGlyphs.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -11848,6 +11850,8 @@
 		B2C3DA520D006CD600EF6F26 /* FontCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontCache.h; sourceTree = "<group>"; };
 		B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleFontData.cpp; sourceTree = "<group>"; };
 		B2C3DA540D006CD600EF6F26 /* SimpleFontData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SimpleFontData.h; sourceTree = "<group>"; };
+		B2D3DA530D006CD600EF6F27 /* OpenTypeMathData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = opentype/OpenTypeMathData.cpp; sourceTree = "<group>"; };
+		B2D3DA540D006CD600EF6F27 /* OpenTypeMathData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = opentype/OpenTypeMathData.h; sourceTree = "<group>"; };
 		B2C3DA550D006CD600EF6F26 /* FontDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontDescription.h; sourceTree = "<group>"; };
 		B2C3DA560D006CD600EF6F26 /* FontGlyphs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontGlyphs.cpp; sourceTree = "<group>"; };
 		B2C3DA570D006CD600EF6F26 /* FontGlyphs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontGlyphs.h; sourceTree = "<group>"; };
@@ -20140,6 +20144,8 @@
 				0F3DD44E12F5EA1B000D9190 /* ShadowBlur.h */,
 				B2C3DA530D006CD600EF6F26 /* SimpleFontData.cpp */,
 				B2C3DA540D006CD600EF6F26 /* SimpleFontData.h */,
+				B2D3DA530D006CD600EF6F27 /* OpenTypeMathData.cpp */,
+				B2D3DA540D006CD600EF6F27 /* OpenTypeMathData.h */,
 				CD641EB21818F5ED00EE4C41 /* SourceBufferPrivate.h */,
 				CDC61DA0180867D8004B913F /* SourceBufferPrivate.h */,
 				CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */,
@@ -25487,6 +25493,7 @@
 				E1B7839C163740A70007B692 /* SharedWorkerStrategy.h in Headers */,
 				41D168EE10226E89009BC827 /* SharedWorkerThread.h in Headers */,
 				B2C3DA650D006CD600EF6F26 /* SimpleFontData.h in Headers */,
+				B2D3DA650D006CD600EF6F27 /* OpenTypeMathData.h in Headers */,
 				E48944A3180B57D800F165D8 /* SimpleLineLayout.h in Headers */,
 				E4E9B11D1814569C003ACCDF /* SimpleLineLayoutFunctions.h in Headers */,
 				E4E9B1191810916F003ACCDF /* SimpleLineLayoutResolver.h in Headers */,
@@ -28854,6 +28861,7 @@
 				E1B784201639CBBE0007B692 /* SharedWorkerRepository.cpp in Sources */,
 				41D168ED10226E89009BC827 /* SharedWorkerThread.cpp in Sources */,
 				B2C3DA640D006CD600EF6F26 /* SimpleFontData.cpp in Sources */,
+				B2D3DA640D006CD600EF6F27 /* OpenTypeMathData.cpp in Sources */,
 				163E88F7118A39D200ED9231 /* SimpleFontDataCoreText.cpp in Sources */,
 				37E65950163B10C200EB4574 /* SimpleFontDataIOS.mm in Sources */,
 				B2AFFC7F0D00A5C10030074D /* SimpleFontDataMac.mm in Sources */,

Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp (166632 => 166633)


--- trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2014-04-02 07:05:14 UTC (rev 166633)
@@ -27,6 +27,11 @@
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
+#if OS(DARWIN) && USE(CG)
+#include "SharedBuffer.h"
+#include <CoreGraphics/CGFont.h>
+#endif
+
 namespace WebCore {
 
 FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType)
@@ -169,4 +174,14 @@
     return platformDataAssign(other);
 }
 
+#if OS(DARWIN) && USE(CG)
+PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const
+{
+    if (CFDataRef data = "" table))
+        return SharedBuffer::wrapCFData(data);
+    
+    return nullptr;
 }
+#endif
+
+}

Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.h (166632 => 166633)


--- trunk/Source/WebCore/platform/graphics/FontPlatformData.h	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.h	2014-04-02 07:05:14 UTC (rev 166633)
@@ -216,7 +216,7 @@
 #endif
     }
 
-#if PLATFORM(WIN) && (USE(CG) || USE(CAIRO))
+#if (OS(DARWIN) && USE(CG)) || (PLATFORM(WIN) && (USE(CG) || USE(CAIRO)))
     PassRefPtr<SharedBuffer> openTypeTable(uint32_t table) const;
 #endif
 

Modified: trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp (166632 => 166633)


--- trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/platform/graphics/SimpleFontData.cpp	2014-04-02 07:05:14 UTC (rev 166633)
@@ -32,6 +32,7 @@
 
 #include "Font.h"
 #include "FontCache.h"
+#include "OpenTypeMathData.h"
 #include <wtf/MathExtras.h>
 
 #if ENABLE(OPENTYPE_VERTICAL)
@@ -52,6 +53,7 @@
     , m_isLoading(isLoading)
     , m_isTextOrientationFallback(isTextOrientationFallback)
     , m_isBrokenIdeographFallback(false)
+    , m_mathData(nullptr)
 #if ENABLE(OPENTYPE_VERTICAL)
     , m_verticalData(0)
 #endif
@@ -76,6 +78,7 @@
     , m_isLoading(false)
     , m_isTextOrientationFallback(false)
     , m_isBrokenIdeographFallback(false)
+    , m_mathData(nullptr)
 #if ENABLE(OPENTYPE_VERTICAL)
     , m_verticalData(0)
 #endif
@@ -256,6 +259,16 @@
 }
 #endif
 
+const OpenTypeMathData* SimpleFontData::mathData() const
+{
+    if (!m_mathData) {
+        m_mathData = OpenTypeMathData::create(m_platformData);
+        if (!m_mathData->hasMathData())
+            m_mathData.clear();
+    }
+    return m_mathData.get();
+}
+
 PassOwnPtr<SimpleFontData::DerivedFontData> SimpleFontData::DerivedFontData::create(bool forCustomFont)
 {
     return adoptPtr(new DerivedFontData(forCustomFont));

Modified: trunk/Source/WebCore/platform/graphics/SimpleFontData.h (166632 => 166633)


--- trunk/Source/WebCore/platform/graphics/SimpleFontData.h	2014-04-02 06:29:38 UTC (rev 166632)
+++ trunk/Source/WebCore/platform/graphics/SimpleFontData.h	2014-04-02 07:05:14 UTC (rev 166633)
@@ -32,6 +32,7 @@
 #include "GlyphBuffer.h"
 #include "GlyphMetricsMap.h"
 #include "GlyphPageTreeNode.h"
+#include "OpenTypeMathData.h"
 #if ENABLE(OPENTYPE_VERTICAL)
 #include "OpenTypeVerticalData.h"
 #endif
@@ -92,6 +93,7 @@
     static const SimpleFontData* systemFallback() { return reinterpret_cast<const SimpleFontData*>(-1); }
 
     const FontPlatformData& platformData() const { return m_platformData; }
+    const OpenTypeMathData* mathData() const;
 #if ENABLE(OPENTYPE_VERTICAL)
     const OpenTypeVerticalData* verticalData() const { return m_verticalData.get(); }
 #endif
@@ -259,6 +261,7 @@
 
     bool m_isTextOrientationFallback;
     bool m_isBrokenIdeographFallback;
+    mutable RefPtr<OpenTypeMathData> m_mathData;
 #if ENABLE(OPENTYPE_VERTICAL)
     RefPtr<OpenTypeVerticalData> m_verticalData;
 #endif

Added: trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp (0 => 166633)


--- trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp	2014-04-02 07:05:14 UTC (rev 166633)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2014 Frederic Wang ([email protected]). All rights reserved.
+ *
+ * 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 THE COPYRIGHT
+ * OWNER 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.
+ */
+
+#include "config.h"
+#include "OpenTypeMathData.h"
+
+#include "FontPlatformData.h"
+
+using namespace std;
+
+namespace WebCore {
+
+OpenTypeMathData::OpenTypeMathData(const FontPlatformData&)
+{
+    // FIXME: We should read the data from the MATH table (https://bugs.webkit.org/show_bug.cgi?id=130324).
+    m_mathBuffer = nullptr;
+}
+
+} // namespace WebCore
Property changes on: trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp
___________________________________________________________________

Added: svn:eol-style

Added: trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.h (0 => 166633)


--- trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.h	2014-04-02 07:05:14 UTC (rev 166633)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2014 Frederic Wang ([email protected]). All rights reserved.
+ *
+ * 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 THE COPYRIGHT
+ * OWNER 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 OpenTypeMathData_h
+#define OpenTypeMathData_h
+
+#include "SharedBuffer.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class FontPlatformData;
+
+class OpenTypeMathData : public RefCounted<OpenTypeMathData> {
+public:
+    static PassRefPtr<OpenTypeMathData> create(const FontPlatformData& fontData)
+    {
+        return adoptRef(new OpenTypeMathData(fontData));
+    }
+
+    bool hasMathData() const { return m_mathBuffer; }
+
+private:
+    explicit OpenTypeMathData(const FontPlatformData&);
+    RefPtr<SharedBuffer> m_mathBuffer;
+};
+
+} // namespace WebCore
+
+#endif // OpenTypeMathData_h
Property changes on: trunk/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.h
___________________________________________________________________

Added: svn:eol-style

_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to