WebKit.git
4 years ago[iOS] -webkit-overflow-scrolling: touch prevents repaint with RTL
simon.fraser@apple.com [Tue, 28 Jun 2016 02:58:16 +0000 (02:58 +0000)]
[iOS] -webkit-overflow-scrolling: touch prevents repaint with RTL
https://bugs.webkit.org/show_bug.cgi?id=159186
rdar://problem/26659341

Reviewed by Zalan Bujtas.
Source/WebCore:

There were two issues with repaints in -webkit-overflow-scrolling:touch scrolling
layers.

First, if the scrolled contents were inline (e.g. a <span>), then repaints were
broken because RenderInline didn't call shouldApplyClipAndScrollPositionForRepaint().
Fix by making shouldApplyClipAndScrollPositionForRepaint() a member function of RenderBox
and calling it from RenderBox::computeRectForRepaint() and RenderInline::clippedOverflowRectForRepaint().

Second, repaints were broken in RTL because RenderLayerBacking::setContentsNeedDisplayInRect()
confused scroll offset and scroll position; it needs to subtract scrollPosition.

Finally renamed to applyCachedClipAndScrollOffsetForRepaint() to applyCachedClipAndScrollPositionForRepaint()
to make it clear that it uses scrollPosition, not scrollOffset.

Tests: compositing/scrolling/touch-scrolling-repaint-spans.html
       compositing/scrolling/touch-scrolling-repaint.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::applyCachedClipAndScrollPositionForRepaint):
(WebCore::RenderBox::shouldApplyClipAndScrollPositionForRepaint):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint): Deleted.
(WebCore::shouldApplyContainersClipAndOffset): Deleted.
* rendering/RenderBox.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint):
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):

LayoutTests:

* compositing/scrolling/touch-scrolling-repaint-expected.html: Added.
* compositing/scrolling/touch-scrolling-repaint-spans-expected.html: Added.
* compositing/scrolling/touch-scrolling-repaint-spans.html: Added.
* compositing/scrolling/touch-scrolling-repaint.html: Added.

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

4 years ago[GTK][EFL] Disable subtle-crypto in FeatureList.pm
mcatanzaro@igalia.com [Tue, 28 Jun 2016 02:47:23 +0000 (02:47 +0000)]
[GTK][EFL] Disable subtle-crypto in FeatureList.pm
https://bugs.webkit.org/show_bug.cgi?id=155073

Reviewed by Daniel Bates.

* Scripts/webkitperl/FeatureList.pm:

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

4 years agoUpdated content for the color blog post.
dino@apple.com [Tue, 28 Jun 2016 02:38:16 +0000 (02:38 +0000)]
Updated content for the color blog post.

* blog-files/color-gamut/Iceland-P3.jpg:
* blog-files/color-gamut/Iceland-oog.jpg:
* blog-files/color-gamut/Iceland-sRGB.jpg:
* blog-files/color-gamut/Italy-P3.jpg:
* blog-files/color-gamut/Italy-sRGB.jpg:
* blog-files/color-gamut/Sunset-P3.jpg:
* blog-files/color-gamut/Sunset-sRGB.jpg:
* blog-files/color-gamut/YellowFlower-P3.jpg:
* blog-files/color-gamut/YellowFlower-oog.jpg:
* blog-files/color-gamut/YellowFlower-sRGB.jpg:
* blog-files/color-gamut/index.html:

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

4 years agoUnreviewed, rolling out r202436.
commit-queue@webkit.org [Tue, 28 Jun 2016 02:00:59 +0000 (02:00 +0000)]
Unreviewed, rolling out r202436.
https://bugs.webkit.org/show_bug.cgi?id=159190

We don't need to make this change. (Requested by thorton on
#webkit).

Reverted changeset:

"Do not use iOS specific telephone detection on macOS."
https://bugs.webkit.org/show_bug.cgi?id=159096
http://trac.webkit.org/changeset/202436

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

4 years ago[iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server...
simon.fraser@apple.com [Tue, 28 Jun 2016 01:44:41 +0000 (01:44 +0000)]
[iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server snapshotting
https://bugs.webkit.org/show_bug.cgi?id=159077

Reviewed by Tim Horton.

Source/WebKit2:

Fix WebPageProxy::forceRepaint() to correctly wait for the next commit from the web process,
which is necessary for UI-side compositing.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint):

Tools:

Re-enable render server snapshotting for iOS WTR via the change in InjectedBundlePage.cpp.

Fix WebPageProxy::forceRepaint() to correctly wait for the next commit from the web process,
which is necessary for UI-side compositing.

Add some null checks to fix issues when the WKWebView gets resized to be empty, which
seems to happen for some tests that call window.resizeTo().

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump): Deleted.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::createCGContextFromImage):
(WTR::computeMD5HashStringForContext):
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::windowSnapshotImage):

LayoutTests:

fast/harness/snapshot-captures-compositing.html passes now.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoAdopt the iOS TouchEventHandler API for cases that must have synchronous dispatch
benjamin@webkit.org [Tue, 28 Jun 2016 01:13:53 +0000 (01:13 +0000)]
Adopt the iOS TouchEventHandler API for cases that must have synchronous dispatch
https://bugs.webkit.org/show_bug.cgi?id=159179
rdar://problem/27006387

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html
       fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html
       fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html
       fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html
       fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html
       fast/events/touch/ios/drag-block-without-overflow-scroll.html

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
(WebCore::Document::removeAllEventListeners):
* dom/Node.cpp:
(WebCore::Node::willBeDeletedFrom):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::registerForTouchEvents):
(WebCore::SliderThumbElement::unregisterForTouchEvents):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::registerAsTouchEventListenerForScrolling):
(WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling):

LayoutTests:

Several of those tests expose existing bugs with overflow scrolling.
They are not using PASS/FAIL at the moment, just dump the called listeners.

* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html: Added.
* fast/events/touch/ios/block-without-overflow-scroll-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll.html: Added.

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

4 years agoFix Windows build.
achristensen@apple.com [Tue, 28 Jun 2016 01:00:25 +0000 (01:00 +0000)]
Fix Windows build.

* bindings/js/SerializedScriptValue.h:
WTF

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

4 years agoWeb Inspector: When modifying sessionStorage, localStorage gets updated
commit-queue@webkit.org [Tue, 28 Jun 2016 00:55:05 +0000 (00:55 +0000)]
Web Inspector: When modifying sessionStorage, localStorage gets updated
https://bugs.webkit.org/show_bug.cgi?id=159181
<rdar://problem/27043447>

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

Source/WebInspectorUI:

* UserInterface/Test/Test.js:
(WebInspector.loaded):
Add registration for StorageManager and StorageObserver.

Source/WebKit2:

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
This should be dispatching storage events.

LayoutTests:

* inspector/storage/domStorage-events-expected.txt: Added.
* inspector/storage/domStorage-events.html: Added.
Add a new test for DOMStorage domain events. Ensures that sessionStorage
and localStorage events are dispatched for the appropriate DOMStorageObject.

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

4 years agoFix bad assert in StructureRareData::setObjectToStringValue
keith_miller@apple.com [Tue, 28 Jun 2016 00:42:26 +0000 (00:42 +0000)]
Fix bad assert in StructureRareData::setObjectToStringValue
https://bugs.webkit.org/show_bug.cgi?id=159171
<rdar://problem/26987355>

Reviewed by Mark Lam.

We should not have expected the generateConditionsForPrototypePropertyHit would succeed.
There are many reasons it might fail including that there is a proxy somewhere on the
prototype chain of the object.

* runtime/StructureRareData.cpp:
(JSC::StructureRareData::setObjectToStringValue):
* tests/stress/object-toString-with-proxy.js: Added.
(get target):

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

4 years agoUnreviewed, rolling out r202520.
ryanhaddad@apple.com [Tue, 28 Jun 2016 00:36:40 +0000 (00:36 +0000)]
Unreviewed, rolling out r202520.
https://bugs.webkit.org/show_bug.cgi?id=159185

This change broke the 32-bit El Capitan build (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"REGRESSION?(r202466): http/tests/security/canvas-remote-read-
remote-video-redirect.html failing on Sierra"
https://bugs.webkit.org/show_bug.cgi?id=159172
http://trac.webkit.org/changeset/202520

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-27

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

4 years ago[Cocoa] Test gardening for the system font in macOS Sierra and iOS 10
mmaxfield@apple.com [Tue, 28 Jun 2016 00:36:03 +0000 (00:36 +0000)]
[Cocoa] Test gardening for the system font in macOS Sierra and iOS 10
https://bugs.webkit.org/show_bug.cgi?id=159175
<rdar://problem/26478081>

Unreviewed.

* fast/text/trak-optimizeLegibility.html:

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

4 years agoFix flakiness on Sierra after r202511
achristensen@apple.com [Tue, 28 Jun 2016 00:34:10 +0000 (00:34 +0000)]
Fix flakiness on Sierra after r202511
https://bugs.webkit.org/show_bug.cgi?id=159071

Source/WebKit2:

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::clearCredentials):
Replacing the NSURLSessions immediately caused assertions because the tasks are not always all stopped immediately when tearing down a test.
Stopping an NSURLSession needs to be done asynchronously.  I'll try a different testing technique for r202511.

LayoutTests:

* http/tests/xmlhttprequest/sync-delegate-callbacks-expected.txt: Removed.
* http/tests/xmlhttprequest/sync-delegate-callbacks.html: Removed.
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/wk2/http/tests/xmlhttprequest/sync-delegate-callbacks-expected.txt: Removed.

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

4 years agoREGRESSION (r189052): Clipping occurs when using context menu to Look Up words within...
timothy_horton@apple.com [Tue, 28 Jun 2016 00:33:28 +0000 (00:33 +0000)]
REGRESSION (r189052): Clipping occurs when using context menu to Look Up words within the Dictionary app
https://bugs.webkit.org/show_bug.cgi?id=159184
<rdar://problem/26370206>

Reviewed by Beth Dakin.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _lookUpInDictionaryFromMenu:]):
* WebView/WebImmediateActionController.h:
* WebView/WebImmediateActionController.mm:
(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
(-[WebImmediateActionController _animationControllerForText]):
(dictionaryPopupInfoForRange): Deleted.
WebImmediateActionController's code to make a DictionaryPopupInfo and TextIndicator
from a Range in WebKit1 is much better than WebHTMLView's; use it in both cases.

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

4 years ago[EFL] Support to build on Debian linux
gyuyoung.kim@webkit.org [Tue, 28 Jun 2016 00:26:31 +0000 (00:26 +0000)]
[EFL] Support to build on Debian linux
https://bugs.webkit.org/show_bug.cgi?id=159123

Reviewed by Antonio Gomes.

* efl/install-dependencies: Install libgnutls28-dev.

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

4 years agoWeb Inspector: RuntimeManager should not use view object WebInspector.quickConsole
bburg@apple.com [Tue, 28 Jun 2016 00:23:09 +0000 (00:23 +0000)]
Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole
https://bugs.webkit.org/show_bug.cgi?id=128092
<rdar://problem/15966526>

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow
from a testing context where the QuickConsole view does not exist.

Store the selected execution context identifier on RuntimeManager and use it
when doing subsequent evaluations that act on the currently selected frame.

* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
(WebInspector.RuntimeManager.prototype.saveResult):
Use local state.

(WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier):
(WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
Added.

(WebInspector.RuntimeManager):
* UserInterface/Models/ExecutionContext.js:
(WebInspector.ExecutionContext):
Move the symbolic name for the top level execution context to RuntimeManager.

* UserInterface/Test/Test.js:
(WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more.

* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
(WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._pathComponentSelected):
For now, set RuntimeManager's selected execution context whenever we set the
selected path component. In a future patch, we should invert the dependency and have
the selected component change whenever RuntimeManager.defaultExecutionContext changes.

LayoutTests:

Add some really basic coverage for RuntimeManager.defaultExecutionContextIdentifier
and using it in RuntimeManager.evaluateInInspectedWindow.

* inspector/runtime/change-execution-context-identifier-expected.txt: Added.
* inspector/runtime/change-execution-context-identifier.html: Added.
* inspector/runtime/resources/change-execution-context-identifier-subframe.html: Added.

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

4 years agoSet a default image for sharing webkit.org links via social.
jond@apple.com [Mon, 27 Jun 2016 23:59:50 +0000 (23:59 +0000)]
Set a default image for sharing webkit.org links via social.
https://bugs.webkit.org/show_bug.cgi?id=159167

Reviewed by Timothy Hatcher.

* wp-content/plugins/social-meta.php:

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

4 years agoREGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect...
jer.noble@apple.com [Mon, 27 Jun 2016 23:56:09 +0000 (23:56 +0000)]
REGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect.html failing on Sierra
https://bugs.webkit.org/show_bug.cgi?id=159172
<rdar://problem/27030025>

Reviewed by Brent Fulgham.

Add a hasSingleSecurityOrigin property to WebCoreNSURLSession that gets updated each time one of that
sessions' tasks receieves a response or a redirect request. Check that property from the MediaPlayerPrivate.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
* platform/network/cocoa/WebCoreNSURLSession.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession updateHasSingleSecurityOrigin:]):
(-[WebCoreNSURLSession dataTaskWithRequest:]):
(-[WebCoreNSURLSession dataTaskWithURL:]):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]):

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

4 years agoCrashing at an unreachable code trap in FTL should give more information
fpizlo@apple.com [Mon, 27 Jun 2016 23:26:41 +0000 (23:26 +0000)]
Crashing at an unreachable code trap in FTL should give more information
https://bugs.webkit.org/show_bug.cgi?id=159177

Reviewed by Saam Barati.

This stuffs information into registers so that we have some chance of seeing what happened
by looking at the register dumps.

* assembler/AbortReason.h:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::ftlUnreachable):
(JSC::FTL::DFG::LowerDFGToB3::compileBlock):
(JSC::FTL::DFG::LowerDFGToB3::crash):

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

4 years agoClean up resetting reachability in B3/Air
fpizlo@apple.com [Mon, 27 Jun 2016 22:26:41 +0000 (22:26 +0000)]
Clean up resetting reachability in B3/Air
https://bugs.webkit.org/show_bug.cgi?id=159170

Reviewed by Geoffrey Garen.

When I fixed bug 159165, I took the brute force approach. I still used the
B3::resetReachability() method, and changed the callback to record the set of deleted values
instead of deleting them eagerly. But this means tracking the set of deleted values, even
though resetReachability() already internally tracks the set of deleted blocks. You can find
out if a value is deleted by asking if its owning block was deleted.

So, this change refactors B3::resetReachability() into a new helper called
B3::recomputePredecessors(). This new helper skips the block deletion step, and lets the
client delete blocks. This lets Air delete blocks the same way that it did before, and it
lets B3 use the isBlockDead() method (which is a glorified proxy for
block->predecessors().isEmpty()) to track which values are deleted. This allows B3 to turn
Upsilons that point to dead Phis into Nops before deleting the blocks.

This shouldn't affect performance or anything real. It just makes the code cleaner.

* b3/B3BasicBlockUtils.h:
(JSC::B3::updatePredecessorsAfter):
(JSC::B3::recomputePredecessors):
(JSC::B3::isBlockDead):
(JSC::B3::resetReachability): Deleted.
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::resetReachability):
(JSC::B3::Procedure::invalidateCFG):
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::resetReachability):
(JSC::B3::Air::Code::dump):

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

4 years agoFix style invalidation for :active when the activated node has no renderer
benjamin@webkit.org [Mon, 27 Jun 2016 22:20:17 +0000 (22:20 +0000)]
Fix style invalidation for :active when the activated node has no renderer
https://bugs.webkit.org/show_bug.cgi?id=159125

Reviewed by Antti Koivisto.

Source/WebCore:

Same old bug: a style invalidation path was depending
on the style.

Here we really need both flags. An element can have
childrenAffectedByActive() false and renderStyle->affectedByActive() true
if it was subject to style sharing.

The element state "childrenAffectedByActive" should be renamed
"styleAffectedByActive" since it is not a parent invalidation flag.
That will be done separately.

Tests: fast/css/pseudo-active-on-labeled-control-without-renderer.html
       fast/css/pseudo-active-style-sharing-1.html
       fast/css/pseudo-active-style-sharing-2.html
       fast/css/pseudo-active-style-sharing-3.html
       fast/css/pseudo-active-style-sharing-4.html
       fast/css/pseudo-active-style-sharing-5.html
       fast/css/pseudo-active-style-sharing-6.html

* dom/Element.cpp:
(WebCore::Element::setActive):
* style/StyleRelations.cpp:
(WebCore::Style::commitRelationsToRenderStyle):

LayoutTests:

There was no bug with style sharing but I wanted that covered anyway.
Style sharing depends on 2 flags which is uncommon.
There was no test coverage whatsoever, breaking it did not fail any test.

* fast/css/pseudo-active-on-labeled-control-without-renderer-expected.txt: Added.
* fast/css/pseudo-active-on-labeled-control-without-renderer.html: Added.
* fast/css/pseudo-active-style-sharing-1-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-1.html: Added.
* fast/css/pseudo-active-style-sharing-2-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-2.html: Added.
* fast/css/pseudo-active-style-sharing-3-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-3.html: Added.
* fast/css/pseudo-active-style-sharing-4-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-4.html: Added.
* fast/css/pseudo-active-style-sharing-5-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-5.html: Added.
* fast/css/pseudo-active-style-sharing-6-expected.txt: Added.
* fast/css/pseudo-active-style-sharing-6.html: Added.

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

4 years agoAX: REGRESSION (r202063): ARIA role attribute is being ignored for label element
jdiggs@igalia.com [Mon, 27 Jun 2016 22:13:16 +0000 (22:13 +0000)]
AX: REGRESSION (r202063): ARIA role attribute is being ignored for label element
https://bugs.webkit.org/show_bug.cgi?id=159162

Reviewed by Chris Fleizach.

Source/WebCore:

createFromRenderer() was creating an AccessibilityLabel for any HTMLLabelElement which
lacked an explicitly-handled ARIA role. We should instead create an AccessibilityLabel
when there is no ARIA role.

Test: accessibility/aria-role-on-label.html

* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):

LayoutTests:

This regression was caught by a GTK-specific layout test. Adding a cross-platform
test for additional coverage.

* accessibility/aria-role-on-label.html: Added.
* platform/gtk/accessibility/aria-role-on-label-expected.txt: Added.
* platform/mac/accessibility/aria-role-on-label-expected.txt: Added.

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

4 years agoWeb Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollecte...
bburg@apple.com [Mon, 27 Jun 2016 21:50:46 +0000 (21:50 +0000)]
Web Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollected + 552 when closing frontend/inspected page
https://bugs.webkit.org/show_bug.cgi?id=159075
<rdar://problem/26094341>

Reviewed by Filip Pizlo.

This change caused JSC stress tests to all hit an assertion in RunLoop.
We should use RunLoop::current() to create the RunLoop::Timer since JSC-only
clients like testapi and jsc don't ever call initializeMainRunLoop().

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):

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

4 years agoUnreviewed, rolling out r202505.
ryanhaddad@apple.com [Mon, 27 Jun 2016 21:45:49 +0000 (21:45 +0000)]
Unreviewed, rolling out r202505.
https://bugs.webkit.org/show_bug.cgi?id=159169

The test added with this change is flaky and it caused an
existing test to time out on El Capitan. (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"[iOS] Media controls are too cramped with small video"
https://bugs.webkit.org/show_bug.cgi?id=158815
http://trac.webkit.org/changeset/202505

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-27

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

4 years agoAdd :focus-within to the status page
benjamin@webkit.org [Mon, 27 Jun 2016 21:44:39 +0000 (21:44 +0000)]
Add :focus-within to the status page

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-27

* features.json:
I forgot to update the json file when landing the feature.

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

4 years agoB3::Procedure::resetReachability() can create dangling references from Upsilons to...
fpizlo@apple.com [Mon, 27 Jun 2016 21:36:19 +0000 (21:36 +0000)]
B3::Procedure::resetReachability() can create dangling references from Upsilons to Phis
https://bugs.webkit.org/show_bug.cgi?id=159165

Reviewed by Mark Lam.

You can delete an unreachable block that has a Phi but some prior block may still have an
Upsilon pointing to that Phi. This can happen if the Upsilon precedes a Check that always
exits or it can happen if we remove some successor of a block and this block had an Upsilon
for one of the removed successors. These things are valid IR even if they are not canonical.
Our policy for not-canonical-but-valid IR is that the compiler should still emit valid code
in the end.

The solution is to have Procedure::resetReachability() turn those Upsilons into Nops.

* b3/B3Procedure.cpp:
(JSC::B3::Procedure::resetReachability): Fix the bug.
* b3/B3Validate.h:
* b3/testb3.cpp:
(JSC::B3::testResetReachabilityDanglingReference): Add a test. This always crashes prior to this change.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::killUnreachableBlocks): Add a FIXME about a possible similar bug.

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

4 years agoSend canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly to...
commit-queue@webkit.org [Mon, 27 Jun 2016 20:59:27 +0000 (20:59 +0000)]
Send canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=159071

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-27
Reviewed by Brady Eidson.

Source/WebKit2:

When CFNetwork asks the NetworkProcess if we can authenticate against this protection space, we used to ask
the WebProcess, which would call ResourceLoader::canAuthenticateAgainstProtectionSpace which would ask the FrameLoaderClient,
which would synchronously ask the UIProcess.  Going directly from the NetworkProcess to the UIProcess gives us many advantages:
1. It reduces IPC because we ask fewer loads.
2. It reduces synchronous IPC because we are not using the same code path as WebKit1 any more.
3. It allows us to check if the NetworkProcess is still valid in sendToNetworkingProcess, possibly fixing rdar://problem/26825408
4. It allows us to ask the UIProcess when we get authentication challenges for synchronous xhr.

I added a new test http/tests/xmlhttprequest/sync-delegate-callbacks.html to verify the change in behavior of synchronous xhr.
In order to make this test not flaky on platforms using NSURLSession, we clear the NSURLSessions used by WebKitTestRunner
to make sure that the TLS session cache is cleared so we get NSURLAuthenticationChallenges corresponding to the NSURLConnection
canAuthenticateAgainstProtectionSpace callback when we initiate the first HTTPS connection to 127.0.0.1 with this session.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didReceiveResponseNetworkSession):
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
(WebKit::NetworkProcess::cancelDownload):
(WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkResourceLoader.messages.in:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::networkStorageSession):
(WebKit::NetworkSession::clearCredentials):
(WebKit::NetworkSession::dataTaskForIdentifier):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
(WebKit::DownloadProxy::willSendRequest):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
(WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::backForwardClear):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpace):
(WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResource):
(WebKit::WebResourceLoader::isAlwaysOnLoggingAllowed):
(WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Deleted.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearCachedCredentials):
(WebKit::WebProcess::focusedWebPage):

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setHandlesAuthenticationChallenges):
(WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace):
(WTR::TestRunner::setAuthenticationUsername):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didFinishNavigation):
(WTR::TestController::canAuthenticateAgainstProtectionSpace):
(WTR::TestController::didReceiveAuthenticationChallenge):
(WTR::TestController::didCommitNavigation):
* WebKitTestRunner/TestController.h:
(WTR::TestController::setBlockAllPlugins):
(WTR::TestController::setShouldLogHistoryClientCallbacks):
(WTR::TestController::setShouldLogCanAuthenticateAgainstProtectionSpace):
(WTR::TestController::isCurrentInvocation):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
Added output so we can see when canAuthenticateAgainstProtectionSpace is called from the test expectations.

LayoutTests:

* http/tests/xmlhttprequest/sync-delegate-callbacks-expected.txt: Added.
* http/tests/xmlhttprequest/sync-delegate-callbacks.html: Added.
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/wk2/http/tests/xmlhttprequest/sync-delegate-callbacks-expected.txt: Added.

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

4 years agoRemove OS X Mavericks test results
ap@apple.com [Mon, 27 Jun 2016 20:52:43 +0000 (20:52 +0000)]
Remove OS X Mavericks test results

Rubber-stamped by Lucas Forschler.

* platform/mac-mavericks: Removed.

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

4 years ago[Mac] PiP placeholder should remain visible when 'controls' attribute is removed
eric.carlson@apple.com [Mon, 27 Jun 2016 20:37:48 +0000 (20:37 +0000)]
[Mac] PiP placeholder should remain visible when 'controls' attribute is removed
https://bugs.webkit.org/show_bug.cgi?id=159158
<rdar://problem/26727435>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, existing test updated.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.shouldHaveControls): Always return true when in PiP or AirPlay mode.

LayoutTests:

* media/controls/picture-in-picture-expected.txt: Updated.
* media/controls/picture-in-picture.html: Ditto.

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

4 years agoAdd comment to Module feature in features.json
keith_miller@apple.com [Mon, 27 Jun 2016 19:52:26 +0000 (19:52 +0000)]
Add comment to Module feature in features.json
https://bugs.webkit.org/show_bug.cgi?id=159159

Reviewed by Saam Barati.

* features.json:

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

4 years agoUpdate ATS WebContent exception for more robust framework information
oliver@apple.com [Mon, 27 Jun 2016 19:17:24 +0000 (19:17 +0000)]
Update ATS WebContent exception for more robust framework information
https://bugs.webkit.org/show_bug.cgi?id=159151

Reviewed by Alex Christensen.

We found some unexpected poor interaction with AVFoundation in the existing
CFNetwork SPI. This new SPI is more solid and let's us provide more useful
information while also being more future proof against new frameworks and
ATS modes.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):

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

4 years agoRemove now unused WTF::findNextLineStart
commit-queue@webkit.org [Mon, 27 Jun 2016 19:11:33 +0000 (19:11 +0000)]
Remove now unused WTF::findNextLineStart
https://bugs.webkit.org/show_bug.cgi?id=159157

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-27
Reviewed by Mark Lam.

Unused after r202498.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::findNextLineStart): Deleted.
* wtf/text/StringImpl.h:
(WTF::findNextLineStart): Deleted.
* wtf/text/WTFString.h:
(WTF::String::findNextLineStart): Deleted.

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

4 years ago[iOS] Media controls are too cramped with small video
commit-queue@webkit.org [Mon, 27 Jun 2016 19:06:45 +0000 (19:06 +0000)]
[iOS] Media controls are too cramped with small video
https://bugs.webkit.org/show_bug.cgi?id=158815
<rdar://problem/26824238>

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

Source/WebCore:

In updateLayoutForDisplayedWidth(), we try to ensure a minimum width is guaranteed
for the progress indicator. However, we were not accounting for the width used by
the current and remaining time labels on either side of it, so we would incorrectly
conclude that we were guaranteeing the minimum time and yield incorrect layouts since
we were trying to fit more buttons than we had room for.

In order to correctly compute the available width for the progress indicator, we now
have clones of the current and remaining time labels, hidden from video and VoiceOver,
that we update along with the originals. The same styles apply to both clones and
originals, so we may measure the clones to determine the space used by the time labels.
The reason we need to use clones is that if the time labels had previously been hidden
from view, precisely because there was not enough space to display them along with the
progress indicator, then trying to obtain metrics from them would yield 0 since they had
"display: none" styles applied. In order to avoid extra layouts and possible flashing, we
use the clones so that we never have to toggle the "display" property of the originals
just to obtain their measurements.

As a result of this change, we adjust the constant used to set the minimum required
width available to display the progress indicator after all other essential controls
and labels have been measured. That constant used to account for the width of the
time labels, and this is no longer correct.

Test: media/video-controls-drop-and-restore-timeline.html

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls-time-remaining-display.clone):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.createTimeClones):
(Controller.prototype.removeTimeClass):
(Controller.prototype.addTimeClass):
(Controller.prototype.updateDuration):
(Controller.prototype.updateLayoutForDisplayedWidth):
(Controller.prototype.updateTime):
(Controller.prototype.updateControlsWhileScrubbing):
* Modules/mediacontrols/mediaControlsiOS.css:
(::-webkit-media-controls-time-remaining-display.clone):
* Modules/mediacontrols/mediaControlsiOS.js:

LayoutTests:

Adjust the output of this test to account for the time label clones and add a new test.

* media/video-controls-drop-and-restore-timeline-expected.txt: Added.
* media/video-controls-drop-and-restore-timeline.html: Added.
* platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt:
* platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt:

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

