WebKit-https.git
5 years agoBuild fix. A/B testing is broken when continuous builders report revisions out of...
rniwa@webkit.org [Tue, 23 Jun 2015 09:03:11 +0000 (09:03 +0000)]
Build fix. A/B testing is broken when continuous builders report revisions out of order.

* public/v2/app.js:
(App.AnalysisTaskController.Ember.Controller.extend.):

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

5 years ago[WinCairo] WebDownload::initWithRequest is not implemented.
peavo@outlook.com [Tue, 23 Jun 2015 08:56:40 +0000 (08:56 +0000)]
[WinCairo] WebDownload::initWithRequest is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=146203

Reviewed by Alex Christensen.

Implement method to start download from a IWebURLRequest object.

* WebDownloadCurl.cpp:
(WebDownload::initWithRequest): Implemented.

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

5 years ago[EFL] Add libhyphen-dev as dependency after r185862
ossy@webkit.org [Tue, 23 Jun 2015 07:10:31 +0000 (07:10 +0000)]
[EFL] Add libhyphen-dev as dependency after r185862
https://bugs.webkit.org/show_bug.cgi?id=146230

Reviewed by Gyuyoung Kim.

* efl/install-dependencies:

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

5 years ago[EFL][CustomProtocol] Do not add duplicated custom scheme
gyuyoung.kim@webkit.org [Tue, 23 Jun 2015 07:00:22 +0000 (07:00 +0000)]
[EFL][CustomProtocol] Do not add duplicated custom scheme
https://bugs.webkit.org/show_bug.cgi?id=146199

Reviewed by Carlos Garcia Campos.

WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol generates
a crash when duplicated scheme is registered on debug mode, or just registers it on release mode.
However application can register duplicate scheme by mistake or on purpose. Thus it would be good
if we don't register it instead of registering it or generating a crash when trying to regiseter
duplicated scheme.

EFL port want to allow user to change registered callback, thus EWK2ContextTest::ewk_context_url_scheme_register()
is modified to test it.

Test: ewk_context_url_scheme_register() in test_ewk2_context.cpp.

* UIProcess/API/efl/ewk_context.h: Added a comment to replace registered callback.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(EWK2ContextTest::schemeRequestCallback1):
(EWK2ContextTest::schemeRequestCallback2):
(TEST_F):
(EWK2ContextTest::schemeRequestCallback): Deleted.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
(WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):

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

5 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.
carlosgc@webkit.org [Tue, 23 Jun 2015 06:45:49 +0000 (06:45 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.9.3.

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

5 years ago[WTF] Platform.h: use _ABI64 instead of _MIPS_SIM_ABI64 to determine MIPS N64
ossy@webkit.org [Tue, 23 Jun 2015 06:33:16 +0000 (06:33 +0000)]
[WTF] Platform.h: use _ABI64 instead of _MIPS_SIM_ABI64 to determine MIPS N64
https://bugs.webkit.org/show_bug.cgi?id=145113

Patch by YunQiang Su <wzssyqa@gmail.com> on 2015-06-22
Reviewed by Csaba Osztrogonác.

* wtf/Platform.h:

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

5 years ago[EFL] Hyphenation is not supported
ryuan.choi@navercorp.com [Tue, 23 Jun 2015 05:23:57 +0000 (05:23 +0000)]
[EFL] Hyphenation is not supported
https://bugs.webkit.org/show_bug.cgi?id=89830

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake: Added an option for LibHyphen.

Source/WebCore:

Share libHyphen backend of GTK port.

Rebased fast/text/hyphenate-*.html

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* platform/efl/FileSystemEfl.cpp:
(WebCore::listDirectory): Deleted because of lack of functionality.
eina_file_ls returns full directory path so fnmatch fails to check dict file.
This patch reuse Posix implementation instead of EFL port specific function.
* platform/posix/FileSystemPOSIX.cpp: Ditto.
* platform/text/gtk/HyphenationLibHyphen.cpp: Moved to platform/text/hyphen
* platform/text/hyphen/HyphenationLibHyphen.cpp:
Renamed from Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp.
(WebCore::scanTestDictionariesDirectoryIfNecessary):
Added PLATFORM guard and EFL implementation for the test directory

Tools:

* efl/jhbuild.modules: Added webkitgtk-test-dicts for layout test.

LayoutTests:

Rebaseline expected results which is related to hyphenation.

* platform/efl/TestExpectations: Unskip hyphenate-locale.html
* platform/efl/fast/text/hyphenate-character-expected.png:
* platform/efl/fast/text/hyphenate-character-expected.txt:
* platform/efl/fast/text/hyphenate-first-word-expected.png:
* platform/efl/fast/text/hyphenate-first-word-expected.txt:
* platform/efl/fast/text/hyphenate-limit-before-after-expected.png:
* platform/efl/fast/text/hyphenate-limit-before-after-expected.txt:
* platform/efl/fast/text/hyphenate-limit-lines-expected.png:
* platform/efl/fast/text/hyphenate-limit-lines-expected.txt:
* platform/efl/fast/text/hyphenate-locale-expected.png: Added.
* platform/efl/fast/text/hyphenate-locale-expected.txt: Added.
* platform/efl/fast/text/hyphens-expected.png:
* platform/efl/fast/text/hyphens-expected.txt:

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

5 years agoPart 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox...
mitz@apple.com [Tue, 23 Jun 2015 04:10:42 +0000 (04:10 +0000)]
Part 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
https://bugs.webkit.org/show_bug.cgi?id=146197

Rubber-stamped by Anders Carlsson.

* WebKit2.xcodeproj/project.pbxproj: Deleted the WebKit2SandboxProfiles-IOSOverride target.

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

5 years ago[WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permiss...
cdumez@apple.com [Tue, 23 Jun 2015 03:54:30 +0000 (03:54 +0000)]
[WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permission request
https://bugs.webkit.org/show_bug.cgi?id=146228
<rdar://problem/15179262>

Reviewed by Daniel Bates.

Source/WebCore:

Add Geolocation::resetIsAllowed() API that merely resets
m_allowGeolocation to Unknown, so that we will request the permission
again the next time a position is requested.

* Modules/geolocation/Geolocation.h:
(WebCore::Geolocation::resetIsAllowed):

Source/WebKit/mac:

Call the new Geolocation::resetIsAllowed() API after denying the
current request, instead of calling
Geolocation::resetAllGeolocationPermission(). In addition to resetting
m_allowGeolocation to Unknown, the latter would also start a new
permission request. However, for
WebAllowDenyPolicyListener.denyOnlyThisRequest(), we really only want
to deny the current request and then reset m_allowGeolocation to
Unknown so that permission is requested again later if the app requests
a position again.

The previous implementation meant that if the client application keeps
calling WebAllowDenyPolicyListener.denyOnlyThisRequest(), we would end
up in an infinite loop (requesting for permission), even though the
application did not make any new geolocation requests.

* WebCoreSupport/WebGeolocationClient.mm:
(-[WebGeolocationPolicyListener denyOnlyThisRequest]):

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

5 years agoGet rid of factory json files in benchmark_runner
commit-queue@webkit.org [Tue, 23 Jun 2015 03:47:24 +0000 (03:47 +0000)]
Get rid of factory json files in benchmark_runner
https://bugs.webkit.org/show_bug.cgi?id=146175

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-06-22
Reviewed by Ryosuke Niwa.

Get rid of factory json files in benchmark_runner and refactoring the code.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/__init__.py:
(benchmark_builder_loader):
* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builder_factory.py:
(BenchmarkBuilderFactory):
* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Removed.
* Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:
(GenericBenchmarkBuilder):
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__):
(BenchmarkRunner.execute):
* Scripts/webkitpy/benchmark_runner/browser_driver/__init__.py:
(browser_driver_loader):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
(BrowserDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
(BrowserDriverFactory):
(BrowserDriverFactory.available_platforms):
(BrowserDriverFactory.available_browsers):
(BrowserDriverFactory.add_browser_driver):
(BrowserDriverFactory.create):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_drivers.json: Removed.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver):
(OSXBrowserDriver.prepareEnv):
(OSXBrowserDriver.terminateProcesses):
(OSXBrowserDriver.screenSize):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver):
(OSXChromeCanaryDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
(OSXFirefoxDriver):
(OSXFirefoxNightlyDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):
* Scripts/webkitpy/benchmark_runner/generic_factory.py:
(GenericFactory.create):
(GenericFactory.add):
(GenericFactory.iterateGetItem): Deleted.
* Scripts/webkitpy/benchmark_runner/http_server_driver/__init__.py:
(http_server_driver_loader):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
(HTTPServerDriver):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver_factory.py:
(HTTPServerDriverFactory):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_drivers.json: Removed.
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
(SimpleHTTPServerDriver):
* Scripts/webkitpy/benchmark_runner/utils.py:
(is_subclass):
(load_subclasses):
(ModuleNotFoundError): Deleted.
(loadModule): Deleted.
(loadJSONFromFile): Deleted.

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

5 years agoASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering...
simon.fraser@apple.com [Tue, 23 Jun 2015 01:59:08 +0000 (01:59 +0000)]
ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
https://bugs.webkit.org/show_bug.cgi?id=146225

Reviewed by Zalan Bujtas.

Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
been updated; this happens to work most of the time because painting updates them,
but if incremental rendering is suppressed, we may not have painted yet.

Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
dirty bits is cheaper than calling isStackingContext().

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

5 years agoMake it possible to enable incremental rendering suppression in MiniBrowser
simon.fraser@apple.com [Tue, 23 Jun 2015 01:59:05 +0000 (01:59 +0000)]
Make it possible to enable incremental rendering suppression in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=146223

Reviewed by Tim Horton.

Add a menu item to enable incremental rendering suppression to MiniBrowser.

For WK1, this just toggles a pref, and takes effect immediately.

For WK2, this is a WKConfiguration property, so only affects new web views.

Also remove a toolbar item connection to toggleUseMinimumViewSize: that caused
logging on launch.

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
* MiniBrowser/mac/BrowserWindow.xib:
* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleIncrementalRenderingSuppressed:]):
(-[SettingsController incrementalRenderingSuppressed]):
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]):

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

5 years agoRename PlatformCA*Mac to PlatformCA*Cocoa
dino@apple.com [Tue, 23 Jun 2015 01:51:05 +0000 (01:51 +0000)]
Rename PlatformCA*Mac to PlatformCA*Cocoa
https://bugs.webkit.org/show_bug.cgi?id=146224
<rdar://problem/21497182>

Reviewed by Simon Fraser.

Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
to the more accurate Cocoa suffix.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* page/mac/ServicesOverlayController.mm:
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Renamed from Source/WebCore/platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp.
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h.
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
* platform/graphics/ca/cocoa/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h.
* platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm.
* platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/mac/WebTiledBackingLayer.mm:

Source/WebKit2:

* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::filtersCanBeComposited):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::create):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):

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

5 years agoDelegates should be formal protocols
andersca@apple.com [Tue, 23 Jun 2015 01:24:02 +0000 (01:24 +0000)]
Delegates should be formal protocols
https://bugs.webkit.org/show_bug.cgi?id=146222
rdar://problem/17380856

Reviewed by Dan Bernstein.

Flip the switch on OS X and make delegates formal protocols.

* postprocess-headers.sh:

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

5 years ago[cssjit] Disable compiling scrollbar pseudoclass selectors
achristensen@apple.com [Tue, 23 Jun 2015 01:09:15 +0000 (01:09 +0000)]
[cssjit] Disable compiling scrollbar pseudoclass selectors
https://bugs.webkit.org/show_bug.cgi?id=146220

Reviewed by Benjamin Poulain.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addScrollbarPseudoClassType):
Don't compile selectors with scrollbar pseudoclasses.

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

