WebKit-https.git
3 years ago[Curl] Compile errors.
peavo@outlook.com [Sun, 27 Dec 2015 02:24:29 +0000 (02:24 +0000)]
[Curl] Compile errors.
https://bugs.webkit.org/show_bug.cgi?id=152563

Reviewed by Alex Christensen.

The ResourceError constructor has changed signature.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::ResourceHandleManager::dispatchSynchronousJob):

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

3 years agoSubpixel rendering: Add subpixel support for outline.
zalan@apple.com [Sat, 26 Dec 2015 05:28:15 +0000 (05:28 +0000)]
Subpixel rendering: Add subpixel support for outline.
https://bugs.webkit.org/show_bug.cgi?id=152560

Source/WebCore:

Reviewed by Simon Fraser.

This patch adds support for subpixel outline-width/outline-offset.

Test: fast/borders/hidpi-outline-hairline-painting.html

* css/CSSPropertyNames.in:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/graphics/GraphicsContext.h:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawFocusRing):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::computeMaxOutlineSize):
(WebCore::RenderElement::paintOutline):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutlineForLine):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::adjustRectForOutlineAndShadow):
* rendering/RenderView.cpp:
(WebCore::RenderView::setMaximalOutlineSize):
* rendering/RenderView.h:
* rendering/style/OutlineValue.h:
(WebCore::OutlineValue::offset):
(WebCore::OutlineValue::OutlineValue): Deleted.
* rendering/style/RenderStyle.h:

LayoutTests:

Unable to ref-test other outline types.

Reviewed by Simon Fraser.

* fast/borders/hidpi-outline-hairline-painting-expected.html: Added.
* fast/borders/hidpi-outline-hairline-painting.html: Added.

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

3 years agoASSERT(m_nsResponse) in ResourceResponse::platformCertificateInfo() when running...
ap@apple.com [Fri, 25 Dec 2015 20:46:47 +0000 (20:46 +0000)]
ASSERT(m_nsResponse) in ResourceResponse::platformCertificateInfo() when running tests in iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=152559

Reviewed by Andy Estes.

Fix a regression from r194378.

* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo):

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

3 years agoResourceError should store failingURL as URL instead of String to avoid reparsing...
ddkilzer@apple.com [Fri, 25 Dec 2015 12:22:16 +0000 (12:22 +0000)]
ResourceError should store failingURL as URL instead of String to avoid reparsing and to address FIXME comments in ResourceErrorCF.cpp and ResourceErrorMac.mm
<http://webkit.org/b/146391>

Reviewed by Antti Koivisto.

Source/WebCore:

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::preflightFailure):
* loader/DocumentThreadableLoader.h:
(WebCore::DocumentThreadableLoader::preflightFailure):
- Switch type of 'url' argument of preflightFailure() from
  String to URL.
- Update for type change of 'failingURL' argument to
  ResourceError().

* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::responseReceived):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
- Update for type change of 'failingURL' argument to
  ResourceError().

* page/EventSource.cpp:
(WebCore::EventSource::didFailAccessControlCheck):
- Convert failingURL() to String explicitly.

* platform/efl/ErrorsEfl.cpp:
(WebCore::cancelledError):
(WebCore::blockedError):
(WebCore::blockedByContentBlockerError):
(WebCore::cannotShowURLError):
(WebCore::interruptedForPolicyChangeError):
(WebCore::cannotShowMIMETypeError):
(WebCore::fileDoesNotExistError):
(WebCore::pluginWillHandleLoadError):
(WebCore::downloadCancelledByUserError):
(WebCore::downloadDestinationError):
* platform/gtk/ErrorsGtk.cpp:
(WebCore::cancelledError):
(WebCore::blockedError):
(WebCore::blockedByContentBlockerError):
(WebCore::cannotShowURLError):
(WebCore::interruptedForPolicyChangeError):
(WebCore::cannotShowMIMETypeError):
(WebCore::fileDoesNotExistError):
(WebCore::pluginWillHandleLoadError):
(WebCore::downloadCancelledByUserError):
(WebCore::downloadDestinationError):
- Update for type change of 'failingURL' argument to
  ResourceError().

* platform/network/ResourceErrorBase.h:
(WebCore::ResourceErrorBase::failingURL):
- Change return type from String to URL.
(WebCore::ResourceErrorBase::ResourceErrorBase):
* platform/network/cf/ResourceError.h:
(WebCore::ResourceError::ResourceError):
- Change type of 'failingURL' from String to URL.

* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::ResourceError):
- Change type of 'failingURL' from String to URL.
(WebCore::ResourceError::platformLazyInit):
- Clean up code and address FIXME by parsing CFURLRef using
  URL() constructor.
(WebCore::ResourceError::cfError):
- Clean up code and address FIXME after switching type of
  m_failingURL.

* platform/network/curl/ResourceError.h:
(WebCore::ResourceError::ResourceError):
- Change type of 'failingURL' from String to URL.

* platform/network/mac/ResourceErrorMac.mm:
(WebCore::createNSErrorFromResourceErrorBase):
(WebCore::ResourceError::platformLazyInit):
- Clean up code and address FIXME after switching type of
  m_failingURL.

* platform/network/soup/ResourceError.h:
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::timeoutError):
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::failingURI):
(WebCore::ResourceError::timeoutError):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::timeoutFired):
- Change type of 'failingURL' from String to URL.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didFail):
- Convert failingURL() to String explicitly.
- Also switch to using makeString().

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::cancelledError):
(WebFrameLoaderClient::blockedError):
(WebFrameLoaderClient::cannotShowURLError):
(WebFrameLoaderClient::interruptedForPolicyChangeError):
(WebFrameLoaderClient::cannotShowMIMETypeError):
(WebFrameLoaderClient::fileDoesNotExistError):
(WebFrameLoaderClient::pluginWillHandleLoadError):
(WebFrameLoaderClient::dispatchDidFailToStartPlugin):
(WebFrameLoaderClient::createJavaAppletWidget):
* WebDownloadCFNet.cpp:
(WebDownload::cancelAuthenticationChallenge):
* WebError.cpp:
(WebError::init):
- Update for type change of 'failingURL' argument to
  ResourceError().

Source/WebKit2:

* NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp:
(WebKit::platformDownloadNetworkError):
* NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp:
(WebKit::platformDownloadNetworkError):
* NetworkProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse):
* NetworkProcess/Downloads/soup/DownloadSoupErrors.h:
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceError>::encodePlatformData):
(IPC::ArgumentCoder<ResourceError>::decodePlatformData):
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(LoaderClient::didFailLoadWithErrorForFrame):
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkit_uri_scheme_request_finish_error):
* WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
(WebKit::internalError):
* WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
(WebKit::internalError):
- Update for type change of 'failingURL' argument to
  ResourceError().

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

3 years agoASSERTION FAILED: x2 >= x1 in WebCore::RenderElement::drawLineForBoxSide
zalan@apple.com [Fri, 25 Dec 2015 07:25:29 +0000 (07:25 +0000)]
ASSERTION FAILED: x2 >= x1 in WebCore::RenderElement::drawLineForBoxSide
https://bugs.webkit.org/show_bug.cgi?id=151210

Reviewed by Simon Fraser.

Source/WebCore:

"IntRect outer = snappedIntRect(inner)" explicitly converts inner to LayoutRect first and
returns a snapped IntRect. When inner (after the inflate) overflows LayoutUnit,
the snapped rect might become smaller than the inner rect.

This patch also enables outline painting on subpixel positions.

Tests: fast/borders/hidpi-outline-on-subpixel-position.html
       fast/borders/outline-offset-overflow.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintOutline):

LayoutTests:

"IntRect outer = snappedIntRect(inner)" explicitly converts inner to LayoutRect and
returns a snapped IntRect. When inner (after the inflate) overflows LayoutUnit,
the snapped outer rect becomes smaller than the inner rect.

This patch also enables outline painting on subpixel positions.

* fast/borders/hidpi-outline-on-subpixel-position-expected.html: Added.
* fast/borders/hidpi-outline-on-subpixel-position.html: Added.
* fast/borders/outline-offset-overflow-expected.txt: Added.
* fast/borders/outline-offset-overflow.html: Added.

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

3 years agoUse an enum for RenderElement's baseTypeFlags
simon.fraser@apple.com [Fri, 25 Dec 2015 05:37:22 +0000 (05:37 +0000)]
Use an enum for RenderElement's baseTypeFlags
https://bugs.webkit.org/show_bug.cgi?id=152553

Reviewed by Zalan Bujtas.

Use an enum, rather than unsigned, for the BaseTypeFlags bit mask.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::RenderBoxModelObject):
* rendering/RenderBoxModelObject.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::RenderLayerModelObject):
* rendering/RenderLayerModelObject.h:

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

3 years agoRemove the unused #define _USE_MATH_DEFINES
simon.fraser@apple.com [Thu, 24 Dec 2015 20:47:50 +0000 (20:47 +0000)]
Remove the unused #define _USE_MATH_DEFINES
https://bugs.webkit.org/show_bug.cgi?id=152034

Reviewed by Tim Horton.

Source/WebCore:

_USE_MATH_DEFINES was added in r123968 but no longer does anything.

* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/PDFDocumentImage.cpp:
* rendering/mathml/RenderMathMLMenclose.cpp:
* rendering/mathml/RenderMathMLOperator.cpp:

Tools:

Update this test to use piDouble from MathExtras.h, and
std::numeric_limits<>.

* TestWebKitAPI/Tests/WTF/MediaTime.cpp:

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

3 years agoPython SCM should be able to retrieve untracked files - Generic changes
youenn.fablet@crf.canon.fr [Thu, 24 Dec 2015 10:42:53 +0000 (10:42 +0000)]
Python SCM should be able to retrieve untracked files - Generic changes
https://bugs.webkit.org/show_bug.cgi?id=152536

Reviewed by Brent Fulgham.

This patch introduces SCM.untracked_files to retrieve a list of untracked files.
No support is yet added to GIT and SVN specific implementations.

* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.untracked_files):
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(SCMTest._shared_test_untracked_files):

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

3 years agoModern IDB: Don't open any new connections until after version change transactions...
beidson@apple.com [Thu, 24 Dec 2015 07:40:29 +0000 (07:40 +0000)]
Modern IDB: Don't open any new connections until after version change transactions are completely handled.
https://bugs.webkit.org/show_bug.cgi?id=152441

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least 4 failing tests now pass).

When a version change transaction is in progress for a database, the server should not open any new connections
to that database until the version change transaction has been 100% completed.

This means *all* events related to finishing the transaction must fire.

To support this, a new message from client -> server is added.

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::dispatchEvent):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.h:

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::didFinishHandlingVersionChangeTransaction):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::didFinishHandlingVersionChange):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::didFinishHandlingVersionChange):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::loggingString):
* Modules/indexeddb/shared/IDBTransactionInfo.h:

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didFinishHandlingVersionChangeTransaction):
* Modules/indexeddb/shared/InProcessIDBServer.h:

LayoutTests:

* platform/mac-wk1/TestExpectations: Enable 4 now-passing tests.

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

3 years agoModern IDB: storage/indexeddb/transaction-basics.html fails.
beidson@apple.com [Thu, 24 Dec 2015 07:39:01 +0000 (07:39 +0000)]
Modern IDB: storage/indexeddb/transaction-basics.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152481

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Failing test now passes).

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::transaction): Include the invalid string argument
  in the error message.

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
* storage/indexeddb/transaction-basics-expected.txt:

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

3 years agoUnreviewed EFL gardening.
gyuyoung.kim@webkit.org [Thu, 24 Dec 2015 06:39:00 +0000 (06:39 +0000)]
Unreviewed EFL gardening.

Mark shadow dom to Pass with incorrect result. Additionally remove
disappeared storage tests in TestExpectations.

Unskip MSE tests because MSE functionalities have been supported by gstreamer.

* platform/efl/TestExpectations:

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

3 years agoAdd an Animometer developer test which animates text-rich boxes
simon.fraser@apple.com [Thu, 24 Dec 2015 04:26:36 +0000 (04:26 +0000)]
Add an Animometer developer test which animates text-rich boxes
https://bugs.webkit.org/show_bug.cgi?id=152544

Reviewed by Zalan Bujtas.

Add a test that draws lots of international text. This is a particle test,
moving the boxes around with absolution positioning.

* Animometer/resources/debug-runner/tests.js:
* Animometer/tests/text/resources/text-boxes.js: Added.
(BouncingTextBox):
(BouncingTextBox.prototype._move):
(BouncingTextBox.prototype.animate):
(BouncingTextBoxStage):
(BouncingTextBoxStage.prototype.createParticle):
(BouncingTextBoxStage.prototype.particleWillBeRemoved):
(BouncingTextBoxsBenchmark):
(BouncingTextBoxsBenchmark.prototype.createStage):
(window.benchmarkClient.create):
* Animometer/tests/text/text-boxes.html: Added.

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

3 years agoUse "constrainedBetween" in more places
simon.fraser@apple.com [Thu, 24 Dec 2015 03:43:23 +0000 (03:43 +0000)]
Use "constrainedBetween" in more places
https://bugs.webkit.org/show_bug.cgi?id=152543

Reviewed by Zalan Bujtas.

Replace code that contrains points via shrunkTo/expandedTo() with calls
to constrainedBetween(), and implement constrainedBetween() on IntPoint,
FloatPoint and LayoutPoint.

Convert some functions that return points to more modern syntax.

Source/WebCore:

* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::setScrollPosition):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::setScrollPosition):
* platform/ScrollView.cpp:
(WebCore::ScrollView::adjustScrollPositionWithinRange):
* platform/graphics/FloatPoint.cpp:
(WebCore::FloatPoint::constrainedBetween):
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::shrunkTo):
(WebCore::FloatPoint::expandedTo):
(WebCore::FloatPoint::transposedPoint):
* platform/graphics/IntPoint.cpp:
* platform/graphics/LayoutPoint.cpp:
(WebCore::LayoutPoint::constrainedBetween):
* platform/graphics/LayoutPoint.h:
(WebCore::LayoutPoint::expandedTo):
(WebCore::LayoutPoint::shrunkTo):
(WebCore::LayoutPoint::transposedPoint):
(WebCore::LayoutPoint::fraction):
(WebCore::LayoutPoint::operator FloatPoint):

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(constrainContentOffset):

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

3 years agojsc CLI tool crashes on EOF.
akling@apple.com [Thu, 24 Dec 2015 02:17:03 +0000 (02:17 +0000)]
jsc CLI tool crashes on EOF.
<https://webkit.org/b/152522>

Reviewed by Benjamin Poulain.

SourceProvider should treat String() like the empty string for hashing purposes.
This was a subtle behavior change in r194017 due to how zero-length strings are
treated by StringImpl::createSubstringSharingImpl().

I made these SourceProviders store a Ref<StringImpl> internally instead of a
String, to codify the fact that these strings can't be null strings.

