WebKit-https.git
4 years agoReturn a Promise from HTMLMediaElement.play()
jer.noble@apple.com [Tue, 10 May 2016 20:32:02 +0000 (20:32 +0000)]
Return a Promise from HTMLMediaElement.play()
https://bugs.webkit.org/show_bug.cgi?id=157400

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline web-platform-tests/html/dom/interfaces-expected.txt with new (failing) result.

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

Source/WebCore:

Tests: media/media-play-promise-reject-error-notsupported.html
       media/media-play-promise-reject-load-abort.html
       media/media-play-promise-reject-pause-abort.html
       media/media-play-promise-reject-play-notallowed.html
       media/media-play-promise-reject-play-notsupported.html
       media/media-play-promise-resolve-when-playing.html
       media/media-play-promise-resolve.html

The HTML Living Standard Spec <https://html.spec.whatwg.org/multipage/embedded-content.html>
(5 May 2016) adds support for a Promise to be returned by the play() method, to be resolved
or rejected at defined points during loading and playback.

Add utility methods which encapsulate the definitions of the equivalent algorithms from the
HTML Spec.  Add a new, overloaded play() method on HTMLMediaElement which takes a DeferredWrapper
reference.

After the change to use scheduleNotifyAboutPlaying() instead of enqueueing the "playing" event
directly, we must ensure that the notifyAboutPlaying() task does not get fired before the
"play" event preceeding it does. So re-implement GenericEventQueue (which previously used
a timer to dispatch events) to use a GenericTaskQueue instead. This ensures that all tasks and
events are interleaved in the order in which they were enqueued.

Additionally, the new pauseAfterDetachedTimerFired() event was firing out of microtask order, which
broke some W3C tests after the changes to GenericEventQueue. Move GenericEventQueue and
GenericTaskQueue to the same timing source (namely, a WebCore Timer) and interleave Events
and Tasks by having GenericEventQueue use GenericTaskQueue to issue its Events. Because
Document::postTask() cannot ensure ordering with Timer-based events, switch HTMLMediaElement
over to Timer-backed GenericTaskQueues.

Use a WeakPtr to track the destruction of TaskDispatcher<Timer> objects in pendingDispatchers().

* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::GenericEventQueue):
(WebCore::GenericEventQueue::enqueueEvent):
(WebCore::GenericEventQueue::close):
(WebCore::GenericEventQueue::cancelAllEvents):
(WebCore::GenericEventQueue::suspend):
(WebCore::GenericEventQueue::resume):
(WebCore::GenericEventQueue::sharedTimer): Deleted.
(WebCore::GenericEventQueue::sharedTimerFired): Deleted.
(WebCore::GenericEventQueue::pendingQueues): Deleted.
* dom/GenericEventQueue.h:
* platform/GenericTaskQueue.cpp: Added.
(WebCore::TaskDispatcher<Timer>::~TaskDispatcher):
(WebCore::TaskDispatcher<Timer>::postTask):
(WebCore::TaskDispatcher<Timer>::sharedTimer):
(WebCore::TaskDispatcher<Timer>::sharedTimerFired):
(WebCore::TaskDispatcher<Timer>::pendingDispatchers):
(WebCore::TaskDispatcher<Timer>::dispatchOneTask):
* platform/GenericTaskQueue.h:
(WebCore::TaskDispatcher<Timer>::TaskDispatcher): Deleted.
(WebCore::TaskDispatcher<Timer>::postTask): Deleted.
(WebCore::TaskDispatcher<Timer>::timerFired): Deleted.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::scheduleResolvePendingPlayPromises):
(WebCore::HTMLMediaElement::rejectPendingPlayPromises):
(WebCore::HTMLMediaElement::resolvePendingPlayPromises):
(WebCore::HTMLMediaElement::scheduleNotifyAboutPlaying):
(WebCore::HTMLMediaElement::notifyAboutPlaying):
(WebCore::HTMLMediaElement::noneSupported):
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::contextDestroyed):
(WebCore::HTMLMediaElement::stop):
(WebCore::HTMLMediaElement::pauseAfterDetachedTask): Renamed from pauseAfterDetachedTimerFired.
(WebCore::HTMLMediaElement::removedFrom):
(WebCore::HTMLMediaElement::contextDestroyed):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

* media/media-play-promise-reject-error-notsupported-expected.txt: Added.
* media/media-play-promise-reject-error-notsupported.html: Added.
* media/media-play-promise-reject-load-abort-expected.txt: Added.
* media/media-play-promise-reject-load-abort.html: Added.
* media/media-play-promise-reject-pause-abort-expected.txt: Added.
* media/media-play-promise-reject-pause-abort.html: Added.
* media/media-play-promise-reject-play-notallowed-expected.txt: Added.
* media/media-play-promise-reject-play-notallowed.html: Added.
* media/media-play-promise-reject-play-notsupported-expected.txt: Added.
* media/media-play-promise-reject-play-notsupported.html: Added.
* media/media-play-promise-resolve-expected.txt: Added.
* media/media-play-promise-resolve-when-playing-expected.txt: Added.
* media/media-play-promise-resolve-when-playing.html: Added.
* media/media-play-promise-resolve.html: Added.

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

4 years agoUnreviewed, rolling out r200627.
ryanhaddad@apple.com [Tue, 10 May 2016 20:21:45 +0000 (20:21 +0000)]
Unreviewed, rolling out r200627.
https://bugs.webkit.org/show_bug.cgi?id=157531

This change has caused crashes in existing LayoutTests
(Requested by ryanhaddad on #webkit).

Reverted changeset:

"Return a Promise from HTMLMediaElement.play()"
https://bugs.webkit.org/show_bug.cgi?id=157400
http://trac.webkit.org/changeset/200627

Patch by Commit Queue <commit-queue@webkit.org> on 2016-05-10

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

4 years agoFix scrolling tree dumping
simon.fraser@apple.com [Tue, 10 May 2016 19:31:22 +0000 (19:31 +0000)]
Fix scrolling tree dumping
https://bugs.webkit.org/show_bug.cgi?id=157529

Reviewed by Tim Horton.

Source/WebCore:

Scrolling tree dumps cannot contain layerIDs because they are not stable between
runs. Fix by adding ScrollingStateTreeAsTextBehavior flags, and not dumping
the layerID for tests.

Sadly RemoteScrollingCoordinatorTransaction has a lot of duplicated code for dumping
the scrolling state tree, which should be converted to dumpProperties() at some point.

Fix the one test that suffered from this problem, and unskip it.

Test: fast/scrolling/ios/remove-scrolling-role.html

* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::dumpProperties):
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::dump):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::dumpProperties):
* page/scrolling/ScrollingStateStickyNode.h:

LayoutTests:

* fast/scrolling/ios/remove-scrolling-role-expected.txt: Renamed from LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt.
* fast/scrolling/ios/remove-scrolling-role.html: Renamed from LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html.
* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoMark fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html as flakey.
simon.fraser@apple.com [Tue, 10 May 2016 19:31:16 +0000 (19:31 +0000)]
Mark fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html as flakey.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

4 years agoWeb Inspector: Eliminate the crazy code for evaluateOnCallFrame
joepeck@webkit.org [Tue, 10 May 2016 19:16:19 +0000 (19:16 +0000)]
Web Inspector: Eliminate the crazy code for evaluateOnCallFrame
https://bugs.webkit.org/show_bug.cgi?id=157510
<rdar://problem/26191332>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluateWithScopeExtension):
Set and clear an optional scope extension object.

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype.evaluate):
(InjectedScript.prototype._evaluateOn):
(InjectedScript.prototype.evaluateOnCallFrame):
Unify the code to use the passed in evaluate function and object.
When evaluating on a call frame the evaluate function ends up being
DebuggerCallFrame::evaluateWithScopeExtension. When evaluating globally
this ends up being JSInjectedScriptHost::evaluateWithScopeExtension.
In both cases "object" is the preferred this object to use.

* debugger/DebuggerCallFrame.h:
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension):
(Inspector::JSJavaScriptCallFrame::evaluate): Deleted.
* inspector/JSJavaScriptCallFrame.h:
* inspector/JSJavaScriptCallFramePrototype.cpp:
(Inspector::JSJavaScriptCallFramePrototype::finishCreation):
(Inspector::jsJavaScriptCallFramePrototypeFunctionEvaluateWithScopeExtension):
* inspector/JavaScriptCallFrame.h:
(Inspector::JavaScriptCallFrame::evaluateWithScopeExtension):
(Inspector::JavaScriptCallFrame::evaluate): Deleted.
Pass through to DebuggerCallFrame with the proper arguments.

* debugger/Debugger.cpp:
(JSC::Debugger::hasBreakpoint):
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::evaluateBreakpointAction):
Use the new evaluate on call frame method name and no scope extension object.

LayoutTests:

* inspector/debugger/evaluateOnCallFrame-CommandLineAPI-expected.txt: Added.
* inspector/debugger/evaluateOnCallFrame-CommandLineAPI.html: Added.

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

4 years agoFix the !ENABLE(CSS_REGIONS) build after r198990
ossy@webkit.org [Tue, 10 May 2016 19:08:27 +0000 (19:08 +0000)]
Fix the !ENABLE(CSS_REGIONS) build after r198990
https://bugs.webkit.org/show_bug.cgi?id=157516

Reviewed by Ryosuke Niwa.

* style/StyleTreeResolver.cpp:
(WebCore::Style::affectsRenderedSubtree):

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

4 years agoMake super-property-access.js test run for less time because it was timing out in...
sbarati@apple.com [Tue, 10 May 2016 18:56:33 +0000 (18:56 +0000)]
Make super-property-access.js test run for less time because it was timing out in debug builds.

Rubber stamped by Filip Pizlo.

* tests/stress/super-property-access.js:
(test):
(test.value):
(test.foo):
(test.B.prototype.bar):
(test.B):

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

4 years agoFix more deprecation warnings.
andersca@apple.com [Tue, 10 May 2016 18:34:52 +0000 (18:34 +0000)]
Fix more deprecation warnings.

* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(PluginServiceInitializer):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):

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

4 years ago[SpeculativeValidation] Do not start a preload if there is already one pending
cdumez@apple.com [Tue, 10 May 2016 17:45:47 +0000 (17:45 +0000)]
[SpeculativeValidation] Do not start a preload if there is already one pending
https://bugs.webkit.org/show_bug.cgi?id=157522
<rdar://problem/26156083>

Reviewed by Alex Christensen.

Do not start a preload if there is already one pending. We failed to check in
SpeculativeLoadManager::preloadEntry() if there was already a pending preload.
As a result, we would sometimes cancel an already pending preload and start
one from scratch which is inefficient. It would also sometimes lead to hitting
an assertion in the SpeculativeLoad destructor because we could destroy the
SpeculativeLoad without finishing or cancelling the load.

* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):

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

4 years agoWeb Inspector: Cleanup super getter/setter now that underlying issue is fixed
commit-queue@webkit.org [Tue, 10 May 2016 17:42:58 +0000 (17:42 +0000)]
Web Inspector: Cleanup super getter/setter now that underlying issue is fixed
https://bugs.webkit.org/show_bug.cgi?id=157488
<rdar://problem/26179120>

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-05-10
Reviewed by Brian Burg.

Addressed FIXMEs for bug 147064:
<https://webkit.org/b/147064> Getter and setter on super are called with wrong "this" object

* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype.get value):
(WebInspector.VisualStyleKeywordPicker.prototype.set value):
(WebInspector.VisualStyleKeywordPicker.prototype.get synthesizedValue):
(WebInspector.VisualStyleKeywordPicker.prototype._getValue): Deleted.
(WebInspector.VisualStyleKeywordPicker.prototype._setValue): Deleted.
(WebInspector.VisualStyleKeywordPicker.prototype._generateSynthesizedValue): Deleted.

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set specialPropertyPlaceholderElementText):

* UserInterface/Views/VisualStyleTimingEditor.js:
(WebInspector.VisualStyleTimingEditor.prototype.get value):
(WebInspector.VisualStyleTimingEditor.prototype.set value):
(WebInspector.VisualStyleTimingEditor.prototype.get synthesizedValue):
(WebInspector.VisualStyleTimingEditor.prototype._getValue): Deleted.
(WebInspector.VisualStyleTimingEditor.prototype._setValue): Deleted.
(WebInspector.VisualStyleTimingEditor.prototype._generateSynthesizedValue): Deleted.

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

4 years agoFix a deprecation warning.
andersca@apple.com [Tue, 10 May 2016 17:32:52 +0000 (17:32 +0000)]
Fix a deprecation warning.

* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):

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

4 years agoReturn a Promise from HTMLMediaElement.play()
jer.noble@apple.com [Tue, 10 May 2016 17:27:12 +0000 (17:27 +0000)]
Return a Promise from HTMLMediaElement.play()
https://bugs.webkit.org/show_bug.cgi?id=157400

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline web-platform-tests/html/dom/interfaces-expected.txt with new (failing) result.

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

Source/WebCore:

Tests: media/media-play-promise-reject-error-notsupported.html
       media/media-play-promise-reject-load-abort.html
       media/media-play-promise-reject-pause-abort.html
       media/media-play-promise-reject-play-notallowed.html
       media/media-play-promise-reject-play-notsupported.html
       media/media-play-promise-resolve-when-playing.html
       media/media-play-promise-resolve.html

The HTML Living Standard Spec <https://html.spec.whatwg.org/multipage/embedded-content.html>
(5 May 2016) adds support for a Promise to be returned by the play() method, to be resolved
or rejected at defined points during loading and playback.

Add utility methods which encapsulate the definitions of the equivalent algorithms from the
HTML Spec.  Add a new, overloaded play() method on HTMLMediaElement which takes a DeferredWrapper
reference.

After the change to use scheduleNotifyAboutPlaying() instead of enqueueing the "playing" event
directly, we must ensure that the notifyAboutPlaying() task does not get fired before the
"play" event preceeding it does. So re-implement GenericEventQueue (which previously used
a timer to dispatch events) to use a GenericTaskQueue instead. This ensures that all tasks and
events are interleaved in the order in which they were enqueued.

Additionally, the new pauseAfterDetachedTimerFired() event was firing out of microtask order, which
broke some W3C tests after the changes to GenericEventQueue. Move GenericEventQueue and
GenericTaskQueue to the same timing source (namely, a WebCore Timer) and interleave Events
and Tasks by having GenericEventQueue use GenericTaskQueue to issue its Events. Because
Document::postTask() cannot ensure ordering with Timer-based events, switch HTMLMediaElement
over to Timer-backed GenericTaskQueues.

* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::GenericEventQueue):
(WebCore::GenericEventQueue::enqueueEvent):
(WebCore::GenericEventQueue::close):
(WebCore::GenericEventQueue::cancelAllEvents):
(WebCore::GenericEventQueue::suspend):
(WebCore::GenericEventQueue::resume):
(WebCore::GenericEventQueue::sharedTimer): Deleted.
(WebCore::GenericEventQueue::sharedTimerFired): Deleted.
(WebCore::GenericEventQueue::pendingQueues): Deleted.
* dom/GenericEventQueue.h:
* platform/GenericTaskQueue.cpp: Added.
(WebCore::TaskDispatcher<Timer>::~TaskDispatcher):
(WebCore::TaskDispatcher<Timer>::postTask):
(WebCore::TaskDispatcher<Timer>::sharedTimer):
(WebCore::TaskDispatcher<Timer>::sharedTimerFired):
(WebCore::TaskDispatcher<Timer>::pendingDispatchers):
(WebCore::TaskDispatcher<Timer>::dispatchOneTask):
* platform/GenericTaskQueue.h:
(WebCore::TaskDispatcher<Timer>::TaskDispatcher): Deleted.
(WebCore::TaskDispatcher<Timer>::postTask): Deleted.
(WebCore::TaskDispatcher<Timer>::timerFired): Deleted.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::scheduleResolvePendingPlayPromises):
(WebCore::HTMLMediaElement::rejectPendingPlayPromises):
(WebCore::HTMLMediaElement::resolvePendingPlayPromises):
(WebCore::HTMLMediaElement::scheduleNotifyAboutPlaying):
(WebCore::HTMLMediaElement::notifyAboutPlaying):
(WebCore::HTMLMediaElement::noneSupported):
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::contextDestroyed):
(WebCore::HTMLMediaElement::stop):
(WebCore::HTMLMediaElement::pauseAfterDetachedTask): Renamed from pauseAfterDetachedTimerFired.
(WebCore::HTMLMediaElement::removedFrom):
(WebCore::HTMLMediaElement::contextDestroyed):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

* media/media-play-promise-reject-error-notsupported-expected.txt: Added.
* media/media-play-promise-reject-error-notsupported.html: Added.
* media/media-play-promise-reject-load-abort-expected.txt: Added.
* media/media-play-promise-reject-load-abort.html: Added.
* media/media-play-promise-reject-pause-abort-expected.txt: Added.
* media/media-play-promise-reject-pause-abort.html: Added.
* media/media-play-promise-reject-play-notallowed-expected.txt: Added.
* media/media-play-promise-reject-play-notallowed.html: Added.
* media/media-play-promise-reject-play-notsupported-expected.txt: Added.
* media/media-play-promise-reject-play-notsupported.html: Added.
* media/media-play-promise-resolve-expected.txt: Added.
* media/media-play-promise-resolve-when-playing-expected.txt: Added.
* media/media-play-promise-resolve-when-playing.html: Added.
* media/media-play-promise-resolve.html: Added.

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

4 years agoGet rid of a lot of calls to RefPtr::release()
cdumez@apple.com [Tue, 10 May 2016 17:23:09 +0000 (17:23 +0000)]
Get rid of a lot of calls to RefPtr::release()
https://bugs.webkit.org/show_bug.cgi?id=157505

Reviewed by Alex Christensen.

Get rid of a lot of calls to RefPtr::release() and use WTFMove() instead.