5 years ago[ES6] Allow trailing comma in ArrayBindingPattern and ObjectBindingPattern
utatane.tea@gmail.com [Tue, 23 Jun 2015 00:51:44 +0000 (00:51 +0000)]
[ES6] Allow trailing comma in ArrayBindingPattern and ObjectBindingPattern
https://bugs.webkit.org/show_bug.cgi?id=146192

Reviewed by Darin Adler.

Source/JavaScriptCore:

According to the ES6 spec, trailing comma in ArrayBindingPattern and ObjectBindingPattern is allowed.
And empty ArrayBindingPattern and ObjectBindingPattern is also allowed.

This patch allows trailing comma and empty binding patterns.

* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayPatternNode::bindValue):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseDeconstructionPattern):
* tests/stress/trailing-comma-in-patterns.js: Added.
(shouldBe):
(iterator):

LayoutTests:

* js/object-literal-syntax-expected.txt:

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

5 years agoA/B testing results should be shown even if they were submitted to different platforms
rniwa@webkit.org [Tue, 23 Jun 2015 00:47:51 +0000 (00:47 +0000)]
A/B testing results should be shown even if they were submitted to different platforms
https://bugs.webkit.org/show_bug.cgi?id=146219

Reviewed by Andreas Kling.

Fetch A/B testing results regardless of the platform to which results are submitted
by providing the platform ID to which the results were submitted for each test group.

* public/api/test-groups.php:
(main): Include the platform id in the test groups.
* public/v2/analysis.js:
(App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.

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

5 years ago-webkit-clip-path clips incorrectly if the element bounds go beyond the top edge...
simon.fraser@apple.com [Mon, 22 Jun 2015 23:32:30 +0000 (23:32 +0000)]
-webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
https://bugs.webkit.org/show_bug.cgi?id=146218
rdar://problem/21127840

Reviewed by Zalan Bujtas.
Source/WebCore:

The clip path is computed using the RenderLayer's bounding box, so needs to be offset
by the offsetFromRenderer when set on the mask layer.

Test: compositing/masks/compositing-clip-path-origin.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

LayoutTests:

Test clip path on layers with non-zero bounds offsetFromRenderer because of box shadow,
or vertical writing mode.

* compositing/masks/compositing-clip-path-origin-expected.html: Added.
* compositing/masks/compositing-clip-path-origin.html: Added.

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

5 years agofast/text/justify-ideograph-{complex,simple,vertical}.html tests are flaky on El...
ddkilzer@apple.com [Mon, 22 Jun 2015 23:02:04 +0000 (23:02 +0000)]
fast/text/justify-ideograph-{complex,simple,vertical}.html tests are flaky on El Capitan Debug builds

Tracked by <rdar://problem/21486062>.

* platform/mac/TestExpectations: Mark tests as flaky:
- fast/text/justify-ideograph-complex.html
- fast/text/justify-ideograph-simple.html
- fast/text/justify-ideograph-vertical.html

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

5 years agoFix build.
andersca@apple.com [Mon, 22 Jun 2015 22:36:14 +0000 (22:36 +0000)]
Fix build.

* wtf/threads/BinarySemaphore.cpp:

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

5 years agoWeb sockets should be treated as active mixed content
mcatanzaro@igalia.com [Mon, 22 Jun 2015 22:22:54 +0000 (22:22 +0000)]
Web sockets should be treated as active mixed content
https://bugs.webkit.org/show_bug.cgi?id=140624

Reviewed by Sam Weinig.

Source/WebCore:

Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
       http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): Block ws:// WebSocket connections from https:// pages, and
emit the onerror event after doing so.
* platform/SchemeRegistry.cpp:
(WebCore::secureSchemes): Add wss:// to the list of secure schemes.

LayoutTests:

* http/tests/security/mixedContent/resources/frame-with-insecure-websocket.html: Added.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe-expected.txt: Added.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html: Added.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame-expected.txt: Added.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html: Added.

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

5 years agoGet rid of the Windows specific BinarySemaphore implementation
andersca@apple.com [Mon, 22 Jun 2015 22:07:20 +0000 (22:07 +0000)]
Get rid of the Windows specific BinarySemaphore implementation
https://bugs.webkit.org/show_bug.cgi?id=146216

Reviewed by Andreas Kling.

The fact that the Windows implementation uses a HEVENT internally was only useful
to the Windows port of WebKit2; we can get rid of it now.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* wtf/threads/BinarySemaphore.h:
(WTF::BinarySemaphore::event): Deleted.
* wtf/threads/win/BinarySemaphoreWin.cpp: Removed.
(WTF::BinarySemaphore::BinarySemaphore): Deleted.
(WTF::BinarySemaphore::~BinarySemaphore): Deleted.
(WTF::BinarySemaphore::signal): Deleted.
(WTF::BinarySemaphore::wait): Deleted.

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

5 years agoElement with blur backdrop-filter shows edge duplication and dark edges
dino@apple.com [Mon, 22 Jun 2015 22:06:45 +0000 (22:06 +0000)]
Element with blur backdrop-filter shows edge duplication and dark edges
https://bugs.webkit.org/show_bug.cgi?id=146215
<rdar://problem/20367695>

Reviewed by Tim Horton.

Source/WebCore:

The input images to backdrop filters should duplicate their edge pixels
outwards, rather than using transparent pixels. This is a flag we
set on the Gaussian blur, but means we have to remember if the
FilterOperations list came from a regular filter or a backdrop filter.

Test: css3/filters/backdrop/blur-input-bounds.html

* css/CSSPropertyNames.in: New custom convertor for backdrop-filter.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor
that sets the backdrop flag, but is otherwise the same as a normal filter
convertor.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilterOperations): Inherit the backdrop flag if either of our
inputs has it.
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges
key on the CAFilter if necessary.
* platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if
these operations are intended for backdrops.
(WebCore::FilterOperations::operator=):
(WebCore::FilterOperations::operator==):
* platform/graphics/filters/FilterOperations.h:
(WebCore::FilterOperations::isUsedForBackdropFilters):
(WebCore::FilterOperations::setUsedForBackdropFilters):

LayoutTests:

Add a pixel test to show that the input images to backdrop filters should duplicate their
edge pixels. Unfortunately this is not reproducible with normal filters, so it
can't be a reference test.

* css3/filters/backdrop/blur-input-bounds.html: Added.
* platform/mac/css3/filters/backdrop/blur-input-bounds-expected.png: Added.
* platform/mac/css3/filters/backdrop/blur-input-bounds-expected.txt: Added.

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

5 years agoWeb Inspector: gaps between sections of the styles sidebar rules tab confusing, shoul...
commit-queue@webkit.org [Mon, 22 Jun 2015 22:02:09 +0000 (22:02 +0000)]
Web Inspector: gaps between sections of the styles sidebar rules tab confusing, should say "Media: all"
https://bugs.webkit.org/show_bug.cgi?id=142918

Patch by Devin Rousso <drousso@apple.com> on 2015-06-22
Reviewed by Timothy Hatcher.

* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label:not(.filter-section-non-matching) ~ .label):
Now properly adds padding to filtered labels.
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label ~ .label): Deleted.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): If a section of CSS rules has no media or inheritance, add
a label that says "Media: all" above the section.

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

5 years ago[TextIndicator] Text shifts one pixel to the left when I force click to bring up...
timothy_horton@apple.com [Mon, 22 Jun 2015 21:33:12 +0000 (21:33 +0000)]
[TextIndicator] Text shifts one pixel to the left when I force click to bring up Lookup in Mail messages
https://bugs.webkit.org/show_bug.cgi?id=146214
<rdar://problem/20782970>

Reviewed by Dean Jackson.

* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
(WebCore::TextIndicatorWindow::setTextIndicator):
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]): Deleted.
When the WebView is at a nonintegral position, we can end up needing a TextIndicator
with a nonintegral position. We need to round the window position, so we need to apply
the fractional part to the indicator layers inside, not to the window.

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

5 years agoSimplify Connection::SyncMessageState
andersca@apple.com [Mon, 22 Jun 2015 21:11:25 +0000 (21:11 +0000)]
Simplify Connection::SyncMessageState
https://bugs.webkit.org/show_bug.cgi?id=146213

Reviewed by Andreas Kling.

Since we no longer support Connections dispatching to multiple threads, we can make SyncMessageState
into a singleton and get rid of the RunLoop -> SyncMessageState hash map.

* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::singleton):
(IPC::Connection::SyncMessageState::SyncMessageState):
(IPC::Connection::SyncMessageState::processIncomingMessage):
(IPC::Connection::SyncMessageState::dispatchMessages):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingSyncReply):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::SyncMessageState::syncMessageStateMap): Deleted.
(IPC::Connection::SyncMessageState::syncMessageStateMapMutex): Deleted.
(IPC::Connection::SyncMessageState::getOrCreate): Deleted.
(IPC::Connection::SyncMessageState::~SyncMessageState): Deleted.
(IPC::Connection::Connection): Deleted.
* Platform/IPC/Connection.h:

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

5 years ago[iOS] Arabic text styled with Georgia is rendered as boxes
mmaxfield@apple.com [Mon, 22 Jun 2015 20:53:26 +0000 (20:53 +0000)]
[iOS] Arabic text styled with Georgia is rendered as boxes
https://bugs.webkit.org/show_bug.cgi?id=145681
<rdar://problem/21169844>

Reviewed by Darin Adler.

Source/WebCore:

Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns
TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead
of using TimesNewRomanPSMT, we will simply just use GeezaPro.

Test: fast/text/arabic-times-new-roman.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic()
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::fontFamilyShouldNotBeUsedForArabic):

LayoutTests:

* fast/text/arabic-times-new-roman.html: Added.
* platform/ios-simulator/fast/text/arabic-times-new-roman-expected.txt: Added.
* platform/ios-simulator/fast/text/arabic-times-new-roman-expected.png: Added.
* platform/mac-mavericks/fast/text/arabic-times-new-roman-expected.txt: Added.
* platform/mac/fast/text/arabic-times-new-roman-expected.txt: Added.
* platform/mac/fast/text/arabic-times-new-roman-expected.png: Added.

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

5 years agoUnreviewed non-mac debug build fix after r185840.
achristensen@apple.com [Mon, 22 Jun 2015 20:49:53 +0000 (20:49 +0000)]
Unreviewed non-mac debug build fix after r185840.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
Added enable flag around assertion.

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

5 years ago[Content Extensions] Add SPI to reload without content blocking.
achristensen@apple.com [Mon, 22 Jun 2015 20:10:50 +0000 (20:10 +0000)]
[Content Extensions] Add SPI to reload without content blocking.
https://bugs.webkit.org/show_bug.cgi?id=146128
rdar://problem/20351903

Reviewed by Sam Weinig.

Source/WebCore:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::open):
* page/Page.h:
(WebCore::Page::userContentController):
(WebCore::Page::userContentExtensionsEnabled):
(WebCore::Page::setUserContentExtensionsEnabled):
(WebCore::Page::group):
* page/UserContentController.cpp:
(WebCore::UserContentController::removeAllUserContentExtensions):
(WebCore::UserContentController::processContentExtensionRulesForLoad):
(WebCore::UserContentController::actionsForResourceLoad):
* page/UserContentController.h:

Source/WebKit2:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetCustomUserAgent):
(WKPageSetUserContentExtensionsEnabled):
(WKPageSupportsTextEncoding):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _customUserAgent]):
(-[WKWebView _setUserContentExtensionsEnabled:]):
(-[WKWebView _userContentExtensionsEnabled]):
(-[WKWebView _setCustomUserAgent:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
(WebKit::WebPageProxy::setUserContentExtensionsEnabled):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::userContentExtensionsEnabled):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setShouldScaleViewToFitDocument):
(WebKit::WebPage::setUserContentExtensionsEnabled):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Pass a boolean from the API to WebCore.

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

5 years agoRemove m_clientRunLoop from IPC::Connection
andersca@apple.com [Mon, 22 Jun 2015 19:52:51 +0000 (19:52 +0000)]
Remove m_clientRunLoop from IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=146212

Reviewed by Sam Weinig.

We only ever create connections whose messages are dispatched to the main run loop, so we can
vastly simplify the code by only allowing messages to be dispatched there.

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
* Platform/IPC/Connection.cpp:
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
(IPC::Connection::waitForMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::wakeUpRunLoop):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::receiveSourceEventHandler):
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::WebProcessConnection):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::establishConnection):

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

5 years agoREGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtr...
zalan@apple.com [Mon, 22 Jun 2015 19:35:19 +0000 (19:35 +0000)]
REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
https://bugs.webkit.org/show_bug.cgi?id=146116
rdar://problem/20959369

Reviewed by Brent Fulgham.

This patch ensures that we don't adjust the selection unless the visual selection still matches this subtree root.

When multiple selection roots are present we need to ensure that a RenderObject
only shows up in one of them.
RenderView::splitSelectionBetweenSubtrees(), as the name implies, splits the
selection and sets the selection range (start/end) on each selection root.
However, SelectionSubtreeRoot::adjustForVisibleSelection() later recomputes the range
based on visible selection and that could end up collecting renderers as selection start/end
from another selection subtree.
RenderObject's holds the last selection state (RenderObject::setSelectionState).
If we set a renderer first as "on selection border" and later "inside" using multiple selection roots,
we can't clean up selections properly when this object gets destroyed.
One of the roots ends up with a dangling RenderObject pointer.

Source/WebCore:

Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html

* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):

LayoutTests:

* fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees-expected.txt: Added.
* fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html: Added.

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

5 years agoCrashes in hit testing under WebPage::acceptsFirstMouse() while handling sync message...
andersca@apple.com [Mon, 22 Jun 2015 19:30:46 +0000 (19:30 +0000)]
Crashes in hit testing under WebPage::acceptsFirstMouse() while handling sync message in plug-in teardown
https://bugs.webkit.org/show_bug.cgi?id=146211
rdar://problem/17180615

Reviewed by Sam Weinig.

If we're inside a sendSync message when we're being called, just bail.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::acceptsFirstMouse):

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

5 years agoWeb Inspector: Consider making read-only style rules have a darker background
nvasilyev@apple.com [Mon, 22 Jun 2015 17:53:43 +0000 (17:53 +0000)]
Web Inspector: Consider making read-only style rules have a darker background
https://bugs.webkit.org/show_bug.cgi?id=145983

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section:not(.locked)):
(.style-declaration-section): Deleted.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor.read-only > .CodeMirror):

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

5 years agoWeb Inspector: Unable to select text of user input messages in the console
nvasilyev@apple.com [Mon, 22 Jun 2015 17:47:33 +0000 (17:47 +0000)]
Web Inspector: Unable to select text of user input messages in the console
https://bugs.webkit.org/show_bug.cgi?id=145888

Reviewed by Timothy Hatcher.

* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command > .console-message-text):

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

5 years agoDo not exit fullscreen when starting PiP since this is done automatically.
commit-queue@webkit.org [Mon, 22 Jun 2015 17:41:59 +0000 (17:41 +0000)]
Do not exit fullscreen when starting PiP since this is done automatically.
https://bugs.webkit.org/show_bug.cgi?id=144871

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-06-22
Reviewed by Darin Adler.

Since we don't explicitly exit fullscreen, update state in shouldExitFullscreenWithReason()

* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare shouldExitFullscreenWithReason().
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Forward to WebVideoFullscreenInterfaceAVKit.
(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Added.
(WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Remove enter fullscreen code.
* platform/spi/cocoa/AVKitSPI.h: Add missing enums.

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

5 years agoRun CDjs as part of JSC stress testing
fpizlo@apple.com [Mon, 22 Jun 2015 17:11:54 +0000 (17:11 +0000)]
Run CDjs as part of JSC stress testing
https://bugs.webkit.org/show_bug.cgi?id=146174

Reviewed by Geoffrey Garen.

PerformanceTests:

* JetStream/cdjs/cdjs-tests.yaml: Added. This tells JSC stress tests what tests to run. It uses new syntax ("tests" being a list) that I add in this change.
* JetStream/cdjs/main.js: Mark this as a slow test.
* JetStream/create.rb: Don't copy the JSC stress tests artifacts into the JetStream bundle.

Tools:

* Scripts/run-javascriptcore-tests:
(runJSCStressTests): Make this aware of the cdjs-tests.yaml.
* Scripts/run-jsc-stress-tests:
- Teach this about tests that indicate error by returning an error code while also having lots of output even when they succeed.
- Add the ability to have "tests" be a list of tests rather than just one test. This could also be a list of directories that have tests.
- Fix a bug with bundle copying: whether the $collection should have the basename appended depends on whether we copy into bundleDir.dirname, not on whether absoluteCollection is a directory.

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

5 years agoPart 1 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox...
mitz@apple.com [Mon, 22 Jun 2015 17:04:08 +0000 (17:04 +0000)]
Part 1 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
https://bugs.webkit.org/show_bug.cgi?id=146197

Reviewed by Anders Carlsson.

* Configurations/SandboxProfiles.xcconfig: Added. Defines INSTALL_PATH based on the value
of WK_INSTALL_OVERRIDE_SANDBOX_PROFILES.
* WebKit2.xcodeproj/project.pbxproj: Use SandboxProfiles.xcconfig for the Sandbox Profiles
target, and change the destination path in its Copy Files build phase to INSTALL_PATH.

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

5 years agoAX: UI Automation cannot find AutoFill or search cancel buttons
dbates@webkit.org [Mon, 22 Jun 2015 16:17:04 +0000 (16:17 +0000)]
AX: UI Automation cannot find AutoFill or search cancel buttons
https://bugs.webkit.org/show_bug.cgi?id=145241
<rdar://problem/21051411>

Reviewed by Chris Fleizach.

Source/WebCore:

Add support for hit testing the search cancel button and AutoFill button so that
they can be accessed by UI Automation.

Currently the accessibility hit test machinery ignores nodes in a shadow tree.
So, it neither finds the <input type="search"> cancel button nor the AutoFill button
when it performs a hit test. Therefore these buttons cannot be accessed using
UI Automation.

Tests: accessibility/hit-test-input-auto-fill-button.html
       accessibility/hit-test-input-search-cancel-button.html
       accessibility/input-search-cancel-button.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Added; returns
the AccessibilityObject for the search cancel button or AutoFill text field decoration as applicable.
(WebCore::AccessibilityRenderObject::accessibilityHitTest): Check whether the hit node
is a text field decoration.

LayoutTests:

Add tests to ensure that there exists an accessibility element for the
search cancel button and that it can be hit using a cursor position. Also
add a test to ensue that the AutoFill button can be hit using a cursor position.

* accessibility/hit-test-input-auto-fill-button-expected.txt: Added.
* accessibility/hit-test-input-auto-fill-button.html: Copied from LayoutTests/accessibility/input-auto-fill-button.html.
* accessibility/hit-test-input-search-cancel-button-expected.txt: Added.
* accessibility/hit-test-input-search-cancel-button.html: Added.
* accessibility/input-search-cancel-button-expected.txt: Added.
* accessibility/input-search-cancel-button.html: Copied from LayoutTests/accessibility/input-auto-fill-button.html.
* accessibility/resources/shouldBeAccessibleByCursor.js: Added.
(shouldBeAccessibleByCursor): Tests whether an AccessibilityUIElement can be hit
using its screen position.
* platform/wk2/TestExpectations: Mark tests hit-test-input-{auto-fill, search-cancel}-button.html
as failing due to <https://bugs.webkit.org/show_bug.cgi?id=71298>.

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

5 years agoCrash replacing TabDocument in MobileSafari at WebKit: -[WKWebView(WKPrivate) _beginA...
antti@apple.com [Mon, 22 Jun 2015 14:32:48 +0000 (14:32 +0000)]
Crash replacing TabDocument in MobileSafari at WebKit: -[WKWebView(WKPrivate) _beginAnimatedResizeWithUpdates:]
https://bugs.webkit.org/show_bug.cgi?id=146201

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):

No repro but if for some reason [_contentView bounds] width is zero we'll compute +Inf targetScale
and then NaN contentOffset.x. Verified in lldb that this gives the exact crash signature seen.

Fix by checking that [_contentView bounds] is not empty like is done with other inputs.

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

5 years ago[Streams API] Implement ReadableStream cancel (abstract part)
youenn.fablet@crf.canon.fr [Mon, 22 Jun 2015 13:59:08 +0000 (13:59 +0000)]
[Streams API] Implement ReadableStream cancel (abstract part)
https://bugs.webkit.org/show_bug.cgi?id=146111

Reviewed by Darin Adler.

Source/WebCore:

This patch implements ReadableStream and ReadableStreamReader cancel.
The reader delegates cancellation to its stream.

This patch also ensures that controller.close() will not throw in case cancellation is on-going.

A follow-up patch will implement the calling of 'cancel' JS callback for JS sources.

Covered by rebased tests.

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::cancel): Checks whether locked or not before cancelling.
(WebCore::ReadableStream::cancelNoCheck): Cancel without lock check.
(WebCore::ReadableStream::notifyCancelSucceeded): Async cancel callback.
(WebCore::ReadableStream::notifyCancelFailed): Ditto.
* Modules/streams/ReadableStream.h:
* Modules/streams/ReadableStream.idl: Cleaned up IDL.
* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::cancel):
* Modules/streams/ReadableStreamReader.h:
* Modules/streams/ReadableStreamReader.idl: Cleaned up IDL
* bindings/js/JSReadableStreamControllerCustom.cpp:
(WebCore::JSReadableStreamController::close):
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::JSReadableStream::cancel):
* bindings/js/JSReadableStreamReaderCustom.cpp:
(WebCore::JSReadableStreamReader::cancel):
* bindings/js/ReadableJSStream.cpp:
(WebCore::ReadableJSStream::doCancel):
* bindings/js/ReadableJSStream.h:

LayoutTests:

Rebasing expectations.

* streams/reference-implementation/bad-underlying-sources-expected.txt:
* streams/reference-implementation/readable-stream-cancel-expected.txt:
* streams/reference-implementation/readable-stream-expected.txt:
* streams/reference-implementation/readable-stream-reader-expected.txt:
* streams/reference-implementation/readable-stream-templated-expected.txt:

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

5 years agoREGRESSION(r182303): [GTK] Context menu API is broken since r182303
carlosgc@webkit.org [Mon, 22 Jun 2015 12:42:33 +0000 (12:42 +0000)]
REGRESSION(r182303): [GTK] Context menu API is broken since r182303
https://bugs.webkit.org/show_bug.cgi?id=146202

Reviewed by Žan Doberšek.

The problem is that ContextMenuclient API changed in r182303, but
we didn't notice it either, and the default handler for
getContextMenuFromProposedMenu was executed. An override keyword
would have caught this.

* UIProcess/API/gtk/WebKitContextMenuClient.cpp: Build a Vector of
WebContextMenuItemData as expected by our API, and add add
override keyword to ensure this doesn't happen again.

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

5 years ago[WK2] ConnectionUnix should use FastMalloc to allocate on-heap resources
zandobersek@gmail.com [Mon, 22 Jun 2015 12:06:46 +0000 (12:06 +0000)]
[WK2] ConnectionUnix should use FastMalloc to allocate on-heap resources
https://bugs.webkit.org/show_bug.cgi?id=146143

Reviewed by Carlos Garcia Campos.

IPC handling in Unix-specific IPC::Connection implementation should use
FastMalloc to allocate on-heap resources, instead of allocating via the
system allocator.

