⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249212 in webkit


Ignore:
Timestamp:
Aug 28, 2019, 12:34:43 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Implement HTMLOrForeignElement
https://bugs.webkit.org/show_bug.cgi?id=201219

Patch by Rob Buis <rbuis@igalia.com> on 2019-08-28
Reviewed by Ryosuke Niwa.

Source/WebCore:

Add the HTMLOrForeignElement [1] interface to share properties
and methods between HTML, SVG and MathML.

[1] https://github.com/mathml-refresh/mathml/issues/83

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/StaticRange.h:
  • html/HTMLElement.idl:
  • html/HTMLOrForeignElement.idl: Added.
  • svg/SVGElement.idl:

LayoutTests:

Adjust test expectations to new HTMLOrForeignElement interface.

  • js/dom/dom-static-property-for-in-iteration-expected.txt:
  • platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt:
  • platform/mac/inspector/model/remote-object-dom-expected.txt:
Location:
trunk
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r249207 r249212  
     12019-08-28  Rob Buis  <rbuis@igalia.com>
     2
     3        Implement HTMLOrForeignElement
     4        https://bugs.webkit.org/show_bug.cgi?id=201219
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Adjust test expectations to new HTMLOrForeignElement interface.
     9
     10        * js/dom/dom-static-property-for-in-iteration-expected.txt:
     11        * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt:
     12        * platform/mac/inspector/model/remote-object-dom-expected.txt:
     13
    1142019-08-28  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt

    r244582 r249212  
    3636PASS a["translate"] is true
    3737PASS a["dir"] is
    38 PASS a["dataset"] is [object DOMStringMap]
    3938PASS a["hidden"] is false
    40 PASS a["tabIndex"] is 0
    4139PASS a["accessKey"] is
    4240PASS a["draggable"] is true
     
    4644PASS a["isContentEditable"] is false
    4745PASS a["offsetParent"] is [object HTMLBodyElement]
    48 PASS a["offsetTop"] is 714
     46PASS a["offsetTop"] is 684
    4947PASS a["offsetLeft"] is 8
    5048PASS a["offsetWidth"] is 40
     
    130128PASS a["onpointerenter"] is null
    131129PASS a["onpointerleave"] is null
     130PASS a["dataset"] is [object DOMStringMap]
     131PASS a["tabIndex"] is 0
    132132PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
    133133PASS a["prefix"] is null
  • trunk/LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt

    r244592 r249212  
    3838PASS a["translate"] is true
    3939PASS a["dir"] is
    40 PASS a["dataset"] is [object DOMStringMap]
    4140PASS a["hidden"] is false
    42 PASS a["tabIndex"] is 0
    4341PASS a["accessKey"] is
    4442PASS a["draggable"] is true
     
    4846PASS a["isContentEditable"] is false
    4947PASS a["offsetParent"] is [object HTMLBodyElement]
    50 PASS a["offsetTop"] is 744
     48PASS a["offsetTop"] is 714
    5149PASS a["offsetLeft"] is 8
    5250PASS a["offsetWidth"] is 40
     
    133131PASS a["onpointerenter"] is null
    134132PASS a["onpointerleave"] is null
     133PASS a["dataset"] is [object DOMStringMap]
     134PASS a["tabIndex"] is 0
    135135PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
    136136PASS a["prefix"] is null
  • trunk/LayoutTests/platform/mac/inspector/model/remote-object-dom-expected.txt

    r224125 r249212  
    167167      },
    168168      {
    169         "_name": "dataset",
    170         "_type": "object",
    171         "_value": "DOMStringMap"
     169        "_name": "hidden",
     170        "_type": "boolean",
     171        "_value": "false"
    172172      }
    173173    ],
  • trunk/Source/WebCore/CMakeLists.txt

    r249066 r249212  
    825825    html/HTMLOptionElement.idl
    826826    html/HTMLOptionsCollection.idl
     827    html/HTMLOrForeignElement.idl
    827828    html/HTMLOutputElement.idl
    828829    html/HTMLParagraphElement.idl
  • trunk/Source/WebCore/ChangeLog

    r249209 r249212  
     12019-08-28  Rob Buis  <rbuis@igalia.com>
     2
     3        Implement HTMLOrForeignElement
     4        https://bugs.webkit.org/show_bug.cgi?id=201219
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Add the HTMLOrForeignElement [1] interface to share properties
     9        and methods between HTML, SVG and MathML.
     10
     11        [1] https://github.com/mathml-refresh/mathml/issues/83
     12
     13        * CMakeLists.txt:
     14        * DerivedSources-input.xcfilelist:
     15        * DerivedSources-output.xcfilelist:
     16        * DerivedSources.make:
     17        * Sources.txt:
     18        * WebCore.xcodeproj/project.pbxproj:
     19        * dom/StaticRange.h:
     20        * html/HTMLElement.idl:
     21        * html/HTMLOrForeignElement.idl: Added.
     22        * svg/SVGElement.idl:
     23
    1242019-08-28  Sam Weinig  <weinig@apple.com>
    225
  • trunk/Source/WebCore/DerivedSources-input.xcfilelist

    r249066 r249212  
    713713$(PROJECT_DIR)/html/HTMLOptionElement.idl
    714714$(PROJECT_DIR)/html/HTMLOptionsCollection.idl
     715$(PROJECT_DIR)/html/HTMLOrForeignElement.idl
    715716$(PROJECT_DIR)/html/HTMLOutputElement.idl
    716717$(PROJECT_DIR)/html/HTMLParagraphElement.idl
  • trunk/Source/WebCore/DerivedSources-output.xcfilelist

    r249066 r249212  
    776776$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLModElement.cpp
    777777$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLModElement.h
     778$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOrForeignElement.cpp
     779$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOrForeignElement.h
    778780$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOListElement.cpp
    779781$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLOListElement.h
  • trunk/Source/WebCore/DerivedSources.make

    r249066 r249212  
    717717    $(WebCore)/html/HTMLOptionElement.idl \
    718718    $(WebCore)/html/HTMLOptionsCollection.idl \
     719    $(WebCore)/html/HTMLOrForeignElement.idl \
    719720    $(WebCore)/html/HTMLOutputElement.idl \
    720721    $(WebCore)/html/HTMLParagraphElement.idl \
  • trunk/Source/WebCore/Sources.txt

    r249177 r249212  
    25612561WebCoreJSBuiltinInternals.cpp
    25622562WebCoreJSBuiltins.cpp
     2563JSHTMLElementWrapperFactory.cpp
    25632564JSSVGElementWrapperFactory.cpp
    2564 JSHTMLElementWrapperFactory.cpp
    25652565
    25662566// IDL bindings
     
    28902890JSHTMLMeterElement.cpp
    28912891JSHTMLModElement.cpp
     2892JSHTMLOrForeignElement.cpp
    28922893JSHTMLOListElement.cpp
    28932894JSHTMLObjectElement.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r249177 r249212  
    1199111991                AAC08CF015F941FC00F1E188 /* AccessibilitySVGRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilitySVGRoot.cpp; sourceTree = "<group>"; };
    1199211992                AAC08CF115F941FC00F1E188 /* AccessibilitySVGRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilitySVGRoot.h; sourceTree = "<group>"; };
     11993                AACC83D62316569E00EB6BF5 /* HTMLOrForeignElement.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HTMLOrForeignElement.idl; sourceTree = "<group>"; };
     11994                AACC83D72316576A00EB6BF5 /* JSHTMLOrForeignElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSHTMLOrForeignElement.h; sourceTree = "<group>"; };
     11995                AACC83D82316576B00EB6BF5 /* JSHTMLOrForeignElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOrForeignElement.cpp; sourceTree = "<group>"; };
    1199311996                AAE27B7416CBFC0D00623043 /* PlatformSpeechSynthesizerMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformSpeechSynthesizerMock.cpp; sourceTree = "<group>"; };
    1199411997                AAE27B7516CBFC0D00623043 /* PlatformSpeechSynthesizerMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformSpeechSynthesizerMock.h; sourceTree = "<group>"; };
     
    2152621529                                A81369BE097374F500D74463 /* HTMLOptionsCollection.h */,
    2152721530                                85DF2F920AA3C9B600AD64C5 /* HTMLOptionsCollection.idl */,
     21531                                AACC83D62316569E00EB6BF5 /* HTMLOrForeignElement.idl */,
    2152821532                                4AD01005127E642A0015035F /* HTMLOutputElement.cpp */,
    2152921533                                4AD01006127E642A0015035F /* HTMLOutputElement.h */,
     
    2279622800                                448A29BE0A46D9CB0030759F /* JSHTMLOptionsCollection.cpp */,
    2279722801                                448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */,
     22802                                AACC83D82316576B00EB6BF5 /* JSHTMLOrForeignElement.cpp */,
     22803                                AACC83D72316576A00EB6BF5 /* JSHTMLOrForeignElement.h */,
    2279822804                                4AD0173A127E82860015035F /* JSHTMLOutputElement.cpp */,
    2279922805                                4AD0173B127E82860015035F /* JSHTMLOutputElement.h */,
  • trunk/Source/WebCore/dom/StaticRange.h

    r249079 r249212  
    2626#pragma once
    2727
     28#include "ExceptionOr.h"
    2829#include <wtf/Ref.h>
    2930#include <wtf/RefCounted.h>
  • trunk/Source/WebCore/html/HTMLElement.idl

    r248784 r249212  
    3030    [CEReactions] attribute boolean translate;
    3131    [CEReactions] attribute DOMString dir;
    32     readonly attribute DOMStringMap dataset; // FIXME: Should be [SameObject].
    3332
    3433    // User interaction.
    3534    [CEReactions, Reflect] attribute boolean hidden;
    3635    void click();
    37     [CEReactions, ImplementedAs=tabIndexForBindings] attribute long tabIndex;
    38     void focus();
    39     void blur();
    4036    [CEReactions, Reflect] attribute DOMString accessKey;
    4137    // readonly attribute DOMString accessKeyLabel; // FIXME: Not supported.
     
    7470HTMLElement implements ElementCSSInlineStyle;
    7571HTMLElement implements GlobalEventHandlers;
     72HTMLElement implements HTMLOrForeignElement;
  • trunk/Source/WebCore/svg/SVGElement.idl

    r248784 r249212  
    3232    readonly attribute SVGAnimatedString className;
    3333
    34     [CEReactions=NotNeeded, ImplementedAs=tabIndexForBindings] attribute long tabIndex;
    35 
    3634    // FIXME: Using "undefined" as default parameter value is wrong.
    3735    // This method is deprecated, and we'd like to remove it someday.
    3836    DeprecatedCSSOMValue getPresentationAttribute(optional DOMString name = "undefined");
    39 
    40     void focus();
    41     void blur();
    42 
    43     readonly attribute DOMStringMap dataset;
    4437};
    4538
    4639SVGElement implements ElementCSSInlineStyle;
    4740SVGElement implements GlobalEventHandlers;
     41SVGElement implements HTMLOrForeignElement;
Note: See TracChangeset for help on using the changeset viewer.