Source/WebCore:

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::addKeyTimerFired):
(WebCore::MediaKeySession::sendMessage):
(WebCore::MediaKeySession::sendError):
* Modules/geolocation/Geolocation.cpp:
(WebCore::createGeoposition):
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowIndexedDatabase::reconnectFrameFromDocumentSuspension):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::createMultiEntryArray):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::scheduleEvent):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::scheduleEvent):
* Modules/mediasource/SourceBufferList.cpp:
(WebCore::SourceBufferList::scheduleEvent):
* Modules/notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowNotifications::reconnectFrameFromDocumentSuspension):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabaseBackend):
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::unwrap):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::enqueueTextFrame):
(WebCore::WebSocketChannel::enqueueRawFrame):
(WebCore::WebSocketChannel::enqueueBlobFrame):
(WebCore::WebSocketChannel::processOutgoingFrameQueue):
* bindings/js/JSBlobCustom.cpp:
(WebCore::constructJSBlob):
* bindings/js/JSGeolocationCustom.cpp:
(WebCore::createPositionOptions):
(WebCore::JSGeolocation::getCurrentPosition):
(WebCore::JSGeolocation::watchPosition):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::fillMessagePortArray):
* bindings/js/JSSQLTransactionCustom.cpp:
(WebCore::JSSQLTransaction::executeSql):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::createScriptInstanceForWidget):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallWith):
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::generatePair):
* css/CSSBasicShapes.cpp:
(WebCore::buildSerializablePositionOffset):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForNinePieceImageRepeat):
(WebCore::counterToCSSValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSContentDistributionValue.cpp:
(WebCore::CSSContentDistributionValue::customCSSText):
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* css/CSSFilterImageValue.h:
* css/CSSGrammar.y.in:
* css/CSSNamedImageValue.cpp:
(WebCore::CSSNamedImageValue::image):
* css/CSSNamedImageValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::parseInsetRoundedCorners):
(WebCore::ShadowParseContext::commitLength):
(WebCore::CSSParser::parseShadow):
(WebCore::BorderImageSliceParseContext::commitNumber):
(WebCore::BorderImageQuadParseContext::commitNumber):
(WebCore::CSSParser::parseBorderRadius):
(WebCore::CSSParser::parseCounter):
(WebCore::CSSParser::parseDeprecatedGradient):
(WebCore::CSSParser::parseDeprecatedLinearGradient):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::parseLinearGradient):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::parseTransformValue):
(WebCore::CSSParser::parseBuiltinFilterArguments):
(WebCore::CSSParser::parseTextIndent):
(WebCore::CSSParser::popRuleData):
(WebCore::CSSParser::markRuleHeaderStart):
(WebCore::CSSParser::createViewportRule):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserValue::createCSSValue):
* css/CSSParserValues.h:
* css/CSSValueList.cpp:
(WebCore::CSSValueList::copy):
* css/CSSValueList.h:
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::svgPropertyValue):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertClipPath):
(WebCore::StyleBuilderConverter::convertReflection):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::cachedOrPendingFromValue):
(WebCore::StyleResolver::setOrPendingFromValue):
(WebCore::StyleResolver::cursorOrPendingFromValue):
* css/StyleResolver.h:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper):
* css/StyleRule.h:
* dom/Attr.cpp:
(WebCore::Attr::create):
* dom/Attr.h:
* dom/ContainerNode.h:
(WebCore::ChildNodesLazySnapshot::nextNode):
* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
(WebCore::Document::takeDOMWindowFrom):
(WebCore::Document::updateHoverActiveState):
* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::setAttributeNodeNS):
(WebCore::Element::ensureAttr):
* dom/Element.h:
* dom/MessagePort.cpp:
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::entanglePorts):
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::nextNode):
(WebCore::NodeIterator::previousNode):
* dom/Range.cpp:
(WebCore::Range::processContentsBetweenOffsets):
* dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::createBlockElement):
* editing/ApplyBlockElementCommand.h:
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::applyCommandToComposite):
(WebCore::CompositeEditCommand::appendBlockPlaceholder):
(WebCore::CompositeEditCommand::insertBlockPlaceholder):
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
(WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/CompositeEditCommand.h:
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::wrappingStyleForSerialization):
(WebCore::styleFromMatchedRulesForElement):
(WebCore::extractPropertiesNotIn):
(WebCore::backgroundColorInEffect):
* editing/EditingStyle.h:
* editing/Editor.cpp:
(WebCore::Editor::increaseSelectionListLevel):
(WebCore::Editor::increaseSelectionListLevelOrdered):
(WebCore::Editor::increaseSelectionListLevelUnordered):
(WebCore::Editor::findStringAndScrollToVisible):
(WebCore::Editor::rangeOfString):
* editing/Editor.h:
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
* editing/InsertParagraphSeparatorCommand.h:
* editing/MergeIdenticalElementsCommand.cpp:
(WebCore::MergeIdenticalElementsCommand::doUnapply):
* editing/ModifySelectionListLevel.cpp:
(WebCore::IncreaseSelectionListLevelCommand::doApply):
(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
* editing/ModifySelectionListLevel.h:
* editing/RemoveNodeCommand.cpp:
(WebCore::RemoveNodeCommand::doUnapply):
* editing/RemoveNodePreservingChildrenCommand.cpp:
(WebCore::RemoveNodePreservingChildrenCommand::doApply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::insertFragmentForTestRendering):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::doApply):
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::DictionaryLookup::rangeForSelection):
(WebCore::DictionaryLookup::rangeAtHitTestResult):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::finishRequestAutocomplete):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::scheduleEvent):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::addTextTrack):
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
* html/HTMLMediaElement.h:
* html/canvas/OESVertexArrayObject.cpp:
(WebCore::OESVertexArrayObject::createVertexArrayOES):
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::getContextAttributes):
* html/canvas/WebGLRenderingContextBase.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCue::getCueAsHTML):
(WebCore::VTTCue::createCueRenderingTree):
* html/track/VTTCue.h:
* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::createEquivalentHTMLElement):
* html/track/WebVTTElement.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTTreeBuilder::buildFromString):
(WebCore::WebVTTParser::createDocumentFragmentFromCueText):
* html/track/WebVTTParser.h:

Source/WTF:

* wtf/text/AtomicStringImpl.cpp:
(WTF::HashAndUTF8CharactersTranslator::translate):
* wtf/text/CString.cpp:
(WTF::CString::copyBufferIfNeeded):
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::allocateBufferUpConvert):
(WTF::StringBuilder::shrinkToFit):
* wtf/text/WTFString.cpp:
(WTF::String::append):
(WTF::String::insert):
(WTF::String::removeInternal):
* wtf/text/WTFString.h:
(WTF::String::String):
(WTF::String::operator=):
(WTF::String::releaseImpl):
(WTF::String::isNull): Deleted.

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

4 years agoAllow some leeway after page load before throttling, to allow post load events to...
barraclough@apple.com [Tue, 10 May 2016 17:05:50 +0000 (17:05 +0000)]
Allow some leeway after page load before throttling, to allow post load events to complete.
https://bugs.webkit.org/show_bug.cgi?id=157499

Reviewed by Ryosuke Niwa

* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
    - m_pageLoadActivityCounter now affects activity state indirecty, via m_pageLoadActivityHysteresis.
(WebCore::PageThrottler::pageLoadActivityCounterChanged):
    - counter updates hysteresis object, which in turn will affect activity state.
* page/PageThrottler.h:
    - added m_pageLoadActivityHysteresis, pageLoadActivityCounterChanged.

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

4 years agoClicks do not work in Safari after pressing the Track package button in Gmail
timothy_horton@apple.com [Tue, 10 May 2016 17:05:29 +0000 (17:05 +0000)]
Clicks do not work in Safari after pressing the Track package button in Gmail
https://bugs.webkit.org/show_bug.cgi?id=157508
<rdar://problem/22646404>

Reviewed by Anders Carlsson.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::viewDidMoveToWindow):
Explicitly cancel the force-click animation when we're removing the gesture
recognizer due to the WK*View being unparented. This works around a bug
where we don't get the cancellation callback in this situation, causing
Safari to be left in an inconsistent and unexpected state.

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

4 years ago[JSC] Fix the !ENABLE(DFG_JIT) build
ossy@webkit.org [Tue, 10 May 2016 16:34:26 +0000 (16:34 +0000)]
[JSC] Fix the !ENABLE(DFG_JIT) build
https://bugs.webkit.org/show_bug.cgi?id=157512

Reviewed by Mark Lam.

* jit/Repatch.cpp:

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

4 years agoREGRESSION (r193610): Drop down menu doesn’t expand at allofbach.com
zalan@apple.com [Tue, 10 May 2016 15:27:02 +0000 (15:27 +0000)]
REGRESSION (r193610): Drop down menu doesn’t expand at allofbach.com
https://bugs.webkit.org/show_bug.cgi?id=157445

Reviewed by Simon Fraser.

When we don't run transitions (becasuse of to/from 'auto' values) we should also not
report the 'from' value and behave as if we finished the transition already.

Source/WebCore:

Test: fast/animation/height-auto-transition-computed-value.html

* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): This is a revert of
looping the 'to' value back to the first keyframe when reverse animation is at the start value (last keyframe).

* platform/Length.cpp:
(WebCore::blend):

LayoutTests:

* fast/animation/height-auto-transition-computed-value-expected.html: Added.
* fast/animation/height-auto-transition-computed-value.html: Added.
* imported/blink/transitions/transition-not-interpolable-expected.txt:

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

4 years ago[Linux] Remove seccomp filters support
mcatanzaro@igalia.com [Tue, 10 May 2016 14:56:00 +0000 (14:56 +0000)]
[Linux] Remove seccomp filters support
https://bugs.webkit.org/show_bug.cgi?id=157380

Reviewed by Darin Adler.

.:

* Source/cmake/FindLibSeccomp.cmake: Removed.
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/WebKit2:

* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode): Deleted.
(WebKit::NetworkProcessCreationParameters::decode): Deleted.
* NetworkProcess/NetworkProcessCreationParameters.h:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Deleted.
(WebKit::WebProcessCreationParameters::decode): Deleted.
* Shared/WebProcessCreationParameters.h:
* Shared/linux/SeccompFilters/OpenSyscall.cpp: Removed.
* Shared/linux/SeccompFilters/OpenSyscall.h: Removed.
* Shared/linux/SeccompFilters/SeccompBroker.cpp: Removed.
* Shared/linux/SeccompFilters/SeccompBroker.h: Removed.
* Shared/linux/SeccompFilters/SeccompFilters.cpp: Removed.
* Shared/linux/SeccompFilters/SeccompFilters.h: Removed.
* Shared/linux/SeccompFilters/SigactionSyscall.cpp: Removed.
* Shared/linux/SeccompFilters/SigactionSyscall.h: Removed.
* Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Removed.
* Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Removed.
* Shared/linux/SeccompFilters/Syscall.cpp: Removed.
* Shared/linux/SeccompFilters/Syscall.h: Removed.
* Shared/linux/SeccompFilters/SyscallPolicy.cpp: Removed.
* Shared/linux/SeccompFilters/SyscallPolicy.h: Removed.
* Shared/linux/SeccompFilters/XDGBaseDirectory.h: Removed.
* Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Removed.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess): Deleted.
(WebKit::WebProcessPool::createNewWebProcess): Deleted.
(WebKit::WebProcessPool::cookieStorageDirectory): Deleted.
* UIProcess/WebProcessPool.h:
* WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Removed.
* WebProcess/efl/SeccompFiltersWebProcessEfl.h: Removed.
* WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Removed.
* WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Removed.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Deleted.

Tools:

* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp: Removed.
* efl/jhbuild.modules:
* gtk/jhbuild.modules:

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

4 years ago[iOS] <select> elements should render right-aligned when in RTL mode
dino@apple.com [Tue, 10 May 2016 11:41:26 +0000 (11:41 +0000)]
[iOS] <select> elements should render right-aligned when in RTL mode
https://bugs.webkit.org/show_bug.cgi?id=157501
<rdar://problem/26187870>

Reviewed by Antoine Quint.

Source/WebCore:

This is the equivalent of http://webkit.org/b/157112 for iOS.
Handle <select> elements when we're in RTL mode. This means
drawing the button with the drop-down arrow on the left
side, and the button text right-aligned.

Test: fast/forms/select-non-native-rendering-direction.html
plus a bunch of other ones that needed rebaselining.

* rendering/RenderThemeIOS.mm: Rename MenuListButtonPaddingRight to MenuListButtonPaddingAfter.
(WebCore::RenderThemeIOS::popupInternalPaddingBox): Handle both directions.
(WebCore::adjustInputElementButtonStyle):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations): Handle drawing in
RTL mode.

LayoutTests:

Rebaseline now that iOS is doing the right thing.

* platform/ios-simulator/fast/forms/select-non-native-rendering-direction-expected.txt:
* platform/ios-simulator/fast/forms/listbox-bidi-align-expected.txt:
* platform/ios-simulator/fast/forms/select-writing-direction-natural-expected.txt:
* platform/ios-simulator/fast/text/international/bidi-listbox-atsui-expected.txt:
* platform/ios-simulator/fast/text/international/bidi-listbox-expected.txt:
* platform/ios-simulator/fast/text/international/bidi-menulist-expected.txt:
* platform/ios-simulator/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:

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

4 years agoNodeList should be iterable
youenn.fablet@crf.canon.fr [Tue, 10 May 2016 09:47:44 +0000 (09:47 +0000)]
NodeList should be iterable
https://bugs.webkit.org/show_bug.cgi?id=131443
<rdar://problem/25731519>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/dom/nodeListIterator.html

Updating JSKeyValueIterator to support map and set iterators,
depending on the signature of the result type of DOMClass::Iterator::next method.
Symbol.iterator method is made the same as values method for set iterators.

Adding support for NodeList.
Updating FontFaceSet to take benefit of that.

* bindings/js/JSDOMBinding.h:
(WebCore::jsPair):.
* bindings/js/JSKeyValueIterator.h:
(WebCore::IteratorInspector::decltype): IteratorInspector detects whether the iterator is a set or map iterator.
(WebCore::IteratorInspector::test):
(WebCore::fillForEachArgumentsWithIteratorValue): Specializing according set/map iterator.
(WebCore::iteratorValueToJS): Ditto.
(WebCore::keyValueIteratorForEach):
(WebCore::JSKeyValueIterator<JSWrapper>::next):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementationIterableFunctions): Removed the line forbidding set iterators.
Making Symbol.iterator function equal to values for set iterators.
* bindings/scripts/test/JS/JSTestNode.cpp: Rebasing with set iterator functions.
* bindings/scripts/test/JS/JSTestObj.cpp: Rebasing according updated function names.
* bindings/scripts/test/TestNode.idl: Making TestNode set iterable.
* css/FontFaceSet.cpp:
(WebCore::FontFaceSet::Iterator::next): Refactoring to make it a set iterator.
* css/FontFaceSet.h:
* css/FontFaceSet.idl:
* dom/NodeList.h: Making NodeList iterable.
(WebCore::NodeList::Iterator::Iterator):
(WebCore::NodeList::Iterator::next):
(WebCore::NodeList::createIterator):
* dom/NodeList.idl:

LayoutTests:

* fast/dom/domListEnumeration-expected.txt:
* fast/dom/nodeListIterator-expected.txt: Added.
* fast/dom/nodeListIterator.html: Added.
* fast/dom/script-tests/domListEnumeration.js:
* fast/text/font-face-set-javascript-expected.txt:
* fast/text/font-face-set-javascript.html:

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

4 years ago[css-grid] Implement auto-repeat computation
svillar@igalia.com [Tue, 10 May 2016 07:46:08 +0000 (07:46 +0000)]
[css-grid] Implement auto-repeat computation
https://bugs.webkit.org/show_bug.cgi?id=157473

Reviewed by Darin Adler.

Source/WebCore:

We added support for parsing and style for the new auto-repeat syntax. This patch actually
implements the feature by computing the number of auto-repeat tracks that will be part of
the explicit grid depending on the available size on the corresponding axis.

Note that we still do not drop the empty tracks, i.e., auto-fit will work exactly as
auto-fill until the empty track removal is implemented.

Some test results are not totally correct yet because we need to add the line names to the
computed style. As that requires a rather large piece of code it will be done in a follow up
patch. Track sizes are correct though.

Tests: fast/css-grid-layout/grid-auto-fill-columns.html
       fast/css-grid-layout/grid-auto-fill-rows.html
       fast/css-grid-layout/grid-change-auto-repeat-tracks.html
       fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001.html
       fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002.html
       fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003.html
       fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004.html
       fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackRepeatFunction): Add the CSSAutoRepeatValue directly
instead of adding the track size.
* css/StyleBuilderCustom.h: Store the insertion point in style.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::guttersSize): Replaced size_t by unsigned.
(WebCore::RenderGrid::rawGridTrackSize): New function which retrieves the track size from
either explicit (including auto-repeat tracks) or implicit tracks.
(WebCore::RenderGrid::gridTrackSize): Use rawGridTrackSize().
(WebCore::RenderGrid::computeAutoRepeatTracksCount): This is the core of the patch. This
method computes the number of auto-repeat tracks that fits on the available size for a given
axis (or 1 if that's indefinite).
* rendering/RenderGrid.h:

LayoutTests:

Apart from some home made tests I'm importing 5 patches from Mozilla's test suite as they
perfectly test the behavior of auto-repeat with positioned items. I've commented auto-fit
tests as that feature isn't implemented yet.

* fast/css-grid-layout/grid-auto-fill-columns-expected.txt: Added.
* fast/css-grid-layout/grid-auto-fill-columns.html: Added.
* fast/css-grid-layout/grid-auto-fill-rows-expected.txt: Added.
* fast/css-grid-layout/grid-auto-fill-rows.html: Added.
* fast/css-grid-layout/grid-change-auto-repeat-tracks-expected.txt: Added.
* fast/css-grid-layout/grid-change-auto-repeat-tracks.html: Added.
* fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
* fast/css-grid-layout/grid-element-auto-repeat-get-set.html:
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001-expected.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-001.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002-expected.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-002.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003-expected.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-003.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004-expected.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-004.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-expected.html: Added.
* fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005.html: Added.

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

4 years agoWeb Inspector: CRASH under JSC::DebuggerCallFrame::thisValue when hitting breakpoint
commit-queue@webkit.org [Tue, 10 May 2016 06:36:42 +0000 (06:36 +0000)]
Web Inspector: CRASH under JSC::DebuggerCallFrame::thisValue when hitting breakpoint
https://bugs.webkit.org/show_bug.cgi?id=157442
<rdar://problem/24172015>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-05-09
Reviewed by Saam Barati.

Source/JavaScriptCore:

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::thisValueForCallFrame):
When the thisValue is JSValue() return undefined and avoid calling
toThisValue which would lead to a crash. Having `this` be an empty
JSValue could happen inside an ES6 class constructor, before
calling super.

