Changeset 185172 in webkit
- Timestamp:
- Jun 3, 2015, 3:32:40 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r185171 r185172 1 2015-06-03 Dean Jackson <dino@apple.com> 2 3 Crash in GraphicsContext3D::getInternalFramebufferSize 4 https://bugs.webkit.org/show_bug.cgi?id=145479 5 <rdar://problem/16461048> 6 7 Reviewed by Eric Carlson. 8 9 Attemps to use a WebGL context while it is in the pending state. 10 11 * fast/canvas/webgl/useWhilePending-expected.txt: Added. 12 * fast/canvas/webgl/useWhilePending.html: Added. 13 1 14 2015-06-03 Daniel Bates <dabates@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r185167 r185172 1 2015-06-03 Dean Jackson <dino@apple.com> 2 3 Crash in GraphicsContext3D::getInternalFramebufferSize 4 https://bugs.webkit.org/show_bug.cgi?id=145479 5 <rdar://problem/16461048> 6 7 Reviewed by Eric Carlson. 8 9 If we are in an unitialized or lost state, don't try to access the context. 10 11 In order to test this, I added an Internal setting that always 12 forces WebGL into a pending state. 13 14 Test: fast/canvas/webgl/useWhilePending.html 15 16 * html/canvas/WebGLRenderingContextBase.cpp: 17 (WebCore::WebGLRenderingContextBase::create): Check internal settings for 18 a forced pending state. 19 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state. 20 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto. 21 * page/Settings.cpp: New Internal setting for forcing a pending policy. 22 (WebCore::Settings::Settings): 23 (WebCore::Settings::setForcePendingWebGLPolicy): 24 * page/Settings.h: 25 (WebCore::Settings::isForcePendingWebGLPolicy): 26 * testing/InternalSettings.cpp: 27 (WebCore::InternalSettings::Backup::Backup): 28 (WebCore::InternalSettings::Backup::restoreTo): 29 (WebCore::InternalSettings::setForcePendingWebGLPolicy): 30 * testing/InternalSettings.h: 31 * testing/InternalSettings.idl: 32 1 33 2015-06-03 Hunseop Jeong <hs85.jeong@samsung.com> 2 34 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r185145 r185172 363 363 Document& topDocument = document.topDocument(); 364 364 Page* page = topDocument.page(); 365 if (page && !topDocument.url().isLocalFile()) { 366 WebGLLoadPolicy policy = page->mainFrame().loader().client().webGLPolicyForURL(topDocument.url()); 365 bool forcingPendingPolicy = frame->settings().isForcePendingWebGLPolicy(); 366 367 if (forcingPendingPolicy || (page && !topDocument.url().isLocalFile())) { 368 WebGLLoadPolicy policy = forcingPendingPolicy ? WebGLPendingCreation : page->mainFrame().loader().client().webGLPolicyForURL(topDocument.url()); 367 369 368 370 if (policy == WebGLBlockCreation) { … … 401 403 else 402 404 renderingContext = std::unique_ptr<WebGLRenderingContext>(new WebGLRenderingContext(canvas, attributes)); 405 renderingContext->suspendIfNeeded(); 403 406 return renderingContext; 404 407 } … … 780 783 int WebGLRenderingContextBase::drawingBufferWidth() const 781 784 { 785 if (m_isPendingPolicyResolution && !m_hasRequestedPolicyResolution) 786 return 0; 787 782 788 return m_context->getInternalFramebufferSize().width(); 783 789 } … … 785 791 int WebGLRenderingContextBase::drawingBufferHeight() const 786 792 { 793 if (m_isPendingPolicyResolution && !m_hasRequestedPolicyResolution) 794 return 0; 795 787 796 return m_context->getInternalFramebufferSize().height(); 788 797 } -
trunk/Source/WebCore/page/Settings.cpp
r185145 r185172 202 202 , m_hiddenPageCSSAnimationSuspensionEnabled(false) 203 203 , m_fontFallbackPrefersPictographs(false) 204 , m_forcePendingWebGLPolicy(false) 204 205 { 205 206 // A Frame may not have been created yet, so we initialize the AtomicString … … 425 426 } 426 427 428 void Settings::setForcePendingWebGLPolicy(bool forced) 429 { 430 m_forcePendingWebGLPolicy = forced; 431 } 432 427 433 void Settings::setPluginsEnabled(bool arePluginsEnabled) 428 434 { -
trunk/Source/WebCore/page/Settings.h
r185145 r185172 271 271 #endif 272 272 273 WEBCORE_EXPORT void setForcePendingWebGLPolicy(bool); 274 bool isForcePendingWebGLPolicy() const { return m_forcePendingWebGLPolicy; } 275 273 276 private: 274 277 explicit Settings(Page*); … … 324 327 bool m_fontFallbackPrefersPictographs : 1; 325 328 329 bool m_forcePendingWebGLPolicy : 1; 330 326 331 #if USE(AVFOUNDATION) 327 332 WEBCORE_EXPORT static bool gAVFoundationEnabled; -
trunk/Source/WebCore/testing/InternalSettings.cpp
r185145 r185172 86 86 #endif 87 87 , m_defaultVideoPosterURL(settings.defaultVideoPosterURL()) 88 , m_forcePendingWebGLPolicy(settings.isForcePendingWebGLPolicy()) 88 89 , m_originalTimeWithoutMouseMovementBeforeHidingControls(settings.timeWithoutMouseMovementBeforeHidingControls()) 89 90 , m_useLegacyBackgroundSizeShorthandBehavior(settings.useLegacyBackgroundSizeShorthandBehavior()) … … 153 154 #endif 154 155 settings.setDefaultVideoPosterURL(m_defaultVideoPosterURL); 156 settings.setForcePendingWebGLPolicy(m_forcePendingWebGLPolicy); 155 157 settings.setTimeWithoutMouseMovementBeforeHidingControls(m_originalTimeWithoutMouseMovementBeforeHidingControls); 156 158 settings.setUseLegacyBackgroundSizeShorthandBehavior(m_useLegacyBackgroundSizeShorthandBehavior); … … 211 213 page()->setPageScaleFactor(1, IntPoint(0, 0)); 212 214 page()->setCanStartMedia(true); 215 page()->settings().setForcePendingWebGLPolicy(false); 213 216 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 214 217 m_page->settings().setAllowsAirPlayForMediaPlayback(false); … … 469 472 } 470 473 474 void InternalSettings::setForcePendingWebGLPolicy(bool forced, ExceptionCode& ec) 475 { 476 InternalSettingsGuardForSettings(); 477 settings()->setForcePendingWebGLPolicy(forced); 478 } 479 471 480 void InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls(double time, ExceptionCode& ec) 472 481 { -
trunk/Source/WebCore/testing/InternalSettings.h
r185145 r185172 84 84 #endif 85 85 String m_defaultVideoPosterURL; 86 bool m_forcePendingWebGLPolicy; 86 87 bool m_originalTimeWithoutMouseMovementBeforeHidingControls; 87 88 bool m_useLegacyBackgroundSizeShorthandBehavior; … … 135 136 void setMinimumTimerInterval(double intervalInSeconds, ExceptionCode&); 136 137 void setDefaultVideoPosterURL(const String& url, ExceptionCode&); 138 void setForcePendingWebGLPolicy(bool, ExceptionCode&); 137 139 void setTimeWithoutMouseMovementBeforeHidingControls(double time, ExceptionCode&); 138 140 void setUseLegacyBackgroundSizeShorthandBehavior(bool, ExceptionCode&); -
trunk/Source/WebCore/testing/InternalSettings.idl
r185145 r185172 1 1 /* 2 2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2015 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 56 57 void setWirelessPlaybackDisabled(boolean available); 57 58 59 [RaisesException] void setForcePendingWebGLPolicy(boolean forced); 60 58 61 void setPluginReplacementEnabled(boolean enabled); 59 62
Note:
See TracChangeset
for help on using the changeset viewer.