mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add keyboard and focus notifications (issue #508).
- Add CefDOMNode::IsEditable method. - List interfaces alphabetically in CefClient. - Correct error checking for code and command input. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@680 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -148,6 +148,32 @@ bool CefDOMNodeImpl::IsElement() {
|
||||
return node_.isElementNode();
|
||||
}
|
||||
|
||||
// Logic copied from RenderViewImpl::IsEditableNode.
|
||||
bool CefDOMNodeImpl::IsEditable() {
|
||||
if (!VerifyContext())
|
||||
return false;
|
||||
|
||||
if (node_.isContentEditable())
|
||||
return true;
|
||||
|
||||
if (node_.isElementNode()) {
|
||||
const WebElement& element = node_.toConst<WebElement>();
|
||||
if (element.isTextFormControlElement())
|
||||
return true;
|
||||
|
||||
// Also return true if it has an ARIA role of 'textbox'.
|
||||
for (unsigned i = 0; i < element.attributeCount(); ++i) {
|
||||
if (LowerCaseEqualsASCII(element.attributeLocalName(i), "role")) {
|
||||
if (LowerCaseEqualsASCII(element.attributeValue(i), "textbox"))
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CefDOMNodeImpl::IsFormControlElement() {
|
||||
if (!VerifyContext())
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user