Title: [143793] trunk/Source/WebKit/chromium
- Revision
- 143793
- Author
- [email protected]
- Date
- 2013-02-22 14:10:38 -0800 (Fri, 22 Feb 2013)
Log Message
[Chromium] Expose shadowRoot to the WebKit API
https://bugs.webkit.org/show_bug.cgi?id=110522
Reviewed by Dimitri Glazkov.
* public/WebElement.h:
(WebElement):
* src/WebElement.cpp:
(WebKit::WebElement::shadowRoot):
(WebKit):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (143792 => 143793)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-02-22 22:10:29 UTC (rev 143792)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-02-22 22:10:38 UTC (rev 143793)
@@ -1,3 +1,16 @@
+2013-02-22 Fady Samuel <[email protected]>
+
+ [Chromium] Expose shadowRoot to the WebKit API
+ https://bugs.webkit.org/show_bug.cgi?id=110522
+
+ Reviewed by Dimitri Glazkov.
+
+ * public/WebElement.h:
+ (WebElement):
+ * src/WebElement.cpp:
+ (WebKit::WebElement::shadowRoot):
+ (WebKit):
+
2013-02-22 Sheriff Bot <[email protected]>
Unreviewed, rolling out r143734.
Modified: trunk/Source/WebKit/chromium/public/WebElement.h (143792 => 143793)
--- trunk/Source/WebKit/chromium/public/WebElement.h 2013-02-22 22:10:29 UTC (rev 143792)
+++ trunk/Source/WebKit/chromium/public/WebElement.h 2013-02-22 22:10:38 UTC (rev 143793)
@@ -70,6 +70,7 @@
WEBKIT_EXPORT WebString attributeLocalName(unsigned index) const;
WEBKIT_EXPORT WebString attributeValue(unsigned index) const;
WEBKIT_EXPORT unsigned attributeCount() const;
+ WEBKIT_EXPORT WebNode shadowRoot() const;
// Returns the language code specified for this element. This attribute
// is inherited, so the returned value is drawn from the closest parent
Modified: trunk/Source/WebKit/chromium/src/WebElement.cpp (143792 => 143793)
--- trunk/Source/WebKit/chromium/src/WebElement.cpp 2013-02-22 22:10:29 UTC (rev 143792)
+++ trunk/Source/WebKit/chromium/src/WebElement.cpp 2013-02-22 22:10:38 UTC (rev 143793)
@@ -35,6 +35,7 @@
#include "NamedNodeMap.h"
#include "RenderBoxModelObject.h"
#include "RenderObject.h"
+#include "ShadowRoot.h"
#include <public/WebRect.h>
#include <wtf/PassRefPtr.h>
@@ -104,6 +105,12 @@
return constUnwrap<Element>()->attributeCount();
}
+WebNode WebElement::shadowRoot() const
+{
+ Node* shadowRoot = constUnwrap<Element>()->shadowRoot()->toNode();
+ return WebNode(shadowRoot);
+}
+
WebString WebElement::attributeLocalName(unsigned index) const
{
if (index >= attributeCount())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes