WebKit-https.git
4 years agoFix the build.
timothy_horton@apple.com [Thu, 11 Dec 2014 22:23:30 +0000 (22:23 +0000)]
Fix the build.

* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177182 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agobmalloc should support system memory analysis tools (part 1)
ggaren@apple.com [Thu, 11 Dec 2014 22:17:06 +0000 (22:17 +0000)]
bmalloc should support system memory analysis tools (part 1)
https://bugs.webkit.org/show_bug.cgi?id=139559

Reviewed by Mark Lam.

This patch adds the hooks to disable bmalloc at runtime if certain
environment variables are set, but doesn't actually read from the
environment yet.

No performance change.

* bmalloc.xcodeproj/project.pbxproj: Added the Environment class, which
we'll use to read environment variables and see if memory analysis tools
have been enabled.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::Allocator):
(bmalloc::Allocator::allocateSlowCase): Added a hook to disable bmalloc
on the allocation path. We cache the setting to make the check fast.

* bmalloc/Allocator.h: Interface changes.

* bmalloc/Cache.cpp:
(bmalloc::Cache::Cache): Pass a heap pointer through to our allocator
and deallocator. This main purpose is to enable them to query the
environment for whether bmalloc is enabled; but this is also a slightly
cleaner way to guarantee to them that the Heap has been pre-initialized.

* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::Deallocator): If bmalloc is disable, artificially
fill the object log to force us to take the slow path on all deallocations.

(bmalloc::Deallocator::deallocateSlowCase): Do the disabled check.

* bmalloc/Deallocator.h: Interface changes.

* bmalloc/Environment.cpp: Added.
(bmalloc::Environment::Environment):
(bmalloc::Environment::computeIsBmallocEnabled):
* bmalloc/Environment.h: Added.
(bmalloc::Environment::isBmallocEnabled): This is the class that will
encapsulate looking for environment variables that turn on heap
analysis tools.

* bmalloc/Heap.h:
(bmalloc::Heap::environment):

* bmalloc/Mutex.h:
(bmalloc::Mutex::Mutex):
* bmalloc/StaticMutex.h: A little refactoring to clarify these comments,
since I got super confused about them while writing this patch.

* bmalloc/VMHeap.cpp: Fixed an #include.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177181 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoMove the preview popover to WKImmediateActionController
timothy_horton@apple.com [Thu, 11 Dec 2014 22:00:57 +0000 (22:00 +0000)]
Move the preview popover to WKImmediateActionController
https://bugs.webkit.org/show_bug.cgi?id=139560
<rdar://problem/19208291>

Reviewed by Beth Dakin.

* Shared/API/c/WKImmediateActionTypes.h:
Add a link preview type.

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
Pass the gesture recognizer to the WKImmediateActionController.

(-[WKView _setPreviewTitle:]):
Forward preview title changes to the WKImmediateActionController,
because that's where the preview popover lives now.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
Move WKPagePreviewViewController into its own file.
Move page preview popover related code to WKImmediateActionController.

* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
Compare the gesture recognizers directly instead of their views, for accuracy.
Move page preview popover related code in from WKActionMenuController.
Some of this should eventually move to WKPagePreviewViewController, but
for now for ease of transition we will move it here.

* UIProcess/mac/WKPagePreviewViewController.h: Added.
* UIProcess/mac/WKPagePreviewViewController.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:
Move WKPagePreviewViewController into its own file.

* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
Add some requisite SPI.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177180 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[Mac] Crash in -[WebVideoFullscreenHUDWindowController playing] in WK1 clients withou...
jer.noble@apple.com [Thu, 11 Dec 2014 21:57:57 +0000 (21:57 +0000)]
[Mac] Crash in -[WebVideoFullscreenHUDWindowController playing] in WK1 clients without FULLSCREEN_API enabled.
https://bugs.webkit.org/show_bug.cgi?id=139546

Reviewed by Eric Carlson.

Finish the work started by r173230 and rename mediaElement -> videoElement in WebVideoFullscreenHUDWindowController.

* platform/mac/WebVideoFullscreenHUDWindowController.h:
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController endScrubbing]):
(-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
(-[WebVideoFullscreenHUDWindowController currentTime]):
(-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
(-[WebVideoFullscreenHUDWindowController duration]):
(-[WebVideoFullscreenHUDWindowController decrementVolume]):
(-[WebVideoFullscreenHUDWindowController incrementVolume]):
(-[WebVideoFullscreenHUDWindowController volume]):
(-[WebVideoFullscreenHUDWindowController setVolume:]):
(-[WebVideoFullscreenHUDWindowController playing]):
(-[WebVideoFullscreenHUDWindowController setPlaying:]):
(-[WebVideoFullscreenHUDWindowController remainingTimeText]):
(-[WebVideoFullscreenHUDWindowController elapsedTimeText]):
(-[WebVideoFullscreenHUDWindowController rewind:]):
(-[WebVideoFullscreenHUDWindowController fastForward:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177179 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFix iOS build.
andersca@apple.com [Thu, 11 Dec 2014 21:42:22 +0000 (21:42 +0000)]
Fix iOS build.

* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncDeleteAllOrigins):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177178 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Minor fixes for documentation and translations
commit-queue@webkit.org [Thu, 11 Dec 2014 21:17:44 +0000 (21:17 +0000)]
[GTK] Minor fixes for documentation and translations
https://bugs.webkit.org/show_bug.cgi?id=139450

Patch by Tomas Popela <tpopela@redhat.com> on 2014-12-11
Reviewed by Sergio Villar Senin.

* UIProcess/API/gtk/WebKitNavigationAction.cpp:
Fix typo in documentation.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
Mark zoom-level and is-loading properties names for translation and
when touching them also fix the indentation style.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177177 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agofast/workers/worker-constructor.html frequently crashes
ap@apple.com [Thu, 11 Dec 2014 21:09:08 +0000 (21:09 +0000)]
fast/workers/worker-constructor.html frequently crashes
https://bugs.webkit.org/show_bug.cgi?id=139548

* TestExpectations: Enable it again, going to try clean builds.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177176 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[iOS] Update expected results for LayoutTests/{scrollingcoordinator, security, sputnik,
dbates@webkit.org [Thu, 11 Dec 2014 20:45:35 +0000 (20:45 +0000)]
[iOS] Update expected results for LayoutTests/{scrollingcoordinator, security, sputnik,
storage, svg, tables, transforms, transitions, traversal}

Also skip some animation, css, compositing, transitions, and crypto tests that timeout
when using WebKit1/WebKit2 and remove duplicate and erroneous entries from file
LayoutTests/platform/ios-simulator/TestExpectations.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
[...]

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177175 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agofast/workers/worker-constructor.html frequently crashes
ap@apple.com [Thu, 11 Dec 2014 20:41:01 +0000 (20:41 +0000)]
fast/workers/worker-constructor.html frequently crashes
https://bugs.webkit.org/show_bug.cgi?id=139548

* TestExpectations: Skip the test while Michael is investigating. This is a pre-existing
failure that became a lot more frequent today.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177174 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoRemove a duplicate ChangeLog entry.
andersca@apple.com [Thu, 11 Dec 2014 20:18:48 +0000 (20:18 +0000)]
Remove a duplicate ChangeLog entry.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177173 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoStop using SQLiteFileSystem in the storage code
andersca@apple.com [Thu, 11 Dec 2014 20:17:58 +0000 (20:17 +0000)]
Stop using SQLiteFileSystem in the storage code
https://bugs.webkit.org/show_bug.cgi?id=139549

Reviewed by Sam Weinig.

Just inline the SQLiteFileSystem calls into their respective call sites.
This is more preparation for moving the old storage code into WebKit proper.

* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::deleteEmptyDatabase):
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::trackerDatabasePath):
(WebCore::ensureDatabaseFileExists):
(WebCore::StorageTracker::openTrackerDatabase):
(WebCore::truncateDatabaseFile):
(WebCore::StorageTracker::syncDeleteAllOrigins):
(WebCore::StorageTracker::syncDeleteOrigin):
(WebCore::StorageTracker::diskUsageForOrigin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177172 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoVersioning.
bshafiei@apple.com [Thu, 11 Dec 2014 20:15:28 +0000 (20:15 +0000)]
Versioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177171 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoUnreviewed, rolling out r177155.
ap@apple.com [Thu, 11 Dec 2014 20:08:55 +0000 (20:08 +0000)]
Unreviewed, rolling out r177155.

Caused crashes on webarchive tests.

Reverted changeset:

"[SVG Masking] Enable the use of <mask> elements for -webkit-
mask-image"
https://bugs.webkit.org/show_bug.cgi?id=139294
http://trac.webkit.org/changeset/177155

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177169 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoExplicitly export somre more RWIProtocol classes.
joepeck@webkit.org [Thu, 11 Dec 2014 19:46:25 +0000 (19:46 +0000)]
Explicitly export somre more RWIProtocol classes.
rdar://problem/19220408

Unreviewed build fix.

* inspector/scripts/codegen/generate_objc_configuration_header.py:
(ObjCConfigurationHeaderGenerator._generate_configuration_interface_for_domains):
* inspector/scripts/codegen/generate_objc_header.py:
(ObjCHeaderGenerator._generate_event_interfaces):
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/enum-values.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177168 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoCall StorageThread::releaseFastMallocFreeMemoryInAllThreads from WebKit
andersca@apple.com [Thu, 11 Dec 2014 19:38:56 +0000 (19:38 +0000)]
Call StorageThread::releaseFastMallocFreeMemoryInAllThreads from WebKit
https://bugs.webkit.org/show_bug.cgi?id=139547

Reviewed by Sam Weinig.

Source/WebCore:

This is another step towards moving StorageThread (and friends) to WebKit.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):

Source/WebKit/mac:

* WebView/WebView.mm:
(+[WebView _handleMemoryWarning]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177167 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoASSERTION FAILED: animatedTypes[0].properties.size() == 1 in WebCore::SVGAnimatedType...
dino@apple.com [Thu, 11 Dec 2014 19:35:13 +0000 (19:35 +0000)]
ASSERTION FAILED: animatedTypes[0].properties.size() == 1 in WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue.
https://bugs.webkit.org/show_bug.cgi?id=139046.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2014-12-11
Reviewed by Dirk Schulze.

Source/WebCore:

Test: svg/animations/unsupported-animate-element-attributes.svg.

The SVG base animator element should not animate an attribute if it is not
supported by the target SVG element. Besides the CSS presentation attributes,
every SVG element defines which attributes can be animated by including them
between BEGIN_DECLARE_ANIMATED_PROPERTIES and END_DECLARE_ANIMATED_PROPERTIES
in the definition of the class. This definition builds attribute-properties map.
When restarting the animation, the animator looks for all the attributes that
match the animated attribute name. If the supported attribute-properties map
does not include the animated attribute name, an empty element-properties list
should be returned. When getting an empty element-properties list, the animator
should not start any animation for the unsupported attribute.

Do not start the animation if the animated attribute is not supported by
the target SVG element.
* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::resetAnimatedType):

Return an empty element-properties list if the animated attribute is not
supported by the target SVG element.
* svg/SVGAnimatedTypeAnimator.cpp:
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):

LayoutTests:

Ensure the animation attributes will be ignored by the SVG base animator if
they are not supported by the SVG target element.

* svg/animations/unsupported-animate-element-attributes-expected.svg: Added.
* svg/animations/unsupported-animate-element-attributes.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177166 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoInstancedArray crashes attempting to draw out of bounds
dino@apple.com [Thu, 11 Dec 2014 19:29:18 +0000 (19:29 +0000)]
InstancedArray crashes attempting to draw out of bounds
https://bugs.webkit.org/show_bug.cgi?id=139521
Source/WebCore:

Reviewed by Simon Fraser.

We were not doing index validation correctly for instancing.

Test: fast/canvas/webgl/angle-instanced-arrays-out-of-bounds.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateVertexAttributes): We need to check
the number of instances drawn against the amount of instance data that has
been provided, taking into account the number of repeats (the divisor).
(WebCore::WebGLRenderingContext::drawArrays): Added some whitespace to make it more clear.
(WebCore::WebGLRenderingContext::validateDrawElements): This needs to take a primcount
parameter so that it can correctly validate the call (when used from drawElementsInstanced).
(WebCore::WebGLRenderingContext::drawElements): New signature to validate.
(WebCore::WebGLRenderingContext::drawArraysInstanced): Rearrange this a bit. The
primcount validation is already being done by the validateDrawArrays call. Also, there
was a bogus UNUSED_PARAM hanging around.
(WebCore::WebGLRenderingContext::drawElementsInstanced): Similar rearrangement. Use
the primcount parameter.
* html/canvas/WebGLRenderingContext.h:

