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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2171493003: [Editing][DOM][CodeHealth] Make Node::hasEditableStyle global functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 1779eaab7a9968c5e03b1bcf34e2c9d6a65c1db6..cc8f300d2dbbb26735e8ffbda564a3afbac36aa1 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -3262,14 +3262,14 @@ PositionWithAffinity LayoutObject::createPositionWithAffinity(int offset, TextAf
{
// If this is a non-anonymous layoutObject in an editable area, then it's simple.
if (Node* node = nonPseudoNode()) {
- if (!node->hasEditableStyle()) {
+ if (!hasEditableStyle(*node)) {
// If it can be found, we prefer a visually equivalent position that is editable.
const Position position = Position(node, offset);
Position candidate = mostForwardCaretPosition(position, CanCrossEditingBoundary);
- if (candidate.anchorNode()->hasEditableStyle())
+ if (hasEditableStyle(*candidate.anchorNode()))
return PositionWithAffinity(candidate, affinity);
candidate = mostBackwardCaretPosition(position, CanCrossEditingBoundary);
- if (candidate.anchorNode()->hasEditableStyle())
+ if (hasEditableStyle(*candidate.anchorNode()))
return PositionWithAffinity(candidate, affinity);
}
// FIXME: Eliminate legacy editing positions

Powered by Google App Engine
This is Rietveld 408576698