Changeset 96064 in webkit


Ignore:
Timestamp:
Sep 26, 2011 6:44:36 PM (13 years ago)
Author:
adamk@chromium.org
Message:

[MutationObservers] implement MutationRecord
https://bugs.webkit.org/show_bug.cgi?id=68824

Reviewed by Darin Adler.

Implements MutationRecord as specified in the thread at
http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html,
including some minor naming changes from the original proposal.

This is a small part of the MutationObserver API, see
https://bugs.webkit.org/show_bug.cgi?id=68729 for the metabug covering
this feature.

No new tests as this isn't yet exposed to the platform.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • GNUmakefile.list.am:
  • WebCore.gypi:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/MutationRecord.cpp: Added.

(WebCore::MutationRecord::createChildList):
(WebCore::MutationRecord::createAttributes):
(WebCore::MutationRecord::createCharacterData):
(WebCore::MutationRecord::MutationRecord):
(WebCore::MutationRecord::~MutationRecord):

  • dom/MutationRecord.h: Added.

(WebCore::MutationRecord::target):
(WebCore::MutationRecord::addedNodes):
(WebCore::MutationRecord::removedNodes):
(WebCore::MutationRecord::previousSibling):
(WebCore::MutationRecord::nextSibling):
(WebCore::MutationRecord::attributeName):
(WebCore::MutationRecord::attributeNamespace):
(WebCore::MutationRecord::oldValue):
(WebCore::MutationRecord::setOldValue):

  • dom/MutationRecord.idl: Added.