LayoutTests:

<rdar://problem/17540398>

Reviewed by Simon Fraser.

This is a copy of the official webgl/1.0.3 test.

* platform/mac-mountainlion/fast/canvas/webgl/angle-instanced-arrays-out-of-bounds-expected.txt: Added. This extension is not available on Mountain Lion.
* fast/canvas/webgl/angle-instanced-arrays-out-of-bounds-expected.txt: Added.
* fast/canvas/webgl/angle-instanced-arrays-out-of-bounds.html: Added.
* fast/canvas/webgl/resources/out-of-bounds-test.js: Added.
(OutOfBoundsTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177165 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoWeb Inspector: Inspector Process crash when navigating to non-inspectable page
commit-queue@webkit.org [Thu, 11 Dec 2014 19:28:13 +0000 (19:28 +0000)]
Web Inspector: Inspector Process crash when navigating to non-inspectable page
https://bugs.webkit.org/show_bug.cgi?id=139508

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-12-11
Reviewed by Zalan Bujtas.

The Inspector Process can still receive InspectorFrontendHost messages
even though the backend connection has been invalidated and cleared.
Only send messages if the connection exists.

* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::openInNewTab):
(WebKit::WebInspectorUI::sendMessageToBackend):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177164 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoWebKit2 should expose FirstVisuallyNonEmptyLayout rendering milestone.
commit-queue@webkit.org [Thu, 11 Dec 2014 19:26:59 +0000 (19:26 +0000)]
WebKit2 should expose FirstVisuallyNonEmptyLayout rendering milestone.
https://bugs.webkit.org/show_bug.cgi?id=139514

Expose DidFirstVisuallyNonEmptyLayout so that WebKit2 client can listen to visually non-empty layout rendering event.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-12-11
Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKRenderingProgressEvents.h: Add WKRenderingProgressEventFirstVisuallyNonEmptyLayout to WKRenderingProgressEvents.
* Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Also map kWKDidFirstVisuallyNonEmptyLayout to WKRenderingProgressEventFirstVisuallyNonEmptyLayout.
(renderingProgressEvents):
* UIProcess/API/Cocoa/WKWebView.mm:
(layoutMilestones): Map _WKRenderingProgressEventFirstVisuallyNonEmptyLayout to WebCore::DidFirstVisuallyNonEmptyLayout.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/NavigationState.mm: Add _WKRenderingProgressEventFirstVisuallyNonEmptyLayout to _WKRenderingProgressEventFirstLayout.
(WebKit::renderingProgressEvents): Map WebCore::DidFirstVisuallyNonEmptyLayout to _WKRenderingProgressEventFirstVisuallyNonEmptyLayout.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177163 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Disable backspace key navigation
commit-queue@webkit.org [Thu, 11 Dec 2014 19:24:47 +0000 (19:24 +0000)]
[GTK] Disable backspace key navigation
https://bugs.webkit.org/show_bug.cgi?id=136231

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-12-11
Reviewed by Carlos Garcia Campos.

* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::performDefaultBehaviorForKeyEvent): remove handling
for backspace and <shift>backspace key combinations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177162 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] String changes for the HTTP authentication dialog
commit-queue@webkit.org [Thu, 11 Dec 2014 19:23:30 +0000 (19:23 +0000)]
[GTK] String changes for the HTTP authentication dialog
https://bugs.webkit.org/show_bug.cgi?id=136782

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-12-11
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
(webkitAuthenticationDialogInitialize): Add a title to the dialog, add
some missing mnemonics, and tweak a few strings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177161 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[iOS] Update expected results for LayoutTests/{js, loader, mathml, pageoverlay, scrol...
dbates@webkit.org [Thu, 11 Dec 2014 18:30:24 +0000 (18:30 +0000)]
[iOS] Update expected results for LayoutTests/{js, loader, mathml, pageoverlay, scrollbars}

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/js/dom/constructor-length-expected.txt: Added.
* platform/ios-simulator/scrollbars/scrollbar-selectors-expected.png: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177160 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoBuild fix.
andersca@apple.com [Thu, 11 Dec 2014 18:23:58 +0000 (18:23 +0000)]
Build fix.

* Storage/WebStorageNamespaceProvider.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177159 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoRemove unused storage header includes
andersca@apple.com [Thu, 11 Dec 2014 18:17:41 +0000 (18:17 +0000)]
Remove unused storage header includes
https://bugs.webkit.org/show_bug.cgi?id=139540

Reviewed by Antti Koivisto.

* storage/StorageAreaImpl.cpp:
* storage/StorageAreaSync.cpp:
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace): Deleted.
(WebCore::StorageNamespaceImpl::sessionStorageNamespace): Deleted.
(WebCore::StorageNamespaceImpl::transientLocalStorageNamespace): Deleted.
* storage/StorageNamespaceImpl.h:
* storage/StorageSyncManager.cpp:
* storage/StorageThread.cpp:
* storage/StorageTracker.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177158 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoReplicate a bunch of PageGroup functions in WebStorageNamespaceProvider
andersca@apple.com [Thu, 11 Dec 2014 18:15:36 +0000 (18:15 +0000)]
Replicate a bunch of PageGroup functions in WebStorageNamespaceProvider
https://bugs.webkit.org/show_bug.cgi?id=139544

Reviewed by Antti Koivisto.

This code is currently unused but will be called by StorageTracker once that class has been
moved from WebCore to WebKit.

* Storage/WebStorageNamespaceProvider.cpp:
(WebStorageNamespaceProvider::clearLocalStorageForAllOrigins):
(WebStorageNamespaceProvider::clearLocalStorageForOrigin):
(WebStorageNamespaceProvider::closeIdleLocalStorageDatabases):
(WebStorageNamespaceProvider::syncLocalStorage):
* Storage/WebStorageNamespaceProvider.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177157 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoExplicitly export some RWIProtocol classes
ap@apple.com [Thu, 11 Dec 2014 18:02:53 +0000 (18:02 +0000)]
Explicitly export some RWIProtocol classes
rdar://problem/19220408

* inspector/scripts/codegen/generate_objc_header.py:
(ObjCHeaderGenerator._generate_type_interface):
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177156 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[SVG Masking] Enable the use of <mask> elements for -webkit-mask-image
antti@apple.com [Thu, 11 Dec 2014 17:54:38 +0000 (17:54 +0000)]
[SVG Masking] Enable the use of <mask> elements for -webkit-mask-image
https://bugs.webkit.org/show_bug.cgi?id=139294

Patch by Radu Stavila <stavila@adobe.com> on 2014-12-11
Reviewed by Simon Fraser.

Source/WebCore:

This patch links together all parts required for the functionality which improves
the -webkit-mask-image property by allowing it to reference a <mask> element defined
in an inline or external SVG document.
Support for this new functionality has been added in a previous patch, under issue
https://bugs.webkit.org/show_bug.cgi?id=139092. A more detailed description of how
the new functionality works can be found in the ChangeLog for that commit.
The containsSVGDocument in ScrollView has been removed because it was added in the
previous patch but is no longer required.

Tests: css3/masking/mask-base64.html
       css3/masking/mask-multiple-values.html
       css3/masking/mask-svg-clipped-fragmentId.html
       css3/masking/mask-svg-fragmentId.html
       css3/masking/mask-svg-inline-fragmentId.html
       css3/masking/mask-svg-inline-invalid-fragmentId.html
       css3/masking/mask-svg-invalid-fragmentId.html
       css3/masking/mask-svg-no-fragmentId-tiled.html
       css3/masking/mask-svg-no-fragmentId.html
       css3/masking/mask-svg-script-entire-svg-to-mask.html
       css3/masking/mask-svg-script-mask-to-entire-svg.html
       css3/masking/mask-svg-script-mask-to-none.html
       css3/masking/mask-svg-script-mask-to-png.html
       css3/masking/mask-svg-script-none-to-mask.html
       css3/masking/mask-svg-script-none-to-png.html
       css3/masking/mask-svg-script-png-to-mask.html
       css3/masking/mask-svg-script-png-to-none.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseMaskImage):
* css/CSSParser.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustStyleForMaskImages):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::createMaskImageOperations):
(WebCore::StyleResolver::loadPendingImages):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper):
(WebCore::MaskImagePropertyWrapper::equals):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::~MaskImageOperation):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::maskClipRect):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::updateFillImages):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/style/FillLayer.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setMaskImage):
* rendering/style/RenderStyle.h:

LayoutTests:

Added tests for different situations using URLs with fragment id
for the -webkit-mask-image property.

