Changeset 162000 in webkit


Ignore:
Timestamp:
Jan 14, 2014, 1:41:04 PM (12 years ago)
Author:
roger_fong@apple.com
Message:

Add support for handling WebGL load policies.
https://bugs.webkit.org/show_bug.cgi?id=126935
<rdar://problem/15790448>.

Reviewed by Brent Fulgham.

  • WebCore.xcodeproj/project.pbxproj: Copy over HTMLCanvasElement.h to the private headers directory.
  • html/HTMLCanvasElement.cpp: Show the policy dialog and retrieve policies as necessary.

(WebCore::HTMLCanvasElement::getContext): Make sure that WebGL is allowed on the site.

If it isn't, be sure to notify the frame loader client that
the site is trying to create a WebGL context.

Boiler plate code for sending messages to and from the UI and Web Process.

  • loader/FrameLoaderClient.h:

(WebCore::FrameLoaderClient::webGLPolicyForHost): Used to get the WebGL load policy for a site.

  • loader/FrameLoaderTypes.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::webGLContextCreated): Called when a site is creating a WebGL context.

  • UIProcess/API/C/WKAPICast.h:

(WebKit::toWebGLLoadPolicy):

  • UIProcess/API/C/WKPageLoaderClient.h:
  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/WebLoaderClient.cpp:

(WebKit::WebLoaderClient::webGLLoadPolicy):

  • UIProcess/WebLoaderClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::webGLContextCreated):
(WebKit::WebPageProxy::webGLPolicyForHost):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebUIClient.cpp:

(WebKit::WebUIClient::webGLContextCreated):

  • UIProcess/WebUIClient.h:
  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::platformCreateInspectorPage):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::webGLContextCreated):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::webGLPolicyForHost):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebPage.cpp: A sendSync is used here to get the webGLPolicyForHost message sent between the Web and UI process.

In the future this will be replaced with a strategy is non-blocking.

(WebKit::WebPage::getWebGLPolicyForHost):

  • WebProcess/WebPage/WebPage.h:
  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createWebViewWithOptions):

Location:
trunk
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r161999 r162000  
     12014-01-09  Roger Fong  <roger_fong@apple.com>
     2
     3        Add support for handling WebGL load policies.
     4        https://bugs.webkit.org/show_bug.cgi?id=126935
     5        <rdar://problem/15790448>.
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * WebCore.xcodeproj/project.pbxproj: Copy over HTMLCanvasElement.h to the private headers directory.
     10        * html/HTMLCanvasElement.cpp: Show the policy dialog and retrieve policies as necessary.
     11        (WebCore::HTMLCanvasElement::getContext): Make sure that WebGL is allowed on the site.
     12                                                  If it isn't, be sure to notify the frame loader client that
     13                                                  the site is trying to create a WebGL context.
     14        * loader/FrameLoaderClient.h:
     15        (WebCore::FrameLoaderClient::webGLPolicyForHost): Used to get the WebGL load policy for a site.
     16        * loader/FrameLoaderTypes.h:
     17        * page/ChromeClient.h:
     18        (WebCore::ChromeClient::webGLContextCreated): Called when a site is creating a WebGL context.
     19
    1202014-01-14  Anders Carlsson  <andersca@apple.com>
    221
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r161950 r162000  
    32423242                93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A640F00533BB1F0085E777 /* BlockExceptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
    32433243                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 */; };
     3244                93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
    32453245                93F199EC08245E59001E9ABC /* XSLStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BC06F24A06D18A7E004A6FA3 /* XSLStyleSheet.h */; };
    32463246                93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC06F24C06D18A7E004A6FA3 /* XSLTProcessor.h */; };
     
    2319123191                                93F1992F08245E59001E9ABC /* Cursor.h in Headers */,
    2319223192                                BC2272A20E82E87C00E7F975 /* CursorData.h in Headers */,
     23193                                93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */,
    2319323194                                868160D618766A130021E79D /* UserActivity.h in Headers */,
    2319423195                                BC2272AD0E82E8F300E7F975 /* CursorList.h in Headers */,
     
    2395423955                                A8CFF7AA0A156978000A4234 /* HTMLBRElement.h in Headers */,
    2395523956                                A81369D2097374F600D74463 /* HTMLButtonElement.h in Headers */,
    23956                                 93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */,
    2395723957                                07969DC017D14151007FF842 /* JSRTCStatsCallback.h in Headers */,
    2395823958                                A8DF3FD0097FA0FC0052981B /* HTMLCollection.h in Headers */,
  • trunk/Source/WebCore/html/HTMLCanvasElement.cpp

    r161181 r162000  
    3434#include "CanvasRenderingContext2D.h"
    3535#include "Chrome.h"
     36#include "ChromeClient.h"
    3637#include "Document.h"
    3738#include "ExceptionCode.h"
    3839#include "Frame.h"
     40#include "FrameLoaderClient.h"
    3941#include "GraphicsContext.h"
    4042#include "HTMLNames.h"
    4143#include "ImageData.h"
    4244#include "MIMETypeRegistry.h"
     45#include "MainFrame.h"
    4346#include "Page.h"
    4447#include "RenderHTMLCanvas.h"
     
    202205    if (is2dType(type)) {
    203206        if (m_context && !m_context->is2d())
    204             return 0;
     207            return nullptr;
    205208        if (!m_context) {
    206209            bool usesDashbardCompatibilityMode = false;
     
    224227                return 0;
    225228            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                }
    226240                m_context = WebGLRenderingContext::create(this, static_cast<WebGLContextAttributes*>(attrs));
    227241                if (m_context) {
     
    236250    UNUSED_PARAM(attrs);
    237251#endif
    238     return 0;
     252    return nullptr;
    239253}
    240254   
  • trunk/Source/WebCore/loader/FrameLoaderClient.h

    r161744 r162000  
    332332        // notification with the given GL_ARB_robustness guilt/innocence code (see Extensions3D.h).
    333333        virtual void didLoseWebGLContext(int) { }
     334        virtual WebGLLoadPolicy webGLPolicyForHost(const String&) const { return WebGLAsk; }
    334335#endif
    335336
  • trunk/Source/WebCore/loader/FrameLoaderTypes.h

    r100353 r162000  
    106106        NotAboutToInstantiatePlugin
    107107    };
     108   
     109    enum WebGLLoadPolicy {
     110        WebGLAsk = 0,
     111        WebGLAllow,
     112        WebGLBlock
     113    };
    108114
    109115}
  • trunk/Source/WebCore/page/ChromeClient.h

    r161342 r162000  
    429429    virtual void incrementActivePageCount() { }
    430430    virtual void decrementActivePageCount() { }
     431   
     432#if ENABLE(WEBGL)
     433    virtual void webGLContextCreated(Element*) const { }
     434#endif
    431435
    432436protected:
  • trunk/Source/WebKit2/ChangeLog

    r161998 r162000  
     12014-01-09  Roger Fong  <roger_fong@apple.com>
     2
     3        Add support for handling WebGL load policies.
     4        https://bugs.webkit.org/show_bug.cgi?id=126935
     5        <rdar://problem/15790448>.
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Boiler plate code for sending messages to and from the UI and Web Process.
     10
     11        * UIProcess/API/C/WKAPICast.h:
     12        (WebKit::toWebGLLoadPolicy):
     13        * UIProcess/API/C/WKPageLoaderClient.h:
     14        * UIProcess/API/C/WKPageUIClient.h:
     15        * UIProcess/WebLoaderClient.cpp:
     16        (WebKit::WebLoaderClient::webGLLoadPolicy):
     17        * UIProcess/WebLoaderClient.h:
     18        * UIProcess/WebPageProxy.cpp:
     19        (WebKit::WebPageProxy::webGLContextCreated):
     20        (WebKit::WebPageProxy::webGLPolicyForHost):
     21        * UIProcess/WebPageProxy.h:
     22        * UIProcess/WebPageProxy.messages.in:
     23        * UIProcess/WebUIClient.cpp:
     24        (WebKit::WebUIClient::webGLContextCreated):
     25        * UIProcess/WebUIClient.h:
     26        * UIProcess/mac/WebInspectorProxyMac.mm:
     27        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
     28        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     29        (WebKit::WebChromeClient::webGLContextCreated):
     30        * WebProcess/WebCoreSupport/WebChromeClient.h:
     31        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     32        (WebKit::WebFrameLoaderClient::webGLPolicyForHost):
     33        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
     34        * WebProcess/WebPage/WebPage.cpp: A sendSync is used here to get the webGLPolicyForHost message sent between the Web and UI process.
     35                                          In the future this will be replaced with a strategy is non-blocking.
     36        (WebKit::WebPage::getWebGLPolicyForHost):
     37        * WebProcess/WebPage/WebPage.h:
     38
    1392014-01-14  Mark Rowe  <mrowe@apple.com>
    240
  • trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h

    r159461 r162000  
    474474}
    475475
     476inline 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
    476491inline ProxyingRefPtr<WebGrammarDetail> toAPI(const WebCore::GrammarDetail& grammarDetail)
    477492{
  • trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h

    r160104 r162000  
    4343typedef uint32_t WKPluginLoadPolicy;
    4444
     45enum {
     46    kWKWebGLLoadPolicyInactive = 0,
     47    kWKWebGLLoadPolicyLoadNormally,
     48    kWKWebGLLoadPolicyBlocked
     49};
     50typedef uint32_t WKWebGLLoadPolicy;
     51
    4552typedef void (*WKPageLoaderClientCallback)(WKPageRef page, const void* clientInfo);
    4653typedef void (*WKPageDidStartProvisionalLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
     
    6774typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, WKStringRef* unavailabilityDescription, const void* clientInfo);
    6875typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, WKErrorCode errorCode, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
     76typedef WKWebGLLoadPolicy (*WKPageWebGLLoadPolicyCallback)(WKPageRef page, WKStringRef host, const void* clientInfo);
    6977
    7078// Deprecated
     
    265273    // Version 3.
    266274    WKPagePluginLoadPolicyCallback                                      pluginLoadPolicy;
     275    WKPageWebGLLoadPolicyCallback                                       webGLLoadPolicy;
    267276} WKPageLoaderClientV3;
    268277
  • trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h

    r160104 r162000  
    8686typedef void (*WKPageHideColorPickerCallback)(WKPageRef page, const void* clientInfo);
    8787typedef void (*WKPageUnavailablePluginButtonClickedCallback)(WKPageRef page, WKPluginUnavailabilityReason pluginUnavailabilityReason, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
     88typedef void (*WKPageWebGLContextCreatedCallback)(WKPageRef page, WKStringRef, const void* clientInfo);
    8889
    8990// Deprecated   
     
    248249    WKPageHideColorPickerCallback                                       hideColorPicker;
    249250    WKPageUnavailablePluginButtonClickedCallback                        unavailablePluginButtonClicked;
     251    WKPageWebGLContextCreatedCallback                                   webGLContextCreated;
    250252} WKPageUIClientV2;
    251253
  • trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp

    r160608 r162000  
    334334#endif // ENABLE(NETSCAPE_PLUGIN_API)
    335335
     336#if ENABLE(WEBGL)
     337void 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
    336344} // namespace WebKit
  • trunk/Source/WebKit2/UIProcess/WebLoaderClient.h

    r159994 r162000  
    3131#include "SameDocumentNavigationType.h"
    3232#include "WKPage.h"
     33#include <WebCore/FrameLoaderTypes.h>
    3334#include <WebCore/LayoutMilestones.h>
    3435#include <wtf/Forward.h>
     
    103104    void didBlockInsecurePluginVersion(WebPageProxy*, ImmutableDictionary*);
    104105#endif // ENABLE(NETSCAPE_PLUGIN_API)
     106
     107#if ENABLE(WEBGL)
     108    void webGLLoadPolicy(WebPageProxy*, WebCore::WebGLLoadPolicy&, const String&);
     109#endif // ENABLE(WEBGL)
    105110};
    106111
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r161851 r162000  
    26812681#endif // ENABLE(NETSCAPE_PLUGIN_API)
    26822682
     2683#if ENABLE(WEBGL)
     2684void WebPageProxy::webGLContextCreated(const String& pageURLString)
     2685{
     2686    m_uiClient.webGLContextCreated(this, pageURLString);
     2687}
     2688
     2689void 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
    26832697void WebPageProxy::setToolbarsAreVisible(bool toolbarsAreVisible)
    26842698{
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r161679 r162000  
    930930    void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString);
    931931#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)
    932936    void setToolbarsAreVisible(bool toolbarsAreVisible);
    933937    void getToolbarsAreVisible(bool& toolbarsAreVisible);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r161358 r162000  
    3434    UnavailablePluginButtonClicked(uint32_t pluginUnavailabilityReason, String mimeType, String pluginURLString, String pluginspageAttributeURLString, String frameURLString, String pageURLString)
    3535#endif // ENABLE(NETSCAPE_PLUGIN_API)
     36#if ENABLE(WEBGL)
     37    WebGLContextCreated(String pageURLString)
     38    WebGLPolicyForHost(String host) -> (uint32_t loadPolicy)
     39#endif // ENABLE(WEBGL)
    3640    DidChangeViewportProperties(WebCore::ViewportAttributes attributes)
    3741    DidReceiveEvent(uint32_t type, bool handled)
  • trunk/Source/WebKit2/UIProcess/WebUIClient.cpp

    r160737 r162000  
    208208#endif // ENABLE(NETSCAPE_PLUGIN_API)
    209209
     210#if ENABLE(WEBGL)
     211void 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
    210218bool WebUIClient::implementsDidNotHandleKeyEvent() const
    211219{
  • trunk/Source/WebKit2/UIProcess/WebUIClient.h

    r160653 r162000  
    8282    void unavailablePluginButtonClicked(WebPageProxy*, WKPluginUnavailabilityReason, ImmutableDictionary*);
    8383#endif // ENABLE(NETSCAPE_PLUGIN_API)
    84 
     84#if ENABLE(WEBGL)
     85    void webGLContextCreated(WebPageProxy*, const String&);
     86#endif // ENABLE(WEBGL)
    8587    bool implementsDidNotHandleKeyEvent() const;
    8688    void didNotHandleKeyEvent(WebPageProxy*, const NativeWebKeyboardEvent&);
  • trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm

    r160104 r162000  
    448448        0, // hideColorPicker
    449449        0, // unavailablePluginButtonClicked
     450        0, // webGLContextCreated
    450451    };
    451452
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r161662 r162000  
    5959#include <WebCore/FrameLoader.h>
    6060#include <WebCore/FrameView.h>
     61#include <WebCore/HTMLCanvasElement.h>
    6162#include <WebCore/HTMLInputElement.h>
    6263#include <WebCore/HTMLNames.h>
     
    563564}
    564565
     566#if ENABLE(WEBGL)
     567void WebChromeClient::webGLContextCreated(Element* element) const
     568{
     569    String pageURLString = m_page->mainFrame()->loader().documentLoader()->responseURL().string();
     570    m_page->send(Messages::WebPageProxy::WebGLContextCreated(pageURLString));
     571}
     572#endif // ENABLE(WEBGL)
     573
    565574void WebChromeClient::scrollbarsModeDidChange() const
    566575{
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

    r161413 r162000  
    124124    virtual bool shouldUnavailablePluginMessageBeButton(WebCore::RenderEmbeddedObject::PluginUnavailabilityReason) const OVERRIDE;
    125125    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)
    126129
    127130    virtual void scrollbarsModeDidChange() const OVERRIDE;
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r161751 r162000  
    13791379}
    13801380
     1381#if ENABLE(WEBGL)
     1382WebCore::WebGLLoadPolicy WebFrameLoaderClient::webGLPolicyForHost(const String& host) const
     1383{
     1384    if (WebPage* webPage = m_frame->page())
     1385        return webPage->getWebGLPolicyForHost(m_frame, host);
     1386    return WebGLAsk;
     1387}
     1388#endif // ENABLE(WEBGL)
     1389
    13811390PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* appletElement, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues)
    13821391{
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h

    r161751 r162000  
    195195    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE;
    196196   
     197#if ENABLE(WEBGL)
     198    virtual WebCore::WebGLLoadPolicy webGLPolicyForHost(const String&) const OVERRIDE;
     199#endif // ENABLE(WEBGL)
     200
    197201    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) OVERRIDE;
    198202   
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r161744 r162000  
    591591#endif // ENABLE(NETSCAPE_PLUGIN_API)
    592592
     593#if ENABLE(WEBGL)
     594WebCore::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
    593606EditorState WebPage::editorState() const
    594607{
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r161950 r162000  
    288288#endif
    289289
     290#if ENABLE(WEBGL)
     291    WebCore::WebGLLoadPolicy getWebGLPolicyForHost(WebFrame*, const String&);
     292#endif // ENABLE(WEBGL)
     293   
    290294    EditorState editorState() const;
    291295
  • trunk/Tools/ChangeLog

    r161990 r162000  
     12014-01-13  Roger Fong  <roger_fong@apple.com>
     2
     3        Add support for handling WebGL load policies.
     4        https://bugs.webkit.org/show_bug.cgi?id=126935
     5        <rdar://problem/15790448>.
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * MiniBrowser/mac/WK2BrowserWindowController.m:
     10        (-[WK2BrowserWindowController awakeFromNib]):
     11        * WebKitTestRunner/TestController.cpp:
     12        (WTR::TestController::createWebViewWithOptions):
     13
    1142014-01-14  Zan Dobersek  <zdobersek@igalia.com>
    215
  • trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m

    r160654 r162000  
    582582        0, // hideColorPicker
    583583        0, // unavailablePluginButtonClicked
     584        0, // webGLContextCreated
    584585    };
    585586    WKPageSetPageUIClient(_webView.pageRef, &uiClient.base);
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r161105 r162000  
    243243        0, // hideColorPicker
    244244        0, // unavailablePluginButtonClicked
     245        0, // webGLContextCreated
    245246    };
    246247    WKPageSetPageUIClient(newPage, &otherPageUIClient.base);
     
    420421        0, // hideColorPicker
    421422        unavailablePluginButtonClicked,
     423        0, // webGLContextCreated
    422424    };
    423425    WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient.base);
     
    461463        0, // pluginDidFail
    462464        pluginLoadPolicy, // pluginLoadPolicy
     465        0, // webGLLoadPolicy
    463466    };
    464467    WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient.base);
Note: See TracChangeset for help on using the changeset viewer.