LayoutTests:

* inspector/debugger/break-in-constructor-before-super-expected.txt: Added.
* inspector/debugger/break-in-constructor-before-super.html: Added.

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

4 years agoFix GTK build after r200607
achristensen@apple.com [Tue, 10 May 2016 05:04:24 +0000 (05:04 +0000)]
Fix GTK build after r200607

* Modules/notifications/Notification.h:
dir and replaceId are used in WebNotificationManager with NOTIFICATIONS and with LEGACY_NOTIFICATIONS

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

4 years agoUnreviewed, fix cloop.
fpizlo@apple.com [Tue, 10 May 2016 04:58:30 +0000 (04:58 +0000)]
Unreviewed, fix cloop.

* bytecode/ValueProfile.cpp:
(JSC::ResultProfile::emitDetectNumericness):
(JSC::ResultProfile::emitSetNonNumber):
* bytecode/ValueProfile.h:
(JSC::ResultProfile::addressOfFlags):
(JSC::ResultProfile::addressOfSpecialFastPathCount):
(JSC::ResultProfile::detectNumericness):
(JSC::ResultProfile::hasBits):

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

4 years agoFix the Windows build after r200602, and do some minor tidyup.
simon.fraser@apple.com [Tue, 10 May 2016 04:52:31 +0000 (04:52 +0000)]
Fix the Windows build after r200602, and do some minor tidyup.

* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::contentsHidden):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::contentsHidden):
(PlatformCALayerWin::setContentsHidden):
* platform/graphics/ca/win/PlatformCALayerWin.h:

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

4 years agoREGRESSION (r191922): Zoom in/Zoom Out is not working for PDFs
timothy_horton@apple.com [Tue, 10 May 2016 03:40:58 +0000 (03:40 +0000)]
REGRESSION (r191922): Zoom in/Zoom Out is not working for PDFs
https://bugs.webkit.org/show_bug.cgi?id=157503
<rdar://problem/23736297>

Reviewed by Anders Carlsson.

* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
Restore a requiresUnifiedScaleFactor that was lost in r191922.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didInitializePlugin):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Separate mainFramePluginHandlesPageScaleGesture changes out from didCommitLoadForFrame,
because the PluginView doesn't exist at this point, so it can't answer
the handlesPageScaleGesture question correctly (or at all).
Instead, we'll send the message when the main-frame PluginView is initialized.

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

4 years agoCrash beneath ObjCCallbackFunctionImpl::call
msaboff@apple.com [Tue, 10 May 2016 03:22:39 +0000 (03:22 +0000)]
Crash beneath ObjCCallbackFunctionImpl::call
https://bugs.webkit.org/show_bug.cgi?id=157491

Reviewed by Saam Barati.

Clear any exceptions after the micro task runs.

Tried creating a test case, but I don't have source for the app.
I can't seem to find the right combination of Promises and ObjC code.

* runtime/JSJob.cpp:
(JSC::JSJobMicrotask::run):

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

4 years agoiOS-scrolling test cleanup.
simon.fraser@apple.com [Tue, 10 May 2016 02:55:20 +0000 (02:55 +0000)]
iOS-scrolling test cleanup.

Move iOS scrolling tests from platform/ios-simulator/fast/scrolling/ios to fast/scrolling/ios/.
Rebaseline those that need it. Enable some in iOS WK1 if they pass.

Try to make fast/scrolling/ios/touch-scroll-visibility-hidden.html not flakey

* fast/scrolling/ios/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt: Copied from LayoutTests/platform/ios-simulator/ios/scrolling/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt.
* fast/scrolling/ios/clipping-ancestor-with-accelerated-scrolling-ancestor.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/clipping-ancestor-with-accelerated-scrolling-ancestor.html.
* fast/scrolling/ios/iframe-inside-overflow-clipping-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/iframe-inside-overflow-clipping-expected.txt.
* fast/scrolling/ios/iframe-inside-overflow-clipping.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/iframe-inside-overflow-clipping.html.
* fast/scrolling/ios/overflow-clip-with-accelerated-scrolling-ancestor-expected.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-clip-with-accelerated-scrolling-ancestor-expected.html.
* fast/scrolling/ios/overflow-clip-with-accelerated-scrolling-ancestor.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-clip-with-accelerated-scrolling-ancestor.html.
* fast/scrolling/ios/overflow-div-scrolling-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-div-scrolling-expected.txt.
* fast/scrolling/ios/overflow-div-scrolling.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-div-scrolling.html.
* fast/scrolling/ios/overflow-scroll-inherited-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scroll-inherited-expected.txt.
* fast/scrolling/ios/overflow-scroll-inherited.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scroll-inherited.html.
* fast/scrolling/ios/overflow-scroll-touch-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scroll-touch-expected.txt.
* fast/scrolling/ios/overflow-scroll-touch.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scroll-touch.html.
* fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt: Copied from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-expected.txt.
* fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt: Copied from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-size-expected.txt.
* fast/scrolling/ios/overflow-scrolling-ancestor-clip-size.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-size.html.
* fast/scrolling/ios/overflow-scrolling-ancestor-clip.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip.html.
* fast/scrolling/ios/remove-overflow-crash-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/remove-overflow-crash-expected.txt.
* fast/scrolling/ios/remove-overflow-crash.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/remove-overflow-crash.html.
* fast/scrolling/ios/resources/jump-back.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/resources/jump-back.html.
* fast/scrolling/ios/script-tests/TEMPLATE.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/script-tests/TEMPLATE.html.
* fast/scrolling/ios/script-tests/overflow-div-scrolling.js: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/script-tests/overflow-div-scrolling.js.
(verifyScrollOffset):
* fast/scrolling/ios/scroll-event-from-scrollTo-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scroll-event-from-scrollTo-expected.txt.
* fast/scrolling/ios/scroll-event-from-scrollTo.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scroll-event-from-scrollTo.html.
* fast/scrolling/ios/scroll-events-back-forward-after-pageshow-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scroll-events-back-forward-after-pageshow-expected.txt.
* fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scroll-events-back-forward-after-pageshow.html.
* fast/scrolling/ios/scroll-events-back-forward-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scroll-events-back-forward-expected.txt.
* fast/scrolling/ios/scroll-events-back-forward.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scroll-events-back-forward.html.
* fast/scrolling/ios/scrollTo-at-page-load-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scrollTo-at-page-load-expected.txt.
* fast/scrolling/ios/scrollTo-at-page-load.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scrollTo-at-page-load.html.
* fast/scrolling/ios/scrollbar-hiding-expected.txt: Copied from LayoutTests/platform/ios-simulator/ios/scrolling/scrollbar-hiding-expected.txt.
* fast/scrolling/ios/scrollbar-hiding.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scrollbar-hiding.html.
* fast/scrolling/ios/scrolling-content-clip-to-viewport-expected.txt: Copied from LayoutTests/platform/ios-simulator/ios/scrolling/scrolling-content-clip-to-viewport-expected.txt.
* fast/scrolling/ios/scrolling-content-clip-to-viewport.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scrolling-content-clip-to-viewport.html.
* fast/scrolling/ios/table-cell-touch-scrolling-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/table-cell-touch-scrolling-expected.txt.
* fast/scrolling/ios/table-cell-touch-scrolling.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/table-cell-touch-scrolling.html.
* fast/scrolling/ios/textarea-scroll-touch-expected.txt: Copied from LayoutTests/platform/ios-simulator/ios/scrolling/textarea-scroll-touch-expected.txt.
* fast/scrolling/ios/textarea-scroll-touch.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/textarea-scroll-touch.html.
* fast/scrolling/ios/touch-scroll-back-forward-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/touch-scroll-back-forward-expected.txt.
* fast/scrolling/ios/touch-scroll-back-forward.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/touch-scroll-back-forward.html.
* fast/scrolling/ios/touch-scroll-visibility-hidden-expected.txt:
* fast/scrolling/ios/touch-scroll-visibility-hidden.html:
* fast/scrolling/ios/touch-stacking-expected.txt: Copied from LayoutTests/platform/ios-simulator/ios/scrolling/touch-stacking-expected.txt.
* fast/scrolling/ios/touch-stacking.html: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/touch-stacking.html.
* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/fast/scrolling/ios/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.png: Added.
* platform/ios-simulator/fast/scrolling/ios/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt.
* platform/ios-simulator/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-expected.txt.
* platform/ios-simulator/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-size-expected.txt.
* platform/ios-simulator/fast/scrolling/ios/scrollbar-hiding-expected.png: Added.
* platform/ios-simulator/fast/scrolling/ios/scrollbar-hiding-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scrollbar-hiding-expected.txt.
* platform/ios-simulator/fast/scrolling/ios/scrolling-content-clip-to-viewport-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/scrolling-content-clip-to-viewport-expected.txt.
* platform/ios-simulator/fast/scrolling/ios/textarea-scroll-touch-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/textarea-scroll-touch-expected.txt.
* platform/ios-simulator/fast/scrolling/ios/touch-stacking-expected.png: Added.
* platform/ios-simulator/fast/scrolling/ios/touch-stacking-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/scrolling/touch-stacking-expected.txt.

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

4 years agoWeb Inspector: Filtering by Errors/Warnings should not filter Breakpoints list
mattbaker@apple.com [Tue, 10 May 2016 02:45:14 +0000 (02:45 +0000)]
Web Inspector: Filtering by Errors/Warnings should not filter Breakpoints list
https://bugs.webkit.org/show_bug.cgi?id=157481
<rdar://problem/26177346>

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
New UI strings.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction):
Only filter tree elements belonging to the scripts tree outline.
(WebInspector.DebuggerSidebarPanel):
Drive-by cleanup of Issues filter button tooltips.

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

4 years agoChange Notification constructor to take an IDL dictionary instead of a WebCore::Dicti...
darin@apple.com [Tue, 10 May 2016 02:31:03 +0000 (02:31 +0000)]
Change Notification constructor to take an IDL dictionary instead of a WebCore::Dictionary
https://bugs.webkit.org/show_bug.cgi?id=157466

Reviewed by Alex Christensen.

* Modules/notifications/Notification.cpp: Got rid of unneeded includes.
(WebCore::Notification::Notification): Deleted the unused default constructor. Changed
NotificationCenter argument to be reference rather than PassRefPtr. Changed one of the
ScriptExecutionContext arguments to be a Document since the code relies on that already.
Used the lambda form of timer creation instead of the class member form. Added a FIXME
about when m_notificationCenter can be null.
(WebCore::Notification::create): Changed NotificationCenter argument to be reference
rather than PassRefPtr. Changed options argument to be Options rather than Dictionary.
(WebCore::directionString): Added. Helper because the class still wants to store the
direction as a string, at least for now.
(WebCore::Notification::show): Streamlined the code a bit.
(WebCore::Notification::taskTimerFired): Deleted. Not needed now that we use a lambda
inside the constructor.
(WebCore::Notification::permission): Removed unneeded const from return type.
(WebCore::Notification::permissionString): Ditto.

* Modules/notifications/Notification.h: Used pragma once, updated for changes above.
Removed a number of unused functions, including cancel, setIconURL, setLang,
stopLoadingIcon, detachPresenter, setBody, startLoadingIcon, finishLoadingIcon, and
taskTimerFired.

* Modules/notifications/Notification.idl: Add NotificationOptions and pass it instead
of Dictionary to the constructor. Note that this is only a subset of what is
currently specified in the Notifications API document. The latest document specifies
a much more complex feature with lots more options.

* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::createNotification): Pass a reference rather than a
pointer to this.
* Modules/notifications/NotificationClient.h: Use pragma once. Removed unneeded
includes and forward declarations. Fixed #if to be easier to read.

* bindings/js/JSDOMConvert.h: Reworked the convert functions to use Converter and
DefaultConverter structs so we can do partial specialization in the future and so
we can get custom types for optional values. Used this to make an optional String
just be a null String, so it won't try to use Optional<String> instead. Might get
more complex latter when we add support for nullable.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateEnumerationImplementationContent): Generate a blank line to make the output
slightly clearer. Tweaked a comment.
(GenerateDefaultValue): Added. Converts the default syntax from IDL into the syntax
needed in C++ code.
(GenerateDefaultValueWithLeadingComma): Added. Helper for use below.
(GenerateDictionaryImplementationContent): Use GenerateDefaultValue and
GenerateDefaultValueWithLeadingComma to make default values.
(GenerateParametersCheck): Use GenerateDefaultValue here in the enumeration code
path. This is a step in the direction of being able to make the whole thing more
generic in the future.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
Regenerated.

* bindings/scripts/test/TestObj.idl: Simplified and extended some of the test cases
to cover more combinations of the dictionary and enumeration support.

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

4 years agoPolymorphic operands in operators coerces downstream values to double.
fpizlo@apple.com [Tue, 10 May 2016 02:01:28 +0000 (02:01 +0000)]
Polymorphic operands in operators coerces downstream values to double.
https://bugs.webkit.org/show_bug.cgi?id=151793

Reviewed by Mark Lam.
Source/JavaScriptCore:

Previously if an object flowed into arithmetic, the prediction propagation phase would either
assume that the output of the arithmetic had to be double or sometimes it would assume that it
couldn't be double. We want it to only assume that the output is double if it actually had been.

The first part of this patch is to roll out http://trac.webkit.org/changeset/200502. That removed
some of the machinery that we had in place to detect whether the output of an operation is int or
double. That changeset claimed that the machinery was "fundamentally broken". It actually wasn't.
The reason why it didn't work was that ByteCodeParser was ignoring it if likelyToTakeSlowCase was
false. I think this was a complete goof-up: the code in ByteCodeParser::makeSafe was structured
in a way that made it non-obvious that the method is a no-op if !likelyToTakeSlowCase. So, this
change rolls out r200502 and makes ResultProfile do its job by reshaping how makeSafe processes
it.

This also makes two other changes to shore up ResultProfile:
- OSR exit can now refine a ResultProfile the same way that it refines ValueProfile.
- Baseline JIT slow paths now set bits in ResultProfile.

Based on this stuff, the DFG now predicts int/double/string in op_add/op_sub/op_mul based on
ResultProfiles. To be conservative, we still only use the ResultProfiles if the incoming
prediction is not number-or-boolean. This ensures that we exactly retain our old behavior in
those cases for which it was tuned. But I hope to remove this soon. I believe that ResultProfile
is already strictly better than what prediction propagation was doing before.

This can be an enormous win. This patch adds some simple microbenchmarks that demonstrate the
problem of assuming that arithmetic on objects returns double. The most extreme of these speeds
up 8x with this change (object-int-add-array).

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addFrequentExitSite):
(JSC::CodeBlock::hasExitSite):
* bytecode/DFGExitProfile.cpp:
(JSC::DFG::FrequentExitSite::dump):
(JSC::DFG::ExitProfile::ExitProfile):
(JSC::DFG::ExitProfile::~ExitProfile):
(JSC::DFG::ExitProfile::add):
* bytecode/DFGExitProfile.h:
(JSC::DFG::FrequentExitSite::isHashTableDeletedValue):
* bytecode/MethodOfGettingAValueProfile.cpp:
(JSC::MethodOfGettingAValueProfile::fromLazyOperand):
(JSC::MethodOfGettingAValueProfile::emitReportValue):
(JSC::MethodOfGettingAValueProfile::getSpecFailBucket): Deleted.
* bytecode/MethodOfGettingAValueProfile.h:
(JSC::MethodOfGettingAValueProfile::MethodOfGettingAValueProfile):
(JSC::MethodOfGettingAValueProfile::operator bool):
(JSC::MethodOfGettingAValueProfile::operator!): Deleted.
* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::generateImpl):
* bytecode/ValueProfile.cpp:
(JSC::ResultProfile::emitDetectBitsLight):
(JSC::ResultProfile::emitSetDouble):
(JSC::ResultProfile::emitSetNonNumber):
(WTF::printInternal):
* bytecode/ValueProfile.h:
(JSC::ResultProfile::ResultProfile):
(JSC::ResultProfile::bytecodeOffset):
(JSC::ResultProfile::specialFastPathCount):
(JSC::ResultProfile::didObserveNonInt32):
(JSC::ResultProfile::didObserveDouble):
(JSC::ResultProfile::didObserveNonNegZeroDouble):
(JSC::ResultProfile::didObserveNegZeroDouble):
(JSC::ResultProfile::didObserveNonNumber):
(JSC::ResultProfile::didObserveInt32Overflow):
(JSC::ResultProfile::didObserveInt52Overflow):
(JSC::ResultProfile::setObservedNonNegZeroDouble):
(JSC::ResultProfile::setObservedNegZeroDouble):
(JSC::ResultProfile::setObservedNonNumber):
(JSC::ResultProfile::setObservedInt32Overflow):
(JSC::ResultProfile::addressOfFlags):
(JSC::ResultProfile::addressOfSpecialFastPathCount):
(JSC::ResultProfile::detectBitsLight):
(JSC::ResultProfile::hasBits):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeSafe):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::ensureNaturalLoops):
(JSC::DFG::Graph::methodOfGettingAValueProfileFor):
(JSC::DFG::Graph::valueProfileFor): Deleted.
* dfg/DFGGraph.h:
(JSC::DFG::Graph::hasExitSite):
(JSC::DFG::Graph::numBlocks):
* dfg/DFGNode.h:
(JSC::DFG::Node::arithNodeFlags):
(JSC::DFG::Node::mayHaveNonIntResult):
(JSC::DFG::Node::mayHaveDoubleResult):
(JSC::DFG::Node::mayHaveNonNumberResult):
(JSC::DFG::Node::hasConstantBuffer):
* dfg/DFGNodeFlags.cpp:
(JSC::DFG::dumpNodeFlags):
* dfg/DFGNodeFlags.h:
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::branchIfEqual):
(JSC::AssemblyHelpers::branchIfNotCell):
(JSC::AssemblyHelpers::branchIfNotNumber):
(JSC::AssemblyHelpers::branchIfNotDoubleKnownNotInt32):
(JSC::AssemblyHelpers::branchIfBoolean):
(JSC::AssemblyHelpers::branchIfEmpty):
(JSC::AssemblyHelpers::branchStructure):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::CCallHelpers):
(JSC::CCallHelpers::setupArguments):
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/IntrinsicEmitter.cpp:
(JSC::AccessCase::emitIntrinsicGetter):
* jit/JIT.h:
* jit/JITAddGenerator.cpp:
(JSC::JITAddGenerator::generateFastPath):
* jit/JITAddGenerator.h:
(JSC::JITAddGenerator::JITAddGenerator):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emitSlow_op_mul):
(JSC::JIT::emit_op_sub):
(JSC::JIT::emitSlow_op_sub):
* jit/JITInlines.h:
(JSC::JIT::callOperation):
(JSC::JIT::callOperationNoExceptionCheck):
* jit/JITMulGenerator.cpp:
(JSC::JITMulGenerator::generateFastPath):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITSubGenerator.cpp:
(JSC::JITSubGenerator::generateFastPath):
* jit/JITSubGenerator.h:
(JSC::JITSubGenerator::JITSubGenerator):
* jit/TagRegistersMode.cpp: Added.
(WTF::printInternal):
* jit/TagRegistersMode.h: Added.
* runtime/CommonSlowPaths.cpp:
(JSC::updateResultProfileForBinaryArithOp):

LayoutTests:

* js/regress/object-int-add-array-expected.txt: Added.
* js/regress/object-int-add-array.html: Added.
* js/regress/object-int-add-expected.txt: Added.
* js/regress/object-int-add.html: Added.
* js/regress/object-int-mul-array-expected.txt: Added.
* js/regress/object-int-mul-array.html: Added.
* js/regress/object-int-sub-array-expected.txt: Added.
* js/regress/object-int-sub-array.html: Added.
* js/regress/object-int-sub-expected.txt: Added.
* js/regress/object-int-sub.html: Added.
* js/regress/script-tests/object-int-add-array.js: Added.
(i.o.valueOf):
* js/regress/script-tests/object-int-add.js: Added.
(i.o.valueOf):
* js/regress/script-tests/object-int-mul-array.js: Added.
(i.o.valueOf):
* js/regress/script-tests/object-int-sub-array.js: Added.
(i.o.valueOf):
* js/regress/script-tests/object-int-sub.js: Added.
(i.o.valueOf):

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

4 years agoREGRESSION: Web Inspector: DOM path bar blinks when modifying inline styles
nvasilyev@apple.com [Tue, 10 May 2016 01:40:26 +0000 (01:40 +0000)]
REGRESSION: Web Inspector: DOM path bar blinks when modifying inline styles
https://bugs.webkit.org/show_bug.cgi?id=149258
<rdar://problem/22737843>

Reviewed by Timothy Hatcher.

* UserInterface/Base/Utilities.js:
(Array.shallowEqual):
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
(WebInspector.ContentBrowser.prototype._removeAllNavigationItems):
Don't re-render the navigation bar when all new navigation items match the previous ones.

* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.set components.let.componentsEqual):
(WebInspector.HierarchicalPathNavigationItem.prototype.set components):
Don't re-render HierarchicalPathComponent when all new path components match the previous ones.

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

4 years agoLand correct result for a recently added test.
simon.fraser@apple.com [Tue, 10 May 2016 01:35:48 +0000 (01:35 +0000)]
Land correct result for a recently added test.

* fast/scrolling/ios/touch-scroll-visibility-hidden-expected.txt:

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

4 years agoModern IDB: Have server database connections remember the OpenDB request that spawned...
beidson@apple.com [Tue, 10 May 2016 00:59:33 +0000 (00:59 +0000)]
Modern IDB: Have server database connections remember the OpenDB request that spawned them.
https://bugs.webkit.org/show_bug.cgi?id=157498

Reviewed by Tim Horton.

No new tests (No testable change in behavior, debug only for now).

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

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::create):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didFireVersionChangeEvent):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::openRequestIdentifier):

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

4 years ago[iOS] visibility:hidden -webkit-overflow-scrolling: touch divs can interfere with...
simon.fraser@apple.com [Tue, 10 May 2016 00:20:27 +0000 (00:20 +0000)]
[iOS] visibility:hidden -webkit-overflow-scrolling: touch divs can interfere with page scrolling
https://bugs.webkit.org/show_bug.cgi?id=157496
Source/WebCore:

Reviewed by Tim Horton.

UIScrollViews are constructed in the UI process for visibility:hidden scrollable elements
with -webkit-overflow-scrolling: touch, and these intercept user events when they should not.

Fix by propagating a "contentsHidden" flag from the web process which is used to turn off
user interaction on these views.

Test: fast/scrolling/ios/touch-scroll-visibility-hidden.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateContentsVisibility): We have to tell the scrolling layer
if we have visibility:hidden.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::contentsHidden):
(PlatformCALayerCocoa::setContentsHidden):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterDescendants):

Source/WebKit2:

rdar://problem/22963278

Reviewed by Tim Horton.

UIScrollViews are constructed in the UI process for visibility:hidden scrollable elements
with -webkit-overflow-scrolling: touch, and these intercept user events when they should not.

Fix by propagating a "contentsHidden" flag from the web process which is used to turn off
user interaction on these views.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]): Our custom hit
test needs to take view.isUserInteractionEnabled into account.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::setHidden):
(WebKit::PlatformCALayerRemote::contentsHidden):
(WebKit::PlatformCALayerRemote::setContentsHidden):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:

Tools:

rdar://problem/22963278

Reviewed by Tim Horton.

Enhance UIScriptController to generate a drag, which is useful for scrolling.

* WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl:
* WebKitTestRunner/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::dragFromPointToPoint):
* WebKitTestRunner/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/HIDEventGenerator.h:
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator dragWithStartPoint:endPoint:duration:completionBlock:]):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::dragFromPointToPoint):

LayoutTests:

rdar://problem/22963278

Reviewed by Tim Horton.

Add a fast/scrolling/ios directory, disable it everywhere except on iOS.

* TestExpectations:
* fast/scrolling/ios/touch-scroll-visibility-hidden-expected.txt: Added.
* fast/scrolling/ios/touch-scroll-visibility-hidden.html: Added.
* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoWeb Font is downloaded even when all the characters in the document are outside its...
mmaxfield@apple.com [Tue, 10 May 2016 00:13:01 +0000 (00:13 +0000)]
Web Font is downloaded even when all the characters in the document are outside its unicode-range
https://bugs.webkit.org/show_bug.cgi?id=42154
<rdar://problem/17779042>

Reviewed by Darin Adler.

Source/WebCore:

Fonts are requested in two stages:
- For a given font family, all the relevant @font-face rules are consulted. We build up a
mapping of unicode-range -> Font object. This result is cached.
- Then, when we have the mapping, we look up the character we are trying to render to
find the appropriate Font object.

However, we are not supposed to create any Font objects (because that causes a download to
be triggered) until we consult with the character we're trying to render. Therefore, this
patch swaps out the Font objects with a FontAccessor. This FontAccessor is essentially a
lazily-created Font. When step 2 starts looking up the appropriate character, the
FontAccessor will be asked to start the download.

Test: fast/text/unicode-range-download.html

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::removeClient):
as a client from all its CSSFontFaces.
* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::clear): Clearing the CSSFontFaceSet needs to remove itself as a
client from all its CSSFontFaces.
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSFontAccessor::create): The lazy Font object.
(WebCore::CSSFontAccessor::CSSFontAccessor): Ditto.
(WebCore::appendFontWithInvalidUnicodeRangeIfLoading): Appends a FontAccessor.
(WebCore::CSSSegmentedFontFace::fontRanges): Create the FontAccessor and use it instead.
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::determinePitch): Use the fontForFirstRange() convenience
function.
(WebCore::glyphPageFromFontRanges): font() may now return nullptr. Update this function to
handle that.
* platform/graphics/FontRanges.cpp:
(WebCore::FontRanges::Range::font): Trigger the lazy initialization.
(WebCore::TrivialFontAccessor::create): Used in the case where there is only one font in
the Ranges object and it has a full unicode-range.
(WebCore::TrivialFontAccessor::TrivialFontAccessor):
(WebCore::FontRanges::FontRanges): Use TrivialFontAccessor.
(WebCore::FontRanges::glyphDataForCharacter): font() may now return nullptr. Update this
function to handle that. This is where the magic happens: this is where we trigger
downloads only if the character falls within the unicode-range.
(WebCore::FontRanges::fontForFirstRange): Add ASSERT.
(WebCore::FontRanges::isLoading): Update to use the new FontAccessor.
* platform/graphics/FontRanges.h: Ditto.
(WebCore::FontRanges::Range::Range):
(WebCore::FontRanges::Range::fontAccessor):
(WebCore::FontRanges::appendRange):
(WebCore::FontRanges::Range::font): Deleted.
* platform/graphics/FontSelector.h: The virtual base class of FontAccessor. This is
necessary because it must be shared between platform code and non-platform code.
(WebCore::FontAccessor::~FontAccessor):

LayoutTests:

* fast/text/unicode-range-download-expected.txt: Added.
* fast/text/unicode-range-download.html: Added.
* fast/text/resources/unicode-range-download-Ahem.otf: Added.
* fast/text/resources/unicode-range-download-Ahem.ttf: Added.
* fast/text/resources/unicode-range-download-Ahem.woff: Added.
* imported/blink/svg/custom/resources/graffiti.svg: Added.
imported/blink/svg/custom/svg-fonts-unloaded-segment.html requires this font.

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

4 years agoWeb Inspector: Remove Global Breakpoints folder
mattbaker@apple.com [Tue, 10 May 2016 00:02:30 +0000 (00:02 +0000)]
Web Inspector: Remove Global Breakpoints folder
https://bugs.webkit.org/show_bug.cgi?id=157478
<rdar://problem/26176524>

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
Remove UI string.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
Remove references to folder tree element.

(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
Top level comparison should check for "special" breakpoints.

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

4 years ago[WebKit1] Invoking a link preview on a complex link (e.g. an image) results in an...
timothy_horton@apple.com [Tue, 10 May 2016 00:00:06 +0000 (00:00 +0000)]
[WebKit1] Invoking a link preview on a complex link (e.g. an image) results in an empty TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=157497
<rdar://problem/25872773>

Reviewed by Anders Carlsson.

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _defaultAnimationController]):
r198578 fixed this for WebKit2, but forgot about WebKit1.

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

4 years agoModern IDB: Prevent the same transaction from being commited/aborted twice.
beidson@apple.com [Mon, 9 May 2016 23:59:55 +0000 (23:59 +0000)]
Modern IDB: Prevent the same transaction from being commited/aborted twice.
https://bugs.webkit.org/show_bug.cgi?id=157494

Reviewed by Tim Horton.

When a page navigates or a worker terminates, in rare cases with specific unfortunate timing, the IDBServer
might receive a request to commit/abort a transaction that is already in the process of committing/aborting.

By moving transactions that are finishing into their own map we can at least detect this situation and
return an error. This seems like an improvement over some mysterious ASSERTs/timeouts.

No new tests:
While apparent that this is at least partially to blame for some existing timeouts/ASSERTs, I could not nail
down a reliable way to reproduce this with a dedicated test.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::prepareToFinishTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::hasUnfinishedTransactions):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::transactionCompleted): Renamed from inProgressTransactionCompleted.
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

4 years agoCallObjectConstructor should not call operationToThis in the FTL
keith_miller@apple.com [Mon, 9 May 2016 23:51:20 +0000 (23:51 +0000)]
CallObjectConstructor should not call operationToThis in the FTL
https://bugs.webkit.org/show_bug.cgi?id=157492
<rdar://problem/26149904>

Reviewed by Mark Lam.

At some point when I was working on intrinsifying the Object
constructor, I realized that the Object constructor was different
from the ToObject operation. I fixed the DFG but I guess I didn't
fix the FTL.

This patch fixes an issue with www.wunderground.com not loading
the 10-day forecast and local map.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallObjectConstructor):
* tests/stress/call-object-constructor.js: Added.
(test):
(assert):

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

4 years agoDraw border and correct icon for placeholder attachments
timothy_horton@apple.com [Mon, 9 May 2016 23:48:17 +0000 (23:48 +0000)]
Draw border and correct icon for placeholder attachments
https://bugs.webkit.org/show_bug.cgi?id=157495
rdar://problem/19982510

Reviewed by Anders Carlsson.

* Resources/AttachmentPlaceholder.png: Added.
* Resources/AttachmentPlaceholder@2x.png: Added.
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderThemeMac.mm:
(WebCore::attachmentPlaceholderBorderColor):
(WebCore::paintAttachmentIconPlaceholder):
(WebCore::paintAttachmentProgress):
(WebCore::paintAttachmentPlaceholderBorder):
(WebCore::RenderThemeMac::paintAttachment):
If progress is set, but set to 0, draw a dashed border around the attachment
and use the placeholder "download" artwork.

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

4 years agoIntroduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and...
adachan@apple.com [Mon, 9 May 2016 22:50:34 +0000 (22:50 +0000)]
Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
https://bugs.webkit.org/show_bug.cgi?id=157493

Reviewed by Dan Bernstein.

Source/WebCore:

* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen):

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):

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

4 years agoWeb Inspector: Heap Snapshot Timeline view can be live
mattbaker@apple.com [Mon, 9 May 2016 22:01:30 +0000 (22:01 +0000)]
Web Inspector: Heap Snapshot Timeline view can be live
https://bugs.webkit.org/show_bug.cgi?id=157487
<rdar://problem/26178439>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData): Deleted.
Don't override, should return true.

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

4 years agoClean up iOS text autosizing code
simon.fraser@apple.com [Mon, 9 May 2016 21:57:43 +0000 (21:57 +0000)]
Clean up iOS text autosizing code
https://bugs.webkit.org/show_bug.cgi?id=157489

Reviewed by Zalan Bujtas.

Change the TraverseNextInclusionFunction and HeightTypeTraverseNextInclusionFunction
to take references.

Use downcast<> more.

Whitespace cleanup.

* rendering/RenderBlockFlow.cpp:
(WebCore::isNonBlocksOrNonFixedHeightListItems):
* rendering/RenderElement.cpp:
(WebCore::includeNonFixedHeight):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::traverseNext):
* rendering/RenderObject.h:
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustNodeSizes):
(WebCore::TextAutoSizingValue::reset):

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

4 years agoAdd WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
adachan@apple.com [Mon, 9 May 2016 21:53:43 +0000 (21:53 +0000)]
Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
https://bugs.webkit.org/show_bug.cgi?id=157434

Reviewed by Darin Adler.

* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageIsPlayingVideoInEnhancedFullscreen):
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen):
* UIProcess/WebPageProxy.h:

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

4 years agoAdd injected bundle SPI for getting favicon and touch icon URLs
andersca@apple.com [Mon, 9 May 2016 20:41:31 +0000 (20:41 +0000)]
Add injected bundle SPI for getting favicon and touch icon URLs
https://bugs.webkit.org/show_bug.cgi?id=157435

Reviewed by Darin Adler.

Source/WebCore:

* CMakeLists.txt:
Add new files.

* WebCore.xcodeproj/project.pbxproj:
Add new files.

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::iconType):
* html/HTMLLinkElement.h:
Rename LinkRelAttribute::IconType to LinkIconType.

* html/LinkIconCollector.cpp: Added.
(WebCore::iconSize):
New helper function that returns the icon size for an icon.

(WebCore::compareIcons):
Icon comparison function, to be used by for sorting.

(LinkIconCollector::iconsOfTypes):
Gather the right icons, sort them (descending by size) and return them.

* html/LinkIconCollector.h:
Added.

* html/LinkIconType.h:
Move icon type declarations here and arrange them so we can use them in an OptionSet.

* html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute):
* html/LinkRelAttribute.h:
* loader/icon/IconController.cpp:
(WebCore::iconFromLinkElements):
Rename IconType to LinkIconType.

Source/WebKit2:

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(collectIcons):
New helper function that calls into the WebCore LinkCollector.

(-[WKWebProcessPlugInFrame appleTouchIconURLs]):
Call collectIcons.

(-[WKWebProcessPlugInFrame faviconURLs]):
Ditto.

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

4 years agoRemove testRunner.setTextAutosizingEnabled and migrate the one test that uses it
simon.fraser@apple.com [Mon, 9 May 2016 20:22:58 +0000 (20:22 +0000)]
Remove testRunner.setTextAutosizingEnabled and migrate the one test that uses it
https://bugs.webkit.org/show_bug.cgi?id=157480

Reviewed by Zalan Bujtas.

