summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp45
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp3
-rw-r--r--Source/ThirdParty/leveldb/Target.pri6
-rw-r--r--Source/WebCore/platform/graphics/GraphicsContext.h1
-rw-r--r--Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp33
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp10
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage_p.h2
-rw-r--r--Source/WebKit/qt/docs/qtwebkit.qdoc1
-rw-r--r--Source/WebKit/qt/docs/webview.pngbin0 -> 94324 bytes
-rw-r--r--Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp60
-rw-r--r--Source/api.pri2
-rw-r--r--Source/sync.profile1
-rw-r--r--Source/widgetsapi.pri7
-rw-r--r--Tools/qmake/mkspecs/features/default_pre.prf2
15 files changed, 118 insertions, 56 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
index de4ca9674..5fc35cb73 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
@@ -3870,7 +3870,8 @@ void SpeculativeJIT::compile(Node* node)
break;
}
- if (isCellSpeculation(node->child1()->prediction())) {
+ switch (node->child1().useKind()) {
+ case CellUse: {
SpeculateCellOperand base(this, node->child1());
GPRTemporary resultTag(this, base);
GPRTemporary resultPayload(this);
@@ -3886,23 +3887,31 @@ void SpeculativeJIT::compile(Node* node)
jsValueResult(resultTagGPR, resultPayloadGPR, node, UseChildrenCalledExplicitly);
break;
}
-
- JSValueOperand base(this, node->child1());
- GPRTemporary resultTag(this, base);
- GPRTemporary resultPayload(this);
-
- GPRReg baseTagGPR = base.tagGPR();
- GPRReg basePayloadGPR = base.payloadGPR();
- GPRReg resultTagGPR = resultTag.gpr();
- GPRReg resultPayloadGPR = resultPayload.gpr();
-
- base.use();
-
- JITCompiler::Jump notCell = m_jit.branch32(JITCompiler::NotEqual, baseTagGPR, TrustedImm32(JSValue::CellTag));
-
- cachedGetById(node->codeOrigin, baseTagGPR, basePayloadGPR, resultTagGPR, resultPayloadGPR, node->identifierNumber(), notCell);
-
- jsValueResult(resultTagGPR, resultPayloadGPR, node, UseChildrenCalledExplicitly);
+
+ case UntypedUse: {
+ JSValueOperand base(this, node->child1());
+ GPRTemporary resultTag(this, base);
+ GPRTemporary resultPayload(this);
+
+ GPRReg baseTagGPR = base.tagGPR();
+ GPRReg basePayloadGPR = base.payloadGPR();
+ GPRReg resultTagGPR = resultTag.gpr();
+ GPRReg resultPayloadGPR = resultPayload.gpr();
+
+ base.use();
+
+ JITCompiler::Jump notCell = m_jit.branch32(JITCompiler::NotEqual, baseTagGPR, TrustedImm32(JSValue::CellTag));
+
+ cachedGetById(node->codeOrigin, baseTagGPR, basePayloadGPR, resultTagGPR, resultPayloadGPR, node->identifierNumber(), notCell);
+
+ jsValueResult(resultTagGPR, resultPayloadGPR, node, UseChildrenCalledExplicitly);
+ break;
+ }
+
+ default:
+ RELEASE_ASSERT_NOT_REACHED();
+ break;
+ }
break;
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp b/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
index 51180aff6..42e8998c5 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
@@ -171,7 +171,8 @@ TFunction::~TFunction()
TSymbolTableLevel::~TSymbolTableLevel()
{
for (tLevel::iterator it = level.begin(); it != level.end(); ++it)
- delete (*it).second;
+ if ((*it).first == (*it).second->getMangledName())
+ delete (*it).second;
}
//
diff --git a/Source/ThirdParty/leveldb/Target.pri b/Source/ThirdParty/leveldb/Target.pri
index abfde15eb..e071b6d5c 100644
--- a/Source/ThirdParty/leveldb/Target.pri
+++ b/Source/ThirdParty/leveldb/Target.pri
@@ -109,8 +109,10 @@ linux: DEFINES += OS_LINUX
freebsd*: DEFINES += OS_FREEBSD
gcc {
- QMAKE_CXXFLAGS_WARN_ON += -Wno-error=unused-but-set-variable
- QMAKE_CXXFLAGS += -Wno-error=unused-but-set-variable
+ greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 5) {
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-error=unused-but-set-variable
+ QMAKE_CXXFLAGS += -Wno-error=unused-but-set-variable
+ }
}
QT += core
diff --git a/Source/WebCore/platform/graphics/GraphicsContext.h b/Source/WebCore/platform/graphics/GraphicsContext.h
index 9c5f4da19..2fd032f02 100644
--- a/Source/WebCore/platform/graphics/GraphicsContext.h
+++ b/Source/WebCore/platform/graphics/GraphicsContext.h
@@ -482,6 +482,7 @@ namespace WebCore {
#if PLATFORM(QT)
void pushTransparencyLayerInternal(const QRect&, qreal, QPixmap&);
+ void popTransparencyLayerInternal();
void takeOwnershipOfPlatformContext();
#endif
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index ffd88804a..f62ac6400 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -391,7 +391,7 @@ void GraphicsContext::restorePlatformState()
{
if (!m_data->layers.isEmpty() && !m_data->layers.top()->alphaMask.isNull())
if (!--m_data->layers.top()->saveCounter)
- endPlatformTransparencyLayer();
+ popTransparencyLayerInternal();
m_data->p()->restore();
}
@@ -1269,18 +1269,37 @@ void GraphicsContext::beginPlatformTransparencyLayer(float opacity)
++m_data->layerCount;
}
+void GraphicsContext::popTransparencyLayerInternal()
+{
+ TransparencyLayer* layer = m_data->layers.pop();
+ ASSERT(!layer->alphaMask.isNull());
+ ASSERT(layer->saveCounter == 0);
+ layer->painter.resetTransform();
+ layer->painter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
+ layer->painter.drawPixmap(QPoint(), layer->alphaMask);
+ layer->painter.end();
+
+ QPainter* p = m_data->p();
+ p->save();
+ p->resetTransform();
+ p->setOpacity(layer->opacity);
+ p->drawPixmap(layer->offset, layer->pixmap);
+ p->restore();
+
+ delete layer;
+}
+
void GraphicsContext::endPlatformTransparencyLayer()
{
if (paintingDisabled())
return;
+ while ( ! m_data->layers.top()->alphaMask.isNull() ){
+ --m_data->layers.top()->saveCounter;
+ popTransparencyLayerInternal();
+ }
TransparencyLayer* layer = m_data->layers.pop();
- if (!layer->alphaMask.isNull()) {
- layer->painter.resetTransform();
- layer->painter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
- layer->painter.drawPixmap(QPoint(), layer->alphaMask);
- } else
- --m_data->layerCount; // see the comment for layerCount
+ --m_data->layerCount; // see the comment for layerCount
layer->painter.end();
QPainter* p = m_data->p();
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
index 5385b05d9..dafb0e287 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
@@ -924,9 +924,13 @@ QWebHitTestResultPrivate::~QWebHitTestResultPrivate()
QWebElement QWebHitTestResultPrivate::elementForInnerNode() const
{
- if (!innerNonSharedNode || !innerNonSharedNode->isElementNode())
- return QWebElement();
- return QWebElement(toElement(innerNonSharedNode));
+ // Uses the similar logic as HitTestResult::innerElement().
+ for (Node* node = innerNonSharedNode; node; node = node->parentNode()) {
+ if (node->isElementNode())
+ return QWebElement(toElement(node));
+ }
+
+ return QWebElement();
}
// ======================================================
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage_p.h b/Source/WebKit/qt/WidgetApi/qwebpage_p.h
index 8ba6c4c40..604c0a540 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage_p.h
+++ b/Source/WebKit/qt/WidgetApi/qwebpage_p.h
@@ -199,7 +199,7 @@ public:
QAction *actions[QWebPage::WebActionCount];
- QWindow* window;
+ QPointer <QWindow> window;
QWidget* inspectorFrontend;
QWebInspector* inspector;
bool inspectorIsInternalOnly; // True if created through the Inspect context menu action
diff --git a/Source/WebKit/qt/docs/qtwebkit.qdoc b/Source/WebKit/qt/docs/qtwebkit.qdoc
index e36cdeb62..f8f22fbd9 100644
--- a/Source/WebKit/qt/docs/qtwebkit.qdoc
+++ b/Source/WebKit/qt/docs/qtwebkit.qdoc
@@ -20,6 +20,7 @@
/*!
\qmlmodule QtWebKit 3.0
\title Qt WebKit QML Types
+ \ingroup qmlmodules
\brief Provides QML types for rendering web content within a QML application
The QML types can be imported into your applciation using the following
diff --git a/Source/WebKit/qt/docs/webview.png b/Source/WebKit/qt/docs/webview.png
new file mode 100644
index 000000000..bde3eb457
--- /dev/null
+++ b/Source/WebKit/qt/docs/webview.png
Binary files differ
diff --git a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index f852149d4..f792befcd 100644
--- a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -664,6 +664,7 @@ void tst_QWebFrame::hitTestContent()
QCOMPARE(result.linkText(), QString("link text"));
QWebElement link = result.linkElement();
QCOMPARE(link.attribute("target"), QString("_foo"));
+ QCOMPARE(result.element().tagName(), QString("A"));
}
void tst_QWebFrame::baseUrl_data()
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
index a8dc93c98..a46b6972e 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
@@ -1584,19 +1584,49 @@ QQuickWebPage* QQuickWebViewExperimental::page()
\page qtwebkit-index.html
\title Qt WebKit
- The Qt WebKit module provides the WebView API which allows QML applications
+ The Qt WebKit module provides the WebView API, which allows QML applications
to render regions of dynamic web content. A \e{WebView} component may share
the screen with other QML components or encompass the full screen as
specified within the QML application.
- QML WebView version 3.0 is incompatible with previous QML \l
- WebView API versions. It allows an
- application to load pages into the WebView, either by URL or with
- an HTML string, and navigate within session history. By default,
- links to different pages load within the same WebView, but applications
- may intercept requests to delegate links to other functions.
+ \section1 Getting Started
- The following sample QML application loads a web page, responds to session
+ To use WebView in your QML document, add the following import statement:
+
+ \code
+ import QtWebKit 3.0
+ \endcode
+
+ \note Qt WebKit 3.0 is incompatible with previous Qt WebKit versions.
+
+ \section1 Examples
+
+ There are several Qt WebKit examples located in the
+ \l{Qt WebKit Examples} page.
+
+ \section1 See Also
+
+ \list
+ \li \l {Qt WebKit QML Types}{QML Types}
+ \endlist
+
+*/
+
+
+/*!
+ \qmltype WebView
+ \instantiates QQuickWebView
+ \inqmlmodule QtWebKit
+ \brief A WebView renders web content within a QML application.
+
+ \image webview.png
+
+ WebView allows an application to load pages either by URL or an HTML
+ string, and navigate within the session history. By default, links to
+ different pages are loaded within the same WebView, but applications
+ can choose to delegate those links to other functions.
+
+ The following example loads a web page, responds to session
history context, and intercepts requests for external links. It also makes
use of \l ScrollView from \l {Qt Quick Controls} to add scroll bars for
the content area.
@@ -1626,20 +1656,6 @@ QQuickWebPage* QQuickWebViewExperimental::page()
}
}
\endcode
-
- \section1 Examples
-
- There are several Qt WebKit examples located in the
- \l{Qt WebKit Examples} page.
-
-*/
-
-
-/*!
- \qmltype WebView
- \instantiates QQuickWebView
- \inqmlmodule QtWebKit 3.0
- \brief A WebView renders web content within a QML application
*/
QQuickWebView::QQuickWebView(QQuickItem* parent)
diff --git a/Source/api.pri b/Source/api.pri
index fb6ad9136..e0a09e829 100644
--- a/Source/api.pri
+++ b/Source/api.pri
@@ -70,6 +70,8 @@ win* {
BASE_TARGET = $$TARGET
+CMAKE_MODULE_TESTS = $$ROOT_WEBKIT_DIR/Source/WebKit/qt/tests/cmake
+
load(qt_module)
# Make sure the install_name of the QtWebKit library point to webkit
diff --git a/Source/sync.profile b/Source/sync.profile
index 801c563b6..9eb0fe910 100644
--- a/Source/sync.profile
+++ b/Source/sync.profile
@@ -19,6 +19,7 @@
#
%dependencies = (
"qtbase" => "",
+ "qtxmlpatterns" => "",
"qtdeclarative" => "",
"qtlocation" => "",
"qtmultimedia" => "",
diff --git a/Source/widgetsapi.pri b/Source/widgetsapi.pri
index a92fbeac1..e4fa8230f 100644
--- a/Source/widgetsapi.pri
+++ b/Source/widgetsapi.pri
@@ -36,7 +36,6 @@ contains(CONFIG, texmap): DEFINES += WTF_USE_TEXTURE_MAPPER=1
use?(PLUGIN_BACKEND_XLIB): PKGCONFIG += x11
QT += network widgets widgets-private
-have?(QTQUICK): QT += quick
have?(QTPRINTSUPPORT): QT += printsupport
use?(TEXTURE_MAPPER_GL)|enable?(WEBGL) {
@@ -59,6 +58,10 @@ MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
# the QtWebKitWidgets library, and will end up in the library's prl file.
QT_API_DEPENDS = core gui widgets network webkit
+# We load the relevant modules here, so that the effects of each module
+# on the QT variable can be picked up when we later load(qt_module).
+load(webkit_modules)
+
# ---------------- Custom developer-build handling -------------------
#
# The assumption for Qt developer builds is that the module file
@@ -72,6 +75,8 @@ QT_API_DEPENDS = core gui widgets network webkit
BASE_TARGET = $$TARGET
+CMAKE_MODULE_TESTS = $$ROOT_WEBKIT_DIR/Source/WebKit/qt/tests/cmake
+
load(qt_module)
# Make sure the install_name of the QtWebKit library point to webkit
diff --git a/Tools/qmake/mkspecs/features/default_pre.prf b/Tools/qmake/mkspecs/features/default_pre.prf
index 38443a4f3..69f039387 100644
--- a/Tools/qmake/mkspecs/features/default_pre.prf
+++ b/Tools/qmake/mkspecs/features/default_pre.prf
@@ -95,7 +95,7 @@ CONFIG += include_webinspector
contains(QT_CONFIG, c++11): CONFIG += c++11
# Limit the creation of thin archives to Linux, since only GNU's ar supports it.
-!debug_and_release:linux-g++*: CONFIG += gnu_thin_archives
+!debug_and_release:linux: CONFIG += gnu_thin_archives
# Pick up Qt's defaults for debug/release/debug_and_release
if(win32|mac):!macx-xcode {