Changeset 289666 in webkit


Ignore:
Timestamp:
Feb 11, 2022 1:12:49 PM (5 months ago)
Author:
graouts@webkit.org
Message:

[model] standalone model documents should be interactive
https://bugs.webkit.org/show_bug.cgi?id=236493

Reviewed by Dean Jackson.

Source/WebCore:

We made <model> elements not be interactive by default in bug 227621,
so we need to opt into interactivity for standalone <model> documents.
All this requires is setting the "interactive" attribute, which we set
instead of the "controls" attribute which does not exist for <model>.

Test: http/tests/model/model-document-interactive.html

  • html/ModelDocument.cpp:

(WebCore::ModelDocumentParser::createDocumentStructure):

LayoutTests:

Add a test that checks that the <model> element created for standalone
documents has the "interactive" attribute.

  • http/tests/model/model-document-interactive-expected.txt: Added.
  • http/tests/model/model-document-interactive.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r289631 r289666  
     12022-02-11  Antoine Quint  <graouts@webkit.org>
     2
     3        [model] standalone model documents should be interactive
     4        https://bugs.webkit.org/show_bug.cgi?id=236493
     5
     6        Reviewed by Dean Jackson.
     7
     8        Add a test that checks that the <model> element created for standalone
     9        documents has the "interactive" attribute.
     10
     11        * http/tests/model/model-document-interactive-expected.txt: Added.
     12        * http/tests/model/model-document-interactive.html: Added.
     13
    1142022-02-11  Jon Lee  <jonlee@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r289658 r289666  
     12022-02-11  Antoine Quint  <graouts@webkit.org>
     2
     3        [model] standalone model documents should be interactive
     4        https://bugs.webkit.org/show_bug.cgi?id=236493
     5
     6        Reviewed by Dean Jackson.
     7
     8        We made <model> elements not be interactive by default in bug 227621,
     9        so we need to opt into interactivity for standalone <model> documents.
     10        All this requires is setting the "interactive" attribute, which we set
     11        instead of the "controls" attribute which does not exist for <model>.
     12
     13        Test: http/tests/model/model-document-interactive.html
     14
     15        * html/ModelDocument.cpp:
     16        (WebCore::ModelDocumentParser::createDocumentStructure):
     17
    1182022-02-11  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/html/ModelDocument.cpp

    r288201 r289666  
    107107    auto modelElement = HTMLModelElement::create(HTMLNames::modelTag, document);
    108108    m_modelElement = modelElement.ptr();
    109     modelElement->setAttributeWithoutSynchronization(controlsAttr, emptyAtom());
     109    modelElement->setAttributeWithoutSynchronization(interactiveAttr, emptyAtom());
    110110
    111111    auto sourceElement = HTMLSourceElement::create(HTMLNames::sourceTag, document);
Note: See TracChangeset for help on using the changeset viewer.