[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 02:05:57 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 958d8e61792cf43391799b076d8dcdbc39c23722
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 2 00:56:04 2010 +0000

    2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
    
            Reviewed by Adam Barth.
    
            Convert the zoom mode (page vs. text-only) into a proper enum.
            https://bugs.webkit.org/show_bug.cgi?id=35347
    
            * GNUmakefile.am:
            * WebCore.base.exp: Substituted symbols __ZN7WebCore5Frame13setZoomFactorEfNS_8ZoomModeE
            and __ZN7WebCore8Settings11setZoomModeENS_8ZoomModeE for __ZN7WebCore5Frame13setZoomFactorEfb
            and __ZN7WebCore8Settings16setZoomsTextOnlyEb, respectively.
            * WebCore.gypi:
            * WebCore.pro:
            * WebCore.vcproj/WebCore.vcproj:
            * WebCore.xcodeproj/project.pbxproj:
            * page/Frame.cpp:
            (WebCore::Frame::zoomMode):
            (WebCore::Frame::shouldApplyTextZoom):
            (WebCore::Frame::shouldApplyPageZoom):
            (WebCore::Frame::setZoomFactor):
            * page/Frame.h:
            * page/Settings.cpp:
            (WebCore::Settings::Settings):
            (WebCore::Settings::setZoomMode):
            * page/Settings.h:
            (WebCore::Settings::zoomMode):
            * page/ZoomMode.h: Added.
            (WebCore::):
            * svg/SVGSVGElement.cpp:
            (WebCore::SVGSVGElement::setCurrentScale):
    2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
    
            Reviewed by Adam Barth.
    
            Adapt to the new ZoomMode enum.
            https://bugs.webkit.org/show_bug.cgi?id=35347
    
            * src/WebViewImpl.cpp:
            (WebKit::WebViewImpl::setZoomLevel):
    2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
    
            Reviewed by Adam Barth.
    
            Adapt to the new ZoomMode enum.
            https://bugs.webkit.org/show_bug.cgi?id=35347
    
            * webkit/webkitwebview.cpp:
            (DNDContentsRequest::webkit_web_view_apply_zoom_level):
    2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
    
            Reviewed by Adam Barth.
    
            Adapt to the new ZoomMode enum.
            https://bugs.webkit.org/show_bug.cgi?id=35347
    
            * WebView/WebView.mm:
            (-[WebView _preferencesChangedNotification:]):
            (-[WebView _setZoomMultiplier:isTextOnly:]):
            (-[WebView _realZoomMultiplierIsTextOnly]):
    2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
    
            Reviewed by Adam Barth.
    
            Adapt to the new ZoomMode enum.
            https://bugs.webkit.org/show_bug.cgi?id=35347
    
            * Api/qwebframe.cpp:
            (QWebFrame::setTextSizeMultiplier):
            (QWebFrame::setZoomFactor):
            * Api/qwebsettings.cpp:
            (QWebSettingsPrivate::apply):
    2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
    
            Reviewed by Adam Barth.
    
            Adapt to the new ZoomMode enum.
            https://bugs.webkit.org/show_bug.cgi?id=35347
    
            * WebFrame.cpp:
            (WebFrame::setTextSizeMultiplier):
            * WebView.cpp:
            (WebView::setZoomMultiplier):
            (WebView::zoomMultiplier):
            (WebView::canMakeTextLarger):
            (WebView::makeTextLarger):
            (WebView::canMakeTextSmaller):
            (WebView::makeTextSmaller):
            (WebView::notifyPreferencesChanged):
    2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
    
            Reviewed by Adam Barth.
    
            Adapt to the new ZoomMode enum.
            https://bugs.webkit.org/show_bug.cgi?id=35347
    
            * WebFrame.cpp:
            (wxWebFrame::IncreaseTextSize):
            (wxWebFrame::DecreaseTextSize):
            (wxWebFrame::ResetTextSize):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55387 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 756a760..f6a6e9a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,34 @@
+2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
+
+        Reviewed by Adam Barth.
+
+        Convert the zoom mode (page vs. text-only) into a proper enum.
+        https://bugs.webkit.org/show_bug.cgi?id=35347
+
+        * GNUmakefile.am:
+        * WebCore.base.exp: Substituted symbols __ZN7WebCore5Frame13setZoomFactorEfNS_8ZoomModeE
+        and __ZN7WebCore8Settings11setZoomModeENS_8ZoomModeE for __ZN7WebCore5Frame13setZoomFactorEfb
+        and __ZN7WebCore8Settings16setZoomsTextOnlyEb, respectively.
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/Frame.cpp:
+        (WebCore::Frame::zoomMode):
+        (WebCore::Frame::shouldApplyTextZoom):
+        (WebCore::Frame::shouldApplyPageZoom):
+        (WebCore::Frame::setZoomFactor):
+        * page/Frame.h:
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+        (WebCore::Settings::setZoomMode):
+        * page/Settings.h:
+        (WebCore::Settings::zoomMode):
+        * page/ZoomMode.h: Added.
+        (WebCore::):
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::setCurrentScale):
+
 2010-03-01  Alex Milowski  <alex at milowski.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index d3ea715..1b43f3f 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1430,6 +1430,7 @@ webcore_sources += \
 	WebCore/page/WindowFeatures.h \
 	WebCore/page/XSSAuditor.cpp \
 	WebCore/page/XSSAuditor.h \
