Changeset 162597 in webkit


Ignore:
Timestamp:
Jan 22, 2014 10:32:12 PM (10 years ago)
Author:
Simon Fraser
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):

Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r162588 r162597  
     12014-01-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
     4        https://bugs.webkit.org/show_bug.cgi?id=127461
     5
     6        Reviewed by Andreas Kling.
     7
     8        The "fixedVisibleContentRect" code path is only used by platforms
     9        which enabled TILED_BACKING_STORE, so to reduce confusion, surround
     10        this code with #if USE(TILED_BACKING_STORE).
     11
     12        * page/Frame.cpp:
     13        (WebCore::Frame::createView):
     14        * page/FrameView.cpp:
     15        * page/FrameView.h:
     16        * platform/ScrollView.cpp:
     17        (WebCore::ScrollView::unscaledVisibleContentSize):
     18        (WebCore::ScrollView::visibleContentRect):
     19        * platform/ScrollView.h:
     20        (WebCore::ScrollView::visibleSize):
     21
    1222014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
    223
  • trunk/Source/WebCore/page/Frame.cpp

    r162395 r162597  
    911911        frameView = FrameView::create(*this, viewportSize);
    912912        frameView->setFixedLayoutSize(fixedLayoutSize);
    913 #if !PLATFORM(IOS)
     913#if USE(TILED_BACKING_STORE)
    914914        frameView->setFixedVisibleContentRect(fixedVisibleContentRect);
    915915#else
  • trunk/Source/WebCore/page/FrameView.cpp

    r162480 r162597  
    19791979}
    19801980
    1981 #if !PLATFORM(IOS)
     1981#if USE(TILED_BACKING_STORE)
    19821982void FrameView::setFixedVisibleContentRect(const IntRect& visibleContentRect)
    19831983{
  • trunk/Source/WebCore/page/FrameView.h

    r162230 r162597  
    215215    virtual float visibleContentScaleFactor() const override;
    216216
    217 #if !PLATFORM(IOS)
     217#if USE(TILED_BACKING_STORE)
    218218    virtual void setFixedVisibleContentRect(const IntRect&) override;
    219219#endif
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r162515 r162597  
    242242        return platformVisibleContentSize(scrollbarInclusion == IncludeScrollbars);
    243243
    244 #if !PLATFORM(IOS)
     244#if USE(TILED_BACKING_STORE)
    245245    if (!m_fixedVisibleContentRect.isEmpty())
    246246        return m_fixedVisibleContentRect.size();
     
    267267        return platformVisibleContentRect(scollbarInclusion == IncludeScrollbars);
    268268
    269 #if !PLATFORM(IOS)
     269#if USE(TILED_BACKING_STORE)
    270270    if (!m_fixedVisibleContentRect.isEmpty())
    271271        return m_fixedVisibleContentRect;
  • trunk/Source/WebCore/platform/ScrollView.h

    r162139 r162597  
    161161    // which usually will happen when panning, pinching and rotation ends, or when scale or position are changed manually.
    162162    virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const override;
    163 #if !PLATFORM(IOS)
     163    IntSize visibleSize() const { return visibleContentRect().size(); }
     164
     165#if USE(TILED_BACKING_STORE)
    164166    virtual void setFixedVisibleContentRect(const IntRect& visibleContentRect) { m_fixedVisibleContentRect = visibleContentRect; }
    165167    IntRect fixedVisibleContentRect() const { return m_fixedVisibleContentRect; }
    166168#endif
    167     IntSize visibleSize() const { return visibleContentRect().size(); }
     169
    168170#if PLATFORM(IOS)
    169171    // This is the area that is not covered by UI elements.
  • trunk/Source/WebKit2/ChangeLog

    r162590 r162597  
     12014-01-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
     4        https://bugs.webkit.org/show_bug.cgi?id=127461
     5
     6        Reviewed by Andreas Kling.
     7       
     8        The "fixedVisibleContentRect" code path is only used by platforms
     9        which enabled TILED_BACKING_STORE, so to reduce confusion, surround
     10        this code with #if USE(TILED_BACKING_STORE).
     11
     12        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     13        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
     14
    1152014-01-22  Benjamin Poulain  <bpoulain@apple.com>
    216
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r162548 r162597  
    11761176    bool shouldDisableScrolling = isMainFrame && !webPage->mainFrameIsScrollable();
    11771177    bool shouldHideScrollbars = shouldUseFixedLayout || shouldDisableScrolling;
    1178 #if PLATFORM(IOS)
    1179     IntRect currentFixedVisibleContentRect = IntRect();
    1180 #else
    1181     IntRect currentFixedVisibleContentRect = m_frame->coreFrame()->view() ? m_frame->coreFrame()->view()->fixedVisibleContentRect() : IntRect();
     1178    IntRect fixedVisibleContentRect;
     1179
     1180#if USE(TILED_BACKING_STORE)
     1181    if (m_frame->coreFrame()->view())
     1182        fixedVisibleContentRect = m_frame->coreFrame()->view()->fixedVisibleContentRect();
    11821183#endif
    11831184
     
    11871188
    11881189    m_frame->coreFrame()->createView(webPage->size(), backgroundColor, isTransparent,
    1189         IntSize(), currentFixedVisibleContentRect, shouldUseFixedLayout,
     1190        IntSize(), fixedVisibleContentRect, shouldUseFixedLayout,
    11901191        defaultScrollbarMode, /* lock */ shouldHideScrollbars, defaultScrollbarMode, /* lock */ shouldHideScrollbars);
    11911192
Note: See TracChangeset for help on using the changeset viewer.