Add some basic methods and properties to the injected bundle Objective-C DOM API
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 06:34:16 +0000 (06:34 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 06:34:16 +0000 (06:34 +0000)
commit0e3dfe9fd35d15923322c3dc075bb4881e1f014d
tree0c7d6f5a503da0daa7261249c1ceb3c6f938d8cd
parentbd57289a8ac4759279ce5f82787dc4d4d80d4c28
Add some basic methods and properties to the injected bundle Objective-C DOM API
https://bugs.webkit.org/show_bug.cgi?id=99137

Reviewed by Sam Weinig.

Source/WebCore:

Export needed symbols.

* WebCore.exp.in:

Source/WebKit2:

Add methods and properties that allow for tree traversal, node creation/insertion,
attribute modification, text node retrieval, and range creation.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
(toDocument):
(-[WKDOMDocument createElement:]):
(-[WKDOMDocument createTextNode:]):
(-[WKDOMDocument body]):
* WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
(-[WKDOMElement hasAttribute:]):
(-[WKDOMElement getAttribute:]):
(-[WKDOMElement setAttribute:value:]):
(-[WKDOMElement tagName]):
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::WKDOMNodeClass):
(WebKit::toWebCoreText):
(WebKit::toWKDOMText):
(WebKit::toWebCoreRange):
* WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
(-[WKDOMNode insertNode:before:]):
(-[WKDOMNode appendChild:]):
(-[WKDOMNode parentNode]):
(-[WKDOMNode firstChild]):
(-[WKDOMNode nextSibling]):
* WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange setStart:offset:]):
(-[WKDOMRange setEnd:offset:]):
(-[WKDOMRange collapse:]):
(-[WKDOMRange selectNode:]):
(-[WKDOMRange selectNodeContents:]):
(-[WKDOMRange isCollapsed]):
* WebProcess/InjectedBundle/API/mac/WKDOMText.h: Added.
* WebProcess/InjectedBundle/API/mac/WKDOMText.mm: Added.
(-[WKDOMText data]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebKit2/ChangeLog
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMDocument.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMElement.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMElement.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMInternals.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMNode.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMRange.h
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMRange.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.h [new file with mode: 0644]
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMText.mm [new file with mode: 0644]