I couldn't find a way to cause this crash through the API.

* API/JSScriptRef.cpp:
(OpaqueJSScript::OpaqueJSScript):
* parser/SourceProvider.h:
(JSC::StringSourceProvider::StringSourceProvider):

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

3 years agoSplit benchmark into two different pages
jonlee@apple.com [Thu, 24 Dec 2015 01:36:43 +0000 (01:36 +0000)]
Split benchmark into two different pages
https://bugs.webkit.org/show_bug.cgi?id=152458

Reviewed by Simon Fraser.

Add tests to 'animometer' suite.

* Animometer/resources/runner/tests.js:
* Animometer/tests/master/canvas-stage.html: Added.
* Animometer/tests/master/resources/canvas-stage.js: Added.
* Animometer/tests/master/resources/canvas-tests.js: Added.
* Animometer/tests/master/resources/stage.css: Added.

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

3 years agoSplit benchmark into two different pages
jonlee@apple.com [Thu, 24 Dec 2015 01:31:47 +0000 (01:31 +0000)]
Split benchmark into two different pages
https://bugs.webkit.org/show_bug.cgi?id=152458

Reviewed by Simon Fraser.

Address comments.

* Animometer/resources/debug-runner/benchmark-runner.js:
(BenchmarkRunner.prototype._runTestAndRecordResults): When the testing is complete the frame owning the
sampler goes away, and a later call to get the JSON data is no longer available. Process the data
right here, instead, and just reference it when displaying the results in ResultsDashboard.prototype._processData.
* Animometer/resources/extensions.js:
(Array.prototype.fill.Array.prototype.fill): Add a null check. Remove braces around single-line clause.
(Array.prototype.find.Array.prototype.find): Update the null check.
(ResultsDashboard.prototype._processData): Use the already-processed data.
* Animometer/resources/runner/animometer.css:
(.frame-container > iframe): Remove calc().

Move Array functions to extensions.js since that is included by the harness.
Add ES6 Array polyfills.

* Animometer/resources/algorithm.js:
(Array.prototype.swap): Moved to extensions.js.
* Animometer/resources/extensions.js:
(Array.prototype.swap):
(Array.prototype.fill): Added.
(Array.prototype.find): Added.

Adjust styles for iPad.

* Animometer/resources/runner/animometer.css:
(@media screen and (min-device-width: 768px)): Apply to iPad as well.
(@media screen and (max-device-width: 1024px)): Update width for iPads.

Adjustment styles for iOS.

* Animometer/developer.html: Different divs contain the iframe, so use a class instead and
update the style rules.
* Animometer/index.html:
* Animometer/resources/debug-runner/animometer.css: Remove extraneous rules.
(@media screen and (min-device-width: 1800px)): Move this up.
* Animometer/resources/runner/animometer.css: Add rules to accomodate iOS.

Get rid of prefixed flex properties for now.

* Animometer/resources/debug-runner/animometer.css:
* Animometer/resources/runner/animometer.css:

Update the structure of the harness. Remove the JSON-per-test but keep
the JSON of the whole test run. Use the full page in order to display
the graph.

* Animometer/developer.html: Update several of the JS file includes to UTF-8. Remove header and footer. Test results screen includes score,
average, and worst 5% statistics.
* Animometer/index.html: Make structure similar to developer.html.
* Animometer/resources/debug-runner/animometer.css: Remove most of the
button rules since they are superfluous. Move the progress bar to the
top, fixed. Update the results page rules.
* Animometer/resources/debug-runner/animometer.js: Remove most of the
additions to sectionsManager since they are no longer needed.
(setSectionHeader): Updates header of the section.
(window.suitesManager._updateStartButtonState): Update selector.
(showResults): Add keypress event for selecting different data for
copy/paste. Update how the results are populated. Include full test
JSON in a textarea, rather than requiring a button press.
(showTestGraph):
* Animometer/resources/debug-runner/tests.js: Update structure of Headers. Define different kinds of headers. Headers can control their
title, and the text used as the cell contents, including class name.
* Animometer/resources/extensions.js:
(ResultsTable): Update to include a flattened version of the headers,
used while populating table contents. Remove unneeded helper functions
for creating the table. Rename "show" to "add".
* Animometer/resources/runner/animometer.css: Update rules to
accommodate the new structure.
* Animometer/resources/runner/animometer.js:
(window.sectionsManager.setSectionScore): Helper function to set the
score and mean for a section.
(window.sectionsManager.populateTable): Helper function to set the table.
(window.benchmarkController.showResults): Refactor.
(window.benchmarkController.selectResults): Update selectors.
* Animometer/resources/runner/tests.js: Set Headers. Debug harness
extends it.

Update debug runner to have similar names to the basic runner. Include
that page's CSS and remove extraneous CSS rules.

Get rid of the statistics table #record.

* Animometer/developer.html: Rename #home to #intro. Rename .spacer to hr.
* Animometer/resources/debug-runner/animometer.css: Set to flexbox when selected.
* Animometer/resources/debug-runner/animometer.js: Remove recordTable.
(window.suitesManager._updateStartButtonState): Update selector to #intro.
(setupRunningSectionStyle): Deleted.

* Animometer/resources/runner/animometer.css:
(#test-container.selected): Change to flex-box only when visible.

Remove recordTable.
* Animometer/resources/debug-runner/benchmark-runner.js:
(BenchmarkRunner.prototype._runTestAndRecordResults):
* Animometer/resources/runner/tests.js:
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
* Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
* Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
* Animometer/tests/examples/resources/canvas-electrons.js:
* Animometer/tests/examples/resources/canvas-stars.js:
* Animometer/tests/misc/resources/compositing-transforms.js:
* Animometer/tests/resources/main.js:
* Animometer/tests/resources/stage.js:
(StageBenchmark): Remove _recordTable.
* Animometer/tests/simple/resources/simple-canvas-paths.js:
* Animometer/tests/simple/resources/simple-canvas.js:
* Animometer/tests/template/resources/template-canvas.js:
* Animometer/tests/template/resources/template-css.js:
* Animometer/tests/template/resources/template-svg.js:
* Animometer/tests/text/resources/layering-text.js:

* Animometer/resources/debug-runner/animometer.js:
(willStartFirstIteration): Fix selector, since results-table is used
in multiple places, so it cannot be an id.

Make it possible to select the scores, or the whole table data,
by cycling through different selections through key press of 's'.

* Animometer/resources/runner/animometer.js:
(window.benchmarkController.showResults): Attach a keypress handler
if it hasn't been added already.
(window.benchmarkController.selectResults):
* Animometer/resources/runner/tests.js: Cycle through different
ranges.

Fix a few fly-by errors.

* Animometer/resources/debug-runner/benchmark-runner.js:
(BenchmarkRunnerState.prototype.prepareCurrentTest): Update the frame relative path
since the files are now in the top directory instead of inside runner/.
(BenchmarkRunner.prototype._runTestAndRecordResults): Incorrect reference to function.
(BenchmarkRunner.prototype.step): Member variable is never used.

A little stylistic cleanup.

* Animometer/resources/debug-runner/benchmark-runner.js:
* Animometer/resources/extensions.js:
(window.DocumentExtension.createElement):
* Animometer/tests/resources/main.js:
(Benchmark.prototype.record):
* Animometer/tests/resources/stage.js:
(StageBenchmark.prototype.showResults): Reverse progress and message.
The message appears less frequently than the progress.
* Animometer/tests/simple/resources/simple-canvas.js:
(SimpleCanvasBenchmark): Remove unused options.

Add newer version of harness in a new page. Consolidate differences between the two
pages.

* Animometer/developer.html: Include runner/animometer.js. Rename the JS function
to run the benchmark to startBenchmark() instead of startTest(). Rename #running to
#test-container.
* Animometer/index.html: Added. Similarly calls startBenchmark() and has #test-container.
* Animometer/resources/debug-runner/animometer.css: Make the canvas 2:1 (1200px x 800px)
instead of 4:3.

Split out benchmarkRunnerClient and benchmarkController.

* Animometer/resources/debug-runner/animometer.js: Move needed functions out of
benchmarkRunnerClient, and leave the rest here to extend that object. Get rid of _resultsTable
and move populating the results table into benchmarkController. Rename _resultsDashboard
to results and make it accessible for other objects to use.
(willAddTestFrame): This is unnecessary. Remove.

(window.sectionsManager.showScore): Grab it from the results object instead of
benchmarkRunnerClient.
(window.sectionsManager.showSection): Deleted. Moved to runner/animometer.js.

(window.benchmarkController._runBenchmark): Deleted. Mostly moved into _startBenchmark.
(window.benchmarkController.startBenchmark): Refactor to call _startBenchmark.
(window.benchmarkController.showResults): Include most of benchmarkRunnerClient.didFinishLastIteration()
here.

* Animometer/resources/debug-runner/benchmark-runner.js:
(BenchmarkRunner.prototype._appendFrame): Remove unneeded call to willAddTestFrame.
* Animometer/resources/extensions.js:
(ResultsDashboard): Change the class to process the sampler data on-demand and hold onto that data
for later referencing.
(ResultsDashboard.prototype.toJSON): Deleted.
(ResultsDashboard.prototype._processData): Rename toJSON to _processData since it's not really
outputting JSON. Store the processed data into a member variable that can be referenced later.
(ResultsDashboard.prototype.get data): Process the data if it hasn't already.
(ResultsDashboard.prototype.get score): Process the data if it hasn't already, then return the
aggregate score.
(ResultsTable.prototype._showHeader): When outputting the results to a table, don't force the
need for an empty children array. This was to allow for a header row in the table that spanned
multiple columns. In the simpler harness, this is not needed.
(ResultsTable.prototype._showEmptyCells):
(ResultsTable.prototype._showTest): This hardcoded the columns. At least for the name and score,
which is the bare minimum needed for the simpler harness, key off of the header name provided.
* Animometer/resources/runner/animometer.css: Added. Use a similar 2:1 ratio. The score tables are
split into the data and the headers, and are also displayed RTL so that a later patch allows a
user to copy-paste the data easily.
* Animometer/resources/runner/animometer.js: Added. Use a simpler version of benchmarkRunnerClient.
The debug harness will extend these classes.
(window.benchmarkController._startBenchmark): Used by both harnesses.
(window.benchmarkController.startBenchmark): Set hard-coded options.
(window.benchmarkController.showResults): Includes most of benchmarkRunnerClient.didFinishLastIteration()
here.

Get rid of utilities.js. Move it all into extensions.js.

* Animometer/resources/extensions.js:
* Animometer/tests/resources/utilities.js: Removed.

* Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Remove script link.
* Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Ditto.
* Animometer/tests/bouncing-particles/bouncing-css-images.html: Ditto.
* Animometer/tests/bouncing-particles/bouncing-css-shapes.html: Ditto.
* Animometer/tests/bouncing-particles/bouncing-svg-images.html: Ditto.
* Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Ditto.
* Animometer/tests/examples/canvas-electrons.html: Ditto.
* Animometer/tests/examples/canvas-stars.html: Ditto.
* Animometer/tests/misc/compositing-transforms.html: Ditto.
* Animometer/tests/simple/simple-canvas-paths.html: Ditto.
* Animometer/tests/template/template-canvas.html: Ditto.
* Animometer/tests/template/template-css.html: Ditto.
* Animometer/tests/template/template-svg.html: Ditto.
* Animometer/tests/text/layering-text.html: Ditto.

Split tests.js into two. Add a new suite to runner/tests.js.

* Animometer/developer.html: Update the script order. Scripts from
debug-runner/ will always build on those from runner/, and have the
same name.
* Animometer/resources/debug-runner/tests.js: Move "complex examples"
suite into "miscellaneous tests".
(Suite): Deleted.
(Suite.prototype.prepare): Deleted.
(Suite.prototype.run): Deleted.
(suiteFromName): Deleted.
* Animometer/resources/runner/tests.js: Added. Take definitions and
functions needed by the test harness. Leave the test suites behind.
(Suite): Moved from debug script.
(Suite.prototype.prepare): Ditto.
(Suite.prototype.run): Ditto.
(suiteFromName): Ditto.
(testFromName): Ditto.

Move benchmark resources out into resources/debug-runner, and update URLs.

* Animometer/developer.html: Renamed from PerformanceTests/Animometer/runner/animometer.html.
* Animometer/resources/debug-runner/animometer.css: Renamed from PerformanceTests/Animometer/runner/resources/animometer.css.
* Animometer/resources/debug-runner/animometer.js: Renamed from PerformanceTests/Animometer/runner/resources/animometer.js.
* Animometer/resources/debug-runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/runner/resources/benchmark-runner.js.
* Animometer/resources/debug-runner/d3.min.js: Renamed from PerformanceTests/Animometer/runner/resources/d3.min.js.
* Animometer/resources/debug-runner/graph.js: Renamed from PerformanceTests/Animometer/runner/resources/graph.js.
* Animometer/resources/debug-runner/tests.js: Renamed from PerformanceTests/Animometer/runner/resources/tests.js.

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

3 years agoSVN checkout used by RunBenchmark should be non-interactive
dewei_zhu@apple.com [Thu, 24 Dec 2015 01:10:55 +0000 (01:10 +0000)]
SVN checkout used by RunBenchmark should be non-interactive
https://bugs.webkit.org/show_bug.cgi?id=152542

Reviewed by Ryosuke Niwa.

RunBenchmark should not require user interaction while running.

* Scripts/webkitpy/benchmark_runner/benchmark_builder.py:
(BenchmarkBuilder._checkout_with_subversion):

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

3 years agoREGRESSION (r187593): Scroll position jumps when selecting text in an iframe
simon.fraser@apple.com [Thu, 24 Dec 2015 00:35:04 +0000 (00:35 +0000)]
REGRESSION (r187593): Scroll position jumps when selecting text in an iframe
https://bugs.webkit.org/show_bug.cgi?id=152541
rdar://problem/23886181

Reviewed by Tim Horton.

Source/WebCore:

r154382 added code that modifies parentLayer traversal, looking for ancestor
scrollable layers. However, it confusingly added another code path in which
the ancestor layer traversal cross a frame boundary, when RenderLayer::scrollRectToVisible()
already has one. I fixed this new location to adjust the rect coordinates in r187593,
but then code that hit both crossing points double-mapped the coordinates, causing
autoscroll jumping.

Fix by reverting r154382 and r187593, going back to doing the ancestor walk in
one place. Re-fix r154382 by implementing RenderLayer::allowsCurrentScroll(),
which contains the logic for line clamp, autoscroll and ensuring that overflow:hidden
can be programmatically scrolled.

Form controls are special; they can have overflow:hidden but still be user-scrollable
during autoscroll; this is handled via the confusingly-named canBeProgramaticallyScrolled().
RenderTextControlSingleLine implements this to ensure that readonly text inputs
autoscroll (which is exercised by a test).

The frame-to-parent-frame rect mapping in RenderLayer::scrollRectToVisible() is
fixed to use the coordinate mapping functions from Widget/ScrollView, with the
addition of a new utility function contentsToContainingViewContents().

A "Scrolling" logging channel is added with a few log points.

Test: fast/events/autoscroll-in-iframe-body.html

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
use contentsToContainingViewContents().
* platform/Logging.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::contentsToContainingViewContents):
* platform/ScrollView.h:
* platform/graphics/IntPoint.cpp:
(WebCore::IntPoint::constrainedBetween): New helper to constrain a point between
two other points.
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::expandedTo):
(WebCore::IntPoint::shrunkTo):
* rendering/RenderBox.cpp:
* rendering/RenderLayer.cpp:
(WebCore::parentLayerCrossFrame):
(WebCore::RenderLayer::enclosingScrollableLayer):
(WebCore::frameElementAndViewPermitScroll):
(WebCore::RenderLayer::allowsCurrentScroll):
(WebCore::RenderLayer::scrollRectToVisible):
* rendering/RenderLayer.h:
* rendering/RenderTextControlSingleLine.h:

LayoutTests:

New test for autoscrolling iframe contents (an existing test scrolled an overflow:scroll
inside an iframe, and didn't catch the bug).

* fast/events/autoscroll-in-iframe-body-expected.txt: Added.
* fast/events/autoscroll-in-iframe-body.html: Added.
* fast/forms/input-readonly-autoscroll.html: Fix a missing double quote.

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

3 years agoMinor cleanup in RenderBox::canBeProgramaticallyScrolled()
simon.fraser@apple.com [Thu, 24 Dec 2015 00:34:59 +0000 (00:34 +0000)]
Minor cleanup in RenderBox::canBeProgramaticallyScrolled()
https://bugs.webkit.org/show_bug.cgi?id=152515

Reviewed by Tim Horton.

Source/WebCore:

Remove the scrollsOverflow() check in RenderBox::canBeProgramaticallyScrolled(),
since if hasScrollableOverflow is true, scrollsOverflow() must also be true.

Factor clientWidth/Height vs. scrollWidth/Height checks into separate functions,
and call them from two places.

Added a test which is not affected by this particular change, but will verify
that a later change doesn't break anything.

Test: fast/overflow/overflow-hidden-scroll-into-view.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
(WebCore::RenderBox::canBeProgramaticallyScrolled):
* rendering/RenderBox.h:
(WebCore::RenderBox::hasHorizontalOverflow):
(WebCore::RenderBox::hasVerticalOverflow):
(WebCore::RenderBox::hasScrollableOverflowX):
(WebCore::RenderBox::hasScrollableOverflowY):

LayoutTests:

Test that programmatic scrolling works inside overflow:hidden.

* fast/overflow/overflow-hidden-scroll-into-view-expected.html: Added.
* fast/overflow/overflow-hidden-scroll-into-view.html: Added.

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

3 years agoRebaselining storage/domstorage/localstorage/delete-defineproperty-removal.html
ryanhaddad@apple.com [Thu, 24 Dec 2015 00:30:10 +0000 (00:30 +0000)]
Rebaselining storage/domstorage/localstorage/delete-defineproperty-removal.html
https://bugs.webkit.org/show_bug.cgi?id=149179

Unreviewed test gardening.

* storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt:

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

3 years agoFTL B3 should be able to run crypto-sha1 in eager mode
fpizlo@apple.com [Thu, 24 Dec 2015 00:26:04 +0000 (00:26 +0000)]
FTL B3 should be able to run crypto-sha1 in eager mode
https://bugs.webkit.org/show_bug.cgi?id=152539

Reviewed by Saam Barati.

This patch contains one real bug fix and some other fixes that are primarily there for sanity
because I don't believe they are symptomatic.

The real fix is the instruction selector's handling of Phi. It was assuming that the correct
lowering of Phi is to do nothing and the correct lowering of Upsilon is to store into the tmp
that the Phi uses. But this fails for code patterns like:

    @a = Phi()
    Upsilon(@x, ^a)
    use(@a) // this should see the value that @a had at the point that "@a = Phi()" executed.

This arises when we have a lot of Upsilons in a row and they are trying to perform a
shuffling. Prior to this change, "use(@a)" would see the new value of @a, i.e. @x. That's
wrong. So, this changes the lowering to make each Phi have a special shadow Tmp, and Upsilon
stores to it while Phi loads from it. Most of these assignments get copy-propagated by IRC,
so it doesn't really hurt us. I couldn't find any benchmarks that slowed down because of
this. In fact, I believe that the only time that this would lead to extra interference or
extra assignments is when it's actually needed to be correct.

This also contains other fixes, which are probably not for real bugs, but they make me feel
all warm and fuzzy:

- spillEverything() works again.  Previously, it didn't have all of IRC's smarts for handling
  a spill of a ZDef.  I fixed this by creating a helper phase that finds all subwidth ZDefs
  to spill slots and amends them with zero-fills of the top bits.

- IRC no longer requires precise TmpWidth analysis.  Previously, if TmpWidth gave pessimistic
  results, the subwidth ZDef bug would return.  That probably means that it was never fixed
  to begin with, since it's totally cool for just a single def or use of a tmp to cause it
  to become pessimistic. But there may still have been some subwidth ZDefs.  The way that I
  fixed this bug is to have IRC also run the ZDef fixup code that spillEverything() uses.
  This is abstracted behind the beautifully named Air::fixSpillSlotZDef().

- B3::validate() does dominance checks!  So, if you shoot yourself in the foot by using
  something before defining it, validate() will tell you.

- Air::TmpWidth is now easy to "turn off" - i.e. to make it go fully conservative. It's not
  an Option; you have to hack code. But that's better than nothing, and it's consistent with
  what we do for other super-internal compiler options that we use rarely.

- You can now run spillEverything() without hacking code.  Just use
  Options::airSpillSeverything().

* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::LowerToAir):
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Validate.cpp:
* b3/air/AirCode.h:
(JSC::B3::Air::Code::specials):
(JSC::B3::Air::Code::forAllTmps):
(JSC::B3::Air::Code::isFastTmp):
* b3/air/AirFixSpillSlotZDef.h: Added.
(JSC::B3::Air::fixSpillSlotZDef):
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::prepareForGeneration):
* b3/air/AirIteratedRegisterCoalescing.cpp:
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/air/AirTmpWidth.cpp:
(JSC::B3::Air::TmpWidth::recompute):
* jit/JITOperations.cpp:
* runtime/Options.h:

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

3 years agoNeed a story for platform-specific Args
fpizlo@apple.com [Thu, 24 Dec 2015 00:14:13 +0000 (00:14 +0000)]
Need a story for platform-specific Args
https://bugs.webkit.org/show_bug.cgi?id=152529

Reviewed by Michael Saboff.

This teaches Arg that some Arg forms are not valid on some targets. The instruction selector now
uses this to avoid immediates and addresses that the target wouldn't like.

This shouldn't change code generation on X86, but is meant as a step towards ARM64 support.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::crossesInterference):
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::addr):
(JSC::B3::Air::LowerToAir::loadPromise):
(JSC::B3::Air::LowerToAir::imm):
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirAllocateStack.cpp:
(JSC::B3::Air::allocateStack):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::Arg):
(JSC::B3::Air::Arg::imm):
(JSC::B3::Air::Arg::imm64):
(JSC::B3::Air::Arg::callArg):
(JSC::B3::Air::Arg::isValidScale):
(JSC::B3::Air::Arg::tmpIndex):
(JSC::B3::Air::Arg::withOffset):
(JSC::B3::Air::Arg::isValidImmForm):
(JSC::B3::Air::Arg::isValidAddrForm):
(JSC::B3::Air::Arg::isValidIndexForm):
(JSC::B3::Air::Arg::isValidForm):
(JSC::B3::Air::Arg::forEachTmpFast):
* b3/air/opcode_generator.rb:

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

3 years ago[JSC] Bugfix for intrinsic getters with dictionary structures.
keith_miller@apple.com [Wed, 23 Dec 2015 23:45:17 +0000 (23:45 +0000)]
[JSC] Bugfix for intrinsic getters with dictionary structures.
https://bugs.webkit.org/show_bug.cgi?id=152538

Reviewed by Mark Lam.

Intrinsic getters did not check if an object was a dictionary. This meant, if a property on
the prototype chain of a dictionary was an intrinsic getter we would IC it. Later, if a
property is added to the dictionary the IC would still return the result of the intrinsic.
The fix is to no longer IC intrinsic getters if the base object is a dictionary.

* jit/Repatch.cpp:
(JSC::tryCacheGetByID):
* tests/stress/typedarray-length-dictionary.js: Added.
(len):

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

3 years agoSource/WebCore:
bfulgham@apple.com [Wed, 23 Dec 2015 23:31:44 +0000 (23:31 +0000)]
Source/WebCore:
Avoids stack recursion when indexed propertyNames defined using Object.defineProperty are deleted.
https://bugs.webkit.org/show_bug.cgi?id=149179
<rdar://problem/22708019>.

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-12-23
Reviewed by Filip Pizlo.

* runtime/JSObject.cpp:
(JSStorage::deletePropertyByIndex was invoking Base::deleteProperty for indexed propertyNames instead of Base::deletePropertyByIndex leading to a stack recursion)

LayoutTests:
Test to check for stack recursion when indexed propertyNames defined using Object.defineProperty are deleted.
https://bugs.webkit.org/show_bug.cgi?id=149179
<rdar://problem/22708019>.

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-12-23
Reviewed by Filip Pizlo.

* storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt: Added.
* storage/domstorage/localstorage/delete-defineproperty-removal.html: Added.

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

3 years agoWeb Inspector: add support for running protocol-test.js tests on Windows
bfulgham@apple.com [Wed, 23 Dec 2015 23:25:28 +0000 (23:25 +0000)]
Web Inspector: add support for running protocol-test.js tests on Windows
https://bugs.webkit.org/show_bug.cgi?id=148037
<rdar://problem/22292237>

Reviewed by Simon Fraser.

Source/WebKit/win:

Provide API for WebKit.dll clients to request its CFBundleRef.

* WebKitCOMAPI.cpp:
(webKitBundle): Added.
* WebKitCOMAPI.h:

Tools:

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::inspectorTestStubURL): Provide implementation.

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

3 years ago[MediaStream] MediaDeviceInfo.label must be empty in some situations
eric.carlson@apple.com [Wed, 23 Dec 2015 22:51:28 +0000 (22:51 +0000)]
[MediaStream] MediaDeviceInfo.label must be empty in some situations
https://bugs.webkit.org/show_bug.cgi?id=152000

Reviewed by Brent Fulgham.

Source/WebCore:

No new tests, updated fast/mediastream/MediaDevices-enumerateDevices.html.

* Modules/mediastream/CaptureDeviceManager.cpp:
(CaptureDeviceManager::getSourcesInfo): TrackSourceInfo constructor takes persistent ID.

* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::start): If Document had an active stream track, don't bother
  checking for a persistent permission to access devices.
(WebCore::MediaDevicesRequest::didCompleteCheck): m_hasUserMediaPermission -> m_canShowLabels.
(WebCore::MediaDevicesRequest::getTrackSources): New, factored out of didCompleteCheck so it
  can be called when we don't need to check permissions.
(WebCore::MediaDevicesRequest::didCompleteRequest): m_hasUserMediaPermission -> m_canShowLabels.
* Modules/mediastream/MediaDevicesRequest.h:

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream): Call setIsActive. Register new stream with MediaStreamRegistry.
(WebCore::MediaStream::~MediaStream): Unregister stream with MediaStreamRegistry.
(WebCore::MediaStream::setIsActive): New. Set m_isActive and call Document if stream is active.
(WebCore::MediaStream::scheduleActiveStateChange): Call setIsActive.
(WebCore::MediaStream::registry): MediaStreamRegistry::registry -> MediaStreamRegistry::shared.
(WebCore::mediaStreams): Deleted. Drive-by cleanup: moved list of all streams to MediaStreamRegistry.
(WebCore::registerMediaStream): Ditto.
(WebCore::unRegisterMediaStream): Ditto.
(WebCore::MediaStream::lookUp): Ditto.
(WebCore::MediaStream::setRegistry): Ditto.
* Modules/mediastream/MediaStream.h:

* Modules/mediastream/MediaStreamRegistry.cpp:
(WebCore::MediaStreamRegistry::shared): Renamed from "registry".
(WebCore::MediaStreamRegistry::MediaStreamRegistry):
(WebCore::MediaStreamRegistry::lookUp): Moved here from MediaStream.
(WebCore::mediaStreams): Ditto.
(WebCore::MediaStreamRegistry::registerStream): Ditto.
(WebCore::MediaStreamRegistry::unregisterStream): Ditto.
(WebCore::MediaStreamRegistry::registry): Deleted.
* Modules/mediastream/MediaStreamRegistry.h:

* dom/Document.h:
(WebCore::Document::setHasActiveMediaStreamTrack): New, set m_hasHadActiveMediaStreamTrack.
(WebCore::Document::hasHadActiveMediaStreamTrack): New, return m_hasHadActiveMediaStreamTrack.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource): MediaStream::lookUp -> MediaStreamRegistry::shared().lookUp.

* platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
(WebCore::TrackSourceInfo::create): Take track persistent ID.
(WebCore::TrackSourceInfo::persistentId): New.
(WebCore::TrackSourceInfo::TrackSourceInfo): Take track persistent ID.

* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::sourceWithUID): TrackSourceInfo::create takes persistent ID.

* platform/mock/MockRealtimeMediaSource.cpp:
(WebCore::MockRealtimeMediaSource::trackSourceWithUID): Ditto.

* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp:
(WebCore::RealtimeMediaSourceCenterMac::sourceWithUID): TrackSourceInfo::create takes persistent ID.

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::setUserMediaPermission):
(WTR::InjectedBundle::setUserMediaPermissionForOrigin): New.
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setUserMediaPermissionForOrigin): New.
* WebKitTestRunner/InjectedBundle/TestRunner.h:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setUserMediaPermissionForOrigin):
(WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Add NULL check.
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Don't add
  persistent permission for origin, that can be done from script now.
* WebKitTestRunner/TestController.h:

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Add support for
  SetUserMediaPermissionForOrigin.

LayoutTests:

* fast/mediastream/MediaDevices-enumerateDevices-expected.txt:
* fast/mediastream/MediaDevices-enumerateDevices.html:

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

3 years ago[Win] Unreviewed build fix: Recognize Windows 10 variants.
bfulgham@apple.com [Wed, 23 Dec 2015 22:26:40 +0000 (22:26 +0000)]
[Win] Unreviewed build fix: Recognize Windows 10 variants.

* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo._determine_win_version):

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

3 years ago[INTL] Implement DateTime Format Functions
commit-queue@webkit.org [Wed, 23 Dec 2015 21:50:47 +0000 (21:50 +0000)]
[INTL] Implement DateTime Format Functions
https://bugs.webkit.org/show_bug.cgi?id=147606

