Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Unified Diff: Source/core/dom/Document.cpp

Issue 236983004: Move 'designMode' attribute from HTMLDocument to Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 78528d6ab6762d5014ae714718921f8a75c17f52..00d6d6d9be62749306919b292a345416189273c2 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4352,6 +4352,23 @@ bool Document::inDesignMode() const
return false;
}
+String Document::designMode() const
+{
+ return inDesignMode() ? "on" : "off";
+}
+
+void Document::setDesignMode(const String& value)
+{
+ InheritedBool mode;
+ if (equalIgnoringCase(value, "on"))
+ mode = on;
+ else if (equalIgnoringCase(value, "off"))
+ mode = off;
+ else
+ mode = inherit;
+ setDesignMode(mode);
+}
+
Document* Document::parentDocument() const
{
if (!m_frame)
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698