* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151259
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-06-05 Ryosuke Niwa <rniwa@webkit.org>
+
+ Revert the second half of r151257. WebGLRenderingContext::create can return null.
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+
2013-06-05 Ryosuke Niwa <rniwa@webkit.org>
Remove unnecessary null check in HTMLCanvasElement.cpp.
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();
}