Changeset 205554 in webkit


Ignore:
Timestamp:
Sep 7, 2016 10:21:44 AM (8 years ago)
Author:
Chris Dumez
Message:

Drop legacy canvas.probablySupportsContext()
https://bugs.webkit.org/show_bug.cgi?id=161692

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

  • web-platform-tests/html/semantics/embedded-content/the-canvas-element/historical-expected.txt:

Source/WebCore:

Drop legacy canvas.probablySupportsContext() as it is no longer in the specification:

Firefox and Chrome do not support canvas.probablySupportsContext().

No new tests, rebaselined existing test.

  • bindings/js/JSHTMLCanvasElementCustom.cpp:

(WebCore::JSHTMLCanvasElement::probablySupportsContext): Deleted.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::probablySupportsContext): Deleted.

  • html/HTMLCanvasElement.h:
  • html/HTMLCanvasElement.idl:

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

Drop legacy layout test.

  • fast/canvas/webgl/canvas-supports-context-expected.txt: Removed.
  • fast/canvas/webgl/canvas-supports-context.html: Removed.
Location:
trunk
Files:
2 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205553 r205554  
     12016-09-07  Chris Dumez  <cdumez@apple.com>
     2
     3        Drop legacy canvas.probablySupportsContext()
     4        https://bugs.webkit.org/show_bug.cgi?id=161692
     5
     6        Reviewed by Alex Christensen.
     7
     8        Drop legacy layout test.
     9
     10        * fast/canvas/webgl/canvas-supports-context-expected.txt: Removed.
     11        * fast/canvas/webgl/canvas-supports-context.html: Removed.
     12
    1132016-09-07  Nan Wang  <n_wang@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r205524 r205554  
     12016-09-07  Chris Dumez  <cdumez@apple.com>
     2
     3        Drop legacy canvas.probablySupportsContext()
     4        https://bugs.webkit.org/show_bug.cgi?id=161692
     5
     6        Reviewed by Alex Christensen.
     7
     8        Rebaseline W3C test now that one more check is passing.
     9
     10        * web-platform-tests/html/semantics/embedded-content/the-canvas-element/historical-expected.txt:
     11
    1122016-09-06  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/historical-expected.txt

    r203164 r205554  
    11
    22PASS Canvas support for supportsContext
    3 FAIL Canvas support for probablySupportsContext assert_false: expected false got true
     3PASS Canvas support for probablySupportsContext
    44
  • trunk/Source/WebCore/ChangeLog

    r205551 r205554  
     12016-09-07  Chris Dumez  <cdumez@apple.com>
     2
     3        Drop legacy canvas.probablySupportsContext()
     4        https://bugs.webkit.org/show_bug.cgi?id=161692
     5
     6        Reviewed by Alex Christensen.
     7
     8        Drop legacy canvas.probablySupportsContext() as it is no longer in the specification:
     9        - https://html.spec.whatwg.org/#htmlcanvaselement
     10
     11        Firefox and Chrome do not support canvas.probablySupportsContext().
     12
     13        No new tests, rebaselined existing test.
     14
     15        * bindings/js/JSHTMLCanvasElementCustom.cpp:
     16        (WebCore::JSHTMLCanvasElement::probablySupportsContext): Deleted.
     17        * html/HTMLCanvasElement.cpp:
     18        (WebCore::HTMLCanvasElement::getContext):
     19        (WebCore::HTMLCanvasElement::probablySupportsContext): Deleted.
     20        * html/HTMLCanvasElement.h:
     21        * html/HTMLCanvasElement.idl:
     22
    1232016-09-07  Simon Fraser  <simon.fraser@apple.com>
    224
  • trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp

    r205360 r205554  
    101101}
    102102
    103 JSValue JSHTMLCanvasElement::probablySupportsContext(ExecState& state)
    104 {
    105     VM& vm = state.vm();
    106     auto scope = DECLARE_THROW_SCOPE(vm);
    107 
    108     if (UNLIKELY(state.argumentCount() < 1))
    109         return throwException(&state, scope, createNotEnoughArgumentsError(&state));
    110 
    111     HTMLCanvasElement& canvas = wrapped();
    112     const String& contextId = state.uncheckedArgument(0).toWTFString(&state);
    113     if (state.hadException())
    114         return jsUndefined();
    115    
    116     RefPtr<CanvasContextAttributes> attrs;
    117 #if ENABLE(WEBGL)
    118     if (HTMLCanvasElement::is3dType(contextId)) {
    119         get3DContextAttributes(state, attrs);
    120         if (state.hadException())
    121             return jsUndefined();
    122     }
    123 #endif
    124    
    125     return jsBoolean(canvas.probablySupportsContext(contextId, attrs.get()));
    126 }
    127 
    128103JSValue JSHTMLCanvasElement::toDataURL(ExecState& state)
    129104{
  • trunk/Source/WebCore/html/HTMLCanvasElement.cpp

    r205462 r205554  
    262262    return nullptr;
    263263}
    264    
    265 bool HTMLCanvasElement::probablySupportsContext(const String& type, CanvasContextAttributes*)
    266 {
    267     // FIXME: Provide implementation that accounts for attributes.
    268     // https://bugs.webkit.org/show_bug.cgi?id=117093
    269     if (is2dType(type))
    270         return !m_context || m_context->is2d();
    271 
    272 #if ENABLE(WEBGL)
    273     if (shouldEnableWebGL(document().settings())) {
    274         if (is3dType(type))
    275             return !m_context || m_context->is3d();
    276     }
    277 #endif
    278     return false;
    279 }
    280264
    281265bool HTMLCanvasElement::is2dType(const String& type)
  • trunk/Source/WebCore/html/HTMLCanvasElement.h

    r204717 r205554  
    8787
    8888    CanvasRenderingContext* getContext(const String&, CanvasContextAttributes* = nullptr);
    89     bool probablySupportsContext(const String&, CanvasContextAttributes* = nullptr);
    9089    static bool is2dType(const String&);
    9190#if ENABLE(WEBGL)
  • trunk/Source/WebCore/html/HTMLCanvasElement.idl

    r205280 r205554  
    3737    // The custom binding is needed to handle context creation attributes.
    3838    [Custom] any getContext(DOMString contextId, any... arguments);
    39     [Custom] boolean probablySupportsContext(DOMString contextId, any... arguments);
    4039};
    4140
  • trunk/Source/WebInspectorUI/ChangeLog

    r205529 r205554  
     12016-09-07  Chris Dumez  <cdumez@apple.com>
     2
     3        Drop legacy canvas.probablySupportsContext()
     4        https://bugs.webkit.org/show_bug.cgi?id=161692
     5
     6        Reviewed by Alex Christensen.
     7
     8        * UserInterface/Models/NativeFunctionParameters.js:
     9
    1102016-09-06  Joseph Pecoraro  <pecoraro@apple.com>
    211
  • trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js

    r205424 r205554  
    873873    HTMLCanvasElement: {
    874874        getContext: "contextId",
    875         probablySupportsContext: "contextId",
    876875        toDataURL: "[type]",
    877876        __proto__: null,
Note: See TracChangeset for help on using the changeset viewer.