The AttachmentInfo class is marked as allocatable through FastMalloc.
That way it can be allocated through FastMalloc while still handled
through std::unique_ptr<>.

The char[] arrays in readBytesFromSocket() and Connection::sendOutgoingMessage()
are now handled through a MallocPtr<> object.

In Connection::sendOutgoingMessage(), both the AttachmentInfo[] and char[]
arrays are now only allocated if there are actual attachments contained
in the message. The code that's conditioned with a non-empty attachments
Vector is now also grouped together, in a single branch.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::readBytesFromSocket):
(IPC::Connection::sendOutgoingMessage):

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

5 years ago[CMake] Add support for building with various sanitizer tools
zandobersek@gmail.com [Mon, 22 Jun 2015 11:55:45 +0000 (11:55 +0000)]
[CMake] Add support for building with various sanitizer tools
https://bugs.webkit.org/show_bug.cgi?id=131941

Reviewed by Martin Robinson.

* Source/PlatformGTK.cmake: Don't generate any documentation
when compiling with sanitizers enabled.
* Source/cmake/OptionsCommon.cmake: Allow linking with
undefined symbols when compiling with sanitizers enabled.

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

5 years ago[EFL] test_ewk2_application_cache_manager has been failed since r185527
gyuyoung.kim@webkit.org [Mon, 22 Jun 2015 10:03:32 +0000 (10:03 +0000)]
[EFL] test_ewk2_application_cache_manager has been failed since r185527
https://bugs.webkit.org/show_bug.cgi?id=146016

Reviewed by Csaba Osztrogonác.

* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(TEST_F): Disable this test for now. This test will be enabled again.

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

5 years ago[Streams API] Correct releaseLock test in readable-stream-templated.html
youenn.fablet@crf.canon.fr [Mon, 22 Jun 2015 08:57:58 +0000 (08:57 +0000)]
[Streams API] Correct releaseLock test in readable-stream-templated.html
https://bugs.webkit.org/show_bug.cgi?id=146101

Reviewed by Darin Adler.

* streams/reference-implementation/readable-stream-templated-expected.txt: Rebased changed test.
* streams/reference-implementation/readable-stream-templated.html: Removed testharness wrapper around function.

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

5 years agoWebRTC: Navigator.webkitGetUserMedia() requires three arguments
adam.bergkvist@ericsson.com [Mon, 22 Jun 2015 08:36:38 +0000 (08:36 +0000)]
WebRTC: Navigator.webkitGetUserMedia() requires three arguments
https://bugs.webkit.org/show_bug.cgi?id=146022

Reviewed by Eric Carlson.

Source/WebCore:

Updated custom binding to make the third error callback argument
mandatory. Updated and unskipped three tests (for the GTK+ port).

* bindings/js/JSNavigatorCustom.cpp:
(WebCore::JSNavigator::webkitGetUserMedia):

LayoutTests:

Updated and unskipped three existing tests.

* fast/mediastream/argument-types-expected.txt:
* fast/mediastream/getusermedia-expected.txt:
* fast/mediastream/getusermedia.html:
* fast/mediastream/script-tests/argument-types.js:
* platform/gtk/TestExpectations:

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

5 years agoUnreviewed. Fix GTK+ build after r185818.
carlosgc@webkit.org [Mon, 22 Jun 2015 07:57:58 +0000 (07:57 +0000)]
Unreviewed. Fix GTK+ build after r185818.

Actually rollout r185320.

* platform/network/soup/DNSSoup.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
(WebCore::DNSResolveQueue::platformResolve):
(WebCore::gotProxySettingsCallback): Deleted.
(WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.

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

5 years agoPage load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
barraclough@apple.com [Mon, 22 Jun 2015 06:32:13 +0000 (06:32 +0000)]
Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
https://bugs.webkit.org/show_bug.cgi?id=146198

Unreviewed rollout.

Source/WebCore:

* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::DNSResolveQueue):
(WebCore::DNSResolveQueue::isUsingProxy):
(WebCore::DNSResolveQueue::add):
(WebCore::DNSResolveQueue::timerFired):
* platform/network/DNSResolveQueue.h:
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
(WebCore::clientCallback):
(WebCore::DNSResolveQueue::platformResolve):
(WebCore::proxyIsEnabledInSystemPreferences): Deleted.
(WebCore::isUsingProxy): Deleted.
(WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
* platform/network/soup/DNSSoup.cpp:

Source/WebKit2:

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_prefetch_dns):

Source/WTF:

* wtf/glib/GUniquePtr.h:

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

5 years agoWKApplicationCacheManagerDeleteEntriesForOrigin() has wrong WebsiteDataTypes.
commit-queue@webkit.org [Mon, 22 Jun 2015 04:48:04 +0000 (04:48 +0000)]
WKApplicationCacheManagerDeleteEntriesForOrigin() has wrong WebsiteDataTypes.
https://bugs.webkit.org/show_bug.cgi?id=146180

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-21
Reviewed by Sam Weinig.

Modify to use correct WebsiteDataTypes in WKApplicationCacheManagerDeleteEntriesForOrigin()

* UIProcess/API/C/WKApplicationCacheManager.cpp:
(WKApplicationCacheManagerDeleteEntriesForOrigin):

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

5 years agoREGRESSION (r172975): navigator.language unable to tell region for Traditional Chines...
ap@apple.com [Mon, 22 Jun 2015 04:25:18 +0000 (04:25 +0000)]
REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
https://bugs.webkit.org/show_bug.cgi?id=146121
rdar://problem/21395180

Reviewed by Darin Adler.

Source/WebCore:

Revert to previous behavior, which is wrong in many ways, but not as wrong as the new one.

