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

Side by Side Diff: third_party/WebKit/Source/web/WebSelection.cpp

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return DCHECK_IS_ON checks. Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "public/web/WebSelection.h" 5 #include "public/web/WebSelection.h"
6 6
7 #include "core/editing/SelectionType.h" 7 #include "core/editing/SelectionType.h"
8 #include "core/layout/compositing/CompositedSelection.h" 8 #include "core/layout/compositing/CompositedSelection.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 static WebSelectionBound getWebSelectionBound(const CompositedSelection& selecti on, bool isStart) 12 static WebSelectionBound getWebSelectionBound(const CompositedSelection& selecti on, bool isStart)
13 { 13 {
14 ASSERT(selection.type != NoSelection); 14 DCHECK_NE(selection.type, NoSelection);
15 const CompositedSelectionBound& bound = isStart ? selection.start : selectio n.end; 15 const CompositedSelectionBound& bound = isStart ? selection.start : selectio n.end;
16 ASSERT(bound.layer); 16 DCHECK(bound.layer);
17 17
18 WebSelectionBound::Type type = WebSelectionBound::Caret; 18 WebSelectionBound::Type type = WebSelectionBound::Caret;
19 if (selection.type == RangeSelection) { 19 if (selection.type == RangeSelection) {
20 if (isStart) 20 if (isStart)
21 type = bound.isTextDirectionRTL ? WebSelectionBound::SelectionRight : WebSelectionBound::SelectionLeft; 21 type = bound.isTextDirectionRTL ? WebSelectionBound::SelectionRight : WebSelectionBound::SelectionLeft;
22 else 22 else
23 type = bound.isTextDirectionRTL ? WebSelectionBound::SelectionLeft : WebSelectionBound::SelectionRight; 23 type = bound.isTextDirectionRTL ? WebSelectionBound::SelectionLeft : WebSelectionBound::SelectionRight;
24 } 24 }
25 25
26 WebSelectionBound result(type); 26 WebSelectionBound result(type);
(...skipping 17 matching lines...) Expand all
44 WebSelection::WebSelection(const WebSelection& other) 44 WebSelection::WebSelection(const WebSelection& other)
45 : m_selectionType(other.m_selectionType) 45 : m_selectionType(other.m_selectionType)
46 , m_start(other.m_start) 46 , m_start(other.m_start)
47 , m_end(other.m_end) 47 , m_end(other.m_end)
48 , m_isEditable(other.m_isEditable) 48 , m_isEditable(other.m_isEditable)
49 , m_isEmptyTextFormControl(other.m_isEmptyTextFormControl) 49 , m_isEmptyTextFormControl(other.m_isEmptyTextFormControl)
50 { 50 {
51 } 51 }
52 52
53 } // namespace blink 53 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698