WebKit-https.git
3 years agoUpdate HTML*Element class override methods in final classes
commit-queue@webkit.org [Fri, 15 Jul 2016 02:17:24 +0000 (02:17 +0000)]
Update HTML*Element class override methods in final classes
https://bugs.webkit.org/show_bug.cgi?id=159456

Patch by Rawinder Singh <rawinder.singh-webkit@cisra.canon.com.au> on 2016-07-14
Reviewed by Youenn Fablet.

Update HTML*Element classes so that overriden methods in final classes are marked final.
Also marked HTMLDivElement overriden methods as final since they are not overridden by derived classes.

* html/HTMLAppletElement.h:
* html/HTMLAreaElement.h:
* html/HTMLAttachmentElement.h:
* html/HTMLAudioElement.h:
* html/HTMLBRElement.h:
* html/HTMLBaseElement.h:
* html/HTMLBodyElement.h:
* html/HTMLButtonElement.h:
* html/HTMLCanvasElement.h:
* html/HTMLDataElement.h:
* html/HTMLDetailsElement.h:
* html/HTMLDivElement.h:
* html/HTMLEmbedElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFontElement.h:
* html/HTMLFormElement.h:
* html/HTMLFrameSetElement.h:
* html/HTMLHRElement.h:
* html/HTMLHtmlElement.h:
* html/HTMLKeygenElement.h:
* html/HTMLLIElement.h:
* html/HTMLLabelElement.h:
* html/HTMLLegendElement.h:
* html/HTMLLinkElement.h:
* html/HTMLMapElement.h:
* html/HTMLMarqueeElement.h:
* html/HTMLMetaElement.h:
* html/HTMLMeterElement.h:
* html/HTMLModElement.h:
* html/HTMLOListElement.h:
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLOutputElement.h:
* html/HTMLParagraphElement.h:
* html/HTMLParamElement.h:
* html/HTMLPreElement.h:
* html/HTMLProgressElement.h:
* html/HTMLQuoteElement.h:
* html/HTMLScriptElement.h:
* html/HTMLSourceElement.h:
* html/HTMLStyleElement.h:
* html/HTMLSummaryElement.h:
* html/HTMLTableCaptionElement.h:
* html/HTMLTableColElement.h:
* html/HTMLTableElement.h:
* html/HTMLTableSectionElement.h:
* html/HTMLTemplateElement.h:
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.h:
* html/HTMLUListElement.h:
* html/HTMLUnknownElement.h:
* html/HTMLVideoElement.h:
* html/HTMLWBRElement.h:

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

3 years agoIt should be a syntax error to have a 'use strict' directive inside a function that...
sbarati@apple.com [Fri, 15 Jul 2016 02:11:42 +0000 (02:11 +0000)]
It should be a syntax error to have a 'use strict' directive inside a function that has a non-simple parameter list
https://bugs.webkit.org/show_bug.cgi?id=159790
<rdar://problem/27171636>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Is is a syntax error for a function's parameter list to be non-simple
and for the function to also contain a 'use strict' directive.

See section 14.2.1 of the spec:
https://tc39.github.io/ecma262/#sec-arrow-function-definitions-static-semantics-early-errors

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseSourceElements):
(JSC::Parser<LexerType>::parseFormalParameters):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::strictMode):
(JSC::Scope::isValidStrictMode):
(JSC::Scope::shadowsArguments):
(JSC::Scope::setHasNonSimpleParameterList):
(JSC::Scope::hasNonSimpleParameterList):
(JSC::Scope::copyCapturedVariablesToVector):

LayoutTests:

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

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

3 years agoModernize GlyphMetricsMap
cdumez@apple.com [Fri, 15 Jul 2016 02:07:45 +0000 (02:07 +0000)]
Modernize GlyphMetricsMap
https://bugs.webkit.org/show_bug.cgi?id=159788

Reviewed by Darin Adler.

Modernize GlyphMetricsMap a bit.

* platform/graphics/GlyphMetricsMap.h:
- Drop WTF_MAKE_NONCOPYABLE as the class is already non-copyable due to having
  to having a std::unique_ptr data member.
- Drop GlyphMetricsMap default constructor and let the compiler generate it
  instead. This required using inline initialization for m_filledPrimaryPage.

(WebCore::GlyphMetricsMap::GlyphMetricsPage::GlyphMetricsPage):
- Make m_metrics data member private as it does not need to be public.
- Make setMetricsForIndex(unsigned index, const T& metrics) setter private
  as it does not need to be public.
- Make GlyphMetricsPage(const T& initialValue) constructor explicit as it
  takes only 1 parameter.

(WebCore::GlyphMetricsMap<T>::locatePageSlowCase):
- Use HashMap::ensure() to make the code a bit nicer.

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

3 years ago[iOS WK2] When scrolling apple.com/music on iPad Pro in landscape, left-hand tiles...
simon.fraser@apple.com [Fri, 15 Jul 2016 01:46:25 +0000 (01:46 +0000)]
[iOS WK2] When scrolling apple.com/music on iPad Pro in landscape, left-hand tiles appear first
https://bugs.webkit.org/show_bug.cgi?id=159798
rdar://problem/27362717

Reviewed by Tim Horton.
Source/WebCore:

In out-of-visible tiled layers, we always allocated the top-left tile, wasting
memory and causing ugliness when scrolling that layer into view. This happened
because getTileIndexRangeForRect() had no way to express the fact that no tiles
should be created.

Fix getTileIndexRangeForRect() to return a bool, and fix callers to respect the
return value.

Test: compositing/tiling/offscreen-tiled-layer.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::dumpAdditionalProperties):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::setNeedsDisplayInRect):
(WebCore::TileGrid::tilesWouldChangeForCoverageRect):
(WebCore::TileGrid::getTileIndexRangeForRect):
(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::ensureTilesForRect):
(WebCore::TileGrid::extent):
* platform/graphics/ca/TileGrid.h:

LayoutTests:

Test with an offscreen tiled layer.

* compositing/tiling/offscreen-tiled-layer-expected.txt: Added.
* compositing/tiling/offscreen-tiled-layer.html: Added.
* platform/ios-simulator-wk1/compositing/tiling/offscreen-tiled-layer-expected.txt: Added.
* platform/ios-simulator-wk2/compositing/tiling/offscreen-tiled-layer-expected.txt: Added.
* platform/mac-wk1/compositing/tiling/offscreen-tiled-layer-expected.txt: Added.

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

3 years agoSkipping editing/spelling/copy-paste-crash.html on ios-simulator.
ryanhaddad@apple.com [Fri, 15 Jul 2016 00:52:15 +0000 (00:52 +0000)]
Skipping editing/spelling/copy-paste-crash.html on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=142969

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoMerge Blink test case
bfulgham@apple.com [Fri, 15 Jul 2016 00:39:51 +0000 (00:39 +0000)]
Merge Blink test case
https://bugs.webkit.org/show_bug.cgi?id=117422

Patch is from a set of Blink changes (patches by <leviw@chromium.org>):
<https://chromium.googlesource.com/chromium/blink/+/507e1576555bd2ce6688206f28339c25761893b1>
<https://chromium.googlesource.com/chromium/blink/+/4c95872f52340cf0cf9a2a7078bb63a94f38d302>

* fast/list/list-style-position-inside-expected.txt: Added.
* fast/list/list-style-position-inside.html: Added.
* fast/sub-pixel/float-list-inside-expected.txt: Added.
* fast/sub-pixel/float-list-inside.html: Added.

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

3 years agoRemove credentials in URL when accessed through location.href
wilander@apple.com [Fri, 15 Jul 2016 00:10:45 +0000 (00:10 +0000)]
Remove credentials in URL when accessed through location.href
https://bugs.webkit.org/show_bug.cgi?id=139562
<rdar://problem/27331164>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/security/location-href-clears-username-password.html

The reason for this change is to not allow scripts on the page to
exfiltrate username and password from the URL.

* page/Location.cpp:
(WebCore::Location::href):
    Now checks if there is a username or password in the URL. If so,
    it copies the URL and removes the username and password.

LayoutTests:

The reason for this change is to not allow scripts on the page to
exfiltrate username and password from the URL.

* http/tests/security/location-href-clears-username-password-expected.txt: Added.
* http/tests/security/location-href-clears-username-password.html: Added.
    Test case adapted from https://src.chromium.org/viewvc/blink?revision=189367&view=revision.

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

3 years agoAllow RefPtrs of const RefCounted types
commit-queue@webkit.org [Fri, 15 Jul 2016 00:00:36 +0000 (00:00 +0000)]
Allow RefPtrs of const RefCounted types
https://bugs.webkit.org/show_bug.cgi?id=158269

Patch by Alex Christensen <achristensen@webkit.org> on 2016-07-14
Reviewed by Anders Carlsson.

Source/WTF:

* wtf/RefCounted.h:
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::~RefCountedBase):
(WTF::RefCountedBase::derefBase):
(WTF::RefCounted::deref):
Creating references to a const object does not really modify the object,
so everything in RefCounted is now mutable, and ref and deref are const.

Tools:

* TestWebKitAPI/Tests/WTF/RefPtr.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::ConstRefCounted::create):
(TestWebKitAPI::returnConstRefCountedRef):
(TestWebKitAPI::returnRefCountedRef):

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

3 years agoImproved WebKit Nightly start page design.
jond@apple.com [Thu, 14 Jul 2016 23:46:55 +0000 (23:46 +0000)]
Improved WebKit Nightly start page design.
https://bugs.webkit.org/show_bug.cgi?id=159780

Reviewed by Timothy Hatcher.

Added better 404 handling, improved presentation of the
start page and new Apache rewrites for the P1 bug list.

* .htaccess:
* wp-content/themes/webkit/functions.php:
* wp-content/themes/webkit/nightly-start.php:

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

3 years agoMerge Blink test case
bfulgham@apple.com [Thu, 14 Jul 2016 23:45:41 +0000 (23:45 +0000)]
Merge Blink test case
https://bugs.webkit.org/show_bug.cgi?id=116507

Patch is from a Blink change (patch by <ojan@chromium.org>):
<https://chromium.googlesource.com/chromium/blink/+/6598fc75a7260643ecfc42856ef24bcf96380443>

* compositing/iframes/crash-mouse-event-expected.txt: Added.
* compositing/iframes/crash-mouse-event.html: Added.

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

3 years agoWeb Inspector: Rename CCTNode to CallingContextTreeNode
commit-queue@webkit.org [Thu, 14 Jul 2016 23:38:13 +0000 (23:38 +0000)]
Web Inspector: Rename CCTNode to CallingContextTreeNode
https://bugs.webkit.org/show_bug.cgi?id=159782

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

* UserInterface/Models/CallingContextTree.js:
* UserInterface/Models/CallingContextTreeNode.js:
Extra to its own file and rename.

* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/TestStub.html:
Include the new file.

* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode):
* UserInterface/Views/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
Rename shorthand "cctnode".

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

3 years agoWeb Inspector: SidebarPanel classes should use View.layout instead of "refresh"
mattbaker@apple.com [Thu, 14 Jul 2016 23:37:37 +0000 (23:37 +0000)]
Web Inspector: SidebarPanel classes should use View.layout instead of "refresh"
https://bugs.webkit.org/show_bug.cgi?id=159745
<rdar://problem/27335252>

Reviewed by Timothy Hatcher.

* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame):
Use needsLayout.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.layout):
Move refresh logic to layout.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleSheetAddedOrRemoved):
Defer layout to coalesce updates.
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Deleted.

* UserInterface/Views/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel.prototype.set domNode):
Use needsLayout.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
Move refresh logic to layout.

* UserInterface/Views/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel.prototype.shown): Deleted.
Base class already forces a layout when shown.
(WebInspector.DetailsSidebarPanel.prototype.needsRefresh): Deleted.
No longer needed.
(WebInspector.DetailsSidebarPanel.prototype.refresh): Deleted.
Renamed layout.
(WebInspector.DetailsSidebarPanel): Deleted.

* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype.supportsDOMNode):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._layerTreeDidChange):
Use needsLayout.
(WebInspector.LayerTreeDetailsSidebarPanel.prototype.shown):
Base class already forces a layout when shown.

* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
Use needsLayout.

* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpression):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._removeWatchExpression):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._clearAllWatchExpressions):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._refreshAllWatchExpressionsButtonClicked):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._didEvaluateExpression):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._mainResourceDidChange):
Use needsLayout.

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

3 years ago[css-grid] Handle min-content/max-content with orthogonal flows
jfernandez@igalia.com [Thu, 14 Jul 2016 23:33:13 +0000 (23:33 +0000)]
[css-grid] Handle min-content/max-content with orthogonal flows
https://bugs.webkit.org/show_bug.cgi?id=159294

Reviewed by Darin Adler.

Currently there is no support for orthogonal flows in many aspects of the
Grid Layout logic.

The Grid sizing algorithm should be adapted to this scenario, hence this
patch focus on the min-content and max-content functions, used to resolve
content based track sizes.

There are still issues related to alignment and sizes using percentages,
but they will be addressed in different patches.

Tests: fast/css-grid-layout/grid-item-positioning-with-orthogonal-flows.html
       fast/css-grid-layout/grid-item-sizing-with-orthogonal-flows.html
       fast/css-grid-layout/grid-item-spanning-and-orthogonal-flows.html
       fast/css-grid-layout/grid-track-sizing-with-orthogonal-flows.html
       fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegion):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridSizingData::advanceNextState):
