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

Side by Side Diff: third_party/WebKit/Source/web/WebNode.cpp

Issue 2121313003: [Editing][DOM][CodeHealth] Make Node::isContentEditable and Node::isRichEditable global functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bool WebNode::isFocusable() const 164 bool WebNode::isFocusable() const
165 { 165 {
166 if (!m_private->isElementNode()) 166 if (!m_private->isElementNode())
167 return false; 167 return false;
168 m_private->document().updateStyleAndLayoutIgnorePendingStylesheets(); 168 m_private->document().updateStyleAndLayoutIgnorePendingStylesheets();
169 return toElement(m_private.get())->isFocusable(); 169 return toElement(m_private.get())->isFocusable();
170 } 170 }
171 171
172 bool WebNode::isContentEditable() const 172 bool WebNode::isContentEditable() const
173 { 173 {
174 return m_private->isContentEditable(); 174 return blink::isContentEditable(*m_private);
175 } 175 }
176 176
177 bool WebNode::isInsideFocusableElementOrARIAWidget() const 177 bool WebNode::isInsideFocusableElementOrARIAWidget() const
178 { 178 {
179 return AXObject::isInsideFocusableElementOrARIAWidget(*this->constUnwrap<Nod e>()); 179 return AXObject::isInsideFocusableElementOrARIAWidget(*this->constUnwrap<Nod e>());
180 } 180 }
181 181
182 bool WebNode::isElementNode() const 182 bool WebNode::isElementNode() const
183 { 183 {
184 return m_private->isElementNode(); 184 return m_private->isElementNode();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 m_private = node; 260 m_private = node;
261 return *this; 261 return *this;
262 } 262 }
263 263
264 WebNode::operator Node*() const 264 WebNode::operator Node*() const
265 { 265 {
266 return m_private.get(); 266 return m_private.get();
267 } 267 }
268 268
269 } // namespace blink 269 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698