WebKit.git
4 years agoReplace script runner to use mocha.js tests
rniwa@webkit.org [Tue, 12 Apr 2016 03:42:29 +0000 (03:42 +0000)]
Replace script runner to use mocha.js tests
https://bugs.webkit.org/show_bug.cgi?id=156490

Reviewed by Chris Dumez.

Replaced run-tests.js, which was a whole test harness for running legacy tests by tools/run-tests.py
which is a thin wrapper around mocha.js.

* run-tests.js: Removed.
* tests: Removed.
* tools/run-tests.py: Added.
(main):

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

4 years agoNew syncing script sometimes schedules a build request on a wrong builder
rniwa@webkit.org [Tue, 12 Apr 2016 03:18:16 +0000 (03:18 +0000)]
New syncing script sometimes schedules a build request on a wrong builder
https://bugs.webkit.org/show_bug.cgi?id=156489

Reviewed by Stephanie Lewis.

The bug was caused by _scheduleNextRequestInGroupIfSlaveIsAvailable scheduling the next build request on
any available syncer regardless of whether the request is the first one in the test group or not because
BuildRequest.order was returning a string instead of a number.

Also fixed a bug that BuildbotTriggerable.syncOnce was re-ordering test groups by their id's instead of
respecting the order in which the perf dashboard returned.

* public/v3/models/build-request.js:
(BuildRequest.prototype.order): Force the order to be a number.
* server-tests/api-build-requests-tests.js: Assert the order as numbers.
* server-tests/resources/mock-data.js:
(MockData.addAnotherMockTestGroup): Changed the test group id to 601, which is after the first mock data.
The old number was masking a bug in BuildbotTriggerable that it was re-ordering test groups by their id's
instead of using the order set forth by the perf dashboard.
(MockData.mockTestSyncConfigWithSingleBuilder):
* server-tests/tools-buildbot-triggerable-tests.js: Added a test case for scheduling two build requests in
a single call to syncOnce. Each build request should be scheduled on the same builder as the previous build
requests in the same test group.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.syncOnce): Order test groups by groupOrder, which is the index at which first
build request in the group appeared.
(BuildbotTriggerable.prototype._scheduleNextRequestInGroupIfSlaveIsAvailable): Don't re-order build requests
as they're already sorted on the server side.
(BuildbotTriggerable._testGroupMapForBuildRequests): Added groupOrder to test group info

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

4 years agoUse WeakPtrs to avoid using deallocated Widgets and ScrollableAreas
bfulgham@apple.com [Tue, 12 Apr 2016 03:07:18 +0000 (03:07 +0000)]
Use WeakPtrs to avoid using deallocated Widgets and ScrollableAreas
https://bugs.webkit.org/show_bug.cgi?id=156420
<rdar://problem/25637378>

Reviewed by Darin Adler.

Source/WebCore:

Avoid the risk of using deallocated Widgets and ScrollableAreas by using WeakPtrs instead of
bare pointers. This allows us to remove some explicit calls to get ScrollableArea and Widget
members in the event handling logic. Instead, null checks are sufficient to ensure we never
accidentally dereference a deleted element.

1. Modify the ScrollableArea class to support vending WeakPtrs.
2. Modify the Event Handling code to use WeakPtrs to hold ScrollableArea and RenderWidget
   objects, and to null-check these elements after event handling dispatching is finished
   to handle cases where these objects are destroyed.

Test: fast/events/wheel-event-destroys-frame.html
      fast/events/wheel-event-destroys-overflow.html

* page/EventHandler.cpp:
(WebCore::EventHandler::platformPrepareForWheelEvents): Change signature for WeakPtr.
(WebCore::EventHandler::platformCompleteWheelEvent): Ditto.
(WebCore::EventHandler::platformNotifyIfEndGesture): Ditto.
(WebCore::widgetForElement): Change to return a WeakPtr.
(WebCore::EventHandler::handleWheelEvent): Use WeakPtrs to hold elements that might be destroyed
during event handling.
* page/EventHandler.h:
* page/mac/EventHandlerEfl.cpp: Rename passWheelEventToWidget to widgetDidHandleWheelEvent.
* page/mac/EventHandlerGtk.cpp: Ditto.
* page/mac/EventHandlerIOS.mm: Ditto.
* page/mac/EventHandlerMac.mm:
(WebCore::scrollableAreaForEventTarget): Renamed from scrollViewForEventTarget. Return
a WeakPtr rather than a bare pointer.
(WebCore::scrollableAreaForContainerNode): Return WeakPtr rather than bare pointer.
(WebCore::EventHandler::completeWidgetWheelEvent): Added.
(WebCore::EventHandler::passWheelEventToWidget): Deleted.
(WebCore::EventHandler::platformPrepareForWheelEvents): Convert to WeakPtrs.
(WebCore::EventHandler::platformCompleteWheelEvent): Ditto.
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Ditto.
(WebCore::EventHandler::platformNotifyIfEndGesture): Ditto.
(WebCore::EventHandler::widgetDidHandleWheelEvent): Renamed from passWheelEventToWidget.
(WebCore::EventHandler::widgetForEventTarget): Converted from static function to static
method so it can be shared with EventHandlerMac.
(WebCore::scrollViewForEventTarget): Deleted.
* page/mac/EventHandlerWin.cpp: Rename passWheelEventToWidget to widgetDidHandleWheelEvent.
* platform/ScrollableArea.cpp:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::createWeakPtr): Added.
* platform/Widget.h:
(WebCore::ScrollableArea::createWeakPtr): Added.

LayoutTests:

* fast/events/wheel-event-destroys-overflow-expected.txt: Added.
* fast/events/wheel-event-destroys-overflow.html: Added.
* platform/ios-simulator/TestExpectations: Skip wheel-event test on iOS.

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

4 years agoputImageData needs to premultiply input
dino@apple.com [Tue, 12 Apr 2016 02:57:03 +0000 (02:57 +0000)]
putImageData needs to premultiply input
https://bugs.webkit.org/show_bug.cgi?id=156488
<rdar://problem/25672675>

Reviewed by Zalan Bujtas.

Source/WebCore:

I made a mistake in r187534 as I was converting get and putImageData
to use Accelerate. The incoming data is unmultiplied, and should
be premultiplied before copying into the backing store. I was
accidentally unmultiplying unmultiplied data, which caused
some pretty psychedelic results.

Test: fast/canvas/putImageData-unmultiplied.html

* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::putData): Call premultiply, not unpremultiply.

LayoutTests:

Tests that putImageData is taking unmultiplied data,
premultiplying it, then copying into the backing store.

* fast/canvas/putImageData-unmultiplied-expected.html: Added.
* fast/canvas/putImageData-unmultiplied.html: Added.

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

4 years agoUpdate Animometer to accommodate different screens
jonlee@apple.com [Tue, 12 Apr 2016 02:12:23 +0000 (02:12 +0000)]
Update Animometer to accommodate different screens
https://bugs.webkit.org/show_bug.cgi?id=156449

Reviewed by Darin Adler.
Provisionally reviewed by Said Abou-Hallawa.

* Animometer/index.html: Wrap button in a container to add padding at the bottom.
* Animometer/resources/debug-runner/animometer.css:
(@media screen and (min-device-width: 1800px)): Deleted.
(@media screen and (min-width: 1800px)): Cannot use min-device-width since it may match incorrectly.
(screen and (max-device-height: 414px) and (orientation: landscape)): Some devices swap device width
and height with orientation change.
* Animometer/resources/runner/animometer.css: Similar.
(screen and (min-device-width: 1024px) and (orientation: landscape)):
(screen and (max-device-height: 414px) and (orientation: landscape)):
(.frame-container): On smaller iPhones, adding 1px prevents the navigation bars from appearing.
(@media screen and (min-device-width: 768px) and (max-device-width: 1024px)): Deleted.
(@media (min-device-height: 768px) and (max-device-height: 1024px)): Target iPad Airs and similar.
(@media screen and (min-device-width: 1024px) and (max-device-width: 1366px)): Deleted.
(@media screen and (max-device-width: 1024px) and (min-device-height: 1366px)): Target iPad Pro.
(#results footer): Add padding below the button for testing again.
* Animometer/tests/master/multiply.html: Remove the center text.
* Animometer/tests/master/resources/text.js: Update the test so that in every frame the text moves.
* Animometer/tests/master/text.html: Update the text sizing depending on the size of the device.

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

4 years agoWhen clearing cache, also clear AVFoundation cache.
commit-queue@webkit.org [Tue, 12 Apr 2016 01:00:07 +0000 (01:00 +0000)]
When clearing cache, also clear AVFoundation cache.
https://bugs.webkit.org/show_bug.cgi?id=155783
rdar://problem/25252541

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-04-11
Reviewed by Darin Adler.

Source/WebCore:

Use AVAssetCache at a specified location on disk for all AVURLAssets. This AVAssetCache
can then be used to manage the cache storage used by AVFoundation. It is used to query the
contents of the cache in originsInMediaCache() and to clear the cache completely or partially in
clearMediaCache() and clearMediaCacheForOrigins().

Use SecurityOrigin instead of the less formal site String to represent origins in the cache.

* html/HTMLMediaElement.cpp:
(WebCore::sharedMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::setMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::mediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::originsInMediaCache): Added.
(WebCore::HTMLMediaElement::clearMediaCache): Added parameter.
(WebCore::HTMLMediaElement::clearMediaCacheForOrigins): Added.
(WebCore::HTMLMediaElement::mediaPlayerMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::getSitesInMediaCache): Deleted.
(WebCore::HTMLMediaElement::clearMediaCacheForSite): Deleted.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::clearMediaCache): Added parameter.
* platform/graphics/MediaPlayer.cpp:
(WebCore::addMediaEngine): Add new cache methods.
(WebCore::addToHash): Added.
(WebCore::MediaPlayer::originsInMediaCache): Added.
(WebCore::MediaPlayer::clearMediaCache): Added parameter.
(WebCore::MediaPlayer::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayer::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayer::clearMediaCacheForSite): Deleted.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerMediaCacheDirectory): Added.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::originsInMediaCache): Added.
(WebCore::MediaPlayerPrivateInterface::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateInterface::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForSite): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Added cache methods.
(WebCore::assetCacheForPath): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache): Added.
(WebCore::toSystemClockTime): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Added.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Added cache methods.
(WebCore::MediaPlayerPrivateQTKit::originsInMediaCache): Added.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateQTKit::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): Deleted.
* platform/spi/mac/AVFoundationSPI.h:

Source/WebKit2:

Include the HTMLMediaElement media cache when doing disk cache operations.
Add a sandbox extension for media cache directory. This allows the UI process and the web process
to access the same cache.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Add media cache directory.
(WebKit::WebProcessCreationParameters::decode): Add media cache directory.
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add media cache directory.
(API::ProcessPoolConfiguration::copy): Add media cache directory.
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultMediaCacheDirectory): Default implementation.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultMediaCacheDirectory): Media cache is in temporary directory.
(API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): For resources in temporary directory.
(API::WebsiteDataStore::defaultDataStoreConfiguration): Init media cache directory.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory):
* UIProcess/WebProcessPool.cpp:
(WebKit::legacyWebsiteDataStoreConfiguration): Add mediaCacheDirectory.
(WebKit::WebProcessPool::createNewWebProcess): Add mediaCacheDirectory.
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::fetchData): Implement for mediaCacheDirectory.
(WebKit::WebsiteDataStore::removeData): Implement for mediaCacheDirectory.
* UIProcess/WebsiteData/WebsiteDataStore.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Initialize media cache directory.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Consume sandbox extension.

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

4 years agoWeb Inspector: Tab Bar items get unreadable at narrow window widths, should collapse...
commit-queue@webkit.org [Tue, 12 Apr 2016 00:48:12 +0000 (00:48 +0000)]
Web Inspector: Tab Bar items get unreadable at narrow window widths, should collapse earlier
https://bugs.webkit.org/show_bug.cgi?id=156477

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-11
Reviewed by Timothy Hatcher.

* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype.layout):
Hide-titles sooner since a width of 60 results in only a few characters
and looks poor.

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

4 years agoUnskip imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry-big.htm
jiewen_tan@apple.com [Tue, 12 Apr 2016 00:45:17 +0000 (00:45 +0000)]
Unskip imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry-big.htm
https://bugs.webkit.org/show_bug.cgi?id=156480

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoUnreviewed, rolling out r199310.
commit-queue@webkit.org [Mon, 11 Apr 2016 23:49:34 +0000 (23:49 +0000)]
Unreviewed, rolling out r199310.
https://bugs.webkit.org/show_bug.cgi?id=156483

This change turns many indexeddb tests into crashes (Requested
by jwtan on #webkit).

Reverted changeset:

"Clean up IDBBindingUtilities."
https://bugs.webkit.org/show_bug.cgi?id=156472
http://trac.webkit.org/changeset/199310

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

4 years agoWeb Inspector: Unstyled nodes in ObjectTree previews look poor
commit-queue@webkit.org [Mon, 11 Apr 2016 23:47:13 +0000 (23:47 +0000)]
Web Inspector: Unstyled nodes in ObjectTree previews look poor
https://bugs.webkit.org/show_bug.cgi?id=156475
<rdar://problem/25667351>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-11
Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendPreview):
Treat nodes as simple values.

(WebInspector.ObjectPreviewView.prototype._initTitleElement):
(WebInspector.ObjectPreviewView.prototype._appendValuePreview):
Format nodes nicely, and treat them as lossy since they have properties.

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

4 years agoUnreviewed, rolling out r199315.
commit-queue@webkit.org [Mon, 11 Apr 2016 23:46:07 +0000 (23:46 +0000)]
Unreviewed, rolling out r199315.
https://bugs.webkit.org/show_bug.cgi?id=156482

This change broke the OS X Yosemite build. (Requested by jwtan
on #webkit).

Reverted changeset:

"When clearing cache, also clear AVFoundation cache."
https://bugs.webkit.org/show_bug.cgi?id=155783
http://trac.webkit.org/changeset/199315

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

4 years agoWeb Inspector: get rid of InspectorBasicValue and InspectorString subclasses
bburg@apple.com [Mon, 11 Apr 2016 23:22:16 +0000 (23:22 +0000)]
Web Inspector: get rid of InspectorBasicValue and InspectorString subclasses
https://bugs.webkit.org/show_bug.cgi?id=156407
<rdar://problem/25627659>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

There's no point having these subclasses as they don't save any space.
Add a StringImpl to the union and merge some implementations of writeJSON.

Rename m_data to m_map and explicitly name the union as InspectorValue::m_value.
If the value is a string and the string is not empty or null (i.e., it has a
StringImpl), then we need to ref() and deref() the string as the InspectorValue
is created or destroyed.

Move uses of the subclass to InspectorValue and delete redundant methods.
Now, most InspectorValue methods are non-virtual so they can be templated.

* bindings/ScriptValue.cpp:
(Deprecated::jsToInspectorValue):
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::makeCall):
Don't used deleted subclasses.

* inspector/InspectorValues.cpp:
(Inspector::InspectorValue::null):
(Inspector::InspectorValue::create):
(Inspector::InspectorValue::asValue):
(Inspector::InspectorValue::asBoolean):
(Inspector::InspectorValue::asDouble):
(Inspector::InspectorValue::asInteger):
(Inspector::InspectorValue::asString):
These only need one implementation now.

(Inspector::InspectorValue::writeJSON):
Still a virtual method since Object and Array need their members.

(Inspector::InspectorObjectBase::InspectorObjectBase):
(Inspector::InspectorBasicValue::asBoolean): Deleted.
(Inspector::InspectorBasicValue::asDouble): Deleted.
(Inspector::InspectorBasicValue::asInteger): Deleted.
(Inspector::InspectorBasicValue::writeJSON): Deleted.
(Inspector::InspectorString::asString): Deleted.
(Inspector::InspectorString::writeJSON): Deleted.
(Inspector::InspectorString::create): Deleted.
(Inspector::InspectorBasicValue::create): Deleted.

* inspector/InspectorValues.h:
(Inspector::InspectorObjectBase::find):
(Inspector::InspectorObjectBase::setBoolean):
(Inspector::InspectorObjectBase::setInteger):
(Inspector::InspectorObjectBase::setDouble):
(Inspector::InspectorObjectBase::setString):
(Inspector::InspectorObjectBase::setValue):
(Inspector::InspectorObjectBase::setObject):
(Inspector::InspectorObjectBase::setArray):
(Inspector::InspectorArrayBase::pushBoolean):
(Inspector::InspectorArrayBase::pushInteger):
(Inspector::InspectorArrayBase::pushDouble):
(Inspector::InspectorArrayBase::pushString):
(Inspector::InspectorArrayBase::pushValue):
(Inspector::InspectorArrayBase::pushObject):
(Inspector::InspectorArrayBase::pushArray):
Use new factory methods.

* replay/EncodedValue.cpp:
(JSC::ScalarEncodingTraits<bool>::encodeValue):
(JSC::ScalarEncodingTraits<double>::encodeValue):
(JSC::ScalarEncodingTraits<float>::encodeValue):
(JSC::ScalarEncodingTraits<int32_t>::encodeValue):
(JSC::ScalarEncodingTraits<int64_t>::encodeValue):
(JSC::ScalarEncodingTraits<uint32_t>::encodeValue):
(JSC::ScalarEncodingTraits<uint64_t>::encodeValue):
* replay/EncodedValue.h:
Use new factory methods.

Source/WebCore:

* inspector/InspectorDatabaseAgent.cpp: Don't use deleted subclasses.

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

