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

Side by Side Diff: Source/core/layout/PendingSelection.h

Issue 1315423006: Moves an implementation of LayoutView::commitPendingSelection() to PendingSelection::commit() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-07T11:06:22 Created 5 years, 3 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 | « Source/core/layout/LayoutView.cpp ('k') | Source/core/layout/PendingSelection.cpp » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 12 matching lines...) Expand all
23 #define PendingSelection_h 23 #define PendingSelection_h
24 24
25 #include "core/editing/Position.h" 25 #include "core/editing/Position.h"
26 #include "core/editing/VisibleSelection.h" 26 #include "core/editing/VisibleSelection.h"
27 #include "platform/heap/Handle.h" 27 #include "platform/heap/Handle.h"
28 28
29 namespace blink { 29 namespace blink {
30 30
31 class Document; 31 class Document;
32 class FrameSelection; 32 class FrameSelection;
33 class LayoutView;
33 34
34 class PendingSelection final : public NoBaseWillBeGarbageCollected<PendingSelect ion> { 35 class PendingSelection final : public NoBaseWillBeGarbageCollected<PendingSelect ion> {
35 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PendingSelection); 36 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PendingSelection);
36 public: 37 public:
37 static PassOwnPtrWillBeRawPtr<PendingSelection> create() 38 static PassOwnPtrWillBeRawPtr<PendingSelection> create()
38 { 39 {
39 return adoptPtrWillBeNoop(new PendingSelection); 40 return adoptPtrWillBeNoop(new PendingSelection);
40 } 41 }
41 42
42 bool hasPendingSelection() const { return m_hasPendingSelection; } 43 bool hasPendingSelection() const { return m_hasPendingSelection; }
43 void setSelection(const FrameSelection&); 44 void setSelection(const FrameSelection&);
44 void clear(); 45 void commit(LayoutView&);
45
46 bool isInDocument(const Document&) const;
47 VisibleSelection calcVisibleSelection() const;
48 46
49 DECLARE_TRACE(); 47 DECLARE_TRACE();
50 48
51 private: 49 private:
52 PendingSelection(); 50 PendingSelection();
53 51
54 template <typename Strategy> 52 template <typename Strategy>
55 bool isInDocumentAlgorithm(const Document&) const; 53 bool isInDocumentAlgorithm(const Document&) const;
56 54
57 template <typename Strategy> 55 template <typename Strategy>
58 VisibleSelection calcVisibleSelectionAlgorithm() const; 56 VisibleSelection calcVisibleSelectionAlgorithm() const;
57 void clear();
58 template <typename Strategy>
59 void commitAlgorithm(LayoutView&);
60 bool isInDocument(const Document&) const;
59 61
60 VisibleSelection m_selection; 62 VisibleSelection m_selection;
61 bool m_hasPendingSelection : 1; 63 bool m_hasPendingSelection : 1;
62 bool m_shouldShowBlockCursor : 1; 64 bool m_shouldShowBlockCursor : 1;
63 }; 65 };
64 66
65 } // namespace blink 67 } // namespace blink
66 68
67 #endif 69 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/layout/PendingSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698