mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision cb947c01 (#352221)
- Implement CefRequestHandler::OnBeforeBrowse using NavigationThrottle instead of ResourceThrottle (see http://crbug.com/537634). The CefRequest object passed to OnBeforeBrowse will no longer have an associated request identifier. - Mac: Remove additional helper apps which are no longer required (see http://crbug.com/520680) - Remove the UR_FLAG_REPORT_RAW_HEADERS flag which is no longer supported (see http://crbug.com/517114) - Remove the CefBrowserSettings.java parameter. Java is an NPAPI plugin and NPAPI plugins are no longer supported (see http://crbug.com/470301#c11) - Add CefFormatUrlForSecurityDisplay function in cef_parser.h - Fix crash when passing `--disable-extensions` command-line flag (issue #1721) - Linux: Fix NSS handler loading (issue #1727)
This commit is contained in:
@ -27,6 +27,7 @@ MSVC_PUSH_WARNING_LEVEL(0);
|
||||
|
||||
#include "third_party/WebKit/Source/core/css/parser/CSSParser.h"
|
||||
#include "third_party/WebKit/Source/core/dom/Node.h"
|
||||
#include "third_party/WebKit/Source/core/editing/serializers/Serialization.h"
|
||||
#include "third_party/WebKit/Source/web/WebLocalFrameImpl.h"
|
||||
#include "third_party/WebKit/Source/web/WebViewImpl.h"
|
||||
MSVC_POP_WARNING();
|
||||
@ -79,6 +80,41 @@ std::string DumpDocumentText(blink::WebFrame* frame) {
|
||||
return document_element.textContent().utf8();
|
||||
}
|
||||
|
||||
cef_dom_node_type_t GetNodeType(const blink::WebNode& node) {
|
||||
const blink::Node* web_node = node.constUnwrap<blink::Node>();
|
||||
switch (web_node->nodeType()) {
|
||||
case blink::Node::ELEMENT_NODE:
|
||||
return DOM_NODE_TYPE_ELEMENT;
|
||||
case blink::Node::ATTRIBUTE_NODE:
|
||||
return DOM_NODE_TYPE_ATTRIBUTE;
|
||||
case blink::Node::TEXT_NODE:
|
||||
return DOM_NODE_TYPE_TEXT;
|
||||
case blink::Node::CDATA_SECTION_NODE:
|
||||
return DOM_NODE_TYPE_CDATA_SECTION;
|
||||
case blink::Node::PROCESSING_INSTRUCTION_NODE:
|
||||
return DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS;
|
||||
case blink::Node::COMMENT_NODE:
|
||||
return DOM_NODE_TYPE_COMMENT;
|
||||
case blink::Node::DOCUMENT_NODE:
|
||||
return DOM_NODE_TYPE_DOCUMENT;
|
||||
case blink::Node::DOCUMENT_TYPE_NODE:
|
||||
return DOM_NODE_TYPE_DOCUMENT_TYPE;
|
||||
case blink::Node::DOCUMENT_FRAGMENT_NODE:
|
||||
return DOM_NODE_TYPE_DOCUMENT_FRAGMENT;
|
||||
}
|
||||
return DOM_NODE_TYPE_UNSUPPORTED;
|
||||
}
|
||||
|
||||
blink::WebString GetNodeName(const blink::WebNode& node) {
|
||||
const blink::Node* web_node = node.constUnwrap<blink::Node>();
|
||||
return web_node->nodeName();
|
||||
}
|
||||
|
||||
blink::WebString CreateNodeMarkup(const blink::WebNode& node) {
|
||||
const blink::Node* web_node = node.constUnwrap<blink::Node>();
|
||||
return blink::createMarkup(web_node);
|
||||
}
|
||||
|
||||
bool SetNodeValue(blink::WebNode& node, const blink::WebString& value) {
|
||||
blink::Node* web_node = node.unwrap<blink::Node>();
|
||||
web_node->setNodeValue(value);
|
||||
|
Reference in New Issue
Block a user