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

Unified Diff: Source/core/editing/htmlediting.cpp

Issue 602423002: Mixing content editable and non-editable in direction RTL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added isEnclosingBoxHasLeftToRightDirection in place of directionOfEnclosingBlock Created 6 years, 3 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/editing/htmlediting.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/htmlediting.cpp
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index 3813ae4cacc9522a4702d2e33e1404b4538b4432..4336f4f1abab4cf060b8f10734d473344a029926 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -351,13 +351,13 @@ bool inSameContainingBlockFlowElement(Node* a, Node* b)
return a && b && enclosingBlockFlowElement(*a) == enclosingBlockFlowElement(*b);
}
-TextDirection directionOfEnclosingBlock(const Position& position)
+bool isEnclosingBoxHasLeftToRightDirection(const Position& position)
{
Element* enclosingBlockElement = enclosingBlock(position.containerNode());
if (!enclosingBlockElement)
- return LTR;
+ return true;
RenderObject* renderer = enclosingBlockElement->renderer();
- return renderer ? renderer->style()->direction() : LTR;
+ return renderer ? (renderer->style()->direction() == LTR) : true;
yosin 2014/10/01 08:00:11 nit: We don't need to use "?" operator here. We co
Habib Virji 2014/10/01 15:56:16 Done.
}
// This method is used to create positions in the DOM. It returns the maximum valid offset
« no previous file with comments | « Source/core/editing/htmlediting.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698