4 years agoSkip imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry-big.htm on ios...
jiewen_tan@apple.com [Mon, 11 Apr 2016 23:16:01 +0000 (23:16 +0000)]
Skip imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry-big.htm on ios-simulators
https://bugs.webkit.org/show_bug.cgi?id=156480

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoUnreviewed, rolling out r198909.
achristensen@apple.com [Mon, 11 Apr 2016 23:13:22 +0000 (23:13 +0000)]
Unreviewed, rolling out r198909.
https://bugs.webkit.org/show_bug.cgi?id=156479

made double-click-and-drag on text drag instead of
highlighting (Requested by alexchristensen_ on #webkit).

Reverted changeset:

"eventMayStartDrag() does not check for shiftKey or
isOverLink"
https://bugs.webkit.org/show_bug.cgi?id=155746
http://trac.webkit.org/changeset/198909

Patch by Commit Queue <commit-queue@webkit.org> on 2016-04-11

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

4 years ago[WebIDL] Add support for [ImplementedAs] for EventHandler attributes
cdumez@apple.com [Mon, 11 Apr 2016 23:00:02 +0000 (23:00 +0000)]
[WebIDL] Add support for [ImplementedAs] for EventHandler attributes
https://bugs.webkit.org/show_bug.cgi?id=156421

Reviewed by Darin Adler.

Add support for [ImplementedAs] for EventHandler attributes so we can
get rid of some ugly name hard-coding in the bindings generator.

* Modules/notifications/Notification.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(EventHandlerAttributeEventName):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjOnwebkitfoo):
(WebCore::setJSTestObjOnwebkitfoo):
* bindings/scripts/test/TestObj.idl:
* dom/Element.idl:
* page/DOMWindow.idl:

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

4 years agoWhen clearing cache, also clear AVFoundation cache.
commit-queue@webkit.org [Mon, 11 Apr 2016 22:43:42 +0000 (22:43 +0000)]
When clearing cache, also clear AVFoundation cache.
https://bugs.webkit.org/show_bug.cgi?id=155783
rdar://problem/25252541

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-04-11
Reviewed by Darin Adler.

Source/WebCore:

Use AVAssetCache at a specified location on disk for all AVURLAssets. This AVAssetCache
can then be used to manage the cache storage used by AVFoundation. It is used to query the
contents of the cache in originsInMediaCache() and to clear the cache completely or partially in
clearMediaCache() and clearMediaCacheForOrigins().

Use SecurityOrigin instead of the less formal site String to represent origins in the cache.

* html/HTMLMediaElement.cpp:
(WebCore::sharedMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::setMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::mediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::originsInMediaCache): Added.
(WebCore::HTMLMediaElement::clearMediaCache): Added parameter.
(WebCore::HTMLMediaElement::clearMediaCacheForOrigins): Added.
(WebCore::HTMLMediaElement::mediaPlayerMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::getSitesInMediaCache): Deleted.
(WebCore::HTMLMediaElement::clearMediaCacheForSite): Deleted.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::clearMediaCache): Added parameter.
* platform/graphics/MediaPlayer.cpp:
(WebCore::addMediaEngine): Add new cache methods.
(WebCore::addToHash): Added.
(WebCore::MediaPlayer::originsInMediaCache): Added.
(WebCore::MediaPlayer::clearMediaCache): Added parameter.
(WebCore::MediaPlayer::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayer::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayer::clearMediaCacheForSite): Deleted.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerMediaCacheDirectory): Added.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::originsInMediaCache): Added.
(WebCore::MediaPlayerPrivateInterface::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateInterface::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForSite): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Added cache methods.
(WebCore::assetCacheForPath): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache): Added.
(WebCore::toSystemClockTime): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Added.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Added cache methods.
(WebCore::MediaPlayerPrivateQTKit::originsInMediaCache): Added.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateQTKit::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): Deleted.
* platform/spi/mac/AVFoundationSPI.h:

Source/WebKit2:

Include the HTMLMediaElement media cache when doing disk cache operations.
Add a sandbox extension for media cache directory. This allows the UI process and the web process
to access the same cache.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Add media cache directory.
(WebKit::WebProcessCreationParameters::decode): Add media cache directory.
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add media cache directory.
(API::ProcessPoolConfiguration::copy): Add media cache directory.
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultMediaCacheDirectory): Default implementation.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultMediaCacheDirectory): Media cache is in temporary directory.
(API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): For resources in temporary directory.
(API::WebsiteDataStore::defaultDataStoreConfiguration): Init media cache directory.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory):
* UIProcess/WebProcessPool.cpp:
(WebKit::legacyWebsiteDataStoreConfiguration): Add mediaCacheDirectory.
(WebKit::WebProcessPool::createNewWebProcess): Add mediaCacheDirectory.
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::fetchData): Implement for mediaCacheDirectory.
(WebKit::WebsiteDataStore::removeData): Implement for mediaCacheDirectory.
* UIProcess/WebsiteData/WebsiteDataStore.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Initialize media cache directory.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Consume sandbox extension.

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

4 years ago[WebGL2] Use Open GL ES 3.0 to back WebGL2 contexts
commit-queue@webkit.org [Mon, 11 Apr 2016 21:42:15 +0000 (21:42 +0000)]
[WebGL2] Use Open GL ES 3.0 to back WebGL2 contexts
https://bugs.webkit.org/show_bug.cgi?id=141178

Patch by Antoine Quint <graouts@apple.com> on 2016-04-11
Reviewed by Dean Jackson.

We add a new `useGLES3` attribute when creating a GraphicsContext3D in the event that the
context type is "webgl2". This attribute is then read by the GraphicsContext3D constructor
to request an Open GL ES 3.0 backend when creating the EAGLContext on iOS.

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::Attributes::Attributes):
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):

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

4 years agofast/loader/opaque-base-url.html crashing during mac and ios debug tests
jiewen_tan@apple.com [Mon, 11 Apr 2016 21:35:39 +0000 (21:35 +0000)]
fast/loader/opaque-base-url.html crashing during mac and ios debug tests
https://bugs.webkit.org/show_bug.cgi?id=156179
<rdar://problem/25507719>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Navigate to about:blank if the provided src of an iframe/frame cannot be
resolved to a valid URL.

Test: fast/loader/iframe-src-invalid-url.html

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestFrame):

LayoutTests:

* fast/loader/iframe-src-invalid-url-expected.txt: Added.
* fast/loader/iframe-src-invalid-url.html: Added.

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

4 years agoMerge CG ImageSource and non CG ImageSource implementation in one file
commit-queue@webkit.org [Mon, 11 Apr 2016 21:33:16 +0000 (21:33 +0000)]
Merge CG ImageSource and non CG ImageSource implementation in one file
https://bugs.webkit.org/show_bug.cgi?id=155456

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-04-11
Reviewed by Darin Adler.
Source/WebCore:

ImageSource for CG and CG code paths look very similar. All the platform
specific code can be moved to ImageDecoder classes for CG and non CG. And
we can have the ImageSource be platform independent and we get rid of
ImageSourceCG.cpp.

Test: fast/images/image-subsampling.html

* CMakeLists.txt:
* PlatformAppleWin.cmake:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
Delete ImageSourceCG.cpp form all make files and add ImageSource.cpp to
CMakeLists.txt.

* platform/Cursor.cpp:
(WebCore::determineHotSpot):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::hotSpot):
(WebCore::BitmapImage::getHotSpot): Deleted.
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
(WebCore::Image::hotSpot):
(WebCore::Image::getHotSpot): Deleted.
Rename getHotSpot() to hotSpot() and change it to return Optional<IntPoint>.

* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::~ImageSource): Remove clear(true) call. It does nothing.
(WebCore::ImageSource::clearFrameBufferCache): A wrapper which calls ImageDecoder::clearFrameBufferCache().
(WebCore::ImageSource::clear): Calls clearFrameBufferCache() which will do nothing for CG.

(WebCore::ImageSource::ensureDecoderIsCreated): Change SharedBuffer* to
const SharedBuffer& and remove the call to ImageDecoder::setMaxNumPixels().
The value of const static int CG ImageDecoder::m_maxNumPixels will be set
based on IMAGE_DECODER_DOWN_SAMPLING.

(WebCore::ImageSource::setData): Pass SharedBuffer& to the underlying functions.

(WebCore::ImageSource::calculateMaximumSubsamplingLevel): Returns the maximum
subsampling level allowed for an image.

(WebCore::ImageSource::subsamplingLevelForScale): Converts from a scale to
SubsamplingLevel taking into consideration the maximumSubsamplingLevel for
a particular image.

(WebCore::ImageSource::bytesDecodedToDetermineProperties): Returns the number
of encoded bytes which can determine the image properties. For non CG it's
zero. For CG it is a maximum value which can be corrected later.

(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::sizeRespectingOrientation):
(WebCore::ImageSource::frameCount):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::filenameExtension):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::frameIsCompleteAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::createFrameImageAtIndex):
These are wrappers for the ImageDecoder APIs. The purpose of these functions
is to ensure the ImageDecoder is created.

(WebCore::ImageSource::dump): Called from BitmapImage::dump().

(WebCore::ImageSource::getHotSpot): Deleted.

* platform/graphics/ImageSource.h:
(WebCore::ImageSource::setAllowSubsampling): Called from BitmapImage::setAllowSubsampling().

(WebCore::ImageSource::maxPixelsPerDecodedImage): Deleted.
(WebCore::ImageSource::setMaxPixelsPerDecodedImage): Deleted.
Setting maxPixelsPerDecodedImage was moved to the non CG ImageDecoder.

* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::setData): Change SharedBuffer* to SharedBuffer&.

(WebCore::ImageDecoder::subsamplingLevelForScale): Deleted.
The code was moved to ImageSource::subsamplingLevelForScale().

* platform/graphics/cg/ImageDecoderCG.h:
(WebCore::ImageDecoder::create): Make the prototype of this function
suitable for CG and non CG cases.
(WebCore::ImageDecoder::clearFrameBufferCache): Empty functions for CG.

* platform/graphics/cg/ImageSourceCG.cpp: Removed.

* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::frameIsCompleteAtIndex): A mew function to return
whether the frame decoding is complete or not.

(WebCore::ImageDecoder::frameHasAlphaAtIndex): Simplify the logic.

(WebCore::ImageDecoder::frameDurationAtIndex): The code was moved from
ImageSource::frameDurationAtIndex() in ImageSource.cpp.

(WebCore::ImageDecoder::createFrameImageAtIndex): The code was moved from
ImageSource::createFrameImageAtIndex() in ImageSource.cpp.

* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::ImageDecoder): Initialize the members in class.
(WebCore::ImageDecoder::~ImageDecoder): Fix the braces style.
(WebCore::ImageDecoder::setData): Change the type of the argument from
SharedBuffer* to SharedBuffer&.
(WebCore::ImageDecoder::frameSizeAtIndex): Add the argument SubsamplingLevel
so it can have the same prototype as CG.
(WebCore::ImageDecoder::orientationAtIndex): Rename it to the same of CG.

(WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageDecoder::bytesDecodedToDetermineProperties):
(WebCore::ImageDecoder::subsamplingLevelForScale): Add these functions
and return the default values so we do not have to add directive compiled
non CG blocks in ImageSource.cpp.

(WebCore::ImageDecoder::hotSpot): Return Optional<IntPoint>.

(WebCore::ImageDecoder::orientation): Deleted.
(WebCore::ImageDecoder::setMaxNumPixels): Deleted.

* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::setData):
* platform/image-decoders/bmp/BMPImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::setData):
(WebCore::GIFImageDecoder::decode):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::setData):
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::setData):
Use reference SharedBuffer instead of pointer SharedBuffer.

(WebCore::ICOImageDecoder::hotSpot):
(WebCore::ICOImageDecoder::hotSpotAtIndex):
Change hotSpot() to return Optional<IntPoint>.
* platform/image-decoders/ico/ICOImageDecoder.h:

(WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
Pass reference SharedBuffer instead of pointer SharedBuffer.

Source/WebKit2:

* UIProcess/API/efl/EwkView.cpp:
(EwkView::setCursor):
Replace the call to Image::getHotSpot() by Image::hotSpot().

LayoutTests:

Add a test for image sub-sampling. The image subsampling is enabled by
default for iOS platform only. But it can be explicitly enabled through
the setting ImageSubsamplingEnabled.

* fast/images/image-subsampling-expected.html: Added.
* fast/images/image-subsampling.html: Added.

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

4 years agoRename WKOpenPanelParameters files to WKOpenPanelParametersRef
andersca@apple.com [Mon, 11 Apr 2016 21:32:30 +0000 (21:32 +0000)]
Rename WKOpenPanelParameters files to WKOpenPanelParametersRef
https://bugs.webkit.org/show_bug.cgi?id=156473

Reviewed by Alex Christensen.

* UIProcess/API/C/WKOpenPanelParameters.cpp:
(WKOpenPanelParametersGetTypeID): Deleted.
(WKOpenPanelParametersGetAllowsMultipleFiles): Deleted.
(WKOpenPanelParametersCopyAcceptedMIMETypes): Deleted.
(WKOpenPanelParametersCopyCapture): Deleted.
(WKOpenPanelParametersGetCaptureEnabled): Deleted.
(WKOpenPanelParametersCopySelectedFileNames): Deleted.
* UIProcess/API/C/WKOpenPanelParametersRef.cpp: Renamed from Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp.
(WKOpenPanelParametersGetTypeID):
(WKOpenPanelParametersGetAllowsMultipleFiles):
(WKOpenPanelParametersCopyAcceptedMIMETypes):
(WKOpenPanelParametersCopyCapture):
(WKOpenPanelParametersGetCaptureEnabled):
(WKOpenPanelParametersCopySelectedFileNames):
* UIProcess/API/C/WKOpenPanelParametersRef.h: Renamed from Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/efl/ewk_file_chooser_request.cpp:
* UIProcess/mac/WebInspectorProxyMac.mm:
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoClean up IDBBindingUtilities.
beidson@apple.com [Mon, 11 Apr 2016 21:31:53 +0000 (21:31 +0000)]
Clean up IDBBindingUtilities.
https://bugs.webkit.org/show_bug.cgi?id=156472

Reviewed by Alex Christensen.

No new tests (No change in behavior).

- Get rid of a whole bunch of unused functions (since we got rid of Legacy IDB).
- Make more functions deal in ExecState/ScriptExecutionContexts instead of DOMRequestState.
- Make more functions deal in JSValue instead of Deprecated::ScriptValue.

* bindings/scripts/IDLAttributes.txt: Add a new attribute to signify that an implementation returns
  JSValues instead of Deprecated::ScriptState
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Use that new attribute.

* Modules/indexeddb/IDBAny.cpp:
(WebCore::IDBAny::IDBAny):
(WebCore::IDBAny::scriptValue):
* Modules/indexeddb/IDBAny.h:
(WebCore::IDBAny::create):
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::value):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBCursorWithValue.idl:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::cmp):
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::getKey):
* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::lowerValue):
(WebCore::IDBKeyRange::upperValue):
(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBKeyRange.h:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::modernDelete):
(WebCore::IDBObjectStore::count):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
(WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyPathFromValue):
(WebCore::deserializeIDBValueDataToJSValue):
(WebCore::scriptValueToIDBKey):
(WebCore::idbKeyDataToScriptValue):
(WebCore::idbKeyDataToJSValue): Deleted.
(WebCore::injectIDBKeyIntoScriptValue): Deleted.
(WebCore::createIDBKeyFromScriptValueAndKeyPath): Deleted.
(WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath): Deleted.
(WebCore::canInjectIDBKeyIntoScriptValue): Deleted.
(WebCore::deserializeIDBValue): Deleted.
(WebCore::deserializeIDBValueData): Deleted.
(WebCore::deserializeIDBValueBuffer): Deleted.
(WebCore::idbValueDataToJSValue): Deleted.
(WebCore::idbKeyToScriptValue): Deleted.
* bindings/js/IDBBindingUtilities.h:
* bindings/js/JSIDBAnyCustom.cpp:
(WebCore::toJS):
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::createObjectStore):
* bindings/js/JSIDBObjectStoreCustom.cpp:
(WebCore::JSIDBObjectStore::createIndex):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::execState):
* dom/ScriptExecutionContext.h:
* inspector/InspectorIndexedDBAgent.cpp:

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

4 years agoWebKit should adopt journal_mode=wal for all SQLite databases.
barraclough@apple.com [Mon, 11 Apr 2016 20:10:36 +0000 (20:10 +0000)]
WebKit should adopt journal_mode=wal for all SQLite databases.
https://bugs.webkit.org/show_bug.cgi?id=133496

Reviewed by Darin Adler.

Source/WebCore:

The statement intended to enable WAL mode is always failing because it is missing a
prepare(). Fix this. We were also previously permitting SQLITE_OK results - this
was in error (we were only getting these because stepping the unprepared statement
returned SQLITE_OK). Also set the SQLITE_OPEN_AUTOPROXY flag when opening the
database - this will improve perfomance when the database is accessed via an AFP
mount.

This exposed a bug, that deleteAllDatabases does not actually delete the databases on
iOS, for testing to reset back to a known state between tests it should be doing so.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteAllDatabases):
    - force databases to actually be deleted on iOS.
      This method is only used from testing code (DumpRenderTree / WebKitTestRunner).
(WebCore::DatabaseTracker::deleteOrigin):
    - added IOSDeletionMode.
(WebCore::DatabaseTracker::deleteDatabaseFile):
    - added IOSDeletionMode, modified to actually delete if this is set.
* Modules/webdatabase/DatabaseTracker.h:
    - added IOSDeletionMode.
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open):
    - call prepareAndStep(), only check for SQLITE_ROW result.
* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
    - should set SQLITE_OPEN_AUTOPROXY flag when opening database.

Source/WebKit/mac:

* Storage/WebDatabaseManagerPrivate.h:
    - renamed deleteAllDatabases -> deleteAllDatabasesImmediately.

Source/WebKit/win:

* WebDatabaseManager.cpp:
(WebDatabaseManager::deleteAllDatabases):
    - renamed deleteAllDatabases -> deleteAllDatabasesImmediately.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleClearAllDatabases):
    - renamed deleteAllDatabases -> deleteAllDatabasesImmediately.

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

4 years agoWeb Inspector: HeapSnapshot instance property path popover should include a descripti...
joepeck@webkit.org [Mon, 11 Apr 2016 20:00:31 +0000 (20:00 +0000)]
Web Inspector: HeapSnapshot instance property path popover should include a descriptive header
https://bugs.webkit.org/show_bug.cgi?id=156431
<rdar://problem/25633594>

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendTitle):
Title for the popover. Because localization may change the location of the @1234
in the string, localize first with a placeholder, and then replace the placeholder
with the @1234 link.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
Give the table a container for extra padding.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
Do not include the space before @1234 as part of the clickable link.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Include a title when the popover shows a root path.

* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot-instance-popover-content > .title):
(.heap-snapshot-instance-popover-content):
(.heap-snapshot-instance-popover-content > .table-container):
(.heap-snapshot-instance-popover-content table):
Provide styles for the title. Let the title extend across the entire
popover horizontally, but pad the table so that it appears more
centered under the title. Because the table has border collapse we have
to wrap it in a container to give it back the padding we want.

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

4 years agoSimplify InlineTextBox::selectionStartEnd()
zalan@apple.com [Mon, 11 Apr 2016 19:52:35 +0000 (19:52 +0000)]
Simplify InlineTextBox::selectionStartEnd()
https://bugs.webkit.org/show_bug.cgi?id=156459

Reviewed by Darin Adler.

No change in functionality.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionState):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
* rendering/InlineTextBox.h:
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paintText):

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

4 years agoREGRESSION (r193857): Text selection causes text to disappear.
zalan@apple.com [Mon, 11 Apr 2016 19:31:12 +0000 (19:31 +0000)]
REGRESSION (r193857): Text selection causes text to disappear.
https://bugs.webkit.org/show_bug.cgi?id=156448
rdar://problem/25578952

Reviewed by Simon Fraser.

Apparently when the end position of the selection range is smaller than the start position, we need
to repaint the entire text as it indicates selection clearing.

Source/WebCore:

Test: fast/text/text-disappear-on-deselect.html

* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintText):

LayoutTests:

* fast/text/text-disappear-on-deselect-expected.html: Added.
* fast/text/text-disappear-on-deselect.html: Added.

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

4 years agoIt should be possible to edit StructureStubInfo without recompiling the world
fpizlo@apple.com [Mon, 11 Apr 2016 19:31:04 +0000 (19:31 +0000)]
It should be possible to edit StructureStubInfo without recompiling the world
https://bugs.webkit.org/show_bug.cgi?id=156470

Reviewed by Keith Miller.

This change makes it less painful to make changes to the IC code. It used to be that any
change to StructureStubInfo caused every JIT-related file to get recompiled. Now only a
smaller set of files - ones that actually peek into StructureStubInfo - will recompile. This
is mainly because CodeBlock.h no longer includes StructureStubInfo.h.

* bytecode/ByValInfo.h:
* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
* bytecode/GetByIdStatus.cpp:
* bytecode/GetByIdStatus.h:
* bytecode/PutByIdStatus.cpp:
* bytecode/PutByIdStatus.h:
* bytecode/StructureStubInfo.h:
(JSC::getStructureStubInfoCodeOrigin):
* dfg/DFGByteCodeParser.cpp:
* dfg/DFGJITCompiler.cpp:
* dfg/DFGOSRExitCompilerCommon.cpp:
* dfg/DFGSpeculativeJIT.h:
* ftl/FTLLowerDFGToB3.cpp:
* ftl/FTLSlowPathCall.h:
* jit/IntrinsicEmitter.cpp:
* jit/JITInlineCacheGenerator.cpp:
* jit/JITInlineCacheGenerator.h:
* jit/JITOperations.cpp:
* jit/JITPropertyAccess.cpp:
* jit/JITPropertyAccess32_64.cpp:

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

4 years agoREGRESSION (r198933): Unable to login to Google account from Internet Accounts prefer...
dbates@webkit.org [Mon, 11 Apr 2016 19:06:20 +0000 (19:06 +0000)]
REGRESSION (r198933): Unable to login to Google account from Internet Accounts preference pane
https://bugs.webkit.org/show_bug.cgi?id=156447
<rdar://problem/25628133>

Reviewed by Anders Carlsson.

Temporarily perform code signing verification only for Mac App Store- and Apple Developer- signed apps.

* Shared/mac/ChildProcessMac.mm:
(WebKit::codeSigningIdentifierForProcess):

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

4 years agoRemove NewArrowFunction from DFG IR
gskachkov@gmail.com [Mon, 11 Apr 2016 19:04:33 +0000 (19:04 +0000)]
Remove NewArrowFunction from DFG IR
https://bugs.webkit.org/show_bug.cgi?id=156439

Reviewed by Saam Barati.

It seems that NewArrowFunction was left in DFG IR during refactoring by mistake.

* dfg/DFGAbstractInterpreterInlines.h:
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGClobbersExitState.cpp:
* dfg/DFGDoesGC.cpp:
* dfg/DFGFixupPhase.cpp:
* dfg/DFGMayExit.cpp:
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToPhantomNewFunction):
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunction):
* dfg/DFGSpeculativeJIT32_64.cpp:
* dfg/DFGSpeculativeJIT64.cpp:
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* dfg/DFGStructureRegistrationPhase.cpp:
* ftl/FTLCapabilities.cpp:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

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

4 years agoRemove compile time define for SEPARATED_HEAP
oliver@apple.com [Mon, 11 Apr 2016 19:00:48 +0000 (19:00 +0000)]
Remove compile time define for SEPARATED_HEAP
https://bugs.webkit.org/show_bug.cgi?id=155508

Reviewed by Mark Lam.

Source/JavaScriptCore:

Remove the SEPARATED_HEAP compile time flag. The separated
heap is available, but off by default, on x86_64, ARMv7, and
ARM64.

Working through the issues that happened last time essentially
required implementing the ARMv7 path for the separated heap
just so I could find all the ways it was going wrong.

We fixed all the logic by making the branch and jump logic in
the linker and assemblers take two parameters, the location to
write to, and the location we'll actually be writing to. We
need to do this because it's no longer sufficient to compute
jumps relative to region the linker is writing to.

The repatching jump, branch, and call functions only need the
executable address as the patching is performed directly using
performJITMemcpy function which works in terms of the executable
address.

There is no performance impact on jsc-benchmarks with the separate
heap either emabled or disabled.

* Configurations/FeatureDefines.xcconfig:
* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::linkJump):
(JSC::ARM64Assembler::linkCall):
(JSC::ARM64Assembler::relinkJump):
(JSC::ARM64Assembler::relinkCall):
(JSC::ARM64Assembler::link):
(JSC::ARM64Assembler::linkJumpOrCall):
(JSC::ARM64Assembler::linkCompareAndBranch):
(JSC::ARM64Assembler::linkConditionalBranch):
(JSC::ARM64Assembler::linkTestAndBranch):
(JSC::ARM64Assembler::relinkJumpOrCall):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::revertJumpTo_movT3movtcmpT2):
(JSC::ARMv7Assembler::revertJumpTo_movT3):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::linkJump):
(JSC::ARMv7Assembler::relinkJump):
(JSC::ARMv7Assembler::repatchCompact):
(JSC::ARMv7Assembler::replaceWithJump):
(JSC::ARMv7Assembler::replaceWithLoad):
(JSC::ARMv7Assembler::replaceWithAddressComputation):
(JSC::ARMv7Assembler::setInt32):
(JSC::ARMv7Assembler::setUInt7ForLoad):
(JSC::ARMv7Assembler::isB):
(JSC::ARMv7Assembler::isBX):
(JSC::ARMv7Assembler::isMOV_imm_T3):
(JSC::ARMv7Assembler::isMOVT):
(JSC::ARMv7Assembler::isNOP_T1):
(JSC::ARMv7Assembler::isNOP_T2):
(JSC::ARMv7Assembler::linkJumpT1):
(JSC::ARMv7Assembler::linkJumpT2):
(JSC::ARMv7Assembler::linkJumpT3):
(JSC::ARMv7Assembler::linkJumpT4):
(JSC::ARMv7Assembler::linkConditionalJumpT4):
(JSC::ARMv7Assembler::linkBX):
(JSC::ARMv7Assembler::linkConditionalBX):
(JSC::ARMv7Assembler::linkJumpAbsolute):
* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::link):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::link):
* jit/ExecutableAllocator.h:
(JSC::performJITMemcpy):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolExecutableAllocator::initializeSeparatedWXHeaps):
(JSC::FixedVMPoolExecutableAllocator::jitWriteThunkGenerator):
(JSC::FixedVMPoolExecutableAllocator::genericWriteToJITRegion):
(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator): Deleted.
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/Platform.h:

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

4 years agoMerge AttributedDOMTokenList into DOMTokenList
cdumez@apple.com [Mon, 11 Apr 2016 18:49:13 +0000 (18:49 +0000)]
Merge AttributedDOMTokenList into DOMTokenList
https://bugs.webkit.org/show_bug.cgi?id=156468

Reviewed by Ryosuke Niwa.

Merge AttributedDOMTokenList into DOMTokenList to simplify the code.
DOMTokenList is not constructible and AttributedDOMTokenList is its
only constructible subclass after r196123.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp:
(WebCore::Element::classList):
* dom/ElementRareData.h:
(WebCore::ElementRareData::classList):
(WebCore::ElementRareData::setClassList):
* html/AttributeDOMTokenList.cpp: Removed.
* html/AttributeDOMTokenList.h: Removed.
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::DOMTokenList):
(WebCore::DOMTokenList::attributeValueChanged):
(WebCore::DOMTokenList::updateAfterTokenChange):
* html/DOMTokenList.h:
(WebCore::DOMTokenList::ref):
(WebCore::DOMTokenList::deref):
(WebCore::DOMTokenList::element):
(WebCore::DOMTokenList::~DOMTokenList): Deleted.
(WebCore::DOMTokenList::updateAfterTokenChange): Deleted.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::relList):
* html/HTMLAnchorElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::sandbox):
* html/HTMLIFrameElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::sizes):
(WebCore::HTMLLinkElement::relList):
* html/HTMLLinkElement.h:
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::htmlFor):
* html/HTMLOutputElement.h:

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

4 years agoClean up how we reason about the states of AccessCases
fpizlo@apple.com [Mon, 11 Apr 2016 18:20:59 +0000 (18:20 +0000)]
Clean up how we reason about the states of AccessCases
https://bugs.webkit.org/show_bug.cgi?id=156454

Reviewed by Mark Lam.

Currently when we add an AccessCase to a PolymorphicAccess stub, we regenerate the stub.
That means that as we grow a stub to have N cases, we will do O(N^2) generation work. I want
to explore buffering AccessCases so that we can do O(N) generation work instead. But to
before I go there, I want to make sure that the statefulness of AccessCase makes sense. So,
I broke it down into three different states and added assertions about the transitions. I
also broke out a separate operation called AccessCase::commit(), which is the work that
cannot be buffered since there cannot be any JS effects between when the AccessCase was
created and when we do the work in commit().

This opens up a fairly obvious path to buffering AccessCases: add them to the list without
regenerating. Then when we do eventually trigger regeneration, those cases will get cloned
and generated automagically. This patch doesn't implement this technique yet, but gives us
an opportunity to independently test the scaffolding necessary to do it.

This is perf-neutral on lots of tests.

* bytecode/PolymorphicAccess.cpp:
(JSC::AccessGenerationResult::dump):
(JSC::AccessCase::clone):
(JSC::AccessCase::commit):
(JSC::AccessCase::guardedByStructureCheck):
(JSC::AccessCase::dump):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generate):
(JSC::AccessCase::generateImpl):
(JSC::PolymorphicAccess::regenerateWithCases):
(JSC::PolymorphicAccess::regenerate):
(WTF::printInternal):
* bytecode/PolymorphicAccess.h:
(JSC::AccessCase::type):
(JSC::AccessCase::state):
(JSC::AccessCase::offset):
(JSC::AccessCase::viaProxy):
(JSC::AccessCase::callLinkInfo):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::addAccessCase):
* bytecode/Watchpoint.h:
* dfg/DFGOperations.cpp:
* jit/Repatch.cpp:
(JSC::repatchGetByID):
(JSC::repatchPutByID):
(JSC::repatchIn):
* runtime/VM.cpp:
(JSC::VM::dumpRegExpTrace):
(JSC::VM::ensureWatchpointSetForImpureProperty):
(JSC::VM::registerWatchpointForImpureProperty):
(JSC::VM::addImpureProperty):
* runtime/VM.h:

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

4 years agoDOMTokenList.contains() should not throw
cdumez@apple.com [Mon, 11 Apr 2016 16:50:44 +0000 (16:50 +0000)]
DOMTokenList.contains() should not throw
https://bugs.webkit.org/show_bug.cgi?id=156453

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Re-sync dom/nodes/Element-classlist.html with upstream @26308720.

* web-platform-tests/dom/nodes/Element-classlist-expected.txt:
* web-platform-tests/dom/nodes/Element-classlist.html:

Source/WebCore:

DOMTokenList.contains() should not throw if the input token is invalid:
https://github.com/whatwg/dom/commit/6d3076e3cbcba662489b272a718bc6b8c0082a74

We now return false in such cases, instead of throwing, which should be
safe with regards to backward compatibility.

No new tests, already covered by existing tests.

* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::contains):
* html/DOMTokenList.h:
* html/DOMTokenList.idl:

LayoutTests:

Update existing layout tests now that DOMTokenList.contains() no longer
throws when called with an invalid token.

* fast/dom/HTMLElement/class-list-expected.txt:
* fast/dom/HTMLElement/class-list-quirks-expected.txt:
* fast/dom/HTMLElement/script-tests/class-list.js:
(shouldThrowDOMException): Deleted.
* fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
* fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js:
(shouldThrowDOMException): Deleted.
* fast/dom/rel-list-expected.txt:
* fast/dom/rel-list.html:

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

4 years agoRefactor RenderMathMLFraction layout to avoid using flexbox
fred.wang@free.fr [Mon, 11 Apr 2016 15:38:46 +0000 (15:38 +0000)]
Refactor RenderMathMLFraction layout to avoid using flexbox
https://bugs.webkit.org/show_bug.cgi?id=153917

Patch by Frederic Wang <fwang@igalia.com> on 2016-04-11
Reviewed by Sergio Villar Senin.

Source/WebCore:

Based on a patch by Alejandro G. Castro <alex@igalia.com>

Implement the layoutBlock method to handle the layout calculations
directly in the class. This also fixes parsing of absolute values for
linethickness attribute (e.g. 10px) and adds support for the AxisHeight
and FractionRuleThickness MATH parameters.

Test: mathml/opentype/fraction-line.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::mathLineThickness): Use the thickness relative to the
default line thickness since that's really what is expected by mathml-line-fraction.html
* css/mathml.css: Remove flexbox properties for mfrac.
(mfrac): Deleted.
(mfrac > *): Deleted.
(mfrac[numalign="left"] > :first-child): Deleted.
(mfrac[numalign="right"] > :first-child): Deleted.
(mfrac[denomalign="left"] > :last-child): Deleted.
(mfrac[denomalign="right"] > :last-child): Deleted.
(mfrac > :first-child): Deleted.
(mfrac > :last-child): Deleted.
(mfrac): Deleted.
* rendering/mathml/RenderMathMLBlock.cpp: Introduce a helper function to retrieve the math
axis height.
(WebCore::RenderMathMLBlock::mathAxisHeight):
* rendering/mathml/RenderMathMLBlock.h: Declare mathAxisHeight.
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::RenderMathMLFraction):
(WebCore::RenderMathMLFraction::parseAlignmentAttribute): Helper function to parse the align
attribute.
(WebCore::RenderMathMLFraction::isValid): Helper function to verify whether the child list
is valid with respect to the MathML specificitation.
(WebCore::RenderMathMLFraction::numerator): Helper function to retrieve the numerator.
(WebCore::RenderMathMLFraction::denominator): Helper function to retrieve the denominator.
(WebCore::RenderMathMLFraction::updateFromElement): Use the FractionRuleThickness parameter
when avaiable to calculate the default linethickness.
Fix computation of linethickness for absolute values (e.g. 10px), the default linethickness
must not be involved for such values.
We no longer need to manage style of anonymous wrappers.
(WebCore::RenderMathMLFraction::unembellishedOperator): Use the helper function and we no
longer care about anonymous wrappers.
(WebCore::RenderMathMLFraction::computePreferredLogicalWidths): Implement this function
without using flexbox.
(WebCore::RenderMathMLFraction::horizontalOffset): Helper function to get the horizontal
offsets of children depending of the alignment.
(WebCore::RenderMathMLFraction::layoutBlock): Implement this function without using flexbox.
(WebCore::RenderMathMLFraction::paint): Do not paint if the fraction is invalid. Use helper
function. Use the width of the renderer (instead of the one of the denominator) as the
length of the fraction bar.
(WebCore::RenderMathMLFraction::firstLineBaseline): Use the helper functions to get children
and axis height.
(WebCore::RenderMathMLFraction::paintChildren): Temporary function to remove in a
follow-up patch.
(WebCore::RenderMathMLFraction::fixChildStyle): Deleted. We no longer need to manage style
of anonymous wrappers.
(WebCore::RenderMathMLFraction::addChild): Deleted. We no longer need to manage
anonymous wrappers.
(WebCore::RenderMathMLFraction::styleDidChange): We no longer need to manage style of
anonymous wrappers.
(WebCore::RenderMathMLFraction::layout): Deleted.
* rendering/mathml/RenderMathMLFraction.h: Replace lineThickness with relativeLineThickness,
as needed by the accessibility code. Update function and members declarations.