(WebCore::RenderGrid::GridSizingData::isValidTransitionForDirection):
(WebCore::RenderGrid::computeTrackSizesForDirection):
(WebCore::RenderGrid::repeatTracksSizingIfNeeded): Added.
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeIntrinsicLogicalHeight):
(WebCore::hasOverrideContainingBlockContentSizeForChild):
(WebCore::overrideContainingBlockContentSizeForChild):
(WebCore::setOverrideContainingBlockContentSizeForChild):
(WebCore::shouldClearOverrideContainingBlockContentSizeForChild):
(WebCore::RenderGrid::gridTrackSize):
(WebCore::RenderGrid::isOrthogonalChild): Added.
(WebCore::RenderGrid::logicalHeightForChild):
(WebCore::RenderGrid::flowAwareDirectionForChild): Added.
(WebCore::RenderGrid::minSizeForChild):
(WebCore::RenderGrid::updateOverrideContainingBlockContentSizeForChild):
(WebCore::RenderGrid::minContentForChild):
(WebCore::RenderGrid::maxContentForChild):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::layoutPositionedObject):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild): Added.
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::columnAxisPositionForChild):
(WebCore::RenderGrid::rowAxisPositionForChild):
(WebCore::RenderGrid::findChildLogicalPosition):
* rendering/RenderGrid.h:
(WebCore::RenderGrid::SizingOperation): This enum has been moved to the header file.
(WebCore::RenderGrid::m_hasAnyOrthogonalChild): New class attribute to know if there are any orthogonal grid items.
(WebCore::RenderGrid::updateOverrideContainingBlockContentSizeForChild):
(WebCore::RenderGrid::logicalHeightForChild):
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild):

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

3 years agoUnreviewed, rolling out r203248.
ryanhaddad@apple.com [Thu, 14 Jul 2016 23:21:34 +0000 (23:21 +0000)]
Unreviewed, rolling out r203248.

This change causes LayoutTests to crash and exit early

Reverted changeset:

"Use more Refs with WorkQueues"
https://bugs.webkit.org/show_bug.cgi?id=159792
http://trac.webkit.org/changeset/203248

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

3 years agoUse emptyString() instead of "" when possible
cdumez@apple.com [Thu, 14 Jul 2016 23:17:51 +0000 (23:17 +0000)]
Use emptyString() instead of "" when possible
https://bugs.webkit.org/show_bug.cgi?id=159789

Reviewed by Alex Christensen.

Use emptyString() instead of "" when possible to reduce String allocations.

Source/WebCore:

* Modules/webdatabase/Database.cpp:
(WebCore::Database::performOpenAndVerify):
* css/CSSSelector.h:
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::removeProperty):
(WebCore::MutableStyleProperties::removeCustomProperty):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
* editing/TypingCommand.h:
(WebCore::TypingCommand::create):
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::cleanup):
* inspector/InspectorStyleSheet.cpp:
(WebCore::fillMediaListChain):
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load):
* platform/gtk/DataObjectGtk.h:
(WebCore::DataObjectGtk::clearURIList):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
* platform/network/curl/ResourceHandleManager.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerTreeAsText):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::updateContent):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::noneDashboardRegions):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::SVGTextMetrics):
* xml/XPathParser.cpp:
(WebCore::XPath::Parser::lexString):

Source/WebKit/cf:

* WebCoreSupport/WebInspectorClientCF.cpp:
(populateSetting):

Source/WebKit/win:

* Plugins/PluginView.cpp:
(WebCore::parseRFC822HeaderFields):

Source/WebKit2:

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::pasteboardChangedOwner):
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::parseRFC822HeaderFields):
(WebKit::NPN_Status):

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

3 years agoediting/spelling/spellcheck-async.html sometimes crashes with GuardMalloc
bfulgham@apple.com [Thu, 14 Jul 2016 23:15:20 +0000 (23:15 +0000)]
editing/spelling/spellcheck-async.html sometimes crashes with GuardMalloc
https://bugs.webkit.org/show_bug.cgi?id=142969
<rdar://problem/27331095>

Reviewed by Alex Christensen.

Fix based on a Blink change (patch by <rouslan@chromium.org>):
<https://chromium.googlesource.com/chromium/blink/+/c713736b122c2224804b2db72f1f711cb47ee260%5E%21/#F1>

Source/WebCore:

Test: editing/spelling/copy-paste-crash.html
      editing/spelling/spellcheck-async.html

* editing/SpellChecker.cpp:
(WebCore::SpellCheckRequest::didSucceed):
(WebCore::SpellCheckRequest::didCancel):

LayoutTests:

* editing/spelling/copy-paste-crash-expected.txt: Added.
* editing/spelling/copy-paste-crash.html: Added.
* platform/platform/mac-wk2/TestExpectations: Skip test on mac-wk2 since all Spelling tests are
currently broken (see <https://webkit.org/b/105616>).

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

3 years agoUse more Refs with WorkQueues
achristensen@apple.com [Thu, 14 Jul 2016 23:04:29 +0000 (23:04 +0000)]
Use more Refs with WorkQueues
https://bugs.webkit.org/show_bug.cgi?id=159792

Reviewed by Brady Eidson.

* NetworkProcess/CustomProtocols/CustomProtocolManager.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::setShouldExitOnSyncMessageSendFailure):
(IPC::Connection::addWorkQueueMessageReceiver):
* Platform/IPC/Connection.h:
* Shared/mac/SecItemShim.cpp:
(WebKit::SecItemShim::initializeConnection):
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
(WebKit::StorageManager::StorageManager):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::processWillOpenConnection):
(WebKit::WebResourceLoadStatisticsStore::processDidCloseConnection):
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::initializeConnection):
(WebKit::SecItemShimProxy::secItemRequest):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::initializeConnection):
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::initializeConnection):
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::initializeConnection):
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):

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

3 years agoRemove duplicate TestExpectations entry.
ryanhaddad@apple.com [Thu, 14 Jul 2016 22:14:10 +0000 (22:14 +0000)]
Remove duplicate TestExpectations entry.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoImageBuffer's succes flag should be set to false at the very beginning of the c'tor.
zalan@apple.com [Thu, 14 Jul 2016 22:05:08 +0000 (22:05 +0000)]
ImageBuffer's succes flag should be set to false at the very beginning of the c'tor.
https://bugs.webkit.org/show_bug.cgi?id=159784

Reviewed by Simon Fraser.

No change in functionality.

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):

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

3 years agoWeb Automation: FrameNotFound errors happen a lot for the main frame
timothy@apple.com [Thu, 14 Jul 2016 21:52:52 +0000 (21:52 +0000)]
Web Automation: FrameNotFound errors happen a lot for the main frame
https://bugs.webkit.org/show_bug.cgi?id=159777
rdar://problem/27224628

Send both pageID and frameID, and have the WebProcess side resolve the
mainFrame from 0 based on the known pageID. This avoids a race waiting
for the DidCreateMainFrame message.

Reviewed by Brian Burg.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::webFrameIDForHandle):
(WebKit::WebAutomationSession::switchToBrowsingContext):
(WebKit::WebAutomationSession::evaluateJavaScriptFunction):
(WebKit::WebAutomationSession::resolveChildFrameHandle):
(WebKit::WebAutomationSession::resolveParentFrameHandle):
(WebKit::WebAutomationSession::computeElementLayout):
(WebKit::WebAutomationSession::getAllCookies):
(WebKit::WebAutomationSession::deleteSingleCookie):
(WebKit::WebAutomationSession::webFrameProxyForHandle): Deleted.
(WebKit::WebAutomationSession::webFrameIDForHandle): Added.
* UIProcess/Automation/WebAutomationSession.h:
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::focusFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::takeScreenshot):
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):
* WebProcess/Automation/WebAutomationSessionProxy.h:
* WebProcess/Automation/WebAutomationSessionProxy.messages.in:

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

3 years agoUse SocketProvider to create SocketStreamHandles
achristensen@apple.com [Thu, 14 Jul 2016 21:43:03 +0000 (21:43 +0000)]
Use SocketProvider to create SocketStreamHandles
https://bugs.webkit.org/show_bug.cgi?id=159774

Source/WebCore:

Reviewed by Brady Eidson.

No new tests.  No change in behaviour.

In r202930 I introduced the SocketProvider, but I used it to make a WebSocketChannel
instead of a SocketStreamHandle, which is the class I want to make into an interface
and proxy the web traffic over to the NetworkProcess.

* CMakeLists.txt:
* Modules/websockets/ThreadableWebSocketChannel.cpp: Added.
(WebCore::ThreadableWebSocketChannel::create):
I removed this in 202930, so this is restoring it from that patch, hence the old copyright.
* Modules/websockets/ThreadableWebSocketChannel.h:
(WebCore::ThreadableWebSocketChannel::ThreadableWebSocketChannel):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::connect):
* Modules/websockets/WebSocketChannel.h:
(WebCore::WebSocketChannel::create):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
(WebCore::WorkerThreadableWebSocketChannel::resume):
(WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::~Bridge):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
(WebCore::WorkerThreadableWebSocketChannel::create):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* loader/EmptyClients.cpp:
(WebCore::EmptyEditorClient::registerRedoStep):
(WebCore::EmptySocketProvider::createWebSocketChannel): Deleted.
* loader/EmptyClients.h:
* page/SocketProvider.cpp: Added.
(WebCore::SocketProvider::createSocketStreamHandle):
* page/SocketProvider.h:
(WebCore::SocketProvider::~SocketProvider): Deleted.
* platform/network/cf/SocketStreamHandle.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):

Source/WebKit:

Reviewed by Alex Christensen.

* PlatformMac.cmake:
* PlatformWin.cmake:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Reviewed by Brady Eidson.

* Misc/WebSocketProvider.h: Removed.
* Misc/WebSocketProvider.mm: Removed.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKit/win:

Reviewed by Brady Eidson.

* WebSocketProvider.cpp: Removed.
* WebSocketProvider.h: Removed.
* WebView.cpp: Replaced WebSocketProvider with SocketProvider as we did in WebCore.

Source/WebKit2:

Reviewed by Brady Eidson.

* WebProcess/Network/WebSocketProvider.cpp:
(WebKit::WebSocketProvider::createSocketStreamHandle):
(WebKit::WebSocketProvider::createWebSocketChannel): Deleted.
* WebProcess/Network/WebSocketProvider.h:

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

3 years agoWeb Inspector: Maintain selected function when switching between different profile...
commit-queue@webkit.org [Thu, 14 Jul 2016 21:42:42 +0000 (21:42 +0000)]
Web Inspector: Maintain selected function when switching between different profile representations
https://bugs.webkit.org/show_bug.cgi?id=159778
<rdar://problem/27355913>

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

* UserInterface/Models/CallingContextTree.js:
(WebInspector.CCTNode):
(WebInspector.CCTNode.prototype.get hash):
(WebInspector.CCTNode.prototype.findOrMakeChild):
(WebInspector.CCTNode.prototype.equals):
Expose the hash so two nodes can be compared cheaply.

* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView.prototype._repopulateDataGridFromTree):
(WebInspector.ProfileView.prototype._restoreSharedState):
(WebInspector.ProfileView.prototype._dataGridNodeSelected):
Share data between multiple ProfileViews. Currently just remembering
and restoring the selected function.

* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView):
(WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
Include the shared data when constructing new ProfileViews.

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

3 years ago[WK2][iOS] Potential null dereference under ViewGestureController::beginSwipeGesture()
cdumez@apple.com [Thu, 14 Jul 2016 21:39:15 +0000 (21:39 +0000)]
[WK2][iOS] Potential null dereference under ViewGestureController::beginSwipeGesture()
https://bugs.webkit.org/show_bug.cgi?id=159776
<rdar://problem/22467100>

Reviewed by Tim Horton.

Potential null dereference under ViewGestureController::beginSwipeGesture() of:
m_webPageProxy.backForwardList().currentItem()

The client side is expected to call ViewGestureController::canSwipeInDirection() but
this only guarantees that the m_alternateBackForwardListSourceView's currentItem is
non-null when m_alternateBackForwardListSourceView is non-null. It does not guarantee
that m_webPageProxy's currentItem is non-null.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):

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

3 years ago"User delete" tests are flakey timeouts (and/or DatabaseProcess crashes).
beidson@apple.com [Thu, 14 Jul 2016 21:15:28 +0000 (21:15 +0000)]
"User delete" tests are flakey timeouts (and/or DatabaseProcess crashes).
https://bugs.webkit.org/show_bug.cgi?id=158741

Reviewed by Alex Christensen.

No new tests (Covered by existing tests in some configurations)

- Check if a database hard delete is complete in more places.
- Asynchronously clear out the hard close protector instead of synchronously.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformUnconditionalDeleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didFinishHandlingVersionChange):
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::transactionCompleted):
(WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):
(WebCore::IDBServer::UniqueIDBDatabase::maybeFinishHardClose):
(WebCore::IDBServer::UniqueIDBDatabase::isDoneWithHardClose):
(WebCore::IDBServer::UniqueIDBDatabase::doneWithHardClose): Deleted.

* Modules/indexeddb/server/UniqueIDBDatabase.h:
(WebCore::IDBServer::UniqueIDBDatabase::hardClosedForUserDelete):

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):

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

3 years agoCSSStyleSheet members should clear their owner node when destroyed
bfulgham@apple.com [Thu, 14 Jul 2016 21:01:23 +0000 (21:01 +0000)]
CSSStyleSheet members should clear their owner node when destroyed
https://bugs.webkit.org/show_bug.cgi?id=117470

Reviewed by Chris Dumez.

Make sure that CSSStyleSheet members are detached from their owner node when
the owning object is destroyed.

I audited other CSSStyleSheet uses, and found one other place where the owner node was not
being cleared during destruction. The Inspector also uses CSSStyleSheet, but seems to
handle the node ownership properly.

Fix based on a Blink change (patch by <haraken@chromium.org>):
<https://chromium.googlesource.com/chromium/blink/+/c4949bfdeb2a613701afa1410bdae70531b8f6bf>

Also includes a follow-up fix (patch by <haraken@chromium.org>):
<https://chromium.googlesource.com/chromium/blink/+/9c3932dc80b33429db3a5873cb266b726c8a19bf>

No test case. Was found by the Chromium team through review of their crash traces under minor DOM GC.

* contentextensions/ContentExtensionStyleSheet.cpp:
(WebCore::ContentExtensions::ContentExtensionStyleSheet::~ContentExtensionStyleSheet):
* contentextensions/ContentExtensionStyleSheet.h:
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
(WebCore::authorStyleSheetsForElement):

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

3 years agoASSERTION FAILED: : this != replacement()
ggaren@apple.com [Thu, 14 Jul 2016 20:54:37 +0000 (20:54 +0000)]
ASSERTION FAILED: : this != replacement()
https://bugs.webkit.org/show_bug.cgi?id=159779

Reviewed by Michael Saboff.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettison): If we jettison during GC, and our owner
is dead, we choose not to replace ourselves. (See
https://bugs.webkit.org/show_bug.cgi?id=159588.) So, it's possible to
invalidate and still be our owner's CodeBlock. Relax our ASSERT to allow
for this.

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

3 years agoFix the !ENABLE(WEB_SOCKETS) build after r202930
ossy@webkit.org [Thu, 14 Jul 2016 20:14:22 +0000 (20:14 +0000)]
Fix the !ENABLE(WEB_SOCKETS) build after r202930
https://bugs.webkit.org/show_bug.cgi?id=159768

Reviewed by Alex Christensen.

Source/WebCore:

* loader/EmptyClients.cpp:
* loader/EmptyClients.h:
* page/SocketProvider.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::WorkerThread):

Source/WebKit/mac:

* Misc/WebSocketProvider.h:

Source/WebKit/win:

* WebSocketProvider.h:

Source/WebKit2:

* WebProcess/Network/WebSocketProvider.h:

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

3 years agoAdd test to confirm we do not crash in media destruction
bfulgham@apple.com [Thu, 14 Jul 2016 19:46:14 +0000 (19:46 +0000)]
Add test to confirm we do not crash in media destruction
https://bugs.webkit.org/show_bug.cgi?id=122816

Test based on a Blink change (patch by <igor.o@sisa.samsung.com>):
<https://chromium.googlesource.com/chromium/blink/+/7a2b2dcefbc013003487d5055eeda7a57daafa93%5E%21/#F0>

We do not seem to have the bug that prompted the Chromium source change. Adding
test case to ensure we do not introduce this problem in the future.

* editing/undo/audio-in-undo-stack-crash-expected.txt: Added.
* editing/undo/audio-in-undo-stack-crash.html: Added.

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

3 years agoAvoid an extra heap allocation when dispatching Functions to WorkQueue
cdumez@apple.com [Thu, 14 Jul 2016 19:45:22 +0000 (19:45 +0000)]
Avoid an extra heap allocation when dispatching Functions to WorkQueue
https://bugs.webkit.org/show_bug.cgi?id=158367

Reviewed by Anders Carlsson.

Avoid an extra heap allocation when dispatching Functions to WorkQueue
by adding leakCallable() / adoptCallable() functions to Function.

* wtf/Function.h:
* wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):

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

3 years agoDOMIterators should be assigned a correct prototype
commit-queue@webkit.org [Thu, 14 Jul 2016 19:32:24 +0000 (19:32 +0000)]
DOMIterators should be assigned a correct prototype
https://bugs.webkit.org/show_bug.cgi?id=159115

Patch by Youenn Fablet <youenn@apple.com> on 2016-07-14
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/headers/headers-basic.html: Updating test (changes to be upstreamed to w3c wpt repo)

Source/WebCore:

Default iterator object internal prototype property is the Iterator prototype as defined in
http://heycam.github.io/webidl/#dfn-iterator-prototype-object.
Linking DOMIterator prototype to IteratorPrototype.
This allows adding @@iterator property to the result of entries, keys and values methods.
This in turns allow doing for-of loops on them.

Covered by updated test.

* ForwardingHeaders/runtime/IteratorPrototype.h: Added.
* bindings/js/JSDOMIterator.h: Setting correct prototype and marking next prototype property as enumerable.

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

3 years agoRemove support for value iterators from JSDOMIterator
commit-queue@webkit.org [Thu, 14 Jul 2016 19:30:09 +0000 (19:30 +0000)]
Remove support for value iterators from JSDOMIterator
https://bugs.webkit.org/show_bug.cgi?id=159293

Patch by Youenn Fablet <youenn@apple.com> on 2016-07-14
Reviewed by Chris Dumez.

Source/WebCore:

Value iterators are now handled without using DOMIterator.
Since FontFaceSet is using DOMIterator as an intermediate step towards supporting set-like,
entries and forEach implementation should be made compliant with set-like.
This means that item value should be passed instead of an index in entries iterator and forEach callback.

Covered by updated test.

* bindings/js/JSDOMIterator.h:
(WebCore::JSDOMIterator<JSWrapper>::asJS): Pass set item as entries value field.
(WebCore::appendForEachArguments): Pass set item as second parameter.
(WebCore::iteratorForEach): Remove index handling.

LayoutTests:

* fast/text/font-face-set-javascript-expected.txt:
* fast/text/font-face-set-javascript.html:

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

3 years agoFix the !ENABLE(MATHML) build after r201739
ossy@webkit.org [Thu, 14 Jul 2016 19:29:13 +0000 (19:29 +0000)]
Fix the !ENABLE(MATHML) build after r201739
https://bugs.webkit.org/show_bug.cgi?id=159767

Reviewed by Alex Christensen.

* dom/Document.cpp:
(WebCore::Document::validateCustomElementName):

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

3 years agoFix the !ENABLE(CSS_IMAGE_SET) build
ossy@webkit.org [Thu, 14 Jul 2016 19:28:29 +0000 (19:28 +0000)]
Fix the !ENABLE(CSS_IMAGE_SET) build
https://bugs.webkit.org/show_bug.cgi?id=159766

Reviewed by Alex Christensen.

* css/CSSParser.cpp:

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

3 years agoLand test expectations for rdar://problem/27353750.
ryanhaddad@apple.com [Thu, 14 Jul 2016 19:09:53 +0000 (19:09 +0000)]
Land test expectations for rdar://problem/27353750.

* platform/mac/TestExpectations:

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

3 years agoPossible crash under NavigationState::NavigationClient::processDidCrash()
cdumez@apple.com [Thu, 14 Jul 2016 18:33:22 +0000 (18:33 +0000)]
Possible crash under NavigationState::NavigationClient::processDidCrash()
https://bugs.webkit.org/show_bug.cgi?id=159773
<rdar://problem/19814215>

Reviewed by Anders Carlsson.

Add a m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidCrash before
trying to call it to avoid crashing if the client does not implement it.

At the beginning of the method, we abort early only if both webViewWebContentProcessDidTerminate
and webViewWebProcessDidCrash are implemented. However, if webViewWebContentProcessDidTerminate
implemented but not webViewWebProcessDidCrash we can end up crashing as we fail to check later
on before trying to call it.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::processDidCrash):

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

3 years agoJSONObject Walker::walk must save array length before processing array elements.
mark.lam@apple.com [Thu, 14 Jul 2016 18:18:55 +0000 (18:18 +0000)]
JSONObject Walker::walk must save array length before processing array elements.
https://bugs.webkit.org/show_bug.cgi?id=153485

Reviewed by Darin Adler and Michael Saboff.

Source/JavaScriptCore:

According to https://tc39.github.io/ecma262/#sec-internalizejsonproperty,
JSON.parse() should cache the length of an array and use the cached length when
iterating array elements (see section 24.3.1.1 2.b.iii).

* runtime/JSONObject.cpp:
(JSC::Walker::walk):
* tests/stress/JSON-parse-should-cache-array-lengths.js: Added.
(toString):
(shouldBe):
(test):
(test2):

LayoutTests:

* js/JSON-parse-reviver-expected.txt:
* js/script-tests/JSON-parse-reviver.js:
- Fixed a bug in arrayReviver() where it was setting the array length to 3,
  but was immediately returning a value from the reviver for index 3.  This
  effectively forces array.length to 4.  As a result, case 4 always failed
  silently, and case 5 never executed.
- Added tracking of cases visited by the revivers so that they can be verified.

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

3 years agoCleanup of MathML headers
fred.wang@free.fr [Thu, 14 Jul 2016 17:59:17 +0000 (17:59 +0000)]
Cleanup of MathML headers
https://bugs.webkit.org/show_bug.cgi?id=159336

Reviewed by Alex Christensen.

We do some cleanup in MathML headers:
- Use #pragma once
- Use final for class that are not extended.
- Use final instead of override for virtual members that are not overridden by derived classes.
- Try and reduce the visibility of function members to private or protected as appropriate.
- Remove useless #include
- Remove useless class or friendship declaration
- Remove unused functions

No new tests, behavior is unchanged.

* mathml/MathMLElement.h:
* mathml/MathMLInlineContainerElement.h:
* mathml/MathMLMathElement.h:
* mathml/MathMLMencloseElement.h:
* mathml/MathMLOperatorDictionary.h:
* mathml/MathMLPaddedElement.h:
* mathml/MathMLSelectElement.h:
* mathml/MathMLSpaceElement.h:
* mathml/MathMLTextElement.h:
* rendering/mathml/MathOperator.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFenced.h:
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::RenderMathMLRow): Deleted. We no longer create anonymous row.
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.h:

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

3 years agoFix the DatabaseProcess build with disabled IDB
ossy@webkit.org [Thu, 14 Jul 2016 17:50:46 +0000 (17:50 +0000)]
Fix the DatabaseProcess build with disabled IDB
https://bugs.webkit.org/show_bug.cgi?id=159769

Reviewed by Alex Christensen.

* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::didClose):

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

3 years ago[mips] Handle properly unaligned halfword load
commit-queue@webkit.org [Thu, 14 Jul 2016 17:38:16 +0000 (17:38 +0000)]
[mips] Handle properly unaligned halfword load
https://bugs.webkit.org/show_bug.cgi?id=153226

Patch by Julien Brianceau <jbriance@cisco.com> on 2016-07-14
Reviewed by Michael Catanzaro.

Waiting for the kernel to silently fix-up unaligned accesses is
not efficient, so let's provide an implementation of load16Unaligned
in mips macro assembler.

Performance improvement seen with SunSpider's regexp-dna test.

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::load16Unaligned):
(JSC::MacroAssemblerMIPS::load32WithUnalignedHalfWords):

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

3 years agoPass SessionID to WebSocketHandle constructor
achristensen@apple.com [Thu, 14 Jul 2016 17:26:00 +0000 (17:26 +0000)]
Pass SessionID to WebSocketHandle constructor
https://bugs.webkit.org/show_bug.cgi?id=159772

Reviewed by Brady Eidson.

No new tests.  No change in behavior.

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
* platform/network/cf/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
* platform/network/curl/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):
* platform/network/soup/SocketStreamHandle.h:

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

3 years ago[GLib] Use a GSource instead of a thread to poll memory pressure eventFD in linux...
commit-queue@webkit.org [Thu, 14 Jul 2016 15:48:12 +0000 (15:48 +0000)]
[GLib] Use a GSource instead of a thread to poll memory pressure eventFD in linux implementation
https://bugs.webkit.org/show_bug.cgi?id=159346

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-07-14
Reviewed by Antonio Gomes.

This is a follow up of r203216 to fix wrong use of Optional values.

* platform/linux/MemoryPressureHandlerLinux.cpp:

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

3 years ago[ThreadedCompositor] Build fails in debug mode after r202040
commit-queue@webkit.org [Thu, 14 Jul 2016 12:33:35 +0000 (12:33 +0000)]
[ThreadedCompositor] Build fails in debug mode after r202040
https://bugs.webkit.org/show_bug.cgi?id=159757

Patch by Hyunjun Ko <zzoon@igalia.com> on 2016-07-14
Reviewed by Michael Catanzaro.

Debug mode build failed due to call getter method, which is
removed, in ASSERT().

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::glContext): Deleted.
(WebKit::ThreadedCompositor::didChangeVisibleRect): Deleted.
(WebKit::ThreadedCompositor::renderLayerTree): Deleted.

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

3 years agoDOM value iterable interfaces should use Array prototype methods
commit-queue@webkit.org [Thu, 14 Jul 2016 11:16:17 +0000 (11:16 +0000)]
DOM value iterable interfaces should use Array prototype methods
https://bugs.webkit.org/show_bug.cgi?id=159296

Patch by Youenn Fablet <youenn@apple.com> on 2016-07-14
Reviewed by Chris Dumez and Mark Lam.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj: Marking some header files as private so that they can be included in
WebCore.
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation): copying iterable methods (entries, forEach, keys and values) to private slots.

Source/WebCore:

Test: fast/dom/NodeList/nodelist-iterable.html
Also covered by updated layout test and binding tests.

For value iterators, copy the iterator methods from Array prototype: as per https://heycam.github.io/webidl/#es-iterable,
[re: entries] If the interface has a value iterator, then the Function object is the initial value of the "entries" data property of %ArrayPrototype% ([ECMA-262], section 6.1.7.4).
[re: keys] If the interface has a value iterator, then the Function object is the initial value of the "keys" data property of %ArrayPrototype% ([ECMA-262], section 6.1.7.4).
[re: forEach] If the interface defines an indexed property getter, then the Function object is the initial value of the "forEach" data property of %ArrayPrototype% ([ECMA-262], section 6.1.7.4).
[re: Symbol.iterator] If the interface defines an indexed property getter, then the Function object is %ArrayProto_values% ([ECMA-262], section 6.1.7.4).
[re: values] If the interface has a value iterator, then the Function object is the value of the @@iterator property.

This change applies only to NodeList at the moment.
Copy of Array prototype iterator methods is disabled if the interface has no indexed getter.