Patch by Andy VanWagoner <andy@instructure.com> on 2015-12-23
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Initialize a UDateFormat from the generated pattern. Use udat_format()
to format the value. Make sure that the UDateFormat is cleaned up when
the DateTimeFormat is deconstructed.

* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::~IntlDateTimeFormat):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::format):
* runtime/IntlDateTimeFormat.h:

LayoutTests:

* js/intl-datetimeformat-expected.txt: Added format tests.
* js/intl-datetimeformat.html: Used utf-8.
* js/script-tests/intl-datetimeformat.js: Added format tests.

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

3 years ago[INTL] Implement String.prototype.localeCompare in ECMA-402
commit-queue@webkit.org [Wed, 23 Dec 2015 20:02:37 +0000 (20:02 +0000)]
[INTL] Implement String.prototype.localeCompare in ECMA-402
https://bugs.webkit.org/show_bug.cgi?id=147607

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2015-12-23
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Add localeCompare in builtin JavaScript that delegates comparing to Intl.Collator.
Keep existing native implementation for use if INTL flag is disabled.
For the common case where no locale or options are specified, avoid creating
a new collator and just use the prototype which is initialized with the defaults.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/StringPrototype.js: Added.
(localeCompare):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):

LayoutTests:

* js/script-tests/string-localeCompare.js:
* js/script-tests/string-prototype-properties.js: Update error message.
* js/string-localeCompare-expected.txt:
* js/string-prototype-properties-expected.txt: Update error message.
* js/string-localeCompare.html:

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

3 years agoRebaselining fast/text/emoji.html for Windows
ryanhaddad@apple.com [Wed, 23 Dec 2015 19:15:13 +0000 (19:15 +0000)]
Rebaselining fast/text/emoji.html for Windows
https://bugs.webkit.org/show_bug.cgi?id=152147

Unreviewed test gardening.

* platform/win/fast/text/emoji-expected.txt:

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

3 years agoMarking http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with...
ryanhaddad@apple.com [Wed, 23 Dec 2015 19:06:39 +0000 (19:06 +0000)]
Marking http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-* as failing on Win
https://bugs.webkit.org/show_bug.cgi?id=152411

Unreviewed test gardening.

* platform/win/TestExpectations:

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

3 years ago[Streams API] In RS during enqueuing error should be reported only if readable
calvaris@igalia.com [Wed, 23 Dec 2015 18:13:57 +0000 (18:13 +0000)]
[Streams API] In RS during enqueuing error should be reported only if readable
https://bugs.webkit.org/show_bug.cgi?id=152505

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Updated imported spec tests.

* web-platform-tests/streams-api/README.txt: Updated spec version.
* web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt: Expectations.
* web-platform-tests/streams-api/readable-streams/bad-strategies.js: Added two new tests.

Source/WebCore:

This commit fixes last spec change done in
https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3.

Test: imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.html

* Modules/streams/ReadableStreamInternals.js:
(enqueueInReadableStream): Call @errorReadableStream only if state is readable.

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

3 years ago[GTK] Unreviewed gardening
changseok.oh@collabora.com [Wed, 23 Dec 2015 16:56:13 +0000 (16:56 +0000)]
[GTK] Unreviewed gardening

RTCPeerConnection-state.html is removed after r194112. Remove failure expectations
for tests which have been passing. Add new expectations for text-combine-shrink-on-color-change.html

* platform/gtk/TestExpectations:
* platform/gtk/fast/text/text-combine-shrink-on-color-change-expected.png: Added.
* platform/gtk/fast/text/text-combine-shrink-on-color-change-expected.txt: Added.

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

3 years agoFix x86_64 after r194388
benjamin@webkit.org [Wed, 23 Dec 2015 14:03:21 +0000 (14:03 +0000)]
Fix x86_64 after r194388

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::appendShift):
(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::lowerX86Div):

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

3 years ago[JSC] Get the JavaScriptCore framework to build on ARM64 with B3 enabled
commit-queue@webkit.org [Wed, 23 Dec 2015 11:52:39 +0000 (11:52 +0000)]
[JSC] Get the JavaScriptCore framework to build on ARM64 with B3 enabled
https://bugs.webkit.org/show_bug.cgi?id=152503

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-23
Reviewed by Filip Pizlo.

It is not working but it builds.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::vand):
(JSC::ARM64Assembler::vectorDataProcessing2Source):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::add32):
(JSC::MacroAssemblerARM64::add64):
(JSC::MacroAssemblerARM64::countLeadingZeros64):
(JSC::MacroAssemblerARM64::not32):
(JSC::MacroAssemblerARM64::not64):
(JSC::MacroAssemblerARM64::zeroExtend16To32):
(JSC::MacroAssemblerARM64::signExtend16To32):
(JSC::MacroAssemblerARM64::zeroExtend8To32):
(JSC::MacroAssemblerARM64::signExtend8To32):
(JSC::MacroAssemblerARM64::addFloat):
(JSC::MacroAssemblerARM64::ceilFloat):
(JSC::MacroAssemblerARM64::branchDouble):
(JSC::MacroAssemblerARM64::branchFloat):
(JSC::MacroAssemblerARM64::divFloat):
(JSC::MacroAssemblerARM64::moveZeroToDouble):
(JSC::MacroAssemblerARM64::moveFloatTo32):
(JSC::MacroAssemblerARM64::move32ToFloat):
(JSC::MacroAssemblerARM64::moveConditionallyDouble):
(JSC::MacroAssemblerARM64::moveConditionallyFloat):
(JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):
(JSC::MacroAssemblerARM64::mulFloat):
(JSC::MacroAssemblerARM64::andDouble):
(JSC::MacroAssemblerARM64::andFloat):
(JSC::MacroAssemblerARM64::sqrtFloat):
(JSC::MacroAssemblerARM64::subFloat):
(JSC::MacroAssemblerARM64::signExtend32ToPtr):
(JSC::MacroAssemblerARM64::moveConditionally32):
(JSC::MacroAssemblerARM64::moveConditionally64):
(JSC::MacroAssemblerARM64::moveConditionallyTest32):
(JSC::MacroAssemblerARM64::moveConditionallyTest64):
(JSC::MacroAssemblerARM64::test32):
(JSC::MacroAssemblerARM64::setCarry):
(JSC::MacroAssemblerARM64::jumpAfterFloatingPointCompare):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::moveDoubleToInts):
(JSC::MacroAssemblerX86::moveIntsToDouble):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::move32ToFloat):
(JSC::MacroAssemblerX86Common::moveFloatTo32):
(JSC::MacroAssemblerX86Common::moveInt32ToPacked): Deleted.
(JSC::MacroAssemblerX86Common::movePackedToInt32): Deleted.
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::appendShift):
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirInstInlines.h:
(JSC::B3::Air::isX86DivHelperValid):
* b3/air/AirOpcode.opcodes:
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitFunctionEpilogueWithEmptyFrame):
(JSC::AssemblyHelpers::emitFunctionEpilogue):
* jit/FPRInfo.h:
(JSC::FPRInfo::toArgumentRegister):

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

3 years ago[INTL] Implement Intl.DateTimeFormat.prototype.resolvedOptions ()
commit-queue@webkit.org [Wed, 23 Dec 2015 10:48:26 +0000 (10:48 +0000)]
[INTL] Implement Intl.DateTimeFormat.prototype.resolvedOptions ()
https://bugs.webkit.org/show_bug.cgi?id=147603

Patch by Andy VanWagoner <andy@instructure.com> on 2015-12-23
Reviewed by Benjamin Poulain.

.:

* Source/cmake/OptionsWin.cmake: Disable INTL on Windows for now

Source/JavaScriptCore:

Implements InitializeDateTimeFormat and related abstract operations
using ICU. Lazy initialization is used for DateTimeFormat.prototype.
Refactor to align with Collator work.

* icu/unicode/udatpg.h: Added.
* icu/unicode/unumsys.h: Added.
* runtime/CommonIdentifiers.h:
* runtime/IntlDateTimeFormat.cpp:
(JSC::defaultTimeZone):
(JSC::canonicalizeTimeZoneName):
(JSC::localeData):
(JSC::toDateTimeOptions):
(JSC::IntlDateTimeFormat::setFormatsFromPattern):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::weekdayString):
(JSC::IntlDateTimeFormat::eraString):
(JSC::IntlDateTimeFormat::yearString):
(JSC::IntlDateTimeFormat::monthString):
(JSC::IntlDateTimeFormat::dayString):
(JSC::IntlDateTimeFormat::hourString):
(JSC::IntlDateTimeFormat::minuteString):
(JSC::IntlDateTimeFormat::secondString):
(JSC::IntlDateTimeFormat::timeZoneNameString):
(JSC::IntlDateTimeFormat::resolvedOptions):
(JSC::IntlDateTimeFormat::format):
(JSC::IntlDateTimeFormatFuncFormatDateTime): Deleted.
* runtime/IntlDateTimeFormat.h:
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatFuncFormatDateTime):
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
* runtime/IntlObject.cpp:
(JSC::resolveLocale):
(JSC::getNumberingSystemsForLocale):
* runtime/IntlObject.h:

LayoutTests:

* js/intl-datetimeformat-expected.txt: Added resolvedOptions tests.
* js/script-tests/intl-datetimeformat.js: Added resolvedOptions tests.
(string_appeared_here):

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

3 years agoContent blockers should be able to promote http to https
commit-queue@webkit.org [Wed, 23 Dec 2015 10:04:44 +0000 (10:04 +0000)]
Content blockers should be able to promote http to https
https://bugs.webkit.org/show_bug.cgi?id=148966

Patch by Chris Aljoudi <chris@chrismatic.io> and Alex Christensen <achristensen@webkit.org> on 2015-12-23
Reviewed by Benjamin Poulain.

Source/WebCore:

Test: http/tests/contentextensions/make-https.html

* contentextensions/ContentExtensionActions.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::loadAction):
* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
(WebCore::ContentExtensions::Action::deserializeType):
(WebCore::ContentExtensions::Action::serializedLength):
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* platform/URL.cpp:
(WebCore::URL::isBlankURL):
(WebCore::defaultPortsMap):
(WebCore::defaultPortForProtocol):
(WebCore::isDefaultPortForProtocol):
(WebCore::portAllowed):
* platform/URL.h:

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(WebCore::ContentExtensions::operator<<):
(TestWebKitAPI::TEST_F):

LayoutTests:

* http/tests/contentextensions/make-https-expected.txt: Added.
* http/tests/contentextensions/make-https.html: Added.
* http/tests/contentextensions/make-https.html.json: Added.

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

3 years agoREGRESSION(194382): FTL B3 no longer runs V8/encrypt
fpizlo@apple.com [Wed, 23 Dec 2015 03:22:47 +0000 (03:22 +0000)]
REGRESSION(194382): FTL B3 no longer runs V8/encrypt
https://bugs.webkit.org/show_bug.cgi?id=152519

Reviewed by Saam Barati.

A "Move Imm, Tmp" instruction should turn into "Move32 Imm, Tmp" if the Tmp is spilled to a
32-bit slot. Changing where we check isTmp() achieves this. Since all of the logic is only
relevant to when we spill without introducing a Tmp, and since a Move does not have a "Move Addr,
Addr" form, this code ensures that the logic only happens for "Tmp, Tmp" and "Imm, Tmp".

* b3/air/AirIteratedRegisterCoalescing.cpp:
* dfg/DFGOperations.cpp:

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

3 years ago[EFL] ewk_application_cache_manager test failed after r193812
hs85.jeong@samsung.com [Wed, 23 Dec 2015 02:54:39 +0000 (02:54 +0000)]
[EFL] ewk_application_cache_manager test failed after r193812
https://bugs.webkit.org/show_bug.cgi?id=152498

Reviewed by Gyuyoung Kim.

Need to enable the offline_web_application_cache for the ewk_application_cache_manager test.

* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(TEST_F):

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

3 years agoFTL B3 should use the right type for comparison slow paths
fpizlo@apple.com [Wed, 23 Dec 2015 02:33:48 +0000 (02:33 +0000)]
FTL B3 should use the right type for comparison slow paths
https://bugs.webkit.org/show_bug.cgi?id=152521

Reviewed by Saam Barati.

Fixes a small goof that was leading to B3 validation failures.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::nonSpeculativeCompare):

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

3 years agoFTL B3 should be able to run richards
fpizlo@apple.com [Wed, 23 Dec 2015 01:50:19 +0000 (01:50 +0000)]
FTL B3 should be able to run richards
https://bugs.webkit.org/show_bug.cgi?id=152514

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This came down to a liveness bug and a register allocation bug.

The liveness bug was that the code that determined whether we should go around the fixpoint
assumed that BitVector::quickSet() would return true if the bit changed state from false to
true. That's not how it works. It returns the old value of the bit, so it will return false
if the bit changed from false to true. Since there is already a lot of code that relies on
this behavior, I fixed Liveness instead of changing BitVector.

The register allocation bug was that we weren't guarding some checks of tmp()'s with checks
that the Arg isTmp().

The liveness took a long time to track down, and I needed to add a lot of dumping to do it.
It's now possible to dump more of the liveness states, including liveAtHead. I found this
extremely helpful, so I removed the code that cleared liveAtHead.

* b3/air/AirIteratedRegisterCoalescing.cpp:
* b3/air/AirLiveness.h:
(JSC::B3::Air::AbstractLiveness::AbstractLiveness):
(JSC::B3::Air::AbstractLiveness::Iterable::Iterable):
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::iterator):
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::operator*):
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::operator++):
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::operator==):
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::operator!=):
(JSC::B3::Air::AbstractLiveness::Iterable::begin):
(JSC::B3::Air::AbstractLiveness::Iterable::end):
(JSC::B3::Air::AbstractLiveness::liveAtHead):
(JSC::B3::Air::AbstractLiveness::liveAtTail):
* b3/air/AirStackSlot.h:
(WTF::printInternal):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileFTLOSRExit):

Source/WTF:

Change the list dumping helpers to work with a broader set of list kinds.

* wtf/ListDump.h:
(WTF::ListDump::dump):
(WTF::MapDump::dump):
(WTF::sortedMapDump):
(WTF::ListDumpInContext::dump):

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

3 years ago[EFL] MiniBrowser should be able to choose the offline-web-application-cache option
hs85.jeong@samsung.com [Wed, 23 Dec 2015 01:36:03 +0000 (01:36 +0000)]
[EFL] MiniBrowser should be able to choose the offline-web-application-cache option
https://bugs.webkit.org/show_bug.cgi?id=152516

Reviewed by Gyuyoung Kim.

* MiniBrowser/efl/main.c:

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

3 years agoTry to fix the iOS build after r194378
aestes@apple.com [Wed, 23 Dec 2015 00:34:35 +0000 (00:34 +0000)]
Try to fix the iOS build after r194378

* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

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

3 years ago[CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI
aestes@apple.com [Tue, 22 Dec 2015 23:52:00 +0000 (23:52 +0000)]
[CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI
https://bugs.webkit.org/show_bug.cgi?id=152463

Reviewed by Alexey Proskuryakov.

Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward
declared in CFNetworkSPI.h.

Source/WebCore:

Also removed some unused declarations and renamed ResourceResponseMac.mm to ResourceResponseCocoa.mm.

* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/network/NetworkStorageSession.h:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::copyCredentialFromProtectionSpace):
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::cookieStorage):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):
(WebCore::initializeMaximumHTTPConnectionCountPerHost):
(WebCore::initializeHTTPConnectionSettingsOnStartup):
* platform/network/cf/ResourceRequestCFNet.h:
(WebCore::toResourceLoadPriority):
(WebCore::toPlatformRequestPriority):
* platform/network/cf/ResourceResponse.h:
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformCertificateInfo):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* platform/network/cocoa/ResourceResponseCocoa.mm: Renamed from Source/WebCore/platform/network/mac/ResourceResponseMac.mm.
(WebCore::ResourceResponse::platformCertificateInfo):
(WebCore::copyNSURLResponseStatusLine):
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/ios/QuickLook.h:
* platform/network/ios/QuickLook.mm:
* platform/network/ios/WebCoreURLResponseIOS.mm:
(WebCore::adjustMIMETypeIfNecessary):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
* platform/network/mac/WebCoreURLResponse.h:
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::adjustMIMETypeIfNecessary):
* platform/spi/cf/CFNetworkConnectionCacheSPI.h:
* platform/spi/cf/CFNetworkSPI.h:

Source/WebKit/mac:

* Plugins/Hosted/HostedNetscapePluginStream.mm:
(WebKit::HostedNetscapePluginStream::didReceiveResponse):
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::didReceiveResponse):
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebView/WebPreferences.mm:
(+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):

Source/WebKit2:

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::initializeNetworkSettings):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::overrideSystemProxies):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

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

3 years ago[GTK] Everything broken in GTK+ 3.19
mcatanzaro@igalia.com [Tue, 22 Dec 2015 23:15:25 +0000 (23:15 +0000)]
[GTK] Everything broken in GTK+ 3.19
https://bugs.webkit.org/show_bug.cgi?id=150550

Reviewed by Carlos Garcia Campos.

Port RenderThemeGtk and ScrollbarThemeGtk to use CSS nodes. This makes it possible to render
stuff with modern GTK+.

No new tests. We already have tons of tests for this functionality, but we're running them
with GTK+ 3.16, so they cannot have detected this breakage. These fixes require unreleased
GTK+, and GTK+ rendering is currently in a state of flux; once things settle down, we can
consider upgrading the GTK+ used for our layout tests.

* platform/gtk/GRefPtrGtk.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* platform/gtk/GRefPtrGtk.h:
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::themeChanged):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::orientationStyleClass):
(WebCore::applyScrollbarStyleContextClasses):
(WebCore::ScrollbarThemeGtk::paintTrackBackground):
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paintButton):
* rendering/RenderThemeGtk.cpp:
(WebCore::createStyleContext):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::applySliderStyleContextClasses):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::paintSpinArrowButton):
(WebCore::styleColor):

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

3 years agoCloop build fix after https://bugs.webkit.org/show_bug.cgi?id=152511.
sbarati@apple.com [Tue, 22 Dec 2015 23:12:43 +0000 (23:12 +0000)]
Cloop build fix after https://bugs.webkit.org/show_bug.cgi?id=152511.

Unreviewed build fix.

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

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

3 years agoUnreviewed: Add John Wilander as a contributor.
bfulgham@apple.com [Tue, 22 Dec 2015 22:48:31 +0000 (22:48 +0000)]
Unreviewed: Add John Wilander as a contributor.

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

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

3 years agoWork around issue in bug #152510
sbarati@apple.com [Tue, 22 Dec 2015 22:19:31 +0000 (22:19 +0000)]
Work around issue in bug #152510
https://bugs.webkit.org/show_bug.cgi?id=152511

Reviewed by Filip Pizlo.

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

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

3 years agoFTL B3 does not logicalNot correctly
fpizlo@apple.com [Tue, 22 Dec 2015 21:59:59 +0000 (21:59 +0000)]
FTL B3 does not logicalNot correctly
https://bugs.webkit.org/show_bug.cgi?id=152512

Reviewed by Saam Barati.

Source/JavaScriptCore:

I'm working on a bug where V8/richards does not run correctly. I noticed that the codegen was
doing a log of Not32's followed by branches, which smelled like badness. To debug this, I
needed B3's origins to dump as something other than a hexed pointer to a node. The node index
would be better. So, I added the notion of an origin printer to Procedure.

The bug was easy enough to fix. This introduces Output::logicalNot(). In LLVM, it's the same
as bitNot(). In B3, it's compiled to Equal(value, 0). We could have also compiled it to
BitXor(value, 1), except that B3 will strength-reduce to that anyway whenever it's safe. It's
sort of nice that right now, you could use logicalNot() on non-bool values and get C-like
behavior.

Richards still doesn't run, though. There are more bugs!

* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3BasicBlock.cpp:
(JSC::B3::BasicBlock::dump):
(JSC::B3::BasicBlock::deepDump):
* b3/B3BasicBlock.h:
(JSC::B3::BasicBlock::frequency):
(JSC::B3::DeepBasicBlockDump::DeepBasicBlockDump):
(JSC::B3::DeepBasicBlockDump::dump):
(JSC::B3::deepDump):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Origin.h:
(JSC::B3::Origin::data):
* b3/B3OriginDump.h: Added.
(JSC::B3::OriginDump::OriginDump):
(JSC::B3::OriginDump::dump):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::~Procedure):
(JSC::B3::Procedure::printOrigin):
(JSC::B3::Procedure::addBlock):
(JSC::B3::Procedure::dump):
* b3/B3Procedure.h:
(JSC::B3::Procedure::setOriginPrinter):
* b3/B3Value.cpp:
(JSC::B3::Value::dumpChildren):
(JSC::B3::Value::deepDump):
* b3/B3Value.h:
(JSC::B3::DeepValueDump::DeepValueDump):
(JSC::B3::DeepValueDump::dump):
(JSC::B3::deepDump):
* ftl/FTLB3Output.cpp:
(JSC::FTL::Output::lockedStackSlot):
(JSC::FTL::Output::bitNot):
(JSC::FTL::Output::logicalNot):
(JSC::FTL::Output::load):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::aShr):
(JSC::FTL::Output::lShr):
(JSC::FTL::Output::ctlz32):
(JSC::FTL::Output::addWithOverflow32):
(JSC::FTL::Output::lessThanOrEqual):
(JSC::FTL::Output::doubleEqual):
(JSC::FTL::Output::doubleEqualOrUnordered):
(JSC::FTL::Output::doubleNotEqualOrUnordered):
(JSC::FTL::Output::doubleLessThan):
(JSC::FTL::Output::doubleLessThanOrEqual):
(JSC::FTL::Output::doubleGreaterThan):
(JSC::FTL::Output::doubleGreaterThanOrEqual):
(JSC::FTL::Output::doubleNotEqualAndOrdered):
(JSC::FTL::Output::doubleLessThanOrUnordered):
(JSC::FTL::Output::doubleLessThanOrEqualOrUnordered):
(JSC::FTL::Output::doubleGreaterThanOrUnordered):
(JSC::FTL::Output::doubleGreaterThanOrEqualOrUnordered):
(JSC::FTL::Output::isZero32):
(JSC::FTL::Output::notZero32):
(JSC::FTL::Output::addIncomingToPhi):
(JSC::FTL::Output::bitCast):
(JSC::FTL::Output::bitNot): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckArray):
(JSC::FTL::DFG::LowerDFGToLLVM::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToLLVM::compileLogicalNot):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInstanceOfCustom):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCountExecution):
(JSC::FTL::DFG::LowerDFGToLLVM::boolify):
(JSC::FTL::DFG::LowerDFGToLLVM::isMisc):
(JSC::FTL::DFG::LowerDFGToLLVM::isNotBoolean):
(JSC::FTL::DFG::LowerDFGToLLVM::isBoolean):
(JSC::FTL::DFG::LowerDFGToLLVM::unboxBoolean):
(JSC::FTL::DFG::LowerDFGToLLVM::isNotType):
(JSC::FTL::DFG::LowerDFGToLLVM::speculateObject):
* ftl/FTLOutput.h:
(JSC::FTL::Output::aShr):
(JSC::FTL::Output::lShr):
(JSC::FTL::Output::bitNot):
(JSC::FTL::Output::logicalNot):
(JSC::FTL::Output::insertElement):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):

Source/WTF:

This change introduces yet another use of SharedTask in JSC. While doing this, I noticed that
SharedTask::run() always demands that whatever arguments the callback takes, they must be
passed as rvalue references. This was a clear misuse of perfect forwarding. This change makes
SharedTask's approach to forwarding match what we were already doing in ScopedLambda.

* wtf/SharedTask.h:

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

3 years ago[MediaStream] MediaStreamTrackPrivate.source should be a reference
eric.carlson@apple.com [Tue, 22 Dec 2015 21:45:49 +0000 (21:45 +0000)]
[MediaStream] MediaStreamTrackPrivate.source should be a reference
https://bugs.webkit.org/show_bug.cgi?id=152509

Reviewed by Tim Horton.

No new tests, no functional change.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::trackVectorForType):
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::create):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::didCreateStream):
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::platformLayer):
(WebCore::MediaStreamPrivate::currentFrameImage):
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
* platform/mediastream/MediaStreamTrackPrivate.h:
(WebCore::MediaStreamTrackPrivate::source):

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

3 years agoUnreviewed, rolling out r194362.
commit-queue@webkit.org [Tue, 22 Dec 2015 20:37:33 +0000 (20:37 +0000)]
Unreviewed, rolling out r194362.
https://bugs.webkit.org/show_bug.cgi?id=152508

crashes release bot (Requested by mcatanzaro on #webkit).

Reverted changeset:

"[GTK] Everything broken in GTK+ 3.19"
https://bugs.webkit.org/show_bug.cgi?id=150550
http://trac.webkit.org/changeset/194362

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

3 years agoRemove OverridesHasInstance from TypeInfoFlags
keith_miller@apple.com [Tue, 22 Dec 2015 20:04:56 +0000 (20:04 +0000)]
Remove OverridesHasInstance from TypeInfoFlags
https://bugs.webkit.org/show_bug.cgi?id=152005

Reviewed by Saam Barati.

Currently, we have three TypeInfo flags associated with instanceof behavior,
ImplementsHasInstance, ImplementDefaultHasInstance, and OverridesHasInstance. This patch
removes the third and moves the first to the out of line flags. In theory, we should only
need one flag but removing ImplementsHasInstance is more involved and should be done in a
separate patch.

Source/JavaScriptCore:

* API/JSCallbackConstructor.h:
* API/JSCallbackObject.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_overrides_has_instance):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_overrides_has_instance):
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LowLevelInterpreter.asm:
* runtime/InternalFunction.h:
* runtime/JSBoundFunction.h:
* runtime/JSCallee.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::implementsHasInstance):
(JSC::TypeInfo::TypeInfo): Deleted.
(JSC::TypeInfo::overridesHasInstance): Deleted.
* runtime/NumberConstructor.h:

Source/WebCore:

* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):

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

3 years agoFTL B3 should do tail calls
fpizlo@apple.com [Tue, 22 Dec 2015 20:03:13 +0000 (20:03 +0000)]
FTL B3 should do tail calls
https://bugs.webkit.org/show_bug.cgi?id=152494

Reviewed by Michael Saboff.

OMG this was so easy.

The only shady part is that I broke a layering rule that we had so far been following: B3 was
sitting below the JSC runtime, and did not use JS-specific types. No more, since B3::ValueRep
can now turn itself into a ValueRecovery for a JSValue. This small feature makes a huge
difference for the readability of tail call code: it makes it plain that the call frame
shuffler is basically just directly consuming the stackmap generation params, and insofar as
there is any data transformation, it's just because it uses different classes to say the same
thing.

I think we should avoid adding too many JS-specific things to B3. But, so long as it's still
possible to use B3 to compile things that aren't JS, I think we'll be fine.

* b3/B3ValueRep.cpp:
(JSC::B3::ValueRep::dump):
(JSC::B3::ValueRep::emitRestore):
(JSC::B3::ValueRep::recoveryForJSValue):
* b3/B3ValueRep.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileTailCall):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
* test/stress/ftl-tail-call.js: Added.

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

3 years agoAllow JavaScript to iterate over plugins for local SecurityOrigins
bfulgham@apple.com [Tue, 22 Dec 2015 19:37:50 +0000 (19:37 +0000)]
Allow JavaScript to iterate over plugins for local SecurityOrigins
https://bugs.webkit.org/show_bug.cgi?id=152489

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Instead of calling 'isLocalFile' on the URL, we check the Document's SecurityOrigin. If
no origin exists, we construct a SecurityOrigin from the URL, and check whether it
satisfies 'isLocal'.

* page/Page.cpp:
(WebCore::Page::showAllPlugins): Revised to use SecurityOrigin.

Source/WebKit2:

The 'getWebVisiblePluginInfo' is filtering plugins, even when we want to list
all plugins. To avoid this, we check the Document's SecurityOrigin. If no such
origin exists, we construct a SecurityOrigin from the URL.

If the relevant SecurityOrigin satsifies 'isLocal', we show all plugins.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):

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

3 years ago[Streams API] Fix cosmetic things after importing spec tests
calvaris@igalia.com [Tue, 22 Dec 2015 18:20:49 +0000 (18:20 +0000)]
[Streams API] Fix cosmetic things after importing spec tests
https://bugs.webkit.org/show_bug.cgi?id=152479

Reviewed by Youenn Fablet.

Spec version are mainly updated in this patch as it wasn't done when importing tests from the spec. Some other
minor changes were done, as renumbering some tests, removing some orphan expectations and other styling issues.

* streams/brand-checks.html:
* streams/pipe-to.html:
* streams/readable-stream-controller-error.html:
* streams/readable-stream-pipeThrough.html:
* streams/readable-stream-reader-read.html:
* streams/reference-implementation/abstract-ops.html:
* streams/reference-implementation/bad-strategies.html:
* streams/reference-implementation/bad-underlying-sinks.html:
* streams/reference-implementation/bad-underlying-sources-expected.txt: Removed.
* streams/reference-implementation/brand-checks.html:
* streams/reference-implementation/byte-length-queuing-strategy.html:
* streams/reference-implementation/count-queuing-strategy.html:
* streams/reference-implementation/pipe-through.html:
* streams/reference-implementation/pipe-to-options.html:
* streams/reference-implementation/pipe-to.html:
* streams/reference-implementation/readable-stream-templated.html:
* streams/reference-implementation/transform-stream-errors.html:
* streams/reference-implementation/transform-stream.html:
* streams/reference-implementation/writable-stream-abort.html:
* streams/reference-implementation/writable-stream-expected.txt:
* streams/reference-implementation/writable-stream.html:

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

3 years agoMarking webgl/1.0.2/conformance/extensions/get-extension.html as flaky on mac-wk1
ryanhaddad@apple.com [Tue, 22 Dec 2015 18:15:02 +0000 (18:15 +0000)]
Marking webgl/1.0.2/conformance/extensions/get-extension.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=152506

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years ago[WK2] Looping in testcase: fast/dom/Window/property-access-on-cached-window-after...
cfleizach@apple.com [Tue, 22 Dec 2015 17:38:00 +0000 (17:38 +0000)]
[WK2] Looping in testcase: fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
https://bugs.webkit.org/show_bug.cgi?id=152482

Reviewed by Brent Fulgham.

Tools:

vertical/horizontalScrollbar returns an accessibility element. That element can also be queried
for the same property. On WK2, the element returned will not be valid, but is still present and
that can lead to looping.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::horizontalScrollbar):
(AccessibilityUIElement::verticalScrollbar):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::verticalScrollbar):

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

3 years agoSnippefy op_negate for the baseline JIT.
mark.lam@apple.com [Tue, 22 Dec 2015 16:20:48 +0000 (16:20 +0000)]
Snippefy op_negate for the baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=152447

Reviewed by Benjamin Poulain.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_op_negate):
(JSC::JIT::emitSlow_op_negate):
(JSC::JIT::emitBitBinaryOpFastPath):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_op_negate): Deleted.
(JSC::JIT::emitSlow_op_negate): Deleted.
* jit/JITNegGenerator.cpp: Added.
(JSC::JITNegGenerator::generateFastPath):
* jit/JITNegGenerator.h: Added.
(JSC::JITNegGenerator::JITNegGenerator):
(JSC::JITNegGenerator::didEmitFastPath):
(JSC::JITNegGenerator::endJumpList):
(JSC::JITNegGenerator::slowPathJumpList):

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

3 years ago[GTK] Everything broken in GTK+ 3.19
mcatanzaro@igalia.com [Tue, 22 Dec 2015 14:22:03 +0000 (14:22 +0000)]
[GTK] Everything broken in GTK+ 3.19
https://bugs.webkit.org/show_bug.cgi?id=150550

Reviewed by Carlos Garcia Campos.

Port RenderThemeGtk and ScrollbarThemeGtk to use CSS nodes. This makes it possible to render
stuff with modern GTK+.

No new tests. We already have tons of tests for this functionality, but we're running them
with GTK+ 3.16, so they cannot have detected this breakage. These fixes require unreleased
GTK+, and GTK+ rendering is currently in a state of flux; once things settle down, we can
consider upgrading the GTK+ used for our layout tests.

* platform/gtk/GRefPtrGtk.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* platform/gtk/GRefPtrGtk.h:
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::themeChanged):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::orientationStyleClass):
(WebCore::applyScrollbarStyleContextClasses):
(WebCore::ScrollbarThemeGtk::paintTrackBackground):
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paintButton):
* rendering/RenderThemeGtk.cpp:
(WebCore::createStyleContext):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::applySliderStyleContextClasses):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::paintSpinArrowButton):
(WebCore::styleColor):

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

3 years agoUnreviewed.
calvaris@igalia.com [Tue, 22 Dec 2015 09:16:24 +0000 (09:16 +0000)]
Unreviewed.

* Scripts/webkitpy/common/config/contributors.json: Marking myself as reviewer.

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

3 years agoWebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithT...
nvasilyev@apple.com [Tue, 22 Dec 2015 06:07:23 +0000 (06:07 +0000)]
WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function
https://bugs.webkit.org/show_bug.cgi?id=152471

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector._updateNewTabButtonState):
Don't use arrow functions because of https://webkit.org/b/152497 "Arrow functions: 'this' isn't lexically bound"

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

3 years ago[EFL] test_ewk2_context failed after r192808
hs85.jeong@samsung.com [Tue, 22 Dec 2015 05:50:58 +0000 (05:50 +0000)]
[EFL] test_ewk2_context failed after r192808
https://bugs.webkit.org/show_bug.cgi?id=151846

Reviewed by Gyuyoung Kim.

Source/WebKit2:

As we can make the single WebProcess behavior by setting the miximum number
of WebProcess to 1 after r192808, I remove the ewk_context_process_model_{set|get}
apis and add the ewk_context_web_process_count_limit_{set|get} apis and tests.

* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::setProcessCountLimit):
(EwkContext::processCountLimit):
(ewk_context_web_process_count_limit_set):
(ewk_context_web_process_count_limit_get):
(EwkContext::setProcessModel): Deleted.
(EwkContext::processModel): Deleted.
(ewk_context_process_model_set): Deleted.
(ewk_context_process_model_get): Deleted.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F): Changed the ewk_context_{web|network}_process_model tests to
ewk_context_{web|network}_process_count_limit tests.

Tools:

Used the added ewk_context_web_process_count_limit_set api
instead of the deprecated ewk_context_process_model_set.

* MiniBrowser/efl/main.c:
(elm_main):

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

3 years ago[WK2][EFL] Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSys...
jh718.park@samsung.com [Tue, 22 Dec 2015 03:37:07 +0000 (03:37 +0000)]
[WK2][EFL] Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSystemRepresentation
to refactor APIWebsiteDataStoreEfl
https://bugs.webkit.org/show_bug.cgi?id=152475

Reviewed by Gyuyoung Kim.

Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSystemRepresentation
instead of to use efreet_cache_home_get
and efreet_data_home_get directly.
And also use EINA_PATH_SEP_S instead of "/" as directory separator,
and WebCore::pathByAppendingComponent instead of operator+.

* UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp:
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):

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

3 years agoUnreviewed, move myself to reviewer list.
mcatanzaro@igalia.com [Tue, 22 Dec 2015 02:45:39 +0000 (02:45 +0000)]
Unreviewed, move myself to reviewer list.

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

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

3 years agoWeb Inspector: Remove unused WebInspector.Object.removeAllListeners
nvasilyev@apple.com [Tue, 22 Dec 2015 01:42:08 +0000 (01:42 +0000)]
Web Inspector: Remove unused WebInspector.Object.removeAllListeners
https://bugs.webkit.org/show_bug.cgi?id=152474

Reviewed by Timothy Hatcher.

* UserInterface/Base/Object.js:
(WebInspector.Object.removeAllListeners): Deleted.
(WebInspector.Object.prototype.removeAllListeners): Deleted.

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

3 years agoAddress review feedback from Saam. I should have landed it in r194354.
fpizlo@apple.com [Mon, 21 Dec 2015 23:49:43 +0000 (23:49 +0000)]
Address review feedback from Saam.  I should have landed it in r194354.

* b3/testb3.cpp:
(JSC::B3::testStore16Arg):

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

3 years agoB3 should be able to compile Store16
fpizlo@apple.com [Mon, 21 Dec 2015 23:40:36 +0000 (23:40 +0000)]
B3 should be able to compile Store16
https://bugs.webkit.org/show_bug.cgi?id=152493

Reviewed by Saam Barati.

This adds comprehensive Store16 support to our assembler, Air, and B3->Air lowering.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::store16):
* assembler/X86Assembler.h:
(JSC::X86Assembler::movb_rm):
(JSC::X86Assembler::movw_rm):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testStorePartial8BitRegisterOnX86):
(JSC::B3::testStore16Arg):
(JSC::B3::testStore16Imm):
(JSC::B3::testTrunc):
(JSC::B3::run):

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

3 years agoUnreviewed, remove highBitsAreZero(), it's unused.
fpizlo@apple.com [Mon, 21 Dec 2015 23:32:57 +0000 (23:32 +0000)]
Unreviewed, remove highBitsAreZero(), it's unused.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::shouldCopyPropagate):
(JSC::B3::Air::LowerToAir::highBitsAreZero): Deleted.

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

3 years agoSkipping unsupported test on ios-simulator
ryanhaddad@apple.com [Mon, 21 Dec 2015 23:05:28 +0000 (23:05 +0000)]
Skipping unsupported test on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152491

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoMarking inspector/debugger/break-on-exception-catch.html as a flaky timeout on mac...
ryanhaddad@apple.com [Mon, 21 Dec 2015 22:39:15 +0000 (22:39 +0000)]
Marking inspector/debugger/break-on-exception-catch.html as a flaky timeout on mac-wk2 debug
https://bugs.webkit.org/show_bug.cgi?id=152492

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoUnreviewed, fix the !FTL_USES_B3 build after r194334.
ossy@webkit.org [Mon, 21 Dec 2015 21:19:58 +0000 (21:19 +0000)]
Unreviewed, fix the !FTL_USES_B3 build after r194334.

* ftl/FTLLowerDFGToLLVM.cpp: Mark forwarding unused variable.
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):

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

3 years agoUnreviewed, add myself to the committers list.
aakash_jain@apple.com [Mon, 21 Dec 2015 21:14:06 +0000 (21:14 +0000)]
Unreviewed, add myself to the committers list.

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

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

3 years agoFTL B3 should do doubleToInt32
fpizlo@apple.com [Mon, 21 Dec 2015 20:54:51 +0000 (20:54 +0000)]
FTL B3 should do doubleToInt32
https://bugs.webkit.org/show_bug.cgi?id=152484

Reviewed by Saam Barati.

We used to have a DToI32 opcode in B3 that we never implemented. This removes that opcode,
since double-to-int conversion has dramatically different semantics on different
architectures. We let FTL get the conversion instruction it wants by using a patchpoint.

* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):
* b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::materialize):
* ftl/FTLB3Output.cpp:
(JSC::FTL::Output::Output):
(JSC::FTL::Output::appendTo):
(JSC::FTL::Output::lockedStackSlot):
(JSC::FTL::Output::load):
(JSC::FTL::Output::doublePowi):
(JSC::FTL::Output::hasSensibleDoubleToInt):
(JSC::FTL::Output::doubleToInt):
(JSC::FTL::Output::doubleToUInt):
(JSC::FTL::Output::load8SignExt32):
(JSC::FTL::Output::load8ZeroExt32):
(JSC::FTL::Output::load16SignExt32):
(JSC::FTL::Output::load16ZeroExt32):
(JSC::FTL::Output::store):
(JSC::FTL::Output::store32As8):
(JSC::FTL::Output::store32As16):
(JSC::FTL::Output::branch):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::doubleLog):
(JSC::FTL::Output::signExt32To64):
(JSC::FTL::Output::zeroExt):
(JSC::FTL::Output::zeroExtPtr):
(JSC::FTL::Output::intToDouble):
(JSC::FTL::Output::unsignedToDouble):
(JSC::FTL::Output::castToInt32):
(JSC::FTL::Output::hasSensibleDoubleToInt): Deleted.
(JSC::FTL::Output::sensibleDoubleToInt): Deleted.
(JSC::FTL::Output::fpToInt32): Deleted.
(JSC::FTL::Output::fpToUInt32): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithPow):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToLLVM::compileSwitch):
(JSC::FTL::DFG::LowerDFGToLLVM::doubleToInt32):
(JSC::FTL::DFG::LowerDFGToLLVM::sensibleDoubleToInt32):
(JSC::FTL::DFG::LowerDFGToLLVM::convertDoubleToInt32):
* ftl/FTLOutput.h:
(JSC::FTL::Output::hasSensibleDoubleToInt):
(JSC::FTL::Output::doubleToInt):
(JSC::FTL::Output::doubleToUInt):
(JSC::FTL::Output::signExt32To64):
(JSC::FTL::Output::zeroExt):

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

3 years agoUnexpected exception assigning to this._property inside arrow function
commit-queue@webkit.org [Mon, 21 Dec 2015 20:40:04 +0000 (20:40 +0000)]
Unexpected exception assigning to this._property inside arrow function
https://bugs.webkit.org/show_bug.cgi?id=152028

Patch by Skachkov Oleksandr <gskachkov@gmail.com> on 2015-12-21
Reviewed by Saam Barati.

Source/JavaScriptCore:

The issue appeared in case if in arrow function created base-level lexical envioronment, and in this case
|this| value was loaded from wrong scope. The problem was that loading of the |this| happened too early when
compiling bytecode because the bytecode generators's scope stack wasn't in sync with runtime scope stack.
To fix issue loading of |this| was moved after initializeDefaultParameterValuesAndSetupFunctionScopeStack
in BytecodeGenerator.cpp

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* tests/stress/arrowfunction-lexical-bind-this-2.js:

LayoutTests:

Added new test cases for arrow function, to force create lexical env in body of function.

* js/arrowfunction-lexical-bind-this-expected.txt:
* js/script-tests/arrowfunction-lexical-bind-this.js:

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

3 years agoMarking inspector/debugger/command-line-api-exception-nested-catch.html as a flaky...
ryanhaddad@apple.com [Mon, 21 Dec 2015 20:26:54 +0000 (20:26 +0000)]
Marking inspector/debugger/command-line-api-exception-nested-catch.html as a flaky timeout on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=152487

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoFactor NetworkResourceLoader code for storing a cache entry into a function
antti@apple.com [Mon, 21 Dec 2015 20:01:35 +0000 (20:01 +0000)]
Factor NetworkResourceLoader code for storing a cache entry into a function
https://bugs.webkit.org/show_bug.cgi?id=152467

Reviewed by Andreas Kling.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFinishLoading):

    Having m_cacheEntryForValidation already implies canUseCache() so remove the test from this path.
    Move storing to the end of the function so we don't delay DidFinishResourceLoad message on it.

(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):

    Factor to a function.
    Remove m_response.isHTTP() test as it is covered by NetworkCache::store().
    Remove !isPrivateSession test as it is covered by NetworkResourceLoader::canUseCache().

(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:

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

3 years agoLimit cached redirect chain length
antti@apple.com [Mon, 21 Dec 2015 19:54:46 +0000 (19:54 +0000)]
Limit cached redirect chain length
https://bugs.webkit.org/show_bug.cgi?id=152477

Reviewed by Andreas Kling.

Source/WebKit2:

Networking layer prevents cycles and limits the redirect chain length so creating cache cycles is difficult.
For robustness the network cache should still limit the maximum redirect chain length.

This patch adds a limit of five redirects both when storing and retrieving cache entries.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::canUseCache):
(WebKit::NetworkResourceLoader::canUseCachedRedirect):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:

LayoutTests:

* http/tests/cache/disk-cache/redirect-chain-limits-expected.txt: Added.
* http/tests/cache/disk-cache/redirect-chain-limits.html: Added.
* http/tests/cache/disk-cache/resources/redirect-chain.phpl: Added.

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

3 years agoMarking webaudio/audiocontext-state-interrupted.html as a flaky crasher on mac-wk1
ryanhaddad@apple.com [Mon, 21 Dec 2015 19:49:45 +0000 (19:49 +0000)]
Marking webaudio/audiocontext-state-interrupted.html  as a flaky crasher on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=152485

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoSkipping fast/events/can-click-element-on-page-with-active-pseudo-class-and-search...
ryanhaddad@apple.com [Mon, 21 Dec 2015 19:20:22 +0000 (19:20 +0000)]
Skipping fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152449

Unreviewed teset gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoFTL B3 should do vararg calls
fpizlo@apple.com [Mon, 21 Dec 2015 18:56:54 +0000 (18:56 +0000)]
FTL B3 should do vararg calls
https://bugs.webkit.org/show_bug.cgi?id=152468

Reviewed by Benjamin Poulain.

This adds FTL->B3 lowering of all kinds of varargs calls - forwarding or not, tail or not,
and construct or not. Like all other such lowerings, all of the code is in one place in
FTLLower.

I removed code for varargs and exception spill slots from the B3 path, since it won't need
it. The plan is to rely on B3 doing the spilling for us by using some combination of early
clobber and late use.

This adds ValueRep::emitRestore(), a helpful method for emitting code to restore any ValueRep
into any 64-bit Reg (FPR or GPR).

I wrote new tests for vararg calls, because I wasn't sure which of the existing ones we can
run. These are short-running tests, so I'm not worried about bloating our test suite.

* b3/B3ValueRep.cpp:
(JSC::B3::ValueRep::dump):
(JSC::B3::ValueRep::emitRestore):
* b3/B3ValueRep.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
* ftl/FTLState.h:
* tests/stress/varargs-no-forward.js: Added.
* tests/stress/varargs-simple.js: Added.
* tests/stress/varargs-two-level.js: Added.

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

3 years agoAdd unary operator tests to compare JIT and LLINT results.
mark.lam@apple.com [Mon, 21 Dec 2015 18:40:10 +0000 (18:40 +0000)]
Add unary operator tests to compare JIT and LLINT results.
https://bugs.webkit.org/show_bug.cgi?id=152453

Reviewed by Benjamin Poulain.

Also fixed a few things in the binary-op-test.js.

* tests/stress/op_negate.js: Added.
(o1.valueOf):
* tests/stress/op_postdec.js: Added.
(o1.valueOf):
* tests/stress/op_postinc.js: Added.
(o1.valueOf):
* tests/stress/op_predec.js: Added.
(o1.valueOf):
* tests/stress/op_preinc.js: Added.
(o1.valueOf):
* tests/stress/resources/binary-op-test.js:
(stringifyIfNeeded):
(isIdentical):
(run):
* tests/stress/resources/unary-op-test.js: Added.
(stringifyIfNeeded):
(generateBinaryTests):
(isIdentical):
(runTest):
(run):

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

3 years agoUnreviewed, rolling out r194328.
ryanhaddad@apple.com [Mon, 21 Dec 2015 18:20:58 +0000 (18:20 +0000)]
Unreviewed, rolling out r194328.

This change appears to have caused failures in JSC tests

Reverted changeset:

"[INTL] Implement String.prototype.localeCompare in ECMA-402"
https://bugs.webkit.org/show_bug.cgi?id=147607
http://trac.webkit.org/changeset/194328

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

3 years agoB3->Air lowering incorrectly copy-propagates over ZExt32's
fpizlo@apple.com [Mon, 21 Dec 2015 16:16:01 +0000 (16:16 +0000)]
B3->Air lowering incorrectly copy-propagates over ZExt32's
https://bugs.webkit.org/show_bug.cgi?id=152365

Reviewed by Benjamin Poulain.

The instruction selector thinks that Value's that return Int32's are going to always be lowered
to instructions that zero-extend the destination. But this isn't actually true. If you have an
Add32 with a destination on the stack (i.e. spilled) then it only writes 4 bytes. Then, the
filler will load 8 bytes from the stack at the point of use. So, the use of the Add32 will see
garbage in the high bits.

The fact that the spiller chose to use 8 bytes for a Tmp that gets defined by an Add32 is a
pretty sad bug, but:

- It's entirely up to the spiller to decide how many bytes to use for a Tmp, since we do not
  ascribe a type to Tmps. We could ascribe types to Tmps, but then coalescing would become
  harder. Our goal is to fix the bug while still enabling coalescing in cases like "a[i]" where
  "i" is a 32-bit integer that is computed using operations that already do zero-extension.

- More broadly, it's strange that the instruction selector decides whether a Value will be
  lowered to something that zero-extends. That's too constraining, since the most optimal
  instruction selection might involve something that doesn't zero-extend in cases of spilling, so
  the zero-extension should only happen if it's actually needed. This means that we need to
  understand which Air instructions cause zero-extensions.

- If we know which Air instructions cause zero-extensions, then we don't need the instruction
  selector to copy-propagate ZExt32's. We have copy-propagation in Air thanks to the register
  allocator.

In fact, the register allocator is exactly where all of the pieces come together. It's there that
we want to know which operations zero-extend and which don't. It also wants to know how many bits
of a Tmp each instruction reads. Armed with that information, the register allocator can emit
more optimal spill code, use less stack space for spill slots, and coalesce Move32's. As a bonus,
on X86, it replaces Move's with Move32's whenever it can. On X86, Move32 is cheaper.

This fixes a crash bug in V8/encrypt. After fixing this, I only needed two minor fixes to get
V8/encrypt to run. We're about 10% behind LLVM on steady state throughput on this test. It
appears to be mostly due to excessive spilling caused by CCall slow paths. That's fixable: we
could make CCalls on slow paths use a variant of CCallSpecial that promises not to clobber any
registers, and then have it emit spill code around the call itself. LLVM probably gets this
optimization from its live range splitting.

I tried writing a regression test. The problem is that you need garbage on the stack for this to
work, and I didn't feel like writing a flaky test. It appears that running V8/encrypt will cover
this, so we do have coverage.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
(JSC::isX86):
(JSC::isX86_64):
(JSC::optimizeForARMv7IDIVSupported):
(JSC::optimizeForX86):
(JSC::optimizeForX86_64):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::highBitsAreZero):
(JSC::B3::Air::LowerToAir::shouldCopyPropagate):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::forEachArg):
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::forEachArgImpl):
* b3/B3Value.h:
* b3/air/AirAllocateStack.cpp:
(JSC::B3::Air::allocateStack):
* b3/air/AirArg.cpp:
(WTF::printInternal):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::pointerWidth):
(JSC::B3::Air::Arg::isAnyUse):
(JSC::B3::Air::Arg::isColdUse):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::isDef):
(JSC::B3::Air::Arg::isZDef):
(JSC::B3::Air::Arg::widthForB3Type):
(JSC::B3::Air::Arg::conservativeWidth):
(JSC::B3::Air::Arg::minimumWidth):
(JSC::B3::Air::Arg::bytes):
(JSC::B3::Air::Arg::widthForBytes):
(JSC::B3::Air::Arg::Arg):
(JSC::B3::Air::Arg::forEachTmp):
* b3/air/AirCCallSpecial.cpp:
(JSC::B3::Air::CCallSpecial::forEachArg):
* b3/air/AirEliminateDeadCode.cpp:
(JSC::B3::Air::eliminateDeadCode):
* b3/air/AirFixPartialRegisterStalls.cpp:
(JSC::B3::Air::fixPartialRegisterStalls):
* b3/air/AirInst.cpp:
(JSC::B3::Air::Inst::hasArgEffects):
* b3/air/AirInst.h:
(JSC::B3::Air::Inst::forEachTmpFast):
(JSC::B3::Air::Inst::forEachTmp):
* b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::forEachTmpWithExtraClobberedRegs):
* b3/air/AirIteratedRegisterCoalescing.cpp:
* b3/air/AirLiveness.h:
(JSC::B3::Air::AbstractLiveness::AbstractLiveness):
(JSC::B3::Air::AbstractLiveness::LocalCalc::execute):
* b3/air/AirOpcode.opcodes:
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/air/AirTmpWidth.cpp: Added.
(JSC::B3::Air::TmpWidth::TmpWidth):
(JSC::B3::Air::TmpWidth::~TmpWidth):
* b3/air/AirTmpWidth.h: Added.
(JSC::B3::Air::TmpWidth::width):
(JSC::B3::Air::TmpWidth::defWidth):
(JSC::B3::Air::TmpWidth::useWidth):
(JSC::B3::Air::TmpWidth::Widths::Widths):
* b3/air/AirUseCounts.h:
(JSC::B3::Air::UseCounts::UseCounts):
* b3/air/opcode_generator.rb:
* b3/testb3.cpp:
(JSC::B3::testCheckMegaCombo):
(JSC::B3::testCheckTrickyMegaCombo):
(JSC::B3::testCheckTwoMegaCombos):
(JSC::B3::run):

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

3 years agoDifferent and incorrect flags are passed to sendSync when accessibility is enabled...
mitz@apple.com [Mon, 21 Dec 2015 15:16:58 +0000 (15:16 +0000)]
Different and incorrect flags are passed to sendSync when accessibility is enabled, SpinRunLoopWhileWaitingForReply
https://bugs.webkit.org/show_bug.cgi?id=126021

Reviewed by Darin Adler.

Get rid of SpinRunLoopWhileWaitingForReply because it’s not used anymore.

* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForSyncReply): Removed the SpinRunLoopWhileWaitingForReply branch.

* Platform/IPC/Connection.h: Removed SpinRunLoopWhileWaitingForReply.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): Don’t check
  WebPage::synchronousMessagesShouldSpinRunLoop() and don’t specify
  SpinRunLoopWhileWaitingForReply.
(WebKit::WebChromeClient::runJavaScriptAlert): Ditto.
(WebKit::WebChromeClient::runJavaScriptConfirm): Ditto.
(WebKit::WebChromeClient::runJavaScriptPrompt): Ditto.
(WebKit::WebChromeClient::print): Ditto.
(WebKit::WebChromeClient::exceededDatabaseQuota): Ditto.
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): Ditto.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::synchronousMessagesShouldSpinRunLoop): Deleted.
* WebProcess/WebPage/WebPage.h:

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

3 years ago[Streams API] imported/w3c/web-platform-tests/streams-api/readable-streams/cancel...
calvaris@igalia.com [Mon, 21 Dec 2015 15:15:23 +0000 (15:15 +0000)]
[Streams API] imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.html has a flaky test
https://bugs.webkit.org/show_bug.cgi?id=152065

Reviewed by Youenn Fablet.

https://github.com/whatwg/streams/pull/414 and https://github.com/whatwg/streams/issues/413 was closed. Changes
I did on the spec were integrated so they were brought back to the imported tests in WebKit.

* web-platform-tests/streams-api/README.txt: Updated version.
* web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Expectations.
* web-platform-tests/streams-api/readable-streams/cancel.js: Changed to cancel test.

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

3 years ago[INTL] Implement String.prototype.localeCompare in ECMA-402
commit-queue@webkit.org [Mon, 21 Dec 2015 10:03:36 +0000 (10:03 +0000)]
[INTL] Implement String.prototype.localeCompare in ECMA-402
https://bugs.webkit.org/show_bug.cgi?id=147607

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2015-12-21
Reviewed by Darin Adler.

Source/JavaScriptCore:

Add localeCompare in builtin JavaScript that delegates comparing to Intl.Collator.
Keep existing native implementation for use if INTL flag is disabled.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/StringPrototype.js: Added.
(localeCompare):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):

LayoutTests:

* js/script-tests/string-localeCompare.js:
* js/script-tests/string-prototype-properties.js: Update error message.
* js/string-localeCompare-expected.txt:
* js/string-prototype-properties-expected.txt: Update error message.
* js/string-localeCompare.html:

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

3 years ago[GTK] jquery.min.js violates DFSG
mcatanzaro@igalia.com [Mon, 21 Dec 2015 09:04:40 +0000 (09:04 +0000)]
[GTK] jquery.min.js violates DFSG
https://bugs.webkit.org/show_bug.cgi?id=152428

Reviewed by Joseph Pecoraro.

Stop distributing Source/WebInspectorUI/Tools. It is not needed in tarballs. This brings us
into compliance with DFSG by removing a bundled, minified copy of jQuery from our tarball.

* gtk/manifest.txt.in:

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

3 years agoDon't allocate a NSImage and skip unneeded call to TIFFRepresentation when copying...
commit-queue@webkit.org [Mon, 21 Dec 2015 04:23:09 +0000 (04:23 +0000)]
Don't allocate a NSImage and skip unneeded call to TIFFRepresentation when copying image to clipboard.
https://bugs.webkit.org/show_bug.cgi?id=152374

Patch by Jeremy Zerfas <WebKit@JeremyZerfas.com> on 2015-12-20
Reviewed by Darin Adler.

Source/WebCore:

When copying an image to the clipboard, don't bother allocating a
NSImage and skip the unneeded call to TIFFRepresentation since the data
from the previous getTIFFRepresentation call can be used instead. This
considerably reduces the amount of memory and CPU time used for large
images/animations.

Test: fast/images/image-copy-memory-usage.html

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::write):

LayoutTests:

Added test to make sure that when copying a 50 frame 500x500 animation
(50 MB uncompressed) to the clipboard, the additional memory usage is
kept to less than 200 MB.

* fast/images/image-copy-memory-usage-expected.txt: Added.
* fast/images/image-copy-memory-usage.html: Added.
* fast/images/resources/dot-moving-in-a-circle-animation.gif: Added.

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

3 years ago[WK2][EFL] Use WebsiteDataStore instead of WebDatabaseManager which has been deleted...
jh718.park@samsung.com [Mon, 21 Dec 2015 02:54:32 +0000 (02:54 +0000)]
[WK2][EFL] Use WebsiteDataStore instead of WebDatabaseManager which has been deleted in r194295
https://bugs.webkit.org/show_bug.cgi?id=152460

Reviewed by Gyuyoung Kim.

Use WebsiteDataStore to support EFL WebDatabase API and to fix build break.

* PlatformEfl.cmake:
* UIProcess/API/APIWebsiteDataStore.cpp:
* UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp.
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
* UIProcess/API/efl/ewk_database_manager.cpp:
(EwkDatabaseManager::EwkDatabaseManager):
(EwkDatabaseManager::getDatabaseOrigins):
* UIProcess/API/efl/ewk_database_manager_private.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):

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

3 years agoReduce PassRefPtr uses in dom - 2
gyuyoung.kim@webkit.org [Mon, 21 Dec 2015 02:10:49 +0000 (02:10 +0000)]
Reduce PassRefPtr uses in dom - 2
https://bugs.webkit.org/show_bug.cgi?id=151936

Reviewed by Darin Adler.

Change PassRefPtr with RefPtr<Foo>&&, WTF::move(), Foo*, and Foo&.