* platform/mac/Language.mm:
(WebCore::httpStyleLanguageCode):
(WebCore::platformUserPreferredLanguages):
* platform/spi/cf/CFBundleSPI.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/NavigatorLanguage.mm: Added.
(-[NavigatorLanguageDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::overrideAppleLanguages):
(TestWebKitAPI::languageForSystemLanguage):
(TestWebKitAPI::TEST):

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

5 years agofast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html is slow on Mavericks...
ddkilzer@apple.com [Mon, 22 Jun 2015 03:25:48 +0000 (03:25 +0000)]
fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html is slow on Mavericks WK1 Debug builds

The Flakiness Dashboard says that this test times out, but only
on Mavericks WK1 Debug builds (and the leaks bot):

<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fcanvas%2Fwebgl%2Ftex-image-and-sub-image-2d-with-video.html>

* platform/mac-wk1/TestExpectations: Mark test as slow on
Mavericks Debug builds:
- fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html

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

5 years ago<rdar://problem/21444762> REGRESSION (r184215): Plug-in services crash on launch...
mitz@apple.com [Sun, 21 Jun 2015 23:44:07 +0000 (23:44 +0000)]
<rdar://problem/21444762> REGRESSION (r184215): Plug-in services crash on launch on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=146195

Reviewed by Sam Weinig.

* Configurations/PluginService.32.xcconfig: Changed the Yosemite definition of
INFOPLIST_FILE such that it would also apply to the macosx10.10.internal SDK.
* Configurations/PluginService.64.xcconfig: Ditto.

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

5 years agoGive Node::didNotifySubtreeInsertions() a better name
aestes@apple.com [Sun, 21 Jun 2015 21:14:51 +0000 (21:14 +0000)]
Give Node::didNotifySubtreeInsertions() a better name
https://bugs.webkit.org/show_bug.cgi?id=146170

Reviewed by Darin Adler.

didNotifySubtreeInsertions() is not a good name. It sounds like we are notifying the subtree insertions, which doesn't make sense.

This function is really about notifying the Node that the subtree it's a part of has finished being inserted into the DOM
(i.e. all nodes have received their call to insertedInto()). Change the name to finishedInsertingSubtree() to better reflect this.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::notifyChildInserted):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
(WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
* dom/Node.h:
(WebCore::Node::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::Node::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::ScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* dom/ScriptElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::insertedInto):
(WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* html/HTMLFrameElementBase.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::insertedInto):
(WebCore::HTMLScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* html/HTMLScriptElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::insertedInto):
(WebCore::SVGFEImageElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* svg/SVGFEImageElement.h:
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::insertedInto):
(WebCore::SVGMPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::SVGMPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* svg/SVGMPathElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::insertedInto):
(WebCore::SVGScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::SVGScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* svg/SVGScriptElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::insertedInto):
(WebCore::SVGTRefElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::SVGTRefElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* svg/SVGTRefElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::insertedInto):
(WebCore::SVGTextPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* svg/SVGTextPathElement.h:
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::insertedInto):
(WebCore::SVGSMILElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
(WebCore::SVGSMILElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
* svg/animation/SVGSMILElement.h:

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

5 years agofast/fixed-layout/fixed-layout.html times out on Apple WK2 bots
ddkilzer@apple.com [Sun, 21 Jun 2015 16:44:41 +0000 (16:44 +0000)]
fast/fixed-layout/fixed-layout.html times out on Apple WK2 bots

The Flakiness Dashboard says this test times out on Apple
WebKit2 platforms by not calling testRunner.notifyDone():

<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Ffixed-layout%2Ffixed-layout.html>

* fast/css-grid-layout/flex-content-sized-columns-resize.html:
Use the same mechanism here that was just added in r185811.
* fast/fixed-layout/fixed-layout.html: Switch to using a
zero-delay timer instead of document.body.offsetTop.

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

5 years agoREGRESSION (r185809): fast/css-grid-layout/flex-content-sized-columns-resize.html...
ddkilzer@apple.com [Sun, 21 Jun 2015 16:16:05 +0000 (16:16 +0000)]
REGRESSION (r185809): fast/css-grid-layout/flex-content-sized-columns-resize.html hangs on WK1

Since window.resize() occurs in the same runloop as the load on
WK1, testRunner.notifyDone() would never get called.

* fast/css-grid-layout/flex-content-sized-columns-resize.html:
Call document.body.offsetTop to ensure layout occurs at the
initial window size before calling window.resize().

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

5 years agoBuild fix.
mitz@apple.com [Sun, 21 Jun 2015 16:01:51 +0000 (16:01 +0000)]
Build fix.

* Shared/API/Cocoa/WKFoundation.h: Don’t use generics if the SDK doesn’t support them.

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

5 years agofast/css-grid-layout/flex-content-sized-columns-resize.html is flaky
ddkilzer@apple.com [Sun, 21 Jun 2015 15:57:04 +0000 (15:57 +0000)]
fast/css-grid-layout/flex-content-sized-columns-resize.html is flaky

The Flakiness Dashboard says this test is flaky on Apple and EFL
WebKit2 platforms:

<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fcss-grid-layout%2Fflex-content-sized-columns-resize.html>

It currently doesn't wait for window.resize() to complete, which
is likely the source of flakiness.

* fast/css-grid-layout/flex-content-sized-columns-resize.html:
Switch to using notifyDone() inside a window.onresize function,
and make the test work in a web browser without TestRunner.

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

5 years ago[SOUP] Use GTask in WebKitSoupRequestInputStream
mcatanzaro@igalia.com [Sun, 21 Jun 2015 13:19:19 +0000 (13:19 +0000)]
[SOUP] Use GTask in WebKitSoupRequestInputStream
https://bugs.webkit.org/show_bug.cgi?id=146184

Reviewed by Carlos Garcia Campos.

Replace deprecated use of GSimpleAsyncResult with GTask.

* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(AsyncReadData::AsyncReadData):
(webkitSoupRequestInputStreamReadAsyncResultComplete):
(webkitSoupRequestInputStreamPendingReadAsyncComplete):
(webkitSoupRequestInputStreamReadAsync):
(webkitSoupRequestInputStreamReadFinish):

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

5 years agoFix format strings in NetworkCache.cpp and NetworkCacheStatistics.cpp and WebIDBServe...
mcatanzaro@igalia.com [Sun, 21 Jun 2015 13:15:57 +0000 (13:15 +0000)]
Fix format strings in NetworkCache.cpp and NetworkCacheStatistics.cpp and WebIDBServerConnection.cpp
https://bugs.webkit.org/show_bug.cgi?id=146172

Reviewed by Darin Adler.

Use the correct %"PRIu64" and %"PRIi64" for uint64_t and int64_t, instead of %llu and %lli.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::deleteDatabase):
(WebKit::WebIDBServerConnection::didDeleteDatabase):
(WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
(WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
(WebKit::WebIDBServerConnection::openTransaction):
(WebKit::WebIDBServerConnection::didOpenTransaction):
(WebKit::WebIDBServerConnection::beginTransaction):
(WebKit::WebIDBServerConnection::didBeginTransaction):
(WebKit::WebIDBServerConnection::commitTransaction):
(WebKit::WebIDBServerConnection::didCommitTransaction):
(WebKit::WebIDBServerConnection::resetTransaction):
(WebKit::WebIDBServerConnection::didResetTransaction):
(WebKit::WebIDBServerConnection::rollbackTransaction):
(WebKit::WebIDBServerConnection::didRollbackTransaction):
(WebKit::WebIDBServerConnection::createObjectStore):
(WebKit::WebIDBServerConnection::didCreateObjectStore):
(WebKit::WebIDBServerConnection::createIndex):
(WebKit::WebIDBServerConnection::didCreateIndex):
(WebKit::WebIDBServerConnection::deleteIndex):
(WebKit::WebIDBServerConnection::didDeleteIndex):
(WebKit::WebIDBServerConnection::get):
(WebKit::WebIDBServerConnection::put):
(WebKit::WebIDBServerConnection::didPutRecord):
(WebKit::WebIDBServerConnection::didGetRecord):
(WebKit::WebIDBServerConnection::didOpenCursor):
(WebKit::WebIDBServerConnection::didAdvanceCursor):
(WebKit::WebIDBServerConnection::didIterateCursor):
(WebKit::WebIDBServerConnection::count):
(WebKit::WebIDBServerConnection::didCount):
(WebKit::WebIDBServerConnection::deleteRange):
(WebKit::WebIDBServerConnection::didDeleteRange):
(WebKit::WebIDBServerConnection::clearObjectStore):
(WebKit::WebIDBServerConnection::didClearObjectStore):
(WebKit::WebIDBServerConnection::deleteObjectStore):
(WebKit::WebIDBServerConnection::didDeleteObjectStore):
(WebKit::WebIDBServerConnection::changeDatabaseVersion):
(WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
(WebKit::WebIDBServerConnection::openCursor):
(WebKit::WebIDBServerConnection::cursorAdvance):
(WebKit::WebIDBServerConnection::cursorIterate):

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

5 years ago[CMake] Ignore warnings from system headers when compiling Tools
mcatanzaro@igalia.com [Sun, 21 Jun 2015 13:15:54 +0000 (13:15 +0000)]
[CMake] Ignore warnings from system headers when compiling Tools
https://bugs.webkit.org/show_bug.cgi?id=146185

Reviewed by Martin Robinson.

Use the SYSTEM argument to the include_directories() command to silence compiler warnings
from system headers that we don't control.

* DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
* ImageDiff/CMakeLists.txt: Also, remove an EFL include directory from here...
* ImageDiff/PlatformEfl.cmake: ...and put it here where it belongs.
* ImageDiff/PlatformGTK.cmake:
* MiniBrowser/efl/CMakeLists.txt:
* MiniBrowser/gtk/CMakeLists.txt:
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/PlatformEfl.cmake:
* WebKitTestRunner/PlatformGTK.cmake:

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

5 years agolibwebkit2gtk fails to link without opengl
commit-queue@webkit.org [Sun, 21 Jun 2015 10:06:14 +0000 (10:06 +0000)]
libwebkit2gtk fails to link without opengl
https://bugs.webkit.org/show_bug.cgi?id=138332

Patch by Philip Chimento <philip.chimento@gmail.com> on 2015-06-21
Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/OptionsGTK.cmake: USE(TEXTURE_MAPPER) must be
enabled regardless of whether OpenGL is, because certain symbols
such as WebCore::GraphicsLayer::create() need to be built.

Source/WebCore:

* CMakeLists.txt: The third-party ANGLE directories need to be
included even if ENABLE(GRAPHICS_CONTEXT_3D) is false. They must
be included after the OpenGL headers as the comment says.
* platform/graphics/texmap/BitmapTexturePool.cpp: Remove
reference to no longer existent header file.

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

5 years agoDeselection of text causes a noticeable jump on force touch machines
timothy_horton@apple.com [Sun, 21 Jun 2015 06:43:14 +0000 (06:43 +0000)]
Deselection of text causes a noticeable jump on force touch machines
https://bugs.webkit.org/show_bug.cgi?id=146173
<rdar://problem/20992842>

Reviewed by Sam Weinig.

Source/WebCore:

When we have a TextIndicator of type Crossfade, we end up putting
a layer with the blue highlight + text painted into it on top of the
content, and cross-fading that layer to the yellow-highlighted text.

This is necessary for BounceAndCrossfade TextIndicators, because the
blue highlight has to bounce, but is not necessary for Crossfade-only
ones; we can just fade in the yellow highlight on top of the
existing blue page highlight, and all is well.

So, get rid of the Crossfade TextIndicator type and use FadeIn, separately
keeping track of whether or not we can add a margin (we still can't
add a margin to TextIndicators that indicate the page's current selection,
because the blue highlight cannot have the margin applied to it, and we
want the bounds to match exactly).

* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange):
If the range is the same as the selection, turn off the margin.
We were previously doing this based on the presentation transition, but now
there's no difference in presentation transition in this case.

(WebCore::TextIndicator::createWithSelectionInFrame):
(WebCore::TextIndicator::wantsBounce):
(WebCore::TextIndicator::wantsContentCrossfade):
(WebCore::TextIndicator::wantsFadeIn):
(WebCore::TextIndicator::wantsManualAnimation):
* page/TextIndicator.h:
Get rid of TextIndicatorPresentationTransition::Crossfade.

(WebCore::TextIndicator::setWantsMargin):
(WebCore::TextIndicator::wantsMargin):
Keep track of whether we want a margin.

* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
Determine if we should use a margin based on wantsMargin instead of the
presentation transition.

Source/WebKit/mac:

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _animationControllerForText]):
Get rid of TextIndicatorPresentationTransition::Crossfade.

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
Encode/decode wantsMargin.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
(WebKit::textIndicatorTransitionForImmediateAction): Deleted.
Get rid of TextIndicatorPresentationTransition::Crossfade.

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

5 years ago[Cocoa] Actually use Objective-C lightweight generics when the compiler supports...
mitz@apple.com [Sun, 21 Jun 2015 03:27:20 +0000 (03:27 +0000)]
[Cocoa] Actually use Objective-C lightweight generics when the compiler supports them
https://bugs.webkit.org/show_bug.cgi?id=146183

Reviewed by Sam Weinig.

* Shared/API/Cocoa/WKFoundation.h: When the compiler supports Objective-C generics, define
WK_ARRAY and WK_SET to use them. Also added a definition of WK_DICTIONARY.

* UIProcess/API/Cocoa/WKWebViewPrivate.h: Use WK_DICTIONARY for the options dictionary of
-_loadRequest:withOptions:.

* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]): Made the completion
halder type match the declaration, now that NSArray and WK_ARRAY(WKWebsiteDataRecord *) are
not the same.

* mac/postprocess-framework-headers.sh: Also rewrite WK_DICTIONARY.

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

5 years ago[EFL][GTK] Define GLIB_VERSION_MIN_REQUIRED and require glib 2.36 for GTK
mcatanzaro@igalia.com [Sat, 20 Jun 2015 23:00:45 +0000 (23:00 +0000)]
[EFL][GTK] Define GLIB_VERSION_MIN_REQUIRED and require glib 2.36 for GTK
https://bugs.webkit.org/show_bug.cgi?id=146181

Reviewed by Martin Robinson.

.:

Bump our GLib requirement to 2.36 to reflect reality, since we are using GTask.

* Source/cmake/OptionsGTK.cmake:

Source/WTF:

Define GLIB_VERSION_MIN_REQUIRED to avoid deprecation warnings.

* wtf/Platform.h:

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

5 years ago[GTK] Define GDK_VERSION_MIN_REQUIRED when compiling MiniBrowser
mcatanzaro@igalia.com [Sat, 20 Jun 2015 22:50:58 +0000 (22:50 +0000)]
[GTK] Define GDK_VERSION_MIN_REQUIRED when compiling MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=146186

Reviewed by Martin Robinson.

Define GDK_VERSION_MIN_REQUIRED when compiling MiniBrowser to silence several dozen
deprecation warnings. (MiniBrowser is unique in that it does not include wtf/Platform.h.)

* MiniBrowser/gtk/CMakeLists.txt:

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

5 years agoWeb Inspector: Unable to select parent element in the DOM tree path bar
nvasilyev@apple.com [Sat, 20 Jun 2015 22:47:39 +0000 (22:47 +0000)]
Web Inspector: Unable to select parent element in the DOM tree path bar
https://bugs.webkit.org/show_bug.cgi?id=145810

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.get selectionPathComponents):
* UserInterface/Views/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent.prototype.get selectedPathComponent):
(WebInspector.HierarchicalPathComponent.prototype._selectElementMouseUp):
(WebInspector.HierarchicalPathComponent.prototype._selectElementSelectionChanged):
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype._selectElementMouseDown): Deleted.

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

5 years ago[WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible
cdumez@apple.com [Sat, 20 Jun 2015 20:50:35 +0000 (20:50 +0000)]
[WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible
https://bugs.webkit.org/show_bug.cgi?id=146179
<rdar://problem/20923432>

Reviewed by Tim Horton.

After r170787, viewStateChange() would cause a synchronous IPC between
the UIProcess and the WebProcess when the view becomes visible. This
was to avoid painting empty / black tiles when unsuspending the
WebProcess on tab switch, in the event volatile IOSurfaces were purged.

However, this sync IPC can have performance implications and is not
needed when the content is not actually visible yet (e.g.
hideContentUntilNextUpdate() was called, or the tab was killed).

This patch avoids the synchronous IPC when the content is hidden and
exposes a private API on WKWebView so that clients can ask for the
content to be hidden until the next update. This would allow for
clients to avoid the synchronous IPC if they don't need the content
to be displayed synchronously (e.g. the view is obscured).

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _hideContentUntilNextUpdate]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::hasVisibleContent):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchViewStateChange):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::isContentHidden):

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