4 years agoDiscounted items are displayed with positive values
andersca@apple.com [Mon, 27 Jun 2016 19:06:21 +0000 (19:06 +0000)]
Discounted items are displayed with positive values
https://bugs.webkit.org/show_bug.cgi?id=159160
rdar://problem/26980772

Reviewed by Dean Jackson.

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toDecimalNumber):
Add new helper function. Correctly compute the mantissa.

(WebKit::toPKPaymentSummaryItem):
(WebKit::toPKShippingMethod):
Use toDecimalNumber.

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

4 years agoUpdate features.json for ES6 completed features.
keith_miller@apple.com [Mon, 27 Jun 2016 18:52:36 +0000 (18:52 +0000)]
Update features.json for ES6 completed features.
https://bugs.webkit.org/show_bug.cgi?id=159152

Reviewed by Mark Lam.

* features.json:

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

4 years agoB3 should not use Nops when deleting unreachable code
fpizlo@apple.com [Mon, 27 Jun 2016 18:35:09 +0000 (18:35 +0000)]
B3 should not use Nops when deleting unreachable code
https://bugs.webkit.org/show_bug.cgi?id=159120
rdar://problem/26500743

Reviewed by Michael Saboff.

Prior to this change, transformations that obviated the need for some value could choose
from these ways to kill it:

- replaceWithIdentity() if we're replacing with another value.
- replaceWithNop() if the type is Void or if we know that we'll fix any users of this
  value.
- deleteValue() if the code is unreachable.

The bug here is that reduceStrength() was being clever about how to get rid of a value.
reduceStrength() may find a Check that must always exit. The goal is to remove any code
dominated by the Check. But it would be awkward to eagerly delete all of the blocks
dominated by this one. So this code took a much simpler approach: it would
replaceWithNop() for all of the values in this block after the Check and it would replace
the terminal with Oops.

But this corrupts the IR in a subtle way: some of those values may have been non-Void but
now they are Nops so they are Void. reduceStrength() will not yet realize that the blocks
dominated by the one with the Check are unreachable, so it will run all sorts of
optimizations on those blocks. This could have probably manifested as many different kinds
of badness, but the way I found out about this issue was through a crash in
IntRange::top(Type) when inlined into ReduceStrength::rangeFor(). We'd die in a switch
statement over a child's type.

We could fix this by making rangeFor() tolerate Void. But I think that this would be
dangerous. There could easily be other places in reduceStrength() that assume that value's
children are non-Void. So, this change fixes the Check optimization and adds mechanisms to
prevent other optimizations from breaking the children-are-not-Void rule.

This introduces two high-level changes:

- It's no longer legal to replaceWithNop() if the value is not Void. This change alone
  would cause reduceStrength() to instacrash in its Check optimization. Almost all other
  uses of replaceWithNop() were already following this rule, so they were fine. One other
  place was using replaceWithNop() on non-Void values after arranging for them to no
  longer have any parents. That was changed to call replaceWithNopIgnoringType(), which
  doesn't have any type assertions.

- For reduceStrength() there is a new Value::replaceWithBottom() method that works with
  Void or non-Void and behaves like you would want replaceWithNop() to behave: if you know
  that the code is unreachable then it produces something that is guaranteed to be deleted
  by later optimizations, and if it's not unreachable, then it's guaranteed to be compiled
  to something harmless and cheap. This means replacing the value with an identity that
  points to a bottom constant (the 0 for whatever type we have), or just replacing it with
  Nop if it's Void.

This also adds a test case for the reason why we do this: we may have two blocks, where
the first block unconditionally exits while dominating the second block. The second block
references values in the part of the first block that is unreachable. In trunk, this test
would assert in ReduceStrength::rangeFor() because the CheckAdd in the second block would
reference a Nop in the first block.

This fixes a high volume crash in ReduceStrength::rangeFor(). This crash was very
confusing. Even though we were crashing at a RELEASE_ASSERT_NOT_REACHED() in a switch
statement in IntRange::top(Type), clang was merging that trap with the trap it used for
Vector OOB. The top of the stack in crash dumps looked like:

    JSC::B3::(anonymous namespace)::ReduceStrength::rangeFor(JSC::B3::Value*, unsigned int) + 4477 (Vector.h:655)

Where Vector.h:655 is:

    OverflowHandler::overflowed();

But this crash was not at Vector.h:655. It was at B3ReduceStrength.cpp:121. The two lines
are both traps, so they got merged despite differences in debug info. This bug would have
been so much easier to fix if I had the right line number.

* b3/B3BottomProvider.h: Added. This is a utility for creating bottom values.
(JSC::B3::BottomProvider::BottomProvider):
(JSC::B3::BottomProvider::operator()):
* b3/B3InsertionSet.cpp: Optimized adding bottom values a bit. We will no longer create pointless duplicates.
(JSC::B3::InsertionSet::insertBottom):
(JSC::B3::InsertionSet::execute):
(JSC::B3::InsertionSet::bottomForType):
* b3/B3InsertionSet.h:
* b3/B3MoveConstants.cpp: Use replaceWithNopIgnoringType() because we *know* that we can replaceWithNop even for non-Void.
* b3/B3Procedure.h:
* b3/B3ReduceStrength.cpp: Use replaceWithBottom().
* b3/B3ReduceStrength.h:
* b3/B3TypeMap.h: I figured if I wrote type-casing code like this once then I'd never want to write it again.
* b3/B3Value.cpp:
(JSC::B3::Value::replaceWithIdentity):
(JSC::B3::Value::replaceWithNop):
(JSC::B3::Value::replaceWithNopIgnoringType):
* b3/B3Value.h:
* b3/B3ValueInlines.h:
(JSC::B3::Value::replaceWithBottom): This is the new method of killing unreachable code.
(JSC::B3::Value::as):
* b3/testb3.cpp: Add new tests!
(JSC::B3::testLateRegister):
(JSC::B3::testReduceStrengthCheckBottomUseInAnotherBlock):
(JSC::B3::zero):
(JSC::B3::run):

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

4 years agoNo error message when passing an invalid API version to ApplePaySession constructor
andersca@apple.com [Mon, 27 Jun 2016 18:28:00 +0000 (18:28 +0000)]
No error message when passing an invalid API version to ApplePaySession constructor
https://bugs.webkit.org/show_bug.cgi?id=159154

Reviewed by Tim Horton.

Log an error message if the version is not supported. Also, check for version 0 since that is also not supported.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):

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

4 years agoREGRESSION: Web Inspector: Text search broken in resources with <CR>
joepeck@webkit.org [Mon, 27 Jun 2016 18:18:37 +0000 (18:18 +0000)]
REGRESSION: Web Inspector: Text search broken in resources with <CR>
https://bugs.webkit.org/show_bug.cgi?id=159110
<rdar://problem/27008485>

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/ContentSearchUtilities.cpp:
(Inspector::ContentSearchUtilities::lineEndings):
The frontend moved to only treated newlines as line endings in
the TextEditor. The backend however was looking for many
different types of line endings (\r\n, \r, \n). This caused
the line endings to ultimately differ between the frontend
and the backend, so the frontend couldn't find the lines that
the backend was claiming search results were on. Change the
backend to only look for \n line endings.

LayoutTests:

* inspector/debugger/searchInContent-linebreaks-expected.txt:
* inspector/debugger/searchInContent-linebreaks.html:
Now that the backend responds with lines that end in \n, this test changes
the number of line results. The frontend interprets this correctly.

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

4 years agoAX: Anonymous RenderMathMLOperators are not exposed to the accessibility tree
jdiggs@igalia.com [Mon, 27 Jun 2016 17:57:49 +0000 (17:57 +0000)]
AX: Anonymous RenderMathMLOperators are not exposed to the accessibility tree
https://bugs.webkit.org/show_bug.cgi?id=139582
<rdar://problem/26938849>

Reviewed by Chris Fleizach.

This is based on a patch by Frederic Wang <fwang@igalia.com>.

Source/WebCore:

WebCore assigns the generic MathElementRole AccessibilityRole to elements
which are expected to be included in the accessibility tree. This assignment
is based on the AccessibilityRenderObject's node being a MathMLElement. The
anonymous RenderMathMLOperators fail that test.

From the perspective of accessibility support, these operators function
like MathMLElements. Furthermore, both WebCore and the platforms rely
upon MathElementRole to identify accessible MathML objects. The simplest
fix is to have AccessibilityRenderObject::isMathElement() treat anonymous
MathML operators as if they were MathMLElements.

Now that these operators are being exposed, we need to handle them in
AccessibilityRenderObject::textUnderElement() which assumes that anonymous
objects either have nodes or have children with nodes. And crashes when
that fails to be the case. Making RenderMathMLOperator::textContent()
public and then using it to get the text under anonymous operators solves
this problem. We also assign StaticTextRole to these operators on the Mac
because the default platform mapping of MathElementRole is GroupRole, which
made sense when we had a child RenderText object holding the operator.

Lastly, AccessibilityRenderObject::isIgnoredElementWithinMathTree() no
longer needs to special-case anonymous operators because they now have
MathElementRole.

Tests: accessibility/math-fenced.html
       accessibility/math-foreign-content.html

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAnonymousMathOperator):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
(WebCore::AccessibilityRenderObject::stringValue):
(WebCore::AccessibilityRenderObject::isMathElement):
(WebCore::AccessibilityRenderObject::isAnonymousMathOperator):
(WebCore::AccessibilityRenderObject::isIgnoredElementWithinMathTree):
* accessibility/AccessibilityRenderObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper role]):
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLOperator.h:
(WebCore::RenderMathMLOperator::textContent):

LayoutTests:

One of the things making it difficult to tell that the operators were not
exposed on the Mac is the fact that the operator text is present. But the
operator text is simply a StaticTextRole object corresponding to the
RenderText descendant of the operator. Furthermore, on the Mac, accessible
math operators have subroles which are missing from the StaticTextRole
object which is exposed. In order to make issues like this more obvious,
add an option to include the subrole to dumpAccessibilityTree() and use it
in the new math-fenced.html.

This change also fixes the mfenced in mac/mathml-elements.html that was
broken after r202420. We enable it again and update the expectations of
that test because the operators are now in the accessibility tree.

We also add a new test to verify the render tree of foreign content in
MathML formulas.

* accessibility/mac/mathml-elements-expected.txt: Updated.
* accessibility/mac/mathml-elements.html: Re-enable the mfenced test.
* accessibility/math-fenced.html: Added.
* accessibility/math-foreign-content.html: Added.
* platform/gtk/accessibility/math-fenced-expected.txt: Added.
* platform/gtk/accessibility/math-foreign-content-expected.txt: Added.
* platform/mac/accessibility/math-fenced-expected.txt: Added.
* platform/mac/accessibility/math-foreign-content-expected.txt: Added.
* resources/accessibility-helper.js: Add option to include subrole in tree.
(dumpAccessibilityTree):

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

4 years agoRemove flaky expectation for imported/w3c/web-platform-tests/html/semantics/embedded...
ryanhaddad@apple.com [Mon, 27 Jun 2016 17:57:04 +0000 (17:57 +0000)]
Remove flaky expectation for imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_loadeddata.html
https://bugs.webkit.org/show_bug.cgi?id=150956

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoWebRTC: Unskip RTCPeerConnection-AddRemoveStream test
adam.bergkvist@ericsson.com [Mon, 27 Jun 2016 17:53:24 +0000 (17:53 +0000)]
WebRTC: Unskip RTCPeerConnection-AddRemoveStream test
https://bugs.webkit.org/show_bug.cgi?id=159133

Reviewed by Eric Carlson.

Unskip RTCPeerConnection-AddRemoveStream test (on GTK+ port). RTCPeerConnection implements
the legacy MediaStream-based API as JS built-ins so we can run this test again.

* fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt:
* fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
* platform/gtk/TestExpectations:

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

4 years agoWebRTC: Remove unused RTCOfferAnswerOptionsPrivate.h
adam.bergkvist@ericsson.com [Mon, 27 Jun 2016 17:52:03 +0000 (17:52 +0000)]
WebRTC: Remove unused RTCOfferAnswerOptionsPrivate.h
https://bugs.webkit.org/show_bug.cgi?id=159130

Reviewed by Eric Carlson.

Remove unused RTCOfferAnswerOptionsPrivate.h file.

* platform/mediastream/RTCOfferAnswerOptionsPrivate.h: Removed.

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

4 years agoCrash in layout test /media/video-buffered-range-contains-currentTime.html
jer.noble@apple.com [Mon, 27 Jun 2016 17:50:25 +0000 (17:50 +0000)]
Crash in layout test /media/video-buffered-range-contains-currentTime.html
https://bugs.webkit.org/show_bug.cgi?id=159109
<rdar://problem/26535750>

Reviewed by Alex Christensen.

Guard against a dealloc race condition by holding a retain on the session
until the task's _resource:loadFinishedWithError: completes, including
main thread callbacks.

* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:]):

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

4 years agoWeb Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollecte...
bburg@apple.com [Mon, 27 Jun 2016 17:50:17 +0000 (17:50 +0000)]
Web Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollected + 552 when closing frontend/inspected page
https://bugs.webkit.org/show_bug.cgi?id=159075
<rdar://problem/26094341>

Reviewed by Timothy Hatcher.

Move the asynchronous work to a task class that can be cancelled when the
heap agent is reset, disabled or destroyed.

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):
(Inspector::SendGarbageCollectionEventsTask::addGarbageCollection):
(Inspector::SendGarbageCollectionEventsTask::reset):
(Inspector::SendGarbageCollectionEventsTask::timerFired):
Added. This holds onto GarbageCollectionData that needs to be sent asynchronously.
It uses the RunLoop variant of Timer and can queue multiple collections to be sent.
The data vector is guarded with a lock so that garbageCollected() can safely add
collection data from a non-main thread while the main thread sends out events.

(Inspector::InspectorHeapAgent::InspectorHeapAgent):
(Inspector::InspectorHeapAgent::~InspectorHeapAgent):
(Inspector::InspectorHeapAgent::disable):
Reset the task when disabling or tearing down the agent so the timer doesn't fire after destruction.

(Inspector::InspectorHeapAgent::didGarbageCollect):
Add the collection data to the task, which will dispatch an event for it asynchronously.

* inspector/agents/InspectorHeapAgent.h:

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