LayoutTests:

* TestExpectations: No longer skip mathml/presentation/fractions-positions.html
* mathml/opentype/fraction-line-expected.html: Added. New test to verify AxisHeight and
FractionRuleThickness parameters.
* mathml/opentype/fraction-line.html: Added. New test to verify axis height and rule
thickness parameters.
* mathml/presentation/fractions-linethickness-expected.html: Adjust the test to be sure that
the default rule thickness is 1px.
* mathml/presentation/fractions-linethickness.html: Adjust the test to be sure that the
default rule thickness is 1px.
* platform/gtk/mathml/presentation/roots-expected.txt: Update reference to take into account
changes in the render tree.
* platform/ios-simulator/mathml/presentation/roots-expected.txt: Ditto
* platform/mac/TestExpectations: Mark fraction-line and fractions-linethickness as
possibly failing since these tests require Latin Modern Math to work reliably.
* platform/ios-simulator/TestExpectations: Ditto

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

4 years agoUnreviewed, rolling out r199290.
commit-queue@webkit.org [Mon, 11 Apr 2016 12:46:30 +0000 (12:46 +0000)]
Unreviewed, rolling out r199290.
https://bugs.webkit.org/show_bug.cgi?id=156465

broke 300 tests (Requested by mcatanzaro on #webkit).

Reverted changeset:

"Merge CG ImageSource and non CG ImageSource implementation in
one file"
https://bugs.webkit.org/show_bug.cgi?id=155456
http://trac.webkit.org/changeset/199290

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

4 years agoRefactor RenderMathMLUnderOver layout functions to avoid using flexbox
fred.wang@free.fr [Mon, 11 Apr 2016 12:11:18 +0000 (12:11 +0000)]
Refactor RenderMathMLUnderOver layout functions to avoid using flexbox
https://bugs.webkit.org/show_bug.cgi?id=153742

Patch by Frederic Wang <fwang@igalia.com> on 2016-04-11
Reviewed by Sergio Villar Senin.

Source/WebCore:

Based on a patch by Javier Fernandez <jfernandez@igalia.com>

Refactor the UnderOver renderer to use its own layoutBlock method that
does all the layout calculations without considering the flexbox
restrictions.

* css/mathml.css:
(mo, mfrac, munder, mover, munderover): Delete the underover elements from the line defining
the column direction.
(munder, mover, munderover): Deleted. This flexbox property is no longer needed.
(mover > :last-child, munderover > :last-child): Deleted. This flexbox property is no longer
needed.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::firstLineBaseline): Use ascentForChild.
(WebCore::RenderMathMLUnderOver::computeOperatorsHorizontalStretch): Avoid stretching
operators that are not stretchy.
(WebCore::RenderMathMLUnderOver::isValid): Helper function to ensure that the child list is
valid with respect to the MathML specification.
(WebCore::RenderMathMLUnderOver::base): Added. Helper function.
(WebCore::RenderMathMLUnderOver::under): Added. Helper function.
(WebCore::RenderMathMLUnderOver::over): Added. Helper function.
(WebCore::RenderMathMLUnderOver::computePreferredLogicalWidths): Added.
The preferred width is the maximum preferred width of the base, under and over scripts.
(WebCore::RenderMathMLUnderOver::horizontalOffset): Added, helper to calculate the
horizontal position of children (horizontally centered).
(WebCore::RenderMathMLUnderOver::layoutBlock): Added, it lays out the base, underscript and
overscript. It calculates the exact logical width, which may differ from the preferred width when
one child contains stretchy operators. It later sets the locations of children accordingly
and sets the heigth of the render element.
(WebCore::RenderMathMLUnderOver::paintChildren): Added, we have to use the usual traverse
instead of the one that comes from the flexbox. This will be removed in a follow-up patch.
(WebCore::RenderMathMLUnderOver::layout): Deleted.
* rendering/mathml/RenderMathMLUnderOver.h: Added new functions definitions.

LayoutTests:

Apply some small adjustments to the expectations of MathML tests after
the refactoring of RenderMathMLUnderOver. We also add a test for
non-stretchy horizontal operators in underover.

* platform/gtk/mathml/opentype/horizontal-expected.png:
* platform/gtk/mathml/opentype/horizontal-expected.txt:
* platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.png:
* platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.png:
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
* mathml/mn-as-list-item-assert.html: Move the test description out of the invalid munderover
so that it is still displayed.
* mathml/mn-as-list-item-assert-expected.txt: Update the text expectation.
* mathml/presentation/underover-nonstretchy-horizontal.html: Ensure that nonstretchy horizontal operators are not stretched in munderover.
* mathml/presentation/underover-nonstretchy-horizontal-expected.html: Ditto.

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

4 years ago[GTK] Rework the theming code for GTK+ 3.20
carlosgc@webkit.org [Mon, 11 Apr 2016 10:59:03 +0000 (10:59 +0000)]
[GTK] Rework the theming code for GTK+ 3.20
https://bugs.webkit.org/show_bug.cgi?id=156333

Reviewed by Michael Catanzaro.

.:

Add a manual test to check how themed elements are rendered.

* ManualTests/gtk/theme.html: Added.

Source/WebCore:

During the 3.19 GTK+ release cycle, the GTK+ css system was reworked, making themes and programs rendering
themed widgets, incompatible with the new system. We were trying to fix our rendering every time GTK+ broke
something, but we were just changing whatever it was needed to make our rendering look like current GTK+ with
the default theme Adwaita. This means that our rendering will be broken for other themes or that changes in
Adwaita can break our rendering. This solution was good enough to ensure WebKitGTK+ 2.12 looked good with GTK+
3.20, but it doesn't work in the long term. We need to ensure that our theming code honors the new GTK+ CSS
properties (max-width, min-width, margin, padding, border, ...) in all the cases, not only the cases where
Adwaita uses them like we currently do.
This patch splits all rendering methods to keep the current code for previous GTK+ versions and adds new code
for GTK+ >= 3.20 using the new RenderThemeGadget classes. This makes the code easier to read, since there aren't
ifdef blocks in the functions, and we ensure we don't break previous rendering.

* PlatformGTK.cmake: Add new files to compilation.
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler): Check the button layout used by the theme to decide the
current buttons state.
* platform/gtk/RenderThemeGadget.cpp: Added.
(WebCore::RenderThemeGadget::create):
(WebCore::createStyleContext):
(WebCore::appendElementToPath):
(WebCore::RenderThemeGadget::RenderThemeGadget):
(WebCore::RenderThemeGadget::~RenderThemeGadget):
(WebCore::RenderThemeGadget::marginBox):
(WebCore::RenderThemeGadget::borderBox):
(WebCore::RenderThemeGadget::paddingBox):
(WebCore::RenderThemeGadget::contentsBox):
(WebCore::RenderThemeGadget::color):
(WebCore::RenderThemeGadget::backgroundColor):
(WebCore::RenderThemeGadget::minimumSize):
(WebCore::RenderThemeGadget::preferredSize):
(WebCore::RenderThemeGadget::render):
(WebCore::RenderThemeGadget::renderFocus):
(WebCore::RenderThemeBoxGadget::RenderThemeBoxGadget):
(WebCore::RenderThemeTextFieldGadget::RenderThemeTextFieldGadget):
(WebCore::RenderThemeTextFieldGadget::minimumSize):
(WebCore::RenderThemeToggleGadget::RenderThemeToggleGadget):
(WebCore::RenderThemeToggleGadget::render):
(WebCore::RenderThemeArrowGadget::RenderThemeArrowGadget):
(WebCore::RenderThemeArrowGadget::render):
(WebCore::RenderThemeIconGadget::RenderThemeIconGadget):
(WebCore::RenderThemeIconGadget::gtkIconSizeForPixelSize):
(WebCore::RenderThemeIconGadget::render):
(WebCore::RenderThemeIconGadget::minimumSize):
* platform/gtk/RenderThemeGadget.h: Added.
(WebCore::RenderThemeGadget::context):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::innerSpinButtonLayout): Added this method to allow themes use a different layout for the
buttons.
* rendering/RenderThemeGtk.cpp:
(WebCore::themeChangedCallback): Just moved this code to a common place.
(WebCore::RenderThemeGtk::RenderThemeGtk): Initialize the theme monitor in the constructor.
(WebCore::createStyleContext): Remove the render parts that are specific to GTK+ 3.20.
(WebCore::RenderThemeGtk::adjustRepaintRect): Moved inside a GTK+ < 3.20 ifdef block.
(WebCore::themePartStateFlags): Helper function to get the GtkStateFlags of a theme part for a given RenderObject.
(WebCore::shrinkToMinimumSizeAndCenterRectangle): Move this common code to a helper function.
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::RenderThemeGtk::popupInternalPaddingBox):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::adjustTextFieldStyle): For GTK+ 3.20 we need to ensure a minimum size for spin buttons,
so if the text field is for a spin button, we adjust the desired size here.
(WebCore::RenderThemeGtk::paintTextField): In GTK+ 3.20 the CSS gadgets used to render spin buttons are
different, so we check here if this is the entry of a spin button to use the right gadgets.
(WebCore::adjustSearchFieldIconStyle):
(WebCore::RenderThemeGtk::paintTextArea):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeGtk::paintSearchFieldResultsButton):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
(WebCore::paintSearchFieldIcon):
(WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
(WebCore::centerRectVerticallyInParentInputElement): Moved inside a GTK+ < 3.20 ifdef block.
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::progressBarRectForBounds): Ensure a minimum size of progress bars in GTK+ 3.20.
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::RenderThemeGtk::innerSpinButtonLayout): Use an horizontal layout for spin buttons.
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeGtk::paintInnerSpinButton):
(WebCore::styleColor):
(WebCore::RenderThemeGtk::paintMediaButton):
* rendering/RenderThemeGtk.h:

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

4 years agoImplement functional :host() pseudo class
antti@apple.com [Mon, 11 Apr 2016 09:13:06 +0000 (09:13 +0000)]
Implement functional :host() pseudo class
https://bugs.webkit.org/show_bug.cgi?id=156397
<rdar://problem/25621445>

Reviewed by Darin Adler.

Source/WebCore:

We already support :host. Add functional syntax too.

* css/CSSGrammar.y.in:

    Parse functional :host().

* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoClassHostFunctionSelector):
* css/CSSParserValues.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchedRuleList):
(WebCore::ElementRuleCollector::addMatchedRule):

    Factor some shared code here.

(WebCore::ElementRuleCollector::matchHostPseudoClassRules):

    Instead of using the generic paths use a :host specific code path for matching.
    This makes it easier to avoid :host matching when it shouldn't.

(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
(WebCore::computeMatchBasedOnRuleHash):

    :host is always handled by the special matching path.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::matchHostPseudoClass):

    Add a function specifically for checking :host. In always fails on the normal code paths.
    Check the argument selector if provided.

(WebCore::hasScrollbarPseudoElement):
* css/SelectorChecker.h:

LayoutTests:

Enable, fix and expand the test.

* fast/shadow-dom/css-scoping-shadow-host-functional-rule.html:
* platform/mac/TestExpectations:

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

4 years agoMerge CG ImageSource and non CG ImageSource implementation in one file
commit-queue@webkit.org [Mon, 11 Apr 2016 07:29:33 +0000 (07:29 +0000)]
Merge CG ImageSource and non CG ImageSource implementation in one file
https://bugs.webkit.org/show_bug.cgi?id=155456

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-04-11
Reviewed by Darin Adler.
Source/WebCore:

ImageSource for CG and CG code paths look very similar. All the platform
specific code can be moved to ImageDecoder classes for CG and non CG. And
we can have the ImageSource be platform independent and we get rid of
ImageSourceCG.cpp.

Test: fast/images/image-subsampling.html

* CMakeLists.txt:
* PlatformAppleWin.cmake:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
Delete ImageSourceCG.cpp form all make files and add ImageSource.cpp to
CMakeLists.txt.

* platform/Cursor.cpp:
(WebCore::determineHotSpot):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::hotSpot):
(WebCore::BitmapImage::getHotSpot): Deleted.
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
(WebCore::Image::hotSpot):
(WebCore::Image::getHotSpot): Deleted.
Rename getHotSpot() to hotSpot() and change it to return Optional<IntPoint>.

* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::~ImageSource): Remove clear(true) call. It does nothing.
(WebCore::ImageSource::clearFrameBufferCache): A wrapper which calls ImageDecoder::clearFrameBufferCache().
(WebCore::ImageSource::clear): Calls clearFrameBufferCache() which will do nothing for CG.

(WebCore::ImageSource::ensureDecoderIsCreated): Change SharedBuffer* to
const SharedBuffer& and remove the call to ImageDecoder::setMaxNumPixels().
The value of const static int CG ImageDecoder::m_maxNumPixels will be set
based on IMAGE_DECODER_DOWN_SAMPLING.

(WebCore::ImageSource::setData): Pass SharedBuffer& to the underlying functions.

(WebCore::ImageSource::calculateMaximumSubsamplingLevel): Returns the maximum
subsampling level allowed for an image.

(WebCore::ImageSource::subsamplingLevelForScale): Converts from a scale to
SubsamplingLevel taking into consideration the maximumSubsamplingLevel for
a particular image.

(WebCore::ImageSource::bytesDecodedToDetermineProperties): Returns the number
of encoded bytes which can determine the image properties. For non CG it's
zero. For CG it is a maximum value which can be corrected later.

(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::sizeRespectingOrientation):
(WebCore::ImageSource::frameCount):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::filenameExtension):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::frameIsCompleteAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::createFrameImageAtIndex):
These are wrappers for the ImageDecoder APIs. The purpose of these functions
is to ensure the ImageDecoder is created.

(WebCore::ImageSource::dump): Called from BitmapImage::dump().

(WebCore::ImageSource::getHotSpot): Deleted.

* platform/graphics/ImageSource.h:
(WebCore::ImageSource::setAllowSubsampling): Called from BitmapImage::setAllowSubsampling().

(WebCore::ImageSource::maxPixelsPerDecodedImage): Deleted.
(WebCore::ImageSource::setMaxPixelsPerDecodedImage): Deleted.
Setting maxPixelsPerDecodedImage was moved to the non CG ImageDecoder.

* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::setData): Change SharedBuffer* to SharedBuffer&.

(WebCore::ImageDecoder::subsamplingLevelForScale): Deleted.
The code was moved to ImageSource::subsamplingLevelForScale().

* platform/graphics/cg/ImageDecoderCG.h:
(WebCore::ImageDecoder::create): Make the prototype of this function
suitable for CG and non CG cases.
(WebCore::ImageDecoder::clearFrameBufferCache): Empty functions for CG.

* platform/graphics/cg/ImageSourceCG.cpp: Removed.

* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::frameIsCompleteAtIndex): A mew function to return
whether the frame decoding is complete or not.

(WebCore::ImageDecoder::frameHasAlphaAtIndex): Simplify the logic.

(WebCore::ImageDecoder::frameDurationAtIndex): The code was moved from
ImageSource::frameDurationAtIndex() in ImageSource.cpp.

(WebCore::ImageDecoder::createFrameImageAtIndex): The code was moved from
ImageSource::createFrameImageAtIndex() in ImageSource.cpp.

* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::ImageDecoder): Initialize the members in class.
(WebCore::ImageDecoder::~ImageDecoder): Fix the braces style.
(WebCore::ImageDecoder::setData): Change the type of the argument from
SharedBuffer* to SharedBuffer&.
(WebCore::ImageDecoder::frameSizeAtIndex): Add the argument SubsamplingLevel
so it can have the same prototype as CG.
(WebCore::ImageDecoder::orientationAtIndex): Rename it to the same of CG.

(WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageDecoder::bytesDecodedToDetermineProperties):
(WebCore::ImageDecoder::subsamplingLevelForScale): Add these functions
and return the default values so we do not have to add directive compiled
non CG blocks in ImageSource.cpp.

(WebCore::ImageDecoder::hotSpot): Return Optional<IntPoint>.

(WebCore::ImageDecoder::orientation): Deleted.
(WebCore::ImageDecoder::setMaxNumPixels): Deleted.

* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::setData):
* platform/image-decoders/bmp/BMPImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::setData):
(WebCore::GIFImageDecoder::decode):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::setData):
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::setData):
Use reference SharedBuffer instead of pointer SharedBuffer.

(WebCore::ICOImageDecoder::hotSpot):
(WebCore::ICOImageDecoder::hotSpotAtIndex):
Change hotSpot() to return Optional<IntPoint>.
* platform/image-decoders/ico/ICOImageDecoder.h:

(WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
Pass reference SharedBuffer instead of pointer SharedBuffer.

Source/WebKit2:

* UIProcess/API/efl/EwkView.cpp:
(EwkView::setCursor):
Replace the call to Image::getHotSpot() by Image::hotSpot().

LayoutTests:

Add a test for image sub-sampling. The image subsampling is enabled by
default for iOS platform only. But it can be explicitly enabled through
the setting ImageSubsamplingEnabled.

* fast/images/image-subsampling-expected.html: Added.
* fast/images/image-subsampling.html: Added.

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

4 years ago[CMake] Make FOLDER property INHERITED
commit-queue@webkit.org [Mon, 11 Apr 2016 07:28:42 +0000 (07:28 +0000)]
[CMake] Make FOLDER property INHERITED
https://bugs.webkit.org/show_bug.cgi?id=156460

Patch by Fujii Hironori <Hironori.Fujii@jp.sony.com> on 2016-04-11
Reviewed by Brent Fulgham.

.:

Some CMake targets are not setting the FOLDER property. This causes the
generated projects to be displayed in the top-level folder of the solution.

Making the FOLDER property INHERITED ensures that all the targets
are placed in their proper directories.

* Source/cmake/OptionsCommon.cmake:
Define FOLDER property as a inherited property.
* Source/cmake/WebKitMacros.cmake:
Do not set FOLDER target property.

Source/bmalloc:

* CMakeLists.txt:
Set FOLDER property as a directory property not a target property

Source/JavaScriptCore:

* CMakeLists.txt:
* shell/CMakeLists.txt:
* shell/PlatformWin.cmake:
Set FOLDER property as a directory property not a target property

Source/ThirdParty/ANGLE:

* CMakeLists.txt:
Set FOLDER property as a directory property not a target property

Source/WebCore:

* CMakeLists.txt:
Set FOLDER property as a directory property not a target property

Source/WebKit:

* CMakeLists.txt:
* PlatformWin.cmake:
Set FOLDER property as a directory property not a target property

Source/WebKit2:

* CMakeLists.txt:
Set FOLDER property as a directory property not a target property

Source/WTF:

* CMakeLists.txt:
Set FOLDER directory property

Tools:

* CMakeLists.txt:
* DumpRenderTree/CMakeLists.txt:
* DumpRenderTree/PlatformWin.cmake:
* ImageDiff/CMakeLists.txt:
* MiniBrowser/efl/CMakeLists.txt:
* MiniBrowser/gtk/CMakeLists.txt:
* MiniBrowser/win/CMakeLists.txt:
Set FOLDER property as a directory property not a target property

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

4 years ago[Tools] correctly check for braces in multiline branches in macro definition
commit-queue@webkit.org [Mon, 11 Apr 2016 00:10:17 +0000 (00:10 +0000)]
[Tools] correctly check for braces in multiline branches in macro definition
https://bugs.webkit.org/show_bug.cgi?id=156441

Patch by Caitlin Potter <caitp@igalia.com> on 2016-04-10
Reviewed by Darin Adler.

Prevents emitting whitespace/braces warning for code like the
following:

```
#define MACRO(x) \
    if (x) { \
        doTheThing(); \
        continue; \
    }
```

* Scripts/webkitpy/style/checkers/cpp.py:
(check_braces):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_line_breaking):

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

4 years agoFix the build.
weinig@apple.com [Sun, 10 Apr 2016 19:04:41 +0000 (19:04 +0000)]
Fix the build.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):

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

4 years agoRemove support for custom target picker actions
weinig@apple.com [Sun, 10 Apr 2016 18:48:37 +0000 (18:48 +0000)]
Remove support for custom target picker actions
<rdar://problem/24987783>
https://bugs.webkit.org/show_bug.cgi?id=156434

Reviewed by Eric Carlson.

This mostly entailed rolling out r197429 and r197569.

Source/WebCore:

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients):
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
(WebCore::WebMediaSessionManager::clientStateDidChange):
(WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange):
(WebCore::WebMediaSessionManager::configureNewClients):
(WebCore::WebMediaSessionManager::customPlaybackActionSelected): Deleted.
* Modules/mediasession/WebMediaSessionManager.h:
* Modules/mediasession/WebMediaSessionManagerClient.h:
* dom/Document.cpp:
(WebCore::Document::removePlaybackTargetPickerClient):
(WebCore::Document::showPlaybackTargetPicker):
(WebCore::Document::playbackTargetPickerClientStateDidChange):
(WebCore::Document::setShouldPlayToPlaybackTarget):
(WebCore::Document::customPlaybackActionSelected): Deleted.
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
(WebCore::HTMLMediaElement::setShouldPlayToPlaybackTarget):
(WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless):
(WebCore::HTMLMediaElement::customPlaybackActionSelected): Deleted.
(WebCore::HTMLMediaElement::playbackTargetPickerCustomActionName): Deleted.
* html/HTMLMediaElement.h:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::showPlaybackTargetPicker):
(WebCore::MediaElementSession::hasWirelessPlaybackTargets):
(WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
(WebCore::MediaElementSession::mediaStateDidChange):
(WebCore::MediaElementSession::customPlaybackActionSelected): Deleted.
* html/MediaElementSession.h:
* page/ChromeClient.h:
* page/Page.cpp:
(WebCore::Page::removePlaybackTargetPickerClient):
(WebCore::Page::showPlaybackTargetPicker):
(WebCore::Page::setShouldPlayToPlaybackTarget):
(WebCore::Page::ensureTestTrigger):
(WebCore::Page::customPlaybackActionSelected): Deleted.
* page/Page.h:
(WebCore::Page::testTrigger):
* platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSessionClient::canPlayToWirelessPlaybackTarget):
(WebCore::PlatformMediaSessionClient::isPlayingToWirelessPlaybackTarget):
(WebCore::PlatformMediaSessionClient::setShouldPlayToPlaybackTarget):
(WebCore::PlatformMediaSessionClient::customPlaybackActionSelected): Deleted.
* platform/graphics/MediaPlaybackTargetClient.h:
* platform/graphics/MediaPlaybackTargetPicker.cpp:
(WebCore::MediaPlaybackTargetPicker::pendingActionTimerFired):
(WebCore::MediaPlaybackTargetPicker::addPendingAction):
(WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):
* platform/graphics/MediaPlaybackTargetPicker.h:
(WebCore::MediaPlaybackTargetPicker::availableDevicesDidChange):
(WebCore::MediaPlaybackTargetPicker::currentDeviceDidChange):
(WebCore::MediaPlaybackTargetPicker::Client::customPlaybackActionSelected): Deleted.
(WebCore::MediaPlaybackTargetPicker::customPlaybackActionSelected): Deleted.
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::devicePicker):
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
(WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
(WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback): Deleted.
* platform/mock/MediaPlaybackTargetPickerMock.cpp:
(WebCore::MediaPlaybackTargetPickerMock::timerFired):
(WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):
* platform/mock/MediaPlaybackTargetPickerMock.h:
* platform/spi/cocoa/AVKitSPI.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::removePlaybackTargetPickerClient):
(WebChromeClient::showPlaybackTargetPicker):
* WebView/WebMediaPlaybackTargetPicker.h:
* WebView/WebMediaPlaybackTargetPicker.mm:
(WebMediaPlaybackTargetPicker::removePlaybackTargetPickerClient):
(WebMediaPlaybackTargetPicker::showPlaybackTargetPicker):
(WebMediaPlaybackTargetPicker::playbackTargetPickerClientStateDidChange):
(WebMediaPlaybackTargetPicker::setShouldPlayToPlaybackTarget):
(WebMediaPlaybackTargetPicker::invalidate):
(WebMediaPlaybackTargetPicker::customPlaybackActionSelected): Deleted.
* WebView/WebView.mm:
(-[WebView _showPlaybackTargetPicker:location:hasVideo:]):
(-[WebView _playbackTargetPickerClientStateDidChange:state:]):

Source/WebKit2:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::removePlaybackTargetPickerClient):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
(WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
(WebKit::WebPageProxy::didChangeBackgroundColor):
(WebKit::WebPageProxy::customPlaybackActionSelected): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::removePlaybackTargetPickerClient):
(WebKit::WebChromeClient::showPlaybackTargetPicker):
(WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setShouldPlayToPlaybackTarget):
(WebKit::WebPage::customPlaybackActionSelected): Deleted.

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

4 years agotryGetById should be supported by the DFG/FTL
keith_miller@apple.com [Sun, 10 Apr 2016 03:38:44 +0000 (03:38 +0000)]
tryGetById should be supported by the DFG/FTL
https://bugs.webkit.org/show_bug.cgi?id=156378

Reviewed by Filip Pizlo.

This patch adds support for tryGetById in the DFG/FTL. It adds a new DFG node
TryGetById, which acts similarly to the normal GetById DFG node. One key
difference between GetById and TryGetById is that in the LLInt and Baseline
we do not profile the result type. This profiling is unnessary for the current
use case of tryGetById, which is expected to be a strict equality comparision
against a specific object or undefined. In either case other DFG optimizations
will make this equally fast with or without the profiling information.

Additionally, this patch adds new reuse modes for JSValueRegsTemporary that take
an operand and attempt to reuse the registers for that operand if they are free
after the current DFG node.

* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasIdentifier):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileTryGetById):
(JSC::DFG::JSValueRegsTemporary::JSValueRegsTemporary):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::GPRTemporary::operator=):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetById):
(JSC::FTL::DFG::LowerDFGToB3::getById):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* tests/stress/try-get-by-id.js:
(tryGetByIdTextStrict):
(get let):
(let.get createBuiltin):
(get throw):
(getCaller.obj.1.throw.new.Error): Deleted.

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

4 years agoFixed compilation of JPEGImageDecoder with libjpeg v9.
commit-queue@webkit.org [Sun, 10 Apr 2016 01:46:27 +0000 (01:46 +0000)]
Fixed compilation of JPEGImageDecoder with libjpeg v9.
https://bugs.webkit.org/show_bug.cgi?id=156445

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-04-09
Reviewed by Michael Catanzaro.

ICU defines TRUE and FALSE macros, breaking libjpeg v9 headers.

No new tests needed.

* platform/image-decoders/jpeg/JPEGImageDecoder.h:

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

4 years agoAllocation sinking SSA Defs are allowed to have replacements
sbarati@apple.com [Sun, 10 Apr 2016 00:26:25 +0000 (00:26 +0000)]
Allocation sinking SSA Defs are allowed to have replacements
https://bugs.webkit.org/show_bug.cgi?id=156444

Reviewed by Filip Pizlo.

Consider the following program and the annotations that explain why
the SSA defs we create in allocation sinking can have replacements.

function foo(a1) {
    let o1 = {x: 20, y: 50};
    let o2 = {y: 40, o1: o1};
    let o3 = {};

    // We're Defing a new variable here, call it o3_field.
    // o3_field is defing the value that is the result of
    // a GetByOffset that gets eliminated through allocation sinking.
    o3.field = o1.y;

    dontCSE();

    // This control flow is here to not allow the phase to consult
    // its local SSA mapping (which properly handles replacements)
    // for the value of o3_field.
    if (a1) {
        a1 = true;
    } else {
        a1 = false;
    }

    // Here, we ask for the reaching def of o3_field, and assert
    // it doesn't have a replacement. It does have a replacement
    // though. The original Def was the GetByOffset. We replaced
    // that GetByOffset with the value of the o1_y variable.
    let value = o3.field;
    assert(value === 50);
}

* dfg/DFGObjectAllocationSinkingPhase.cpp:
* tests/stress/allocation-sinking-defs-may-have-replacements.js: Added.
(dontCSE):
(assert):
(foo):

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

4 years agoUnreviewed, rolling out r199242.
commit-queue@webkit.org [Sat, 9 Apr 2016 20:54:57 +0000 (20:54 +0000)]
Unreviewed, rolling out r199242.
https://bugs.webkit.org/show_bug.cgi?id=156442

Caused many many leaks (Requested by ap on #webkit).

Reverted changeset:

"Web Inspector: get rid of InspectorBasicValue and
InspectorString subclasses"
https://bugs.webkit.org/show_bug.cgi?id=156407
http://trac.webkit.org/changeset/199242

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

4 years agoDebug JSC test failure: stress/multi-put-by-offset-reallocation-butterfly-cse.js...
fpizlo@apple.com [Sat, 9 Apr 2016 20:41:04 +0000 (20:41 +0000)]
Debug JSC test failure: stress/multi-put-by-offset-reallocation-butterfly-cse.js.ftl-no-cjit-small-pool
https://bugs.webkit.org/show_bug.cgi?id=156406

Reviewed by Saam Barati.

The failure was because the GC ran from within the butterfly allocation call in a put_by_id
transition AccessCase that had to deal with indexing storage. When the GC runs in a call from a stub,
then we need to be extra careful:

1) The GC may reset the IC and delete the stub. So, the stub needs to tell the GC that it might be on
   the stack during GC, so that the GC keeps it alive if it's currently running.

2) If the stub uses (dereferences or stores) some object after the call, then we need to ensure that
   the stub routine knows about that object independently of the IC.

In the case of put_by_id transitions that use a helper to allocate the butterfly, we have both
issues. A long time ago, we had to deal with (2), and we still had code to handle that case, although
it appears to be dead. This change revives that code and glues it together with PolymorphicAccess.

* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::alternateBase):
(JSC::AccessCase::doesCalls):
(JSC::AccessCase::couldStillSucceed):
(JSC::AccessCase::generate):
(JSC::PolymorphicAccess::regenerate):
* bytecode/PolymorphicAccess.h:
(JSC::AccessCase::customSlotBase):
(JSC::AccessCase::isGetter):
(JSC::AccessCase::doesCalls): Deleted.
* jit/GCAwareJITStubRoutine.cpp:
(JSC::GCAwareJITStubRoutine::markRequiredObjectsInternal):
(JSC::MarkingGCAwareJITStubRoutine::MarkingGCAwareJITStubRoutine):
(JSC::MarkingGCAwareJITStubRoutine::~MarkingGCAwareJITStubRoutine):
(JSC::MarkingGCAwareJITStubRoutine::markRequiredObjectsInternal):
(JSC::GCAwareJITStubRoutineWithExceptionHandler::GCAwareJITStubRoutineWithExceptionHandler):
(JSC::createJITStubRoutine):
(JSC::MarkingGCAwareJITStubRoutineWithOneObject::MarkingGCAwareJITStubRoutineWithOneObject): Deleted.
(JSC::MarkingGCAwareJITStubRoutineWithOneObject::~MarkingGCAwareJITStubRoutineWithOneObject): Deleted.
(JSC::MarkingGCAwareJITStubRoutineWithOneObject::markRequiredObjectsInternal): Deleted.
* jit/GCAwareJITStubRoutine.h:
(JSC::createJITStubRoutine):

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

4 years agoUnreviewed, rolling out r199268.
commit-queue@webkit.org [Sat, 9 Apr 2016 20:13:12 +0000 (20:13 +0000)]
Unreviewed, rolling out r199268.
https://bugs.webkit.org/show_bug.cgi?id=156440

Broke Windows build (Requested by ap on #webkit).

Reverted changeset:

"Implement functional :host() pseudo class"
https://bugs.webkit.org/show_bug.cgi?id=156397
http://trac.webkit.org/changeset/199268

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

4 years ago[GTK] Update another GStreamer test expectation
mcatanzaro@igalia.com [Sat, 9 Apr 2016 18:16:14 +0000 (18:16 +0000)]
[GTK] Update another GStreamer test expectation

Unreviewed.

* platform/gtk/TestExpectations:

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

4 years ago[GTK] Update some more IndexedDB test expectations.
mcatanzaro@igalia.com [Sat, 9 Apr 2016 18:11:52 +0000 (18:11 +0000)]
[GTK] Update some more IndexedDB test expectations.

Unreviewed.

* platform/gtk/TestExpectations:

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

4 years ago[GTK] Remove failure expectation from storage/indexeddb/connection-leak.html
mcatanzaro@igalia.com [Sat, 9 Apr 2016 17:58:42 +0000 (17:58 +0000)]
[GTK] Remove failure expectation from storage/indexeddb/connection-leak.html

It's skipped in the global TestExpectations, see bug #152643.

* platform/gtk/TestExpectations:

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

4 years ago[GTK] Gardening unexpected passes and IndexedDB tests.
mcatanzaro@igalia.com [Sat, 9 Apr 2016 17:29:46 +0000 (17:29 +0000)]
[GTK] Gardening unexpected passes and IndexedDB tests.

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

4 years agoBuild fix. Don't treat a build number 0 as a pending build.
rniwa@webkit.org [Sat, 9 Apr 2016 07:40:21 +0000 (07:40 +0000)]
Build fix. Don't treat a build number 0 as a pending build.

* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.isPending):

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

4 years agoImplement functional :host() pseudo class
antti@apple.com [Sat, 9 Apr 2016 07:38:32 +0000 (07:38 +0000)]
Implement functional :host() pseudo class
https://bugs.webkit.org/show_bug.cgi?id=156397
<rdar://problem/25621445>

Reviewed by Darin Adler.

Source/WebCore:

We already support :host. Add functional syntax too.

* css/CSSGrammar.y.in:

    Parse functional :host().

* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoClassHostFunctionSelector):
* css/CSSParserValues.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchedRuleList):
(WebCore::ElementRuleCollector::addMatchedRule):

    Factor some shared code here.

(WebCore::ElementRuleCollector::matchHostPseudoClassRules):

    Instead of using the generic paths use a :host specific code path for matching.
    This makes it easier to avoid :host matching when it shouldn't.

(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
(WebCore::computeMatchBasedOnRuleHash):

    :host is always handled by the special matching path.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::matchHostPseudoClass):

    Add a function specifically for checking :host. In always fails on the normal code paths.
    Check the argument selector if provided.

(WebCore::hasScrollbarPseudoElement):
* css/SelectorChecker.h:

LayoutTests:

Enable, fix and expand the test.

* fast/shadow-dom/css-scoping-shadow-host-functional-rule.html:
* platform/mac/TestExpectations:

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

4 years agoHave Animometer benchmark always start with complexity of 1
jonlee@apple.com [Sat, 9 Apr 2016 05:16:59 +0000 (05:16 +0000)]
Have Animometer benchmark always start with complexity of 1
https://bugs.webkit.org/show_bug.cgi?id=156432

Reviewed by Ryosuke Niwa.

* Animometer/tests/resources/main.js: Update the default Controller and RampController to
set its minimum complexities to 1 instead of 0.

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

4 years agoEscape builder names in url* and pathFor* methods of BuildbotSyncer
rniwa@webkit.org [Sat, 9 Apr 2016 04:56:42 +0000 (04:56 +0000)]
Escape builder names in url* and pathFor* methods of BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=156427

Reviewed by Darin Adler.

The build fix in r199251 breaks other usage of RemoteAPI. Fix it properly by escaping builder names in
various methods of BuildbotSyncer.

Also fixed a typo in the logging and a bug that the new syncing script never updated "scheduled" to "running".

* server-tests/resources/mock-data.js:
(MockData.mockTestSyncConfigWithTwoBuilders): Renamed "some-builder-2" to "some builder 2" to test the
new escaping behavior in tools-buildbot-triggerable-tests.js and buildbot-syncer-tests.js.

* server-tests/tools-buildbot-triggerable-tests.js: Added tests for status url, and added a new test case
for updating "scheduled" to "running".

* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.buildRequestStatusIfUpdateIsNeeded): Update the status to "running" when the request's
status is "scheduled" and the buildbot's build is currently in progress.
(BuildbotSyncer.prototype.pathForPendingBuildsJSON): Escape the builder name.
(BuildbotSyncer.prototype.pathForBuildJSON): Ditto.
(BuildbotSyncer.prototype.pathForForceBuild): Ditto.
(BuildbotSyncer.prototype.url): Ditto.
(BuildbotSyncer.prototype.urlForBuildNumber): Ditto.

* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers):
(BuildbotTriggerable.prototype._scheduleNextRequestInGroupIfSlaveIsAvailable): Fixed a typo. We are
scheduling new build requests, not syncing them.
* tools/js/remote.js:
(RemoteAPI.sendHttpRequest): Reverted r199251.
* unit-tests/buildbot-syncer-tests.js:

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

4 years agoImprove IDL support for object arguments that are neither optional nor nullable
darin@apple.com [Sat, 9 Apr 2016 03:46:25 +0000 (03:46 +0000)]
Improve IDL support for object arguments that are neither optional nor nullable
https://bugs.webkit.org/show_bug.cgi?id=156149

Reviewed by Chris Dumez.

Source/WebCore:

After this patch, we are almost ready to change some more DOM functions to
use references instead of pointers. Remaining blocking issue is lack of support
for ShouldPassWrapperByReference in the gobject bindings.

* bindings/objc/ExceptionHandlers.h: Add NO_RETURN to raiseDOMException.
Added a new raiseTypeErrorException. Re-indented header and removed unneeded
include and forward declarations.

* bindings/objc/ExceptionHandlers.mm:
(WebCore::raiseDOMException): Added RELEASE_ASSERT_NOT_REACHED so the compiler
will understand this is NO_RETURN. Also updated FIXME comment.
(WebCore::raiseTypeErrorException): Added.

* bindings/scripts/CodeGenerator.pm: Removed unneeded code that allows the type
"AtomicString" in IDL files.
(ShouldPassWrapperByReference): Added. Contains the logic from the function in
the JavaScript code generator that was named IsPointerParameterPassedByReference,
minus a couple checks that are unneeded. For use in other code generators so they
are all consistent about how they call the DOM implementation.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Removed support for unused CustomBinding extended attribute.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Removed support for unused CustomBinding extended attribute.
(GenerateImplementation): Ditto. Also changed type checking code to throw a
type error in a more efficient way, using throwVMTypeError directly.
(GenerateParametersCheck): Rearranged code a bit so that arguments that need to
be passed in unusual ways are handled all in one place. Use WTFMove for newly
created NodeFilter objects. Simplified the reference logic so it doesn't need
to do an additional check to see if a type is a callback. Also changed type
checking code to throw a type error in a more efficient way, using throwVMTypeError
directly. Also corrected mistake where null checking code was throwing
TYPE_MISMATCH_ERR instead of a type error.
(GetNativeType): Coding style tweak.
(ShouldPassWrapperByReference): Renamed from IsPointerParameterPassedByReference.
Changed to call underlying ShouldPassWrapperByReference function in the language-
independent code generator.
(GenerateConstructorDefinition): Updated for name change.

* bindings/scripts/CodeGeneratorObjC.pm:
(SkipFunction): Removed support for unused CustomBinding extended attribute.
(GenerateImplementation): Added code to null check and pass a reference when
ShouldPassWrapperByReference returns true.

* bindings/scripts/IDLAttributes.txt: Sorted in the AppleCopyright and
UsePointersEvenForNonNullableObjectArguments arguments. Removed the unused
CPPPureInterface and CustomBinding attributes.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Regenerated test results.
* bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
* bindings/scripts/test/JS/JSTestObj.h: Ditto.
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
* bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm: Ditto.
* bindings/scripts/test/ObjC/DOMTestCallback.mm: Ditto.
* bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Ditto.
* bindings/scripts/test/ObjC/DOMTestInterface.mm: Ditto.
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm: Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.

* bindings/scripts/test/TestObj.idl: Removed test for CustomBinding.

* dom/DOMImplementation.idl: Fixed #if so that only the return type is different
between JavaScript and the other bindings. Without this change, the different
bindings got different results for ShouldPassWrapperByReference. Also formatted
functions all on a single line.

* dom/EventListener.idl: Removed CPPPureInterface, since it had no effect.
* dom/EventTarget.idl: Ditto.

LayoutTests:

* fast/canvas/canvas-path-addPath-expected.txt: Updated expected result to expect
TypeError rather than TYPE_MISMATCH_ERR. A progression.
* fast/text/font-face-set-javascript-expected.txt: Ditto.

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

4 years ago[WebIDL] Add support for [ExportMacro=XXX] IDL extended attribute
cdumez@apple.com [Sat, 9 Apr 2016 03:07:43 +0000 (03:07 +0000)]
[WebIDL] Add support for [ExportMacro=XXX] IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=156428

Reviewed by Ryosuke Niwa.

Add support for [ExportMacro=XXX] IDL extended attribute (e.g. [ExportMacro=WEBCORE_EXPORT])
so developers can indicate in the IDL which macro to use to export the generated JS bindings
class.

We previously supported this by hard-coding JS class names in the bindings generator which
was ugly.

* Modules/mediasession/MediaSession.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/notifications/Notification.idl:
* Modules/webaudio/AudioContext.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GetExportMacroForJSClass):
(GenerateHeader):
(AddIncludesForType): Deleted.
(AddToImplIncludes): Deleted.
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNode.idl:
* css/CSSStyleDeclaration.idl:
* dom/ClientRect.idl:
* dom/ClientRectList.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:
* dom/Range.idl:
* fileapi/File.idl:
* html/DOMURL.idl:
* html/HTMLElement.idl:
* html/HTMLMediaElement.idl:
* html/TimeRanges.idl:
* html/canvas/DOMPath.idl:
* inspector/ScriptProfile.idl:
* inspector/ScriptProfileNode.idl:
* page/DOMWindow.idl:
* page/make_settings.pl:
(generateInternalSettingsIdlFile):
* testing/InternalSettings.idl:
* testing/Internals.idl:
* testing/MallocStatistics.idl:
* testing/MemoryInfo.idl:
* testing/TypeConversions.idl:
* xml/XMLHttpRequest.idl:

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

4 years agoWeb Inspector: XHRs and Web Worker scripts are not searchable
commit-queue@webkit.org [Sat, 9 Apr 2016 02:37:19 +0000 (02:37 +0000)]
Web Inspector: XHRs and Web Worker scripts are not searchable
https://bugs.webkit.org/show_bug.cgi?id=154214
<rdar://problem/24643587>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-08
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/Page.json:
Add optional requestId to search results properties and search
parameters for when the frameId and url are not enough. XHR
resources, and "Other" resources will use this.

Source/WebCore:

Test: inspector/page/searchInResources.html

* inspector/InspectorPageAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
Let the NetworkAgent handle individual search requests
with a requestId. And provide global search results for
"other" resources and will include requestId properties.

* inspector/InspectorNetworkAgent.h:
* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::didFinishXHRLoading):
(WebCore::buildObjectForSearchResult):
(WebCore::InspectorNetworkAgent::searchOtherRequests):
(WebCore::InspectorNetworkAgent::searchInRequest):
Search saved "other" resource data content.

* inspector/NetworkResourcesData.h:
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::resources):
Expose the resources for iteration by the NetworkAgent.

Source/WebInspectorUI:

* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
Carry forward the requestId property if it is available.

LayoutTests:

* inspector/page/resources/search-script.js: Added.
* inspector/page/resources/search-stylesheet.css: Added.
* inspector/page/resources/search-worker.js: Added.
* inspector/page/resources/search-xhr.txt: Added.
* inspector/page/searchInResources-expected.txt: Added.
* inspector/page/searchInResources.html: Added.
Test for the Page domain's search commands.

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

4 years agoWeb Inspector: Allocation snapshot hover persists after switching tabs
commit-queue@webkit.org [Sat, 9 Apr 2016 02:32:16 +0000 (02:32 +0000)]
Web Inspector: Allocation snapshot hover persists after switching tabs
https://bugs.webkit.org/show_bug.cgi?id=156430
<rdar://problem/25633800>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-08
Reviewed by Timothy Hatcher.

* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Don't show the popover if the tree is no longer visible.

* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView.prototype.shown):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get visible):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.shown):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
Give the tree a visible state and have its containing ContentView
update it with normal ContentView shown/hidden.

* UserInterface/Views/Popover.js:
We are presenting while we were dismissing, so completely clear the
dismissing state.

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

4 years agoMIPS: support Signed cond in branchTest32()
commit-queue@webkit.org [Sat, 9 Apr 2016 01:20:29 +0000 (01:20 +0000)]
MIPS: support Signed cond in branchTest32()
https://bugs.webkit.org/show_bug.cgi?id=156260

This is needed since r197688 makes use of it.

Patch by Guillaume Emont <guijemont@igalia.com> on 2016-04-08
Reviewed by Mark Lam.

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchTest32):

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

4 years agoAX: "AXLandmarkApplication" is an inappropriate subrole for ARIA "application" since...
jdiggs@igalia.com [Sat, 9 Apr 2016 01:19:07 +0000 (01:19 +0000)]
AX: "AXLandmarkApplication" is an inappropriate subrole for ARIA "application" since it's no longer a landmark
https://bugs.webkit.org/show_bug.cgi?id=155403

Reviewed by Chris Fleizach.

The new subrole is AXWebApplication and the new role description is "web application".
As part of the fix, the WebCore AccessibilityRole for ARIA's "application" role was
renamed from LandmarkApplicationRole to WebApplicationRole.

The roles-exposed.html and aria-grouping-roles.html test expectations were also updated.

Source/WebCore:

* English.lproj/Localizable.strings:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
(WebCore::AccessibilityObject::isLandmark):
(WebCore::initializeRoleMap):
* accessibility/AccessibilityObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
* platform/LocalizedStrings.cpp:
(WebCore::AXARIAContentGroupText):

Source/WebKit/win:

* AccessibleBase.cpp: Update the rolename
(MSAARole):

LayoutTests:

* accessibility/mac/aria-grouping-roles-expected.txt:
* accessibility/mac/aria-grouping-roles.html:
* platform/mac/accessibility/roles-exposed-expected.txt:

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

4 years ago[iOS WK2] WKWebViews should consult ancestor UIScrollViews to determine tiling area
simon.fraser@apple.com [Sat, 9 Apr 2016 01:18:46 +0000 (01:18 +0000)]
[iOS WK2] WKWebViews should consult ancestor UIScrollViews to determine tiling area
https://bugs.webkit.org/show_bug.cgi?id=156429
rdar://problem/25455111

Reviewed by Tim Horton.

When a WKWebView is expanded to full size, then embedded in UIScrollView, it would
create huge tiles that cover the entire view area (since it considered itself non-scrollable).

Fix to always use 512x512 tiles in this configuration, and to adjust the tile coverage
for the area exposed through the enclosing UIScrollView.

Source/WebCore:

* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem): setObscuredInset()
moved from FrameView to Page.
* page/FrameView.cpp:
(WebCore::FrameView::adjustTiledBackingScrollability): If we're clipped by an ancestor scrollView,
just assume we're scrollable on both axes.
* page/Page.h:
(WebCore::Page::obscuredInset):
(WebCore::Page::setObscuredInset):
(WebCore::Page::enclosedInScrollView):
(WebCore::Page::setEnclosedInScrollView):
* platform/ScrollView.h:
(WebCore::ScrollView::platformObscuredInset): Deleted.
(WebCore::ScrollView::platformSetObscuredInset): Deleted.

Source/WebKit2:

* Shared/VisibleContentRectUpdateInfo.cpp: Add enclosedInScrollView(), which is used to
trigger normal-sized tiles.
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::enclosedInScrollView):
(WebKit::operator==):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didInvokeUIScrollViewDelegateCallback]): Pass our scrollView.
(-[WKWebView _didFinishScrolling]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _scrollViewDidInterruptDecelerating:]):
(-[WKWebView _visibleRectInEnclosingScrollView:]):
(-[WKWebView _visibleContentRect]): Compute the exposed part of the content relative
to the WKWebView, then intersect with the exposed part via any ancestor UIScrollView.
(-[WKWebView _didScroll]): This is called by UIKit when some ancestor UIScrollView scrolls.
However, we don't get all the UIScrollView delegate callbacks, so have to use a timer to
trigger a call to -_updateVisibleContentRects when we're in a stable state.
(-[WKWebView _enclosingScrollerScrollingEnded:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Get the stable state from the
scroll view that the user is interacting with.
(-[WKWebView _updateContentRectsWithState:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/WebPageProxy.h: Rather than pass a bazillion arguments through updateVisibleContentRects(), just
pass the VisibleContentRectUpdateInfo struct.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):

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

4 years ago[iOS Simulator] Build failure (property 'contentsFormat' not found on object of type...
commit-queue@webkit.org [Sat, 9 Apr 2016 00:42:53 +0000 (00:42 +0000)]
[iOS Simulator] Build failure (property 'contentsFormat' not found on object of type 'LegacyTileLayer *')
https://bugs.webkit.org/show_bug.cgi?id=156415

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-08
Reviewed by Simon Fraser.

Source/WebCore:

* platform/spi/cocoa/QuartzCoreSPI.h:
Provide SPI forward declaration of the CALayer contentsFormat property.

Source/WebKit2:

* UIProcess/API/Cocoa/_WKElementAction.mm:
(-[_WKElementAction runActionWithElementInfo:]):
Use WeakObjCPtr instead of __weak to avoid build errors when not under ARC.

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

4 years agoProgress towards running CMake WebKit2 on Mac
achristensen@apple.com [Sat, 9 Apr 2016 00:36:06 +0000 (00:36 +0000)]
Progress towards running CMake WebKit2 on Mac
https://bugs.webkit.org/show_bug.cgi?id=156426

Reviewed by Tim Horton.

.:

* Source/cmake/OptionsMac.cmake:
FTL works on Mac, so let's use it.
* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

* PlatformMac.cmake:

Source/WebCore:

* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWin.cmake:
On Mac, WTF is a static library that is linked only with JavaScriptCore.

Source/WebKit:

* CMakeLists.txt:
* PlatformMac.cmake:
* PlatformWin.cmake:

Source/WebKit2:

* CMakeLists.txt:
* PlatformMac.cmake:
Put the xpc service binaries in the right place.

Source/WTF:

* wtf/PlatformMac.cmake:

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

4 years agoBuild fix with IndexedDB disabled but DatabaseProcess enabled after r199230
achristensen@apple.com [Sat, 9 Apr 2016 00:33:12 +0000 (00:33 +0000)]
Build fix with IndexedDB disabled but DatabaseProcess enabled after r199230
https://bugs.webkit.org/show_bug.cgi?id=156321

Rubber-stamped by Brady Eidson.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
(WebKit::DatabaseProcess::grantSandboxExtensionsForBlobs):
(WebKit::DatabaseProcess::accessToTemporaryFileComplete):
(WebKit::DatabaseProcess::indexedDatabaseOrigins):
* DatabaseProcess/DatabaseProcess.h:
Add some more guards.

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

4 years agoUnreviewed 32-bit build fix; make type of std::min<> explicit.
jer.noble@apple.com [Fri, 8 Apr 2016 22:54:50 +0000 (22:54 +0000)]
Unreviewed 32-bit build fix; make type of std::min<> explicit.

* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::render):

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

4 years agoCRASH in AudioDestinationNode::render()
jer.noble@apple.com [Fri, 8 Apr 2016 22:41:46 +0000 (22:41 +0000)]
CRASH in AudioDestinationNode::render()
https://bugs.webkit.org/show_bug.cgi?id=156308

Reviewed by Eric Carlson.

Yet another math error in AudioDestinationIOS::render(). It is possible for the difference between
m_startSpareFrame and m_endSpareFrame to be greater than the numberOfFrames to be rendered. Protect
against this case by taking the min() of those two values and only advancing m_startSpareFrame by
that amount.  This guarantees that framesThisTime will never underflow, and that data will not be
written past the end of the ioData parameter.

* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::render):

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

4 years agoBuild fix. We need to escape the path or http.request would fail.
rniwa@webkit.org [Fri, 8 Apr 2016 22:37:34 +0000 (22:37 +0000)]
Build fix. We need to escape the path or http.request would fail.

* tools/js/remote.js:

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

4 years agoModern IDB: Use more IDBValue and IDBGetResult in IDBBackingStore.
beidson@apple.com [Fri, 8 Apr 2016 22:01:10 +0000 (22:01 +0000)]
Modern IDB: Use more IDBValue and IDBGetResult in IDBBackingStore.
https://bugs.webkit.org/show_bug.cgi?id=156418

Reviewed by Alex Christensen.

No new tests (Refactor, no change in behavior).

* Modules/indexeddb/IDBValue.cpp:
(WebCore::IDBValue::IDBValue):
* Modules/indexeddb/IDBValue.h:

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::addRecord):
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):

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

