Changeset 162007 in webkit
- Timestamp:
- Jan 14, 2014 2:13:33 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r162001 r162007 1 2014-01-14 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r162000. 4 http://trac.webkit.org/changeset/162000 5 https://bugs.webkit.org/show_bug.cgi?id=127009 6 7 API versioning is wrong (Requested by rfong on #webkit). 8 9 * WebCore.xcodeproj/project.pbxproj: 10 * html/HTMLCanvasElement.cpp: 11 (WebCore::HTMLCanvasElement::getContext): 12 * loader/FrameLoaderClient.h: 13 * loader/FrameLoaderTypes.h: 14 * page/ChromeClient.h: 15 1 16 2014-01-14 Bear Travis <betravis@adobe.com> 2 17 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r162000 r162007 3242 3242 93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A640F00533BB1F0085E777 /* BlockExceptions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3243 3243 93F199DE08245E59001E9ABC /* Position.h in Headers */ = {isa = PBXBuildFile; fileRef = BE91FC8B06133666005E3790 /* Position.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3244 93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */; settings = {ATTRIBUTES = (Private, ); };};3244 93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */; }; 3245 3245 93F199EC08245E59001E9ABC /* XSLStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BC06F24A06D18A7E004A6FA3 /* XSLStyleSheet.h */; }; 3246 3246 93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC06F24C06D18A7E004A6FA3 /* XSLTProcessor.h */; }; … … 23191 23191 93F1992F08245E59001E9ABC /* Cursor.h in Headers */, 23192 23192 BC2272A20E82E87C00E7F975 /* CursorData.h in Headers */, 23193 93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */,23194 23193 868160D618766A130021E79D /* UserActivity.h in Headers */, 23195 23194 BC2272AD0E82E8F300E7F975 /* CursorList.h in Headers */, … … 23955 23954 A8CFF7AA0A156978000A4234 /* HTMLBRElement.h in Headers */, 23956 23955 A81369D2097374F600D74463 /* HTMLButtonElement.h in Headers */, 23956 93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */, 23957 23957 07969DC017D14151007FF842 /* JSRTCStatsCallback.h in Headers */, 23958 23958 A8DF3FD0097FA0FC0052981B /* HTMLCollection.h in Headers */, -
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
r162000 r162007 34 34 #include "CanvasRenderingContext2D.h" 35 35 #include "Chrome.h" 36 #include "ChromeClient.h"37 36 #include "Document.h" 38 37 #include "ExceptionCode.h" 39 38 #include "Frame.h" 40 #include "FrameLoaderClient.h"41 39 #include "GraphicsContext.h" 42 40 #include "HTMLNames.h" 43 41 #include "ImageData.h" 44 42 #include "MIMETypeRegistry.h" 45 #include "MainFrame.h"46 43 #include "Page.h" 47 44 #include "RenderHTMLCanvas.h" … … 205 202 if (is2dType(type)) { 206 203 if (m_context && !m_context->is2d()) 207 return nullptr;204 return 0; 208 205 if (!m_context) { 209 206 bool usesDashbardCompatibilityMode = false; … … 227 224 return 0; 228 225 if (!m_context) { 229 Page* page = document().page();230 if (page && !document().url().isLocalFile()) {231 WebGLLoadPolicy policy = page->mainFrame().loader().client().webGLPolicyForHost(document().url().host());232 233 if (policy == WebGLAsk) {234 page->chrome().client().webGLContextCreated(this);235 return nullptr;236 }237 if (policy == WebGLBlock)238 return nullptr;239 }240 226 m_context = WebGLRenderingContext::create(this, static_cast<WebGLContextAttributes*>(attrs)); 241 227 if (m_context) { … … 250 236 UNUSED_PARAM(attrs); 251 237 #endif 252 return nullptr;238 return 0; 253 239 } 254 240 -
trunk/Source/WebCore/loader/FrameLoaderClient.h
r162000 r162007 332 332 // notification with the given GL_ARB_robustness guilt/innocence code (see Extensions3D.h). 333 333 virtual void didLoseWebGLContext(int) { } 334 virtual WebGLLoadPolicy webGLPolicyForHost(const String&) const { return WebGLAsk; }335 334 #endif 336 335 -
trunk/Source/WebCore/loader/FrameLoaderTypes.h
r162000 r162007 106 106 NotAboutToInstantiatePlugin 107 107 }; 108 109 enum WebGLLoadPolicy {110 WebGLAsk = 0,111 WebGLAllow,112 WebGLBlock113 };114 108 115 109 } -
trunk/Source/WebCore/page/ChromeClient.h
r162000 r162007 429 429 virtual void incrementActivePageCount() { } 430 430 virtual void decrementActivePageCount() { } 431 432 #if ENABLE(WEBGL)433 virtual void webGLContextCreated(Element*) const { }434 #endif435 431 436 432 protected: -
trunk/Source/WebKit2/ChangeLog
r162005 r162007 1 2014-01-14 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r162000. 4 http://trac.webkit.org/changeset/162000 5 https://bugs.webkit.org/show_bug.cgi?id=127009 6 7 API versioning is wrong (Requested by rfong on #webkit). 8 9 * UIProcess/API/C/WKAPICast.h: 10 * UIProcess/API/C/WKPageLoaderClient.h: 11 * UIProcess/API/C/WKPageUIClient.h: 12 * UIProcess/WebLoaderClient.cpp: 13 * UIProcess/WebLoaderClient.h: 14 * UIProcess/WebPageProxy.cpp: 15 * UIProcess/WebPageProxy.h: 16 * UIProcess/WebPageProxy.messages.in: 17 * UIProcess/WebUIClient.cpp: 18 * UIProcess/WebUIClient.h: 19 * UIProcess/mac/WebInspectorProxyMac.mm: 20 (WebKit::WebInspectorProxy::platformCreateInspectorPage): 21 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 22 * WebProcess/WebCoreSupport/WebChromeClient.h: 23 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 24 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 25 * WebProcess/WebPage/WebPage.cpp: 26 * WebProcess/WebPage/WebPage.h: 27 1 28 2014-01-14 Csaba Osztrogonác <ossy@webkit.org> 2 29 -
trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h
r162000 r162007 474 474 } 475 475 476 inline WebCore::WebGLLoadPolicy toWebGLLoadPolicy(WKWebGLLoadPolicy webGLLoadPolicy)477 {478 switch (webGLLoadPolicy) {479 case kWKWebGLLoadPolicyInactive:480 return WebCore::WebGLAsk;481 case kWKWebGLLoadPolicyLoadNormally:482 return WebCore::WebGLAllow;483 case kWKWebGLLoadPolicyBlocked:484 return WebCore::WebGLBlock;485 }486 487 ASSERT_NOT_REACHED();488 return WebCore::WebGLAsk;489 }490 491 476 inline ProxyingRefPtr<WebGrammarDetail> toAPI(const WebCore::GrammarDetail& grammarDetail) 492 477 { -
trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h
r162000 r162007 43 43 typedef uint32_t WKPluginLoadPolicy; 44 44 45 enum {46 kWKWebGLLoadPolicyInactive = 0,47 kWKWebGLLoadPolicyLoadNormally,48 kWKWebGLLoadPolicyBlocked49 };50 typedef uint32_t WKWebGLLoadPolicy;51 52 45 typedef void (*WKPageLoaderClientCallback)(WKPageRef page, const void* clientInfo); 53 46 typedef void (*WKPageDidStartProvisionalLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); … … 74 67 typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, WKStringRef* unavailabilityDescription, const void* clientInfo); 75 68 typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, WKErrorCode errorCode, WKDictionaryRef pluginInfoDictionary, const void* clientInfo); 76 typedef WKWebGLLoadPolicy (*WKPageWebGLLoadPolicyCallback)(WKPageRef page, WKStringRef host, const void* clientInfo);77 69 78 70 // Deprecated … … 273 265 // Version 3. 274 266 WKPagePluginLoadPolicyCallback pluginLoadPolicy; 275 WKPageWebGLLoadPolicyCallback webGLLoadPolicy;276 267 } WKPageLoaderClientV3; 277 268 -
trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h
r162000 r162007 86 86 typedef void (*WKPageHideColorPickerCallback)(WKPageRef page, const void* clientInfo); 87 87 typedef void (*WKPageUnavailablePluginButtonClickedCallback)(WKPageRef page, WKPluginUnavailabilityReason pluginUnavailabilityReason, WKDictionaryRef pluginInfoDictionary, const void* clientInfo); 88 typedef void (*WKPageWebGLContextCreatedCallback)(WKPageRef page, WKStringRef, const void* clientInfo);89 88 90 89 // Deprecated … … 249 248 WKPageHideColorPickerCallback hideColorPicker; 250 249 WKPageUnavailablePluginButtonClickedCallback unavailablePluginButtonClicked; 251 WKPageWebGLContextCreatedCallback webGLContextCreated;252 250 } WKPageUIClientV2; 253 251 -
trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp
r162000 r162007 334 334 #endif // ENABLE(NETSCAPE_PLUGIN_API) 335 335 336 #if ENABLE(WEBGL)337 void WebLoaderClient::webGLLoadPolicy(WebPageProxy* page, WebCore::WebGLLoadPolicy& loadPolicy, const String& host)338 {339 if (m_client.webGLLoadPolicy)340 loadPolicy = toWebGLLoadPolicy(m_client.webGLLoadPolicy(toAPI(page), toAPI(host.impl()), m_client.base.clientInfo));341 }342 #endif // ENABLE(WEBGL)343 344 336 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/WebLoaderClient.h
r162000 r162007 31 31 #include "SameDocumentNavigationType.h" 32 32 #include "WKPage.h" 33 #include <WebCore/FrameLoaderTypes.h>34 33 #include <WebCore/LayoutMilestones.h> 35 34 #include <wtf/Forward.h> … … 104 103 void didBlockInsecurePluginVersion(WebPageProxy*, ImmutableDictionary*); 105 104 #endif // ENABLE(NETSCAPE_PLUGIN_API) 106 107 #if ENABLE(WEBGL)108 void webGLLoadPolicy(WebPageProxy*, WebCore::WebGLLoadPolicy&, const String&);109 #endif // ENABLE(WEBGL)110 105 }; 111 106 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r162000 r162007 2681 2681 #endif // ENABLE(NETSCAPE_PLUGIN_API) 2682 2682 2683 #if ENABLE(WEBGL)2684 void WebPageProxy::webGLContextCreated(const String& pageURLString)2685 {2686 m_uiClient.webGLContextCreated(this, pageURLString);2687 }2688 2689 void WebPageProxy::webGLPolicyForHost(const String& host, uint32_t& loadPolicy)2690 {2691 WebCore::WebGLLoadPolicy policy;2692 m_loaderClient.webGLLoadPolicy(this, policy, host);2693 loadPolicy = static_cast<uint32_t>(policy);2694 }2695 #endif // ENABLE(WEBGL)2696 2697 2683 void WebPageProxy::setToolbarsAreVisible(bool toolbarsAreVisible) 2698 2684 { -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r162000 r162007 930 930 void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString); 931 931 #endif // ENABLE(NETSCAPE_PLUGIN_API) 932 #if ENABLE(WEBGL)933 void webGLContextCreated(const String& pageURLString);934 void webGLPolicyForHost(const String& host, uint32_t& loadPolicy);935 #endif // ENABLE(WEBGL)936 932 void setToolbarsAreVisible(bool toolbarsAreVisible); 937 933 void getToolbarsAreVisible(bool& toolbarsAreVisible); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r162000 r162007 34 34 UnavailablePluginButtonClicked(uint32_t pluginUnavailabilityReason, String mimeType, String pluginURLString, String pluginspageAttributeURLString, String frameURLString, String pageURLString) 35 35 #endif // ENABLE(NETSCAPE_PLUGIN_API) 36 #if ENABLE(WEBGL)37 WebGLContextCreated(String pageURLString)38 WebGLPolicyForHost(String host) -> (uint32_t loadPolicy)39 #endif // ENABLE(WEBGL)40 36 DidChangeViewportProperties(WebCore::ViewportAttributes attributes) 41 37 DidReceiveEvent(uint32_t type, bool handled) -
trunk/Source/WebKit2/UIProcess/WebUIClient.cpp
r162000 r162007 208 208 #endif // ENABLE(NETSCAPE_PLUGIN_API) 209 209 210 #if ENABLE(WEBGL)211 void WebUIClient::webGLContextCreated(WebPageProxy* page, const String& originatingURL)212 {213 if (m_client.webGLContextCreated)214 m_client.webGLContextCreated(toAPI(page), toAPI(originatingURL.impl()), m_client.base.clientInfo);215 }216 #endif // ENABLE(WEBGL)217 218 210 bool WebUIClient::implementsDidNotHandleKeyEvent() const 219 211 { -
trunk/Source/WebKit2/UIProcess/WebUIClient.h
r162000 r162007 82 82 void unavailablePluginButtonClicked(WebPageProxy*, WKPluginUnavailabilityReason, ImmutableDictionary*); 83 83 #endif // ENABLE(NETSCAPE_PLUGIN_API) 84 #if ENABLE(WEBGL) 85 void webGLContextCreated(WebPageProxy*, const String&); 86 #endif // ENABLE(WEBGL) 84 87 85 bool implementsDidNotHandleKeyEvent() const; 88 86 void didNotHandleKeyEvent(WebPageProxy*, const NativeWebKeyboardEvent&); -
trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
r162000 r162007 448 448 0, // hideColorPicker 449 449 0, // unavailablePluginButtonClicked 450 0, // webGLContextCreated451 450 }; 452 451 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r162000 r162007 59 59 #include <WebCore/FrameLoader.h> 60 60 #include <WebCore/FrameView.h> 61 #include <WebCore/HTMLCanvasElement.h>62 61 #include <WebCore/HTMLInputElement.h> 63 62 #include <WebCore/HTMLNames.h> … … 564 563 } 565 564 566 #if ENABLE(WEBGL)567 void WebChromeClient::webGLContextCreated(Element* element) const568 {569 String pageURLString = m_page->mainFrame()->loader().documentLoader()->responseURL().string();570 m_page->send(Messages::WebPageProxy::WebGLContextCreated(pageURLString));571 }572 #endif // ENABLE(WEBGL)573 574 565 void WebChromeClient::scrollbarsModeDidChange() const 575 566 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r162000 r162007 124 124 virtual bool shouldUnavailablePluginMessageBeButton(WebCore::RenderEmbeddedObject::PluginUnavailabilityReason) const OVERRIDE; 125 125 virtual void unavailablePluginButtonClicked(WebCore::Element*, WebCore::RenderEmbeddedObject::PluginUnavailabilityReason) const OVERRIDE; 126 #if ENABLE(WEBGL)127 virtual void webGLContextCreated(WebCore::Element*) const OVERRIDE;128 #endif // ENABLE(WEBGL)129 126 130 127 virtual void scrollbarsModeDidChange() const OVERRIDE; -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r162000 r162007 1379 1379 } 1380 1380 1381 #if ENABLE(WEBGL)1382 WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForHost(const String& host) const1383 {1384 if (WebPage* webPage = m_frame->page())1385 return webPage->getWebGLPolicyForHost(m_frame, host);1386 return WebGLAsk;1387 }1388 #endif // ENABLE(WEBGL)1389 1390 1381 PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* appletElement, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues) 1391 1382 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
r162000 r162007 195 195 virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE; 196 196 197 #if ENABLE(WEBGL)198 virtual WebCore::WebGLLoadPolicy webGLPolicyForHost(const String&) const OVERRIDE;199 #endif // ENABLE(WEBGL)200 201 197 virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) OVERRIDE; 202 198 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r162000 r162007 591 591 #endif // ENABLE(NETSCAPE_PLUGIN_API) 592 592 593 #if ENABLE(WEBGL)594 WebCore::WebGLLoadPolicy WebPage::getWebGLPolicyForHost(WebFrame* frame, const String& url)595 {596 WebGLLoadPolicy defaultPolicy = WebGLAsk;597 uint32_t policyResult = 0;598 // FIXME: Get rid of sendSync in favor of a non-blocking strategy.599 sendSync(Messages::WebPageProxy::WebGLPolicyForHost(url), Messages::WebPageProxy::WebGLPolicyForHost::Reply(policyResult));600 if (policyResult)601 return static_cast<WebGLLoadPolicy>(policyResult);602 return defaultPolicy;603 }604 #endif // ENABLE(WEBGL)605 606 593 EditorState WebPage::editorState() const 607 594 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r162000 r162007 288 288 #endif 289 289 290 #if ENABLE(WEBGL)291 WebCore::WebGLLoadPolicy getWebGLPolicyForHost(WebFrame*, const String&);292 #endif // ENABLE(WEBGL)293 294 290 EditorState editorState() const; 295 291 -
trunk/Tools/ChangeLog
r162000 r162007 1 2014-01-14 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r162000. 4 http://trac.webkit.org/changeset/162000 5 https://bugs.webkit.org/show_bug.cgi?id=127009 6 7 API versioning is wrong (Requested by rfong on #webkit). 8 9 * MiniBrowser/mac/WK2BrowserWindowController.m: 10 (-[WK2BrowserWindowController awakeFromNib]): 11 * WebKitTestRunner/TestController.cpp: 12 (WTR::TestController::createOtherPage): 13 (WTR::TestController::createWebViewWithOptions): 14 1 15 2014-01-13 Roger Fong <roger_fong@apple.com> 2 16 -
trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m
r162000 r162007 582 582 0, // hideColorPicker 583 583 0, // unavailablePluginButtonClicked 584 0, // webGLContextCreated585 584 }; 586 585 WKPageSetPageUIClient(_webView.pageRef, &uiClient.base); -
trunk/Tools/WebKitTestRunner/TestController.cpp
r162000 r162007 243 243 0, // hideColorPicker 244 244 0, // unavailablePluginButtonClicked 245 0, // webGLContextCreated246 245 }; 247 246 WKPageSetPageUIClient(newPage, &otherPageUIClient.base); … … 421 420 0, // hideColorPicker 422 421 unavailablePluginButtonClicked, 423 0, // webGLContextCreated424 422 }; 425 423 WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient.base); … … 463 461 0, // pluginDidFail 464 462 pluginLoadPolicy, // pluginLoadPolicy 465 0, // webGLLoadPolicy466 463 }; 467 464 WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient.base);
Note: See TracChangeset
for help on using the changeset viewer.