summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-22 15:40:17 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-22 15:40:17 +0200
commit43a42f108af6bcbd91f2672731c3047c26213af1 (patch)
tree7fa092e5f5d873c72f2486a70e26be26f7a38bec /Source/WebKit/chromium
parentd9cf437c840c6eb7417bdd97e6c40979255d3158 (diff)
downloadqtwebkit-43a42f108af6bcbd91f2672731c3047c26213af1.tar.gz
Imported WebKit commit 302e7806bff028bd1167a1ec7c86a1ee00ecfb49 (http://svn.webkit.org/repository/webkit/trunk@132067)
New snapshot that fixes build without QtWidgets
Diffstat (limited to 'Source/WebKit/chromium')
-rw-r--r--Source/WebKit/chromium/ChangeLog454
-rw-r--r--Source/WebKit/chromium/DEPS2
-rw-r--r--Source/WebKit/chromium/WebKit.gyp22
-rw-r--r--Source/WebKit/chromium/WebKit.gypi4
-rw-r--r--Source/WebKit/chromium/features.gypi3
-rw-r--r--Source/WebKit/chromium/public/WebDevToolsAgentClient.h8
-rw-r--r--Source/WebKit/chromium/public/WebInputEvent.h69
-rw-r--r--Source/WebKit/chromium/public/WebSettings.h2
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.cpp6
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.h1
-rw-r--r--Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp22
-rw-r--r--Source/WebKit/chromium/src/InspectorFrontendClientImpl.h4
-rw-r--r--Source/WebKit/chromium/src/LocalizedStrings.cpp7
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp24
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebKit.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.cpp9
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.cpp17
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.h5
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp11
-rw-r--r--Source/WebKit/chromium/tests/DeferredImageDecoderTest.cpp102
-rw-r--r--Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp1
-rw-r--r--Source/WebKit/chromium/tests/IDBFakeBackingStore.h2
-rw-r--r--Source/WebKit/chromium/tests/LocaleMacTest.cpp52
-rw-r--r--Source/WebKit/chromium/tests/LocaleWinTest.cpp29
-rw-r--r--Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp48
-rw-r--r--Source/WebKit/chromium/tests/MockImageDecoder.h61
29 files changed, 904 insertions, 67 deletions
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 1be153b8e..b2a38d2b7 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,457 @@
+2012-10-22 Keishi Hattori <keishi@webkit.org>
+
+ Remove monthFormatInLDML
+ https://bugs.webkit.org/show_bug.cgi?id=99971
+
+ Reviewed by Kent Tamura.
+
+ * src/LocalizedStrings.cpp:
+
+2012-10-22 Keishi Hattori <keishi@webkit.org>
+
+ [Chromium] Rename WeekFormatInLDML to WeekFormatTemplate
+ https://bugs.webkit.org/show_bug.cgi?id=99972
+
+ Reviewed by Kent Tamura.
+
+ * src/LocalizedStrings.cpp:
+ (WebCore::weekFormatInLDML):
+
+2012-10-22 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] Fix "ASSERTION FAILED: !document->inPageCache()" when loading a page
+ https://bugs.webkit.org/show_bug.cgi?id=98514
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::createFrameView):
+
+2012-10-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: merge "docked" state into the "dock side" enum.
+ https://bugs.webkit.org/show_bug.cgi?id=99717
+
+ Reviewed by Vsevolod Vlasov.
+
+ Otherwise, it is hard to manage these inter-dependent flags.
+
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::requestSetDockSide):
+ * src/InspectorFrontendClientImpl.h:
+ (InspectorFrontendClientImpl):
+
+2012-10-21 Kent Tamura <tkent@chromium.org>
+
+ Page popup: Fix crash by events after closing
+ https://bugs.webkit.org/show_bug.cgi?id=99951
+
+ Reviewed by Hajime Morita.
+
+ - We should not handle events after closePopup call.
+ - We should uninstall a DOMWindowPagePopup supplement in closePopup.
+
+ * src/WebPagePopupImpl.cpp:
+ (WebKit::WebPagePopupImpl::WebPagePopupImpl):
+ Initialize m_closing.
+ (WebKit::WebPagePopupImpl::handleGestureEvent):
+ Don't handle events if m_closing.
+ (WebKit::WebPagePopupImpl::handleInputEvent): Ditto.
+ (WebKit::WebPagePopupImpl::handleKeyEvent): Ditto.
+ (WebKit::WebPagePopupImpl::closePopup):
+ - Uninstall a DOMWindowPagePopup supplement.
+ - Set m_closing.
+ * src/WebPagePopupImpl.h:
+ (WebPagePopupImpl): Declare m_closing.
+
+2012-10-21 Terry Anderson <tdanderson@chromium.org>
+
+ [chromium] Storing the enclosing rect dimensions of the first finger for a two finger tap
+ https://bugs.webkit.org/show_bug.cgi?id=99763
+
+ Reviewed by Adam Barth.
+
+ Add a struct |twoFingerTap| inside the union |data| of a WebGestureEvent. The fields |firstFingerWidth|
+ and |firstFingerHeight| will represent the dimensions of the enclosing rectangle corresponding to the
+ first touch point in the gesture. These will be used in a future CL to perform target fuzzing on a
+ two-finger tap gesture.
+
+ Note: I chose not to name the two fields |width| and |height| so that they aren't confused with the
+ width and height of the gesture's bounding box, which contains the enclosing rectangles of both touch
+ points. My future fuzzing CL will only be concerned with the location and enclosing rectangle of the
+ first touch point.
+
+ * public/WebInputEvent.h:
+
+2012-10-19 Yusuf Ozuysal <yusufo@google.com>
+
+ [chromium] Double-tap defaults to zoom (should only do this on Android)
+ https://bugs.webkit.org/show_bug.cgi?id=99600
+
+ Reviewed by Adam Barth.
+
+ Adds a web setting for enabling DoubleTapToZoom on a doubleTap gesture.
+ This gesture was just needed for mobile, and the patch that implemented it caused regressions on other platforms.
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::WebSettingsImpl):
+ (WebKit::WebSettingsImpl::setDoubleTapToZoomEnabled):
+ (WebKit):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+ (WebKit::WebSettingsImpl::doubleTapToZoomEnabled):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleGestureEvent):
+ * tests/WebFrameTest.cpp:
+
+2012-10-19 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131944.
+ http://trac.webkit.org/changeset/131944
+ https://bugs.webkit.org/show_bug.cgi?id=99891
+
+ On second thoughts, not such a great idea (Requested by jamesr
+ on #webkit).
+
+ * public/WebView.h:
+ (WebKit):
+ (WebView):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ (WebKit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ * tests/GraphicsLayerChromiumTest.cpp:
+ (WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):
+
+2012-10-19 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] when building a shared library component build, we must not depend on WebCore
+
+ Unreviewed build fix.
+
+ * WebKit.gyp:
+
+2012-10-19 Tony Chang <tony@chromium.org>
+
+ Unreviewed, rolling out r131936.
+ http://trac.webkit.org/changeset/131936
+ https://bugs.webkit.org/show_bug.cgi?id=99717
+
+ Broke the clang build
+
+ * public/WebDevToolsFrontendClient.h:
+ (WebKit::WebDevToolsFrontendClient::requestDockWindow):
+ (WebKit::WebDevToolsFrontendClient::requestUndockWindow):
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::requestAttachWindow):
+ (WebKit):
+ (WebKit::InspectorFrontendClientImpl::requestDetachWindow):
+ (WebKit::InspectorFrontendClientImpl::requestSetDockSide):
+ * src/InspectorFrontendClientImpl.h:
+ (InspectorFrontendClientImpl):
+
+2012-10-19 Alexandre Elias <aelias@chromium.org>
+
+ [chromium] API to pass impl thread via WebLayerTreeView
+ https://bugs.webkit.org/show_bug.cgi?id=99863
+
+ Reviewed by James Robinson.
+
+ This adds an API to pass the compositor impl thread via WebView and
+ WebLayerTreeView. This is currently a no-op change, but in the future
+ this codepath will supercede WebCompositor. The goal is to avoid statics
+ in compositor initialization.
+
+ * public/WebView.h:
+ (WebKit):
+ (WebView):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::setCompositorImplThread):
+ (WebKit):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+ * tests/GraphicsLayerChromiumTest.cpp:
+ (WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):
+
+2012-10-19 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: merge "docked" state into the "dock side" enum.
+ https://bugs.webkit.org/show_bug.cgi?id=99717
+
+ Reviewed by Vsevolod Vlasov.
+
+ * public/WebDevToolsFrontendClient.h:
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::requestSetDockSide):
+ * src/InspectorFrontendClientImpl.h:
+ (InspectorFrontendClientImpl):
+
+2012-09-08 Alpha Lam <hclam@chromium.org>
+
+ [chromium] Implement deferred image decoding
+ https://bugs.webkit.org/show_bug.cgi?id=94240
+
+ Reviewed by Stephen White.
+
+ Adding new unit tests for deferred image decoding.
+ These tests are defined in DeferredImageDecoderTest.cpp. They verify
+ image decoding happens only when SkPicture is rasterized for both
+ scaled and non-scaled cases.
+
+ Tests: DeferredImageDecoderTest.drawIntoSkPicture
+ DeferredImageDecoderTest.drawScaledIntoSkPicture
+
+ * WebKit.gypi:
+ * public/WebSettings.h:
+ * src/WebKit.cpp:
+ (WebKit::shutdown):
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setDeferredImageDecodingEnabled):
+ (WebKit):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+ * tests/DeferredImageDecoderTest.cpp: Added.
+ (WebCore):
+ (DeferredImageDecoderTest):
+ (WebCore::DeferredImageDecoderTest::SetUp):
+ (WebCore::DeferredImageDecoderTest::TearDown):
+ (WebCore::TEST_F):
+ * tests/MockImageDecoder.h: Added.
+ (WebCore):
+ (MockImageDecoder):
+ (WebCore::MockImageDecoder::MockImageDecoder):
+ (WebCore::MockImageDecoder::filenameExtension):
+ (WebCore::MockImageDecoder::frameBufferAtIndex):
+ (WebCore::MockImageDecoder::frameBufferRequestCount):
+
+2012-10-19 Alpha Lam <hclam@chromium.org>
+
+ [chromium] Roll DEPS
+
+ Unreviewed DEPS roll.
+
+ * DEPS:
+
+2012-10-19 Dongwoo Joshua Im <dw.im@samsung.com>
+
+ Rename ENABLE_CSS3_TEXT_DECORATION to ENABLE_CSS3_TEXT
+ https://bugs.webkit.org/show_bug.cgi?id=99804
+
+ Reviewed by Julien Chaffraix.
+
+ CSS3 text related properties will be implemented under this flag,
+ including text decoration, text-align-last, and text-justify.
+
+ * features.gypi:
+
+2012-10-19 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] fix the fix
+
+ Unreviewed build fix.
+
+ Forgot to invert the condition when to set the type to none in the
+ previous attempt.
+
+ * WebKit.gyp:
+
+2012-10-19 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Fix inside chromium build on Mac
+
+ Unreviewed build fix.
+
+ Xcode won't create a static library without any sources. So instead of
+ ommitting the sources, just override the webkit_test_support's type
+ with 'none'.
+
+ * WebKit.gyp:
+
+2012-10-17 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: NMI provide data for mixing with tcmalloc heap dumps.
+ https://bugs.webkit.org/show_bug.cgi?id=99457
+
+ Reviewed by Yury Semikhatsky.
+
+ Embedder's code wraps the map with counted objects info into InstrumentedObjectSizeProvider
+ and forces downstream code to make tcmalloc heap snapshot.
+ The default implementation is empty.
+
+ * public/WebDevToolsAgentClient.h:
+ (InstrumentedObjectSizeProvider):
+ (WebKit::WebDevToolsAgentClient::InstrumentedObjectSizeProvider::~InstrumentedObjectSizeProvider):
+ (WebKit::WebDevToolsAgentClient::dumpUncountedAllocatedObjects):
+ (WebDevToolsAgentClient):
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::dumpUncountedAllocatedObjects):
+ (WebKit):
+ * src/InspectorClientImpl.h:
+ (InspectorClientImpl):
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::getAllocatedObjects):
+ (WebKit::WebDevToolsAgentImpl::dumpUncountedAllocatedObjects):
+ (WebKit):
+ * src/WebDevToolsAgentImpl.h:
+ (WebDevToolsAgentImpl):
+
+2012-10-18 Kent Tamura <tkent@chromium.org>
+
+ Add shortMonthLabels and shortStandAloneMonthLabels to Localizer
+ https://bugs.webkit.org/show_bug.cgi?id=99787
+
+ * tests/LocaleMacTest.cpp:
+ (TEST_F): Disable tests depends on OS X versions.
+
+2012-10-18 Kent Tamura <tkent@chromium.org>
+
+ Add shortMonthLabels and shortStandAloneMonthLabels to Localizer
+ https://bugs.webkit.org/show_bug.cgi?id=99787
+
+ Reviewed by Kentaro Hara.
+
+ * tests/LocaleMacTest.cpp:
+ (LocaleMacTest::shortMonthLabel): A helper.
+ (LocaleMacTest::shortStandAloneMonthLabel): Ditto.
+ (TEST_F): Added tests for some locales.
+ * tests/LocaleWinTest.cpp:
+ (LocaleWinTest::shortMonthLabel): A helper.
+ (TEST_F): Added tests for some locales. We don't test
+ LocaleWin::shortStandAloneMonthLabels because it is identical to
+ shortMonthLabels.
+ * tests/LocalizedDateICUTest.cpp:
+ (LocalizedDateICUTest::shortMonthLabel): A helper.
+ (LocalizedDateICUTest::shortStandAloneMonthLabel): Ditto.
+ (TEST_F): Added tests for some locales.
+
+2012-10-18 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Add a webkit_test_support target that WebTestingSupport
+ https://bugs.webkit.org/show_bug.cgi?id=99772
+
+ Reviewed by Adam Barth.
+
+ Before, embedders would need to compile the WebTestingSupport.cpp
+ themselves, which in turn depends on WebCore headers.
+
+ * WebKit.gyp:
+
+2012-10-18 W. James MacLean <wjmaclean@chromium.org>
+
+ [chromium] Re-enable gesture highlight layout tests, fix GestureLongPress regression.
+ https://bugs.webkit.org/show_bug.cgi?id=99632
+
+ Reviewed by James Robinson.
+
+ Re-enable layout tests for gesture highlights. Includes fix for GestureTapCancel test.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleGestureEvent):
+
+2012-10-18 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131810.
+ http://trac.webkit.org/changeset/131810
+ https://bugs.webkit.org/show_bug.cgi?id=99762
+
+ Broke linux debug webkit_unit_tests (Requested by
+ danakj|gardening on #webkit).
+
+ * WebKit.gypi:
+ * public/WebSettings.h:
+ * src/WebKit.cpp:
+ (WebKit::shutdown):
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::WebSettingsImpl):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+ * tests/DeferredImageDecoderTest.cpp: Removed.
+ * tests/MockImageDecoder.h: Removed.
+
+2012-10-18 Alpha Lam <hclam@chromium.org>
+
+ [chromium] Implement deferred image decoding
+ https://bugs.webkit.org/show_bug.cgi?id=94240
+
+ Reviewed by Stephen White.
+
+ Adding new unit tests for deferred image decoding.
+ These tests are defined in DeferredImageDecoderTest.cpp. They verify
+ image decoding happens only when SkPicture is rasterized for both
+ scaled and non-scaled cases.
+
+ Tests: DeferredImageDecoderTest.drawIntoSkPicture
+ DeferredImageDecoderTest.drawScaledIntoSkPicture
+
+ * WebKit.gypi:
+ * public/WebSettings.h:
+ * src/WebKit.cpp:
+ (WebKit::shutdown):
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setDeferredImageDecodingEnabled):
+ (WebKit):
+ * src/WebSettingsImpl.h:
+ (WebSettingsImpl):
+ * tests/DeferredImageDecoderTest.cpp: Added.
+ (WebCore):
+ (DeferredImageDecoderTest):
+ (WebCore::DeferredImageDecoderTest::SetUp):
+ (WebCore::DeferredImageDecoderTest::TearDown):
+ (WebCore::TEST_F):
+ * tests/MockImageDecoder.h: Added.
+ (WebCore):
+ (MockImageDecoder):
+ (WebCore::MockImageDecoder::MockImageDecoder):
+ (WebCore::MockImageDecoder::filenameExtension):
+ (WebCore::MockImageDecoder::frameBufferAtIndex):
+ (WebCore::MockImageDecoder::frameBufferRequestCount):
+
+2012-10-18 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-10-18 Pablo Flouret <pablof@motorola.com>
+
+ Implement css3-conditional's @supports rule
+ https://bugs.webkit.org/show_bug.cgi?id=86146
+
+ Reviewed by Antti Koivisto.
+
+ * features.gypi:
+ Add an ENABLE_CSS3_CONDITIONAL_RULES flag.
+
+2012-10-18 Kent Tamura <tkent@chromium.org>
+
+ Add Localizer::monthFormat and implementations
+ https://bugs.webkit.org/show_bug.cgi?id=99704
+
+ * tests/LocaleMacTest.cpp:
+ (TEST_F): Remove tests for fr_FR and ru locales for a compatibility reason.
+
+2012-10-18 Kent Tamura <tkent@chromium.org>
+
+ Add Localizer::monthFormat and implementations
+ https://bugs.webkit.org/show_bug.cgi?id=99704
+
+ Reviewed by Kentaro Hara.
+
+ * tests/LocaleMacTest.cpp:
+ (LocaleMacTest::monthFormat): A helper function.
+ (TEST_F): Added some tests.
+ * tests/LocaleWinTest.cpp:
+ (LocaleWinTest::monthFormat): A helper function.
+ (TEST_F): Added some tests.
+ * tests/LocalizedDateICUTest.cpp:
+ (LocalizedDateICUTest::monthFormat): A helper function.
+ (TEST_F): Added some tests.
+
2012-10-17 Mike West <mkwst@chromium.org>
Move mixed content logic out of FrameLoader
diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS
index 1fdffb9ca..42b3e567d 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': '162322'
+ 'chromium_rev': '162983'
}
deps = {
diff --git a/Source/WebKit/chromium/WebKit.gyp b/Source/WebKit/chromium/WebKit.gyp
index ef9997ea4..3edc4a5b4 100644
--- a/Source/WebKit/chromium/WebKit.gyp
+++ b/Source/WebKit/chromium/WebKit.gyp
@@ -864,6 +864,28 @@
],
},
{
+ 'target_name': 'webkit_test_support',
+ 'conditions': [
+ ['inside_chromium_build==1 and component=="shared_library"', {
+ 'type': 'none',
+ }, { # else: inside_chromium_build==0 or component!="shared_library"
+ 'type': 'static_library',
+ 'dependencies': [
+ '../../WTF/WTF.gyp/WTF.gyp:wtf',
+ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
+ ],
+ 'include_dirs': [
+ 'public',
+ '../../WebCore/testing/v8', # for WebCoreTestSupport.h, needed to link in window.internals code.
+ ],
+ 'sources': [
+ 'src/WebTestingSupport.cpp',
+ 'public/WebTestingSupport.h',
+ ],
+ }],
+ ],
+ },
+ {
'target_name': 'inspector_resources',
'type': 'none',
'dependencies': [
diff --git a/Source/WebKit/chromium/WebKit.gypi b/Source/WebKit/chromium/WebKit.gypi
index 24cae298f..64063a021 100644
--- a/Source/WebKit/chromium/WebKit.gypi
+++ b/Source/WebKit/chromium/WebKit.gypi
@@ -61,6 +61,7 @@
'tests/CompositorFakeWebGraphicsContext3D.h',
'tests/DateTimeFormatTest.cpp',
'tests/DecimalTest.cpp',
+ 'tests/DeferredImageDecoderTest.cpp',
'tests/DragImageTest.cpp',
'tests/EventListenerTest.cpp',
'tests/FakeWebCompositorOutputSurface.h',
@@ -78,8 +79,9 @@
'tests/IDBLevelDBCodingTest.cpp',
'tests/IDBRequestTest.cpp',
'tests/ImageLayerChromiumTest.cpp',
- 'tests/KURLTest.cpp',
+ 'tests/MockImageDecoder.h',
'tests/KeyboardTest.cpp',
+ 'tests/KURLTest.cpp',
'tests/LevelDBTest.cpp',
'tests/LinkHighlightTest.cpp',
'tests/ListenerLeakTest.cpp',
diff --git a/Source/WebKit/chromium/features.gypi b/Source/WebKit/chromium/features.gypi
index 3d08ea898..2d18c773d 100644
--- a/Source/WebKit/chromium/features.gypi
+++ b/Source/WebKit/chromium/features.gypi
@@ -38,7 +38,8 @@
'ENABLE_BLOB_SLICE=1',
'ENABLE_CHANNEL_MESSAGING=1',
'ENABLE_CSP_NEXT=1',
- 'ENABLE_CSS3_TEXT_DECORATION=0',
+ 'ENABLE_CSS3_CONDITIONAL_RULES=0',
+ 'ENABLE_CSS3_TEXT=0',
'ENABLE_CSS_BOX_DECORATION_BREAK=1',
'ENABLE_CSS_COMPOSITING=0',
'ENABLE_CSS_EXCLUSIONS=1',
diff --git a/Source/WebKit/chromium/public/WebDevToolsAgentClient.h b/Source/WebKit/chromium/public/WebDevToolsAgentClient.h
index 7ac2c7c97..beb3e832f 100644
--- a/Source/WebKit/chromium/public/WebDevToolsAgentClient.h
+++ b/Source/WebKit/chromium/public/WebDevToolsAgentClient.h
@@ -69,6 +69,14 @@ public:
};
virtual void visitAllocatedObjects(AllocatedObjectVisitor*) { }
+ class InstrumentedObjectSizeProvider {
+ public:
+ virtual size_t objectSize(const void* ptr) const = 0;
+ protected:
+ virtual ~InstrumentedObjectSizeProvider() { }
+ };
+ virtual void dumpUncountedAllocatedObjects(const InstrumentedObjectSizeProvider*) { }
+
protected:
~WebDevToolsAgentClient() { }
};
diff --git a/Source/WebKit/chromium/public/WebInputEvent.h b/Source/WebKit/chromium/public/WebInputEvent.h
index f3edaf95e..328c0337e 100644
--- a/Source/WebKit/chromium/public/WebInputEvent.h
+++ b/Source/WebKit/chromium/public/WebInputEvent.h
@@ -379,38 +379,43 @@ public:
int globalY;
union {
- struct {
- int tapCount;
- int width;
- int height;
- } tap;
-
- struct {
- int width;
- int height;
- } tapDown;
-
- struct {
- int width;
- int height;
- } longPress;
-
- struct {
- float deltaX;
- float deltaY;
- float velocityX;
- float velocityY;
- } scrollUpdate;
-
- struct {
- float velocityX;
- float velocityY;
- SourceDevice sourceDevice;
- } flingStart;
-
- struct {
- float scale;
- } pinchUpdate;
+ struct {
+ int tapCount;
+ int width;
+ int height;
+ } tap;
+
+ struct {
+ int width;
+ int height;
+ } tapDown;
+
+ struct {
+ int width;
+ int height;
+ } longPress;
+
+ struct {
+ int firstFingerWidth;
+ int firstFingerHeight;
+ } twoFingerTap;
+
+ struct {
+ float deltaX;
+ float deltaY;
+ float velocityX;
+ float velocityY;
+ } scrollUpdate;
+
+ struct {
+ float velocityX;
+ float velocityY;
+ SourceDevice sourceDevice;
+ } flingStart;
+
+ struct {
+ float scale;
+ } pinchUpdate;
} data;
WebGestureEvent(unsigned sizeParam = sizeof(WebGestureEvent))
diff --git a/Source/WebKit/chromium/public/WebSettings.h b/Source/WebKit/chromium/public/WebSettings.h
index abd84ed0e..d5d963f91 100644
--- a/Source/WebKit/chromium/public/WebSettings.h
+++ b/Source/WebKit/chromium/public/WebSettings.h
@@ -86,9 +86,11 @@ public:
virtual void setDefaultTextEncodingName(const WebString&) = 0;
virtual void setDefaultTileSize(WebSize) = 0;
virtual void setDeferred2dCanvasEnabled(bool) = 0;
+ virtual void setDeferredImageDecodingEnabled(bool) = 0;
virtual void setDeveloperExtrasEnabled(bool) = 0;
virtual void setDeviceSupportsMouse(bool) = 0;
virtual void setDeviceSupportsTouch(bool) = 0;
+ virtual void setDoubleTapToZoomEnabled(bool) = 0;
virtual void setDownloadableBinaryFontsEnabled(bool) = 0;
virtual void setEditableLinkBehaviorNeverLive() = 0;
virtual void setEditingBehavior(EditingBehavior) = 0;
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.cpp b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
index 402b8695c..f8020ef0b 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -169,6 +169,12 @@ void InspectorClientImpl::getAllocatedObjects(HashSet<const void*>& set)
agent->getAllocatedObjects(set);
}
+void InspectorClientImpl::dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>& map)
+{
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->dumpUncountedAllocatedObjects(map);
+}
+
void InspectorClientImpl::willProcessTask()
{
InspectorInstrumentation::willProcessTask(m_inspectedWebView->page());
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.h b/Source/WebKit/chromium/src/InspectorClientImpl.h
index 9e1ea370e..34de35a09 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.h
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.h
@@ -79,6 +79,7 @@ public:
virtual bool supportsFrameInstrumentation();
virtual void getAllocatedObjects(HashSet<const void*>&);
+ virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
private:
// WebThread::TaskObserver
diff --git a/Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
index 763c85da8..fcfa25f9c 100644
--- a/Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
+++ b/Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
@@ -103,19 +103,15 @@ void InspectorFrontendClientImpl::closeWindow()
m_client->closeWindow();
}
-void InspectorFrontendClientImpl::requestAttachWindow()
-{
- m_client->requestDockWindow();
-}
-
-void InspectorFrontendClientImpl::requestDetachWindow()
-{
- m_client->requestUndockWindow();
-}
-
-void InspectorFrontendClientImpl::requestSetDockSide(const String& side)
-{
- m_client->requestSetDockSide(side);
+void InspectorFrontendClientImpl::requestSetDockSide(DockSide side)
+{
+ String sideString = "undocked";
+ switch (side) {
+ case DOCKED_TO_RIGHT: sideString = "right"; break;
+ case DOCKED_TO_BOTTOM: sideString = "bottom"; break;
+ case UNDOCKED: sideString = "undocked"; break;
+ }
+ m_client->requestSetDockSide(sideString);
}
void InspectorFrontendClientImpl::changeAttachedWindowHeight(unsigned)
diff --git a/Source/WebKit/chromium/src/InspectorFrontendClientImpl.h b/Source/WebKit/chromium/src/InspectorFrontendClientImpl.h
index 55e57e696..72f8d68b6 100644
--- a/Source/WebKit/chromium/src/InspectorFrontendClientImpl.h
+++ b/Source/WebKit/chromium/src/InspectorFrontendClientImpl.h
@@ -62,9 +62,7 @@ public:
virtual void bringToFront();
virtual void closeWindow();
- virtual void requestAttachWindow();
- virtual void requestDetachWindow();
- virtual void requestSetDockSide(const String&);
+ virtual void requestSetDockSide(DockSide);
virtual void changeAttachedWindowHeight(unsigned);
virtual void openInNewTab(const String& url);
diff --git a/Source/WebKit/chromium/src/LocalizedStrings.cpp b/Source/WebKit/chromium/src/LocalizedStrings.cpp
index 0cc8e00eb..4ef239c6f 100644
--- a/Source/WebKit/chromium/src/LocalizedStrings.cpp
+++ b/Source/WebKit/chromium/src/LocalizedStrings.cpp
@@ -268,14 +268,9 @@ String placeholderForYearField()
return query(WebLocalizedString::PlaceholderForYearField);
}
-String monthFormatInLDML()
-{
- return query(WebLocalizedString::MonthFormatInLDML);
-}
-
String weekFormatInLDML()
{
- return query(WebLocalizedString::WeekFormatInLDML);
+ return query(WebLocalizedString::WeekFormatTemplate);
}
#endif
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 7f362036b..5c25ff64e 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -462,12 +462,13 @@ void WebDevToolsAgentImpl::getAllocatedObjects(HashSet<const void*>& set)
CountingVisitor() : m_totalObjectsCount(0)
{
}
+
virtual bool visitObject(const void* ptr)
{
++m_totalObjectsCount;
return true;
}
- size_t totalObjectsCount()
+ size_t totalObjectsCount() const
{
return m_totalObjectsCount;
}
@@ -488,7 +489,7 @@ void WebDevToolsAgentImpl::getAllocatedObjects(HashSet<const void*>& set)
, m_pointers(new const void*[maxObjectsCount])
{
}
- ~PointerCollector()
+ virtual ~PointerCollector()
{
delete[] m_pointers;
}
@@ -531,6 +532,25 @@ void WebDevToolsAgentImpl::getAllocatedObjects(HashSet<const void*>& set)
}
}
+void WebDevToolsAgentImpl::dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>& map)
+{
+ class InstrumentedObjectSizeProvider : public WebDevToolsAgentClient::InstrumentedObjectSizeProvider {
+ public:
+ InstrumentedObjectSizeProvider(const HashMap<const void*, size_t>& map) : m_map(map) { }
+ virtual size_t objectSize(const void* ptr) const
+ {
+ HashMap<const void*, size_t>::const_iterator i = m_map.find(ptr);
+ return i == m_map.end() ? 0 : i->value;
+ }
+
+ private:
+ const HashMap<const void*, size_t>& m_map;
+ };
+
+ InstrumentedObjectSizeProvider provider(map);
+ m_client->dumpUncountedAllocatedObjects(&provider);
+}
+
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
{
inspectorController()->dispatchMessageFromFrontend(message);
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
index 6a9663127..a5061cf49 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -106,6 +106,7 @@ public:
virtual void autoZoomPageToFitWidth();
virtual void getAllocatedObjects(HashSet<const void*>&);
+ virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&);
int hostId() { return m_hostId; }
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index ff4a0b44c..98bec3aba 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -2271,7 +2271,7 @@ void WebFrameImpl::createFrameView()
WebViewImpl* webView = viewImpl();
bool isMainFrame = webView->mainFrameImpl()->frame() == frame();
- frame()->createView(webView->size(), Color::white, webView->isTransparent(), webView->fixedLayoutSize(), isMainFrame ? webView->isFixedLayoutModeEnabled() : 0);
+ frame()->createView(webView->size(), Color::white, webView->isTransparent(), webView->fixedLayoutSize(), IntRect(), isMainFrame ? webView->isFixedLayoutModeEnabled() : 0);
if (webView->shouldAutoResize() && isMainFrame)
frame()->view()->enableAutoSizeMode(true, webView->minAutoSize(), webView->maxAutoSize());
diff --git a/Source/WebKit/chromium/src/WebKit.cpp b/Source/WebKit/chromium/src/WebKit.cpp
index e357f28e4..243d08e62 100644
--- a/Source/WebKit/chromium/src/WebKit.cpp
+++ b/Source/WebKit/chromium/src/WebKit.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "WebKit.h"
+#include "ImageDecodingStore.h"
#include "LayoutTestSupport.h"
#include "Logging.h"
#include "MutationObserver.h"
@@ -165,6 +166,7 @@ void shutdown()
}
#endif
s_webKitPlatformSupport = 0;
+ WebCore::ImageDecodingStore::shutdown();
Platform::shutdown();
WebPrerenderingSupport::shutdown();
}
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
index e4808fd70..078ae7e86 100644
--- a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
@@ -142,6 +142,7 @@ bool PagePopupFeaturesClient::isEnabled(Document*, ContextFeatures::FeatureType
WebPagePopupImpl::WebPagePopupImpl(WebWidgetClient* client)
: m_widgetClient(client)
+ , m_closing(false)
{
ASSERT(client);
}
@@ -259,7 +260,7 @@ bool WebPagePopupImpl::handleCharEvent(const WebKeyboardEvent&)
#if ENABLE(GESTURE_EVENTS)
bool WebPagePopupImpl::handleGestureEvent(const WebGestureEvent& event)
{
- if (!m_page || !m_page->mainFrame() || !m_page->mainFrame()->view())
+ if (m_closing || !m_page || !m_page->mainFrame() || !m_page->mainFrame()->view())
return false;
Frame& frame = *m_page->mainFrame();
return frame.eventHandler()->handleGestureEvent(PlatformGestureEventBuilder(frame.view(), event));
@@ -268,12 +269,14 @@ bool WebPagePopupImpl::handleGestureEvent(const WebGestureEvent& event)
bool WebPagePopupImpl::handleInputEvent(const WebInputEvent& event)
{
+ if (m_closing)
+ return false;
return PageWidgetDelegate::handleInputEvent(m_page.get(), *this, event);
}
bool WebPagePopupImpl::handleKeyEvent(const PlatformKeyboardEvent& event)
{
- if (!m_page->mainFrame() || !m_page->mainFrame()->view())
+ if (m_closing || !m_page->mainFrame() || !m_page->mainFrame()->view())
return false;
return m_page->mainFrame()->eventHandler()->keyEvent(event);
}
@@ -302,7 +305,9 @@ void WebPagePopupImpl::closePopup()
m_page->setGroupName(String());
m_page->mainFrame()->loader()->stopAllLoaders();
m_page->mainFrame()->loader()->stopLoading(UnloadEventPolicyNone);
+ DOMWindowPagePopup::uninstall(m_page->mainFrame()->document()->domWindow());
}
+ m_closing = true;
// m_widgetClient might be 0 because this widget might be already closed.
if (m_widgetClient) {
// closeWidgetSoon() will call this->close() later.
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.h b/Source/WebKit/chromium/src/WebPagePopupImpl.h
index cf2bbba78..34b4794bd 100644
--- a/Source/WebKit/chromium/src/WebPagePopupImpl.h
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.h
@@ -94,6 +94,7 @@ private:
OwnPtr<WebCore::Page> m_page;
OwnPtr<PagePopupChromeClient> m_chromeClient;
WebCore::PagePopupClient* m_popupClient;
+ bool m_closing;
friend class WebPagePopup;
friend class PagePopupChromeClient;
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
index 988c5e66b..a667bedf5 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -32,6 +32,7 @@
#include "WebSettingsImpl.h"
#include "FontRenderingMode.h"
+#include "ImageDecodingStore.h"
#include "Settings.h"
#include <public/WebString.h>
#include <public/WebURL.h>
@@ -55,6 +56,8 @@ WebSettingsImpl::WebSettingsImpl(Settings* settings)
, m_applyDefaultDeviceScaleFactorInCompositor(false)
, m_gestureTapHighlightEnabled(true)
, m_autoZoomFocusedNodeToLegibleScale(false)
+ , m_deferredImageDecodingEnabled(false)
+ , m_doubleTapToZoomEnabled(false)
, m_defaultTileSize(WebSize(256, 256))
, m_maxUntiledLayerSize(WebSize(512, 512))
{
@@ -264,6 +267,11 @@ void WebSettingsImpl::setPageCacheSupportsPlugins(bool pageCacheSupportsPlugins)
m_settings->setPageCacheSupportsPlugins(pageCacheSupportsPlugins);
}
+void WebSettingsImpl::setDoubleTapToZoomEnabled(bool doubleTapToZoomEnabled)
+{
+ m_doubleTapToZoomEnabled = doubleTapToZoomEnabled;
+}
+
void WebSettingsImpl::setDownloadableBinaryFontsEnabled(bool enabled)
{
m_settings->setDownloadableBinaryFontsEnabled(enabled);
@@ -480,6 +488,15 @@ void WebSettingsImpl::setDeferred2dCanvasEnabled(bool enabled)
m_settings->setDeferred2dCanvasEnabled(enabled);
}
+void WebSettingsImpl::setDeferredImageDecodingEnabled(bool enabled)
+{
+ if (!m_deferredImageDecodingEnabled && enabled)
+ ImageDecodingStore::initializeOnMainThread();
+ if (m_deferredImageDecodingEnabled && !enabled)
+ ImageDecodingStore::shutdown();
+ m_deferredImageDecodingEnabled = enabled;
+}
+
void WebSettingsImpl::setAcceleratedCompositingForFixedPositionEnabled(bool enabled)
{
m_settings->setAcceleratedCompositingForFixedPositionEnabled(enabled);
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h
index 1169c31cf..74968c4f6 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.h
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.h
@@ -78,9 +78,11 @@ public:
virtual void setDefaultTextEncodingName(const WebString&);
virtual void setDefaultTileSize(WebSize);
virtual void setDeferred2dCanvasEnabled(bool);
+ virtual void setDeferredImageDecodingEnabled(bool);
virtual void setDeveloperExtrasEnabled(bool);
virtual void setDeviceSupportsMouse(bool);
virtual void setDeviceSupportsTouch(bool);
+ virtual void setDoubleTapToZoomEnabled(bool);
virtual void setDownloadableBinaryFontsEnabled(bool);
virtual void setEditableLinkBehaviorNeverLive();
virtual void setEditingBehavior(EditingBehavior);
@@ -165,6 +167,7 @@ public:
bool applyPageScaleFactorInCompositor() const;
bool autoZoomFocusedNodeToLegibleScale() const { return m_autoZoomFocusedNodeToLegibleScale; }
bool gestureTapHighlightEnabled() { return m_gestureTapHighlightEnabled; }
+ bool doubleTapToZoomEnabled() { return m_doubleTapToZoomEnabled; }
WebSize defaultTileSize() const { return m_defaultTileSize; }
WebSize maxUntiledLayerSize() const { return m_maxUntiledLayerSize; }
@@ -178,6 +181,8 @@ private:
bool m_applyDefaultDeviceScaleFactorInCompositor;
bool m_gestureTapHighlightEnabled;
bool m_autoZoomFocusedNodeToLegibleScale;
+ bool m_deferredImageDecodingEnabled;
+ bool m_doubleTapToZoomEnabled;
WebSize m_defaultTileSize;
WebSize m_maxUntiledLayerSize;
};
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index d6bf94b96..9f2a845dd 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -679,6 +679,7 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
m_linkHighlight->startHighlightAnimationIfNeeded();
break;
case WebInputEvent::GestureTap:
+ case WebInputEvent::GestureLongPress:
// If a link highlight is active, kill it.
m_linkHighlight.clear();
break;
@@ -774,10 +775,12 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
break;
}
case WebInputEvent::GestureDoubleTap:
- m_client->cancelScheduledContentIntents();
- animateZoomAroundPoint(WebPoint(event.x, event.y), DoubleTap);
- eventSwallowed = true;
- break;
+ if (m_webSettings->doubleTapToZoomEnabled()) {
+ m_client->cancelScheduledContentIntents();
+ animateZoomAroundPoint(WebPoint(event.x, event.y), DoubleTap);
+ eventSwallowed = true;
+ break;
+ }
case WebInputEvent::GestureScrollBegin:
case WebInputEvent::GesturePinchBegin:
m_client->cancelScheduledContentIntents();
diff --git a/Source/WebKit/chromium/tests/DeferredImageDecoderTest.cpp b/Source/WebKit/chromium/tests/DeferredImageDecoderTest.cpp
new file mode 100644
index 000000000..482549805
--- /dev/null
+++ b/Source/WebKit/chromium/tests/DeferredImageDecoderTest.cpp
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "DeferredImageDecoder.h"
+
+#include "ImageDecodingStore.h"
+#include "MockImageDecoder.h"
+#include "NativeImageSkia.h"
+#include "SkCanvas.h"
+#include "SkDevice.h"
+#include "SkPicture.h"
+#include <gtest/gtest.h>
+
+using namespace WebCore;
+
+namespace {
+
+class DeferredImageDecoderTest : public ::testing::Test {
+public:
+ virtual void SetUp()
+ {
+ ImageDecodingStore::initializeOnMainThread();
+ m_actualDecoder = new MockImageDecoder();
+ m_actualDecoder->setSize(600, 613);
+ m_lazyDecoder = DeferredImageDecoder::createForTesting(adoptPtr(m_actualDecoder));
+ m_canvas.setDevice(new SkDevice(SkBitmap::kARGB_8888_Config, 100, 100))->unref();
+ }
+
+ virtual void TearDown()
+ {
+ ImageDecodingStore::shutdown();
+ }
+
+protected:
+ // Don't own this but saves the pointer to query states.
+ MockImageDecoder* m_actualDecoder;
+ OwnPtr<DeferredImageDecoder> m_lazyDecoder;
+ SkPicture m_picture;
+ SkCanvas m_canvas;
+};
+
+TEST_F(DeferredImageDecoderTest, drawIntoSkPicture)
+{
+ OwnPtr<NativeImageSkia> image(adoptPtr(m_lazyDecoder->frameBufferAtIndex(0)->asNewNativeImage()));
+ EXPECT_EQ(m_actualDecoder->size().width(), image->bitmap().width());
+ EXPECT_EQ(m_actualDecoder->size().height(), image->bitmap().height());
+ EXPECT_FALSE(image->bitmap().isNull());
+ EXPECT_TRUE(image->bitmap().isImmutable());
+
+ SkCanvas* tempCanvas = m_picture.beginRecording(100, 100);
+ tempCanvas->drawBitmap(image->bitmap(), 0, 0);
+ m_picture.endRecording();
+ EXPECT_EQ(0, m_actualDecoder->frameBufferRequestCount());
+
+ m_canvas.drawPicture(m_picture);
+ EXPECT_EQ(1, m_actualDecoder->frameBufferRequestCount());
+}
+
+TEST_F(DeferredImageDecoderTest, drawScaledIntoSkPicture)
+{
+ OwnPtr<NativeImageSkia> image(adoptPtr(m_lazyDecoder->frameBufferAtIndex(0)->asNewNativeImage()));
+ SkBitmap scaledBitmap = image->resizedBitmap(SkISize::Make(50, 51), SkIRect::MakeWH(50, 51));
+ EXPECT_FALSE(scaledBitmap.isNull());
+ EXPECT_TRUE(scaledBitmap.isImmutable());
+ EXPECT_EQ(50, scaledBitmap.width());
+ EXPECT_EQ(51, scaledBitmap.height());
+ EXPECT_EQ(0, m_actualDecoder->frameBufferRequestCount());
+
+ SkCanvas* tempCanvas = m_picture.beginRecording(100, 100);
+ tempCanvas->drawBitmap(scaledBitmap, 0, 0);
+ m_picture.endRecording();
+ EXPECT_EQ(0, m_actualDecoder->frameBufferRequestCount());
+
+ m_canvas.drawPicture(m_picture);
+ EXPECT_EQ(1, m_actualDecoder->frameBufferRequestCount());
+}
+
+} // namespace
diff --git a/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp b/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
index cd2a07649..2be4e567e 100644
--- a/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
+++ b/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "IDBCallbacks.h"
#include "IDBCursorBackendInterface.h"
#include "IDBDatabaseBackendInterface.h"
#include "IDBDatabaseCallbacks.h"
diff --git a/Source/WebKit/chromium/tests/IDBFakeBackingStore.h b/Source/WebKit/chromium/tests/IDBFakeBackingStore.h
index c59dce675..45cdd1cb2 100644
--- a/Source/WebKit/chromium/tests/IDBFakeBackingStore.h
+++ b/Source/WebKit/chromium/tests/IDBFakeBackingStore.h
@@ -33,7 +33,7 @@ namespace WebCore {
class IDBFakeBackingStore : public IDBBackingStore {
public:
virtual void getDatabaseNames(Vector<String>& foundNames) OVERRIDE { }
- virtual bool getIDBDatabaseMetaData(const String& name, String& foundStringVersion, int64_t& foundIntVersion, int64_t& foundId, int64_t& maxObjectStoreId) OVERRIDE { return false; }
+ virtual bool getIDBDatabaseMetaData(const String& name, IDBDatabaseMetadata*) OVERRIDE { return false; }
virtual bool createIDBDatabaseMetaData(const String& name, const String& version, int64_t intVersion, int64_t& rowId) OVERRIDE { return true; }
virtual bool updateIDBDatabaseMetaData(Transaction*, int64_t rowId, const String& version) OVERRIDE { return false; }
virtual bool updateIDBDatabaseIntVersion(Transaction*, int64_t rowId, int64_t version) OVERRIDE { return false; }
diff --git a/Source/WebKit/chromium/tests/LocaleMacTest.cpp b/Source/WebKit/chromium/tests/LocaleMacTest.cpp
index 449776195..91482d94d 100644
--- a/Source/WebKit/chromium/tests/LocaleMacTest.cpp
+++ b/Source/WebKit/chromium/tests/LocaleMacTest.cpp
@@ -120,6 +120,12 @@ protected:
#endif
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+ String monthFormat(const String& localeString)
+ {
+ OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
+ return locale->monthFormat();
+ }
+
String timeFormat(const String& localeString)
{
OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
@@ -132,6 +138,18 @@ protected:
return locale->shortTimeFormat();
}
+ String shortMonthLabel(const String& localeString, unsigned index)
+ {
+ OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
+ return locale->shortMonthLabels()[index];
+ }
+
+ String shortStandAloneMonthLabel(const String& localeString, unsigned index)
+ {
+ OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
+ return locale->shortStandAloneMonthLabels()[index];
+ }
+
String timeAMPMLabel(const String& localeString, unsigned index)
{
OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
@@ -236,6 +254,16 @@ TEST_F(LocaleMacTest, isRTL)
#endif
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+TEST_F(LocaleMacTest, monthFormat)
+{
+ EXPECT_STREQ("MMM yyyy", monthFormat("en_US").utf8().data());
+ EXPECT_STREQ("yyyy\xE5\xB9\xB4M\xE6\x9C\x88", monthFormat("ja_JP").utf8().data());
+
+ // fr_FR and ru return different results on OS versions.
+ // "MMM yyyy" "LLL yyyy" on 10.6 and 10.7
+ // "MMM y" "LLL y" on 10.8
+}
+
TEST_F(LocaleMacTest, timeFormat)
{
EXPECT_STREQ("h:mm:ss a", timeFormat("en_US").utf8().data());
@@ -250,6 +278,30 @@ TEST_F(LocaleMacTest, shortTimeFormat)
EXPECT_STREQ("H:mm", shortTimeFormat("ja_JP").utf8().data());
}
+TEST_F(LocaleMacTest, shortMonthLabels)
+{
+ EXPECT_STREQ("Jan", shortMonthLabel("en_US", 0).utf8().data());
+ EXPECT_STREQ("Jan", shortStandAloneMonthLabel("en_US", 0).utf8().data());
+ EXPECT_STREQ("Dec", shortMonthLabel("en_US", 11).utf8().data());
+ EXPECT_STREQ("Dec", shortStandAloneMonthLabel("en_US", 11).utf8().data());
+
+ EXPECT_STREQ("janv.", shortMonthLabel("fr_FR", 0).utf8().data());
+ EXPECT_STREQ("janv.", shortStandAloneMonthLabel("fr_FR", 0).utf8().data());
+ EXPECT_STREQ("d\xC3\xA9" "c.", shortMonthLabel("fr_FR", 11).utf8().data());
+ EXPECT_STREQ("d\xC3\xA9" "c.", shortStandAloneMonthLabel("fr_FR", 11).utf8().data());
+
+ EXPECT_STREQ("1\xE6\x9C\x88", shortMonthLabel("ja_JP", 0).utf8().data());
+ EXPECT_STREQ("1\xE6\x9C\x88", shortStandAloneMonthLabel("ja_JP", 0).utf8().data());
+ EXPECT_STREQ("12\xE6\x9C\x88", shortMonthLabel("ja_JP", 11).utf8().data());
+ EXPECT_STREQ("12\xE6\x9C\x88", shortStandAloneMonthLabel("ja_JP", 11).utf8().data());
+
+ EXPECT_STREQ("\xD0\xBC\xD0\xB0\xD1\x80\xD1\x82\xD0\xB0", shortMonthLabel("ru_RU", 2).utf8().data());
+ EXPECT_STREQ("\xD0\xBC\xD0\xB0\xD1\x8F", shortMonthLabel("ru_RU", 4).utf8().data());
+ // The ru_RU locale returns different stand-alone month labels on OS versions.
+ // "\xD0\xBC\xD0\xB0\xD1\x80\xD1\x82" "\xD0\xBC\xD0\xB0\xD0\xB9" on 10.6 and 10.7
+ // "\xD0\x9C\xD0\xB0\xD1\x80\xD1\x82" "\xD0\x9C\xD0\xB0\xD0\xB9" on 10.8
+}
+
TEST_F(LocaleMacTest, timeAMPMLabels)
{
EXPECT_STREQ("AM", timeAMPMLabel("en_US", 0).utf8().data());
diff --git a/Source/WebKit/chromium/tests/LocaleWinTest.cpp b/Source/WebKit/chromium/tests/LocaleWinTest.cpp
index 75af419dd..35f064aac 100644
--- a/Source/WebKit/chromium/tests/LocaleWinTest.cpp
+++ b/Source/WebKit/chromium/tests/LocaleWinTest.cpp
@@ -129,6 +129,12 @@ protected:
#endif
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+ String monthFormat(LCID lcid)
+ {
+ OwnPtr<LocaleWin> locale = LocaleWin::create(lcid);
+ return locale->monthFormat();
+ }
+
String timeFormat(LCID lcid)
{
OwnPtr<LocaleWin> locale = LocaleWin::create(lcid);
@@ -141,6 +147,12 @@ protected:
return locale->shortTimeFormat();
}
+ String shortMonthLabel(LCID lcid, unsigned index)
+ {
+ OwnPtr<LocaleWin> locale = LocaleWin::create(lcid);
+ return locale->shortMonthLabels()[index];
+ }
+
String timeAMPMLabel(LCID lcid, unsigned index)
{
OwnPtr<LocaleWin> locale = LocaleWin::create(lcid);
@@ -284,6 +296,13 @@ TEST_F(LocaleWinTest, dateFormat)
EXPECT_STREQ("yyyy'-'''''MMMM'-'dd", LocaleWin::dateFormat("yyyy-''''MMMM-dd").utf8().data());
}
+TEST_F(LocaleWinTest, monthFormat)
+{
+ EXPECT_STREQ("MMMM', 'yyyy", monthFormat(EnglishUS).utf8().data());
+ EXPECT_STREQ("MMMM' 'yyyy", monthFormat(FrenchFR).utf8().data());
+ EXPECT_STREQ("yyyy'\xE5\xB9\xB4'M'\xE6\x9C\x88'", monthFormat(JapaneseJP).utf8().data());
+}
+
TEST_F(LocaleWinTest, timeFormat)
{
EXPECT_STREQ("h:mm:ss a", timeFormat(EnglishUS).utf8().data());
@@ -298,6 +317,16 @@ TEST_F(LocaleWinTest, shortTimeFormat)
EXPECT_STREQ("H:mm:ss", shortTimeFormat(JapaneseJP).utf8().data());
}
+TEST_F(LocaleWinTest, shortMonthLabels)
+{
+ EXPECT_STREQ("Jan", shortMonthLabel(EnglishUS, 0).utf8().data());
+ EXPECT_STREQ("Dec", shortMonthLabel(EnglishUS, 11).utf8().data());
+ EXPECT_STREQ("janv.", shortMonthLabel(FrenchFR, 0).utf8().data());
+ EXPECT_STREQ("d\xC3\xA9" "c.", shortMonthLabel(FrenchFR, 11).utf8().data());
+ EXPECT_STREQ("1", shortMonthLabel(JapaneseJP, 0).utf8().data());
+ EXPECT_STREQ("12", shortMonthLabel(JapaneseJP, 11).utf8().data());
+}
+
TEST_F(LocaleWinTest, timeAMPMLabels)
{
EXPECT_STREQ("AM", timeAMPMLabel(EnglishUS, 0).utf8().data());
diff --git a/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp b/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
index 771a3cbc0..88946e84d 100644
--- a/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
+++ b/Source/WebKit/chromium/tests/LocalizedDateICUTest.cpp
@@ -88,6 +88,12 @@ protected:
return Labels(labels);
}
+ String monthFormat(const char* localeString)
+ {
+ OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ return locale->monthFormat();
+ }
+
String localizedDateFormatText(const char* localeString)
{
OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
@@ -100,6 +106,18 @@ protected:
return locale->shortTimeFormat();
}
+ String shortMonthLabel(const char* localeString, unsigned index)
+ {
+ OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ return locale->shortMonthLabels()[index];
+ }
+
+ String shortStandAloneMonthLabel(const char* localeString, unsigned index)
+ {
+ OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
+ return locale->shortStandAloneMonthLabels()[index];
+ }
+
Labels timeAMPMLabels(const char* localeString)
{
OwnPtr<LocaleICU> locale = LocaleICU::create(localeString);
@@ -126,6 +144,13 @@ TEST_F(LocalizedDateICUTest, isRTL)
EXPECT_FALSE(isRTL("**invalid**"));
}
+TEST_F(LocalizedDateICUTest, monthFormat)
+{
+ EXPECT_STREQ("MMM yyyy", monthFormat("en_US").utf8().data());
+ EXPECT_STREQ("MMM yyyy", monthFormat("fr").utf8().data());
+ EXPECT_STREQ("yyyy\xE5\xB9\xB4M\xE6\x9C\x88", monthFormat("ja").utf8().data());
+}
+
TEST_F(LocalizedDateICUTest, localizedDateFormatText)
{
// Note: EXPECT_EQ(String, String) doesn't print result as string.
@@ -141,6 +166,29 @@ TEST_F(LocalizedDateICUTest, localizedShortDateFormatText)
EXPECT_STREQ("H:mm", localizedShortDateFormatText("ja").utf8().data());
}
+TEST_F(LocalizedDateICUTest, shortMonthLabels)
+{
+ EXPECT_STREQ("Jan", shortMonthLabel("en_US", 0).utf8().data());
+ EXPECT_STREQ("Jan", shortStandAloneMonthLabel("en_US", 0).utf8().data());
+ EXPECT_STREQ("Dec", shortMonthLabel("en_US", 11).utf8().data());
+ EXPECT_STREQ("Dec", shortStandAloneMonthLabel("en_US", 11).utf8().data());
+
+ EXPECT_STREQ("janv.", shortMonthLabel("fr_FR", 0).utf8().data());
+ EXPECT_STREQ("janv.", shortStandAloneMonthLabel("fr_FR", 0).utf8().data());
+ EXPECT_STREQ("d\xC3\xA9" "c.", shortMonthLabel("fr_FR", 11).utf8().data());
+ EXPECT_STREQ("d\xC3\xA9" "c.", shortStandAloneMonthLabel("fr_FR", 11).utf8().data());
+
+ EXPECT_STREQ("1\xE6\x9C\x88", shortMonthLabel("ja_JP", 0).utf8().data());
+ EXPECT_STREQ("1\xE6\x9C\x88", shortStandAloneMonthLabel("ja_JP", 0).utf8().data());
+ EXPECT_STREQ("12\xE6\x9C\x88", shortMonthLabel("ja_JP", 11).utf8().data());
+ EXPECT_STREQ("12\xE6\x9C\x88", shortStandAloneMonthLabel("ja_JP", 11).utf8().data());
+
+ EXPECT_STREQ("\xD0\xBC\xD0\xB0\xD1\x80\xD1\x82\xD0\xB0", shortMonthLabel("ru_RU", 2).utf8().data());
+ EXPECT_STREQ("\xD0\xBC\xD0\xB0\xD1\x80\xD1\x82", shortStandAloneMonthLabel("ru_RU", 2).utf8().data());
+ EXPECT_STREQ("\xD0\xBC\xD0\xB0\xD1\x8F", shortMonthLabel("ru_RU", 4).utf8().data());
+ EXPECT_STREQ("\xD0\xBC\xD0\xB0\xD0\xB9", shortStandAloneMonthLabel("ru_RU", 4).utf8().data());
+}
+
TEST_F(LocalizedDateICUTest, timeAMPMLabels)
{
EXPECT_EQ(labels("AM", "PM"), timeAMPMLabels("en_US"));
diff --git a/Source/WebKit/chromium/tests/MockImageDecoder.h b/Source/WebKit/chromium/tests/MockImageDecoder.h
new file mode 100644
index 000000000..5cf23744e
--- /dev/null
+++ b/Source/WebKit/chromium/tests/MockImageDecoder.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MockImageDecoder_h
+
+#include "ImageDecoder.h"
+
+namespace WebCore {
+
+class MockImageDecoder : public ImageDecoder {
+public:
+ MockImageDecoder()
+ : ImageDecoder(ImageSource::AlphaPremultiplied, ImageSource::GammaAndColorProfileApplied)
+ , m_frameBufferRequestCount(0)
+ { }
+
+ virtual String filenameExtension() const
+ {
+ return "mock";
+ }
+
+ virtual ImageFrame* frameBufferAtIndex(size_t)
+ {
+ ++m_frameBufferRequestCount;
+
+ m_frameBufferCache.resize(1);
+ m_frameBufferCache[0].setSize(size().width(), size().height());
+ return &m_frameBufferCache[0];
+ }
+
+ int frameBufferRequestCount() const { return m_frameBufferRequestCount; }
+
+private:
+ int m_frameBufferRequestCount;
+};
+
+} // namespace WebCore
+
+#endif // MockImageDecoder_h