4 years agoDebugger may dereference m_currentCallFrame even after the VM has gone idle
sbarati@apple.com [Fri, 8 Apr 2016 21:21:25 +0000 (21:21 +0000)]
Debugger may dereference m_currentCallFrame even after the VM has gone idle
https://bugs.webkit.org/show_bug.cgi?id=156413

Reviewed by Mark Lam.

There is a bug where the debugger may dereference its m_currentCallFrame
pointer after that pointer becomes invalid to read from. This happens like so:

We may step over an instruction which causes the end of execution for the
current program. This causes the VM to exit. Then, we perform a GC which
causes us to collect the global object. The global object being collected
causes us to detach the debugger. In detaching, we think we still have a
valid m_currentCallFrame, we dereference it, and crash. The solution is to
make sure we're paused when dereferencing this pointer inside ::detach().

* debugger/Debugger.cpp:
(JSC::Debugger::detach):

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

4 years agoModern IDB: Make IDBGetResult contain an IDBValue instead of a buffer, and remove...
beidson@apple.com [Fri, 8 Apr 2016 21:11:37 +0000 (21:11 +0000)]
Modern IDB: Make IDBGetResult contain an IDBValue instead of a buffer, and remove unused methods.
https://bugs.webkit.org/show_bug.cgi?id=156416

Reviewed by Alex Christensen.

No new tests (Refactor, no change in behavior).

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::setGetResult):

* Modules/indexeddb/IDBGetResult.cpp:
(WebCore::IDBGetResult::dataFromBuffer):
(WebCore::IDBGetResult::isolatedCopy):
* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::IDBGetResult):
(WebCore::IDBGetResult::value):
(WebCore::IDBGetResult::encode):
(WebCore::IDBGetResult::decode):
(WebCore::IDBGetResult::valueBuffer): Deleted.
(WebCore::IDBGetResult::setValueBuffer): Deleted.
(WebCore::IDBGetResult::setKeyData): Deleted.
(WebCore::IDBGetResult::setPrimaryKeyData): Deleted.
(WebCore::IDBGetResult::setKeyPath): Deleted.

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::didGetRecordOnServer):

* Modules/indexeddb/IDBValue.cpp:
(WebCore::IDBValue::IDBValue):
* Modules/indexeddb/IDBValue.h:

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):

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

4 years agoFocus ring drawn at incorrect location on image map with CSS transform.
zalan@apple.com [Fri, 8 Apr 2016 21:01:50 +0000 (21:01 +0000)]
Focus ring drawn at incorrect location on image map with CSS transform.
https://bugs.webkit.org/show_bug.cgi?id=143527
<rdar://problem/21908735>

Reviewed by Simon Fraser.

Source/WebCore:

Implement pathForFocusRing for HTMLAreaElement. It follows the logic of RenderObject::addFocusRingRects().

Tests: fast/images/image-map-outline-in-positioned-container.html
       fast/images/image-map-outline-with-paint-root-offset.html
       fast/images/image-map-outline-with-scale-transform.html
       fast/images/image-map-outline.html

* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::pathForFocusRing):
* html/HTMLAreaElement.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintFocusRing): Move addFocusRingRects() out of focus ring painting.
(WebCore::RenderElement::paintOutline):
* rendering/RenderElement.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paint):
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderImage.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):

LayoutTests:

Implement pathForFocusRing for HTMLAreaElement.

* fast/images/image-map-outline-in-positioned-container-expected.html: Added.
* fast/images/image-map-outline-in-positioned-container.html: Added.
* fast/images/image-map-outline-with-paint-root-offset-expected.html: Added.
* fast/images/image-map-outline-with-paint-root-offset.html: Added.
* fast/images/image-map-outline-with-scale-transform-expected.html: Added.
* fast/images/image-map-outline-with-scale-transform.html: Added.

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

4 years agobmalloc: stress_aligned test fails if you increase smallMax
ggaren@apple.com [Fri, 8 Apr 2016 20:59:51 +0000 (20:59 +0000)]
bmalloc: stress_aligned test fails if you increase smallMax
https://bugs.webkit.org/show_bug.cgi?id=156414

Reviewed by Oliver Hunt.

When size exceeds alignment and is a multiple of alignment and is not
a power of two, such as 24kB with 8kB alignment, the small allocator
did not always guarantee alignment. Let's fix that.

* bmalloc/Algorithm.h:
(bmalloc::divideRoundingUp): Math is hard.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::allocate): Align to the page size unconditionally.
Even if the page size is not a power of two, it might be a multiple of
a power of two, and we want alignment to that smaller power of two to
be guaranteed.

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

4 years ago[WK1] Wheel event callback removing the window causes crash in WebCore
bfulgham@apple.com [Fri, 8 Apr 2016 20:46:25 +0000 (20:46 +0000)]
[WK1] Wheel event callback removing the window causes crash in WebCore
https://bugs.webkit.org/show_bug.cgi?id=156409
<rdar://problem/25631267>

Reviewed by Simon Fraser.

Null check the Widget before using it, since the iframe may have been removed
from its parent document inside the event handler.

This is the WK1 fix for https://bugs.webkit.org/show_bug.cgi?id=150871.

Tested by fast/events/wheel-event-destroys-frame.html

* page/EventHandler.cpp:
(WebCore::widgetForElement): Added.
(WebCore::EventHandler::handleWheelEvent): Use new helper function to
clean up the code, and allow us to check that the Widget has not been
destroyed during the event handler.

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

4 years agoFix SVG benchmark test
jonlee@apple.com [Fri, 8 Apr 2016 20:19:26 +0000 (20:19 +0000)]
Fix SVG benchmark test
https://bugs.webkit.org/show_bug.cgi?id=156410

Reviewed by Dean Jackson.

* Animometer/resources/extensions.js: Update Point.zero to be a static Point.
* Animometer/tests/simple/resources/tiled-canvas-image.js:
(Stage.call._setupTiles): Refactor.
* Animometer/tests/master/resources/particles.js:
(Particle.prototype.reset): Use Point.center.
(complexity): We are not using a gradient background anymore, so remove the +1.
* Animometer/tests/master/resources/svg-particles.js: Update to use SVG transform
instead of CSS transform.

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

4 years agoTiming attack on SVG feComposite filter circumvents same-origin policy
said@apple.com [Fri, 8 Apr 2016 20:07:51 +0000 (20:07 +0000)]
Timing attack on SVG feComposite filter circumvents same-origin policy
https://bugs.webkit.org/show_bug.cgi?id=154338

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-04-08
Reviewed by Oliver Hunt.

Ensure the FEComposite arithmetic filter is clamping the resulted color
components in a constant time.

* platform/graphics/filters/FEComposite.cpp:
(WebCore::clampByte):
(WebCore::computeArithmeticPixels):

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

4 years agoWeb Inspector: get rid of InspectorBasicValue and InspectorString subclasses
bburg@apple.com [Fri, 8 Apr 2016 19:59:25 +0000 (19:59 +0000)]
Web Inspector: get rid of InspectorBasicValue and InspectorString subclasses
https://bugs.webkit.org/show_bug.cgi?id=156407
<rdar://problem/25627659>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

There's no point having these subclasses as they don't save any space.
Add m_stringValue to the union and merge some implementations of writeJSON.
Move uses of the subclass to InspectorValue and delete redundant methods.
Now, most InspectorValue methods are non-virtual so they can be templated.

* bindings/ScriptValue.cpp:
(Deprecated::jsToInspectorValue):
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::makeCall):
Don't used deleted subclasses.

* inspector/InspectorValues.cpp:
(Inspector::InspectorValue::null):
(Inspector::InspectorValue::create):
(Inspector::InspectorValue::asValue):
(Inspector::InspectorValue::asBoolean):
(Inspector::InspectorValue::asDouble):
(Inspector::InspectorValue::asInteger):
(Inspector::InspectorValue::asString):
These only need one implementation now.

(Inspector::InspectorValue::writeJSON):
Still a virtual method since Object and Array need their members.

(Inspector::InspectorObjectBase::InspectorObjectBase):
(Inspector::InspectorBasicValue::asBoolean): Deleted.
(Inspector::InspectorBasicValue::asDouble): Deleted.
(Inspector::InspectorBasicValue::asInteger): Deleted.
(Inspector::InspectorBasicValue::writeJSON): Deleted.
(Inspector::InspectorString::asString): Deleted.
(Inspector::InspectorString::writeJSON): Deleted.
(Inspector::InspectorString::create): Deleted.
(Inspector::InspectorBasicValue::create): Deleted.

* inspector/InspectorValues.h:
(Inspector::InspectorObjectBase::setBoolean):
(Inspector::InspectorObjectBase::setInteger):
(Inspector::InspectorObjectBase::setDouble):
(Inspector::InspectorObjectBase::setString):
(Inspector::InspectorArrayBase::pushBoolean):
(Inspector::InspectorArrayBase::pushInteger):
(Inspector::InspectorArrayBase::pushDouble):
(Inspector::InspectorArrayBase::pushString):
Use new factory methods.

* replay/EncodedValue.cpp:
(JSC::ScalarEncodingTraits<bool>::encodeValue):
(JSC::ScalarEncodingTraits<double>::encodeValue):
(JSC::ScalarEncodingTraits<float>::encodeValue):
(JSC::ScalarEncodingTraits<int32_t>::encodeValue):
(JSC::ScalarEncodingTraits<int64_t>::encodeValue):
(JSC::ScalarEncodingTraits<uint32_t>::encodeValue):
(JSC::ScalarEncodingTraits<uint64_t>::encodeValue):
* replay/EncodedValue.h:
Use new factory methods.

Source/WebCore:

* inspector/InspectorDatabaseAgent.cpp: Don't use deleted subclasses.

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

4 years agoJSContext Inspector: Fix asserts and uncaught exception showing Timeline Tab
commit-queue@webkit.org [Fri, 8 Apr 2016 19:40:48 +0000 (19:40 +0000)]
JSContext Inspector: Fix asserts and uncaught exception showing Timeline Tab
https://bugs.webkit.org/show_bug.cgi?id=156411

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-08
Reviewed by Timothy Hatcher.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.closed):
Gracefully handle if we do not have a Network Timeline.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._changeViewMode):
This function is always called by the constructor, so the assert
is not useful since it can be called when FPS is not supported.

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

4 years agoAdd IC support for arguments.length
fpizlo@apple.com [Fri, 8 Apr 2016 19:37:04 +0000 (19:37 +0000)]
Add IC support for arguments.length
https://bugs.webkit.org/show_bug.cgi?id=156389

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:

This adds support for caching accesses to arguments.length for both DirectArguments and
ScopedArguments. In strict mode, we already cached these accesses since they were just
normal properties.

Amazingly, we also already supported caching of overridden arguments.length in both
DirectArguments and ScopedArguments. This is because when you override, the property gets
materialized as a normal JS property and the structure is changed.

This patch painstakingly preserves our previous caching of overridden length while
introducing caching of non-overridden length (i.e. the common case). In fact, we even cache
the case where it could either be overridden or not, since we just end up with an AccessCase
for each and they cascade to each other.

This is a >3x speed-up on microbenchmarks that do arguments.length in a polymorphic context.
Entirely monomorphic accesses were already handled by the DFG.

* bytecode/PolymorphicAccess.cpp:
(JSC::AccessGenerationState::calculateLiveRegistersForCallAndExceptionHandling):
(JSC::AccessCase::guardedByStructureCheck):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generate):
(WTF::printInternal):
* bytecode/PolymorphicAccess.h:
* jit/ICStats.h:
* jit/JITOperations.cpp:
* jit/Repatch.cpp:
(JSC::tryCacheGetByID):
(JSC::tryCachePutByID):
(JSC::tryRepatchIn):
* tests/stress/direct-arguments-override-length-then-access-normal-length.js: Added.
(args):
(foo):
(result.foo):

LayoutTests:

* js/regress/direct-arguments-length-expected.txt: Added.
* js/regress/direct-arguments-length.html: Added.
* js/regress/direct-arguments-overridden-length-expected.txt: Added.
* js/regress/direct-arguments-overridden-length.html: Added.
* js/regress/direct-arguments-possibly-overridden-length-expected.txt: Added.
* js/regress/direct-arguments-possibly-overridden-length.html: Added.
* js/regress/scoped-arguments-length-expected.txt: Added.
* js/regress/scoped-arguments-length.html: Added.
* js/regress/scoped-arguments-overridden-length-expected.txt: Added.
* js/regress/scoped-arguments-overridden-length.html: Added.
* js/regress/scoped-arguments-possibly-overridden-length-expected.txt: Added.
* js/regress/scoped-arguments-possibly-overridden-length.html: Added.
* js/regress/script-tests/direct-arguments-length.js: Added.
(args):
* js/regress/script-tests/direct-arguments-overridden-length.js: Added.
(args):
* js/regress/script-tests/direct-arguments-possibly-overridden-length.js: Added.
(args1):
(args2):
* js/regress/script-tests/scoped-arguments-length.js: Added.
(args):
* js/regress/script-tests/scoped-arguments-overridden-length.js: Added.
(args):
* js/regress/script-tests/scoped-arguments-possibly-overridden-length.js: Added.
(args1):
(args2):

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

4 years agoFix leaks in WebAVMediaSelectionOptionMac and WebPlaybackControlsManager
bdakin@apple.com [Fri, 8 Apr 2016 18:32:19 +0000 (18:32 +0000)]
Fix leaks in WebAVMediaSelectionOptionMac and WebPlaybackControlsManager
https://bugs.webkit.org/show_bug.cgi?id=156379

Reviewed by Tim Horton.

These classes should use RetainPtrs.
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(-[WebAVMediaSelectionOptionMac localizedDisplayName]):
(-[WebAVMediaSelectionOptionMac setLocalizedDisplayName:]):
(-[WebPlaybackControlsManager timing]):
(-[WebPlaybackControlsManager setTiming:]):
(-[WebPlaybackControlsManager seekableTimeRanges]):
(-[WebPlaybackControlsManager setSeekableTimeRanges:]):
(-[WebPlaybackControlsManager audioMediaSelectionOptions]):
(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:]):
(-[WebPlaybackControlsManager currentAudioMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentAudioMediaSelectionOption:]):
(-[WebPlaybackControlsManager legibleMediaSelectionOptions]):
(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:]):
(-[WebPlaybackControlsManager currentLegibleMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentLegibleMediaSelectionOption:]):

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

4 years agoTouching any IDL files rebuilds all bindings in CMake Ninja build
commit-queue@webkit.org [Fri, 8 Apr 2016 18:28:27 +0000 (18:28 +0000)]
Touching any IDL files rebuilds all bindings in CMake Ninja build
https://bugs.webkit.org/show_bug.cgi?id=156400

Patch by Fujii Hironori <Hironori.Fujii@jp.sony.com> on 2016-04-08
Reviewed by Brent Fulgham.

* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttribute):
WriteFileIfChanged does not work due to flaky results of 'keys'.
Sort results of 'keys'.

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

4 years agoRedefining a method of the same name hits an assertion
joepeck@webkit.org [Fri, 8 Apr 2016 18:18:19 +0000 (18:18 +0000)]
Redefining a method of the same name hits an assertion
https://bugs.webkit.org/show_bug.cgi?id=144258

Reviewed by Ryosuke Niwa.

* TestExpectations:
* js/script-tests/class-syntax-semicolon.js:
This test no longer asserts.

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

4 years agoUInt32ToNumber should have an Int52 path
commit-queue@webkit.org [Fri, 8 Apr 2016 18:07:25 +0000 (18:07 +0000)]
UInt32ToNumber should have an Int52 path
https://bugs.webkit.org/show_bug.cgi?id=125704

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-04-08
Reviewed by Filip Pizlo.

When dealing with big numbers, fall back to Int52 instead
of double when possible.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileUInt32ToNumber):

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

4 years ago[cmake] Use ICU include dirs in WebKit.
commit-queue@webkit.org [Fri, 8 Apr 2016 17:50:22 +0000 (17:50 +0000)]
[cmake] Use ICU include dirs in WebKit.
https://bugs.webkit.org/show_bug.cgi?id=156402

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-04-08
Reviewed by Brent Fulgham.

* CMakeLists.txt:

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

4 years ago[iOS WK2] Stop using exposedContentRect for history scroll state restoration
simon.fraser@apple.com [Fri, 8 Apr 2016 17:22:19 +0000 (17:22 +0000)]
[iOS WK2] Stop using exposedContentRect for history scroll state restoration
https://bugs.webkit.org/show_bug.cgi?id=156392

Reviewed by Tim Horton.

A future commit will alter the meaning of exposedContentRect on iOS to take into
account clipped out parts of the WKWebView. To achieve this, wean history restoration
off of using exposedContentRect for scroll state restoration. It did this to restore
the page to the same position relative to the view's top-left (to avoid jiggles caused
by changing obscured insets).

Do this by pushing the left/top obscured insets down with visible content rects updates,
storing them on ScrollView, and adding them to HistoryItem. Those insets are then used
for scroll state restoration in WKWebView.

Source/WebCore:

* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
* history/HistoryItem.h:
(WebCore::HistoryItem::obscuredInset):
(WebCore::HistoryItem::setObscuredInset):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
* platform/ScrollView.h:
(WebCore::ScrollView::platformObscuredInset):
(WebCore::ScrollView::platformSetObscuredInset):

Source/WebKit2:

* Shared/VisibleContentRectUpdateInfo.cpp: Add FloatSize for obscuredInset.
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::obscuredInset):
(WebKit::operator==):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]): Rename _needsToRestoreExposedRect to _needsToRestoreScrollPosition
(-[WKWebView _didCommitLayerTree:]): Restore the scroll position using the scaled scrollOffset minus
the old obscuredInset.
(-[WKWebView _layerTreeCommitComplete]):
(-[WKWebView _restorePageScrollPosition:scrollOrigin:previousObscuredInset:scale:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
(-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _restorePageStateToExposedRect:scrollOrigin:scale:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::restorePageState):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
(WebKit::WebPageProxy::restorePageState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::restorePageState):
(WebKit::WebPage::updateVisibleContentRects):

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

4 years agoBuild fix followup to http://trac.webkit.org/changeset/199230
beidson@apple.com [Fri, 8 Apr 2016 17:21:32 +0000 (17:21 +0000)]
Build fix followup to trac.webkit.org/changeset/199230

Unreviewed.

* platform/posix/FileSystemPOSIX.cpp:
(WebCore::hardLinkOrCopyFile): Stricter POSIX systems require a umask for O_CREAT opens,
  so let's provide one.

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

4 years agoRemove 14 more unnecessary uses of UsePointersEvenForNonNullableObjectArguments
darin@apple.com [Fri, 8 Apr 2016 16:59:35 +0000 (16:59 +0000)]
Remove 14 more unnecessary uses of UsePointersEvenForNonNullableObjectArguments
https://bugs.webkit.org/show_bug.cgi?id=156405

Reviewed by Chris Dumez.

* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* dom/Element.idl:
* dom/NamedNodeMap.idl:
* html/HTMLElement.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLRenderingContext.idl:
* page/DOMSelection.idl:
* storage/StorageEvent.idl:
* svg/SVGSVGElement.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XSLTProcessor.idl:
Removed UsePointersEvenForNonNullableObjectArguments, which was having no effect
in any of these classes. Also tweaked formatting of some of the IDL, merging things
onto single lines, changing paragraphing and indenting a bit, and fixing some typos.

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

4 years agoModern IDB (Blob support): Write blobs to temporary files and move them to the correc...
beidson@apple.com [Fri, 8 Apr 2016 16:57:29 +0000 (16:57 +0000)]
Modern IDB (Blob support): Write blobs to temporary files and move them to the correct location when storing them.
https://bugs.webkit.org/show_bug.cgi?id=156321

Reviewed by Alex Christensen, Andy Estes, and Darin Adler.

Source/WebCore:

No new tests (No testable change in behavior yet, current tests pass).

When asked to store a Blob (including Files) in IndexedDB, the Blob is written out to a temporary file.

Then when the putOrAdd request is received by IDBServer it includes a list of blobURLs and their mappings
to temporary files.

Finally, as part of storing the Blob value in the database, those temporary files are moved in to place
under the IndexedDB directory for storage and later retrieval.

* Modules/indexeddb/IDBValue.cpp:
(WebCore::IDBValue::IDBValue):

* Modules/indexeddb/server/IDBBackingStore.h:
(WebCore::IDBServer::IDBBackingStoreTemporaryFileHandler::~IDBBackingStoreTemporaryFileHandler):

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::create):
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::IDBServer::createBackingStore):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::blobRecordsTableSchema):
(WebCore::IDBServer::blobRecordsTableSchemaAlternate):
(WebCore::IDBServer::blobFilesTableSchema):
(WebCore::IDBServer::blobFilesTableSchemaAlternate):
(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidBlobTables):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
(WebCore::IDBServer::SQLiteIDBBackingStore::temporaryFileHandler):

* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::commit):
(WebCore::IDBServer::SQLiteIDBTransaction::moveBlobFilesIfNecessary):
(WebCore::IDBServer::SQLiteIDBTransaction::abort):
(WebCore::IDBServer::SQLiteIDBTransaction::reset):
(WebCore::IDBServer::SQLiteIDBTransaction::addBlobFile):
* Modules/indexeddb/server/SQLiteIDBTransaction.h:

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::InProcessIDBServer):
(WebCore::InProcessIDBServer::accessToTemporaryFileComplete):
* Modules/indexeddb/shared/InProcessIDBServer.h:

* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::blobURLsIsolatedCopy):
* bindings/js/SerializedScriptValue.h:

* platform/FileSystem.h:
* platform/gtk/FileSystemGtk.cpp:
(WebCore::hardLinkOrCopyFile):
* platform/posix/FileSystemPOSIX.cpp:
(WebCore::hardLinkOrCopyFile):

Source/WebKit2:

The NetworkProcess writes a blob to a temporary file, then tells the UIProcess to grant the DatabaseProcess
a Sandbox Extension to that path.

It then tells the WebProcess the paths for the temporary files, which then tells the DatabaseProcess to store
the contents of those files as blob references in the database.

Since the UIProcess had already granted it a Sandbox Extension, it is able to do so.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::idbServer):
(WebKit::DatabaseProcess::grantSandboxExtensionsForBlobs):
(WebKit::DatabaseProcess::prepareForAccessToTemporaryFile):
(WebKit::DatabaseProcess::accessToTemporaryFileComplete):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseProcess.messages.in:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs):
(WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:

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

4 years agoAX: [ATK] Crash getting text under element in CSS table
jdiggs@igalia.com [Fri, 8 Apr 2016 16:36:01 +0000 (16:36 +0000)]
AX: [ATK] Crash getting text under element in CSS table
https://bugs.webkit.org/show_bug.cgi?id=156328

Reviewed by Chris Fleizach.

Source/WebCore:

AccessibilityRenderObject::textUnderElement() assumes (and asserts) that
the first and last child of an anonymous block will each have nodes with
which to define positions. This is not the case for CSS Tables and their
anonymous descendants. AccessibilityNodeObject:textUnderElement() is our
fallback for the instances where a text range cannot be created based on
positions, so let it handle anonymous RenderTable parts.

Test: accessibility/generated-content-with-display-table-crash.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
(WebCore::AccessibilityRenderObject::shouldGetTextFromNode):
* accessibility/AccessibilityRenderObject.h:

LayoutTests:

While this crash is currently seen only for ATK, there is nothing to
prevent another port from attempting to get all the text under a CSS
RenderTable. Hence the shared test.

* accessibility/generated-content-with-display-table-crash.html: Added.
* platform/gtk/accessibility/generated-content-with-display-table-crash-expected.txt: Added.
* platform/mac/accessibility/generated-content-with-display-table-crash-expected.txt: Added.

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

4 years agoUnreviewed.
youenn.fablet@crf.canon.fr [Fri, 8 Apr 2016 16:11:00 +0000 (16:11 +0000)]
Unreviewed.
Rebasing LayoutTests/imported/w3c/web-platform-tests/dom/nodes/MutationObserver-childList.html expectation after https://trac.webkit.org/changeset/199225.
Removing its Timeout expectation.

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

4 years agoWeb Inspector: Attempting to dismiss a popover that is already being dismissed causes...
mattbaker@apple.com [Fri, 8 Apr 2016 16:05:20 +0000 (16:05 +0000)]
Web Inspector: Attempting to dismiss a popover that is already being dismissed causes an error
https://bugs.webkit.org/show_bug.cgi?id=156385
<rdar://problem/25617962>

Reviewed by Timothy Hatcher.

The Popover element is removed from the DOM once it's fade-out transition
completes. Since Popover.dismiss proceeds as long as it's element has a
parent, successive calls to dismiss can run before the popover is removed.

Rather than rely on the presence of the popover in the DOM, set a "dismissing"
flag the first time dismiss is called, before the fade-out animation begins.

* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey):
Check for null popover.

* UserInterface/Views/Popover.js:
(WebInspector.Popover):
(WebInspector.Popover.prototype.dismiss):
Do nothing if already dismissing.

(WebInspector.Popover.prototype.handleEvent):
Reset dismissing flag after style transition completes.

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

4 years agoWeb Inspector: Quick Open fails to match pattern "bB" in file "abBc"
mattbaker@apple.com [Fri, 8 Apr 2016 16:04:24 +0000 (16:04 +0000)]
Web Inspector: Quick Open fails to match pattern "bB" in file "abBc"
https://bugs.webkit.org/show_bug.cgi?id=156398

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

Correct an off-by-one error in the backtrack routine that set the dead
branch index to the character just before the match that was popped.
The dead branch index should equal the index of the popped match.

* UserInterface/Controllers/ResourceQueryController.js:
(WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
(WebInspector.ResourceQueryController.prototype._findQueryMatches):

LayoutTests:

* inspector/unit-tests/resource-query-controller-expected.txt:
* inspector/unit-tests/resource-query-controller.html:
Test that two repeated characters in the search string are correctly
matched when the first character is lowercase and the second is uppercase.

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

4 years agoLayoutTests/imported/w3c:
youenn.fablet@crf.canon.fr [Fri, 8 Apr 2016 14:45:24 +0000 (14:45 +0000)]
LayoutTests/imported/w3c:
Testharness-based tests that time out should be able to produce detailed output
https://bugs.webkit.org/show_bug.cgi?id=145313

Reviewed by Xabier Rodriguez-Calvar.

Rebasing tests that produce output after testharness timeout() is called.

* web-platform-tests/fetch/api/request/request-cache-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-01-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-style-element/style-error-01-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change-expected.txt:

Tools:
Testharness-based tests that time out should be able to produce a detailed output
https://bugs.webkit.org/show_bug.cgi?id=145313

Reviewed by Xabier Rodriguez-Calvar.

Adding timeout readonly accessor to TestRunner for both WK1 and WK2.

* DumpRenderTree/TestRunner.cpp:
(getTimeoutCallback): The js "timeout" property getter.
(TestRunner::staticValues): Adding "timeout" property to DumpRenderTree so that testRunner.timeout called from JS returns the timeout value.
* DumpRenderTree/TestRunner.h:
(TestRunner::timeout): Adding access to DRT m_timeout private value.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Adding timeout readonly attribute so that testRunner.timeout can be called from JS.
* WebKitTestRunner/InjectedBundle/TestRunner.h: Adding DOM timeout getter to implement timeout IDL definition.
(WTR::TestRunner::timeout):

LayoutTests:
Testharness-based tests that time out should be able to produce a detailled output
https://bugs.webkit.org/show_bug.cgi?id=145313

Reviewed by Xabier Rodriguez-Calvar.

* TestExpectations: Removed TIMEOUT for some tests for which testharness.timeout will be called just before WTR times out.
* platform/gtk/imported/w3c/web-platform-tests/fetch/api/request/request-cache-expected.txt: GTK specific baseline.
* resources/testharnessreport.js:
(add_completion_callback): Improving error logging message. Dumping of the tests status in error case.

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

4 years agoRemove unneeded UsePointersEvenForNonNullableObjectArguments from event classes
darin@apple.com [Fri, 8 Apr 2016 09:04:17 +0000 (09:04 +0000)]
Remove unneeded UsePointersEvenForNonNullableObjectArguments from event classes
https://bugs.webkit.org/show_bug.cgi?id=156396

Reviewed by Youenn Fablet.

* dom/CompositionEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/UIEvent.idl:
* dom/WheelEvent.idl:
Removed UsePointersEvenForNonNullableObjectArguments, which was having no effect.

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

4 years ago[css-grid] Fix positioned items with grid gaps
rego@igalia.com [Fri, 8 Apr 2016 08:52:17 +0000 (08:52 +0000)]
[css-grid] Fix positioned items with grid gaps
https://bugs.webkit.org/show_bug.cgi?id=156288

Reviewed by Darin Adler.

Source/WebCore:

When we place a positioned items in a grid with gaps,
we were not taking into accounts the gutter size.
We've to use that size to properly place and size the item.

Tests: fast/css-grid-layout/grid-positioned-items-gaps-rtl.html
       fast/css-grid-layout/grid-positioned-items-gaps.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):

LayoutTests:

Added new tests checking the right behavior.

* fast/css-grid-layout/grid-positioned-items-gaps-expected.txt: Added.
* fast/css-grid-layout/grid-positioned-items-gaps-rtl-expected.txt: Added.
* fast/css-grid-layout/grid-positioned-items-gaps-rtl.html: Added.
* fast/css-grid-layout/grid-positioned-items-gaps.html: Added.

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

4 years ago[css-grid] Remove unnecessary iteration in populateGridPositions loop
jfernandez@igalia.com [Fri, 8 Apr 2016 08:01:04 +0000 (08:01 +0000)]
[css-grid] Remove unnecessary iteration in populateGridPositions loop
https://bugs.webkit.org/show_bug.cgi?id=156376

Reviewed by Darin Adler.

The populateGridPositions loop limit was set to 'lastLine'. However, the
the position of last track's start line is updated after the loop, since
it does not follow the same pattern; it does not have a content
distribution offset.

So, since we are essentially overwriting the value stored in the last
iteration, we can just lower the loop limit.

No new tests added, because there is no change in the functionality.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::populateGridPositions):

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

4 years agoCSP: Block XHR when calling XMLHttpRequest.send() and throw network error.
commit-queue@webkit.org [Fri, 8 Apr 2016 07:17:50 +0000 (07:17 +0000)]
CSP: Block XHR when calling XMLHttpRequest.send() and throw network error.
https://bugs.webkit.org/show_bug.cgi?id=153598
<rdar://problem/24391483>

Patch by John Wilander <wilander@apple.com> on 2016-04-08
Reviewed by Darin Adler.

Source/WebCore:

No new tests. Changes to existing tests are sufficient.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open):
(WebCore::XMLHttpRequest::initSend):
    Moved the CSP check from XMLHttpRequest::open() to XMLHttpRequest::initSend().
    Changed the thrown error type from Security to Network for synchronous requests.
    Changed from throwing an error to firing an error event for asynchronous requests.
    These changes are in conformance with connect-src of Content Security Policy Level 2.
    https://www.w3.org/TR/CSP2/#directive-connect-src (W3C Candidate Recommendation, 21 July 2015)

LayoutTests:

* fast/workers/resources/worker-inherits-csp-blocks-xhr.js:
(catch):
* fast/workers/worker-inherits-csp-blocks-xhr-expected.txt:
    Changed expected error from DOMException.SECURITY_ERR to DOMException.NETWORK_ERR.
* http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-blocked.html:
    Now tests that XMLHttpRequest.send() is blocked if the URL voilates the connect-src directive in CSP.
* http/tests/security/contentSecurityPolicy/resources/worker.php:
    Added two additional calls to XMLHttpRequest.send() and switched to receiving an error event to make
    existing tests work with code changes.
* http/tests/security/contentSecurityPolicy/source-list-parsing-malformed-meta.html:
    Added an additional call to XMLHttpRequest.send() and switched to receiving an error event to make
    existing test work with code changes.
* http/tests/security/isolatedWorld/bypass-main-world-csp-for-xhr-expected.txt:
* http/tests/security/isolatedWorld/bypass-main-world-csp-for-xhr.html:
    Added an additional call to XMLHttpRequest.send() and switched to receiving an error event to make
    existing tests work with code changes.
    Refactored test mechnism with additional parameters to cover synchronous/asynchronous as well as
    same-origin/cross-origin in isolated worlds.

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

4 years agoFix various bugs in the new syncing script
rniwa@webkit.org [Fri, 8 Apr 2016 07:15:43 +0000 (07:15 +0000)]
Fix various bugs in the new syncing script
https://bugs.webkit.org/show_bug.cgi?id=156393

Reviewed by Darin Adler.

* server-tests/resources/common-operations.js: Added. This file was supposed to be added in r199191.
(addBuilderForReport):
(addSlaveForReport):
(connectToDatabaseInEveryTest):
(submitReport):
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers): Don't log every time we pull from buildbot
builder as this dramatically increases the amount of log we generate.
* tools/js/parse-arguments.js:
(parseArguments): Fixed a typo. This should be parseArgument*s*, not parseArgument.
* tools/js/remote.js:
(RemoteAPI.prototype.url): Fixed a bug that portSuffix wasn't being expanded in the template literal.
(RemoteAPI.prototype.configure): Added more validations with nice error messages.
(RemoteAPI.prototype.sendHttpRequest): Falling back to port 80 isn't right when scheme is https. Compute
the right port in configure instead based on the scheme.
* tools/sync-buildbot.js:
(syncLoop): Fixed the bug that syncing multiple times fail because Manifest.fetch() create new Platform
and Test objects. This results in various references in BuildRequest objects to get outdated. Fixing this
properly in Manifest.fetch() because we do need to "forget" about some tests and platforms in some cases.
For now, delete all v3 model objects and start over in each syncing cycle.
* unit-tests/tools-js-remote-tests.js: Added. Unit tests for the aforementioned changes to RemoteAPI.

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

4 years agoWeb Inspector: protocol generator should emit an error when 'type' is used instead...
bburg@apple.com [Fri, 8 Apr 2016 07:13:28 +0000 (07:13 +0000)]
Web Inspector: protocol generator should emit an error when 'type' is used instead of '$ref'
https://bugs.webkit.org/show_bug.cgi?id=156275
<rdar://problem/25569331>

Reviewed by Darin Adler.

* inspector/protocol/Heap.json: Fix a mistake that's now caught by the protocol generator.

* inspector/scripts/codegen/models.py:
(TypeReference.__init__): Check here if type_kind is on a whitelist of primitive types.
(TypeReference.referenced_name): Update comment.

Add a new test specifically for the case when the type would otherwise be resolved. Rebaseline.

* inspector/scripts/tests/expected/fail-on-type-reference-as-primitive-type.json-error: Added.
* inspector/scripts/tests/expected/fail-on-unknown-type-reference-in-type-declaration.json-error:
* inspector/scripts/tests/fail-on-type-reference-as-primitive-type.json: Added.

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