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

Unified Diff: Source/modules/accessibility/AXLayoutObject.cpp

Issue 1156353003: Added ability to distinguished between rich and plain text editables on accessibility objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed new function to isContentRichlyEditable. Created 5 years, 6 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
Index: Source/modules/accessibility/AXLayoutObject.cpp
diff --git a/Source/modules/accessibility/AXLayoutObject.cpp b/Source/modules/accessibility/AXLayoutObject.cpp
index a8bebb3326de950ddcbef00a7acb37130bfe5904..2071e79e2704b01773646278066da73e691e2d98 100644
--- a/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/Source/modules/accessibility/AXLayoutObject.cpp
@@ -375,6 +375,26 @@ static bool isLinkable(const AXObject& object)
return object.isLink() || object.isImage() || object.layoutObject()->isText();
}
+bool AXLayoutObject::isContentRichlyEditable() const
+{
+ ASSERT(node());
+ ASSERT(m_layoutObject);
+
+ if (node()->isContentRichlyEditable())
+ return true;
+
+ if (isWebArea()) {
+ Document& document = m_layoutObject->document();
+ HTMLElement* body = document.body();
+ if (body && body->isContentRichlyEditable())
+ return true;
+
+ return document.isContentRichlyEditable();
+ }
+
+ return false;
+}
+
bool AXLayoutObject::isLinked() const
{
if (!isLinkable(*this))

Powered by Google App Engine
This is Rietveld 408576698