summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium')
-rw-r--r--Source/WebKit/chromium/ChangeLog166
-rw-r--r--Source/WebKit/chromium/DEPS2
-rw-r--r--Source/WebKit/chromium/features.gypi1
-rw-r--r--Source/WebKit/chromium/public/WebPluginContainer.h3
-rw-r--r--Source/WebKit/chromium/public/WebRuntimeFeatures.h3
-rw-r--r--Source/WebKit/chromium/public/WebSettings.h4
-rw-r--r--Source/WebKit/chromium/public/WebSpeechRecognizerClient.h9
-rw-r--r--Source/WebKit/chromium/skia_webkit.gyp4
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.cpp6
-rw-r--r--Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp15
-rw-r--r--Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h1
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.cpp7
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebRuntimeFeatures.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.h1
-rw-r--r--Source/WebKit/chromium/tests/IDBFakeBackingStore.h6
-rw-r--r--Source/WebKit/chromium/tests/LevelDBTest.cpp16
-rw-r--r--Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp277
20 files changed, 517 insertions, 25 deletions
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 293f6f11b..e597d313f 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,169 @@
+2012-11-29 Tommy Widenflycht <tommyw@google.com>
+
+ Speech Recognition API: Update SpeechRecognitionEvent to match the specification
+ https://bugs.webkit.org/show_bug.cgi?id=103407
+
+ Reviewed by Adam Barth.
+
+ Adding the new didReceiveResults method.
+
+ * public/WebSpeechRecognizerClient.h:
+ * src/SpeechRecognitionClientProxy.cpp:
+ (WebKit::SpeechRecognitionClientProxy::didReceiveResults):
+ (WebKit):
+ * src/SpeechRecognitionClientProxy.h:
+ (SpeechRecognitionClientProxy):
+
+2012-11-30 Keishi Hattori <keishi@webkit.org>
+
+ [Chromium] Page popup doesn't change mouse cursor
+ https://bugs.webkit.org/show_bug.cgi?id=97454
+
+ Reviewed by Kent Tamura.
+
+ The mouse cursor should change based on the page popup content and not the main window content.
+ On Mac the mousemove event propagates to both the page popup and main window causing the cursor to flicker.
+ The change to ChromeClientImpl stops that.
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::setCursor): On Mac, don't update the mouse cursor if a popup is open.
+ * src/WebPagePopupImpl.cpp: Implement setCursor so the mouse cursor gets set based on the page popup content.
+
+2012-11-30 Mihai Maerean <mmaerean@adobe.com>
+
+ [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=101192
+
+ Reviewed by Hajime Morita.
+
+ Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
+
+ Tests: No new tests because there is no functional change.
+
+ * public/WebRuntimeFeatures.h:
+ (WebRuntimeFeatures):
+ * public/WebSettings.h: moved setExperimentalCSSRegionsEnabled to the bottom of the interface and made it a
+ no-op. After this patch lands and Chromium's webkit_rev is increased, we'll remove any callers in Chromium. Once
+ the Chromium callers are gone and WebKit's chromium_rev is increased, we'll remove the deprecated API.
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableCSSRegions):
+ (WebKit):
+ (WebKit::WebRuntimeFeatures::isCSSRegionsEnabled):
+ * src/WebSettingsImpl.cpp:
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+
+2012-11-29 Rafael Weinstein <rafaelw@chromium.org>
+
+ [HTMLTemplateElement] Add feature flag
+ https://bugs.webkit.org/show_bug.cgi?id=103694
+
+ Reviewed by Adam Barth.
+
+ This flag will guard the implementation of the HTMLTemplateElement.
+ http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
+
+
+ * features.gypi:
+
+2012-11-29 David Grogan <dgrogan@chromium.org>
+
+ IndexedDB: Propagate more leveldb errors to script
+ https://bugs.webkit.org/show_bug.cgi?id=103580
+
+ Reviewed by Tony Chang.
+
+ * tests/IDBFakeBackingStore.h:
+ Update method signatures.
+
+2012-11-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r136171.
+ http://trac.webkit.org/changeset/136171
+ https://bugs.webkit.org/show_bug.cgi?id=103695
+
+ Likely caused ReOpenedWithID and ReOpenedWithURL to fail in
+ linux/chromeos (Requested by zhenyao on #webkit).
+
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::startMainThreadMonitoring):
+ (WebKit):
+ (WebKit::InspectorClientImpl::stopMainThreadMonitoring):
+ (WebKit::InspectorClientImpl::willProcessTask):
+ (WebKit::InspectorClientImpl::didProcessTask):
+ * src/InspectorClientImpl.h:
+ (InspectorClientImpl):
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::attach):
+ (WebKit::WebDevToolsAgentImpl::detach):
+ * src/WebDevToolsAgentImpl.h:
+ (WebDevToolsAgentImpl):
+
+2012-11-29 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Remove deprecated API since it is no longer used
+ https://bugs.webkit.org/show_bug.cgi?id=103570
+
+ Reviewed by Adam Barth.
+
+ Remove WebPluginContainer::setIsAcceptingTouchEvents, since this is not used anymore,
+ in favour of WebPluginContainer::requestTouchEventType.
+
+ * public/WebPluginContainer.h:
+ (WebPluginContainer):
+ * src/WebPluginContainerImpl.cpp:
+ * src/WebPluginContainerImpl.h:
+ (WebPluginContainerImpl):
+
+2012-11-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-11-29 Eugene Klyuchnikov <eustas@chromium.org>
+
+ Web Inspector: Make main-thread monitoring go through InspectorController.
+ https://bugs.webkit.org/show_bug.cgi?id=103550
+
+ Reviewed by Pavel Feldman.
+
+ InspectorInstrumentation was a wrong path
+
+ * src/InspectorClientImpl.cpp: Remove TaskObserver implementation, and
+ listen/unlisten methods.
+ * src/InspectorClientImpl.h: Ditto.
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::attach):
+ Subscribe for main thread activity events.
+ (WebKit::WebDevToolsAgentImpl::detach):
+ Unsubscribe for main thread activity events.
+ (WebKit::WebDevToolsAgentImpl::willProcessTask): Implement TaskObserver
+ interface. Froward to InspectorController.
+ (WebKit::WebDevToolsAgentImpl::didProcessTask): Ditto.
+ * src/WebDevToolsAgentImpl.h: Implement TaskObserver interface.
+
+2012-11-29 Stephen Chenney <schenney@chromium.org>
+
+ [Chromium] Add code supppression flags for skia
+
+ Unreviewed addition of Skia build flags to allow for their removal from Chromium's skia.gyp.
+
+ * skia_webkit.gyp: Added defines for SK_DISABLE_DITHER_32BIT_GRADIENT and SK_DISABLE_DASHING_OPTIMIZATION
+
+2012-11-29 Florin Malita <fmalita@chromium.org>
+
+ [Skia] Add missing OpaqueRegionSkia notifier calls
+ https://bugs.webkit.org/show_bug.cgi?id=102824
+
+ Reviewed by Stephen White.
+
+ Add opaque region tracking unit tests for the new PlatformContextSkia draw methods.
+
+ * tests/PlatformContextSkiaTest.cpp:
+ (WebCore::TEST):
+ (WebCore):
+
2012-11-29 Miguel Garcia <miguelg@chromium.org>
Fix typo in description of openDateTimeChooser documentation
diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS
index c04782eb3..ec58d99bf 100644
--- a/Source/WebKit/chromium/DEPS
+++ b/Source/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '169895'
+ 'chromium_rev': '170244'
}
deps = {
diff --git a/Source/WebKit/chromium/features.gypi b/Source/WebKit/chromium/features.gypi
index a7bf6367a..621d4ce95 100644
--- a/Source/WebKit/chromium/features.gypi
+++ b/Source/WebKit/chromium/features.gypi
@@ -109,6 +109,7 @@
'ENABLE_STYLE_SCOPED=1',
'ENABLE_SVG=<(enable_svg)',
'ENABLE_SVG_FONTS=<(enable_svg)',
+ 'ENABLE_TEMPLATE_ELEMENT=0',
'ENABLE_TEXT_AUTOSIZING=1',
'ENABLE_TOUCH_ADJUSTMENT=1',
'ENABLE_TOUCH_EVENTS=<(enable_touch_events)',
diff --git a/Source/WebKit/chromium/public/WebPluginContainer.h b/Source/WebKit/chromium/public/WebPluginContainer.h
index aad631f67..ce72cc591 100644
--- a/Source/WebKit/chromium/public/WebPluginContainer.h
+++ b/Source/WebKit/chromium/public/WebPluginContainer.h
@@ -117,9 +117,6 @@ public:
// content. The rectangle is in the plugin's coordinate system.
virtual bool isRectTopmost(const WebRect&) = 0;
- // Notifies when the plugin starts/stops accepting touch events. This is deprecated, use requestTouchEventType instead.
- virtual void setIsAcceptingTouchEvents(bool) = 0;
-
// Notifies when the plugin changes the kind of touch-events it accepts.
virtual void requestTouchEventType(TouchEventRequestType) = 0;
diff --git a/Source/WebKit/chromium/public/WebRuntimeFeatures.h b/Source/WebKit/chromium/public/WebRuntimeFeatures.h
index 2f6ef1ce4..c916c1214 100644
--- a/Source/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/Source/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -157,6 +157,9 @@ public:
WEBKIT_EXPORT static void enableRequestAutocomplete(bool);
WEBKIT_EXPORT static bool isRequestAutocompleteEnabled();
+ WEBKIT_EXPORT static void enableCSSRegions(bool);
+ WEBKIT_EXPORT static bool isCSSRegionsEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/Source/WebKit/chromium/public/WebSettings.h b/Source/WebKit/chromium/public/WebSettings.h
index 4c9d0cc64..260036421 100644
--- a/Source/WebKit/chromium/public/WebSettings.h
+++ b/Source/WebKit/chromium/public/WebSettings.h
@@ -101,7 +101,6 @@ public:
virtual void setExperimentalCSSCustomFilterEnabled(bool) = 0;
virtual void setExperimentalCSSGridLayoutEnabled(bool) = 0;
virtual void setCSSStickyPositionEnabled(bool) = 0;
- virtual void setExperimentalCSSRegionsEnabled(bool) = 0;
virtual void setExperimentalCSSVariablesEnabled(bool) = 0;
virtual void setExperimentalWebGLEnabled(bool) = 0;
virtual void setFantasyFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
@@ -174,6 +173,9 @@ public:
// DEPRECATED (renamed. remove this after all call sites changed to the new name)
void setApplyDefaultDeviceScaleFactorInCompositor(bool enabled) { setApplyDeviceScaleFactorInCompositor(enabled); }
+ // DEPRECATED
+ void setExperimentalCSSRegionsEnabled(bool) { }
+
protected:
~WebSettings() { }
};
diff --git a/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h b/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h
index ebdc0c173..056c4d358 100644
--- a/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h
+++ b/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h
@@ -68,8 +68,17 @@ public:
virtual void didEndAudio(const WebSpeechRecognitionHandle&) = 0;
// To be called when the speech recognizer returns a result.
+ // FIXME: Remove this when we have moved over to only use the function below.
virtual void didReceiveResult(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&, unsigned long resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) = 0;
+ // To be called when the speech recognizer provides new results.
+ // - newFinalResults contains zero or more final results that are new since
+ // the last time the functions was called.
+ // - currentInterimResults contains zero or more inteirm results that
+ // replace the interim results that were reported the last time this
+ // function was called.
+ virtual void didReceiveResults(const WebSpeechRecognitionHandle&, const WebVector<WebSpeechRecognitionResult>& newFinalResults, const WebVector<WebSpeechRecognitionResult>& currentInterimResults) = 0;
+
// To be called when the speech recognizer returns a final result with no
// recognizion hypothesis.
virtual void didReceiveNoMatch(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&) = 0;
diff --git a/Source/WebKit/chromium/skia_webkit.gyp b/Source/WebKit/chromium/skia_webkit.gyp
index 0ecb0efb0..49e44d045 100644
--- a/Source/WebKit/chromium/skia_webkit.gyp
+++ b/Source/WebKit/chromium/skia_webkit.gyp
@@ -39,6 +39,10 @@
'defines': [
# Place defines here that require significant WebKit rebaselining, or that
# are otherwise best removed in WebKit and then rolled into Chromium.
+ # Defines should be in single quotes and a comma must appear after every one.
+ 'SK_DISABLE_DITHER_32BIT_GRADIENT',
+
+ 'SK_DISABLE_DASHING_OPTIMIZATION',
],
},
},
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
index e617e8f5a..4215ad700 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -825,6 +825,12 @@ void ChromeClientImpl::setCursorHiddenUntilMouseMoves(bool)
void ChromeClientImpl::setCursor(const WebCursorInfo& cursor)
{
+#if OS(DARWIN)
+ // On Mac the mousemove event propagates to both the popup and main window.
+ // If a popup is open we don't want the main window to change the cursor.
+ if (m_webView->hasOpenedPopup())
+ return;
+#endif
if (m_webView->client())
m_webView->client()->didChangeCursor(cursor);
}
diff --git a/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp b/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp
index 082747cdb..f7485ed9b 100644
--- a/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp
+++ b/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp
@@ -113,6 +113,21 @@ void SpeechRecognitionClientProxy::didReceiveResult(const WebSpeechRecognitionHa
}
+void SpeechRecognitionClientProxy::didReceiveResults(const WebSpeechRecognitionHandle& handle, const WebVector<WebSpeechRecognitionResult>& newFinalResults, const WebVector<WebSpeechRecognitionResult>& currentInterimResults)
+{
+ RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+
+ Vector<RefPtr<SpeechRecognitionResult> > finalResultsVector(newFinalResults.size());
+ for (size_t i = 0; i < newFinalResults.size(); ++i)
+ finalResultsVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(newFinalResults[i]);
+
+ Vector<RefPtr<SpeechRecognitionResult> > interimResultsVector(currentInterimResults.size());
+ for (size_t i = 0; i < currentInterimResults.size(); ++i)
+ interimResultsVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(currentInterimResults[i]);
+
+ recognition->didReceiveResults(finalResultsVector, interimResultsVector);
+}
+
void SpeechRecognitionClientProxy::didReceiveNoMatch(const WebSpeechRecognitionHandle& handle, const WebSpeechRecognitionResult& result)
{
RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
diff --git a/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h b/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h
index 6194f6600..15958d4fb 100644
--- a/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h
+++ b/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h
@@ -56,6 +56,7 @@ public:
virtual void didEndSound(const WebSpeechRecognitionHandle&) OVERRIDE;
virtual void didEndAudio(const WebSpeechRecognitionHandle&) OVERRIDE;
virtual void didReceiveResult(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&, unsigned long resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) OVERRIDE;
+ virtual void didReceiveResults(const WebSpeechRecognitionHandle&, const WebVector<WebSpeechRecognitionResult>& newFinalResults, const WebVector<WebSpeechRecognitionResult>& currentInterimResults) OVERRIDE;
virtual void didReceiveNoMatch(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&) OVERRIDE;
virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, WebSpeechRecognizerClient::ErrorCode) OVERRIDE;
virtual void didStart(const WebSpeechRecognitionHandle&) OVERRIDE;
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
index 53882f9e7..c4b934aaa 100644
--- a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
@@ -42,6 +42,7 @@
#include "PagePopupClient.h"
#include "PageWidgetDelegate.h"
#include "Settings.h"
+#include "WebCursorInfo.h"
#include "WebInputEventConversion.h"
#include "WebPagePopup.h"
#include "WebSettingsImpl.h"
@@ -131,6 +132,12 @@ private:
return PlatformPageClient(this);
}
+ virtual void setCursor(const WebCore::Cursor& cursor) OVERRIDE
+ {
+ if (m_popup->m_webView->client())
+ m_popup->m_webView->client()->didChangeCursor(WebCursorInfo(cursor));
+ }
+
// PageClientChromium methods:
virtual WebKit::WebScreenInfo screenInfo() OVERRIDE
{
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 1059df748..12a9fb5e5 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -521,11 +521,6 @@ bool WebPluginContainerImpl::isRectTopmost(const WebRect& rect)
return (nodes.first().get() == m_element);
}
-void WebPluginContainerImpl::setIsAcceptingTouchEvents(bool acceptingTouchEvents)
-{
- requestTouchEventType(acceptingTouchEvents ? TouchEventRequestTypeRaw : TouchEventRequestTypeNone);
-}
-
void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType requestType)
{
if (m_touchEventRequestType == requestType)
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.h b/Source/WebKit/chromium/src/WebPluginContainerImpl.h
index 70293a822..54c796238 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.h
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.h
@@ -113,7 +113,6 @@ public:
virtual void zoomLevelChanged(double zoomLevel);
virtual void setOpaque(bool);
virtual bool isRectTopmost(const WebRect&);
- virtual void setIsAcceptingTouchEvents(bool);
virtual void requestTouchEventType(TouchEventRequestType);
virtual void setWantsWheelEvents(bool);
virtual WebPoint windowToLocalPoint(const WebPoint&);
diff --git a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
index a195de292..5600a425e 100644
--- a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -621,6 +621,16 @@ bool WebRuntimeFeatures::isCSSExclusionsEnabled()
return RuntimeEnabledFeatures::cssExclusionsEnabled();
}
+void WebRuntimeFeatures::enableCSSRegions(bool enable)
+{
+ RuntimeEnabledFeatures::setCSSRegionsEnabled(enable);
+}
+
+bool WebRuntimeFeatures::isCSSRegionsEnabled()
+{
+ return RuntimeEnabledFeatures::cssRegionsEnabled();
+}
+
void WebRuntimeFeatures::enableRequestAutocomplete(bool enable)
{
#if ENABLE(REQUEST_AUTOCOMPLETE)
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
index 6a33786ac..cef575414 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -371,11 +371,6 @@ void WebSettingsImpl::setCSSStickyPositionEnabled(bool enabled)
m_settings->setCSSStickyPositionEnabled(enabled);
}
-void WebSettingsImpl::setExperimentalCSSRegionsEnabled(bool enabled)
-{
- m_settings->setCSSRegionsEnabled(enabled);
-}
-
void WebSettingsImpl::setExperimentalCSSGridLayoutEnabled(bool enabled)
{
m_settings->setCSSGridLayoutEnabled(enabled);
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h
index ab92562fa..efa1bba9f 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.h
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.h
@@ -93,7 +93,6 @@ public:
virtual void setExperimentalCSSCustomFilterEnabled(bool);
virtual void setExperimentalCSSGridLayoutEnabled(bool);
virtual void setCSSStickyPositionEnabled(bool);
- virtual void setExperimentalCSSRegionsEnabled(bool);
virtual void setExperimentalCSSVariablesEnabled(bool);
virtual void setExperimentalWebGLEnabled(bool);
virtual void setFantasyFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
diff --git a/Source/WebKit/chromium/tests/IDBFakeBackingStore.h b/Source/WebKit/chromium/tests/IDBFakeBackingStore.h
index 346363ac3..7418ba36c 100644
--- a/Source/WebKit/chromium/tests/IDBFakeBackingStore.h
+++ b/Source/WebKit/chromium/tests/IDBFakeBackingStore.h
@@ -47,9 +47,9 @@ public:
virtual void putRecord(Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, const String& value, RecordIdentifier*) OVERRIDE { }
virtual void clearObjectStore(Transaction*, int64_t databaseId, int64_t objectStoreId) OVERRIDE { }
virtual void deleteRecord(Transaction*, int64_t databaseId, int64_t objectStoreId, const RecordIdentifier&) OVERRIDE { }
- virtual int64_t getKeyGeneratorCurrentNumber(Transaction*, int64_t databaseId, int64_t objectStoreId) OVERRIDE { return 0; }
- virtual void maybeUpdateKeyGeneratorCurrentNumber(Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t newNumber, bool checkCurrent) OVERRIDE { }
- virtual bool keyExistsInObjectStore(Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, RecordIdentifier* foundRecordIdentifier) OVERRIDE { return false; }
+ virtual bool getKeyGeneratorCurrentNumber(Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t& currentNumber) OVERRIDE { return true; }
+ virtual bool maybeUpdateKeyGeneratorCurrentNumber(Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t newNumber, bool checkCurrent) OVERRIDE { return true; }
+ virtual bool keyExistsInObjectStore(Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, RecordIdentifier* foundRecordIdentifier, bool& found) OVERRIDE { return true; }
virtual Vector<IDBIndexMetadata> getIndexes(int64_t databaseId, int64_t objectStoreId) OVERRIDE { return Vector<IDBIndexMetadata>(); }
virtual bool createIndex(Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath&, bool isUnique, bool isMultiEntry) OVERRIDE { return false; };
diff --git a/Source/WebKit/chromium/tests/LevelDBTest.cpp b/Source/WebKit/chromium/tests/LevelDBTest.cpp
index 7dc0355df..4b9caf8cf 100644
--- a/Source/WebKit/chromium/tests/LevelDBTest.cpp
+++ b/Source/WebKit/chromium/tests/LevelDBTest.cpp
@@ -79,8 +79,10 @@ TEST(LevelDBDatabaseTest, CorruptionTest)
leveldb = LevelDBDatabase::open(path, &comparator);
EXPECT_TRUE(leveldb);
- success = leveldb->get(key, gotValue);
+ bool found = false;
+ success = leveldb->safeGet(key, gotValue, found);
EXPECT_TRUE(success);
+ EXPECT_TRUE(found);
EXPECT_EQ(putValue, gotValue);
leveldb.release();
EXPECT_FALSE(leveldb);
@@ -98,8 +100,9 @@ TEST(LevelDBDatabaseTest, CorruptionTest)
leveldb = LevelDBDatabase::open(path, &comparator);
EXPECT_TRUE(leveldb);
- success = leveldb->get(key, gotValue);
- EXPECT_FALSE(success);
+ success = leveldb->safeGet(key, gotValue, found);
+ EXPECT_TRUE(success);
+ EXPECT_FALSE(found);
}
TEST(LevelDBDatabaseTest, Transaction)
@@ -129,8 +132,10 @@ TEST(LevelDBDatabaseTest, Transaction)
EXPECT_TRUE(success);
EXPECT_EQ(comparator.compare(gotValue, oldValue), 0);
- success = leveldb->get(key, gotValue);
+ bool found = false;
+ success = leveldb->safeGet(key, gotValue, found);
EXPECT_TRUE(success);
+ EXPECT_TRUE(found);
EXPECT_EQ(comparator.compare(gotValue, newValue), 0);
const Vector<char> addedKey = encodeString("added key");
@@ -138,8 +143,9 @@ TEST(LevelDBDatabaseTest, Transaction)
success = leveldb->put(addedKey, addedValue);
EXPECT_TRUE(success);
- success = leveldb->get(addedKey, gotValue);
+ success = leveldb->safeGet(addedKey, gotValue, found);
EXPECT_TRUE(success);
+ EXPECT_TRUE(found);
EXPECT_EQ(comparator.compare(gotValue, addedValue), 0);
success = transaction->get(addedKey, gotValue);
diff --git a/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp b/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp
index c73b6149a..529aa7f07 100644
--- a/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp
+++ b/Source/WebKit/chromium/tests/PlatformContextSkiaTest.cpp
@@ -664,6 +664,283 @@ TEST(PlatformContextSkiaTest, trackOpaqueOvalTest)
EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
}
+TEST(PlatformContextSkiaTest, trackOpaqueIRectTest)
+{
+ SkBitmap bitmap;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
+ bitmap.allocPixels();
+ bitmap.eraseColor(0);
+ SkCanvas canvas(bitmap);
+
+ PlatformContextSkia platformContext(&canvas);
+ platformContext.setTrackOpaqueRegion(true);
+ GraphicsContext context(&platformContext);
+
+ Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
+ Color alpha(0.0f, 0.0f, 0.0f, 0.0f);
+
+ SkPaint opaquePaint;
+ opaquePaint.setColor(opaque.rgb());
+ opaquePaint.setXfermodeMode(SkXfermode::kSrc_Mode);
+ SkPaint alphaPaint;
+ alphaPaint.setColor(alpha.rgb());
+ alphaPaint.setXfermodeMode(SkXfermode::kSrc_Mode);
+
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawIRect(SkIRect::MakeXYWH(10, 10, 90, 90), opaquePaint);
+ EXPECT_EQ_RECT(IntRect(10, 10, 90, 90), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawIRect(SkIRect::MakeXYWH(0, 0, 100, 10), alphaPaint);
+ EXPECT_EQ_RECT(IntRect(10, 10, 90, 90), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawIRect(SkIRect::MakeXYWH(0, 0, 100, 20), alphaPaint);
+ EXPECT_EQ_RECT(IntRect(10, 20, 90, 80), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawIRect(SkIRect::MakeXYWH(50, 0, 50, 100), alphaPaint);
+ EXPECT_EQ_RECT(IntRect(10, 20, 40, 80), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+}
+
+TEST(PlatformContextSkiaTest, trackOpaqueTextTest)
+{
+ SkBitmap bitmap;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
+ bitmap.allocPixels();
+ bitmap.eraseColor(0);
+ SkCanvas canvas(bitmap);
+
+ PlatformContextSkia platformContext(&canvas);
+ platformContext.setTrackOpaqueRegion(true);
+ GraphicsContext context(&platformContext);
+
+ Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
+ Color alpha(0.0f, 0.0f, 0.0f, 0.0f);
+
+ SkPaint opaquePaint;
+ opaquePaint.setColor(opaque.rgb());
+ opaquePaint.setXfermodeMode(SkXfermode::kSrc_Mode);
+ SkPaint alphaPaint;
+ alphaPaint.setColor(alpha.rgb());
+ alphaPaint.setXfermodeMode(SkXfermode::kSrc_Mode);
+
+ SkPoint point = SkPoint::Make(0, 0);
+ SkScalar pointX = 0;
+ SkPath path;
+ path.moveTo(SkPoint::Make(0, 0));
+ path.lineTo(SkPoint::Make(100, 0));
+
+ context.fillRect(FloatRect(50, 50, 50, 50), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawPosText("A", 1, &point, opaquePaint);
+ EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawPosText("A", 1, &point, alphaPaint);
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ context.fillRect(FloatRect(50, 50, 50, 50), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawPosTextH("A", 1, &pointX, 0, opaquePaint);
+ EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawPosTextH("A", 1, &pointX, 0, alphaPaint);
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ context.fillRect(FloatRect(50, 50, 50, 50), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawTextOnPath("A", 1, path, 0, opaquePaint);
+ EXPECT_EQ_RECT(IntRect(50, 50, 50, 50), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawTextOnPath("A", 1, path, 0, alphaPaint);
+ EXPECT_EQ_RECT(IntRect(0, 0, 0, 0), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+}
+
+TEST(PlatformContextSkiaTest, trackOpaqueWritePixelsTest)
+{
+ SkBitmap bitmap;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
+ bitmap.allocPixels();
+ bitmap.eraseColor(0);
+ SkCanvas canvas(bitmap);
+
+ PlatformContextSkia platformContext(&canvas);
+ platformContext.setTrackOpaqueRegion(true);
+ GraphicsContext context(&platformContext);
+
+ Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
+
+ SkBitmap opaqueBitmap;
+ opaqueBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
+ opaqueBitmap.allocPixels();
+ opaqueBitmap.setIsOpaque(true);
+ for (int y = 0; y < opaqueBitmap.height(); ++y)
+ for (int x = 0; x < opaqueBitmap.width(); ++x)
+ *opaqueBitmap.getAddr32(x, y) = 0xFFFFFFFF;
+
+ SkBitmap alphaBitmap;
+ alphaBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
+ alphaBitmap.allocPixels();
+ alphaBitmap.setIsOpaque(false);
+ for (int y = 0; y < alphaBitmap.height(); ++y)
+ for (int x = 0; x < alphaBitmap.width(); ++x)
+ *alphaBitmap.getAddr32(x, y) = 0x00000000;
+
+ SkPaint paint;
+ paint.setXfermodeMode(SkXfermode::kSrc_Mode);
+
+ platformContext.writePixels(opaqueBitmap, 50, 50);
+ EXPECT_EQ_RECT(IntRect(50, 50, 10, 10), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ context.fillRect(FloatRect(10, 10, 90, 90), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ EXPECT_EQ_RECT(IntRect(10, 10, 90, 90), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.writePixels(alphaBitmap, 10, 0);
+ EXPECT_EQ_RECT(IntRect(10, 10, 90, 90), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.writePixels(alphaBitmap, 10, 1);
+ EXPECT_EQ_RECT(IntRect(10, 11, 90, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.writePixels(alphaBitmap, 0, 10);
+ EXPECT_EQ_RECT(IntRect(10, 11, 90, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.writePixels(alphaBitmap, 1, 10);
+ EXPECT_EQ_RECT(IntRect(11, 11, 89, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+}
+
+TEST(PlatformContextSkiaTest, trackOpaqueDrawBitmapTest)
+{
+ SkBitmap bitmap;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
+ bitmap.allocPixels();
+ bitmap.eraseColor(0);
+ SkCanvas canvas(bitmap);
+
+ PlatformContextSkia platformContext(&canvas);
+ platformContext.setTrackOpaqueRegion(true);
+ GraphicsContext context(&platformContext);
+
+ Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
+
+ SkBitmap opaqueBitmap;
+ opaqueBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
+ opaqueBitmap.allocPixels();
+ opaqueBitmap.setIsOpaque(true);
+ for (int y = 0; y < opaqueBitmap.height(); ++y)
+ for (int x = 0; x < opaqueBitmap.width(); ++x)
+ *opaqueBitmap.getAddr32(x, y) = 0xFFFFFFFF;
+
+ SkBitmap alphaBitmap;
+ alphaBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
+ alphaBitmap.allocPixels();
+ alphaBitmap.setIsOpaque(false);
+ for (int y = 0; y < alphaBitmap.height(); ++y)
+ for (int x = 0; x < alphaBitmap.width(); ++x)
+ *alphaBitmap.getAddr32(x, y) = 0x00000000;
+
+ SkPaint paint;
+ paint.setXfermodeMode(SkXfermode::kSrc_Mode);
+
+ platformContext.drawBitmap(opaqueBitmap, 10, 10, &paint);
+ EXPECT_EQ_RECT(IntRect(10, 10, 10, 10), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ context.fillRect(FloatRect(10, 10, 90, 90), opaque, ColorSpaceDeviceRGB, CompositeSourceOver);
+ EXPECT_EQ_RECT(IntRect(10, 10, 90, 90), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawBitmap(alphaBitmap, 10, 0, &paint);
+ EXPECT_EQ_RECT(IntRect(10, 10, 90, 90), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawBitmap(alphaBitmap, 10, 1, &paint);
+ EXPECT_EQ_RECT(IntRect(10, 11, 90, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawBitmap(alphaBitmap, 0, 10, &paint);
+ EXPECT_EQ_RECT(IntRect(10, 11, 90, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawBitmap(alphaBitmap, 1, 10, &paint);
+ EXPECT_EQ_RECT(IntRect(11, 11, 89, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+}
+
+TEST(PlatformContextSkiaTest, trackOpaqueDrawBitmapRectTest)
+{
+ SkBitmap bitmap;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 200, 200);
+ bitmap.allocPixels();
+ bitmap.eraseColor(0);
+ SkCanvas canvas(bitmap);
+
+ PlatformContextSkia platformContext(&canvas);
+ platformContext.setTrackOpaqueRegion(true);
+ GraphicsContext context(&platformContext);
+
+ Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
+
+ SkBitmap opaqueBitmap;
+ opaqueBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
+ opaqueBitmap.allocPixels();
+ opaqueBitmap.setIsOpaque(true);
+ for (int y = 0; y < opaqueBitmap.height(); ++y)
+ for (int x = 0; x < opaqueBitmap.width(); ++x)
+ *opaqueBitmap.getAddr32(x, y) = 0xFFFFFFFF;
+
+ SkBitmap alphaBitmap;
+ alphaBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
+ alphaBitmap.allocPixels();
+ alphaBitmap.setIsOpaque(false);
+ for (int y = 0; y < alphaBitmap.height(); ++y)
+ for (int x = 0; x < alphaBitmap.width(); ++x)
+ *alphaBitmap.getAddr32(x, y) = 0x00000000;
+
+ SkPaint paint;
+ paint.setXfermodeMode(SkXfermode::kSrc_Mode);
+
+ platformContext.drawBitmapRect(opaqueBitmap, 0, SkRect::MakeXYWH(10, 10, 90, 90), &paint);
+ EXPECT_EQ_RECT(IntRect(10, 10, 90, 90), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawBitmapRect(alphaBitmap, 0, SkRect::MakeXYWH(10, 0, 10, 10), &paint);
+ EXPECT_EQ_RECT(IntRect(10, 10, 90, 90), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawBitmapRect(alphaBitmap, 0, SkRect::MakeXYWH(10, 0, 10, 11), &paint);
+ EXPECT_EQ_RECT(IntRect(10, 11, 90, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawBitmapRect(alphaBitmap, 0, SkRect::MakeXYWH(0, 10, 10, 10), &paint);
+ EXPECT_EQ_RECT(IntRect(10, 11, 90, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+
+ platformContext.drawBitmapRect(alphaBitmap, 0, SkRect::MakeXYWH(0, 10, 11, 10), &paint);
+ EXPECT_EQ_RECT(IntRect(11, 11, 89, 89), platformContext.opaqueRegion().asRect());
+ EXPECT_PIXELS_MATCH(bitmap, platformContext.opaqueRegion().asRect());
+}
+
TEST(PlatformContextSkiaTest, contextTransparencyLayerTest)
{
SkBitmap bitmap;