* css3/masking/mask-base64-expected.html: Added.
* css3/masking/mask-base64.html: Added.
* css3/masking/mask-multiple-values-expected.html: Added.
* css3/masking/mask-multiple-values.html: Added.
* css3/masking/mask-repeat-space-padding-expected.html:
* css3/masking/mask-repeat-space-padding.html:
* css3/masking/mask-svg-clipped-fragmentId-expected.html: Added.
* css3/masking/mask-svg-clipped-fragmentId.html: Added.
* css3/masking/mask-svg-fragmentId-expected.html: Added.
* css3/masking/mask-svg-fragmentId.html: Added.
* css3/masking/mask-svg-inline-fragmentId-expected.html: Added.
* css3/masking/mask-svg-inline-fragmentId.html: Added.
* css3/masking/mask-svg-inline-invalid-fragmentId-expected.html: Added.
* css3/masking/mask-svg-inline-invalid-fragmentId.html: Added.
* css3/masking/mask-svg-invalid-fragmentId-expected.html: Added.
* css3/masking/mask-svg-invalid-fragmentId.html: Added.
* css3/masking/mask-svg-no-fragmentId-expected.html: Added.
* css3/masking/mask-svg-no-fragmentId-tiled-expected.html: Added.
* css3/masking/mask-svg-no-fragmentId-tiled.html: Added.
* css3/masking/mask-svg-no-fragmentId.html: Added.
* css3/masking/mask-svg-script-entire-svg-to-mask-expected.html: Added.
* css3/masking/mask-svg-script-entire-svg-to-mask.html: Added.
* css3/masking/mask-svg-script-mask-to-entire-svg-expected.html: Added.
* css3/masking/mask-svg-script-mask-to-entire-svg.html: Added.
* css3/masking/mask-svg-script-mask-to-none-expected.html: Added.
* css3/masking/mask-svg-script-mask-to-none.html: Added.
* css3/masking/mask-svg-script-mask-to-png-expected.html: Added.
* css3/masking/mask-svg-script-mask-to-png.html: Added.
* css3/masking/mask-svg-script-none-to-mask-expected.html: Added.
* css3/masking/mask-svg-script-none-to-mask.html: Added.
* css3/masking/mask-svg-script-none-to-png-expected.html: Added.
* css3/masking/mask-svg-script-none-to-png.html: Added.
* css3/masking/mask-svg-script-png-to-mask-expected.html: Added.
* css3/masking/mask-svg-script-png-to-mask.html: Added.
* css3/masking/mask-svg-script-png-to-none-expected.html: Added.
* css3/masking/mask-svg-script-png-to-none.html: Added.
* css3/masking/resources/masks.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177155 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoRestore interface state when stopping optimized fullscreen.
jeremyj-wk@apple.com [Thu, 11 Dec 2014 17:51:25 +0000 (17:51 +0000)]
Restore interface state when stopping optimized fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=139465

Reviewed by Simon Fraser.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController fullscreenMayReturnToInline:]): add empty implementation.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: add declaration
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): restore interface context when optimized mode ends.
(WebVideoFullscreenInterfaceAVKit::setIsOptimized): restore interface context when optimized mode ends.
* UIProcess/API/APIUIClient.h:
(API::UIClient::fullscreenMayReturnToInline): added
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: add declaration
* UIProcess/Cocoa/UIDelegate.h: add declaration
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): check for responds to selector
(WebKit::UIDelegate::UIClient::fullscreenMayReturnToInline): added
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::fullscreenMayReturnToInline): added.
* UIProcess/WebPageProxy.h: add declaration
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: add declaration
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline): show the tab.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177154 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoRemove unused storage header includes
andersca@apple.com [Thu, 11 Dec 2014 17:37:12 +0000 (17:37 +0000)]
Remove unused storage header includes
https://bugs.webkit.org/show_bug.cgi?id=139540

Reviewed by Antti Koivisto.

* storage/StorageAreaImpl.cpp:
* storage/StorageAreaSync.cpp:
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace): Deleted.
(WebCore::StorageNamespaceImpl::sessionStorageNamespace): Deleted.
(WebCore::StorageNamespaceImpl::transientLocalStorageNamespace): Deleted.
* storage/StorageNamespaceImpl.h:
* storage/StorageSyncManager.cpp:
* storage/StorageThread.cpp:
* storage/StorageTracker.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177153 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoREGRESSION (Async Text Input): Text input method state is not reset when reloading...
ap@apple.com [Thu, 11 Dec 2014 17:23:34 +0000 (17:23 +0000)]
REGRESSION (Async Text Input): Text input method state is not reset when reloading a page
https://bugs.webkit.org/show_bug.cgi?id=139504
rdar://problem/19034674

Reviewed by Enrica Casucci.

Source/WebCore:

Explicitly notify EditorClient when a composition is voluntarily canceled by WebCore.
These are almost certainly not all the places where this happens, but this fixes the bug,
and lays the groundwork for using this new client call instead of didChangeSelection
hacks.

* editing/Editor.cpp:
(WebCore::Editor::clear):
(WebCore::Editor::cancelComposition):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::willTransitionToCommitted):
* page/EditorClient.h:

Source/WebKit/mac:

Stub out new client calls, this patch does not attempt to make any changes on WebKit1.

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::discardedComposition):

Source/WebKit/win:

Stub out new client calls, this patch doesn't attempt to make any changes on Windows.

* WebCoreSupport/WebEditorClient.cpp:
(WebEditorClient::discardedComposition):
* WebCoreSupport/WebEditorClient.h:

Source/WebKit2:

WebKit2 used to look at EditorState changes and guess when to cancel a composition.
This was quite unreliable, and needlessly complicated - WebCore knows when it decides
to destroy a composition, so it now explicitly notifies the clients.

* UIProcess/API/mac/WKView.mm: (-[WKView _processDidExit]): Address crashing case too.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::discardedComposition):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
(WebKit::WebPage::discardedComposition):
* WebProcess/WebPage/WebPage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177152 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoGet rid of the storage strategy
andersca@apple.com [Thu, 11 Dec 2014 17:12:54 +0000 (17:12 +0000)]
Get rid of the storage strategy
https://bugs.webkit.org/show_bug.cgi?id=139519

Reviewed by Antti Koivisto.

Source/WebCore:

* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::localStorage):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::sessionStorage):
(WebCore::Page::setStorageNamespaceProvider):
* page/Page.h:
(WebCore::Page::storageNamespaceProvider):
* page/PageGroup.cpp:
(WebCore::PageGroup::localStorage):
(WebCore::PageGroup::transientLocalStorage):
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
(WebCore::PlatformStrategies::storageStrategy): Deleted.
* storage/StorageNamespace.cpp: Removed.
* storage/StorageNamespace.h:
* storage/StorageStrategy.cpp: Removed.
* storage/StorageStrategy.h: Removed.

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createStorageStrategy): Deleted.

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createStorageStrategy): Deleted.
* WebCoreSupport/WebPlatformStrategies.h:

Source/WebKit2:

* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createStorageStrategy): Deleted.
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createStorageStrategy): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177151 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] WebKitNotification is defined twice
carlosgc@webkit.org [Thu, 11 Dec 2014 17:09:24 +0000 (17:09 +0000)]
[GTK] WebKitNotification is defined twice
https://bugs.webkit.org/show_bug.cgi?id=139538

Reviewed by Martin Robinson.

Remove the typedef from WebKitForwardDeclarations.h since it's
already in WebKitNotification.h and include WebKitNotification.h
in WebKitWebView.h.

* UIProcess/API/gtk/WebKitForwardDeclarations.h:
* UIProcess/API/gtk/WebKitWebView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177150 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFix broken build after r177146.
mark.lam@apple.com [Thu, 11 Dec 2014 17:09:04 +0000 (17:09 +0000)]
Fix broken build after r177146.
https://bugs.webkit.org/show_bug.cgi?id=139533

Not reviewed.

* interpreter/CallFrame.h:
(JSC::ExecState::init):
- Restored CallFrame::init() minus the unused JSScope* arg.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
- Remove JSScope* arg when calling CallFrame::init().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177149 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Move click counter logic back to WebKitWebViewBase
carlosgc@webkit.org [Thu, 11 Dec 2014 17:07:42 +0000 (17:07 +0000)]
[GTK] Move click counter logic back to WebKitWebViewBase
https://bugs.webkit.org/show_bug.cgi?id=137685

Reviewed by Martin Robinson.

Source/WebCore:

Remove GtkClickCounter.

* PlatformGTK.cmake:
* platform/gtk/GtkClickCounter.cpp: Removed.
* platform/gtk/GtkClickCounter.h: Removed.

Source/WebKit2:

It was moved to a shared class in platform to be used by both
WebKit1 and WebKit2, but it's currently only used by WebKitWebViewBase.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(ClickCounter::reset):
(ClickCounter::currentClickCountForGdkButtonEvent):
(webkitWebViewBaseButtonPressEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177148 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] REGRESSION(r175555) GTK API Tests run outside the JHBuild.
clopez@igalia.com [Thu, 11 Dec 2014 17:02:46 +0000 (17:02 +0000)]
[GTK] REGRESSION(r175555) GTK API Tests run outside the JHBuild.
https://bugs.webkit.org/show_bug.cgi?id=139537

Reviewed by Carlos Garcia Campos.

* jhbuild/jhbuild-wrapper: Pass the port name in the invocation
of get_dependencies_path().
* jhbuild/jhbuildutils.py:
(get_dependencies_path): Fix the function to return the new
dependencies path: DependenciesPORT.
(enter_jhbuild_environment_if_available): Pass the port name
when invoking get_dependencies_path().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177147 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoREGRESSION: Use of undefined CallFrame::ScopeChain value
msaboff@apple.com [Thu, 11 Dec 2014 16:41:33 +0000 (16:41 +0000)]
REGRESSION: Use of undefined CallFrame::ScopeChain value
https://bugs.webkit.org/show_bug.cgi?id=139533

Reviewed by Mark Lam.

Removed CallFrame::scope() and CallFrame::setScope() and eliminated or changed
all usages of these funcitons.  In some cases the scope is passed in or determined
another way.  In some cases the scope is used to calculate other values.  Lastly
were places where these functions where used that are no longer needed.  For
example when making a call, the caller's ScopeChain was copied to the callee's
ScopeChain.  This change no longer uses the ScopeChain call frame header slot.
That slot will be removed in a future patch.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* runtime/JSLexicalEnvironment.h:
(JSC::JSLexicalEnvironment::create):
(JSC::JSLexicalEnvironment::JSLexicalEnvironment):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_lexical_environment):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_lexical_environment):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::handleHostCall):
(JSC::LLInt::setUpCall):
(JSC::LLInt::llint_throw_stack_overflow_error):
Pass the current scope value to the helper operationCreateActivation() and
the call to JSLexicalEnvironment::create() instead of using the stack frame
scope chain value.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
CreateActivation now has a second child, the scope.

