Changeset 247245 in webkit
- Timestamp:
- Jul 8, 2019 6:07:18 PM (5 years ago)
- Location:
- trunk/Source/WebKitLegacy/win
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKitLegacy/win/ChangeLog
r247043 r247245 1 2019-07-08 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [WinCairo] ASSERTION FAILED: info.bmBitsPixel == 32 in createCairoContextWithHDC 4 https://bugs.webkit.org/show_bug.cgi?id=198323 5 6 Reviewed by Per Arne Vollan. 7 8 WebView::paint binds m_backingStoreBitmap to a DC by using 9 SelectObject. WebView::paint can be called recursively, but 10 m_backingStoreBitmap can't be bound to multiple DCs at the same 11 time. Then, SelectObject was failing in such case. 12 13 Call WebCore::Page::updateRendering before binding 14 m_backingStoreBitmap instead of after it. 15 16 Reverted r202744 change which won't be needed since this change. 17 18 * WebView.cpp: 19 (WebView::scrollBackingStore): Removed r202744's change. 20 (WebView::updateBackingStore): Removed m_page->updateRendering(). 21 (WebView::paint): Do m_page->updateRendering() before binding m_backingStoreBitmap. 22 * WebView.h: Removed unused WebView::isPainting. 23 1 24 2019-07-02 Devin Rousso <drousso@apple.com> 2 25 -
trunk/Source/WebKitLegacy/win/WebView.cpp
r246960 r247245 1016 1016 auto bitmapDC = adoptGDIObject(::CreateCompatibleDC(windowDC)); 1017 1017 HGDIOBJ oldBitmap = ::SelectObject(bitmapDC.get(), m_backingStoreBitmap->get()); 1018 if (!oldBitmap) { 1019 // The ::SelectObject call will fail if m_backingStoreBitmap is already selected into a device context. 1020 // This happens when this method is called indirectly from WebView::updateBackingStore during normal WM_PAINT handling. 1021 // There is no point continuing, since we would just be scrolling a 1x1 bitmap which is selected into the device context by default. 1022 // We can just scroll by repainting the scroll rectangle. 1023 RECT scrollRect(scrollViewRect); 1024 ::InvalidateRect(m_viewWindow, &scrollRect, FALSE); 1025 return; 1026 } 1018 ASSERT(oldBitmap); 1027 1019 1028 1020 // Scroll the bitmap. … … 1165 1157 bitmapDC = bitmapDCObject.get(); 1166 1158 oldBitmap = ::SelectObject(bitmapDC, m_backingStoreBitmap->get()); 1159 ASSERT(oldBitmap); 1167 1160 #if USE(DIRECT2D) 1168 1161 HRESULT hr = m_backingStoreGdiInterop->GetDC(D2D1_DC_INITIALIZE_MODE_COPY, &bitmapDC); … … 1172 1165 1173 1166 if (m_backingStoreBitmap && (m_backingStoreDirtyRegion || backingStoreCompletelyDirty)) { 1174 // Do a layout first so that everything we render to the backing store is always current.1175 m_page->updateRendering();1176 1177 1167 Vector<IntRect> paintRects; 1178 1168 if (!backingStoreCompletelyDirty && m_backingStoreDirtyRegion) { … … 1305 1295 return; 1306 1296 } 1297 1298 m_page->updateRendering(); 1307 1299 1308 1300 Frame* coreFrame = core(m_mainFrame); … … 1342 1334 } 1343 1335 1344 m_paintCount++;1345 1346 1336 auto bitmapDC = adoptGDIObject(::CreateCompatibleDC(hdc)); 1347 1337 HGDIOBJ oldBitmap = ::SelectObject(bitmapDC.get(), m_backingStoreBitmap->get()); … … 1377 1367 m_backingStoreGdiInterop->ReleaseDC(nullptr); 1378 1368 #endif 1379 1380 m_paintCount--;1381 1369 1382 1370 if (active()) -
trunk/Source/WebKitLegacy/win/WebView.h
r245950 r247245 476 476 bool handleEditingKeyboardEvent(WebCore::KeyboardEvent&); 477 477 478 bool isPainting() const { return m_paintCount > 0; }479 480 478 void setToolTip(const WTF::String&); 481 479 … … 671 669 UChar m_currentCharacterCode { 0 }; 672 670 bool m_isBeingDestroyed { false }; 673 unsigned m_paintCount { 0 };674 671 bool m_hasSpellCheckerDocumentTag { false }; 675 672 bool m_didClose { false };
Note: See TracChangeset
for help on using the changeset viewer.