* CMakeLists.txt:
* ForwardingHeaders/builtins/BuiltinNames.h: Added.
* ForwardingHeaders/builtins/JSCBuiltins.h: Added.
* ForwardingHeaders/runtime/CommonIdentifiers.h: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMIterator.cpp: Added.
(WebCore::addValueIterableMethods): Copy iterator methods from array prototype.
* bindings/js/JSDOMIterator.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GeneratePropertiesHashTable):
(GenerateImplementation):
(IsValueIterableInterface): Introduced to only copy iterator methods if the interface has an indexed getter.
(IsKeyValueIterableInterface): Introduced to detect whether generating iterator methods.
(GenerateImplementationIterableFunctions):
* bindings/scripts/test/GObject/WebKitDOMTestIterable.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestIterable.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestIterablePrivate.h: Added.
* bindings/scripts/test/JS/JSTestIterable.cpp: Added.
* bindings/scripts/test/JS/JSTestIterable.h: Added.
* bindings/scripts/test/JS/JSTestObj.cpp: Updated as TestObj defines both iterable<> and indexed getter.
* bindings/scripts/test/ObjC/DOMTestIterable.h: Added.
* bindings/scripts/test/ObjC/DOMTestIterable.mm: Added.
* bindings/scripts/test/ObjC/DOMTestIterableInternal.h: Added.
* bindings/scripts/test/TestIterable.idl: Added to handle the case of value iterator without indexed getter defined.
Array prototype methods should not be copied.
* bindings/scripts/test/TestObj.idl: Changing to be a value iterator (with indexed getter already defined).
Array prototype methods should be copied.

LayoutTests:

* fast/dom/nodeListIterator-expected.txt:
* fast/dom/nodeListIterator.html:
* fast/dom/NodeList/nodelist-iterable-expected.txt: Added.
* fast/dom/NodeList/nodelist-iterable.html: Added.

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

3 years ago[Fetch API] Request and Response url getter should use URL serialization
commit-queue@webkit.org [Thu, 14 Jul 2016 10:14:53 +0000 (10:14 +0000)]
[Fetch API] Request and Response url getter should use URL serialization
https://bugs.webkit.org/show_bug.cgi?id=159705

Patch by Youenn Fablet <youenn@apple.com> on 2016-07-14
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/basic/response-url-expected.txt: Added.
* web-platform-tests/fetch/api/basic/response-url-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/response-url-worker.html: Added.
* web-platform-tests/fetch/api/basic/response-url.html: Added.
* web-platform-tests/fetch/api/basic/response-url.js: Added.
(checkResponseURL):
* web-platform-tests/fetch/api/request/request-init-003.sub-expected.txt:
* web-platform-tests/fetch/api/request/request-init-003.sub.html:

Source/WebCore:

Tests: fetch/fetch-url-serialization.html
       imported/w3c/web-platform-tests/fetch/api/basic/response-url-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/response-url.html

Implementing https://url.spec.whatwg.org/#concept-url-serializer and applying it to Request and Response getter.
Adding a temporary routine to compute url cannot-be-a-base-url flag. The parsing routine should store that
information in the URL itself.

Added tests to cover serialization routine. Failing tests are mostly due to limitations of the URL parser.
Tests do not check for URLs with username and password as Request constructor throws with such URLs.

* Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::url): Adding request url serialization, fragment included.
* Modules/fetch/FetchRequest.h:
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::url): Adding response url serialization, fragment excluded.
* Modules/fetch/FetchResponse.h:
* platform/URL.cpp:
(WebCore::cannotBeABaseURL): Temporary helper function to have a coarse evaluation of url cannot-be-a-base-url flag.
(WebCore::URL::serialize): Implementation of https://url.spec.whatwg.org/#concept-url-serializer.
* platform/URL.h:
(WebCore::URL::hasUser): Helper getter.
(WebCore::URL::hasPassword): Ditto.
(WebCore::URL::hasQuery): Ditto.
(WebCore::URL::hasFragment): Ditto.

LayoutTests:

* fetch/fetch-url-serialization-expected.txt: Added.
* fetch/fetch-url-serialization.html: Added.
* fetch/fetch-urls.json: Added.

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

3 years ago[css-grid] Const-ify track sizing algorithm
svillar@igalia.com [Thu, 14 Jul 2016 08:36:10 +0000 (08:36 +0000)]
[css-grid] Const-ify track sizing algorithm
https://bugs.webkit.org/show_bug.cgi?id=159716

Reviewed by Carlos Garcia Campos.

All the methods used to run the track sizing algorithm should not
modify the state of LayoutGrid. We can safely const-ify all of them
and remove the ugly const_cast in computeIntrinsicLogicalWidths().

No new tests needed as there is no change in behavior.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalHeightForChild):
(WebCore::RenderGrid::minSizeForChild):
(WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild):
(WebCore::RenderGrid::minContentForChild):
(WebCore::RenderGrid::maxContentForChild):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
(WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::distributeSpaceToTracks):
* rendering/RenderGrid.h:

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

3 years agoREGRESSION (r202918): LayoutTest media/video-main-content-allow-then-deny.html is...
jer.noble@apple.com [Thu, 14 Jul 2016 07:54:21 +0000 (07:54 +0000)]
REGRESSION (r202918): LayoutTest media/video-main-content-allow-then-deny.html is flaky, failing almost every time on El Capitan
https://bugs.webkit.org/show_bug.cgi?id=159533

Reviewed by Eric Carlson.

Source/WebCore:

Move the contents of mainContentCheckTimerFired() into updateIsMainContent() so that the
results of changing the m_isMainContent ivar are acted upon no matter why m_isMainContent
changes.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::mainContentCheckTimerFired):
(WebCore::MediaElementSession::updateIsMainContent):

LayoutTests:

* platform/mac/TestExpectations:

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

3 years agoRebaseline test after r203204 and r203207.
achristensen@apple.com [Thu, 14 Jul 2016 07:29:29 +0000 (07:29 +0000)]
Rebaseline test after r203204 and r203207.

* js/typed-array-mutated-during-set-expected.txt:

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

3 years agoModernize WebSocket handle
achristensen@apple.com [Thu, 14 Jul 2016 07:05:40 +0000 (07:05 +0000)]
Modernize WebSocket handle
https://bugs.webkit.org/show_bug.cgi?id=159750

Reviewed by Brady Eidson.

Source/WebCore:

No new tests.  No change in behavior.
This patch just removes ThreadableWebSocketChannel::InvalidMessage which is never used
and makes our use of SocketStreamHandleClient a reference instead of a pointer.

* Modules/websockets/ThreadableWebSocketChannel.h:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::send):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
* platform/network/SocketStreamHandleBase.cpp:
(WebCore::SocketStreamHandleBase::SocketStreamHandleBase):
(WebCore::SocketStreamHandleBase::send):
(WebCore::SocketStreamHandleBase::disconnect):
(WebCore::SocketStreamHandleBase::sendPendingData):
(WebCore::SocketStreamHandleBase::setClient): Deleted.
* platform/network/SocketStreamHandleBase.h:
(WebCore::SocketStreamHandleBase::~SocketStreamHandleBase):
(WebCore::SocketStreamHandleBase::bufferedAmount):
(WebCore::SocketStreamHandleBase::client):
* platform/network/cf/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::addCONNECTCredentials):
(WebCore::SocketStreamHandle::copyCFStreamDescription):
(WebCore::SocketStreamHandle::readStreamCallback):
(WebCore::SocketStreamHandle::writeStreamCallback):
(WebCore::SocketStreamHandle::reportErrorToClient):
(WebCore::SocketStreamHandle::~SocketStreamHandle):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::port):
* platform/network/curl/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):
* platform/network/curl/SocketStreamHandleCurl.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::readData):
(WebCore::SocketStreamHandle::didReceiveData):
(WebCore::SocketStreamHandle::didOpenSocket):
(WebCore::SocketStreamHandle::createCopy):
* platform/network/soup/SocketStreamHandle.h:
* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::~SocketStreamHandle):
(WebCore::SocketStreamHandle::connected):
(WebCore::SocketStreamHandle::connectedCallback):
(WebCore::SocketStreamHandle::readBytes):
(WebCore::SocketStreamHandle::didFail):
(WebCore::SocketStreamHandle::writeReady):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::beginWaitingForSocketWritability):

Source/WebKit2:

* UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
(WebKit::connectionCallback):

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

3 years ago[GLib] Use a GSource instead of a thread to poll memory pressure eventFD in linux...
carlosgc@webkit.org [Thu, 14 Jul 2016 06:36:25 +0000 (06:36 +0000)]
[GLib] Use a GSource instead of a thread to poll memory pressure eventFD in linux implementation
https://bugs.webkit.org/show_bug.cgi?id=159346

Reviewed by Antonio Gomes.

The eventFD file descriptor is pollable, so it would be much better to use a poll instead of a blocking read in
a secondary thread and then communicate back to the main thread. This is very easy to do with GSource in GLib,
so we could use that when GLib is available and keep the current implementation as a fallback.

* platform/MemoryPressureHandler.cpp:
(WebCore::m_holdOffTimer): Use a RunLoop timer.
* platform/MemoryPressureHandler.h:
* platform/linux/MemoryPressureHandlerLinux.cpp:
(WebCore::MemoryPressureHandler::EventFDPoller::EventFDPoller): Helper class do the eventFD polling.
(WebCore::MemoryPressureHandler::logErrorAndCloseFDs): Check if file descriptors are -1 not 0.
(WebCore::MemoryPressureHandler::install): Return early also if the hold off timer is active. Use EventFDPoller
to do the polling.
(WebCore::MemoryPressureHandler::uninstall): Stop the hold off timer and clear the EventFDPoller.

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

3 years agoREGRESSION(r202273): [GTK] Redirected X window is resized to the previous size on...
carlosgc@webkit.org [Thu, 14 Jul 2016 06:34:08 +0000 (06:34 +0000)]
REGRESSION(r202273): [GTK] Redirected X window is resized to the previous size on size allocate
https://bugs.webkit.org/show_bug.cgi?id=159551

Reviewed by Michael Catanzaro.

In r202273 I added webkitWebViewBaseResizeRedirectedWindow() helper to remove duplicated code in all places
where we were resizing the redirected window to the current drawing area size. But on size allocate, we were
updating the redirected window first, and then the drawing area, to ensure that when the drawing area notifies
the web process the redirected window is already at the new size. This regression doesn't have any visual
effect, because we are ensure the right size always before rendering, but there's a small extra resize in this case.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSizeAllocate): Resize the redirected window before updating the drawing area size.

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

3 years agoTest WTF.StringViewIterators is crashing since r203119
carlosgc@webkit.org [Thu, 14 Jul 2016 06:17:36 +0000 (06:17 +0000)]
Test WTF.StringViewIterators is crashing since r203119
https://bugs.webkit.org/show_bug.cgi?id=159710

Reviewed by Darin Adler.

There are two problems in the test case added in r203119. First is that it's testing
StringView::CodeUnits::Iterator instead of StringView::CodePoints::Iterator, and second is that
StringView::codePoints() returns a temporary, so the iterator created from the temporary ends up pointing to a
const reference to the string view member of the deleted CodePoints object.

* TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):

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

3 years agoFix the magic numbers for ARM traditional in InlineAccess.h
ossy@webkit.org [Thu, 14 Jul 2016 05:24:43 +0000 (05:24 +0000)]
Fix the magic numbers for ARM traditional in InlineAccess.h
https://bugs.webkit.org/show_bug.cgi?id=159708

Reviewed by Saam Barati.

* bytecode/InlineAccess.h:
(JSC::InlineAccess::sizeForPropertyAccess):
(JSC::InlineAccess::sizeForPropertyReplace):
(JSC::InlineAccess::sizeForLengthAccess):

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

3 years agoRebaseline EFL and Windows MathML tests after r203171
fred.wang@free.fr [Thu, 14 Jul 2016 04:55:27 +0000 (04:55 +0000)]
Rebaseline EFL and Windows MathML tests after r203171

Unreviewed test gardening.

Patch by Frederic Wang <fwang@igalia.com> on 2016-07-13

* platform/efl/mathml/opentype/horizontal-expected.txt:
* platform/efl/mathml/opentype/horizontal-munderover-expected.txt:
* platform/efl/mathml/opentype/large-operators-expected.txt:
* platform/efl/mathml/opentype/opentype-stretchy-expected.txt:
* platform/efl/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
* platform/efl/mathml/opentype/vertical-expected.txt:
* platform/efl/mathml/presentation/menclose-notation-default-longdiv-expected.txt:
* platform/efl/mathml/presentation/menclose-notation-values-expected.txt:
* platform/efl/mathml/presentation/mo-stretch-expected.txt:
* platform/efl/mathml/presentation/mspace-children-expected.txt:
* platform/efl/mathml/presentation/roots-expected.txt:
* platform/efl/mathml/radical-fallback-expected.txt:
* platform/win/mathml/mathml-in-dashboard-expected.txt:
* platform/win/mathml/opentype/horizontal-expected.txt:
* platform/win/mathml/opentype/horizontal-munderover-expected.txt:
* platform/win/mathml/opentype/large-operators-expected.txt:
* platform/win/mathml/opentype/opentype-stretchy-expected.txt:
* platform/win/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
* platform/win/mathml/opentype/vertical-expected.txt:
* platform/win/mathml/presentation/menclose-notation-default-longdiv-expected.txt:
* platform/win/mathml/presentation/mo-stretch-expected.txt:
* platform/win/mathml/presentation/mspace-children-expected.txt:
* platform/win/mathml/presentation/roots-expected.txt:
* platform/win/mathml/radical-fallback-expected.txt:

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

3 years ago[CSS][ARMv7] :nth-child() do not reserve enough registers if it is in backtracking...
benjamin@webkit.org [Thu, 14 Jul 2016 03:45:13 +0000 (03:45 +0000)]
[CSS][ARMv7] :nth-child() do not reserve enough registers if it is in backtracking chain
https://bugs.webkit.org/show_bug.cgi?id=159746
rdar://problem/26156169

Reviewed by Andreas Kling.

The generator generateElementIsNthChild() requires 6 registers in style resolution
to mark previous siblings with generateAddStyleRelationIfResolvingStyle() in the loop.

We were only reserving 5, which is a problem is the sixth is taken by the backtracking
register. x86_64 was already requiring 6 for unrelated reasons and ARM64 has so many registers
that you cannot possibly run out of them in CSS JIT.

I generalized the x86_64 path to all architectures.
I did not limit this case to style resolution because the extra register is irrelevant
in most cases. The only difference is one extra push/pop on ARMv7 if you use querySelector
with :nth-child in a backtracking chain.