4 years agoUpdate TestExpectations for some dynamic MathML tests
fred.wang@free.fr [Mon, 27 Jun 2016 17:44:16 +0000 (17:44 +0000)]
Update TestExpectations for some dynamic MathML tests
https://bugs.webkit.org/show_bug.cgi?id=159142

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-27
Reviewed by Brent Fulgham.

* TestExpectations: Enable this test again after r199980.
* platform/efl/TestExpectations: This is already claimed to pass in the  platform independent TestExpectations.
* platform/gtk/TestExpectations: Ditto.
* platform/ios-simulator/TestExpectations: This test passes after the refactoring of RenderMathMLOperator.

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

4 years agoES6 Change: Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts...
msaboff@apple.com [Mon, 27 Jun 2016 17:38:55 +0000 (17:38 +0000)]
ES6 Change: Unify handling of RegExp CharacterClassEscapes \w and \W and Word Asserts \b and \B
https://bugs.webkit.org/show_bug.cgi?id=158505

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This change makes it so that the CharacterClassEscape \w matches the inverse of
\W and vice versa for unicode, ignore case RegExp's.

Before this change, both /\w/ui and /\W/ui RegExp's would match the characters
k, K, s, S, \u017f (Latin Small Letter Long S) and \u212a (Kelvin Sign).
This was due to how the ES6 standard defined matching of character classes
specifically that the abstract operation "Canonicalize()" is called for the
character to be matched AND for the characters in the character class we are
matching against.  This change is to make \W always be the inverse of \w.
It is still the case that the characters that match against \w changes
depending on a regular expression's flags.

The only real changes occur for regular expressions with both the unicode and
ignore case flags set.  Updated the character class generator to make
nonwordUnicodeIgnoreCaseChar not include k, K, s, S, \u017f and \u212a.
Changed BytecodePattern.wordcharCharacterClass to use the correct
word character class for the flags.  Simplfied character class set up in
in the pattern to use m_pattern.wordUnicodeIgnoreCaseCharCharacterClass and
invert as appropriate when unicode and ignore case are both set.

* create_regex_tables:
* yarr/YarrInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):

LayoutTests:

Updated and added test cases.

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:

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

4 years agoSet an upper limit for the size or number of pieces of stretchy operators
fred.wang@free.fr [Mon, 27 Jun 2016 17:36:09 +0000 (17:36 +0000)]
Set an upper limit for the size or number of pieces of stretchy operators
https://bugs.webkit.org/show_bug.cgi?id=155434

Source/WebCore:

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-27
Reviewed by Brent Fulgham.

Stretchy MathML operators can currently use an arbitrary number of extension glyphs to cover
a target size. This may result in hangs if large stretch sizes are requested. This change
only allow at most the 128 first extensions to be painted by the MathOperator class, which
should really be enough for mathematical formulas used in practice.

No new tests, already tested by very-large-stretchy-operators.

* rendering/mathml/MathOperator.cpp: Add a new kMaximumExtensionCount constant.
(WebCore::MathOperator::fillWithVerticalExtensionGlyph): Limit the number of step in this loop to kMaximumExtensionCount.
(WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Ditto.

LayoutTests:

Update test expectations for very-large-stretchy-operators.

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-27
Reviewed by Brent Fulgham.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoSmall refactoring MathMLInlineContainerElement::createElementRenderer
fred.wang@free.fr [Mon, 27 Jun 2016 17:33:38 +0000 (17:33 +0000)]
Small refactoring MathMLInlineContainerElement::createElementRenderer
https://bugs.webkit.org/show_bug.cgi?id=159131

Reviewed by Brent Fulgham.

Many of the MathML renderer classes have been merged during the MathML refactoring. We
simplify how instances are created in MathMLInlineContainerElement::createElementRenderer
by removing duplicate createRenderer calls.

No new tests, behavior unchanged.

* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createElementRenderer):

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

4 years agoDFGByteCodeParsing does not handle calling the Object constructor with no arguments...
keith_miller@apple.com [Mon, 27 Jun 2016 16:48:31 +0000 (16:48 +0000)]
DFGByteCodeParsing does not handle calling the Object constructor with no arguments correctly
https://bugs.webkit.org/show_bug.cgi?id=159117
<rdar://problem/26996781>

Reviewed by Saam Barati.

DFGByteCodeParsing always assumed there would be an argument to the Object constructor.
This is clearly not always the case and we should be able to handle it.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
* tests/stress/indirect-call-object-constructor-with-no-arguments.js: Added.
(let.foo.Object.test):

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

4 years agoSkip two LayoutTests that rely on mouse events on ios-simulator
ryanhaddad@apple.com [Mon, 27 Jun 2016 16:01:00 +0000 (16:01 +0000)]
Skip two LayoutTests that rely on mouse events on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years ago[GTK] Unreviewed test gardening. Added Failure Test Expectations because of r194502...
jfernandez@igalia.com [Mon, 27 Jun 2016 14:47:09 +0000 (14:47 +0000)]
[GTK] Unreviewed test gardening. Added Failure Test Expectations because of r194502 and r194513.
https://bugs.webkit.org/show_bug.cgi?id=159147

* platform/gtk/TestExpectations:

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

4 years ago[GTK][EFL] Build with threaded compositor enabled is broken
commit-queue@webkit.org [Mon, 27 Jun 2016 10:57:09 +0000 (10:57 +0000)]
[GTK][EFL] Build with threaded compositor enabled is broken
https://bugs.webkit.org/show_bug.cgi?id=159138

Patch by Miguel Gomez <magomez@igalia.com> on 2016-06-27
Reviewed by Carlos Garcia Campos.

Source/WebCore:

No need to set the device scale. The compositor buffer is only used for the accelerated
canvas scenario, and the device scale is always 1 there.
This change was introduced in r202421.

Covered by existing tests.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::createCompositorBuffer):

Source/WebKit2:

Replace the usage of NoncopyableFunction with Function, to follow the changes in r202439.

* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
(WebKit::CompositingRunLoop::performTask):
(WebKit::CompositingRunLoop::performTaskSync):
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:

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

4 years agoLayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrast...
commit-queue@webkit.org [Mon, 27 Jun 2016 09:22:08 +0000 (09:22 +0000)]
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/ is failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=159136

Unreviewed.

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-27

* platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/form-expected.txt: Added.

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

4 years ago[GStreamer] top/bottom black bars added needlessly in fullscreen
philn@webkit.org [Mon, 27 Jun 2016 09:21:51 +0000 (09:21 +0000)]
[GStreamer] top/bottom black bars added needlessly in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=158980

Patch by Philippe Normand <philn@igalia.com> on 2016-06-27
Reviewed by Carlos Garcia Campos.

The natural video size calculation depends on the validity of the
current sample, so whenever the first sample reached the sink it's a
good idea to reflect this on the player which will update its natural
size accordingly.

Fixes an issue where black borders were added on top and bottom of
fullscreen video.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):

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

4 years ago[Win] The test fast/events/wheel-event-outside-body.html is timing out.
pvollan@apple.com [Mon, 27 Jun 2016 09:01:57 +0000 (09:01 +0000)]
[Win] The test fast/events/wheel-event-outside-body.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=159129

Reviewed by Alex Christensen.

Implement the function mouseScrollBy in the Windows event sender.

* DumpRenderTree/win/EventSender.cpp:
(mouseScrollBy):
(mouseScrollByWithWheelAndMomentumPhasesCallback):

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

4 years agoRemove didFailRedirectCheck ThreadableLoaderClient callback
commit-queue@webkit.org [Mon, 27 Jun 2016 08:28:30 +0000 (08:28 +0000)]
Remove didFailRedirectCheck ThreadableLoaderClient callback
https://bugs.webkit.org/show_bug.cgi?id=159085

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-27
Reviewed by Daniel Bates.

Source/WebCore:

Removing didFailRedirectCheck and using didFailAccessControlCheck instead.
The change in behavior is that additional error messages are outputted in the console.
These messages give additional debugging information.

Covered by rebased tests.

* Modules/fetch/FetchLoader.cpp: Removing didFailRedirectCheck.
* Modules/fetch/FetchLoader.h: Ditto.
* inspector/InspectorNetworkAgent.cpp: Ditto.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::redirectReceived): Calling didFailAccessControlCheck with information on failing
URL.
(WebCore::DocumentThreadableLoader::loadRequest): Ditto.
* loader/ThreadableLoaderClient.h: Removing didFailRedirectCheck.
* loader/ThreadableLoaderClientWrapper.h: Ditto.
* loader/WorkerThreadableLoader.cpp: Ditto.
* loader/WorkerThreadableLoader.h: Ditto.
* page/EventSource.cpp: Ditto.
* page/EventSource.h: Ditto.
* workers/WorkerScriptLoader.cpp: Ditto.
* workers/WorkerScriptLoader.h: Ditto.
* xml/XMLHttpRequest.cpp: Ditto.
* xml/XMLHttpRequest.h: Ditto.

LayoutTests:

* http/tests/security/contentSecurityPolicy/connect-src-eventsource-redirect-to-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/worker-csp-blocks-xhr-redirect-cross-origin-expected.txt:
* http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt:
* http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:

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

4 years ago[EFL] Fix build warning when using geoclue2
gyuyoung.kim@webkit.org [Mon, 27 Jun 2016 05:10:05 +0000 (05:10 +0000)]
[EFL] Fix build warning when using geoclue2
https://bugs.webkit.org/show_bug.cgi?id=159128

Reviewed by Antonio Gomes.

EFL port has handled build warning as error. So EFL port
hasn't been built when we use geoclue2 library because a generated geoclue2 file
has unused-parameter build warning. To fix it this patch set to ignore the build warning
in the generated geoclue2 file.

* PlatformEfl.cmake:

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

4 years agoRegression: HTMLOptionsCollection's named properties have precedence over indexed...
cdumez@apple.com [Mon, 27 Jun 2016 01:29:34 +0000 (01:29 +0000)]
Regression: HTMLOptionsCollection's named properties have precedence over indexed properties
https://bugs.webkit.org/show_bug.cgi?id=159058
<rdar://problem/26988542>

Reviewed by Ryosuke Niwa.

Source/WebCore:

HTMLOptionsCollection's named properties had precedence over indexed properties,
which is wrong as per:
http://heycam.github.io/webidl/#getownproperty-guts

The reason is that there was a named property getter defined on HTMLOptionsCollection
but no indexed property getter. As a result, HTMLOptionsCollection would fall back to
using HTMLCollection's indexed property getter but HTMLOptionsCollection's named getter
would take precedence. This patch defines an indexed property getter on
HTMLOptionsCollection to fix the problem.

Ideally, HTMLOptionsCollection would have no indexed / named property getters and would
entirely rely on the ones from HTMLCollection. However, our bindings generator currently
has trouble with this and requires HTMLOptionsCollection to have a named getter.

Test: fast/dom/HTMLSelectElement/options-indexed-getter-precedence.html

* html/HTMLOptionsCollection.idl:

LayoutTests:

Add layout test coverage.

* fast/dom/HTMLSelectElement/options-indexed-getter-precedence-expected.txt: Added.
* fast/dom/HTMLSelectElement/options-indexed-getter-precedence.html: Added.

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

4 years ago[GTK] Unreviewed test gardening.
jfernandez@igalia.com [Sun, 26 Jun 2016 21:57:50 +0000 (21:57 +0000)]
[GTK] Unreviewed test gardening.

Several hidpi tests pass now thanks to r202421.

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

4 years ago[macOS] Font-related test gardening for macOS Sierra
mmaxfield@apple.com [Sun, 26 Jun 2016 18:02:16 +0000 (18:02 +0000)]
[macOS] Font-related test gardening for macOS Sierra
https://bugs.webkit.org/show_bug.cgi?id=159106
<rdar://problem/25807529>

Unreviewed.

* fast/ruby/bopomofo-letter-spacing.html:
* fast/ruby/bopomofo-rl.html:
* fast/ruby/bopomofo.html:
* svg/W3C-SVG-1.1/text-fonts-01-t.svg:
* svg/text/text-fonts-01-t.svg:

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

4 years agoRegression(r202262): Infinite loop under searchForLinkRemovingExistingDDLinks()
cdumez@apple.com [Sun, 26 Jun 2016 16:25:49 +0000 (16:25 +0000)]
Regression(r202262): Infinite loop under searchForLinkRemovingExistingDDLinks()
https://bugs.webkit.org/show_bug.cgi?id=159122
<rdar://problem/27014649>

Reviewed by Ryosuke Niwa.

Infinite loop under searchForLinkRemovingExistingDDLinks() because the
value returned by NodeTraversal::next() was ignored and the node iterator
was never updated.

* editing/cocoa/DataDetection.mm:
(WebCore::searchForLinkRemovingExistingDDLinks):

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