+	WebCore/page/ZoomMode.h \
 	WebCore/page/animation/AnimationBase.cpp \
 	WebCore/page/animation/AnimationBase.h \
 	WebCore/page/animation/AnimationController.cpp \
diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp
index a1fb44a..0d6026a 100644
--- a/WebCore/WebCore.base.exp
+++ b/WebCore/WebCore.base.exp
@@ -515,7 +515,7 @@ __ZN7WebCore5Cache13setCapacitiesEjjj
 __ZN7WebCore5Frame10findStringERKNS_6StringEbbbb
 __ZN7WebCore5Frame11shouldCloseEv
 __ZN7WebCore5Frame13reapplyStylesEv
-__ZN7WebCore5Frame13setZoomFactorEfb
+__ZN7WebCore5Frame13setZoomFactorEfNS_8ZoomModeE
 __ZN7WebCore5Frame14frameForWidgetEPKNS_6WidgetE
 __ZN7WebCore5Frame15revealSelectionERKNS_15ScrollAlignmentEb
 __ZN7WebCore5Frame17setIsDisconnectedEb
@@ -624,10 +624,10 @@ __ZN7WebCore8Document4headEv
 __ZN7WebCore8FormDataD1Ev
 __ZN7WebCore8IntPointC1ERK8_NSPoint
 __ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEEi
+__ZN7WebCore8Settings11setZoomModeENS_8ZoomModeE
 __ZN7WebCore8Settings14setJavaEnabledEb
 __ZN7WebCore8Settings15setWebGLEnabledEb
 __ZN7WebCore8Settings16setUsesPageCacheEb
-__ZN7WebCore8Settings16setZoomsTextOnlyEb
 __ZN7WebCore8Settings17setPluginsEnabledEb
 __ZN7WebCore8Settings18setDOMPasteAllowedEb
 __ZN7WebCore8Settings18setDefaultFontSizeEi
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index f8a280e..c4c9210 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1893,6 +1893,7 @@
             'page/WorkerNavigator.h',
             'page/XSSAuditor.cpp',
             'page/XSSAuditor.h',
+            'page/ZoomMode.h',
             'platform/animation/Animation.cpp',
             'platform/animation/Animation.h',
             'platform/animation/AnimationList.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index d068c04..d6406e3 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1483,6 +1483,7 @@ HEADERS += \
     page/WindowFeatures.h \
     page/WorkerNavigator.h \
     page/XSSAuditor.h \
+    page/ZoomMode.h \
     platform/animation/Animation.h \
     platform/animation/AnimationList.h \
     platform/Arena.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 9bfcb27..09aba61 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -21024,6 +21024,10 @@
 				RelativePath="..\page\XSSAuditor.h"
 				>
 			</File>