* interpreter/CallFrame.h:
(JSC::ExecState::init): Deleted.  This is dead code.
(JSC::ExecState::scope): Deleted.
(JSC::ExecState::setScope): Deleted.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters): Changed so we didn't access the scope
chain slot.

(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
Changed process to find JSScope values on the stack or by some other means.

* runtime/JSWithScope.h:
(JSC::JSWithScope::JSWithScope): Deleted.
Eliminated unused constructor.

* runtime/StrictEvalActivation.cpp:
(JSC::StrictEvalActivation::StrictEvalActivation):
* runtime/StrictEvalActivation.h:
(JSC::StrictEvalActivation::create):
Changed to pass in the current scope.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177146 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[SOUP] [GTK] warning: unused parameter at NetworkProcessSoup.cpp after r177056.
clopez@igalia.com [Thu, 11 Dec 2014 13:37:09 +0000 (13:37 +0000)]
[SOUP] [GTK] warning: unused parameter at NetworkProcessSoup.cpp after r177056.
https://bugs.webkit.org/show_bug.cgi?id=139534

Reviewed by Martin Robinson.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::clearDiskCache): Comment the parameter names.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177145 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Timers might never be fired during animations
carlosgc@webkit.org [Thu, 11 Dec 2014 11:22:30 +0000 (11:22 +0000)]
[GTK] Timers might never be fired during animations
https://bugs.webkit.org/show_bug.cgi?id=139062

Reviewed by Martin Robinson.

This can happen in old/slow machines where the time to render
layers might take more than 0.016. Since the layer flush timer is
using a higher priority than WebCore timers, when scheduling all
(or several) layer flushes immediately, no other sources with
lower priority are dispatched in the main loop. We could detect if
we are scheduling layer flushes immediately for too long (100ms)
and schedule the next flush after a delay to ensure other sources
with lower priority have a chance to be dispatched. Also use a
lower priority, GDK_PRIORITY_EVENTS is too high, so we use
GDK_PRIORITY_REDRAW - 1 to ensure it's higher than WebCore timers.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Rename
m_lastFlushTime as m_lastImmediateFlushTime.
(WebKit::LayerTreeHostGtk::layerFlushTimerFired): Save the
fireTime before calling flushAndRenderLayers() and compute the
next flush delay based on the elapsed time using monotonically
increasing time instead of current time. Use the target delay
as next flush delay if we have scheduled flushes immediately for
more than 100ms.
(WebKit::LayerTreeHostGtk::flushAndRenderLayers): Do not save the
layer flush time here, it's done in layerFlushTimerFired() so that
we don't need to keep it as a member.
(WebKit::LayerTreeHostGtk::scheduleLayerFlush): Use global
layerFlushTimerPriority.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177144 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Implement sizes attribute for link tag
carlosgc@webkit.org [Thu, 11 Dec 2014 10:31:28 +0000 (10:31 +0000)]
[GTK] Implement sizes attribute for link tag
https://bugs.webkit.org/show_bug.cgi?id=125775

Reviewed by Martin Robinson.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_link_element_set_sizes): Add custom setter implementation.
* bindings/gobject/WebKitDOMCustomUnstable.h:
* bindings/js/JSHTMLLinkElementCustom.cpp:
(WebCore::JSHTMLLinkElement::sizes): Remove custom getter implementation.
* bindings/scripts/CodeGeneratorGObject.pm:
(HasUnstableCustomAPI): Mark WebKitDOMHTMLLinkElement as having custom unstable API.
* html/HTMLLinkElement.idl: Mark sizes attribute as CustomSetter
instead of Custom, since the getter can be autogenerated, and make
it available to the GObject DOM bindings too.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177143 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoMac test expectations gardening.
ap@apple.com [Thu, 11 Dec 2014 08:52:41 +0000 (08:52 +0000)]
Mac test expectations gardening.
https://bugs.webkit.org/show_bug.cgi?id=139472

Removed expectations for tests that are no longer flaky, moved WK1 and WK2 only
expectations to correct files, added more flakiness expectations for tests that
fail with ATI graphics.

* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/mac/canvas/philip/tests/2d.gradient.interpolate.colouralpha-expected.txt: Removed.
* platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177140 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoRemove invalid Apple slave.
lforschler@apple.com [Thu, 11 Dec 2014 08:25:41 +0000 (08:25 +0000)]
Remove invalid Apple slave.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177137 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFix config.json.
lforschler@apple.com [Thu, 11 Dec 2014 08:11:23 +0000 (08:11 +0000)]
Fix config.json.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177136 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agohttp://omfgdogs.info/ only animates when you resize the window
cdumez@apple.com [Thu, 11 Dec 2014 07:41:13 +0000 (07:41 +0000)]
omfgdogs.info/ only animates when you resize the window
https://bugs.webkit.org/show_bug.cgi?id=139435
<rdar://problem/19190493>

Reviewed by Simon Fraser.

Source/WebCore:

After r163928, we would fail to animate a gif if:
- it is used as a background image of a 0-height html element
- it is used as a background image of a 0-height body element whose
  background is delegated to the root (because the root has no
  background).

This is because in such cases, shouldRepaintForImageAnimation()
should use the background rect instead of the renderer's overflow
rect to determine if the image is inside the viewport. Both cases
are addressed in this patch.

Tests: fast/images/animated-gif-body-delegated-background-image.html
       fast/images/animated-gif-body-outside-viewport.html
       fast/images/animated-gif-html-background-image.html

* rendering/RenderElement.cpp:
(WebCore::shouldRepaintForImageAnimation):
* testing/Internals.cpp:
(WebCore::Internals::hasPausedImageAnimations):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add layout tests to make sure a gif image is still animated if:
- It is used as a background image of a 0-height html element
- It is used as a background image of a 0-height body element that
  is delegated to the root (because the root has no background)

Also add a layout test to make sure we still stop the gif animation
if it is used as background image of a body that is outside the
viewport.

* fast/images/animated-gif-body-delegated-background-image-expected.txt: Added.
* fast/images/animated-gif-body-delegated-background-image.html: Added.
* fast/images/animated-gif-body-outside-viewport-expected.txt: Added.
* fast/images/animated-gif-body-outside-viewport.html: Added.
* fast/images/animated-gif-html-background-image-expected.txt: Added.
* fast/images/animated-gif-html-background-image.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177135 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFix the build.
timothy_horton@apple.com [Thu, 11 Dec 2014 07:37:20 +0000 (07:37 +0000)]
Fix the build.

* html/canvas/WebGLDrawBuffers.cpp:
Yosemite is 101000, not 10100.
Also, __MAC_OS_X_VERSION_MIN_REQUIRED is only defined for PLATFORM(MAC).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177134 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoUpdate Apple owned build slaves.
lforschler@apple.com [Thu, 11 Dec 2014 07:22:57 +0000 (07:22 +0000)]
Update Apple owned build slaves.

Rubber-stamped by Dana Burkart.

* BuildSlaveSupport/build.webkit.org-config/config.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177133 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoCopy and paste action menu items don't work on the Mozilla Midas demo in WebKit1
timothy_horton@apple.com [Thu, 11 Dec 2014 06:32:58 +0000 (06:32 +0000)]
Copy and paste action menu items don't work on the Mozilla Midas demo in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=139529
<rdar://problem/19213620>

Reviewed by Beth Dakin.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _copySelection:]):
(-[WebActionMenuController _paste:]):
Use the copy: and paste: methods on WebView so that we traverse subviews
when trying to respond, otherwise these actions don't work in subframes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177132 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoWK1: Add initial support for immediate actions
bdakin@apple.com [Thu, 11 Dec 2014 06:24:01 +0000 (06:24 +0000)]
WK1: Add initial support for immediate actions
https://bugs.webkit.org/show_bug.cgi?id=139522

Reviewed by Dan Bernstein.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

This basic implementation of the controller will use the delegate methods to
perform and cache a HitTest when relevant. Future patches will patch
_updateImmediateActionItem to use the HitTestResult to determine if there is any
immediate action that should be taken.
* WebView/WebImmediateActionController.h: Added.
* WebView/WebImmediateActionController.mm: Added.
(-[WebImmediateActionController webViewClosed]):
(-[WebImmediateActionController _clearImmediateActionState]):
(-[WebImmediateActionController performHitTestAtPoint:]):
(-[WebImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WebImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
(-[WebImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
(-[WebImmediateActionController _updateImmediateActionItem]):

New enum for immediate action types.
* WebView/WebUIDelegatePrivate.h:

Create an NSImmediateActionGestureRecognizer if possible and a controller.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _close]):
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
(-[WebViewPrivate dealloc]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177131 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoUse std::unique_ptr instead of OwnPtr in JSC - heap, jit, runtime, and parser directories
gyuyoung.kim@samsung.com [Thu, 11 Dec 2014 05:31:04 +0000 (05:31 +0000)]
Use std::unique_ptr instead of OwnPtr in JSC - heap, jit, runtime, and parser directories
https://bugs.webkit.org/show_bug.cgi?id=139351

Reviewed by Filip Pizlo.

As a step to use std::unique_ptr<>, this cleans up OwnPtr and PassOwnPtr.

* bytecode/SamplingTool.h:
(JSC::SamplingTool::SamplingTool):
* heap/CopiedBlock.h:
(JSC::CopiedBlock::didSurviveGC):
(JSC::CopiedBlock::pin):
* heap/CopiedBlockInlines.h:
(JSC::CopiedBlock::reportLiveBytes):
* heap/GCActivityCallback.h:
* heap/GCThread.cpp:
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::markListSet):
* jit/ExecutableAllocator.cpp:
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
* jit/JITThunks.cpp:
(JSC::JITThunks::JITThunks):
(JSC::JITThunks::clearHostFunctionStubs):
* jit/JITThunks.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::pushLabel):
* parser/ParserArena.cpp:
* parser/ParserArena.h:
(JSC::ParserArena::identifierArena):
* parser/SourceProviderCache.h:
* runtime/CodeCache.h:
* runtime/Executable.h:
* runtime/JSArray.cpp:
(JSC::JSArray::sortVector):
* runtime/JSGlobalObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177130 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[iOS] REGRESSION (r174642): Watchdog timer expiration reported as DumpRenderTree.app
dbates@webkit.org [Thu, 11 Dec 2014 03:54:28 +0000 (03:54 +0000)]
[iOS] REGRESSION (r174642): Watchdog timer expiration reported as DumpRenderTree.app
timeout instead of test failure
https://bugs.webkit.org/show_bug.cgi?id=139525

Reviewed by Zalan Bujtas.

Increase the default process timeout limit in run-webkit-tests to 80ms to prevent
run-webkit-tests from prematurely terminating DumpRenderTree.app before it dumps
output.

Following <http://trac.webkit.org/changeset/174642>, DumpRenderTree.app waits
for the WebThread to spin its run loop before dumping its output. A test that
calls testRunner.waitUntilDone() and does not subsequently call testRunner.notifyDone()
before DumpRenderTree.app's watchdog timer expires may be incorrectly reported
by run-webkit-tests as a DumpRenderTree.app timeout instead of a test failure
because run-webkit-tests may terminate a DumpRenderTree.app process when it
exceeds its process time limit (defaults to 35ms) regardless of whether such
a DumpRenderTree.app process was waiting for the WebThread to run so as to dump output.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.default_timeout_ms):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177129 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoContinuously repainting large parts of Huffington Post.
zalan@apple.com [Thu, 11 Dec 2014 03:29:29 +0000 (03:29 +0000)]
Continuously repainting large parts of Huffington Post.
https://bugs.webkit.org/show_bug.cgi?id=139468