4 years agoRefreshing WPT tests up to 12b7800
commit-queue@webkit.org [Sun, 26 Jun 2016 10:04:30 +0000 (10:04 +0000)]
Refreshing WPT tests up to 12b7800
https://bugs.webkit.org/show_bug.cgi?id=158872

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-26
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* resources/ImportExpectations:
* resources/TestRepositories:
* resources/web-platform-tests-modules.json:
* web-platform-tests/XMLHttpRequest/open-url-bogus-expected.txt:
* web-platform-tests/XMLHttpRequest/open-url-bogus.htm:
* web-platform-tests/XMLHttpRequest/open-url-multi-window-4-expected.txt:
* web-platform-tests/XMLHttpRequest/resources/init.htm:
* web-platform-tests/XMLHttpRequest/send-entity-body-document-expected.txt:
* web-platform-tests/XMLHttpRequest/send-usp-expected.txt:
* web-platform-tests/XMLHttpRequest/send-usp.js:
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/common/form-submission.py: Added.
* web-platform-tests/common/w3c-import.log:
* web-platform-tests/dom/events/Event-defaultPrevented-expected.txt:
* web-platform-tests/dom/events/Event-defaultPrevented.html:
* web-platform-tests/dom/events/w3c-import.log:
* web-platform-tests/dom/historical-expected.txt:
* web-platform-tests/dom/historical.html:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/interfaces.html:
* web-platform-tests/dom/lists/w3c-import.log:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
* web-platform-tests/dom/nodes/Document-characterSet-normalization-expected.txt:
* web-platform-tests/dom/nodes/Document-characterSet-normalization.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_bmp-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_bmp.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_css-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_css.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_01-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_01.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_02-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_02.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_gif-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_gif.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_html-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_html.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_javascripturi-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_javascripturi.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_jpg-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_jpg.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_01-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_01.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_02-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_02.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_png-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_png.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_txt-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_txt.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_xml-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_xml.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/createDocument-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/createDocument.html:
* web-platform-tests/dom/nodes/Document-createElement-namespace-expected.txt:
* web-platform-tests/dom/nodes/Document-createElement-namespace.html:
* web-platform-tests/dom/nodes/Element-classlist-expected.txt:
* web-platform-tests/dom/nodes/Element-classlist.html:
* web-platform-tests/dom/nodes/Node-cloneNode.html:
* web-platform-tests/dom/nodes/remove-unscopable-expected.txt:
* web-platform-tests/dom/nodes/remove-unscopable.html:
* web-platform-tests/dom/nodes/w3c-import.log:
* web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:
* web-platform-tests/domparsing/DOMParser-parseFromString-html.html:
* web-platform-tests/domparsing/OWNERS:
* web-platform-tests/domparsing/w3c-import.log:
* web-platform-tests/fetch/api/redirect/redirect-method.js:
* web-platform-tests/fetch/api/redirect/w3c-import.log:
* web-platform-tests/fetch/api/request/request-cache-expected.txt:
* web-platform-tests/fetch/api/request/request-cache.html:
* web-platform-tests/fetch/api/request/request-error-expected.txt:
* web-platform-tests/fetch/api/request/request-error.html:
* web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt:
* web-platform-tests/fetch/api/request/request-init-001.sub.html:
* web-platform-tests/fetch/api/request/request-init-003.sub-expected.txt:
* web-platform-tests/fetch/api/request/request-init-003.sub.html:
* web-platform-tests/fetch/api/request/resources/cache.py:
* web-platform-tests/fetch/api/request/resources/get-host-info.sub.js: Added.
* web-platform-tests/fetch/api/request/resources/w3c-import.log:
* web-platform-tests/fetch/api/resources/utils.js:
* web-platform-tests/fetch/api/resources/w3c-import.log:
* web-platform-tests/fetch/api/response/response-cancel-stream-expected.txt:
* web-platform-tests/fetch/api/response/response-cancel-stream.html:
* web-platform-tests/fetch/api/response/response-consume-stream.html:
* web-platform-tests/fetch/api/response/response-stream-disturbed-4.html:
* web-platform-tests/fetch/api/response/response-stream-disturbed-5.html:
* web-platform-tests/fetch/api/response/w3c-import.log:
* web-platform-tests/html/dom/documents/dom-tree-accessors/w3c-import.log:
* web-platform-tests/html/dom/elements-embedded.js:
* web-platform-tests/html/dom/elements-metadata.js:
* web-platform-tests/html/dom/elements-tabular.js:
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces.html:
* web-platform-tests/html/dom/reflection-embedded-expected.txt:
* web-platform-tests/html/dom/reflection-embedded.html:
* web-platform-tests/html/dom/reflection-forms-expected.txt:
* web-platform-tests/html/dom/reflection-forms.html:
* web-platform-tests/html/dom/reflection-grouping-expected.txt:
* web-platform-tests/html/dom/reflection-grouping.html:
* web-platform-tests/html/dom/reflection-metadata-expected.txt:
* web-platform-tests/html/dom/reflection-metadata.html:
* web-platform-tests/html/dom/reflection-misc-expected.txt:
* web-platform-tests/html/dom/reflection-misc.html:
* web-platform-tests/html/dom/reflection-obsolete-expected.txt:
* web-platform-tests/html/dom/reflection-obsolete.html:
* web-platform-tests/html/dom/reflection-sections-expected.txt:
* web-platform-tests/html/dom/reflection-sections.html:
* web-platform-tests/html/dom/reflection-tabular-expected.txt:
* web-platform-tests/html/dom/reflection-tabular.html:
* web-platform-tests/html/dom/reflection-text-expected.txt:
* web-platform-tests/html/dom/reflection-text.html:
* web-platform-tests/html/dom/w3c-import.log:
* web-platform-tests/html/resources/common.js:
* web-platform-tests/html/semantics/document-metadata/the-base-element/w3c-import.log:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-rellist-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-rellist.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind.html:
* web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-iframed.sub.html:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validate.html:
* web-platform-tests/html/semantics/forms/form-control-infrastructure/form-expected.txt:
* web-platform-tests/html/semantics/forms/form-control-infrastructure/form.html:
* web-platform-tests/html/semantics/forms/form-submission-0/w3c-import.log:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html:
* web-platform-tests/html/semantics/forms/the-input-element/checkbox.html:
* web-platform-tests/html/semantics/forms/the-input-element/radio.html:
* web-platform-tests/html/semantics/forms/the-input-element/selection-expected.txt:
* web-platform-tests/html/semantics/forms/the-input-element/selection.html:
* web-platform-tests/html/semantics/forms/the-label-element/label-attributes-expected.txt:
* web-platform-tests/html/semantics/forms/the-label-element/label-attributes.html:
* web-platform-tests/html/semantics/interfaces-expected.txt:
* web-platform-tests/html/semantics/interfaces.html:
* web-platform-tests/html/semantics/interfaces.js:
* web-platform-tests/html/semantics/scripting-1/the-script-element/w3c-import.log:
* web-platform-tests/html/semantics/selectors/pseudo-classes/checked.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/default.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/dir-expected.txt:
* web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/dir01.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/disabled.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/enabled.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/focus.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/indeterminate.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/link.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/readwrite-readonly.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/required-optional.html:
* web-platform-tests/html/semantics/selectors/pseudo-classes/utils.js:
* web-platform-tests/html/semantics/selectors/pseudo-classes/valid-invalid.html:
* web-platform-tests/html/semantics/tabular-data/the-table-element/table-rows.html:
* web-platform-tests/lint.whitelist:
* web-platform-tests/service-workers/cache-storage/script-tests/cache-storage-match.js:
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/close.https.html: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/registration-attribute.https.html: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/resources/close-worker.js: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/resources/registration-attribute-worker.js: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/resources/unregister-controlling-worker.html: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/resources/unregister-worker.js: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/resources/update-worker.js: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/resources/update-worker.py: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/resources/w3c-import.log: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/unregister.https.html: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/update.https.html: Added.
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/w3c-import.log: Added.
* web-platform-tests/service-workers/service-worker/activate-event-after-install-state-change.https.html: Added.
* web-platform-tests/service-workers/service-worker/activation-after-registration.https.html: Added.
* web-platform-tests/service-workers/service-worker/active.https.html: Added.
* web-platform-tests/service-workers/service-worker/appcache-ordering-main.https.html: Added.
* web-platform-tests/service-workers/service-worker/claim-not-using-registration.https.html: Added.
* web-platform-tests/service-workers/service-worker/claim-using-registration.https.html: Added.
* web-platform-tests/service-workers/service-worker/clients-get-cross-origin.https.html: Added.
* web-platform-tests/service-workers/service-worker/clients-get.https.html: Added.
* web-platform-tests/service-workers/service-worker/clients-matchall-client-types.https.html: Added.
* web-platform-tests/service-workers/service-worker/clients-matchall-include-uncontrolled.https.html: Added.
* web-platform-tests/service-workers/service-worker/clients-matchall.https.html: Added.
* web-platform-tests/service-workers/service-worker/controller-on-load.https.html: Added.
* web-platform-tests/service-workers/service-worker/controller-on-reload.https.html: Added.
* web-platform-tests/service-workers/service-worker/extendable-event-async-waituntil.https.html: Added.
* web-platform-tests/service-workers/service-worker/extendable-event-waituntil.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-cache.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-csp.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-event-after-navigation-within-page.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-event-async-respond-with.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-event-network-error.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-event-redirect.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-event-respond-with-stops-propagation.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-event.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-frame-resource.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-header-visibility.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-inscope.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-outscope.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-request-css-base-url.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-request-css-images.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-request-fallback.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-request-no-freshness-headers.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-request-xhr.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-response-xhr.https.html: Added.
* web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html: Added.
* web-platform-tests/service-workers/service-worker/getregistration.https.html: Added.
* web-platform-tests/service-workers/service-worker/getregistrations.https.html: Added.
* web-platform-tests/service-workers/service-worker/indexeddb.https.html: Added.
* web-platform-tests/service-workers/service-worker/install-event-type.https.html: Added.
* web-platform-tests/service-workers/service-worker/installing.https.html: Added.
* web-platform-tests/service-workers/service-worker/interfaces.https.html: Added.
* web-platform-tests/service-workers/service-worker/invalid-blobtype.https.html: Added.
* web-platform-tests/service-workers/service-worker/invalid-header.https.html: Added.
* web-platform-tests/service-workers/service-worker/multiple-register.https.html: Added.
* web-platform-tests/service-workers/service-worker/multiple-update.https.html: Added.
* web-platform-tests/service-workers/service-worker/navigate-window.https.html: Added.
* web-platform-tests/service-workers/service-worker/navigation-redirect.https.html: Added.
* web-platform-tests/service-workers/service-worker/onactivate-script-error.https.html: Added.
* web-platform-tests/service-workers/service-worker/oninstall-script-error.https.html: Added.
* web-platform-tests/service-workers/service-worker/performance-timeline.https.html: Added.
* web-platform-tests/service-workers/service-worker/postmessage-msgport-to-client.https.html: Added.
* web-platform-tests/service-workers/service-worker/postmessage-to-client.https.html: Added.
* web-platform-tests/service-workers/service-worker/postmessage.https.html: Added.
* web-platform-tests/service-workers/service-worker/ready.https.html: Added.
* web-platform-tests/service-workers/service-worker/referer.https.html: Added.
* web-platform-tests/service-workers/service-worker/register-closed-window.https.html: Added.
* web-platform-tests/service-workers/service-worker/register-default-scope.https.html: Added.
* web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html: Added.
* web-platform-tests/service-workers/service-worker/register-wait-forever-in-install-worker.https.html: Added.
* web-platform-tests/service-workers/service-worker/registration-end-to-end.https.html: Added.
* web-platform-tests/service-workers/service-worker/registration-events.https.html: Added.
* web-platform-tests/service-workers/service-worker/registration-iframe.https.html: Added.
* web-platform-tests/service-workers/service-worker/registration-service-worker-attributes.https.html: Added.
* web-platform-tests/service-workers/service-worker/registration.https.html: Added.
* web-platform-tests/service-workers/service-worker/rejections.https.html: Added.
* web-platform-tests/service-workers/service-worker/request-end-to-end.https.html: Added.
* web-platform-tests/service-workers/service-worker/resource-timing.https.html: Added.
* web-platform-tests/service-workers/service-worker/resources/404.py: Added.
* web-platform-tests/service-workers/service-worker/resources/appcache-ordering.install.html: Added.
* web-platform-tests/service-workers/service-worker/resources/appcache-ordering.is-appcached.html: Added.
* web-platform-tests/service-workers/service-worker/resources/appcache-ordering.is-appcached.js: Added.
* web-platform-tests/service-workers/service-worker/resources/appcache-ordering.manifest: Added.
* web-platform-tests/service-workers/service-worker/resources/blank.html: Added.
* web-platform-tests/service-workers/service-worker/resources/claim-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/clients-get-frame.html: Added.
* web-platform-tests/service-workers/service-worker/resources/clients-get-other-origin.html: Added.
* web-platform-tests/service-workers/service-worker/resources/clients-get-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/clients-matchall-client-types-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/clients-matchall-client-types-shared-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/clients-matchall-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/dummy-shared-worker-interceptor.js: Added.
* web-platform-tests/service-workers/service-worker/resources/dummy-worker-interceptor.js: Added.
* web-platform-tests/service-workers/service-worker/resources/dummy-worker-script.py: Added.
* web-platform-tests/service-workers/service-worker/resources/dummy.html: Added.
* web-platform-tests/service-workers/service-worker/resources/dummy.txt: Added.
* web-platform-tests/service-workers/service-worker/resources/empty-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/empty.js: Added.
* web-platform-tests/service-workers/service-worker/resources/end-to-end-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/events-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/extendable-event-async-waituntil.js: Added.
* web-platform-tests/service-workers/service-worker/resources/extendable-event-waituntil.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fail-on-fetch-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-access-control-login.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-canvas-tainting-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-cors-xhr-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-csp-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-csp-iframe.html.sub.headers: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-event-after-navigation-within-page-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-event-async-respond-with-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-event-network-error-controllee-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-event-network-error-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-event-redirect-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-event-respond-with-stops-propagation-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-event-test-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-header-visibility-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-mixed-content-iframe-inscope-to-inscope.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-mixed-content-iframe-inscope-to-outscope.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-mixed-content-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-css-base-url-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-css-base-url-style.css: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-css-base-url-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-fallback-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-fallback-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-no-freshness-headers-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-no-freshness-headers-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-redirect-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-resources-iframe.https.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-resources-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-response-xhr-iframe.https.html: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-response-xhr-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-rewrite-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/fetch-waits-for-activate-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/frame-for-getregistrations.html: Added.
* web-platform-tests/service-workers/service-worker/resources/get-host-info.sub.js: Added.
* web-platform-tests/service-workers/service-worker/resources/indexeddb-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/install-event-type-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/interfaces-worker.sub.js: Added.
* web-platform-tests/service-workers/service-worker/resources/interfaces.js: Added.
* web-platform-tests/service-workers/service-worker/resources/invalid-blobtype-iframe.https.html: Added.
* web-platform-tests/service-workers/service-worker/resources/invalid-blobtype-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/invalid-chunked-encoding-with-flush.py: Added.
* web-platform-tests/service-workers/service-worker/resources/invalid-chunked-encoding.py: Added.
* web-platform-tests/service-workers/service-worker/resources/invalid-header-iframe.https.html: Added.
* web-platform-tests/service-workers/service-worker/resources/invalid-header-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/load_worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/loaded.html: Added.
* web-platform-tests/service-workers/service-worker/resources/malformed-worker.py: Added.
* web-platform-tests/service-workers/service-worker/resources/mime-type-worker.py: Added.
* web-platform-tests/service-workers/service-worker/resources/navigate-window-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/navigation-redirect-other-origin.html: Added.
* web-platform-tests/service-workers/service-worker/resources/navigation-redirect-out-scope.py: Added.
* web-platform-tests/service-workers/service-worker/resources/navigation-redirect-scope1.py: Added.
* web-platform-tests/service-workers/service-worker/resources/navigation-redirect-scope2.py: Added.
* web-platform-tests/service-workers/service-worker/resources/navigation-redirect-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/onactivate-throw-error-from-nested-event-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/onactivate-throw-error-then-cancel-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/onactivate-throw-error-then-prevent-default-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/onactivate-throw-error-with-empty-onerror-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/onactivate-throw-error-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/oninstall-throw-error-from-nested-event-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/oninstall-throw-error-then-cancel-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/oninstall-throw-error-then-prevent-default-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/oninstall-throw-error-with-empty-onerror-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/oninstall-throw-error-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/other.html: Added.
* web-platform-tests/service-workers/service-worker/resources/override_assert_object_equals.js: Added.
* web-platform-tests/service-workers/service-worker/resources/performance-timeline-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/postmessage-msgport-to-client-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/postmessage-to-client-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/postmessage-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/redirect.py: Added.
* web-platform-tests/service-workers/service-worker/resources/referer-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/register-closed-window-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/registration-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/reject-install-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/request-end-to-end-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/request-headers.py: Added.
* web-platform-tests/service-workers/service-worker/resources/resource-timing-iframe.html: Added.
* web-platform-tests/service-workers/service-worker/resources/resource-timing-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/service-worker-csp-worker.py: Added.
* web-platform-tests/service-workers/service-worker/resources/shared-worker-controlled.js: Added.
* web-platform-tests/service-workers/service-worker/resources/shared-worker-import.js: Added.
* web-platform-tests/service-workers/service-worker/resources/silence.oga: Added.
* web-platform-tests/service-workers/service-worker/resources/simple-intercept-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/simple.html: Added.
* web-platform-tests/service-workers/service-worker/resources/simple.txt: Added.
* web-platform-tests/service-workers/service-worker/resources/skip-waiting-installed-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/skip-waiting-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/square.png: Added.
* web-platform-tests/service-workers/service-worker/resources/success.py: Added.
* web-platform-tests/service-workers/service-worker/resources/test-helpers.sub.js: Added.
* web-platform-tests/service-workers/service-worker/resources/testharness-helpers.js: Added.
* web-platform-tests/service-workers/service-worker/resources/unregister-controller-page.html: Added.
* web-platform-tests/service-workers/service-worker/resources/update-nocookie-worker.py: Added.
* web-platform-tests/service-workers/service-worker/resources/update-recovery-worker.py: Added.
* web-platform-tests/service-workers/service-worker/resources/update-worker.py: Added.
* web-platform-tests/service-workers/service-worker/resources/update/update-after-oneday.https.html: Added.
* web-platform-tests/service-workers/service-worker/resources/update/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/w3c-import.log.
* web-platform-tests/service-workers/service-worker/resources/w3c-import.log: Added.
* web-platform-tests/service-workers/service-worker/resources/wait-forever-in-install-worker.js: Added.
* web-platform-tests/service-workers/service-worker/resources/websocket.js: Added.
* web-platform-tests/service-workers/service-worker/resources/worker-interception-iframe.https.html: Added.
* web-platform-tests/service-workers/service-worker/resources/worker-load-interceptor.js: Added.
* web-platform-tests/service-workers/service-worker/resources/worker-testharness.js: Added.
* web-platform-tests/service-workers/service-worker/resources/xhr.js: Added.
* web-platform-tests/service-workers/service-worker/service-worker-csp-connect.https.html: Added.
* web-platform-tests/service-workers/service-worker/service-worker-csp-default.https.html: Added.
* web-platform-tests/service-workers/service-worker/service-worker-csp-script.https.html: Added.
* web-platform-tests/service-workers/service-worker/serviceworkerobject-scripturl.https.html: Added.
* web-platform-tests/service-workers/service-worker/shared-worker-controlled.https.html: Added.
* web-platform-tests/service-workers/service-worker/skip-waiting-installed.https.html: Added.
* web-platform-tests/service-workers/service-worker/skip-waiting-using-registration.https.html: Added.
* web-platform-tests/service-workers/service-worker/skip-waiting-without-client.https.html: Added.
* web-platform-tests/service-workers/service-worker/skip-waiting-without-using-registration.https.html: Added.
* web-platform-tests/service-workers/service-worker/skip-waiting.https.html: Added.
* web-platform-tests/service-workers/service-worker/state.https.html: Added.
* web-platform-tests/service-workers/service-worker/synced-state.https.html: Added.
* web-platform-tests/service-workers/service-worker/uncontrolled-page.https.html: Added.
* web-platform-tests/service-workers/service-worker/unregister-controller.https.html: Added.
* web-platform-tests/service-workers/service-worker/unregister-then-register-new-script.https.html: Added.
* web-platform-tests/service-workers/service-worker/unregister-then-register.https.html: Added.
* web-platform-tests/service-workers/service-worker/unregister.https.html: Added.
* web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https.html: Added.
* web-platform-tests/service-workers/service-worker/update-after-oneday.https.html: Added.
* web-platform-tests/service-workers/service-worker/update-recovery.https.html: Added.
* web-platform-tests/service-workers/service-worker/update.https.html: Added.
* web-platform-tests/service-workers/service-worker/w3c-import.log: Added.
* web-platform-tests/service-workers/service-worker/waiting.https.html: Added.
* web-platform-tests/service-workers/service-worker/websocket.https.html: Added.
* web-platform-tests/service-workers/service-worker/worker-interception.https.html: Added.
* web-platform-tests/service-workers/service-worker/xhr.https.html: Added.
* web-platform-tests/streams/OWNERS: Added.
* web-platform-tests/streams/byte-length-queuing-strategy.https.html:
* web-platform-tests/streams/count-queuing-strategy.https.html:
* web-platform-tests/streams/readable-streams/bad-strategies.https.html:
* web-platform-tests/streams/readable-streams/bad-underlying-sources.https.html:
* web-platform-tests/streams/readable-streams/brand-checks.https.html:
* web-platform-tests/streams/readable-streams/cancel.https.html:
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.https.html:
* web-platform-tests/streams/readable-streams/garbage-collection.https.html:
* web-platform-tests/streams/readable-streams/general.https.html:
* web-platform-tests/streams/readable-streams/general.js:
* web-platform-tests/streams/readable-streams/pipe-through.https.html:
* web-platform-tests/streams/readable-streams/readable-stream-reader.https.html:
* web-platform-tests/streams/readable-streams/tee.https.html:
* web-platform-tests/streams/readable-streams/templated.https.html:
* web-platform-tests/streams/w3c-import.log:

LayoutTests:

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
* platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/form-expected.txt: Added.
* platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt:
* platform/wk2/imported/w3c/web-platform-tests/html/semantics/document-metadata/styling/LinkStyle-expected.txt:

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

4 years agoThe active state of elements can break when focus changes
benjamin@webkit.org [Sun, 26 Jun 2016 04:34:23 +0000 (04:34 +0000)]
The active state of elements can break when focus changes
https://bugs.webkit.org/show_bug.cgi?id=159112

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-25
Reviewed by Antti Koivisto.

Source/WebCore:

The pseudo class :active was behaving weirdly when used
with label elements with an associated form element.
The form element would get the :active state on the first click
then no longer get the state until the focus changes.

What was happenning is setFocusedElement() was clearing active
for some unknown reason. When you really do that on an active element,
you end up in an inconsistent state where no invalidation works.

The two tests illustrates 2 ways this breaks.

The test "pseudo-active-on-labeled-element-not-canceled-by-focus" clicks
several time on a lable element. The first time, the input element gets
the focus. The second time, it already has the focus, setFocusedElement()
clears :active before finding the focusable element and end up clearing
the active state on a target in the active chain.

The test "pseudo-active-with-programmatic-focus.html" shows how to invalidate
arbitrary elements using JavaScript. This can cause severely broken active
chains where invalidation never cleans some ancestors.

Tests: fast/css/pseudo-active-on-labeled-element-not-canceled-by-focus.html
       fast/css/pseudo-active-with-programmatic-focus.html

* dom/Document.cpp:
(WebCore::Document::setFocusedElement): Deleted.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseDoubleClickEvent):
This is WebKit1 specific. The double click event was dispatching
the mouseUp and Click with after doing an Active hit test.
This causes us to have :active state in and after mouseUp in WebKit1.

LayoutTests:

* fast/css/pseudo-active-on-labeled-element-not-canceled-by-focus-expected.txt: Added.
* fast/css/pseudo-active-on-labeled-element-not-canceled-by-focus.html: Added.
* fast/css/pseudo-active-with-programmatic-focus-expected.txt: Added.
* fast/css/pseudo-active-with-programmatic-focus.html: Added.

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

4 years agoREGRESSION: Weak symbol warning when linking TestWebKitAPI
fpizlo@apple.com [Sat, 25 Jun 2016 19:07:15 +0000 (19:07 +0000)]
REGRESSION: Weak symbol warning when linking TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=159104

Reviewed by Dan Bernstein.

This uses a better approach to turn on -fvisility=hidden. All of the other projects set
this flag in xcconfig, using "GCC_SYMBOLS_PRIVATE_EXTERN = YES;".

* TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig: Use GCC_SYMBOLS_PRIVATE_EXTERN here.
* TestWebKitAPI/Configurations/TestWebKitAPILibrary.xcconfig: Use GCC_SYMBOLS_PRIVATE_EXTERN here.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Revert r202461.

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

4 years ago[Win] The test fast/events/wheel-event-destroys-frame.html is timing out.
pvollan@apple.com [Sat, 25 Jun 2016 09:00:47 +0000 (09:00 +0000)]
[Win] The test fast/events/wheel-event-destroys-frame.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=159086

Reviewed by Alex Christensen.

Implement required wheel event function in event sender.

* DumpRenderTree/win/EventSender.cpp:
(mouseScrollByWithWheelAndMomentumPhasesCallback):

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

4 years agoMore examples for the wide-gamut demo.
dino@apple.com [Sat, 25 Jun 2016 02:33:42 +0000 (02:33 +0000)]
More examples for the wide-gamut demo.

* blog-files/color-gamut/Iceland-P3.jpg: Added.
* blog-files/color-gamut/Iceland-oog.jpg: Added.
* blog-files/color-gamut/Iceland-sRGB.jpg: Added.
* blog-files/color-gamut/Italy-P3.jpg: Added.
* blog-files/color-gamut/Italy-oog.jpg: Added.
* blog-files/color-gamut/Italy-sRGB.jpg: Added.
* blog-files/color-gamut/Sunset-AdobeRGB.jpg: Added.
* blog-files/color-gamut/Sunset-P3.jpg: Added.
* blog-files/color-gamut/Sunset-oog.jpg: Added.
* blog-files/color-gamut/Sunset-sRGB.jpg: Added.
* blog-files/color-gamut/Webkit-logo-sRGB.png:
* blog-files/color-gamut/YellowFlower-P3.jpg: Added.
* blog-files/color-gamut/YellowFlower-oog.jpg: Added.
* blog-files/color-gamut/YellowFlower-sRGB.jpg: Added.
* blog-files/color-gamut/index.html:

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

4 years agoConsider exposing or hiding knowledge of a redirect from clients of WebCoreNSURLSession
jer.noble@apple.com [Sat, 25 Jun 2016 00:46:26 +0000 (00:46 +0000)]
Consider exposing or hiding knowledge of a redirect from clients of WebCoreNSURLSession
https://bugs.webkit.org/show_bug.cgi?id=156722
<rdar://problem/25780035>

Reviewed by Alex Christensen.

Source/WebCore:

Fixes tests: http/tests/security/contentSecurityPolicy/audio-redirect-allowed2.html
             http/tests/security/contentSecurityPolicy/video-redirect-allowed2.html

When receieving a NSURLResponse containing a redirected URL, AVFoundadtion will use the
URL in the response for subsequent requests. This violates the HTTP specification if the
redirect was temporary, and it also breaks two CSP tests by bypassing the redirect step
for subsequent requests.

Work around this behavior in AVFoundation by recreating the NSURLResponse with the original
request URL in the case of a temporary redirect.

* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]):

LayoutTests:

Un-skip http/tests/security/contentSecurityPolicy/audio-redirect-allowed2.html &
http/tests/security/contentSecurityPolicy/video-redirect-allowed2.html.

* platform/mac/TestExpectations:

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

4 years agoChange something in the webkit.org directory in the hope
dino@apple.com [Sat, 25 Jun 2016 00:40:38 +0000 (00:40 +0000)]
Change something in the webkit.org directory in the hope
it will kick off a website update.

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

4 years agoREGRESSION(r201171): CRASH at WebKit::WebInspectorProxy::open() + 31 when running...
bburg@apple.com [Sat, 25 Jun 2016 00:36:47 +0000 (00:36 +0000)]
REGRESSION(r201171): CRASH at WebKit::WebInspectorProxy::open() + 31 when running inspector layout tests
https://bugs.webkit.org/show_bug.cgi?id=159070
<rdar://problem/26768628>

Reviewed by Joseph Pecoraro.

We have been seeing a few crashes underneath WebInspectorProxy::bringToFront() on the bots.
Previously, this code didn't use m_inspectorPage so there was nothing to null-dereference.

However, it doesn't make sense that we would hit the null dereference here:

 - The only caller of bringToFront() on the WebProcess side is InspectorController::show().
   It only tries to bring to front if there is already a local frontend connection, which
   shouldn't be the case if m_inspectorPage is null.

 - It's guarded by m_underTest, which should have been set to true in createInspectorPage().

These clues lead me to believe that we may be improperly tearing down the inspector between tests.
For example, it seems possible that a local frontend connection is not being torn down, so
InspectorController never asks to create a inspector page when the next test calls showWebInspector.

Since this crash is not easy to reproduce, we don't have much to go on. For now, this patch
adds an early return in the case where m_inspectorPage is null when calling open().

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::open):

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

4 years agoB3 should die sooner if a Value has the wrong number of children
fpizlo@apple.com [Sat, 25 Jun 2016 00:03:44 +0000 (00:03 +0000)]
B3 should die sooner if a Value has the wrong number of children
https://bugs.webkit.org/show_bug.cgi?id=159108

Reviewed by Mark Lam.

