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

Side by Side Diff: third_party/WebKit/Source/core/editing/VisibleSelection.h

Issue 2425543003: Ensure clean layout for VisibleSelection::selectionFromContentsOfNode (Closed)
Patch Set: 201610171619 Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004 Apple Computer, 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 public: 57 public:
58 VisibleSelectionTemplate(); 58 VisibleSelectionTemplate();
59 VisibleSelectionTemplate(const VisibleSelectionTemplate&); 59 VisibleSelectionTemplate(const VisibleSelectionTemplate&);
60 VisibleSelectionTemplate& operator=(const VisibleSelectionTemplate&); 60 VisibleSelectionTemplate& operator=(const VisibleSelectionTemplate&);
61 61
62 // Note: |create()| should be used only by |createVisibleSelection| and 62 // Note: |create()| should be used only by |createVisibleSelection| and
63 // |selectionFromContentsOfNode|. 63 // |selectionFromContentsOfNode|.
64 static VisibleSelectionTemplate create(const SelectionTemplate<Strategy>&); 64 static VisibleSelectionTemplate create(const SelectionTemplate<Strategy>&);
65 65
66 // TODO(editing-dev): We should get rid of this function and instead, use
67 // EphemeralRangeTemplate::rangeOfContents and SelectionTemplate::Builder.
66 static VisibleSelectionTemplate selectionFromContentsOfNode(Node*); 68 static VisibleSelectionTemplate selectionFromContentsOfNode(Node*);
67 69
68 SelectionType getSelectionType() const { return m_selectionType; } 70 SelectionType getSelectionType() const { return m_selectionType; }
69 71
70 void setAffinity(TextAffinity affinity) { m_affinity = affinity; } 72 void setAffinity(TextAffinity affinity) { m_affinity = affinity; }
71 TextAffinity affinity() const { return m_affinity; } 73 TextAffinity affinity() const { return m_affinity; }
72 74
73 // TODO(yosin): To make |VisibleSelection| as immutable object, we should 75 // TODO(yosin): To make |VisibleSelection| as immutable object, we should
74 // get rid of |setBase()| and |setExtent()| by replacing them with 76 // get rid of |setBase()| and |setExtent()| by replacing them with
75 // |createVisibleSelection()|. 77 // |createVisibleSelection()|.
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 273
272 #ifndef NDEBUG 274 #ifndef NDEBUG
273 // Outside the WebCore namespace for ease of invocation from gdb. 275 // Outside the WebCore namespace for ease of invocation from gdb.
274 void showTree(const blink::VisibleSelection&); 276 void showTree(const blink::VisibleSelection&);
275 void showTree(const blink::VisibleSelection*); 277 void showTree(const blink::VisibleSelection*);
276 void showTree(const blink::VisibleSelectionInFlatTree&); 278 void showTree(const blink::VisibleSelectionInFlatTree&);
277 void showTree(const blink::VisibleSelectionInFlatTree*); 279 void showTree(const blink::VisibleSelectionInFlatTree*);
278 #endif 280 #endif
279 281
280 #endif // VisibleSelection_h 282 #endif // VisibleSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | third_party/WebKit/Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698