Reviewed by Antti Koivisto.

This patch eliminates redundant repaint requests for inlines when neither the parent
block flow nor any of the inline children are dirty.
Previously,
1. simple line layout always recalculated inline content positions regardless of whether
the content needed relayout at all; as a result, it always triggered full repaint.
2. inline tree layout ignored the needslayout flag on the last line and treated it dirty
(unless it broke cleanly (<div>foo<br></div>)).
This was an ancient workaround for an editing/insert use case, but it seems not to be the case anymore.

Source/WebCore:

Tests: fast/repaint/implicitly-positioned-block-repaint-complex-line-layout.html
       fast/repaint/implicitly-positioned-block-repaint-simple-line-layout.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::layoutSimpleLines): Check if we need to trigger layout at all.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::determineStartPosition): Remove the last line dirty hack. If it
happens to introduce regression, we should fix it at the caller site to make the line dirty.

LayoutTests:

* fast/repaint/implicitly-positioned-block-repaint-complex-line-layout-expected.txt: Added.
* fast/repaint/implicitly-positioned-block-repaint-complex-line-layout.html: Added.
* fast/repaint/implicitly-positioned-block-repaint-simple-line-layout-expected.txt: Added.
* fast/repaint/implicitly-positioned-block-repaint-simple-line-layout.html: Added.
* platform/mac/fast/line-grid/line-align-right-edges-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177128 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoUpdate Apple bot list.
lforschler@apple.com [Thu, 11 Dec 2014 03:04:58 +0000 (03:04 +0000)]
Update Apple bot list.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177127 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoAdd an empty storage namespace provider
andersca@apple.com [Thu, 11 Dec 2014 02:35:06 +0000 (02:35 +0000)]
Add an empty storage namespace provider
https://bugs.webkit.org/show_bug.cgi?id=139520

Reviewed by Tim Horton.

* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177126 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[CMake] Fix build after WebStorageNamespaceProvider
ljaehun.lim@samsung.com [Thu, 11 Dec 2014 02:33:57 +0000 (02:33 +0000)]
[CMake] Fix build after WebStorageNamespaceProvider

Unreviewed, fix build.

* CMakeLists.txt: Add WebStorageNamespaceProvider.cpp to the source list.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177125 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoSpeculative build fix.
bdakin@apple.com [Thu, 11 Dec 2014 02:30:46 +0000 (02:30 +0000)]
Speculative build fix.

* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177124 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoBuild fix for EFL and GTK ports since r177104
gyuyoung.kim@samsung.com [Thu, 11 Dec 2014 02:11:08 +0000 (02:11 +0000)]
Build fix for EFL and GTK ports since r177104
https://bugs.webkit.org/show_bug.cgi?id=139513

Patch by Sanghyup Lee <sh53.lee@samsung.com> on 2014-12-10
Reviewed by Tim Horton.

Moved WebPageProxy::installViewStateChangeCompletionHandler in PLATFORM(MAC) macro.

* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177123 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoRemove expectations that were incorrectly landed in http://trac.webkit.org/changeset...
ap@apple.com [Thu, 11 Dec 2014 01:59:00 +0000 (01:59 +0000)]
Remove expectations that were incorrectly landed in trac.webkit.org/changeset/176778

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177122 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFix a typo in the rpevious commit.
ap@apple.com [Thu, 11 Dec 2014 01:54:46 +0000 (01:54 +0000)]
Fix a typo in the rpevious commit.

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177121 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFix lint warnings on Mac TestExpectations.
ap@apple.com [Thu, 11 Dec 2014 01:51:38 +0000 (01:51 +0000)]
Fix lint warnings on Mac TestExpectations.

* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177120 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoUse the new storage namespace provider in WebKit1
andersca@apple.com [Thu, 11 Dec 2014 01:31:52 +0000 (01:31 +0000)]
Use the new storage namespace provider in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=139425

Reviewed by Tim Horton.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
Set the storage namespace provider from the web page group.

Source/WebKit/win:

* WebView.cpp:
(localStorageDatabasePath):
Helper from getting the local storage database path given a WebPreferences instance.

(WebView::initWithFrame):
Create a storage namespace provider.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177119 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoSwitch WebKit2 over to using the storage namespace provider
andersca@apple.com [Thu, 11 Dec 2014 01:18:14 +0000 (01:18 +0000)]
Switch WebKit2 over to using the storage namespace provider
https://bugs.webkit.org/show_bug.cgi?id=139509

Reviewed by Tim Horton.

* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
(WebKit::localStorageNamespaceMap): Deleted.
Get rid of the storage namespace map - we have a map inside WebStorageNamespaceProvider now.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createStorageStrategy):
(WebKit::WebPlatformStrategies::populatePluginCache): Deleted.
(WebKit::WebPlatformStrategies::localStorageNamespace): Deleted.
(WebKit::WebPlatformStrategies::transientLocalStorageNamespace): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
Get rid of the storage strategy.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Set a storage namespace provider.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177118 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago Follow-up build fix.
bdakin@apple.com [Thu, 11 Dec 2014 01:10:48 +0000 (01:10 +0000)]
 Follow-up build fix.

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177116 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoNull dereference performing a "TapAndAHalf" gesture in Google search field
jhoneycutt@apple.com [Thu, 11 Dec 2014 01:10:02 +0000 (01:10 +0000)]
Null dereference performing a "TapAndAHalf" gesture in Google search field

<https://bugs.webkit.org/show_bug.cgi?id=139506>
<rdar://problem/19028828>

Reviewed by Darin Adler.

.:

* ManualTests/ios/tap-and-a-half-gesture-in-empty-text-field.html: Added.

Source/WebKit2:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
Add a null check in the case that there is no word range for the
current position.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177115 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoSpeculative build fix.
bdakin@apple.com [Thu, 11 Dec 2014 01:05:32 +0000 (01:05 +0000)]
Speculative build fix.

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177114 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoWK2: Add initial support for immediate actions
bdakin@apple.com [Thu, 11 Dec 2014 00:14:21 +0000 (00:14 +0000)]
WK2: Add initial support for immediate actions
https://bugs.webkit.org/show_bug.cgi?id=139511

Reviewed by Tim Horton.

Source/WebCore:

SPI needed for immediate actions.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h: Added.

Source/WebKit2:

New enum to track immediate action types as we add them.
* Shared/API/c/WKImmediateActionTypes.h: Added.

Create an NSImmediateActionGestureRecognizer if possible and a controller.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView initWithFrame:context:configuration:webView:]):
(-[WKView _didPerformActionMenuHitTest:userData:]):

This basic implementation of the controller will use the delegate methods to
perform an ActionMenuHitTest when relevant. Future patches will patch
_updateImmediateActionItem to use the hit test result to determine if there is any
immediate action that should be taken.
* UIProcess/mac/WKImmediateActionController.h: Added.
* UIProcess/mac/WKImmediateActionController.mm: Added.
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):

Does much of the work done in Action Menu’s prepareForMenu.
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):

Does much of the work done in Action Menu’s menuNeedsUpdate.
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):

Does much of the work done in Action Menu’s didCloseMenu.
(-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):

Does much of the work done in Action Menu’s willOpenMenu.
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):

To be filled in.
(-[WKImmediateActionController _updateImmediateActionItem]):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoMark more tests that fail on EWS bots with ATI graphics.
ap@apple.com [Wed, 10 Dec 2014 23:55:37 +0000 (23:55 +0000)]
Mark more tests that fail on EWS bots with ATI graphics.

* platform/mac/TestExpectations:

* platform/mac/fast/canvas/canvas-draw-canvas-on-canvas-shadow-expected.txt: Removed.
* platform/mac/fast/canvas/canvas-fillRect-gradient-shadow-expected.txt: Removed.
These were expecting failure, but the tests pass on regular bots.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177112 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoShould have copy and paste items in all text menus
timothy_horton@apple.com [Wed, 10 Dec 2014 23:48:41 +0000 (23:48 +0000)]
Should have copy and paste items in all text menus
https://bugs.webkit.org/show_bug.cgi?id=139510
<rdar://problem/19198388>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForText]):
Add a disabled paste menu item into the read-only text menu.

(-[WKActionMenuController _defaultMenuItemsForWhitespaceInEditableArea]):
Add a disabled copy menu item into the editable whitespace text menu.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForText]):
Add a disabled paste menu item into the read-only text menu.

(-[WebActionMenuController _defaultMenuItemsForWhitespaceInEditableArea]):
Add a disabled copy menu item into the editable whitespace text menu.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177111 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[iOS] Add setting to ignore viewport scaling constraints
mhock@apple.com [Wed, 10 Dec 2014 23:42:51 +0000 (23:42 +0000)]
[iOS] Add setting to ignore viewport scaling constraints
https://bugs.webkit.org/show_bug.cgi?id=139466
<rdar://problem/19200328>

Reviewed by Benjamin Poulain.

Source/WebCore:

* WebCore.exp.in:
* page/Settings.in: Add setting to ignore viewport scaling constraints.
* page/ViewportConfiguration.cpp: Ignore viewport scaling constraints based on preference.
(WebCore::ViewportConfiguration::initialScale):
(WebCore::ViewportConfiguration::minimumScale):
(WebCore::ViewportConfiguration::allowsUserScaling):
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::setIgnoreScalingConstraints):
(WebCore::ViewportConfiguration::allowsUserScaling): Moved to cpp.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h: Add ignoreViewportScalingConstraints preference.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetIgnoreViewportScalingConstraints):
(WKPreferencesGetIgnoreViewportScalingConstraints):
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177110 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoWeb Inspector: Hide Compositing Borders Button if backend returns an error that it...
joepeck@webkit.org [Wed, 10 Dec 2014 23:31:09 +0000 (23:31 +0000)]
Web Inspector: Hide Compositing Borders Button if backend returns an error that it is unsupported
https://bugs.webkit.org/show_bug.cgi?id=139307

