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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2744c58c
2014-01-22 Simon Fraser <simon.fraser@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 <mmaxfield@apple.com>
ASSERTION FAILED: v.isFixed() in WebCore::RenderStyle::setWordSpacing
......@@ -910,7 +910,7 @@ void Frame::createView(const IntSize& viewportSize, const Color& backgroundColor
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);
......
......@@ -1978,7 +1978,7 @@ void FrameView::delegatesScrollingDidChange()
#endif
}
#if !PLATFORM(IOS)
#if USE(TILED_BACKING_STORE)
void FrameView::setFixedVisibleContentRect(const IntRect& visibleContentRect)
{
bool visibleContentSizeDidChange = false;
......
......@@ -214,7 +214,7 @@ public:
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;
......
......@@ -241,7 +241,7 @@ IntSize ScrollView::unscaledVisibleContentSize(VisibleContentRectIncludesScrollb
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 @@ IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scol
if (platformWidget())
return platformVisibleContentRect(scollbarInclusion == IncludeScrollbars);
#if !PLATFORM(IOS)
#if USE(TILED_BACKING_STORE)
if (!m_fixedVisibleContentRect.isEmpty())
return m_fixedVisibleContentRect;
#endif
......
......@@ -160,11 +160,13 @@ public:
// 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;
......
2014-01-22 Simon Fraser <simon.fraser@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 <bpoulain@apple.com>
Add a minimalistic SPI to control the layout size outside of WKView
......
......@@ -1175,10 +1175,11 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
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 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
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()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment