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

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

Issue 2837423003: Remove unused function of LayoutSelection::GetVisibleSelection() (Closed)
Patch Set: Created 3 years, 7 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/editing/LayoutSelection.h ('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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 23 matching lines...) Expand all
34 34
35 LayoutSelection::LayoutSelection(FrameSelection& frame_selection) 35 LayoutSelection::LayoutSelection(FrameSelection& frame_selection)
36 : frame_selection_(&frame_selection), 36 : frame_selection_(&frame_selection),
37 has_pending_selection_(false), 37 has_pending_selection_(false),
38 force_hide_(false), 38 force_hide_(false),
39 selection_start_(nullptr), 39 selection_start_(nullptr),
40 selection_end_(nullptr), 40 selection_end_(nullptr),
41 selection_start_pos_(-1), 41 selection_start_pos_(-1),
42 selection_end_pos_(-1) {} 42 selection_end_pos_(-1) {}
43 43
44 const VisibleSelection& LayoutSelection::GetVisibleSelection() const {
45 return frame_selection_->ComputeVisibleSelectionInDOMTree();
46 }
47
48 SelectionInFlatTree LayoutSelection::CalcVisibleSelection( 44 SelectionInFlatTree LayoutSelection::CalcVisibleSelection(
49 const VisibleSelectionInFlatTree& original_selection) const { 45 const VisibleSelectionInFlatTree& original_selection) const {
50 const PositionInFlatTree& start = original_selection.Start(); 46 const PositionInFlatTree& start = original_selection.Start();
51 const PositionInFlatTree& end = original_selection.end(); 47 const PositionInFlatTree& end = original_selection.end();
52 SelectionType selection_type = original_selection.GetSelectionType(); 48 SelectionType selection_type = original_selection.GetSelectionType();
53 const TextAffinity affinity = original_selection.Affinity(); 49 const TextAffinity affinity = original_selection.Affinity();
54 50
55 bool paint_block_cursor = 51 bool paint_block_cursor =
56 frame_selection_->ShouldShowBlockCursor() && 52 frame_selection_->ShouldShowBlockCursor() &&
57 selection_type == SelectionType::kCaretSelection && 53 selection_type == SelectionType::kCaretSelection &&
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 443
448 o->SetShouldInvalidateSelection(); 444 o->SetShouldInvalidateSelection();
449 } 445 }
450 } 446 }
451 447
452 DEFINE_TRACE(LayoutSelection) { 448 DEFINE_TRACE(LayoutSelection) {
453 visitor->Trace(frame_selection_); 449 visitor->Trace(frame_selection_);
454 } 450 }
455 451
456 } // namespace blink 452 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/LayoutSelection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698