* dom/ScopedEventQueue.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::registerCallback):
* dom/ScriptedAnimationController.h:
* dom/StaticNodeList.h:
* dom/Traversal.cpp:
(WebCore::NodeIteratorBase::NodeIteratorBase):
* dom/Traversal.h:
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::TreeWalker):
(WebCore::TreeWalker::setCurrentNode):
* dom/TreeWalker.h:
(WebCore::TreeWalker::create):
* dom/UserActionElementSet.h:
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::WebKitNamedFlow):
(WebCore::WebKitNamedFlow::create):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
(WebCore::WebKitNamedFlow::getContent):
* dom/WebKitNamedFlow.h:
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
(WebCore::WheelEvent::initWheelEvent):
(WebCore::WheelEvent::initWebKitWheelEvent):
* dom/WheelEvent.h:

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

3 years ago[SOUP] Performs DNS prefetch when a proxy is configured (information leak)
mcatanzaro@igalia.com [Mon, 21 Dec 2015 01:19:41 +0000 (01:19 +0000)]
[SOUP] Performs DNS prefetch when a proxy is configured (information leak)
https://bugs.webkit.org/show_bug.cgi?id=145542

Reviewed by Darin Adler.

Source/WebCore:

Perform DNS prefetch only when no proxy is configured.

No new tests. Test this manually with Wireshark. Run the simple-proxy example program found
in libsoup's examples directory, set that as your system HTTP proxy, and see if DNS queries
show up in Wireshark when refreshing a page sent over HTTP. They should appear only when the
proxy is not configured.

* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::DNSResolveQueue):
(WebCore::DNSResolveQueue::isUsingProxy):
* platform/network/DNSResolveQueue.h:
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::updateIsUsingProxy):
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
* platform/network/soup/DNSSoup.cpp:
(WebCore::didResolveProxy):
(WebCore::proxyResolvedForHttpUriCallback):
(WebCore::proxyResolvedForHttpsUriCallback):
(WebCore::DNSResolveQueue::updateIsUsingProxy):
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.

Source/WTF:

Specialize GUniquePtr<char*>, using g_strfreev.

* wtf/glib/GUniquePtr.h:

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

3 years agoRemove unused setToolbarHeight
mitz@apple.com [Sun, 20 Dec 2015 21:57:01 +0000 (21:57 +0000)]
Remove unused setToolbarHeight
https://bugs.webkit.org/show_bug.cgi?id=152466

Reviewed by Darin Adler.

Source/WebCore:

* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setToolbarHeight): Deleted.
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* testing/Internals.cpp:

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setToolbarHeight): Deleted.

Source/WebKit/ios:

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorFrontendClient::setToolbarHeight): Deleted.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm::
(WebInspectorFrontendClient::setToolbarHeight): Deleted.

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::setToolbarHeight): Deleted.
* WebCoreSupport/WebInspectorClient.h:

Source/WebKit2:

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::setToolbarHeight): Deleted.
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::setToolbarHeight): Deleted.
* WebProcess/WebPage/WebInspectorUI.h:

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

3 years agoGerman translation update
mcatanzaro@igalia.com [Sun, 20 Dec 2015 20:08:36 +0000 (20:08 +0000)]
German translation update
https://bugs.webkit.org/show_bug.cgi?id=152228

Unreviewed.

Patch by Bernd Homuth <dev@hmt.im> on 2015-12-20

* de.po:

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

3 years agoImplement compareDouble in B3/Air
fpizlo@apple.com [Sun, 20 Dec 2015 19:53:40 +0000 (19:53 +0000)]
Implement compareDouble in B3/Air
https://bugs.webkit.org/show_bug.cgi?id=150903

Reviewed by Benjamin Poulain.

A hole in our coverage is that we don't fuse a double comparison into a branch, then we will
crash in the instruction selector. Obviously, we *really* want to fuse double comparisons,
but we can't guarantee that this will always happen.

This also removes all uses of WTF::Dominators verification, since it's extremely slow even in
a release build. This speeds up testb3 with validateGraphAtEachPhase=true by an order of
magnitude.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::moveDoubleConditionallyFloat):
(JSC::MacroAssembler::compareDouble):
(JSC::MacroAssembler::compareFloat):
(JSC::MacroAssembler::lea):
* b3/B3Dominators.h:
(JSC::B3::Dominators::Dominators):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testCompare):
(JSC::B3::testEqualDouble):
(JSC::B3::simpleFunction):
(JSC::B3::run):
* dfg/DFGDominators.h:
(JSC::DFG::Dominators::Dominators):

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

3 years agoUnreviewed, rolling out r194033 and r194267.
commit-queue@webkit.org [Sun, 20 Dec 2015 10:27:02 +0000 (10:27 +0000)]
Unreviewed, rolling out r194033 and r194267.
https://bugs.webkit.org/show_bug.cgi?id=152465

Caused crashes on Mac WK1 bots (Requested by youenn on
#webkit).

Reverted changesets:

"[Streams API] Expose ReadableStream and relatives to Worker"
https://bugs.webkit.org/show_bug.cgi?id=152066
http://trac.webkit.org/changeset/194033

"[Streams API] imported/w3c/web-platform-tests/streams-api
/readable-streams/cancel.html has a flaky test"
https://bugs.webkit.org/show_bug.cgi?id=152065
http://trac.webkit.org/changeset/194267

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

3 years ago[Mac] WebKit contains dead source code for OS X Mavericks and earlier
mitz@apple.com [Sun, 20 Dec 2015 06:27:04 +0000 (06:27 +0000)]
[Mac] WebKit contains dead source code for OS X Mavericks and earlier
https://bugs.webkit.org/show_bug.cgi?id=152462

Reviewed by Alexey Proskuryakov.

Source/bmalloc:

* Configurations/DebugRelease.xcconfig: Removed definition of MACOSX_DEPLOYMENT_TARGET for
  OS X 10.9.

Source/JavaScriptCore:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:

* API/JSBase.h: Removed check against __MAC_OS_X_VERSION_MIN_REQUIRED that was always true.

Source/ThirdParty/ANGLE:

* Configurations/DebugRelease.xcconfig: Removed definitions of MACOSX_DEPLOYMENT_TARGET for
  OS X 10.8 and 10.9.

Source/WebCore:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:

- Removed support for animating default buttons:

* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton): Removed m_default initialization.
(WebCore::RenderButton::styleDidChange): Removed checking for animating default button and
  starting the animation timer.
(WebCore::RenderButton::timerFired): Deleted.
* rendering/RenderButton.h: Removed m_timer and m_default member variables
* rendering/RenderTheme.h:
(WebCore::RenderTheme::defaultButtonHasAnimation): Deleted.
* rendering/RenderThemeMac.h: Deleted override.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::defaultButtonHasAnimation): Deleted.

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
* html/canvas/WebGLDrawBuffers.cpp:
* loader/DocumentLoader.cpp:
* loader/cache/CachedFont.cpp:
* loader/cocoa/DiskCacheMonitorCocoa.h:
* page/cocoa/SettingsCocoa.mm:
* platform/Scrollbar.cpp:
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
* platform/cocoa/NetworkExtensionContentFilter.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
* platform/graphics/cocoa/FontCascadeCocoa.mm:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollViewMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/ThemeMac.mm:
* platform/mac/WebCoreFullScreenPlaceholderView.h:
* platform/mac/WebCoreFullScreenPlaceholderView.mm:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/cf/ResourceRequest.h:
* platform/spi/cf/CFNetworkSPI.h:
* platform/spi/cocoa/CoreTextSPI.h:
* platform/spi/cocoa/NSButtonCellSPI.h:
* platform/spi/cocoa/NSColorSPI.h:
* platform/spi/cocoa/QuartzCoreSPI.h:
* platform/spi/mac/LookupSPI.h:
* platform/spi/mac/NSFontSPI.h:
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
* platform/spi/mac/NSPopoverSPI.h:
* platform/spi/mac/NSSharingServicePickerSPI.h:
* platform/spi/mac/NSSharingServiceSPI.h:
* platform/spi/mac/TUCallSPI.h:
* platform/sql/SQLiteDatabase.cpp:

Source/WebInspectorUI:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:

* Scripts/copy-user-interface-resources.pl: Removed code to delete Images/Legacy.

* UserInterface/Images/Legacy: Removed this empty directory.

Source/WebKit/mac:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitLegacy.xcconfig:

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* WebCoreSupport/WebInspectorClient.mm:
* WebView/WebDynamicScrollBarsView.mm:
* WebView/WebHTMLView.mm:
* WebView/WebImmediateActionController.h:
* WebView/WebImmediateActionController.mm:
* WebView/WebView.mm:
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
* WebView/WebViewInternal.h:

Source/WebKit2:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/BaseTarget.xcconfig:
* Configurations/BaseXPCService.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKit.xcconfig:

- Removed the definition of BUNDLE_LOCALIZATION_KEY:

* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:

- Added CFBundleFollowParentLocalization set to true:

* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:

* WebKit2.xcodeproj/project.pbxproj: Removed the “Add CFBundle Localization Info.plist Key”
  script build phases from the Web Content Service targets.

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Platform/IPC/mac/ConnectionMac.mm:
* Platform/IPC/mac/ImportanceAssertion.h:
* Platform/mac/MenuUtilities.h:
* Platform/mac/MenuUtilities.mm:
* Platform/mac/StringUtilities.h:
* Platform/mac/StringUtilities.mm:
* Shared/API/Cocoa/WKFoundation.h:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/mac/PageClientImpl.mm:
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
* UIProcess/mac/WebInspectorProxyMac.mm:
* WebProcess/WebPage/FindController.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/com.apple.WebProcess.sb.in:
* config.h:

Source/WTF:

* Configurations/DebugRelease.xcconfig: Removed definition of MACOSX_DEPLOYMENT_TARGET for
  OS X 10.9.

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* wtf/FeatureDefines.h:
* wtf/MainThread.h:
* wtf/OSObjectPtr.h:
* wtf/Platform.h:
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
* wtf/spi/darwin/XPCSPI.h:

Tools:

- Removed definitions of MACOSX_DEPLOYMENT_TARGET and WEBKIT_SYSTEM_INTERFACE_LIBRARY for
  OS X 10.9:

* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* LayoutTestRelay/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* DumpRenderTree/mac/TextInputController.m:
* MiniBrowser/mac/BrowserWindowController.m:
* TestWebKitAPI/Tests/mac/AttributedString.mm:
* WebKitTestRunner/mac/EventSenderProxy.mm:

WebKitLibraries:

* libWebKitSystemInterfaceMavericks.a: Removed.

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

3 years agoMake Intl headers private in Xcode
sukolsak@gmail.com [Sat, 19 Dec 2015 21:42:18 +0000 (21:42 +0000)]
Make Intl headers private in Xcode

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

3 years ago[JSC] Streamline Tmp indexing inside the register allocator
fpizlo@apple.com [Sat, 19 Dec 2015 21:04:55 +0000 (21:04 +0000)]
[JSC] Streamline Tmp indexing inside the register allocator
https://bugs.webkit.org/show_bug.cgi?id=152420

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-19
Reviewed by Filip Pizlo.

AirIteratedRegisterCoalescing has been accumulating a bit of mess over time.

When it started, every map addressed by Tmp was using Tmp hashing.
That caused massive performance problems. Everything perf sensitive was moved
to direct array addressing by the absolute Tmp index. This left the code
with half of the function using Tmp, the other half using indices.

With this patch, almost everything is moved to absolute indexing.
There are a few advantages to this:
-No more conversion churn for Floating Point registers.
-Most of the functions can now be shared between GP and FP.
-A bit of clean up since the core algorithm only deals with integers now.

This patch also changes the index type to be a template argument.
That will allow future specialization of "m_interferenceEdges" based
on the expected problem size.

Finally, the code related to the program modification (register assignment
and spilling) was moved to the wrapper "IteratedRegisterCoalescing".

The current split is:
-AbstractColoringAllocator: common core. Share as much as possible between
 GP and FP.
-ColoringAllocator: the remaining parts of the algorithm, everything that
 is specific to GP, FP.
-IteratedRegisterCoalescing: the "iterated" part of the algorithm.
 Try to allocate and modify the code as needed.

The long term plan is:
-Move selectSpill() and the coloring loop to AbstractColoringAllocator.
-Specialize m_interferenceEdges to make it faster.

* b3/air/AirIteratedRegisterCoalescing.cpp:
* b3/air/AirTmpInlines.h:
(JSC::B3::Air::AbsoluteTmpMapper<Arg::GP>::lastMachineRegisterIndex):
(JSC::B3::Air::AbsoluteTmpMapper<Arg::FP>::lastMachineRegisterIndex):

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

3 years ago[JSC] FTLB3Output generates some invalid ZExt32
commit-queue@webkit.org [Sat, 19 Dec 2015 19:01:50 +0000 (19:01 +0000)]
[JSC] FTLB3Output generates some invalid ZExt32
https://bugs.webkit.org/show_bug.cgi?id=151905

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-19
Reviewed by Filip Pizlo.

FTLLowerDFGToLLVM calls zeroExt() to int32 in some cases.
We were generating ZExt32 with Int32 as return type :(

* ftl/FTLB3Output.h:
(JSC::FTL::Output::zeroExt):

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

3 years ago[JSC] Add EqualOrUnordered to B3
commit-queue@webkit.org [Sat, 19 Dec 2015 16:52:11 +0000 (16:52 +0000)]
[JSC] Add EqualOrUnordered to B3
https://bugs.webkit.org/show_bug.cgi?id=152425

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-19
Reviewed by Mark Lam.

Add EqualOrUnordered to B3 and use it to implements
FTL::Output's NotEqualAndOrdered.

* b3/B3ConstDoubleValue.cpp:
(JSC::B3::ConstDoubleValue::equalOrUnordered):
* b3/B3ConstDoubleValue.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createGenericCompare):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3ReduceDoubleToFloat.cpp:
(JSC::B3::reduceDoubleToFloat):
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::equalOrUnordered):
(JSC::B3::Value::returnsBool):
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:
* b3/testb3.cpp:
(JSC::B3::testBranchEqualOrUnorderedArgs):
(JSC::B3::testBranchNotEqualAndOrderedArgs):
(JSC::B3::testBranchEqualOrUnorderedDoubleArgImm):
(JSC::B3::testBranchEqualOrUnorderedFloatArgImm):
(JSC::B3::testBranchEqualOrUnorderedDoubleImms):
(JSC::B3::testBranchEqualOrUnorderedFloatImms):
(JSC::B3::testBranchEqualOrUnorderedFloatWithUselessDoubleConversion):
(JSC::B3::run):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::doubleNotEqualAndOrdered):
(JSC::FTL::Output::doubleNotEqual): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::boolify):
* ftl/FTLOutput.h:
(JSC::FTL::Output::doubleNotEqualAndOrdered):
(JSC::FTL::Output::doubleNotEqual): Deleted.

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