Reviewed by Darin Adler.

* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177108 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoSpeculative fix for assertion "frame().view() == this"
akling@apple.com [Wed, 10 Dec 2014 23:19:41 +0000 (23:19 +0000)]
Speculative fix for assertion "frame().view() == this"
<rdar://problem/18419449>

Rubber-stamped by Anders Carlsson.

I have not reproduced this issue, but we can safely ignore animation
notifications for cached pages.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::newImageAnimationFrameAvailable):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177107 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFix the build.
timothy_horton@apple.com [Wed, 10 Dec 2014 23:16:22 +0000 (23:16 +0000)]
Fix the build.

* UIProcess/API/mac/WKView.mm:
(-[WKView _targetWindowForMovePreparation]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177106 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoRename layoutTestController to testRunner in TestExpectations.
ap@apple.com [Wed, 10 Dec 2014 23:07:50 +0000 (23:07 +0000)]
Rename layoutTestController to testRunner in TestExpectations.

* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/win-xp/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177105 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoProvide SPI to asynchronously move a WKView into a window and know when it has painted
timothy_horton@apple.com [Wed, 10 Dec 2014 23:00:13 +0000 (23:00 +0000)]
Provide SPI to asynchronously move a WKView into a window and know when it has painted
https://bugs.webkit.org/show_bug.cgi?id=139460
<rdar://problem/19135389>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Add _prepareForMoveToWindow:withCompletionHandler:, which internally
goes through the motions of being parented in that window and calls
the completion handler once painting is done and the view is ready
to be displayed (upon which we expect the view to actually move into the window).

* UIProcess/API/mac/WKView.mm:
(-[WKView viewWillMoveToWindow:]):
If we currently have a _targetWindowForMovePreparation (and are
pretending to be in that window), avoid performing viewWillMoveToWindow:
for a different window.

(-[WKView viewDidMoveToWindow]):
(-[WKView doWindowDidChangeScreen]):
(-[WKView _intrinsicDeviceScaleFactor]):
(-[WKView _colorSpace]):
(-[WKView _targetWindowForMovePreparation]):
If we have a _targetWindowForMovePreparation, use its properties instead
of self.window's.

(-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
Simulate a move into the target window, but defer sending the view state update.
Then, send the view state update after registering the completion handler.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Rename m_viewStateChangeWantsReply to m_viewStateChangeWantsSynchronousReply.

(WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
Added. Allow installing a block that will be called the next time
we get a didUpdateViewState back from the WebProcess after pushing the
current view state changes.

(WebKit::WebPageProxy::viewStateDidChange):
Adapt to the aforementioned rename.

(WebKit::WebPageProxy::dispatchViewStateChange):
Adapt to the aforementioned rename.
Send the view state change callback IDs along with SetViewState.

(WebKit::WebPageProxy::updateViewState):
Adapt to the aforementioned rename.

* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::activeWindow):
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewVisibleOrOccluded):
(WebKit::PageClientImpl::isViewInWindow):
(WebKit::PageClientImpl::viewLayerHostingMode):
If we have a _targetWindowForMovePreparation, use its properties instead
of the WKView's window's.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::viewStateDidChange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setViewState):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
Push the callback IDs to the WebProcess, and accumulate them in TiledCoreAnimationDrawingArea.

(WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired):
Call all of the callbacks after one runloop cycle, just like DidUpdateViewState.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177104 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agomedia/video-controls-no-scripting.html is flaky
ap@apple.com [Wed, 10 Dec 2014 22:50:28 +0000 (22:50 +0000)]
media/video-controls-no-scripting.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=137368

* platform/mac/TestExpectations: Update expectations to expect flakiness on all
OS X versions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177103 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoAdd session storage handling to StorageNamespaceProvider
andersca@apple.com [Wed, 10 Dec 2014 22:48:07 +0000 (22:48 +0000)]
Add session storage handling to StorageNamespaceProvider
https://bugs.webkit.org/show_bug.cgi?id=139507

Reviewed by Tim Horton.

Source/WebCore:

* page/Page.cpp:
(WebCore::Page::sessionStorage):
* storage/StorageNamespaceProvider.h:

Source/WebKit:

* Storage/WebStorageNamespaceProvider.cpp:
(WebStorageNamespaceProvider::createSessionStorageNamespace):
* Storage/WebStorageNamespaceProvider.h:

Source/WebKit2:

* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
* WebProcess/Storage/StorageNamespaceImpl.h:
* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
* WebProcess/Storage/WebStorageNamespaceProvider.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177102 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoUnreviewed. Follow-up patch to r177099.
roger_fong@apple.com [Wed, 10 Dec 2014 22:33:15 +0000 (22:33 +0000)]
Unreviewed. Follow-up patch to r177099.
https://bugs.webkit.org/show_bug.cgi?id=133634
<rdar://problem/15949588>
Enable GL_EXT_draw_buffers on iOS as well.
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177101 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoImplement the rest of the transient local storage namespace code
andersca@apple.com [Wed, 10 Dec 2014 22:31:52 +0000 (22:31 +0000)]
Implement the rest of the transient local storage namespace code
https://bugs.webkit.org/show_bug.cgi?id=139505

Reviewed by Tim Horton.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::TransientLocalStorageNamespace::create):
(WebKit::StorageManager::TransientLocalStorageNamespace::~TransientLocalStorageNamespace):
(WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::StorageManager::TransientLocalStorageNamespace::clearAllStorageAreas):
(WebKit::StorageManager::TransientLocalStorageNamespace::TransientLocalStorageNamespace):
Introduce a new TransientLocalStorageNamespace that's just a glorified SecurityOrigin -> StorageArea HashMap.

(WebKit::StorageManager::StorageArea::create):
Change the return type to RefPtr.

(WebKit::StorageManager::deleteEntriesForOrigin):
(WebKit::StorageManager::deleteAllEntries):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
Use lambdas instead of bind. Delete the transient local storage as well.

(WebKit::StorageManager::createTransientLocalStorageMap):
Get a transient local storage namespace and ask it for a storage area.

(WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
Look up the namespace from the map and create one if it doesn't exist.

(WebKit::StorageManager::deleteEntriesForOriginInternal): Deleted.
(WebKit::StorageManager::deleteAllEntriesInternal): Deleted.

* UIProcess/Storage/StorageManager.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177100 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoImplement Multiple Render Targets as WebGL 1 extension.
roger_fong@apple.com [Wed, 10 Dec 2014 22:12:35 +0000 (22:12 +0000)]
Implement Multiple Render Targets as WebGL 1 extension.
https://bugs.webkit.org/show_bug.cgi?id=133634.
<rdar://problem/15949588>
Reviewed by Brent Fulgham.
Tested by:
webgl/1.0.3/conformance/extensions/webgl-draw-buffers.html
Enable the implementation now that an underlying driver bug has been resolved.
Do not enable for desktop platforms older that OS X 10.10.
* html/canvas/WebGLDrawBuffers.cpp:
(WebCore::WebGLDrawBuffers::supported):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177099 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoREGRESSION(r164329): Input fields are not honoring the maxlength attribute
rniwa@webkit.org [Wed, 10 Dec 2014 22:10:23 +0000 (22:10 +0000)]
REGRESSION(r164329): Input fields are not honoring the maxlength attribute
https://bugs.webkit.org/show_bug.cgi?id=139447

Reviewed by Benjamin Poulain.

Source/WebCore:

The bug was caused by String::substring being called with the selection's end offset
in the second argument instead of the selection's length in handleBeforeTextInsertedEvent.

Fixed the bug by passing the right second argument to String::substring.

Test: fast/forms/input-maxlength-inserting-in-middle.html

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):

LayoutTests:

Added regression tests.

* fast/forms/input-maxlength-inserting-in-middle-expected.txt: Added.
* fast/forms/input-maxlength-inserting-in-middle.html: Added.
* fast/forms/input-maxlength-paste-clusters-in-middle-expected.txt: Added.
* fast/forms/input-maxlength-paste-clusters-in-middle.html: Added.
* fast/forms/input-maxlength-paste-in-middle-expected.txt: Added.
* fast/forms/input-maxlength-paste-in-middle.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177098 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoAdd a missing null check.
andersca@apple.com [Wed, 10 Dec 2014 21:20:23 +0000 (21:20 +0000)]
Add a missing null check.

* page/Page.cpp:
(WebCore::Page::~Page):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177092 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoPlease disable the webkitFirstVersionWithInitConstructorSupport check on Apple TV
ggaren@apple.com [Wed, 10 Dec 2014 21:10:48 +0000 (21:10 +0000)]
Please disable the webkitFirstVersionWithInitConstructorSupport check on Apple TV
https://bugs.webkit.org/show_bug.cgi?id=139501

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

NSVersionOfLinkTimeLibrary only works if you link directly against
JavaScriptCore, which is a bit awkward for our Apple TV client to do.

It's easy enough just to disable this check on Apple TV, since it has no
backwards compatibility requirement.

* API/JSWrapperMap.mm:
(supportsInitMethodConstructors):

Source/WTF:

Added a platform definition for APPLETV.

(It's not an OS because it's not mutually exclusive with other OS definitions.)

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177091 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoBegin fixing transient local storage handling
andersca@apple.com [Wed, 10 Dec 2014 21:00:09 +0000 (21:00 +0000)]
Begin fixing transient local storage handling
https://bugs.webkit.org/show_bug.cgi?id=139503

Reviewed by Sam Weinig.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createTransientLocalStorageMap):
* UIProcess/Storage/StorageManager.h:
Add empty stub implementation of createTransientLocalStorageMap.

* UIProcess/Storage/StorageManager.messages.in:
Add CreateTransientLocalStorageMap message.

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
If we have a local storage namespace with a non-null top-level origin, create a
transient local storage map.

* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
Pass a null top-level origin to the StorageNamespaceImpl constructor.

(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
Create a new StorageNamespaceImpl, passing the top-level origin to the constructor.

(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
Pass a null top-level origin to the StorageNamespaceImpl constructor.

(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
Add a top-level origin parameter.

* WebProcess/Storage/StorageNamespaceImpl.h:
(WebKit::StorageNamespaceImpl::topLevelOrigin):
Add top-level origin member and getter.

* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
Call StorageNamespaceImpl::createTransientLocalStorageNamespace.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177090 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoCrash when creating CSSCalcBinaryOperation
antti@apple.com [Wed, 10 Dec 2014 20:46:15 +0000 (20:46 +0000)]
Crash when creating CSSCalcBinaryOperation
https://bugs.webkit.org/show_bug.cgi?id=134886
rdar://problem/17663561

Reviewed by Chris Dumez.

Source/WebCore:

Test: fast/css/calc-binary-operation-crash.html

* css/CSSCalculationValue.cpp:
(WebCore::determineCategory):

Ensure that both axis are within the addSubtractResult table.
Remove unneeded CalcOther test. The call site guarantees it doesn't happen and the normal cases would handle it anyway.
Also strengthen some asserts.

LayoutTests:

* fast/css/calc-binary-operation-crash-expected.txt: Added.
* fast/css/calc-binary-operation-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177089 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoBlur filter performance test doesn't provide results
dino@apple.com [Wed, 10 Dec 2014 20:43:18 +0000 (20:43 +0000)]
Blur filter performance test doesn't provide results
https://bugs.webkit.org/show_bug.cgi?id=139462

Reviewed by Sam Weinig.

This can't currently work under our performance test
infrastructure. Move it to a manual test to avoid
putting FAILures into the results.

* ManualTests/blur-filter-timing.html: Renamed from PerformanceTests/Interactive/blur-filter-timing.html.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177088 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoAdd WebStorageNamespaceProvider::closeLocalStorage
andersca@apple.com [Wed, 10 Dec 2014 20:10:02 +0000 (20:10 +0000)]
Add WebStorageNamespaceProvider::closeLocalStorage
https://bugs.webkit.org/show_bug.cgi?id=139502

Reviewed by Tim Horton.

Source/WebCore:

* page/Page.cpp:
(WebCore::Page::~Page):
Call StorageNamespaceProvider::removePage.

* storage/StorageNamespaceProvider.h:
(WebCore::StorageNamespaceProvider::optionalLocalStorageNamespace):
Helper function that returns the local storage namespace if one exists.

Source/WebKit:

* Storage/WebStorageNamespaceProvider.cpp:
(storageNamespaceProviders):
(WebStorageNamespaceProvider::WebStorageNamespaceProvider):
(WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
Keep track of all live storage namespace providers.

(WebStorageNamespaceProvider::closeLocalStorage):
Loop through all storage namespace providers and call close() on their local storage namespaces.

* Storage/WebStorageNamespaceProvider.h:

Source/WebKit/mac:

* WebView/WebView.mm:
(+[WebView _applicationWillTerminate]):
Call WebStorageNamespaceProvider::closeLocalStorage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoAX: [ATK] MathML tokens with text fail to expose their text content via AtkText
jdiggs@igalia.com [Wed, 10 Dec 2014 19:57:33 +0000 (19:57 +0000)]
AX: [ATK] MathML tokens with text fail to expose their text content via AtkText
https://bugs.webkit.org/show_bug.cgi?id=139454

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the text content of the element for non-anonymous RenderMathMLOperators.
This is needed because for ATK we expose the rendered element itself; not the
descendant text renderers. Also include MathML tokens as objects which should
implement AtkText.

Test: accessibility/math-text.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):

LayoutTests:

* accessibility/math-text.html: Added.
* platform/efl/accessibility/math-text-expected.txt: Added.
* platform/gtk/accessibility/math-text-expected.txt: Added.
* platform/mac/accessibility/math-text-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177086 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GStreamer] Use appsrcs instead of unconnected queues
commit-queue@webkit.org [Wed, 10 Dec 2014 19:43:00 +0000 (19:43 +0000)]
[GStreamer] Use appsrcs instead of unconnected queues
https://bugs.webkit.org/show_bug.cgi?id=139490

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-10
Reviewed by Philippe Normand.

* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webkit_web_audio_src_init):
(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcFinalize):
(webKitWebAudioSrcSetProperty):
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):
Previously we directly chained buffers into unconnected queues,
which confused some code inside GStreamer and caused some harmless
warnings. Now we use appsrcs instead, which also allows us to remove
quite some code.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177085 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoImplement WebStorageNamespaceProvider::createLocalStorageNamespace
andersca@apple.com [Wed, 10 Dec 2014 19:41:37 +0000 (19:41 +0000)]
Implement WebStorageNamespaceProvider::createLocalStorageNamespace
https://bugs.webkit.org/show_bug.cgi?id=139498

Reviewed by Beth Dakin.

* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
Add a new overload that takes an identifier + quota. Have the old overload call the new one.

* WebProcess/Storage/StorageNamespaceImpl.h:
Add new member.

* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
Call StorageNamespaceImpl::createLocalStorageNamespace.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177084 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFixes operationPutByIds such that they check that the put didn't
mmirman@apple.com [Wed, 10 Dec 2014 19:36:32 +0000 (19:36 +0000)]
Fixes operationPutByIds such that they check that the put didn't
change the structure of the object who's property access is being
cached.
https://bugs.webkit.org/show_bug.cgi?id=139196

Reviewed by Filip Pizlo.

* jit/JITOperations.cpp:
(JSC::operationGetByIdOptimize): changed get to getPropertySlot
(JSC::operationPutByIdStrictBuildList): saved the structure before the put.
(JSC::operationPutByIdNonStrictBuildList): ditto.
(JSC::operationPutByIdDirectStrictBuildList): ditto.
(JSC::operationPutByIdDirectNonStrictBuildList): ditto.
* jit/Repatch.cpp:
(JSC::tryCachePutByID): fixed structure() to use the existant vm.
(JSC::tryBuildPutByIdList): Added a check that the old structure's id
is the same as the new.
(JSC::buildPutByIdList): Added an argument
* jit/Repatch.h:
(JSC::buildPutByIdList): Added an argument
* tests/stress/put-by-id-strict-build-list-order.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177083 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoAdd a stubbed out WebStorageNamespaceProvider class to WebKit2
andersca@apple.com [Wed, 10 Dec 2014 19:25:42 +0000 (19:25 +0000)]
Add a stubbed out WebStorageNamespaceProvider class to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139497

Reviewed by Beth Dakin.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Storage/WebStorageNamespaceProvider.cpp: Added.
(WebKit::storageNamespaceProviders):
(WebKit::WebStorageNamespaceProvider::getOrCreate):
(WebKit::WebStorageNamespaceProvider::WebStorageNamespaceProvider):
(WebKit::WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
* WebProcess/Storage/WebStorageNamespaceProvider.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177082 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoFix iOS builders for 8.0
enrica@apple.com [Wed, 10 Dec 2014 19:25:11 +0000 (19:25 +0000)]
Fix iOS builders for 8.0
https://bugs.webkit.org/show_bug.cgi?id=139495

Reviewed by Eric Carlson.

Source/WebCore:

* WebCore.exp.in:
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:mode:]):
(-[WebVideoFullscreenController requestHideAndExitFullscreen]):
(-[WebVideoFullscreenController enterFullscreen:]): Deleted.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoOptimized]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177081 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[Curl] Cache entry is sometimes deleted when request receives a not modified response.
commit-queue@webkit.org [Wed, 10 Dec 2014 18:54:26 +0000 (18:54 +0000)]
[Curl] Cache entry is sometimes deleted when request receives a not modified response.
https://bugs.webkit.org/show_bug.cgi?id=139339

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-12-10
Reviewed by Alex Christensen.

Sometimes it happens that a request receives a not modified response,
but the cache entry has already been deleted by another request.
This can be avoided by locking a cache entry while there are pending
requests for the cache entry's url.

* platform/network/curl/CurlCacheEntry.h:
(WebCore::CurlCacheEntry::addClient):
(WebCore::CurlCacheEntry::removeClient):
(WebCore::CurlCacheEntry::hasClients):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::didReceiveResponse):
(WebCore::CurlCacheManager::didFail):
(WebCore::CurlCacheManager::addCacheEntryClient):
(WebCore::CurlCacheManager::removeCacheEntryClient):
* platform/network/curl/CurlCacheManager.h:
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isHttpNotModified):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::initializeHandle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177080 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GStreamer] Use a buffer pool for allocations in the AudioDestination
philn@webkit.org [Wed, 10 Dec 2014 18:38:25 +0000 (18:38 +0000)]
[GStreamer] Use a buffer pool for allocations in the AudioDestination
https://bugs.webkit.org/show_bug.cgi?id=139487

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-10
Reviewed by Philippe Normand.

* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):
Use a buffer pool for the allocations instead of allocating a
new small buffer for every 128 samples we produce.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177079 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Add support for text-decoration-skip
mrobinson@webkit.org [Wed, 10 Dec 2014 18:37:39 +0000 (18:37 +0000)]
[GTK] Add support for text-decoration-skip
https://bugs.webkit.org/show_bug.cgi?id=131540

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

No new tests. This is covered by existing layout tests.

* platform/graphics/cairo/FontCairo.cpp:
(WebCore::GlyphIterationState): Added this class, a modified version of the Mac
port's implementation.
(WebCore::Font::dashesForIntersectionsWithRect): Ditto.
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::Font::getGlyphsAndAdvancesForComplexText): Added an implementation for
HarfBuzz that just fills out the GlyphBuffer, but does not render it.
(WebCore::Font::drawComplexText): Use the new getGlyphsAndAdvancesForComplexText
in a similar way to the Mac port.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun): We need to pass the current
character index to GlyphBuffer:add since it's used by dashesForIntersectionsWithRect
and otherwise it will be uninitialized when we try to access it.

Source/WTF:

* wtf/Platform.h: Enable text decoration skip by default.

LayoutTests:

* platform/gtk/TestExpectations: Unskip a test relying on text-decoration-skip
and skip a new test that has a newly exposed, but unrelated issue.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177078 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Unreviewed GTK gardening.
clopez@igalia.com [Wed, 10 Dec 2014 18:15:13 +0000 (18:15 +0000)]
[GTK] Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Report and mark new failures.
* platform/gtk/accessibility/media-emits-object-replacement-expected.txt: Rebaseline after r177015.
* platform/gtk/fast/box-sizing/box-sizing-expected.txt: Rebaseline after 176978.
* platform/gtk/fast/forms/basic-selects-expected.txt: Rebaseline after r176978.
* platform/gtk/fast/forms/search-vertical-alignment-expected.txt: Rebaseline after 176978.
* platform/gtk/fast/forms/searchfield-heights-expected.txt: Rebaseline after r176978.
* platform/gtk/fast/forms/textfield-overflow-by-value-update-expected.txt: Rebaseline after r176978.
* platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt: Rebaseline after r177015.
* platform/gtk/fast/layers/video-layer-expected.txt: Rebaseline after r177015.
* platform/gtk/fast/multicol/client-rects-expected.txt: Rebaseline after 176978.
* platform/gtk/fast/multicol/client-rects-spanners-complex-expected.txt: Rebaseline after 176978.
* platform/gtk/fast/multicol/client-rects-spanners-expected.txt: Rebaseline after 176978.
* platform/gtk/fast/multicol/layers-split-across-columns-expected.txt: Rebaseline after 176978.
* platform/gtk/fast/multicol/newmulticol/client-rects-expected.txt: Rebaseline after 176978.
* platform/gtk/http/tests/media/hls/video-controls-live-stream-expected.txt: Rebaseline after r177015.
* platform/gtk/media/audio-repaint-expected.txt: Rebaseline after r177015.
* platform/gtk/media/controls-without-preload-expected.txt: Rebaseline after r177015.
* platform/gtk/media/media-controls-clone-expected.txt: Rebaseline after r177015.
* platform/gtk/media/video-empty-source-expected.txt: Rebaseline after r177015
* platform/gtk/svg/zoom/page/zoom-foreignObject-expected.txt: Rebaseline after r175847.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177077 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[WK1] new http/tests/notifications/legacy/notification-request-permission-then-naviga...
cdumez@apple.com [Wed, 10 Dec 2014 18:08:29 +0000 (18:08 +0000)]
[WK1] new http/tests/notifications/legacy/notification-request-permission-then-navigate.html test is crashing
https://bugs.webkit.org/show_bug.cgi?id=139494

