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

Side by Side Diff: sky/engine/core/editing/FrameSelection.cpp

Issue 952273003: Make WebView::close not crash and start to fix navigation in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fixed Created 5 years, 9 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 | « no previous file | sky/engine/core/script/dart_controller.cc » ('j') | 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) 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 void FrameSelection::prepareForDestruction() 1134 void FrameSelection::prepareForDestruction()
1135 { 1135 {
1136 m_granularity = CharacterGranularity; 1136 m_granularity = CharacterGranularity;
1137 1137
1138 m_caretBlinkTimer.stop(); 1138 m_caretBlinkTimer.stop();
1139 1139
1140 RenderView* view = m_frame->contentRenderer(); 1140 RenderView* view = m_frame->contentRenderer();
1141 if (view) 1141 if (view)
1142 view->clearSelection(); 1142 view->clearSelection();
1143 1143
1144 m_frame = 0;
1145
1144 setSelection(VisibleSelection(), CloseTyping | ClearTypingStyle | DoNotUpdat eAppearance); 1146 setSelection(VisibleSelection(), CloseTyping | ClearTypingStyle | DoNotUpdat eAppearance);
1145 } 1147 }
1146 1148
1147 void FrameSelection::setStart(const VisiblePosition &pos, EUserTriggered trigger ) 1149 void FrameSelection::setStart(const VisiblePosition &pos, EUserTriggered trigger )
1148 { 1150 {
1149 if (m_selection.isBaseFirst()) 1151 if (m_selection.isBaseFirst())
1150 setBase(pos, trigger); 1152 setBase(pos, trigger);
1151 else 1153 else
1152 setExtent(pos, trigger); 1154 setExtent(pos, trigger);
1153 } 1155 }
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 sel.showTreeForThis(); 1625 sel.showTreeForThis();
1624 } 1626 }
1625 1627
1626 void showTree(const blink::FrameSelection* sel) 1628 void showTree(const blink::FrameSelection* sel)
1627 { 1629 {
1628 if (sel) 1630 if (sel)
1629 sel->showTreeForThis(); 1631 sel->showTreeForThis();
1630 } 1632 }
1631 1633
1632 #endif 1634 #endif
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/script/dart_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698