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

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

Issue 2708213006: Expand FrameSeleciton::hasEditableStyle() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-23T18:38:07 Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.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) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return static_cast<EUserTriggered>(options & UserTriggered); 96 return static_cast<EUserTriggered>(options & UserTriggered);
97 } 97 }
98 98
99 bool isAvailable() const { return lifecycleContext(); } 99 bool isAvailable() const { return lifecycleContext(); }
100 // You should not call |document()| when |!isAvailable()|. 100 // You should not call |document()| when |!isAvailable()|.
101 Document& document() const; 101 Document& document() const;
102 LocalFrame* frame() const { return m_frame; } 102 LocalFrame* frame() const { return m_frame; }
103 Element* rootEditableElementOrDocumentElement() const; 103 Element* rootEditableElementOrDocumentElement() const;
104 ContainerNode* rootEditableElementOrTreeScopeRootNode() const; 104 ContainerNode* rootEditableElementOrTreeScopeRootNode() const;
105 105
106 bool hasEditableStyle() const {
107 return computeVisibleSelectionInDOMTreeDeprecated().hasEditableStyle();
108 }
109
110 // An implementation of |WebFrame::moveCaretSelection()| 106 // An implementation of |WebFrame::moveCaretSelection()|
111 void moveCaretSelection(const IntPoint&); 107 void moveCaretSelection(const IntPoint&);
112 108
113 const VisibleSelection& computeVisibleSelectionInDOMTree() const; 109 const VisibleSelection& computeVisibleSelectionInDOMTree() const;
114 const VisibleSelectionInFlatTree& computeVisibleSelectionInFlatTree() const; 110 const VisibleSelectionInFlatTree& computeVisibleSelectionInFlatTree() const;
115 111
116 // TODO(editing-dev): We should replace 112 // TODO(editing-dev): We should replace
117 // |computeVisibleSelectionInDOMTreeDeprecated()| with update layout and 113 // |computeVisibleSelectionInDOMTreeDeprecated()| with update layout and
118 // |computeVisibleSelectionInDOMTree()| to increase places hoisting update 114 // |computeVisibleSelectionInDOMTree()| to increase places hoisting update
119 // layout. 115 // layout.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 328
333 } // namespace blink 329 } // namespace blink
334 330
335 #ifndef NDEBUG 331 #ifndef NDEBUG
336 // Outside the WebCore namespace for ease of invocation from gdb. 332 // Outside the WebCore namespace for ease of invocation from gdb.
337 void showTree(const blink::FrameSelection&); 333 void showTree(const blink::FrameSelection&);
338 void showTree(const blink::FrameSelection*); 334 void showTree(const blink::FrameSelection*);
339 #endif 335 #endif
340 336
341 #endif // FrameSelection_h 337 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698