summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/chromium
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-06-15 19:36:43 +0100
committerBen Murdoch <benm@google.com>2010-06-16 14:52:28 +0100
commit545e470e52f0ac6a3a072bf559c796b42c6066b6 (patch)
treec0c14763654d84d37577dde512c3d3b4699a9e86 /WebCore/platform/chromium
parent719298a66237d38ea5c05f1547123ad8aacbc237 (diff)
downloadexternal_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.zip
external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.gz
external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.bz2
Merge webkit.org at r61121: Initial merge by git.
Change-Id: Icd6db395c62285be384d137164d95d7466c98760
Diffstat (limited to 'WebCore/platform/chromium')
-rw-r--r--WebCore/platform/chromium/DragDataChromium.cpp8
-rw-r--r--WebCore/platform/chromium/KeyCodeConversionGtk.cpp2
-rw-r--r--WebCore/platform/chromium/PasteboardChromium.cpp5
-rw-r--r--WebCore/platform/chromium/PopupMenuChromium.cpp2
4 files changed, 12 insertions, 5 deletions
diff --git a/WebCore/platform/chromium/DragDataChromium.cpp b/WebCore/platform/chromium/DragDataChromium.cpp
index 1ce20dc..2c2151a 100644
--- a/WebCore/platform/chromium/DragDataChromium.cpp
+++ b/WebCore/platform/chromium/DragDataChromium.cpp
@@ -56,17 +56,17 @@ PassRefPtr<Clipboard> DragData::createClipboard(ClipboardAccessPolicy policy) co
return clipboard.release();
}
-bool DragData::containsURL() const
+bool DragData::containsURL(FilenameConversionPolicy filenamePolicy) const
{
- return !asURL().isEmpty();
+ return !asURL(filenamePolicy).isEmpty();
}
-String DragData::asURL(String* title) const
+String DragData::asURL(FilenameConversionPolicy filenamePolicy, String* title) const
{
String url;
if (m_platformDragData->hasValidURL())
url = m_platformDragData->getURL().string();
- else if (!m_platformDragData->filenames.isEmpty()) {
+ else if (filenamePolicy == ConvertFilenames && !m_platformDragData->filenames.isEmpty()) {
String fileName = m_platformDragData->filenames[0];
fileName = ChromiumBridge::getAbsolutePath(fileName);
url = ChromiumBridge::filePathToURL(fileName).string();
diff --git a/WebCore/platform/chromium/KeyCodeConversionGtk.cpp b/WebCore/platform/chromium/KeyCodeConversionGtk.cpp
index a709f3e..a7f4245 100644
--- a/WebCore/platform/chromium/KeyCodeConversionGtk.cpp
+++ b/WebCore/platform/chromium/KeyCodeConversionGtk.cpp
@@ -276,8 +276,10 @@ int windowsKeyCodeForKeyEvent(unsigned keycode)
case GDK_Z:
return VKEY_Z; // (5A) Z key case 'z': case 'Z': return 0x5A;
case GDK_Meta_L:
+ case GDK_Super_L:
return VKEY_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard)
case GDK_Meta_R:
+ case GDK_Super_R:
return VKEY_RWIN; // (5C) Right Windows key (Natural keyboard)
// VKEY_SLEEP (5F) Computer Sleep key
// VKEY_SEPARATOR (6C) Separator key
diff --git a/WebCore/platform/chromium/PasteboardChromium.cpp b/WebCore/platform/chromium/PasteboardChromium.cpp
index 6904050..0455482 100644
--- a/WebCore/platform/chromium/PasteboardChromium.cpp
+++ b/WebCore/platform/chromium/PasteboardChromium.cpp
@@ -129,6 +129,10 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String& title)
return;
Image* image = cachedImage->image();
ASSERT(image);
+
+ NativeImagePtr bitmap = image->nativeImageForCurrentFrame();
+ if (!bitmap)
+ return;
// If the image is wrapped in a link, |url| points to the target of the
// link. This isn't useful to us, so get the actual image URL.
@@ -145,7 +149,6 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String& title)
}
KURL url = urlString.isEmpty() ? KURL() : node->document()->completeURL(deprecatedParseURL(urlString));
- NativeImagePtr bitmap = image->nativeImageForCurrentFrame();
ChromiumBridge::clipboardWriteImage(bitmap, url, title);
}
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp
index c612bb0..e8ab333 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -1018,6 +1018,7 @@ void PopupListBox::selectIndex(int index)
invalidateRow(m_selectedIndex);
scrollToRevealSelection();
+ m_popupClient->selectionChanged(m_selectedIndex);
}
}
@@ -1079,6 +1080,7 @@ void PopupListBox::clearSelection()
if (m_selectedIndex != -1) {
invalidateRow(m_selectedIndex);
m_selectedIndex = -1;
+ m_popupClient->selectionCleared();
}
}