Reviewed by Alexey Proskuryakov.

Call window.open() after the page has been loaded because our test infrastructure
asserts that testRunner.waitUntilDone() must have been called *before* window.open()
is called. Since testRunner.waitUntilDone() is called is js-test-post.js, calling
window.open() after page load fixes the issue.

* http/tests/notifications/legacy/notification-request-permission-then-navigate.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Enable depth 32 for the RedirectedXCompositeWindow
mrobinson@webkit.org [Wed, 10 Dec 2014 17:42:55 +0000 (17:42 +0000)]
[GTK] Enable depth 32 for the RedirectedXCompositeWindow
https://bugs.webkit.org/show_bug.cgi?id=139028

On gtk/X11, the layout compositing is done in the web process.
If one needs to handle alpha with the rest of the application
then it is not enough to make to browser's window as RGBA.
The shared redirected window needs to be RGBA as well.
(The shared X composite window between UIProcess and WebProcess).

This allows an end-to-end RGBA solution when the application
wants to interact with the alpha channel at compositing time.
For example for transparent Web UI.

Patch by Julien Isorce <j.isorce@samsung.com> on 2014-12-10
Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
(webkitWebViewBaseConstructed):
(webkitWebViewRenderAcceleratedCompositingResults):
(webkitWebViewBaseUpdatePreferences):
(webkitWebViewBaseCreateWebPage):
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::create):
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
* UIProcess/gtk/RedirectedXCompositeWindow.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177075 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoREGRESSION(r177048) 11 failures on layout tests fast/selectors.
akling@apple.com [Wed, 10 Dec 2014 17:42:45 +0000 (17:42 +0000)]
REGRESSION(r177048) 11 failures on layout tests fast/selectors.
<https://webkit.org/b/139483>

Unreviewed fix for bots.

When rolling out the broken change, I accidentally also rolled out
a bug fix that Benjamin had made to sibling invalidation.
Restore his implementation of nodeOrItsAncestorNeedsStyleRecalc().

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::updateStyleIfNeededForNode):
(WebCore::ComputedStyleExtractor::propertyValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177074 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK][WK2] Add HTML5 Notifications support
gns@gnome.org [Wed, 10 Dec 2014 17:36:40 +0000 (17:36 +0000)]
[GTK][WK2] Add HTML5 Notifications support
https://bugs.webkit.org/show_bug.cgi?id=61140

.:

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2014-12-09
Reviewed by Carlos Garcia Campos.

* Source/cmake/FindLibNotify.cmake: Added.
* Source/cmake/OptionsGTK.cmake: add option to enable notifications, look for
libnotify and use it for a default implementation when found.

Source/WebKit2:

Patch by Claudio Saavedra  <csaavedra@igalia.com> and Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2014-12-09
Reviewed by Carlos Garcia Campos.

* PlatformGTK.cmake: add new files to the build.
* UIProcess/API/gtk/WebKitForwardDeclarations.h:
* UIProcess/API/gtk/WebKitNotification.cpp: Added. New GObject used to expose information about
the notification to the API.
(webkitNotificationGetProperty):
(webkit_notification_class_init):
(webkitNotificationCreate):
(webkit_notification_get_id):
(webkit_notification_get_title):
(webkit_notification_get_body):
* UIProcess/API/gtk/WebKitNotification.h: Added.
* UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp: Added. Permission request object
for notifications.
(webkitNotificationPermissionRequestAllow):
(webkitNotificationPermissionRequestDeny):
(webkit_permission_request_interface_init):
(webkitNotificationPermissionRequestDispose):
(webkit_notification_permission_request_class_init):
(webkitNotificationPermissionRequestCreate):
* UIProcess/API/gtk/WebKitNotificationPermissionRequest.h: Added.
* UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h: Added.
* UIProcess/API/gtk/WebKitNotificationPrivate.h: Added.
* UIProcess/API/gtk/WebKitNotificationProvider.cpp: Added. Notification provider that emits signals.
The C API allows overriding the notification providers and managers for customizing the handling of
notifications. We decided to go for a single manager and a single provider which provide more idiomatic
GObject API - signals.
(toNotificationProvider):
(showCallback):
(cancelCallback):
(WebKitNotificationProvider::~WebKitNotificationProvider):
(WebKitNotificationProvider::create):
(WebKitNotificationProvider::WebKitNotificationProvider):
(WebKitNotificationProvider::show):
(WebKitNotificationProvider::cancel):
* UIProcess/API/gtk/WebKitNotificationProvider.h: Added.
* UIProcess/API/gtk/WebKitUIClient.cpp: implemented decidePolicyForNotificationPermissionRequest.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed): initialize the notification provider.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewShowNotification): default implementation for showing the notification, currently
using GNotification, about to be ported to libnotify.
(webkit_web_view_class_init): set the default implementation for the show-notification signal.
(webkitWebViewEmitCloseNotification): emit the close-notification signal.
(webkitWebViewEmitShowNotification): emit the show-notification signal.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: list new objects and methods.
* UIProcess/API/gtk/webkit2.h: include new headers.

Tools:

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2014-12-09
Reviewed by Carlos Garcia Campos.

* Scripts/webkitperl/FeatureList.pm: enable notifications for GTK+.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewNotification):
(beforeAll):
* MiniBrowser/gtk/BrowserWindow.c: also handle notification permission requests.
(permissionRequestDialogCallback):
(webViewDecidePermissionRequest):
(geolocationRequestDialogCallback): Deleted.

LayoutTests:

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2014-12-09
Reviewed by Carlos Garcia Campos.

* platform/gtk/TestExpectations: unskip the HTTP tests for new-style notifications.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GStreamer] AudioSourceProvider support in the MediaPlayer
philn@webkit.org [Wed, 10 Dec 2014 16:00:45 +0000 (16:00 +0000)]
[GStreamer] AudioSourceProvider support in the MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=78883

Reviewed by Gustavo Noronha Silva.

GStreamer-based audio source provider for the GTK and EFL
ports. This new component gathers decoded raw audio data from the
MediaPlayer and pipes it to an AudioBus when required by the
User Agent.

* PlatformEfl.cmake: New files in the build.
* PlatformGTK.cmake: Ditto.
* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp: Added.
(WebCore::onAppsinkNewBufferCallback): Function called when a new
buffer can be pulled from appsink.
(WebCore::onGStreamerDeinterleavePadAddedCallback): Function
called when a new source pad has been added to deinterleave.
(WebCore::onGStreamerDeinterleaveReadyCallback): Function called
when the deinterleave element completed the configuration of all
its source pads.
(WebCore::copyGstreamerBuffersToAudioChannel): Called for each
channel of the AudioBus that needs data as input.
(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
Create an audio bin that by default routes buffers only to
autoaudiosink. A new route is added if the provider has a client.
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
Clean buffer adapters and audio bin.
(WebCore::AudioSourceProviderGStreamer::configureAudioBin):
(WebCore::AudioSourceProviderGStreamer::provideInput): Transfer
data from the buffer adapters to the bus channels.
(WebCore::AudioSourceProviderGStreamer::handleAudioBuffer): Pull a
buffer from appsink and queue it to the buffer adapter.
(WebCore::AudioSourceProviderGStreamer::setClient): Complete the
construction of the audio bin by adding a new chain to the tee
element. This new chain will deinterleave the buffer stream to
planar audio channels and route them to an appsink per channel for
data extraction.
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
A new appsink after a new source pad has been added to deinterleave.
(WebCore::AudioSourceProviderGStreamer::deinterleavePadsConfigured):
Configure the client Node format (number of channels and sample
rate) once the provider knows how many audio channels are managed
by the pipeline.
(WebCore::cleanUpElementsAfterDeinterleaveSourcePadCallback):
(WebCore::AudioSourceProviderGStreamer::cleanUpElementsAfterDeinterleaveSourcePad):
Remove the elements after the given deinterleave source pad.
(WebCore::AudioSourceProviderGStreamer::reset): Cleanup the
deinterleave source pads. This is especially needed before the
whole pipeline goes to NULL and later on prerolls again.
* platform/audio/gstreamer/AudioSourceProviderGStreamer.h: Added.
(WebCore::AudioSourceProviderGStreamer::create): Use this to
create the provider and get an OwnPtr of it.
(WebCore::AudioSourceProviderGStreamer::client): Provider client getter.
(WebCore::AudioSourceProviderGStreamer::getAudioBin): Audio bin
getter, used by the media player to configure its
playbin::audio-sink property.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
Provider life cycle management and reset the audio provider before
going to NULL.
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::cancelLoad): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::didEnd): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink): Configure
the audio source provider if needed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::audioSourceProvider):
Provider getter, used by MediaPlayer and MediaElement.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[EFL][[WK2] test_ewk2_text_checker is failed
g.czajkowski@samsung.com [Wed, 10 Dec 2014 13:00:05 +0000 (13:00 +0000)]
[EFL][[WK2] test_ewk2_text_checker is failed
https://bugs.webkit.org/show_bug.cgi?id=132982

Reviewed by Gyuyoung Kim.

Insert misspelled word to the input field using execCommand instead of
input.value attribute change which stops spell check, tracked by
https://bugs.webkit.org/show_bug.cgi?id=139473.

Since text checker API tests do not verify spellchecker itself (it's being
tested by LayoutTests/editing/spelling) but rather opportunity for overriding
its functionality this patch unskips those tests in order to API coverage.

* PlatformEfl.cmake:
Unskip test_ewk2_text_checker

* UIProcess/API/efl/tests/resources/spelling_test.html:
Use document.execCommand("InsertText", false, "aa ") instead of
input.value = "aa " to trigger spellchecker.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177057 268f45cc-cd09-0410-ab3c-d52691b4dbfc