WebKit-https.git
4 years agoMove 'length' property to the prototype
cdumez@apple.com [Thu, 11 Feb 2016 18:23:25 +0000 (18:23 +0000)]
Move 'length' property to the prototype
https://bugs.webkit.org/show_bug.cgi?id=154051
<rdar://problem/24577385>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/dom/collections/HTMLCollection-supported-property-names-expected.txt:
* web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/nodes/Element-children-expected.txt:
* web-platform-tests/dom/nodes/Element-getElementsByTagName-expected.txt:
* web-platform-tests/dom/nodes/attributes-expected.txt:
* web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Move 'length' property to the prototype, where it should be. We used to
keep it on the instance because our implementation of
getOwnPropertySlot() was wrong for interfaces with a named property
getter. However, our implementation of getOwnPropertySlot() is now
spec-compliant so this should be OK.

Moving 'length' to the prototype is also a little bit risky in terms of
performance, especially for HTMLCollection / NodeList. However, I did
not see an impact on realistic benchmarks like Speedometer and only saw
a small impact (< 5%) on micro-benchmarks. I propose we make our behavior
correct and monitor performance. If we see any benchmark we care about
regress then we should try and optimize while keeping the attribute on
the prototype.

No new tests, already covered by existing tests.

* bindings/js/JSDOMBinding.h:
(WebCore::getStaticValueSlotEntryWithoutCaching):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
(WebCore::JSHTMLDocument::nameGetter): Deleted.
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::putDelegate):
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::deletePropertyByIndex):
(WebCore::JSStorage::putDelegate):
Leverage the new hasStaticPropertyTable static property in the
generated bindings for performance.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
Generate a "hasStaticPropertyTable" static const boolean property
for each bindings class so we can check at build time if
ClassInfo::staticPropHashTable is null.

(AttributeShouldBeOnInstance):
Move "length" to the prototype.

* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.h:
Rebaseline bindings tests.

LayoutTests:

Rebaseline a couple of existing layout tests now that 'length' is
on the prototype.

* fast/dom/htmlcollection-getownpropertynames-expected.txt:
* storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt:

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

4 years agoFix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) after r196281
ossy@webkit.org [Thu, 11 Feb 2016 18:19:02 +0000 (18:19 +0000)]
Fix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) after r196281
https://bugs.webkit.org/show_bug.cgi?id=154035

Reviewed by Antti Koivisto.

Follow-up fix after r196365. Removed guards around slotNodeIndex.

* dom/ComposedTreeIterator.h:
(WebCore::ComposedTreeIterator::Context::Context):

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

4 years agobmalloc: large aligned allocations will put 1 or 2 free object on free list without...
msaboff@apple.com [Thu, 11 Feb 2016 16:01:55 +0000 (16:01 +0000)]
bmalloc: large aligned allocations will put 1 or 2 free object on free list without merging with free neighbors
https://bugs.webkit.org/show_bug.cgi?id=154091

Reviewed by Geoffrey Garen.

If we split off any unused free object in the aligned version of Heap::allocateLarge(), we merge them with
free neighbors before putting them back on the free list.  Added helpers to verify that when we
add LargeObjects to the free list their neighbors are allocated.

* bmalloc/Heap.cpp:
(bmalloc::Heap::allocateLarge): Deleted private helper version and rolled it into the two the
two public versions of allocateLarge().
* bmalloc/Heap.h:
* bmalloc/LargeObject.h:
(bmalloc::LargeObject::prevIsAllocated): New helper.
(bmalloc::LargeObject::nextIsAllocated): New helper.
(bmalloc::LargeObject::merge): Check that the merge object has allocated neighbors.

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

4 years agoBug 154103 - [GTK] Build error after bug 154046
fred.wang@free.fr [Thu, 11 Feb 2016 14:30:54 +0000 (14:30 +0000)]
Bug 154103 - [GTK] Build error after bug 154046
https://bugs.webkit.org/show_bug.cgi?id=154103

Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitUserContent.cpp:
(_WebKitUserStyleSheet::_WebKitUserStyleSheet):
(webkitUserStyleSheetGetUserStyleSheet):
* UIProcess/API/gtk/WebKitUserContentPrivate.h:

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

4 years agoUnreviewed typo fix after r190063.
ossy@webkit.org [Thu, 11 Feb 2016 11:52:56 +0000 (11:52 +0000)]
Unreviewed typo fix after r190063.

* dfg/DFGSpeculativeJIT.cpp: Removed property svn:executable.
* dfg/DFGSpeculativeJIT.h: Removed property svn:executable.
* jit/JIT.h: Removed property svn:executable.
* jit/JITInlines.h: Removed property svn:executable.
* jit/JITOpcodes.cpp: Removed property svn:executable.

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

4 years agoUnreviewed typo fix after r190063.
ossy@webkit.org [Thu, 11 Feb 2016 11:49:51 +0000 (11:49 +0000)]
Unreviewed typo fix after r190063.

* dfg/DFGSpeculativeJIT.cpp: Removed property svn:executable.
* dfg/DFGSpeculativeJIT.h: Removed property svn:executable.
* jit/JIT.h: Removed property svn:executable.
* jit/JITInlines.h: Removed property svn:executable.
* jit/JITOpcodes.cpp: Removed property svn:executable.

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

4 years agoUse Testharness.js for the MathML script tests
fred.wang@free.fr [Thu, 11 Feb 2016 10:40:03 +0000 (10:40 +0000)]
Use Testharness.js for the MathML script tests
https://bugs.webkit.org/show_bug.cgi?id=154065

Reviewed by Darin Adler.

* mathml/opentype/large-operators-munderover-expected.txt:
* mathml/opentype/large-operators-munderover.html:
* mathml/presentation/inferred-mrow-baseline-expected.txt:
* mathml/presentation/inferred-mrow-baseline.html:
* mathml/presentation/inferred-mrow-stretchy-expected.txt:
* mathml/presentation/inferred-mrow-stretchy.html:
* mathml/presentation/stretchy-depth-height-expected.txt:
* mathml/presentation/stretchy-depth-height-symmetric-expected.txt:
* mathml/presentation/stretchy-depth-height-symmetric.html:
* mathml/presentation/stretchy-depth-height.html:

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

4 years agoFix a missing refactoring.
jonlee@apple.com [Thu, 11 Feb 2016 08:11:35 +0000 (08:11 +0000)]
Fix a missing refactoring.

* Animometer/tests/master/resources/multiply.js:
(animate): Move to Utilities.lerp.
(_lerp): Deleted.

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

4 years agoAdd new benchmark tests.
jonlee@apple.com [Thu, 11 Feb 2016 07:42:00 +0000 (07:42 +0000)]
Add new benchmark tests.
https://bugs.webkit.org/show_bug.cgi?id=154063

Provisionally reviewed by Said Abou-Hallawa.

Add tests for get/put image data, filters, opacity, and css transforms.

* Animometer/resources/runner/benchmark-runner.js:
(_runBenchmarkAndRecordResults): Update the body background color to match that of
the stage.
(this._runNextIteration): Clear the background color style for the results page.
* Animometer/resources/runner/tests.js:
* Animometer/tests/master/focus.html: Added.
* Animometer/tests/master/image-data.html: Added.
* Animometer/tests/master/multiply.html: Added.
* Animometer/tests/master/resources/focus.js: Added.
* Animometer/tests/master/resources/image-data.js: Added.
* Animometer/tests/master/resources/multiply.js: Added.
* Animometer/tests/master/resources/stage.css: Move common styles out.
* Animometer/tests/resources/main.js: Update Stage.randomBool to use Math.random.
Add Stage.randomSign for randomly setting a direction. Add the notion of the
current timestamp of the test to Benchmark, since some animations cycle through
colors and rely on an incremental counter like the time.

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

4 years agoSymbol.species accessors on builtin constructors should be configurable
keith_miller@apple.com [Thu, 11 Feb 2016 04:06:37 +0000 (04:06 +0000)]
Symbol.species accessors on builtin constructors should be configurable
https://bugs.webkit.org/show_bug.cgi?id=154097

Reviewed by Benjamin Poulain.

We did not have the Symbol.species accessors on our builtin constructors
marked as configurable. This does not accurately follow the ES6 spec as
the ES6 spec states that all default accessors on builtins should be
configurable. This means that we need an additional watchpoint on
ArrayConstructor to make sure that no users re-configures Symbol.species.

* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::finishCreation):
* runtime/ArrayPrototype.cpp:
(JSC::speciesConstructArray):
(JSC::ArrayPrototype::setConstructor):
(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire):
* runtime/ArrayPrototype.h:
(JSC::ArrayPrototype::didChangeConstructorOrSpeciesProperties):
(JSC::ArrayPrototype::didChangeConstructorProperty): Deleted.
* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSArrayBufferConstructor::finishCreation):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::finishCreation):
* runtime/JSTypedArrayViewConstructor.cpp:
(JSC::JSTypedArrayViewConstructor::finishCreation):
* runtime/MapConstructor.cpp:
(JSC::MapConstructor::finishCreation):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::finishCreation):
* runtime/SetConstructor.cpp:
(JSC::SetConstructor::finishCreation):
* tests/stress/array-species-config-array-constructor.js: Added.
(A):
* tests/stress/symbol-species.js:
(testSymbolSpeciesOnConstructor):

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

4 years ago[JSC] The destination of Sqrt should be Def, not UseDef
benjamin@webkit.org [Thu, 11 Feb 2016 01:35:42 +0000 (01:35 +0000)]
[JSC] The destination of Sqrt should be Def, not UseDef
https://bugs.webkit.org/show_bug.cgi?id=154086

Reviewed by Geoffrey Garen.

An unfortunate copy-paste: the destination of SqrtDouble and SqrtFloat
was defined as UseDef. As a result, the argument would be interfering
with everything defined prior.

* b3/air/AirOpcode.opcodes:

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

4 years agoRemoving deleted tests from ios-simulator TestExpectations
ryanhaddad@apple.com [Thu, 11 Feb 2016 01:18:18 +0000 (01:18 +0000)]
Removing deleted tests from ios-simulator TestExpectations

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoUpdating bindings test reference file for JSTestEventConstructor.cpp after r196400
ryanhaddad@apple.com [Thu, 11 Feb 2016 01:00:38 +0000 (01:00 +0000)]
Updating bindings test reference file for JSTestEventConstructor.cpp after r196400

Unreviewed test gardening.

No new tests needed.

* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::construct):

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

4 years agoWeb Inspector: Add new icon for the Timeline Recording navigation bar item
timothy@apple.com [Thu, 11 Feb 2016 00:52:30 +0000 (00:52 +0000)]
Web Inspector: Add new icon for the Timeline Recording navigation bar item
https://bugs.webkit.org/show_bug.cgi?id=154089
rdar://problem/24595652

Reviewed by Brian Burg.

* UserInterface/Images/Stopwatch.png: Removed.
* UserInterface/Images/Stopwatch@2x.png: Removed.
* UserInterface/Images/Stopwatch.svg: Added.
* UserInterface/Views/TimelineIcons.css:
(.stopwatch-icon .icon): Use Stopwatch.svg.
(body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon): Added for GTK+.

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

4 years agoAdding an ios-simulator expectation for fast/dom/event-handler-attributes.html
ryanhaddad@apple.com [Thu, 11 Feb 2016 00:44:18 +0000 (00:44 +0000)]
Adding an ios-simulator expectation for fast/dom/event-handler-attributes.html
https://bugs.webkit.org/show_bug.cgi?id=153763

Unreviewed test gardening.

* platform/ios-simulator/fast/dom/event-handler-attributes-expected.txt: Added.

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

4 years agoWeb Inspector: Switching actions in Edit Breakpoint popover causes a jerk
mattbaker@apple.com [Thu, 11 Feb 2016 00:32:18 +0000 (00:32 +0000)]
Web Inspector: Switching actions in Edit Breakpoint popover causes a jerk
https://bugs.webkit.org/show_bug.cgi?id=154093
<rdar://problem/24597869>

Reviewed by Timothy Hatcher.

Adjusted CodeMirror eval editor styles to match vanilla input field.

* UserInterface/Views/BreakpointActionView.css:
(.breakpoint-action-eval-editor):

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

4 years agoRemove calls to parseInt in order to work with non-integer revisions
jmarcell@apple.com [Thu, 11 Feb 2016 00:29:26 +0000 (00:29 +0000)]
Remove calls to parseInt in order to work with non-integer revisions
https://bugs.webkit.org/show_bug.cgi?id=153820

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.sourceStampChanges): Remove calls to parseInt in order to work with non-integer
revisions.
(BuildbotIteration.prototype._parseData): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.update): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueueView.js:
(MockBuildbotQueueView.prototype._latestProductiveIteration): Change integers to strings in test code.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js:
(MockTrac.prototype.get oldestRecordedRevisionNumber): Ditto.
(MockTrac.prototype.get latestRecordedRevisionNumber): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js: Ditto.

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

4 years agoTeach dashboard code to compare non-integer revisions
jmarcell@apple.com [Thu, 11 Feb 2016 00:29:24 +0000 (00:29 +0000)]
Teach dashboard code to compare non-integer revisions
https://bugs.webkit.org/show_bug.cgi?id=152345

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.compareIterationsByRevisions): Compare non-integer revisions.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._appendPendingRevisionCount): Use Trac.indexOfRevision in order to compare non-integer
revisions. Also uses new Trac.commitsOnBranchLaterThanRevision method.
(BuildbotQueueView.prototype._popoverLinesForCommitRange): Ditto.
(BuildbotQueueView.prototype._presentPopoverForPendingCommits): Use Trac.indexOfRevision in order to compare non-integer
revisions. Also uses new Trac.nextRevision method to calculate a revision range.
(BuildbotQueueView.prototype._revisionContentWithPopoverForIteration): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
(Trac.prototype._commitsOnBranch): Renamed this to indicate that it should be a private method used by the latter two new
methods.
(Trac.prototype.commitsOnBranchLaterThanRevision): Finds revisions on a branch later than the specified revision.
(Trac.prototype.commitsOnBranchInRevisionRange): Finds revisions on a branch within a specified range.
(Trac.prototype.nextRevision): Finds the next revision after a given revision on a specific branch.
(Trac.prototype.indexOfRevision): Finds the index of a given revision within the recordedCommits array.
(Trac.prototype.commitsOnBranch): Deleted. Renamed to _commitsOnBranch.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js: Added unit tests.

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

4 years agoUpdate "manual" caption track logic
eric.carlson@apple.com [Thu, 11 Feb 2016 00:10:52 +0000 (00:10 +0000)]
Update "manual" caption track logic
https://bugs.webkit.org/show_bug.cgi?id=154084
<rdar://problem/24530516>

Reviewed by Dean Jackson.

No new tests, media/track/track-manual-mode.html was updated.

* English.lproj/Localizable.strings: Add new string.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::addTextTrack): track.setManualSelectionMode is no more.
(WebCore::HTMLMediaElement::configureTextTrackGroup): Never enable a track automatically when
  in manual selection mode.
(WebCore::HTMLMediaElement::captionPreferencesChanged):  track.setManualSelectionMode is no more.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::containsOnlyForcedSubtitles): Return true for forced tracks.
(WebCore::TextTrack::kind): Deleted.
* html/track/TextTrack.h:

* html/track/TrackBase.h:
(WebCore::TrackBase::kind): De-virtualize, nobody overrides it.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::trackDisplayName): Include "forced" in the name of forced tracks.

* platform/LocalizedStrings.cpp:
(WebCore::forcedTrackMenuItemText): New.
* platform/LocalizedStrings.h:

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

4 years agoRename *Event::create* which creates events for bindings to *Event::createForBindings...
jiewen_tan@apple.com [Thu, 11 Feb 2016 00:03:11 +0000 (00:03 +0000)]
Rename *Event::create* which creates events for bindings to *Event::createForBindings* and cleanup corresponding paths
https://bugs.webkit.org/show_bug.cgi?id=153903
<rdar://problem/24518146>

Reviewed by Darin Adler.

Source/WebCore:

Rename Event::create(const AtomicString&, const EventInit&) to Event::createForBindings
(const AtomicString&, const EventInit&) and for all the subclasses as well in order to
support Event.isTrusted. Besides, some of the subclasses use the create method for bindings
to create events not for bindings and vice versa. Therefore, this patch also cleanup
corresponding paths to ensure no misuse of the create mehtod. The same for Event::create()
as it is combined with Event::initEvent to create an event for bindings for legacy content.

After this patch, all call sites of *Event::create* are supposed to use *Event::create
to create events for user agent and *Event::createForBindings for bindings.

No change in behavior.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::create):
(WebCore::WebKitPlaybackTargetAvailabilityEvent::createForBindings):
(WebCore::WebKitPlaybackTargetAvailabilityEventInit::WebKitPlaybackTargetAvailabilityEventInit): Deleted.
* Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
(WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent):
(WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Deleted.
* Modules/encryptedmedia/MediaKeyMessageEvent.h:
(WebCore::MediaKeyMessageEvent::create):
(WebCore::MediaKeyMessageEvent::createForBindings):
* Modules/encryptedmedia/MediaKeyNeededEvent.cpp:
(WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent):
(WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Deleted.
* Modules/encryptedmedia/MediaKeyNeededEvent.h:
(WebCore::MediaKeyNeededEvent::create):
(WebCore::MediaKeyNeededEvent::createForBindings):
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::sendMessage):
* Modules/gamepad/GamepadEvent.h:
(WebCore::GamepadEvent::create):
(WebCore::GamepadEvent::createForBindings):
(WebCore::GamepadEventInit::GamepadEventInit): Deleted.
* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEvent::createForBindings):
(WebCore::UIRequestEvent::UIRequestEvent):
(WebCore::UIRequestEventInit::UIRequestEventInit): Deleted.
(WebCore::UIRequestEvent::create): Deleted.
* Modules/indieui/UIRequestEvent.h:
* Modules/mediastream/MediaStreamEvent.cpp:
(WebCore::MediaStreamEvent::createForBindings):
(WebCore::MediaStreamEventInit::MediaStreamEventInit): Deleted.
(WebCore::MediaStreamEvent::create): Deleted.
* Modules/mediastream/MediaStreamEvent.h:
* Modules/mediastream/MediaStreamTrackEvent.cpp:
(WebCore::MediaStreamTrackEvent::createForBindings):
(WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit): Deleted.
(WebCore::MediaStreamTrackEvent::create): Deleted.
* Modules/mediastream/MediaStreamTrackEvent.h:
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
(WebCore::RTCDTMFToneChangeEvent::createForBindings):
(WebCore::RTCDTMFToneChangeEvent::create): Deleted.
* Modules/mediastream/RTCDTMFToneChangeEvent.h:
* Modules/mediastream/RTCDataChannelEvent.cpp:
(WebCore::RTCDataChannelEvent::createForBindings):
(WebCore::RTCDataChannelEvent::create): Deleted.
* Modules/mediastream/RTCDataChannelEvent.h:
* Modules/mediastream/RTCIceCandidateEvent.cpp:
(WebCore::RTCIceCandidateEvent::createForBindings):
(WebCore::RTCIceCandidateEvent::create): Deleted.
* Modules/mediastream/RTCIceCandidateEvent.h:
* Modules/mediastream/RTCTrackEvent.cpp:
(WebCore::RTCTrackEvent::createForBindings):
(WebCore::RTCTrackEventInit::RTCTrackEventInit): Deleted.
(WebCore::RTCTrackEvent::create): Deleted.
* Modules/mediastream/RTCTrackEvent.h:
* Modules/speech/SpeechSynthesisEvent.cpp:
(WebCore::SpeechSynthesisEvent::createForBindings):
(WebCore::SpeechSynthesisEvent::create):
(WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent):
* Modules/speech/SpeechSynthesisEvent.h:
* Modules/webaudio/AudioProcessingEvent.cpp:
(WebCore::AudioProcessingEvent::create): Deleted.
* Modules/webaudio/AudioProcessingEvent.h:
(WebCore::AudioProcessingEvent::create):
(WebCore::AudioProcessingEvent::createForBindings):
* Modules/webaudio/OfflineAudioCompletionEvent.cpp:
(WebCore::OfflineAudioCompletionEvent::createForBindings):
(WebCore::OfflineAudioCompletionEvent::create): Deleted.
* Modules/webaudio/OfflineAudioCompletionEvent.h:
* Modules/websockets/CloseEvent.h:
(WebCore::CloseEvent::create):
(WebCore::CloseEvent::createForBindings):
(WebCore::CloseEvent::CloseEvent):
(WebCore::CloseEventInit::CloseEventInit): Deleted.
* bindings/objc/DOM.mm:
(-[DOMNode nextFocusNode]):
(-[DOMNode previousFocusNode]):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* dom/AnimationEvent.cpp:
(WebCore::AnimationEventInit::AnimationEventInit): Deleted.
* dom/AnimationEvent.h:
* dom/BeforeLoadEvent.h:
(WebCore::BeforeLoadEventInit::BeforeLoadEventInit): Deleted.
* dom/ClipboardEvent.h:
* dom/CompositionEvent.cpp:
(WebCore::CompositionEventInit::CompositionEventInit): Deleted.
* dom/CompositionEvent.h:
* dom/CustomEvent.cpp:
(WebCore::CustomEventInit::CustomEventInit): Deleted.
* dom/CustomEvent.h:
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationEvent.h:
* dom/Document.cpp:
(WebCore::Document::createEvent):
* dom/Element.cpp:
(WebCore::Element::dispatchMouseEvent):
* dom/ErrorEvent.cpp:
(WebCore::ErrorEventInit::ErrorEventInit): Deleted.
* dom/ErrorEvent.h:
* dom/Event.cpp:
(WebCore::EventInit::EventInit): Deleted.
* dom/Event.h:
(WebCore::Event::createForBindings):
(WebCore::Event::create): Deleted.
* dom/FocusEvent.cpp:
(WebCore::FocusEventInit::FocusEventInit): Deleted.
* dom/FocusEvent.h:
* dom/HashChangeEvent.h:
(WebCore::HashChangeEventInit::HashChangeEventInit): Deleted.
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEvent::KeyboardEvent):
(WebCore::KeyboardEventInit::KeyboardEventInit): Deleted.
* dom/KeyboardEvent.h:
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEventInit::MessageEventInit): Deleted.
* dom/MessageEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::createForBindings):
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::cloneFor):
(WebCore::MouseEventInit::MouseEventInit): Deleted.
* dom/MouseEvent.h:
(WebCore::MouseEvent::createForBindings):
(WebCore::MouseEvent::create): Deleted.
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
(WebCore::MouseRelatedEvent::init):
* dom/MouseRelatedEvent.h:
(WebCore::MouseRelatedEvent::screenX):
(WebCore::MouseRelatedEvent::screenY):
(WebCore::MouseRelatedEvent::screenLocation):
(WebCore::MouseRelatedEvent::clientX):
(WebCore::MouseRelatedEvent::clientY):
(WebCore::MouseRelatedEvent::movementX):
(WebCore::MouseRelatedEvent::movementY):
(WebCore::MouseRelatedEvent::clientLocation):
(WebCore::MouseRelatedEvent::isSimulated):
(WebCore::MouseRelatedEvent::absoluteLocation):
(WebCore::MouseRelatedEvent::setAbsoluteLocation):
* dom/MutationEvent.h:
* dom/OverflowEvent.cpp:
(WebCore::OverflowEvent::OverflowEvent):
(WebCore::OverflowEvent::initOverflowEvent):
(WebCore::OverflowEventInit::OverflowEventInit): Deleted.
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.cpp:
(WebCore::PageTransitionEventInit::PageTransitionEventInit): Deleted.
* dom/PageTransitionEvent.h:
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::createForBindings):
(WebCore::PopStateEventInit::PopStateEventInit): Deleted.
(WebCore::PopStateEvent::PopStateEvent): Deleted.
(WebCore::PopStateEvent::create): Deleted.
* dom/PopStateEvent.h:
* dom/ProgressEvent.cpp:
(WebCore::ProgressEventInit::ProgressEventInit): Deleted.
* dom/ProgressEvent.h:
(WebCore::ProgressEvent::createForBindings):
(WebCore::ProgressEvent::create): Deleted.
* dom/SecurityPolicyViolationEvent.h:
(WebCore::SecurityPolicyViolationEventInit::SecurityPolicyViolationEventInit): Deleted.
* dom/TextEvent.cpp:
(WebCore::TextEvent::createForBindings):
(WebCore::TextEvent::create): Deleted.
* dom/TextEvent.h:
* dom/TouchEvent.h:
* dom/TransitionEvent.cpp:
(WebCore::TransitionEventInit::TransitionEventInit): Deleted.
* dom/TransitionEvent.h:
* dom/UIEvent.cpp:
(WebCore::UIEventInit::UIEventInit): Deleted.
* dom/UIEvent.h:
(WebCore::UIEvent::createForBindings):
(WebCore::UIEvent::create): Deleted.
* dom/UIEventWithKeyState.h:
(WebCore::UIEventWithKeyState::ctrlKey):
(WebCore::UIEventWithKeyState::shiftKey):
(WebCore::UIEventWithKeyState::altKey):
(WebCore::UIEventWithKeyState::metaKey):
(WebCore::UIEventWithKeyState::UIEventWithKeyState):
* dom/WebKitAnimationEvent.cpp:
(WebCore::WebKitAnimationEventInit::WebKitAnimationEventInit): Deleted.
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.cpp:
(WebCore::WebKitTransitionEventInit::WebKitTransitionEventInit): Deleted.
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerKeyAdded):
(WebCore::HTMLMediaElement::mediaPlayerKeyError):
(WebCore::HTMLMediaElement::mediaPlayerKeyMessage):
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
* html/MediaKeyEvent.cpp:
(WebCore::MediaKeyEvent::MediaKeyEvent):
(WebCore::MediaKeyEventInit::MediaKeyEventInit): Deleted.
* html/MediaKeyEvent.h:
* html/canvas/WebGLContextEvent.cpp:
(WebCore::WebGLContextEventInit::WebGLContextEventInit): Deleted.
* html/canvas/WebGLContextEvent.h:
* html/track/TrackEvent.cpp:
(WebCore::TrackEvent::TrackEvent):
(WebCore::TrackEventInit::TrackEventInit): Deleted.
* html/track/TrackEvent.h:
* html/track/TrackListBase.cpp:
(TrackListBase::scheduleTrackEvent):
(TrackListBase::scheduleChangeEvent):
* page/EventSource.cpp:
(WebCore::EventSource::createMessageEvent):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):
(WebCore::gatherSecurityPolicyViolationEventData): Deleted.
* storage/StorageEvent.cpp:
(WebCore::StorageEvent::createForBindings):
(WebCore::StorageEventInit::StorageEventInit): Deleted.
(WebCore::StorageEvent::create): Deleted.
* storage/StorageEvent.h:
* svg/SVGZoomEvent.h:
(WebCore::SVGZoomEvent::createForBindings):
(WebCore::SVGZoomEvent::create): Deleted.
* xml/XMLHttpRequestProgressEvent.h:
(WebCore::XMLHttpRequestProgressEvent::createForBindings):
(WebCore::XMLHttpRequestProgressEvent::create): Deleted.

Source/WebKit2:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::nextAssistableElement):

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

4 years agoAdd SPI to remove individual user scripts or user style sheets
andersca@apple.com [Wed, 10 Feb 2016 23:57:30 +0000 (23:57 +0000)]
Add SPI to remove individual user scripts or user style sheets
https://bugs.webkit.org/show_bug.cgi?id=154046
rdar://problem/23596352

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _removeUserScript:]):
(-[WKUserContentController _userStyleSheets]):
(-[WKUserContentController _addUserStyleSheet:]):
(-[WKUserContentController _removeUserStyleSheet:]):
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::removeUserScript):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::userStyleSheets):
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::removeUserScript):
(WebKit::WebUserContentController::removeUserStyleSheet):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:

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

4 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Wed, 10 Feb 2016 23:31:41 +0000 (23:31 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after 196392

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

4 years agoChanged WTFCrash to not trash the crash site register state.
mark.lam@apple.com [Wed, 10 Feb 2016 23:02:24 +0000 (23:02 +0000)]
Changed WTFCrash to not trash the crash site register state.
https://bugs.webkit.org/show_bug.cgi?id=153996

Reviewed by Geoffrey Garen.

When doing post-mortem crash site analysis using data from crash reports, it is
immensely valuable to be able to infer the crashing program's state from the
register values at crash time.  However, for RELEASE_ASSERT failures, we crash
using WTFCrash(), and WTFCrash() is currently implemented as a function call
that, in turn, calls a lot of other functions to do crash handling before
actually crashing.  As a result, the register values captured in the crash
reports are not likely to still contain the values used by the caller function
that failed the RELEASE_ASSERT.

This patch aims to remedy this issue for non-debug builds on OS(DARWIN) ports.
It does so by changing WTFCrash() into an inlined function that has an inlined
asm statement to issues the CPU specific breakpoint trap instruction.  As a
result, for non-debug OS(DARWIN) builds, crashes due to failed RELEASE_ASSERTs
will now show up in crash reports as crashing due to EXC_BREAKPOINT (SIGTRAP)
instead of a EXC_BAD_ACCESS (SIGSEGV) on address 0xbbadbeef.

For debug and non-DARWIN builds, WTFCrash() behavior currently remains unchanged.

* wtf/Assertions.cpp:
* wtf/Assertions.h:

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

4 years agoRebaselining bindings tests
ryanhaddad@apple.com [Wed, 10 Feb 2016 22:50:12 +0000 (22:50 +0000)]
Rebaselining bindings tests

Unreviewed test gardening.

No new tests needed.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCallback.cpp:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:

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

4 years agoWebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture: should assert...
mark.lam@apple.com [Wed, 10 Feb 2016 22:16:58 +0000 (22:16 +0000)]
WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture: should assert that it is being called from the "main" thread.
https://bugs.webkit.org/show_bug.cgi?id=154059

Reviewed by Geoffrey Garen.

This makes it so that misbehaving clients which call it (indirectly) from another
thread (not the main thread) will fail faster.  Otherwise, we get potential
memory corruption that results in strange crashes elsewhere later.

* WebView/WebFrame.mm:
(-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):

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

4 years ago[cmake] Consolidate CMake code related to image decoders.
commit-queue@webkit.org [Wed, 10 Feb 2016 22:01:18 +0000 (22:01 +0000)]
[cmake] Consolidate CMake code related to image decoders.
https://bugs.webkit.org/show_bug.cgi?id=154074

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-02-10
Reviewed by Alex Christensen.

Common image decoder sources, includes and libs are moved to
platform/ImageDecoders.cmake.

Also, added include directories of libjpeg and libpng to
WebCore_SYSTEM_INCLUDE_DIRECTORIES.

No new tests needed.

* CMakeLists.txt: Moved common include paths to ImageDecoders.cmake.
* PlatformEfl.cmake: Moved common sources and libs to ImageDecoders.cmake.
* PlatformGTK.cmake: Ditto.
* PlatformWinCairo.cmake: Moved common sources to ImageDecoders.cmake.
* platform/ImageDecoders.cmake: Added.

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

4 years agoCSSSegmentedFontFace does not need to be reference counted
mmaxfield@apple.com [Wed, 10 Feb 2016 21:57:53 +0000 (21:57 +0000)]
CSSSegmentedFontFace does not need to be reference counted
https://bugs.webkit.org/show_bug.cgi?id=154083

Reviewed by Antti Koivisto.

...There is only ever a single reference to one.

No new tests because there is no behavior change.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::getFontFace):
* css/CSSFontSelector.h:
* css/CSSSegmentedFontFace.h:
(WebCore::CSSSegmentedFontFace::create): Deleted.

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

4 years ago[Web IDL] interface objects should be Function objects
cdumez@apple.com [Wed, 10 Feb 2016 21:51:18 +0000 (21:51 +0000)]
[Web IDL] interface objects should be Function objects
https://bugs.webkit.org/show_bug.cgi?id=154038
<rdar://problem/24569358>

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing. Some checks still
fail because a lot of our interfaces should inherit EventTarget and
currently don't (they duplicate the EventTarget API instead).

Also, as per WebIDL, window.NodeFilter's proto should be ObjectPrototype
instead of FunctionPrototype but this is an exceptional case and our new
behavior is consistent with Firefox and Chrome.

* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/dom/events/Event-constructors-expected.txt:
* web-platform-tests/dom/historical-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/fetch/api/headers/headers-idl-expected.txt:
* web-platform-tests/fetch/api/request/request-idl-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-audio-element/audio_constructor-expected.txt:

Source/JavaScriptCore:

Update functionProtoFuncToString() to handle JSObjects that
have the TypeOfShouldCallGetCallData flag and are callable,
as these behave like functions and use ClassInfo::className()
as function name in this case.

* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):

Source/WebCore:

interface objects should be Function objects as per Web IDL:
- http://heycam.github.io/webidl/#interface-object
- http://heycam.github.io/webidl/#es-interfaces

So window.Event should be a Function object for e.g. but in WebKit it
is a regular EventConstructor JSObject.
Firefox and Chrome match the specification.

Test: js/interface-objects.html

* bindings/js/JSDOMBinding.cpp:
(WebCore::callThrowTypeError):
(WebCore::DOMConstructorObject::getCallData):
When calling the interface object as a function, we throw a TypeError
with a message asking to use the 'new' operator to match the behavior
of Firefox and Chrome.

* bindings/js/JSDOMBinding.h:
Add JSC::TypeOfShouldCallGetCallData structure flag and implement
getCallData() so that typeof returns "function", as per the
specification and the behavior of other browsers.

(WebCore::DOMConstructorObject::className):
Implement className() and return "Function" to match the specification and
other browsers. Otherwise, it would fall back to using ClassInfo::className
which os the function name and interface name (e.g. "Event").

* bindings/js/JSDOMConstructor.h:
(WebCore::JSDOMConstructorNotConstructable::callThrowTypeError):
(WebCore::JSDOMConstructorNotConstructable::getCallData):
As per the specification, interfaces that do not have a [Constructor]
should throw a TypeError when called as a function. Use the "Illegal
constructor" error message to match Firefox and Chrome.

* bindings/js/JSDOMGlobalObject.h:
(WebCore::getDOMConstructor):
Instead of using objectPrototype as prototype for all DOM constructors,
we now call the prototypeForStructure() static function that is
generated for each bindings class. As per the Web IDL specification,
The [[Prototype]] internal property of an interface object for a
non-callback interface is determined as follows:
1. If the interface inherits from some other interface, the value of
   [[Prototype]] is the interface object for that other interface.
2. If the interface doesn't inherit from any other interface, the value
   of [[Prototype]] is %FunctionPrototype% ([ECMA-262], section 6.1.7.4).

* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::prototypeForStructure):
Have the Image's interface object use HTMLElement's interface object
as prototype as HTMLImageElement inherits HTMLElement.

* bindings/scripts/CodeGenerator.pm:
(getInterfaceExtendedAttributesFromName):
Add a utility function to cheaply retrieve an interface's IDL extended
attributes without actually parsing the IDL. This is used to check if
an interface's parent is marked as [NoInterfaceObject] currently.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
Mark JSGlobalObject* parameter as const as the implementation does not
alter the globalObject.

(GenerateConstructorHelperMethods):
- Generate prototypeForStructure() function for each bindings class that
  is not marked as [NoInterfaceObject] so getDOMConstructor() knows which
  prototype to use for the interface object / constructor when constructing
  it.
- Use the interface name for the interface object, without the "Constructor"
  suffix, to match the behavior of Firefox and Chrome.