I've been looking at a bug (rdar://problem/26500743) that's about a Vector OOB crash in
ReduceStrength::rangeFor(). The only Vector accesses are to Value::m_children, and all of
the accesses in rangeFor() are for child(0) or child(1) of binary arithmetic opcodes.
Clearly those should never go out-of-bounds.

Maybe we have horrible memory corruption. Or maybe some path creates a Value with the
wrong number of children, and that path is not tested by any of our tests. This patch adds
release assertions that will catch the latter.

I've tested this a lot. It's not a regression on our benchmarks.

* b3/B3Opcode.h:
* b3/B3Value.cpp:
(JSC::B3::Value::dumpMeta):
(JSC::B3::Value::typeFor):
(JSC::B3::Value::badOpcode):
(JSC::B3::Value::checkOpcode): Deleted.
* b3/B3Value.h:

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

4 years agoMSE gets confused by in-band text tracks
jer.noble@apple.com [Fri, 24 Jun 2016 23:54:22 +0000 (23:54 +0000)]
MSE gets confused by in-band text tracks
https://bugs.webkit.org/show_bug.cgi?id=159107
<rdar://problem/26871330>

Reviewed by Eric Carlson.

We can't currently handle text track samples in SourceBufferPrivateAVFObjC,
so don't pass them up to SourceBuffer.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):

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

4 years agoREGRESSION: Weak symbol warning when linking TestWebKitAPI
fpizlo@apple.com [Fri, 24 Jun 2016 23:49:15 +0000 (23:49 +0000)]
REGRESSION: Weak symbol warning when linking TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=159104

Reviewed by Mark Lam.

The problem is that the tests were not compiled with -fvisibility=hidden like the rest of
WK.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

4 years ago[JSC] Error prototypes are called on remote scripts.
mark.lam@apple.com [Fri, 24 Jun 2016 23:34:45 +0000 (23:34 +0000)]
[JSC] Error prototypes are called on remote scripts.
https://bugs.webkit.org/show_bug.cgi?id=52192

Reviewed by Keith Miller.

Source/JavaScriptCore:

Added a sanitizedToString() to the Error instance object so that it can be used
to get an error string without invoking getters and proxies.

* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::finishCreation):
(JSC::ErrorInstance::sanitizedToString):
* runtime/ErrorInstance.h:
(JSC::ErrorInstance::createStructure):
(JSC::ErrorInstance::runtimeTypeForCause):
(JSC::ErrorInstance::clearRuntimeTypeForCause):

Source/WebCore:

Test: http/tests/security/regress-52192.html

Parsing errors are reported to the main script's window.onerror function.  AFAIK,
both Chrome and Firefox have the error reporting mechanism use an internal
sanitized version of Error.prototype.toString() that will not invoke any getters
or proxies instead.

This patch fixes this issue by matching Chrome and Firefox's behavior.

Note: we did not choose to make error objects and prototypes read-only because
that was observed to have broken the web.
See https://bugs.chromium.org/p/chromium/issues/detail?id=69187#c73

Credit for reporting this issue goes to Daniel Divricean (http://divricean.ro).

* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
* ForwardingHeaders/runtime/ErrorInstance.h: Added.

LayoutTests:

The added test will test the following combinations of factors:

1. Explicitly throwing an error of each of the types of JS errors i.e.
   Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError.
2. Validating that the error received in window.onerror does not leak any info.
3. Validating that the 'name' and 'toString' getters set on the error prototype
   object does not get invoked for creating the error message to be passed to
   window.error.

* http/tests/security/regress-52192-expected.txt: Added.
* http/tests/security/regress-52192.html: Added.
* http/tests/security/resources/regress-52192-syntax-error.js: Added.
* http/tests/security/resources/regress-52192-throw-error.js: Added.
(catch):

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

4 years agoMedia elements should not lose playback controls when muted by a user gesture
jer.noble@apple.com [Fri, 24 Jun 2016 23:01:09 +0000 (23:01 +0000)]
Media elements should not lose playback controls when muted by a user gesture
https://bugs.webkit.org/show_bug.cgi?id=159078
<rdar://problem/26925904>

Reviewed by Beth Dakin.

Rearrange canControlControlsManager() so that the muted check only occurs if
a user gesture is required.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canControlControlsManager):

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

4 years agoUnreviewed, rolling out r202443.
commit-queue@webkit.org [Fri, 24 Jun 2016 22:52:47 +0000 (22:52 +0000)]
Unreviewed, rolling out r202443.
https://bugs.webkit.org/show_bug.cgi?id=159105

Introduced memory corruption crashes (Requested by ap on
#webkit).

Reverted changeset:

"Web Inspector: CRASH in backend at
Inspector::HeapFrontendDispatcher::garbageCollected + 552 when
closing frontend/inspected page"
https://bugs.webkit.org/show_bug.cgi?id=159075
http://trac.webkit.org/changeset/202443

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

4 years agoMore examples for a blog post on color.
dino@apple.com [Fri, 24 Jun 2016 22:44:10 +0000 (22:44 +0000)]
More examples for a blog post on color.

* blog-files/color-gamut/Shoes-oog.jpg: Added.
* blog-files/color-gamut/Shoes-sRGB.jpg: Added.
* blog-files/color-gamut/Webkit-logo-P3.png: Added.
* blog-files/color-gamut/Webkit-logo-oog.png: Added.
* blog-files/color-gamut/Webkit-logo-sRGB.png: Added.
* blog-files/color-gamut/index.html:
* blog-files/color-gamut/shoes-AdobeRGB.jpg: Added.

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

4 years agoUpdate to test gardening in r202300
mmaxfield@apple.com [Fri, 24 Jun 2016 22:39:02 +0000 (22:39 +0000)]
Update to test gardening in r202300

Unreviewed.

* platform/mac/TestExpectations:

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

4 years agoVimeo.com videos do not get playback controls
jer.noble@apple.com [Fri, 24 Jun 2016 22:25:24 +0000 (22:25 +0000)]
Vimeo.com videos do not get playback controls
https://bugs.webkit.org/show_bug.cgi?id=159082
<rdar://problem/26586630>

Reviewed by Eric Carlson.

When the HasAudioOrVideo media state changes, let the video controls recalculate
by calling videoControlsManagerDidChange().

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange):

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

4 years agoInclude enclosingListType in EditorState
bdakin@apple.com [Fri, 24 Jun 2016 22:25:10 +0000 (22:25 +0000)]
Include enclosingListType in EditorState
https://bugs.webkit.org/show_bug.cgi?id=159102
-and corresponding-
rdar://problem/26932490

Reviewed by Enrica Casucci.

Source/WebCore:

Make HTMLOListElement.h and HTMLUListElement.h Private instead of Project.
* WebCore.xcodeproj/project.pbxproj:

Export enclosingList(Node*)
* editing/htmlediting.h:

Source/WebKit2:

* Shared/EditorState.cpp:
(WebKit::EditorState::PostLayoutData::encode):
(WebKit::EditorState::PostLayoutData::decode):
* Shared/EditorState.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):

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

4 years agoAnother Windows build fix.
andersca@apple.com [Fri, 24 Jun 2016 21:58:55 +0000 (21:58 +0000)]
Another Windows build fix.

* platform/network/BlobRegistry.h:

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

4 years agoRewrite the WebKit Nightly build download URLs to use the correct secure URL.
jond@apple.com [Fri, 24 Jun 2016 21:54:09 +0000 (21:54 +0000)]
Rewrite the WebKit Nightly build download URLs to use the correct secure URL.
https://bugs.webkit.org/show_bug.cgi?id=159100.

Reviewed by Joseph Pecoraro.

* wp-content/plugins/sync-nightly-builds.php:

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

4 years agoYeat another Windows build fix.
andersca@apple.com [Fri, 24 Jun 2016 21:33:15 +0000 (21:33 +0000)]
Yeat another Windows build fix.

* dom/ActiveDOMCallbackMicrotask.h:

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

4 years agoRemoved tests of STYLE_SCOPED which was removed in r156683.
annulen@yandex.ru [Fri, 24 Jun 2016 21:09:43 +0000 (21:09 +0000)]
Removed tests of STYLE_SCOPED which was removed in r156683.
https://bugs.webkit.org/show_bug.cgi?id=159098

Reviewed by Ryosuke Niwa.

* fast/css/style-scoped/basic-attribute-expected.txt: Removed.
* fast/css/style-scoped/basic-attribute.html: Removed.
* fast/css/style-scoped/registering-expected.txt: Removed.
* fast/css/style-scoped/registering-shadowroot-expected.txt: Removed.
* fast/css/style-scoped/registering-shadowroot.html: Removed.
* fast/css/style-scoped/registering.html: Removed.
* fast/css/style-scoped/style-scoped-apply-author-styles-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-apply-author-styles.html: Removed.
* fast/css/style-scoped/style-scoped-attach-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-attach.html: Removed.
* fast/css/style-scoped/style-scoped-basic-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-basic.html: Removed.
* fast/css/style-scoped/style-scoped-change-scoped-in-shadow-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html: Removed.
* fast/css/style-scoped/style-scoped-detach-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-detach.html: Removed.
* fast/css/style-scoped/style-scoped-in-shadow-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-in-shadow.html: Removed.
* fast/css/style-scoped/style-scoped-nested-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-nested.html: Removed.
* fast/css/style-scoped/style-scoped-remove-scoped-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-remove-scoped.html: Removed.
* fast/css/style-scoped/style-scoped-set-scoped-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-set-scoped.html: Removed.
* fast/css/style-scoped/style-scoped-with-dom-operation-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-with-dom-operation.html: Removed.
* fast/css/style-scoped/style-scoped-with-important-rule-expected.txt: Removed.
* fast/css/style-scoped/style-scoped-with-important-rule.html: Removed.
* platform/efl/TestExpectations: Don't skip fast/css/style-scoped.
* platform/gtk/TestExpectations: Ditto.
* platform/ios-simulator/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.

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

4 years agoAdd a ES6 generator benchmark
fpizlo@apple.com [Fri, 24 Jun 2016 20:59:16 +0000 (20:59 +0000)]
Add a ES6 generator benchmark
https://bugs.webkit.org/show_bug.cgi?id=159101

Rubber stamped by Keith Miller.

This adds a Basic interpreter loosely based on ECMA-55:

http://www.ecma-international.org/publications/files/ECMA-ST-WITHDRAWN/ECMA-55,%201st%20Edition,%20January%201978.pdf

It includes a lexer that is a generator, a parser that uses regular expressions, and an AST
walk interpreter where the walking functions for statements are generators that call each
other with yield*. This enables the interpreter to look like an AST walk even though it can
yield at INPUT and PRINT statements.

This also uses for-of, classes, Map, and WeakMap. It also uses deprecated-but-awesome RegExp
features like RegExp.lastMatch and RegExp.rightContext. I did it that way because this is
how I've always written lexers in dynamic languages; see offlineasm's lex() method in
parser.rb for example.

The benchmark runs a handful of simple Basic programs. The longest-running one computes
prime numbers.

Includes a command-line and web harness. On my machine it runs in 2-3 seconds.

* Basic: Added.
* Basic/ast.js: Added.
(Basic.NumberApply):
(Basic.Variable):
(Basic.Const):
(Basic.NumberPow):
(Basic.NumberMul):
(Basic.NumberDiv):
(Basic.NumberNeg):
(Basic.NumberAdd):
(Basic.NumberSub):
(Basic.StringVar):
(Basic.Equals):
(Basic.NotEquals):
(Basic.LessThan):
(Basic.GreaterThan):
(Basic.LessEqual):
(Basic.GreaterEqual):
(Basic.GoTo):
(Basic.GoSub):
(Basic.Def):
(Basic.Let):
(Basic.If):
(Basic.Return):
(Basic.Stop):
(Basic.On):
(sideState.shouldStop):
(Basic.For):
(Basic.Next):
(Basic.Print):
(Basic.Input):
(Basic.Read):
(Basic.Restore):
(Basic.Dim):
(Basic.Randomize):
(Basic.End):
(Basic.Program):
* Basic/basic.js: Added.
(prepare):
(simulate):
* Basic/benchmark.js: Added.
(Benchmark):
(Benchmark.prototype.runIteration.expect):
(Benchmark.prototype.runIteration):
(runBenchmark):
* Basic/caseless_map.js: Added.
(CaselessMap):
* Basic/lexer.js: Added.
(lex.consumeWhitespace):
(lex.consume):
(lex):
* Basic/lexer_test.js: Added.
* Basic/number.js: Added.
(NumberValue):
(NumberValue.prototype.get value):
(NumberValue.prototype.apply):
(NumberValue.prototype.leftApply):
(NumberValue.prototype.assign):
(NumberArray.):
(NumberArray):
(NumberArray.prototype.apply):
(NumberArray.prototype.leftApply):
(NumberFunction):
(NumberFunction.prototype.apply):
(NumberFunction.prototype.leftApply):
(NativeFunction):
(NativeFunction.prototype.apply):
(NativeFunction.prototype.leftApply):
* Basic/parser.js: Added.
(parse):
(parse.pushToken):
(parse.peekToken):
(parse.consumeKind):
(parse.consumeToken):
(parse.parseVariable):
(parse.parseNumericExpression.parsePrimary):
(parse.parseNumericExpression.parseFactor):
(parse.parseNumericExpression.parseTerm):
(parse.parseNumericExpression):
(parse.parseConstant):
(parse.parseStringExpression):
(parse.isStringExpression):
(parse.parseRelationalExpression):
(parse.parseNonNegativeInteger):
(parse.parseGoToStatement):
(parse.parseGoSubStatement):
(parse.parseStatement):
(parse.parseStatements):
* Basic/random.js: Added.
(createRNG):
(createRNGWithFixedSeed):
(createRNGWithRandomSeed):
* Basic/state.js: Added.
(State):
(State.prototype.getValue):
(State.prototype.getSideState):
(State.prototype.abort):
(State.prototype.validate):
* Basic/test.html: Added.
* Basic/test.js: Added.
* Basic/util.js: Added.
(this.performance.performance.now.currentTime):
(else.this.preciseTime.currentTime):
(else.currentTime):
* Skipped: Make sure that we don't run Basic yet.

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

4 years agoAnother Windows build fix.
andersca@apple.com [Fri, 24 Jun 2016 20:53:09 +0000 (20:53 +0000)]
Another Windows build fix.

