Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1049)

Unified Diff: webkit/glue/webview_impl.cc

Issue 113591: Fix Acid3 Test 48: LINKTEST, Chromium side.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Made waiting more bearable. Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webview.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webview_impl.cc
===================================================================
--- webkit/glue/webview_impl.cc (revision 19822)
+++ webkit/glue/webview_impl.cc (working copy)
@@ -61,6 +61,7 @@
#include "MIMETypeRegistry.h"
#include "NodeRenderStyle.h"
#include "Page.h"
+#include "PageGroup.h"
#include "PlatformContextSkia.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
@@ -134,6 +135,12 @@
static const double kMinTextSizeMultiplier = 0.5;
static const double kMaxTextSizeMultiplier = 3.0;
+// The group name identifies a namespace of pages. Page group is used on OSX
+// for some programs that use HTML views to display things that don't seem like
+// web pages to the user (so shouldn't have visited link coloring). We only use
+// one page group.
+static const char* kPageGroupName = "default";
+
// The webcore drag operation type when something is trying to be dropped on
// the webview. These values are taken from Apple's windows port.
static const WebCore::DragOperation kDropTargetOperation =
@@ -336,6 +343,19 @@
return instance;
}
+// static
+void WebView::UpdateVisitedLinkState(uint64 link_hash) {
+ WebCore::Page::visitedStateChanged(
+ WebCore::PageGroup::pageGroup(kPageGroupName), link_hash);
+}
+
+// static
+void WebView::ResetVisitedLinkState() {
+ WebCore::Page::allVisitedStateChanged(
+ WebCore::PageGroup::pageGroup(kPageGroupName));
+}
+
+
WebViewImpl::WebViewImpl()
: ALLOW_THIS_IN_INITIALIZER_LIST(back_forward_list_client_impl_(this)),
observed_new_navigation_(false),
@@ -371,10 +391,7 @@
new WebInspectorClient(this)));
page_->backForwardList()->setClient(&back_forward_list_client_impl_);
-
- // The group name identifies a namespace of pages. I'm not sure how it's
- // intended to be used, but keeping all pages in the same group works for us.
- page_->setGroupName("default");
+ page_->setGroupName(kPageGroupName);
}
WebViewImpl::~WebViewImpl() {
« no previous file with comments | « webkit/glue/webview.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698