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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 // If there is a continuation then we need to consult it here, since this is 936 // If there is a continuation then we need to consult it here, since this is
937 // the root of the tree walk and it wouldn't otherwise get picked up. 937 // the root of the tree walk and it wouldn't otherwise get picked up.
938 // Continuations should always be siblings in the tree, so any others should 938 // Continuations should always be siblings in the tree, so any others should
939 // get picked up already by the tree walk. 939 // get picked up already by the tree walk.
940 if (continuation()) 940 if (continuation())
941 continuation()->computeLayerHitTestRects(rects); 941 continuation()->computeLayerHitTestRects(rects);
942 } 942 }
943 943
944 LayoutRect LayoutBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIndentOffset) 944 LayoutRect LayoutBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIndentOffset)
945 { 945 {
946 ASSERT(!slowFirstChild()); 946 DCHECK(!slowFirstChild() || slowFirstChild()->isPseudoElement());
947 947
948 // FIXME: This does not take into account either :first-line or :first-lette r 948 // FIXME: This does not take into account either :first-line or :first-lette r
949 // However, as soon as some content is entered, the line boxes will be 949 // However, as soon as some content is entered, the line boxes will be
950 // constructed and this kludge is not called any more. So only the caret siz e 950 // constructed and this kludge is not called any more. So only the caret siz e
951 // of an empty :first-line'd block is wrong. I think we can live with that. 951 // of an empty :first-line'd block is wrong. I think we can live with that.
952 const ComputedStyle& currentStyle = firstLineStyleRef(); 952 const ComputedStyle& currentStyle = firstLineStyleRef();
953 953
954 enum CaretAlignment { AlignLeft, AlignRight, AlignCenter }; 954 enum CaretAlignment { AlignLeft, AlignRight, AlignCenter };
955 955
956 CaretAlignment alignment = AlignLeft; 956 CaretAlignment alignment = AlignLeft;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 if (rootElementStyle->hasBackground()) 1134 if (rootElementStyle->hasBackground())
1135 return false; 1135 return false;
1136 1136
1137 if (node() != document().firstBodyElement()) 1137 if (node() != document().firstBodyElement())
1138 return false; 1138 return false;
1139 1139
1140 return true; 1140 return true;
1141 } 1141 }
1142 1142
1143 } // namespace blink 1143 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698