Changeset 278416 in webkit
- Timestamp:
- Jun 3, 2021, 12:59:29 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/GraphicsContext.h (modified) (2 diffs)
-
WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h (modified) (1 diff)
-
WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h (modified) (2 diffs)
-
WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h (modified) (1 diff)
-
WebCore/platform/graphics/win/GraphicsContextWin.cpp (modified) (1 diff)
-
WebKitLegacy/win/ChangeLog (modified) (1 diff)
-
WebKitLegacy/win/WebFrame.cpp (modified) (3 diffs)
-
WebKitLegacy/win/WebView.cpp (modified) (8 diffs)
-
WebKitLegacy/win/WebView.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r278415 r278416 1 2021-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 1 21 2021-06-03 Youenn Fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
r278328 r278416 538 538 // put code shared between Windows CG and Windows Cairo backends. 539 539 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) 551 541 552 542 #if USE(DIRECT2D) … … 569 559 ID2D1SolidColorBrush* brushWithColor(const Color&); 570 560 #endif 571 #else // PLATFORM(WIN)572 bool shouldIncludeChildWindows() const { return false; }573 #endif // PLATFORM(WIN)574 #endif // OS(WINDOWS)575 561 576 562 private: -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
r278148 r278416 68 68 // NOTE: These may note be needed: review and remove once Cairo implementation is complete 69 69 HDC m_hdc { 0 }; 70 bool m_shouldIncludeChildWindows { false };71 70 #endif 72 71 }; -
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h
r274252 r278416 46 46 #if PLATFORM(WIN) 47 47 , m_hdc(0) 48 , m_shouldIncludeChildWindows(false)49 48 #endif 50 49 , m_userToDeviceTransformKnownToBeIdentity(false) … … 81 80 82 81 HDC m_hdc; 83 bool m_shouldIncludeChildWindows;84 82 #endif 85 83 -
trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h
r248444 r278416 80 80 81 81 HDC m_hdc { nullptr }; 82 bool m_shouldIncludeChildWindows { false };83 82 84 83 float currentGlobalAlpha() const; -
trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp
r278328 r278416 53 53 memset(bmpInfo.bmBits, 0, bufferSize); 54 54 } 55 56 #if PLATFORM(WIN)57 void GraphicsContext::setShouldIncludeChildWindows(bool include)58 {59 deprecatedPrivateContext()->m_shouldIncludeChildWindows = include;60 }61 62 bool GraphicsContext::shouldIncludeChildWindows() const63 {64 return deprecatedPrivateContext()->m_shouldIncludeChildWindows;65 }66 #endif67 55 68 56 HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend) -
trunk/Source/WebKitLegacy/win/ChangeLog
r278265 r278416 1 2021-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 1 18 2021-05-30 Darin Adler <darin@apple.com> 2 19 -
trunk/Source/WebKitLegacy/win/WebFrame.cpp
r278265 r278416 322 322 323 323 GraphicsContextWin gc(deviceContext); 324 gc.setShouldIncludeChildWindows(true);325 324 gc.save(); 326 325 LONG width = rect.right - rect.left; … … 353 352 354 353 GraphicsContextWin gc(deviceContext); 355 gc.setShouldIncludeChildWindows(true);356 354 gc.save(); 357 355 IntRect dirtyRect(rect); … … 1809 1807 #if USE(CG) || USE(CAIRO) 1810 1808 GraphicsContextWin spoolCtx(pctx); 1811 spoolCtx.setShouldIncludeChildWindows(true);1812 1809 1813 1810 for (UINT ii = startPage; ii < endPage; ii++) -
trunk/Source/WebKitLegacy/win/WebView.cpp
r278265 r278416 1131 1131 } 1132 1132 1133 void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStoreCompletelyDirty , WindowsToPaint windowsToPaint)1133 void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStoreCompletelyDirty) 1134 1134 { 1135 1135 ASSERT(!isAcceleratedCompositing()); … … 1173 1173 1174 1174 for (unsigned i = 0; i < paintRects.size(); ++i) 1175 paintIntoBackingStore(frameView, bitmapDC, paintRects[i] , windowsToPaint);1175 paintIntoBackingStore(frameView, bitmapDC, paintRects[i]); 1176 1176 1177 1177 if (m_uiDelegatePrivate) … … 1305 1305 int regionType = NULLREGION; 1306 1306 PAINTSTRUCT ps; 1307 WindowsToPaint windowsToPaint;1308 1307 if (!dc) { 1309 1308 region = adoptGDIObject(::CreateRectRgn(0, 0, 0, 0)); … … 1311 1310 hdc = BeginPaint(m_viewWindow, &ps); 1312 1311 rcPaint = ps.rcPaint; 1313 // We're painting to the screen, and our child windows can handle1314 // painting themselves to the screen.1315 windowsToPaint = PaintWebViewOnly;1316 1312 } else { 1317 1313 hdc = dc; … … 1319 1315 if (options & PRF_ERASEBKGND) 1320 1316 ::FillRect(hdc, &rcPaint, (HBRUSH)GetStockObject(WHITE_BRUSH)); 1321 // Since we aren't painting to the screen, we want to paint all our1322 // children into the HDC.1323 windowsToPaint = PaintWebViewAndChildren;1324 1317 } 1325 1318 … … 1335 1328 1336 1329 // Update our backing store if needed. 1337 updateBackingStore(frameView, bitmapDC.get(), backingStoreCompletelyDirty , windowsToPaint);1330 updateBackingStore(frameView, bitmapDC.get(), backingStoreCompletelyDirty); 1338 1331 1339 1332 // Now we blit the updated backing store … … 1371 1364 } 1372 1365 1373 void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const IntRect& dirtyRectPixels , WindowsToPaint windowsToPaint)1366 void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const IntRect& dirtyRectPixels) 1374 1367 { 1375 1368 // FIXME: This function should never be called in accelerated compositing mode, and we should … … 1408 1401 1409 1402 GraphicsContextWin gc(bitmapDC, m_transparent); 1410 gc.setShouldIncludeChildWindows(windowsToPaint == PaintWebViewAndChildren);1411 1403 gc.save(); 1412 1404 if (m_transparent) -
trunk/Source/WebKitLegacy/win/WebView.h
r268647 r278416 551 551 bool dpiChanged(float, const WebCore::IntSize&); 552 552 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); 556 555 557 556 void performLayeredWindowUpdate();
Note:
See TracChangeset
for help on using the changeset viewer.