Title: [162597] trunk/Source
Revision
162597
Author
simon.fra...@apple.com
Date
2014-01-22 22:32:12 -0800 (Wed, 22 Jan 2014)

Log Message

Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
https://bugs.webkit.org/show_bug.cgi?id=127461

Source/WebCore:

Reviewed by Andreas Kling.

The "fixedVisibleContentRect" code path is only used by platforms
which enabled TILED_BACKING_STORE, so to reduce confusion, surround
this code with #if USE(TILED_BACKING_STORE).

* page/Frame.cpp:
(WebCore::Frame::createView):
* page/FrameView.cpp:
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSize):
(WebCore::ScrollView::visibleContentRect):
* platform/ScrollView.h:
(WebCore::ScrollView::visibleSize):

Source/WebKit2:

Reviewed by Andreas Kling.

The "fixedVisibleContentRect" code path is only used by platforms
which enabled TILED_BACKING_STORE, so to reduce confusion, surround
this code with #if USE(TILED_BACKING_STORE).

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (162596 => 162597)


--- trunk/Source/WebCore/ChangeLog	2014-01-23 06:10:04 UTC (rev 162596)
+++ trunk/Source/WebCore/ChangeLog	2014-01-23 06:32:12 UTC (rev 162597)
@@ -1,3 +1,24 @@
+2014-01-22  Simon Fraser  <simon.fra...@apple.com>
+
+        Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
+        https://bugs.webkit.org/show_bug.cgi?id=127461
+
+        Reviewed by Andreas Kling.
+
+        The "fixedVisibleContentRect" code path is only used by platforms
+        which enabled TILED_BACKING_STORE, so to reduce confusion, surround
+        this code with #if USE(TILED_BACKING_STORE).
+
+        * page/Frame.cpp:
+        (WebCore::Frame::createView):
+        * page/FrameView.cpp:
+        * page/FrameView.h:
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::unscaledVisibleContentSize):
+        (WebCore::ScrollView::visibleContentRect):
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::visibleSize):
+
 2014-01-22  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         ASSERTION FAILED: v.isFixed() in WebCore::RenderStyle::setWordSpacing

Modified: trunk/Source/WebCore/page/Frame.cpp (162596 => 162597)


--- trunk/Source/WebCore/page/Frame.cpp	2014-01-23 06:10:04 UTC (rev 162596)
+++ trunk/Source/WebCore/page/Frame.cpp	2014-01-23 06:32:12 UTC (rev 162597)
@@ -910,7 +910,7 @@
     if (isMainFrame) {
         frameView = FrameView::create(*this, viewportSize);
         frameView->setFixedLayoutSize(fixedLayoutSize);
-#if !PLATFORM(IOS)
+#if USE(TILED_BACKING_STORE)
         frameView->setFixedVisibleContentRect(fixedVisibleContentRect);
 #else
         UNUSED_PARAM(fixedVisibleContentRect);

Modified: trunk/Source/WebCore/page/FrameView.cpp (162596 => 162597)


--- trunk/Source/WebCore/page/FrameView.cpp	2014-01-23 06:10:04 UTC (rev 162596)
+++ trunk/Source/WebCore/page/FrameView.cpp	2014-01-23 06:32:12 UTC (rev 162597)
@@ -1978,7 +1978,7 @@
 #endif
 }
 
