summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
commitcfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch)
tree24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebKit/chromium/src
parent69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff)
downloadqtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/WebKit/chromium/src')
-rw-r--r--Source/WebKit/chromium/src/AssertMatchingEnums.cpp20
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.cpp57
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.h12
-rw-r--r--Source/WebKit/chromium/src/ColorChooserUIController.cpp6
-rw-r--r--Source/WebKit/chromium/src/ColorChooserUIController.h6
-rw-r--r--Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp3
-rw-r--r--Source/WebKit/chromium/src/DateTimeChooserImpl.cpp32
-rw-r--r--Source/WebKit/chromium/src/DateTimeChooserImpl.h12
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp13
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.h4
-rw-r--r--Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp17
-rw-r--r--Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h2
-rwxr-xr-xSource/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp41
-rw-r--r--Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h9
-rw-r--r--Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp8
-rw-r--r--Source/WebKit/chromium/src/IDBTransactionBackendProxy.h1
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.h1
-rw-r--r--Source/WebKit/chromium/src/LinkHighlight.cpp10
-rw-r--r--Source/WebKit/chromium/src/LinkHighlight.h3
-rw-r--r--Source/WebKit/chromium/src/LocalizedStrings.cpp54
-rw-r--r--Source/WebKit/chromium/src/NonCompositedContentHost.cpp19
-rw-r--r--Source/WebKit/chromium/src/NonCompositedContentHost.h4
-rw-r--r--Source/WebKit/chromium/src/PageOverlay.cpp10
-rw-r--r--Source/WebKit/chromium/src/PageOverlay.h2
-rw-r--r--Source/WebKit/chromium/src/PlatformSupport.cpp80
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp35
-rw-r--r--Source/WebKit/chromium/src/WebFormElement.cpp7
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp24
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebHitTestResult.cpp22
-rw-r--r--Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp16
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebIDBMetadata.cpp6
-rwxr-xr-xSource/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp54
-rw-r--r--Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h5
-rw-r--r--Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp8
-rw-r--r--Source/WebKit/chromium/src/WebIDBTransactionImpl.h3
-rw-r--r--Source/WebKit/chromium/src/WebInputEventConversion.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.cpp14
-rw-r--r--Source/WebKit/chromium/src/WebRuntimeFeatures.cpp18
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp147
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h10
-rw-r--r--Source/WebKit/chromium/src/js/devTools.css16
-rw-r--r--Source/WebKit/chromium/src/mac/WebInputEventFactory.mm2
48 files changed, 556 insertions, 279 deletions
diff --git a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
index 95e8b607d..f3e7859ee 100644
--- a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -48,6 +48,9 @@
#include "FontSmoothingMode.h"
#include "GeolocationError.h"
#include "GeolocationPosition.h"
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+#include "HTMLFormElement.h"
+#endif
#include "HTMLInputElement.h"
#include "IDBCursor.h"
#include "IDBDatabaseException.h"
@@ -86,6 +89,9 @@
#include "WebFileError.h"
#include "WebFileInfo.h"
#include "WebFontDescription.h"
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+#include "WebFormElement.h"
+#endif
#include "WebGeolocationError.h"
#include "WebGeolocationPosition.h"
#include "WebIDBCursor.h"
@@ -153,6 +159,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationRowCountChanged, AXObje
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationRowCollapsed, AXObjectCache::AXRowCollapsed);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationRowExpanded, AXObjectCache::AXRowExpanded);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationInvalidStatusChanged, AXObjectCache::AXInvalidStatusChanged);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationTextChanged, AXObjectCache::AXTextChanged);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationAriaAttributeChanged, AXObjectCache::AXAriaAttributeChanged);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleUnknown, UnknownRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleButton, ButtonRole);
@@ -260,6 +268,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleUserInterfaceTooltip, UserInter
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleToggleButton, ToggleButtonRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleCanvas, CanvasRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLegend, LegendRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleSVGRoot, SVGRootRole);
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Uncached, ApplicationCacheHost::UNCACHED);
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Idle, ApplicationCacheHost::IDLE);
@@ -617,8 +626,10 @@ COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyDefault, ReferrerPolicyDefault);
COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyNever, ReferrerPolicyNever);
COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyOrigin, ReferrerPolicyOrigin);
-COMPILE_ASSERT_MATCHING_ENUM(WebContentSecurityPolicyTypeReportOnly, ContentSecurityPolicy::ReportOnly);
-COMPILE_ASSERT_MATCHING_ENUM(WebContentSecurityPolicyTypeEnforcePolicy, ContentSecurityPolicy::EnforcePolicy);
+COMPILE_ASSERT_MATCHING_ENUM(WebContentSecurityPolicyTypeReportStableDirectives, ContentSecurityPolicy::ReportStableDirectives);
+COMPILE_ASSERT_MATCHING_ENUM(WebContentSecurityPolicyTypeEnforceStableDirectives, ContentSecurityPolicy::EnforceStableDirectives);
+COMPILE_ASSERT_MATCHING_ENUM(WebContentSecurityPolicyTypeReportAllDirectives, ContentSecurityPolicy::ReportAllDirectives);
+COMPILE_ASSERT_MATCHING_ENUM(WebContentSecurityPolicyTypeEnforceAllDirectives, ContentSecurityPolicy::EnforceAllDirectives);
COMPILE_ASSERT_MATCHING_ENUM(WebURLResponse::Unknown, ResourceResponse::Unknown);
COMPILE_ASSERT_MATCHING_ENUM(WebURLResponse::HTTP_0_9, ResourceResponse::HTTP_0_9);
@@ -628,3 +639,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebURLResponse::HTTP_1_1, ResourceResponse::HTTP_1_
COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::CORSModeUnspecified, MediaPlayerClient::Unspecified);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::CORSModeAnonymous, MediaPlayerClient::Anonymous);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::CORSModeUseCredentials, MediaPlayerClient::UseCredentials);
+
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+COMPILE_ASSERT_MATCHING_ENUM(WebFormElement::AutocompleteResultSuccess, HTMLFormElement::AutocompleteResultSuccess);
+COMPILE_ASSERT_MATCHING_ENUM(WebFormElement::AutocompleteResultError, HTMLFormElement::AutocompleteResultError);
+#endif
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
index 9d8a656bd..94959380a 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -42,6 +42,7 @@
#include "Console.h"
#include "Cursor.h"
#include "DatabaseTracker.h"
+#include "DateTimeChooser.h"
#include "DateTimeChooserImpl.h"
#include "Document.h"
#include "DocumentLoader.h"
@@ -265,17 +266,13 @@ Page* ChromeClientImpl::createWindow(
return newView->page();
}
-static inline bool currentEventShouldCauseBackgroundTab(const WebInputEvent* inputEvent)
+static inline void updatePolicyForEvent(const WebInputEvent* inputEvent, WebNavigationPolicy* policy)
{
- if (!inputEvent)
- return false;
-
- if (inputEvent->type != WebInputEvent::MouseUp)
- return false;
+ if (!inputEvent || inputEvent->type != WebInputEvent::MouseUp)
+ return;
const WebMouseEvent* mouseEvent = static_cast<const WebMouseEvent*>(inputEvent);
- WebNavigationPolicy policy;
unsigned short buttonNumber;
switch (mouseEvent->button) {
case WebMouseEvent::ButtonLeft:
@@ -288,17 +285,14 @@ static inline bool currentEventShouldCauseBackgroundTab(const WebInputEvent* inp
buttonNumber = 2;
break;
default:
- return false;
+ return;
}
bool ctrl = mouseEvent->modifiers & WebMouseEvent::ControlKey;
bool shift = mouseEvent->modifiers & WebMouseEvent::ShiftKey;
bool alt = mouseEvent->modifiers & WebMouseEvent::AltKey;
bool meta = mouseEvent->modifiers & WebMouseEvent::MetaKey;
- if (!WebViewImpl::navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta, &policy))
- return false;
-
- return policy == WebNavigationPolicyNewBackgroundTab;
+ WebViewImpl::navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta, policy);
}
WebNavigationPolicy ChromeClientImpl::getNavigationPolicy()
@@ -315,8 +309,8 @@ WebNavigationPolicy ChromeClientImpl::getNavigationPolicy()
WebNavigationPolicy policy = WebNavigationPolicyNewForegroundTab;
if (asPopup)
policy = WebNavigationPolicyNewPopup;
- if (currentEventShouldCauseBackgroundTab(WebViewImpl::currentInputEvent()))
- policy = WebNavigationPolicyNewBackgroundTab;
+ updatePolicyForEvent(WebViewImpl::currentInputEvent(), &policy);
+
return policy;
}
@@ -502,15 +496,7 @@ void ChromeClientImpl::invalidateContentsAndRootView(const IntRect& updateRect,
{
if (updateRect.isEmpty())
return;
-#if USE(ACCELERATED_COMPOSITING)
- if (!m_webView->isAcceleratedCompositingActive()) {
-#endif
- if (m_webView->client())
- m_webView->client()->didInvalidateRect(updateRect);
-#if USE(ACCELERATED_COMPOSITING)
- } else
- m_webView->invalidateRootLayerRect(updateRect);
-#endif
+ m_webView->invalidateRect(updateRect);
}
void ChromeClientImpl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
@@ -629,13 +615,6 @@ void ChromeClientImpl::dispatchViewportPropertiesDidChange(const ViewportArgumen
if (!m_webView->settings()->viewportEnabled() || !m_webView->isFixedLayoutModeEnabled() || !m_webView->client() || !m_webView->page())
return;
- ViewportArguments args;
- if (arguments == args) {
- // Default viewport arguments passed in. This is a signal to reset the viewport.
- args.width = ViewportArguments::ValueDesktopWidth;
- } else
- args = arguments;
-
FrameView* frameView = m_webView->mainFrameImpl()->frameView();
int dpi = screenHorizontalDPI(frameView);
ASSERT(dpi > 0);
@@ -650,7 +629,7 @@ void ChromeClientImpl::dispatchViewportPropertiesDidChange(const ViewportArgumen
float devicePixelRatio = dpi / ViewportArguments::deprecatedTargetDPI;
// Call the common viewport computing logic in ViewportArguments.cpp.
ViewportAttributes computed = computeViewportAttributes(
- args, settings->layoutFallbackWidth(), deviceRect.width, deviceRect.height,
+ arguments, settings->layoutFallbackWidth(), deviceRect.width, deviceRect.height,
devicePixelRatio, IntSize(deviceRect.width, deviceRect.height));
restrictScaleFactorToInitialScaleIfNotUserScalable(computed);
@@ -707,10 +686,15 @@ PassOwnPtr<WebColorChooser> ChromeClientImpl::createWebColorChooser(WebColorChoo
}
#endif
-#if ENABLE(CALENDAR_PICKER)
-PassOwnPtr<WebCore::DateTimeChooser> ChromeClientImpl::openDateTimeChooser(WebCore::DateTimeChooserClient* pickerClient, const WebCore::DateTimeChooserParameters& parameters)
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
+PassRefPtr<DateTimeChooser> ChromeClientImpl::openDateTimeChooser(DateTimeChooserClient* pickerClient, const DateTimeChooserParameters& parameters)
{
- return adoptPtr(new DateTimeChooserImpl(this, pickerClient, parameters));
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+ return DateTimeChooserImpl::create(this, pickerClient, parameters);
+#else
+ notImplemented();
+ return PassRefPtr<DateTimeChooser>();
+#endif
}
#endif
@@ -903,6 +887,11 @@ void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A
m_webView->client()->postAccessibilityNotification(WebAccessibilityObject(obj), toWebAccessibilityNotification(notification));
}
+WebKit::WebScreenInfo ChromeClientImpl::screenInfo()
+{
+ return m_webView->client()->screenInfo();
+}
+
bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
{
Frame* frame = m_webView->mainFrameImpl()->frame();
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.h b/Source/WebKit/chromium/src/ChromeClientImpl.h
index 4a609dadd..77084f801 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.h
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.h
@@ -60,10 +60,11 @@ class WebColorChooser;
class WebColorChooserClient;
class WebViewImpl;
struct WebCursorInfo;
+struct WebScreenInfo;
struct WebPopupMenuInfo;
// Handles window-level notifications from WebCore on behalf of a WebView.
-class ChromeClientImpl : public WebCore::ChromeClientChromium {
+class ChromeClientImpl : public WebCore::ChromeClientChromium, public WebCore::PageClientChromium {
public:
explicit ChromeClientImpl(WebViewImpl* webView);
virtual ~ChromeClientImpl();
@@ -123,7 +124,7 @@ public:
const WebCore::IntRect& clipRect);
virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) const;
virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) const;
- virtual PlatformPageClient platformPageClient() const { return 0; }
+ virtual PlatformPageClient platformPageClient() const { return PlatformPageClient(this); }
virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const;
virtual void layoutUpdated(WebCore::Frame*) const;
virtual void scrollRectIntoView(
@@ -146,8 +147,8 @@ public:
virtual PassOwnPtr<WebCore::ColorChooser> createColorChooser(WebCore::ColorChooserClient*, const WebCore::Color&) OVERRIDE;
PassOwnPtr<WebColorChooser> createWebColorChooser(WebColorChooserClient*, const WebColor&);
#endif
-#if ENABLE(CALENDAR_PICKER)
- virtual PassOwnPtr<WebCore::DateTimeChooser> openDateTimeChooser(WebCore::DateTimeChooserClient*, const WebCore::DateTimeChooserParameters&) OVERRIDE;
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
+ virtual PassRefPtr<WebCore::DateTimeChooser> openDateTimeChooser(WebCore::DateTimeChooserClient*, const WebCore::DateTimeChooserParameters&) OVERRIDE;
#endif
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
virtual void loadIconForFiles(const Vector<WTF::String>&, WebCore::FileIconLoader*);
@@ -194,6 +195,9 @@ public:
virtual void popupClosed(WebCore::PopupContainer* popupContainer);
virtual void postAccessibilityNotification(WebCore::AccessibilityObject*, WebCore::AXObjectCache::AXNotification);
+ // PageClientChromium methods:
+ virtual WebScreenInfo screenInfo();
+
// ChromeClientImpl:
void setCursorForPlugin(const WebCursorInfo&);
void setNewWindowNavigationPolicy(WebNavigationPolicy);
diff --git a/Source/WebKit/chromium/src/ColorChooserUIController.cpp b/Source/WebKit/chromium/src/ColorChooserUIController.cpp
index 330f59ce2..5789691e8 100644
--- a/Source/WebKit/chromium/src/ColorChooserUIController.cpp
+++ b/Source/WebKit/chromium/src/ColorChooserUIController.cpp
@@ -57,7 +57,7 @@ ColorChooserUIController::ColorChooserUIController(ChromeClientImpl* chromeClien
: m_chromeClient(chromeClient)
, m_client(client)
, m_popup(0)
- , m_localizer(Localizer::createDefault())
+ , m_locale(Locale::createDefault())
{
if (m_client->shouldShowSuggestions())
openPopup();
@@ -132,9 +132,9 @@ void ColorChooserUIController::writeDocument(DocumentWriter& writer)
PagePopupClient::addString("</script></body>\n", writer);
}
-Localizer& ColorChooserUIController::localizer()
+Locale& ColorChooserUIController::locale()
{
- return *m_localizer;
+ return *m_locale;
}
void ColorChooserUIController::setValueAndClosePopup(int numValue, const String& stringValue)
diff --git a/Source/WebKit/chromium/src/ColorChooserUIController.h b/Source/WebKit/chromium/src/ColorChooserUIController.h
index 40c878b8e..60cecfe18 100644
--- a/Source/WebKit/chromium/src/ColorChooserUIController.h
+++ b/Source/WebKit/chromium/src/ColorChooserUIController.h
@@ -29,8 +29,8 @@
#if ENABLE(INPUT_TYPE_COLOR)
#include "ColorChooser.h"
-#include "Localizer.h"
#include "PagePopupClient.h"
+#include "PlatformLocale.h"
#include "WebColorChooserClient.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -61,7 +61,7 @@ public:
// PagePopupClient functions:
virtual WebCore::IntSize contentSize() OVERRIDE;
virtual void writeDocument(WebCore::DocumentWriter&) OVERRIDE;
- virtual WebCore::Localizer& localizer() OVERRIDE;
+ virtual WebCore::Locale& locale() OVERRIDE;
virtual void setValueAndClosePopup(int, const String&) OVERRIDE;
virtual void didClosePopup() OVERRIDE;
@@ -74,7 +74,7 @@ private:
WebCore::ColorChooserClient* m_client;
OwnPtr<WebColorChooser> m_chooser;
WebCore::PagePopup* m_popup;
- OwnPtr<WebCore::Localizer> m_localizer;
+ OwnPtr<WebCore::Locale> m_locale;
};
}
diff --git a/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp b/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp
index e5795edc4..335d71d2b 100644
--- a/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp
@@ -140,12 +140,15 @@ bool ContextFeaturesClientImpl::askIfIsEnabled(Document* document, ContextFeatur
return defaultValue;
switch (type) {
+ case ContextFeatures::ShadowDOM:
case ContextFeatures::StyleScoped:
return m_client->allowWebComponents(WebDocument(document), defaultValue);
case ContextFeatures::HTMLNotifications:
return m_client->allowHTMLNotifications(WebDocument(document));
case ContextFeatures::MutationEvents:
return m_client->allowMutationEvents(WebDocument(document), defaultValue);
+ case ContextFeatures::PushState:
+ return m_client->allowPushState(WebDocument(document));
default:
return defaultValue;
}
diff --git a/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp b/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp
index 20044add8..29d519966 100644
--- a/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp
+++ b/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp
@@ -29,10 +29,9 @@
*/
#include "config.h"
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
#include "DateTimeChooserImpl.h"
-#if ENABLE(CALENDAR_PICKER)
-
#include "CalendarPicker.h"
#include "ChromeClientImpl.h"
#include "DateComponents.h"
@@ -40,14 +39,18 @@
#include "FrameView.h"
#include "InputTypeNames.h"
#include "Language.h"
-#include "Localizer.h"
#include "NotImplemented.h"
#include "PickerCommon.h"
+#include "PlatformLocale.h"
#include "RenderTheme.h"
#include "WebViewImpl.h"
#include <public/Platform.h>
#include <public/WebLocalizedString.h>
+#if !ENABLE(CALENDAR_PICKER)
+#error "ENABLE_INPUT_MULTIPLE_FIELDS_UI requires ENABLE_CALENDAR_PICKER in Chromium."
+#endif
+
using namespace WebCore;
namespace WebKit {
@@ -57,13 +60,18 @@ DateTimeChooserImpl::DateTimeChooserImpl(ChromeClientImpl* chromeClient, WebCore
, m_client(client)
, m_popup(0)
, m_parameters(parameters)
- , m_localizer(WebCore::Localizer::createDefault())
+ , m_locale(WebCore::Locale::createDefault())
{
ASSERT(m_chromeClient);
ASSERT(m_client);
m_popup = m_chromeClient->openPagePopup(this, m_parameters.anchorRectInRootView);
}
+PassRefPtr<DateTimeChooserImpl> DateTimeChooserImpl::create(ChromeClientImpl* chromeClient, WebCore::DateTimeChooserClient* client, const WebCore::DateTimeChooserParameters& parameters)
+{
+ return adoptRef(new DateTimeChooserImpl(chromeClient, client, parameters));
+}
+
DateTimeChooserImpl::~DateTimeChooserImpl()
{
}
@@ -93,6 +101,7 @@ void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer)
FrameView* view = static_cast<WebViewImpl*>(m_chromeClient->webView())->page()->mainFrame()->view();
IntRect rootViewVisibleContentRect = view->visibleContentRect(true /* include scrollbars */);
IntRect rootViewRectInScreen = m_chromeClient->rootViewToScreen(rootViewVisibleContentRect);
+ rootViewRectInScreen.move(-view->scrollX(), -view->scrollY());
addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer);
writer.addData(WebCore::pickerCommonCss, sizeof(WebCore::pickerCommonCss));
@@ -119,10 +128,10 @@ void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer)
addProperty("locale", WebCore::defaultLanguage(), writer);
addProperty("todayLabel", Platform::current()->queryLocalizedString(WebLocalizedString::CalendarToday), writer);
addProperty("clearLabel", Platform::current()->queryLocalizedString(WebLocalizedString::CalendarClear), writer);
- addProperty("weekStartDay", m_localizer->firstDayOfWeek(), writer);
- addProperty("monthLabels", m_localizer->monthLabels(), writer);
- addProperty("dayLabels", m_localizer->weekDayShortLabels(), writer);
- addProperty("isCalendarRTL", m_localizer->isRTL(), writer);
+ addProperty("weekStartDay", m_locale->firstDayOfWeek(), writer);
+ addProperty("monthLabels", m_locale->monthLabels(), writer);
+ addProperty("dayLabels", m_locale->weekDayShortLabels(), writer);
+ addProperty("isCalendarRTL", m_locale->isRTL(), writer);
addProperty("isRTL", m_parameters.isAnchorElementRTL, writer);
if (m_parameters.suggestionValues.size()) {
addProperty("inputWidth", static_cast<unsigned>(m_parameters.anchorRectInRootView.width()), writer);
@@ -142,13 +151,14 @@ void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer)
addString("</script></body>\n", writer);
}
-WebCore::Localizer& DateTimeChooserImpl::localizer()
+WebCore::Locale& DateTimeChooserImpl::locale()
{
- return *m_localizer;
+ return *m_locale;
}
void DateTimeChooserImpl::setValueAndClosePopup(int numValue, const String& stringValue)
{
+ RefPtr<DateTimeChooserImpl> protector(this);
if (numValue >= 0)
m_client->didChooseValue(stringValue);
endChooser();
@@ -163,4 +173,4 @@ void DateTimeChooserImpl::didClosePopup()
} // namespace WebKit
-#endif // ENABLE(CALENDAR_PICKER)
+#endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI)
diff --git a/Source/WebKit/chromium/src/DateTimeChooserImpl.h b/Source/WebKit/chromium/src/DateTimeChooserImpl.h
index 40195ce53..224358623 100644
--- a/Source/WebKit/chromium/src/DateTimeChooserImpl.h
+++ b/Source/WebKit/chromium/src/DateTimeChooserImpl.h
@@ -31,11 +31,10 @@
#ifndef DateTimeChooserImpl_h
#define DateTimeChooserImpl_h
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
#include "DateTimeChooser.h"
#include "PagePopupClient.h"
-#if ENABLE(CALENDAR_PICKER)
-
namespace WebCore {
class PagePopup;
class DateTimeChooserClient;
@@ -47,17 +46,18 @@ class ChromeClientImpl;
class DateTimeChooserImpl : public WebCore::DateTimeChooser, public WebCore::PagePopupClient {
public:
- DateTimeChooserImpl(ChromeClientImpl*, WebCore::DateTimeChooserClient*, const WebCore::DateTimeChooserParameters&);
+ static PassRefPtr<DateTimeChooserImpl> create(ChromeClientImpl*, WebCore::DateTimeChooserClient*, const WebCore::DateTimeChooserParameters&);
virtual ~DateTimeChooserImpl();
// DateTimeChooser functions:
virtual void endChooser() OVERRIDE;
private:
+ DateTimeChooserImpl(ChromeClientImpl*, WebCore::DateTimeChooserClient*, const WebCore::DateTimeChooserParameters&);
// PagePopupClient functions:
virtual WebCore::IntSize contentSize() OVERRIDE;
virtual void writeDocument(WebCore::DocumentWriter&) OVERRIDE;
- virtual WebCore::Localizer& localizer() OVERRIDE;
+ virtual WebCore::Locale& locale() OVERRIDE;
virtual void setValueAndClosePopup(int, const String&) OVERRIDE;
virtual void didClosePopup() OVERRIDE;
@@ -65,11 +65,11 @@ private:
WebCore::DateTimeChooserClient* m_client;
WebCore::PagePopup* m_popup;
WebCore::DateTimeChooserParameters m_parameters;
- OwnPtr<WebCore::Localizer> m_localizer;
+ OwnPtr<WebCore::Locale> m_locale;
};
}
-#endif // ENABLE(CALENDAR_PICKER)
+#endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI)
#endif // DateTimeChooserImpl_h
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 49e780baf..7ffe94339 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -62,6 +62,9 @@
#endif
#include "Settings.h"
#include "SocketStreamHandleInternal.h"
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+#include "WebAutofillClient.h"
+#endif
#include "WebDOMEvent.h"
#include "WebDataSourceImpl.h"
#include "WebDevToolsAgentPrivate.h"
@@ -893,6 +896,9 @@ Frame* FrameLoaderClientImpl::dispatchCreatePage(const NavigationAction& action)
ChromeClientImpl* chromeClient = static_cast<ChromeClientImpl*>(m_webFrame->frame()->page()->chrome()->client());
chromeClient->setNewWindowNavigationPolicy(policy);
+ if (m_webFrame->frame()->settings() && !m_webFrame->frame()->settings()->supportsMultipleWindows())
+ return m_webFrame->frame();
+
struct WindowFeatures features;
Page* newPage = m_webFrame->frame()->page()->chrome()->createWindow(
m_webFrame->frame(), FrameLoadRequest(m_webFrame->frame()->document()->securityOrigin()),
@@ -1648,5 +1654,12 @@ void FrameLoaderClientImpl::dispatchWillStartUsingPeerConnectionHandler(RTCPeerC
}
#endif
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+void FrameLoaderClientImpl::didRequestAutocomplete(PassRefPtr<FormState> formState)
+{
+ if (m_webFrame->viewImpl() && m_webFrame->viewImpl()->autofillClient())
+ m_webFrame->viewImpl()->autofillClient()->didRequestAutocomplete(m_webFrame, WebFormElement(formState->form()));
+}
+#endif
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
index 12a76feee..6589c37bb 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -225,6 +225,10 @@ public:
virtual void dispatchWillStartUsingPeerConnectionHandler(WebCore::RTCPeerConnectionHandler*) OVERRIDE;
#endif
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+ virtual void didRequestAutocomplete(PassRefPtr<WebCore::FormState>) OVERRIDE;
+#endif
+
private:
void makeDocumentView();
diff --git a/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp b/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp
index 29b8c4bf4..f6d964470 100644
--- a/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.cpp
@@ -85,6 +85,14 @@ void IDBDatabaseBackendProxy::deleteObjectStore(const String& name, IDBTransacti
m_webIDBDatabase->deleteObjectStore(name, *transactionProxy->getWebIDBTransaction(), ec);
}
+void IDBDatabaseBackendProxy::deleteObjectStore(int64_t objectStoreId, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
+{
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBDatabase->deleteObjectStore(objectStoreId, *transactionProxy->getWebIDBTransaction(), ec);
+}
+
void IDBDatabaseBackendProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, ExceptionCode& ec)
{
ASSERT(m_webIDBDatabase);
@@ -102,6 +110,15 @@ PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendProxy::transaction(
return IDBTransactionBackendProxy::create(transaction.release());
}
+PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendProxy::transaction(const Vector<int64_t>& objectStoreIds, unsigned short mode)
+{
+ OwnPtr<WebIDBTransaction> transaction = adoptPtr(m_webIDBDatabase->transaction(objectStoreIds, mode));
+ if (!transaction)
+ return 0;
+
+ return IDBTransactionBackendProxy::create(transaction.release());
+}
+
void IDBDatabaseBackendProxy::close(PassRefPtr<IDBDatabaseCallbacks>)
{
m_webIDBDatabase->close();
diff --git a/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h b/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h
index fc831e8de..916f833ab 100644
--- a/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBDatabaseBackendProxy.h
@@ -46,8 +46,10 @@ public:
virtual PassRefPtr<WebCore::IDBObjectStoreBackendInterface> createObjectStore(int64_t, const String& name, const WebCore::IDBKeyPath&, bool autoIncrement, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void deleteObjectStore(const String& name, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
+ virtual void deleteObjectStore(int64_t, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void setVersion(const String& version, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::IDBDatabaseCallbacks>, WebCore::ExceptionCode&);
virtual PassRefPtr<WebCore::IDBTransactionBackendInterface> transaction(WebCore::DOMStringList* storeNames, unsigned short mode, WebCore::ExceptionCode&);
+ virtual PassRefPtr<WebCore::IDBTransactionBackendInterface> transaction(const Vector<int64_t>&, unsigned short mode);
virtual void close(PassRefPtr<WebCore::IDBDatabaseCallbacks>);
private:
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
index 2b9b44a7a..6a0d02772 100755
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
@@ -77,6 +77,14 @@ void IDBObjectStoreBackendProxy::putWithIndexKeys(PassRefPtr<SerializedScriptVal
m_webIDBObjectStore->putWithIndexKeys(value, key, static_cast<WebIDBObjectStore::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), webIndexNames, webIndexKeys, ec);
}
+void IDBObjectStoreBackendProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
+{
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->put(value, key, static_cast<WebIDBObjectStore::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), indexIds, indexKeys);
+}
+
void IDBObjectStoreBackendProxy::setIndexKeys(PassRefPtr<IDBKey> prpPrimaryKey, const Vector<String>& indexNames, const Vector<IndexKeys>& indexKeys, IDBTransactionBackendInterface* transaction)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
@@ -87,6 +95,14 @@ void IDBObjectStoreBackendProxy::setIndexKeys(PassRefPtr<IDBKey> prpPrimaryKey,
m_webIDBObjectStore->setIndexKeys(prpPrimaryKey, webIndexNames, webIndexKeys, *transactionProxy->getWebIDBTransaction());
}
+void IDBObjectStoreBackendProxy::setIndexKeys(PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys, IDBTransactionBackendInterface* transaction)
+{
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->setIndexKeys(prpPrimaryKey, WebVector<long long>(indexIds), indexKeys, *transactionProxy->getWebIDBTransaction());
+}
+
void IDBObjectStoreBackendProxy::deleteFunction(PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
@@ -130,7 +146,15 @@ void IDBObjectStoreBackendProxy::setIndexesReady(const Vector<String>& indexName
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
// all implementations of IDB interfaces are proxy objects.
IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- m_webIDBObjectStore->setIndexesReady(indexNames, *transactionProxy->getWebIDBTransaction());
+ m_webIDBObjectStore->setIndexesReady(WebVector<WebString>(indexNames), *transactionProxy->getWebIDBTransaction());
+}
+
+void IDBObjectStoreBackendProxy::setIndexesReady(const Vector<int64_t>& indexIds, IDBTransactionBackendInterface* transaction)
+{
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->setIndexesReady(WebVector<long long>(indexIds), *transactionProxy->getWebIDBTransaction());
}
PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendProxy::index(const String& name, ExceptionCode& ec)
@@ -141,6 +165,14 @@ PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendProxy::index(const Str
return IDBIndexBackendProxy::create(index.release());
}
+PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendProxy::index(int64_t indexId)
+{
+ OwnPtr<WebIDBIndex> index = adoptPtr(m_webIDBObjectStore->index(indexId));
+ if (!index)
+ return 0;
+ return IDBIndexBackendProxy::create(index.release());
+}
+
void IDBObjectStoreBackendProxy::deleteIndex(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
@@ -149,6 +181,13 @@ void IDBObjectStoreBackendProxy::deleteIndex(const String& name, IDBTransactionB
m_webIDBObjectStore->deleteIndex(name, *transactionProxy->getWebIDBTransaction(), ec);
}
+void IDBObjectStoreBackendProxy::deleteIndex(const int64_t indexId, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
+{
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->deleteIndex(indexId, *transactionProxy->getWebIDBTransaction(), ec);
+}
void IDBObjectStoreBackendProxy::openCursor(PassRefPtr<IDBKeyRange> range, IDBCursor::Direction direction, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface::TaskType taskType, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
index 8470c1ad9..79113ae95 100644
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
@@ -45,16 +45,21 @@ public:
virtual void get(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void putWithIndexKeys(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, const WTF::Vector<WTF::String>&, const WTF::Vector<IndexKeys>&, WebCore::ExceptionCode&);
+ virtual void put(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, const WTF::Vector<int64_t>&, const WTF::Vector<IndexKeys>&);
virtual void deleteFunction(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void clear(PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
PassRefPtr<WebCore::IDBIndexBackendInterface> createIndex(int64_t id, const String& name, const WebCore::IDBKeyPath&, bool unique, bool multiEntry, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
PassRefPtr<WebCore::IDBIndexBackendInterface> createIndex(const String& name, const WebCore::IDBKeyPath&, bool unique, bool multiEntry, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
- virtual void setIndexKeys(PassRefPtr<WebCore::IDBKey> prpPrimaryKey, const WTF::Vector<WTF::String>&, const WTF::Vector<IndexKeys>&, WebCore::IDBTransactionBackendInterface*);
+ virtual void setIndexKeys(PassRefPtr<WebCore::IDBKey> prpPrimaryKey, const WTF::Vector<WTF::String>&, const Vector<IndexKeys>&, WebCore::IDBTransactionBackendInterface*);
+ virtual void setIndexKeys(PassRefPtr<WebCore::IDBKey> prpPrimaryKey, const WTF::Vector<int64_t>&, const Vector<IndexKeys>&, WebCore::IDBTransactionBackendInterface*);
virtual void setIndexesReady(const Vector<String>&, WebCore::IDBTransactionBackendInterface*);
-
+ virtual void setIndexesReady(const Vector<int64_t>&, WebCore::IDBTransactionBackendInterface*);
+
PassRefPtr<WebCore::IDBIndexBackendInterface> index(const String& name, WebCore::ExceptionCode&);
+ PassRefPtr<WebCore::IDBIndexBackendInterface> index(int64_t);
void deleteIndex(const String& name, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
+ void deleteIndex(int64_t, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void openCursor(PassRefPtr<WebCore::IDBKeyRange>, WebCore::IDBCursor::Direction, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface::TaskType, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void count(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
diff --git a/Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp b/Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
index 88f9852ac..f0837fef6 100644
--- a/Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
@@ -62,6 +62,14 @@ PassRefPtr<IDBObjectStoreBackendInterface> IDBTransactionBackendProxy::objectSto
return IDBObjectStoreBackendProxy::create(objectStore.release());
}
+PassRefPtr<WebCore::IDBObjectStoreBackendInterface> IDBTransactionBackendProxy::objectStore(int64_t indexId, ExceptionCode& ec)
+{
+ OwnPtr<WebIDBObjectStore> objectStore = adoptPtr(m_webIDBTransaction->objectStore(indexId, ec));
+ if (!objectStore)
+ return 0;
+ return IDBObjectStoreBackendProxy::create(objectStore.release());
+}
+
void IDBTransactionBackendProxy::commit()
{
m_webIDBTransaction->commit();
diff --git a/Source/WebKit/chromium/src/IDBTransactionBackendProxy.h b/Source/WebKit/chromium/src/IDBTransactionBackendProxy.h
index 7e7486bd7..e8f2c3375 100644
--- a/Source/WebKit/chromium/src/IDBTransactionBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBTransactionBackendProxy.h
@@ -42,6 +42,7 @@ public:
virtual ~IDBTransactionBackendProxy();
virtual PassRefPtr<WebCore::IDBObjectStoreBackendInterface> objectStore(const String& name, WebCore::ExceptionCode&);
+ virtual PassRefPtr<WebCore::IDBObjectStoreBackendInterface> objectStore(int64_t, WebCore::ExceptionCode&);
virtual void commit();
virtual void abort();
virtual void didCompleteTaskEvents();
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.cpp b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
index f8020ef0b..c6e7b2277 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -131,6 +131,11 @@ void InspectorClientImpl::clearBrowserCookies()
agent->clearBrowserCookies();
}
+bool InspectorClientImpl::canMonitorMainThread()
+{
+ return true;
+}
+
void InspectorClientImpl::startMainThreadMonitoring()
{
WebKit::Platform::current()->currentThread()->addTaskObserver(this);
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.h b/Source/WebKit/chromium/src/InspectorClientImpl.h
index 34de35a09..75e1e4342 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.h
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.h
@@ -69,6 +69,7 @@ public:
virtual bool canClearBrowserCookies();
virtual void clearBrowserCookies();
+ virtual bool canMonitorMainThread();
virtual void startMainThreadMonitoring();
virtual void stopMainThreadMonitoring();
diff --git a/Source/WebKit/chromium/src/LinkHighlight.cpp b/Source/WebKit/chromium/src/LinkHighlight.cpp
index 815a0c300..0d4d154f0 100644
--- a/Source/WebKit/chromium/src/LinkHighlight.cpp
+++ b/Source/WebKit/chromium/src/LinkHighlight.cpp
@@ -48,6 +48,7 @@
#include <public/WebFloatPoint.h>
#include <public/WebRect.h>
#include <public/WebSize.h>
+#include <public/WebTransformationMatrix.h>
using namespace WebCore;
@@ -125,10 +126,10 @@ RenderLayer* LinkHighlight::computeEnclosingCompositingLayer()
if (!renderLayer || !renderLayer->isComposited())
return 0;
- m_graphicsLayerOffset = FloatPoint();
GraphicsLayerChromium* newGraphicsLayer = static_cast<GraphicsLayerChromium*>(renderLayer->backing()->graphicsLayer());
+ m_clipLayer->setSublayerTransform(WebTransformationMatrix());
if (!newGraphicsLayer->drawsContent()) {
- m_graphicsLayerOffset = newGraphicsLayer->position();
+ m_clipLayer->setSublayerTransform(WebTransformationMatrix(newGraphicsLayer->transform()));
newGraphicsLayer = static_cast<GraphicsLayerChromium*>(m_owningWebViewImpl->nonCompositedContentHost()->topLevelRootLayer());
}
@@ -225,7 +226,7 @@ bool LinkHighlight::computeHighlightLayerPathAndPosition(RenderLayer* compositin
return pathHasChanged;
}
-void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect, WebFloatRect&)
+void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect, bool, WebFloatRect&)
{
if (!m_node || !m_node->renderer())
return;
@@ -302,6 +303,9 @@ void LinkHighlight::updateGeometry()
// We only need to invalidate the layer if the highlight size has changed, otherwise
// we can just re-position the layer without needing to repaint.
m_contentLayer->layer()->invalidate();
+
+ if (m_currentGraphicsLayer)
+ m_currentGraphicsLayer->addRepaintRect(FloatRect(layer()->position().x, layer()->position().y, layer()->bounds().width, layer()->bounds().height));
}
}
diff --git a/Source/WebKit/chromium/src/LinkHighlight.h b/Source/WebKit/chromium/src/LinkHighlight.h
index 3bac3c729..06d8c909f 100644
--- a/Source/WebKit/chromium/src/LinkHighlight.h
+++ b/Source/WebKit/chromium/src/LinkHighlight.h
@@ -58,7 +58,7 @@ public:
void updateGeometry();
// WebContentLayerClient implementation.
- virtual void paintContents(WebCanvas*, const WebRect& clipRect, WebFloatRect& opaque) OVERRIDE;
+ virtual void paintContents(WebCanvas*, const WebRect& clipRect, bool canPaintLCDText, WebFloatRect& opaque) OVERRIDE;
// WebAnimationDelegate implementation.
virtual void notifyAnimationStarted(double time) OVERRIDE;
@@ -91,7 +91,6 @@ private:
bool m_geometryNeedsUpdate;
bool m_isAnimating;
- WebCore::FloatPoint m_graphicsLayerOffset;
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/LocalizedStrings.cpp b/Source/WebKit/chromium/src/LocalizedStrings.cpp
index 4ef239c6f..a5c2024fa 100644
--- a/Source/WebKit/chromium/src/LocalizedStrings.cpp
+++ b/Source/WebKit/chromium/src/LocalizedStrings.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "LocalizedStrings.h"
+#include "DateTimeFormat.h"
#include "IntSize.h"
#include "NotImplemented.h"
@@ -267,10 +268,28 @@ String placeholderForYearField()
{
return query(WebLocalizedString::PlaceholderForYearField);
}
+#endif
+#if ENABLE(INPUT_TYPE_WEEK)
String weekFormatInLDML()
{
- return query(WebLocalizedString::WeekFormatTemplate);
+ String templ = query(WebLocalizedString::WeekFormatTemplate);
+ // Converts a string like "Week $2, $1" to an LDML date format pattern like
+ // "'Week 'ww', 'yyyy".
+ StringBuilder builder;
+ unsigned literalStart = 0;
+ unsigned length = templ.length();
+ for (unsigned i = 0; i + 1 < length; ++i) {
+ if (templ[i] == '$' && (templ[i + 1] == '1' || templ[i + 1] == '2')) {
+ if (literalStart < i)
+ DateTimeFormat::quoteAndAppendLiteral(templ.substring(literalStart, i - literalStart), builder);
+ builder.append(templ[++i] == '1' ? "yyyy" : "ww");
+ literalStart = i + 1;
+ }
+ }
+ if (literalStart < length)
+ DateTimeFormat::quoteAndAppendLiteral(templ.substring(literalStart, length - literalStart), builder);
+ return builder.toString();
}
#endif
@@ -298,6 +317,12 @@ String insecurePluginVersionText()
return String();
}
+String inactivePluginText()
+{
+ notImplemented();
+ return String();
+}
+
String multipleFileUploadText(unsigned numberOfFiles)
{
return query(WebLocalizedString::MultipleFileUploadText, String::number(numberOfFiles));
@@ -479,31 +504,4 @@ String validationMessageStepMismatchText(const String& base, const String& step)
return query(WebLocalizedString::ValidationStepMismatch, base, step);
}
-#if ENABLE(CALENDAR_PICKER)
-String calendarTodayText()
-{
- return query(WebLocalizedString::CalendarToday);
-}
-
-String calendarClearText()
-{
- return query(WebLocalizedString::CalendarClear);
-}
-
-String dateFormatYearText()
-{
- return query(WebLocalizedString::DateFormatYearLabel);
-}
-
-String dateFormatMonthText()
-{
- return query(WebLocalizedString::DateFormatMonthLabel);
-}
-
-String dateFormatDayInMonthText()
-{
- return query(WebLocalizedString::DateFormatDayInMonthLabel);
-}
-#endif
-
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/NonCompositedContentHost.cpp b/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
index 21b9725b0..05a4c15d9 100644
--- a/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
+++ b/Source/WebKit/chromium/src/NonCompositedContentHost.cpp
@@ -41,7 +41,6 @@ namespace WebKit {
NonCompositedContentHost::NonCompositedContentHost(WebViewImpl* webView)
: m_webView(webView)
- , m_opaque(true)
, m_showDebugBorders(false)
{
m_graphicsLayer = WebCore::GraphicsLayer::create(0, this);
@@ -50,9 +49,10 @@ NonCompositedContentHost::NonCompositedContentHost(WebViewImpl* webView)
#endif
m_graphicsLayer->setDrawsContent(true);
m_graphicsLayer->setAppliesPageScale(!m_webView->page()->settings()->applyPageScaleFactorInCompositor());
+ m_graphicsLayer->setContentsOpaque(true);
+ // FIXME: Remove LCD text setting after it is implemented in chromium.
WebContentLayer* layer = static_cast<WebCore::GraphicsLayerChromium*>(m_graphicsLayer.get())->contentLayer();
layer->setUseLCDText(true);
- layer->layer()->setOpaque(true);
#if !OS(ANDROID)
layer->setDrawCheckerboardForMissingTiles(true);
#endif
@@ -69,8 +69,7 @@ void NonCompositedContentHost::setBackgroundColor(const WebCore::Color& color)
void NonCompositedContentHost::setOpaque(bool opaque)
{
- m_opaque = opaque;
- m_graphicsLayer->platformLayer()->setOpaque(opaque);
+ m_graphicsLayer->setContentsOpaque(opaque);
}
void NonCompositedContentHost::setScrollLayer(WebCore::GraphicsLayer* layer)
@@ -173,10 +172,11 @@ void NonCompositedContentHost::notifyFlushRequired(const WebCore::GraphicsLayer*
void NonCompositedContentHost::paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext& context, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect)
{
+ // FIXME: Remove LCD text setting after it is implemented in chromium.
// On non-android platforms, we want to render text with subpixel antialiasing on the root layer
// so long as the root is opaque. On android all text is grayscale.
#if !OS(ANDROID)
- if (m_opaque)
+ if (m_graphicsLayer->contentsOpaque())
context.platformContext()->setDrawingToImageBuffer(false);
#endif
context.translate(-m_layerAdjust);
@@ -191,14 +191,9 @@ void NonCompositedContentHost::setShowDebugBorders(bool showDebugBorders)
m_graphicsLayer->updateDebugIndicators();
}
-bool NonCompositedContentHost::showDebugBorders(const WebCore::GraphicsLayer*) const
+bool NonCompositedContentHost::isTrackingRepaints() const
{
- return m_showDebugBorders;
-}
-
-bool NonCompositedContentHost::showRepaintCounter(const WebCore::GraphicsLayer*) const
-{
- return false;
+ return m_webView->isTrackingRepaints();
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/NonCompositedContentHost.h b/Source/WebKit/chromium/src/NonCompositedContentHost.h
index 08e9c69b2..609538a6f 100644
--- a/Source/WebKit/chromium/src/NonCompositedContentHost.h
+++ b/Source/WebKit/chromium/src/NonCompositedContentHost.h
@@ -71,8 +71,7 @@ private:
virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
- virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
- virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
+ virtual bool isTrackingRepaints() const;
bool haveScrollLayer();
WebLayer* scrollLayer();
@@ -82,7 +81,6 @@ private:
WebCore::IntSize m_viewportSize;
WebCore::IntSize m_layerAdjust;
- bool m_opaque;
bool m_showDebugBorders;
};
diff --git a/Source/WebKit/chromium/src/PageOverlay.cpp b/Source/WebKit/chromium/src/PageOverlay.cpp
index a16a01077..c95687af6 100644
--- a/Source/WebKit/chromium/src/PageOverlay.cpp
+++ b/Source/WebKit/chromium/src/PageOverlay.cpp
@@ -94,16 +94,6 @@ public:
return m_webViewImpl->pageScaleFactor();
}
- virtual bool showDebugBorders(const GraphicsLayer*) const
- {
- return m_webViewImpl->page()->settings()->showDebugBorders();
- }
-
- virtual bool showRepaintCounter(const GraphicsLayer*) const
- {
- return m_webViewImpl->page()->settings()->showRepaintCounter();
- }
-
private:
OverlayGraphicsLayerClientImpl(WebViewImpl* webViewImpl, WebPageOverlay* overlay)
: m_overlay(overlay)
diff --git a/Source/WebKit/chromium/src/PageOverlay.h b/Source/WebKit/chromium/src/PageOverlay.h
index bf8526fcc..2101cbf5b 100644
--- a/Source/WebKit/chromium/src/PageOverlay.h
+++ b/Source/WebKit/chromium/src/PageOverlay.h
@@ -65,8 +65,8 @@ private:
WebViewImpl* m_viewImpl;
WebPageOverlay* m_overlay;
- OwnPtr<WebCore::GraphicsLayer> m_layer;
OwnPtr<WebCore::GraphicsLayerClient> m_layerClient;
+ OwnPtr<WebCore::GraphicsLayer> m_layer;
int m_zOrder;
};
diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp
index 9eb8b68e1..a39b1e9cb 100644
--- a/Source/WebKit/chromium/src/PlatformSupport.cpp
+++ b/Source/WebKit/chromium/src/PlatformSupport.cpp
@@ -100,30 +100,6 @@ using namespace WebKit;
namespace WebCore {
-static WebWidgetClient* toWebWidgetClient(Widget* widget)
-{
- if (!widget)
- return 0;
-
- FrameView* view;
- if (widget->isFrameView())
- view = static_cast<FrameView*>(widget);
- else if (widget->parent() && widget->parent()->isFrameView())
- view = static_cast<FrameView*>(widget->parent());
- else
- return 0;
-
- Page* page = view->frame() ? view->frame()->page() : 0;
- if (!page)
- return 0;
-
- void* webView = page->chrome()->client()->webView();
- if (!webView)
- return 0;
-
- return static_cast<WebViewImpl*>(webView)->client();
-}
-
static WebCookieJar* getCookieJar(const Document* document)
{
WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame());
@@ -330,62 +306,6 @@ void PlatformSupport::paintProgressBar(
// Glue layer. Once the Glue layer moves entirely into the WebKit layer, these
// methods will be deleted.
-int PlatformSupport::screenHorizontalDPI(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().horizontalDPI;
-}
-
-int PlatformSupport::screenVerticalDPI(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().verticalDPI;
-}
-
-int PlatformSupport::screenDepth(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().depth;
-}
-
-int PlatformSupport::screenDepthPerComponent(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().depthPerComponent;
-}
-
-bool PlatformSupport::screenIsMonochrome(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return 0;
- return client->screenInfo().isMonochrome;
-}
-
-IntRect PlatformSupport::screenRect(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return IntRect();
- return client->screenInfo().rect;
-}
-
-IntRect PlatformSupport::screenAvailableRect(Widget* widget)
-{
- WebWidgetClient* client = toWebWidgetClient(widget);
- if (!client)
- return IntRect();
- return client->screenInfo().availableRect;
-}
-
#if ENABLE(WORKERS)
WorkerContextProxy* WorkerContextProxy::create(Worker* worker)
{
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 5c25ff64e..5d6a1d09b 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -348,6 +348,15 @@ private:
double m_originalZoomFactor;
};
+class SerializingFrontendChannel : public InspectorFrontendChannel {
+public:
+ virtual bool sendMessageToFrontend(const String& message)
+ {
+ m_message = message;
+ return true;
+ }
+ String m_message;
+};
WebDevToolsAgentImpl::WebDevToolsAgentImpl(
WebViewImpl* webViewImpl,
@@ -685,17 +694,17 @@ void WebDevToolsAgent::processPendingMessages()
PageScriptDebugServer::shared().runPendingTasks();
}
-WebString WebDevToolsAgent::disconnectEventAsText()
+WebString WebDevToolsAgent::inspectorDetachedEvent(const WebString& reason)
{
- class ChannelImpl : public InspectorFrontendChannel {
- public:
- virtual bool sendMessageToFrontend(const String& message)
- {
- m_message = message;
- return true;
- }
- String m_message;
- } channel;
+ SerializingFrontendChannel channel;
+ InspectorFrontend::Inspector inspector(&channel);
+ inspector.detached(reason);
+ return channel.m_message;
+}
+
+WebString WebDevToolsAgent::workerDisconnectedFromWorkerEvent()
+{
+ SerializingFrontendChannel channel;
#if ENABLE(WORKERS)
InspectorFrontend::Worker inspector(&channel);
inspector.disconnectedFromWorker();
@@ -703,4 +712,10 @@ WebString WebDevToolsAgent::disconnectEventAsText()
return channel.m_message;
}
+// FIXME: remove this once migrated to workerDisconnectedFromWorkerEvent().
+WebString WebDevToolsAgent::disconnectEventAsText()
+{
+ return WebDevToolsAgent::workerDisconnectedFromWorkerEvent();
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebFormElement.cpp b/Source/WebKit/chromium/src/WebFormElement.cpp
index cdae6620e..f6a9a67f0 100644
--- a/Source/WebKit/chromium/src/WebFormElement.cpp
+++ b/Source/WebKit/chromium/src/WebFormElement.cpp
@@ -102,6 +102,13 @@ void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re
result.assign(tempVector);
}
+void WebFormElement::finishRequestAutocomplete(WebFormElement::AutocompleteResult result)
+{
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+ unwrap<HTMLFormElement>()->finishRequestAutocomplete(static_cast<HTMLFormElement::AutocompleteResult>(result));
+#endif
+}
+
WebFormElement::WebFormElement(const PassRefPtr<HTMLFormElement>& e)
: WebElement(e)
{
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 7eef29343..1936476f3 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -82,6 +82,7 @@
#include "DOMUtilitiesPrivate.h"
#include "DOMWindow.h"
#include "DOMWindowIntents.h"
+#include "DOMWrapperWorld.h"
#include "DeliveredIntent.h"
#include "DeliveredIntentClientImpl.h"
#include "DirectoryEntry.h"
@@ -148,6 +149,7 @@
#include "SubstituteData.h"
#include "TextAffinity.h"
#include "TextIterator.h"
+#include "TraceEvent.h"
#include "UserGestureIndicator.h"
#include "V8DOMFileSystem.h"
#include "V8DirectoryEntry.h"
@@ -825,7 +827,13 @@ void WebFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScriptSour
void WebFrameImpl::setIsolatedWorldSecurityOrigin(int worldID, const WebSecurityOrigin& securityOrigin)
{
ASSERT(frame());
- frame()->script()->setIsolatedWorldSecurityOrigin(worldID, securityOrigin.get());
+ DOMWrapperWorld::setIsolatedWorldSecurityOrigin(worldID, securityOrigin.get());
+}
+
+void WebFrameImpl::setIsolatedWorldContentSecurityPolicy(int worldID, const WebString& policy)
+{
+ ASSERT(frame());
+ DOMWrapperWorld::setIsolatedWorldContentSecurityPolicy(worldID, policy);
}
void WebFrameImpl::addMessageToConsole(const WebConsoleMessage& message)
@@ -851,7 +859,7 @@ void WebFrameImpl::addMessageToConsole(const WebConsoleMessage& message)
return;
}
- frame()->document()->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, webCoreMessageLevel, message.text);
+ frame()->document()->addConsoleMessage(OtherMessageSource, LogMessageType, webCoreMessageLevel, message.text);
}
void WebFrameImpl::collectGarbage()
@@ -1114,15 +1122,7 @@ WebURLLoader* WebFrameImpl::createAssociatedURLLoader(const WebURLLoaderOptions&
void WebFrameImpl::commitDocumentData(const char* data, size_t length)
{
- WebViewImpl* webView = viewImpl();
- bool isMainFrame = webView->mainFrameImpl()->frame() == frame();
- if (isMainFrame)
- webView->suppressInvalidations(true);
-
frame()->loader()->documentLoader()->commitData(data, length);
-
- if (isMainFrame)
- webView->suppressInvalidations(false);
}
unsigned WebFrameImpl::unloadListenerCount() const
@@ -2275,6 +2275,8 @@ void WebFrameImpl::didChangeContentsSize(const IntSize& size)
void WebFrameImpl::createFrameView()
{
+ TRACE_EVENT0("webkit", "WebFrameImpl::createFrameView");
+
ASSERT(frame()); // If frame() doesn't exist, we probably didn't init properly.
WebViewImpl* webView = viewImpl();
@@ -2458,7 +2460,7 @@ bool WebFrameImpl::shouldScopeMatches(const String& searchText)
// Don't scope if we can't find a frame or a view.
// The user may have closed the tab/application, so abort.
// Also ignore detached frames, as many find operations report to the main frame.
- if (!frame() || !frame()->view() || !frame()->page())
+ if (!frame() || !frame()->view() || !frame()->page() || !hasVisibleContent())
return false;
ASSERT(frame()->document() && frame()->view());
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.h b/Source/WebKit/chromium/src/WebFrameImpl.h
index 2686aad1d..722ecf559 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.h
+++ b/Source/WebKit/chromium/src/WebFrameImpl.h
@@ -114,6 +114,7 @@ public:
int worldID, const WebScriptSource* sources, unsigned numSources,
int extensionGroup);
virtual void setIsolatedWorldSecurityOrigin(int worldID, const WebSecurityOrigin&);
+ virtual void setIsolatedWorldContentSecurityPolicy(int worldID, const WebString&);
virtual void addMessageToConsole(const WebConsoleMessage&);
virtual void collectGarbage();
virtual bool checkIfRunInsecureContent(const WebURL&) const;
diff --git a/Source/WebKit/chromium/src/WebHitTestResult.cpp b/Source/WebKit/chromium/src/WebHitTestResult.cpp
index a839fb63e..7e5a9aefb 100644
--- a/Source/WebKit/chromium/src/WebHitTestResult.cpp
+++ b/Source/WebKit/chromium/src/WebHitTestResult.cpp
@@ -32,8 +32,10 @@
#include "Node.h"
#include "RenderObject.h"
#include "VisiblePosition.h"
+#include "WebElement.h"
#include "WebNode.h"
#include <public/WebPoint.h>
+#include <public/WebURL.h>
using namespace WebCore;
@@ -49,6 +51,26 @@ WebPoint WebHitTestResult::localPoint() const
return roundedIntPoint(m_private->localPoint());
}
+WebElement WebHitTestResult::urlElement() const
+{
+ return WebElement(m_private->URLElement());
+}
+
+WebURL WebHitTestResult::absoluteImageURL() const
+{
+ return m_private->absoluteImageURL();
+}
+
+WebURL WebHitTestResult::absoluteLinkURL() const
+{
+ return m_private->absoluteLinkURL();
+}
+
+bool WebHitTestResult::isContentEditable() const
+{
+ return m_private->isContentEditable();
+}
+
WebHitTestResult::WebHitTestResult(const HitTestResult& result)
{
m_private.reset(new HitTestResult(result));
diff --git a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
index e09c1a3fe..8d12cfa3e 100644
--- a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
@@ -28,6 +28,7 @@
#if ENABLE(INDEXED_DATABASE)
+#include "DOMStringList.h"
#include "IDBCallbacks.h"
#include "IDBCursorBackendProxy.h"
#include "IDBDatabaseBackendProxy.h"
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index e71029deb..90c262389 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -75,6 +75,11 @@ void WebIDBDatabaseImpl::deleteObjectStore(const WebString& name, const WebIDBTr
m_databaseBackend->deleteObjectStore(name, transaction.getIDBTransactionBackendInterface(), ec);
}
+void WebIDBDatabaseImpl::deleteObjectStore(long long objectStoreId, const WebIDBTransaction& transaction, WebExceptionCode& ec)
+{
+ m_databaseBackend->deleteObjectStore(objectStoreId, transaction.getIDBTransactionBackendInterface(), ec);
+}
+
void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
{
m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(adoptPtr(callbacks)), m_databaseCallbacks, ec);
@@ -91,6 +96,17 @@ WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names
return new WebIDBTransactionImpl(transaction);
}
+WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebVector<long long>& objectStoreIds, unsigned short mode)
+{
+ Vector<int64_t> objectStoreIdList(objectStoreIds.size());
+ for (size_t i = 0; i < objectStoreIds.size(); ++i)
+ objectStoreIdList[i] = objectStoreIds[i];
+ RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(objectStoreIdList, mode);
+ if (!transaction)
+ return 0;
+ return new WebIDBTransactionImpl(transaction);
+}
+
void WebIDBDatabaseImpl::close()
{
// Use the callbacks passed in to the constructor so that the backend in
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
index 769bdf5d0..65a19668a 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -54,8 +54,10 @@ public:
virtual WebIDBObjectStore* createObjectStore(long long, const WebString& name, const WebIDBKeyPath&, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&);
virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
+ virtual void deleteObjectStore(long long objectStoreId, const WebIDBTransaction&, WebExceptionCode&);
virtual void setVersion(const WebString& version, WebIDBCallbacks*, WebExceptionCode&);
virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, WebExceptionCode&);
+ virtual WebIDBTransaction* transaction(const WebVector<long long>& names, unsigned short mode);
virtual void forceClose();
virtual void close();
diff --git a/Source/WebKit/chromium/src/WebIDBMetadata.cpp b/Source/WebKit/chromium/src/WebIDBMetadata.cpp
index dd1c2c8e5..2ca5bf7c7 100644
--- a/Source/WebKit/chromium/src/WebIDBMetadata.cpp
+++ b/Source/WebKit/chromium/src/WebIDBMetadata.cpp
@@ -49,6 +49,7 @@ WebIDBMetadata::WebIDBMetadata(const WebCore::IDBDatabaseMetadata& metadata)
for (IDBDatabaseMetadata::ObjectStoreMap::const_iterator storeIterator = metadata.objectStores.begin(); storeIterator != metadata.objectStores.end(); ++storeIterator) {
const IDBObjectStoreMetadata& objectStore = storeIterator->value;
ObjectStore webObjectStore;
+ webObjectStore.id = objectStore.id;
webObjectStore.name = objectStore.name;
webObjectStore.keyPath = objectStore.keyPath;
webObjectStore.autoIncrement = objectStore.autoIncrement;
@@ -59,6 +60,7 @@ WebIDBMetadata::WebIDBMetadata(const WebCore::IDBDatabaseMetadata& metadata)
for (IDBObjectStoreMetadata::IndexMap::const_iterator indexIterator = objectStore.indexes.begin(); indexIterator != objectStore.indexes.end(); ++indexIterator) {
const IDBIndexMetadata& index = indexIterator->value;
Index webIndex;
+ webIndex.id = index.id;
webIndex.name = index.name;
webIndex.keyPath = index.keyPath;
webIndex.unique = index.unique;
@@ -79,9 +81,9 @@ WebIDBMetadata::operator IDBDatabaseMetadata() const
for (size_t j = 0; j < webObjectStore.indexes.size(); ++j) {
const Index webIndex = webObjectStore.indexes[j];
IDBIndexMetadata index(webIndex.name, webIndex.id, webIndex.keyPath, webIndex.unique, webIndex.multiEntry);
- objectStore.indexes.set(index.name, index);
+ objectStore.indexes.set(index.id, index);
}
- db.objectStores.set(objectStore.name, objectStore);
+ db.objectStores.set(objectStore.id, objectStore);
}
return db;
}
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
index d814093f0..85bac13b3 100755
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
@@ -75,6 +75,23 @@ void WebIDBObjectStoreImpl::putWithIndexKeys(const WebSerializedScriptValue& val
m_objectStore->putWithIndexKeys(value, key, static_cast<IDBObjectStoreBackendInterface::PutMode>(putMode), IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), indexNames, indexKeys, ec);
}
+void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, PutMode putMode, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, const WebVector<long long>& webIndexIds, const WebVector<WebIndexKeys>& webIndexKeys)
+{
+ ASSERT(webIndexIds.size() == webIndexKeys.size());
+ Vector<int64_t> indexIds(webIndexIds.size());
+ Vector<IDBObjectStoreBackendInterface::IndexKeys> indexKeys(webIndexKeys.size());
+
+ for (size_t i = 0; i < webIndexIds.size(); ++i) {
+ indexIds[i] = webIndexIds[i];
+ Vector<RefPtr<IDBKey> > indexKeyList(webIndexKeys[i].size());
+ for (size_t j = 0; j < webIndexKeys[i].size(); ++j)
+ indexKeyList[j] = webIndexKeys[i][j];
+ indexKeys[i] = indexKeyList;
+ }
+
+ m_objectStore->put(value, key, static_cast<IDBObjectStoreBackendInterface::PutMode>(putMode), IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), indexIds, indexKeys);
+}
+
void WebIDBObjectStoreImpl::setIndexKeys(const WebIDBKey& primaryKey, const WebVector<WebString>& webIndexNames, const WebVector<WebIndexKeys>& webIndexKeys, const WebIDBTransaction& transaction)
{
ASSERT(webIndexNames.size() == webIndexKeys.size());
@@ -91,6 +108,22 @@ void WebIDBObjectStoreImpl::setIndexKeys(const WebIDBKey& primaryKey, const WebV
m_objectStore->setIndexKeys(primaryKey, indexNames, indexKeys, transaction.getIDBTransactionBackendInterface());
}
+void WebIDBObjectStoreImpl::setIndexKeys(const WebIDBKey& primaryKey, const WebVector<long long>& webIndexIds, const WebVector<WebIndexKeys>& webIndexKeys, const WebIDBTransaction& transaction)
+{
+ ASSERT(webIndexIds.size() == webIndexKeys.size());
+ Vector<int64_t> indexIds(webIndexIds.size());
+ Vector<IDBObjectStoreBackendInterface::IndexKeys> indexKeys(webIndexKeys.size());
+
+ for (size_t i = 0; i < webIndexIds.size(); ++i) {
+ indexIds[i] = webIndexIds[i];
+ Vector<RefPtr<IDBKey> > indexKeyList(webIndexKeys[i].size());
+ for (size_t j = 0; j < webIndexKeys[i].size(); ++j)
+ indexKeyList[j] = webIndexKeys[i][j];
+ indexKeys[i] = indexKeyList;
+ }
+ m_objectStore->setIndexKeys(primaryKey, indexIds, indexKeys, transaction.getIDBTransactionBackendInterface());
+}
+
void WebIDBObjectStoreImpl::setIndexesReady(const WebVector<WebString>& webIndexNames, const WebIDBTransaction& transaction)
{
Vector<String> indexNames(webIndexNames.size());
@@ -99,6 +132,14 @@ void WebIDBObjectStoreImpl::setIndexesReady(const WebVector<WebString>& webIndex
m_objectStore->setIndexesReady(indexNames, transaction.getIDBTransactionBackendInterface());
}
+void WebIDBObjectStoreImpl::setIndexesReady(const WebVector<long long>& webIndexNames, const WebIDBTransaction& transaction)
+{
+ Vector<int64_t> indexIds(webIndexNames.size());
+ for (size_t i = 0; i < webIndexNames.size(); ++i)
+ indexIds[i] = webIndexNames[i];
+ m_objectStore->setIndexesReady(indexIds, transaction.getIDBTransactionBackendInterface());
+}
+
void WebIDBObjectStoreImpl::deleteFunction(const WebIDBKeyRange& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_objectStore->deleteFunction(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
@@ -125,11 +166,24 @@ WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name, WebExceptionCod
return new WebIDBIndexImpl(index);
}
+WebIDBIndex* WebIDBObjectStoreImpl::index(long long objectStoreId)
+{
+ RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(objectStoreId);
+ if (!index)
+ return 0;
+ return new WebIDBIndexImpl(index);
+}
+
void WebIDBObjectStoreImpl::deleteIndex(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_objectStore->deleteIndex(name, transaction.getIDBTransactionBackendInterface(), ec);
}
+void WebIDBObjectStoreImpl::deleteIndex(long long objectStoreId, const WebIDBTransaction& transaction, WebExceptionCode& ec)
+{
+ m_objectStore->deleteIndex(objectStoreId, transaction.getIDBTransactionBackendInterface(), ec);
+}
+
void WebIDBObjectStoreImpl::openCursor(const WebIDBKeyRange& keyRange, WebIDBCursor::Direction direction, WebIDBCallbacks* callbacks, WebIDBTransaction::TaskType taskType, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
m_objectStore->openCursor(keyRange, static_cast<IDBCursor::Direction>(direction), IDBCallbacksProxy::create(adoptPtr(callbacks)), static_cast<IDBTransactionBackendInterface::TaskType>(taskType), transaction.getIDBTransactionBackendInterface(), ec);
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
index 7e9ed2573..5de3c9a15 100644
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
@@ -47,14 +47,19 @@ public:
void get(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void putWithIndexKeys(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, const WebVector<WebString>&, const WebVector<WebIndexKeys>&, WebExceptionCode&);
+ void put(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, const WebVector<long long>&, const WebVector<WebIndexKeys>&);
void setIndexKeys(const WebIDBKey&, const WebVector<WebString>& indexNames, const WebVector<WebIndexKeys>&, const WebIDBTransaction&);
+ void setIndexKeys(const WebIDBKey&, const WebVector<long long>& indexNames, const WebVector<WebIndexKeys>&, const WebIDBTransaction&);
void setIndexesReady(const WebVector<WebString>&, const WebIDBTransaction&);
+ void setIndexesReady(const WebVector<long long>&, const WebIDBTransaction&);
void deleteFunction(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void clear(WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
WebIDBIndex* createIndex(long long, const WebString& name, const WebIDBKeyPath&, bool unique, bool multiEntry, const WebIDBTransaction&, WebExceptionCode&);
WebIDBIndex* index(const WebString& name, WebExceptionCode&);
+ WebIDBIndex* index(long long);
void deleteIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
+ void deleteIndex(long long, const WebIDBTransaction&, WebExceptionCode&);
void openCursor(const WebIDBKeyRange&, WebIDBCursor::Direction, WebIDBCallbacks*, WebIDBTransaction::TaskType, const WebIDBTransaction&, WebExceptionCode&);
void count(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
diff --git a/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp b/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
index 5cbbee663..6616d671f 100644
--- a/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
@@ -55,6 +55,14 @@ WebIDBObjectStore* WebIDBTransactionImpl::objectStore(const WebString& name, Exc
return new WebIDBObjectStoreImpl(objectStore);
}
+WebIDBObjectStore* WebIDBTransactionImpl::objectStore(long long indexId, ExceptionCode& ec)
+{
+ RefPtr<IDBObjectStoreBackendInterface> objectStore = m_backend->objectStore(indexId, ec);
+ if (!objectStore)
+ return 0;
+ return new WebIDBObjectStoreImpl(objectStore);
+}
+
void WebIDBTransactionImpl::commit()
{
m_backend->commit();
diff --git a/Source/WebKit/chromium/src/WebIDBTransactionImpl.h b/Source/WebKit/chromium/src/WebIDBTransactionImpl.h
index 66e315300..1ee6ab801 100644
--- a/Source/WebKit/chromium/src/WebIDBTransactionImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBTransactionImpl.h
@@ -39,9 +39,10 @@ namespace WebKit {
class WebIDBTransactionImpl: public WebIDBTransaction {
public:
WebIDBTransactionImpl(WTF::PassRefPtr<WebCore::IDBTransactionBackendInterface>);
- virtual ~WebIDBTransactionImpl();
+ virtual ~WebIDBTransactionImpl();
virtual WebIDBObjectStore* objectStore(const WebString& name, WebExceptionCode&);
+ virtual WebIDBObjectStore* objectStore(long long indexId, WebExceptionCode&);
virtual void commit();
virtual void abort();
virtual void didCompleteTaskEvents();
diff --git a/Source/WebKit/chromium/src/WebInputEventConversion.cpp b/Source/WebKit/chromium/src/WebInputEventConversion.cpp
index 0f4f6d5a8..8ff2e210d 100644
--- a/Source/WebKit/chromium/src/WebInputEventConversion.cpp
+++ b/Source/WebKit/chromium/src/WebInputEventConversion.cpp
@@ -171,6 +171,7 @@ PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W
break;
case WebInputEvent::GestureTwoFingerTap:
m_type = PlatformEvent::GestureTwoFingerTap;
+ m_area = IntSize(e.data.twoFingerTap.firstFingerWidth, e.data.twoFingerTap.firstFingerHeight);
break;
case WebInputEvent::GestureLongPress:
m_type = PlatformEvent::GestureLongPress;
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
index 078ae7e86..01cacda2a 100644
--- a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
@@ -44,6 +44,7 @@
#include "Settings.h"
#include "WebInputEventConversion.h"
#include "WebPagePopup.h"
+#include "WebViewClient.h"
#include "WebViewImpl.h"
#include "WebWidgetClient.h"
@@ -54,7 +55,7 @@ namespace WebKit {
#if ENABLE(PAGE_POPUP)
-class PagePopupChromeClient : public EmptyChromeClient {
+class PagePopupChromeClient : public EmptyChromeClient, public WebCore::PageClientChromium {
WTF_MAKE_NONCOPYABLE(PagePopupChromeClient);
WTF_MAKE_FAST_ALLOCATED;
@@ -124,6 +125,17 @@ private:
return FloatSize(0, 0);
}
+ virtual PlatformPageClient platformPageClient() const OVERRIDE
+ {
+ return PlatformPageClient(this);
+ }
+
+ // PageClientChromium methods:
+ virtual WebKit::WebScreenInfo screenInfo() OVERRIDE
+ {
+ return m_popup->m_webView->client()->screenInfo();
+ }
+
WebPagePopupImpl* m_popup;
};
diff --git a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 4e64c664b..9009ff9fa 100644
--- a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -657,4 +657,22 @@ bool WebRuntimeFeatures::isCSSExclusionsEnabled()
return RuntimeEnabledFeatures::cssExclusionsEnabled();
}
+void WebRuntimeFeatures::enableRequestAutocomplete(bool enable)
+{
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+ RuntimeEnabledFeatures::setRequestAutocompleteEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isRequestAutocompleteEnabled()
+{
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+ return RuntimeEnabledFeatures::requestAutocompleteEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
index a667bedf5..b14cde32f 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -192,6 +192,11 @@ void WebSettingsImpl::setJavaScriptCanOpenWindowsAutomatically(bool canOpenWindo
m_settings->setJavaScriptCanOpenWindowsAutomatically(canOpenWindows);
}
+void WebSettingsImpl::setSupportsMultipleWindows(bool supportsMultipleWindows)
+{
+ m_settings->setSupportsMultipleWindows(supportsMultipleWindows);
+}
+
void WebSettingsImpl::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
{
m_settings->setLoadsImagesAutomatically(loadsImagesAutomatically);
@@ -636,6 +641,11 @@ void WebSettingsImpl::setShouldDisplayTextDescriptions(bool enabled)
#endif
}
+void WebSettingsImpl::setShouldRespectImageOrientation(bool enabled)
+{
+ m_settings->setShouldRespectImageOrientation(enabled);
+}
+
void WebSettingsImpl::setAcceleratedPaintingEnabled(bool enabled)
{
m_settings->setAcceleratedDrawingEnabled(enabled);
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h
index 74968c4f6..ff88bac61 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.h
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.h
@@ -136,12 +136,14 @@ public:
virtual void setShouldDisplaySubtitles(bool);
virtual void setShouldDisplayTextDescriptions(bool);
virtual void setShouldPrintBackgrounds(bool);
+ virtual void setShouldRespectImageOrientation(bool);
virtual void setShowDebugBorders(bool);
virtual void setShowFPSCounter(bool);
virtual void setShowPaintRects(bool);
virtual void setShowPlatformLayerTree(bool);
virtual void setShrinksStandaloneImagesToFit(bool);
virtual void setStandardFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
+ virtual void setSupportsMultipleWindows(bool);
virtual void setSyncXHRInDocumentsEnabled(bool);
virtual void setTextAreasAreResizable(bool);
virtual void setTextAutosizingEnabled(bool);
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 5277b7b34..3f83e4cbc 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -419,6 +419,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_rootLayer(0)
, m_rootGraphicsLayer(0)
, m_isAcceleratedCompositingActive(false)
+ , m_layerTreeViewCommitsDeferred(false)
, m_compositorCreationFailed(false)
, m_recreatingGraphicsContext(false)
, m_compositorSurfaceReady(false)
@@ -672,7 +673,7 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
// Queue a highlight animation, then hand off to regular handler.
#if OS(LINUX)
if (settingsImpl()->gestureTapHighlightEnabled())
- enableTouchHighlight(IntPoint(event.x, event.y));
+ enableTouchHighlight(event);
#endif
break;
case WebInputEvent::GestureTapCancel:
@@ -744,18 +745,7 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
break;
}
- case WebInputEvent::GestureTwoFingerTap: {
- if (!mainFrameImpl() || !mainFrameImpl()->frameView())
- break;
-
- m_page->contextMenuController()->clearContextMenu();
- m_contextMenuAllowed = true;
- PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
- eventSwallowed = mainFrameImpl()->frame()->eventHandler()->sendContextMenuEventForGesture(platformEvent);
- m_contextMenuAllowed = false;
-
- break;
- }
+ case WebInputEvent::GestureTwoFingerTap:
case WebInputEvent::GestureLongPress: {
if (!mainFrameImpl() || !mainFrameImpl()->frameView())
break;
@@ -1179,15 +1169,17 @@ void WebViewImpl::computeScaleAndScrollForHitRect(const WebRect& hitRect, AutoZo
scroll = clampOffsetAtScale(scroll, scale);
}
-static bool highlightConditions(Node* node)
+static bool invokesHandCursor(Node* node, bool shiftKey, Frame* frame)
{
- return node->supportsFocus()
- || node->hasEventListeners(eventNames().clickEvent)
- || node->hasEventListeners(eventNames().mousedownEvent)
- || node->hasEventListeners(eventNames().mouseupEvent);
+ if (!node || !node->renderer())
+ return false;
+
+ ECursor cursor = node->renderer()->style()->cursor();
+ return cursor == CURSOR_POINTER
+ || (cursor == CURSOR_AUTO && frame->eventHandler()->useHandCursor(node, node->isLink(), shiftKey));
}
-Node* WebViewImpl::bestTouchLinkNode(IntPoint touchEventLocation)
+Node* WebViewImpl::bestTouchLinkNode(const WebGestureEvent& touchEvent)
{
if (!m_page || !m_page->mainFrame())
return 0;
@@ -1196,27 +1188,23 @@ Node* WebViewImpl::bestTouchLinkNode(IntPoint touchEventLocation)
// FIXME: Should accept a search region from the caller instead of hard-coding the size.
IntSize touchEventSearchRegionSize(4, 2);
+ IntPoint touchEventLocation(touchEvent.x, touchEvent.y);
m_page->mainFrame()->eventHandler()->bestClickableNodeForTouchPoint(touchEventLocation, touchEventSearchRegionSize, touchEventLocation, bestTouchNode);
// bestClickableNodeForTouchPoint() doesn't always return a node that is a link, so let's try and find
// a link to highlight.
- while (bestTouchNode && !highlightConditions(bestTouchNode))
+ bool shiftKey = touchEvent.modifiers & WebGestureEvent::ShiftKey;
+ while (bestTouchNode && !invokesHandCursor(bestTouchNode, shiftKey, m_page->mainFrame()))
bestTouchNode = bestTouchNode->parentNode();
- // If the document/body have click handlers installed, we don't want to default to applying the highlight to the entire RenderView, or the
- // entire body.
- RenderObject* touchNodeRenderer = bestTouchNode ? bestTouchNode->renderer() : 0;
- if (bestTouchNode && (!touchNodeRenderer || touchNodeRenderer->isRenderView() || touchNodeRenderer->isBody()))
- return 0;
-
return bestTouchNode;
}
-void WebViewImpl::enableTouchHighlight(IntPoint touchEventLocation)
+void WebViewImpl::enableTouchHighlight(const WebGestureEvent& touchEvent)
{
// Always clear any existing highlight when this is invoked, even if we don't get a new target to highlight.
m_linkHighlight.clear();
- Node* touchNode = bestTouchLinkNode(touchEventLocation);
+ Node* touchNode = bestTouchLinkNode(touchEvent);
if (!touchNode || !touchNode->renderer() || !touchNode->renderer()->enclosingLayer())
return;
@@ -1448,9 +1436,6 @@ PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or
m_pagePopup->closePopup();
m_pagePopup = 0;
}
-
- if (Frame* frame = focusedWebCoreFrame())
- frame->selection()->setCaretVisible(false);
return m_pagePopup.get();
}
@@ -1463,9 +1448,6 @@ void WebViewImpl::closePagePopup(PagePopup* popup)
return;
m_pagePopup->closePopup();
m_pagePopup = 0;
-
- if (Frame* frame = focusedWebCoreFrame())
- frame->selection()->pageActivationChanged();
}
#endif
@@ -1771,6 +1753,20 @@ void WebViewImpl::layout()
m_linkHighlight->updateGeometry();
}
+void WebViewImpl::enterForceCompositingMode(bool enter)
+{
+ TRACE_EVENT1("webkit", "WebViewImpl::enterForceCompositingMode", "enter", enter);
+ settingsImpl()->setForceCompositingMode(enter);
+ if (enter) {
+ if (!m_page)
+ return;
+ Frame* mainFrame = m_page->mainFrame();
+ if (!mainFrame)
+ return;
+ mainFrame->view()->updateCompositingLayersAfterStyleChange();
+ }
+}
+
#if USE(ACCELERATED_COMPOSITING)
void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect)
{
@@ -1780,6 +1776,14 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect
target.setConfig(SkBitmap::kARGB_8888_Config, rect.width(), rect.height(), rect.width() * 4);
target.allocPixels();
m_layerTreeView->compositeAndReadback(target.getPixels(), rect);
+#if (!SK_R32_SHIFT && SK_B32_SHIFT == 16)
+ // The compositor readback always gives back pixels in BGRA order, but for
+ // example Android's Skia uses RGBA ordering so the red and blue channels
+ // need to be swapped.
+ uint8_t* pixels = reinterpret_cast<uint8_t*>(target.getPixels());
+ for (size_t i = 0; i < target.getSize(); i += 4)
+ std::swap(pixels[i], pixels[i + 2]);
+#endif
canvas->writePixels(target, rect.x(), rect.y());
}
#endif
@@ -1825,6 +1829,14 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOptions opt
}
}
+bool WebViewImpl::isTrackingRepaints() const
+{
+ if (!page())
+ return false;
+ FrameView* view = page()->mainFrame()->view();
+ return view->isTrackingRepaints();
+}
+
void WebViewImpl::themeChanged()
{
if (!page())
@@ -1988,7 +2000,29 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
return true;
}
- bool handled = PageWidgetDelegate::handleInputEvent(m_page.get(), *this, inputEvent);
+ if (!m_layerTreeView)
+ return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, inputEvent);
+
+ const WebInputEvent* inputEventTransformed = &inputEvent;
+ WebMouseEvent mouseEvent;
+ WebGestureEvent gestureEvent;
+ if (WebInputEvent::isMouseEventType(inputEvent.type)) {
+ mouseEvent = *static_cast<const WebMouseEvent*>(&inputEvent);
+
+ IntPoint transformedLocation = roundedIntPoint(m_layerTreeView->adjustEventPointForPinchZoom(WebFloatPoint(mouseEvent.x, mouseEvent.y)));
+ mouseEvent.x = transformedLocation.x();
+ mouseEvent.y = transformedLocation.y();
+ inputEventTransformed = static_cast<const WebInputEvent*>(&mouseEvent);
+ } else if (WebInputEvent::isGestureEventType(inputEvent.type)) {
+ gestureEvent = *static_cast<const WebGestureEvent*>(&inputEvent);
+
+ IntPoint transformedLocation = roundedIntPoint(m_layerTreeView->adjustEventPointForPinchZoom(WebFloatPoint(gestureEvent.x, gestureEvent.y)));
+ gestureEvent.x = transformedLocation.x();
+ gestureEvent.y = transformedLocation.y();
+ inputEventTransformed = static_cast<const WebInputEvent*>(&gestureEvent);
+ }
+
+ bool handled = PageWidgetDelegate::handleInputEvent(m_page.get(), *this, *inputEventTransformed);
return handled;
}
@@ -3117,6 +3151,11 @@ void WebViewImpl::performPluginAction(const WebPluginAction& action,
}
}
+WebHitTestResult WebViewImpl::hitTestResultAt(const WebPoint& point)
+{
+ return hitTestResultForWindowPos(point);
+}
+
void WebViewImpl::copyImageAt(const WebPoint& point)
{
if (!m_page)
@@ -3819,17 +3858,26 @@ void WebViewImpl::scrollRootLayerRect(const IntSize&, const IntRect&)
updateLayerTreeViewport();
}
-void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
+void WebViewImpl::invalidateRect(const IntRect& rect)
{
- ASSERT(m_layerTreeView);
+ if (m_layerTreeViewCommitsDeferred) {
+ // If we receive an invalidation from WebKit while in deferred commit mode,
+ // that means it's time to start producing frames again so un-defer.
+ m_layerTreeView->setDeferCommits(false);
+ m_layerTreeViewCommitsDeferred = false;
+ }
+ if (m_isAcceleratedCompositingActive) {
+ ASSERT(m_layerTreeView);
- if (!page())
- return;
+ if (!page())
+ return;
- FrameView* view = page()->mainFrame()->view();
- IntRect dirtyRect = view->windowToContents(rect);
- updateLayerTreeViewport();
- m_nonCompositedContentHost->invalidateRect(dirtyRect);
+ FrameView* view = page()->mainFrame()->view();
+ IntRect dirtyRect = view->windowToContents(rect);
+ updateLayerTreeViewport();
+ m_nonCompositedContentHost->invalidateRect(dirtyRect);
+ } else if (m_client)
+ m_client->didInvalidateRect(rect);
}
NonCompositedContentHost* WebViewImpl::nonCompositedContentHost()
@@ -3896,6 +3944,15 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
if (m_layerTreeView && !page()->settings()->forceCompositingMode())
m_layerTreeView->finishAllRendering();
m_client->didDeactivateCompositor();
+ if (!m_layerTreeViewCommitsDeferred
+ && WebKit::Platform::current()->compositorSupport()->isThreadingEnabled()) {
+ ASSERT(m_layerTreeView);
+ // In threaded compositing mode, force compositing mode is always on so setIsAcceleratedCompositingActive(false)
+ // means that we're transitioning to a new page. Suppress commits until WebKit generates invalidations so
+ // we don't attempt to paint too early in the next page load.
+ m_layerTreeView->setDeferCommits(true);
+ m_layerTreeViewCommitsDeferred = true;
+ }
} else if (m_layerTreeView) {
m_isAcceleratedCompositingActive = true;
updateLayerTreeViewport();
@@ -3946,7 +4003,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
WebRect asciiToRectTable[128];
int fontHeight;
SkBitmap bitmap = WebCore::CompositorHUDFontAtlas::generateFontAtlas(asciiToRectTable, fontHeight);
- m_layerTreeView->setFontAtlas(bitmap, asciiToRectTable, fontHeight);
+ m_layerTreeView->setFontAtlas(asciiToRectTable, bitmap, fontHeight);
}
} else {
m_nonCompositedContentHost.clear();
@@ -4105,7 +4162,7 @@ void WebViewImpl::didRecreateOutputSurface(bool success)
void WebViewImpl::scheduleComposite()
{
if (m_suppressInvalidations) {
- TRACE_EVENT0("webkit", "WebViewImpl invalidations suppressed");
+ TRACE_EVENT_INSTANT0("webkit", "WebViewImpl invalidations suppressed");
return;
}
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index 439e0e6b1..02a1e5370 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -145,7 +145,9 @@ public:
virtual void setCompositorSurfaceReady();
virtual void animate(double);
virtual void layout(); // Also implements WebLayerTreeViewClient::layout()
+ virtual void enterForceCompositingMode(bool enable) OVERRIDE;
virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCompositorIfAvailable);
+ virtual bool isTrackingRepaints() const OVERRIDE;
virtual void themeChanged();
virtual void composite(bool finish);
virtual void setNeedsRedraw();
@@ -247,6 +249,7 @@ public:
virtual void performPluginAction(
const WebPluginAction&,
const WebPoint&);
+ virtual WebHitTestResult hitTestResultAt(const WebPoint&);
virtual void copyImageAt(const WebPoint& point);
virtual void dragSourceEndedAt(
const WebPoint& clientPoint,
@@ -326,6 +329,7 @@ public:
// WebViewImpl
void suppressInvalidations(bool enable);
+ void invalidateRect(const WebCore::IntRect&);
void setIgnoreInputEvents(bool newValue);
WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get(); }
@@ -531,7 +535,6 @@ public:
void setRootGraphicsLayer(WebCore::GraphicsLayer*);
void scheduleCompositingLayerSync();
void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& clipRect);
- void invalidateRootLayerRect(const WebCore::IntRect&);
void paintRootLayer(WebCore::GraphicsContext&, const WebCore::IntRect& contentRect);
NonCompositedContentHost* nonCompositedContentHost();
void setBackgroundColor(const WebCore::Color&);
@@ -564,8 +567,8 @@ public:
#if ENABLE(GESTURE_EVENTS)
void computeScaleAndScrollForHitRect(const WebRect& hitRect, AutoZoomType, float& scale, WebPoint& scroll, bool& isAnchor);
- WebCore::Node* bestTouchLinkNode(WebCore::IntPoint touchEventLocation);
- void enableTouchHighlight(WebCore::IntPoint touchEventLocation);
+ WebCore::Node* bestTouchLinkNode(const WebGestureEvent& touchEvent);
+ void enableTouchHighlight(const WebGestureEvent& touchEvent);
#endif
void animateZoomAroundPoint(const WebCore::IntPoint&, AutoZoomType);
@@ -836,6 +839,7 @@ private:
WebLayer* m_rootLayer;
WebCore::GraphicsLayer* m_rootGraphicsLayer;
bool m_isAcceleratedCompositingActive;
+ bool m_layerTreeViewCommitsDeferred;
bool m_compositorCreationFailed;
// If true, the graphics context is being restored.
bool m_recreatingGraphicsContext;
diff --git a/Source/WebKit/chromium/src/js/devTools.css b/Source/WebKit/chromium/src/js/devTools.css
index c7aa9420d..d549de03e 100644
--- a/Source/WebKit/chromium/src/js/devTools.css
+++ b/Source/WebKit/chromium/src/js/devTools.css
@@ -11,6 +11,22 @@ body.compact #toolbar {
/* Chrome theme overrides */
+body.compact.platform-mac #toolbar {
+ /* Match Chrome's toolbar. */
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(230, 229, 229)), to(rgb(206, 207, 207))) !important;
+ border-top-color: white;
+ border-bottom-color: rgb(122, 122, 122);
+}
+
+body.compact.platform-mac.inactive #toolbar {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(235, 235, 235)), to(rgb(216, 216, 216))) !important;
+ border-bottom-color: rgb(142, 142, 142);
+}
+
+body.platform-mac.inactive #toolbar .toolbar-label {
+ opacity: 0.8;
+}
+
body.platform-windows #toolbar, body.platform-windows.inactive #toolbar {
background-image: none;
}
diff --git a/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm b/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm
index 4854ae218..0f93ce661 100644
--- a/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm
+++ b/Source/WebKit/chromium/src/mac/WebInputEventFactory.mm
@@ -169,7 +169,7 @@ static int windowsKeyCodeForKeyEvent(NSEvent* event)
// 2. Keys for which there is no known Mac virtual key codes, like PrintScreen.
// 3. Certain punctuation keys. On Windows, these are also remapped depending on current keyboard layout,
// but see comment in windowsKeyCodeForCharCode().
- if ([event type] == NSKeyDown || [event type] == NSKeyUp) {
+ if (!isKeypadEvent(event) && ([event type] == NSKeyDown || [event type] == NSKeyUp)) {
// Cmd switches Roman letters for Dvorak-QWERTY layout, so try modified characters first.
NSString* s = [event characters];
code = [s length] > 0 ? WebCore::windowsKeyCodeForCharCode([s characterAtIndex:0]) : 0;