⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278416 in webkit


Ignore:
Timestamp:
Jun 3, 2021, 12:59:29 PM (5 years ago)
Author:
Fujii Hironori
Message:

[Win] Remove unused GraphicsContext::shouldIncludeChildWindows()
​https://bugs.webkit.org/show_bug.cgi?id=226567

Reviewed by Don Olmstead.

Source/WebCore:

It was added by r40366 (Bug 23623) for Plugins. However, the
plugin support was removed by r278265 (Bug 226410).

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::shouldIncludeChildWindows const): Deleted.

  • platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
  • platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:

(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):

  • platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
  • platform/graphics/win/GraphicsContextWin.cpp:

(WebCore::GraphicsContext::setShouldIncludeChildWindows): Deleted.
(WebCore::GraphicsContext::shouldIncludeChildWindows const): Deleted.

Source/WebKitLegacy/win:

  • WebFrame.cpp:

(WebFrame::paintDocumentRectToContext):
(WebFrame::paintScrollViewRectToContextAtPoint):
(WebFrame::spoolPages):

  • WebView.cpp:

(WebView::updateBackingStore):
(WebView::paint):
(WebView::paintIntoBackingStore):

  • WebView.h: Removed WindowsToPaint.
Location:
trunk/Source
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r278415 r278416  
     12021-06-03  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win] Remove unused GraphicsContext::shouldIncludeChildWindows()
     4        https://bugs.webkit.org/show_bug.cgi?id=226567
     5
     6        Reviewed by Don Olmstead.
     7
     8        It was added by r40366 (Bug 23623) for Plugins. However, the
     9        plugin support was removed by r278265 (Bug 226410).
     10
     11        * platform/graphics/GraphicsContext.h:
     12        (WebCore::GraphicsContext::shouldIncludeChildWindows const): Deleted.
     13        * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
     14        * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
     15        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
     16        * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
     17        * platform/graphics/win/GraphicsContextWin.cpp:
     18        (WebCore::GraphicsContext::setShouldIncludeChildWindows): Deleted.
     19        (WebCore::GraphicsContext::shouldIncludeChildWindows const): Deleted.
     20
    1212021-06-03  Youenn Fablet  <youenn@apple.com>
    222
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.h

    r278328 r278416  
    538538    // put code shared between Windows CG and Windows Cairo backends.
    539539    virtual GraphicsContextPlatformPrivate* deprecatedPrivateContext() const { return nullptr; }
    540 #if PLATFORM(WIN)
    541     // When set to true, child windows should be rendered into this context
    542     // rather than allowing them just to render to the screen. Defaults to
    543     // false.
    544     // FIXME: This is a layering violation. GraphicsContext shouldn't know
    545     // what a "window" is. It would be much more appropriate for this flag
    546     // to be passed as a parameter alongside the GraphicsContext, but doing
    547     // that would require lots of changes in cross-platform code that we
    548     // aren't sure we want to make.
    549     void setShouldIncludeChildWindows(bool);
    550     bool shouldIncludeChildWindows() const;
     540#endif // OS(WINDOWS)
    551541
    552542#if USE(DIRECT2D)
    … …  
    569559    ID2D1SolidColorBrush* brushWithColor(const Color&);
    570560#endif
    571 #else // PLATFORM(WIN)
    572     bool shouldIncludeChildWindows() const { return false; }
    573 #endif // PLATFORM(WIN)
    574 #endif // OS(WINDOWS)
    575561
    576562private:
  • trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h

    r278148 r278416  
    6868    // NOTE: These may note be needed: review and remove once Cairo implementation is complete
    6969    HDC m_hdc { 0 };
    70     bool m_shouldIncludeChildWindows { false };
    7170#endif
    7271};
  • trunk/Source/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h

    r274252 r278416  
    4646#if PLATFORM(WIN)
    4747        , m_hdc(0)
    48         , m_shouldIncludeChildWindows(false)
    4948#endif
    5049        , m_userToDeviceTransformKnownToBeIdentity(false)
    … …  
    8180
    8281    HDC m_hdc;
    83     bool m_shouldIncludeChildWindows;
    8482#endif
    8583
  • trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h

    r248444 r278416  
    8080
    8181    HDC m_hdc { nullptr };
    82     bool m_shouldIncludeChildWindows { false };
    8382
    8483    float currentGlobalAlpha() const;
  • trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp

    r278328 r278416  
    5353    memset(bmpInfo.bmBits, 0, bufferSize);
    5454}
    55 
    56 #if PLATFORM(WIN)
    57 void GraphicsContext::setShouldIncludeChildWindows(bool include)
    58 {
    59     deprecatedPrivateContext()->m_shouldIncludeChildWindows = include;
    60 }
    61 
    62 bool GraphicsContext::shouldIncludeChildWindows() const
    63 {
    64     return deprecatedPrivateContext()->m_shouldIncludeChildWindows;
    65 }
    66 #endif
    6755
    6856HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend)
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r278265 r278416  
     12021-06-03  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win] Remove unused GraphicsContext::shouldIncludeChildWindows()
     4        https://bugs.webkit.org/show_bug.cgi?id=226567
     5
     6        Reviewed by Don Olmstead.
     7
     8        * WebFrame.cpp:
     9        (WebFrame::paintDocumentRectToContext):
     10        (WebFrame::paintScrollViewRectToContextAtPoint):
     11        (WebFrame::spoolPages):
     12        * WebView.cpp:
     13        (WebView::updateBackingStore):
     14        (WebView::paint):
     15        (WebView::paintIntoBackingStore):
     16        * WebView.h: Removed WindowsToPaint.
     17
    1182021-05-30  Darin Adler  <darin@apple.com>
    219
  • trunk/Source/WebKitLegacy/win/WebFrame.cpp

    r278265 r278416  
    322322
    323323    GraphicsContextWin gc(deviceContext);
    324     gc.setShouldIncludeChildWindows(true);
    325324    gc.save();
    326325    LONG width = rect.right - rect.left;
    … …  
    353352
    354353    GraphicsContextWin gc(deviceContext);
    355     gc.setShouldIncludeChildWindows(true);
    356354    gc.save();
    357355    IntRect dirtyRect(rect);
    … …  
    18091807#if USE(CG) || USE(CAIRO)
    18101808    GraphicsContextWin spoolCtx(pctx);
    1811     spoolCtx.setShouldIncludeChildWindows(true);
    18121809
    18131810    for (UINT ii = startPage; ii < endPage; ii++)
  • trunk/Source/WebKitLegacy/win/WebView.cpp

    r278265 r278416  
    11311131}
    11321132
    1133 void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStoreCompletelyDirty, WindowsToPaint windowsToPaint)
     1133void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStoreCompletelyDirty)
    11341134{
    11351135    ASSERT(!isAcceleratedCompositing());
    … …  
    11731173
    11741174        for (unsigned i = 0; i < paintRects.size(); ++i)
    1175             paintIntoBackingStore(frameView, bitmapDC, paintRects[i], windowsToPaint);
     1175            paintIntoBackingStore(frameView, bitmapDC, paintRects[i]);
    11761176
    11771177        if (m_uiDelegatePrivate)
    … …  
    13051305    int regionType = NULLREGION;
    13061306    PAINTSTRUCT ps;
    1307     WindowsToPaint windowsToPaint;
    13081307    if (!dc) {
    13091308        region = adoptGDIObject(::CreateRectRgn(0, 0, 0, 0));
    … …  
    13111310        hdc = BeginPaint(m_viewWindow, &ps);
    13121311        rcPaint = ps.rcPaint;
    1313         // We're painting to the screen, and our child windows can handle
    1314         // painting themselves to the screen.
    1315         windowsToPaint = PaintWebViewOnly;
    13161312    } else {
    13171313        hdc = dc;
    … …  
    13191315        if (options & PRF_ERASEBKGND)
    13201316            ::FillRect(hdc, &rcPaint, (HBRUSH)GetStockObject(WHITE_BRUSH));
    1321         // Since we aren't painting to the screen, we want to paint all our
    1322         // children into the HDC.
    1323         windowsToPaint = PaintWebViewAndChildren;
    13241317    }
    13251318
    … …  
    13351328
    13361329    // Update our backing store if needed.
    1337     updateBackingStore(frameView, bitmapDC.get(), backingStoreCompletelyDirty, windowsToPaint);
     1330    updateBackingStore(frameView, bitmapDC.get(), backingStoreCompletelyDirty);
    13381331
    13391332    // Now we blit the updated backing store
    … …  
    13711364}
    13721365
    1373 void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const IntRect& dirtyRectPixels, WindowsToPaint windowsToPaint)
     1366void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const IntRect& dirtyRectPixels)
    13741367{
    13751368    // FIXME: This function should never be called in accelerated compositing mode, and we should
    … …  
    14081401
    14091402    GraphicsContextWin gc(bitmapDC, m_transparent);
    1410     gc.setShouldIncludeChildWindows(windowsToPaint == PaintWebViewAndChildren);
    14111403    gc.save();
    14121404    if (m_transparent)
  • trunk/Source/WebKitLegacy/win/WebView.h

    r268647 r278416  
    551551    bool dpiChanged(float, const WebCore::IntSize&);
    552552
    553     enum WindowsToPaint { PaintWebViewOnly, PaintWebViewAndChildren };
    554     void paintIntoBackingStore(WebCore::FrameView*, HDC bitmapDC, const WebCore::IntRect& dirtyRect, WindowsToPaint);
    555     void updateBackingStore(WebCore::FrameView*, HDC = 0, bool backingStoreCompletelyDirty = false, WindowsToPaint = PaintWebViewOnly);
     553    void paintIntoBackingStore(WebCore::FrameView*, HDC bitmapDC, const WebCore::IntRect& dirtyRect);
     554    void updateBackingStore(WebCore::FrameView*, HDC = 0, bool backingStoreCompletelyDirty = false);
    556555
    557556    void performLayeredWindowUpdate();
Note: See TracChangeset for help on using the changeset viewer.