Update to Chromium revision 203701.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1269 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-06-04 17:41:37 +00:00
parent 300847a38a
commit 7a71dc06de
38 changed files with 348 additions and 182 deletions

View File

@@ -6,10 +6,13 @@
#include "libcef/renderer/webkit_glue.h"
#include "base/compiler_specific.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
#include "config.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "bindings/v8/ScriptController.h"
#include "core/history/BackForwardController.h"
#include "core/page/Page.h"
#include "third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.h"
#include "third_party/WebKit/Source/WebKit/chromium/src/WebViewImpl.h"
@@ -22,7 +25,13 @@ bool CanGoBackOrForward(WebKit::WebView* view, int distance) {
if (!view)
return false;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
return impl->page()->canGoBackOrForward(distance);
if (distance == 0)
return true;
if (distance > 0 && distance <= impl->page()->backForward()->forwardCount())
return true;
if (distance < 0 && -distance <= impl->page()->backForward()->backCount())
return true;
return false;
}
void GoBackOrForward(WebKit::WebView* view, int distance) {
@@ -37,4 +46,14 @@ v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame) {
return WebCore::ScriptController::mainWorldContext(impl->frame());
}
base::string16 DumpDocumentText(WebKit::WebFrame* frame) {
// We use the document element's text instead of the body text here because
// not all documents have a body, such as XML documents.
WebKit::WebElement document_element = frame->document().documentElement();
if (document_element.isNull())
return base::string16();
return document_element.innerText();
}
} // webkit_glue