* bindings/scripts/test/*:
Rebaseline bindings tests.

LayoutTests:

Rebaseline / update existing layout tests now that interface objects
are now Function objects. Also add a layout test to cover various
aspects of interface objects.

* css3/blending/background-blend-mode-property-parsing-expected.txt:
* css3/blending/blend-mode-property-parsing-expected.txt:
* css3/blending/script-tests/background-blend-mode-property-parsing.js:
(shouldBeType):
* css3/blending/script-tests/blend-mode-property-parsing.js:
(shouldBeType):
* css3/filters/backdrop/backdropfilter-property-parsing-expected.txt:
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js:
(shouldBeType):
* css3/filters/filter-property-parsing-expected.txt:
* css3/filters/script-tests/filter-property-parsing.js:
(shouldBeType):
* fast/css/image-set-parsing-expected.txt:
* fast/css/script-tests/image-set-parsing.js:
(shouldBeType):
* fast/dom/DOMException/XPathException-expected.txt:
* fast/dom/DOMException/prototype-object-expected.txt:
* fast/dom/DOMException/prototype-object.html:
* fast/dom/DOMException/resources/XPathException.js:
* fast/dom/MutationObserver/mutation-record-constructor-expected.txt:
* fast/dom/MutationObserver/mutation-record-constructor.html:
* fast/dom/Window/element-constructors-on-window-expected.txt:
* fast/dom/call-a-constructor-as-a-function-expected.txt:
* fast/dom/constructor-proto-expected.txt:
* fast/dom/constructor-proto.html:
* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* fast/mediastream/MediaStreamConstructor-expected.txt:
* fast/mediastream/MediaStreamConstructor.html:
* fast/workers/constructor-proto-expected.txt:
* fast/workers/worker-location-expected.txt:
* http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt:
* http/tests/xmlhttprequest/XMLHttpRequestException.html:
* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* js/dom/script-tests/global-constructors-attributes-idb.js:
(constructorPropertiesOnGlobalObject):
* js/dom/script-tests/global-constructors-attributes.js:
(constructorPropertiesOnGlobalObject):
* js/interface-objects-expected.txt: Added.
* js/interface-objects.html: Added.
* media/encrypted-media/encrypted-media-v2-syntax-expected.txt:
* media/encrypted-media/encrypted-media-v2-syntax.html:
* media/track/track-vttcue-expected.txt:
* platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* svg/custom/SVGException-expected.txt:
* svg/custom/global-constructors-expected.txt:
* svg/custom/script-tests/SVGException.js:
* svg/custom/script-tests/global-constructors.js:
(shouldBeDefined):
* transforms/2d/transform-value-types-expected.txt:
* transforms/2d/transform-value-types.html:

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

4 years ago[Mac] Graphical corruption in videos when enabling custom loading path
jer.noble@apple.com [Wed, 10 Feb 2016 21:45:12 +0000 (21:45 +0000)]
[Mac] Graphical corruption in videos when enabling custom loading path
https://bugs.webkit.org/show_bug.cgi?id=154044

Reviewed by Alex Christensen.

Revert the "Drive-by fix" in r196345 as it breaks the WebCoreNSURLSessionTests.BasicOperation API test.

* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask resource:receivedData:length:]):

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

4 years agoRemoved the duplicated definition of ChartPaneBase.
rniwa@webkit.org [Wed, 10 Feb 2016 21:18:02 +0000 (21:18 +0000)]
Removed the duplicated definition of ChartPaneBase.

* public/v3/components/chart-pane-base.js:

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

4 years agoMarking fast/css-generated-content/details-summary-before-after.html as failing on...
ryanhaddad@apple.com [Wed, 10 Feb 2016 21:10:37 +0000 (21:10 +0000)]
Marking fast/css-generated-content/details-summary-before-after.html as failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=153029

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoCSSSegmentedFontFace does not need to be reference counted
mmaxfield@apple.com [Wed, 10 Feb 2016 21:07:59 +0000 (21:07 +0000)]
CSSSegmentedFontFace does not need to be reference counted
https://bugs.webkit.org/show_bug.cgi?id=154083

Reviewed by Antti Koivisto.

...There is only ever a single reference to one.

No new tests because there is no behavior change.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::getFontFace):
* css/CSSFontSelector.h:
* css/CSSSegmentedFontFace.h:
(WebCore::CSSSegmentedFontFace::create): Deleted.

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

4 years agoAnalysis task page on v3 UI should show charts
rniwa@webkit.org [Wed, 10 Feb 2016 21:07:52 +0000 (21:07 +0000)]
Analysis task page on v3 UI should show charts
https://bugs.webkit.org/show_bug.cgi?id=154057

Reviewed by Chris Dumez.

Extracted ChartPaneBase out of ChartPane and added an instance of its new subclass, AnalysisTaskChartPane,
to the analysis task page. The main difference is that ChartPaneBase doesn't depend on the presence of
this._chartsPage unlike ChartPane. It also doesn't have the header with toolbar (to show breakdown, etc...).

* public/v3/components/base.js:
(ComponentBase.prototype._constructShadowTree): Call htmlTemplate() and cssTemplate() with the right "this".

* public/v3/components/chart-pane-base.js: Added.
(ChartPaneBase): Extracted from ChartPane.
(ChartPaneBase.prototype.configure): Extracted from the constructor. Separating this function allows the
component to be instantiated inside a HTML template.
(ChartPaneBase.prototype._fetchAnalysisTasks): Moved from ChartPane._fetchAnalysisTasks.
(ChartPaneBase.prototype.platformId): Ditto.
(ChartPaneBase.prototype.metricId): Ditto.
(ChartPaneBase.prototype.setOverviewDomain): Ditto.
(ChartPaneBase.prototype.setMainDomain): Ditto.
(ChartPaneBase.prototype._overviewSelectionDidChange): Extracted from the constructor. This is overridden in
ChartPane and unused in AnalysisTaskChartPane.
(ChartPaneBase.prototype._mainSelectionDidChange): Extracted from ChartPane._mainSelectionDidChange.
(ChartPaneBase.prototype._mainSelectionDidZoom): Extracted from ChartPane._mainSelectionDidZoom.
(ChartPaneBase.prototype._indicatorDidChange): Extracted from ChartPane._indicatorDidChange.
(ChartPaneBase.prototype._didFetchData): Moved from ChartPane._fetchAnalysisTasks.
(ChartPaneBase.prototype._openAnalysisTask): Ditto.
(ChartPaneBase.prototype._openCommitViewer): Ditto. Also fixed a bug that we don't show the spinner while
waiting for the data to be fetched by calling this.render() here.
(ChartPaneBase.prototype._keyup): Moved from ChartPane._keyup. Also fixed the bug that the revisions list
doesn't update by calling this.render() here.
(ChartPaneBase.prototype.render): Extracted from ChartPane.render.
(ChartPaneBase.htmlTemplate): Extracted from ChartPane.htmlTemplate.
(ChartPaneBase.paneHeaderTemplate): Added. This is overridden in ChartPane and unused in AnalysisTaskChartPane.
(ChartPaneBase.cssTemplate): Extracted from ChartPane.htmlTemplate.

* public/v3/components/chart-styles.js: Renamed from public/v3/pages/page-with-charts.js.
(PageWithCharts): Renamed from PageWithCharts since it no longer extends PageWithHeading.
(ChartStyles.createChartSourceList):

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype.view): Set this._repository right away instead of waiting for the fetched data
so that spinner will be shown while the data is being fetched.

* public/v3/index.html:

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane): Added extends ChartPaneBase.
(AnalysisTaskPage): Added. this._chartPane.
(AnalysisTaskPage.prototype._didFetchTask): Initialize this._chartPane with a domain.
(AnalysisTaskPage.prototype.render): Render this._chartPane.
(AnalysisTaskPage.htmlTemplate):

* public/v3/pages/chart-pane-status-view.js:
(ChartPaneStatusView): Removed the unused router from the argument list.
(ChartPaneStatusView.prototype.pointsRangeForAnalysis): Renamed from analyzeData() since it was ambiguous.
(ChartPaneStatusView.prototype.moveRepositoryWithNotification): Fixed the bug that we don't update the list
of the revisions here.
(ChartPaneStatusView.prototype.computeChartStatusLabels):

* public/v3/pages/chart-pane.js:
(ChartPane): Now extends ChartPaneBase.
(ChartPane.prototype._overviewSelectionDidChange): Extracted from the constructor.
(ChartPane.prototype._mainSelectionDidChange):
(ChartPane.prototype._mainSelectionDidZoom):
(ChartPane.prototype._indicatorDidChange):
(ChartPane.prototype.render):
(ChartPane.prototype._renderActionToolbar):
(ChartPane.paneHeaderTemplate): Extracted from htmlTemplate.
(ChartPane.cssTemplate):
(ChartPane.overviewOptions.selection.onchange): Deleted.
(ChartPane.prototype._fetchAnalysisTasks): Deleted.
(ChartPane.prototype.platformId): Deleted.
(ChartPane.prototype.metricId): Deleted.
(ChartPane.prototype.setOverviewDomain): Deleted.
(ChartPane.prototype.setMainDomain): Deleted.
(ChartPane.prototype._openCommitViewer): Deleted.
(ChartPane.prototype._didFetchData): Deleted.
(ChartPane.prototype._keyup): Deleted.

* public/v3/pages/charts-page.js:
(ChartsPage):
(ChartsPage.createDomainForAnalysisTask): Extracted by createDomainForAnalysisTask; used to set the domain
of the charts in the analysis task page.
(ChartsPage.createStateForAnalysisTask):

* public/v3/pages/dashboard-page.js:
(DashboardPage):
(DashboardPage.prototype._createChartForCell):

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

4 years agoAdd the support for maintenance mode
rniwa@webkit.org [Wed, 10 Feb 2016 21:05:37 +0000 (21:05 +0000)]
Add the support for maintenance mode
https://bugs.webkit.org/show_bug.cgi?id=154072

Reviewed by Chris Dumez.

Added the crude support for maintenance mode whereby which the reports are stored in the filesystem
instead of the database.

* config.json: Added maintenanceMode and maintenanceDirectory as well as forgotten siteTitle and
remoteServer.httpdMutexDir.
* public/api/report.php:
(main): Don't connect to the database or modify database when maintenanceMode is set.
* public/include/json-header.php:
(ensure_privileged_api_data): Exit with InMaintenanceMode when maintenanceMode is set. This prevents
privileged API such as creating analysis tasks and new A/B testing groups from modifying the database.

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

4 years agoReaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Wed, 10 Feb 2016 20:56:26 +0000 (20:56 +0000)]
Reaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after r196374

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

4 years agoFix assertions when loading from WebProcess
achristensen@apple.com [Wed, 10 Feb 2016 20:56:11 +0000 (20:56 +0000)]
Fix assertions when loading from WebProcess
https://bugs.webkit.org/show_bug.cgi?id=154079

Reviewed by Anders Carlsson.

Assertions were failing, mostly when using NetworkProcess, and mostly involving Top Sites.
When we do loading from the WebProcess (which we should eventually not allow), we were sometimes
using a private browsing session that did not exist because the UIProcess had told the NetworkProcess
to create a private browsing session with the given SessionID, but the WebProcess was not told about
the private browsing session.
Also, sometimes we were calling NetworkProcess::singleton() from the WebProcess, which caused problems
with the PlatformStrategies object being reset.  This prevents that, too.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
Added an assertion that we have a network session when we have just made a NetworkingContext with the given SessionID.
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
Call NetworkProcess::singleton only when we know we are in the network process.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
Tell the WebProcesses about the new private session, too.  Sometimes they use the new private session.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensurePrivateBrowsingSession):
(WebKit::WebProcess::destroyPrivateBrowsingSession):
Removed useless macros that were always true for all WK2 clients.

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

4 years agoOptimize style invalidation after class attribute change
antti@apple.com [Wed, 10 Feb 2016 20:47:04 +0000 (20:47 +0000)]
Optimize style invalidation after class attribute change
https://bugs.webkit.org/show_bug.cgi?id=154075
rdar://problem/12526450

Reviewed by Andreas Kling.

Currently a class attribute change invalidates style for the entire element subtree for any class found in the
active stylesheet set.

This patch optimizes class changes by building a new optimization structure called ancestorClassRules. It contains
rules that have class selectors in the portion of the complex selector that matches ancestor elements. The sets
of rules are hashes by the class name.

On class attribute change the existing StyleInvalidationAnalysis mechanism is used with ancestorClassRules to invalidate
exactly those descendants that are affected by the addition or removal of the class name. This is fast because the CSS JIT
makes selector matching cheap and the number of relevant rules is typically small.

This optimization is very effective on many dynamic pages. For example when focusing and unfocusing the web inspector it
cuts down the number of resolved elements from ~1000 to ~50. Even in PLT it reduces the number of resolved elements by ~11%.

* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::collectFeatures):
(WebCore::DocumentRuleSets::ancestorClassRules):

    Create optimization RuleSets on-demand when there is an actual dynamic class change.

* css/DocumentRuleSets.h:
(WebCore::DocumentRuleSets::features):
(WebCore::DocumentRuleSets::sibling):
(WebCore::DocumentRuleSets::uncommonAttribute):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ElementRuleCollector):

    Add a new constructor that doesn't requires DocumentRuleSets. Only the user and author style is required.

(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchUserRules):
* css/ElementRuleCollector.h:
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):

    Collect class names that show up in the ancestor portion of the selector.
    Make this a member.

(WebCore::RuleFeatureSet::collectFeatures):

    Move this code from RuleData.
    Add the rule to ancestorClassRules if needed.

(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
(WebCore::RuleFeatureSet::shrinkToFit):
(WebCore::recursivelyCollectFeaturesFromSelector): Deleted.
(WebCore::RuleFeatureSet::collectFeaturesFromSelector): Deleted.
* css/RuleFeature.h:
(WebCore::RuleFeature::RuleFeature):
(WebCore::RuleFeatureSet::RuleFeatureSet): Deleted.
* css/RuleSet.cpp:
(WebCore::RuleData::RuleData):
(WebCore::RuleSet::RuleSet):
(WebCore::RuleSet::~RuleSet):
(WebCore::RuleSet::addToRuleSet):
(WebCore::RuleSet::addRule):
(WebCore::RuleSet::addRulesFromSheet):
(WebCore::collectFeaturesFromRuleData): Deleted.
* css/RuleSet.h:
(WebCore::RuleSet::tagRules):
(WebCore::RuleSet::RuleSet): Deleted.
* css/StyleInvalidationAnalysis.cpp:
(WebCore::shouldDirtyAllStyle):
(WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):

    Add a new constructor that takes a ready made RuleSet instead of a stylesheet.

(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
(WebCore::StyleInvalidationAnalysis::invalidateStyleForTree):
(WebCore::StyleInvalidationAnalysis::invalidateStyle):
(WebCore::StyleInvalidationAnalysis::invalidateStyle):

    New function for invalidating a subtree instead of the whole document.

* css/StyleInvalidationAnalysis.h:
(WebCore::StyleInvalidationAnalysis::dirtiesAllStyle):
(WebCore::StyleInvalidationAnalysis::hasShadowPseudoElementRulesInAuthorSheet):
* dom/Element.cpp:
(WebCore::classStringHasClassName):
(WebCore::collectClasses):
(WebCore::computeClassChange):

    Factor to return the changed classes.

(WebCore::invalidateStyleForClassChange):

    First filter out classes that don't show up in stylesheets. If something remains invalidate the current
    element for inline style change (that is a style change that doesn't affect descendants).

    Next check if there are any ancestorClassRules for the changed class. If so use the StyleInvalidationAnalysis
    to find any affected descendants and invalidate them with inline style change as well.

(WebCore::Element::classAttributeChanged):

    Invalidate for removed classes before setting new attribute value, invalidate for added classes afterwards.

(WebCore::Element::absoluteLinkURL):
(WebCore::checkSelectorForClassChange): Deleted.
* dom/ElementData.h:
(WebCore::ElementData::setClassNames):
(WebCore::ElementData::classNames):
(WebCore::ElementData::classNamesMemoryOffset):
(WebCore::ElementData::clearClass): Deleted.
(WebCore::ElementData::setClass): Deleted.

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

4 years agoAdd internal benchmark tests for CSS mix-blend-modes and filters
said@apple.com [Wed, 10 Feb 2016 20:45:01 +0000 (20:45 +0000)]
Add internal benchmark tests for CSS mix-blend-modes and filters
https://bugs.webkit.org/show_bug.cgi?id=154058

Provisionally reviewed by Jon Lee.

* Animometer/resources/debug-runner/tests.js: Include the new tests in the
"HTML suite" of the debug runner.

* Animometer/resources/extensions.js:
(Utilities.browserPrefix):
(Utilities.setElementPrefixedProperty): Utility functions to allow setting
prefixed style properties.

* Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
Set the mix-blend-mode and the filter to some random values if the options
of the test requested that.

* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
(parseShapeParameters): Parse the url options "blend" and "filter" and set
the corresponding flags.

* Animometer/tests/resources/main.js:
(randomStyleMixBlendMode):
(randomStyleFilter): Return random mix-blend-mode and filter.

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

4 years agoFix internal Windows build
achristensen@apple.com [Wed, 10 Feb 2016 19:56:25 +0000 (19:56 +0000)]
Fix internal Windows build
https://bugs.webkit.org/show_bug.cgi?id=154080
rdar://problem/24584417

Reviewed by Brent Fulgham.

* CMakeLists.txt:
Explicitly make WebKit dependent on WebKitGUID so that WebKit will not start building
before WebKitGUID is finished generating and copying all headers, including WebKit/WebKit.h.

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

4 years agoAddressing post-review comments after r196322
mmaxfield@apple.com [Wed, 10 Feb 2016 19:54:38 +0000 (19:54 +0000)]
Addressing post-review comments after r196322

Unreviwed.

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font):
* css/CSSFontFaceSource.h:

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

4 years agoAttributes on the Window instance should be configurable unless [Unforgeable]
cdumez@apple.com [Wed, 10 Feb 2016 19:47:10 +0000 (19:47 +0000)]
Attributes on the Window instance should be configurable unless [Unforgeable]
https://bugs.webkit.org/show_bug.cgi?id=153920
<rdar://problem/24563211>

Reviewed by Darin Adler.

Source/JavaScriptCore:

Marking the Window instance attributes as configurable but cause
getOwnPropertyDescriptor() to report them as configurable, as
expected. However, trying to delete them would actually lead to
unexpected behavior because:
- We did not reify custom accessor properties (most of the Window
  properties are custom accessors) upon deletion.
- For non-reified static properties marked as configurable,
  JSObject::deleteProperty() would attempt to call the property
  setter with undefined. As a result, calling delete window.name
  would cause window.name to become the string "undefined" instead
  of the undefined value.

* runtime/JSObject.cpp:
(JSC::getClassPropertyNames):
Now that we reify ALL properties, we only need to check the property table
if we have not reified. As a result, I dropped the 'didReify' parameter for
this function and instead only call this function if we have not yet reified.

(JSC::JSObject::putInlineSlow):
Only call putEntry() if we have not reified: Drop the
'|| !(entry->attributes() & BuiltinOrFunctionOrAccessor)'
check as such properties now get reified as well.

(JSC::JSObject::deleteProperty):
- Call reifyAllStaticProperties() instead of reifyStaticFunctionsForDelete()
  so that we now reify all properties upon deletion, including the custom
  accessors. reifyStaticFunctionsForDelete() is now removed and the same
  reification function is now used by: deletion, getOwnPropertyDescriptor()
  and eager reification of the prototype objects in the bindings.
- Drop code that falls back to calling the static property setter with
  undefined if we cannot find the property in the property storage. As
  we now reify ALL properties, the code removing the property from the
  property storage should succeed, provided that the property actually
  exists.

(JSC::JSObject::getOwnNonIndexPropertyNames):
Only call getClassPropertyNames() if we have not reified. We should no longer
check the static property table after reifying now that we reify all
properties.

(JSC::JSObject::reifyAllStaticProperties):
Merge with reifyStaticFunctionsForDelete(). The only behavior change is the
flattening to an uncacheable dictionary, like reifyStaticFunctionsForDelete()
used to do.

* runtime/JSObject.h:

Source/WebCore:

Attributes on the Window instance should be configurable unless [Unforgeable]:
1. 'constructor' property:
   - http://www.w3.org/TR/WebIDL/#interface-prototype-object
2. Constructor properties (e.g. window.Node):
   - http://www.w3.org/TR/WebIDL/#es-interfaces
3. IDL attributes:
   - http://heycam.github.io/webidl/#es-attributes (configurable unless
     [Unforgeable], e.g. window.location)

Firefox complies with the WebIDL specification but WebKit does not for 1. and 3.

Test: fast/dom/Window/window-properties-configurable.html

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
For known Window properties (i.e. properties in the static property table),
if we have reified and this is same-origin access, then call
Base::getOwnPropertySlot() to get the property from the local property
storage. If we have not reified yet, or this is cross-origin access, query
the static property table. This is to match the behavior of Firefox and
Chrome which seem to keep returning the original properties upon cross
origin access, even if those were deleted or redefined.

(WebCore::JSDOMWindow::put):
The previous code used to call the static property setter for properties in
the static table. However, this does not do the right thing if properties
were reified. For example, deleting window.name and then trying to set it
again would not work. Therefore, update this code to only do this if the
properties have not been reified, similarly to what is done in
JSObject::putInlineSlow().

* bindings/scripts/CodeGeneratorJS.pm:
(ConstructorShouldBeOnInstance):
Add a FIXME comment indicating that window.constructor should be on
the prototype as per the Web IDL specification.

(GenerateAttributesHashTable):
- Mark 'constructor' property as configurable for Window, as per the
  specification and consistently with other 'constructor' properties:
  http://www.w3.org/TR/WebIDL/#interface-prototype-object
- Mark properties as configurable even though they are on the instance.
  Window has its properties on the instance as per the specification:
  1. http://heycam.github.io/webidl/#es-attributes
  2. http://heycam.github.io/webidl/#PrimaryGlobal (window is [PrimaryGlobal]
  However, these properties should be configurable as long as they are
  not marked as [Unforgeable], as per 1.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
Rebaseline bindings tests.

LayoutTests:

* fast/dom/Window/window-properties-configurable-expected.txt: Added.
* fast/dom/Window/window-properties-configurable.html: Added.
Add a test to check that Window properties are reported as configurable
unless the [Unforgeable] ones and that deleting them actually works.

* fast/dom/global-constructors.html:
Update test so it no longer expects window.Node to be shadowable. As per
the specification, the "Node" property is on the window instance, not its
prototype. Therefore, it should cannot be shadowed and setting it to
something actually overwites the previous value, given that the property
is writable as per:
- http://heycam.github.io/webidl/#es-interfaces
I have verified that the new behavior is consistent with Firefox.

* http/tests/security/cross-origin-reified-window-property-access-expected.txt: Added.
* http/tests/security/cross-origin-reified-window-property-access.html: Added.
* http/tests/security/resources/reify-window.html: Added.
Add a test case to cover cross-origin access of Window properties after
reification.

* js/getOwnPropertyDescriptor-unforgeable-attributes-expected.txt:
* js/getOwnPropertyDescriptor-unforgeable-attributes.html:
Drop window.self from the list of unforgeable attributes. This attribute
is not unforgeable in our implementation or in the specification:
- https://html.spec.whatwg.org/multipage/browsers.html#the-window-object

* js/getOwnPropertyDescriptor-window-attributes-expected.txt:
* js/getOwnPropertyDescriptor-window-attributes.html:
- Add coverage for window.self which is a regular Window property.
- Add coverage for window.Node which is a constructor property
- Add coverage for window.constructor. It should really be on the prototype
  as per the specification but this at least checks that the property is
  configurable, as per the specification.
- Rebaseline the test as more checks are passing now that Window properties
  are marked as configurable.

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

4 years agoModern IDB: Ref cycle between IDBObjectStore and IDBTransaction.
beidson@apple.com [Wed, 10 Feb 2016 19:27:58 +0000 (19:27 +0000)]
Modern IDB: Ref cycle between IDBObjectStore and IDBTransaction.
https://bugs.webkit.org/show_bug.cgi?id=154061

Reviewed by Alex Christensen.

No new tests (Currently untestable).

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::transitionedToFinishing): Make sure the new state makes sense,
  set the new state, and then clear the set of referenced object stores which is no longer needed.
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::commit):
* Modules/indexeddb/client/IDBTransactionImpl.h:

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

4 years agoAdd a ramp controller
jonlee@apple.com [Wed, 10 Feb 2016 19:22:08 +0000 (19:22 +0000)]
Add a ramp controller
https://bugs.webkit.org/show_bug.cgi?id=154028

Provisionally reviewed by Said Abou-Hallawa.

Enhance the graph to include a complexity-fps graph, in addition
to the time graph.

* Animometer/developer.html: Add a ramp option.
* Animometer/resources/debug-runner/animometer.css: Update the style.
* Animometer/resources/strings.js: Flatten the Strings.text constants.
* Animometer/resources/debug-runner/animometer.js:
(ResultsTable.call._addGraphButton): Refactor.
(ResultsTable.call._addTest): Add regression data.
(benchmarkController): Add a form that allows the user to switch between the two forms,
Add a form that allows the user to toggle different data. Hide certain header columns
depending on the selected controller.
* Animometer/resources/debug-runner/graph.js: Add the complexity regressions.
* Animometer/resources/debug-runner/tests.js: Add headers for the ramp results.
* Animometer/resources/runner/animometer.js:
(ResultsTable): If a header is disabled don't include them in _flattenedHeaders.
* Animometer/tests/resources/main.js:
(Controller): Allow options to specify the capacity for sample arrays.
(Regression): A piecewise regression that tries to fit a slope and a flat profile.
(_calculateRegression): Options can fix the slope and bias when calculating the minimal
error. Sweep across the samples in time (which could be backward depending on the controller)
and calculate the intersection point.
(RampController): This controller assumes that the target frame rate is below
58 FPS. It runs in two stages. The first stage quickly determines the order of
magnitude of objects needed to stress the system by the setting the complexity
to increasingly difficult tiers. Perform a series of ramps descending from a
high-water mark of complexity. The complexity needed to reach the target frame
length is done by performing a piecewise regression on each ramp, and track a
running average of these values. For the next ramp, make that running average
the center of the ramp. With a minimum complexity of 0, the high-water mark is
twice that average. The score is based on the highest complexity that can
reach 60 fps.

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

4 years agoSkop fast/regions/text-break-properties.html on ios-simulator
ryanhaddad@apple.com [Wed, 10 Feb 2016 19:22:07 +0000 (19:22 +0000)]
Skop fast/regions/text-break-properties.html on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=153762

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years ago[Mac] Stop installing the legacy processes
mitz@apple.com [Wed, 10 Feb 2016 18:20:12 +0000 (18:20 +0000)]
[Mac] Stop installing the legacy processes
https://bugs.webkit.org/show_bug.cgi?id=154062

Reviewed by Anders Carlsson.

* Configurations/All.xcconfig: Removed the legacy processes from EXCLUDED_SOURCE_FILE_NAMES
  for iOS, now that they are no longer included in a Copy Files build phase.
* Configurations/BaseLegacyProcess.xcconfig: Set SKIP_INSTALL to YES for OS X as well.
* WebKit2.xcodeproj/project.pbxproj: Removed the Copy Files build phase that copied the
  processes into the framework in engineering builds. Renamed the “Add current version
  symlinks” script build phase to “Add XPCServices symlink”, and changed it to do just that.

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

4 years agoUnreviewed, rolling out r196251.
commit-queue@webkit.org [Wed, 10 Feb 2016 18:13:24 +0000 (18:13 +0000)]
Unreviewed, rolling out r196251.
https://bugs.webkit.org/show_bug.cgi?id=154078

Large regression on Dromaeo needs explanation (Requested by
kling on #webkit).

Reverted changeset:

"Visiting a WeakBlock should report bytes visited, since we
reported them allocated."
https://bugs.webkit.org/show_bug.cgi?id=153978
http://trac.webkit.org/changeset/196251

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

4 years agoREGRESSION(r196331): It made ~180 JSC tests crash on ARMv7 Linux
ossy@webkit.org [Wed, 10 Feb 2016 17:50:07 +0000 (17:50 +0000)]
REGRESSION(r196331): It made ~180 JSC tests crash on ARMv7 Linux
https://bugs.webkit.org/show_bug.cgi?id=154064

Reviewed by Mark Lam.

* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::generate): Added EABI_32BIT_DUMMY_ARG where it is necessary.
* dfg/DFGSpeculativeJIT.h: Fixed the comment.
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState): Added.
* wasm/WASMFunctionCompiler.h: Fixed the comment.

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

4 years agoREGRESSION(r195770): Use-after-free in ResourceLoaderOptions::cachingPolicy
jer.noble@apple.com [Wed, 10 Feb 2016 17:23:22 +0000 (17:23 +0000)]
REGRESSION(r195770): Use-after-free in ResourceLoaderOptions::cachingPolicy
https://bugs.webkit.org/show_bug.cgi?id=153727
<rdar://problem/24429886>

Reviewed by Darin Adler.

Follow-up after r195965. Only protect those parts of CachedResource::removeClient() which
affect the MemoryCache when allowsCaching() is false.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient):

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

4 years agoFix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) after r196281
ossy@webkit.org [Wed, 10 Feb 2016 10:28:23 +0000 (10:28 +0000)]
Fix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) after r196281
https://bugs.webkit.org/show_bug.cgi?id=154035

Reviewed by Antti Koivisto.

* dom/ComposedTreeIterator.h:
(WebCore::ComposedTreeIterator::Context::Context):

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

4 years ago[GTK] Toggle buttons are blurry with GTK+ 3.19
carlosgc@webkit.org [Wed, 10 Feb 2016 06:58:44 +0000 (06:58 +0000)]
[GTK] Toggle buttons are blurry with GTK+ 3.19
https://bugs.webkit.org/show_bug.cgi?id=154007

Reviewed by Michael Catanzaro.

Use min-width/min-height style properties when GTK+ >= 3.19.7 to
get the size of toggle buttons.

* rendering/RenderThemeGtk.cpp:
(WebCore::setToggleSize):
(WebCore::paintToggle):

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

4 years agoREGRESSION(r196183): [GTK] Broke TestInspector
carlosgc@webkit.org [Wed, 10 Feb 2016 06:53:57 +0000 (06:53 +0000)]
REGRESSION(r196183): [GTK] Broke TestInspector
https://bugs.webkit.org/show_bug.cgi?id=153945

Reviewed by Michael Catanzaro.

When the inspector view is detached and not added to a window,
which happens when it's closed, the inspector view is destroyed
because it doesn't have a parent anymore. When the inspector view
is destroyed we notify the web process that the inspector was
closed. Before r196183 this was not a problem, because the call to
WebInspectorProxy::didClose() from platformDetach() returned early
because WebInspectorProxy::didClose() had already set
m_inspectorPage to nullptr. In r196183 m_inspectorPage is set to
nullptr after platformDetach(), so we end up trying to detach the
inpector view again. To prevent this cycle, we should disconnect
the destroyed signal handler from the inspector view when
platformDetach() is called from WebInspectorProxy::didClose().

* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformDetach):

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

4 years agoRegression: Web Inspector: Sometimes in Elements panel two elements showed as selecte...
commit-queue@webkit.org [Wed, 10 Feb 2016 06:02:53 +0000 (06:02 +0000)]
Regression: Web Inspector: Sometimes in Elements panel two elements showed as selected at the same time
https://bugs.webkit.org/show_bug.cgi?id=149742
<rdar://problem/24492481>

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

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.moveChild):
Since removing and re-adding this tree element may forgot its
entire child tree, re-select the selected child that may have
just been lost in the shuffle.

* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.prototype._forgetTreeElement):
When forgetting the selected tree element, also deselect the
forgotten tree element so it clears its selected state.

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

4 years agocalling methods off super in a class constructor should check for TDZ
keith_miller@apple.com [Wed, 10 Feb 2016 06:01:28 +0000 (06:01 +0000)]
calling methods off super in a class constructor should check for TDZ
https://bugs.webkit.org/show_bug.cgi?id=154060

Reviewed by Ryosuke Niwa.

In a class constructor we need to check for TDZ when calling a method
off the super class. This is because, for super method calls, we use
the derived class's newly constructed object as the super method's
this value.

* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionCallDotNode::emitBytecode):
* tests/stress/super-method-calls-check-tdz.js: Added.
(Base):
(Derived):
(test):

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

4 years agoHeaders that use WEBCORE_EXPORT should include PlatformExportMacros.h
aakash_jain@apple.com [Wed, 10 Feb 2016 05:36:48 +0000 (05:36 +0000)]
Headers that use WEBCORE_EXPORT should include PlatformExportMacros.h
https://bugs.webkit.org/show_bug.cgi?id=146984

Reviewed by Alexey Proskuryakov.

* Modules/speech/SpeechSynthesis.h:
* contentextensions/ContentExtensionError.h:
* dom/DeviceOrientationClient.h:
* platform/graphics/Color.h:
* platform/ios/wak/WebCoreThread.h:
* platform/network/CacheValidation.h:
* platform/network/cf/CertificateInfo.h:

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

4 years agoAX: Implement word related text marker functions using TextIterator
n_wang@apple.com [Wed, 10 Feb 2016 02:33:04 +0000 (02:33 +0000)]
AX: Implement word related text marker functions using TextIterator
https://bugs.webkit.org/show_bug.cgi?id=153939
<rdar://problem/24269605>

Reviewed by Chris Fleizach.

Source/WebCore:

Using CharacterOffset to implement word related text marker calls. Reused
logic from previousBoundary and nextBoundary in VisibleUnits class.

Test: accessibility/mac/text-marker-word-nav.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::traverseToOffsetInRange):
(WebCore::AXObjectCache::rangeForNodeContents):
(WebCore::isReplacedNodeOrBR):
(WebCore::characterOffsetsInOrder):
(WebCore::resetNodeAndOffsetForReplacedNode):
(WebCore::setRangeStartOrEndWithCharacterOffset):
(WebCore::AXObjectCache::rangeForUnorderedCharacterOffsets):
(WebCore::AXObjectCache::setTextMarkerDataWithCharacterOffset):
(WebCore::AXObjectCache::startOrEndCharacterOffsetForRange):
(WebCore::AXObjectCache::startOrEndTextMarkerDataForRange):
(WebCore::AXObjectCache::characterOffsetForNodeAndOffset):
(WebCore::AXObjectCache::textMarkerDataForCharacterOffset):
(WebCore::AXObjectCache::previousNode):
(WebCore::AXObjectCache::visiblePositionFromCharacterOffset):
(WebCore::AXObjectCache::characterOffsetFromVisiblePosition):
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
(WebCore::AXObjectCache::nextCharacterOffset):
(WebCore::AXObjectCache::previousCharacterOffset):
(WebCore::startWordBoundary):
(WebCore::endWordBoundary):
(WebCore::AXObjectCache::startCharacterOffsetOfWord):
(WebCore::AXObjectCache::endCharacterOffsetOfWord):
(WebCore::AXObjectCache::previousWordStartCharacterOffset):
(WebCore::AXObjectCache::nextWordEndCharacterOffset):
(WebCore::AXObjectCache::leftWordRange):
(WebCore::AXObjectCache::rightWordRange):
(WebCore::characterForCharacterOffset):
(WebCore::AXObjectCache::characterAfter):
(WebCore::AXObjectCache::characterBefore):
(WebCore::parentEditingBoundary):
(WebCore::AXObjectCache::nextWordBoundary):
(WebCore::AXObjectCache::previousWordBoundary):
(WebCore::AXObjectCache::rootAXEditableElement):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::removeNodeForUse):
(WebCore::AXObjectCache::isNodeInUse):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper previousTextMarkerForNode:offset:]):
(-[WebAccessibilityObjectWrapper textMarkerForNode:offset:ignoreStart:]):
(-[WebAccessibilityObjectWrapper textMarkerForNode:offset:]):
(textMarkerForCharacterOffset):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
* editing/VisibleUnits.cpp:
(WebCore::rightWordPosition):
(WebCore::prepend):
(WebCore::appendRepeatedCharacter):
(WebCore::suffixLengthForRange):
(WebCore::prefixLengthForRange):
(WebCore::backwardSearchForBoundaryWithTextIterator):
(WebCore::forwardSearchForBoundaryWithTextIterator):
(WebCore::previousBoundary):
(WebCore::nextBoundary):
* editing/VisibleUnits.h:

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(endTextMarkerCallback):
(leftWordTextMarkerRangeForTextMarkerCallback):
(rightWordTextMarkerRangeForTextMarkerCallback):
(previousWordStartTextMarkerForTextMarkerCallback):
(nextWordEndTextMarkerForTextMarkerCallback):
(setSelectedVisibleTextRangeCallback):
(AccessibilityUIElement::setSelectedVisibleTextRange):
(AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::setSelectedVisibleTextRange):
(AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setSelectedVisibleTextRange):
(AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
(AccessibilityUIElement::supportedActions):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::setBoolAttributeValue):
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::mathPostscriptsDescription):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):
(WTR::_convertMathMultiscriptPairsToString):

LayoutTests:

* accessibility/mac/text-marker-word-nav-expected.txt: Added.
* accessibility/mac/text-marker-word-nav.html: Added.
* accessibility/text-marker/text-marker-previous-next-expected.txt:
* accessibility/text-marker/text-marker-previous-next.html:

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

4 years agoCSP: Extract helper classes into their own files
dbates@webkit.org [Wed, 10 Feb 2016 01:21:18 +0000 (01:21 +0000)]
CSP: Extract helper classes into their own files
https://bugs.webkit.org/show_bug.cgi?id=154040
<rdar://problem/24571189>

Reviewed by Brent Fulgham.

No functionality was changed. So, no new tests.

* CMakeLists.txt: Add files ContentSecurityPolicy{DirectiveList, MediaListDirective, Source, SourceList, SourceListDirective}.cpp.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* page/csp/ContentSecurityPolicy.cpp: Clean up #includes. Include header ParsingUtilities.h so that we can remove our own
variants of skip{Exactly, Until, While}(). Update code as necessary for class renames.
(WebCore::skipExactly): Deleted; instead use the analogous function in ParsingUtilities.h.
(WebCore::skipUntil): Deleted; instead use the analogous function in ParsingUtilities.h.
(WebCore::skipWhile): Deleted; instead use the analogous function in ParsingUtilities.h.
(WebCore::isSourceListNone): Moved to file ContentSecurityPolicySourceList.cpp.
(WebCore::CSPSource): Deleted; moved implementation to files ContentSecurityPolicySource.{cpp, h}.
(WebCore::CSPSourceList): Deleted; moved implementation to files ContentSecurityPolicySourceList.{cpp, h}.
(WebCore::CSPDirective): Deleted; moved implementation to file ContentSecurityPolicyDirective.h.
(WebCore::MediaListDirective): Deleted; moved implementation to files ContentSecurityPolicyMediaListDirective.{cpp, h}.
(WebCore::SourceListDirective): Deleted; moved implementation to files ContentSecurityPolicySourceListDirective.{cpp, h}.
(WebCore::CSPDirectiveList): Deleted; moved implementation to files ContentSecurityPolicyDirectiveList.{cpp, h}.
* page/csp/ContentSecurityPolicy.h:
* page/csp/ContentSecurityPolicyDirective.h: Added.
* page/csp/ContentSecurityPolicyDirectiveList.cpp: Added; removed use of ternary operator where it made the code less readable.
Updated code to make use of the functions defined in ParsingUtilities.h.
(WebCore::isExperimentalDirectiveName): Moved from file ContentSecurityPolicy.cpp.
(WebCore::isCSPDirectiveName): Ditto.
(WebCore::isDirectiveNameCharacter): Ditto.
(WebCore::isDirectiveValueCharacter): Ditto.
(WebCore::isNotASCIISpace): Ditto.
* page/csp/ContentSecurityPolicyDirectiveList.h: Added.
* page/csp/ContentSecurityPolicyMediaListDirective.cpp: Added. Updated code to make use of the functions defined in ParsingUtilities.h.
(WebCore::isMediaTypeCharacter): Moved from file ContentSecurityPolicy.cpp.
(WebCore::isNotASCIISpace): Ditto.
* page/csp/ContentSecurityPolicyMediaListDirective.h: Added.
* page/csp/ContentSecurityPolicySource.cpp: Added.
* page/csp/ContentSecurityPolicySource.h: Added.
* page/csp/ContentSecurityPolicySourceList.cpp: Added. Updated code to make use of the functions defined in ParsingUtilities.h.
(WebCore::isSourceCharacter): Moved from file ContentSecurityPolicy.cpp.
(WebCore::isHostCharacter): Ditto.
(WebCore::isPathComponentCharacter): Ditto.
(WebCore::isSchemeContinuationCharacter): Ditto.
(WebCore::isNotColonOrSlash): Ditto.
(WebCore::isSourceListNone): Ditto.
* page/csp/ContentSecurityPolicySourceList.h: Added.
* page/csp/ContentSecurityPolicySourceListDirective.cpp: Added.
* page/csp/ContentSecurityPolicySourceListDirective.h: Added.

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

4 years agoModern IDB: TransactionOperation objects leak.
beidson@apple.com [Wed, 10 Feb 2016 01:15:09 +0000 (01:15 +0000)]
Modern IDB: TransactionOperation objects leak.
https://bugs.webkit.org/show_bug.cgi?id=154054

Reviewed by Alex Christensen.

No new tests (Currently untestable).

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests): Remove the TransactionOperation from
  the map, as this operation doesn't complete "normally" like most others.
(WebCore::IDBClient::IDBTransaction::commitOnServer): Ditto.

* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::TransactionOperation::perform): Clear the m_performFunction after use,
  as it holds a lambda that holds a RefPtr to the IDBTransaction, as well as a self-ref.
(WebCore::IDBClient::TransactionOperation::completed): Clear m_completeFunction for the same reasons.

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

4 years agoWeb Inspector: Allow copying all headers in the request/response header tables
commit-queue@webkit.org [Wed, 10 Feb 2016 01:13:39 +0000 (01:13 +0000)]
Web Inspector: Allow copying all headers in the request/response header tables
https://bugs.webkit.org/show_bug.cgi?id=154048
<rdar://problem/24576302>

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

* Localizations/en.lproj/localizedStrings.js:
New "Copy Table" string.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype._contextMenuInHeader):
Add context menu support for table header cells, and give them a
"Copy Table" context menu if there is copyable data.

(WebInspector.DataGrid.prototype._contextMenuInDataTable):
Add "Copy Table" context menu for copyable rows.

(WebInspector.DataGrid.prototype._copyTextForDataGridNode):
(WebInspector.DataGrid.prototype._copyTextForDataGridHeaders):
(WebInspector.DataGrid.prototype._copyTable):
(WebInspector.DataGrid.prototype._hasCopyableData):
Helpers for determining copyability and copying tab separated data.

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

4 years agoUnreviewed, rolling out r196341.
commit-queue@webkit.org [Wed, 10 Feb 2016 01:08:04 +0000 (01:08 +0000)]
Unreviewed, rolling out r196341.
https://bugs.webkit.org/show_bug.cgi?id=154056

This change broke existing API tests on Mac and iOS (Requested
by ryanhaddad on #webkit).

Reverted changeset:

"Add SPI to remove individual user scripts or user style
sheets"
https://bugs.webkit.org/show_bug.cgi?id=154046
http://trac.webkit.org/changeset/196341

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

4 years agoMark perf/adding-radio-buttons.html as flaky on ios-simulator
ryanhaddad@apple.com [Wed, 10 Feb 2016 00:27:30 +0000 (00:27 +0000)]
Mark perf/adding-radio-buttons.html as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=154055

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years ago[Mac] Graphical corruption in videos when enabling custom loading path
jer.noble@apple.com [Wed, 10 Feb 2016 00:15:58 +0000 (00:15 +0000)]
[Mac] Graphical corruption in videos when enabling custom loading path
https://bugs.webkit.org/show_bug.cgi?id=154044

Reviewed by Alex Christensen.

The NSOperationQueue provided by AVFoundation from the AVAssetResourceLoader queue is not
set to be a serial queue. So when adding dataReceived operations to that queue, there exists
the possibility that some operations are handled before others, and the client will receieve
data out of order.

A real NSURLSession object will only issue another operation when the first operation
completes, so emulate this behavior in WebCoreNSURLSession by using a serial dispatch queue.
The internal queue will enqueue an operation to the resource loader's queue, and block until
that operation completes, thus ensuring ordering of the data (and other) operations.

* platform/network/cocoa/WebCoreNSURLSession.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession initWithResourceLoader:delegate:delegateQueue:]): Initialize _internalQueue
(-[WebCoreNSURLSession addDelegateOperation:]): Added utility method.
(-[WebCoreNSURLSession taskCompleted:]): Call -addDelegateOperation:
(-[WebCoreNSURLSession finishTasksAndInvalidate]): Ditto.
(-[WebCoreNSURLSession resetWithCompletionHandler:]): Ditto.
(-[WebCoreNSURLSession flushWithCompletionHandler:]): Ditto.
(-[WebCoreNSURLSession getTasksWithCompletionHandler:]): Ditto.
(-[WebCoreNSURLSession getAllTasksWithCompletionHandler:]): Ditto.
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): Ditto.
(-[WebCoreNSURLSessionDataTask resource:receivedData:length:]): Ditto.
(-[WebCoreNSURLSessionDataTask resourceFinished:]): Ditto.

Drive-by fix:
(-[WebCoreNSURLSessionDataTask resource:receivedData:length:]): Set countOfBytesReceived outside the operation,
    queue, matching NSURLSessionDataTask's behavior.

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

4 years agoRebaseline tests for ios-simulator after r196222
ryanhaddad@apple.com [Wed, 10 Feb 2016 00:14:20 +0000 (00:14 +0000)]
Rebaseline tests for ios-simulator after r196222
https://bugs.webkit.org/show_bug.cgi?id=154053

Reviewed by Zalan Bujtas.

* platform/ios-simulator-wk2/compositing/geometry/composited-in-columns-expected.txt:
* platform/ios-simulator-wk2/compositing/layer-creation/overlap-animation-container-expected.txt: Added.
* platform/ios-simulator-wk2/compositing/visibility/visibility-image-layers-dynamic-expected.txt:
* platform/ios-simulator-wk2/fast/inline/continuation-outlines-with-layers-expected.txt: Added.
* platform/ios-simulator-wk2/fast/layers/scroll-rect-to-visible-expected.txt:

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

4 years agoRebaseline compositing/overflow/scrollbar-painting.html for ios-simulator after r196244
ryanhaddad@apple.com [Wed, 10 Feb 2016 00:02:07 +0000 (00:02 +0000)]
Rebaseline compositing/overflow/scrollbar-painting.html for ios-simulator after r196244

Unreviewed test gardening.

* platform/ios-simulator-wk2/compositing/overflow/scrollbar-painting-expected.txt:

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

4 years agoWeb Inspector: localStorage inspector very slow on big values
commit-queue@webkit.org [Tue, 9 Feb 2016 23:42:53 +0000 (23:42 +0000)]
Web Inspector: localStorage inspector very slow on big values
https://bugs.webkit.org/show_bug.cgi?id=123750
<rdar://problem/15384930>

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

It is not useful to show very large strings in the DOM Storage DataGrid.
This change truncates display strings to roughly 200 characters. If the
developer really wants the full value of the string they can just access
it through localStorage.

* UserInterface/Models/DOMStorageObject.js:
(WebInspector.DOMStorageObject.prototype.getEntries.innerCallback):
(WebInspector.DOMStorageObject.prototype.getEntries):
(WebInspector.DOMStorageObject.prototype.itemUpdated):
Modernize.

* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
(WebInspector.DOMStorageContentView.prototype.itemRemoved):
Modernize.

(WebInspector.DOMStorageContentView.prototype.itemAdded):
(WebInspector.DOMStorageContentView.prototype.itemUpdated):
(WebInspector.DOMStorageContentView.prototype._truncateValue):
(WebInspector.DOMStorageContentView.prototype._populate):
Whenever we get a value that we will display, truncate it to
just 200 characters.

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

4 years agoAdd SPI to remove individual user scripts or user style sheets
andersca@apple.com [Tue, 9 Feb 2016 23:04:27 +0000 (23:04 +0000)]
Add SPI to remove individual user scripts or user style sheets
https://bugs.webkit.org/show_bug.cgi?id=154046
rdar://problem/23596352

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _removeUserScript:]):
(-[WKUserContentController _userStyleSheets]):
(-[WKUserContentController _addUserStyleSheet:]):
(-[WKUserContentController _removeUserStyleSheet:]):
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::removeUserScript):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::userStyleSheets):
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::removeUserScript):
(WebKit::WebUserContentController::removeUserStyleSheet):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:

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

4 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Tue, 9 Feb 2016 23:00:09 +0000 (23:00 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after r196303

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

4 years ago[iOS Simulator] accessibility/text-marker/text-marker-range-stale-node-crash.html...
n_wang@apple.com [Tue, 9 Feb 2016 22:58:18 +0000 (22:58 +0000)]
[iOS Simulator] accessibility/text-marker/text-marker-range-stale-node-crash.html crashing
https://bugs.webkit.org/show_bug.cgi?id=154039

Reviewed by Chris Fleizach.

We are accessing the derefed node in the CharacterOffset object, we should create an empty
CharacterOffset object if the node is not in use.

It's covered by the test accessibility/text-marker/text-marker-range-stale-node-crash.html.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityTextMarker characterOffset]):
(-[WebAccessibilityTextMarker isIgnored]):

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

4 years agoRebaseline more tests for ios-simulator after r196244
ryanhaddad@apple.com [Tue, 9 Feb 2016 22:54:17 +0000 (22:54 +0000)]
Rebaseline more tests for ios-simulator after r196244

Unreviewed test gardening.

* platform/ios-simulator-wk2/compositing/overflow/overflow-scroll-expected.txt:
* platform/ios-simulator-wk2/css2.1/20110323/abspos-non-replaced-width-margin-000-expected.txt:
* platform/ios-simulator-wk2/css2.1/20110323/abspos-replaced-width-margin-000-expected.txt:
* platform/ios-simulator-wk2/fast/block/float/overhanging-tall-block-expected.txt:
* platform/ios-simulator-wk2/fast/clip/014-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/overflow-unsplittable-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/BottomToTop-bt-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/BottomToTop-lr-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/BottomToTop-rl-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/BottomToTop-tb-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/RightToLeft-bt-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/RightToLeft-lr-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/RightToLeft-rl-dynamic-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/RightToLeft-rl-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/pagination/RightToLeft-tb-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/vertical-rl/column-break-with-balancing-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/vertical-rl/column-rules-expected.txt:
* platform/ios-simulator-wk2/fast/multicol/vertical-rl/float-paginate-complex-expected.txt:
* platform/ios-simulator-wk2/fast/overflow/float-in-relpositioned-expected.txt:
* platform/ios-simulator-wk2/fast/overflow/overflow-auto-position-absolute-expected.txt:
* platform/ios-simulator-wk2/fast/overflow/paged-x-div-expected.txt:
* platform/ios-simulator-wk2/fast/overflow/paged-x-div-with-column-gap-expected.txt:
* platform/ios-simulator-wk2/fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.txt:

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

4 years agoDon't crash if we fail to parse a builtin
fpizlo@apple.com [Tue, 9 Feb 2016 22:42:02 +0000 (22:42 +0000)]
Don't crash if we fail to parse a builtin
https://bugs.webkit.org/show_bug.cgi?id=154047
rdar://problem/24300617

Reviewed by Mark Lam.

Crashing probably seemed like a good idea at the time, but we could get here in case of a
near stack overflow, so that the parser bails because of recursion.

* parser/Parser.h:
(JSC::parse):

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

4 years agoWeb Inspector: Expiration column in Storage tab can't be sorted
commit-queue@webkit.org [Tue, 9 Feb 2016 22:16:14 +0000 (22:16 +0000)]
Web Inspector: Expiration column in Storage tab can't be sorted
https://bugs.webkit.org/show_bug.cgi?id=154043
<rdar://problem/24572272>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-02-09
Reviewed by Brian Burg.

* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._sortDataGrid.expiresCompare):
Sort Session as the shortest time, not the longest time. Use the
cookie.expires date when sorting, not the locale string.

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

4 years agoUnreviewed build fix after r196322
mmaxfield@apple.com [Tue, 9 Feb 2016 22:09:44 +0000 (22:09 +0000)]
Unreviewed build fix after r196322

Unreviewed.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::font):

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

4 years agoOutline corners do not align properly for multiline inlines.
zalan@apple.com [Tue, 9 Feb 2016 22:01:24 +0000 (22:01 +0000)]
Outline corners do not align properly for multiline inlines.
https://bugs.webkit.org/show_bug.cgi?id=154025

Reviewed by David Hyatt.

Adjust border position when outline-offset > 0. This patch also
removes integral pixelsnapping (drawLineForBoxSide takes care of
device pixelsnapping).

Source/WebCore:

Test: fast/inline/outline-corners-with-offset.html

* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutlineForLine):

LayoutTests:

* fast/inline/outline-corners-with-offset-expected.html: Added.
* fast/inline/outline-corners-with-offset.html: Added.

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

4 years agoAnalysis task page on v3 show progression as regressions
rniwa@webkit.org [Tue, 9 Feb 2016 21:49:03 +0000 (21:49 +0000)]
Analysis task page on v3 show progression as regressions
https://bugs.webkit.org/show_bug.cgi?id=154045

Reviewed by Chris Dumez.

The bug was caused by TestGroup.compareTestResults referring to undefined _smallerIsBetter.
Retrieve it from the associated metric object via the owner analysis task.

* public/v3/models/test-group.js:

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

4 years ago[Mac] Adopt NSURLSession properties in AVAssetResourceLoader
jer.noble@apple.com [Tue, 9 Feb 2016 21:30:25 +0000 (21:30 +0000)]
[Mac] Adopt NSURLSession properties in AVAssetResourceLoader

Rubber-stamped by Eric Carlson;

Set the correct global variable from setAVFoundationNSURLSessionEnabled().

* page/Settings.cpp:
(WebCore::Settings::setAVFoundationNSURLSessionEnabled):

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

4 years agoGetValueFunc/PutValueFunc should not take both slotBase and thisValue
barraclough@apple.com [Tue, 9 Feb 2016 21:19:59 +0000 (21:19 +0000)]
GetValueFunc/PutValueFunc should not take both slotBase and thisValue
https://bugs.webkit.org/show_bug.cgi?id=154009

Reviewed by Geoff Garen.

In JavaScript there are two types of properties - regular value properties, and accessor properties.
One difference between these is how they are reflected by getOwnPropertyDescriptor, and another is
what object they operate on in the case of a prototype access. If you access a value property of a
prototype object it return a value pertinent to the prototype, but in the case of a prototype object
returning an accessor, then the accessor function is applied to the base object of the access.

JSC supports special 'custom' properties implemented as a c++ callback, and these custom properties
can be used to implement either value- or accessor-like behavior. getOwnPropertyDescriptor behavior
is selected via the CustomAccessor attribute. Value- or accessor-like object selection is current
supported by passing both the slotBase and the thisValue to the callback,and hoping it uses the
right one. This is probably inefficient, bug-prone, and leads to crazy like JSBoundSlotBaseFunction.

Instead, just pass one thisValue to the callback functions, consistent with CustomAccessor.

Source/JavaScriptCore:

* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::getStaticValue):
(JSC::JSCallbackObject<Parent>::staticFunctionGetter):
(JSC::JSCallbackObject<Parent>::callbackGetter):
    - Merged slotBase & thisValue to custom property callbacks.
* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::generate):
    - Modified the call being JIT generated - GetValueFunc/PutValueFunc now only take 3,
      rather than 4 arguments. Selects which one to keep/drop based on access type.
(WTF::printInternal):
* bytecode/PolymorphicAccess.h:
(JSC::AccessCase::isGet):
(JSC::AccessCase::isPut):
(JSC::AccessCase::isIn):
(JSC::AccessCase::doesCalls):
(JSC::AccessCase::isGetter):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeForStubInfo):
* jit/Repatch.cpp:
(JSC::tryCacheGetByID):
(JSC::tryCachePutByID):
    - Split the CustomGetter/Setter access types into Value/Accessor variants.
* jsc.cpp:
(WTF::CustomGetter::getOwnPropertySlot):
(WTF::CustomGetter::customGetter):
(WTF::RuntimeArray::RuntimeArray):
(WTF::RuntimeArray::lengthGetter):
    - Merged slotBase & thisValue to custom property callbacks.
* runtime/CustomGetterSetter.cpp:
(JSC::callCustomSetter):
    - Pass 3 arguments when calling PutValueFunc.
* runtime/CustomGetterSetter.h:
* runtime/JSBoundSlotBaseFunction.cpp:
(JSC::boundSlotBaseFunctionCall):
(JSC::JSBoundSlotBaseFunction::JSBoundSlotBaseFunction):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
    - callCustomSetter currently takes a flag to distinguish value/accessor calls.
* runtime/JSFunction.cpp:
(JSC::retrieveArguments):
(JSC::JSFunction::argumentsGetter):
(JSC::retrieveCallerFunction):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::lengthGetter):
(JSC::JSFunction::nameGetter):
* runtime/JSFunction.h:
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::visitChildren):
(JSC::callbackGetter):
    - Merged slotBase & thisValue to custom property callbacks.
* runtime/JSObject.cpp:
(JSC::JSObject::putInlineSlow):
    - callCustomSetter currently takes a flag to distinguish value/accessor calls.
* runtime/Lookup.h:
(JSC::putEntry):
    - split PutPropertySlot setCustom into Value/Accessor variants.
* runtime/PropertySlot.cpp:
(JSC::PropertySlot::functionGetter):
(JSC::PropertySlot::customGetter):
* runtime/PropertySlot.h:
(JSC::PropertySlot::PropertySlot):
(JSC::PropertySlot::getValue):
    - added customGetter helper to call GetValueFunc.
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::setCustomValue):
(JSC::PutPropertySlot::setCustomAccessor):
(JSC::PutPropertySlot::setThisValue):
(JSC::PutPropertySlot::customSetter):
(JSC::PutPropertySlot::context):
(JSC::PutPropertySlot::isStrictMode):
(JSC::PutPropertySlot::isCacheablePut):
(JSC::PutPropertySlot::isCacheableSetter):
(JSC::PutPropertySlot::isCacheableCustom):
(JSC::PutPropertySlot::isCustomAccessor):
(JSC::PutPropertySlot::isInitialization):
(JSC::PutPropertySlot::cachedOffset):
(JSC::PutPropertySlot::setCustomProperty): Deleted.
    - split PutPropertySlot setCustom into Value/Accessor variants.
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getOwnPropertySlot):
(JSC::regExpConstructorDollar1):
(JSC::regExpConstructorDollar2):
(JSC::regExpConstructorDollar3):
(JSC::regExpConstructorDollar4):
(JSC::regExpConstructorDollar5):
(JSC::regExpConstructorDollar6):
(JSC::regExpConstructorDollar7):
(JSC::regExpConstructorDollar8):
(JSC::regExpConstructorDollar9):
(JSC::regExpConstructorInput):
(JSC::regExpConstructorMultiline):
(JSC::regExpConstructorLastMatch):
(JSC::regExpConstructorLastParen):
(JSC::regExpConstructorLeftContext):
(JSC::regExpConstructorRightContext):
(JSC::setRegExpConstructorInput):
(JSC::setRegExpConstructorMultiline):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::defineOwnProperty):
(JSC::regExpObjectSetLastIndexStrict):
(JSC::regExpObjectSetLastIndexNonStrict):
(JSC::RegExpObject::put):
    - Merged slotBase & thisValue to custom property callbacks.

Source/WebCore:

* bindings/js/JSDOMBinding.cpp:
(WebCore::printErrorMessageForFrame):
(WebCore::objectToStringFunctionGetter):
* bindings/js/JSDOMBinding.h:
(WebCore::propertyNameToString):
(WebCore::getStaticValueSlotEntryWithoutCaching<JSDOMObject>):
(WebCore::nonCachingStaticFunctionGetter):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitAdditionalChildren):
(WebCore::childFrameGetter):
(WebCore::namedItemGetter):
(WebCore::jsDOMWindowWebKit):
(WebCore::jsDOMWindowIndexedDB):
    - add missing null check, in case indexDB acessor is applied to non-window object.
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginScriptObject):
(WebCore::pluginElementPropertyGetter):
* bindings/js/JSPluginElementFunctions.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::destroy):
(JSC::RuntimeArray::lengthGetter):
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::finishCreation):
(JSC::RuntimeMethod::lengthGetter):
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::invalidate):
(JSC::Bindings::RuntimeObject::fallbackObjectGetter):
(JSC::Bindings::RuntimeObject::fieldGetter):
(JSC::Bindings::RuntimeObject::methodGetter):
* bridge/runtime_object.h:
    - Merged slotBase & thisValue to custom property callbacks.

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertyNames):
(WebKit::JSNPObject::propertyGetter):
(WebKit::JSNPObject::methodGetter):
* WebProcess/Plugins/Netscape/JSNPObject.h:
    - Merged slotBase & thisValue to custom property callbacks.

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

4 years agoBuild-fix; add Nullibility macros around previously un-macro'd class definitions.
jer.noble@apple.com [Tue, 9 Feb 2016 21:17:03 +0000 (21:17 +0000)]
Build-fix; add Nullibility macros around previously un-macro'd class definitions.

* platform/spi/mac/AVFoundationSPI.h:

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

4 years ago[Mac] Exiting fullscreen through the placeholder action leaves window in empty state
jer.noble@apple.com [Tue, 9 Feb 2016 21:03:20 +0000 (21:03 +0000)]
[Mac] Exiting fullscreen through the placeholder action leaves window in empty state
https://bugs.webkit.org/show_bug.cgi?id=152979
<rdar://problem/24132309>

Reviewed by Brent Fulgham.

In r194593, we relaxed the _fullScreenState requirement in -finishedExitFullScreenAnimation: to handle
the case where the request to exit fullscreen came from outside the process. However, in so doing, we
allowed -finishedExitFullScreenAnimation: to be called twice, and in so doing, leave the original window
empty of its WebView.  Tighten up the restriction of _fullScreenState to allow only the "InFullScreen"
state (to take care of the external exit command) and the "ExitingFullScreen" state, to handle the
normal teardown path.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):

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

4 years ago[Mac] Adopt NSURLSession properties in AVAssetResourceLoader
jer.noble@apple.com [Tue, 9 Feb 2016 20:56:48 +0000 (20:56 +0000)]
[Mac] Adopt NSURLSession properties in AVAssetResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=153873

Reviewed by Eric Carlson.

Source/WebCore:

Adopt a new AVAssetResourceLoader API allowing clients to specify a NSURLSession object to
use for media loading, and control the use of this property with a new Setting.

* page/Settings.cpp:
(WebCore::Settings::setAVFoundationNSURLSessionEnabled):
* page/Settings.h:
(WebCore::Settings::isAVFoundationNSURLSessionEnabled):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
* platform/spi/mac/AVFoundationSPI.h:

Source/WebKit/mac:

Add a WebKit preference to control the WebCore isAVFoundationNSURLSessionEnabled()
setting.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setAVFoundationNSURLSessionEnabled:]):
(-[WebPreferences isAVFoundationNSURLSessionEnabled]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add a WebKit2 preference to control the WebCore isAVFoundationNSURLSessionEnabled()
setting.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAVFoundationNSURLSessionEnabled):
(WKPreferencesGetAVFoundationNSURLSessionEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

4 years agoWeb Inspector: Limit max and min zoom factor of Inspector
commit-queue@webkit.org [Tue, 9 Feb 2016 20:52:41 +0000 (20:52 +0000)]
Web Inspector: Limit max and min zoom factor of Inspector
https://bugs.webkit.org/show_bug.cgi?id=154041
<rdar://problem/24571326>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-02-09
Reviewed by Brian Burg.

Chose reasonable zoom levels that looked good to my eye and
roughly matched Safari's page zoom levels.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Do not implicitly prevent default for zoom in/out keyboard shortcuts to
allow for a system beep if we do not do anything.

(WebInspector._increaseZoom):
(WebInspector._decreaseZoom):
Do not go beyond a max or min zoom level. Prevent default in the case
where we actually zoom, but don't prevent default where we do not
actually zoom to cause a system beep. Allow for a slight drift of
the floating point value as it increases / decreases by 0.2 at the
different zoom factors.

(WebInspector._resetZoom):
(WebInspector._showTabAtIndex):
Remove redundant prevent default calls, since it would happen
implicitly for these keyboard shortcuts.

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

4 years agoSpread expressions are not fair game for direct binding
fpizlo@apple.com [Tue, 9 Feb 2016 20:18:31 +0000 (20:18 +0000)]
Spread expressions are not fair game for direct binding
https://bugs.webkit.org/show_bug.cgi?id=154042
rdar://problem/24291413

Reviewed by Saam Barati.

Prior to this change we crashed on this:

    var [x] = [...y];

Because NodesCodegen thinks that this is a direct binding.  It's not, because we cannot
directly generate bytecode for "...y".  This is a unique property of spread expressions, so
its sufficient to just bail out of direct binding if we see a spread expression. That's what
this patch does.

* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayPatternNode::emitDirectBinding):
* tests/stress/spread-in-tail.js: Added.
(foo):
(catch):

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

4 years agoDecouple font creation from font loading
mmaxfield@apple.com [Tue, 9 Feb 2016 19:50:05 +0000 (19:50 +0000)]
Decouple font creation from font loading
https://bugs.webkit.org/show_bug.cgi?id=153414

Reviewed by Darin Adler.

Previously, CSSFontFaceSource never triggered a font download until that font was actually used. This means
that the function which triggers the download also has the goal of returning a font to use. However,
the CSS Font Loading JavaScript API requires being able to trigger a font download without this extra font
creation overhead.

In addition, this patch adds an explicit (and enforced) state transition diagram. The diagram looks like
this:
                    => Success
                  //
Pending => Loading
                  \\
                    => Failure

Therefore, the API for CSSFontFaceSource has changed to expose the concept of these new states. This means
that its user (CSSSegmentedFontFaceSource) has been updated to handle each possible state that its constituent
CSSFontFaceSources may be in.

No new tests because there is no behavior change.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::allSourcesFailed): Renamed to make the name clearer.
(WebCore::CSSFontFace::addedToSegmentedFontFace): Use references instead of pointers.
(WebCore::CSSFontFace::removedFromSegmentedFontFace): Ditto.
(WebCore::CSSFontFace::adoptSource): Renamed to make the name clearer.
(WebCore::CSSFontFace::fontLoaded): Use references instead of pointers. Also, remove old dead code.
(WebCore::CSSFontFace::font): Adapt to the new API of CSSFontFaceSource.
(WebCore::CSSFontFace::isValid): Deleted.
(WebCore::CSSFontFace::addSource): Deleted.
(WebCore::CSSFontFace::notifyFontLoader): Deleted. Old dead code.
(WebCore::CSSFontFace::notifyLoadingDone): Deleted. Old dead code.
* css/CSSFontFace.h:
(WebCore::CSSFontFace::create): Remove old dead code.
(WebCore::CSSFontFace::CSSFontFace): Use references instead of pointers.
(WebCore::CSSFontFace::loadState): Deleted. Remove old dead code.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::setStatus): Enforce state transitions.
(WebCore::CSSFontFaceSource::CSSFontFaceSource): Explicitly handle new state transitions.
(WebCore::CSSFontFaceSource::fontLoaded): Update for new states.
(WebCore::CSSFontFaceSource::load): Pulled out code from font().
(WebCore::CSSFontFaceSource::font): Moved code into load().
(WebCore::CSSFontFaceSource::isValid): Deleted.
(WebCore::CSSFontFaceSource::isDecodeError): Deleted.
(WebCore::CSSFontFaceSource::ensureFontData): Deleted.
* css/CSSFontFaceSource.h: Much cleaner API.
* css/CSSFontSelector.cpp:
(WebCore::createFontFace): Migrate to references instead of pointers. This requires a little
reorganization.
(WebCore::registerLocalFontFacesForFamily): Update to new CSSFontFaceSource API.
(WebCore::CSSFontSelector::addFontFaceRule): Ditto.
(WebCore::CSSFontSelector::getFontFace): Ditto.
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace): Migrate to references instead of pointers.
(WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace): Ditto.
(WebCore::CSSSegmentedFontFace::fontLoaded): Remove old dead code.
(WebCore::CSSSegmentedFontFace::appendFontFace): Cleanup.
(WebCore::CSSSegmentedFontFace::fontRanges): Adopt to new API.
(WebCore::CSSSegmentedFontFace::pruneTable): Deleted.
(WebCore::CSSSegmentedFontFace::isLoading): Deleted. Old dead code.
(WebCore::CSSSegmentedFontFace::checkFont): Deleted. Ditto.
(WebCore::CSSSegmentedFontFace::loadFont): Deleted. Ditto.
* css/CSSSegmentedFontFace.h:
(WebCore::CSSSegmentedFontFace::create): Migrate to references instead of pointers.
(WebCore::CSSSegmentedFontFace::fontSelector): Ditto.
(WebCore::CSSSegmentedFontFace::LoadFontCallback::~LoadFontCallback): Deleted.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::didAddClient): Migrate to references instead of pointers.
(WebCore::CachedFont::checkNotify): Ditto.
* loader/cache/CachedFontClient.h:
(WebCore::CachedFontClient::fontLoaded): Ditto.

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

4 years agoAll 32-bit plug-ins should use the XPC service
andersca@apple.com [Tue, 9 Feb 2016 18:57:05 +0000 (18:57 +0000)]
All 32-bit plug-ins should use the XPC service
https://bugs.webkit.org/show_bug.cgi?id=154036
rdar://problem/16059483

Reviewed by Dan Bernstein.

Silverlight expects malloced memory from the tiny zone to be executable. It also expects
the data segment from its coreclr image to be executable.

Make this possible by:

1. Shimming mach_vm_map, making sure to add the VM_PROT_EXECUTABLE bit to any memory in the tiny zone.
2. Go through the address space, looking for any existing ranges from the tiny zone and mach_vm_protect them
   to be executable.
3. Register with dyld so we'll get callbacks whenever a library is bound, look for the coreclr image, and
   mach_vm_protect its __DATA segment to be executable.

* Platform/spi/Cocoa/DyldSPI.h: Copied from Source/WebKit2/PluginProcess/mac/PluginProcessShim.h.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::isMallocMemoryTag):
(WebKit::shouldMapMemoryExecutable):
(WebKit::initializeShim):
(WebKit::PluginProcess::platformInitializeProcess):
* PluginProcess/mac/PluginProcessShim.h:
* PluginProcess/mac/PluginProcessShim.mm:
(WebKit::shimMachVMMap):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptions):
(WebKit::shouldUseXPC): Deleted.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years ago[GTK][EFL] Fix several build configuration related to SamplingProfiler after r196245
ossy@webkit.org [Tue, 9 Feb 2016 18:25:36 +0000 (18:25 +0000)]
[GTK][EFL] Fix several build configuration related to SamplingProfiler after r196245
https://bugs.webkit.org/show_bug.cgi?id=154033

Reviewed by Michael Catanzaro.

.:

* Source/cmake/WebKitFeatures.cmake:

Source/WTF:

* wtf/Platform.h:

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

4 years ago[Win] Rebaseline after r196244.
zalan@apple.com [Tue, 9 Feb 2016 18:16:47 +0000 (18:16 +0000)]
[Win] Rebaseline after r196244.

Unreviewed test gardening.

* platform/win/css3/unicode-bidi-isolate-basic-expected.txt:
* platform/win/fast/block/float/overhanging-tall-block-expected.txt:
* platform/win/fast/block/positioning/auto/vertical-rl/007-expected.txt:
* platform/win/fast/borders/border-antialiasing-expected.txt:
* platform/win/fast/clip/001-expected.txt:
* platform/win/fast/clip/013-expected.txt:
* platform/win/fast/clip/014-expected.txt:
* platform/win/fast/clip/outline-overflowClip-expected.txt:
* platform/win/fast/css/clip-zooming-expected.txt:
* platform/win/fast/frames/flattening/iframe-flattening-offscreen-expected.txt: Added.
* platform/win/fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks-expected.txt:
* platform/win/fast/line-grid/line-grid-inside-columns-expected.txt:
* platform/win/fast/line-grid/line-grid-into-columns-expected.txt:
* platform/win/fast/lists/scrolled-marker-paint-expected.txt:
* platform/win/fast/multicol/client-rects-expected.txt:
* platform/win/fast/multicol/column-break-with-balancing-expected.txt:
* platform/win/fast/multicol/column-rules-expected.txt:
* platform/win/fast/multicol/column-rules-stacking-expected.txt:
* platform/win/fast/multicol/columns-shorthand-parsing-expected.txt:
* platform/win/fast/multicol/float-paginate-complex-expected.txt:
* platform/win/fast/multicol/float-paginate-empty-lines-expected.txt:
* platform/win/fast/multicol/float-paginate-expected.txt:
* platform/win/fast/multicol/layers-in-multicol-expected.txt:
* platform/win/fast/multicol/layers-split-across-columns-expected.txt:
* platform/win/fast/multicol/max-height-columns-block-expected.txt:
* platform/win/fast/multicol/nested-columns-expected.txt:
* platform/win/fast/multicol/newmulticol/client-rects-expected.txt:
* platform/win/fast/multicol/overflow-across-columns-expected.txt:
* platform/win/fast/multicol/overflow-across-columns-percent-height-expected.txt:
* platform/win/fast/multicol/overflow-unsplittable-expected.txt:
* platform/win/fast/multicol/paginate-block-replaced-expected.txt:
* platform/win/fast/multicol/pagination/BottomToTop-bt-expected.txt:
* platform/win/fast/multicol/pagination/BottomToTop-lr-expected.txt:
* platform/win/fast/multicol/pagination/BottomToTop-rl-expected.txt:
* platform/win/fast/multicol/pagination/BottomToTop-tb-expected.txt:
* platform/win/fast/multicol/pagination/LeftToRight-bt-expected.txt:
* platform/win/fast/multicol/pagination/LeftToRight-rl-expected.txt:
* platform/win/fast/multicol/pagination/LeftToRight-tb-expected.txt:
* platform/win/fast/multicol/pagination/LeftToRight-tb-hittest-expected.txt:
* platform/win/fast/multicol/pagination/RightToLeft-bt-expected.txt:
* platform/win/fast/multicol/pagination/RightToLeft-lr-expected.txt:
* platform/win/fast/multicol/pagination/RightToLeft-rl-dynamic-expected.txt:
* platform/win/fast/multicol/pagination/RightToLeft-rl-expected.txt:
* platform/win/fast/multicol/pagination/RightToLeft-rl-hittest-expected.txt:
* platform/win/fast/multicol/pagination/RightToLeft-tb-expected.txt:
* platform/win/fast/multicol/pagination/TopToBottom-bt-expected.txt:
* platform/win/fast/multicol/pagination/TopToBottom-lr-expected.txt:
* platform/win/fast/multicol/pagination/TopToBottom-rl-expected.txt:
* platform/win/fast/multicol/positive-leading-expected.txt:
* platform/win/fast/multicol/scrolling-column-rules-expected.txt:
* platform/win/fast/multicol/scrolling-overflow-expected.txt:
* platform/win/fast/multicol/span/anonymous-style-inheritance-expected.txt:
* platform/win/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt:
* platform/win/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt:
* platform/win/fast/multicol/span/span-as-immediate-child-property-removal-expected.txt:
* platform/win/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
* platform/win/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/win/fast/multicol/span/span-as-immediate-columns-child-removal-expected.txt:
* platform/win/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt:
* platform/win/fast/multicol/span/span-as-nested-columns-child-expected.txt:
* platform/win/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/win/fast/multicol/table-vertical-align-expected.txt:
* platform/win/fast/multicol/tall-image-behavior-expected.txt:
* platform/win/fast/multicol/vertical-lr/column-break-with-balancing-expected.txt:
* platform/win/fast/multicol/vertical-lr/column-rules-expected.txt:
* platform/win/fast/multicol/vertical-lr/float-multicol-expected.txt:
* platform/win/fast/multicol/vertical-lr/float-paginate-complex-expected.txt:
* platform/win/fast/multicol/vertical-lr/float-paginate-expected.txt:
* platform/win/fast/multicol/vertical-lr/nested-columns-expected.txt:
* platform/win/fast/multicol/vertical-rl/column-break-with-balancing-expected.txt:
* platform/win/fast/multicol/vertical-rl/column-rules-expected.txt:
* platform/win/fast/multicol/vertical-rl/float-multicol-expected.txt:
* platform/win/fast/multicol/vertical-rl/float-paginate-complex-expected.txt:
* platform/win/fast/multicol/vertical-rl/float-paginate-expected.txt:
* platform/win/fast/multicol/vertical-rl/nested-columns-expected.txt:
* platform/win/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
* platform/win/fast/overflow/float-in-relpositioned-expected.txt:
* platform/win/fast/overflow/overflow-auto-position-absolute-expected.txt:
* platform/win/fast/overflow/overflow-rtl-expected.txt:
* platform/win/fast/overflow/paged-x-div-expected.txt:
* platform/win/fast/overflow/paged-x-div-with-column-gap-expected.txt:
* platform/win/fast/overflow/paged-x-on-root-expected.txt:
* platform/win/fast/overflow/paged-x-with-column-gap-expected.txt:
* platform/win/fast/overflow/paged-y-div-expected.txt:
* platform/win/fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.txt:
* platform/win/fast/repaint/box-shadow-h-expected.txt:
* platform/win/fast/repaint/box-shadow-v-expected.txt:
* platform/win/fast/repaint/layer-outline-expected.txt:
* platform/win/fast/repaint/layer-outline-horizontal-expected.txt:
* platform/win/fast/table/edge-offsets-expected.txt:
* platform/win/fast/transforms/overflow-with-transform-expected.txt:
* platform/win/printing/single-line-must-not-be-split-into-two-pages-expected.txt:
* platform/win/scrollbars/scrollbars-on-positioned-content-expected.txt:
* platform/win/svg/custom/getscreenctm-in-scrollable-div-area-nested-expected.txt:
* platform/win/svg/custom/image-rescale-clip-expected.txt:

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

4 years agoModern IDB: IDBOpenDBRequests leak.
beidson@apple.com [Tue, 9 Feb 2016 17:40:43 +0000 (17:40 +0000)]
Modern IDB: IDBOpenDBRequests leak.
https://bugs.webkit.org/show_bug.cgi?id=154032

Reviewed by Alex Christensen.

No new tests (Currently untestable).

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

Add a simple Event subclass that holds a ref to an IDBRequest, to make sure that we
drop the last ref to the request after its last event fires or is otherwise destroyed:
* Modules/indexeddb/IDBRequestCompletionEvent.cpp: Added.
(WebCore::IDBRequestCompletionEvent::IDBRequestCompletionEvent):
* Modules/indexeddb/IDBRequestCompletionEvent.h: Added.
(WebCore::IDBRequestCompletionEvent::create):

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onError): IDBRequestCompletionEvent instead of Event.
(WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit): Ditto.
(WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion): Ditto.
(WebCore::IDBClient::IDBOpenDBRequest::onSuccess): Ditto.

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::dispatchEvent): After setting up the request's
  completion event to fire, clear the back-ref to the request.

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

4 years ago[EFL] Remove eail related cruft after r195725
ossy@webkit.org [Tue, 9 Feb 2016 17:38:43 +0000 (17:38 +0000)]
[EFL] Remove eail related cruft after r195725
https://bugs.webkit.org/show_bug.cgi?id=154030

Reviewed by Alex Christensen.

* efl/jhbuildrc:

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

4 years ago[EFL] Remove LLVM related cruft after r196077
ossy@webkit.org [Tue, 9 Feb 2016 17:35:58 +0000 (17:35 +0000)]
[EFL] Remove LLVM related cruft after r196077
https://bugs.webkit.org/show_bug.cgi?id=154031

Reviewed by Alex Christensen.

* efl/jhbuild.modules:
* efl/patches/llvm-elf-add-stackmaps-arm64.patch: Removed.
* efl/patches/llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch: Removed.
* efl/patches/llvm-version-arm64.patch: Removed.

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

4 years agocheckValidity() sometimes asserts in WebUserMediaClient::pageDestroyed
eric.carlson@apple.com [Tue, 9 Feb 2016 17:13:27 +0000 (17:13 +0000)]
checkValidity() sometimes asserts in WebUserMediaClient::pageDestroyed
https://bugs.webkit.org/show_bug.cgi?id=154029
<rdar://problem/24065022>

Reviewed by Alex Christensen.

* WebCoreSupport/WebUserMediaClient.mm:
(WebUserMediaClient::pageDestroyed): Copy map keys to a vector and clear the map before
  enumerating the vector and canceling the requests. ASSERT that the map is not modified
  during cleanup. Clean up the permission check map.
(WebUserMediaClient::requestUserMediaAccess): Add the request to the map before calling the
  UI delegate in case it works synchronously (as it does in DRT).
(WebUserMediaClient::checkUserMediaPermission): Ditto.
(WebUserMediaClient::cancelUserMediaPermissionCheck): White-space cleanup.
(-[WebUserMediaPolicyListener allow]): Ditto.

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

4 years ago[iOS] Rebaseline after r196244.
zalan@apple.com [Tue, 9 Feb 2016 17:09:08 +0000 (17:09 +0000)]
[iOS] Rebaseline after r196244.

Unreviewed test gardening.

* platform/ios-simulator/compositing/geometry/clipping-foreground-expected.txt:
* platform/ios-simulator/compositing/geometry/root-layer-update-expected.txt:
* platform/ios-simulator/compositing/overflow/overflow-scroll-expected.txt:
* platform/ios-simulator/compositing/overflow/parent-overflow-expected.txt:
* platform/ios-simulator/compositing/overflow/scrollbar-painting-expected.txt:
* platform/ios-simulator/compositing/sibling-positioning-expected.txt:
* platform/ios-simulator/css2.1/20110323/abspos-non-replaced-width-margin-000-expected.txt: Added.
* platform/ios-simulator/css2.1/20110323/abspos-replaced-width-margin-000-expected.txt: Added.
* platform/ios-simulator/css3/blending/blend-mode-overflow-expected.txt:
* platform/ios-simulator/css3/unicode-bidi-isolate-basic-expected.txt:
* platform/ios-simulator/fast/block/float/overhanging-tall-block-expected.txt:
* platform/ios-simulator/fast/borders/border-antialiasing-expected.txt:
* platform/ios-simulator/fast/clip/001-expected.txt:
* platform/ios-simulator/fast/clip/013-expected.txt:
* platform/ios-simulator/fast/clip/014-expected.txt:
* platform/ios-simulator/fast/clip/016-expected.txt:
* platform/ios-simulator/fast/clip/outline-overflowClip-expected.txt:
* platform/ios-simulator/fast/css/clip-zooming-expected.txt:
* platform/ios-simulator/fast/frames/flattening/iframe-flattening-offscreen-expected.txt:
* platform/ios-simulator/fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks-expected.txt:
* platform/ios-simulator/fast/line-grid/line-grid-inside-columns-expected.txt:
* platform/ios-simulator/fast/line-grid/line-grid-into-columns-expected.txt:
* platform/ios-simulator/fast/lists/scrolled-marker-paint-expected.txt:
* platform/ios-simulator/fast/multicol/client-rects-expected.txt:
* platform/ios-simulator/fast/multicol/column-break-with-balancing-expected.txt:
* platform/ios-simulator/fast/multicol/column-rules-expected.txt:
* platform/ios-simulator/fast/multicol/column-rules-stacking-expected.txt:
* platform/ios-simulator/fast/multicol/columns-shorthand-parsing-expected.txt:
* platform/ios-simulator/fast/multicol/float-paginate-complex-expected.txt:
* platform/ios-simulator/fast/multicol/float-paginate-empty-lines-expected.txt:
* platform/ios-simulator/fast/multicol/float-paginate-expected.txt:
* platform/ios-simulator/fast/multicol/layers-in-multicol-expected.txt:
* platform/ios-simulator/fast/multicol/layers-split-across-columns-expected.txt:
* platform/ios-simulator/fast/multicol/max-height-columns-block-expected.txt:
* platform/ios-simulator/fast/multicol/nested-columns-expected.txt:
* platform/ios-simulator/fast/multicol/newmulticol/client-rects-expected.txt:
* platform/ios-simulator/fast/multicol/overflow-across-columns-expected.txt:
* platform/ios-simulator/fast/multicol/overflow-across-columns-percent-height-expected.txt:
* platform/ios-simulator/fast/multicol/overflow-unsplittable-expected.txt:
* platform/ios-simulator/fast/multicol/paginate-block-replaced-expected.txt:
* platform/ios-simulator/fast/multicol/pagination/BottomToTop-bt-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/TopToBottom-bt-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/BottomToTop-lr-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/TopToBottom-lr-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/BottomToTop-rl-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/TopToBottom-rl-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/BottomToTop-tb-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/TopToBottom-bt-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/LeftToRight-bt-expected.txt:
* platform/ios-simulator/fast/multicol/pagination/LeftToRight-rl-expected.txt:
* platform/ios-simulator/fast/multicol/pagination/LeftToRight-tb-expected.txt:
* platform/ios-simulator/fast/multicol/pagination/RightToLeft-bt-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/LeftToRight-tb-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/RightToLeft-lr-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/LeftToRight-rl-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/RightToLeft-rl-dynamic-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/LeftToRight-rl-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/RightToLeft-rl-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/LeftToRight-rl-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/RightToLeft-tb-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/pagination/LeftToRight-tb-expected.txt.
* platform/ios-simulator/fast/multicol/pagination/TopToBottom-bt-expected.txt:
* platform/ios-simulator/fast/multicol/pagination/TopToBottom-lr-expected.txt:
* platform/ios-simulator/fast/multicol/pagination/TopToBottom-rl-expected.txt:
* platform/ios-simulator/fast/multicol/positive-leading-expected.txt:
* platform/ios-simulator/fast/multicol/scrolling-column-rules-expected.txt:
* platform/ios-simulator/fast/multicol/scrolling-overflow-expected.txt:
* platform/ios-simulator/fast/multicol/span/anonymous-style-inheritance-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-as-immediate-child-property-removal-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-as-immediate-columns-child-removal-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-as-nested-columns-child-expected.txt:
* platform/ios-simulator/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/ios-simulator/fast/multicol/table-vertical-align-expected.txt:
* platform/ios-simulator/fast/multicol/tall-image-behavior-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-lr/column-break-with-balancing-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-lr/column-rules-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-lr/float-multicol-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-lr/float-paginate-complex-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-lr/float-paginate-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-lr/nested-columns-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-rl/column-break-with-balancing-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/vertical-lr/column-break-with-balancing-expected.txt.
* platform/ios-simulator/fast/multicol/vertical-rl/column-rules-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/vertical-lr/column-rules-expected.txt.
* platform/ios-simulator/fast/multicol/vertical-rl/float-multicol-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-rl/float-paginate-complex-expected.txt: Copied from LayoutTests/platform/ios-simulator/fast/multicol/vertical-lr/float-paginate-complex-expected.txt.
* platform/ios-simulator/fast/multicol/vertical-rl/float-paginate-expected.txt:
* platform/ios-simulator/fast/multicol/vertical-rl/nested-columns-expected.txt:
* platform/ios-simulator/fast/overflow/float-in-relpositioned-expected.txt:
* platform/ios-simulator/fast/overflow/overflow-auto-position-absolute-expected.txt:
* platform/ios-simulator/fast/overflow/overflow-rtl-expected.txt:
* platform/ios-simulator/fast/overflow/paged-x-div-expected.txt:
* platform/ios-simulator/fast/overflow/paged-x-div-with-column-gap-expected.txt:
* platform/ios-simulator/fast/overflow/paged-x-on-root-expected.txt:
* platform/ios-simulator/fast/overflow/paged-x-with-column-gap-expected.txt:
* platform/ios-simulator/fast/overflow/paged-y-div-expected.txt:
* platform/ios-simulator/fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.txt:
* platform/ios-simulator/fast/regions/repaint/region-painting-via-layout-expected.txt:
* platform/ios-simulator/fast/table/edge-offsets-expected.txt:
* platform/ios-simulator/fast/transforms/overflow-with-transform-expected.txt:
* platform/ios-simulator/svg/custom/image-rescale-clip-expected.txt:

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

4 years agoUnreviewed, rolling out r196286.
commit-queue@webkit.org [Tue, 9 Feb 2016 12:38:02 +0000 (12:38 +0000)]
Unreviewed, rolling out r196286.
https://bugs.webkit.org/show_bug.cgi?id=154026

Looks like 5% iOS PLT regression (Requested by kling on
#webkit).

Reverted changeset:

"[iOS] Throw away some unlinked code when navigating to a new
page."
https://bugs.webkit.org/show_bug.cgi?id=154014
http://trac.webkit.org/changeset/196286

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

4 years agopossible buffer overrun in Connection::processMessage of Source/WebKit2/Platform...
carlosgc@webkit.org [Tue, 9 Feb 2016 08:23:08 +0000 (08:23 +0000)]
possible buffer overrun in Connection::processMessage of Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
https://bugs.webkit.org/show_bug.cgi?id=153637

Patch by Fujii Hironori <Hironori.Fujii@jp.sony.com> on 2016-02-09
Reviewed by Carlos Garcia Campos.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage): Fix invalid arguments of memmove.

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

4 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.11.5 release.
carlosgc@webkit.org [Tue, 9 Feb 2016 08:07:33 +0000 (08:07 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.5 release.

.:

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

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.11.5.

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

4 years agoAddress Said's comments on the benchmark, and do some clean up.
jonlee@apple.com [Tue, 9 Feb 2016 05:26:20 +0000 (05:26 +0000)]
Address Said's comments on the benchmark, and do some clean up.

* Animometer/developer.html:
* Animometer/resources/debug-runner/animometer.css: Add styles for averages.
* Animometer/resources/debug-runner/animometer.js: Use the right
Strings constants.
* Animometer/resources/debug-runner/graph.js:
(_addRegressionLine): Add missing code to draw the line and standard
deviation highlight.
(onGraphTypeChanged): Remove unneeded variables
(onTimeGraphOptionsChanged):
* Animometer/resources/runner/benchmark-runner.js:
(_runBenchmarkAndRecordResults): Rename samplers to suiteResults and
_suitesSamplers to _suitesResults.
* Animometer/tests/resources/main.js:
(results): Call processSamples().
(update): Change sampling timestamp comparison.
(_animateLoop): Move shouldStop call to before the update.
* Animometer/tests/resources/sampler.js:
(process): Rename to processSamples().

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

4 years agoAttribute getters should not require an explicit 'this' value for Window properties
cdumez@apple.com [Tue, 9 Feb 2016 05:15:06 +0000 (05:15 +0000)]
Attribute getters should not require an explicit 'this' value for Window properties
https://bugs.webkit.org/show_bug.cgi?id=153968

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Attribute getters should not require an explicit 'this' value for
Window properties. This is because the Window interface is marked
as [ImplicitThis]:
- http://heycam.github.io/webidl/#ImplicitThis
- https://www.w3.org/Bugs/Public/show_bug.cgi?id=29421

This matches the behavior of Firefox and the expectations of the W3C
web-platform-tests.

No new tests, already covered by existing tests.

* bindings/scripts/CodeGeneratorJS.pm:
In attribute getters of an interface marked as [ImplicitThis],
if 'thisValue' is undefined or null, fall back to using the
global object as 'thisValue'.

* bindings/scripts/IDLAttributes.txt:
Add support for [ImplicitThis]:
http://heycam.github.io/webidl/#ImplicitThis

* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
Rebaseline bindings tests.

* page/DOMWindow.idl:
Mark Window as [ImplicitThis]:
http://heycam.github.io/webidl/#ImplicitThis

LayoutTests:

Rebaseline existing tests now that more checks are passing.

* fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt:
* fast/dom/Window/getOwnPropertyDescriptor-other-window.html:
* js/getOwnPropertyDescriptor-window-attributes-expected.txt:

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

4 years agoError construction for inlined operations should not use the inliner's CodeBlock
keith_miller@apple.com [Tue, 9 Feb 2016 03:46:37 +0000 (03:46 +0000)]
Error construction for inlined operations should not use the inliner's CodeBlock
https://bugs.webkit.org/show_bug.cgi?id=154021

Reviewed by Mark Lam.

Previously, if one function, A, was inlined into another function, B, in the DFG/FTL
we would use B's DFG/FTL CodeBlock to construct source information about the Error.
We would correctly compute the bytecodeOffset in A for the an expression but we would
not use one of A's CodeBlocks when looking up source. This caused crashes during
operationIn as we expected to be able to find the text "in" in the source.

* runtime/ErrorInstance.cpp:
(JSC::appendSourceToError):
* tests/stress/inlined-error-gets-correct-codeblock-for-bytecodeoffset.js: Added.
(map):
(n):
(one):
(catch):

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

4 years agoWeb Inspector: Uncaught exception merging script profiler records
commit-queue@webkit.org [Tue, 9 Feb 2016 03:33:17 +0000 (03:33 +0000)]
Web Inspector: Uncaught exception merging script profiler records
https://bugs.webkit.org/show_bug.cgi?id=154004

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-02-08
Reviewed by Brian Burg.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords):
Stop if we've merged all script profiler records.

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

4 years agoruntimeTypeForValue should protect against seeing TDZ value
sbarati@apple.com [Tue, 9 Feb 2016 03:31:11 +0000 (03:31 +0000)]
runtimeTypeForValue should protect against seeing TDZ value
https://bugs.webkit.org/show_bug.cgi?id=154023

Reviewed by Michael Saboff.

There are a few back traces I've seen from crashes that bottom out
inside runtimeTypeForValue. I haven't been able to reproduce
any such crash, but it's likely that we're encountering the
empty JSValue. It's better to just have this function protect
against seeing the empty value instead of dereferencing a null
pointer when it thinks the value is a cell.

* runtime/RuntimeType.cpp:
(JSC::runtimeTypeForValue):

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

4 years agoTeach Controller to measure intervals, and turn off the frame length estimator.
jonlee@apple.com [Tue, 9 Feb 2016 03:30:52 +0000 (03:30 +0000)]
Teach Controller to measure intervals, and turn off the frame length estimator.

* Animometer/tests/resources/main.js: Default interval length is 100 ms.
(start): Set the first interval.
(_measureAndResetInterval): Reports the average frame length of the interval that just
completed, and sets up the next interval.
(update): If there is no length, then just use the estimator per frame, otherwise the
estimator measures per interval. Add a didFinishInterval for subclasses to process
prior to recording the sample. Update tune() to include whether an interval had
finished.
(StepController): Step controllers don't measure on an interval basis.

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

4 years agoMinor refactoring. Rename Controller._estimator to Controller._frameLengthEstimator
jonlee@apple.com [Tue, 9 Feb 2016 03:30:49 +0000 (03:30 +0000)]
Minor refactoring. Rename Controller._estimator to Controller._frameLengthEstimator
and switch the parameters for start(), update(), and tune(), so that the timestamp
is first and stage is second.

* Animometer/tests/resources/main.js:

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

4 years agoMove ResultsTable functionality not needed for release tests out.
jonlee@apple.com [Tue, 9 Feb 2016 03:30:47 +0000 (03:30 +0000)]
Move ResultsTable functionality not needed for release tests out.
Move reporting of score and mean to selection of the time-based graph.

* Animometer/developer.html: Rename graph-options to time-graph-options.
* Animometer/resources/debug-runner/animometer.js:
(DeveloperResultsTable): Moved from runner/animometer.js. Switch from mean
values to "average" objects which can hold stdev. Move graph button and
calculation of noisy measurements here. Sophisticated header processing
is not needed in release suite.
(populateTable): Use DeveloperResultsTable.
* Animometer/resources/debug-runner/graph.js: Pull time graph creation to
its own function, and add a new onGraphTypeChanged handler in preparation
of a complexity graph to be added later.
* Animometer/resources/runner/animometer.js:
(ResultsTable): Simplify to just handle test names and scores.

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