summaryrefslogtreecommitdiffstats
path: root/WebKit/qt/Api
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-04 11:41:34 +0100
committerSteve Block <steveblock@google.com>2010-08-09 12:04:44 +0100
commitdb14019a23d96bc8a444b6576a5da8bd1cfbc8b0 (patch)
tree9f793c5b0f5e1f2aca8247158920e2c4bf962bbf /WebKit/qt/Api
parentbf916837aa84f1e4b00e6ed6268516c2acd27545 (diff)
downloadexternal_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.zip
external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.tar.gz
external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.tar.bz2
Merge WebKit at r64523 : Initial merge by git.
Change-Id: Ibb796c6802e757b1d9b40f58205cfbe4da95fcd4
Diffstat (limited to 'WebKit/qt/Api')
-rw-r--r--WebKit/qt/Api/qgraphicswebview.cpp7
-rw-r--r--WebKit/qt/Api/qwebframe.cpp7
-rw-r--r--WebKit/qt/Api/qwebpage.cpp9
-rw-r--r--WebKit/qt/Api/qwebpage_p.h2
-rw-r--r--WebKit/qt/Api/qwebview.cpp7
5 files changed, 19 insertions, 13 deletions
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index 8a94c9b..53c1494 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -711,7 +711,12 @@ void QGraphicsWebView::load(const QNetworkRequest& request,
through the charset attribute of the HTML script tag. Alternatively, the
encoding can also be specified by the web server.
- \sa load(), setContent(), QWebFrame::toHtml()
+ This is a convenience function equivalent to setContent(html, "text/html", baseUrl).
+
+ \warning This function works only for HTML, for other mime types (i.e. XHTML, SVG)
+ setContent() should be used instead.
+
+ \sa load(), setContent(), QWebFrame::toHtml(), QWebFrame::setContent()
*/
void QGraphicsWebView::setHtml(const QString& html, const QUrl& baseUrl)
{
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index f10d5b4..e90367e 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -793,9 +793,14 @@ void QWebFrame::load(const QNetworkRequest &req,
script can be specified through the charset attribute of the HTML script tag. It is also possible
for the encoding to be specified by web server.
+ This is a convenience function equivalent to setContent(html, "text/html", baseUrl).
+
\note This method will not affect session or global history for the frame.
- \sa toHtml(), setContent()
+ \warning This function works only for HTML, for other mime types (i.e. XHTML, SVG)
+ setContent() should be used instead.
+
+ \sa toHtml(), setContent(), load()
*/
void QWebFrame::setHtml(const QString &html, const QUrl &baseUrl)
{
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index fa49293..a8bd06a 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -1218,14 +1218,7 @@ typedef struct {
void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event)
{
if (event->propertyName() == "_q_viewMode") {
- QString mode = q->property("_q_viewMode").toString();
- if (mode != viewMode) {
- viewMode = mode;
- WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
- WebCore::FrameView* view = frame->view();
- frame->document()->updateStyleSelector();
- view->layout();
- }
+ page->setViewMode(Page::stringToViewMode(q->property("_q_viewMode").toString()));
} else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") {
int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt();
q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize);
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index 44ceb87..cf4ab88 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -201,8 +201,6 @@ public:
QWebInspector* inspector;
bool inspectorIsInternalOnly; // True if created through the Inspect context menu action
Qt::DropAction m_lastDropAction;
-
- QString viewMode;
static bool drtRun;
};
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
index 3daa045..773c79a 100644
--- a/WebKit/qt/Api/qwebview.cpp
+++ b/WebKit/qt/Api/qwebview.cpp
@@ -470,7 +470,12 @@ void QWebView::load(const QNetworkRequest &request,
through the charset attribute of the HTML script tag. Alternatively, the
encoding can also be specified by the web server.
- \sa load(), setContent(), QWebFrame::toHtml()
+ This is a convenience function equivalent to setContent(html, "text/html", baseUrl).
+
+ \warning This function works only for HTML, for other mime types (i.e. XHTML, SVG)
+ setContent() should be used instead.
+
+ \sa load(), setContent(), QWebFrame::toHtml(), QWebFrame::setContent()
*/
void QWebView::setHtml(const QString &html, const QUrl &baseUrl)
{