-#if !PLATFORM(IOS)
+#if USE(TILED_BACKING_STORE)
 void FrameView::setFixedVisibleContentRect(const IntRect& visibleContentRect)
 {
     bool visibleContentSizeDidChange = false;

Modified: trunk/Source/WebCore/page/FrameView.h (162596 => 162597)


--- trunk/Source/WebCore/page/FrameView.h	2014-01-23 06:10:04 UTC (rev 162596)
+++ trunk/Source/WebCore/page/FrameView.h	2014-01-23 06:32:12 UTC (rev 162597)
@@ -214,7 +214,7 @@
 
     virtual float visibleContentScaleFactor() const override;
 
-#if !PLATFORM(IOS)
+#if USE(TILED_BACKING_STORE)
     virtual void setFixedVisibleContentRect(const IntRect&) override;
 #endif
     virtual void setScrollPosition(const IntPoint&) override;

Modified: trunk/Source/WebCore/platform/ScrollView.cpp (162596 => 162597)


--- trunk/Source/WebCore/platform/ScrollView.cpp	2014-01-23 06:10:04 UTC (rev 162596)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2014-01-23 06:32:12 UTC (rev 162597)
@@ -241,7 +241,7 @@
     if (platformWidget())
         return platformVisibleContentSize(scrollbarInclusion == IncludeScrollbars);
 
-#if !PLATFORM(IOS)
+#if USE(TILED_BACKING_STORE)
     if (!m_fixedVisibleContentRect.isEmpty())
         return m_fixedVisibleContentRect.size();
 #endif
@@ -266,7 +266,7 @@
     if (platformWidget())
         return platformVisibleContentRect(scollbarInclusion == IncludeScrollbars);
 
-#if !PLATFORM(IOS)
+#if USE(TILED_BACKING_STORE)
     if (!m_fixedVisibleContentRect.isEmpty())
         return m_fixedVisibleContentRect;
 #endif

Modified: trunk/Source/WebCore/platform/ScrollView.h (162596 => 162597)


--- trunk/Source/WebCore/platform/ScrollView.h	2014-01-23 06:10:04 UTC (rev 162596)
+++ trunk/Source/WebCore/platform/ScrollView.h	2014-01-23 06:32:12 UTC (rev 162597)
@@ -160,11 +160,13 @@
     // the setFixedVisibleContentRect instead for the mainframe, though this must be updated manually, e.g just before resuming the page
     // which usually will happen when panning, pinching and rotation ends, or when scale or position are changed manually.
     virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const override;
-#if !PLATFORM(IOS)
+    IntSize visibleSize() const { return visibleContentRect().size(); }
+
+#if USE(TILED_BACKING_STORE)
     virtual void setFixedVisibleContentRect(const IntRect& visibleContentRect) { m_fixedVisibleContentRect = visibleContentRect; }
     IntRect fixedVisibleContentRect() const { return m_fixedVisibleContentRect; }
 #endif
-    IntSize visibleSize() const { return visibleContentRect().size(); }
+
 #if PLATFORM(IOS)
     // This is the area that is not covered by UI elements.
     IntRect actualVisibleContentRect() const;

Modified: trunk/Source/WebKit2/ChangeLog (162596 => 162597)


--- trunk/Source/WebKit2/ChangeLog	2014-01-23 06:10:04 UTC (rev 162596)
+++ trunk/Source/WebKit2/ChangeLog	2014-01-23 06:32:12 UTC (rev 162597)
@@ -1,3 +1,17 @@
+2014-01-22  Simon Fraser  <simon.fra...@apple.com>
+
+        Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
+        https://bugs.webkit.org/show_bug.cgi?id=127461
+
+        Reviewed by Andreas Kling.
+        
+        The "fixedVisibleContentRect" code path is only used by platforms
+        which enabled TILED_BACKING_STORE, so to reduce confusion, surround
+        this code with #if USE(TILED_BACKING_STORE).
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
+
 2014-01-22  Benjamin Poulain  <bpoul...@apple.com>
 
         Add a minimalistic SPI to control the layout size outside of WKView

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (162596 => 162597)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2014-01-23 06:10:04 UTC (rev 162596)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2014-01-23 06:32:12 UTC (rev 162597)
@@ -1175,10 +1175,11 @@
     bool shouldUseFixedLayout = isMainFrame && webPage->useFixedLayout();
     bool shouldDisableScrolling = isMainFrame && !webPage->mainFrameIsScrollable();
     bool shouldHideScrollbars = shouldUseFixedLayout || shouldDisableScrolling;
-#if PLATFORM(IOS)
-    IntRect currentFixedVisibleContentRect = IntRect();
-#else
-    IntRect currentFixedVisibleContentRect = m_frame->coreFrame()->view() ? m_frame->coreFrame()->view()->fixedVisibleContentRect() : IntRect();
+    IntRect fixedVisibleContentRect;
+
+#if USE(TILED_BACKING_STORE)
+    if (m_frame->coreFrame()->view())
+        fixedVisibleContentRect = m_frame->coreFrame()->view()->fixedVisibleContentRect();
 #endif
 
     m_frameCameFromPageCache = false;
@@ -1186,7 +1187,7 @@
     ScrollbarMode defaultScrollbarMode = shouldHideScrollbars ? ScrollbarAlwaysOff : ScrollbarAuto;
 
     m_frame->coreFrame()->createView(webPage->size(), backgroundColor, isTransparent,
-        IntSize(), currentFixedVisibleContentRect, shouldUseFixedLayout,
+        IntSize(), fixedVisibleContentRect, shouldUseFixedLayout,
         defaultScrollbarMode, /* lock */ shouldHideScrollbars, defaultScrollbarMode, /* lock */ shouldHideScrollbars);
 
     if (int minimumLayoutWidth = webPage->minimumLayoutSize().width()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to