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

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: Updated as per code review comments Created 6 years, 2 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/core/editing/htmlediting.cpp
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index 3813ae4cacc9522a4702d2e33e1404b4538b4432..b3c1a19bdc3088881394c445600d0b2eb524649a 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)
leviw_travelin_and_unemployed 2014/10/14 23:04:40 Why are you changing this function? isEnclosingBox
yosin_UTC9 2014/10/15 00:55:22 Since |TextDirection| has two values, |LTR| and |R
Habib Virji 2014/10/16 15:55:09 Done.
{
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;
}
// This method is used to create positions in the DOM. It returns the maximum valid offset
« Source/core/editing/VisiblePosition.cpp ('K') | « Source/core/editing/htmlediting.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698