This problem is covered by the existing test fast/selectors/nth-child-with-backtracking.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::minimumRegisterRequirements): Deleted.

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

3 years agoDrop unnecessary check from ContainerNode::removeChild()
cdumez@apple.com [Thu, 14 Jul 2016 03:43:07 +0000 (03:43 +0000)]
Drop unnecessary check from ContainerNode::removeChild()
https://bugs.webkit.org/show_bug.cgi?id=159747

Reviewed by Andreas Kling.

Drop unnecessary check from ContainerNode::removeChild() to make sure that
the parent of the node being removed is |this|. We already do this check
a few lines above. The only thing that happens in between is the ref'ing
of the node, which does not cause any JS execution.

This check was introduced in r55783 because there used to be a call to
document()->removeFocusedNodeOfSubtree(child.get());
between the two checks. However, this call has been removed since then
and the extra parentNode() check was left in.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild): Deleted.

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

3 years ago[iOS] Copy WebKitTestRunnerInjectedBundle.bundle into PlugIns subdirectory and code...
dbates@webkit.org [Thu, 14 Jul 2016 02:38:07 +0000 (02:38 +0000)]
[iOS] Copy WebKitTestRunnerInjectedBundle.bundle into PlugIns subdirectory and code sign it
https://bugs.webkit.org/show_bug.cgi?id=159738
<rdar://problem/27304649>

Reviewed by Dan Bernstein.

The bundle WebKitTestRunnerInjectedBundle.bundle contains executable code and should be
code signed if applicable. We should also copy this bundle into the PlugIns subdirectory
of the WebKitTestRunnerApp.app bundle instead of the top-level bundle directory as the
PlugIns subdirectory is the directory where loadable bundles of an app are expected to live.

* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::initializeInjectedBundlePath): Modified code to look for the
bundle WebKitTestRunnerInjectedBundle.bundle in the plugin directory of the main bundle.

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

3 years agoAddressing post-review comments after r203119
mmaxfield@apple.com [Thu, 14 Jul 2016 02:01:33 +0000 (02:01 +0000)]
Addressing post-review comments after r203119
https://bugs.webkit.org/show_bug.cgi?id=159749

Unreviewed.

* wtf/text/StringView.h:
(WTF::StringView::CodePoints::Iterator::Iterator):
(WTF::StringView::CodePoints::Iterator::operator*):
(WTF::StringView::CodePoints::Iterator::operator==):

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

3 years agoUnreviewed, rebaseline tests for ES6 TypedArray behavior.
keith_miller@apple.com [Thu, 14 Jul 2016 01:45:18 +0000 (01:45 +0000)]
Unreviewed, rebaseline tests for ES6 TypedArray behavior.

* js/typed-array-mutated-during-set-expected.txt:
* js/typed-array-mutated-during-set.html:

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

3 years agoYARR uses mixture of int and unsigned values to index into subject string
msaboff@apple.com [Thu, 14 Jul 2016 01:20:11 +0000 (01:20 +0000)]
YARR uses mixture of int and unsigned values to index into subject string
https://bugs.webkit.org/show_bug.cgi?id=159744

Reviewed by Benjamin Poulain.

In most cases, we refer to characters in subject strings using a negative index from the number of
"checked" characters in a subject string.  The required length is compared against the actual length
and then we use that required length as the checked amount.  For example, when matching the string of
4 digits in the RegExp /abc \d{4}/, we know that need 8 characters in the subject string.  We refer
to the digits part of the expression from an already checked index of 8 and use negative offsets of
-4 through -1.  In many cases we used a signed int for the negative offsets.  There are other cases
where we used unsigned values as the amount of negative offset to use when accessing subject characters.

Changed all occurrances of character offsets to unsigned or Checked Arithmetic unsigned values.  Note
that the pre-existing Checked class is used in other places to check for under/overflow with arithmetic
operations.  Those unsigned offsets are always the number of characters before (negative) from the
current checked character offset.  Also added some asserts for cases where arithmetic is not protected
by other checks or with Checked<> wrapped values.

In the case of the JIT, subject characters are accessed using base with scaled index and offset
addressing.  The MacroAssembler provides this addressing using the BaseIndex struct.  The offset for
this struct is a 32 bit signed quantity.  Since we only care about negative offsets, we really only
have 31 bits.  Changed the generation of a BaseOffset address to handle the case when the offset and
scaled combination will exceed the 31 bits of negative offset.  This is done by moving the base value
into a temp register and biasing the temp base and offset to smaller values so that we can emit
instructions that can reference characters without exceeding the 31 bits of negative offset.

To abstract the character address generation, put the base with scaled index and offset into
one function and used that function everywhere the YARR JIT wants to access subject characters.
Also consilidated a few cases where we were generating inline what readCharacter() does.  Usually
this was due to using a different index register.

Added a new regression test.

* tests/stress/regress-159744.js: Added regression test.
(testRegExp):
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::recordParenthesesMatch):
(JSC::Yarr::Interpreter::resetMatches):
(JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::closeBodyAlternative):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):
* yarr/YarrInterpreter.h:
(JSC::Yarr::ByteTerm::ByteTerm):
(JSC::Yarr::ByteTerm::BOL):
(JSC::Yarr::ByteTerm::UncheckInput):
(JSC::Yarr::ByteTerm::EOL):
(JSC::Yarr::ByteTerm::WordBoundary):
(JSC::Yarr::ByteTerm::BackReference):
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::notAtEndOfInput):
(JSC::Yarr::YarrGenerator::negativeOffsetIndexedAddress):
(JSC::Yarr::YarrGenerator::readCharacter):
(JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
(JSC::Yarr::YarrGenerator::storeToFrame):
(JSC::Yarr::YarrGenerator::generateAssertionBOL):
(JSC::Yarr::YarrGenerator::backtrackAssertionBOL):
(JSC::Yarr::YarrGenerator::generateAssertionEOL):
(JSC::Yarr::YarrGenerator::matchAssertionWordchar):
(JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
(JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
(JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
(JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassOnce):
(JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
(JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
(JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::generate):
(JSC::Yarr::YarrGenerator::backtrack):
(JSC::Yarr::YarrGenerator::YarrGenerator):
* yarr/YarrPattern.h:
(JSC::Yarr::PatternTerm::PatternTerm):

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

3 years agoCrashes with detached ArrayBuffers
keith_miller@apple.com [Thu, 14 Jul 2016 00:15:03 +0000 (00:15 +0000)]
Crashes with detached ArrayBuffers
https://bugs.webkit.org/show_bug.cgi?id=157088
<rdar://problem/27327362>

Reviewed by Filip Pizlo.

TypedArray.prototype.fill was incorrect because it should perform
ToNumber coercion each time it tries to store the
object. Currently, we only perform the coercion once at the
beginning of the loop. If we find that we need to improve the
performance of this function, we can add a faster C++ path back
that only handles the primitive case.

This patch also moves the isNeutered() checks from put and
putByIndex into setIndex. This fixes an issue where setIndex might
store to a no longer valid offset.

* builtins/TypedArrayPrototype.js:
(globalPrivate.typedArrayClampArgumentToStartOrEnd):
(fill):
* runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::setIndexQuickly):
(JSC::JSGenericTypedArrayView::setIndex):
(JSC::JSGenericTypedArrayView::setRangeToValue): Deleted.
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::put): Deleted.
(JSC::JSGenericTypedArrayView<Adaptor>::putByIndex): Deleted.
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncFill): Deleted.
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::finishCreation):
(JSC::typedArrayViewProtoFuncFill): Deleted.
* tests/stress/typedarray-fill.js:
* tests/stress/typedarray-functions-with-neutered.js:
(defaultForArg):
(test2):
(checkArgumentsForType): Deleted.
(checkArguments): Deleted.

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

3 years agoAttempted build fix.
bdakin@apple.com [Thu, 14 Jul 2016 00:12:58 +0000 (00:12 +0000)]
Attempted build fix.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

3 years agoSome bad unicode regex escapes aren't flagged as errors
msaboff@apple.com [Thu, 14 Jul 2016 00:11:56 +0000 (00:11 +0000)]
Some bad unicode regex escapes aren't flagged as errors
https://bugs.webkit.org/show_bug.cgi?id=158080

Reviewed by Saam Barati.

Source/JavaScriptCore:

If we have a partial unicode escape, eg /\u{1/u or /\u12|abc/u, we
didn't check for the closing '}' and processed the unicode escape with
the hex value provided.

Added a check that we properly terminated a \u{} unicode escape.
If we fail that check and there isn't a prior error, we record that we
have an invalid unicode escape.  The next existing line in the code will
terminate parsing and bubble up the error.

* yarr/YarrParser.h:
(JSC::Yarr::Parser::parseEscape):

LayoutTests:

New tests.

* js/regress-158080.html: Added.
* js/script-tests/regress-158080.js: Added.

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

3 years agoImport W3C WebCryptoAPI tests
jiewen_tan@apple.com [Thu, 14 Jul 2016 00:08:29 +0000 (00:08 +0000)]
Import W3C WebCryptoAPI tests
https://bugs.webkit.org/show_bug.cgi?id=159636

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* WebCryptoAPI/OWNERS: Added.
* WebCryptoAPI/README.md: Added.
* WebCryptoAPI/WebCryptoAPI.idl: Added.
* WebCryptoAPI/digest/digest.js: Added.
(run_test.):
(run_test.copyBuffer):
(run_test.equalBuffers):
(run_test):
* WebCryptoAPI/digest/digest.worker.js: Added.
* WebCryptoAPI/digest/test_digest-expected.txt: Added.
* WebCryptoAPI/digest/test_digest.html: Added.
* WebCryptoAPI/digest/w3c-import.log: Added.
* WebCryptoAPI/encrypt_decrypt/aes.js: Added.
(run_test.):
(run_test.importVectorKey):
(run_test):
(run_test.equalBuffers):
* WebCryptoAPI/encrypt_decrypt/aes_cbc.worker.js: Added.
* WebCryptoAPI/encrypt_decrypt/aes_cbc_vectors.js: Added.
(getTestVectors):
* WebCryptoAPI/encrypt_decrypt/aes_ctr.worker.js: Added.
* WebCryptoAPI/encrypt_decrypt/aes_ctr_vectors.js: Added.
(getTestVectors):
* WebCryptoAPI/encrypt_decrypt/aes_gcm.worker.js: Added.
* WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js: Added.
(getTestVectors):
* WebCryptoAPI/encrypt_decrypt/rsa.js: Added.
(run_test.):
(run_test.else):
(run_test.importVectorKeys):
(run_test.copyBuffer):
(run_test.equalBuffers):
(run_test):
* WebCryptoAPI/encrypt_decrypt/rsa.worker.js: Added.
* WebCryptoAPI/encrypt_decrypt/rsa_vectors.js: Added.
(getTestVectors):
* WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt: Added.
* WebCryptoAPI/encrypt_decrypt/test_aes_cbc.html: Added.
* WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt: Added.
* WebCryptoAPI/encrypt_decrypt/test_aes_ctr.html: Added.
* WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt: Added.
* WebCryptoAPI/encrypt_decrypt/test_aes_gcm.html: Added.
* WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt: Added.
* WebCryptoAPI/encrypt_decrypt/test_rsa_oaep.html: Added.
* WebCryptoAPI/encrypt_decrypt/w3c-import.log: Added.
* WebCryptoAPI/generateKey/failures.js: Added.
(run_test.parameterString):
(run_test.testError):
(run_test):
(run_test.invalidUsages):
(run_test.):
* WebCryptoAPI/generateKey/failures.worker.js: Added.
* WebCryptoAPI/generateKey/failures_AES-CBC.worker.js: Added.
* WebCryptoAPI/generateKey/failures_AES-CTR.worker.js: Added.
* WebCryptoAPI/generateKey/failures_AES-GCM.worker.js: Added.
* WebCryptoAPI/generateKey/failures_AES-KW.worker.js: Added.
* WebCryptoAPI/generateKey/failures_ECDH.worker.js: Added.
* WebCryptoAPI/generateKey/failures_ECDSA.worker.js: Added.
* WebCryptoAPI/generateKey/failures_HMAC.worker.js: Added.
* WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.js: Added.
* WebCryptoAPI/generateKey/failures_RSA-PSS.worker.js: Added.
* WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.js: Added.
* WebCryptoAPI/generateKey/successes.js: Added.
(run_test.parameterString):
(run_test.):
(run_test.testSuccess):
(run_test):
* WebCryptoAPI/generateKey/successes.worker.js: Added.
* WebCryptoAPI/generateKey/successes_AES-CBC.worker.js: Added.
* WebCryptoAPI/generateKey/successes_AES-CTR.worker.js: Added.
* WebCryptoAPI/generateKey/successes_AES-GCM.worker.js: Added.
* WebCryptoAPI/generateKey/successes_AES-KW.worker.js: Added.
* WebCryptoAPI/generateKey/successes_ECDH.worker.js: Added.
* WebCryptoAPI/generateKey/successes_ECDSA.worker.js: Added.
* WebCryptoAPI/generateKey/successes_HMAC.worker.js: Added.
* WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.js: Added.
* WebCryptoAPI/generateKey/successes_RSA-PSS.worker.js: Added.
* WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.js: Added.
* WebCryptoAPI/generateKey/test_aes-cbc-expected.txt: Added.
* WebCryptoAPI/generateKey/test_aes-cbc.html: Added.
* WebCryptoAPI/generateKey/test_aes-ctr-expected.txt: Added.
* WebCryptoAPI/generateKey/test_aes-ctr.html: Added.
* WebCryptoAPI/generateKey/test_failures-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures.html: Added.
* WebCryptoAPI/generateKey/test_failures_AES-CBC-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_AES-CBC.html: Added.
* WebCryptoAPI/generateKey/test_failures_AES-CTR-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_AES-CTR.html: Added.
* WebCryptoAPI/generateKey/test_failures_AES-GCM-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_AES-GCM.html: Added.
* WebCryptoAPI/generateKey/test_failures_AES-KW-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_AES-KW.html: Added.
* WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_ECDH.html: Added.
* WebCryptoAPI/generateKey/test_failures_ECDSA-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_ECDSA.html: Added.
* WebCryptoAPI/generateKey/test_failures_HMAC-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_HMAC.html: Added.
* WebCryptoAPI/generateKey/test_failures_RSA-OAEP-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_RSA-OAEP.html: Added.
* WebCryptoAPI/generateKey/test_failures_RSA-PSS-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_RSA-PSS.html: Added.
* WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5-expected.txt: Added.
* WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5.html: Added.
* WebCryptoAPI/generateKey/test_successes-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes.html: Added.
* WebCryptoAPI/generateKey/test_successes_AES-CBC-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_AES-CBC.html: Added.
* WebCryptoAPI/generateKey/test_successes_AES-CTR-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_AES-CTR.html: Added.
* WebCryptoAPI/generateKey/test_successes_AES-GCM-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_AES-GCM.html: Added.
* WebCryptoAPI/generateKey/test_successes_AES-KW-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_AES-KW.html: Added.
* WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_ECDH.html: Added.
* WebCryptoAPI/generateKey/test_successes_ECDSA-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_ECDSA.html: Added.
* WebCryptoAPI/generateKey/test_successes_HMAC-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_HMAC.html: Added.
* WebCryptoAPI/generateKey/test_successes_RSA-OAEP-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_RSA-OAEP.html: Added.
* WebCryptoAPI/generateKey/test_successes_RSA-PSS-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_RSA-PSS.html: Added.
* WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5-expected.txt: Added.
* WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.html: Added.
* WebCryptoAPI/generateKey/w3c-import.log: Added.
* WebCryptoAPI/getRandomValues.js: Added.
(run_test.):
(run_test):
* WebCryptoAPI/getRandomValues.worker.js: Added.
* WebCryptoAPI/idlharness-expected.txt: Added.
* WebCryptoAPI/idlharness.html: Added.
* WebCryptoAPI/idlharness.worker.js: Added.
(request.onload):
* WebCryptoAPI/test_getRandomValues-expected.txt: Added.
* WebCryptoAPI/test_getRandomValues.html: Added.
* WebCryptoAPI/tools/generate.py: Added.
* WebCryptoAPI/tools/w3c-import.log: Added.
* WebCryptoAPI/util/helpers.js: Added.
(allNonemptySubsetsOf):
(objectToString.):
(objectToString):
(assert_goodCryptoKey):
(allAlgorithmSpecifiersFor):
(allValidUsages):
(allNameVariants):
* WebCryptoAPI/util/w3c-import.log: Added.
* WebCryptoAPI/w3c-import.log: Added.

LayoutTests:

* TestExpectations:
Skip test cases for unimplemented features.

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

3 years agoUnreviewed, rolling out r203199.
cdumez@apple.com [Wed, 13 Jul 2016 23:54:23 +0000 (23:54 +0000)]
Unreviewed, rolling out r203199.

Broke the build

Reverted changeset:

"Crashes with detached ArrayBuffers"
https://bugs.webkit.org/show_bug.cgi?id=157088
http://trac.webkit.org/changeset/203199

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

3 years agoCrashes with detached ArrayBuffers
keith_miller@apple.com [Wed, 13 Jul 2016 23:38:44 +0000 (23:38 +0000)]
Crashes with detached ArrayBuffers
https://bugs.webkit.org/show_bug.cgi?id=157088
<rdar://problem/27327362>

Reviewed by Filip Pizlo.

TypedArray.prototype.fill was incorrect because it should perform
ToNumber coercion each time it tries to store the
object. Currently, we only perform the coercion once at the
beginning of the loop. If we find that we need to improve the
performance of this function, we can add a faster C++ path back
that only handles the primitive case.

This patch also moves the isNeutered() checks from put and
putByIndex into setIndex. This fixes an issue where setIndex might
store to a no longer valid offset.

* builtins/TypedArrayPrototype.js:
(globalPrivate.typedArrayClampArgumentToStartOrEnd):
(fill):
* runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::setIndexQuickly):
(JSC::JSGenericTypedArrayView::setIndex):
(JSC::JSGenericTypedArrayView::setRangeToValue): Deleted.
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::put): Deleted.
(JSC::JSGenericTypedArrayView<Adaptor>::putByIndex): Deleted.
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncFill): Deleted.
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::finishCreation):
(JSC::typedArrayViewProtoFuncFill): Deleted.
* tests/stress/typedarray-fill.js:
* tests/stress/typedarray-functions-with-neutered.js:
(defaultForArg):
(test2):
(checkArgumentsForType): Deleted.
(checkArguments): Deleted.

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

