summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/glslang.y1
-rw-r--r--Source/WebCore/html/HTMLEmbedElement.cpp5
-rw-r--r--Source/WebCore/html/HTMLMediaElement.cpp5
-rw-r--r--Source/WebCore/page/GestureTapHighlighter.cpp10
-rw-r--r--Source/WebCore/platform/graphics/WidthIterator.h2
-rw-r--r--Source/WebCore/platform/graphics/qt/FontCacheQt.cpp3
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQStyle.cpp13
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQStyle.h2
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQt.cpp18
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQt.h4
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQtMobile.cpp2
-rw-r--r--Source/api.pri4
-rw-r--r--Source/widgetsapi.pri4
13 files changed, 33 insertions, 40 deletions
diff --git a/Source/ThirdParty/ANGLE/src/compiler/glslang.y b/Source/ThirdParty/ANGLE/src/compiler/glslang.y
index 3cad33500..b41e95ae5 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/glslang.y
+++ b/Source/ThirdParty/ANGLE/src/compiler/glslang.y
@@ -47,6 +47,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
%expect 1 /* One shift reduce conflict because of if | else */
%pure-parser
%parse-param {TParseContext* context}
+%lex-param {YYLEX_PARAM}
%union {
struct {
diff --git a/Source/WebCore/html/HTMLEmbedElement.cpp b/Source/WebCore/html/HTMLEmbedElement.cpp
index 9176d95be..ba830f041 100644
--- a/Source/WebCore/html/HTMLEmbedElement.cpp
+++ b/Source/WebCore/html/HTMLEmbedElement.cpp
@@ -28,6 +28,7 @@
#include "CSSPropertyNames.h"
#include "DocumentLoader.h"
#include "Frame.h"
+#include "FrameView.h"
#include "HTMLDocument.h"
#include "HTMLImageLoader.h"
#include "HTMLNames.h"
@@ -70,7 +71,9 @@ static inline RenderWidget* findWidgetRenderer(const Node* n)
RenderWidget* HTMLEmbedElement::renderWidgetForJSBindings() const
{
- document()->updateLayoutIgnorePendingStylesheets();
+ FrameView* view = document()->view();
+ if (!view || (!view->isInLayout() && !view->isPainting()))
+ document()->updateLayoutIgnorePendingStylesheets();
return findWidgetRenderer(this);
}
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index 3ef167106..d628548c5 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -3814,6 +3814,11 @@ void HTMLMediaElement::stop()
cancelPendingEventsAndCallbacks();
m_asyncEventQueue->close();
+
+ // Once an active DOM object has been stopped it can not be restarted, so we can deallocate
+ // the media player now. Note that userCancelledLoad will already have cleared the player
+ // if the media was not fully loaded. This handles all other cases.
+ m_player.clear();
}
void HTMLMediaElement::suspend(ReasonForSuspension why)
diff --git a/Source/WebCore/page/GestureTapHighlighter.cpp b/Source/WebCore/page/GestureTapHighlighter.cpp
index 6688d1501..74d67af65 100644
--- a/Source/WebCore/page/GestureTapHighlighter.cpp
+++ b/Source/WebCore/page/GestureTapHighlighter.cpp
@@ -199,8 +199,7 @@ Path absolutePathForRenderer(RenderObject* const o)
drawableRects.append(last);
// Clip the overflow rects if needed, before the ring path is formed to
- // ensure rounded highlight rects. This clipping has the problem with nested
- // divs with transforms, which could be resolved by proper Path::intersecting.
+ // ensure rounded highlight rects.
for (int i = drawableRects.size() - 1; i >= 0; --i) {
LayoutRect& ringRect = drawableRects.at(i);
LayoutPoint ringRectLocation = ringRect.location();
@@ -220,7 +219,12 @@ Path absolutePathForRenderer(RenderObject* const o)
currentRenderer->container(layerRenderer, &containerSkipped);
if (containerSkipped)
continue;
- ringRect.move(currentRenderer->offsetFromAncestorContainer(layerRenderer));
+ FloatQuad ringQuad = currentRenderer->localToContainerQuad(FloatQuad(ringRect), layerRenderer);
+ // Ignore quads that are not rectangular, since we can not currently highlight them nicely.
+ if (ringQuad.isRectilinear())
+ ringRect = ringQuad.enclosingBoundingBox();
+ else
+ ringRect = LayoutRect();
currentRenderer = layerRenderer;
ASSERT(layerRenderer->isBox());
diff --git a/Source/WebCore/platform/graphics/WidthIterator.h b/Source/WebCore/platform/graphics/WidthIterator.h
index 6dc1c206c..43007e80d 100644
--- a/Source/WebCore/platform/graphics/WidthIterator.h
+++ b/Source/WebCore/platform/graphics/WidthIterator.h
@@ -66,7 +66,7 @@ public:
return !(font.typesettingFeatures() & ~(Kerning | Ligatures));
#elif PLATFORM(QT) && QT_VERSION >= 0x050100
- return !(font.typesettingFeatures() & ~Kerning) && !font.isSmallCaps();
+ return !(font.typesettingFeatures() & ~Kerning) && !font.isSmallCaps() && !font.letterSpacing();
#else
return !font.typesettingFeatures();
#endif
diff --git a/Source/WebCore/platform/graphics/qt/FontCacheQt.cpp b/Source/WebCore/platform/graphics/qt/FontCacheQt.cpp
index e730d84bc..55a0f821d 100644
--- a/Source/WebCore/platform/graphics/qt/FontCacheQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/FontCacheQt.cpp
@@ -81,7 +81,8 @@ PassRefPtr<SimpleFontData> FontCache::getSimilarFontPlatformData(const Font& fon
PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescription& fontDescription, ShouldRetain shouldRetain)
{
const AtomicString fallbackFamily = QFont(fontDescription.family().family()).lastResortFamily();
- return getCachedFontData(fontDescription, fallbackFamily, false, shouldRetain);
+ FontPlatformData platformData(fontDescription, fallbackFamily);
+ return getCachedFontData(&platformData, shouldRetain);
}
void FontCache::getTraitsInFamily(const AtomicString&, Vector<unsigned>&)
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
index e55c75c6e..b2fa5d7da 100644
--- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
@@ -68,33 +68,30 @@ QSharedPointer<StylePainter> RenderThemeQStyle::getStylePainter(const PaintInfo&
}
StylePainterQStyle::StylePainterQStyle(RenderThemeQStyle* theme, const PaintInfo& paintInfo, RenderObject* renderObject)
- : StylePainter(theme, paintInfo)
+ : StylePainter(paintInfo.context)
, qStyle(theme->qStyle())
, appearance(NoControlPart)
{
- init(paintInfo.context ? paintInfo.context : 0);
+ setupStyleOption();
if (renderObject)
appearance = theme->initializeCommonQStyleOptions(styleOption, renderObject);
}
StylePainterQStyle::StylePainterQStyle(ScrollbarThemeQStyle* theme, GraphicsContext* context)
- : StylePainter()
+ : StylePainter(context)
, qStyle(theme->qStyle())
, appearance(NoControlPart)
{
- init(context);
+ setupStyleOption();
}
-void StylePainterQStyle::init(GraphicsContext* context)
+void StylePainterQStyle::setupStyleOption()
{
- painter = static_cast<QPainter*>(context->platformContext());
if (QObject* widget = qStyle->widgetForPainter(painter)) {
styleOption.palette = widget->property("palette").value<QPalette>();
styleOption.rect = widget->property("rect").value<QRect>();
styleOption.direction = static_cast<Qt::LayoutDirection>(widget->property("layoutDirection").toInt());
}
-
- StylePainter::init(context);
}
PassRefPtr<RenderTheme> RenderThemeQStyle::create(Page* page)
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.h b/Source/WebCore/platform/qt/RenderThemeQStyle.h
index 08c18b971..6027f16e5 100644
--- a/Source/WebCore/platform/qt/RenderThemeQStyle.h
+++ b/Source/WebCore/platform/qt/RenderThemeQStyle.h
@@ -148,7 +148,7 @@ public:
{ qStyle->paintScrollBar(painter, styleOption); }
private:
- void init(GraphicsContext*);
+ void setupStyleOption();
Q_DISABLE_COPY(StylePainterQStyle)
};
diff --git a/Source/WebCore/platform/qt/RenderThemeQt.cpp b/Source/WebCore/platform/qt/RenderThemeQt.cpp
index e09b50dbe..4f3f3ad10 100644
--- a/Source/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQt.cpp
@@ -873,22 +873,10 @@ String RenderThemeQt::fileListNameForWidth(const FileList* fileList, const Font&
return string;
}
-StylePainter::StylePainter(RenderThemeQt* theme, const PaintInfo& paintInfo)
- : painter(0)
+StylePainter::StylePainter(GraphicsContext* context)
+ : painter(context->platformContext())
{
- Q_UNUSED(theme);
- ASSERT(paintInfo.context);
- init(paintInfo.context);
-}
-
-StylePainter::StylePainter()
- : painter(0)
-{
-}
-
-void StylePainter::init(GraphicsContext* context)
-{
- painter = static_cast<QPainter*>(context->platformContext());
+ ASSERT(context);
if (painter) {
// the styles often assume being called with a pristine painter where no brush is set,
diff --git a/Source/WebCore/platform/qt/RenderThemeQt.h b/Source/WebCore/platform/qt/RenderThemeQt.h
index f16b50f33..cac006942 100644
--- a/Source/WebCore/platform/qt/RenderThemeQt.h
+++ b/Source/WebCore/platform/qt/RenderThemeQt.h
@@ -190,9 +190,7 @@ public:
QPainter* painter;
protected:
- StylePainter(RenderThemeQt*, const PaintInfo&);
- StylePainter();
- void init(GraphicsContext*);
+ StylePainter(GraphicsContext*);
private:
QBrush m_previousBrush;
diff --git a/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp b/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp
index 702eda4cd..1eee832cd 100644
--- a/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp
@@ -209,7 +209,7 @@ QPalette RenderThemeQtMobile::colorPalette() const
}
StylePainterMobile::StylePainterMobile(RenderThemeQtMobile* theme, const PaintInfo& paintInfo)
- : StylePainter(theme, paintInfo)
+ : StylePainter(paintInfo.context)
{
m_previousSmoothPixmapTransform = painter->testRenderHint(QPainter::SmoothPixmapTransform);
if (!m_previousSmoothPixmapTransform)
diff --git a/Source/api.pri b/Source/api.pri
index 5e09f3d4d..628a49ba1 100644
--- a/Source/api.pri
+++ b/Source/api.pri
@@ -33,9 +33,7 @@ CONFIG += creating_module
# the QtWebKit library, and will end up in the library's prl file.
QT_API_DEPENDS = core gui network
-# We want the QtWebKit API forwarding includes to live in the root build dir.
-MODULE_BASE_DIR = $$_PRO_FILE_PWD_
-MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
+MODULE_SYNCQT_DIR = $$_PRO_FILE_PWD_
QMAKE_DOCS = $$PWD/qtwebkit.qdocconf
diff --git a/Source/widgetsapi.pri b/Source/widgetsapi.pri
index 50262742c..9504d91f2 100644
--- a/Source/widgetsapi.pri
+++ b/Source/widgetsapi.pri
@@ -48,9 +48,7 @@ WEBKIT += javascriptcore wtf webcore
MODULE = webkitwidgets
-# We want the QtWebKit API forwarding includes to live in the root build dir.
-MODULE_BASE_DIR = $$_PRO_FILE_PWD_
-MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
+MODULE_SYNCQT_DIR = $$_PRO_FILE_PWD_
# This is the canonical list of dependencies for the public API of
# the QtWebKitWidgets library, and will end up in the library's prl file.