summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/html/HTMLElement.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElement.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
index 8acc6bd26..d20148236 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
@@ -143,6 +143,13 @@ void HTMLElement::parseMappedAttribute(MappedAttribute *attr)
} else if (attr->name() == dirAttr) {
addCSSProperty(attr, CSSPropertyDirection, attr->value());
addCSSProperty(attr, CSSPropertyUnicodeBidi, hasLocalName(bdoTag) ? CSSValueBidiOverride : CSSValueEmbed);
+ } else if (attr->name() == draggableAttr) {
+ const AtomicString& value = attr->value();
+ if (equalIgnoringCase(value, "true")) {
+ addCSSProperty(attr, CSSPropertyWebkitUserDrag, CSSValueElement);
+ addCSSProperty(attr, CSSPropertyWebkitUserSelect, CSSValueNone);
+ } else if (equalIgnoringCase(value, "false"))
+ addCSSProperty(attr, CSSPropertyWebkitUserDrag, CSSValueNone);
}
// standard events
else if (attr->name() == onclickAttr) {
@@ -692,6 +699,16 @@ void HTMLElement::setContentEditable(const String &enabled)
setAttribute(contenteditableAttr, enabled.isEmpty() ? "true" : enabled);
}
+bool HTMLElement::draggable() const
+{
+ return equalIgnoringCase(getAttribute(draggableAttr), "true");
+}
+
+void HTMLElement::setDraggable(bool value)
+{
+ setAttribute(draggableAttr, value ? "true" : "false");
+}
+
void HTMLElement::click()
{
dispatchSimulatedClick(0, false, false);