+			<File
+				RelativePath="..\page\ZoomMode.h"
+				>
+			</File>
 			<Filter
 				Name="win"
 				>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 19e9ce5..e39a0b3 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -4656,6 +4656,7 @@
 		C5EBDD84105EDDEC0056816F /* StorageEventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */; };
 		C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */; };
 		C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */; };
+		CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */ = {isa = PBXBuildFile; fileRef = CE172E001136E8CE0062A533 /* ZoomMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CE4C00E410F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */; };
 		CE4C00E610F6F7C100CA38F5 /* HTMLNoScriptElement.h in Headers */ = {isa = PBXBuildFile; fileRef = CE4C00E510F6F7C100CA38F5 /* HTMLNoScriptElement.h */; };
 		CE54FD381016D9A6008B44C8 /* ScriptSourceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = CE54FD371016D9A6008B44C8 /* ScriptSourceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -9949,6 +9950,7 @@
 		C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageEventDispatcher.h; sourceTree = "<group>"; };
 		C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifySelectionListLevel.h; sourceTree = "<group>"; };
 		C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModifySelectionListLevel.cpp; sourceTree = "<group>"; };
+		CE172E001136E8CE0062A533 /* ZoomMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZoomMode.h; sourceTree = "<group>"; };
 		CE4C00E310F6F7BA00CA38F5 /* HTMLNoScriptElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLNoScriptElement.cpp; sourceTree = "<group>"; };
 		CE4C00E510F6F7C100CA38F5 /* HTMLNoScriptElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLNoScriptElement.h; sourceTree = "<group>"; };
 		CE54FD371016D9A6008B44C8 /* ScriptSourceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptSourceProvider.h; sourceTree = "<group>"; };
@@ -11572,6 +11574,7 @@
 				E1271A510EEECD1C00F61213 /* WorkerNavigator.idl */,
 				97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */,
 				97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */,
+				CE172E001136E8CE0062A533 /* ZoomMode.h */,
 			);
 			path = page;
 			sourceTree = "<group>";
@@ -18590,6 +18593,7 @@
 				65E0E9441133C89F00B4CB10 /* JSDOMWrapper.h in Headers */,
 				5962297A1133EFE200DC4CBB /* GeolocationPositionCache.h in Headers */,
 				0BC2C7781134A8FC000B2F61 /* CanvasSurface.h in Headers */,
+				CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index 262c56c..548ab41 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -661,28 +661,24 @@ float Frame::zoomFactor() const
     return m_zoomFactor;
 }
 
-bool Frame::isZoomFactorTextOnly() const
+ZoomMode Frame::zoomMode() const
 {
-    return m_page->settings()->zoomsTextOnly();
+    return m_page->settings()->zoomMode();
 }
 
 bool Frame::shouldApplyTextZoom() const
 {
-    if (m_zoomFactor == 1.0f || !isZoomFactorTextOnly())
-        return false;
-    return true;
+    return m_zoomFactor != 1.0f && zoomMode() == ZoomTextOnly;
 }
 
 bool Frame::shouldApplyPageZoom() const
 {
-    if (m_zoomFactor == 1.0f || isZoomFactorTextOnly())
-        return false;
-    return true;
+    return m_zoomFactor != 1.0f && zoomMode() == ZoomPage;
 }
 
-void Frame::setZoomFactor(float percent, bool isTextOnly)
+void Frame::setZoomFactor(float percent, ZoomMode mode)
 {
-    if (m_zoomFactor == percent && isZoomFactorTextOnly() == isTextOnly)
+    if (m_zoomFactor == percent && zoomMode() == mode)
         return;
 
 #if ENABLE(SVG)
@@ -696,7 +692,7 @@ void Frame::setZoomFactor(float percent, bool isTextOnly)
     }
 #endif
 
-    if (!isTextOnly) {
+    if (mode == ZoomPage) {
         // Update the scroll position when doing a full page zoom, so the content stays in relatively the same position.
         IntPoint scrollPosition = view()->scrollPosition();
         float percentDifference = (percent / m_zoomFactor);
@@ -704,12 +700,12 @@ void Frame::setZoomFactor(float percent, bool isTextOnly)
     }
 
     m_zoomFactor = percent;
-    m_page->settings()->setZoomsTextOnly(isTextOnly);
+    m_page->settings()->setZoomMode(mode);
 
     m_doc->recalcStyle(Node::Force);
 
     for (Frame* child = tree()->firstChild(); child; child = child->tree()->nextSibling())
-        child->setZoomFactor(m_zoomFactor, isTextOnly);
+        child->setZoomFactor(m_zoomFactor, mode);
 
     if (m_doc->renderer() && m_doc->renderer()->needsLayout() && view()->didFirstLayout())
         view()->layout();
diff --git a/WebCore/page/Frame.h b/WebCore/page/Frame.h
index 26d1efa..3ce3675 100644
--- a/WebCore/page/Frame.h
+++ b/WebCore/page/Frame.h
@@ -38,6 +38,7 @@
 #include "ScrollBehavior.h"
 #include "SelectionController.h"
 #include "UserScriptTypes.h"
+#include "ZoomMode.h"
 
 #if PLATFORM(WIN)
 #include "FrameWin.h"
@@ -169,9 +170,9 @@ namespace WebCore {
     // === to be moved into FrameView
 
     public:
-        void setZoomFactor(float scale, bool isTextOnly);
+        void setZoomFactor(float scale, ZoomMode);
         float zoomFactor() const;
-        bool isZoomFactorTextOnly() const;
+        ZoomMode zoomMode() const;
         bool shouldApplyTextZoom() const;
         bool shouldApplyPageZoom() const;
         float pageZoomFactor() const { return shouldApplyPageZoom() ? zoomFactor() : 1.0f; }
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index cc8f7af..57f3cdd 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -64,6 +64,7 @@ Settings::Settings(Page* page)
     , m_maximumDecodedImageSize(numeric_limits<size_t>::max())
     , m_localStorageQuota(5 * 1024 * 1024)  // Suggested by the HTML5 spec.
     , m_pluginAllowedRunTime(numeric_limits<unsigned>::max())
+    , m_zoomMode(ZoomPage)
     , m_isJavaEnabled(false)
     , m_loadsImagesAutomatically(false)
     , m_privateBrowsingEnabled(false)
@@ -102,7 +103,6 @@ Settings::Settings(Page* page)
     , m_inApplicationChromeMode(false)
     , m_offlineWebApplicationCacheEnabled(false)
     , m_shouldPaintCustomScrollbars(false)
-    , m_zoomsTextOnly(false)
     , m_enforceCSSMIMETypeInStrictMode(true)
     , m_usesEncodingDetector(false)
     , m_allowScriptsToCloseWindows(false)
@@ -467,12 +467,12 @@ void Settings::setShouldPaintCustomScrollbars(bool shouldPaintCustomScrollbars)
     m_shouldPaintCustomScrollbars = shouldPaintCustomScrollbars;
 }
 
-void Settings::setZoomsTextOnly(bool zoomsTextOnly)
+void Settings::setZoomMode(ZoomMode mode)
 {
-    if (zoomsTextOnly == m_zoomsTextOnly)
+    if (mode == m_zoomMode)
         return;
     
-    m_zoomsTextOnly = zoomsTextOnly;
+    m_zoomMode = mode;
     setNeedsReapplyStylesInAllFrames(m_page);
 }
 
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index 06f4570..ab6c1d4 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -30,6 +30,7 @@
 #include "AtomicString.h"
 #include "FontRenderingMode.h"
 #include "KURL.h"
+#include "ZoomMode.h"
 
 namespace WebCore {
 
@@ -234,8 +235,8 @@ namespace WebCore {
         void setShouldPaintCustomScrollbars(bool);
         bool shouldPaintCustomScrollbars() const { return m_shouldPaintCustomScrollbars; }
 
-        void setZoomsTextOnly(bool);
-        bool zoomsTextOnly() const { return m_zoomsTextOnly; }
+        void setZoomMode(ZoomMode);
+        ZoomMode zoomMode() const { return m_zoomMode; }
         
         void setEnforceCSSMIMETypeInStrictMode(bool);
         bool enforceCSSMIMETypeInStrictMode() { return m_enforceCSSMIMETypeInStrictMode; }
@@ -309,6 +310,7 @@ namespace WebCore {
         size_t m_maximumDecodedImageSize;
         unsigned m_localStorageQuota;
         unsigned m_pluginAllowedRunTime;
+        ZoomMode m_zoomMode;
         bool m_isJavaEnabled : 1;
         bool m_loadsImagesAutomatically : 1;
         bool m_privateBrowsingEnabled : 1;
@@ -347,7 +349,6 @@ namespace WebCore {
         bool m_inApplicationChromeMode : 1;
         bool m_offlineWebApplicationCacheEnabled : 1;
         bool m_shouldPaintCustomScrollbars : 1;
-        bool m_zoomsTextOnly : 1;
         bool m_enforceCSSMIMETypeInStrictMode : 1;
         bool m_usesEncodingDetector : 1;
         bool m_allowScriptsToCloseWindows : 1;
diff --git a/WebCore/page/ZoomMode.h b/WebCore/page/ZoomMode.h
new file mode 100644
index 0000000..3f02184
--- /dev/null
+++ b/WebCore/page/ZoomMode.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010 Research in Motion Ltd. http://www.rim.com/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ZoomMode_h
+#define ZoomMode_h
+
+namespace WebCore {
+
+enum ZoomMode {
+    ZoomPage,
+    ZoomTextOnly
+};
+
+}
+
+#endif
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index ff24c4f..7a6db84 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -199,7 +199,7 @@ void SVGSVGElement::setCurrentScale(float scale)
         // Calling setCurrentScale() on the outermost <svg> element in a standalone SVG document
         // is allowed to change the page zoom factor, influencing the document size, scrollbars etc.
         if (parentNode() == document())
-            frame->setZoomFactor(scale, false);
+            frame->setZoomFactor(scale, ZoomPage);
         return;
     }
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index b4cfaa9..1c96542 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,13 @@
+2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
+
+        Reviewed by Adam Barth.
+
+        Adapt to the new ZoomMode enum.
+        https://bugs.webkit.org/show_bug.cgi?id=35347
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setZoomLevel):
+
 2010-03-01  Thatcher Ulrich  <tulrich at google.com>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index d7529bd..6d2db7b 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -1302,7 +1302,7 @@ int WebViewImpl::setZoomLevel(bool textOnly, int zoomLevel)
     Frame* frame = mainFrameImpl()->frame();
     if (zoomFactor != frame->zoomFactor()) {
         m_zoomLevel = zoomLevel;
-        frame->setZoomFactor(zoomFactor, textOnly);
+        frame->setZoomFactor(zoomFactor, textOnly ? ZoomTextOnly : ZoomPage);
     }
     return m_zoomLevel;
 }
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 643ec9a..c7cfab3 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,13 @@
+2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
+
+        Reviewed by Adam Barth.
+
+        Adapt to the new ZoomMode enum.
+        https://bugs.webkit.org/show_bug.cgi?id=35347
+
+        * webkit/webkitwebview.cpp:
+        (DNDContentsRequest::webkit_web_view_apply_zoom_level):
+
 2010-03-01  Kalle Vahlman  <zuh at iki.fi>
 
         Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index d2be7fa..9e7b382 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -3711,7 +3711,7 @@ static void webkit_web_view_apply_zoom_level(WebKitWebView* webView, gfloat zoom
         return;
 
     WebKitWebViewPrivate* priv = webView->priv;
-    frame->setZoomFactor(zoomLevel, !priv->zoomFullContent);
+    frame->setZoomFactor(zoomLevel, priv->zoomFullContent ? ZoomPage : ZoomTextOnly);
 }
 
 /**
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index a2efb96..2aa77af 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
+
+        Reviewed by Adam Barth.
+
+        Adapt to the new ZoomMode enum.
+        https://bugs.webkit.org/show_bug.cgi?id=35347
+
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChangedNotification:]):
+        (-[WebView _setZoomMultiplier:isTextOnly:]):
+        (-[WebView _realZoomMultiplierIsTextOnly]):
+
 2010-02-27  Jing Jin  <jjin at apple.com>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index be035b2..6d8747b 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1339,7 +1339,7 @@ static bool fastDocumentTeardownEnabled()
     settings->setWebArchiveDebugModeEnabled([preferences webArchiveDebugModeEnabled]);
     settings->setLocalFileContentSniffingEnabled([preferences localFileContentSniffingEnabled]);
     settings->setOfflineWebApplicationCacheEnabled([preferences offlineWebApplicationCacheEnabled]);
-    settings->setZoomsTextOnly([preferences zoomsTextOnly]);
+    settings->setZoomMode([preferences zoomsTextOnly] ? ZoomTextOnly : ZoomPage);
     settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
     settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
     settings->setAcceleratedCompositingEnabled(coreVideoHas7228836Fix() && [preferences acceleratedCompositingEnabled]);
@@ -3115,13 +3115,13 @@ static bool needsWebViewInitThreadWorkaround()
     _private->zoomMultiplier = m;
     ASSERT(_private->page);
     if (_private->page)
-        _private->page->settings()->setZoomsTextOnly(isTextOnly);
+        _private->page->settings()->setZoomMode(isTextOnly ? ZoomTextOnly : ZoomPage);
     
     // FIXME: it would be nice to rework this code so that _private->zoomMultiplier doesn't exist and callers
     // all access _private->page->settings().
     Frame* coreFrame = [self _mainCoreFrame];
     if (coreFrame)
-        coreFrame->setZoomFactor(m, isTextOnly);
+        coreFrame->setZoomFactor(m, isTextOnly ? ZoomTextOnly : ZoomPage);
 }
 
 - (float)_zoomMultiplier:(BOOL)isTextOnly
@@ -3141,7 +3141,7 @@ static bool needsWebViewInitThreadWorkaround()
     if (!_private->page)
         return NO;
     
-    return _private->page->settings()->zoomsTextOnly();
+    return _private->page->settings()->zoomMode() == ZoomTextOnly;
 }
 
 #define MinimumZoomMultiplier       0.5f
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 15b5c00..9cfc58f 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -1245,7 +1245,7 @@ void QWebFrame::render(QPainter* painter)
 */
 void QWebFrame::setTextSizeMultiplier(qreal factor)
 {
-    d->frame->setZoomFactor(factor, /*isTextOnly*/true);
+    d->frame->setZoomFactor(factor, ZoomTextOnly);
 }
 
 /*!
@@ -1264,7 +1264,7 @@ qreal QWebFrame::textSizeMultiplier() const
 
 void QWebFrame::setZoomFactor(qreal factor)
 {
-    d->frame->setZoomFactor(factor, d->frame->isZoomFactorTextOnly());
+    d->frame->setZoomFactor(factor, d->frame->zoomMode());
 }
 
 qreal QWebFrame::zoomFactor() const
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index ce4929f..4f0723b 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -201,7 +201,7 @@ void QWebSettingsPrivate::apply()
 
         value = attributes.value(QWebSettings::ZoomTextOnly,
                                  global->attributes.value(QWebSettings::ZoomTextOnly));
-        settings->setZoomsTextOnly(value);
+        settings->setZoomMode(value ? WebCore::ZoomTextOnly : WebCore::ZoomPage);
 
         value = attributes.value(QWebSettings::PrintElementBackgrounds,
                                       global->attributes.value(QWebSettings::PrintElementBackgrounds));
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index fd7478d..527c8b9 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
+
+        Reviewed by Adam Barth.
+
+        Adapt to the new ZoomMode enum.
+        https://bugs.webkit.org/show_bug.cgi?id=35347
+
+        * Api/qwebframe.cpp:
+        (QWebFrame::setTextSizeMultiplier):
+        (QWebFrame::setZoomFactor):
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply):
+
 2010-02-26  Diego Gonzalez  <diego.gonzalez at openbossa.org>
 
         Reviewed by Simon Hausmann.
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 914f180..70b3155 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,21 @@
+2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
+
+        Reviewed by Adam Barth.
+
+        Adapt to the new ZoomMode enum.
+        https://bugs.webkit.org/show_bug.cgi?id=35347
+
+        * WebFrame.cpp:
+        (WebFrame::setTextSizeMultiplier):
+        * WebView.cpp:
+        (WebView::setZoomMultiplier):
+        (WebView::zoomMultiplier):
+        (WebView::canMakeTextLarger):
+        (WebView::makeTextLarger):
+        (WebView::canMakeTextSmaller):
+        (WebView::makeTextSmaller):
+        (WebView::notifyPreferencesChanged):
+
 2010-02-26  Jon Honeycutt  <jhoneycutt at apple.com>
 
         <rdar://problem/7703368> IWebUIDelegatePrivate::embeddedViewWithArguments
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 8e03794..8b7e0fd 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -1074,7 +1074,7 @@ void WebFrame::setTextSizeMultiplier(float multiplier)
 {
     Frame* coreFrame = core(this);
     ASSERT(coreFrame);
-    coreFrame->setZoomFactor(multiplier, true);
+    coreFrame->setZoomFactor(multiplier, ZoomTextOnly);
 }
 
 HRESULT WebFrame::inViewSourceMode(BOOL* flag)
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 7813811..5389d05 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -2879,9 +2879,9 @@ HRESULT STDMETHODCALLTYPE WebView::setPageSizeMultiplier(
 void WebView::setZoomMultiplier(float multiplier, bool isTextOnly)
 {
     m_zoomMultiplier = multiplier;
-    m_page->settings()->setZoomsTextOnly(isTextOnly);
+    m_page->settings()->setZoomMode(isTextOnly ? ZoomTextOnly : ZoomPage);
     if (Frame* coreFrame = core(m_mainFrame))
-        coreFrame->setZoomFactor(multiplier, isTextOnly);
+        coreFrame->setZoomFactor(multiplier, isTextOnly ? ZoomTextOnly : ZoomPage);
 }
 
 HRESULT STDMETHODCALLTYPE WebView::textSizeMultiplier( 
@@ -2900,7 +2900,8 @@ HRESULT STDMETHODCALLTYPE WebView::pageSizeMultiplier(
 
 float WebView::zoomMultiplier(bool isTextOnly)
 {
-    if (isTextOnly != m_page->settings()->zoomsTextOnly())
+    ZoomMode zoomMode = isTextOnly ? ZoomTextOnly : ZoomPage;
+    if (zoomMode != m_page->settings()->zoomMode())
         return 1.0f;
     return m_zoomMultiplier;
 }
@@ -3680,7 +3681,7 @@ HRESULT STDMETHODCALLTYPE WebView::canMakeTextLarger(
         /* [in] */ IUnknown* /*sender*/,
         /* [retval][out] */ BOOL* result)
 {
-    bool canGrowMore = canZoomIn(m_page->settings()->zoomsTextOnly());
+    bool canGrowMore = canZoomIn(m_page->settings()->zoomMode() == ZoomTextOnly);
     *result = canGrowMore ? TRUE : FALSE;
     return S_OK;
 }
@@ -3702,7 +3703,7 @@ bool WebView::canZoomIn(bool isTextOnly)
 HRESULT STDMETHODCALLTYPE WebView::makeTextLarger( 
         /* [in] */ IUnknown* /*sender*/)
 {
-    return zoomIn(m_page->settings()->zoomsTextOnly());
+    return zoomIn(m_page->settings()->zoomMode() == ZoomTextOnly);
 }
 
 HRESULT STDMETHODCALLTYPE WebView::zoomPageIn( 
@@ -3723,7 +3724,7 @@ HRESULT STDMETHODCALLTYPE WebView::canMakeTextSmaller(
         /* [in] */ IUnknown* /*sender*/,
         /* [retval][out] */ BOOL* result)
 {
-    bool canShrinkMore = canZoomOut(m_page->settings()->zoomsTextOnly());
+    bool canShrinkMore = canZoomOut(m_page->settings()->zoomMode() == ZoomTextOnly);
     *result = canShrinkMore ? TRUE : FALSE;
     return S_OK;
 }
@@ -3745,7 +3746,7 @@ bool WebView::canZoomOut(bool isTextOnly)
 HRESULT STDMETHODCALLTYPE WebView::makeTextSmaller( 
         /* [in] */ IUnknown* /*sender*/)
 {
-    return zoomOut(m_page->settings()->zoomsTextOnly());
+    return zoomOut(m_page->settings()->zoomMode() == ZoomTextOnly);
 }
 
 HRESULT STDMETHODCALLTYPE WebView::zoomPageOut( 
@@ -4576,7 +4577,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
     hr = preferences->zoomsTextOnly(&enabled);
     if (FAILED(hr))
         return hr;
-    settings->setZoomsTextOnly(!!enabled);
+    settings->setZoomMode(enabled ? ZoomTextOnly : ZoomPage);
 
     settings->setShowsURLsInToolTips(false);
     settings->setForceFTPDirectoryListings(true);
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index ad8df12..671a02d 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
+
+        Reviewed by Adam Barth.
+
+        Adapt to the new ZoomMode enum.
+        https://bugs.webkit.org/show_bug.cgi?id=35347
+
+        * WebFrame.cpp:
+        (wxWebFrame::IncreaseTextSize):
+        (wxWebFrame::DecreaseTextSize):
+        (wxWebFrame::ResetTextSize):
+
 2010-02-23  Steve Block  <steveblock at google.com>
 
         Reviewed by Darin Adler.
diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp
index 6cda197..2df0f61 100644
--- a/WebKit/wx/WebFrame.cpp
+++ b/WebKit/wx/WebFrame.cpp
@@ -316,7 +316,7 @@ void wxWebFrame::IncreaseTextSize()
 {
     if (CanIncreaseTextSize()) {
         m_textMagnifier = m_textMagnifier*TextSizeMultiplierRatio;
-        m_impl->frame->setZoomFactor(m_textMagnifier, true);
+        m_impl->frame->setZoomFactor(m_textMagnifier, WebCore::ZoomTextOnly);
     }
 }
 
@@ -333,7 +333,7 @@ void wxWebFrame::DecreaseTextSize()
 {        
     if (CanDecreaseTextSize()) {
         m_textMagnifier = m_textMagnifier/TextSizeMultiplierRatio;
-        m_impl->frame->setZoomFactor(m_textMagnifier, true);
+        m_impl->frame->setZoomFactor(m_textMagnifier, WebCore::ZoomTextOnly);
     }
 }
 
@@ -341,7 +341,7 @@ void wxWebFrame::ResetTextSize()
 {
     m_textMagnifier = 1.0;
     if (m_impl->frame)
-        m_impl->frame->setZoomFactor(m_textMagnifier, true);
+        m_impl->frame->setZoomFactor(m_textMagnifier, WebCore::ZoomTextOnly);
 }
 
 void wxWebFrame::MakeEditable(bool enable)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list