* page/FrameView.h:

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

4 years agoInline more of the Apple Pay source code
andersca@apple.com [Fri, 24 Jun 2016 20:49:31 +0000 (20:49 +0000)]
Inline more of the Apple Pay source code
https://bugs.webkit.org/show_bug.cgi?id=159099

Reviewed by Andreas Kling.

Source/WebCore:

* page/Settings.h:
(WebCore::Settings::applePayEnabled):
(WebCore::Settings::setApplePayEnabled):
(WebCore::Settings::applePayCapabilityDisclosureAllowed):
(WebCore::Settings::setApplePayCapabilityDisclosureAllowed):

Source/WebKit2:

* Shared/Cocoa/WebCoreArgumentCodersCocoa.h: Removed.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _applePayCapabilityDisclosureAllowed]):
(-[WKPreferences _setApplePayCapabilityDisclosureAllowed:]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _applePayEnabled]):
(-[WKWebViewConfiguration _setApplePayEnabled:]):
(-[WKWebViewConfiguration _paymentsEnabled]):
(-[WKWebViewConfiguration _setPaymentsEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
(WebKit::WebPage::updatePreferences):

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

4 years agoWeb Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollecte...
bburg@apple.com [Fri, 24 Jun 2016 20:30:04 +0000 (20:30 +0000)]
Web Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher::garbageCollected + 552 when closing frontend/inspected page
https://bugs.webkit.org/show_bug.cgi?id=159075
<rdar://problem/26094341>

Reviewed by Joseph Pecoraro.

Move the asynchronous work to a task class that can be cancelled when the
heap agent is reset, disabled or destroyed.

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):
(Inspector::SendGarbageCollectionEventsTask::addGarbageCollection):
(Inspector::SendGarbageCollectionEventsTask::reset):
(Inspector::SendGarbageCollectionEventsTask::timerFired):
Added. This holds onto GarbageCollection objects that need to be sent asynchronously.
It uses the RunLoop variant of Timer and can queue multiple pending objects to be sent.

(Inspector::InspectorHeapAgent::InspectorHeapAgent):
(Inspector::InspectorHeapAgent::~InspectorHeapAgent):
(Inspector::InspectorHeapAgent::disable):
Reset the task when disabling or tearing down the agent so the timer doesn't fire after destruction.

(Inspector::InspectorHeapAgent::didGarbageCollect):
Send the object to the task to be dispatched asynchronously.

* inspector/agents/InspectorHeapAgent.h:

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

4 years agoWindows build fix.
andersca@apple.com [Fri, 24 Jun 2016 20:18:46 +0000 (20:18 +0000)]
Windows build fix.

* platform/GenericTaskQueue.h:
(WebCore::TaskDispatcher::postTask):

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

4 years agoUse auto* for MathML elements and renderers when possible
fred.wang@free.fr [Fri, 24 Jun 2016 20:17:15 +0000 (20:17 +0000)]
Use auto* for MathML elements and renderers when possible
https://bugs.webkit.org/show_bug.cgi?id=159090

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-24
Reviewed by Alex Christensen.

No new tests, behavior is unchanged.

* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::attributeChanged):
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::getSelectedActionChildAndIndex):
(WebCore::MathMLSelectElement::getSelectedActionChild):
(WebCore::MathMLSelectElement::getSelectedSemanticsChild):
(WebCore::MathMLSelectElement::updateSelectedChild):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::isValid):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::layoutBlock):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::isValid):
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::firstLineBaseline):
(WebCore::RenderMathMLRow::computeLineVerticalStretch):
(WebCore::RenderMathMLRow::computePreferredLogicalWidths):
(WebCore::RenderMathMLRow::layoutRowItems):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::unembellishedOperator):
(WebCore::RenderMathMLScripts::getBaseAndScripts):
(WebCore::RenderMathMLScripts::computePreferredLogicalWidths):
(WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
(WebCore::RenderMathMLScripts::layoutBlock):
(WebCore::RenderMathMLScripts::firstLineBaseline):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::firstLineBaseline):
(WebCore::RenderMathMLUnderOver::isValid):
(WebCore::RenderMathMLUnderOver::over):

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

4 years agoRemove unused and static return value from InspectorStyle::populateAllProperties
commit-queue@webkit.org [Fri, 24 Jun 2016 20:14:31 +0000 (20:14 +0000)]
Remove unused and static return value from InspectorStyle::populateAllProperties
https://bugs.webkit.org/show_bug.cgi?id=159069

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-24
Reviewed by Andreas Kling.

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::populateAllProperties):
* inspector/InspectorStyleSheet.h:

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

4 years agoRename NoncopyableFunction to Function
andersca@apple.com [Fri, 24 Jun 2016 19:40:19 +0000 (19:40 +0000)]
Rename NoncopyableFunction to Function
https://bugs.webkit.org/show_bug.cgi?id=158354

Reviewed by Chris Dumez.

Source/WebCore:

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::runTask):
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::resume):
(WebCore::AudioDestinationNode::suspend):
(WebCore::AudioDestinationNode::close):
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::suspend):
(WebCore::DefaultAudioDestinationNode::close):
* Modules/webaudio/DefaultAudioDestinationNode.h:
* dom/ActiveDOMCallbackMicrotask.cpp:
(WebCore::ActiveDOMCallbackMicrotask::ActiveDOMCallbackMicrotask):
* dom/ActiveDOMCallbackMicrotask.h:
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::Task::Task):
* fileapi/AsyncFileStream.cpp:
(WebCore::callOnFileThread):
(WebCore::AsyncFileStream::perform):
* fileapi/AsyncFileStream.h:
* page/FrameView.cpp:
(WebCore::FrameView::queuePostLayoutCallback):
(WebCore::FrameView::flushPostLayoutTasksQueue):
* page/FrameView.h:
* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::dispatch):
(WebCore::ScrollingThread::dispatchBarrier):
(WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
* page/scrolling/ScrollingThread.h:
* platform/GenericTaskQueue.cpp:
(WebCore::TaskDispatcher<Timer>::postTask):
* platform/GenericTaskQueue.h:
(WebCore::TaskDispatcher::postTask):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::scheduleDeferredTask):
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::scheduleDeferredTask):
* platform/mediastream/MediaStreamPrivate.h:
* platform/mediastream/mac/AVMediaCaptureSource.h:
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::scheduleDeferredTask):
* style/StyleTreeResolver.cpp:
(WebCore::Style::postResolutionCallbackQueue):
(WebCore::Style::queuePostResolutionCallback):
* style/StyleTreeResolver.h:

Source/WebKit:

* Storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::dispatch):
* Storage/StorageSyncManager.h:
* Storage/StorageThread.cpp:
(WebCore::StorageThread::dispatch):
(WebCore::StorageThread::terminate):
* Storage/StorageThread.h:

Source/WebKit2:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::clearDiskCacheEntries):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::traverse):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::runTaskInQueue):
* NetworkProcess/cache/NetworkCacheStorage.h:

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CrossThreadTask.h:
(WTF::CrossThreadTask::CrossThreadTask):
* wtf/Function.h: Renamed from Source/WTF/wtf/NoncopyableFunction.h.
* wtf/FunctionDispatcher.h:
* wtf/MainThread.cpp:
(WTF::functionQueue):
(WTF::dispatchFunctionsFromMainThread):
(WTF::callOnMainThread):
* wtf/MainThread.h:
* wtf/RunLoop.cpp:
(WTF::RunLoop::performWork):
(WTF::RunLoop::dispatch):
* wtf/RunLoop.h:
* wtf/WorkQueue.h:
* wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):
* wtf/efl/DispatchQueueWorkItemEfl.h:
(WorkItem::WorkItem):
(TimerWorkItem::create):
(TimerWorkItem::TimerWorkItem):
* wtf/efl/WorkQueueEfl.cpp:
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):
* wtf/generic/RunLoopGeneric.cpp:
(WTF::RunLoop::TimerBase::ScheduledTask::create):
(WTF::RunLoop::TimerBase::ScheduledTask::ScheduledTask):
(WTF::RunLoop::dispatchAfter):
* wtf/generic/WorkQueueGeneric.cpp:
(WorkQueue::dispatch):
(WorkQueue::dispatchAfter):
* wtf/glib/RunLoopGLib.cpp:
(WTF::DispatchAfterContext::DispatchAfterContext):
(WTF::RunLoop::dispatchAfter):
* wtf/win/WorkItemWin.cpp:
(WTF::WorkItemWin::WorkItemWin):
(WTF::WorkItemWin::create):
(WTF::HandleWorkItem::HandleWorkItem):
(WTF::HandleWorkItem::createByAdoptingHandle):
* wtf/win/WorkItemWin.h:
(WTF::WorkItemWin::function):
* wtf/win/WorkQueueWin.cpp:
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):

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

4 years agoUse _CFHTTPCookieStorageGetDefault directly instead of NSHTTPCookieStorage to get...
commit-queue@webkit.org [Fri, 24 Jun 2016 19:26:50 +0000 (19:26 +0000)]
Use _CFHTTPCookieStorageGetDefault directly instead of NSHTTPCookieStorage to get default cookie storage
https://bugs.webkit.org/show_bug.cgi?id=159095
rdar://problem/26630073

Patch by Amir Alavi <aalavi@apple.com> on 2016-06-24
Reviewed by Brent Fulgham.

No new tests, it isn't possible to test this in a LayoutTest.

* platform/network/mac/CookieJarMac.mm:
(WebCore::httpCookiesForURL): Get a CFHTTPCookieStorageRef when no cookie storage is provided to match the case when cookie storage is provided.

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

4 years agoUpdate test expectations for rdar://problem/27000853
ap@apple.com [Fri, 24 Jun 2016 19:15:38 +0000 (19:15 +0000)]
Update test expectations for rdar://problem/27000853

* platform/mac/TestExpectations:

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

4 years agoDo not use iOS specific telephone detection on macOS.
enrica@apple.com [Fri, 24 Jun 2016 18:52:56 +0000 (18:52 +0000)]
Do not use iOS specific telephone detection on macOS.
https://bugs.webkit.org/show_bug.cgi?id=159096
rdar://problem/25870571

Reviewed by Anders Carlsson.

Adding platform guard.

* platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
(WebCore::TelephoneNumberDetector::phoneNumbersScanner):

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

4 years agoUnreviewed, rolling out r202413.
commit-queue@webkit.org [Fri, 24 Jun 2016 18:51:07 +0000 (18:51 +0000)]
Unreviewed, rolling out r202413.
https://bugs.webkit.org/show_bug.cgi?id=159097

Broke many JSC tests (Requested by ap on #webkit).

Reverted changeset:

"[JSC] Implement isFinite / isNaN in JS and make DFG ToNumber
accept non number values"
https://bugs.webkit.org/show_bug.cgi?id=154022
http://trac.webkit.org/changeset/202413

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

4 years agoUnreviewed build fix after r202429; AVStreamDataParser does not exist on iOS.
jer.noble@apple.com [Fri, 24 Jun 2016 18:38:42 +0000 (18:38 +0000)]
Unreviewed build fix after r202429; AVStreamDataParser does not exist on iOS.

* platform/spi/mac/AVFoundationSPI.h:

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

4 years agoparser_unittests.pl should not hardcode list of tests
ddkilzer@apple.com [Fri, 24 Jun 2016 18:34:20 +0000 (18:34 +0000)]
parser_unittests.pl should not hardcode list of tests
<https://webkit.org/b/159074>

Reviewed by Daniel Bates.

* Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
Update to read the list of tests from the 'resources' directory,
and instead map file extensions to subroutine names.  Switch to
use File::Basename::fileparse() to get basename and file
extension for each test.
(readTestFiles): Added.  Reads files from the directory passed
in and ignores: hidden files, anything that isn't a plain file,
and expected test results files.

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

4 years agoMove WebKit2 Apple Pay code to the open source repository
andersca@apple.com [Fri, 24 Jun 2016 18:31:05 +0000 (18:31 +0000)]
Move WebKit2 Apple Pay code to the open source repository
https://bugs.webkit.org/show_bug.cgi?id=159041

Reviewed by Sam Weinig.

* DerivedSources.make:
* Shared/Cocoa/WebCoreArgumentCodersCocoa.h: Added.
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: Added.
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp: Added.
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Added.
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in: Added.
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h: Added.
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: Added.
* UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: Added.
* UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: Added.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ApplePay/WebPaymentCoordinator.cpp: Added.
* WebProcess/ApplePay/WebPaymentCoordinator.h: Added.
* WebProcess/ApplePay/WebPaymentCoordinator.messages.in: Added.

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

4 years agoUnreviewed build fix after r202429; Fix the type of the delegate property on AVStream...
jer.noble@apple.com [Fri, 24 Jun 2016 18:21:05 +0000 (18:21 +0000)]
Unreviewed build fix after r202429; Fix the type of the delegate property on AVStreamDataParser.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
* platform/spi/mac/AVFoundationSPI.h:

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

4 years ago[MSE] Adopt +[AVStreamDataParser outputMIMECodecParameterForInputMIMECodecParameter:]
jer.noble@apple.com [Fri, 24 Jun 2016 17:46:15 +0000 (17:46 +0000)]
[MSE] Adopt +[AVStreamDataParser outputMIMECodecParameterForInputMIMECodecParameter:]
https://bugs.webkit.org/show_bug.cgi?id=158312

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

Move the declaration of AVStreamDataParser into AVFoundationSPI.h:

* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::update):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
* platform/spi/mac/AVFoundationSPI.h:

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

4 years agoMake window.open layout tests for about: URLs work on iOS
wilander@apple.com [Fri, 24 Jun 2016 17:34:42 +0000 (17:34 +0000)]
Make window.open layout tests for about: URLs work on iOS
https://bugs.webkit.org/show_bug.cgi?id=159072

Reviewed by Alex Christensen.

Fix two window.open layout tests for iOS. They previously used click events.
Now they instead turn off the popup blocker and just call window.open() on
the load event.

* http/tests/dom/window-open-about-blank-and-access-document-expected.txt:
* http/tests/dom/window-open-about-blank-and-access-document.html:
* http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt:
* http/tests/dom/window-open-about-webkit-org-and-access-document.html:
* platform/ios-simulator/TestExpectations:
    Removed the skipping of these two test cases.

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