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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 2159373003: Cursor should respect text align in contenteditable with pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated ASSERT Created 4 years, 5 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: third_party/WebKit/Source/core/layout/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index bc34b9db1025b2770f6ea5057c156dcd55f505d4..a2739a7ffa550b14669a151d4ad11174953dc74e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -1606,7 +1606,7 @@ bool LayoutBlock::hasDragCaret() const
LayoutRect LayoutBlock::localCaretRect(InlineBox* inlineBox, int caretOffset, LayoutUnit* extraWidthToEndOfLine)
{
// Do the normal calculation in most cases.
- if (firstChild() || isInlineBoxWrapperActuallyChild())
+ if ((firstChild() && !firstChild()->isPseudoElement()) || isInlineBoxWrapperActuallyChild())
return LayoutBox::localCaretRect(inlineBox, caretOffset, extraWidthToEndOfLine);
LayoutRect caretRect = localCaretRectForEmptyElement(size().width(), textIndentOffset());

Powered by Google App Engine
This is Rietveld 408576698