3 years agoUncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewCo...
mattbaker@apple.com [Wed, 13 Jul 2016 23:33:39 +0000 (23:33 +0000)]
Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.showsFilterBar')
https://bugs.webkit.org/show_bug.cgi?id=159696
<rdar://problem/27312356>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
Early return if content view not visible, since the event is sent during
tab teardown and the current TimelineView may be invalid.

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

3 years agoRemove test-results.
lforschler@apple.com [Wed, 13 Jul 2016 22:43:30 +0000 (22:43 +0000)]
Remove test-results.

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

3 years ago[WK2] Use more references for connections
cdumez@apple.com [Wed, 13 Jul 2016 22:42:46 +0000 (22:42 +0000)]
[WK2] Use more references for connections
https://bugs.webkit.org/show_bug.cgi?id=159739

Reviewed by Alex Christensen.

Use more references for connections to make it more obvious they cannot
be null.

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
(WebKit::DatabaseToWebProcessConnection::connection):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::messageSenderConnection):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
* NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::connection):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::messageSenderConnection):
* Shared/mac/CookieStorageShim.mm:
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::messageSenderConnection):
(WebKit::preregisterSandboxExtensionsIfNecessary):
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
(WebKit::WebToDatabaseProcessConnection::connection):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
(WebKit::BlobRegistryProxy::unregisterBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
(WebKit::BlobRegistryProxy::blobSize):
(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
(WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
* WebProcess/Network/NetworkProcessConnection.h:
(WebKit::NetworkProcessConnection::connection):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::remove):
(WebKit::WebLoaderStrategy::setDefersLoading):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::createPingHandle):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::messageSenderConnection):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
(WebKit::WebPlatformStrategies::addCookie):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess):
(WebKit::WebProcess::networkConnection):
(WebKit::WebProcess::prefetchDNS):
* WebProcess/WebProcess.h:

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

3 years agoMove WKPreferencesRef functions to the correct file
andersca@apple.com [Wed, 13 Jul 2016 22:40:49 +0000 (22:40 +0000)]
Move WKPreferencesRef functions to the correct file
https://bugs.webkit.org/show_bug.cgi?id=159741

Reviewed by Sam Weinig.

Also, get rid of WKPreferencesGetPaymentsEnabled and WKPreferencesSetPaymentsEnabled.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesGetApplePayEnabled):
(WKPreferencesSetApplePayEnabled):
(WKPreferencesGetApplePayCapabilityDisclosureAllowed):
(WKPreferencesSetApplePayCapabilityDisclosureAllowed):
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
(WKPreferencesGetApplePayEnabled): Deleted.
(WKPreferencesSetApplePayEnabled): Deleted.
(WKPreferencesGetApplePayCapabilityDisclosureAllowed): Deleted.
(WKPreferencesSetApplePayCapabilityDisclosureAllowed): Deleted.
(WKPreferencesGetPaymentsEnabled): Deleted.
(WKPreferencesSetPaymentsEnabled): Deleted.

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

3 years agoRemove duplicated TestExpectation for perf/rel-list-remove.html on ios-simulator
ryanhaddad@apple.com [Wed, 13 Jul 2016 22:18:32 +0000 (22:18 +0000)]
Remove duplicated TestExpectation for perf/rel-list-remove.html on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

3 years agoTest gardening for fast/text/font-face-javascript.html
mmaxfield@apple.com [Wed, 13 Jul 2016 22:02:01 +0000 (22:02 +0000)]
Test gardening for fast/text/font-face-javascript.html
https://bugs.webkit.org/show_bug.cgi?id=156631

Unreviewed.

* TestExpectations:
* fast/text/font-face-javascript-expected.txt:
* fast/text/font-face-javascript.html:

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

3 years agoAdd _applePayCapabilityDisclosureAllowed SPI declaration
andersca@apple.com [Wed, 13 Jul 2016 21:58:56 +0000 (21:58 +0000)]
Add _applePayCapabilityDisclosureAllowed SPI declaration
https://bugs.webkit.org/show_bug.cgi?id=159740

Reviewed by Dan Bernstein.

Also, delete an old method that is no longer used.

* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _paymentsEnabled]): Deleted.
(-[WKWebViewConfiguration _setPaymentsEnabled:]): Deleted.

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

3 years agoMarking imported/blink/storage/indexeddb/blob-valid-after-deletion.html as flaky...
ryanhaddad@apple.com [Wed, 13 Jul 2016 21:42:53 +0000 (21:42 +0000)]
Marking imported/blink/storage/indexeddb/blob-valid-after-deletion.html as flaky on Mac and ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=158640

Unreviewed test gardening.

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

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

3 years agoBlank news article on kottke.org
zalan@apple.com [Wed, 13 Jul 2016 21:33:12 +0000 (21:33 +0000)]
Blank news article on kottke.org
https://bugs.webkit.org/show_bug.cgi?id=159733
<rdar://problem/26743065>

Reviewed by Simon Fraser.

This patch ensures that we update the visible content rect, when Auto Layout moves the WKWebView around.
We normally expect setFrameRect to be called to position WKWebView. However Auto Layout relies on layoutSubviews,
and in order to always have up-to-date visible content rect, we need to override layoutSubviews in WKWebView.

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

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

3 years agoAdd test verifying detached iframes cannot set IDB values
commit-queue@webkit.org [Wed, 13 Jul 2016 21:14:28 +0000 (21:14 +0000)]
Add test verifying detached iframes cannot set IDB values
https://bugs.webkit.org/show_bug.cgi?id=159736

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

We match Chrome but not Firefox in this case.

* storage/indexeddb/detached-iframe-expected.txt: Added.
* storage/indexeddb/detached-iframe.html: Added.
* storage/indexeddb/resources/detached-iframe.html: Added.
* storage/indexeddb/resources/detached-iframe.js: Added.
(done):
(unexpectedErrorCallback):
(getRequestCallback):
(dbOpenedSecondTime):
(getValueFromIDB):
(makeDetachedFrame):
(prepareDatabase):

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

3 years agoREGRESSION(r202953): Clicking on input[type=file] doesn't open a file picker
rniwa@webkit.org [Wed, 13 Jul 2016 20:52:21 +0000 (20:52 +0000)]
REGRESSION(r202953): Clicking on input[type=file] doesn't open a file picker
https://bugs.webkit.org/show_bug.cgi?id=159686
Source/WebCore:

Reviewed by Chris Dumez.

The bug was caused by DOMActivate event not propagating out of the user-agent shadow tree
of a file input, and FileInputType not receiving the event to open the file picker.

Made DOMActivate "composed" event which cross shadow boundaries to fix the bug. The feedback
was given back to W3C on https://github.com/w3c/webcomponents/issues/513#issuecomment-231851617

Test: fast/forms/file/open-file-panel.html

* dom/Event.cpp:
(WebCore::Event::composed):

Tools:

Reviewed by Chris Dumez.

Added a code to print "OPEN FILE PANEL" in the text when runOpenPanel is called in the UI delegate.

* WebKitTestRunner/TestController.cpp:
(WTR::runOpenPanel):
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

LayoutTests:

<rdar://problem/27263589>

Reviewed by Chris Dumez.

Added a regression test for opening a file picker on a type=file input element.

The test currently only works on WebKit2 since the support for logging "OPEN FILE PANEL"
was only added to WebKitTestRunner.

Also added WebKit2 specific expected results for some tests that tries to open file panel.

* fast/forms/file/open-file-panel-expected.txt: Added.
* fast/forms/file/open-file-panel.html: Added.
* platform/ios-simulator-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
* platform/wk2/accessibility: Added.
* platform/wk2/accessibility/axpress-on-aria-button-expected.txt: Copied from LayoutTests/accessibility/axpress-on-aria-button-expected.txt.
* platform/wk2/accessibility/file-upload-button-with-axpress-expected.txt: Copied from LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt.
* platform/wk2/fast: Added.
* platform/wk2/fast/events: Added.
* platform/wk2/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt: Copied from LayoutTests/fast/events/domactivate-sets-underlying-click-event-as-handled-expected.txt.

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

3 years agoAdd more candidate tests
bdakin@apple.com [Wed, 13 Jul 2016 20:51:01 +0000 (20:51 +0000)]
Add more candidate tests
https://bugs.webkit.org/show_bug.cgi?id=159730

Reviewed by Tim Horton.

Source/WebKit/mac:

Move shouldRequestCandidates from WebViewInternal to WebViewPrivate so that
we can use it in tests.
* WebView/WebViewInternal.h:
* WebView/WebViewPrivate.h:

Tools:

This patch re-names ViewWithEditableAreaLeak.mm to CandidateTests.mm and adds
two new tests to that file.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/focus-inputs.html: Added.
* TestWebKitAPI/Tests/mac/CandidateTests.mm: Copied from TestWebKitAPI/Tests/mac/ViewWithEditableAreaLeak.mm.
(-[CandidateRequestFrameLoadDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/ViewWithEditableAreaLeak.mm: Removed.

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

3 years agoUpdate results-safari config.
lforschler@apple.com [Wed, 13 Jul 2016 20:33:33 +0000 (20:33 +0000)]
Update results-safari config.

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

3 years agoVersioning.
bshafiei@apple.com [Wed, 13 Jul 2016 20:23:40 +0000 (20:23 +0000)]
Versioning.

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

3 years agoRevert 203176.
lforschler@apple.com [Wed, 13 Jul 2016 20:09:23 +0000 (20:09 +0000)]
Revert 203176.

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

3 years agoUpdate command for the results maintenance script.
lforschler@apple.com [Wed, 13 Jul 2016 20:04:09 +0000 (20:04 +0000)]
Update command for the results maintenance script.

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

3 years agoWebKit2 shouldn't signal custom protocol clients from the NSURLConnection loader...
cdumez@apple.com [Wed, 13 Jul 2016 20:01:11 +0000 (20:01 +0000)]
WebKit2 shouldn't signal custom protocol clients from the NSURLConnection loader thread.
https://bugs.webkit.org/show_bug.cgi?id=159725
<rdar://problem/27323131>

Reviewed by Andy Estes.

WebKit2 shouldn't signal custom protocol clients from the NSURLConnection
loader thread. Instead, use the RunLoop the WKCustomProtocol was initialized
on.

* NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
(WebKit::dispatchOnInitializationRunLoop):
(WebKit::CustomProtocolManager::didFailWithError):
(WebKit::CustomProtocolManager::didLoadData):
(WebKit::CustomProtocolManager::didReceiveResponse):
(WebKit::CustomProtocolManager::didFinishLoading):
(WebKit::CustomProtocolManager::wasRedirectedToRequest):
(WebKit::dispatchOnResourceLoaderRunLoop): Deleted.

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

3 years agov2: WebContent crash due to RELEASE_ASSERT(!m_inLoadPendingImages) in StyleResolver...
antti@apple.com [Wed, 13 Jul 2016 19:17:46 +0000 (19:17 +0000)]
v2: WebContent crash due to RELEASE_ASSERT(!m_inLoadPendingImages) in StyleResolver::~StyleResolver()
https://bugs.webkit.org/show_bug.cgi?id=159722

Reviewed by Andreas Kling.

We have crashes where a StyleResolver is deleted underneath pseudoStyleForElement (key parts of the stack):

0   WebCore::StyleResolver::~StyleResolver
3   WebCore::AuthorStyleSheets::updateActiveStyleSheets
4   WebCore::Document::styleResolverChanged
5   WebKit::WebPage::viewportConfigurationChanged()
6   WebKit::WebPage::mainFrameDidLayout()
9   WebCore::FrameLoader::checkCompleted
13  WebCore::ResourceLoader::cancel
19  WebKit::WebLoaderStrategy::loadResource
24  WebCore::Style::loadPendingImage
27  WebCore::StyleResolver::pseudoStyleForElement
29  WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement
33  WebCore::Document::recalcStyle

This appears to be happening when a content blocker blocks a resource load for an image referenced from a stylesheet
and triggers synchronous cancellation of the load. With engine in suitable state this can clear style resolver.

No test, don't know how to make one. This is very timing and engine state dependent.

* dom/AuthorStyleSheets.cpp:
(WebCore::AuthorStyleSheets::updateActiveStyleSheets):

We have an existing check here that prevents destruction of the style resolver when we are in the middle of
a style resolution. However the old inStyleRecalc() bit no longer covers the render tree update phase. Pseudo
elements are resolved during render tree update.

Fix by adding a check for inRenderTreeUpdate() bit too.

This just fixes a regression. A proper fix would be to gather all resources during style resolution
and trigger the loads afterwards.

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

3 years agoRemove padding and margin around the <math> element
fred.wang@free.fr [Wed, 13 Jul 2016 19:14:59 +0000 (19:14 +0000)]
Remove padding and margin around the <math> element
https://bugs.webkit.org/show_bug.cgi?id=157989

Source/WebCore:

Reviewed by Brent Fulgham.

No new tests, already covered by existing tests.

* css/mathml.css:
(math): Remove padding.
(math[display="block"]): Remove margin.

LayoutTests:

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

* imported/mathml-in-html5/mathml/relations/html5-tree/href-click-1.html: Remove spacing hack.
* imported/mathml-in-html5/mathml/relations/html5-tree/href-click-2.html: Ditto.
* mathml/presentation/fractions-box-expected.html: Ditto.
* mathml/presentation/fractions-box.html: Ditto.
* mathml/presentation/href-enter.html: Ditto.
* mathml/presentation/maction-toggle-href.html: Ditto.
* mathml/presentation/mpadded-1-2.html: Ditto.
* mathml/presentation/mpadded-1.html: Ditto.
* mathml/presentation/mpadded-2.html: Ditto.
* mathml/presentation/mpadded-3.html: Ditto.
* mathml/presentation/mpadded-4-expected.html: Ditto.
* mathml/presentation/mpadded-4.html: Ditto.
* mathml/presentation/mspace-prefered-width.html: Ditto.
* mathml/presentation/mspace-units-expected.html: Ditto.
* mathml/presentation/mspace-units.html: Ditto.
* mathml/presentation/mspace.html: Ditto.
* mathml/presentation/scripts-height-expected.html: Ditto.
* mathml/presentation/scripts-subsup-expected.html: Ditto.
* mathml/presentation/scripts-subsup.html: Ditto.
* mathml/presentation/scripts-underover-expected.html: Ditto.
* mathml/presentation/scripts-underover.html: Ditto.
* mathml/presentation/semantics-2.html: Ditto.
* mathml/presentation/semantics-3.html: Ditto.
* mathml/presentation/semantics-4.html: Ditto.
* mathml/presentation/semantics-href.html: Ditto.
* mathml/presentation/style-border-padding-background.html: Ditto.
* platform/gtk/mathml/opentype/horizontal-expected.png: Rebaseline due to spacing change around the math tag.
* platform/gtk/mathml/opentype/horizontal-expected.txt: Ditto.
* platform/gtk/mathml/opentype/horizontal-munderover-expected.png: Ditto.
* platform/gtk/mathml/opentype/horizontal-munderover-expected.txt: Ditto.
* platform/gtk/mathml/opentype/large-operators-expected.txt: Ditto.
* platform/gtk/mathml/opentype/opentype-stretchy-expected.png: Ditto.
* platform/gtk/mathml/opentype/opentype-stretchy-expected.txt: Ditto.
* platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.png: Ditto.
* platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Ditto.
* platform/gtk/mathml/opentype/vertical-expected.png: Ditto.
* platform/gtk/mathml/opentype/vertical-expected.txt: Ditto.
* platform/gtk/mathml/presentation/menclose-notation-default-longdiv-expected.png: Ditto.
* platform/gtk/mathml/presentation/menclose-notation-default-longdiv-expected.txt: Ditto.
* platform/gtk/mathml/presentation/menclose-notation-values-expected.png: Ditto.
* platform/gtk/mathml/presentation/menclose-notation-values-expected.txt: Ditto.
* platform/gtk/mathml/presentation/mo-stretch-expected.png: Ditto.
* platform/gtk/mathml/presentation/mo-stretch-expected.txt: Ditto.
* platform/gtk/mathml/presentation/mspace-children-expected.txt: Ditto.
* platform/gtk/mathml/presentation/roots-expected.png: Ditto.
* platform/gtk/mathml/presentation/roots-expected.txt: Ditto.
* platform/gtk/mathml/radical-fallback-expected.png: Ditto.
* platform/gtk/mathml/radical-fallback-expected.txt: Ditto.
* platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt: Ditto.
* platform/ios-simulator/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Ditto.
* platform/ios-simulator/mathml/presentation/menclose-notation-default-longdiv-expected.txt: Ditto.
* platform/ios-simulator/mathml/presentation/menclose-notation-values-expected.txt: Ditto.
* platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt: Ditto.
* platform/ios-simulator/mathml/presentation/mspace-children-expected.txt: Ditto.
* platform/ios-simulator/mathml/presentation/roots-expected.txt: Ditto.
* platform/ios-simulator/mathml/radical-fallback-expected.txt: Ditto.
* platform/mac/mathml/opentype/opentype-stretchy-expected.txt: Ditto.
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Ditto.
* platform/mac/mathml/presentation/menclose-notation-default-longdiv-expected.txt: Ditto.
* platform/mac/mathml/presentation/menclose-notation-values-expected.txt: Ditto.
* platform/mac/mathml/presentation/mo-stretch-expected.txt: Ditto.
* platform/mac/mathml/presentation/mspace-children-expected.txt: Ditto.
* platform/mac/mathml/presentation/roots-expected.txt: Ditto.
* platform/mac/mathml/radical-fallback-expected.txt: Ditto.
* mathml/mathml-in-dashboard-expected.txt: Ditto

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

3 years agoAX: [ATK] spinbutton-crash.html fails
jdiggs@igalia.com [Wed, 13 Jul 2016 19:11:56 +0000 (19:11 +0000)]
AX: [ATK] spinbutton-crash.html fails
https://bugs.webkit.org/show_bug.cgi?id=159723

Reviewed by Chris Fleizach.

Tools:

Implement support for AXDecrementButton and AXIncrementButton in
ATK's AccessibilityUIElement::uiElementAttributeValue().

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::uiElementAttributeValue):

LayoutTests:

In ATK, the accessible object for an input element has no children for
the text component. As a result, the spinner is the first and only child.
In AXAPI, the input element has an AXGroup child for the text component.
As a result, the spinner is the second of two children. Therefore, add a
helper method to accessibility-helper.js to retrieve the correct child
for the current platform use it in spinbutton-crash.html.

* accessibility/spinbutton-crash.html: Modified.
* resources/accessibility-helper.js:
(spinnerForTextInput): Added.

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

3 years agoUpdate supported platforms in xcconfig files to match the sdk names.
enrica@apple.com [Wed, 13 Jul 2016 18:44:30 +0000 (18:44 +0000)]
Update supported platforms in xcconfig files to match the sdk names.
https://bugs.webkit.org/show_bug.cgi?id=159728

Reviewed by Tim Horton.

* Configurations/Base.xcconfig:

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

3 years ago"requiredShippingAddressFields" has been deprecated error thrown when using "required...
andersca@apple.com [Wed, 13 Jul 2016 18:36:02 +0000 (18:36 +0000)]
"requiredShippingAddressFields" has been deprecated error thrown when using "requiredBillingAddressFields"
https://bugs.webkit.org/show_bug.cgi?id=159729
rdar://problem/27314974

Reviewed by Tim Horton.

Fix a paste-o.

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

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

3 years ago[Win] DLLs are missing version information.
pvollan@apple.com [Wed, 13 Jul 2016 17:49:01 +0000 (17:49 +0000)]
[Win] DLLs are missing version information.
https://bugs.webkit.org/show_bug.cgi?id=159349

Reviewed by Alex Christensen.

Avoid using environment variable WEBKIT_LIBRARIES when finding version stamper utility,
in case it is not defined. Instead, use the location of the perl script to find the
utility.

.:

* Source/cmake/tools/scripts/version-stamp.pl:

WebKitLibraries:

* win/tools/scripts/version-stamp.pl:

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

3 years agoMarking imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-post-upload...
ryanhaddad@apple.com [Wed, 13 Jul 2016 17:40:43 +0000 (17:40 +0000)]
Marking imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-post-upload.htm as failing on Mac and ios-sim Release WK2
https://bugs.webkit.org/show_bug.cgi?id=159724

Unreviewed test gardening.

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

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

3 years ago[WK1][iOS] Crash when WebSocket attempts to dispatch a mixed content blocker event
bfulgham@apple.com [Wed, 13 Jul 2016 17:25:28 +0000 (17:25 +0000)]
[WK1][iOS] Crash when WebSocket attempts to dispatch a mixed content blocker event
https://bugs.webkit.org/show_bug.cgi?id=159680
<rdar://problem/22102028>

Reviewed by Zalan Bujtas.

Source/WebCore:

WK1 on iOS should not use RunLoop::main(). Instead, it should be dispatching events
on the WebThread.

Test: http/tests/ssl/mixedContent/insecure-websocket.html

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): Do not use RunLoop::main() when we should be using
the WebThread.

LayoutTests:

* http/tests/ssl/mixedContent: Added.
* http/tests/ssl/mixedContent/insecure-websocket-expected.txt: Added.
* http/tests/ssl/mixedContent/insecure-websocket.html: Added.

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

3 years agoRefresh WPT tests up to c875b42
commit-queue@webkit.org [Wed, 13 Jul 2016 16:30:38 +0000 (16:30 +0000)]
Refresh WPT tests up to c875b42
https://bugs.webkit.org/show_bug.cgi?id=159712