Migrate the one test that used testRunner.setTextAutosizingEnabled() to window.internals.settings.setTextAutosizingEnabled()
and move it next to the other iOS text autosizing tests.
Tools:

Remove testRunner.setTextAutosizingEnabled(), which was only implemented in DumpRenderTree.

* DumpRenderTree/TestRunner.cpp:
(setTextAutosizingEnabledCallback): Deleted.
(TestRunner::staticFunctions): Deleted.
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setTextAutosizingEnabled): Deleted.

LayoutTests:

* fast/text-autosizing/ios/textarea-auto-sizing-disable-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt.
* fast/text-autosizing/ios/textarea-auto-sizing-disable.html: Renamed from LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html.
* platform/ios-simulator/TestExpectations:

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

4 years agoUpstream some iOS text autosizing tests.
simon.fraser@apple.com [Mon, 9 May 2016 20:22:54 +0000 (20:22 +0000)]
Upstream some iOS text autosizing tests.

* fast/text-autosizing/ios/anonymous-block.html: Added.
* fast/text-autosizing/ios/contenteditable.html: Added.
* fast/text-autosizing/ios/first-letter.html: Added.
* fast/text-autosizing/ios/font-family-case-insensitive-expected.txt: Added.
* fast/text-autosizing/ios/font-family-case-insensitive.html: Added.
* fast/text-autosizing/ios/lists.html: Added.
* fast/text-autosizing/ios/overflow.html: Added.
* fast/text-autosizing/ios/percent-adjust-length-line-height-expected.txt: Added.
* fast/text-autosizing/ios/percent-adjust-length-line-height.html: Added.
* fast/text-autosizing/ios/percent-adjust-number-line-height-expected.txt: Added.
* fast/text-autosizing/ios/percent-adjust-number-line-height.html: Added.
* fast/text-autosizing/ios/percent-adjust-percent-line-height-expected.txt: Added.
* fast/text-autosizing/ios/percent-adjust-percent-line-height.html: Added.
* platform/ios-simulator/fast/text-autosizing/ios/anonymous-block-expected.txt: Added.
* platform/ios-simulator/fast/text-autosizing/ios/contenteditable-expected.txt: Added.
* platform/ios-simulator/fast/text-autosizing/ios/first-letter-expected.txt: Added.
* platform/ios-simulator/fast/text-autosizing/ios/lists-expected.txt: Added.
* platform/ios-simulator/fast/text-autosizing/ios/overflow-expected.txt: Added.
* platform/mac/fast/text-autosizing/ios/anonymous-block-expected.txt: Added.
* platform/mac/fast/text-autosizing/ios/contenteditable-expected.txt: Added.
* platform/mac/fast/text-autosizing/ios/first-letter-expected.txt: Added.
* platform/mac/fast/text-autosizing/ios/lists-expected.txt: Added.
* platform/mac/fast/text-autosizing/ios/overflow-expected.txt: Added.

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

4 years ago[iOS WK2] Font size increases on some pages after navigating then going back
simon.fraser@apple.com [Mon, 9 May 2016 20:22:47 +0000 (20:22 +0000)]
[iOS WK2] Font size increases on some pages after navigating then going back
https://bugs.webkit.org/show_bug.cgi?id=157441
rdar://problem/22873240

Reviewed by Darin Adler.

Source/WebCore:

Sometimes I want to dump ViewportConfigurations from WebKit2 so export dump().

Test: fast/text-autosizing/ios/text-autosizing-after-back.html

* page/ViewportConfiguration.h:

Source/WebKit2:

There's an ordering dependency between setting the viewport configuration and doing
layouts when going back to a page from the page cache that is incorrectly handled.

In FrameLoader::commitProvisionalLoad(), CachedPage::restore() triggers a layout under
updateContentsSize(), but this happens before dispatchDidCommitLoad() which updates
the viewport arguments via ViewportConfiguration::setViewportArguments().

This issue is not addressed by the current commit. But a second problem is:
if the inputs to text autosizing change, we need to invalidate the autosizing state.
The relevant input here is the fixed layout width (which is determined from the viewport
configuration).

The current code invalidated text autosizing when m_viewportConfiguration.minimumLayoutSize()
changed, but the correct behavior is to invalidate based on fixed layout size changing.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):
(WebKit::WebPage::setFixedLayoutSize):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::resetTextAutosizing):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize): Deleted.
(WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded): Deleted.

LayoutTests:

* fast/text-autosizing/ios/text-autosizing-after-back-expected.html: Added.
* fast/text-autosizing/ios/text-autosizing-after-back.html: Added.

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

4 years ago"Main content" restrictions should not apply to media documents
eric.carlson@apple.com [Mon, 9 May 2016 20:18:15 +0000 (20:18 +0000)]
"Main content" restrictions should not apply to media documents
https://bugs.webkit.org/show_bug.cgi?id=157479
<rdar://problem/25840861>

Reviewed by Jer Noble.

No new tests, this change only applies to media documents in a top level document so it
isn't possible to have a layout test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Don't apply restrictions to a media document.

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

4 years agoGetter and setter on super are called with wrong "this" object
sbarati@apple.com [Mon, 9 May 2016 20:17:23 +0000 (20:17 +0000)]
Getter and setter on super are called with wrong "this" object
https://bugs.webkit.org/show_bug.cgi?id=147064
<rdar://problem/21885916>

Reviewed by Filip Pizlo.

This patch implements calls to 'super' getters and setters.
The problem before is we were passing the 'super' (i.e, the prototype
object) as the this value to these getters/setters, which is wrong.
We should be passing the caller's this value.

To implement this behavior, I've introduced four new opcodes and their corresponding DFG nodes:
- op_get_by_id_with_this | GetByIdWithThis
- op_put_by_id_with_this | PutByIdWithThis
- op_get_by_val_with_this | GetByValWithThis
- op_put_by_val_with_this | PutByValWithThis

These are implemented with no optimizations. The future plan is
to unite them with the *by_id and *by_val opcodes and nodes:
https://bugs.webkit.org/show_bug.cgi?id=157215

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetById):
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::emitPutByVal):
(JSC::BytecodeGenerator::emitDirectPutByVal):
(JSC::BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::ensureThis):
(JSC::BytecodeGenerator::isThisUsedInInnerArrowFunction):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ThisNode::emitBytecode):
(JSC::emitHomeObjectForCallee):
(JSC::emitSuperBaseForCallee):
(JSC::emitGetSuperFunctionForConstruct):
(JSC::SuperNode::emitBytecode):
(JSC::NewTargetNode::emitBytecode):
(JSC::TaggedTemplateNode::emitBytecode):
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::PostfixNode::emitBracket):
(JSC::PostfixNode::emitDot):
(JSC::PrefixNode::emitBracket):
(JSC::PrefixNode::emitDot):
(JSC::AssignDotNode::emitBytecode):
(JSC::ReadModifyDotNode::emitBytecode):
(JSC::AssignBracketNode::emitBytecode):
(JSC::ReadModifyBracketNode::emitBytecode):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::AssignmentElementNode::bindValue):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasIdentifier):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
(JSC::DFG::newTypedArrayWithSize):
(JSC::DFG::putWithThis):
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByValWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByValWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compilePutById):
* jit/CCallHelpers.cpp:
(JSC::CCallHelpers::setupShadowChickenPacket):
(JSC::CCallHelpers::setupFourStubArgsGPR):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
(JSC::CCallHelpers::setupThreeStubArgsGPR):
(JSC::CCallHelpers::setupTwoStubArgsFPR):
(JSC::CCallHelpers::setupStubArguments134):
* jit/GPRInfo.h:
(JSC::argumentRegisterFor): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_put_by_val_with_this):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emit_op_get_by_val_with_this):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emit_op_put_by_id_with_this):
(JSC::JIT::emitSlow_op_put_by_id):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_put_to_arguments):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emit_op_get_by_val_with_this):
(JSC::JIT::emit_op_put_by_id_with_this):
(JSC::JIT::emit_op_put_by_val_with_this):
* llint/LowLevelInterpreter.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* tests/stress/super-property-access-exceptions.js: Added.
(assert):
(test):
(test.fooProp):
(test.A.prototype.get foo):
(test.A.prototype.get x):
(test.A):
(test.B):
(test.B.prototype.bar):
(test.B.prototype.baz):
(test.foo):
(test.func):
(test.A.prototype.set foo):
* tests/stress/super-property-access-tdz.js: Added.
(assert):
(test):
(shouldThrowTDZ):
(test.A.prototype.get foo):
(test.A.prototype.set foo):
(test.A):
(test.fooProp):
(test.B):
(test.C):
(test.D):
(test.E):
(test.F):
* tests/stress/super-property-access.js: Added.
(assert):
(test):
(func):
(test.A):
(test.A.prototype.set value):
(test.A.prototype.get value):
(test.B.prototype.set value):
(test.B.prototype.get value):
(test.B):
(test.value):
(test.A.prototype.get func):
(test.B.prototype.inc):
(test.B.prototype.dec):
(test.B.prototype.preInc):
(test.B.prototype.preDec):
(test.B.prototype.plusEq):
(test.B.prototype.minusEq):
(test.B.prototype.timesEq):
(test.B.prototype.divEq):
(test.B.prototype.funcDot):
(test.B.prototype.funcBracket):
(test.foo):
(test.B.prototype.baz):
(test.B.prototype.jaz):
(test.B.prototype.bar):
(test.B.prototype.index):
(test.):
(test.prototype.bar):
(test.A.prototype.set foo):
(test.A.prototype.get array):
(test.A.prototype.get foo):
(test.obj):
(test.A.prototype.get call):
(test.A.prototype.get apply):
(test.B.prototype.foo):
(test.A.prototype.get i):

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

4 years agoRebaseline failing LayoutTests after r200580
ryanhaddad@apple.com [Mon, 9 May 2016 20:10:59 +0000 (20:10 +0000)]
Rebaseline failing LayoutTests after r200580

Unreviewed test gardening.

* fast/xmlhttprequest/xmlhttprequest-get-expected.txt:
* http/tests/workers/worker-importScriptsOnError-expected.txt:
* inspector/model/remote-object-get-properties-expected.txt:

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

4 years agoUpdate Picture-in-picture artwork
dino@apple.com [Mon, 9 May 2016 20:07:21 +0000 (20:07 +0000)]
Update Picture-in-picture artwork
https://bugs.webkit.org/show_bug.cgi?id=157484
<rdar://problem/26177784>

Reviewed by Eric Carlson.

We have new artwork for the picture-in-picture presentation mode. I
also converted it to use SVG (and moved the button style to a
more consistent part of the file).

* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-controls-panel .picture-in-picture-button):
(video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):
(video::-webkit-media-controls-panel .picture-in-picture-button:active):
(video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture:active):

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

4 years agoOptimize [StrictTypeChecking] on IDL operations
cdumez@apple.com [Mon, 9 May 2016 19:46:35 +0000 (19:46 +0000)]
Optimize [StrictTypeChecking] on IDL operations
https://bugs.webkit.org/show_bug.cgi?id=157467

Reviewed by Darin Adler.

Source/WebCore:

Optimize [StrictTypeChecking] on IDL operations so that:
- Only generate extra code for nullable parameters because for non-nullable
  parameters, JSXXX::toWrapped() will return null in case of a bad input
  type. We will then throw a TypeError when null-checking it already.
- After the JSValue::isNullOrUndefined() check, avoid calling
  JSXXX::toWrapped() and set nativeValue to nullptr directly.
- Drop the check for JSValue::inherits(JSXXX::info()) and just do a null
  check on the value returned by JSXXX::toWrapped(). toWrapped() already
  does a JSValue::inherits(JSXXX::info() check. Since we only call
  toWrapped() if the JSValue is not null/undefined, a null return value
  always indicates a bad input type.

Also update the TypeError message to be more useful when passing null
for non-nullable parameters or assigning null to a non-nullable
attribute. The message is now consistent with the one used for strict
type checking.

No new tests, rebaselined existing tests.

* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::setJSTestInterfaceImplementsNode):
(WebCore::setJSTestInterfaceSupplementalNode):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjTestObjAttr):
(WebCore::setJSTestObjLenientTestObjAttr):
(WebCore::setJSTestObjXMLObjAttr):
(WebCore::setJSTestObjTypedArrayAttr):
(WebCore::setJSTestObjWithScriptExecutionContextAttribute):
(WebCore::setJSTestObjWithScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors2):
(WebCore::constructJSTestOverloadedConstructors3):
* bindings/scripts/test/TestObj.idl:

LayoutTests:

Rebaseline existing tests now that we provide a more useful exception
message when passing null for a non-nullable parameter and assigning
null to a non-nullable attribute.

* editing/selection/extend-expected.txt:
* fast/dom/Document/adoptNode-null-expected.txt:
* fast/dom/Document/adoptNode-null.html:
* fast/dom/Document/importNode-null-expected.txt:
* fast/dom/Document/importNode-null.html:
* fast/dom/Element/attr-param-typechecking-expected.txt:
* fast/dom/MutationObserver/observe-exceptions-expected.txt:
* fast/dom/NamedNodeMap-setNamedItem-crash-expected.txt:
* fast/dom/Range/range-intersectsNode-expected.txt:
* fast/dom/createNodeIterator-parameters-expected.txt:
* fast/dom/createNodeIterator-parameters.html:
* fast/dom/createTreeWalker-parameters-expected.txt:
* fast/dom/createTreeWalker-parameters.html:
* fast/dom/xmlserializer-serialize-to-string-exception-expected.txt:
* fast/dynamic/insertAdjacentElement-expected.txt:
* fast/mediastream/MediaStream-add-remove-null-undefined-tracks-expected.txt:
* fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt:
* fast/text/font-face-set-javascript-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* media/encrypted-media/encrypted-media-v2-syntax-expected.txt:
* media/encrypted-media/encrypted-media-v2-syntax.html:
* webaudio/createMediaStreamSource-null-expected.txt:
* webaudio/createMediaStreamSource-null.html:
* webaudio/decode-audio-data-basic-expected.txt:
* webaudio/decode-audio-data-basic.html:
* webaudio/mediaelementaudiosourcenode-expected.txt:
* webaudio/mediaelementaudiosourcenode.html:

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

4 years agoDownload progress on attachment elements sometimes exceeds element bounds
timothy_horton@apple.com [Mon, 9 May 2016 18:05:20 +0000 (18:05 +0000)]
Download progress on attachment elements sometimes exceeds element bounds
https://bugs.webkit.org/show_bug.cgi?id=157440
<rdar://problem/25245440>

Reviewed by Darin Adler.

In the case of very large dynamic type sizes, we can overflow the
bounds of the attachment. It turns out that we used to limit to one
line in many cases anyway, so only wrap if we have only a title and/or icon.
This looks better when you have many of the other elements even in
non-large-type modes.

* rendering/RenderThemeIOS.mm:
(WebCore::AttachmentInfo::buildTitleLines):
(WebCore::AttachmentInfo::AttachmentInfo):
Limit the title to a single line if we have anything
other than a title and icon.

(WebCore::attachmentBorderPath):
(WebCore::paintAttachmentBorder):
(WebCore::RenderThemeIOS::paintAttachment):
Clip to the border, so that even if somehow we paint outside of
the bounds, we don't paint over other parts of the page.

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

4 years agoFocusing a shadow host places the slot content after the shadow DOM content
rniwa@webkit.org [Mon, 9 May 2016 17:48:49 +0000 (17:48 +0000)]
Focusing a shadow host places the slot content after the shadow DOM content
https://bugs.webkit.org/show_bug.cgi?id=154770
<rdar://problem/24873102>

Reviewed by Antti Koivisto.

Add a regression test now that the bug has been fixed.

* fast/shadow-dom/shadow-layout-after-focus-expected.html: Added.
* fast/shadow-dom/shadow-layout-after-focus.html: Added.

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

4 years agoREGRESSION (198056): Unable to use edit buttons on WordPress
rniwa@webkit.org [Mon, 9 May 2016 17:47:01 +0000 (17:47 +0000)]
REGRESSION (198056): Unable to use edit buttons on WordPress
https://bugs.webkit.org/show_bug.cgi?id=157475

Reviewed by Antti Koivisto.

Source/WebCore:

Renamed Event.prototype.deepPath() to composedPath() per discussions on
https://github.com/whatwg/dom/issues/242 as the old name was not Web compatible.

Test: fast/shadow-dom/Extensions-to-Event-Interface.html

* dom/Event.cpp:
(WebCore::Event::composedPath): Renamed from deepPath.
* dom/Event.h:
* dom/Event.idl:

LayoutTests:

Updated the tests.

* fast/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* fast/shadow-dom/Extensions-to-Event-Interface.html:
* fast/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithLog):

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

4 years agoRemoving timeout and adding failure expectation for storage/indexeddb/intversion...
ryanhaddad@apple.com [Mon, 9 May 2016 17:32:10 +0000 (17:32 +0000)]
Removing timeout and adding failure expectation for storage/indexeddb/intversion-open-in-upgradeneeded.html
https://bugs.webkit.org/show_bug.cgi?id=155050

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoDon't use DiskCache for media resource loads
commit-queue@webkit.org [Mon, 9 May 2016 16:54:37 +0000 (16:54 +0000)]
Don't use DiskCache for media resource loads
https://bugs.webkit.org/show_bug.cgi?id=157405

Patch by Alex Christensen <achristensen@webkit.org> on 2016-05-09
Reviewed by Darin Adler.

Source/WebCore:

http/tests/security/video-cross-origin-caching.html was loading from the disk cache.
This patch adds an assertion that fires in that test without this fix.

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::requestResource):
* platform/graphics/PlatformMediaResourceLoader.h:
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::hiddenFromInspector):
(WebCore::ResourceRequestBase::setHiddenFromInspector):
(WebCore::ResourceRequestBase::requester):
(WebCore::ResourceRequestBase::setRequester):
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask _restart]):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):

Source/WebKit2:

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeRetrieveDecision):
(WebKit::NetworkCache::makeStoreDecision):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):

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

4 years ago[wincairo] web inspector failed to launch in MiniBrowser
commit-queue@webkit.org [Mon, 9 May 2016 16:28:38 +0000 (16:28 +0000)]
[wincairo] web inspector failed to launch in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=156184
<rdar://problem/25539297>

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2016-05-09
Reviewed by Alex Christensen.

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::openLocalFrontend): Enable
AllowFileAccessFromFileURLs and AllowUniversalAccessFromFileURLs
of WebPreferences for Web Inspector.

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

4 years agoRefactor FocusController::findFocusableElementRecursively
rniwa@webkit.org [Mon, 9 May 2016 16:20:20 +0000 (16:20 +0000)]
Refactor FocusController::findFocusableElementRecursively
https://bugs.webkit.org/show_bug.cgi?id=157415

Reviewed by Darin Adler.

Refactor FocusController::findFocusableElementRecursively and related functions. Extracted two functions:
nextFocusableElementWithinScope and previousFocusableElementWithinScope out of it since they didn't really share
any code other than calling findFocusableElement at the beginning.

Also renamed internal variant of nextFocusableElement and previousFocusableElement to nextFocusableElementOrScopeOwner
and previousFocusableElementOrScopeOwner. It was confusing to have these internal functions in addition to public
member functions that are used in Objective-C DOM API.

No new tests are added since there should be no behavioral change.

* page/FocusController.cpp:
(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument): Added a FIXME.
(WebCore::FocusController::advanceFocusInDocumentOrder): Use findFocusableElementAcrossFocusScope instead of manually
calling findFocusableElementRecursively and findFocusableElementDescendingDownIntoFrameDocument separately.
(WebCore::FocusController::findFocusableElementAcrossFocusScope): Now that findFocusableElementWithinScope calls
findFocusableElementDescendingDownIntoFrameDocument internally, there is no need to keep around "found" local variable.
Introduce a few early exists for a better clarity.
(WebCore::FocusController::findFocusableElementWithinScope): Renamed from findFocusableElementRecursively. Also call
findFocusableElementDescendingDownIntoFrameDocument here instead of findFocusableElementAcrossFocusScope.
(WebCore::FocusController::nextFocusableElementWithinScope): Extracted from findFocusableElementRecursively.
(WebCore::FocusController::previousFocusableElementWithinScope): Ditto.
(WebCore::FocusController::findFocusableElement):
(WebCore::FocusController::nextFocusableElement): Added a FIXME.
(WebCore::FocusController::previousFocusableElement): Ditto.
(WebCore::FocusController::findFocusableElementOrScopeOwner): Renamed from findFocusableElement for clarity.
(WebCore::FocusController::nextFocusableElementOrScopeOwner): Ditto from nextFocusableElement.
(WebCore::FocusController::previousFocusableElementOrScopeOwner): Ditto from nextFocusableElement.
* page/FocusController.h:

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

4 years ago[css-grid] Update Grid Layout properties in CSSKeywordCompletions.js
rego@igalia.com [Mon, 9 May 2016 16:09:17 +0000 (16:09 +0000)]
[css-grid] Update Grid Layout properties in CSSKeywordCompletions.js
https://bugs.webkit.org/show_bug.cgi?id=157166

Reviewed by Timothy Hatcher.

The CSS Grid Layout properties have been changing on the spec,
however they haven't been updated in CSSKeywordCompletions for a long time.
Update them using the last spec draft:
https://drafts.csswg.org/css-grid/#property-index

* UserInterface/Models/CSSKeywordCompletions.js:

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

4 years agoWeb Inspector: Cleanup issue tree elements in the Debugger sidebar
mattbaker@apple.com [Mon, 9 May 2016 14:59:23 +0000 (14:59 +0000)]
Web Inspector: Cleanup issue tree elements in the Debugger sidebar
https://bugs.webkit.org/show_bug.cgi?id=157469
<rdar://problem/26162999>

Reviewed by Timothy Hatcher.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._addIssue):
Don't add duplicate issue tree elements.
(WebInspector.DebuggerSidebarPanel.prototype._handleIssuesCleared):
Remove issues from the correct tree outline.

* UserInterface/Views/IssueTreeElement.css:
(.issue .icon):
(.issue.warning .icon):
(.issue.error .icon):
Match dashboard icons.

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

4 years agoWeb Inspector: Show in progress message in Timeline views that do not show data until...
mattbaker@apple.com [Mon, 9 May 2016 14:52:19 +0000 (14:52 +0000)]
Web Inspector: Show in progress message in Timeline views that do not show data until the recording finishes
https://bugs.webkit.org/show_bug.cgi?id=156761
<rdar://problem/25970771>

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
New UI strings.

* UserInterface/Main.html:
New view class.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype.get showsLiveRecordingData):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView.prototype.get showsLiveRecordingData):
* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView.prototype.get showsLiveRecordingData):
Don't show live recording data.

* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.get showsLiveRecordingData):
Forward property to current child TimelineView.

* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser .recording-progress):
(.content-view.timeline-recording > .content-browser .recording-progress > .status):
(.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
New progress view styles.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
(WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
Refresh progress view visibility.

(WebInspector.TimelineRecordingContentView.prototype._updateProgressView):
Show the progress view if we're currently capturing, and showing a view
that doesn't support showing live data.

* UserInterface/Views/TimelineRecordingProgressView.js:
(WebInspector.TimelineRecordingProgressView):
(WebInspector.TimelineRecordingProgressView.prototype.get visible):
(WebInspector.TimelineRecordingProgressView.prototype.set visible):
Show a status message, indeterminate progress spinner, and Stop Recording
button while timeline data is being recorded.

* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get showsLiveRecordingData):
Implemented by TimelineViews that don't support showing data while recording.

* UserInterface/Views/Variables.css:
(:root):
Add --panel-background-color-light for the progress view.

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

4 years ago[css-grid] Fix static position for positioned grid items
rego@igalia.com [Mon, 9 May 2016 10:17:29 +0000 (10:17 +0000)]
[css-grid] Fix static position for positioned grid items
https://bugs.webkit.org/show_bug.cgi?id=157417

Reviewed by Darin Adler.

Source/WebCore:

The spec was updated to define properly the static position
for positioned grid items, but we didn't update the implementation yet:
https://drafts.csswg.org/css-grid-1/issues-wd-20150108#issue-1

We were only setting the static position when the start line
was not auto. Otherwise we were using the default one
which includes the padding.
With the spec change we need to set it always,
even if the start line is auto.

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

LayoutTests:

Updated several tests to follow the new expected behavior.

* fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html:
* fast/css-grid-layout/absolute-positioning-grid-container-parent.html:
* fast/css-grid-layout/grid-positioned-items-gaps-rtl.html:
* fast/css-grid-layout/grid-positioned-items-gaps.html:
* fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html:
* fast/css-grid-layout/grid-positioned-items-implicit-grid.html:
* fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html:
* fast/css-grid-layout/grid-sizing-positioned-items.html:

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

4 years agoFix wrong gardening in r200570
gyuyoung.kim@webkit.org [Mon, 9 May 2016 08:55:50 +0000 (08:55 +0000)]
Fix wrong gardening in r200570

Unreviewed EFL gardening.

* TestExpectations: Move selection gap tests to EFL's one.
* platform/efl/TestExpectations:

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

4 years ago[EFL] Skip tests of selection gap because EFL port disabled to paint the selection gap
gyuyoung.kim@webkit.org [Mon, 9 May 2016 08:51:20 +0000 (08:51 +0000)]
[EFL] Skip tests of selection gap because EFL port disabled to paint the selection gap

Unreviewed EFL gardening.

* TestExpectations:

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

4 years agoRenderMathMLOperator: refactor management of stretchy data and italic correction
fred.wang@free.fr [Mon, 9 May 2016 05:51:37 +0000 (05:51 +0000)]
RenderMathMLOperator: refactor management of stretchy data and italic correction
https://bugs.webkit.org/show_bug.cgi?id=156913

Patch by Frederic Wang <fwang@igalia.com> on 2016-05-08
Reviewed by Darin Adler.

No new tests, behavior is not changed.

The stretchy data uses a shared space to describe horizontal / vertical directions and
unstretched / size variant / glyph assembly. We use a simple struct with some unions to
represent it instead of the current implementation with a class.
We also modify the signature of some functions to retrieve display operator and stretchy
data to use that new structure and prepare the move to a separate MathOperator class.
Finally, we introduce some helper functions to easily set the stretchy data.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Use the new data members and
function signatures.
(WebCore::RenderMathMLOperator::setSizeVariant): New helper function to set a size variant.
(WebCore::RenderMathMLOperator::setGlyphAssembly): New helper function to set a glyph
assembly.
(WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): We change the signature to use a
GlyphAssemblyData.
(WebCore::RenderMathMLOperator::findDisplayStyleLargeOperator): We rename the function and
change its signature to remove the return value. We now also set the italic correction when
a display operator is found.
(WebCore::RenderMathMLOperator::findStretchyData): We change the signature to introduce a
target size and remove the return value. This also does the early return when the base glyph
is large enough.
(WebCore::RenderMathMLOperator::updateStyle): We use the new data members and function
signatures. The check for the base glyph size is now done in findStretchyData, so we just
check whether m_stretchType is Unstretched to do an early return.
(WebCore::RenderMathMLOperator::firstLineBaseline): We use m_stretchType.
(WebCore::RenderMathMLOperator::computeLogicalHeight): Ditto.
(WebCore::RenderMathMLOperator::fillWithVerticalExtensionGlyph): Use the new class members.
(WebCore::RenderMathMLOperator::fillWithHorizontalExtensionGlyph): Ditto.
(WebCore::RenderMathMLOperator::paint): Ditto.
(WebCore::RenderMathMLOperator::paintVerticalGlyphAssembly): Ditto.
(WebCore::RenderMathMLOperator::paintHorizontalGlyphAssembly): Ditto.
(WebCore::RenderMathMLOperator::paintChildren): Ditto.
(WebCore::RenderMathMLOperator::trailingSpaceError): Ditto.
(WebCore::RenderMathMLOperator::italicCorrection): Moved to RenderMathMLOperator.h.
(WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): Deleted.
* rendering/mathml/RenderMathMLOperator.h:
(WebCore::RenderMathMLOperator::italicCorrection): We just return m_italicCorrection.
(WebCore::RenderMathMLOperator::GlyphAssemblyData::GlyphAssemblyData): New class to store an
assembly of GlyphData.
(WebCore::RenderMathMLOperator::StretchyData::mode): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::variant): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::top): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::extension): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::bottom): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::middle): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::left): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::right): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::setNormalMode): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::setSizeVariantMode): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::setGlyphAssemblyMode): Deleted.
(WebCore::RenderMathMLOperator::StretchyData::StretchyData): Deleted.

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

4 years ago[COCOA] Disable HAVE_DTRACE at build time
cdumez@apple.com [Mon, 9 May 2016 04:55:34 +0000 (04:55 +0000)]
[COCOA] Disable HAVE_DTRACE at build time
https://bugs.webkit.org/show_bug.cgi?id=157433
<rdar://problem/26148841>

Reviewed by Mark Lam.

Source/JavaScriptCore:

Drop DTRACE-related code from JSC since it is very old and seems
unused.

* JavaScriptCore.xcodeproj/project.pbxproj:
* PlatformMac.cmake:
* heap/Heap.cpp:
(JSC::Heap::collectImpl): Deleted.
(JSC::Heap::didFinishCollection): Deleted.
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::willExecute): Deleted.
(JSC::ProfileGenerator::didExecute): Deleted.
* runtime/Tracing.d: Removed.
* runtime/Tracing.h: Removed.

Source/WTF:

Disable HAVE_DTRACE on COCOA since it is mostly unused and has a performance
impact, at least on iOS.

* wtf/Platform.h:

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

4 years agoiOS selection: Use inflow containing block for positioned <br>.
zalan@apple.com [Mon, 9 May 2016 02:37:57 +0000 (02:37 +0000)]
iOS selection: Use inflow containing block for positioned <br>.
https://bugs.webkit.org/show_bug.cgi?id=157115
<rdar://problem/25969295>

Reviewed by Ryosuke Niwa.

Similarly to RenderText, we should just use the inflow containing block for
selected <br> even when it is positioned out of flow. This visually matches Mac OS X
behaviour (selection painting does not get extended to the positioned <br>).

Source/WebCore:

Test: fast/text/fixed-positioned-br-crash.html

* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::collectSelectionRects):

LayoutTests:

* fast/text/fixed-positioned-br-crash-expected.txt: Added.
* fast/text/fixed-positioned-br-crash.html: Added.

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

4 years agoWeb Inspector: Add Breakpoints and Scripts folders to Debugger sidebar
mattbaker@apple.com [Sun, 8 May 2016 23:57:44 +0000 (23:57 +0000)]
Web Inspector: Add Breakpoints and Scripts folders to Debugger sidebar
https://bugs.webkit.org/show_bug.cgi?id=151119
<rdar://problem/23488916>

Reviewed by Timothy Hatcher.

Add a collapsible Sources section to the Debugger beneath the existing
Breakpoints section.

* UserInterface/Views/DebuggerSidebarPanel.css:
Remove unused CSS class names.

(.sidebar > .panel.navigation.debugger .details-section.scripts:not(.collapsed)):
Hide scripts section bottom border when expanded. As the last
section, a border only adds visual clutter.

(.sidebar > .panel.navigation.debugger .details-section.scripts): Deleted.
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts): Deleted.
(.sidebar > .panel.navigation.debugger .details-section.scripts .header): Deleted.
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header): Deleted.
(.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content): Deleted.
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content): Deleted.
No longer needed.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
Create separate "Breakpoints" and "Sources" sections, and make filter
placeholder text generic. Remove unused class from breakpoints tree.

(WebInspector.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject):
Check both breakpoint and scripts tree outlines.

(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
(WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline):
Make helper function generic.

(WebInspector.DebuggerSidebarPanel.prototype._addResource):
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
Add resources to the scripts tree.

(WebInspector.DebuggerSidebarPanel.prototype._scriptsCleared):
Clear the scripts tree.

(WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
Remove script element when last breakpoint is removed.

(WebInspector.DebuggerSidebarPanel.prototype._addIssue):
(WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToContentTreeOutline): Deleted.
Renamed _addTreeElementForSourceCodeToTreeOutline.

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

4 years agoWeb Inspector: SourceCodeTextEditor issue widgets/line styles should reset when log...
mattbaker@apple.com [Sun, 8 May 2016 23:55:53 +0000 (23:55 +0000)]
Web Inspector: SourceCodeTextEditor issue widgets/line styles should reset when log is cleared
https://bugs.webkit.org/show_bug.cgi?id=157460
<rdar://problem/26159633>

Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._logCleared):
Clear issue widgets and CodeMirror line class names when log cleared.

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

4 years ago[iOS] Build fix after r200563
mmaxfield@apple.com [Sun, 8 May 2016 23:03:48 +0000 (23:03 +0000)]
[iOS] Build fix after r200563

Unreviewed.

* editing/cocoa/HTMLConverter.mm:
(_font):

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

4 years ago[OS X] Migrate our Font classes entirely off of NSFont
mmaxfield@apple.com [Sun, 8 May 2016 22:54:42 +0000 (22:54 +0000)]
[OS X] Migrate our Font classes entirely off of NSFont
https://bugs.webkit.org/show_bug.cgi?id=157464

Reviewed by Darin Adler.

Source/WebCore:

Because NSFont and CTFont are toll-free-bridged, we don't need NSFont at all anywhere.

No new tests because there is no behavior change.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
(textMarkerRangeFromRange):
(visiblePositionForStartOfTextMarkerRange):
(visiblePositionForEndOfTextMarkerRange):
(AXAttributedStringRangeIsValid):
(AXAttributeStringSetFont):
(CreateCGColorIfDifferent):
(AXAttributeStringSetStyle):
(textMarkerRangeFromVisiblePositions):
* bindings/objc/DOM.mm:
(-[DOMElement _font]):
* bindings/objc/DOMPrivate.h:
* editing/cocoa/HTMLConverter.mm:
(_font):
(WebCore::editingAttributedStringFromRange):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontAttributesForSelectionStart):
* platform/graphics/Font.h:
(WebCore::Font::getCTFont):
(WebCore::Font::getNSFont): Deleted.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::nsFont): Deleted.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::determinePitch):
(WebCore::advanceForColorBitmapFont):
(WebCore::Font::platformWidthForGlyph):
(WebCore::renderingStyle): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:

Source/WebKit/mac:

* WebCoreSupport/PopupMenuMac.mm:
(PopupMenuMac::populate):
(PopupMenuMac::show):
* WebView/WebHTMLView.mm:
(fontNameForDescription):
(-[WebHTMLView _addToStyle:fontA:fontB:]):

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
(WebKit::WebPopupMenu::setUpPlatformData):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::fontAtSelection):

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

4 years ago[Bindings] Simplify [RequiresExistingAtomicString] IDL extended attribute handling
cdumez@apple.com [Sun, 8 May 2016 21:56:57 +0000 (21:56 +0000)]
[Bindings] Simplify [RequiresExistingAtomicString] IDL extended attribute handling
https://bugs.webkit.org/show_bug.cgi?id=157465

Reviewed by Darin Adler.

Source/WebCore:

Simplify [RequiresExistingAtomicString] IDL extended attribute handling
in the bindings generator.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
Drop code specific to [RequiresExistingAtomicString].

(JSValueToNative):
Deal with [RequiresExistingAtomicString] IDL extended attribute,
similarly to [AtomicString] and [TreatNullAs].

* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/TestObj.idl:
Add bindings test coverage.

* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::getElementById):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::getElementById):
Add null check for the id parameter. The generated bindings used to do
this null check for us but it is no longer the case (to make the bindings
generator a bit simpler). This extended attribute is not commonly used
and is meant as a micro-optimization for getElementById().

Source/WTF:

Add an AtomicString(RefPtr<AtomicStringImpl>&&) constructor that is now
used by the bindings when [RequiresExistingAtomicString] is used. This
is more efficient than using AtomicString(AtomicStringImpl*) as the
caller has a RefPtr<AtomicStringImpl> and is consistent with the
pre-existing String(RefPtr<AtomicStringImpl>&&) constructor.

* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):

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

4 years agoRoll out: ThreadSanitizer: Data race and thread leak in WebCore::ScrollingThread...
ddkilzer@apple.com [Sun, 8 May 2016 19:11:03 +0000 (19:11 +0000)]
Roll out: ThreadSanitizer: Data race and thread leak in WebCore::ScrollingThread::createThreadIfNeeded
<https://webkit.org/b/157462>

This reverts commit r200554.

This doesn't fix the data race, and the thread leak is a
separate issue.

* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::createThreadIfNeeded): Roll out the
change.

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

4 years ago* wtf/text/WTFString.h: Remove pragma once. Not working for some reason.
darin@apple.com [Sun, 8 May 2016 19:05:25 +0000 (19:05 +0000)]
* wtf/text/WTFString.h: Remove pragma once. Not working for some reason.

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

4 years agoWTF:
darin@apple.com [Sun, 8 May 2016 19:00:40 +0000 (19:00 +0000)]
WTF:

Follow-up to that last patch (missed review comments).

* wtf/text/WTFString.h: Use nullptr instead of 0 as needed. Also use pragma once.

WebCore:

Follow-up to that last patch (missed review comments).

* page/EventSource.cpp:
(WebCore::EventSource::parseEventStream): Pre-increment, not post-increment.
(WebCore::EventSource::dispatchMessageEvent): More elegant form without explicit StringView.

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

4 years agoChange EventSource constructor to take an IDL dictionary instead of a WebCore::Dictionary
darin@apple.com [Sun, 8 May 2016 18:46:53 +0000 (18:46 +0000)]
Change EventSource constructor to take an IDL dictionary instead of a WebCore::Dictionary
https://bugs.webkit.org/show_bug.cgi?id=157459

Reviewed by Chris Dumez.

Source/WebCore:

Patch also includes some updating of EventSource class to modern idioms.

* page/EventSource.cpp:
(WebCore::EventSource::EventSource): Initialize based on Init.
(WebCore::EventSource::create): Take/pass Init instead of Dictionary.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize): Take a StringView instead of a string
so callers don't have to allocate a String just to use this.
(WebCore::SerializedScriptValue::create): Ditto.
* bindings/js/SerializedScriptValue.h: Ditto.

* page/EventSource.cpp: Changed defaultReconnectDelay to be a uint64_t
instead of an unsigned long long.
(WebCore::EventSource::EventSource): Changed constructor to take a struct
instead of a Dictionary for eventSourceInit. Also moved initialization of
data members to the header and used ASCIILiteral.
(WebCore::EventSource::create): Changed type to Init and streamlined code
a little bit using auto.
(WebCore::EventSource::connect): Used a reference instead of a pointer.
Also added a FIXME since I noticed that m_requestInFlight is probably not
needed, since it's basically the same thing as "is m_loader null".
(WebCore::EventSource::url): Moved to the header and made it inline.
(WebCore::EventSource::networkRequestEnded): Removed unneeded check that
is already done by all callers and turned it into an assertion.
(WebCore::EventSource::withCredentials): Ditto.
(WebCore::EventSource::readyState): Ditto.
(WebCore::EventSource::responseIsValid): Added. Helper function to make
the logic in didReceiveResponse easier to read. Fixed logic to compare
MIME type ignoring ASCII case, since that's how MIME types work.
(WebCore::EventSource::didReceiveResponse): Use the helper above, and also
move the m_eventStreamOrigin set up code into the valid response case,
since there is no point doing it if the response is not valid. Also use
the early return idiom.
(WebCore::EventSource::didReceiveData): Removed the unneeded explicit
conversion to StringView here. Also removed a FIXME that I fixed.
(WebCore::EventSource::didFinishLoading): Added code to flush the decoder
as mentioned in didReceiveData. Added FIXME about peculiar clearing code
that exists only here. Removed check for empty receive buffer and data
that is not needed since parseEventStream does sufficient checking.
(WebCore::EventSource::didFail): Added FIXME because of things that
didFinishLoading does that seem equally valuable here.
(WebCore::EventSource::parseEventStream): Tweaked types and names of local
variables, and changed to use Optional instead of magic number -1. Also
added a FIXME about how the buffer type is probably not right since we
keep moving the characters in the buffer as we consume the start of it.
(WebCore::EventSource::parseEventStreamLine): Refactor and reorganize so
this doesn't do so much string allocation and is easier to read
(WebCore::EventSource::canSuspendForDocumentSuspension): Tweaked comment.
(WebCore::EventSource::dispatchMessageEvent): Renamed this from
createMessageEvent, and moved more code in here. We now don't have to
allocate a temporary string just to pass it to SerializedScriptValue.

* page/EventSource.h: Updated for changes above. Use pragma once.
Define and use EventSource::Init struct. Other small cleanup.

* page/EventSource.idl: Define EventSourceInit dictionary and use it.
Other small cleanup.

* page/EventSource.idl: U

Source/WTF:

* wtf/text/WTFString.h: Export a symbol now used in WebCore.

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

4 years agoChange HTMLSlotElement::assignedNodes to take a IDL dictionary instead of a WebCore...
darin@apple.com [Sun, 8 May 2016 18:35:23 +0000 (18:35 +0000)]
Change HTMLSlotElement::assignedNodes to take a IDL dictionary instead of a WebCore::Dictionary
https://bugs.webkit.org/show_bug.cgi?id=157457

Reviewed by Chris Dumez.

* html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::removedFrom): Fixed typo in comment.
(WebCore::HTMLSlotElement::assignedNodes): Renamed assignedNodesForBindings back to this
and changed the argument type to Optional<AssignedNodesOptions> instead of Dictionary.
Also streamlined the logic a bit.
(WebCore::HTMLSlotElement::enqueueSlotChangeEvent): Changed to use a pointer to the
enqueued event instead of a boolean. With only a boolean, we could end up clearing the
flag in cases where we don't really want to.
(WebCore::HTMLSlotElement::dispatchEvent): Ditto.
(WebCore::HTMLSlotElement::assignedNodesForBindings): Deleted.
* html/HTMLSlotElement.h: Use pragma once. Added AssignedNodeOptions. Changed for the
above, including changing the data member.
* html/HTMLSlotElement.idl: Removed use of ImplementedAs. Fixed the type of the options
dictionary.

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

4 years ago[Bindings] Add convert<>() template specializations for integer types
cdumez@apple.com [Sun, 8 May 2016 18:29:04 +0000 (18:29 +0000)]
[Bindings] Add convert<>() template specializations for integer types
https://bugs.webkit.org/show_bug.cgi?id=157458

Reviewed by Darin Adler.

Add convert<>() template specializations for integer types and use them
in the JS bindings. Also, treat non-32bit types the same way as the
32bit ones, allowing the compiler to optimize out branching based on
the IntegerConversionConfiguration.

* bindings/js/JSCryptoAlgorithmDictionary.cpp:

* bindings/js/JSDOMBinding.cpp:
(WebCore::enforceRange):
(WebCore::toSmallerInt):
(WebCore::toSmallerUInt):
(WebCore::toInt8EnforceRange):
(WebCore::toUInt8EnforceRange):
(WebCore::toInt8Clamp):
(WebCore::toUInt8Clamp):
(WebCore::toInt8):
(WebCore::toUInt8):
(WebCore::toInt16EnforceRange):
(WebCore::toUInt16EnforceRange):
(WebCore::toInt16Clamp):
(WebCore::toUInt16Clamp):
(WebCore::toInt16):
(WebCore::toUInt16):
(WebCore::toInt32EnforceRange):
(WebCore::toInt32Clamp):
(WebCore::toUInt32Clamp):
(WebCore::toUInt32EnforceRange):
(WebCore::toInt64EnforceRange):
(WebCore::toUInt64EnforceRange):
(WebCore::toInt64Clamp):
(WebCore::toUInt64Clamp):
(WebCore::toInt64):
(WebCore::toUInt64):
* bindings/js/JSDOMBinding.h:
- Splt some integer conversion functions into 3 Normal / Clamp /
  Enforce versions, similarly to what was done for 32bit types already.
  This is so that these can be called from the inline functions in
  JSDOMConvert.h, allowing the compiler to optimize out the branches.
- Get rid of some unnecessary state.hadException() checks.

* bindings/js/JSDOMConvert.h:
Add convert<> specializations for integer types.

* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::acceptNode):

* bindings/scripts/CodeGenerator.pm:
- Add utility function to distinguish integer types.
- Have IsNumericType() using the integerType / floatingPointType
  hashes to avoid duplication.
- Stop int / unsigned int from integer types as those are not
  in Web IDL and they are not used.

* bindings/scripts/CodeGeneratorJS.pm:
(GetIntegerConversionType):
(JSValueToNative):
Use convert<>() for converting JSValue to integer types.

* bindings/scripts/IDLParser.pm:
Stop allowing int / unsigned int types as those are not in Web IDL.

* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
Rebaseline bindings tests.

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

4 years agoCorrect dictionary bindings handling of optional, null, and undefined
darin@apple.com [Sun, 8 May 2016 16:54:09 +0000 (16:54 +0000)]
Correct dictionary bindings handling of optional, null, and undefined
https://bugs.webkit.org/show_bug.cgi?id=157463

Reviewed by Chris Dumez.

Source/WebCore:

* bindings/js/JSDOMBinding.cpp:
(WebCore::propertyValue): Deleted.
* bindings/js/JSDOMBinding.h: Deleted propertyValue, not all that helpful for now.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDictionaryImplementationContent): Added a new early exit for convert to
a dictionary type when the value is undefined or null and all members are either
optional or have a default value. This returns the default values for everything
without raising an exception. Added checking that requires that the dictionary
argument is an object and not a regular expression, since that's also called for
in the latest draft of the Web IDL specification. This ends up speeding up the
code a bit since we now use JSObject::get for properties instead of JSValue::get.
(GenerateParametersCheck): Renamed some local variables. Taught the code that
optional dictionaries all have a default value; before it was doing that for the
type "Dictionary" but not the real dictionary types (IsDictionaryType).

* bindings/scripts/test/JS/JSTestObj.cpp: Regenerated.

* css/FontFace.cpp:
(WebCore::FontFace::create): Changed argument to be Descriptors instead of
Optional<Descriptors>. It would have compiled the other way, but there is now
no caller that will pass a null. Because the IDL dictionary support was new,
this was the only place that was doing it wrong. Good that we "nipped it in the bud"
before doing this in more places.
* css/FontFace.h: Ditto.

LayoutTests:

* fast/dom/MutationObserver/observe-exceptions-expected.txt: Reverted that
change to expect a more specific TypeError just as it was a day ago before
my last patch. The TypeError is back to being a problem with the specifics
of the arguments passed rather than a problem with null and undefined
themselves being invalid.

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

4 years agoThreadSanitizer: Data race and thread leak in WebCore::ScrollingThread::createThreadI...
ddkilzer@apple.com [Sun, 8 May 2016 15:22:36 +0000 (15:22 +0000)]
ThreadSanitizer: Data race and thread leak in WebCore::ScrollingThread::createThreadIfNeeded
<https://webkit.org/b/157462>

Reviewed by Darin Adler.

Reproduced with multiple existing tests.

* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::createThreadIfNeeded): Use a
std::once_flag to initialize Scrolling Thread since this may be
called from background threads.

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

4 years agoTry to fix build without rolling out that last change.
darin@apple.com [Sun, 8 May 2016 07:11:12 +0000 (07:11 +0000)]
Try to fix build without rolling out that last change.

* bindings/js/JSDOMConvert.h:
(WebCore::convert<Vector<String>>): Make this an inline. Just call toNativeArray.

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

4 years agoChange MutationObserver::observe to take an IDL dictionary, rather than WebCore:...
darin@apple.com [Sun, 8 May 2016 06:39:23 +0000 (06:39 +0000)]
Change MutationObserver::observe to take an IDL dictionary, rather than WebCore::Dictionary
https://bugs.webkit.org/show_bug.cgi?id=157456

Reviewed by Chris Dumez.

Source/WebCore:

* bindings/js/JSDOMConvert.h:
(WebCore::convertOptional): Use a specific Optional null rather than Nullopt so we
can compile the ternary operator.
(WebCore::convert<bool>): Added.
(WebCore::convert<Vector<String>>): Added. Later we probably need to change convert to use
a member function of a class template rather than a function template so we can make partial
specialization work and do this just once for all Vector<T>.

* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots): Streamlined code and removed
some local variables. Changed to call the new observedNodes rather than getObservedNodes.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDictionaryImplementationContent): Fixed bug where we tried to call the version of
the convert function with a default value even when there was none.

* bindings/scripts/test/TestObj.idl: Added a test case basically identical to what's needed
in MutationObserver.idl.
* bindings/scripts/test/JS/JSTestObj.cpp: Regenerated.

* dom/MutationObserver.cpp:
(WebCore::MutationObserver::observe): Chagned function to take a MutationObserver::Init
instead of a Dictionary.
(WebCore::MutationObserver::observationStarted): Changed argument type to a reference.
(WebCore::MutationObserver::observationEnded): Ditto.
(WebCore::MutationObserverMicrotask): Removed unneeded explicit constructor and destructor.
(WebCore::queueMutationObserverCompoundMicrotask): Got rid of unnneeded local variable.
(WebCore::MutationObserver::observedNodes): Renamed to remove the "get" prefix.

* dom/MutationObserver.h: Reduced includes. Added MutationObserver::Init struct and
used it for the type of the argument to the observe function. Changed a few argument
types and removed unused forward declarations.

* dom/MutationObserver.idl: Added MutationObserverInit and used it instead of Dictionary.

* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::MutationObserverRegistration): Pass a reference.
(WebCore::MutationObserverRegistration::~MutationObserverRegistration): Ditto.

LayoutTests:

* fast/dom/MutationObserver/observe-exceptions-expected.txt: Updated to expect
the specific TypeError generated by the bindings code rather than the generic
TypeError we got before generated inside the C++ DOM.

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

4 years agoAdd horizontal between categories of tests
rniwa@webkit.org [Sun, 8 May 2016 04:57:09 +0000 (04:57 +0000)]
Add horizontal between categories of tests
https://bugs.webkit.org/show_bug.cgi?id=157386

Reviewed by Darin Adler.

Wrap tests in each category by tbody and add a horizontal bar between each category.

* public/v3/pages/summary-page.js:
(SummaryPage.prototype._constructTable):
(SummaryPage.cssTemplate):

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

4 years agoReduce special handling of XPathNSResolver type in the bindings
cdumez@apple.com [Sun, 8 May 2016 04:39:13 +0000 (04:39 +0000)]
Reduce special handling of XPathNSResolver type in the bindings
https://bugs.webkit.org/show_bug.cgi?id=157454

Reviewed by Darin Adler.

Reduce special handling of XPathNSResolver type in the bindings.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
Add new JSXPathNSResolverCustom.cpp file.

* bindings/js/JSDOMStringListCustom.cpp:
(WebCore::JSDOMStringList::toWrapped):
Take the ExecState by reference instead of pointer.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::toWrapped):
Update to take an ExecState& parameter. The bindings now pass
an ExecState to all custom toWrapped() methods for consistency
and flexibility.

* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
Pass an ExecState now that those toWrapped() methods expect
it.

* bindings/js/JSEventTargetCustom.cpp:
(WebCore::JSEventTarget::toWrapped):
Update to take an ExecState& parameter.

* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::transaction):
Pass ExecState by reference instead of pointer.

* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
Pass ExecState to JSDOMWindow::toWrapped().

* bindings/js/JSXPathNSResolverCustom.cpp: Added.
(WebCore::JSXPathNSResolver::toWrapped):
Provide a custom implementation of JSXPathNSResolver::toWrapped()
instead of having the custom code in the bindings generator.

* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
Drop special includes for XPathNSResolver as they are no longer needed.

(GenerateHeader):
Drop special casing of certain types for generating the toWrapped()
declaration by:
1. Relying on GetNativeType() for the return value as certain types
   return a RefPtr instead of a raw pointer.
2. Adding an extra ExecState parameter when a custom implementation of
   toWrapped() is provided, given that some of them need it.

(GenerateParametersCheck):
Drop custom code for XPathNSResolver and use the normal code path for
this type now. The custom code now resides in the custom implementation
of JSXPathNSResolver::toWrapped(), in custom bindings.

(JSValueToNative):
- Drop NodeFilter from the nativeType hash map as it was updated to
  be a callback interface a while back.
- Add XPathNSResolver to nativeType hash map so that we now to use
  a RefPtr<> instead of a raw pointer in the bindings. We should
  probably add an IDL extended attribute for this at some point.
- Drop special casing for DOMStringList which was outdated since there
  is no toDOMStringList() function. DOMStringList has a custom
  toWrapped() function instead nowadays so we now call this one
  instead. We apparently do not have any DOMStringList parameters
  outside our bindings tests at the moment, which is why no one
  noticed.
- Pass an ExecState to toWrapped() if the interface has the
  JSCustomToNativeObject IDL extended attribute.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl:
Add bindings test coverage for having an operation with an
XPathNSResolver parameter.

* dom/Document.idl:
* xml/XPathEvaluator.idl:
Drop some unnecessary default parameter values.

* xml/XPathNSResolver.idl:
Add JSCustomToNativeObject IDL extended attribute so that we can
provide our own custom implementation of JSXPathNSResolver::toWrapped(),
instead of having the custom code in the bindings generator.

