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

Side by Side Diff: ui/views/view.cc

Issue 2660593002: Paint text cursor in LAYER_SOLID_COLOR (Closed)
Patch Set: address comments Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 observer.OnChildViewReordered(view); 291 observer.OnChildViewReordered(view);
292 292
293 ReorderLayers(); 293 ReorderLayers();
294 } 294 }
295 295
296 void View::RemoveChildView(View* view) { 296 void View::RemoveChildView(View* view) {
297 DoRemoveChildView(view, true, true, false, NULL); 297 DoRemoveChildView(view, true, true, false, NULL);
298 } 298 }
299 299
300 void View::RemoveAllChildViews(bool delete_children) { 300 void View::RemoveAllChildViews(bool delete_children) {
301 while (!children_.empty()) 301 while (!children_.empty()) {
302 const char* class_name = children_.front()->GetClassName();
303 LOG(ERROR) << "now removing child " << class_name;
302 DoRemoveChildView(children_.front(), false, false, delete_children, NULL); 304 DoRemoveChildView(children_.front(), false, false, delete_children, NULL);
305 LOG(ERROR) << "After removing child " << class_name << " root view is "
306 << GetWidget()->GetRootView();
307 }
sadrul 2017/02/13 20:33:30 Remove these changes?
yiyix 2017/02/13 21:12:23 so sorry, i fixed the changes but i forget to save
303 UpdateTooltip(); 308 UpdateTooltip();
304 } 309 }
305 310
306 bool View::Contains(const View* view) const { 311 bool View::Contains(const View* view) const {
307 for (const View* v = view; v; v = v->parent_) { 312 for (const View* v = view; v; v = v->parent_) {
308 if (v == this) 313 if (v == this)
309 return true; 314 return true;
310 } 315 }
311 return false; 316 return false;
312 } 317 }
(...skipping 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 // Message the RootView to do the drag and drop. That way if we're removed 2556 // Message the RootView to do the drag and drop. That way if we're removed
2552 // the RootView can detect it and avoid calling us back. 2557 // the RootView can detect it and avoid calling us back.
2553 gfx::Point widget_location(event.location()); 2558 gfx::Point widget_location(event.location());
2554 ConvertPointToWidget(this, &widget_location); 2559 ConvertPointToWidget(this, &widget_location);
2555 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2560 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2556 // WARNING: we may have been deleted. 2561 // WARNING: we may have been deleted.
2557 return true; 2562 return true;
2558 } 2563 }
2559 2564
2560 } // namespace views 2565 } // namespace views
OLDNEW
« ui/views/controls/textfield/textfield.cc ('K') | « ui/views/controls/textfield/textfield.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698