5 years agoREGRESSION (r185779): fast/canvas/{canvas-toDataURL-crash,pattern-too-large-to-create...
ddkilzer@apple.com [Sat, 20 Jun 2015 16:48:11 +0000 (16:48 +0000)]
REGRESSION (r185779): fast/canvas/{canvas-toDataURL-crash,pattern-too-large-to-create}.html are broken

This layout test started failing after the fix for:

    Extremely large canvas crashes on pre-El Capitan machines
    https://bugs.webkit.org/show_bug.cgi?id=146169
    <rdar://problem/21410046>

Different limits require different test results for each
platform.  This is the same fix for these tests as r185793.

* fast/canvas/canvas-toDataURL-crash-expected.txt: Update.
* fast/canvas/pattern-too-large-to-create-expected.txt: Update.
- Set limit to 268435456.

* platform/ios-simulator/fast/canvas/canvas-toDataURL-crash-expected.txt: Copied from LayoutTests/fast/canvas/canvas-toDataURL-crash-expected.txt.
* platform/ios-simulator/fast/canvas/pattern-too-large-to-create-expected.txt: Copied from LayoutTests/fast/canvas/pattern-too-large-to-create-expected.txt.
- Set limit to 16777216.

* platform/mac-yosemite/fast/canvas/canvas-toDataURL-crash-expected.txt: Copied from LayoutTests/fast/canvas/canvas-toDataURL-crash-expected.txt.
* platform/mac-yosemite/fast/canvas/pattern-too-large-to-create-expected.txt: Copied from LayoutTests/fast/canvas/pattern-too-large-to-create-expected.txt.
- Set limit to 67108864.

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

5 years agofast/canvas/webgl/tex-image-and-uniform-binding-bugs.html is slow on Mavericks WK1...
ddkilzer@apple.com [Sat, 20 Jun 2015 16:30:26 +0000 (16:30 +0000)]
fast/canvas/webgl/tex-image-and-uniform-binding-bugs.html is slow on Mavericks WK1 Debug builds

The Flakiness Dashboard says that this test times out, but only
on Mavericks WK1 Debug builds:

<https://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fcanvas%2Fwebgl%2Ftex-image-and-uniform-binding-bugs.html>

* platform/mac-wk1/TestExpectations: Mark test as slow on
Mavericks Debug builds:
- fast/canvas/webgl/tex-image-and-uniform-binding-bugs.html

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

5 years agoediting/selection/leak-document-with-selection-inside.html is flaky
ddkilzer@apple.com [Sat, 20 Jun 2015 16:16:15 +0000 (16:16 +0000)]
editing/selection/leak-document-with-selection-inside.html is flaky
<http://webkit.org/b/146182>

* TestExpectations: Mark as flaky:
- editing/selection/leak-document-with-selection-inside.html

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

5 years agoCheck for SHA1 certificates ignores subresources
mcatanzaro@igalia.com [Sat, 20 Jun 2015 16:06:23 +0000 (16:06 +0000)]
Check for SHA1 certificates ignores subresources
https://bugs.webkit.org/show_bug.cgi?id=146159

Reviewed by Dan Bernstein.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame): Call
PageLoadState::didDisplayOrRunInsecureContent if a certificate chain contains a non-root
SHA1 certificate when the frame is not the main frame.

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

5 years agoAdded availability information to a recently-added delegate method.
mitz@apple.com [Sat, 20 Jun 2015 15:57:03 +0000 (15:57 +0000)]
Added availability information to a recently-added delegate method.

Suggested by Alexey Proskuryakov and Anders Carlsson.

* UIProcess/API/Cocoa/WKUIDelegate.h: Annotated -webViewDidClose:.

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

5 years agoREGRESSION (r185779): fast/canvas/canvas-too-large-to-draw.html is still broken
ddkilzer@apple.com [Sat, 20 Jun 2015 15:10:33 +0000 (15:10 +0000)]
REGRESSION (r185779): fast/canvas/canvas-too-large-to-draw.html is still broken

This layout test started failing after the fix for:

    Extremely large canvas crashes on pre-El Capitan machines
    https://bugs.webkit.org/show_bug.cgi?id=146169
    <rdar://problem/21410046>

Different limits require different test results for each
platform.  Also update the line number from 35 to 36 since the
html test file was modified in r185792.

* fast/canvas/canvas-too-large-to-draw-expected.txt:
- Update limit to 16384x16384 for El Capitan (and other ports)
  and update line number.
* platform/ios-simulator/fast/canvas/canvas-too-large-to-draw-expected.txt: Added.
- New results with 4096x4096 limit for iOS.
* platform/mac-yosemite/fast/canvas/canvas-too-large-to-draw-expected.txt: Added.
- New results with 8192x8192 limit for Mac OS X 10.10.x and older.

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

5 years agoREGRESSION (r185779): fast/canvas/canvas-too-large-to-draw.html broken prior to El...
ddkilzer@apple.com [Sat, 20 Jun 2015 14:26:05 +0000 (14:26 +0000)]
REGRESSION (r185779): fast/canvas/canvas-too-large-to-draw.html broken prior to El Capitan

This layout test started failing after the fix for:

    Extremely large canvas crashes on pre-El Capitan machines
    https://bugs.webkit.org/show_bug.cgi?id=146169
    <rdar://problem/21410046>

* fast/canvas/canvas-too-large-to-draw.html: Update test for new
expectations after r185779.

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

5 years ago[ES6] Destructuring assignment need to accept iterables
utatane.tea@gmail.com [Sat, 20 Jun 2015 11:04:27 +0000 (11:04 +0000)]
[ES6] Destructuring assignment need to accept iterables
https://bugs.webkit.org/show_bug.cgi?id=144111

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch makes that destructuring assignments to array binding patterns accept iterables.
Previously, it just access the indexed properties.
After this patch, it iterates the given value by using ES6 iterator protocol.

The iteration becomes different from the for-of case.
1. Since there's no break/continue case, finally scope is not necessary.
2. When the error is raised, the close status of the iterator becomes true. So IteratorClose is not called for that.
3. Since the array binding patterns requires a limited count of iterations (if there is no rest(...rest) case), IteratorClose is called when the iteration does not consume the all values of the iterator.
4. Since the array binding patterns requires a specified count of iterations, iterator's next call is skipped when iterator becomes closed.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitIteratorClose):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayPatternNode::bindValue):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::finishArrayPattern):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseDeconstructionPattern):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):
* tests/stress/destructuring-assignment-accepts-iterables.js: Added.
(shouldBe):
(shouldThrow):
(.set shouldThrow):

LayoutTests:

From this patch, we use iterators for destructuring assignments to array binding patterns.
So test results become different.

* js/destructuring-assignment-expected.txt:
* js/parser-syntax-check-expected.txt:
* js/script-tests/destructuring-assignment.js:

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

5 years ago[EFL] Do not consider test directories when DEVELOPER_MODE is OFF
ryuan.choi@navercorp.com [Sat, 20 Jun 2015 09:18:43 +0000 (09:18 +0000)]
[EFL] Do not consider test directories when DEVELOPER_MODE is OFF
https://bugs.webkit.org/show_bug.cgi?id=146171

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake:
Exposed ENABLE_DEVELOPER_MODE to Compiler and CMake definition when DEVELOPER_MODE is ON.

Source/WebCore:

* platform/efl/EflInspectorUtilities.cpp:
(WebCore::inspectorResourcePath): Only used WEB_INSPECTOR_DIR which CMake decides properly.

Source/WebKit2:

* PlatformEfl.cmake:
Do not define SOURCE_DIR when DEVELOPER_MODE is OFF for seccomp filter
not to allow jhbuild directory.
* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::findProcessPath): Guard test code to ENABLE(DEVELOPER_MODE).

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

5 years agoWeb Inspector: Duplication of style attribute in rules panel for shadow content
commit-queue@webkit.org [Sat, 20 Jun 2015 06:20:21 +0000 (06:20 +0000)]
Web Inspector: Duplication of style attribute in rules panel for shadow content
https://bugs.webkit.org/show_bug.cgi?id=146176

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-19
Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
The styleText can be non-empty for a readonly editor if the editor is for
the style attribute of a shadow dom node. Instead of assuming it is empty
we can just clear the editor ourselves and regenerate from properties.

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

5 years ago[CMake] FindGTK3.cmake should not modify the values of build options
mcatanzaro@igalia.com [Sat, 20 Jun 2015 02:41:09 +0000 (02:41 +0000)]
[CMake] FindGTK3.cmake should not modify the values of build options
https://bugs.webkit.org/show_bug.cgi?id=144613

Reviewed by Martin Robinson.

* Source/cmake/FindGTK3.cmake: Do not check or set the value of ENABLE_X11_TARGET and
ENABLE_WAYLAND_TARGET. Instead, simply define the variables GTK3_SUPPORTS_X11 and
GTK3_SUPPORTS_WAYLAND as appropriate. Also, rename GTK_SUPPORTS_GESTURES to
GTK3_SUPPORTS_GESTURES for consistency.
* Source/cmake/OptionsGTK.cmake: Fail the build if the appropriate GTK+ backend is not
available. It's not possible to automatically select a backend correctly anymore, since all
options are set at the same time.

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

5 years agoExtremely large canvas crashes on pre-El Capitan machines
dino@apple.com [Sat, 20 Jun 2015 01:46:17 +0000 (01:46 +0000)]
Extremely large canvas crashes on pre-El Capitan machines
https://bugs.webkit.org/show_bug.cgi?id=146169
<rdar://problem/21410046>

Update expected results.

* fast/canvas/canvas-toDataURL-crash-expected.txt:
* fast/canvas/canvas-too-large-to-draw-expected.txt:
* fast/canvas/pattern-too-large-to-create-expected.txt:

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

5 years agoFix absolute value warning in LocalizedStringsGtk.cpp
mcatanzaro@igalia.com [Sat, 20 Jun 2015 01:24:55 +0000 (01:24 +0000)]
Fix absolute value warning in LocalizedStringsGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=145919

Reviewed by Martin Robinson.

Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
to an int is silly.

* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::localizedMediaTimeDescription):

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

5 years agoBuild fix after r146125.
rniwa@webkit.org [Sat, 20 Jun 2015 00:51:52 +0000 (00:51 +0000)]
Build fix after r146125.

* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):
(OSXSafariDriver.prepareEnv):

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

5 years agoWeb Inspector: Highlight currently edited CSS selector
commit-queue@webkit.org [Sat, 20 Jun 2015 00:48:28 +0000 (00:48 +0000)]
Web Inspector: Highlight currently edited CSS selector
https://bugs.webkit.org/show_bug.cgi?id=145658

Patch by Devin Rousso <drousso@apple.com> on 2015-06-19
Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/DOM.json: Added highlightSelector to show highlight over multiple nodes.

Source/WebCore:

Test: inspector/dom/highlight-multiple-shapes.html

* inspector/InspectorController.cpp:
(WebCore::InspectorController::buildObjectForHighlightedNode):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightSelector): Gets a list of all nodes matching a given selector string and highlights each of them.
* inspector/InspectorDOMAgent.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::hideHighlight):
(WebCore::InspectorOverlay::highlightNodeList): Loops through a given NodeList to create highlightObjects for each of them.
(WebCore::InspectorOverlay::shouldShowOverlay):
(WebCore::buildObjectForElementData): Don't show flow fragments when highlighting multiple nodes.
(WebCore::InspectorOverlay::buildHighlightObjectForNode):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode): Now returns an array containing the highlightObject for each highligthed node.
(WebCore::InspectorOverlay::drawNodeHighlight): Now sends an array to the InspectorOverlayPage.js to provide support for highlighting multiple nodes.
* inspector/InspectorOverlay.h:
* inspector/InspectorOverlayPage.js: Now expects an array as its parameter and loops through it to highlight each node given.
If the parameter array contains more than one element, do not draw the textbox containing info on that node.
(drawNodeHighlight):

Source/WebInspectorUI:

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection): Added event listeners on the selector text for mouseover and mouseout.
(WebInspector.CSSStyleDeclarationSection.prototype._highlightNodesWithSelector): Selector text mouseover action that highlights all nodes that match the selector string in the corresponding frame.
(WebInspector.CSSStyleDeclarationSection.prototype._hideHighlightOnNodesWithSelector): Selector text mouseout action that clears all highlights on matching nodes.
* UserInterface/Views/DOMNode.js:
(WebInspector.DOMNode): If the payload contains a frameId, then save it.
(WebInspector.DOMNode.frameIdentifier):

LayoutTests:

* inspector/dom/highlightSelector-expected.txt: Added.
* inspector/dom/highlightSelector-iframe.html: Added.
* inspector/dom/highlightSelector.html: Added.

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

