Title: [147945] trunk/Source/WebKit/blackberry
- Revision
- 147945
- Author
- [email protected]
- Date
- 2013-04-08 13:05:42 -0700 (Mon, 08 Apr 2013)
Log Message
[BlackBerry] More null checks for m_mainFrame
https://bugs.webkit.org/show_bug.cgi?id=114172
Patch by Jakob Petsovits <[email protected]> on 2013-04-08
Reviewed by Rob Buis.
After r147744, some unit tests were crashing on WebPage
shutdown, because BackingStorePrivate::repaint() now uses
pixelContentsRect() (accessing m_webPage->contentsRect())
instead of BackingStoreClient::contentsRect(). In m_webPage,
m_mainFrame had already been set to 0.
Make us more robust against these errors by checking
the existence of m_mainFrame more diligently.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
(BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
(BlackBerry::WebKit::WebPagePrivate::contentsSize):
(BlackBerry::WebKit::WebPagePrivate::absoluteVisibleOverflowSize):
(BlackBerry::WebKit::WebPagePrivate::setViewMode):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (147944 => 147945)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2013-04-08 19:35:52 UTC (rev 147944)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2013-04-08 20:05:42 UTC (rev 147945)
@@ -1177,7 +1177,7 @@
bool WebPagePrivate::shouldZoomAboutPoint(double scale, const FloatPoint&, bool enforceScaleClamping, double* clampedScale)
{
- if (!m_mainFrame->view())
+ if (!m_mainFrame || !m_mainFrame->view())
return false;
if (enforceScaleClamping)
@@ -1381,7 +1381,7 @@
bool WebPagePrivate::shouldSendResizeEvent()
{
- if (!m_mainFrame->document())
+ if (!m_mainFrame || !m_mainFrame->document())
return false;
// PR#96865 : Provide an option to always send resize events, regardless of the loading
@@ -1518,7 +1518,7 @@
IntSize WebPagePrivate::contentsSize() const
{
- if (!m_mainFrame->view())
+ if (!m_mainFrame || !m_mainFrame->view())
return IntSize();
return m_backingStoreClient->contentsSize();
@@ -1526,7 +1526,7 @@
IntSize WebPagePrivate::absoluteVisibleOverflowSize() const
{
- if (!m_mainFrame->contentRenderer())
+ if (!m_mainFrame || !m_mainFrame->contentRenderer())
return IntSize();
return IntSize(m_mainFrame->contentRenderer()->rightAbsoluteVisibleOverflow(), m_mainFrame->contentRenderer()->bottomAbsoluteVisibleOverflow());
@@ -1859,7 +1859,7 @@
bool WebPagePrivate::setViewMode(ViewMode mode)
{
- if (!m_mainFrame->view())
+ if (!m_mainFrame || !m_mainFrame->view())
return false;
m_viewMode = mode;
Modified: trunk/Source/WebKit/blackberry/ChangeLog (147944 => 147945)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-04-08 19:35:52 UTC (rev 147944)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-04-08 20:05:42 UTC (rev 147945)
@@ -1,3 +1,26 @@
+2013-04-08 Jakob Petsovits <[email protected]>
+
+ [BlackBerry] More null checks for m_mainFrame
+ https://bugs.webkit.org/show_bug.cgi?id=114172
+
+ Reviewed by Rob Buis.
+
+ After r147744, some unit tests were crashing on WebPage
+ shutdown, because BackingStorePrivate::repaint() now uses
+ pixelContentsRect() (accessing m_webPage->contentsRect())
+ instead of BackingStoreClient::contentsRect(). In m_webPage,
+ m_mainFrame had already been set to 0.
+
+ Make us more robust against these errors by checking
+ the existence of m_mainFrame more diligently.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
+ (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
+ (BlackBerry::WebKit::WebPagePrivate::contentsSize):
+ (BlackBerry::WebKit::WebPagePrivate::absoluteVisibleOverflowSize):
+ (BlackBerry::WebKit::WebPagePrivate::setViewMode):
+
2013-04-08 Iris Wu <[email protected]>
[BlackBerry] Force horizontal list to be horizontal scrollable.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes