WebKit-https.git
4 years agoActually fix the Mac builders build after <http://trac.webkit.org/changeset/190219>
dbates@webkit.org [Wed, 30 Sep 2015 17:23:28 +0000 (17:23 +0000)]
Actually fix the Mac builders build after <trac.webkit.org/changeset/190219>
(https://bugs.webkit.org/show_bug.cgi?id=149539)

I inadvertently didn't remove the ONLY_ACTIVE_ARCH=NO flag when building on a Mac
in <http://trac.webkit.org/changeset/190351>.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(CompileWebKit.start):

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

4 years agoAttempt to fix the Mac builders build after <http://trac.webkit.org/changeset/190219>
dbates@webkit.org [Wed, 30 Sep 2015 17:19:41 +0000 (17:19 +0000)]
Attempt to fix the Mac builders build after <trac.webkit.org/changeset/190219>
(https://bugs.webkit.org/show_bug.cgi?id=149539)

{32, 64}-bit Mac builders should not try to build project {Plugin.64, Plugin.32},
respectively; only pass ONLY_ACTIVE_ARCH=NO when building for iOS.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(CompileWebKit.start):

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

4 years agoUnreviewed, rolling out r190324.
commit-queue@webkit.org [Wed, 30 Sep 2015 17:17:27 +0000 (17:17 +0000)]
Unreviewed, rolling out r190324.
https://bugs.webkit.org/show_bug.cgi?id=149671

Caused flaky crashes, rdar://problem/22916304 (Requested by ap
on #webkit).

Reverted changeset:

"ParallelHelperPool::runFunctionInParallel() shouldn't
allocate, and ParallelHelperPool.h shouldn't be included
everywhere"
https://bugs.webkit.org/show_bug.cgi?id=149635
http://trac.webkit.org/changeset/190324

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

4 years agobot210 was configured for a queue instead of bot126.
lforschler@apple.com [Wed, 30 Sep 2015 16:56:12 +0000 (16:56 +0000)]
bot210 was configured for a queue instead of bot126.

Unreviewed config.json fix.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

4 years agoBring El Capitan buildbot infrastructure online.
lforschler@apple.com [Wed, 30 Sep 2015 16:35:59 +0000 (16:35 +0000)]
Bring El Capitan buildbot infrastructure online.
https://bugs.webkit.org/show_bug.cgi?id=149605

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

4 years agoUse separate style resolver for user agent shadow trees
antti@apple.com [Wed, 30 Sep 2015 15:39:15 +0000 (15:39 +0000)]
Use separate style resolver for user agent shadow trees
https://bugs.webkit.org/show_bug.cgi?id=149626

Reviewed by Andreas Kling.

We now support separate style resolvers for shadow trees. Use this mechanism to have a separate
per-document style resolver for user agent shadow trees. This isolates user agent shadow trees
from author style better and simplifies the style resolver. It can also avoid some unnecessary style recalcs.

* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::resetAuthorStyle):
(WebCore::DocumentRuleSets::appendAuthorStyleSheets):

    Change interface so that only the new rules are provided.

* css/DocumentRuleSets.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::addElementStyleProperties):
(WebCore::ElementRuleCollector::collectMatchingRules):

    We can remove special bailout as shadow tree style resolver won't have other author style

(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):

    Remove the exception that disables property whitelists for UA stylesheets. We don't seem to use the feature.

(WebCore::ElementRuleCollector::matchUARules):
(WebCore::MatchingUARulesScope::MatchingUARulesScope): Deleted.
(WebCore::MatchingUARulesScope::~MatchingUARulesScope): Deleted.
(WebCore::MatchingUARulesScope::isMatchingUARules): Deleted.

    Remove this unnecessary hack.

* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::ElementRuleCollector):
* css/RuleSet.cpp:
(WebCore::RuleSet::addStyleRule):
(WebCore::RuleSet::copyShadowPseudoElementRulesFrom):

    Also copy WebVTT rules. They are currently a sort of mixture of UA and author shadow tree.

(WebCore::shrinkMapVectorsToFit):
* css/RuleSet.h:
(WebCore::RuleData::containsUncommonAttributeSelector):
(WebCore::RuleData::linkMatchType):
(WebCore::RuleData::hasDocumentSecurityOrigin):
(WebCore::RuleData::propertyWhitelistType):
(WebCore::RuleData::descendantSelectorIdentifierHashes):
(WebCore::RuleSet::ruleCount):
(WebCore::RuleSet::hasShadowPseudoElementRules):
* css/StyleInvalidationAnalysis.cpp:
(WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):

    Don't invalidate the whole tree when author shadow pseudo element rules change. Just invalidate the shadow trees.

(WebCore::StyleInvalidationAnalysis::invalidateStyleForTree):
(WebCore::StyleInvalidationAnalysis::invalidateStyle):
(WebCore::invalidateIfNeeded): Deleted.
(WebCore::invalidateStyleForTree): Deleted.
* css/StyleInvalidationAnalysis.h:
(WebCore::StyleInvalidationAnalysis::dirtiesAllStyle):
(WebCore::StyleInvalidationAnalysis::hasShadowPseudoElementRulesInAuthorSheet):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::MatchResult::addMatchedProperties):
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::appendAuthorStyleSheets):

    Simpler interface.

* css/StyleResolver.h:
(WebCore::StyleResolver::document):
(WebCore::StyleResolver::documentSettings):
(WebCore::StyleResolver::ruleSets):
* dom/AuthorStyleSheets.cpp:
(WebCore::AuthorStyleSheets::collectActiveStyleSheets):
(WebCore::AuthorStyleSheets::analyzeStyleSheetChange):

    Cleanups.

(WebCore::filterEnabledNonemptyCSSStyleSheets):
(WebCore::AuthorStyleSheets::updateActiveStyleSheets):
(WebCore::AuthorStyleSheets::updateStyleResolver):

    Factor to a function.
    Copy any author shadow pseudo elements to user agent shadow tree resolver.

(WebCore::AuthorStyleSheets::activeStyleSheetsForInspector):
* dom/AuthorStyleSheets.h:
* dom/Document.cpp:
(WebCore::Document::createStyleResolver):
(WebCore::Document::userAgentShadowTreeStyleResolver):

    Use separate resolver.

(WebCore::Document::fontsNeedUpdate):
(WebCore::Document::clearStyleResolver):
* dom/Document.h:
(WebCore::Document::ensureStyleResolver):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::styleResolver):

    Return document-global shadow tree resolver for ua trees.

* style/StyleResolveTree.cpp:
(WebCore::Style::resolveShadowTree):

    Take styleChange of shadow root into account.

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

4 years ago[GTK] Deprecation warnings in DOMNodeTest
commit-queue@webkit.org [Wed, 30 Sep 2015 14:07:42 +0000 (14:07 +0000)]
[GTK] Deprecation warnings in DOMNodeTest
https://bugs.webkit.org/show_bug.cgi?id=149663

After the webkit_dom_document_get_elements_by_tag_name deprecation we
need to update the tests to use webkit_dom_document_query_selector_all
to avoid compilation warnings.

Also add a new test for webkit_dom_document_get_elements_by_tag_name_as_html_collection
(the suggested replacement for the deprecated function).

Patch by Tomas Popela <tpopela@redhat.com> on 2015-09-30
Reviewed by Carlos Garcia Campos.

* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp:
(WebKitDOMNodeTest::testTagNamesNodeList):
(WebKitDOMNodeTest::testTagNamesHTMLCollection):
(registerTests):
(WebKitDOMNodeTest::testTagNames): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp:
(prepareDOMForTagNamesTests):
(testWebKitDOMNodeTagNamesNodeList):
(testWebKitDOMNodeTagNamesHTMLCollection):
(beforeAll):
(testWebKitDOMNodeTagNames): Deleted.

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

4 years ago[GTK] Build error with -DENABLE_SPELLCHECK=OFF
clopez@igalia.com [Wed, 30 Sep 2015 12:55:17 +0000 (12:55 +0000)]
[GTK] Build error with -DENABLE_SPELLCHECK=OFF
https://bugs.webkit.org/show_bug.cgi?id=146904

Reviewed by Carlos Garcia Campos.

Add ifdef guards to allow building when SPELLCHECK is not enabled.

* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
(WebKit::TextChecker::grammarCheckingEnabledStateChanged):
(WebKit::TextChecker::checkSpellingOfString):
(WebKit::TextChecker::getGuessesForWord):
(WebKit::TextChecker::learnWord):
(WebKit::TextChecker::ignoreWord):
(WebKit::TextChecker::requestCheckingOfString):
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::setSpellCheckingLanguages):
(WebKit::TextChecker::loadedSpellCheckingLanguages):

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

4 years ago[GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
yoon@igalia.com [Wed, 30 Sep 2015 09:55:59 +0000 (09:55 +0000)]
[GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=141782

Reviewed by Carlos Garcia Campos.

Source/WebCore:

This patch fixes HiDPI issue in the TextureMapper.
To support HiDPI in the TextureMapper, we need to draw scaled contents
in the TextureMapperTile, and apply the global scale in the root layer
to apply transforms correctly.

Supporting the device scale is handled at LayerTreeHostGtk and
TextureMapperBackingStore, and GraphicsLayerTextureMapper doesn't handle
the device scale directly.

From the TextureMapperLayer, deviceScale and pageScale do not have to be
handled differently. These are multiplied and provided to
TextureMapperBackingStore.

* platform/graphics/texmap/TextureMapperTile.cpp:
(WebCore::TextureMapperTile::updateContents):
* platform/graphics/texmap/TextureMapperTile.h:
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:

    Modified to increase the cover rect for tiles creation. For the image
    contents, it just creates texture with a image size, regardless of the
    contents scale.

* platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::updateContents):

    Apply the device scale to the graphics context before painting contents.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToImage):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):

    Apply the device scale and the page scale to the backing store

Source/WebKit2:

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:

    Modified to create scaled size of window.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):

    We should apply device scale factor to the root layer to apply
    the scale matrix before applying other transform matrices.

(WebKit::LayerTreeHostGtk::deviceScaleFactor): Added.
(WebKit::LayerTreeHostGtk::pageScaleFactor): Added.

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

4 years agoUpdate iOS-simulator results for fast/text/mark-matches-overflow-clip.html
commit-queue@webkit.org [Wed, 30 Sep 2015 06:00:03 +0000 (06:00 +0000)]
Update iOS-simulator results for fast/text/mark-matches-overflow-clip.html
<https://bugs.webkit.org/show_bug.cgi?id=149637>

Patch by Ryan Haddad <ryanhaddad@apple.com> on 2015-09-29
Reviewed by Darin Adler.

* platform/ios-simulator/fast/text/mark-matches-overflow-clip-expected.txt: Added.

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

4 years agoWeb Inspector: Console completion suggestions should include properties on Object...
commit-queue@webkit.org [Wed, 30 Sep 2015 05:58:38 +0000 (05:58 +0000)]
Web Inspector: Console completion suggestions should include properties on Object (hasOwnProperty, toString, etc)
https://bugs.webkit.org/show_bug.cgi?id=149649

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-29
Reviewed by Darin Adler.

* UserInterface/Base/Utilities.js:
(value):
Since keySets in this instance are often used as hash maps with the
`in` operator, create a blank object that won't have Object.prototype
functions that would be seen by `in`.

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames.compare):
Sort __defineGetter__ and __lookupGetter__ and friends last, since they
are rarely used properties.

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

4 years agoWeb Inspector: Missing completions for Symbol objects, console.error warning
commit-queue@webkit.org [Wed, 30 Sep 2015 05:57:41 +0000 (05:57 +0000)]
Web Inspector: Missing completions for Symbol objects, console.error warning
https://bugs.webkit.org/show_bug.cgi?id=149641

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-29
Reviewed by Darin Adler.

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.getCompletions):
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
Include completions for symbol types.

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

4 years agoASSERTION FAILED: !isUnreachableNode(m_target.get()) when hovering over any input...
rniwa@webkit.org [Wed, 30 Sep 2015 05:55:44 +0000 (05:55 +0000)]
ASSERTION FAILED: !isUnreachableNode(m_target.get()) when hovering over any input element
https://bugs.webkit.org/show_bug.cgi?id=149589

Reviewed by Darin Adler.

The bug was caused by target not being reset across shadow boundary when SHADOW_DOM was disabled.

No new tests since exiting tests cover this in debug builds. e.g. editing/deleting/5290534.html

* dom/EventDispatcher.cpp:
(WebCore::EventPath::EventPath):

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

4 years agoAvoid reparsing an XSLT stylesheet after the first failure.
jhoneycutt@apple.com [Wed, 30 Sep 2015 05:54:53 +0000 (05:54 +0000)]
Avoid reparsing an XSLT stylesheet after the first failure.
https://bugs.webkit.org/show_bug.cgi?id=149188
<rdar://problem/22709912>

Reviewed by Dave Hyatt.

Patch by Jiewen Tan, jiewen_tan@apple.com.

Source/WebCore:

Test: svg/custom/invalid-xslt-crash.svg

* xml/XSLStyleSheet.h:
Add a new member variable m_compilationFailed that tracks whether
compilation has failed. Default value is false.

* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::compileStyleSheet):
Return early if the compilation has failed before. After compiling the
style sheet, if we failed, set m_compilationFailed to true.

LayoutTests:

* svg/custom/invalid-xslt-crash-expected.txt: Added.
* svg/custom/invalid-xslt-crash.svg: Added.

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

4 years agoUse modern for-loops in WebCore/loader.
commit-queue@webkit.org [Wed, 30 Sep 2015 05:53:51 +0000 (05:53 +0000)]
Use modern for-loops in WebCore/loader.
https://bugs.webkit.org/show_bug.cgi?id=149397

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-09-29
Reviewed by Darin Adler.

No new tests because there is no behavior change.

* loader/CrossOriginAccessControl.cpp:
(WebCore::parseAccessControlExposeHeadersAllowList):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::~FrameLoader):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
* loader/HistoryController.cpp:
(WebCore::HistoryController::currentFramesMatchItem):
* loader/SubframeLoader.cpp:
(WebCore::findPluginMIMETypeFromURL):
(WebCore::SubframeLoader::createJavaAppletWidget):
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::isURLInOnlineWhitelist):
(WebCore::ApplicationCache::urlMatchesFallbackNamespace):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
(WebCore::ApplicationCacheGroup::postListenerTask):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::stopDeferringEvents):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::StorageIDJournal::~StorageIDJournal):
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::getOriginsWithCache):
* loader/archive/Archive.cpp:
(WebCore::Archive::clearAllSubframeArchivesImpl):
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::addAllResources):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::create):
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::generateMHTMLData):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::switchClientsToRevalidatedResource):
(WebCore::CachedImage::createImage):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::switchClientsToRevalidatedResource):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
(WebCore::CachedResourceLoader::garbageCollectDocumentResources):
(WebCore::CachedResourceLoader::isPreloaded):
(WebCore::CachedResourceLoader::printPreloadStats):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::removeAllIcons):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::iconRecordCountWithData):
(WebCore::IconDatabase::notifyPendingLoadDecisions):
(WebCore::IconDatabase::performURLImport):
(WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
(WebCore::IconDatabase::readFromDatabase):
(WebCore::IconDatabase::writeToDatabase):

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

4 years agosectionRowIndex must return -1 when its parent is not a table, tbody, thead, or tfoot
cdumez@apple.com [Wed, 30 Sep 2015 04:31:18 +0000 (04:31 +0000)]
sectionRowIndex must return -1 when its parent is not a table, tbody, thead, or tfoot
https://bugs.webkit.org/show_bug.cgi?id=148841
<rdar://problem/22586870>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C HTML test now that more checks are passing.

* web-platform-tests/html/semantics/tabular-data/the-tr-element/sectionRowIndex-expected.txt:

Source/WebCore:

Update HTMLTableRowElement.sectionRowIndex to match the specification:
https://html.spec.whatwg.org/multipage/tables.html#dom-tr-sectionrowindex

In particular, it now returns -1 if the parent is not a table, tbody,
thead and tfoot.

No new tests, already covered by existing test.

* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::sectionRowIndex):

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

4 years agoMake WebKit for iOS Simulator build with the public iOS 9 SDK
dbates@webkit.org [Wed, 30 Sep 2015 01:30:22 +0000 (01:30 +0000)]
Make WebKit for iOS Simulator build with the public iOS 9 SDK
https://bugs.webkit.org/show_bug.cgi?id=149652

Reviewed by Simon Fraser.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Add private header pthreadSPI.h. Also move entry for IDBTransaction.h so that it is in sorted order.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Substitute AVPlayerViewControllerDelegate_WebKitOnly for AVPlayerViewControllerDelegate.
* platform/spi/cocoa/AVKitSPI.h: As of iOS 9, AVPlayerViewControllerDelegate is a public protocol. Separate out WebKit-specific SPI into protocol
AVPlayerViewControllerDelegate_WebKitOnly, which extends AVPlayerViewControllerDelegate. Also, the properties -[AVPlayerViewController allowsPictureInPicturePlayback] and -[AVPlayerViewController delegate] are public in iOS 9.
* platform/spi/cocoa/pthreadSPI.h: Added.
* platform/spi/ios/LaunchServicesSPI.h: Add more SPI.
* platform/spi/ios/MediaPlayerSPI.h: Ignore deprecation warnings for UIPopoverController and UIActionSheet.

Source/WebKit2:

* Platform/spi/ios/SafariServicesSPI.h: Add definition for SFSafariViewController.
* Platform/spi/ios/UIKitSPI.h: Add more SPI.
* WebProcess/cocoa/WebProcessCocoa.mm: Include header pthreadSPI.h.

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

4 years agoWebKitTestRunner fails to apply "useFlexibleViewport" when it's specified in a file...
simon.fraser@apple.com [Wed, 30 Sep 2015 01:20:23 +0000 (01:20 +0000)]
WebKitTestRunner fails to apply "useFlexibleViewport" when it's specified in a file comment
https://bugs.webkit.org/show_bug.cgi?id=149650

Reviewed by Tim Horton.

TestInvocation::invoke() consulted shouldMakeViewportFlexible(), but that only
looks at the file path, and not the custom options that come from file comments.

Fix by computing TestOptions before making the TestInvocation, and setting them
as const TestInvocation data. This meant changing various call sites to take
the std::string pathOrURL, rather than the TestInvocation itself.

Also initialize TestInvocation with a WKURLRef, rather than a std::string.

* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::ensureViewSupportsOptionsForTest):
(WTR::testPath):
(WTR::createTestURL):
(WTR::updateTestOptionsFromTestHeader):
(WTR::TestController::testOptionsForTest):
(WTR::TestController::updateWebViewSizeForTest):
(WTR::TestController::updateWindowScaleForTest):
(WTR::TestController::runTest):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::TestInvocation):
(WTR::TestInvocation::invoke):
(WTR::createWKURL): Deleted.
(WTR::TestInvocation::shouldMakeViewportFlexible): Deleted.
(WTR::TestInvocation::shouldUseFixedLayout): Deleted.
* WebKitTestRunner/TestInvocation.h:
(WTR::TestInvocation::options):
* WebKitTestRunner/TestOptions.cpp: Copied from Tools/WebKitTestRunner/TestOptions.h.
(WTR::pathContains):
(WTR::shouldMakeViewportFlexible):
(WTR::shouldUseFixedLayout):
(WTR::isSVGTestPath):
(WTR::isHiDPITestPath):
(WTR::TestOptions::TestOptions):
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::pathContains):
(WTR::shouldUseFixedLayout):
(WTR::TestController::updatePlatformSpecificTestOptionsForTest):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::updatePlatformSpecificTestOptionsForTest):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::updatePlatformSpecificTestOptionsForTest):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::updatePlatformSpecificTestOptionsForTest):

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

4 years agoFlakiness dashboard should support OS X El Capitan
commit-queue@webkit.org [Wed, 30 Sep 2015 00:29:56 +0000 (00:29 +0000)]
Flakiness dashboard should support OS X El Capitan
https://bugs.webkit.org/show_bug.cgi?id=149648

Patch by Aakash Jain <aakash_jain@apple.com> on 2015-09-29
Reviewed by Alexey Proskuryakov.

* QueueStatusServer/app.yaml: We do not need to maintain SVN revision here because of
difference between new appscale and old Google App Engine implementation.
* TestResultServer/app.yaml: Same.
* TestResultServer/static-dashboards/builders.jsonp: Added OSX El Capitan support.

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

4 years agoconfigure-xcode-for-ios-development does not work with Xcode 7
dbates@webkit.org [Wed, 30 Sep 2015 00:21:39 +0000 (00:21 +0000)]
configure-xcode-for-ios-development does not work with Xcode 7
https://bugs.webkit.org/show_bug.cgi?id=149640

Reviewed by Alexey Proskuryakov.

When Xcode 7 is installed, running configure-xcode-for-ios-development dies with an error
because it cannot find the Xcode specification files for iOS simulator and device. These
files have moved to a new location in Xcode 7 distribution. Moreover we must add the
relevant definitions to the Xcode 7 specification files directly as opposed to creating
new specification files with the added definitions (as we did in older versions of Xcode)
in order for Xcode 7 to honor these definitions.

* Scripts/configure-xcode-for-ios-development: Sorted forward declarations.
(updateXcodeSpecificationFilesForSDKIfNeeded): Added.
(updateXcode7SpecificationFile): Added.
(createLegacyXcodeSpecificationFilesForSDKIfNeeded): Formerly named createXcodeSpecificationFilesForSDKIfNeeded.
(writeXcodeSpecification): Moved congratulations line to caller so as to write out the
appropriate success message.
(mergeXcodeSpecificationWithSpecificationAndId): Formerly named createXcodeSpecificationFromSpecificationAndId.
(createXcodeSpecificationFilesForSDKIfNeeded): Deleted.
(createXcodeSpecificationFromSpecificationAndId): Deleted.

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

4 years agoFollowup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
beidson@apple.com [Wed, 30 Sep 2015 00:16:31 +0000 (00:16 +0000)]
Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
https://bugs.webkit.org/show_bug.cgi?id=149651

Rubberstamped by Alex Christensen.

Source/WebCore:

No new tests (No change in behavior).

* platform/CrossThreadTask.h: Now in WebCore, use the WebCore namespace.

Source/WebKit2:

* DatabaseProcess/DatabaseProcess.h: CrossThreadTask is in the WebCore namespace, not WebKit.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.

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

4 years agoMove WebKit2 AsyncTask to WebCore CrossThreadTask.
beidson@apple.com [Tue, 29 Sep 2015 23:28:22 +0000 (23:28 +0000)]
Move WebKit2 AsyncTask to WebCore CrossThreadTask.
https://bugs.webkit.org/show_bug.cgi?id=149651

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No change in behavior).

It will be needed in WebCore to support IndexedDB.

* WebCore.xcodeproj/project.pbxproj:
* platform/CrossThreadTask.h: Renamed from Source/WebKit2/Shared/AsyncTask.h.
(WebKit::CrossThreadTask::CrossThreadTask):
(WebKit::CrossThreadTask::performTask):
(WebKit::createCrossThreadTask):

Source/WebKit2:

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists):
(WebKit::DatabaseProcess::postDatabaseTask):
(WebKit::DatabaseProcess::performNextDatabaseTask):
(WebKit::DatabaseProcess::fetchWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::shutdown):
(WebKit::UniqueIDBDatabase::shutdownBackingStore):
(WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
(WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata):
(WebKit::UniqueIDBDatabase::openTransaction):
(WebKit::UniqueIDBDatabase::beginTransaction):
(WebKit::UniqueIDBDatabase::commitTransaction):
(WebKit::UniqueIDBDatabase::resetTransaction):
(WebKit::UniqueIDBDatabase::rollbackTransaction):
(WebKit::UniqueIDBDatabase::postTransactionOperation):
(WebKit::UniqueIDBDatabase::changeDatabaseVersion):
(WebKit::UniqueIDBDatabase::createObjectStore):
(WebKit::UniqueIDBDatabase::deleteObjectStore):
(WebKit::UniqueIDBDatabase::clearObjectStore):
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::putRecord):
(WebKit::UniqueIDBDatabase::getRecord):
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance):
(WebKit::UniqueIDBDatabase::cursorIterate):
(WebKit::UniqueIDBDatabase::count):
(WebKit::UniqueIDBDatabase::deleteRange):
(WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore):
(WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::createIndexInBackingStore):
(WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
(WebKit::UniqueIDBDatabase::putRecordInBackingStore):
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
(WebKit::UniqueIDBDatabase::openCursorInBackingStore):
(WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
(WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
(WebKit::UniqueIDBDatabase::countInBackingStore):
(WebKit::UniqueIDBDatabase::deleteRangeInBackingStore):
(WebKit::UniqueIDBDatabase::postMainThreadTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTask):
(WebKit::UniqueIDBDatabase::postDatabaseTask):
(WebKit::UniqueIDBDatabase::performNextDatabaseTask):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoSnap offsets should update when style is programmatically changed
wenson_hsieh@apple.com [Tue, 29 Sep 2015 22:56:20 +0000 (22:56 +0000)]
Snap offsets should update when style is programmatically changed
https://bugs.webkit.org/show_bug.cgi?id=135964
<rdar://problem/18162411>

Reviewed by Darin Adler.

Source/WebCore:

Tests:  css3/scroll-snap/scroll-snap-style-changed-coordinates.html
        css3/scroll-snap/scroll-snap-style-changed-repeat.html

Updating scroll snap style properties now programmatically updates the scroll snap container. Does not yet
handle the case of reparented elements with scroll snap coordinates. Adds some plumbing the FrameView and
RenderLayerCompositor to immediately update the scrolling coordinator when updating the FrameView due to
style changes.

* page/FrameView.cpp:
(WebCore::FrameView::updateScrollingCoordinatorScrollSnapProperties): Calls on the compositor to reupdate scroll snap
    properties on the FrameView.
* page/FrameView.h:
* page/scrolling/AsyncScrollingCoordinator.cpp: Sets snap offsets to an empty vector when appropriate.
(WebCore::setStateScrollingNodeSnapOffsetsAsFloat): Ditto.
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Ditto.
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Ditto.
(WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView): Updates scroll snap properties
    from a given FrameView.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollSnapPropertiesWithFrameView): Updates the scrolling coordinator's
    scroll snap properties.
* rendering/RenderLayerCompositor.h: Plumb scroll snap property updating to the FrameView.
* rendering/RenderLayerModelObject.cpp: Checks for style changes and updates snap offsets when appropriate.
(WebCore::scrollSnapContainerRequiresUpdateForStyleUpdate): Ditto.
(WebCore::RenderLayerModelObject::styleDidChange): Ditto.

LayoutTests:

Tests style updates in both cases where -points and -coordinates are used to position snap points.

* css3/scroll-snap/scroll-snap-style-changed-coordinates-expected.txt: Added.
* css3/scroll-snap/scroll-snap-style-changed-coordinates.html: Added.
* css3/scroll-snap/scroll-snap-style-changed-repeat-expected.txt: Added.
* css3/scroll-snap/scroll-snap-style-changed-repeat.html: Added.

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

4 years agoUnreviewed, rolling out r190289.
commit-queue@webkit.org [Tue, 29 Sep 2015 21:25:11 +0000 (21:25 +0000)]
Unreviewed, rolling out r190289.
https://bugs.webkit.org/show_bug.cgi?id=149647

Crashing speedometer and some ARM32 tests (Requested by
msaboff on #webkit).

Reverted changeset:

"[ES6] Implement tail calls in the FTL"
https://bugs.webkit.org/show_bug.cgi?id=148664
http://trac.webkit.org/changeset/190289

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

4 years ago[Win] Allow 'prepare-ChangeLog' to be used without Cygwin
bfulgham@apple.com [Tue, 29 Sep 2015 21:16:41 +0000 (21:16 +0000)]
[Win] Allow 'prepare-ChangeLog' to be used without Cygwin
https://bugs.webkit.org/show_bug.cgi?id=149639

Reviewed by Alex Christensen.

* Scripts/VCSUtils.pm:
(exitStatus): Use 'isWindows()' method.
(isSVNVersion16OrNewer): 'eval' is not needed here, and just causes
an error. This method could probably just go away.
(normalizePath): Leave Windows (or Unix) paths as platform paths, rather than
always changing to Unix style.
(unixPath): Added. Needed so Windows can always show a Unix path in the
ChangeLog file.
(changeLogName): Work around the fact that 'getpwuid' is not available on
a pure Windows build of Perl.
* Scripts/prepare-ChangeLog:
(generateFunctionLists): Normalize path received from 'svn' in case it's a Unix
path on Windows.
(svnUpdateCommand): Added helper function. Needed because Windows Perl does not
support using arrays for 'open' arguments.
(resolveChangeLogsPath): Ditto.
(resolveConflictedChangeLogs): Use new helper functions.
(generateNewChangeLogs): Force Windows to use Unix paths in ChangeLog output.
(diffCommand): Use double-quotes for paths, since Windows doesn't understand single
quotes. Unix systems are happy either way.
(statusCommand): Ditto.
* Scripts/webkitdirs.pm:
(launcherName): Drive-by fix. WinLauncher was renamed to MiniBrowser some time ago.

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

4 years agoREGRESSION: WebAudio user-gesture restriction is no longer lifted by touchstart event
jer.noble@apple.com [Tue, 29 Sep 2015 21:03:54 +0000 (21:03 +0000)]
REGRESSION: WebAudio user-gesture restriction is no longer lifted by touchstart event
https://bugs.webkit.org/show_bug.cgi?id=149367

Reviewed by Eric Carlson.

Use processingUserGestureForMedia() rather than processingUserGesture(),
as the former includes touchstart and the latter does not.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::willBeginPlayback):
(WebCore::AudioContext::willPausePlayback):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted):
(WebCore::MediaElementSession::dataLoadingPermitted):
(WebCore::MediaElementSession::fullscreenPermitted):
(WebCore::MediaElementSession::showPlaybackTargetPicker):

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

4 years ago[Win] Rebaseline test.
bfulgham@apple.com [Tue, 29 Sep 2015 21:01:40 +0000 (21:01 +0000)]
[Win] Rebaseline test.

Rubberstamped by Tim Horton.

* platform/win/TestExpectations: Remove test failure.
* platform/win/fast/text/mark-matches-overflow-clip-expected.txt: Added.

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

4 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Tue, 29 Sep 2015 20:56:31 +0000 (20:56 +0000)]
[Win] Unreviewed gardening.

* platform/win/TestExpectations: Mark new test added in
r190254 as failing.

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

4 years agoParallelHelperPool::runFunctionInParallel() shouldn't allocate, and ParallelHelperPoo...
fpizlo@apple.com [Tue, 29 Sep 2015 20:25:42 +0000 (20:25 +0000)]
ParallelHelperPool::runFunctionInParallel() shouldn't allocate, and ParallelHelperPool.h shouldn't be included everywhere
https://bugs.webkit.org/show_bug.cgi?id=149635

Reviewed by Saam Barati.

Source/JavaScriptCore:

It bugged me that this change caused a whole-world recompile. So, I changed the code so
that ParallelHelperPool.h is only included by Heap.cpp and not by Heap.h.

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::markRoots):
(JSC::Heap::copyBackingStores):
* heap/Heap.h:

Source/WTF:

* wtf/ParallelHelperPool.h:
(WTF::ParallelHelperClient::runFunctionInParallel): Stack-allocate the task instead of heap-allocating it.

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

4 years agoUpdate style/layout when a slot is added or removed
rniwa@webkit.org [Tue, 29 Sep 2015 20:22:18 +0000 (20:22 +0000)]
Update style/layout when a slot is added or removed
https://bugs.webkit.org/show_bug.cgi?id=149593

Reviewed by Antti Koivisto.

Source/WebCore:

Fixed the bug by forcing the render tree reconstruction on the shadow host when a slot is inserted or removed.
We should optimize these reconstructions by only triggering them on the affected slot elements in the future.

Also fixed a bug that we were not invalidating the slot assignments when a default slot is introduced dynamically
after the slot assignment algorithm had run.

Test (existing): fast/shadow-dom/shadow-layout-after-slot-changes.html

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::addSlotElementByName): Passes in ShadowRoot.
(WebCore::ShadowRoot::removeSlotElementByName): Ditto.
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::addSlotElementByName): Call setNeedsStyleRecalc.
(WebCore::SlotAssignment::removeSlotElementByName): Call setNeedsStyleRecalc if the host is still alive since this
function can be called while the host is being destructed in which case shadowRoot.host() would be nullptr.
* dom/SlotAssignment.h:

LayoutTests:

Removed failing test expectations from fast/shadow-dom/shadow-layout-after-slot-changes.html

Also added an explicit test case for when a default slot is introduced dynamically after
calling getDistributedNodes() once, thereby forcing the slot assignments.

* fast/shadow-dom/HTMLSlotElement-interface-expected.txt:
* fast/shadow-dom/HTMLSlotElement-interface.html:
* fast/shadow-dom/shadow-layout-after-slot-changes.html:
* platform/mac/TestExpectations:

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

4 years agoUpdate test expectations to mark quicklook/pages.html as crashing
commit-queue@webkit.org [Tue, 29 Sep 2015 19:20:36 +0000 (19:20 +0000)]
Update test expectations to mark quicklook/pages.html as crashing
<https://bugs.webkit.org/show_bug.cgi?id=149634>

Patch by Ryan Haddad <ryanhaddad@apple.com> on 2015-09-29
Reviewed by David Kilzer.

* platform/ios-simulator/TestExpectations:

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

4 years ago[GTK][CMake] Warning about CMP0058
mcatanzaro@igalia.com [Tue, 29 Sep 2015 19:18:26 +0000 (19:18 +0000)]
[GTK][CMake] Warning about CMP0058
https://bugs.webkit.org/show_bug.cgi?id=149627

Reviewed by Martin Robinson.

Opt-in to the new behavior for CMP0058.

* CMakeLists.txt:

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

4 years agoMemory cache revalidations should refresh the network disk cache
cdumez@apple.com [Tue, 29 Sep 2015 19:04:18 +0000 (19:04 +0000)]
Memory cache revalidations should refresh the network disk cache
https://bugs.webkit.org/show_bug.cgi?id=149606

Reviewed by Darin Adler.

Source/WebKit2:

Previously, resource revalidations triggered by the memory cache would
bypass the disk cache entirely because the requests are conditional. As
a result, when the server responds with a 304, we were unable to update
the headers (e.g. new expiration date) of the corresponding entry in
the disk cache.

This patch updates our disk cache implementation to not bypass the disk
cache when the request is conditional. Instead, we look up the cached
entry and force its revalidation from the network. If the server then
returns a 304, we are now able to update the headers of this cached
entry. In such case though, we let the 304 response through to WebCore
unlike revalidations triggered by the disk cache.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeUseDecision):
(WebKit::NetworkCache::makeRetrieveDecision):

LayoutTests:

Add layout test to check that revalidations requested by the memory cache
update the corresponding disk cache entry when the server responds with a
304 status code.

* http/tests/cache/disk-cache/memory-cache-revalidation-updates-disk-cache-expected.txt: Added.
* http/tests/cache/disk-cache/memory-cache-revalidation-updates-disk-cache.html: Added.

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

4 years agoUnreviewed, mark several newly imported W3C media tests as flaky on Mavericks.
cdumez@apple.com [Tue, 29 Sep 2015 18:35:38 +0000 (18:35 +0000)]
Unreviewed, mark several newly imported W3C media tests as flaky on Mavericks.
https://bugs.webkit.org/show_bug.cgi?id=149636

* platform/mac/TestExpectations:

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

4 years ago[Win] Revise failure case per Alexey's comments.
bfulgham@apple.com [Tue, 29 Sep 2015 18:32:00 +0000 (18:32 +0000)]
[Win] Revise failure case per Alexey's comments.

* platform/win/TestExpectations:

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

4 years ago[Streams API] Add abstract ops tests
calvaris@igalia.com [Tue, 29 Sep 2015 18:24:06 +0000 (18:24 +0000)]
[Streams API] Add abstract ops tests
https://bugs.webkit.org/show_bug.cgi?id=149629

Reviewed by Darin Adler.

* streams/reference-implementation/abstract-ops-expected.txt: Added.
* streams/reference-implementation/abstract-ops.html: Added.

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

4 years ago[Streams API] Update tests according to latest spec
calvaris@igalia.com [Tue, 29 Sep 2015 18:08:05 +0000 (18:08 +0000)]
[Streams API] Update tests according to latest spec
https://bugs.webkit.org/show_bug.cgi?id=149628

Reviewed by Darin Adler.

Added checkpoints and updated all tests that don't disrupt the current implementation and the tests that are
passing now.

* streams/reference-implementation/bad-strategies-expected.txt:
* streams/reference-implementation/bad-strategies.html:
* streams/reference-implementation/pipe-to-options.html:
* streams/reference-implementation/pipe-to.html:
* streams/reference-implementation/writable-stream-abort.html:
* streams/reference-implementation/writable-stream.html:

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

4 years ago[Win] Test gardening
bfulgham@apple.com [Tue, 29 Sep 2015 17:53:08 +0000 (17:53 +0000)]
[Win] Test gardening

* platform/win/TestExpectations: Mark some expected failures.

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

4 years agoImprove binding of JSBuiltinConstructor classes
youenn.fablet@crf.canon.fr [Tue, 29 Sep 2015 17:49:28 +0000 (17:49 +0000)]
Improve binding of JSBuiltinConstructor classes
https://bugs.webkit.org/show_bug.cgi?id=149556

Reviewed by Darin Adler.

JSBuiltinConstructor classes no longer need definition of a DOM class.
These classes no longer go through the JS wrapper cache.
Removed code related to DOM class handling (m_impl, releaseImpl, WrapperOwner, toJS, ...)
Updated creation code.

Refactoring of the binding generator code to simplify whether generating or not some methods.

Removed unneeded include of DOM class in JSXX.cpp (already done in JSXX.h)

Added new binding test to cover JSBuiltinConstructor keyword.

Covered by binding tests.

* bindings/js/JSDOMBinding.h:
(WebCore::createJSBuiltin):
(WebCore::DOMConstructorObject::createStructure):.
* bindings/scripts/CodeGeneratorJS.pm:
(NeedsImplementationClass):
(ShouldGenerateToWrapped):
(ShouldGenerateWrapperOwnerCode):
(ShouldGenerateToJSDeclaration):
(ShouldGenerateToJSImplementation):
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDefinition):
(ComputeFunctionSpecial):.
(UseJSBuiltins):.
* bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp: Added.
(WebKit::kit):
(WebKit::core):
(WebKit::wrapTestJSBuiltinConstructor):
(webkit_dom_test_js_builtin_constructor_finalize):
(webkit_dom_test_js_builtin_constructor_constructor):
(webkit_dom_test_js_builtin_constructor_class_init):
(webkit_dom_test_js_builtin_constructor_init):
* bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructorPrivate.h: Added.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Added.
(WebCore::JSTestJSBuiltinConstructorPrototype::create):
(WebCore::JSTestJSBuiltinConstructorPrototype::createStructure):
(WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
(WebCore::JSTestJSBuiltinConstructorConstructor::create):
(WebCore::JSTestJSBuiltinConstructorConstructor::createStructure):
(WebCore::JSTestJSBuiltinConstructorConstructor::constructJSTestJSBuiltinConstructor):
(WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor):
(WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
(WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
(WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
(WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
(WebCore::JSTestJSBuiltinConstructor::createPrototype):
(WebCore::JSTestJSBuiltinConstructor::getPrototype):
(WebCore::JSTestJSBuiltinConstructor::destroy):
(WebCore::JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor):
(WebCore::jsTestJSBuiltinConstructorConstructor):
(WebCore::JSTestJSBuiltinConstructor::getConstructor):
(WebCore::JSTestJSBuiltinConstructor::visitChildren):
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: Added.
(WebCore::JSTestJSBuiltinConstructor::create):
(WebCore::JSTestJSBuiltinConstructor::createStructure):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:
* bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h: Added.
* bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm: Added.
(-[DOMTestJSBuiltinConstructor dealloc]):
(-[DOMTestJSBuiltinConstructor finalize]):
(core):
(kit):
* bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructorInternal.h: Added.
* bindings/scripts/test/TestJSBuiltinConstructor.idl: Added.

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

4 years ago[Win] [Font Features] Implement font-variant-*
bfulgham@apple.com [Tue, 29 Sep 2015 17:41:33 +0000 (17:41 +0000)]
[Win] [Font Features] Implement font-variant-*
https://bugs.webkit.org/show_bug.cgi?id=149630

Unreviewed gardening.

* platform/win/TestExpectations: Mark expected failures due
to missing Windows feature.

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

4 years ago[Streams API] [Win] Remove reference to dead CountQueuingStrategy.h
calvaris@igalia.com [Tue, 29 Sep 2015 17:24:36 +0000 (17:24 +0000)]
[Streams API] [Win] Remove reference to dead CountQueuingStrategy.h
https://bugs.webkit.org/show_bug.cgi?id=149623

Reviewed by Darin Adler.

No new tests needed.

* WebCore.vcxproj/WebCore.vcxproj.filters:

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

4 years ago[Win] Unreviewed 64-bit build fix after switch to CMake.
bfulgham@apple.com [Tue, 29 Sep 2015 17:10:30 +0000 (17:10 +0000)]
[Win] Unreviewed 64-bit build fix after switch to CMake.

* Scripts/webkitdirs.pm:
(determineIsWin64FromArchitecture): Added.

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

4 years agoGC copy phase spans too many files
fpizlo@apple.com [Tue, 29 Sep 2015 16:39:24 +0000 (16:39 +0000)]
GC copy phase spans too many files
https://bugs.webkit.org/show_bug.cgi?id=149586

Reviewed by Andreas Kling.

Source/JavaScriptCore:

This puts the core logic of the copy phase into Heap::copyBackingStores(). Now, instead of
using many helpers in many places, the actual algorithm is all in one place.

This lets me do a lot of simplification.

- CopyVisitor no longer requires that you call startCopying() before, and doneCopying() and
  WTF::releaseFastMallocFreeMemoryForThisThread() after. The constructor and destructor now
  do this for you.

- CopyVisitor no longer contains the algorithm that drives copying. That's all in
  Heap::copyBackingStores() now. Basically, copyBackingStores() glues together the new
  WTF::ParallelVectorIterator with the copying algorithm that we used to have in
  CopyVisitor::copyFromShared().

- Lots of stuff that was in headers is now in .cpp files. That includes all non-hot-path
  code in CopyVisitor. Also, the code for copying in HeapInlines.h is now in
  ParallelVectorVisotor, and it's only included by Heap.cpp.

Overall, I like this direction for the GC. I don't think it's useful for Heap.cpp to have
calls to algorithms in some other file, unless those algorithms are either reusable or just
very dense. That's not actually true for the copy phase, and it's probably not true for
some other stuff like marking. I'll probably do the same refactoring for marking in another
bug.

This should have no effect on performance.

* heap/CopyVisitor.cpp:
(JSC::CopyVisitor::CopyVisitor):
(JSC::CopyVisitor::~CopyVisitor):
(JSC::CopyVisitor::copyFromShared): Deleted.
* heap/CopyVisitor.h:
* heap/CopyVisitorInlines.h:
(JSC::CopyVisitor::checkIfShouldCopy):
(JSC::CopyVisitor::allocateNewSpaceSlow):
(JSC::CopyVisitor::didCopy):
(JSC::CopyVisitor::visitItem): Deleted.
(JSC::CopyVisitor::startCopying): Deleted.
(JSC::CopyVisitor::doneCopying): Deleted.
* heap/Heap.cpp:
(JSC::Heap::copyBackingStores):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::unregisterWeakGCMap):
(JSC::Heap::getNextBlocksToCopy): Deleted.

Source/WTF:

Extract the load balancing algorithm used by the GC's copy phase into a reusable template.
The GC copy phase now uses this.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/ParallelVectorIterator.h: Added.
(WTF::ParallelVectorIterator::ParallelVectorIterator):
(WTF::ParallelVectorIterator::iterate):

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

4 years agoBuild WebCore JS Builtins according the ENABLE flags
youenn.fablet@crf.canon.fr [Tue, 29 Sep 2015 14:05:14 +0000 (14:05 +0000)]
Build WebCore JS Builtins according the ENABLE flags
https://bugs.webkit.org/show_bug.cgi?id=149624

Reviewed by Csaba Osztrogonác.

Created WebCoreJSBuiltins.cpp to include all JSXXBuiltins.cpp files with the right #ifdef.
Added WebCoreJSBuiltins.cpp to CMake, win and mac build systems.

No change in behavior.

* CMakeLists.txt:
* DerivedSources.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreJSBuiltins.cpp: Added.

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

4 years ago[CSS Grid Layout] Flex tracks sizing alg must handle 0fr values
jfernandez@igalia.com [Tue, 29 Sep 2015 12:32:48 +0000 (12:32 +0000)]
[CSS Grid Layout] Flex tracks sizing alg must handle 0fr values
https://bugs.webkit.org/show_bug.cgi?id=148944

Reviewed by Darin Adler.

Source/WebCore:

We don't allow 0 as flexible size value, which is not following current
specs; it just states that it must be a positive value. This patch
adds such change in the parser but some additional logic must be added
as well to handle 0 values during the flex tracks sizing algorithm.

The old algorithm didn't take 0 values into account, so there is the risk
of division by zero. Additionally, it was not handling fraction values
in the best way. The last versions of the spec changed this algorithm in
order to handle fraction values so that they don't cause exponential
grow of tracks using values bigger than 1.

This patch implements also such new algorithm, so we can deal not only
with 0 values, but managing fraction values properly.

No new tests, just some additional test cases and some of them rebaselined.

* rendering/RenderGrid.cpp:
(WebCore::normalizedFlexFraction):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::computeFlexFactorUnitSize): Added.
(WebCore::RenderGrid::findFlexFactorUnitSize): Added.
(WebCore::RenderGrid::GridTrackForNormalization): Deleted.
(WebCore::RenderGrid::computeNormalizedFractionBreadth): Deleted.
* rendering/RenderGrid.h:

LayoutTests:

Allow 0 as flex factor value and implement the new flex track sizing algorithm.

* fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html: Updated some cases.
* fast/css-grid-layout/flex-content-resolution-columns-expected.txt:
* fast/css-grid-layout/flex-content-resolution-columns.html: Added some new cases.
* fast/css-grid-layout/flex-content-resolution-rows-expected.txt:
* fast/css-grid-layout/flex-content-resolution-rows.html: Added some new cases.

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

4 years agoFix the broken !ENABLE(STREAM_API) build
ossy@webkit.org [Tue, 29 Sep 2015 10:23:12 +0000 (10:23 +0000)]
Fix the broken !ENABLE(STREAM_API) build
https://bugs.webkit.org/show_bug.cgi?id=149525

Reviewed by Darin Adler.

* bindings/js/WebCoreJSClientData.h: Revert r190225.

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

4 years agoprinting does not use minimum page zoom factor
carlosgc@webkit.org [Tue, 29 Sep 2015 08:38:42 +0000 (08:38 +0000)]
printing does not use minimum page zoom factor
https://bugs.webkit.org/show_bug.cgi?id=108507

Reviewed by Darin Adler.

Source/WebCore:

* page/PrintContext.cpp:
(WebCore::PrintContext::beginAndComputePageRectsWithPageSize):
Helper function to share common code from numberOfPages() and
spoolAllPagesWithBoundaries().
(WebCore::PrintContext::numberOfPages): Use beginAndComputePageRectsWithPageSize().
(WebCore::PrintContext::spoolAllPagesWithBoundaries): Use
beginAndComputePageRectsWithPageSize() and don't flip the Y axis
for non Cocoa platforms.
* page/PrintContext.h:

Source/WebKit/mac:

Pass a the frame as a reference instead of using pointers.

* Misc/WebCoreStatistics.mm:
(-[WebFrame numberOfPagesWithPageWidth:pageHeight:]):
(-[WebFrame printToCGContext:pageWidth:pageHeight:]):

Source/WebKit2:

Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
should be generated in printing mode.

* Shared/API/c/WKImage.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toSnapshotOptions):
* Shared/ImageOptions.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::numberOfPages): Pass the frame as a
reference instead of a pointer.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
calculate the bitmap height based on the number of pages.
(WebKit::WebPage::snapshotAtSize): In case of printing, use
PrintContext::spoolAllPagesWithBoundaries() and return.

Tools:

WebKitTestRunner always takes the snapshots from the UI process
(expect for IOS), so in the case of printing, the layout in the
web view is not the expected one. When printing, we need to take
the snapshot in the web process and ensure it's rendered with a
PrintContext.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump): When dumping pixels, pass
kWKSnapshotOptionsPrinting option to
WKBundlePageCreateSnapshotWithOptions() when printing.

LayoutTests:

Unskip printing reftests that should pass now.

* platform/gtk/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

4 years agoAdd support for WebIDL JSBuiltin attributes
youenn.fablet@crf.canon.fr [Tue, 29 Sep 2015 08:01:09 +0000 (08:01 +0000)]
Add support for WebIDL JSBuiltin attributes
https://bugs.webkit.org/show_bug.cgi?id=149554

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/Lookup.cpp:
(JSC::reifyStaticAccessor): Adding support for creating attribute getter from JS builtin functions.
* runtime/Lookup.h:
(JSC::HashTableValue::builtinAccessorGetterGenerator):
(JSC::HashTableValue::builtinAccessorSetterGenerator):
(JSC::reifyStaticProperties): Ensuring that builtin attributes are not treated as Builtin functions.

Source/WebCore:

Covered by bindings tests.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipAttribute): Disabled GObject binding generation of JSBuiltin attribute.
* bindings/scripts/CodeGeneratorJS.pm:
(GetAttributeGetterName): Handling of Builtin function to retrieve BuiltinGenerator.
(GetAttributeSetterName): Ditto.
(GenerateAttributesHashTable): Set JSBuiltin attributes as "Accessor | Builtin".
(GenerateImplementation): Skip implementation for JSBuiltin attributes
* bindings/scripts/test/JS/JSTestObj.cpp: Adding binding test for JSBuiltin attributes.
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj jsBuiltinAttribute]):
(-[DOMTestObj setJsBuiltinAttribute:]):
(-[DOMTestObj jsBuiltinReadOnlyAttribute]):
* bindings/scripts/test/TestObj.idl: Ditto.

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

4 years ago[WTR] Pixel tests generate the snapshots twice in Web and UI processes
carlosgc@webkit.org [Tue, 29 Sep 2015 06:51:22 +0000 (06:51 +0000)]
[WTR] Pixel tests generate the snapshots twice in Web and UI processes
https://bugs.webkit.org/show_bug.cgi?id=149595

Reviewed by Tim Horton.

All ports except IOS implement
PlatformWebView::windowSnapshotImage() to generate the snapshot
for the pixel tests in the UI process. But we are still generating
a snapshot for pixel tests in the Web process too, that is passed
to the UI process but ignored.
Whether a pixel result is needed or not, is only known by the web
process depending on whether the test called dumpAsText with
dumpPixels == true or not. Since the pixels are now dump in the UI
process, we need to pass that information to the UI process when
the test is done. For that we set a PixelResultIsPending bool
parameter to the Done message, and we only add the PixelResult
when UI process doesn't need to generate the pixels dump.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage): Set
m_pixelResultIsPending to false on reset.
(WTR::InjectedBundle::done): Add PixelResultIsPending parameter to the
Done message, and set the PixelResult if m_pixelResultIsPending is false.
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(WTR::InjectedBundle::setPixelResult): Set m_pixelResultIsPending to false.
(WTR::InjectedBundle::setNeedsPixelResult): Set m_pixelResultIsPending.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump): Only create a snapshot for IOS
port.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults): Use either the pixel result
from the web process or generate a pixel result from the web view
if need it.
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.h: Add SnapshotResultType enum
parameter to dumpPixelsAndCompareWithExpected, since the snapshot
is created by the caller now, but the CG implementation needs to
know if it's a Web or UI process snapshot.
* WebKitTestRunner/cairo/TestInvocationCairo.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Create a
cairo surface for the given image.
* WebKitTestRunner/cg/TestInvocationCG.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Create a
CGContext for the given image.

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

4 years agoFix JS errors on dashboard metrics page
commit-queue@webkit.org [Tue, 29 Sep 2015 04:31:16 +0000 (04:31 +0000)]
Fix JS errors on dashboard metrics page
https://bugs.webkit.org/show_bug.cgi?id=149608

Patch by Dean Johnson <dean_johnson@apple.com> on 2015-09-28
Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js: Updated to use Settings.
(initPlatformsByFamily):
(updateHiddenPlatforms):
(parsePlatformFamily): Deleted.
(updateToggleButtons): Deleted.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js:
(updateHiddenPlatforms): Added to remove errors.
(initPlatformsByFamily): Added to remove errors.
(unhiddenQueues): Updated to use Settings.
(documentReady): Added logic to add toggle buttons to the settings menu.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Settings.js:
(Settings.prototype.parsePlatformFamily): Moved duplicate logic from Main.js and
MetricsMain.js to Settings.
(Settings.prototype.updateToggleButtons): Moved duplicate logic from Main.js and
MetricsMain.js to Settings.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/QueueView.js:
(QueueView.prototype._updateHiddenState): Updated to use Settings.

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

4 years agoRemove unused parseMemoryAmount
commit-queue@webkit.org [Tue, 29 Sep 2015 02:38:00 +0000 (02:38 +0000)]
Remove unused parseMemoryAmount
https://bugs.webkit.org/show_bug.cgi?id=149611

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-28
Reviewed by Mark Lam.

* heap/HeapStatistics.cpp:
(JSC::HeapStatistics::parseMemoryAmount): Deleted.
* heap/HeapStatistics.h:

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

4 years agoWeb Inspector: JSGlobalRuntimeAgent unintentionally overrides InspectorRuntimeAgent...
commit-queue@webkit.org [Tue, 29 Sep 2015 01:55:31 +0000 (01:55 +0000)]
Web Inspector: JSGlobalRuntimeAgent unintentionally overrides InspectorRuntimeAgent destruction handling
https://bugs.webkit.org/show_bug.cgi?id=149537

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-28
Reviewed by Darin Adler.

* inspector/agents/JSGlobalObjectRuntimeAgent.h:
* inspector/agents/JSGlobalObjectRuntimeAgent.cpp:
(Inspector::JSGlobalObjectRuntimeAgent::willDestroyFrontendAndBackend): Deleted.
Do not override method, super class implementation is sufficient.

* JavaScriptCore.xcodeproj/project.pbxproj:
Fix file ordering.

* inspector/agents/InspectorDebuggerAgent.h:
Remove unused member variable.

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

4 years agoAppscale query fails because of missing index
commit-queue@webkit.org [Tue, 29 Sep 2015 01:08:50 +0000 (01:08 +0000)]
Appscale query fails because of missing index
https://bugs.webkit.org/show_bug.cgi?id=149609

Patch by Aakash Jain <aakash_jain@apple.com> on 2015-09-28
Reviewed by Darin Adler.

* QueueStatusServer/index.yaml: Added the required index.

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

4 years ago[Win] Fix the 64-bit build after switch to cmake.
bfulgham@apple.com [Tue, 29 Sep 2015 00:39:22 +0000 (00:39 +0000)]
[Win] Fix the 64-bit build after switch to cmake.

Reviewed by Alex Christensen.

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject): Use correct arguments for cmake to
run a 64-bit build.

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

4 years ago[Win] Fix build after r190295.
bfulgham@apple.com [Tue, 29 Sep 2015 00:06:04 +0000 (00:06 +0000)]
[Win] Fix build after r190295.

* PlatformWin.cmake: Add missing Forwarding Header.

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

4 years agofast/repaint/absolute-position-changed.html and fast/repaint/fixed.html are flaky.
zalan@apple.com [Mon, 28 Sep 2015 23:58:50 +0000 (23:58 +0000)]
fast/repaint/absolute-position-changed.html and fast/repaint/fixed.html are flaky.

Move .scrollTo() call to repaintTest() where we run the test code. (and add .offsetHeight call
to ensure that renderer tree is in clean state.)

Unreviewed gardening.

* fast/repaint/absolute-position-changed.html:
* fast/repaint/fixed.html:

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

4 years agoFollow up to bug: https://bugs.webkit.org/show_bug.cgi?id=149599
sbarati@apple.com [Mon, 28 Sep 2015 23:45:48 +0000 (23:45 +0000)]
Follow up to bug: https://bugs.webkit.org/show_bug.cgi?id=149599

We're now skipping getter-richards-try-catch on debug builds.

Unreviewed: skip long running test on debug builds.

* js/regress/script-tests/getter-richards-try-catch.js:
* platform/mac/TestExpectations:

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

4 years agoAdd an IDB Server that can roundtrip a request back to the client.
beidson@apple.com [Mon, 28 Sep 2015 23:41:15 +0000 (23:41 +0000)]
Add an IDB Server that can roundtrip a request back to the client.
https://bugs.webkit.org/show_bug.cgi?id=149603

Reviewed by NOBODY (Build fix).

* Modules/indexeddb/IDBRequest.h: Remove unneeded #include, fixing the WK/WK2 builds.

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

4 years agoFollow up to bug: https://bugs.webkit.org/show_bug.cgi?id=149599
sbarati@apple.com [Mon, 28 Sep 2015 23:05:20 +0000 (23:05 +0000)]
Follow up to bug: https://bugs.webkit.org/show_bug.cgi?id=149599

This patch makes the test run for even less time.

Unreviewed attempted fix for flakiness.

* js/regress/script-tests/getter-richards-try-catch.js:
(Packet.prototype.toString):

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

4 years ago[Win] Unreviewed build fix for internal systems.
bfulgham@apple.com [Mon, 28 Sep 2015 22:55:31 +0000 (22:55 +0000)]
[Win] Unreviewed build fix for internal systems.

* Source/cmake/OptionsWin.cmake: Preferentially use the build target
location for include and link libraries, rather than the system locations.

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

4 years agoExpose 'geometryFlipped' state for debugging/logging purposes
bfulgham@apple.com [Mon, 28 Sep 2015 22:47:41 +0000 (22:47 +0000)]
Expose 'geometryFlipped' state for debugging/logging purposes
https://bugs.webkit.org/show_bug.cgi?id=149557

Reviewed by Simon Fraser.

Source/WebCore:

No new tests: No new behavior.

* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::geometryFlipped): Added.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::geometryFlipped): Added.
(printLayer): Log flipped state of geometry.
* platform/graphics/ca/win/PlatformCALayerWin.h:

Source/WebKit2:

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::geometryFlipped): Added.
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:

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

4 years agoAdd an IDB Server that can roundtrip a request back to the client.
beidson@apple.com [Mon, 28 Sep 2015 22:44:42 +0000 (22:44 +0000)]
Add an IDB Server that can roundtrip a request back to the client.
https://bugs.webkit.org/show_bug.cgi?id=149603

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/deletedatabase-request-event.html

This is a critical piece of IDB infrastructure that:
- Puts a database client/server divide in place.
- Client synchronously sends requests to the server, and asynchronously receives a response back from it.
- Introduces a class structure that makes it easy for WebKit2 to add a thin layer to replace the
  in-process server with an out-of-process server.

To allow for the most basic of tests, the "delete database" request is hard coded as always failing
with an indeterminate error.

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):

* Modules/indexeddb/IDBDatabaseIdentifier.cpp:
(WebCore::IDBDatabaseIdentifier::debugString):
* Modules/indexeddb/IDBDatabaseIdentifier.h:

* Modules/indexeddb/client/IDBConnectionToServer.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
(WebCore::IDBClient::IDBConnectionToServer::create):
(WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer):
(WebCore::IDBClient::IDBConnectionToServer::identifier):
(WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
(WebCore::IDBClient::IDBConnectionToServer::didDeleteDatabase):

* Modules/indexeddb/client/IDBConnectionToServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
(WebCore::IDBClient::IDBConnectionToServerDelegate::~IDBConnectionToServerDelegate):

* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::create):
(WebCore::IDBClient::IDBFactory::IDBFactory):
(WebCore::IDBClient::IDBFactory::openInternal):
(WebCore::IDBClient::IDBFactory::deleteDatabase):
* Modules/indexeddb/client/IDBFactoryImpl.h:

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
(WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
(WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
(WebCore::IDBClient::IDBOpenDBRequest::~IDBOpenDBRequest):
(WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
(WebCore::IDBClient::IDBOpenDBRequest::databaseIdentifier):
(WebCore::IDBClient::IDBOpenDBRequest::version):
(WebCore::IDBClient::IDBOpenDBRequest::create): Deleted.

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::IDBRequest):
(WebCore::IDBClient::IDBRequest::enqueueEvent):
* Modules/indexeddb/client/IDBRequestImpl.h:
(WebCore::IDBClient::IDBRequest::requestIdentifier):

* Modules/indexeddb/server/IDBConnectionToClient.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
(WebCore::IDBServer::IDBConnectionToClient::create):
(WebCore::IDBServer::IDBConnectionToClient::IDBConnectionToClient):
(WebCore::IDBServer::IDBConnectionToClient::identifier):
(WebCore::IDBServer::IDBConnectionToClient::didDeleteDatabase):
* Modules/indexeddb/server/IDBConnectionToClient.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
(WebCore::IDBServer::IDBConnectionToClientDelegate::~IDBConnectionToClientDelegate):

* Modules/indexeddb/server/IDBServer.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp.
(WebCore::IDBServer::IDBServer::create):
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::IDBServer::registerConnection):
(WebCore::IDBServer::IDBServer::unregisterConnection):
(WebCore::IDBServer::IDBServer::deleteDatabase):
* Modules/indexeddb/server/IDBServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.

* Modules/indexeddb/shared/IDBError.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp.
(WebCore::idbExceptionEntry):
(WebCore::IDBError::IDBError):
(WebCore::IDBError::operator=):
(WebCore::IDBError::name):
(WebCore::IDBError::message):
* Modules/indexeddb/shared/IDBError.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp.
(WebCore::IDBError::IDBError):
(WebCore::IDBError::isNull):

* Modules/indexeddb/shared/IDBRequestData.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp.
(WebCore::IDBRequestData::IDBRequestData):
* Modules/indexeddb/shared/IDBRequestData.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
(WebCore::IDBRequestData::requestIdentifier):
(WebCore::IDBRequestData::databaseIdentifier):

* Modules/indexeddb/shared/IDBRequestIdentifier.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp.
(WebCore::nextRequestNumber):
(WebCore::IDBRequestIdentifier::IDBRequestIdentifier):
(WebCore::IDBRequestIdentifier::emptyValue):
(WebCore::IDBRequestIdentifier::deletedValue):
(WebCore::IDBRequestIdentifier::isHashTableDeletedValue):
* Modules/indexeddb/shared/IDBRequestIdentifier.h: Added.
(WebCore::IDBRequestIdentifier::isEmpty):
(WebCore::IDBRequestIdentifier::hash):
(WebCore::IDBRequestIdentifier::operator==):
(WebCore::IDBRequestIdentifier::connectionIdentifier):
(WebCore::IDBRequestIdentifierHash::hash):
(WebCore::IDBRequestIdentifierHash::equal):
(WebCore::IDBRequestIdentifierHashTraits::emptyValue):
(WebCore::IDBRequestIdentifierHashTraits::isEmptyValue):
(WebCore::IDBRequestIdentifierHashTraits::constructDeletedValue):
(WebCore::IDBRequestIdentifierHashTraits::isDeletedValue):

* Modules/indexeddb/shared/IDBResultData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
(WebCore::IDBResultData::IDBResultData):
* Modules/indexeddb/shared/IDBResultData.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h.
(WebCore::IDBResultData::requestIdentifier):
(WebCore::IDBResultData::error):

* Modules/indexeddb/shared/InProcessIDBServer.cpp: Added.
(WebCore::InProcessIDBServer::create):
(WebCore::InProcessIDBServer::InProcessIDBServer):
(WebCore::InProcessIDBServer::identifier):
(WebCore::InProcessIDBServer::connectionToServer):
(WebCore::InProcessIDBServer::connectionToClient):
(WebCore::InProcessIDBServer::deleteDatabase):
(WebCore::InProcessIDBServer::didDeleteDatabase):
* Modules/indexeddb/shared/InProcessIDBServer.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h.

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

* loader/EmptyClients.cpp:

* page/DatabaseProvider.h:

* page/Page.cpp:
(WebCore::Page::idbConnection):
* page/Page.h:

* page/SecurityOriginData.cpp:
(WebCore::SecurityOriginData::debugString):
* page/SecurityOriginData.h:

Source/WebKit:

* Storage/WebDatabaseProvider.cpp:
(WebDatabaseProvider::idbConnectionToServerForSession):
* Storage/WebDatabaseProvider.h:

Source/WebKit2:

* WebProcess/Databases/WebDatabaseProvider.h:

LayoutTests:

* storage/indexeddb/modern/deletedatabase-request-event-expected.txt: Added.
* storage/indexeddb/modern/deletedatabase-request-event.html: Added.

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

4 years ago[Win] Allow Windows to run test-webkitpy without Cygwin
bfulgham@apple.com [Mon, 28 Sep 2015 22:44:17 +0000 (22:44 +0000)]
[Win] Allow Windows to run test-webkitpy without Cygwin
https://bugs.webkit.org/show_bug.cgi?id=149602

Reviewed by Alex Christensen.

These changes mostly shift from hard-coded paths using UNIX-style
separators to Python's "os.path.join" syntax that uses the correct
path separator for each platform.

* Scripts/webkitpy/common/system/path.py:
(cygpath): Don't pass paths through Cygpath on native Windows.
* Scripts/webkitpy/port/win.py:
(WinPort._path_to_apache): Use os.path.join.
(WinPort._ntsd_location): Support 64-bit environment (ProgramW6432 doesn't exist
in 64-bit environments).
* Scripts/webkitpy/style/checker.py: Use os.path.join.
* Scripts/webkitpy/style/checker_unittest.py:
(GlobalVariablesTest.test_path_rules_specifier.assertNoCheck): Use os.path.join.
(GlobalVariablesTest.test_path_rules_specifier): Ditto.
(GlobalVariablesTest): Ditto.
(GlobalVariablesTest.test_max_reports_per_category): Ditto.
(CheckerDispatcherSkipTest.test_should_skip_with_warning): Ditto.
(CheckerDispatcherDispatchTest.test_js_paths): Ditto.
(CheckerDispatcherDispatchTest.test_json_paths): Ditto.
(CheckerDispatcherDispatchTest.test_python_paths): Ditto.
(CheckerDispatcherDispatchTest.test_text_paths): Ditto.
(CheckerDispatcherDispatchTest.test_xml_paths): Ditto.
(StyleProcessor_CodeCoverageTest._create_carriage_checker_class): Ditto.
(StyleProcessor_CodeCoverageTest): Ditto.
(StyleProcessor_CodeCoverageTest.test_should_process__skip_without_warning): Ditto.
(StyleProcessor_CodeCoverageTest.test_should_process__skip_with_warning): Ditto.
(StyleProcessor_CodeCoverageTest.test_should_process__true_result): Ditto.
* Scripts/webkitpy/w3c/test_parser_unittest.py: Uses os.path.join rather than
manual string concatenation of paths.

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

4 years ago[ES6] Implement tail calls in the FTL
msaboff@apple.com [Mon, 28 Sep 2015 22:37:36 +0000 (22:37 +0000)]
[ES6] Implement tail calls in the FTL
https://bugs.webkit.org/show_bug.cgi?id=148664

Source/JavaScriptCore:

Patch by basile_clement@apple.com <basile_clement@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> on 2015-09-28
Reviewed by Filip Pizlo.

This patch implements the tail call opcodes in the FTL, making tail
calls available through all tiers. The changes are relatively
straightforward, although the frame shuffler had to be extended to
handle the possibility of running out of stack when spilling or
building a slow path frame. The other tiers always ensure that we have
enough stack space to build the new frame at the bottom of the old one,
but that is not true for the FTL.

Moreover, for efficiency, this adds to the shuffler the ability to
record the state of the TagTypeNumber, and to re-use the same register
when doing several consecutive integer boxings with no spilling in
between.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::inRegister):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGNode.h:
(JSC::DFG::Node::isFunctionTerminal):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfTailCallVarargs):
(JSC::FTL::sizeOfTailCallForwardVarargs):
(JSC::FTL::sizeOfICFor):
* ftl/FTLInlineCacheSize.h:
* ftl/FTLJSCall.cpp:
(JSC::FTL::JSCall::JSCall):
* ftl/FTLJSCallBase.cpp:
(JSC::FTL::JSCallBase::emit):
(JSC::FTL::JSCallBase::link):
* ftl/FTLJSCallBase.h:
* ftl/FTLJSCallVarargs.cpp:
(JSC::FTL::JSCallVarargs::JSCallVarargs):
(JSC::FTL::JSCallVarargs::emit):
* ftl/FTLJSTailCall.cpp: Added.
(JSC::FTL::getRegisterWithAddend):
(JSC::FTL::recoveryFor):
(JSC::FTL::sizeFor):
(JSC::FTL::JSTailCall::JSTailCall):
(JSC::FTL::m_instructionOffset):
(JSC::FTL::JSTailCall::emit):
* ftl/FTLJSTailCall.h: Copied from Source/JavaScriptCore/ftl/FTLJSCallBase.h.
(JSC::FTL::JSTailCall::stackmapID):
(JSC::FTL::JSTailCall::estimatedSize):
(JSC::FTL::JSTailCall::numArguments):
(JSC::FTL::JSTailCall::operator<):
* ftl/FTLLocation.h:
(JSC::FTL::Location::operator bool):
(JSC::FTL::Location::operator!):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileTailCall):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::callPreflight):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForTailCall):
* ftl/FTLState.h:
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitExceptionCheck):
* jit/CallFrameShuffleData.h:
* jit/CallFrameShuffler.cpp:
(JSC::CallFrameShuffler::CallFrameShuffler):
(JSC::CallFrameShuffler::dump):
(JSC::CallFrameShuffler::spill):
(JSC::CallFrameShuffler::extendFrameIfNeeded):
(JSC::CallFrameShuffler::prepareForSlowPath):
(JSC::CallFrameShuffler::prepareAny):
* jit/CallFrameShuffler.h:
(JSC::CallFrameShuffler::restoreGPR):
(JSC::CallFrameShuffler::getFreeRegister):
(JSC::CallFrameShuffler::getFreeTempGPR):
(JSC::CallFrameShuffler::ensureTempGPR):
(JSC::CallFrameShuffler::addNew):
* jit/CallFrameShuffler64.cpp:
(JSC::CallFrameShuffler::emitBox):
(JSC::CallFrameShuffler::tryAcquireTagTypeNumber):
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
* jit/Reg.h:
(JSC::Reg::Reg):
(JSC::Reg::isHashTableDeletedValue):
(JSC::Reg::deleted):
(JSC::RegHash::hash):
(JSC::RegHash::equal):
* test/es6.yaml:

LayoutTests:

Reviewed by Filip Pizlo.

Added one new tail call test and enabled other tail call tests.

* js/caller-property-expected.txt:
* js/script-tests/caller-property.js:
(string_appeared_here.nonStrictCallee):
(strictCallee):
(nonStrictCaller):
(strictCaller):
(strictTailCaller):
(getFooGetter):

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

4 years agorelatedNode should be retargeted respecting slots
rniwa@webkit.org [Mon, 28 Sep 2015 22:11:08 +0000 (22:11 +0000)]
relatedNode should be retargeted respecting slots
https://bugs.webkit.org/show_bug.cgi?id=149591

Reviewed by Antti Koivisto.

Source/WebCore:

This patch retargets relatedNode with respect to shadow boundaries after r190214 as specified in
https://w3c.github.io/webcomponents/spec/shadow/#retargeting-relatedtarget

Naively implementing the spec'ed behavior can result in O(n^2) behavior since we need to find the common tree scope
ancestor for each target in the event path. This patch avoids this by implementing an O(1) incremental update step
for when target's tree scope changes in the event path. See the description for moveToNewTreeScope below.

Test: fast/shadow-dom/event-with-related-target.html

* dom/EventContext.h: Replaced toMouseOrFocusEventContext by downcast<MouseOrFocusEventContext>.
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver): Removed the code for relatedNode. This class is now only used for touch events.
(WebCore::EventPath): Added m_event as a member variable.

(WebCore::RelatedNodeRetargeter): Added.

(WebCore::RelatedNodeRetargeter::RelatedNodeRetargeter): Does the initial retargeting of relatedNode. When the
tree scope of relatedNode and the target are the same, we immediately exit without collecting ancestor tree scopes
of relatedNode as an optimization. We also special case when the relatedNode and the target are in two different
documents (relatedNode should be nullptr) and when one is in document and the other one is not in the document
(relatedNode should be the host of the outermost shadow root). Otherwise we have to do the real work by collecting
all tree scope ancestors and walking downwards from the document tree scope (note target and relatedNode share the
same document scope here since we would have exited early otherwise).

(WebCore::RelatedNodeRetargeter::currentNode): Returned relatedNode retargeted for the current tree scope.

(WebCore::RelatedNodeRetargeter::moveToNewTreeScope): Moves to a new tree scope. If the original target and
relatedNode were in different trees, there is nothing to be done. Note that we can only move out of a shadow root
to its host or move into a slot so newTreeScope (current target's tree scope) and previousTreeScope (previous
target's tree scope) must have a child-parent relationship.

If previousTreeScope did not contain the retargeted relatedNode, then neither can its child shadow trees. Thus,
there is nothing to be done when moving into a slot in this case. If we're moving out of previousTreeScope, then
newTreeScope may contain the retargeted relatedNode but that still doesn't require any work. So we exit early in
both cases.

Otherwise (previousTreeScope contained retargeted relatedNode), if we're moving out of a child shadow root
(previousTreeScope) then relatedNode should also move to previousTreeScope's shadow host since previousTreeScope
is a direct-child shadow tree of newTreeScope and previousTreeScope's shadow host resides in newTreeScope.

If we're moving into a child shadow root via a slot, then there are three possibilities: relatedNode is in
previousTreeScope, newTreeScope and its child shadow trees, or newTreeScope's sibling tree scopes and its children.
If it is in previousTreeScope (m_lowestCommonAncestorIndex is zero) or in newTreeScope's sibling, then
previousTreeScope is the lowest common tree scope ancestor so there is nothing to be done. If relatedNode is in
newTreeScope, then the retargeted relatedNode is either the shadow host of the shadow tree that contains
relatedNode or relatedNode itself.

(WebCore::RelatedNodeRetargeter::checkConsistency): Finds the retargeted relatedNode in the simplest way to verify
the correctness of the algorithm. We can disable this consistency check if it slows down debug builds too much.
(WebCore::RelatedNodeRetargeter::nodeInLowestCommonAncestor): Finds the
(WebCore::RelatedNodeRetargeter::collectTreeScopes):
(WebCore::EventPath::setRelatedTarget): Rewritten using RelatedNodeRetargeter.

LayoutTests:

Added a new testharness.js test for retargeting relatedNode.

* fast/shadow-dom/event-with-related-target.html: Added.

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

4 years agoBuild WK1 with CMake on Mac
commit-queue@webkit.org [Mon, 28 Sep 2015 22:08:55 +0000 (22:08 +0000)]
Build WK1 with CMake on Mac
https://bugs.webkit.org/show_bug.cgi?id=149604

Patch by Alex Christensen <achristensen@webkit.org> on 2015-09-28
Reviewed by Chris Dumez.

.:

* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitMacros.cmake:
ObjC bindings now have their own list of IDL files, but some of them still don't generate a .mm file.

Source/WebCore:

* CMakeLists.txt:
* PlatformMac.cmake:
Make a list of IDL files for the ObjC bindings.

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

4 years agoWeb Inspector: Hitting ESC while editing element tag name leaves element in bad state
commit-queue@webkit.org [Mon, 28 Sep 2015 22:03:36 +0000 (22:03 +0000)]
Web Inspector: Hitting ESC while editing element tag name leaves element in bad state
https://bugs.webkit.org/show_bug.cgi?id=149506

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

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._startEditingTagName.editingCancelled):
(WebInspector.DOMTreeElement.prototype._startEditingTagName):
When cancelling editing of a tag name, revert any changes we had
been making to the closing tag name.

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