Location:
trunk/Source/WebCore
Files:
3 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r95919 r96064  
    164164    dom/MouseEvent.idl
    165165    dom/MutationEvent.idl
     166    dom/MutationRecord.idl
    166167    dom/NamedNodeMap.idl
    167168    dom/NodeFilter.idl
     
    548549    dom/MouseRelatedEvent.cpp
    549550    dom/MutationEvent.cpp
     551    dom/MutationRecord.cpp
    550552    dom/NamedNodeMap.cpp
    551553    dom/NameNodeList.cpp
  • trunk/Source/WebCore/ChangeLog

    r96061 r96064  
     12011-09-26  Adam Klein  <adamk@chromium.org>
     2
     3        [MutationObservers] implement MutationRecord
     4        https://bugs.webkit.org/show_bug.cgi?id=68824
     5
     6        Reviewed by Darin Adler.
     7
     8        Implements MutationRecord as specified in the thread at
     9        http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html,
     10        including some minor naming changes from the original proposal.
     11
     12        This is a small part of the MutationObserver API, see
     13        https://bugs.webkit.org/show_bug.cgi?id=68729 for the metabug covering
     14        this feature.
     15
     16        No new tests as this isn't yet exposed to the platform.
     17
     18        * CMakeLists.txt:
     19        * DerivedSources.cpp:
     20        * DerivedSources.make:
     21        * GNUmakefile.list.am:
     22        * WebCore.gypi:
     23        * WebCore.pro:
     24        * WebCore.vcproj/WebCore.vcproj:
     25        * WebCore.xcodeproj/project.pbxproj:
     26        * dom/MutationRecord.cpp: Added.
     27        (WebCore::MutationRecord::createChildList):
     28        (WebCore::MutationRecord::createAttributes):
     29        (WebCore::MutationRecord::createCharacterData):
     30        (WebCore::MutationRecord::MutationRecord):
     31        (WebCore::MutationRecord::~MutationRecord):
     32        * dom/MutationRecord.h: Added.
     33        (WebCore::MutationRecord::target):
     34        (WebCore::MutationRecord::addedNodes):
     35        (WebCore::MutationRecord::removedNodes):
     36        (WebCore::MutationRecord::previousSibling):
     37        (WebCore::MutationRecord::nextSibling):
     38        (WebCore::MutationRecord::attributeName):
     39        (WebCore::MutationRecord::attributeNamespace):
     40        (WebCore::MutationRecord::oldValue):
     41        (WebCore::MutationRecord::setOldValue):
     42        * dom/MutationRecord.idl: Added.
     43
    1442011-09-26  Kentaro Hara  <haraken@chromium.org>
    245
  • trunk/Source/WebCore/DerivedSources.cpp

    r96023 r96064  
    246246#include "JSMouseEvent.cpp"
    247247#include "JSMutationEvent.cpp"
     248#include "JSMutationRecord.cpp"
    248249#include "JSNamedNodeMap.cpp"
    249250#include "JSNavigator.cpp"
  • trunk/Source/WebCore/DerivedSources.make

    r95234 r96064  
    299299    MouseEvent \
    300300    MutationEvent \
     301    MutationRecord \
    301302    NamedNodeMap \
    302303    Navigator \
  • trunk/Source/WebCore/GNUmakefile.list.am

    r95935 r96064  
    377377        DerivedSources/WebCore/JSMutationEvent.cpp \
    378378        DerivedSources/WebCore/JSMutationEvent.h \
     379        DerivedSources/WebCore/JSMutationRecord.cpp \
     380        DerivedSources/WebCore/JSMutationRecord.h \
    379381        DerivedSources/WebCore/JSNamedNodeMap.cpp \
    380382        DerivedSources/WebCore/JSNamedNodeMap.h \
     
    12221224        Source/WebCore/dom/MutationEvent.cpp \
    12231225        Source/WebCore/dom/MutationEvent.h \
     1226        Source/WebCore/dom/MutationRecord.cpp \
     1227        Source/WebCore/dom/MutationRecord.h \
    12241228        Source/WebCore/dom/NamedNodeMap.cpp \
    12251229        Source/WebCore/dom/NamedNodeMap.h \
  • trunk/Source/WebCore/WebCore.gypi

    r95942 r96064  
    11861186            'dom/MouseEvent.idl',
    11871187            'dom/MutationEvent.idl',
     1188            'dom/MutationRecord.idl',
    11881189            'dom/NamedNodeMap.idl',
    11891190            'dom/Node.idl',
     
    52005201            'dom/MutationEvent.cpp',
    52015202            'dom/MutationEvent.h',
     5203            'dom/MutationRecord.cpp',
     5204            'dom/MutationRecord.h',
    52025205            'dom/NameNodeList.cpp',
    52035206            'dom/NameNodeList.h',
     
    74667469            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationEvent.cpp',
    74677470            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationEvent.h',
     7471            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationRecord.cpp',
     7472            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationRecord.h',
    74687473            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSNamedNodeMap.cpp',
    74697474            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSNamedNodeMap.h',
  • trunk/Source/WebCore/WebCore.pro

    r95920 r96064  
    511511    dom/MouseRelatedEvent.cpp \
    512512    dom/MutationEvent.cpp \
     513    dom/MutationRecord.cpp \
    513514    dom/NamedNodeMap.cpp \
    514515    dom/NameNodeList.cpp \
     
    15241525    dom/MouseRelatedEvent.h \
    15251526    dom/MutationEvent.h \
     1527    dom/MutationRecord.h \
    15261528    dom/NamedNodeMap.h \
    15271529    dom/NameNodeList.h \
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r96023 r96064  
    1165511655                        </File>
    1165611656                        <File
     11657                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMutationRecord.cpp"
     11658                                >
     11659                                <FileConfiguration
     11660                                        Name="Debug|Win32"
     11661                                        ExcludedFromBuild="true"
     11662                                        >
     11663                                        <Tool
     11664                                                Name="VCCLCompilerTool"
     11665                                        />
     11666                                </FileConfiguration>
     11667                                <FileConfiguration
     11668                                        Name="Release|Win32"
     11669                                        ExcludedFromBuild="true"
     11670                                        >
     11671                                        <Tool
     11672                                                Name="VCCLCompilerTool"
     11673                                        />
     11674                                </FileConfiguration>
     11675                                <FileConfiguration
     11676                                        Name="Debug_Cairo_CFLite|Win32"
     11677                                        ExcludedFromBuild="true"
     11678                                        >
     11679                                        <Tool
     11680                                                Name="VCCLCompilerTool"
     11681                                        />
     11682                                </FileConfiguration>
     11683                                <FileConfiguration
     11684                                        Name="Release_Cairo_CFLite|Win32"
     11685                                        ExcludedFromBuild="true"
     11686                                        >
     11687                                        <Tool
     11688                                                Name="VCCLCompilerTool"
     11689                                        />
     11690                                </FileConfiguration>
     11691                                <FileConfiguration
     11692                                        Name="Debug_All|Win32"
     11693                                        ExcludedFromBuild="true"
     11694                                        >
     11695                                        <Tool
     11696                                                Name="VCCLCompilerTool"
     11697                                        />
     11698                                </FileConfiguration>
     11699                                <FileConfiguration
     11700                                        Name="Production|Win32"
     11701                                        ExcludedFromBuild="true"
     11702                                        >
     11703                                        <Tool
     11704                                                Name="VCCLCompilerTool"
     11705                                        />
     11706                                </FileConfiguration>
     11707                        </File>
     11708                        <File
     11709                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMutationRecord.h"
     11710                                >
     11711                        </File>
     11712                        <File
    1165711713                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSNamedNodeMap.cpp"
    1165811714                                >
     
    4705547111                        </File>
    4705647112                        <File
     47113                                RelativePath="..\dom\MutationRecord.cpp"
     47114                                >
     47115                                <FileConfiguration
     47116                                        Name="Debug|Win32"
     47117                                        ExcludedFromBuild="true"
     47118                                        >
     47119                                        <Tool
     47120                                                Name="VCCLCompilerTool"
     47121                                        />
     47122                                </FileConfiguration>
     47123                                <FileConfiguration
     47124                                        Name="Release|Win32"
     47125                                        ExcludedFromBuild="true"
     47126                                        >
     47127                                        <Tool
     47128                                                Name="VCCLCompilerTool"
     47129                                        />
     47130                                </FileConfiguration>
     47131                                <FileConfiguration
     47132                                        Name="Debug_Cairo_CFLite|Win32"
     47133                                        ExcludedFromBuild="true"
     47134                                        >
     47135                                        <Tool
     47136                                                Name="VCCLCompilerTool"
     47137                                        />
     47138                                </FileConfiguration>
     47139                                <FileConfiguration
     47140                                        Name="Release_Cairo_CFLite|Win32"
     47141                                        ExcludedFromBuild="true"
     47142                                        >
     47143                                        <Tool
     47144                                                Name="VCCLCompilerTool"
     47145                                        />
     47146                                </FileConfiguration>
     47147                                <FileConfiguration
     47148                                        Name="Debug_All|Win32"
     47149                                        ExcludedFromBuild="true"
     47150                                        >
     47151                                        <Tool
     47152                                                Name="VCCLCompilerTool"
     47153                                        />
     47154                                </FileConfiguration>
     47155                                <FileConfiguration
     47156                                        Name="Production|Win32"
     47157                                        ExcludedFromBuild="true"
     47158                                        >
     47159                                        <Tool
     47160                                                Name="VCCLCompilerTool"
     47161                                        />
     47162                                </FileConfiguration>
     47163                        </File>
     47164                        <File
     47165                                RelativePath="..\dom\MutationRecord.h"
     47166                                >
     47167                        </File>
     47168                        <File
    4705747169                                RelativePath="..\dom\NamedNodeMap.cpp"
    4705847170                                >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r95655 r96064  
    54385438                C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */; };
    54395439                C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */; };
     5440                C6F08FBC1430FE8F00685849 /* MutationRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F08FB91430FE8F00685849 /* MutationRecord.cpp */; };
     5441                C6F08FBD1430FE8F00685849 /* MutationRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F08FBA1430FE8F00685849 /* MutationRecord.h */; };
     5442                C6F08FC91431000D00685849 /* JSMutationRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F08FC71431000D00685849 /* JSMutationRecord.cpp */; };
     5443                C6F08FCA1431000D00685849 /* JSMutationRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F08FC81431000D00685849 /* JSMutationRecord.h */; };
    54405444                C6F41047130C6E8900393DE4 /* EntryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F41046130C6E8900393DE4 /* EntryBase.cpp */; };
    54415445                CA3BF67C10D99BAE00E6CE53 /* ScrollAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */; };
     
    1220512209                C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifySelectionListLevel.h; sourceTree = "<group>"; };
    1220612210                C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModifySelectionListLevel.cpp; sourceTree = "<group>"; };
     12211                C6F08FB91430FE8F00685849 /* MutationRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutationRecord.cpp; sourceTree = "<group>"; };
     12212                C6F08FBA1430FE8F00685849 /* MutationRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutationRecord.h; sourceTree = "<group>"; };
     12213                C6F08FBB1430FE8F00685849 /* MutationRecord.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MutationRecord.idl; sourceTree = "<group>"; };
     12214                C6F08FC71431000D00685849 /* JSMutationRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationRecord.cpp; sourceTree = "<group>"; };
     12215                C6F08FC81431000D00685849 /* JSMutationRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationRecord.h; sourceTree = "<group>"; };
    1220712216                C6F41046130C6E8900393DE4 /* EntryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EntryBase.cpp; path = fileapi/EntryBase.cpp; sourceTree = "<group>"; };
    1220812217                CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollAnimator.cpp; sourceTree = "<group>"; };
     
    1741917428                                49C9F48C13D57D320052600A /* JSMediaStreamTrackList.cpp */,
    1742017429                                49C9F48D13D57D320052600A /* JSMediaStreamTrackList.h */,
     17430                                C6F08FC71431000D00685849 /* JSMutationRecord.cpp */,
     17431                                C6F08FC81431000D00685849 /* JSMutationRecord.h */,
    1742117432                                BCD9C2BC0C17B69E005C90A2 /* JSNamedNodeMap.cpp */,
    1742217433                                BCD9C2BD0C17B69E005C90A2 /* JSNamedNodeMap.h */,
     
    2002520036                                85031B340A44EFC700F992E0 /* MutationEvent.h */,
    2002620037                                93EEC1F309C2877700C515D1 /* MutationEvent.idl */,
     20038                                C6F08FB91430FE8F00685849 /* MutationRecord.cpp */,
     20039                                C6F08FBA1430FE8F00685849 /* MutationRecord.h */,
     20040                                C6F08FBB1430FE8F00685849 /* MutationRecord.idl */,
    2002720041                                BCF34A3611A231CD00C71804 /* NamedNodeMap.cpp */,
    2002820042                                A81872180977D3C0005826D9 /* NamedNodeMap.h */,
     
    2214622160                                A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */,
    2214722161                                65DF31FC09D1CC60000BE325 /* JSMutationEvent.h in Headers */,
     22162                                C6F08FCA1431000D00685849 /* JSMutationRecord.h in Headers */,
    2214822163                                BCD9C2C10C17B69E005C90A2 /* JSNamedNodeMap.h in Headers */,
    2214922164                                A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */,
     
    2251822533                                B1AD4E6313A12A0B00846B27 /* MutableTextTrack.h in Headers */,
    2251922534                                85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */,
     22535                                C6F08FBD1430FE8F00685849 /* MutationRecord.h in Headers */,
    2252022536                                A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */,
    2252122537                                A818721E0977D3C0005826D9 /* NameNodeList.h in Headers */,
     
    2516825184                                A86629D209DA2B48009633A5 /* JSMouseEvent.cpp in Sources */,
    2516925185                                65DF31FB09D1CC60000BE325 /* JSMutationEvent.cpp in Sources */,
     25186                                C6F08FC91431000D00685849 /* JSMutationRecord.cpp in Sources */,
    2517025187                                BCD9C2C00C17B69E005C90A2 /* JSNamedNodeMap.cpp in Sources */,
    2517125188                                BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */,
     
    2556725584                                B1AD4E6213A12A0B00846B27 /* MutableTextTrack.cpp in Sources */,
    2556825585                                85031B490A44EFC700F992E0 /* MutationEvent.cpp in Sources */,
     25586                                C6F08FBC1430FE8F00685849 /* MutationRecord.cpp in Sources */,
    2556925587                                BCF34A3711A231CD00C71804 /* NamedNodeMap.cpp in Sources */,
    2557025588                                A81872240977D3C0005826D9 /* NameNodeList.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.