Patch by Youenn Fablet <youennf@gmail.com> on 2016-07-13
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* resources/ImportExpectations:
* resources/TestRepositories:
* resources/web-platform-tests-modules.json:
* web-platform-tests/XMLHttpRequest/open-url-multi-window-6-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-multi-window-6.htm: Added.
* web-platform-tests/XMLHttpRequest/responsexml-basic-expected.txt:
* web-platform-tests/XMLHttpRequest/responsexml-basic.htm:
* web-platform-tests/XMLHttpRequest/responsexml-document-properties-expected.txt:
* web-platform-tests/XMLHttpRequest/send-redirect-post-upload-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-redirect-post-upload.htm: Added.
* web-platform-tests/__init__.py:
* web-platform-tests/dom/events/CustomEvent-expected.txt: Added.
* web-platform-tests/dom/events/CustomEvent.html: Added.
* web-platform-tests/dom/events/Event-dispatch-bubbles-true-expected.txt: Added.
* web-platform-tests/dom/events/Event-dispatch-bubbles-true.html: Added.
* web-platform-tests/dom/events/Event-dispatch-detached-click-expected.txt: Added.
* web-platform-tests/dom/events/Event-dispatch-detached-click.html: Added.
* web-platform-tests/dom/events/Event-dispatch-multiple-stopPropagation-expected.txt: Added.
* web-platform-tests/dom/events/Event-dispatch-multiple-stopPropagation.html: Added.
* web-platform-tests/dom/events/Event-dispatch-order-expected.txt: Added.
* web-platform-tests/dom/events/Event-dispatch-order.html: Added.
* web-platform-tests/dom/events/Event-dispatch-throwing-expected.txt: Added.
* web-platform-tests/dom/events/Event-dispatch-throwing.html: Added.
* web-platform-tests/dom/events/Event-init-while-dispatching-expected.txt: Added.
* web-platform-tests/dom/events/Event-init-while-dispatching.html: Added.
* web-platform-tests/dom/events/Event-subclasses-constructors-expected.txt: Added.
* web-platform-tests/dom/events/Event-subclasses-constructors.html: Added.
* web-platform-tests/dom/events/EventListener-handleEvent-expected.txt: Added.
* web-platform-tests/dom/events/EventListener-handleEvent.html: Added.
* web-platform-tests/dom/events/EventListener-incumbent-global-1.sub-expected.txt: Added.
* web-platform-tests/dom/events/EventListener-incumbent-global-1.sub.html: Added.
* web-platform-tests/dom/events/EventListener-incumbent-global-2.sub-expected.txt: Added.
* web-platform-tests/dom/events/EventListener-incumbent-global-2.sub.html: Added.
* web-platform-tests/dom/events/EventListener-incumbent-global-subframe-1.sub.html: Added.
* web-platform-tests/dom/events/EventListener-incumbent-global-subframe-2.sub.html: Added.
* web-platform-tests/dom/events/EventListener-incumbent-global-subsubframe.sub.html: Added.
* web-platform-tests/dom/lists/DOMTokenList-coverage-for-attributes-expected.txt: Added.
* web-platform-tests/dom/lists/DOMTokenList-coverage-for-attributes.html: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-expected.txt:
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml: Added.
* web-platform-tests/dom/nodes/ProcessingInstruction-escapes-1-expected.txt: Added.
* web-platform-tests/dom/nodes/ProcessingInstruction-escapes-1.xhtml: Added.
* web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:
* web-platform-tests/domparsing/DOMParser-parseFromString-html.html:
* web-platform-tests/domparsing/createContextualFragment-expected.txt: Added.
* web-platform-tests/domparsing/createContextualFragment.html: Added.
* web-platform-tests/domparsing/innerhtml-01-expected.txt: Added.
* web-platform-tests/domparsing/innerhtml-01.xhtml: Added.
* web-platform-tests/domparsing/innerhtml-03-expected.txt: Added.
* web-platform-tests/domparsing/innerhtml-03.xhtml: Added.
* web-platform-tests/domparsing/innerhtml-04-expected.txt: Added.
* web-platform-tests/domparsing/innerhtml-04.html: Added.
* web-platform-tests/domparsing/innerhtml-05-expected.txt: Added.
* web-platform-tests/domparsing/innerhtml-05.xhtml: Added.
* web-platform-tests/domparsing/innerhtml-06-expected.txt: Added.
* web-platform-tests/domparsing/innerhtml-06.html: Added.
* web-platform-tests/domparsing/innerhtml-07-expected.txt: Added.
* web-platform-tests/domparsing/innerhtml-07.html: Added.
* web-platform-tests/domparsing/insert_adjacent_html-expected.txt: Added.
* web-platform-tests/domparsing/insert_adjacent_html.html: Added.
* web-platform-tests/domparsing/insert_adjacent_html.js: Added.
(testThrowingNoParent):
* web-platform-tests/domparsing/outerhtml-01-expected.txt: Added.
* web-platform-tests/domparsing/outerhtml-01.html: Added.
* web-platform-tests/domparsing/outerhtml-02-expected.txt: Added.
* web-platform-tests/domparsing/outerhtml-02.html: Added.
* web-platform-tests/domparsing/xml-serialization-expected.txt: Added.
* web-platform-tests/domparsing/xml-serialization.xhtml: Added.
* web-platform-tests/fetch/api/basic/request-head-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-head-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-head-worker.html: Added.
* web-platform-tests/fetch/api/basic/request-head.html: Added.
* web-platform-tests/fetch/api/basic/request-head.js: Added.
(promise_test):
* web-platform-tests/fetch/api/basic/request-headers-expected.txt:
* web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt:
* web-platform-tests/fetch/api/basic/request-headers.js:
* web-platform-tests/fetch/api/basic/response-url-expected.txt: Added.
* web-platform-tests/fetch/api/basic/response-url-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/response-url-worker.html: Added.
* web-platform-tests/fetch/api/basic/response-url.html: Added.
* web-platform-tests/fetch/api/basic/response-url.js: Added.
(checkResponseURL):
* web-platform-tests/fetch/api/basic/w3c-import.log:
* web-platform-tests/fetch/api/cors/cors-basic-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight.js:
(corsPreflight):
* web-platform-tests/fetch/api/cors/cors-redirect-credentials-worker-expected.txt:
* web-platform-tests/fetch/api/credentials/authentication-basic-worker-expected.txt:
* web-platform-tests/fetch/api/credentials/cookies-worker-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-worker-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-location-worker-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt:
* web-platform-tests/fetch/api/request/request-init-002.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/html/dom/interfaces.html:
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_about_blank-expected.txt: Added.
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_about_blank.html: Added.
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_href_invalid-expected.txt: Added.
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_href_invalid.html: Added.
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_srcdoc-expected.txt: Added.
* web-platform-tests/html/semantics/document-metadata/the-base-element/base_srcdoc.html: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context-expected.txt: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context.html: Added.
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-01-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-01.html:
* web-platform-tests/html/semantics/document-metadata/the-link-element/stylesheet.py: Added.
(main):
* web-platform-tests/html/semantics/document-metadata/the-link-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/media-elements/video_008-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/media-elements/video_008.htm: Added.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/historical-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/historical.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-subdocument.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/change_child.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/change_grandchild.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/change_parentage-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/change_parentage.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_child.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_grandchild.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-load-event-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_harness.js: Added.
(get_test_results.):
(get_test_results):
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_helper.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_child.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_grandchild.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_parentage-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_parentage.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/stash.py: Added.
(main):
* 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/invalid-src-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-img-element/invalid-src.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-img-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body-expected.txt: Added.
* web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body.html: Added.
* 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-form-element/form-indexed-element-expected.txt: Added.
* web-platform-tests/html/semantics/forms/the-form-element/form-indexed-element.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown-child.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/scripting-enabled-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/scripting-enabled.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/w3c-import.log:
* web-platform-tests/lint.whitelist:
* web-platform-tests/streams/readable-streams/bad-strategies.https-expected.txt:
* web-platform-tests/streams/readable-streams/bad-strategies.js:
(get string_appeared_here):
(promise_test): Deleted.

LayoutTests:

* TestExpectations: Adding some test expectations and skipping some resource files.

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

3 years agoThe display property of many MathML elements can not be overriden by page authors
fred.wang@free.fr [Wed, 13 Jul 2016 16:10:58 +0000 (16:10 +0000)]
The display property of many MathML elements can not be overriden by page authors
https://bugs.webkit.org/show_bug.cgi?id=139403

Source/WebCore:

The mathml.css user agent stylesheet currently forces most MathML elements to render with
'display: block'. We remove the !important keyword so that users can override the display
property, for example to hide elements with 'display: none'. This is consistent with the
behavior for SVG or HTML elements.

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

Test: imported/mathml-in-html5/mathml/relations/css-styling/display-1.html

* css/mathml.css:
(math):
(math[display="block"]):
(ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose, semantics, mpadded, maction):
(mtd > *):

LayoutTests:

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

* imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html: Added.
* imported/mathml-in-html5/mathml/relations/css-styling/display-1.html: Added.

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

3 years ago[Fetch API] Response should not become disturbed on the ReadableStream creation
commit-queue@webkit.org [Wed, 13 Jul 2016 16:08:51 +0000 (16:08 +0000)]
[Fetch API] Response should not become disturbed on the ReadableStream creation
https://bugs.webkit.org/show_bug.cgi?id=159714

Patch by Youenn Fablet <youenn@apple.com> on 2016-07-13
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/response/response-stream-disturbed-1-expected.txt:

Source/WebCore:

Covered by rebased test and existing tests.

* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::stop): Making the response disturbed if cancelled.
* Modules/fetch/FetchResponseSource.cpp:
(WebCore::FetchResponseSource::firstReadCallback): Start enqueueing as soon as first read is made.
(WebCore::FetchResponseSource::doStart): Keep the start promise unresolved so that pull is not called.
FetchResponse is a push source.
* Modules/fetch/FetchResponseSource.h:
* Modules/streams/ReadableStreamInternals.js:
(readFromReadableStreamReader): Calling @firstReadCallback.
* Modules/streams/ReadableStreamSource.h:
(WebCore::ReadableStreamSource::firstReadCallback): Default implementation (does nothing).
* Modules/streams/ReadableStreamSource.idl: Adding firstReadCallback private method.
* bindings/js/WebCoreBuiltinNames.h: Adding @firstReadCallback.

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

3 years agoUpdate Windows expectations for two MathML tests.
fred.wang@free.fr [Wed, 13 Jul 2016 14:48:09 +0000 (14:48 +0000)]
Update Windows expectations for two MathML tests.

Unreviewed test gardening.

Patch by Frederic Wang <fwang@igalia.com> on 2016-07-13

* platform/win/TestExpectations:

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

3 years ago[EFL] [GTK] Enable back crypto subtle on development builds.
clopez@igalia.com [Wed, 13 Jul 2016 13:09:09 +0000 (13:09 +0000)]
[EFL] [GTK] Enable back crypto subtle on development builds.
https://bugs.webkit.org/show_bug.cgi?id=159260

Reviewed by Carlos Garcia Campos.

Tools:

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

* platform/gtk/TestExpectations: Enable back the tests that were
passing on GTK.

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

3 years ago[GStreamer][GL] crash within triggerRepaint
philn@webkit.org [Wed, 13 Jul 2016 12:03:28 +0000 (12:03 +0000)]
[GStreamer][GL] crash within triggerRepaint
https://bugs.webkit.org/show_bug.cgi?id=159552

Reviewed by Xabier Rodriguez-Calvar.

Revert the un-needed changes introduced in r203056 and use the
MainThreadNotifier without redundant checks.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::createWeakPtr):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(WebCore::MediaPlayerPrivateGStreamerBase::createWeakPtr): Deleted.

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

3 years agoUnreviewed. Fix GObject DOM bindings API breaks after r203047-
carlosgc@webkit.org [Wed, 13 Jul 2016 11:37:48 +0000 (11:37 +0000)]
Unreviewed. Fix GObject DOM bindings API breaks after r203047-

webkit_dom_document_set_title() and webkit_dom_html_title_element_set_text() now can raise exceptions.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_document_set_title):
(webkit_dom_html_title_element_set_text):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/gobject/webkitdom.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty):
(FunctionUsedToNotRaiseException):

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

3 years ago[Coordinated Graphics] Remove toCoordinatedGraphicsLayer and use downcast instead
carlosgc@webkit.org [Wed, 13 Jul 2016 11:00:43 +0000 (11:00 +0000)]
[Coordinated Graphics] Remove toCoordinatedGraphicsLayer and use downcast instead
https://bugs.webkit.org/show_bug.cgi?id=159469

Reviewed by Michael Catanzaro.

Source/WebCore:

* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::detachFromStateTree):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::isCoordinatedGraphicsLayer):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::toCoordinatedLayerID):
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::removeFromParent):
(WebCore::CoordinatedGraphicsLayer::setMaskLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingState):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
(WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
(WebCore::toCoordinatedGraphicsLayer): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::flushPendingLayerChanges):
(WebKit::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebKit::CompositingCoordinator::mainContentsLayer):

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

3 years agoCLoop buildfix after r203142
ossy@webkit.org [Wed, 13 Jul 2016 10:22:33 +0000 (10:22 +0000)]
CLoop buildfix after r203142
https://bugs.webkit.org/show_bug.cgi?id=159706

Unreviewed buildfix.

* interpreter/CLoopStack.cpp:
(JSC::CLoopStack::isSafeToRecurse):
* interpreter/CLoopStack.h:
* interpreter/CLoopStackInlines.h:
(JSC::CLoopStack::isSafeToRecurse): Deleted.

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

3 years ago[GTK] WebKitGtk+ uses too many file descriptors
carlosgc@webkit.org [Wed, 13 Jul 2016 08:36:01 +0000 (08:36 +0000)]
[GTK] WebKitGtk+ uses too many file descriptors
https://bugs.webkit.org/show_bug.cgi?id=152316

Reviewed by Michael Catanzaro.

Source/WebKit2:

The problem is that we are keeping file descriptors open in SharedMemory objects. Those objects can be kept
alive for a long time, for example in case of cached resources sent from the network process as shareable
resources. The thing is that we keep the file descriptor in the SharedMemory object only to be able to create a
Handle, duplicating the file descriptor. However, we are also assuming that we create handles for SharedMemory
objects created by another handle which is wrong. SharedMemory objects are created to map a file or data and
then a handle is created to send it to another process, or to map an existing file or data for a given handle
received from another process. They can also be created to wrap another map, but in that case we don't own the
file descritor nor the mapped data. So, after mapping from a handle, we no longer need the file descriptor, and
it can be closed to release it, while the mapped memory data will still be alive until munmap() is called. This
drastically reduces the amount of file descriptors used by WebKitGTK+.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::readBytesFromSocket): Use setCloseOnExec().
(IPC::Connection::createPlatformConnection): Ditto.
* Platform/SharedMemory.h:
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::map): Close the file descriptor right after mmap.
(WebKit::SharedMemory::~SharedMemory): Close the file descriptor only if it hasn't been closed yet.
(WebKit::SharedMemory::createHandle): Add an ASSERT to ensure we only try to create a handle for SharedMemory
objects having a valid file descriptor. Use dupCloseOnExec() to duplicate the handle and set the close on exec flag.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Use setCloseOnExec().

Source/WTF:

Add helper functions to duplicate a file descriptor setting close on exec flag, and also to set close on exec
flag to an existing file descriptor.

* wtf/UniStdExtras.h:
* wtf/UniStdExtras.cpp
(WTF::setCloseOnExec):
(WTF::dupCloseOnExec):

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