mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add CefFocusHandler::OnFocusedNodeChanged() notification (issue #379).
- Add CefDOMNode::IsFormControlElement() and CefDOMNode::GetFormControlElementType() methods (issue #379). - Add space bar handling example to cefclient. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@318 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -159,6 +159,40 @@ bool CefDOMNodeImpl::IsElement()
|
||||
return node_.isElementNode();
|
||||
}
|
||||
|
||||
bool CefDOMNodeImpl::IsFormControlElement()
|
||||
{
|
||||
if (!VerifyContext())
|
||||
return false;
|
||||
|
||||
if (node_.isElementNode()) {
|
||||
const WebElement& element = node_.toConst<WebElement>();
|
||||
return element.isFormControlElement();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
CefString CefDOMNodeImpl::GetFormControlElementType()
|
||||
{
|
||||
CefString str;
|
||||
if (!VerifyContext())
|
||||
return str;
|
||||
|
||||
if (node_.isElementNode()) {
|
||||
const WebElement& element = node_.toConst<WebElement>();
|
||||
if (element.isFormControlElement()) {
|
||||
// Retrieve the type from the form control element.
|
||||
const WebFormControlElement& formElement =
|
||||
node_.toConst<WebFormControlElement>();
|
||||
|
||||
const string16& form_control_type = formElement.formControlType();
|
||||
str = form_control_type;
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
bool CefDOMNodeImpl::IsSame(CefRefPtr<CefDOMNode> that)
|
||||
{
|
||||
if (!VerifyContext())
|
||||
|
Reference in New Issue
Block a user