diff options
author | Ben Murdoch <benm@google.com> | 2010-10-22 13:02:20 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-26 15:21:41 +0100 |
commit | a94275402997c11dd2e778633dacf4b7e630a35d (patch) | |
tree | e66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebKit/win/WebCoreSupport | |
parent | 09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff) | |
download | external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2 |
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebKit/win/WebCoreSupport')
-rw-r--r-- | WebKit/win/WebCoreSupport/WebContextMenuClient.cpp | 7 | ||||
-rw-r--r-- | WebKit/win/WebCoreSupport/WebDragClient.cpp | 2 | ||||
-rw-r--r-- | WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp | 4 | ||||
-rw-r--r-- | WebKit/win/WebCoreSupport/WebInspectorClient.cpp | 21 |
4 files changed, 16 insertions, 18 deletions
diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp index ca0374a..ab1f79e 100644 --- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp +++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "WebContextMenuClient.h" +#include "UserGestureIndicator.h" #include "WebElementPropertyBag.h" #include "WebLocalizableStrings.h" #include "WebView.h" @@ -140,8 +141,10 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame) url.append(encoded); url.append("&ie=UTF-8&oe=UTF-8"); - if (Page* page = frame->page()) - page->mainFrame()->loader()->urlSelected(KURL(ParsedURLString, url), String(), 0, false, false, true, SendReferrer); + if (Page* page = frame->page()) { + UserGestureIndicator indicator(DefinitelyProcessingUserGesture); + page->mainFrame()->loader()->urlSelected(KURL(ParsedURLString, url), String(), 0, false, false, SendReferrer); + } } void WebContextMenuClient::lookUpInDictionary(Frame*) diff --git a/WebKit/win/WebCoreSupport/WebDragClient.cpp b/WebKit/win/WebCoreSupport/WebDragClient.cpp index 773e392..f4d9842 100644 --- a/WebKit/win/WebCoreSupport/WebDragClient.cpp +++ b/WebKit/win/WebCoreSupport/WebDragClient.cpp @@ -295,7 +295,7 @@ DragImageRef WebDragClient::createDragImageForLink(KURL& url, const String& inLa static const Color backgroundColor(140, 140, 140); static const IntSize radii(DRAG_LABEL_RADIUS, DRAG_LABEL_RADIUS); IntRect rect(0, 0, imageSize.width(), imageSize.height()); - context.fillRoundedRect(rect, radii, radii, radii, radii, backgroundColor, DeviceColorSpace); + context.fillRoundedRect(rect, radii, radii, radii, radii, backgroundColor, ColorSpaceDeviceRGB); // Draw the text static const Color topColor(0, 0, 0, 255); //original alpha = 0.75 diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp index 4b05338..ffc41b2 100644 --- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp @@ -59,6 +59,7 @@ #include <WebCore/HTMLFrameElement.h> #include <WebCore/HTMLFrameOwnerElement.h> #include <WebCore/HTMLNames.h> +#include <WebCore/HTMLParserIdioms.h> #include <WebCore/HTMLPlugInElement.h> #include <WebCore/HistoryItem.h> #include <WebCore/Page.h> @@ -66,7 +67,6 @@ #include <WebCore/PluginView.h> #include <WebCore/RenderPart.h> #include <WebCore/ResourceHandle.h> -#include <WebCore/ScriptString.h> #pragma warning(pop) using namespace WebCore; @@ -768,7 +768,7 @@ void WebFrameLoaderClient::dispatchDidFailToStartPlugin(const PluginView* plugin ASSERT(frame == pluginView->parentFrame()); if (!pluginView->pluginsPage().isNull()) { - KURL pluginPageURL = frame->document()->completeURL(deprecatedParseURL(pluginView->pluginsPage())); + KURL pluginPageURL = frame->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(pluginView->pluginsPage())); if (pluginPageURL.protocolInHTTPFamily()) { static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInPageURLStringKey); RetainPtr<CFStringRef> str(AdoptCF, pluginPageURL.string().createCFString()); diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp index 1b79dde..76ebc8f 100644 --- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp +++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp @@ -49,6 +49,7 @@ #include <tchar.h> #include <wtf/RetainPtr.h> +#include <wtf/text/StringConcatenate.h> using namespace WebCore; @@ -111,7 +112,6 @@ void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorCon return; // Keep preferences separate from the rest of the client, making sure we are using expected preference values. - // One reason this is good is that it keeps the inspector out of history via "private browsing". // FIXME: It's crazy that we have to do this song and dance to end up with // a private WebPreferences object, even within WebKit. We should make this // process simpler, and consider whether we can make it simpler for WebKit @@ -125,8 +125,6 @@ void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorCon return; if (FAILED(preferences->setAutosaves(FALSE))) return; - if (FAILED(preferences->setPrivateBrowsingEnabled(TRUE))) - return; if (FAILED(preferences->setLoadsImagesAutomatically(TRUE))) return; if (FAILED(preferences->setAuthorAndUserStylesEnabled(TRUE))) @@ -273,7 +271,8 @@ void WebInspectorFrontendClient::attachWindow() if (m_attached) return; - m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "true"); + // FIXME: This flag can be saved to the flags storage directly. + m_inspectedWebView->page()->inspectorController()->setInspectorStartsAttached(true); closeWindowWithoutNotifications(); showWindowWithoutNotifications(); @@ -284,7 +283,8 @@ void WebInspectorFrontendClient::detachWindow() if (!m_attached) return; - m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "false"); + // FIXME: This flag can be saved to the flags storage directly. + m_inspectedWebView->page()->inspectorController()->setInspectorStartsAttached(false); closeWindowWithoutNotifications(); showWindowWithoutNotifications(); @@ -364,8 +364,8 @@ void WebInspectorFrontendClient::showWindowWithoutNotifications() shouldAttach = true; else { // If no preference is set - default to an attached window. This is important for inspector LayoutTests. - String shouldAttachPref = m_inspectedWebView->page()->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName()); - shouldAttach = shouldAttachPref != "false"; + // FIXME: This flag can be fetched directly from the flags storage. + shouldAttach = m_inspectedWebView->page()->inspectorController()->inspectorStartsAttached(); if (shouldAttach && !canAttachWindow()) shouldAttach = false; @@ -419,12 +419,7 @@ void WebInspectorFrontendClient::destroyInspectorView(bool notifyInspectorContro void WebInspectorFrontendClient::updateWindowTitle() { - // FIXME: The series of appends should be replaced with a call to String::format() - // when it can be figured out how to get the unicode em-dash to show up. - String title = "Web Inspector "; - title.append((UChar)0x2014); // em-dash - title.append(' '); - title.append(m_inspectedURL); + String title = makeString("Web Inspector ", static_cast<UChar>(0x2014), ' ', m_inspectedURL); ::SetWindowText(m_frontendHwnd, title.charactersWithNullTermination()); } |