4 years agoWeb Inspector: search shortcut in split console moves focus to search box, but doesn...
commit-queue@webkit.org [Mon, 28 Sep 2015 21:44:26 +0000 (21:44 +0000)]
Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret
https://bugs.webkit.org/show_bug.cgi?id=149223

Patch by João Oliveira <hello@jxs.pt> on 2015-09-28
Reviewed by Timothy Hatcher.

When pressing console find shortcut (CMD+F) SearchBar now checks if there's text on _searchInput
if so text is selected, if the textbox is empty, textbox gains focus.

* UserInterface/Views/SearchBar.js:
(WebInspector.SearchBar.prototype.focus):

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

4 years agoHeavy taps on links are sometimes interpreted as the preview gesture
bdakin@apple.com [Mon, 28 Sep 2015 21:44:24 +0000 (21:44 +0000)]
Heavy taps on links are sometimes interpreted as the preview gesture
https://bugs.webkit.org/show_bug.cgi?id=149304
-and corresponding-
rdar://problem/22689258

Rubber-stamped by Tim Horton.

Rolling out this patch. We should try to fix this at the UIKit-level.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _interactionStoppedFromPreviewItemController:]):

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

4 years agoObjectPropertyConditionSet::mergedWith does not produce a minimal intersection.
keith_miller@apple.com [Mon, 28 Sep 2015 19:08:42 +0000 (19:08 +0000)]
ObjectPropertyConditionSet::mergedWith does not produce a minimal intersection.
https://bugs.webkit.org/show_bug.cgi?id=149598

Reviewed by Michael Saboff.

mergedWith sometimes creates duplicates of an ObjectPropertyCondition, which causes GetByIdVariant
in believe that the condition has more than one slotBaseCondition when only one was necessary.

* bytecode/ObjectPropertyConditionSet.cpp:
(JSC::ObjectPropertyConditionSet::mergedWith):

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

4 years agojs/regress/getter-richards-try-catch is timing out on debug layout tests
sbarati@apple.com [Mon, 28 Sep 2015 18:57:26 +0000 (18:57 +0000)]
js/regress/getter-richards-try-catch is timing out on debug layout tests
https://bugs.webkit.org/show_bug.cgi?id=149599

Reviewed by Alexey Proskuryakov.

* js/regress/script-tests/getter-richards-try-catch.js:
(Packet.prototype.toString):
* platform/mac/TestExpectations:

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

4 years agoDrop support for legacy EventException
cdumez@apple.com [Mon, 28 Sep 2015 18:26:31 +0000 (18:26 +0000)]
Drop support for legacy EventException
https://bugs.webkit.org/show_bug.cgi?id=149597
<rdar://problem/22879795>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C DOM test now that a new check is passing.

* web-platform-tests/dom/historical-expected.txt:

Source/WebCore:

Drop support for legacy EventException. Both Firefox and Chrome do not
support it, and our implementation no longer throws such exceptions.

No new tests, already covered by existing test.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Modules/indexeddb/legacy/LegacyRequest.cpp:
* Modules/indexeddb/legacy/LegacyTransaction.cpp:
* Modules/websockets/WebSocket.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/WebKitDOMPrivate.cpp:
* bindings/js/JSExceptionBase.cpp:
(WebCore::toExceptionBase): Deleted.
* dom/DOMAllInOne.cpp:
* dom/DOMExceptions.in:
* dom/EventException.cpp: Removed.
* dom/EventException.h:
(WebCore::EventException::EventException): Deleted.
* dom/EventException.idl:
* dom/EventListenerMap.cpp:
* dom/EventTarget.cpp:
* dom/MessagePort.cpp:
* dom/Node.cpp:
* loader/appcache/DOMApplicationCache.cpp:
* page/DOMWindow.cpp:
* page/EventSource.cpp:
* page/PerformanceUserTiming.h:
* workers/AbstractWorker.cpp:
* workers/Worker.cpp:
* workers/WorkerGlobalScope.cpp:
* xml/XMLHttpRequest.cpp:
* xml/XMLHttpRequestUpload.cpp:

LayoutTests:

Update / rebaseline several tests now that we no longer expose
EventException on the global Window object.

* fast/dom/Window/resources/window-properties.js:
* fast/dom/Window/window-lookup-precedence-expected.txt:
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoObject.getOwnPropertyNames() does not return named properties
cdumez@apple.com [Mon, 28 Sep 2015 17:43:49 +0000 (17:43 +0000)]
Object.getOwnPropertyNames() does not return named properties
https://bugs.webkit.org/show_bug.cgi?id=149562
<rdar://problem/22879779>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline existing W3C tests now that Object.getOwnPropertyNames()
returns named properties for HTMLCollection. We unfortunately still
don't pass those because 'length' / 'constructor' properties are
currently on the instance and they should be on the prototype.

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

Source/WebCore:

Previously, Object.getOwnPropertyNames() did not return named properties
for interfaces with named property getters. This patch adds support for
this in the JS bindings generator and uses it for HTMLCollection only
for now. Other interfaces will be taken care of independently.

Note that currently, even though the named properties are returned by
Object.getOwnPropertyNames(), these properties are still not enumerated.
This is because these are always unenumerable for existing DOM interfaces:
- https://dom.spec.whatwg.org/#interface-htmlcollection
- https://dom.spec.whatwg.org/#namednodemap

In the future, we may need to extend support if some interfaces require
those to be enumerable.

Test: fast/dom/htmlcollection-getownpropertynames.html

* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::WebCore::RTCStatsResponse::supportedPropertyNames):
* Modules/mediastream/RTCStatsResponse.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::supportedPropertyNames):
* css/StyleSheetList.h:
* dom/DOMNamedFlowCollection.cpp:
(WebCore::DOMNamedFlowCollection::supportedPropertyNames):
* dom/DOMNamedFlowCollection.h:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::supportedPropertyNames):
* dom/NamedNodeMap.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::supportedPropertyNames):
* html/HTMLCollection.h:
(WebCore::CollectionNamedElementCache::propertyNames):
(WebCore::CollectionNamedElementCache::appendToIdCache):
(WebCore::CollectionNamedElementCache::appendToNameCache):
(WebCore::CollectionNamedElementCache::memoryCost):
(WebCore::CollectionNamedElementCache::append):
* plugins/DOMMimeTypeArray.cpp:
(WebCore::DOMMimeTypeArray::supportedPropertyNames):
* plugins/DOMMimeTypeArray.h:
* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::supportedPropertyNames):
* plugins/DOMPlugin.h:
* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::supportedPropertyNames):
* plugins/DOMPluginArray.h:

LayoutTests:

Add layout test that verifies that Object.getOwnPropertyNames() returns
an HTMLCollection's named properties, in addition to its indexes. It
also checks that they are not enumerable, as per the DOM specification.

* fast/dom/htmlcollection-getownpropertynames-expected.txt: Added.
* fast/dom/htmlcollection-getownpropertynames.html: Added.

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

4 years ago[Curl] Deadlock when downloading.
peavo@outlook.com [Mon, 28 Sep 2015 17:33:19 +0000 (17:33 +0000)]
[Curl] Deadlock when downloading.
https://bugs.webkit.org/show_bug.cgi?id=149596

Reviewed by Alex Christensen.

Avoid grabbing the same lock twice.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::init):
(WebCore::CurlDownload::addHeaders):

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

4 years agoExpose a WKWebView API for allowing programmatic focus to trigger node assistance
wenson_hsieh@apple.com [Mon, 28 Sep 2015 13:53:40 +0000 (13:53 +0000)]
Expose a WKWebView API for allowing programmatic focus to trigger node assistance
https://bugs.webkit.org/show_bug.cgi?id=149567

Reviewed by Darin Adler.

Adds an API method to WKWebView that allows clients to override the default iOS behavior of not
starting node assistance when programmatically focusing. Also fixes a bug caused by naively
introducing the flag where the autofocus attribute could trigger node assistance before layout
occurs, causing an ASSERT to fail in EditorState::postLayoutData.

I fixed this issue by not assisting the node if the editor state is missing post layout data,
instead deferring node assistance until layout has occurred.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Initializes the new node assistance flag to NO, which
    is the current default behavior.
(-[WKWebView canAssistOnProgrammaticFocus]):
(-[WKWebView setCanAssistOnProgrammaticFocus:]): New API method that allows clients to set node
    assistance behavior upon programmatic focus.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Added new node assistance flag to configuration.
(-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]):
(-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]):
* UIProcess/WebPageProxy.h: Added NodeAssistanceArguments struct.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Do not return
    early if the node assistance flag is set to allow programmatic focus.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree): After committing the layer tree, if we have deferred
    starting node assistance, immediately trigger node assistance.
(WebKit::WebPageProxy::startAssistingNode): Defer starting node assistance if we have not yet repainted.
(WebKit::WebPageProxy::stopAssistingNode): Also cancel any deferred node assistance.

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

4 years agoAdd bugzilla addresses of committers to contributors.json
ossy@webkit.org [Mon, 28 Sep 2015 09:19:05 +0000 (09:19 +0000)]
Add bugzilla addresses of committers to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=149520

Reviewed by Darin Adler.

* Scripts/webkitpy/common/config/contributors.json:

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

4 years agovalidate-committer-lists -b shouldn't need edituser privileges
ossy@webkit.org [Mon, 28 Sep 2015 09:15:49 +0000 (09:15 +0000)]
validate-committer-lists -b shouldn't need edituser privileges
https://bugs.webkit.org/show_bug.cgi?id=149519

Reviewed by Darin Adler.

* Scripts/validate-committer-lists:
(CommitterListBugzillaChecker._has_invalid_bugzilla_email):
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(BugzillaQueries.is_invalid_bugzilla_email):
(BugzillaQueries): Deleted.
(BugzillaQueries.fetch_logins_matching_substring): Deleted.

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

4 years agoUpdate bug numbers for failing test expectations in fast/shadow-dom.
rniwa@webkit.org [Mon, 28 Sep 2015 07:49:50 +0000 (07:49 +0000)]
Update bug numbers for failing test expectations in fast/shadow-dom.

* platform/mac/TestExpectations:

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

4 years agoSource/WebCore:
commit-queue@webkit.org [Mon, 28 Sep 2015 07:43:34 +0000 (07:43 +0000)]
Source/WebCore:
An SVG inherits the container size of the previously drawn HTMLImageElement when drawing it on a canvas
https://bugs.webkit.org/show_bug.cgi?id=148845

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-09-28
Reviewed by Darin Adler.

When drawing an SVG image on a canvas we need to make sure that the container
size of the SVG is set to the image source size. If we do not do that, the
previous container size will be used as the size of the image. When drawing
it as HTMLImageElement, the renderer calls SVGImage::drawForContainer() which
calls setContainerSize() and then calls draw(). This call ensures that the
size is set correctly for cached images. But when drawing the SVGImage on
CanvasRenderingContext2D, the SVGImage::draw() is called directly because
it calls it through the base class method Image::draw().

If the image.isSVGImage(), CanvasRenderingContext2D::drawImage() has to call
SVGImage::setContainerSize() before calling Image::draw().

Test: svg/as-image/svg-cached-draw-canvas.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
Call SVGImage::setContainerSize() before calling Image::draw().

LayoutTests:
An SVG inherits the container size of the previously drawn HTMLImageElement when drawing it on canvas
https://bugs.webkit.org/show_bug.cgi?id=148845

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-09-28
Reviewed by Darin Adler.

Ensure that an SVG image with intrinsic size or with no intrinsic size can be
displayed on a canvas even if it is previously displayed by an HTMLImageElement.

* svg/as-image/svg-cached-draw-canvas-expected.html: Added.
* svg/as-image/svg-cached-draw-canvas.html: Added.

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

4 years agoRename all the variables and parameters of type HTMLImageElement in CanvasRenderingCo...
said@apple.com [Mon, 28 Sep 2015 03:43:00 +0000 (03:43 +0000)]
Rename all the variables and parameters of type HTMLImageElement in CanvasRenderingContext2D.cpp from 'image' to 'imageElement'

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-09-27
Reviewed by Darin Adler.

This does not change functionality in this file. It is a preparation for
the fix of the https://bugs.webkit.org/show_bug.cgi?id=148845.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::size):
(WebCore::normalizeRect):
(WebCore::CanvasRenderingContext2D::drawImageFromRect):
(WebCore::CanvasRenderingContext2D::setAlpha):
(WebCore::CanvasRenderingContext2D::createRadialGradient):
(WebCore::CanvasRenderingContext2D::createPattern):
(WebCore::CanvasRenderingContext2D::drawImage):

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

4 years ago[ES6] Implement ES6 Module loader hook stubs in WebCore
utatane.tea@gmail.com [Sun, 27 Sep 2015 22:24:18 +0000 (22:24 +0000)]
[ES6] Implement ES6 Module loader hook stubs in WebCore
https://bugs.webkit.org/show_bug.cgi?id=149574

Reviewed by Ryosuke Niwa.

In this patch, we implement the loader hooks in the WebCore side.
Since the fetcher and actual evaluation code are separated from
this patch, they become empty.

Here, WebCore implements 3 loader hooks.

1. resolve hook

    Takes the module name and resolve it to the unique module key.
    In WebCore, we use URL as a module key.
    And for the inlined module tag (e.g. <script type="module">import ...</script>),
    we use the ES6 symbol as a module key.
    In WebCore, we take the module name like "./hello.js" and resolve it by using
    the URL of the importer module.
    This functionality is implemented in this patch.

2. fetch hook

    Fetches the resource specified by the module key. In WebCore, the module key is
    URL. We use CachedResource loading system to load the resource of the modules.
    The actual code of the fetch hook will be implemented in the subsequent patch.

3. evaluate hook

    This is additional hook to instrument the module's execution for the inspector.
    The actual code of the evaluate hook will be implemented in the subsequent patch.

In addition to that, we added required JSC forward headers for the module loader
implementation.

