- 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:
Marshall Greenblatt
2011-10-14 12:40:40 +00:00
parent 06b7e9ab53
commit 9c6dcab73a
16 changed files with 267 additions and 12 deletions

View File

@@ -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())