5 years ago[SOUP] Define SOUP_VERSION_MIN_REQUIRED
mcatanzaro@igalia.com [Sat, 20 Jun 2015 00:14:20 +0000 (00:14 +0000)]
[SOUP] Define SOUP_VERSION_MIN_REQUIRED
https://bugs.webkit.org/show_bug.cgi?id=146165

Reviewed by Martin Robinson.

Define SOUP_VERSION_MIN_REQUIRED to avoid deprecation warnings.

* wtf/Platform.h:

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

5 years agoUnreviewed, fix a small indentation goof.
fpizlo@apple.com [Fri, 19 Jun 2015 23:55:25 +0000 (23:55 +0000)]
Unreviewed, fix a small indentation goof.

* JetStream/cdjs/motion.js:
(Motion.prototype.findIntersection):

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

5 years agoCrash under WebCore::PageConsoleClient::addMessage attempting to log insecure content...
commit-queue@webkit.org [Fri, 19 Jun 2015 23:51:49 +0000 (23:51 +0000)]
Crash under WebCore::PageConsoleClient::addMessage attempting to log insecure content message in ImageDocument
https://bugs.webkit.org/show_bug.cgi?id=146096

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-19
Reviewed by Timothy Hatcher.

Was able to reproduce this using a user stylesheet with an http css font
on a pdf (ImageDocument) main document loaded over https. Was unable to
create a reliable test for this scenario.

* page/PageConsoleClient.cpp:
(WebCore::getParserLocationForConsoleMessage):
The scriptableDocumentParser could be null, such as in an ImageDocument.

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

5 years agoJetStream should include a JavaScript version of the CDx real-time benchmark
fpizlo@apple.com [Fri, 19 Jun 2015 23:49:38 +0000 (23:49 +0000)]
JetStream should include a JavaScript version of the CDx real-time benchmark
https://bugs.webkit.org/show_bug.cgi?id=146156

Reviewed by Geoffrey Garen.

This adds a JavaScript port of the CDx real-time benchmark to JetStream, and retires
the cordic test because it was previously the smallest and probably least interesting.

The new test, "cdjs", is mostly a faithful rewrite of the Java code into JavaScript.
I got the Java code from https://www.cs.purdue.edu/sss/projects/cdx/.

There are some differences:

- It uses RedBlackTree's for all sets and maps rather than hashtables. This is clearly
  more in the spirit of real-time than the CDx benchmark. FWIW, CDx used to use trees
  and I don't know why that changed in the latest version.

- CDjs doesn't attempt to avoid memory allocations, unlike the real-time Java version.
  I wrote the code that I wanted to write for aesthetics, rather than the code that I
  would have written if I tried to write the fastest code possible. Again, I believe
  that this is in the spirit of CDj - it's meant to test what would happen if you wrote
  real-timey stuff in a high level language and actually took advantage of that
  language to be more productive.

The test score reflects the average latency of the worst 10 samples out of 200 samples.
The simulation uses 1000 aircraft, flying along paths that result in some detected
collisions every once in a while. The benchmark validates its results by checking the
total number of collisions detected.

Apart from the integration into the JetStream harness, the CDjs directory contains a
fully self-contained benchmark that could be run either in the jsc shell or in browser.

This new code uses the same 3-clause BSD license as the Purdue code, and gives
attribution to Purdue in almost all files. I believe that is appropriate since I wrote
most of the JS files by looking at the Purdue Java code and trascribing to JavaScript.
In some cases, I even copy-pasted the Java code, like the complicated math for
four-dimensional intersections and voxel hashing.

* JetStream/CDjsSetup.js: Added.
* JetStream/Octane2Setup.js:
* JetStream/Reference.js:
* JetStream/cdjs: Added.
* JetStream/cdjs/benchmark.js: Added.
(benchmark):
* JetStream/cdjs/call_sign.js: Added.
(CallSign):
(CallSign.prototype.compareTo):
(CallSign.prototype.toString):
* JetStream/cdjs/collision.js: Added.
(Collision):
(Collision.prototype.toString):
* JetStream/cdjs/collision_detector.js: Added.
(CollisionDetector):
(CollisionDetector.prototype.handleNewFrame.get for):
(CollisionDetector.prototype.handleNewFrame):
* JetStream/cdjs/constants.js: Added.
* JetStream/cdjs/main.html: Added.
* JetStream/cdjs/main.js: Added.
* JetStream/cdjs/motion.js: Added.
(Motion):
(Motion.prototype.toString):
(Motion.prototype.delta):
(Motion.prototype.findIntersection):
* JetStream/cdjs/motion_test.js: Added.
(checkDoesIntersect):
(checkDoesNotIntersect):
(makeMotion):
* JetStream/cdjs/red_black_tree.js: Added.
(RedBlackTree):
(RedBlackTree.):
* JetStream/cdjs/red_black_tree_test.js: Added.
(test):
(test.):
* JetStream/cdjs/reduce_collision_set.js: Added.
(drawMotionOnVoxelMap):
(drawMotionOnVoxelMap.):
(.get reduceCollisionSet):
* JetStream/cdjs/reduce_collision_set_test.js: Added.
(makeMotion):
(keys):
(test):
* JetStream/cdjs/simulator.js: Added.
(Simulator):
(Simulator.prototype.simulate):
* JetStream/cdjs/util.js: Added.
(compareNumbers):
(averageAbovePercentile):
(currentTime):
(else.currentTime):
* JetStream/cdjs/vector_2d.js: Added.
(Vector2D):
(Vector2D.prototype.plus):
(Vector2D.prototype.minus):
(Vector2D.prototype.toString):
(Vector2D.prototype.compareTo):
* JetStream/cdjs/vector_3d.js: Added.
(Vector3D):
(Vector3D.prototype.plus):
(Vector3D.prototype.minus):
(Vector3D.prototype.dot):
(Vector3D.prototype.squaredMagnitude):
(Vector3D.prototype.magnitude):
(Vector3D.prototype.times):
(Vector3D.prototype.as2D):
(Vector3D.prototype.toString):
* JetStream/create.rb:
* JetStream/index-TEMPLATE.html:
* JetStream/sunspider/cordic.js: Removed.

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

5 years agoExtremely large canvas crashes on pre-El Capitan machines
dino@apple.com [Fri, 19 Jun 2015 23:45:35 +0000 (23:45 +0000)]
Extremely large canvas crashes on pre-El Capitan machines
https://bugs.webkit.org/show_bug.cgi?id=146169
<rdar://problem/21410046>

Reviewed by Tim Horton.

Source/WebCore:

On machines before El Capitan, make the maximum canvas size
8k by 8k.

Covered by existing tests.

* html/HTMLCanvasElement.cpp:

LayoutTests:

Un-skip fast/canvas/canvas-too-large-to-draw.html.

* platform/mac/TestExpectations:

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

5 years agoSelection services cannot be invoked when force click is enabled
timothy_horton@apple.com [Fri, 19 Jun 2015 23:40:32 +0000 (23:40 +0000)]
Selection services cannot be invoked when force click is enabled
https://bugs.webkit.org/show_bug.cgi?id=146166
<rdar://problem/21468362>

Reviewed by Darin Adler.

* page/mac/ServicesOverlayController.h:
Turn Highlight::Type into something we can use for dirty flags.

* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::createForSelection):
(WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
(WebCore::ServicesOverlayController::ServicesOverlayController):
(WebCore::ServicesOverlayController::selectionRectsDidChange):
(WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
(WebCore::ServicesOverlayController::invalidateHighlightsOfType):
(WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded):
(WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
(WebCore::ServicesOverlayController::buildSelectionHighlight):
(WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
(WebCore::ServicesOverlayController::determineActiveHighlight):
(WebCore::ServicesOverlayController::didScrollFrame):
(WebCore::ServicesOverlayController::handleClick):
Coalesce highlight rebuilding so that things (like TextIndicator creation)
that change the selection and then reset it immediately don't cause us
to lose the active highlight.

This also means that if the selection changes multiple times in a runloop
(easily possible from script), we won't waste a lot of time rebuilding highlights.

(WebCore::ServicesOverlayController::didRebuildPotentialHighlights):
Merged into buildPotentialHighlightsIfNeeded.

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

5 years agoWeb Inspector: TimelineAgent needs to handle nested runloops
mattbaker@apple.com [Fri, 19 Jun 2015 23:35:53 +0000 (23:35 +0000)]
Web Inspector: TimelineAgent needs to handle nested runloops
https://bugs.webkit.org/show_bug.cgi?id=145090

Reviewed by Joseph Pecoraro.

Source/WebCore:

Previously nested run loops caused InspectorTimelineAgent to prematurely pop the current run loop record. This
patch adds a counter to track the run loop nesting level, and rendering frame records are only pushed/popped
when the nesting level is zero. Run loop entry/exit notifications received while the debugger is paused do not
affect the nesting level.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:

LayoutTests:

* TestExpectations:
Unskip tests after improvements to nested runloop handling in InspectorTimelineAgent.

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

5 years agoFollow-up fix to r185766.
bfulgham@apple.com [Fri, 19 Jun 2015 23:33:39 +0000 (23:33 +0000)]
Follow-up fix to r185766.
https://bugs.webkit.org/show_bug.cgi?id=22132

Reviewed by Zalan Bujtas.

Suggested by Darin Adler in the bug.

* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware): Use WTF::move when passing
the new tileImageCopy RefPtr.

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

5 years agoREGRESSION(r185475): [Mac] ASSERT() when clicking on text using web fonts with force...
mmaxfield@apple.com [Fri, 19 Jun 2015 23:33:36 +0000 (23:33 +0000)]
REGRESSION(r185475): [Mac] ASSERT() when clicking on text using web fonts with force touch trackpad
https://bugs.webkit.org/show_bug.cgi?id=145890
<rdar://problem/21390877>

Reviewed by Darin Adler and Tim Horton.

The best place to stop the serialization of unserializable fonts is inside WebKit2's IPC code. We want
this logic to occur when encoding an NSAttributedString, rather than when encoding an NSDictionary,
because changing the shape of an NSAttributedString is less likely to result in problems rather than
changing the shape of an NSDictionary.

* Shared/mac/ArgumentCodersMac.mm:
(IPC::fontIsSerializable):
(IPC::filterUnserializableValues):
(IPC::encode):

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

5 years ago[SOUP] Fix return-type-c-linkage warning after r185553
mcatanzaro@igalia.com [Fri, 19 Jun 2015 23:25:51 +0000 (23:25 +0000)]
[SOUP] Fix return-type-c-linkage warning after r185553
https://bugs.webkit.org/show_bug.cgi?id=146014

Reviewed by Martin Robinson.

Source/WebCore:

* platform/network/soup/WebKitSoupRequestGeneric.cpp:
(webkitSoupRequestGenericGetRequest): Return a pointer rather than a reference.
* platform/network/soup/WebKitSoupRequestGeneric.h: webkitSoupRequestGenericGetRequest now
returns a pointer rather than a reference.

Source/WebKit2:

* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
(WebKit::CustomProtocolManagerImpl::start): webkitSoupRequestGenericGetRequest now returns
a pointer rather than a reference.

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

5 years agoGardening: fix build for EWS bots.
mark.lam@apple.com [Fri, 19 Jun 2015 22:40:25 +0000 (22:40 +0000)]
Gardening: fix build for EWS bots.

Not reviewed.

* runtime/JSArray.cpp:
(JSC::JSArray::setLengthWithArrayStorage):

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

5 years agoCrash in com.apple.WebKit.WebContent at com.apple.JavaScriptCore: JSC::FTL::fixFuncti...
msaboff@apple.com [Fri, 19 Jun 2015 22:28:18 +0000 (22:28 +0000)]
Crash in com.apple.WebKit.WebContent at com.apple.JavaScriptCore: JSC::FTL::fixFunctionBasedOnStackMaps + 17225
https://bugs.webkit.org/show_bug.cgi?id=146133

Reviewed by Geoffrey Garen.

When generating code to put in inline caching areas, if there isn't enough space,
then create and link to an out of line area.  We connect the inline code to this
out of line code area by planting a jump from the inline area to the out of line
code and appending a jump at the end of the out of line code bck to the instruction
following the inline area.  We fill the unused inline area with nops, primarily to
ensure the disassembler doesn't get confused.

* ftl/FTLCompile.cpp:
(generateInlineIfPossibleOutOfLineIfNot): New function that determines if there is enough space
in the inline code area for the code to link.  If so, it links inline, otherwise it links the
code out of line and plants appropriate jumps to/from the out of line code.
(generateICFastPath):
(generateCheckInICFastPath):
(fixFunctionBasedOnStackMaps):
Use generateInlineIfPossibleOutOfLineIfNot() to link code intended for inline cache space.

* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLJITFinalizer.h:
(JSC::FTL::OutOfLineCodeInfo::OutOfLineCodeInfo):
Added code to finalize any out of line LinkBuffer created by generateInlineIfPossibleOutOfLineIfNot().

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

5 years agoPlayed <audio> looks invisible against the gray background
dino@apple.com [Fri, 19 Jun 2015 22:24:55 +0000 (22:24 +0000)]
Played <audio> looks invisible against the gray background
https://bugs.webkit.org/show_bug.cgi?id=146164
<rdar://problem/21014284>

Reviewed by Brent Fulgham.

The plus-darker blend mode was not allowing any white to
show through in the rendering. We don't need this for
audio controls, where we draw on an opaque grey background.

* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-panel): Darken the color of the controls a
little to make white stand out more.
(audio::-webkit-media-controls-timeline): Remove the plus-darker blending.
(video::-webkit-media-controls-timeline): Apply blending only to video.

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

5 years agoWebKit crash while loading nytimes at JavaScriptCore: JSC::ExecutableAllocator::alloc...
ggaren@apple.com [Fri, 19 Jun 2015 22:03:06 +0000 (22:03 +0000)]
WebKit crash while loading nytimes at JavaScriptCore: JSC::ExecutableAllocator::allocate + 276
https://bugs.webkit.org/show_bug.cgi?id=146163
<rdar://problem/20392986>

Reviewed by Michael Saboff.

There's no good way to test this in our test harness because we don't
have a way to simulate executable memory pressure, and doing so would
cause the cases that still use JITCompilationMustSucceed to crash.

Instead, I tested by manually forcing all regexp JIT compilation to
fail and running the JavaScriptCore tests.

* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::compile): Allow compilation to fail. We can
fall back to the regexp interpreter if we need to.

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

5 years agoVarious assertion failures occur when executing script in the midst of DOM insertion
aestes@apple.com [Fri, 19 Jun 2015 21:55:55 +0000 (21:55 +0000)]
Various assertion failures occur when executing script in the midst of DOM insertion
https://bugs.webkit.org/show_bug.cgi?id=132482

Reviewed by Darin Adler.

Source/WebCore:

Prior to this change, when an element containing a <script> child was inserted into a document, the script was
executed in ScriptElement::insertedInto(). That script can access nodes that follow it in the newly-inserted
hierarchy but are not yet fully inserted, leading to at least the following problems:

    - The script could remove a node that is not yet marked as in the document.
    - The script could remove a named <map> that has yet to be added to TreeScope::m_imageMapsByName.
    - The script could remove a form control that has yet to be added to FormController::m_formElementsWithState.

These scenarios all result in assertion failures. This change ensures that each node in the newly-inserted
hierarchy is fully inserted before executing any scripts.

Tests: fast/dom/element-removed-while-inserting-parent-crash.html
       fast/dom/named-map-removed-while-inserting-parent-crash.html
       fast/forms/form-control-removed-while-inserting-parent-crash.html
       svg/dom/element-removed-while-inserting-parent-crash.html

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::shouldNotifySubtreeInsertions): Renamed from insertedInto().
Returned true in the case where insertedInto() would've called prepareScript().
(WebCore::ScriptElement::didNotifySubtreeInsertions): Called prepareScript().
(WebCore::ScriptElement::insertedInto): Renamed to shouldNotifySubtreeInsertions().
* dom/ScriptElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::insertedInto): If shouldNotifySubtreeInsertions() is true, returned InsertionShouldCallDidNotifySubtreeInsertions.
Otherwise, returned InsertionDone.
(WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
* html/HTMLScriptElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::insertedInto): Did the same as HTMLScriptElement::insertedInto().
(WebCore::SVGScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
* svg/SVGScriptElement.h:

LayoutTests:

Wrote named-map-removed-while-inserting-parent-crash.html by reducing the test case attached to bug 132482.
The remaining tests were taken from blink r132482.

* fast/dom/element-removed-while-inserting-parent-crash-expected.txt: Added.
* fast/dom/element-removed-while-inserting-parent-crash.html: Added.
* fast/dom/named-map-removed-while-inserting-parent-crash-expected.txt: Added.
* fast/dom/named-map-removed-while-inserting-parent-crash.html: Added.
* fast/forms/form-control-removed-while-inserting-parent-crash-expected.txt: Added.
* fast/forms/form-control-removed-while-inserting-parent-crash.html: Added.
* svg/dom/element-removed-while-inserting-parent-crash-expected.txt: Added.
* svg/dom/element-removed-while-inserting-parent-crash.html: Added.

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

5 years agoEmploy explicit operator bool() instead of using the UnspecifiedBoolType workaround.
mark.lam@apple.com [Fri, 19 Jun 2015 21:17:54 +0000 (21:17 +0000)]
Employ explicit operator bool() instead of using the UnspecifiedBoolType workaround.
https://bugs.webkit.org/show_bug.cgi?id=146154

Reviewed by Darin Adler.

* assembler/MacroAssemblerCodeRef.h:
(JSC::MacroAssemblerCodePtr::dataLocation):
(JSC::MacroAssemblerCodePtr::operator bool):
(JSC::MacroAssemblerCodePtr::operator==):
(JSC::MacroAssemblerCodeRef::tryToDisassemble):
(JSC::MacroAssemblerCodeRef::operator bool):
(JSC::MacroAssemblerCodeRef::dump):
(JSC::MacroAssemblerCodePtr::operator UnspecifiedBoolType*): Deleted.
(JSC::MacroAssemblerCodeRef::operator UnspecifiedBoolType*): Deleted.

* bytecode/CodeOrigin.cpp:
(JSC::CodeOrigin::isApproximatelyEqualTo):
- Fixed a bug here where we were expecting to compare Executable pointers, but
  ended up comparing a (UnspecifiedBoolType*)1 with another
  (UnspecifiedBoolType*)1.

* bytecode/LLIntCallLinkInfo.h:
(JSC::LLIntCallLinkInfo::~LLIntCallLinkInfo):
(JSC::LLIntCallLinkInfo::isLinked):
(JSC::LLIntCallLinkInfo::unlink):
* dfg/DFGBlockWorklist.h:
(JSC::DFG::BlockWith::BlockWith):
(JSC::DFG::BlockWith::operator bool):
(JSC::DFG::BlockWithOrder::BlockWithOrder):
(JSC::DFG::BlockWithOrder::operator bool):
(JSC::DFG::BlockWith::operator UnspecifiedBoolType*): Deleted.
(JSC::DFG::BlockWithOrder::operator UnspecifiedBoolType*): Deleted.
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGLazyNode.h:
(JSC::DFG::LazyNode::operator!):
(JSC::DFG::LazyNode::operator bool):
(JSC::DFG::LazyNode::operator UnspecifiedBoolType*): Deleted.
* heap/CopyWriteBarrier.h:
(JSC::CopyWriteBarrier::operator!):
(JSC::CopyWriteBarrier::operator bool):
(JSC::CopyWriteBarrier::get):
(JSC::CopyWriteBarrier::operator UnspecifiedBoolType*): Deleted.
* heap/Handle.h:
(JSC::HandleBase::operator!):
(JSC::HandleBase::operator bool):
(JSC::HandleBase::slot):
(JSC::HandleBase::operator UnspecifiedBoolType*): Deleted.
* heap/Strong.h:
(JSC::Strong::operator!):
(JSC::Strong::operator bool):
(JSC::Strong::swap):
(JSC::Strong::operator UnspecifiedBoolType*): Deleted.
* jit/JITWriteBarrier.h:
(JSC::JITWriteBarrierBase::operator bool):
(JSC::JITWriteBarrierBase::operator!):
(JSC::JITWriteBarrierBase::setFlagOnBarrier):
(JSC::JITWriteBarrierBase::operator UnspecifiedBoolType*): Deleted.
* runtime/JSArray.cpp:
(JSC::JSArray::setLengthWithArrayStorage):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::JSValue):
(JSC::JSValue::operator bool):
(JSC::JSValue::operator==):
(JSC::JSValue::operator UnspecifiedBoolType*): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::hasSparseMap):
* runtime/PropertyDescriptor.h:
(JSC::PropertyDescriptor::writablePresent):
(JSC::PropertyDescriptor::enumerablePresent):
(JSC::PropertyDescriptor::configurablePresent):
(JSC::PropertyDescriptor::setterPresent):
(JSC::PropertyDescriptor::getterPresent):
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::slot):
(JSC::WriteBarrierBase::operator bool):
(JSC::WriteBarrierBase::operator!):
(JSC::WriteBarrierBase<Unknown>::tagPointer):
(JSC::WriteBarrierBase<Unknown>::payloadPointer):
(JSC::WriteBarrierBase<Unknown>::operator bool):
(JSC::WriteBarrierBase<Unknown>::operator!):
(JSC::WriteBarrierBase::operator UnspecifiedBoolType*): Deleted.
(JSC::WriteBarrierBase<Unknown>::operator UnspecifiedBoolType*): Deleted.

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

5 years agoRename WKSecurityOrigin.h/cpp to WKSecurityOriginRef.h/cpp.
beidson@apple.com [Fri, 19 Jun 2015 20:47:33 +0000 (20:47 +0000)]
Rename WKSecurityOrigin.h/cpp to WKSecurityOriginRef.h/cpp.
https://bugs.webkit.org/show_bug.cgi?id=146152

Reviewed by Dan Bernstein.

Source/WebKit2:

* CMakeLists.txt:

* Shared/API/c/WKSecurityOriginRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp.
* Shared/API/c/WKSecurityOriginRef.h: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.h.

* UIProcess/API/efl/ewk_security_origin.cpp:
* UIProcess/API/efl/ewk_storage_manager.cpp:

* WebKit2.xcodeproj/project.pbxproj:

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
* WebKitTestRunner/WebNotificationProvider.cpp:

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

5 years agoAll calls of ImageBuffer::create should null check the return value
bfulgham@apple.com [Fri, 19 Jun 2015 20:45:54 +0000 (20:45 +0000)]
All calls of ImageBuffer::create should null check the return value
https://bugs.webkit.org/show_bug.cgi?id=22132

Reviewed by Zalan Bujtas.

ImageBuffer::create returns nullptr for a number of reasons, and should be
expected to do so. We missed this check in a few places, resulting in
crashes on some systems. Likewise, ImageBuffer::copyImage may return nullptr
in normal use and should be checked.

Source/WebCore:

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::drawPattern): Add nullptr check for create and copyImage. Remove
extra call to 'setImageObserver'.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::drawPattern): Add nullptr check for copyImage.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::drawPattern): Add nullptr checks for copyImage.
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware): Add nullptr check for copyImage.
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::asImageBuffer): Add nullptr check for create.
(WebCore::FilterEffect::openCLImageToImageBuffer): Ditto.
* platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::updateContents): Add nullptr checks for create and copyImage.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer): Add nullptr check for copyImage.

Source/WebKit/mac:

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::imageForCurrentSharingServicePickerItem): Add nullptr check
for copyImage.

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