* CMakeLists.txt:
* ForwardingHeaders/runtime/JSInternalPromise.h: Added.
* ForwardingHeaders/runtime/JSInternalPromiseDeferred.h: Added.
* ForwardingHeaders/runtime/JSModuleRecord.h: Added.
* ForwardingHeaders/runtime/Symbol.h: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::moduleLoaderResolve):
(WebCore::JSDOMWindowBase::moduleLoaderFetch):
(WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSModuleLoader.cpp: Added.
(WebCore::JSModuleLoader::JSModuleLoader):
(WebCore::JSModuleLoader::resolve):
(WebCore::JSModuleLoader::fetch):
(WebCore::JSModuleLoader::evaluate):
* bindings/js/JSModuleLoader.h: Added.
(WebCore::JSModuleLoader::document):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
* dom/Document.h:
(WebCore::Document::moduleLoader):

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

4 years agoUse modern for-loops in WebCore/inspector.
commit-queue@webkit.org [Sun, 27 Sep 2015 03:03:33 +0000 (03:03 +0000)]
Use modern for-loops in WebCore/inspector.
https://bugs.webkit.org/show_bug.cgi?id=149579

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-09-26
Reviewed by Darin Adler.

No new tests because there is no behavior change.

* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::diff):
(WebCore::DOMPatchSupport::innerPatchChildren):
(WebCore::DOMPatchSupport::removeChildAndMoveToNew):
(WebCore::DOMPatchSupport::markNodeAsUsed):
* inspector/InspectorCSSAgent.cpp:
(WebCore::computePseudoClassMask):
(WebCore::ChangeRegionOversetTask::timerFired):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::resetPseudoStates):
* inspector/InspectorDOMAgent.cpp:
(WebCore::RevalidateStyleAttributeTask::timerFired):
(WebCore::InspectorDOMAgent::releaseBackendNodeIds):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::getEventListeners):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::styleAttributeInvalidated):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::enable):
(WebCore::InspectorDatabaseAgent::disable):
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
(WebCore::InspectorDatabaseAgent::databaseId):
(WebCore::InspectorDatabaseAgent::findByFileName):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::frontendLoaded):
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
(WebCore::buildObjectForHighlight):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
* inspector/InspectorReplayAgent.cpp:
(WebCore::buildInspectorObjectForSession):
(WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
(WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willDestroyCachedResource):
(WebCore::InspectorResourceAgent::willRecalculateStyle):
* inspector/InspectorStyleSheet.cpp:
(flattenSourceData):
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::ruleIndexByStyle):
(WebCore::InspectorStyleSheet::buildArrayForRuleList):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannelsForExistingWorkers):
(WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::removeCachedResource):
(WebCore::NetworkResourcesData::clear):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* inspector/WebConsoleAgent.cpp:
(WebCore::WebConsoleAgent::frameWindowDiscarded):
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):

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

4 years agoUnreviewed, fix debug tests. Before marking, we need to call registerGCThreads().
fpizlo@apple.com [Sat, 26 Sep 2015 20:11:30 +0000 (20:11 +0000)]
Unreviewed, fix debug tests. Before marking, we need to call registerGCThreads().

* heap/Heap.cpp:
(JSC::Heap::markRoots):

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

4 years agoUnreviewed, fix Windows build by adding WTF_EXPORT_PRIVATE in various places.
fpizlo@apple.com [Sat, 26 Sep 2015 18:41:15 +0000 (18:41 +0000)]
Unreviewed, fix Windows build by adding WTF_EXPORT_PRIVATE in various places.

* wtf/ParallelHelperPool.h:
(WTF::ParallelHelperClient::setFunction):
(WTF::ParallelHelperPool::numberOfThreads):

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

4 years agoVMs should share GC threads
fpizlo@apple.com [Sat, 26 Sep 2015 18:07:09 +0000 (18:07 +0000)]
VMs should share GC threads
https://bugs.webkit.org/show_bug.cgi?id=149433
rdar://problem/12859344

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This changes the GC to use a new WTF abstraction for parallelism called ParallelHelperPool.
This allows us to remove GCThread and all of the GCPhase machinery. This kills a lot of
code and also gives our GC magical thread sharing powers. If two GCs in two different VMs
fire at the same time, then they will both get a random subset of the available shared GC
threads. If one GC happens before the other, then it will probably get all of the available
threads. If a GC happens while another VM already started GCing, then it will probably not
get any helper threads. This is probably fine, since in multi-VM scenarios we have no
reason to optimize for anything other than total throughput.

The GC has one static helper pool. This pool is available via JSC::heapHelperPool(). It
would be OK for other parts of JSC to use it in the future for parallel tasks. Each Heap
instance has a helper client attached to the pool.

The marking phase tells the ParallelHelperClient to asynchronously run a function that
joins parallel marking and finishes once marking reaches termination. It uses the
client.setFunction() idiom where the threads share work with each other using a specialized
worklist. The ParallelHelperPool is not involved in deciding when threads should terminate.

The copying phase tells the ParallelHelperClient to run a copying function in parallel. It
uses the client.runFunctionInParallel() idiom. The copying function gets work from the
m_blocksToCopy worklist inside Heap.

To test that multiple VMs work properly, this adds a multi-VM test to testapi.mm. This test
creates five concurrent VMs and has each of them allocate about 30MB of memory before doing
a full GC. I've confirmed that this tests uses only 6 total GC threads on my 8-core
computer (this is correct since we are currently configured for 7-way parallelism).

This shouldn't affect performance on benchmarks, but it will sure help apps with a lot of
VM instances.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
* heap/GCThread.cpp: Removed.
* heap/GCThread.h: Removed.
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::isPagedOut):
(JSC::Heap::markRoots):
(JSC::Heap::copyBackingStores):
(JSC::Heap::resetVisitors):
(JSC::Heap::threadVisitCount):
(JSC::Heap::threadBytesVisited):
(JSC::Heap::threadBytesCopied):
(JSC::Heap::startNextPhase): Deleted.
(JSC::Heap::endCurrentPhase): Deleted.
* heap/Heap.h:
* heap/HeapHelperPool.cpp: Added.
(JSC::heapHelperPool):
* heap/HeapHelperPool.h: Added.
* heap/MarkStack.cpp:
(JSC::MarkStackArray::stealSomeCellsFrom):
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::reset):
(JSC::SlotVisitor::drainFromShared):
* jit/BinarySwitch.h:
* runtime/CodeCache.h:
* runtime/VM.h:
* runtime/WeakRandom.h: Removed.
* API/tests/testapi.mm:

Source/WTF:

This adds two major things to WTF: WeakRandom and ParallelHelperPool. WeakRandom was
already in JSC; we're just hoisting it into WTF. It's just a weak random number generator
that's suitable for places where you need just a tiny bit of randomness.

ParallelHelperPool is a new API that simplifies data-parallel algorithms like the JSC GC.
In a data-parallel algorithm, we want to run one task on as many cores as possible and let
the task worry about which subset of the input data to work on. In some cases, the
algorithm will not need to do any load balancing - and if load balancing is required, it's
up to the user. This is appropriate in contexts where the load balancing needs to be
custom-tuned for performance, like the GC's marking phase.

This new API has three concepts: task, client, and pool. A task is a reference counted
object with a run() method, which may be run in parallel. It is usually used to wrap a
functor. A pool is a pool of threads that can run things. A client is a placeholder for a
task. A client can have zero or one tasks. A client must be registered with a pool. When a
client has a task, the pool's threads may choose to run it. If a thread starts running a
task, it will run it to completion. When the task returns on any thread, the client takes
it to mean that the task should be removed. That means that any currently running instances
of the task will finish but no new threads will attempt to run the task. You can easily ask
a client to wait until a task finishes. You can also easily ask a client to run a task on
the current thread in addition to possibly some helper threads from the pool.

For some data-parallel algorithms, programming with ParallelHelperPool is as easy as:

client.runFunctionInParallel(
    [=] () {
        do things;
    });

Note that you cannot tell ahead of time how many threads will join to help the task.
Threads may become available after the task has already started running. Those threads may
join after the other threads have already started. It's not advisable to make algorithmic
decisions based on client.numberOfActiveThreads(), since that number may change. Usually
the best way to use ParallelHelperPool is with an algorithm that has its own custom
worklist. An example of a very simple custom worklist is the one in the JSC GC's copying
phase - it's just a Vector and an index that indicates the next set of elements to process.

This new API was initially designed to simplify how GCThread works, by replacing Phase with
a callback that contains the phase's workload. I then realized that with a few tweaks, I
could make this somewhat general enough that it might become interesting outside GC. I also
realized that I could use this to enable thread sharing. So, although the API is kinda
quirky, it's grounded in the reality of how the JSC GC does parallelism.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/ParallelHelperPool.cpp: Added.
(WTF::ParallelHelperClient::ParallelHelperClient):
(WTF::ParallelHelperClient::~ParallelHelperClient):
(WTF::ParallelHelperClient::setTask):
(WTF::ParallelHelperClient::finish):
(WTF::ParallelHelperClient::doSomeHelping):
(WTF::ParallelHelperClient::runTaskInParallel):
(WTF::ParallelHelperClient::claimTask):
(WTF::ParallelHelperClient::runTask):
(WTF::ParallelHelperPool::ParallelHelperPool):
(WTF::ParallelHelperPool::~ParallelHelperPool):
(WTF::ParallelHelperPool::addThreads):
(WTF::ParallelHelperPool::ensureThreads):
(WTF::ParallelHelperPool::doSomeHelping):
(WTF::ParallelHelperPool::didMakeWorkAvailable):
(WTF::ParallelHelperPool::helperThreadBody):
(WTF::ParallelHelperPool::hasClientWithTask):
(WTF::ParallelHelperPool::getClientWithTask):
(WTF::ParallelHelperPool::waitForClientWithTask):
* wtf/ParallelHelperPool.h: Added.
(WTF::ParallelHelperClient::setFunction):
(WTF::ParallelHelperClient::runFunctionInParallel):
(WTF::ParallelHelperClient::pool):
(WTF::ParallelHelperClient::numberOfActiveThreads):
(WTF::ParallelHelperPool::numberOfThreads):
* wtf/SharedTask.h: Added.
(WTF::SharedTask::SharedTask):
(WTF::SharedTask::~SharedTask):
(WTF::SharedTaskFunctor::SharedTaskFunctor):
(WTF::createSharedTask):
* wtf/WeakRandom.h: Copied from Source/JavaScriptCore/runtime/WeakRandom.h.
(WTF::WeakRandom::WeakRandom):
(WTF::WeakRandom::initializeSeed):
(WTF::WeakRandom::seedUnsafe):
(WTF::WeakRandom::getUint32):
(WTF::WeakRandom::advance):
(JSC::WeakRandom::WeakRandom): Deleted.
(JSC::WeakRandom::seedUnsafe): Deleted.
(JSC::WeakRandom::getUint32): Deleted.
(JSC::WeakRandom::advance): Deleted.
(JSC::WeakRandom::initializeSeed): Deleted.

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

4 years agoUnreviewed. Gardening: skip media stream tests failing after r190262.
carlosgc@webkit.org [Sat, 26 Sep 2015 09:35:40 +0000 (09:35 +0000)]
Unreviewed. Gardening: skip media stream tests failing after r190262.

Tools:

* Scripts/run-gtk-tests:
(TestRunner):

LayoutTests:

* platform/gtk/TestExpectations:

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

4 years agoREGRESSION(r188639): [GTK] Several inspector tests started to time out in GTK+ bots...
carlosgc@webkit.org [Sat, 26 Sep 2015 08:40:35 +0000 (08:40 +0000)]
REGRESSION(r188639): [GTK] Several inspector tests started to time out in GTK+ bots after r188639
https://bugs.webkit.org/show_bug.cgi?id=148569

Reviewed by Darin Adler.

Source/WebKit2:

* PlatformGTK.cmake: Add missing inspector files required for
layout tests.

LayoutTests:

* platform/gtk/TestExpectations: Unskip the inspector tests.

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

4 years agoSkip newly added js/regress/getter-richards-try-catch.html on debug builds,
ap@apple.com [Sat, 26 Sep 2015 06:17:35 +0000 (06:17 +0000)]
Skip newly added js/regress/getter-richards-try-catch.html on debug builds,
because it times out.

* platform/mac/TestExpectations:

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

4 years ago[Mac] USE_INTERNAL_SDK is used undefined in tools projects
ap@apple.com [Sat, 26 Sep 2015 02:29:56 +0000 (02:29 +0000)]
[Mac] USE_INTERNAL_SDK is used undefined in tools projects
https://bugs.webkit.org/show_bug.cgi?id=149571

Reviewed by Dan Bernstein.

Use the same pattern as in Source directory configurations (so, also get rid of AspenFamily.xcconfig).

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* LayoutTestRelay/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebEditingTester/Configurations/Base.xcconfig:
* WebEditingTester/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/iOS.xcconfig: Removed.

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

4 years agoClean up user media request internal API
eric.carlson@apple.com [Sat, 26 Sep 2015 02:23:00 +0000 (02:23 +0000)]
Clean up user media request internal API
https://bugs.webkit.org/show_bug.cgi?id=149527

Reviewed by Tim Horton.

Source/WebCore:

No new tests, no functional change.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::constraintsValidated): Use track persistent ID to create vectors
  as that is what the platform code needs to map to a capture device.
(WebCore::UserMediaRequest::userMediaAccessGranted): m_chosenXXDeviceUID -> m_XXDeviceUIDAllowed.
  Use the device IDs to create the MediaStream. Switch audio/video parameter order.
(WebCore::UserMediaRequest::didCreateStream): Don't assume constraints are valid.
* Modules/mediastream/UserMediaRequest.h:
(WebCore::UserMediaRequest::videoDeviceUIDs):
(WebCore::UserMediaRequest::audioDeviceUIDs):
(WebCore::UserMediaRequest::allowedVideoDeviceUID):
(WebCore::UserMediaRequest::allowedAudioDeviceUID):
(WebCore::UserMediaRequest::requiresAudio): Deleted.
(WebCore::UserMediaRequest::requiresVideo): Deleted.
(WebCore::UserMediaRequest::firstVideoDeviceUID): Deleted.
(WebCore::UserMediaRequest::firstAudioDeviceUID): Deleted.

* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::AVMediaCaptureSource): Call setPersistentId.

Source/WebKit/mac:

* WebCoreSupport/WebUserMediaClient.mm:
(WebUserMediaClient::cancelRequest): Put UserMediaRequestsMap in a local instead or calling
  userMediaRequestsMap() three times.
(-[WebUserMediaPolicyListener allow]): Get rid of unneeded local variables.
(-[WebUserMediaPolicyListener allowDeviceWithVideoUID]): Deleted, unused.

Source/WebKit2:

* UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
(WKUserMediaPermissionRequestVideoDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesVideo.
(WKUserMediaPermissionRequestAudioDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesAudio.
(WKUserMediaPermissionRequestAllowBest): Deleted.
(WKUserMediaPermissionRequestDeviceNamesVideo): Deleted.
(WKUserMediaPermissionRequestDeviceNamesAudio): Deleted.
(WKUserMediaPermissionRequestFirstVideoDeviceUID): Deleted.
(WKUserMediaPermissionRequestFirstAudioDeviceUID): Deleted.
* UIProcess/API/C/WKUserMediaPermissionRequest.h:

* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
(webkitUserMediaPermissionRequestAllow): Update for UserMediaRequest API change.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Get rid of the bool parameters.
  Switch audio/video parameter order to be consistent with everywhere else.
(WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Ditto.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): Get rid of the bool parameters.
  Switch audio/video parameter order to be consistent with everywhere else.
(WebKit::UserMediaPermissionRequestProxy::allow): Switch audio/video parameter order.
(WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID): Deleted.
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
(WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
(WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID):
(WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted.
(WebKit::UserMediaPermissionRequestProxy::requiresVideo): Deleted.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Get rid of the bool parameters.
  Switch audio/video parameter order to be consistent with everywhere else.
* UIProcess/WebPageProxy.h: Ditto.
* UIProcess/WebPageProxy.messages.in: Ditto.

* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::startRequest): Get rid of bool params, the device
  vectors have the same information.
(WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Switch audio/video
  parameter order to be consistent with everywhere else. deviceUIDVideo -> videoDeviceUID,
deviceUIDAudio -> audioDeviceUID.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveUserMediaPermissionDecision): Switch audio/video parameter order.
* WebProcess/WebPage/WebPage.h:

Tools:

* TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:
(TestWebKitAPI::decidePolicyForUserMediaPermissionRequestCallBack): Update for API changes.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto.

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

4 years agoDFG should use PhantomLocal instead of Flush as liveness preservation mechanism in...
sbarati@apple.com [Sat, 26 Sep 2015 02:10:02 +0000 (02:10 +0000)]
DFG should use PhantomLocal instead of Flush as liveness preservation mechanism in LiveCatchVariablesPreservationPhase
https://bugs.webkit.org/show_bug.cgi?id=149575

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

LiveCatchVariablesPreservationPhase is no longer forcing all live-at-catch
variables to be flushed to the stack. They are now kept alive to OSR exit
through PhantomLocal. This gives us a speed improvement for try-catch
programs (especially those that don't throw errors very often) because
we can keep locals in registers instead of forcing them onto the stack.

* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::LiveCatchVariablePreservationPhase::LiveCatchVariablePreservationPhase):
(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlock):
(JSC::DFG::performLiveCatchVariablePreservationPhase):
(JSC::DFG::FlushLiveCatchVariablesInsertionPhase::FlushLiveCatchVariablesInsertionPhase): Deleted.
(JSC::DFG::FlushLiveCatchVariablesInsertionPhase::handleBlock): Deleted.

LayoutTests:

* js/regress/getter-richards-try-catch-expected.txt: Added.
* js/regress/getter-richards-try-catch.html: Added.
* js/regress/script-tests/getter-richards-try-catch.js: Added.
(randomException):
(runRichards):
(Scheduler):
(Scheduler.prototype.addIdleTask):
(Scheduler.prototype.addWorkerTask):
(Scheduler.prototype.addHandlerTask):
(Scheduler.prototype.addDeviceTask):
(Scheduler.prototype.addRunningTask):
(Scheduler.prototype.addTask):
(Scheduler.prototype.schedule):
(Scheduler.prototype.release):
(Scheduler.prototype.holdCurrent):
(Scheduler.prototype.suspendCurrent):
(Scheduler.prototype.queue):
(TaskControlBlock):
(TaskControlBlock.prototype.setRunning):
(TaskControlBlock.prototype.markAsNotHeld):
(TaskControlBlock.prototype.markAsHeld):
(TaskControlBlock.prototype.isHeldOrSuspended):
(TaskControlBlock.prototype.markAsSuspended):
(TaskControlBlock.prototype.markAsRunnable):
(TaskControlBlock.prototype.run):
(TaskControlBlock.prototype.checkPriorityAdd):
(TaskControlBlock.prototype.toString):
(IdleTask):
(IdleTask.prototype.run):
(IdleTask.prototype.toString):
(DeviceTask):
(DeviceTask.prototype.run):
(DeviceTask.prototype.toString):
(WorkerTask):
(WorkerTask.prototype.run):
(WorkerTask.prototype.toString):
(HandlerTask):
(HandlerTask.prototype.run):
(HandlerTask.prototype.toString):
(Packet):
(Packet.prototype.addTo):
(Packet.prototype.toString):

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

4 years ago[iOS WK2] Add viewport tests and fix runUIScript() timing issues
simon.fraser@apple.com [Sat, 26 Sep 2015 00:17:27 +0000 (00:17 +0000)]
[iOS WK2] Add viewport tests and fix runUIScript() timing issues
https://bugs.webkit.org/show_bug.cgi?id=149577

Reviewed by Tim Horton.

Source/WebKit2:

When calling testRunner.runUIScript() from a page load event, the script could run
in the UI process before the current remote layer tree transaction had been handled
there. This meant that runUIScript() could query state which was about to change.

Fix by delaying the execution of the UI script until a layer tree transaction has
been handled by the UI process, leveraging the existing DrawingAreaProxy::dispatchAfterEnsuringDrawing().

This is done using a new C SPI function WKPageCallAfterNextPresentationUpdate(),
which is mirrored in the Obj-C SPI as -_doAfterNextPresentationUpdate:.

Move WKWebView SPI which is testing-related into a WKTesting category. It is expected
that this will grow significantly.

* UIProcess/API/C/WKPage.cpp:
(WKPageCallAfterNextPresentationUpdate):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::callAfterNextPresentationUpdate):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):

Tools:

When calling testRunner.runUIScript() from a page load event, the script could run
in the UI process before the current remote layer tree transaction had been handled
there. This meant that runUIScript() could query state which was about to change.

Fix by delaying the execution of the UI script until a layer tree transaction has
been handled by the UI process, leveraging the existing DrawingAreaProxy::dispatchAfterEnsuringDrawing().

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::runUISideScriptAfterUpdateCallback):
* WebKitTestRunner/TestInvocation.h:

LayoutTests:

New viewport tests which read the scale etc. in the UI process.

* TestExpectations:
* fast/viewport/ios/resources/viewport-test-utils.js: Added.
(getUIScript):
(tableFromJSON):
(getViewport):
(runTest):
* fast/viewport/ios/width-is-device-width-expected.txt: Added.
* fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt: Added.
* fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall.html: Added.
* fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden.html: Added.
* fast/viewport/ios/width-is-device-width-overflowing-expected.txt: Added.
* fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit-expected.txt: Added.
* fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit.html: Added.
* fast/viewport/ios/width-is-device-width-overflowing.html: Added.
* fast/viewport/ios/width-is-device-width.html: Added.
* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoFTLOSRExitCompiler incorrectly excludes FPR registers in callee saves loop
msaboff@apple.com [Fri, 25 Sep 2015 23:52:42 +0000 (23:52 +0000)]
FTLOSRExitCompiler incorrectly excludes FPR registers in callee saves loop
https://bugs.webkit.org/show_bug.cgi?id=149540

Reviewed by Saam Barati.

Eliminated the incorrect check that callee saves registers are only GPRs.

* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):

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

4 years ago[Mac] Media tests start to time out after a few days of bot uptime
ap@apple.com [Fri, 25 Sep 2015 22:36:09 +0000 (22:36 +0000)]
[Mac] Media tests start to time out after a few days of bot uptime
https://bugs.webkit.org/show_bug.cgi?id=149468

Reviewed by Darin Adler.

Source/WebKit2:

Make the fix work with WebKit2, and avoid touching user's media cache for WebKit1.

When UI process is not sandboxed, inherit DIRHELPER_USER_DIR_SUFFIX from it.
This means that during testing, WebContent uses a temporary directory of the form
/private/var/folders/.../T/WebKitTestRunner-VKjmz0/com.apple.WebKit.WebContent.Development,
instead of /private/var/folders/.../T/com.apple.WebKit.WebContent.Development+WebKitTestRunner.

WebKit1 now also better respects a temporary directory of the form
/private/var/folders/.../T/DumpRenderTree-VKjmz0, instead of the default, which
makes CoreMedia put its cache inside it.

As a result, almost everything is isolated per testing process, and deleted at the end.
Same with cache directories. The only outliers that I know of are plug-in directories,
which are per-process, but are not under the testing root, and thus aren't deleted.

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::initializeSandbox):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::fromConnection):
(WebKit::ChildProcessProxy::getLaunchOptions):
(WebKit::ChildProcessProxy::connect):
* Shared/ChildProcessProxy.h:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
* Shared/SandboxInitializationParameters.h:
(WebKit::SandboxInitializationParameters::sandboxProfile):
(WebKit::SandboxInitializationParameters::setUserDirectorySuffix):
(WebKit::SandboxInitializationParameters::userDirectorySuffix):
(WebKit::SandboxInitializationParameters::setSystemDirectorySuffix): Deleted.
(WebKit::SandboxInitializationParameters::systemDirectorySuffix): Deleted.
* Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::initializeSandbox):
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::getLaunchOptions):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getLaunchOptions):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::getLaunchOptions):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions):

Tools:

Delete cache directory in addition to the temporary one. Don't delete /private/tmp/MediaCache,
as it's not longer used by tests. Set TMPDIR and DIRHELPER_USER_DIR_SUFFIX to make
all temporary and cache files go to a custom location.

* Scripts/webkitpy/port/base.py:
* Scripts/webkitpy/port/driver.py:
* Scripts/webkitpy/port/mac.py:
* Scripts/webkitpy/port/win.py:
(WinPort._driver_tempdir_for_environment): Deleted unused function.

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

4 years agoImplement scoped styling for shadow DOM
antti@apple.com [Fri, 25 Sep 2015 22:06:09 +0000 (22:06 +0000)]
Implement scoped styling for shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=149230

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/shadow-dom/css-scoping-shadow-with-rules-no-style-leak.html

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):

    Only use special path here for user agent shadow trees.

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

    Basic support for ShadowRoot scoped stylesheets.

* dom/AuthorStyleSheets.h:
(WebCore::AuthorStyleSheets::activeStyleSheets):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
(WebCore::authorStyleSheetsForElement):
(WebCore::InlineStyleSheetOwner::insertedIntoDocument):
(WebCore::InlineStyleSheetOwner::removedFromDocument):
(WebCore::InlineStyleSheetOwner::clearDocumentData):
(WebCore::InlineStyleSheetOwner::childrenChanged):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::InlineStyleSheetOwner::isLoading):
(WebCore::InlineStyleSheetOwner::sheetLoaded):
(WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):

    Basic support for ShadowRoot scoped inline stylesheets.

* dom/InlineStyleSheetOwner.h:
(WebCore::InlineStyleSheetOwner::sheet):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::styleResolver):

    Create and initialize ShadowRoot scoped style resolver.

(WebCore::ShadowRoot::resetStyleResolver):
(WebCore::ShadowRoot::authorStyleSheets):

    Collection of author stylesheets in the shadow tree.

(WebCore::ShadowRoot::updateStyle):

    Trigger style recalc when stylesheets change.

(WebCore::ShadowRoot::cloneNode):
* dom/ShadowRoot.h:
(WebCore::ShadowRoot::resetStyleInheritance):
* html/HTMLStyleElement.h:
* svg/SVGStyleElement.h:

LayoutTests:

* fast/shadow-dom/css-scoping-shadow-with-rules-no-style-leak-expected.html: Added.
* fast/shadow-dom/css-scoping-shadow-with-rules-no-style-leak.html: Added.

    Add a test that verifies that shadow DOM style doesn't affect normal DOM.

* platform/mac/TestExpectations:

    Enable fast/shadow-dom/css-scoping-shadow-with-rules.html

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

4 years agoClean up CMake build on Mac
achristensen@apple.com [Fri, 25 Sep 2015 22:04:32 +0000 (22:04 +0000)]
Clean up CMake build on Mac
https://bugs.webkit.org/show_bug.cgi?id=149573

Reviewed by Chris Dumez.

.:

* Source/cmake/OptionsMac.cmake:

Source/WebCore:

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* platform/graphics/DisplayRefreshMonitor.cpp:

Source/WebKit:

* PlatformMac.cmake:

Source/WTF:

* wtf/PlatformMac.cmake:

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

4 years agoScrolling a overflow: scroll region makes find overlay holes stick to the edge of...
timothy_horton@apple.com [Fri, 25 Sep 2015 22:01:21 +0000 (22:01 +0000)]
Scrolling a overflow: scroll region makes find overlay holes stick to the edge of the region
https://bugs.webkit.org/show_bug.cgi?id=149572
<rdar://problem/13093602>

Reviewed by Simon Fraser.

Test: fast/text/mark-matches-overflow-clip.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintTextMatchMarker):
Clip the rendered marker rect to the overflow rect.

* testing/Internals.cpp:
(WebCore::Internals::dumpMarkerRectsForNode):
* testing/Internals.h:
* testing/Internals.idl:
Add a internals function to dump the rendered rects for a marker.

* fast/text/mark-matches-overflow-clip-expected.txt: Added.
* fast/text/mark-matches-overflow-clip.html: Added.
Add a test ensuring that a find match that is clipped out by overflow
ends up with a clipped rendered rect.

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

4 years ago[Win] Switch to CMake
achristensen@apple.com [Fri, 25 Sep 2015 21:50:48 +0000 (21:50 +0000)]
[Win] Switch to CMake
https://bugs.webkit.org/show_bug.cgi?id=148111

Reviewed by Brent Fulgham.

.:

* Source/cmake/WinTools.make: Added.
* Source/cmake/tools: Added.
* Source/cmake/tools/scripts: Copied from WebKitLibraries/win/tools/scripts.
* Source/cmake/tools/scripts/auto-version.pl: Copied from WebKitLibraries/win/tools/scripts/auto-version.pl.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.proj:

Source/WebCore:

* WebCore.vcxproj/WebCore.proj:

Source/WebKit:

* WebKit.vcxproj/WebKit.proj:

Source/WTF:

* WTF.vcxproj/WTF.proj:

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

4 years agoClicking on a data detected item inside a form control always pops up a map
bdakin@apple.com [Fri, 25 Sep 2015 21:35:11 +0000 (21:35 +0000)]
Clicking on a data detected item inside a form control always pops up a map
on force touch trackpad
https://bugs.webkit.org/show_bug.cgi?id=149559
-and corresponding-
rdar://problem/22826796

Reviewed by Tim Horton.

Source/WebCore:

The real bug here appears to be a bug in Lookup, but we can work around it.
For normal text, we call directly into Data Detectors for map results, and
that works fine. For text within form controls, we did not properly extract
the text for DD, so we sent it to Lookup instead, and Lookup has this bug
where they will pop open the map right away. If we properly extract the text
for form controls, then we can work around this bug.

* editing/mac/DataDetection.mm:
(WebCore::detectItemAtPositionWithRange):
(WebCore::DataDetection::detectItemAroundHitTestResult):

Source/WebKit2:

Look for Data Detected text for text nodes and HitTestResults that are over
text inside form controls.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):

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

4 years agoPrepare internal AppleWin build for CMake
achristensen@apple.com [Fri, 25 Sep 2015 21:30:05 +0000 (21:30 +0000)]
Prepare internal AppleWin build for CMake
https://bugs.webkit.org/show_bug.cgi?id=149570

Reviewed by Brent Fulgham.

.:

* Source/PlatformWin.cmake:
Include internal CMake files if they exist.

WebKitLibraries:

* win/tools/scripts/auto-version.pl:
Use the WEBKIT_LIBRARIES environment variable if it exists.

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