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

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

Issue 235933008: Move 'dir' attribute from HTMLDocument to Document. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move methods to a better location in Document.cpp 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 f58cf8bd9d9fedc616b166dee9c489bdf7a52341..2db03d087af3bbbf3526dcefc6d950beb161ea59 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1391,6 +1391,21 @@ void Document::removeTitle(Element* titleElement)
updateTitle(String());
}
+const AtomicString& Document::dir()
+{
+ // FIXME(crbug.com/363107): This should be the root html element, not the body.
+ if (HTMLElement* b = body())
+ return b->getAttribute(dirAttr);
+ return nullAtom;
+}
+
+void Document::setDir(const AtomicString& value)
+{
+ // FIXME(crbug.com/363107): This should be the root html element, not the body.
+ if (HTMLElement* b = body())
+ b->setAttribute(dirAttr, value);
+}
+
PageVisibilityState Document::pageVisibilityState() const
{
// The visibility of the document is inherited from the visibility of the
« 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