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

Side by Side Diff: third_party/WebKit/Source/core/editing/CaretBase.cpp

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return nullptr; 64 return nullptr;
65 65
66 // if caretNode is a block and caret is inside it then caret should be painted 66 // if caretNode is a block and caret is inside it then caret should be painted
67 // by that block 67 // by that block
68 bool paintedByBlock = 68 bool paintedByBlock =
69 layoutObject->isLayoutBlock() && caretRendersInsideNode(node); 69 layoutObject->isLayoutBlock() && caretRendersInsideNode(node);
70 // TODO(yoichio): This function is called at least 70 // TODO(yoichio): This function is called at least
71 // DocumentLifeCycle::LayoutClean but caretRendersInsideNode above can 71 // DocumentLifeCycle::LayoutClean but caretRendersInsideNode above can
72 // layout. Thus |node->layoutObject()| can be changed then this is bad 72 // layout. Thus |node->layoutObject()| can be changed then this is bad
73 // design. We should make caret painting algorithm clean. 73 // design. We should make caret painting algorithm clean.
74 CHECK_EQ(layoutObject, node->layoutObject()) 74 // Layout tree should not changed
75 << "Layout tree should not changed"; 75 CHECK_EQ(layoutObject, node->layoutObject());
76 return paintedByBlock ? toLayoutBlock(layoutObject) 76 return paintedByBlock ? toLayoutBlock(layoutObject)
77 : layoutObject->containingBlock(); 77 : layoutObject->containingBlock();
78 } 78 }
79 79
80 static void mapCaretRectToCaretPainter(LayoutItem caretLayoutItem, 80 static void mapCaretRectToCaretPainter(LayoutItem caretLayoutItem,
81 LayoutBlockItem caretPainterItem, 81 LayoutBlockItem caretPainterItem,
82 LayoutRect& caretRect) { 82 LayoutRect& caretRect) {
83 // FIXME: This shouldn't be called on un-rooted subtrees. 83 // FIXME: This shouldn't be called on un-rooted subtrees.
84 // FIXME: This should probably just use mapLocalToAncestor. 84 // FIXME: This should probably just use mapLocalToAncestor.
85 // Compute an offset between the caretLayoutItem and the caretPainterItem. 85 // Compute an offset between the caretLayoutItem and the caretPainterItem.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 String CaretBase::debugName() const { 198 String CaretBase::debugName() const {
199 return "Caret"; 199 return "Caret";
200 } 200 }
201 201
202 LayoutRect CaretBase::visualRect() const { 202 LayoutRect CaretBase::visualRect() const {
203 return m_visualRect; 203 return m_visualRect;
204 } 204 }
205 205
206 } // namespace blink 206 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698