WebKit Bugzilla
Attachment 373379 Details for
Bug 198323
: [WinCairo] ASSERTION FAILED: info.bmBitsPixel == 32 in createCairoContextWithHDC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198323-20190703124937.patch (text/plain), 5.17 KB, created by
Fujii Hironori
on 2019-07-02 20:49:39 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-07-02 20:49:39 PDT
Size:
5.17 KB
patch
obsolete
>Subversion Revision: 247086 >diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog >index a3b003cc83e668a7e6b9fda415cab98c60048b6c..a10a9c52128f9458bf27f29b18142c3585169744 100644 >--- a/Source/WebKitLegacy/win/ChangeLog >+++ b/Source/WebKitLegacy/win/ChangeLog >@@ -1,3 +1,26 @@ >+2019-07-02 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [WinCairo] ASSERTION FAILED: info.bmBitsPixel == 32 in createCairoContextWithHDC >+ https://bugs.webkit.org/show_bug.cgi?id=198323 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WebView::paint binds m_backingStoreBitmap to a DC by using >+ SelectObject. WebView::paint can be called recursively, but >+ m_backingStoreBitmap can't be bound to multiple DCs at the same >+ time. Then, SelectObject was failing in such case. >+ >+ Call WebCore::Page::updateRendering before binding >+ m_backingStoreBitmap instead of after it. >+ >+ Reverted r202744 change which won't be needed since this change. >+ >+ * WebView.cpp: >+ (WebView::scrollBackingStore): Removed r202744's change. >+ (WebView::updateBackingStore): Removed m_page->updateRendering(). >+ (WebView::paint): Do m_page->updateRendering() before binding m_backingStoreBitmap. >+ * WebView.h: Removed unused WebView::isPainting. >+ > 2019-07-02 Devin Rousso <drousso@apple.com> > > Web Inspector: Debug: "Reset Web Inspector" should also clear the saved window size and attachment side >diff --git a/Source/WebKitLegacy/win/WebView.cpp b/Source/WebKitLegacy/win/WebView.cpp >index 002c6ebc5bff70c68a8d59bf49a90f5ffdb7e379..207a238c223224bf828fd9569501c67b1e82c3ba 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -1015,15 +1015,7 @@ void WebView::scrollBackingStore(FrameView* frameView, int logicalDx, int logica > HWndDC windowDC(m_viewWindow); > auto bitmapDC = adoptGDIObject(::CreateCompatibleDC(windowDC)); > HGDIOBJ oldBitmap = ::SelectObject(bitmapDC.get(), m_backingStoreBitmap->get()); >- if (!oldBitmap) { >- // The ::SelectObject call will fail if m_backingStoreBitmap is already selected into a device context. >- // This happens when this method is called indirectly from WebView::updateBackingStore during normal WM_PAINT handling. >- // There is no point continuing, since we would just be scrolling a 1x1 bitmap which is selected into the device context by default. >- // We can just scroll by repainting the scroll rectangle. >- RECT scrollRect(scrollViewRect); >- ::InvalidateRect(m_viewWindow, &scrollRect, FALSE); >- return; >- } >+ ASSERT(oldBitmap); > > // Scroll the bitmap. > RECT scrollRectWin(scrollViewRect); >@@ -1164,6 +1156,7 @@ void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore > bitmapDCObject = adoptGDIObject(::CreateCompatibleDC(windowDC)); > bitmapDC = bitmapDCObject.get(); > oldBitmap = ::SelectObject(bitmapDC, m_backingStoreBitmap->get()); >+ ASSERT(oldBitmap); > #if USE(DIRECT2D) > HRESULT hr = m_backingStoreGdiInterop->GetDC(D2D1_DC_INITIALIZE_MODE_COPY, &bitmapDC); > RELEASE_ASSERT(SUCCEEDED(hr)); >@@ -1171,9 +1164,6 @@ void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore > } > > if (m_backingStoreBitmap && (m_backingStoreDirtyRegion || backingStoreCompletelyDirty)) { >- // Do a layout first so that everything we render to the backing store is always current. >- m_page->updateRendering(); >- > Vector<IntRect> paintRects; > if (!backingStoreCompletelyDirty && m_backingStoreDirtyRegion) { > RECT regionBox; >@@ -1305,6 +1295,8 @@ void WebView::paint(HDC dc, LPARAM options) > return; > } > >+ m_page->updateRendering(); >+ > Frame* coreFrame = core(m_mainFrame); > if (!coreFrame) > return; >@@ -1341,8 +1333,6 @@ void WebView::paint(HDC dc, LPARAM options) > return; > } > >- m_paintCount++; >- > auto bitmapDC = adoptGDIObject(::CreateCompatibleDC(hdc)); > HGDIOBJ oldBitmap = ::SelectObject(bitmapDC.get(), m_backingStoreBitmap->get()); > >@@ -1377,8 +1367,6 @@ void WebView::paint(HDC dc, LPARAM options) > m_backingStoreGdiInterop->ReleaseDC(nullptr); > #endif > >- m_paintCount--; >- > if (active()) > cancelDeleteBackingStoreSoon(); > else >diff --git a/Source/WebKitLegacy/win/WebView.h b/Source/WebKitLegacy/win/WebView.h >index 1084d4063e29c3697a5f7af8ef7c52f51af90a9a..8363772c0063024ca335b5a3334cb5a4a51b283d 100644 >--- a/Source/WebKitLegacy/win/WebView.h >+++ b/Source/WebKitLegacy/win/WebView.h >@@ -475,8 +475,6 @@ public: > const char* interpretKeyEvent(const WebCore::KeyboardEvent*); > bool handleEditingKeyboardEvent(WebCore::KeyboardEvent&); > >- bool isPainting() const { return m_paintCount > 0; } >- > void setToolTip(const WTF::String&); > > void registerForIconNotification(bool listen); >@@ -670,7 +668,6 @@ protected: > COMPtr<IDropTargetHelper> m_dropTargetHelper; > UChar m_currentCharacterCode { 0 }; > bool m_isBeingDestroyed { false }; >- unsigned m_paintCount { 0 }; > bool m_hasSpellCheckerDocumentTag { false }; > bool m_didClose { false }; > bool m_hasCustomDropTarget { false };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198323
:
370834
|
373004
|
373012
|
373201
|
373209
| 373379