<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[35716] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/35716">35716</a></dd>
<dt>Author</dt> <dd>hausmann@webkit.org</dd>
<dt>Date</dt> <dd>2008-08-13 06:43:34 -0700 (Wed, 13 Aug 2008)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebCore:

    2008-08-13  Simon Hausmann  &lt;hausmann@webkit.org&gt;

            Reviewed by Holger.

            Initialize m_zoomsTextOnly in the Settings constructor.

WebKit/qt:

    2008-08-13  Simon Hausmann  &lt;hausmann@webkit.org&gt;

            Reviewed by Holger.

            Based on patch by Siraj razick &lt;siraj.razick@collabora.co.uk&gt;

            https://bugs.webkit.org/show_bug.cgi?id=19125

            Added functions to get/set the zoom factor.

            Added a QWebFrame/QWebView::zoomFactor as well as a boolean
            ZoomTextOnly attribute in QWebSettings.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorepageSettingscpp">trunk/WebCore/page/Settings.cpp</a></li>
<li><a href="#trunkWebKitqtApiqwebframecpp">trunk/WebKit/qt/Api/qwebframe.cpp</a></li>
<li><a href="#trunkWebKitqtApiqwebframeh">trunk/WebKit/qt/Api/qwebframe.h</a></li>
<li><a href="#trunkWebKitqtApiqwebsettingscpp">trunk/WebKit/qt/Api/qwebsettings.cpp</a></li>
<li><a href="#trunkWebKitqtApiqwebsettingsh">trunk/WebKit/qt/Api/qwebsettings.h</a></li>
<li><a href="#trunkWebKitqtApiqwebviewcpp">trunk/WebKit/qt/Api/qwebview.cpp</a></li>
<li><a href="#trunkWebKitqtApiqwebviewh">trunk/WebKit/qt/Api/qwebview.h</a></li>
<li><a href="#trunkWebKitqtChangeLog">trunk/WebKit/qt/ChangeLog</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebCore/ChangeLog        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2008-08-13  Simon Hausmann  &lt;hausmann@webkit.org&gt;
+
+        Reviewed by Holger.
+
+        Initialize m_zoomsTextOnly in the Settings constructor.
+
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+
</ins><span class="cx"> 2008-08-13  Brad Hughes &lt;bhughes@trolltech.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Simon.
</span></span></pre></div>
<a id="trunkWebCorepageSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/Settings.cpp (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/Settings.cpp        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebCore/page/Settings.cpp        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -78,6 +78,7 @@
</span><span class="cx">     , m_offlineWebApplicationCacheEnabled(false)
</span><span class="cx">     , m_rangeMutationDisabledForOldAppleMail(false)
</span><span class="cx">     , m_shouldPaintCustomScrollbars(false)
</span><ins>+    , m_zoomsTextOnly(false)
</ins><span class="cx">     , m_enforceCSSMIMETypeInStrictMode(true)
</span><span class="cx"> {
</span><span class="cx">     // A Frame may not have been created yet, so we initialize the AtomicString 
</span></span></pre></div>
<a id="trunkWebKitqtApiqwebframecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/qt/Api/qwebframe.cpp (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/qt/Api/qwebframe.cpp        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebKit/qt/Api/qwebframe.cpp        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -149,8 +149,8 @@
</span><span class="cx">     Additionally, a frame may also specify an icon, which can be accessed
</span><span class="cx">     using the icon() property. If the title or the icon changes, the
</span><span class="cx">     corresponding titleChanged() and iconChanged() signals will be emitted.
</span><del>-    The textSizeMultiplier() property can be used to change the overall size
-    of the text displayed in the frame.
</del><ins>+    The zoomFactor() property can be used to change the overall size
+    of the content displayed in the frame.
</ins><span class="cx"> 
</span><span class="cx">     QWebFrame objects are created and controlled by the web page. You
</span><span class="cx">     can connect to the web page's \l{QWebPage::}{frameCreated()} signal
</span><span class="lines">@@ -686,6 +686,13 @@
</span><span class="cx"> /*!
</span><span class="cx">   \property QWebFrame::textSizeMultiplier
</span><span class="cx">   \brief the scaling factor for all text in the frame
</span><ins>+  \obsolete
+
+  Use setZoomFactor instead, in combination with the
+  ZoomTextOnly attribute in QWebSettings.
+
+  \note Setting this property also enables the
+  ZoomTextOnly attribute in QWebSettings.
</ins><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> void QWebFrame::setTextSizeMultiplier(qreal factor)
</span><span class="lines">@@ -699,6 +706,22 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /*!
</span><ins>+    \property QWebFrame::zoomFactor
+    \since 4.5
+    \brief the zoom factor for the frame
+*/
+
+void QWebFrame::setZoomFactor(qreal factor)
+{
+    d-&gt;frame-&gt;setZoomFactor(factor, d-&gt;frame-&gt;isZoomFactorTextOnly());
+}
+
+qreal QWebFrame::zoomFactor() const
+{
+    return d-&gt;frame-&gt;zoomFactor();
+}
+
+/*!
</ins><span class="cx">     Returns the position of the frame relative to it's parent frame.
</span><span class="cx"> */
</span><span class="cx"> QPoint QWebFrame::pos() const
</span></span></pre></div>
<a id="trunkWebKitqtApiqwebframeh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/qt/Api/qwebframe.h (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/qt/Api/qwebframe.h        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebKit/qt/Api/qwebframe.h        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -96,7 +96,9 @@
</span><span class="cx"> class QWEBKIT_EXPORT QWebFrame : public QObject
</span><span class="cx"> {
</span><span class="cx">     Q_OBJECT
</span><del>-    Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier)
</del><ins>+    Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false)
+    Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor)
+    Q_PROPERTY(bool zoomTextOnly READ zoomTextOnly WRITE setZoomTextOnly)
</ins><span class="cx">     Q_PROPERTY(QString title READ title)
</span><span class="cx">     Q_PROPERTY(QUrl url READ url WRITE setUrl)
</span><span class="cx">     Q_PROPERTY(QIcon icon READ icon)
</span><span class="lines">@@ -154,6 +156,12 @@
</span><span class="cx">     void setTextSizeMultiplier(qreal factor);
</span><span class="cx">     qreal textSizeMultiplier() const;
</span><span class="cx"> 
</span><ins>+    qreal zoomFactor() const;
+    void setZoomFactor(qreal factor);
+
+    bool zoomTextOnly() const;
+    void setZoomTextOnly(bool textOnly);
+
</ins><span class="cx">     QPoint pos() const;
</span><span class="cx">     QRect geometry() const;
</span><span class="cx">     QSize contentsSize() const;
</span></span></pre></div>
<a id="trunkWebKitqtApiqwebsettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/qt/Api/qwebsettings.cpp (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/qt/Api/qwebsettings.cpp        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebKit/qt/Api/qwebsettings.cpp        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -155,6 +155,10 @@
</span><span class="cx"> 
</span><span class="cx">         QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global-&gt;userStyleSheetLocation;
</span><span class="cx">         settings-&gt;setUserStyleSheetLocation(WebCore::KURL(location));
</span><ins>+
+        value = attributes.value(QWebSettings::ZoomTextOnly,
+                                 global-&gt;attributes.value(QWebSettings::ZoomTextOnly));
+        settings-&gt;setZoomsTextOnly(value);
</ins><span class="cx">     } else {
</span><span class="cx">         QList&lt;QWebSettingsPrivate *&gt; settings = *::allSettings();
</span><span class="cx">         for (int i = 0; i &lt; settings.count(); ++i)
</span><span class="lines">@@ -260,6 +264,8 @@
</span><span class="cx">     which shows the WebKit WebInspector for web site debugging.
</span><span class="cx">     \value LinksIncludedInFocusChain Specifies whether hyperlinks should be
</span><span class="cx">         included in the keyboard focus chain.
</span><ins>+    \value ZoomTextOnly Specifies whether the zoom factor on a frame applies to
+        only the text or all content.
</ins><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> /*!
</span><span class="lines">@@ -284,6 +290,7 @@
</span><span class="cx">     d-&gt;attributes.insert(QWebSettings::AutoLoadImages, true);
</span><span class="cx">     d-&gt;attributes.insert(QWebSettings::JavascriptEnabled, true);
</span><span class="cx">     d-&gt;attributes.insert(QWebSettings::LinksIncludedInFocusChain, true);
</span><ins>+    d-&gt;attributes.insert(QWebSettings::ZoomTextOnly, false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /*!
</span></span></pre></div>
<a id="trunkWebKitqtApiqwebsettingsh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/qt/Api/qwebsettings.h (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/qt/Api/qwebsettings.h        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebKit/qt/Api/qwebsettings.h        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -58,7 +58,8 @@
</span><span class="cx">         JavascriptCanOpenWindows,
</span><span class="cx">         JavascriptCanAccessClipboard,
</span><span class="cx">         DeveloperExtrasEnabled,
</span><del>-        LinksIncludedInFocusChain
</del><ins>+        LinksIncludedInFocusChain,
+        ZoomTextOnly
</ins><span class="cx">     };
</span><span class="cx">     enum WebGraphic {
</span><span class="cx">         MissingImageGraphic,
</span></span></pre></div>
<a id="trunkWebKitqtApiqwebviewcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/qt/Api/qwebview.cpp (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/qt/Api/qwebview.cpp        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebKit/qt/Api/qwebview.cpp        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -473,8 +473,31 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /*!
</span><ins>+    \property QWebView::zoomFactor
+    \since 4.5
+    \brief the zoom factor for the view
+*/
+
+void QWebView::setZoomFactor(qreal factor)
+{
+    page()-&gt;mainFrame()-&gt;setZoomFactor(factor);
+}
+
+qreal QWebView::zoomFactor() const
+{
+    return page()-&gt;mainFrame()-&gt;zoomFactor();
+}
+
+/*!
</ins><span class="cx">   \property QWebView::textSizeMultiplier
</span><span class="cx">   \brief the scaling factor for all text in the frame
</span><ins>+  \obsolete
+
+  Use setZoomFactor instead, in combination with the
+  ZoomTextOnly attribute in QWebSettings.
+
+  \note Setting this property also enables the
+  ZoomTextOnly attribute in QWebSettings.
</ins><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> void QWebView::setTextSizeMultiplier(qreal factor)
</span></span></pre></div>
<a id="trunkWebKitqtApiqwebviewh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/qt/Api/qwebview.h (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/qt/Api/qwebview.h        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebKit/qt/Api/qwebview.h        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -48,7 +48,8 @@
</span><span class="cx">     Q_PROPERTY(QString selectedText READ selectedText)
</span><span class="cx">     Q_PROPERTY(bool modified READ isModified)
</span><span class="cx">     //Q_PROPERTY(Qt::TextInteractionFlags textInteractionFlags READ textInteractionFlags WRITE setTextInteractionFlags)
</span><del>-    Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier)
</del><ins>+    Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false)
+    Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor)
</ins><span class="cx"> public:
</span><span class="cx">     explicit QWebView(QWidget *parent = 0);
</span><span class="cx">     virtual ~QWebView();
</span><span class="lines">@@ -92,6 +93,9 @@
</span><span class="cx"> 
</span><span class="cx">     QSize sizeHint() const;
</span><span class="cx"> 
</span><ins>+    qreal zoomFactor() const;
+    void setZoomFactor(qreal factor);
+
</ins><span class="cx">     void setTextSizeMultiplier(qreal factor);
</span><span class="cx">     qreal textSizeMultiplier() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebKitqtChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/qt/ChangeLog (35715 => 35716)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/qt/ChangeLog        2008-08-13 13:33:03 UTC (rev 35715)
+++ trunk/WebKit/qt/ChangeLog        2008-08-13 13:43:34 UTC (rev 35716)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2008-08-13  Simon Hausmann  &lt;hausmann@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        Reviewed by Holger.
+
+        Based on patch by Siraj razick &lt;siraj.razick@collabora.co.uk&gt;
+
+        https://bugs.webkit.org/show_bug.cgi?id=19125
+
+        Added functions to get/set the zoom factor.
+
+        Added a QWebFrame/QWebView::zoomFactor as well as a boolean
+        ZoomTextOnly attribute in QWebSettings.
+
+        * Api/qwebframe.cpp:
+        (QWebFrame::setZoomFactor):
+        (QWebFrame::zoomFactor):
+        * Api/qwebframe.h:
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply):
+        (QWebSettings::QWebSettings):
+        * Api/qwebsettings.h:
+        * Api/qwebview.cpp:
+        (QWebView::setZoomFactor):
+        (QWebView::zoomFactor):
+        * Api/qwebview.h:
+
+2008-08-13  Simon Hausmann  &lt;hausmann@webkit.org&gt;
+
</ins><span class="cx">         Reviewed by Lars.
</span><span class="cx"> 
</span><span class="cx">         Fix QWebFrame::setHtml() not setting the new contents immediately.
</span></span></pre>
</div>
</div>

</body>
</html>