summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/platform/graphics
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-10 01:17:51 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-10 01:17:51 (GMT)
commit9c13caa3c99af01a9b4c3ff6e178e7dadb61741f (patch)
treeb69df0a23c4628359fc3740e09958980eda7478e /src/3rdparty/webkit/WebCore/platform/graphics
parentbb1bdcab28e4c52dcea37dfaaa435045b1985eeb (diff)
parent883da42f7c75775502c818aa456c8576d8457ff8 (diff)
downloadQt-9c13caa3c99af01a9b4c3ff6e178e7dadb61741f.zip
Qt-9c13caa3c99af01a9b4c3ff6e178e7dadb61741f.tar.gz
Qt-9c13caa3c99af01a9b4c3ff6e178e7dadb61741f.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui-gv
Conflicts: examples/itemviews/frozencolumn/main.cpp src/declarative/canvas/qsimplecanvas.cpp src/declarative/canvas/qsimplecanvas_p.h src/declarative/canvas/qsimplecanvasitem.h src/declarative/extra/qfxparticles.cpp src/declarative/fx/fx.pri src/declarative/fx/qfxblurfilter.h src/declarative/fx/qfxcontentwrapper.cpp src/declarative/fx/qfxflickable.cpp src/declarative/fx/qfxfocuspanel.h src/declarative/fx/qfxfocusrealm.h src/declarative/fx/qfxhighlightfilter.cpp src/declarative/fx/qfxhighlightfilter.h src/declarative/fx/qfximage.cpp src/declarative/fx/qfxitem.cpp src/declarative/fx/qfxitem.h src/declarative/fx/qfxrect.cpp src/declarative/fx/qfxreflectionfilter.h src/declarative/fx/qfxshadowfilter.cpp src/declarative/fx/qfxshadowfilter.h src/declarative/fx/qfxtext.cpp src/declarative/fx/qfxtext.h src/declarative/fx/qfxtextedit.cpp src/declarative/opengl/glbasicshaders.h src/declarative/test/qfxtestengine.cpp src/declarative/test/qfxtestengine.h src/declarative/test/qfxtestobjects.cpp src/declarative/test/qfxtestobjects.h src/declarative/test/qfxtestview.h src/declarative/util/qfxglobal.h src/declarative/util/qfxview.cpp src/gui/graphicsview/qgraphicsitem_p.h tools/qmlviewer/qmlviewer.cpp
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/graphics')
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Color.cpp35
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Color.h1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint.h9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatRect.h5
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Font.cpp22
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Font.h13
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontCache.cpp22
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.h14
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontFastPath.cpp15
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h29
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntRect.h8
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntSize.h7
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp39
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h39
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h13
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEBlend.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEColorMatrix.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComponentTransfer.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/Filter.h14
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.cpp37
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.h35
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceAlpha.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.h4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp15
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformationMatrix.h4
32 files changed, 324 insertions, 119 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Color.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/Color.cpp
index e85ac00..d98b202 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/Color.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/Color.cpp
@@ -321,6 +321,41 @@ void Color::getRGBA(double& r, double& g, double& b, double& a) const
a = alpha() / 255.0;
}
+void Color::getHSL(double& hue, double& saturation, double& lightness) const
+{
+ // http://en.wikipedia.org/wiki/HSL_color_space. This is a direct copy of
+ // the algorithm therein, although it's 360^o based and we end up wanting
+ // [0...1) based. It's clearer if we stick to 360^o until the end.
+ double r = static_cast<double>(red()) / 255.0;
+ double g = static_cast<double>(green()) / 255.0;
+ double b = static_cast<double>(blue()) / 255.0;
+ double max = std::max(std::max(r, g), b);
+ double min = std::min(std::min(r, g), b);
+
+ if (max == min)
+ hue = 0.0;
+ else if (max == r)
+ hue = (60.0 * ((g - b) / (max - min))) + 360.0;
+ else if (max == g)
+ hue = (60.0 * ((b - r) / (max - min))) + 120.0;
+ else
+ hue = (60.0 * ((r - g) / (max - min))) + 240.0;
+
+ if (hue >= 360.0)
+ hue -= 360.0;
+
+ // makeRGBAFromHSLA assumes that hue is in [0...1).
+ hue /= 360.0;
+
+ lightness = 0.5 * (max + min);
+ if (max == min)
+ saturation = 0.0;
+ else if (lightness <= 0.5)
+ saturation = ((max - min) / (max + min));
+ else
+ saturation = ((max - min) / (2.0 - (max + min)));
+}
+
Color colorFromPremultipliedARGB(unsigned pixelColor)
{
RGBA32 rgba;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Color.h b/src/3rdparty/webkit/WebCore/platform/graphics/Color.h
index 04bf4c4..032d0cb 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/Color.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/Color.h
@@ -94,6 +94,7 @@ public:
void setRGB(RGBA32 rgb) { m_color = rgb; m_valid = true; }
void getRGBA(float& r, float& g, float& b, float& a) const;
void getRGBA(double& r, double& g, double& b, double& a) const;
+ void getHSL(double& h, double& s, double& l) const;
Color light() const;
Color dark() const;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint.h b/src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint.h
index 35b3036..157c1e7 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint.h
@@ -51,10 +51,6 @@ class QPointF;
QT_END_NAMESPACE
#endif
-#if PLATFORM(SYMBIAN)
-class TPoint;
-#endif
-
#if PLATFORM(SKIA)
struct SkPoint;
#endif
@@ -94,11 +90,6 @@ public:
operator QPointF() const;
#endif
-#if PLATFORM(SYMBIAN)
- operator TPoint() const;
- FloatPoint(const TPoint&);
-#endif
-
#if PLATFORM(SKIA)
operator SkPoint() const;
FloatPoint(const SkPoint&);
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/FloatRect.h b/src/3rdparty/webkit/WebCore/platform/graphics/FloatRect.h
index a87c949..0723eb7 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/FloatRect.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/FloatRect.h
@@ -132,11 +132,6 @@ public:
FloatRect(const QRectF&);
operator QRectF() const;
#endif
-#if PLATFORM(SYMBIAN)
- FloatRect(const TRect&);
- operator TRect() const;
- TRect rect() const;
-#endif
#if PLATFORM(WX) && USE(WXGC)
FloatRect(const wxRect2DDouble&);
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Font.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/Font.cpp
index 85fe882..88774cb 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/Font.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/Font.cpp
@@ -59,9 +59,7 @@ Font::CodePath Font::s_codePath = Auto;
// ============================================================================================
Font::Font()
- : m_pageZero(0)
- , m_cachedPrimaryFont(0)
- , m_letterSpacing(0)
+ : m_letterSpacing(0)
, m_wordSpacing(0)
, m_isPlatformFont(false)
{
@@ -69,8 +67,6 @@ Font::Font()
Font::Font(const FontDescription& fd, short letterSpacing, short wordSpacing)
: m_fontDescription(fd)
- , m_pageZero(0)
- , m_cachedPrimaryFont(0)
, m_letterSpacing(letterSpacing)
, m_wordSpacing(wordSpacing)
, m_isPlatformFont(false)
@@ -79,8 +75,6 @@ Font::Font(const FontDescription& fd, short letterSpacing, short wordSpacing)
Font::Font(const FontPlatformData& fontData, bool isPrinterFont)
: m_fontList(FontFallbackList::create())
- , m_pageZero(0)
- , m_cachedPrimaryFont(0)
, m_letterSpacing(0)
, m_wordSpacing(0)
, m_isPlatformFont(true)
@@ -92,9 +86,6 @@ Font::Font(const FontPlatformData& fontData, bool isPrinterFont)
Font::Font(const Font& other)
: m_fontDescription(other.m_fontDescription)
, m_fontList(other.m_fontList)
- , m_pages(other.m_pages)
- , m_pageZero(other.m_pageZero)
- , m_cachedPrimaryFont(other.m_cachedPrimaryFont)
, m_letterSpacing(other.m_letterSpacing)
, m_wordSpacing(other.m_wordSpacing)
, m_isPlatformFont(other.m_isPlatformFont)
@@ -105,9 +96,6 @@ Font& Font::operator=(const Font& other)
{
m_fontDescription = other.m_fontDescription;
m_fontList = other.m_fontList;
- m_pages = other.m_pages;
- m_pageZero = other.m_pageZero;
- m_cachedPrimaryFont = other.m_cachedPrimaryFont;
m_letterSpacing = other.m_letterSpacing;
m_wordSpacing = other.m_wordSpacing;
m_isPlatformFont = other.m_isPlatformFont;
@@ -136,11 +124,10 @@ bool Font::operator==(const Font& other) const
&& (m_fontList ? m_fontList->generation() : 0) == (other.m_fontList ? other.m_fontList->generation() : 0);
}
-void Font::cachePrimaryFont() const
+const SimpleFontData* Font::primaryFont() const
{
ASSERT(m_fontList);
- ASSERT(!m_cachedPrimaryFont);
- m_cachedPrimaryFont = m_fontList->primaryFont(this)->fontDataForCharacter(' ');
+ return m_fontList->primarySimpleFontData(this);
}
const FontData* Font::fontDataAt(unsigned index) const
@@ -165,9 +152,6 @@ void Font::update(PassRefPtr<FontSelector> fontSelector) const
if (!m_fontList)
m_fontList = FontFallbackList::create();
m_fontList->invalidate(fontSelector);
- m_cachedPrimaryFont = 0;
- m_pageZero = 0;
- m_pages.clear();
}
bool Font::isFixedPitch() const
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/Font.h b/src/3rdparty/webkit/WebCore/platform/graphics/Font.h
index 8d85d8b..c067071 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/Font.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/Font.h
@@ -115,14 +115,7 @@ public:
int spaceWidth() const { return (int)ceilf(primaryFont()->adjustedSpaceWidth() + m_letterSpacing); }
int tabWidth() const { return 8 * spaceWidth(); }
- const SimpleFontData* primaryFont() const
- {
- ASSERT(isMainThread());
- if (!m_cachedPrimaryFont)
- cachePrimaryFont();
- return m_cachedPrimaryFont;
- }
-
+ const SimpleFontData* primaryFont() const;
const FontData* fontDataAt(unsigned) const;
GlyphData glyphDataForCharacter(UChar32, bool mirror, bool forceSmallCaps = false) const;
// Used for complex text, and does not utilize the glyph map cache.
@@ -160,7 +153,6 @@ private:
float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0) const;
int offsetForPositionForComplexText(const TextRun&, int position, bool includePartialGlyphs) const;
FloatRect selectionRectForComplexText(const TextRun&, const IntPoint&, int h, int from, int to) const;
- void cachePrimaryFont() const;
friend struct WidthIterator;
@@ -191,9 +183,6 @@ public:
private:
FontDescription m_fontDescription;
mutable RefPtr<FontFallbackList> m_fontList;
- mutable HashMap<int, GlyphPageTreeNode*> m_pages;
- mutable GlyphPageTreeNode* m_pageZero;
- mutable const SimpleFontData* m_cachedPrimaryFont;
short m_letterSpacing;
short m_wordSpacing;
bool m_isPlatformFont;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/FontCache.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/FontCache.cpp
index d9b4b28..06ea56b 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/FontCache.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/FontCache.cpp
@@ -328,18 +328,20 @@ void FontCache::purgeInactiveFontData(int count)
for (size_t i = 0; i < fontDataToDeleteCount; ++i)
delete fontDataToDelete[i];
- Vector<FontPlatformDataCacheKey> keysToRemove;
- keysToRemove.reserveInitialCapacity(gFontPlatformDataCache->size());
- FontPlatformDataCache::iterator platformDataEnd = gFontPlatformDataCache->end();
- for (FontPlatformDataCache::iterator platformData = gFontPlatformDataCache->begin(); platformData != platformDataEnd; ++platformData) {
- if (platformData->second && !gFontDataCache->contains(*platformData->second))
- keysToRemove.append(platformData->first);
+ if (gFontPlatformDataCache) {
+ Vector<FontPlatformDataCacheKey> keysToRemove;
+ keysToRemove.reserveInitialCapacity(gFontPlatformDataCache->size());
+ FontPlatformDataCache::iterator platformDataEnd = gFontPlatformDataCache->end();
+ for (FontPlatformDataCache::iterator platformData = gFontPlatformDataCache->begin(); platformData != platformDataEnd; ++platformData) {
+ if (platformData->second && !gFontDataCache->contains(*platformData->second))
+ keysToRemove.append(platformData->first);
+ }
+
+ size_t keysToRemoveCount = keysToRemove.size();
+ for (size_t i = 0; i < keysToRemoveCount; ++i)
+ delete gFontPlatformDataCache->take(keysToRemove[i]);
}
- size_t keysToRemoveCount = keysToRemove.size();
- for (size_t i = 0; i < keysToRemoveCount; ++i)
- delete gFontPlatformDataCache->take(keysToRemove[i]);
-
isPurging = false;
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.cpp
index decacc5..649c117 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.cpp
@@ -36,7 +36,9 @@
namespace WebCore {
FontFallbackList::FontFallbackList()
- : m_fontSelector(0)
+ : m_pageZero(0)
+ , m_cachedPrimarySimpleFontData(0)
+ , m_fontSelector(0)
, m_familyIndex(0)
, m_pitch(UnknownPitch)
, m_loadingCustomFonts(false)
@@ -48,6 +50,9 @@ void FontFallbackList::invalidate(PassRefPtr<FontSelector> fontSelector)
{
releaseFontData();
m_fontList.clear();
+ m_pageZero = 0;
+ m_pages.clear();
+ m_cachedPrimarySimpleFontData = 0;
m_familyIndex = 0;
m_pitch = UnknownPitch;
m_loadingCustomFonts = false;
@@ -68,7 +73,7 @@ void FontFallbackList::releaseFontData()
void FontFallbackList::determinePitch(const Font* font) const
{
- const FontData* fontData = primaryFont(font);
+ const FontData* fontData = primaryFontData(font);
if (!fontData->isSegmented())
m_pitch = static_cast<const SimpleFontData*>(fontData)->pitch();
else {
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.h b/src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.h
index 07938ae..14ebbe4 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.h
@@ -31,6 +31,7 @@
namespace WebCore {
class Font;
+class GlyphPageTreeNode;
class GraphicsContext;
class IntRect;
class FontDescription;
@@ -57,7 +58,15 @@ public:
private:
FontFallbackList();
- const FontData* primaryFont(const Font* f) const { return fontDataAt(f, 0); }
+ const SimpleFontData* primarySimpleFontData(const Font* f)
+ {
+ ASSERT(isMainThread());
+ if (!m_cachedPrimarySimpleFontData)
+ m_cachedPrimarySimpleFontData = primaryFontData(f)->fontDataForCharacter(' ');
+ return m_cachedPrimarySimpleFontData;
+ }
+
+ const FontData* primaryFontData(const Font* f) const { return fontDataAt(f, 0); }
const FontData* fontDataAt(const Font*, unsigned index) const;
const FontData* fontDataForCharacters(const Font*, const UChar*, int length) const;
@@ -66,6 +75,9 @@ private:
void releaseFontData();
mutable Vector<pair<const FontData*, bool>, 1> m_fontList;
+ mutable HashMap<int, GlyphPageTreeNode*> m_pages;
+ mutable GlyphPageTreeNode* m_pageZero;
+ mutable const SimpleFontData* m_cachedPrimarySimpleFontData;
RefPtr<FontSelector> m_fontSelector;
mutable int m_familyIndex;
mutable Pitch m_pitch;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/FontFastPath.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/FontFastPath.cpp
index deac1b6..74b7ec1 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/FontFastPath.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/FontFastPath.cpp
@@ -24,6 +24,7 @@
#include "CharacterNames.h"
#include "FontCache.h"
+#include "FontFallbackList.h"
#include "FloatRect.h"
#include "GlyphBuffer.h"
#include "GlyphPageTreeNode.h"
@@ -57,13 +58,13 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, bool forceSmallCap
unsigned pageNumber = (c / GlyphPage::size);
- GlyphPageTreeNode* node = pageNumber ? m_pages.get(pageNumber) : m_pageZero;
+ GlyphPageTreeNode* node = pageNumber ? m_fontList->m_pages.get(pageNumber) : m_fontList->m_pageZero;
if (!node) {
node = GlyphPageTreeNode::getRootChild(fontDataAt(0), pageNumber);
if (pageNumber)
- m_pages.set(pageNumber, node);
+ m_fontList->m_pages.set(pageNumber, node);
else
- m_pageZero = node;
+ m_fontList->m_pageZero = node;
}
GlyphPage* page;
@@ -82,9 +83,9 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, bool forceSmallCap
// Proceed with the fallback list.
node = node->getChild(fontDataAt(node->level()), pageNumber);
if (pageNumber)
- m_pages.set(pageNumber, node);
+ m_fontList->m_pages.set(pageNumber, node);
else
- m_pageZero = node;
+ m_fontList->m_pageZero = node;
}
} else {
while (true) {
@@ -118,9 +119,9 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, bool forceSmallCap
// Proceed with the fallback list.
node = node->getChild(fontDataAt(node->level()), pageNumber);
if (pageNumber)
- m_pages.set(pageNumber, node);
+ m_fontList->m_pages.set(pageNumber, node);
else
- m_pageZero = node;
+ m_fontList->m_pageZero = node;
}
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h b/src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h
index 6bfdc5a..1cae191 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h
@@ -29,10 +29,15 @@
#include "IntSize.h"
#include <wtf/Platform.h>
+#if PLATFORM(QT)
+#include <QDataStream>
+#endif
+
#if PLATFORM(CG)
typedef struct CGPoint CGPoint;
#endif
+
#if PLATFORM(MAC)
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGPoint NSPoint;
@@ -51,9 +56,6 @@ QT_END_NAMESPACE
#elif PLATFORM(GTK)
typedef struct _GdkPoint GdkPoint;
#endif
-#if PLATFORM(SYMBIAN)
-class TPoint;
-#endif
#if PLATFORM(WX)
class wxPoint;
@@ -119,10 +121,6 @@ public:
IntPoint(const GdkPoint&);
operator GdkPoint() const;
#endif
-#if PLATFORM(SYMBIAN)
- IntPoint(const TPoint&);
- operator TPoint() const;
-#endif
#if PLATFORM(WX)
IntPoint(const wxPoint&);
@@ -176,6 +174,23 @@ inline bool operator!=(const IntPoint& a, const IntPoint& b)
return a.x() != b.x() || a.y() != b.y();
}
+#if PLATFORM(QT)
+inline QDataStream& operator<<(QDataStream& stream, const IntPoint& point)
+{
+ stream << point.x() << point.y();
+ return stream;
+}
+
+inline QDataStream& operator>>(QDataStream& stream, IntPoint& point)
+{
+ int x, y;
+ stream >> x >> y;
+ point.setX(x);
+ point.setY(y);
+ return stream;
+}
+#endif
+
} // namespace WebCore
#endif // IntPoint_h
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/IntRect.h b/src/3rdparty/webkit/WebCore/platform/graphics/IntRect.h
index 03784a3..6c02d21 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/IntRect.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/IntRect.h
@@ -50,9 +50,6 @@ QT_END_NAMESPACE
#elif PLATFORM(GTK)
typedef struct _GdkRectangle GdkRectangle;
#endif
-#if PLATFORM(SYMBIAN)
-class TRect;
-#endif
#if PLATFORM(WX)
class wxRect;
@@ -148,11 +145,6 @@ public:
IntRect(const GdkRectangle&);
operator GdkRectangle() const;
#endif
-#if PLATFORM(SYMBIAN)
- IntRect(const TRect&);
- operator TRect() const;
- TRect Rect() const;
-#endif
#if PLATFORM(CG)
operator CGRect() const;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/IntSize.h b/src/3rdparty/webkit/WebCore/platform/graphics/IntSize.h
index cac0bd1..dc7a85d 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/IntSize.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/IntSize.h
@@ -48,9 +48,6 @@ QT_BEGIN_NAMESPACE
class QSize;
QT_END_NAMESPACE
#endif
-#if PLATFORM(SYMBIAN)
-class TSize;
-#endif
namespace WebCore {
@@ -115,10 +112,6 @@ public:
IntSize(const QSize&);
operator QSize() const;
#endif
-#if PLATFORM(SYMBIAN)
- IntSize(const TSize&);
- operator TSize() const;
-#endif
private:
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
index b580474..a277675 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
@@ -62,6 +62,8 @@ public:
virtual void play() { }
virtual void pause() { }
+ virtual bool supportsFullscreen() const { return false; }
+
virtual IntSize naturalSize() const { return IntSize(0, 0); }
virtual bool hasVideo() const { return false; }
@@ -77,6 +79,7 @@ public:
virtual void setEndTime(float) { }
virtual void setRate(float) { }
+ virtual void setPreservesPitch(bool) { }
virtual bool paused() const { return false; }
virtual void setVolume(float) { }
@@ -102,6 +105,8 @@ public:
virtual void deliverNotification(MediaPlayerProxyNotificationType) { }
virtual void setMediaPlayerProxy(WebMediaPlayerProxy*) { }
#endif
+
+ virtual bool hasSingleSecurityOrigin() const { return true; }
};
static MediaPlayerPrivateInterface* createNullMediaPlayer(MediaPlayer* player)
@@ -183,6 +188,7 @@ MediaPlayer::MediaPlayer(MediaPlayerClient* client)
, m_visible(false)
, m_rate(1.0f)
, m_volume(1.0f)
+ , m_preservesPitch(true)
, m_autobuffer(false)
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
, m_playerProxy(0)
@@ -295,6 +301,11 @@ bool MediaPlayer::seeking() const
return m_private->seeking();
}
+bool MediaPlayer::supportsFullscreen() const
+{
+ return m_private->supportsFullscreen();
+}
+
IntSize MediaPlayer::naturalSize()
{
return m_private->naturalSize();
@@ -345,6 +356,17 @@ void MediaPlayer::setRate(float rate)
m_private->setRate(rate);
}
+bool MediaPlayer::preservesPitch() const
+{
+ return m_preservesPitch;
+}
+
+void MediaPlayer::setPreservesPitch(bool preservesPitch)
+{
+ m_preservesPitch = preservesPitch;
+ m_private->setPreservesPitch(preservesPitch);
+}
+
int MediaPlayer::dataRate() const
{
return m_private->dataRate();
@@ -456,6 +478,18 @@ void MediaPlayer::setMediaPlayerProxy(WebMediaPlayerProxy* proxy)
}
#endif
+#if USE(ACCELERATED_COMPOSITING)
+void MediaPlayer::acceleratedRenderingStateChanged()
+{
+ m_private->acceleratedRenderingStateChanged();
+}
+
+bool MediaPlayer::supportsAcceleratedRendering() const
+{
+ return m_private->supportsAcceleratedRendering();
+}
+#endif // USE(ACCELERATED_COMPOSITING)
+
void MediaPlayer::networkStateChanged()
{
if (m_mediaPlayerClient)
@@ -504,5 +538,10 @@ void MediaPlayer::rateChanged()
m_mediaPlayerClient->mediaPlayerRateChanged(this);
}
+bool MediaPlayer::hasSingleSecurityOrigin() const
+{
+ return m_private->hasSingleSecurityOrigin();
+}
+
}
#endif
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h
index 9b2f685..187c701 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h
@@ -49,6 +49,10 @@ class MediaPlayer;
class MediaPlayerPrivateInterface;
class String;
+#if USE(ACCELERATED_COMPOSITING)
+class GraphicsLayer;
+#endif
+
class MediaPlayerClient {
public:
virtual ~MediaPlayerClient() { }
@@ -65,22 +69,31 @@ public:
// time has jumped, eg. not as a result of normal playback
virtual void mediaPlayerTimeChanged(MediaPlayer*) { }
- // a new frame of video is available
- virtual void mediaPlayerRepaint(MediaPlayer*) { }
-
// the media file duration has changed, or is now known
virtual void mediaPlayerDurationChanged(MediaPlayer*) { }
// the playback rate has changed
virtual void mediaPlayerRateChanged(MediaPlayer*) { }
- // the movie size has changed
- virtual void mediaPlayerSizeChanged(MediaPlayer*) { }
-
// The MediaPlayer has found potentially problematic media content.
// This is used internally to trigger swapping from a <video>
// element to an <embed> in standalone documents
virtual void mediaPlayerSawUnsupportedTracks(MediaPlayer*) { }
+
+// Presentation-related methods
+ // a new frame of video is available
+ virtual void mediaPlayerRepaint(MediaPlayer*) { }
+
+ // the movie size has changed
+ virtual void mediaPlayerSizeChanged(MediaPlayer*) { }
+
+#if USE(ACCELERATED_COMPOSITING)
+ // whether the rendering system can accelerate the display of this MediaPlayer.
+ virtual bool mediaPlayerRenderingCanBeAccelerated(MediaPlayer*) { return false; }
+
+ // return the GraphicsLayer that will host the presentation for this MediaPlayer.
+ virtual GraphicsLayer* mediaPlayerGraphicsLayer(MediaPlayer*) { return 0; }
+#endif
};
class MediaPlayer : Noncopyable {
@@ -94,6 +107,7 @@ public:
static void getSupportedTypes(HashSet<String>&);
static bool isAvailable();
+ bool supportsFullscreen() const;
IntSize naturalSize();
bool hasVideo();
@@ -126,6 +140,9 @@ public:
float rate() const;
void setRate(float);
+
+ bool preservesPitch() const;
+ void setPreservesPitch(bool);
float maxTimeBuffered();
float maxTimeSeekable();
@@ -168,6 +185,15 @@ public:
void setMediaPlayerProxy(WebMediaPlayerProxy* proxy);
#endif
+#if USE(ACCELERATED_COMPOSITING)
+ // whether accelerated rendering is supported by the media engine for the current media.
+ bool supportsAcceleratedRendering() const;
+ // called when the rendering system flips the into or out of accelerated rendering mode.
+ void acceleratedRenderingStateChanged();
+#endif
+
+ bool hasSingleSecurityOrigin() const;
+
private:
static void initializeMediaEngines();
@@ -179,6 +205,7 @@ private:
bool m_visible;
float m_rate;
float m_volume;
+ bool m_preservesPitch;
bool m_autobuffer;
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
WebMediaPlayerProxy* m_playerProxy; // not owned or used, passed to m_private
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h
index e17259c..edbe125 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayerPrivate.h
@@ -46,6 +46,8 @@ public:
virtual void play() = 0;
virtual void pause() = 0;
+ virtual bool supportsFullscreen() const { return false; };
+
virtual IntSize naturalSize() const = 0;
virtual bool hasVideo() const = 0;
@@ -63,6 +65,8 @@ public:
virtual void setEndTime(float) = 0;
virtual void setRate(float) = 0;
+ virtual void setPreservesPitch(bool) { }
+
virtual bool paused() const = 0;
virtual void setVolume(float) = 0;
@@ -90,6 +94,15 @@ public:
virtual void deliverNotification(MediaPlayerProxyNotificationType) = 0;
virtual void setMediaPlayerProxy(WebMediaPlayerProxy*) = 0;
#endif
+
+#if USE(ACCELERATED_COMPOSITING)
+ // whether accelerated rendering is supported by the media engine for the current media.
+ virtual bool supportsAcceleratedRendering() const { return false; }
+ // called when the rendering system flips the into or out of accelerated rendering mode.
+ virtual void acceleratedRenderingStateChanged() { }
+#endif
+
+ virtual bool hasSingleSecurityOrigin() const { return false; }
};
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEBlend.h b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEBlend.h
index dec04ac..b09cd72 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEBlend.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEBlend.h
@@ -47,7 +47,8 @@ namespace WebCore {
BlendModeType blendMode() const;
void setBlendMode(BlendModeType);
-
+
+ virtual FloatRect uniteChildEffectSubregions(Filter* filter) { return calculateUnionOfChildEffectSubregions(filter, m_in.get(), m_in2.get()); }
void apply(Filter*);
void dump();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEColorMatrix.h b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEColorMatrix.h
index eeb3557..106b2fa 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEColorMatrix.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEColorMatrix.h
@@ -47,7 +47,8 @@ namespace WebCore {
const Vector<float>& values() const;
void setValues(const Vector<float>&);
-
+
+ virtual FloatRect uniteChildEffectSubregions(Filter* filter) { return calculateUnionOfChildEffectSubregions(filter, m_in.get()); }
void apply(Filter*);
void dump();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComponentTransfer.h b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComponentTransfer.h
index cc1d1f8..773aba7 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComponentTransfer.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComponentTransfer.h
@@ -78,7 +78,8 @@ namespace WebCore {
ComponentTransferFunction alphaFunction() const;
void setAlphaFunction(const ComponentTransferFunction&);
-
+
+ virtual FloatRect uniteChildEffectSubregions(Filter* filter) { return calculateUnionOfChildEffectSubregions(filter, m_in.get()); }
void apply(Filter*);
void dump();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.h b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.h
index b623cce..ad096f2 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.h
@@ -59,7 +59,8 @@ namespace WebCore {
float k4() const;
void setK4(float);
-
+
+ virtual FloatRect uniteChildEffectSubregions(Filter* filter) { return calculateUnionOfChildEffectSubregions(filter, m_in.get(), m_in2.get()); }
void apply(Filter*);
void dump();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/Filter.h b/src/3rdparty/webkit/WebCore/platform/graphics/filters/Filter.h
index 84909da..ee97afc 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/Filter.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/Filter.h
@@ -21,7 +21,8 @@
#define Filter_h
#if ENABLE(FILTERS)
-#include "Image.h"
+#include "FloatRect.h"
+#include "ImageBuffer.h"
#include "StringHash.h"
#include <wtf/PassRefPtr.h>
@@ -36,13 +37,18 @@ namespace WebCore {
public:
virtual ~Filter() { }
- void setSourceImage(PassRefPtr<Image> image) { m_image = image; }
- Image* sourceImage() { return m_image.get(); }
+ void setSourceImage(PassOwnPtr<ImageBuffer> sourceImage) { m_sourceImage = sourceImage; }
+ ImageBuffer* sourceImage() { return m_sourceImage.get(); }
+ virtual FloatRect sourceImageRect() = 0;
+ virtual FloatRect filterRegion() = 0;
+
+ // SVG specific
virtual void calculateEffectSubRegion(FilterEffect*) = 0;
+ virtual bool effectBoundingBoxMode() = 0;
private:
- RefPtr<Image> m_image;
+ OwnPtr<ImageBuffer> m_sourceImage;
};
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.cpp
index cd74992..43ebf33 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.cpp
@@ -29,6 +29,10 @@ FilterEffect::FilterEffect()
, m_yBBoxMode(false)
, m_widthBBoxMode(false)
, m_heightBBoxMode(false)
+ , m_hasX(false)
+ , m_hasY(false)
+ , m_hasWidth(false)
+ , m_hasHeight(false)
{
}
@@ -36,6 +40,39 @@ FilterEffect::~FilterEffect()
{
}
+FloatRect FilterEffect::calculateUnionOfChildEffectSubregions(Filter* filter, FilterEffect* in)
+{
+ return in->calculateEffectRect(filter);
+}
+
+FloatRect FilterEffect::calculateUnionOfChildEffectSubregions(Filter* filter, FilterEffect* in, FilterEffect* in2)
+{
+ FloatRect uniteEffectRect = in->calculateEffectRect(filter);
+ uniteEffectRect.unite(in2->calculateEffectRect(filter));
+ return uniteEffectRect;
+}
+
+FloatRect FilterEffect::calculateEffectRect(Filter* filter)
+{
+ setUnionOfChildEffectSubregions(uniteChildEffectSubregions(filter));
+ filter->calculateEffectSubRegion(this);
+ return subRegion();
+}
+
+FloatRect FilterEffect::calculateDrawingRect(const FloatRect& srcRect)
+{
+ FloatPoint startPoint = FloatPoint(srcRect.x() - subRegion().x(), srcRect.y() - subRegion().y());
+ FloatRect drawingRect = FloatRect(startPoint, srcRect.size());
+ return drawingRect;
+}
+
+GraphicsContext* FilterEffect::getEffectContext()
+{
+ IntRect bufferRect = enclosingIntRect(subRegion());
+ m_effectBuffer = ImageBuffer::create(bufferRect.size(), false);
+ return m_effectBuffer->context();
+}
+
TextStream& FilterEffect::externalRepresentation(TextStream& ts) const
{
return ts;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.h b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.h
index e2a058d..8dc6233 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FilterEffect.h
@@ -24,9 +24,11 @@
#if ENABLE(FILTERS)
#include "Filter.h"
#include "FloatRect.h"
+#include "GraphicsContext.h"
#include "ImageBuffer.h"
#include "TextStream.h"
+#include <wtf/PassOwnPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
@@ -48,16 +50,41 @@ namespace WebCore {
bool heightBoundingBoxMode() const { return m_heightBBoxMode; }
void setHeightBoundingBoxMode(bool bboxMode) { m_heightBBoxMode = bboxMode; }
+ void setUnionOfChildEffectSubregions(const FloatRect& uniteRect) { m_unionOfChildEffectSubregions = uniteRect; }
+ FloatRect unionOfChildEffectSubregions() const { return m_unionOfChildEffectSubregions; }
+
FloatRect subRegion() const { return m_subRegion; }
void setSubRegion(const FloatRect& subRegion) { m_subRegion = subRegion; }
+ bool hasX() { return m_hasX; }
+ void setHasX(bool value) { m_hasX = value; }
+
+ bool hasY() { return m_hasY; }
+ void setHasY(bool value) { m_hasY = value; }
+
+ bool hasWidth() { return m_hasWidth; }
+ void setHasWidth(bool value) { m_hasWidth = value; }
+
+ bool hasHeight() { return m_hasHeight; }
+ void setHasHeight(bool value) { m_hasHeight = value; }
+
// The result is bounded by the size of the filter primitive to save resources
ImageBuffer* resultImage() { return m_effectBuffer.get(); }
- void setEffectBuffer(ImageBuffer* effectBuffer) { m_effectBuffer.set(effectBuffer); }
+ void setEffectBuffer(PassOwnPtr<ImageBuffer> effectBuffer) { m_effectBuffer = effectBuffer; }
+ FloatRect calculateUnionOfChildEffectSubregions(Filter*, FilterEffect*, FilterEffect*);
+ FloatRect calculateUnionOfChildEffectSubregions(Filter*, FilterEffect*);
+
+ GraphicsContext* getEffectContext();
+ FloatRect calculateDrawingRect(const FloatRect&);
+
+ virtual FloatRect uniteChildEffectSubregions(Filter* filter) { return filter->filterRegion(); }
+ virtual FloatRect calculateEffectRect(Filter*);
virtual void apply(Filter*) = 0;
virtual void dump() = 0;
+ virtual bool isSourceInput() { return false; }
+
virtual TextStream& externalRepresentation(TextStream&) const;
protected:
FilterEffect();
@@ -69,7 +96,13 @@ namespace WebCore {
bool m_widthBBoxMode : 1;
bool m_heightBBoxMode : 1;
+ bool m_hasX : 1;
+ bool m_hasY : 1;
+ bool m_hasWidth : 1;
+ bool m_hasHeight : 1;
+
FloatRect m_subRegion;
+ FloatRect m_unionOfChildEffectSubregions;
mutable OwnPtr<ImageBuffer> m_effectBuffer;
};
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceAlpha.h b/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceAlpha.h
index 21497aa..5341562 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceAlpha.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceAlpha.h
@@ -34,6 +34,8 @@ namespace WebCore {
static const AtomicString& effectName();
+ virtual bool isSourceInput() { return true; }
+ virtual FloatRect calculateEffectRect(Filter* filter) { return filter->sourceImageRect(); }
void apply(Filter*);
void dump();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.cpp
index 39d4810..023eeac 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.cpp
@@ -41,8 +41,24 @@ const AtomicString& SourceGraphic::effectName()
return s_effectName;
}
-void SourceGraphic::apply(Filter*)
+FloatRect SourceGraphic::calculateEffectRect(Filter* filter)
{
+ FloatRect clippedSourceRect = filter->sourceImageRect();
+ if (filter->sourceImageRect().x() < filter->filterRegion().x())
+ clippedSourceRect.setX(filter->filterRegion().x());
+ if (filter->sourceImageRect().y() < filter->filterRegion().y())
+ clippedSourceRect.setY(filter->filterRegion().y());
+ setSubRegion(clippedSourceRect);
+ return filter->filterRegion();
+}
+
+void SourceGraphic::apply(Filter* filter)
+{
+ GraphicsContext* filterContext = getEffectContext();
+ if (!filterContext)
+ return;
+
+ filterContext->drawImage(filter->sourceImage()->image(), IntPoint());
}
void SourceGraphic::dump()
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.h b/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.h
index 363fb97..0c8095e 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/SourceGraphic.h
@@ -24,8 +24,8 @@
#if ENABLE(FILTERS)
#include "FilterEffect.h"
-#include "PlatformString.h"
#include "Filter.h"
+#include "PlatformString.h"
namespace WebCore {
@@ -35,6 +35,8 @@ namespace WebCore {
static const AtomicString& effectName();
+ virtual bool isSourceInput() { return true; }
+ virtual FloatRect calculateEffectRect(Filter*);
void apply(Filter*);
void dump();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
index 50627b7..29e7718 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
@@ -32,16 +32,23 @@
namespace WebCore {
FontFallbackList::FontFallbackList()
- : m_familyIndex(0)
+ : m_pageZero(0)
+ , m_cachedPrimarySimpleFontData(0)
+ , m_fontSelector(0)
+ , m_familyIndex(0)
, m_pitch(UnknownPitch)
, m_loadingCustomFonts(false)
- , m_fontSelector(0)
, m_generation(0)
{
}
void FontFallbackList::invalidate(WTF::PassRefPtr<WebCore::FontSelector> fontSelector)
{
+ releaseFontData();
+ m_fontList.clear();
+ m_pageZero = 0;
+ m_pages.clear();
+ m_cachedPrimarySimpleFontData = 0;
m_familyIndex = 0;
m_pitch = UnknownPitch;
m_loadingCustomFonts = false;
@@ -58,7 +65,7 @@ void FontFallbackList::releaseFontData()
void FontFallbackList::determinePitch(const WebCore::Font* font) const
{
- const FontData* fontData = primaryFont(font);
+ const FontData* fontData = primaryFontData(font);
if (!fontData->isSegmented())
m_pitch = static_cast<const SimpleFontData*>(fontData)->pitch();
else {
@@ -101,7 +108,7 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne
const FontData* FontFallbackList::fontDataForCharacters(const WebCore::Font* font, const UChar*, int) const
{
- return primaryFont(font);
+ return primaryFontData(font);
}
void FontFallbackList::setPlatformFont(const WebCore::FontPlatformData& platformData)
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index ed7ac47..8503fb5 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -763,7 +763,6 @@ void GraphicsContext::clipPath(WindRule clipRule)
* RenderTheme handles drawing focus on widgets which
* need it.
*/
-Color focusRingColor() { return Color(0, 0, 0); }
void GraphicsContext::drawFocusRing(const Color& color)
{
if (paintingDisabled())
@@ -1229,7 +1228,7 @@ HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlpha
memset(bmpInfo.bmBits, 0, bufferSize);
}
-#if !PLATFORM(WIN_CE)
+#if !PLATFORM(WINCE)
// Make sure we can do world transforms.
SetGraphicsMode(bitmapDC, GM_ADVANCED);
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index cd32428..9a7fd75 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -217,9 +217,7 @@ void ImageDecoderQt::reset()
m_failed = false;
m_imageList.clear();
m_pixmapCache.clear();
- m_sizeAvailable = false;
m_loopCount = cAnimationNone;
- m_size = IntSize(-1, -1);
}
void ImageDecoderQt::setData(const IncomingData &data, bool allDataReceived)
@@ -247,8 +245,8 @@ void ImageDecoderQt::setData(const IncomingData &data, bool allDataReceived)
case ReadContext::ReadComplete:
// Did we read anything - try to set the size.
if (hasFirstImageHeader()) {
- m_sizeAvailable = true;
- m_size = m_imageList[0].m_image.size();
+ QSize imgSize = m_imageList[0].m_image.size();
+ setSize(imgSize.width(), imgSize.height());
if (readContext.reader()->supportsAnimation()) {
if (readContext.reader()->loopCount() != -1)
@@ -262,11 +260,11 @@ void ImageDecoderQt::setData(const IncomingData &data, bool allDataReceived)
}
-bool ImageDecoderQt::isSizeAvailable() const
+bool ImageDecoderQt::isSizeAvailable()
{
if (debugImageDecoderQt)
- qDebug() << " ImageDecoderQt::isSizeAvailable() returns" << m_sizeAvailable;
- return m_sizeAvailable;
+ qDebug() << " ImageDecoderQt::isSizeAvailable() returns" << ImageDecoder::isSizeAvailable();
+ return ImageDecoder::isSizeAvailable();
}
int ImageDecoderQt::frameCount() const
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h
index b8c3edd..ece0e48 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h
@@ -45,7 +45,7 @@ public:
typedef Vector<char> IncomingData;
virtual void setData(const IncomingData& data, bool allDataReceived);
- virtual bool isSizeAvailable() const;
+ virtual bool isSizeAvailable();
virtual int frameCount() const;
virtual int repetitionCount() const;
virtual RGBA32Buffer* frameBufferAtIndex(size_t index);
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
index c80d73b..896e3b8 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
@@ -36,7 +36,10 @@
#include <QMetaEnum>
#include <QUrl>
#include <QEvent>
-#include <phonon>
+
+#include <Phonon/AudioOutput>
+#include <Phonon/MediaObject>
+#include <Phonon/VideoWidget>
using namespace Phonon;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformationMatrix.h b/src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformationMatrix.h
index 12d69e2..36e4b70 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformationMatrix.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformationMatrix.h
@@ -303,6 +303,10 @@ public:
operator wxGraphicsMatrix() const;
#endif
+#if PLATFORM(WIN)
+ operator XFORM() const;
+#endif
+
private:
// multiply passed 2D point by matrix (assume z=0)
void multVecMatrix(double x, double y, double& dstX, double& dstY) const;