Title: [197452] trunk/Source/WebKit2
- Revision
- 197452
- Author
- [email protected]
- Date
- 2016-03-02 09:59:34 -0800 (Wed, 02 Mar 2016)
Log Message
REGRESSION(r197409): [GTK] Web process always crashes on WebPage construction after r197409
https://bugs.webkit.org/show_bug.cgi?id=154918
Reviewed by Žan Doberšek.
We have an incorrect check in DrawingAreaImpl constructor that has
never actually worked because it uses the page settings before
they were initialized. But that has been fixed in r197409 and now
we are always forcing accelerated compositing mode incorrectly,
because m_alwaysUseCompositing is set in the constructor and never
changed again.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl): Remove code to set
settings and m_alwaysUseCompositing, since that should be done in
updatePreferences().
(WebKit::DrawingAreaImpl::updatePreferences): Update the settings
accordingly and always update m_alwaysUseCompositing when AC is
enabled and forced in the settings.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): WebPage::updatePreferences() calls
DrawingArea::updatePreferences(), but since r197409 it happens
before the drawing area has been created. So, call
DrawingArea::updatePreferences() in the constructor right after
the main frame has been created, since
DrawingArea::updatePreferences() uses the main frame.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (197451 => 197452)
--- trunk/Source/WebKit2/ChangeLog 2016-03-02 17:32:28 UTC (rev 197451)
+++ trunk/Source/WebKit2/ChangeLog 2016-03-02 17:59:34 UTC (rev 197452)
@@ -1,3 +1,32 @@
+2016-03-02 Carlos Garcia Campos <[email protected]>
+
+ REGRESSION(r197409): [GTK] Web process always crashes on WebPage construction after r197409
+ https://bugs.webkit.org/show_bug.cgi?id=154918
+
+ Reviewed by Žan Doberšek.
+
+ We have an incorrect check in DrawingAreaImpl constructor that has
+ never actually worked because it uses the page settings before
+ they were initialized. But that has been fixed in r197409 and now
+ we are always forcing accelerated compositing mode incorrectly,
+ because m_alwaysUseCompositing is set in the constructor and never
+ changed again.
+
+ * WebProcess/WebPage/DrawingAreaImpl.cpp:
+ (WebKit::DrawingAreaImpl::DrawingAreaImpl): Remove code to set
+ settings and m_alwaysUseCompositing, since that should be done in
+ updatePreferences().
+ (WebKit::DrawingAreaImpl::updatePreferences): Update the settings
+ accordingly and always update m_alwaysUseCompositing when AC is
+ enabled and forced in the settings.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage): WebPage::updatePreferences() calls
+ DrawingArea::updatePreferences(), but since r197409 it happens
+ before the drawing area has been created. So, call
+ DrawingArea::updatePreferences() in the constructor right after
+ the main frame has been created, since
+ DrawingArea::updatePreferences() uses the main frame.
+
2016-02-29 Ada Chan <[email protected]>
Adopt the new version of AVOutputDeviceMenuController's showMenuForRect method.
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp (197451 => 197452)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2016-03-02 17:32:28 UTC (rev 197451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2016-03-02 17:59:34 UTC (rev 197452)
@@ -68,16 +68,6 @@
, m_displayTimer(RunLoop::main(), this, &DrawingAreaImpl::displayTimerFired)
, m_exitCompositingTimer(RunLoop::main(), this, &DrawingAreaImpl::exitAcceleratedCompositingMode)
{
-
-#if USE(COORDINATED_GRAPHICS_THREADED)
- webPage.corePage()->settings().setForceCompositingMode(true);
-#endif
-
- if (webPage.corePage()->settings().acceleratedDrawingEnabled() || webPage.corePage()->settings().forceCompositingMode())
- m_alwaysUseCompositing = true;
-
- if (m_alwaysUseCompositing)
- enterAcceleratedCompositingMode(0);
}
void DrawingAreaImpl::setNeedsDisplay()
@@ -257,6 +247,10 @@
settings.setAcceleratedCompositingForFixedPositionEnabled(true);
settings.setFixedPositionCreatesStackingContext(true);
#endif
+
+ m_alwaysUseCompositing = settings.acceleratedDrawingEnabled() && settings.forceCompositingMode();
+ if (m_alwaysUseCompositing && !m_layerTreeHost)
+ enterAcceleratedCompositingMode(nullptr);
}
void DrawingAreaImpl::layerHostDidFlushLayers()
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (197451 => 197452)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-03-02 17:32:28 UTC (rev 197451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-03-02 17:59:34 UTC (rev 197452)
@@ -418,6 +418,7 @@
#endif
m_mainFrame = WebFrame::createWithCoreMainFrame(this, &m_page->mainFrame());
+ m_drawingArea->updatePreferences(parameters.store);
#if ENABLE(BATTERY_STATUS)
WebCore::provideBatteryTo(m_page.get(), new WebBatteryClient(this));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes