Title: [151259] trunk/Source/WebCore
- Revision
- 151259
- Author
- [email protected]
- Date
- 2013-06-05 21:42:47 -0700 (Wed, 05 Jun 2013)
Log Message
Revert the second half of r151257. WebGLRenderingContext::create can return null.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (151258 => 151259)
--- trunk/Source/WebCore/ChangeLog 2013-06-06 04:40:15 UTC (rev 151258)
+++ trunk/Source/WebCore/ChangeLog 2013-06-06 04:42:47 UTC (rev 151259)
@@ -1,5 +1,12 @@
2013-06-05 Ryosuke Niwa <[email protected]>
+ Revert the second half of r151257. WebGLRenderingContext::create can return null.
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+
+2013-06-05 Ryosuke Niwa <[email protected]>
+
Remove unnecessary null check in HTMLCanvasElement.cpp.
Rubber-stamped by Benjamin Poulain.
Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (151258 => 151259)
--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp 2013-06-06 04:40:15 UTC (rev 151258)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp 2013-06-06 04:42:47 UTC (rev 151259)
@@ -209,8 +209,10 @@
return 0;
if (!m_context) {
m_context = WebGLRenderingContext::create(this, static_cast<WebGLContextAttributes*>(attrs));
- // Need to make sure a RenderLayer and compositing layer get created for the Canvas
- setNeedsStyleRecalc(SyntheticStyleChange);
+ if (m_context) {
+ // Need to make sure a RenderLayer and compositing layer get created for the Canvas
+ setNeedsStyleRecalc(SyntheticStyleChange);
+ }
}
return m_context.get();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes