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

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

Issue 2900553005: Treat selection as focused if it contains focused element (Closed)
Patch Set: Mon May 22 18:52:27 PDT 2017 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/FrameSelectionTest.cpp ('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) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 enum class PositionAnchorType : unsigned { 45 enum class PositionAnchorType : unsigned {
46 kOffsetInAnchor, 46 kOffsetInAnchor,
47 kBeforeAnchor, 47 kBeforeAnchor,
48 kAfterAnchor, 48 kAfterAnchor,
49 kBeforeChildren, 49 kBeforeChildren,
50 kAfterChildren, 50 kAfterChildren,
51 }; 51 };
52 52
53 // Instances of |PositionTemplate<Strategy>| are immutable. 53 // Instances of |PositionTemplate<Strategy>| are immutable.
54 // TODO(editing-dev): Make constructor of |PositionTemplate| take |const Node*|.
54 template <typename Strategy> 55 template <typename Strategy>
55 class CORE_TEMPLATE_CLASS_EXPORT PositionTemplate { 56 class CORE_TEMPLATE_CLASS_EXPORT PositionTemplate {
56 DISALLOW_NEW(); 57 DISALLOW_NEW();
57 58
58 public: 59 public:
59 PositionTemplate() 60 PositionTemplate()
60 : offset_(0), anchor_type_(PositionAnchorType::kOffsetInAnchor) {} 61 : offset_(0), anchor_type_(PositionAnchorType::kOffsetInAnchor) {}
61 62
62 static const TreeScope* CommonAncestorTreeScope( 63 static const TreeScope* CommonAncestorTreeScope(
63 const PositionTemplate<Strategy>&, 64 const PositionTemplate<Strategy>&,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 278
278 } // namespace blink 279 } // namespace blink
279 280
280 #ifndef NDEBUG 281 #ifndef NDEBUG
281 // Outside the WebCore namespace for ease of invocation from gdb. 282 // Outside the WebCore namespace for ease of invocation from gdb.
282 void showTree(const blink::Position&); 283 void showTree(const blink::Position&);
283 void showTree(const blink::Position*); 284 void showTree(const blink::Position*);
284 #endif 285 #endif
285 286
286 #endif // Position_h 287 #endif // Position_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698