Diff
Modified: trunk/Source/WebCore/ChangeLog (278415 => 278416)
--- trunk/Source/WebCore/ChangeLog 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebCore/ChangeLog 2021-06-03 19:59:29 UTC (rev 278416)
@@ -1,3 +1,23 @@
+2021-06-03 Fujii Hironori <[email protected]>
+
+ [Win] Remove unused GraphicsContext::shouldIncludeChildWindows()
+ https://bugs.webkit.org/show_bug.cgi?id=226567
+
+ Reviewed by Don Olmstead.
+
+ 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.
+
2021-06-03 Youenn Fablet <[email protected]>
Do not recalibrate camera if the settings are the same
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (278415 => 278416)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2021-06-03 19:59:29 UTC (rev 278416)
@@ -537,17 +537,7 @@
// FIXME: This should not exist; we need a different place to
// put code shared between Windows CG and Windows Cairo backends.
virtual GraphicsContextPlatformPrivate* deprecatedPrivateContext() const { return nullptr; }
-#if PLATFORM(WIN)
- // When set to true, child windows should be rendered into this context
- // rather than allowing them just to render to the screen. Defaults to
- // false.
- // FIXME: This is a layering violation. GraphicsContext shouldn't know
- // what a "window" is. It would be much more appropriate for this flag
- // to be passed as a parameter alongside the GraphicsContext, but doing
- // that would require lots of changes in cross-platform code that we
- // aren't sure we want to make.
- void setShouldIncludeChildWindows(bool);
- bool shouldIncludeChildWindows() const;
+#endif // OS(WINDOWS)
#if USE(DIRECT2D)
GraphicsContext(HDC, ID2D1DCRenderTarget**, RECT, bool hasAlpha = false); // FIXME: To be removed.
@@ -568,10 +558,6 @@
ID2D1SolidColorBrush* brushWithColor(const Color&);
#endif
-#else // PLATFORM(WIN)
- bool shouldIncludeChildWindows() const { return false; }
-#endif // PLATFORM(WIN)
-#endif // OS(WINDOWS)
private:
virtual bool supportsTransparencyLayers() const { return true; }
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h (278415 => 278416)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h 2021-06-03 19:59:29 UTC (rev 278416)
@@ -67,7 +67,6 @@
#if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS))
// NOTE: These may note be needed: review and remove once Cairo implementation is complete
HDC m_hdc { 0 };
- bool m_shouldIncludeChildWindows { false };
#endif
};
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h (278415 => 278416)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h 2021-06-03 19:59:29 UTC (rev 278416)
@@ -45,7 +45,6 @@
: m_cgContext(WTFMove(cgContext))
#if PLATFORM(WIN)
, m_hdc(0)
- , m_shouldIncludeChildWindows(false)
#endif
, m_userToDeviceTransformKnownToBeIdentity(false)
, m_contextFlags(flags)
@@ -80,7 +79,6 @@
void setCTM(const AffineTransform&);
HDC m_hdc;
- bool m_shouldIncludeChildWindows;
#endif
RetainPtr<CGContextRef> m_cgContext;
Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h (278415 => 278416)
--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h 2021-06-03 19:59:29 UTC (rev 278416)
@@ -79,7 +79,6 @@
ID2D1RenderTarget* renderTarget();
HDC m_hdc { nullptr };
- bool m_shouldIncludeChildWindows { false };
float currentGlobalAlpha() const;
Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp (278415 => 278416)
--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp 2021-06-03 19:59:29 UTC (rev 278416)
@@ -53,18 +53,6 @@
memset(bmpInfo.bmBits, 0, bufferSize);
}
-#if PLATFORM(WIN)
-void GraphicsContext::setShouldIncludeChildWindows(bool include)
-{
- deprecatedPrivateContext()->m_shouldIncludeChildWindows = include;
-}
-
-bool GraphicsContext::shouldIncludeChildWindows() const
-{
- return deprecatedPrivateContext()->m_shouldIncludeChildWindows;
-}
-#endif
-
HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend)
{
HDC hdc = deprecatedPrivateContext()->m_hdc;
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (278415 => 278416)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2021-06-03 19:59:29 UTC (rev 278416)
@@ -1,3 +1,20 @@
+2021-06-03 Fujii Hironori <[email protected]>
+
+ [Win] Remove unused GraphicsContext::shouldIncludeChildWindows()
+ https://bugs.webkit.org/show_bug.cgi?id=226567
+
+ Reviewed by Don Olmstead.
+
+ * WebFrame.cpp:
+ (WebFrame::paintDocumentRectToContext):
+ (WebFrame::paintScrollViewRectToContextAtPoint):
+ (WebFrame::spoolPages):
+ * WebView.cpp:
+ (WebView::updateBackingStore):
+ (WebView::paint):
+ (WebView::paintIntoBackingStore):
+ * WebView.h: Removed WindowsToPaint.
+
2021-05-30 Darin Adler <[email protected]>
Remove some of the unneeded WebKitLegacy Windows-specific plug-in code
Modified: trunk/Source/WebKitLegacy/win/WebFrame.cpp (278415 => 278416)
--- trunk/Source/WebKitLegacy/win/WebFrame.cpp 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebKitLegacy/win/WebFrame.cpp 2021-06-03 19:59:29 UTC (rev 278416)
@@ -321,7 +321,6 @@
view->updateLayoutAndStyleIfNeededRecursive();
GraphicsContextWin gc(deviceContext);
- gc.setShouldIncludeChildWindows(true);
gc.save();
LONG width = rect.right - rect.left;
LONG height = rect.bottom - rect.top;
@@ -352,7 +351,6 @@
view->updateLayoutAndStyleIfNeededRecursive();
GraphicsContextWin gc(deviceContext);
- gc.setShouldIncludeChildWindows(true);
gc.save();
IntRect dirtyRect(rect);
dirtyRect.move(-pt.x, -pt.y);
@@ -1808,7 +1806,6 @@
headerAndFooterHeights(&headerHeight, &footerHeight);
#if USE(CG) || USE(CAIRO)
GraphicsContextWin spoolCtx(pctx);
- spoolCtx.setShouldIncludeChildWindows(true);
for (UINT ii = startPage; ii < endPage; ii++)
spoolPage(pctx, spoolCtx, printDC, ui.get(), headerHeight, footerHeight, ii, pageCount);
Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (278415 => 278416)
--- trunk/Source/WebKitLegacy/win/WebView.cpp 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp 2021-06-03 19:59:29 UTC (rev 278416)
@@ -1130,7 +1130,7 @@
rects.append(*rect);
}
-void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStoreCompletelyDirty, WindowsToPaint windowsToPaint)
+void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStoreCompletelyDirty)
{
ASSERT(!isAcceleratedCompositing());
@@ -1172,7 +1172,7 @@
}
for (unsigned i = 0; i < paintRects.size(); ++i)
- paintIntoBackingStore(frameView, bitmapDC, paintRects[i], windowsToPaint);
+ paintIntoBackingStore(frameView, bitmapDC, paintRects[i]);
if (m_uiDelegatePrivate)
m_uiDelegatePrivate->webViewPainted(this);
@@ -1304,23 +1304,16 @@
GDIObject<HRGN> region;
int regionType = NULLREGION;
PAINTSTRUCT ps;
- WindowsToPaint windowsToPaint;
if (!dc) {
region = adoptGDIObject(::CreateRectRgn(0, 0, 0, 0));
regionType = GetUpdateRgn(m_viewWindow, region.get(), false);
hdc = BeginPaint(m_viewWindow, &ps);
rcPaint = ps.rcPaint;
- // We're painting to the screen, and our child windows can handle
- // painting themselves to the screen.
- windowsToPaint = PaintWebViewOnly;
} else {
hdc = dc;
::GetClientRect(m_viewWindow, &rcPaint);
if (options & PRF_ERASEBKGND)
::FillRect(hdc, &rcPaint, (HBRUSH)GetStockObject(WHITE_BRUSH));
- // Since we aren't painting to the screen, we want to paint all our
- // children into the HDC.
- windowsToPaint = PaintWebViewAndChildren;
}
bool backingStoreCompletelyDirty = ensureBackingStore();
@@ -1334,7 +1327,7 @@
HGDIOBJ oldBitmap = ::SelectObject(bitmapDC.get(), m_backingStoreBitmap->get());
// Update our backing store if needed.
- updateBackingStore(frameView, bitmapDC.get(), backingStoreCompletelyDirty, windowsToPaint);
+ updateBackingStore(frameView, bitmapDC.get(), backingStoreCompletelyDirty);
// Now we blit the updated backing store
IntRect windowDirtyRect = rcPaint;
@@ -1370,7 +1363,7 @@
deleteBackingStoreSoon();
}
-void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const IntRect& dirtyRectPixels, WindowsToPaint windowsToPaint)
+void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const IntRect& dirtyRectPixels)
{
// FIXME: This function should never be called in accelerated compositing mode, and we should
// assert as such. But currently it *is* sometimes called, so we can't assert yet. See
@@ -1407,7 +1400,6 @@
#endif
GraphicsContextWin gc(bitmapDC, m_transparent);
- gc.setShouldIncludeChildWindows(windowsToPaint == PaintWebViewAndChildren);
gc.save();
if (m_transparent)
gc.clearRect(logicalDirtyRect);
Modified: trunk/Source/WebKitLegacy/win/WebView.h (278415 => 278416)
--- trunk/Source/WebKitLegacy/win/WebView.h 2021-06-03 19:40:39 UTC (rev 278415)
+++ trunk/Source/WebKitLegacy/win/WebView.h 2021-06-03 19:59:29 UTC (rev 278416)
@@ -550,9 +550,8 @@
void sizeChanged(const WebCore::IntSize&);
bool dpiChanged(float, const WebCore::IntSize&);
- enum WindowsToPaint { PaintWebViewOnly, PaintWebViewAndChildren };
- void paintIntoBackingStore(WebCore::FrameView*, HDC bitmapDC, const WebCore::IntRect& dirtyRect, WindowsToPaint);
- void updateBackingStore(WebCore::FrameView*, HDC = 0, bool backingStoreCompletelyDirty = false, WindowsToPaint = PaintWebViewOnly);
+ void paintIntoBackingStore(WebCore::FrameView*, HDC bitmapDC, const WebCore::IntRect& dirtyRect);
+ void updateBackingStore(WebCore::FrameView*, HDC = 0, bool backingStoreCompletelyDirty = false);
void performLayeredWindowUpdate();