* dom/Document.cpp:
(WebCore::Document::createExpression):
(WebCore::Document::evaluate):
* dom/Document.h:
* inspector/InspectorNodeFinder.cpp:
* xml/XPathEvaluator.cpp:
(WebCore::XPathEvaluator::createExpression):
(WebCore::XPathEvaluator::evaluate):
* xml/XPathEvaluator.h:
* xml/XPathExpression.cpp:
(WebCore::XPathExpression::createExpression):
* xml/XPathExpression.h:
* xml/XPathParser.cpp:
(WebCore::XPath::Parser::Parser):
(WebCore::XPath::Parser::parseStatement):
* xml/XPathParser.h:
Take XPathNSResolver parameter as a Ref<XPathNSResolver>&& as this is
what the generated bindings now provide us, given that this sometimes
have to create a wrapper around a JSObject.

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

4 years agoFix crash introduced by the last patch.
darin@apple.com [Sat, 7 May 2016 22:29:01 +0000 (22:29 +0000)]
Fix crash introduced by the last patch.

Fix suggested by Chris Dumez.

* css/FontFace.cpp:
(WebCore::FontFace::FontFace): Roll out incorrect change. Things were getting
initialized in the wrong order in a change I had made to the FontFace constructor
that takes a CSSFontSelector.

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

4 years agoUnreviewed, rebaseline bindings tests after r200547.
cdumez@apple.com [Sat, 7 May 2016 21:36:39 +0000 (21:36 +0000)]
Unreviewed, rebaseline bindings tests after r200547.

* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::convert<TestObj::FontFaceDescriptors>):

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

4 years agoNext step on dictionary bindings, along with other bindings refinements
darin@apple.com [Sat, 7 May 2016 21:14:20 +0000 (21:14 +0000)]
Next step on dictionary bindings, along with other bindings refinements
https://bugs.webkit.org/show_bug.cgi?id=157451

Reviewed by Chris Dumez.

Source/WebCore:

Converted one dictionary, the one passed to the constructor in FontFace.

* WebCore.xcodeproj/project.pbxproj: Updated for name change of JSDOMBuild.h to
JSDOMConvert.h and also let Xcode update a file type.

* bindings/js/JSDOMBinding.cpp:
(WebCore::propertyValue): Added.
* bindings/js/JSDOMBinding.h: Use pragma once. Remove unnecessary forward declaration.
Move all declarations to the top of the file, separating them from definitions. This
is a small step toward better overview of what's in this file and paves the way for
future simplifications and improvements we can make after we observe patterns.
Also removed a couple unused functions.

* bindings/js/JSDOMConvert.h: Renamed from JSDOMBuild.h.
Renamed function templates from build to convert. Added convertOptional.

* bindings/js/ReadableStreamController.cpp:
(WebCore::callFunction): Use auto and remove some unneeded namespacing.
(WebCore::ReadableStreamController::invoke): Ditto. Also remove use of helper function
getPropertyFromObject, since this was the only call site and it was not very helpful.
(WebCore::ReadableStreamController::isControlledReadableStreamLocked): Ditto.
(WebCore::createReadableStream): Ditto.
(WebCore::getReadableStreamReader): Ditto.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateEnumerationImplementationContent): Updated for name change from build to
convert and JSDOMBuild.h to JSDOMConvert.h.
(GenerateDictionaryImplementationContent): Ditto. Also added code to handle optional
and added explicit exception checking, using local variables. Not clear longer term
if the local variable approach is OK since this will unnecessarily change types like
const String& to String.
(GenerateParametersCheck): Removed local variable $optional and use $parameter->isOptional
directly consistently. This is slightly clearer because the old code used a mix of the
two, and also is a better pattern for when we refactor this into smaller functions.
Note that this function name is not good any more--this is a lot more then parameter checks.
(GetNativeType): Return appropriate name for dictionary types.
(JSValueToNative): Updated for name change from build to convert and JSDOMBuild.h to
JSDOMConvert.h.

* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
Regenerated results.

* bindings/scripts/test/TestObj.idl: Added another dictionary test case, just a copy
of the current state of the one in FontFace.idl.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::setUnicodeRange): Update for simplified UnicodeRange struct.
(WebCore::CSSFontFace::setFeatureSettings): Fix to correctly handle being called
with "normal". Also fix so it doesn't call fontPropertyChanged if nothing changed.
Also got rid of return value, which had no real value: it was returning false for
some bad inputs, but others would just lead to assertions, and the real reason this
was OK is that this function is only passed known-valid values.

* css/CSSFontFace.h: Used prama once. Tweaked formatting. Removed return value from
the setFeatureSettings function. Changed UnicodeRange to be struct with public data
members instead a struct with a constructor and getter functions.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Updated since setFeatureSettings no
longer has a boolean return value.

* css/CSSSegmentedFontFace.cpp:
(WebCore::appendFontWithInvalidUnicodeRangeIfLoading): Updated for simplified
UnicodeRange struct.

* css/FontFace.cpp:
(WebCore::valueFromDictionary): Deleted.
(WebCore::FontFace::create): Updated to take the descriptors as a struct instead of
a WebCore::Dictionary. Also made that argument optional as specified in the current
specification draft.
(WebCore::FontFace::setFeatureSettings): Updated since setFeatureSettings no longer
has a boolean return value.
(WebCore::FontFace::unicodeRange): Updated for simplified UnicodeRange struct.

* css/FontFace.h: Used pragma once. Removed unneeded includes and forward declarations.
Derived privately from CSSFontFace::Client. Added a FontFace::Descriptors struct and
used it as an argument to the create function as described above.

* css/FontFace.idl: Added FontFaceDescriptors and changed the argument to the
constructor to be an optional FontFaceDescriptors instead of a Dictionary.

Tools:

* Scripts/do-webcore-rename: Use this to rename JSDOMBuild.h to JSDOMConvert.h.
Also skip test expectations in a directory that this was modifying unnecessarily.

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

4 years agoRework FontFace promise attribute handling
youenn.fablet@crf.canon.fr [Sat, 7 May 2016 20:04:27 +0000 (20:04 +0000)]
Rework FontFace promise attribute handling
https://bugs.webkit.org/show_bug.cgi?id=157310

Reviewed by Myles C. Maxfield.

Making promise attributes cached attributes, so that they are created only once.
They are created in the custom binding code and passed to DOM class as needed.

Removed usage of ExecState& from DOM iterators.

No change should be visible from user scripts.

* Modules/fetch/FetchHeaders.cpp:
(WebCore::FetchHeaders::Iterator::next): Removing ExecState parameter.
* Modules/fetch/FetchHeaders.h:
* bindings/js/JSDOMIterator.h:
(WebCore::keyValueIteratorForEach):
(WebCore::JSDOMIterator<JSWrapper>::next): Ditto.
* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredWrapper::promise): Removed deferred() and added access to promise directly.
* bindings/js/JSDOMPromise.h:
* bindings/js/JSFontFaceCustom.cpp:
(WebCore::JSFontFace::loaded): Using cached attribute to call FontFace::loaded only once.
* bindings/js/JSFontFaceSetCustom.cpp:
(WebCore::JSFontFaceSet::ready): Using cached attribute to call FontFaceSet::ready only once.
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::wrapper): Removing ExecState parameter.
* css/CSSFontFace.h:
* css/FontFace.cpp:
(WebCore::FontFace::create): Ditto.
(WebCore::FontFace::FontFace): Ditto.
(WebCore::FontFace::fontStateChanged): Updating promise handling.
(WebCore::FontFace::registerLoaded): Resolving/rejecting promise if backing CSSFontFace loading is ended.
(WebCore::FontFace::load): Calling backing load.
* css/FontFace.h:
* css/FontFaceSet.cpp:
(WebCore::FontFaceSet::Iterator::next): Removing ExecState parameter.
(WebCore::FontFaceSet::load): Removing ExecState and ExceptionCode parameter.
(WebCore::FontFaceSet::registerReady): Resolving promise if ready otherwise storing it for resolving it later.
(WebCore::FontFaceSet::completedLoading): Resolving promise if any is stored.
(WebCore::FontFaceSet::create): Deleted.
* css/FontFaceSet.h:
* css/FontFaceSet.idl:

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

4 years agoFix an incorrect usage of OS(DARWIN) with PLATFORM(COCOA)
commit-queue@webkit.org [Sat, 7 May 2016 20:02:44 +0000 (20:02 +0000)]
Fix an incorrect usage of OS(DARWIN) with PLATFORM(COCOA)
https://bugs.webkit.org/show_bug.cgi?id=157167

Patch by Jeremy Huddleston Sequoia <jeremyhu@apple.com> on 2016-05-07
Reviewed by Myles C. Maxfield.

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hash):

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

4 years agoUpdate Animometer design
timothy@apple.com [Sat, 7 May 2016 16:51:58 +0000 (16:51 +0000)]
Update Animometer design
https://bugs.webkit.org/show_bug.cgi?id=157449

Reviewed by Darin Adler.

* Animometer/developer.html: Stop including runner/animometer.css.
* Animometer/index.html: Udpated elements to fit new styles.

* Animometer/resources/debug-runner/animometer.css:
Copy the old runner/animometer.css to here so the debug runner is unaffected.

* Animometer/resources/runner/animometer.css:
New styles for the design. Drop flex box for broad browser support.

* Animometer/resources/runner/animometer.js:
(ResultsTable.clear): Use textContent.
(window.sectionsManager.showSection): Add class to the body.
(window.sectionsManager.setSectionScore): Use textContent, not innerHTML.

* Animometer/resources/runner/crystal.svg: Added.
* Animometer/resources/runner/lines.svg: Added.
* Animometer/resources/runner/logo.svg: Added.

* Animometer/resources/runner/tests.js: Shorten test name and title case them.

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

4 years agoAdd JSC options bytecodeRangeToJITCompile and jitWhitelist.
mark.lam@apple.com [Sat, 7 May 2016 16:20:16 +0000 (16:20 +0000)]
Add JSC options bytecodeRangeToJITCompile and jitWhitelist.
https://bugs.webkit.org/show_bug.cgi?id=157428

Reviewed by Michael Saboff.

1. Added Options::bytecodeRangeToJITCompile and Options::jitWhitelist options.

2. Moved DFGFunctionWhitelist* to FunctionWhitelist* and made it generic so that
   it can be used for more than one whitelist instance.  In this case, we now have
   two: the dfgWhitelist and the jitWhitelist.

3. Added "can compile" checks in LLInt::shouldJIT() to check
   Options::bytecodeRangeToJITCompile and Options::jitWhitelist.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGDriver.cpp:
(JSC::DFG::getNumCompilations):
(JSC::DFG::ensureGlobalDFGWhitelist):
(JSC::DFG::compileImpl):
* dfg/DFGFunctionWhitelist.cpp: Removed.
* dfg/DFGFunctionWhitelist.h: Removed.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::ensureGlobalJITWhitelist):
(JSC::LLInt::shouldJIT):

* runtime/Options.h:

* tools/FunctionWhitelist.cpp: Copied from Source/JavaScriptCore/dfg/DFGFunctionWhitelist.cpp.
(JSC::FunctionWhitelist::FunctionWhitelist):
(JSC::FunctionWhitelist::contains):
(JSC::DFG::FunctionWhitelist::ensureGlobalWhitelist): Deleted.
(JSC::DFG::FunctionWhitelist::FunctionWhitelist): Deleted.
(JSC::DFG::FunctionWhitelist::parseFunctionNamesInFile): Deleted.
(JSC::DFG::FunctionWhitelist::contains): Deleted.
* tools/FunctionWhitelist.h: Copied from Source/JavaScriptCore/dfg/DFGFunctionWhitelist.h.

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

4 years agoREGRESSION(r196222): [AX][GTK] accessibility/gtk/caret-offsets.html failing
jdiggs@igalia.com [Sat, 7 May 2016 13:03:58 +0000 (13:03 +0000)]
REGRESSION(r196222): [AX][GTK] accessibility/gtk/caret-offsets.html failing
https://bugs.webkit.org/show_bug.cgi?id=153956

Reviewed by Chris Fleizach.

Source/WebCore:

The reason the test began failing is that it was checking the new caret offset
synchronously. For most of the test cases, this was not a problem. But when the
caret was moved out of a focused link, the focus change (and associated repainting)
delayed the caret-moved event long enough to cause the associated test case to fail.
The test now uses shouldBecomeEqualToString() instead of shouldBeEqualToString().

The test also had a supposedly-correct expectation which was wrong: When moving the
caret to a valid accessible offset, the caret-moved event should be for that offset.
This was not the case for the list item test case because emitTextSelectionChange()
was not adjusting the offset for the RenderListMarker, the text of which is exposed
as part of the ATK_ROLE_LIST_ITEM object. This bug was also fixed and the test case
updated accordingly.

No new tests are needed. The previously-failing test is now passing.

* editing/atk/FrameSelectionAtk.cpp:
(WebCore::emitTextSelectionChange):

LayoutTests:

Change the test to run asynchronously and update the expectations.

* accessibility/gtk/caret-offsets-expected.txt: Updated.
* accessibility/gtk/caret-offsets.html: Updated.
* platform/gtk/TestExpectations: Unskipped the previously-failing test.

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

4 years ago[JSC][32bit] stress/tagged-templates-template-object.js fails in debug
commit-queue@webkit.org [Sat, 7 May 2016 08:19:49 +0000 (08:19 +0000)]
[JSC][32bit] stress/tagged-templates-template-object.js fails in debug
https://bugs.webkit.org/show_bug.cgi?id=157436

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

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
The node OverridesHasInstance had a speculation after a jump.

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

4 years agoRename HitTestRequest DisallowShadowContent to DisallowUserAgentShadowContent
joepeck@webkit.org [Sat, 7 May 2016 06:03:50 +0000 (06:03 +0000)]
Rename HitTestRequest DisallowShadowContent to DisallowUserAgentShadowContent
https://bugs.webkit.org/show_bug.cgi?id=157447

Reviewed by Ryosuke Niwa.

Source/WebCore:

HitTesting is intended to reach nodes inside shadow content. This property
on the HitTestRequest is intended to avoid hit testing in UserAgent shadow
content. Rename the enum value, and cascading methods for clarity.

* html/MediaElementSession.cpp:
(WebCore::isMainContent):
* page/EventHandler.cpp:
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::updateSelectionForMouseDrag):
(WebCore::EventHandler::hitTestResultAtPoint):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handleMouseForceEvent):
(WebCore::EventHandler::updateDragAndDrop):
(WebCore::EventHandler::isInsideScrollbar):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::hoverTimerFired):
(WebCore::EventHandler::dragSourceEndedAt):
(WebCore::EventHandler::handleDrag):
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
* page/EventHandler.h:
* page/FocusController.cpp:
(WebCore::updateFocusCandidateIfNeeded):
* rendering/HitTestRequest.h:
(WebCore::HitTestRequest::HitTestRequest):
(WebCore::HitTestRequest::disallowsUserAgentShadowContent):
(WebCore::HitTestRequest::disallowsShadowContent): Deleted.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setToNonUserAgentShadowAncestor):
(WebCore::HitTestResult::addNodeToRectBasedTestResult):
(WebCore::HitTestResult::setToNonShadowAncestor): Deleted.
* rendering/HitTestResult.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isReplacementObscured):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame elementAtPoint:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView elementAtPoint:allowShadowContent:]):

Source/WebKit/win:

* WebView.cpp:
(WebView::gestureNotify):

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
(WebKit::WebPage::findZoomableAreaForPoint):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::hitTest):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::rangeForBlockAtPoint):
(WebKit::WebPage::getPositionInformation):

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

4 years agoWeb Inspector: Inspect Element and Element Selection searching should work with Shado...
joepeck@webkit.org [Sat, 7 May 2016 05:52:01 +0000 (05:52 +0000)]
Web Inspector: Inspect Element and Element Selection searching should work with Shadow DOM Nodes
https://bugs.webkit.org/show_bug.cgi?id=157446
<rdar://problem/24688447>

Reviewed by Ryosuke Niwa.

Source/WebCore:

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::innerParentNode):
The Inspector backend was informing the frontend that all ShadowRoots
were floating and had no parent. Get the host element for ShadowRoots.

* rendering/HitTestResult.cpp:
(WebCore::moveOutOfUserAgentShadowTree):
(WebCore::HitTestResult::setToNonShadowAncestor):
EventHandler::mouseMoved is calling setToNonShadowAncestor before
notifying Page::chrome / Inspector about the moused over element.
This should be the deepest non-user-agent-shadow node.

Source/WebInspectorUI:

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):
Shadow DOM nodes did not have a parent, and so when attempting
to create DOM Tree elements up the chain, we were failing at
shadow boundaries. Create the parent relationship, the parent
already treats it as a child.

* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._revealAndSelectNode):
Whenever we try to reveal and select an element in a shadow tree
but the setting to show shadow DOM is disabled, walk up until
we are out of the shadow tree.

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

4 years agoWeb Inspector: Misc CommandLineAPI cleanup
joepeck@webkit.org [Sat, 7 May 2016 05:44:40 +0000 (05:44 +0000)]
Web Inspector: Misc CommandLineAPI cleanup
https://bugs.webkit.org/show_bug.cgi?id=157450

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(BasicCommandLineAPI):
Fix mistake in r200533, and modernize related code.

Source/WebCore:

* inspector/CommandLineAPIModuleSource.js:
(bind):

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

4 years ago[Win] Skip failing INTL test.
peavo@outlook.com [Sat, 7 May 2016 04:25:49 +0000 (04:25 +0000)]
[Win] Skip failing INTL test.
https://bugs.webkit.org/show_bug.cgi?id=157418

Reviewed by Alex Christensen.

Temporarily skip string-localeCompare.js, because AppleWin currently does not have INTL enabled.

* js/script-tests/string-localeCompare.js:
* platform/win/TestExpectations:

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