Timeline



Apr 18, 2017:

10:59 PM Changeset in webkit [215504] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit2

Dragging a few items over MiniBrowser has 0 in the red indicator.
https://bugs.webkit.org/show_bug.cgi?id=170874

Reviewed by Tim Horton.

When WebKit does not accept the drag items, the drag count badge should not be updated.
Also, if WebKit changes the drag count badge, it should be restored to its original
value when the drag exits.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::draggingEntered):
(WebKit::WebViewImpl::draggingUpdated):
(WebKit::WebViewImpl::draggingExited):

10:58 PM Changeset in webkit [215503] by rniwa@webkit.org
  • 3 edits in trunk/Websites/perf.webkit.org

Build fix after r215061.

There was a mismatch between the format updateTriggerable and /api/update-triggerable were using.
Namely, each repository group was assumed to contain a name field in /api/update-triggerable
but updateTriggerable was not including that at all.

We didn't catch this because the test for updateTriggerable also used the wrong format :(

  • server-tests/tools-buildbot-triggerable-tests.js:
  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.updateTriggerable):

9:22 PM Changeset in webkit [215502] by wenson_hsieh@apple.com
  • 8 edits in trunk

[WK2] Add infrastructure and unit tests for file uploads using data interaction
https://bugs.webkit.org/show_bug.cgi?id=170903
<rdar://problem/31314689>

Reviewed by Tim Horton.

Source/WebKit2:

See Tools/ChangeLog for more details. Makes a small adjustment to _simulateDataInteractionUpdated: to return a
BOOL indicating whether or not to allow the operation to proceed. This is necessary for testing scenarios where
multiple files are being "data interacted" onto an element. See <https://bugs.webkit.org/show_bug.cgi?id=170880>
for more details about the change this patch is testing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _simulateDataInteractionUpdated:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/ios/WKContentViewInteraction.h:

Tools:

Adds 5 new unit tests covering different cases of uploading files through data interaction, as well as
infrastructure for simulating UIItemProviders that load file data. Makes a few adjustments to the
DataInteractionSimulator along the way, detailed in the per-method annotations below. See
<https://bugs.webkit.org/show_bug.cgi?id=170880> for more details about the change this patch is testing.

New tests:
DataInteractionTests.ExternalSourceImageToFileInput
DataInteractionTests.ExternalSourceHTMLToUploadArea
DataInteractionTests.ExternalSourceImageAndHTMLToSingleFileInput
DataInteractionTests.ExternalSourceImageAndHTMLToMultipleFileInput
DataInteractionTests.ExternalSourceImageAndHTMLToUploadArea

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(testIconImage):
(temporaryURLForDataInteractionFileLoad):
(cleanUpDataInteractionTemporaryPath):

Creates and tears down temporary file directories for testing data interaction.

(-[UIItemProvider registerFileRepresentationForTypeIdentifier:withData:filename:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/DataInteractionSimulator.h:
  • TestWebKitAPI/ios/DataInteractionSimulator.mm:

Make necessary changes to be able to test what happens when data interaction ends over an element with no
operation. Previously, we would always simulate performing a data interaction operation when ending the
simulation, but this causes us to wait indefinitely for a data operation response to arrive in the UI process.
Instead, we need to note whether or not the content view is allowing data interaction, and only perform an
operation and wait for the -didPerform call if the operation was allowed. Otherwise, we immediately transition
the phase to Cancelled and end the run.

(-[DataInteractionSimulator _resetSimulatedState]):
(-[DataInteractionSimulator runFrom:to:]):
(-[DataInteractionSimulator _concludeDataInteractionAndPerformOperationIfNecessary]):
(-[DataInteractionSimulator _advanceProgress]):
(-[DataInteractionSimulator externalItemProviders]):
(-[DataInteractionSimulator setExternalItemProviders:]):

Previously, we hard-coded DataInteractionSimulator to only support a single external item provider. In order to
test the scenario where multiple files are being "data interacted" into a file-type input, we generalize this to
take multiple item providers.

(-[DataInteractionSimulator externalItemProvider]): Deleted.
(-[DataInteractionSimulator setExternalItemProvider:]): Deleted.

9:01 PM Changeset in webkit [215501] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

RTCOfferOptions iceRestart should be supported
https://bugs.webkit.org/show_bug.cgi?id=170966

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-18
Reviewed by Alex Christensen.

No ability to test iceRestart as of now.
Passing iceRestart value to libwebrtc.
Passing also voiceActivityDetection value to libwebrtc.
Updating mock to use the new overloaded CreateOffer method.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::doCreateOffer):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):

  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::MockLibWebRTCPeerConnection::CreateOffer):

  • testing/MockLibWebRTCPeerConnection.h:
8:29 PM Changeset in webkit [215500] by dino@apple.com
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Add the actual content to the files, now that
SVN knows they can have tabs.

  • src/third_party/murmurhash/MurmurHash3.cpp:
  • src/third_party/murmurhash/MurmurHash3.h:
8:27 PM Changeset in webkit [215499] by dino@apple.com
  • 1 edit
    4 adds in trunk/Source/ThirdParty/ANGLE

WinCairo needs these files I recently removed
from our copy of ANGLE.

  • src/third_party/murmurhash/LICENSE: Added.
  • src/third_party/murmurhash/MurmurHash3.cpp: Added.
  • src/third_party/murmurhash/MurmurHash3.h: Added.
8:22 PM Changeset in webkit [215498] by wenson_hsieh@apple.com
  • 23 edits in trunk/Source

[WK2] Support DataTransfer::files() when performing a DHTML data interaction
https://bugs.webkit.org/show_bug.cgi?id=170880
<rdar://problem/31314689>

Reviewed by Tim Horton.

Source/WebCore:

Adds support for fetching files from the DataTransfer when performing a data interaction operation handled by
JavaScript. There are two changes we make here to achieve this:

First, we teach the Pasteboard on iOS to know what file paths hold the item provider contents used in the
current data interaction operation. On iOS, Pasteboard::readFilenames is currently hard-coded to return an empty
vector. To fix this, we add logic to the iOS Pasteboard to remember what the paths of all files that were
successfully loaded from item providers as the data interaction is taking place. This ensures that at the
WebCore layer, the implementation of Pasteboard::readFilenames on Mac and iOS is similar -- they both call out
to the client layer in order to read file paths off of their respective pasteboards. Once in the client layer
(WebKit1 or WebKit2) we then call into PlatformPasteboard::filenamesForDataInteraction, which then calls into
WebItemProviderPasteboard if applicable.

The second tweak is to propagate information about whether the document is preventing default data interaction
behavior to the client layer. This prevents us from having to save pasteboard content when performing data
interaction in cases where file information is not needed (i.e. the default behavior is being performed, and
the target is not a file input). This also avoids compatibility issues with insertion animations when performing
data interaction in editable areas, due to the extra time spent loading item provider data into a temporary
file.

Unit tests in <https://bugs.webkit.org/show_bug.cgi?id=170903>.

  • page/DragController.cpp:

(WebCore::DragController::DragController):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::tryDocumentDrag):

Refactor DragController::tryDocumentDrag to return a DragHandlingMethod. This method currently returns either
true or false; this patch changes it to return a DragHandlingMethod, which is either None (the equivalent of
returning false before the patch), Default (indicating that the drop destination is allowing default handling),
or NonDefault, which indicates that the drop destination has explicitly prevented default.

  • page/DragController.h:

(WebCore::DragController::documentIsHandlingNonDefaultDrag):

Used by WebPage when sending an IPC response after handling dragentered or dragupdated.

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/AbstractPasteboard.h:
  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readFilenames):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::filenamesForDataInteraction):

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

WebItemProviderPasteboard now remembers the file URLs of successfully loaded item provider content when a data
interaction is being performed. The new filenamesForDataInteraction property returns the array of data
interaction file URLs which have been propagated to the web process along with sandbox extensions. This state
is cleaned up when list of item providers change (i.e. when the data interaction operation is finished, or if
the web content process crashes, etc.)

(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard setItemProviders:]):
(-[WebItemProviderPasteboard filenamesForDataInteraction]):
(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]):

Source/WebKit/mac:

Adjust for a change in PasteboardStrategy. See WebCore ChangeLog for more details.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::getFilenamesForDataInteraction):

Source/WebKit2:

See the WebCore ChangeLog for more details.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::getFilenamesForDataInteraction):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::resetCurrentDragInformation):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::documentIsHandlingNonDefaultDrag):

  • UIProcess/WebPageProxy.messages.in:

Adds an IPC argument to DidPerformDragControllerAction specifying whether the page prevented the default behavior.

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:

Adds IPC plumbing for the new filenamesForDataInteraction Pasteboard codepath.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::getFilenamesForDataInteraction):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

7:12 PM Changeset in webkit [215497] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Cairo build fix.
https://bugs.webkit.org/show_bug.cgi?id=170941

  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):

7:10 PM Changeset in webkit [215496] by dino@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Still trying to fix Windows.

  • PlatformWin.cmake:
6:56 PM Changeset in webkit [215495] by dino@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Attempt to fix the Windows build.

  • PlatformWin.cmake:
6:51 PM Changeset in webkit [215494] by commit-queue@webkit.org
  • 8 edits in trunk/Source/ThirdParty/libwebrtc

Add NDEBUG and CodeStripping to libwebrtc build system
https://bugs.webkit.org/show_bug.cgi?id=170954

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-18
Reviewed by Alex Christensen.

This optimizes libwebrtc library size and efficiency.
This allows allocating libwebrtc objects in WebCore without issues.

  • Configurations/Base.xcconfig:
  • Configurations/boringssl.xcconfig:
  • Configurations/libsrtp.xcconfig:
  • Configurations/libwebrtc.xcconfig:
  • Configurations/libwebrtcpcrtc.xcconfig:
  • Configurations/opus.xcconfig:
  • Configurations/usrsctp.xcconfig:
6:46 PM Changeset in webkit [215493] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Rebaseline bindings tests after r215486.

Unreviewed test gardening.

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjOnfooGetter):
(WebCore::jsTestObjOnwebkitfooGetter):

6:22 PM Changeset in webkit [215492] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Attempted build fix. Add/remove some files from ANGLE.

  • CMakeLists.txt:
6:07 PM Changeset in webkit [215491] by wilander@apple.com
  • 9 edits
    2 adds in trunk

Resource Load Statistics: Check both origins and cookieHostNames for domain matches in data removal
https://bugs.webkit.org/show_bug.cgi?id=170763
<rdar://problem/31573091>

Reviewed by Alex Christensen.

Source/WebKit2:

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):

Move semantics for topPrivatelyControlledDomains vector.

(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyOwnedDomainsInAllPersistentDataStores): Deleted.

Renamed 'PrivatelyControlled' instead of 'PrivatelyOwned.'

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

Move semantics for prevalentResourceDomains vector.

  • UIProcess/WebsiteData/WebsiteDataRecord.cpp:

(WebKit::hostIsInDomain):

Static convenience function.

(WebKit::WebsiteDataRecord::matchesTopPrivatelyControlledDomain):

Checks for matching cookieHostNames if types contains WebsiteDataType::Cookies.
Also checks origins.

  • UIProcess/WebsiteData/WebsiteDataRecord.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):

Now makes use of the new function
WebKit::WebsiteDataRecord::validForTopPrivatelyControlledDomain().

(WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains):

Move semantics for topPrivatelyControlledDomains vector.

(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyOwnedDomains): Deleted.

Renamed 'PrivatelyControlled' instead of 'PrivatelyOwned.'

(WebKit::WebsiteDataStore::removeDataForTopPrivatelyOwnedDomains): Deleted.

Renamed 'PrivatelyControlled' instead of 'PrivatelyOwned.'

  • UIProcess/WebsiteData/WebsiteDataStore.h:

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html: Added.
5:37 PM Changeset in webkit [215490] by dino@apple.com
  • 594 edits
    1 copy
    5 moves
    67 adds
    258 deletes in trunk

Update ANGLE
https://bugs.webkit.org/show_bug.cgi?id=170941
<rdar://problem/31633999>

Reviewed by Alex Christensen.

Source/ThirdParty/ANGLE:

Huge list of changed files omitted.

Source/WebCore:

  • platform/graphics/ANGLEWebKitBridge.cpp:

(WebCore::getSymbolInfo):
(WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
(WebCore::ANGLEWebKitBridge::cleanupCompilers):
(WebCore::ANGLEWebKitBridge::compileShaderSource):

  • platform/graphics/mac/GraphicsContext3DMac.mm:

(WebCore::GraphicsContext3D::GraphicsContext3D):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::checkVaryingsPacking):

LayoutTests:

  • fast/canvas/webgl/fragment-shader-assertion-expected.txt:
5:04 PM Changeset in webkit [215489] by wilander@apple.com
  • 4 edits in trunk

Make WebCore::topPrivatelyControlledDomain() return "localhost" for localhost
https://bugs.webkit.org/show_bug.cgi?id=170798
<rdar://problem/31595108>

Reviewed by Alex Christensen.

Source/WebCore:

API test augmented.

  • platform/mac/PublicSuffixMac.mm:

(WebCore::topPrivatelyControlledDomain):

Now returns the lowercase top privately controlled
domain including "localhost" for the host localhost.

Tools:

  • TestWebKitAPI/Tests/mac/PublicSuffix.mm:

(TestWebKitAPI::TEST_F):

Added two negative test cases for WebCore::isPublicSuffix().
Added test cases with mixed case domains, localhost, and
non-ASCII for WebCore::topPrivatelyControlledDomain().

4:38 PM Changeset in webkit [215488] by bfulgham@apple.com
  • 4 edits
    1 add in trunk/Source/WebKit2

[iOS][WK2] Prevent ephemeral files from being backed up
https://bugs.webkit.org/show_bug.cgi?id=170963
<rdar://problem/30470332>

Reviewed by Brady Eidson.

Tell the OS to skip temporary data files when performing backups.

  • UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm: Added.

(WebKit::WebResourceLoadStatisticsStore::platformExcludeFromBackup): Added.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
(WebKit::WebResourceLoadStatisticsStore::platformExcludeFromBackup): Add stub for
non-iOS platforms.

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • WebKit2.xcodeproj/project.pbxproj: Add new file.
4:34 PM Changeset in webkit [215487] by bfulgham@apple.com
  • 3 edits in trunk/Source/WebCore

JSEventListener::m_isolatedWorld should be a Ref
https://bugs.webkit.org/show_bug.cgi?id=170910
<rdar://problem/30470332>

Reviewed by Alex Christensen.

Since m_isolatedWorld should never be nullptr, change the implementation of m_isolatedWorld
from a RefPtr to a Ref, and adjust the various call sites to support this change.

This should help us catch any changes that permit the isolatedWorld to be set to nullptr.

No new tests since there should be no change in behavior.

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::initializeJSFunction):
(WebCore::JSEventListener::handleEvent):

  • bindings/js/JSEventListener.h:

(WebCore::JSEventListener::cast):
(WebCore::JSEventListener::isolatedWorld):
(WebCore::JSEventListener::jsFunction):

4:27 PM Changeset in webkit [215486] by bfulgham@apple.com
  • 14 edits
    4 adds in trunk

Correct handling of isolatedWorld in event handling
https://bugs.webkit.org/show_bug.cgi?id=65589
<rdar://problem/24097804>

Reviewed by Geoffrey Garen.

Source/WebCore:

This patch was inspired by Adam's original patch as well as the
following Blink change:
https://src.chromium.org/viewvc/blink?revision=152377&view=revision

Thread isolatedWorld state through event handling logic.

Tests: fast/dom/event-attrs-isolated-world.html

http/tests/security/isolatedWorld/onclick-attribute.html

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::initializeJSFunction):
(WebCore::JSEventListener::world):
(WebCore::eventHandlerAttribute):
(WebCore::setEventHandlerAttribute):
(WebCore::windowEventHandlerAttribute):
(WebCore::setWindowEventHandlerAttribute):
(WebCore::documentEventHandlerAttribute):
(WebCore::setDocumentEventHandlerAttribute):

  • bindings/js/JSEventListener.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • dom/Document.cpp:

(WebCore::Document::setWindowAttributeEventListener):
(WebCore::Document::getWindowAttributeEventListener):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::setAttributeEventListener):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::attributeEventListener):

  • dom/EventTarget.h:
  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::ReplacementFragment):

  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::parseAttribute):

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::parseAttribute):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::parseAttribute):

LayoutTests:

This following test cases are from the following Blink change:
https://src.chromium.org/viewvc/blink?revision=152377&view=revision

  • fast/dom/event-attrs-isolated-world-expected.txt: Added.
  • fast/dom/event-attrs-isolated-world.html: Added.
  • http/tests/security/isolatedWorld/onclick-attribute-expected.txt: Added.
  • http/tests/security/isolatedWorld/onclick-attribute.html: Added.
4:14 PM Changeset in webkit [215485] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Deadlock in CoreAudioCaptureSource
https://bugs.webkit.org/show_bug.cgi?id=170771
rdar://problem/31578919

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-04-18
Reviewed by Eric Carlson.

Fixes a regression introduced by r215201.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):

4:12 PM Changeset in webkit [215484] by wenson_hsieh@apple.com
  • 4 edits
    2 adds in trunk

[WK2] Cannot select text on nytimes.com when the selection granularity is WKSelectionGranularityCharacter
https://bugs.webkit.org/show_bug.cgi?id=170968
<rdar://problem/31692560>

Reviewed by Dan Bernstein.

Source/WebKit2:

Makes a small adjustment to textInteractionGesture:shouldBeginAtPoint:. When determining whether to allow the
text interaction assistant to recognize at a given point, instead of depending on whether or not the hit node is
the same as the assisted node, only enforce this restriction when editing an assisted node. Otherwise, default
to allowing the selection gesture.

Note that character granularity selection was working on most pages before, due to the fact that
nodeAtPositionIsAssistedNode was true in many cases when there is no assisted node at all. This is because, in
WebPage.mm, we compute the hit-tested node responding to click events to be null, and then set
nodeAtPositionIsAssistedNode to be equal to hitNode == m_assistedNode, which ends up being true because both of
these values are null.

This allowed text selection to work in the simple case when selection granularity character is used, but not
when the node containing the selected point actually does respond to click events, since the comparison returns
false.

New layout test: LayoutTests/editing/selection/character-granularity-select-text-with-click-handler.html.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

LayoutTests:

Adds a new layout test checking that text within a node with a click handler can be selected when using
character selection granularity.

  • editing/selection/character-granularity-select-text-with-click-handler-expected.txt: Added.
  • editing/selection/character-granularity-select-text-with-click-handler.html: Added.
3:58 PM Changeset in webkit [215483] by Ryan Haddad
  • 3 edits in branches/safari-603-branch/LayoutTests

Land LayoutTest changes for rdar://problem/31636547.

  • fast/forms/range/range-drag-when-toggled-disabled-expected.txt:
  • fast/forms/range/range-drag-when-toggled-disabled.html:
3:34 PM Changeset in webkit [215482] by mark.lam@apple.com
  • 6 edits
    2 adds in trunk

r211670 broke double to int conversion.
https://bugs.webkit.org/show_bug.cgi?id=170961
<rdar://problem/31687696>

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/double-to-int32.js: Added.
  • stress/to-int32-sensible2.js: Added.

Source/JavaScriptCore:

This is because operationToInt32SensibleSlow() assumes that left shifts of greater
than 31 bits on an 31-bit value will produce a 0. However, the spec says that
"if the value of the right operand is negative or is greater or equal to the
number of bits in the promoted left operand, the behavior is undefined."
See http://en.cppreference.com/w/cpp/language/operator_arithmetic#Bitwise_shift_operators.

This patch fixes this by restoring the check to prevent a shift of greater than
31 bits. It also consolidates the optimization in operationToInt32SensibleSlow()
back into toInt32() so that we don't have 2 copies of the same code with only a
slight variation.

JSC benchmarks shows that performance is neutral with this patch.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueToInt32):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):

  • runtime/MathCommon.cpp:

(JSC::operationToInt32SensibleSlow): Deleted.

  • runtime/MathCommon.h:

(JSC::toInt32):

3:28 PM Changeset in webkit [215481] by krollin@apple.com
  • 2 edits in trunk/Source/WebKit2

Add additional information when logging URL disposition in WebLoaderStrategy::scheduleLoad
https://bugs.webkit.org/show_bug.cgi?id=170813

Reviewed by Alex Christensen.

There are a few logging statements in WebLoaderStrategy::scheduleLoad
that report, for example, "URL will be loaded as data". These
statements also log the address of the frame doing the loading and the
identifier of the resource. For consistency with other logging and to
make scripted analysis of the logs more robust, also include the
pageID and frameID in the logging.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

3:22 PM Changeset in webkit [215480] by andersca@apple.com
  • 7 edits in trunk/Source

Stop using deprecated APIs, part 2
https://bugs.webkit.org/show_bug.cgi?id=170965
Source/WebCore:

rdar://problem/31589635

Reviewed by Tim Horton.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
No need to convert the status anymore.

(WebCore::ApplePaySession::completeShippingContactSelection):
Create an ApplePayError given the status.

  • Modules/applepay/ApplePayShippingContactUpdate.h:

Remove the status member variable.

  • Modules/applepay/PaymentRequest.h:

Remove the status member variable.

Source/WebKit2:

Reviewed by Tim Horton.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::encode):
(IPC::ArgumentCoder<WebCore::ShippingContactUpdate>::decode):
Remove the status member variable.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::status):
New function to be used by older OSes. This will recreate a PKPaymentAuthorizationStatus given a ShippingContactUpdate.

(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
Stop using the deprecated API.

1:59 PM Changeset in webkit [215479] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Safari crash when clicking phone number data detector popover button
https://bugs.webkit.org/show_bug.cgi?id=170936
<rdar://problem/31416570>

Reviewed by Wenson Hsieh.

  • platform/spi/mac/DataDetectorsSPI.h:

Soft-link the phone number key from the correct framework.

1:37 PM Changeset in webkit [215478] by joepeck@webkit.org
  • 2 edits in trunk/LayoutTests

[mac-wk1 Debug] LayoutTest http/tests/inspector/network/resource-sizes-network.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170953

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:

Mark a flakey test in WebKit1.

1:35 PM Changeset in webkit [215477] by weinig@apple.com
  • 48 edits in trunk

[WebIDL] Make annotated types first class allowing them to be used in sequences and unions
https://bugs.webkit.org/show_bug.cgi?id=170926

Reviewed by Chris Dumez.

Source/WebCore:

  • Adds IDL types for WebIDL annotated types:

[Clamp] T -> IDLClampAdaptor<T>
[EnforceRange] T -> IDLEnforceRangeAdaptor<T>
[TreatNullAs=EmptyString] T -> IDLTreatNullAsEmptyAdaptor<T>

  • Adds additional adaptors for existing specializations

[AtomicString] T -> IDLAtomicStringAdaptor<T>
[RequiresExistingAtomicString] T -> IDLRequiresExistingAtomicStringAdaptor<T>

  • Removes the need for IntegerConversionConfiguration and StringConversionConfiguration overloads of convert().
  • Allows the use of annotated types as subtypes, such as in sequences and unions.
  • bindings/IDLTypes.h:

Add new types:

  • IDLClampAdaptor
  • IDLEnforceRangeAdaptor
  • IDLTreatNullAsEmptyAdaptor
  • IDLAtomicStringAdaptor
  • IDLRequiresExistingAtomicStringAdaptor

Add new predicates for matching strings and strings/enumerations.

  • bindings/js/JSDOMConvertNullable.h:

Remove now unnecessary overloads of convert that took IntegerConversionConfiguration
and StringConversionConfiguration.

  • bindings/js/JSDOMConvertNumbers.cpp:
  • bindings/js/JSDOMConvertNumbers.h:

Replace individually named conversion functions with explicit template specializations
based on type.
(WebCore::Converter<IDLByte>::convert):
(WebCore::Converter<IDLOctet>::convert):
(WebCore::Converter<IDLShort>::convert):
(WebCore::Converter<IDLUnsignedShort>::convert):
(WebCore::Converter<IDLLong>::convert):
(WebCore::Converter<IDLUnsignedLong>::convert):
(WebCore::Converter<IDLLongLong>::convert):
(WebCore::Converter<IDLUnsignedLongLong>::convert):
Simplify convert functions for normal integer converters to only handle
the normal case.

(WebCore::Converter<IDLClampAdaptor<T>>::convert):
(WebCore::JSConverter<IDLClampAdaptor<T>>::convert):
(WebCore::Converter<IDLEnforceRangeAdaptor<T>>::convert):
(WebCore::JSConverter<IDLEnforceRangeAdaptor<T>>::convert):
Add converters for the new annotated types that call into the new
template specialized conversion functions.

  • bindings/js/JSDOMConvertStrings.h:

(WebCore::Converter<IDLDOMString>::convert):
(WebCore::Converter<IDLByteString>::convert):
(WebCore::Converter<IDLUSVString>::convert):
Remove no longer needed StringConversionConfiguration parameter.

(WebCore::Converter<IDLTreatNullAsEmptyAdaptor<T>>::convert):
(WebCore::JSConverter<IDLTreatNullAsEmptyAdaptor<T>>::convert):
(WebCore::Converter<IDLAtomicStringAdaptor<T>>::convert):
(WebCore::JSConverter<IDLAtomicStringAdaptor<T>>::convert):
(WebCore::Converter<IDLRequiresExistingAtomicStringAdaptor<T>>::convert):
(WebCore::JSConverter<IDLRequiresExistingAtomicStringAdaptor<T>>::convert):
Add converters for new annotated types. Statically assert that the atomic string
adaptors only work for DOMString at present.

  • bindings/js/JSDOMConvertUnion.h:

Update union code to fix a long standing FIXME, treating enumerations as strings
for the purposes of the union algorithm, and using the new predicate that works
with the slightly more complicated IDLString type (e.g. it can now either be a String
or an AtomicString).

  • bindings/js/JSCSSStyleDeclarationCustom.cpp:
  • bindings/js/JSCryptoAlgorithmDictionary.cpp:
  • bindings/js/JSDocumentCustom.cpp:
  • bindings/js/JSEventListener.cpp:
  • bindings/js/JSHTMLCanvasElementCustom.cpp:
  • bindings/js/JSMockContentFilterSettingsCustom.cpp:
  • bindings/js/JSNodeFilterCustom.cpp:
  • bindings/js/JSSubtleCryptoCustom.cpp:

Remove explicit passing of Normal for the conversion configuration
and use new adaptors where appropriate.

  • bindings/scripts/CodeGeneratorJS.pm:

(IsAnnotatedType):
(GetAnnotatedIDLType):
(GetIDLType):
(JSValueToNative):
(UnsafeToNative):
(GetIntegerConversionConfiguration): Deleted.
(GetStringConversionConfiguration): Deleted.
Replace passing conversion configuration and specializing for atomic string
with annotated types.

  • bindings/scripts/IDLParser.pm:

(parseUnionMemberType):
Fix parser error where we weren't parsing extended attributes for a union correctly.

  • bindings/scripts/test/JS/JSMapLike.cpp:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

Update tests for changes to integer and string conversion.

  • domjit/DOMJITIDLConvert.h:
  • domjit/DOMJITIDLType.h:
  • domjit/DOMJITIDLTypeFilter.h:

Add specializations for AtomicString related adaptors.

  • testing/TypeConversions.h:
  • testing/TypeConversions.idl:
  • Re-arrange integer attributes to be in size order, and add [Clamp] variants.
  • Replace function taking a dictionary + attributes to inspect it with a dictionary attribute. This has been supported for a while and makes the test much clearer (this includes the enum used for inspecting the union in the dictionary).
  • Add additional test unions that exercise annotated types as subtypes.
  • Add additional dictionary items that exercise annotated types as subtypes.

LayoutTests:

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:

Update test to account for testDictionary now being an attribute,
and test that the annotated type members behave correctly.

12:35 PM Changeset in webkit [215476] by gskachkov@gmail.com
  • 49 edits
    13 adds in trunk

[ES6]. Implement Annex B.3.3 function hoisting rules for eval
https://bugs.webkit.org/show_bug.cgi?id=163208

Reviewed by Saam Barati.

JSTests:

  • stress/eval-func-decl-block-scoping-reassign.js: Added.

(assert):
(throw.new.Error.f):
(throw.new.Error):

  • stress/eval-func-decl-block-with-remove.js: Added.

(assert):
(foo.boo):
(foo):

  • stress/eval-func-decl-block-with-var-and-remove.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(joo):
(koo):

  • stress/eval-func-decl-block-with-var-sinthesize.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(hoo):
(joo):
(koo):

  • stress/eval-func-decl-in-block-scope-and-bind-to-top-eval-scope.js: Added.
  • stress/eval-func-decl-in-eval-within-block-with-let.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(goo):

  • stress/eval-func-decl-in-eval-within-with-scope.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(boo.let.val2):
(boo.let.val3):

  • stress/eval-func-decl-in-frozen-global.js: Added.

(assert):
(assertThrow):
(throw.new.Error):
(Object.freeze):

  • stress/eval-func-decl-in-global-of-eval.js: Added.

(assert):
(assertThrow):
(bar):
(baz):
(foobar):

  • stress/eval-func-decl-in-global.js: Added.

(assert):
(assertThrow):

  • stress/eval-func-decl-in-if.js: Added.

(assert):

  • stress/eval-func-decl-within-eval-with-reassign-to-var.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(foobar):
(hoo):
(joo):
(koo):
(loo):

  • stress/eval-func-decl-within-eval-without-reassign-to-let.js: Added.

(assert):
(assertThrow):
(foo):
(boo):
(goo):

  • stress/variable-under-tdz-eval-tricky.js:

(assert):

  • test262.yaml:

Source/JavaScriptCore:

Current patch implements Annex B.3.3 that is related to
hoisting of function declaration in eval.
https://tc39.github.io/ecma262/#sec-web-compat-evaldeclarationinstantiation
Function declaration in eval should create variable with
function name in function scope where eval is invoked
or bind to variable if it declared outside of the eval.
If variable is created it can be removed by 'delete a;' command.
If eval is invoke in block scope that contains let/const
variable with the same name as function declaration
we do not bind. This patch leads to the following behavior:

function foo() {

{

print(boo); undefined
eval('{ function boo() {}}');
print(boo);
function boo() {}

}
print(boo); function boo() {}

}

function foobar() {

{

let boo = 10;
print(boo); 10;
eval('{ function boo() {}}');
print(boo);
10;

}
print(boo) 10

}

function bar() {

{

var boo = 10;
print(boo); 10
eval('{ function boo() {} }');
print(boo);
function boo() {}

}
print(boo); function boo() {}

}

function bas() {

{

let boo = 10;
eval(' { function boo() {} } ');
print(boo); 10

}
print(boo); Reference Error

}

Current implementation relies on already implemented
'hoist function in sloppy mode' feature, with small changes.
In short it works in following way: during hoisting of function
with name S in eval, we are looking for first scope that
contains space for variable with name S and if this scope
has var type we bind function there

To implement this feature was added bytecode ops:
op_resolve_scope_for_hoisting_func_decl_in_eval - get variable scope
or return undefined if variable can't be binded there.

There is a corner case, hoist function in eval within catch block,
that is not covered by this patch, and will be fixed in
https://bugs.webkit.org/show_bug.cgi?id=168184

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBytecode):

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeLLIntInlineCaches):

  • bytecode/EvalCodeBlock.h:

(JSC::EvalCodeBlock::functionHoistingCandidate):
(JSC::EvalCodeBlock::numFunctionHoistingCandidates):

  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):
(JSC::BytecodeGenerator::emitResolveScopeForHoistingFuncDeclInEval):

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasIdentifier):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileResolveScopeForHoistingFuncDeclInEval):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileResolveScopeForHoistingFuncDeclInEval):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval):

  • llint/LowLevelInterpreter.asm:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseFunctionDeclarationStatement):

  • parser/Parser.h:

(JSC::Scope::getSloppyModeHoistedFunctions):
(JSC::Parser::declareFunction):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • runtime/EvalExecutable.h:

(JSC::EvalExecutable::numFunctionHoistingCandidates):
(JSC::EvalExecutable::numTopLevelFunctionDecls):
(JSC::EvalExecutable::numberOfFunctionDecls): Deleted.

  • runtime/JSScope.cpp:

(JSC::JSScope::resolve):
(JSC::JSScope::resolveScopeForHoistingFuncDeclInEval):

  • runtime/JSScope.h:

LayoutTests:

  • inspector/runtime/evaluate-CommandLineAPI-expected.txt:
  • inspector/runtime/evaluate-CommandLineAPI.html:
  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:
12:27 PM Changeset in webkit [215475] by fpizlo@apple.com
  • 3 edits in trunk/JSTests

wasm/function-tests/memory-multiagent times out sometimes
https://bugs.webkit.org/show_bug.cgi?id=170958

Reviewed by Keith Miller.

Add the ability to skip tests easily. Skip the test.

  • wasm.yaml:
  • wasm/function-tests/memory-multiagent.js:
12:02 PM Changeset in webkit [215474] by sbarati@apple.com
  • 8 edits in trunk

JSTests:
Follow up to debug build stack overflow in test after r215453

Rubber stamped by Mark Lam.

  • stress/call-apply-exponential-bytecode-size.js: Decrease the call

size to prevent stack overflow errors on debug builds.

Source/JavaScriptCore:
Follow up to address Mark's comments after r215453

Rubber stamped by Mark Lam.

This patch chooses better names for things, adhering to Mark's suggestions
in https://bugs.webkit.org/show_bug.cgi?id=139847

  • bytecompiler/NodesCodegen.cpp:

(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):

  • parser/NodeConstructors.h:

(JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
(JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::recordCallOrApplyDepth):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Parser::CallOrApplyDepthScope::CallOrApplyDepthScope):
(JSC::Parser::CallOrApplyDepthScope::distanceToInnermostChild):
(JSC::Parser::CallOrApplyDepthScope::~CallOrApplyDepthScope):
(JSC::Parser::CallOrApplyDepth::CallOrApplyDepth): Deleted.
(JSC::Parser::CallOrApplyDepth::maxChildDepth): Deleted.
(JSC::Parser::CallOrApplyDepth::~CallOrApplyDepth): Deleted.

11:50 AM Changeset in webkit [215473] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: XHR breakpoints shouldn't be cleared from the sidebar on reload
https://bugs.webkit.org/show_bug.cgi?id=170930

Reviewed by Joseph Pecoraro.

XHR breakpoints aren't associated with the main resource, and shouldn't
be cleared from the manager or sidebar UI When the main resource changes.

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange):

  • UserInterface/Controllers/XHRBreakpointTreeController.js:

(WebInspector.XHRBreakpointTreeController):
(WebInspector.XHRBreakpointTreeController.prototype._mainResourceDidChange): Deleted.

11:06 AM Changeset in webkit [215472] by Yusuke Suzuki
  • 4 edits
    4 adds in trunk

[DFG] Convert ValueAdd(Int32, String) => MakeRope(ToString(Int32), String)
https://bugs.webkit.org/show_bug.cgi?id=170943

Reviewed by Geoffrey Garen.

JSTests:

  • microbenchmarks/number-to-string-with-add-empty.js: Added.

(toStringLeft):
(toStringRight):

  • microbenchmarks/number-to-string-with-add-in-loop.js: Added.

(toStringLeft):
(toStringRight):

  • microbenchmarks/number-to-string-with-add.js: Added.

(toStringLeft):
(toStringRight):

  • stress/number-to-string-with-add.js: Added.

(shouldBe):
(toStringRight):
(toStringLeftEmpty):
(toStringRightEmpty):

Source/JavaScriptCore:

This patch converts ValueAdd(Int32, String) to MakeRope(ToString(Int32), String).
This has 2 great features.

  1. MakeRope(ToString(Int32), String) is less clobbering.

While ValueAdd ends up calling functions, VM knows much about MakeRope(ToString(Int32), String)
and VM knows it is less clobbering. It encourages LICM and other operations that is conservatively
executed because of ValueAdd's clobbering.

  1. Simply, MakeRope(ToString(Int32), String) is faster than ValueAdd.

While ValueAdd ends up calling a generic function, our ToString(Int32) calls well-optimized toString
operation. And later, MakeRope can fall into the fast path that just takes a string from a free list.
It is simply faster than ValueAdd.

We ensure that this patch shows performance improvement in attached benchmarks.

baseline patched

number-to-string-with-add-empty 16.2763+-3.3930 10.3142+-1.0967 definitely 1.5780x faster
number-to-string-with-add-in-loop 168.7621+-10.9738 15.5307+-3.3179 definitely 10.8664x faster
number-to-string-with-add 18.8557+-4.8292 11.6901+-2.5650 might be 1.6130x faster

In SixSpeed,

baseline patched

template_string_tag.es5 200.1027+-20.6871 25.7925+-11.4052 definitely 7.7582x faster
template_string_tag.es6 331.3913+-12.1750 286.6958+-26.0441 definitely 1.1559x faster
for-of-array.es5 412.4344+-23.2517 272.8707+-47.2118 definitely 1.5115x faster
for-of-array.es6 504.0082+-65.5045 300.3277+-12.8193 definitely 1.6782x faster

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::createToString):

  • dfg/DFGPredictionPropagationPhase.cpp:
10:54 AM Changeset in webkit [215471] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(215272): microbenchmark/seal-and-do-work and microbenchmark/freeze-and-do-work are 27x slower
https://bugs.webkit.org/show_bug.cgi?id=170881

Reviewed by Saam Barati.

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
Restored fast paths for final objects that don't have indexed properties.

10:34 AM Changeset in webkit [215470] by jbedard@apple.com
  • 3 edits in trunk/Tools

Unreviewed, rolling out r215346 and 215361.

The problem these changes were fixing was addressed in
<https://trac.webkit.org/changeset/215416/webkit>.

Reverted changesets:

"webkitpy: Ignore previously launched pid when system is under
stress"
https://bugs.webkit.org/show_bug.cgi?id=170741
http://trac.webkit.org/changeset/215346
http://trac.webkit.org/changeset/215361

10:31 AM Changeset in webkit [215469] by antti@apple.com
  • 10 edits
    2 adds in trunk

Enable optimized layer flushes on iOS
https://bugs.webkit.org/show_bug.cgi?id=170938
<rdar://problem/31677395>

Reviewed by Simon Fraser.

Source/WebCore:

Test: compositing/ios/overflow-scroll-touch-tiles.html

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setApproximatePosition):

Make virtual.

(WebCore::GraphicsLayer::flushCompositingState):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::syncPosition):

Rename PositionChanged enum value to more descriptive NeedsComputeVisibleAndCoverageRect.

(WebCore::GraphicsLayerCA::setApproximatePosition):
(WebCore::GraphicsLayerCA::syncBoundsOrigin):

Like syncPosition make these invalidate the geometry without scheduling a flush. This is needed
so when flush happens we don't just optimize it away. Tile coverage depends on position and bounds.

(WebCore::GraphicsLayerCA::flushCompositingState):

Remove FlushScope argument.
Disable optimization on WK1 due to some UIKit interactions.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::flushCompositingState):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:

LayoutTests:

Add test verifying that tiles get created for touch overflow scrolling.

  • compositing/ios/overflow-scroll-touch-tiles-expected.txt: Added.
  • compositing/ios/overflow-scroll-touch-tiles.html: Added.
10:14 AM Changeset in webkit [215468] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

Force scroll view insets to be respected regardless of rubber-banding state
https://bugs.webkit.org/show_bug.cgi?id=170937
<rdar://problem/31412788>

Reviewed by Simon Fraser.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

10:11 AM Changeset in webkit [215467] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the iOS Debug build

  • platform/LengthBox.h:
9:42 AM Changeset in webkit [215466] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[DFG] Use Phantom for base instead of getter when inlining intrinsic getter
https://bugs.webkit.org/show_bug.cgi?id=170947

Reviewed by Saam Barati.

getter does not need to be live after OSR Exit.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleGetById):

9:34 AM Changeset in webkit [215465] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Break Document::m_associatedFormControls reference cycle.
<https://webkit.org/b/170946>

Reviewed by Antti Koivisto.

There was a race between didAssociateFormControls() and didAssociateFormControlsTimerFired()
where detaching Document from its frame between the two would lead to an unbreakable reference
cycle between Document and its form elements.

Solve this by clearing the set of associated form elements in removedLastRef(), where we clear
all the other strong smart pointers to elements.

  • dom/Document.cpp:

(WebCore::Document::removedLastRef):

9:33 AM Changeset in webkit [215464] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update TestExpectations for "selectors4" tests on mac-wk1.
https://trac.webkit.org/changeset/215457/webkit

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:27 AM Changeset in webkit [215463] by Manuel Rego Casasnovas
  • 8 edits
    2 adds in trunk

[css-grid] Add support for percentage gaps
https://bugs.webkit.org/show_bug.cgi?id=170764

Reviewed by Sergio Villar Senin.

Source/WebCore:

Part of the code to support percentage gaps was already imported
from Blink in r213149 (bug #168657). However parsing was not enabled yet,
so some pieces were missing.

This patch accepts percentages in the parsing of grid-column-gap and
grid-row-gap properties, and the grid-gap shorthand.
On top of that it gets rid of GridTrackSizingAlgorithm::sizingOperation()
method as it's not needed. And instead it passes the specific operation
to each call to RenderGrid::guttersSize(), otherwise we would be getting
wrong results.

Test: fast/css-grid-layout/grid-gutters-as-percentage.html

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue): Add support for
percentage values.
(WebCore::CSSPropertyParser::parseShorthand): Ditto.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded):
Pass the specific sizing operation.

  • rendering/GridTrackSizingAlgorithm.h: Remove sizingOperation().
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeTrackBasedLogicalHeight): Pass the specific
sizing operation.
(WebCore::RenderGrid::computeTrackSizesForDefiniteSize): Ditto.
(WebCore::RenderGrid::computeTrackSizesForIndefiniteSize): Ditto.
(WebCore::RenderGrid::populateGridPositionsForDirection): Ditto.

LayoutTests:

Import tests from Blink.

  • fast/css-grid-layout/grid-gutters-as-percentage-expected.txt: Added.
  • fast/css-grid-layout/grid-gutters-as-percentage.html: Added.
  • fast/css-grid-layout/grid-gutters-get-set-expected.txt:
  • fast/css-grid-layout/grid-gutters-get-set.html:
9:17 AM Changeset in webkit [215462] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Images in WebKit.org blog article are stretched out
https://bugs.webkit.org/show_bug.cgi?id=169208

Reviewed by Michael Catanzaro.

  • wp-content/themes/webkit/style.css:

(article figure > img):

9:15 AM Changeset in webkit [215461] by pvollan@apple.com
  • 3 edits in trunk/Source/WebCore

Add fallback fonts to video captions stylesheet.
https://bugs.webkit.org/show_bug.cgi?id=170495

Reviewed by Eric Carlson.

The kCTFontCascadeListAttribute key is used to obtain the cascade list for a font reference.

I have not added a test, since CaptionUserPreferences::testingMode() returns true when running tests,
preventing this code path from being executed.

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):

  • platform/spi/win/CoreTextSPIWin.h:
8:39 AM Changeset in webkit [215460] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, follow-up patch after r215459
https://bugs.webkit.org/show_bug.cgi?id=170940

Reviewed by Filip Pizlo.

CheckCell can cause OSRExit. Thus Phantom should be placed after CheckCell.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::emitFunctionChecks):
(JSC::DFG::ByteCodeParser::handleGetById):

8:04 AM Changeset in webkit [215459] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[DFG] Drop unknown use of CheckCell's child2 to work ObjectAllocationSinking for Array iterator object
https://bugs.webkit.org/show_bug.cgi?id=170940

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/for-of-array.js: Added.

(fn):

Source/JavaScriptCore:

The second argument of CheckCell is not used in meaningful way. It is just *use* the node.
The problem is that it effectively *use* the child2 in ObjectAllocationSinking phase, and
prevent us from eliminating object allocations. Actually, it materializes Array iterator
when inlining next(). Instead, we should use Phantom in such a case.

It improves destructuring.es6 in SixSpeed 2.5x.

destructuring.es6 308.5184+-25.3490 119.5680+-15.0520 definitely 2.5803x faster

Note that SixSpeed tested in arewefastyet executes all the tests in one process while our SixSpeed
tests each one in isolated way.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::emitFunctionChecks):
(JSC::DFG::ByteCodeParser::handleGetById):

4:54 AM Changeset in webkit [215458] by magomez@igalia.com
  • 3 edits
    3 adds in trunk

[GTK+] Crash in WebCore::ImageFrame::ImageFrame()
https://bugs.webkit.org/show_bug.cgi?id=170332

Reviewed by Carlos Garcia Campos.

Source/WebCore:

When decoding a PNG image, don't reset the number of frames to 1 when there's a decoding error. Doing
so causes a crash if the number of frames we reported before is bigger than 1.

Test: fast/images/bad-png-missing-fdat.html

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::fallbackNotAnimated):

LayoutTests:

Added a test to ensure that the browser doesn't crash when loading a PNG image which
reports a wrong number of frames.

  • fast/images/bad-png-missing-fdat-expected.txt: Added.
  • fast/images/bad-png-missing-fdat.html: Added.
  • fast/images/resources/bad-png-missing-fdAT.png: Added.
2:17 AM Changeset in webkit [215457] by Manuel Rego Casasnovas
  • 5 edits
    41 adds in trunk/LayoutTests

[selectors4] Import W3C Test Suite
https://bugs.webkit.org/show_bug.cgi?id=170898

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

This patch imports "selectors4" test suite from WPT repo:
https://github.com/w3c/web-platform-tests/tree/master/css/selectors4

  • resources/import-expectations.json:
  • web-platform-tests/css/selectors4/OWNERS: Added.
  • web-platform-tests/css/selectors4/focus-within-001-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-001.html: Added.
  • web-platform-tests/css/selectors4/focus-within-002-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-002.html: Added.
  • web-platform-tests/css/selectors4/focus-within-003-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-003.html: Added.
  • web-platform-tests/css/selectors4/focus-within-004-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-004.html: Added.
  • web-platform-tests/css/selectors4/focus-within-005-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-005.html: Added.
  • web-platform-tests/css/selectors4/focus-within-006-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-006.html: Added.
  • web-platform-tests/css/selectors4/focus-within-007-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-007.html: Added.
  • web-platform-tests/css/selectors4/focus-within-008-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-008.html: Added.
  • web-platform-tests/css/selectors4/focus-within-009-expected.txt: Added.
  • web-platform-tests/css/selectors4/focus-within-009.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-001-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-001.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-002-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-002.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-003-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-003.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-004-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-004.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-005-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-005.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-006-expected.html: Added.
  • web-platform-tests/css/selectors4/focus-within-shadow-006.html: Added.
  • web-platform-tests/css/selectors4/of-type-selectors-expected.xhtml: Added.
  • web-platform-tests/css/selectors4/of-type-selectors.xhtml: Added.
  • web-platform-tests/css/selectors4/selector-required-expected.html: Added.
  • web-platform-tests/css/selectors4/selector-required.html: Added.
  • web-platform-tests/css/selectors4/selectors-dir-selector-ltr-001-expected.xht: Added.
  • web-platform-tests/css/selectors4/selectors-dir-selector-ltr-001.html: Added.
  • web-platform-tests/css/selectors4/selectors-dir-selector-rtl-001-expected.xht: Added.
  • web-platform-tests/css/selectors4/selectors-dir-selector-rtl-001.html: Added.
  • web-platform-tests/css/selectors4/w3c-import.log: Added.

LayoutTests:

  • TestExpectations: Mark a few tests as failure linking to the related bugs.
  • platform/mac-wk1/TestExpectations: Marking some tests that have issues on WK1.
1:11 AM Changeset in webkit [215456] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Add several test expectations.

  • platform/gtk/TestExpectations:
12:57 AM Changeset in webkit [215455] by commit-queue@webkit.org
  • 9 edits in trunk/Source

[GLIB] Define priorities also for async network IO tasks
https://bugs.webkit.org/show_bug.cgi?id=170905

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-04-18
Reviewed by Žan Doberšek.

Source/WebCore:

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::redirectSkipCallback):
(WebCore::sendRequestCallback):
(WebCore::continueAfterDidReceiveResponse):
(WebCore::readCallback):

  • platform/network/soup/SocketStreamHandleImplSoup.cpp:

(WebCore::SocketStreamHandleImpl::connected):
(WebCore::SocketStreamHandleImpl::readBytes):

Source/WebKit2:

  • NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:

(WebKit::NetworkCache::inputStreamReadReadyCallback):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::outputStreamWriteReadyCallback):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::skipInputStreamForRedirection):
(WebKit::NetworkDataTaskSoup::read):
(WebKit::NetworkDataTaskSoup::requestNextPart):
(WebKit::NetworkDataTaskSoup::writeDownload):
(WebKit::NetworkDataTaskSoup::didFinishDownload):

  • UIProcess/API/gtk/WebKitURISchemeRequest.cpp:

(webkitURISchemeRequestReadCallback):
(webkit_uri_scheme_request_finish):

Source/WTF:

Add AsyncIONetwork, DiskCacheRead and DiskCacheWrite priorities.

  • wtf/glib/RunLoopSourcePriority.h:
12:28 AM Changeset in webkit [215454] by Yusuke Suzuki
  • 5 edits in trunk/Source

[JSC][GTK] glib RunLoop does not accept negative start interval
https://bugs.webkit.org/show_bug.cgi?id=170775

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::scheduleTimer):

Source/WTF:

RunLoop::Timer for glib does not accept negative start interval.
We use 0_s if the given value is negative.

  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::TimerBase::secondsUntilFire):

Apr 17, 2017:

11:43 PM Changeset in webkit [215453] by sbarati@apple.com
  • 9 edits
    1 add in trunk

BytecodeGenerator ".call" and ".apply" is exponential in nesting depth
https://bugs.webkit.org/show_bug.cgi?id=139847
<rdar://problem/19321122>

Reviewed by Oliver Hunt.

JSTests:

  • stress/call-apply-exponential-bytecode-size.js: Added.

(assert):
(const.inc):
(const.inc2):
(bar):
(randomApplyOrCall):
(baz):
(jaz):
(haz):
(foo):

Source/JavaScriptCore:

The BytecodeGenerator's .apply(...) and .call(...) code would
emit bytecode for the evaluation of its arguments twice. This
is exponential, specifically, 2n, where n is the nesting depth of
.call(...) or .apply(...) inside other .call(...) or .apply(...).

The reason we emit code for the arguments twice is that we try
to emit efficient code for when .call or .apply is Function.prototype.call
or Function.prototype.apply. Because of this, we compare .call/.apply to
Function.prototype.call/.apply, and if they're the same, we emit a specialized
function call in bytecode. Otherwise, we emit the generalized version.

This patch makes it so that each .call(...) and .apply(...) records
its max inner nesting depth. Then, we only perform the optimization
for the bottom k (where k = 6) layers of the nesting tree. The reason we
apply the optimization to the bottom k layers instead of top k layers
is that we'll produce less code this way.

  • bytecompiler/NodesCodegen.cpp:

(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::makeFunctionCallNode):

  • parser/NodeConstructors.h:

(JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
(JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::recordCallOrApplyDepth):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Parser::CallOrApplyDepth::CallOrApplyDepth):
(JSC::Parser::CallOrApplyDepth::maxChildDepth):
(JSC::Parser::CallOrApplyDepth::~CallOrApplyDepth):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::makeFunctionCallNode):

11:05 PM Changeset in webkit [215452] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for !ENABLE(MEDIA_STREAM) configurations.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted): Guard the use of
HTMLMediaElement::hasMediaStreamSrcObject() with ENABLE(MEDIA_STREAM).

10:55 PM Changeset in webkit [215451] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

JSArray::appendMemcpy() needs to handle copying from Undecided indexing type too.
https://bugs.webkit.org/show_bug.cgi?id=170896
<rdar://problem/31651319>

Reviewed by JF Bastien and Keith Miller.

JSTests:

  • stress/regress-170896.js: Added.

Source/JavaScriptCore:

  • runtime/JSArray.cpp:

(JSC::JSArray::appendMemcpy):

10:37 PM Changeset in webkit [215450] by achristensen@apple.com
  • 7 edits in trunk

Allow Variants of RetainPtrs
https://bugs.webkit.org/show_bug.cgi?id=170923

Reviewed by Tim Horton and Sam Weinig.

Source/WebCore:

No change in behavior. Just updated the one class that used RetainPtr::operator& to cleanly initialize
RetainPtrs instead of taking the address of a smart pointer and forcing a value inside of it.

  • platform/mac/SSLKeyGeneratorMac.mm:

(WebCore::signedPublicKeyAndChallengeString):

Source/WTF:

  • wtf/RetainPtr.h:

(WTF::RetainPtr::operator&): Deleted.
Operator& was causing a compile error when making Variant<RetainPtr<T>, ...>
and because it is strange and only used once, let's just remove it.

  • wtf/Variant.h:

(WTF::get):
(WTF::get_if):
Use std::addressof instead of operator& which could be overloaded to return any type with any meaning.

Tools:

  • TestWebKitAPI/Tests/WTF/Variant.cpp:

(TestWebKitAPI::TEST):
Add tests for RetainPtr and for another class with overloaded operator& to verify such classes can
work in Variants.

9:55 PM Changeset in webkit [215449] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Network columns don't get saved when Web Inspector is closed
https://bugs.webkit.org/show_bug.cgi?id=170373
<rdar://problem/31386336>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-17
Reviewed by Matt Baker.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype.setColumnVisible):
(WebInspector.DataGrid.prototype._contextMenuInHeader):
The context menu was often passing undefined as the visible value
which would cause the setting to not be saved appropriately. Ensure
we always get an explicit boolean.

9:48 PM Changeset in webkit [215448] by nvasilyev@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Use text-align: start for DataGrid headers
https://bugs.webkit.org/show_bug.cgi?id=170871

Reviewed by Matt Baker.

text-align: start didn't work for th elements.
It was fixed in <webkit.org/b/141417>.

  • UserInterface/Views/DataGrid.css:

(.data-grid th):
(body[dir=ltr] .data-grid th): Deleted.
(body[dir=rtl] .data-grid th): Deleted.

8:21 PM Changeset in webkit [215447] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[WinCairo] 'WebCore::GraphicsLayerTextureMapper::flushCompositingStated': method with override specifier 'override' did not override any base class methods
https://bugs.webkit.org/show_bug.cgi?id=170928

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-17
Reviewed by Simon Fraser.

Apply the same change of CoordinatedGraphicsLayer.{cpp,h} of r215410 to GraphicsLayerTextureMapper.{cpp,h}.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::flushCompositingState): Added the second argument.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
7:37 PM Changeset in webkit [215446] by timothy_horton@apple.com
  • 25 edits in trunk/Source

Plumb all four obscured insets to WebCore, instead of just top/left
https://bugs.webkit.org/show_bug.cgi?id=170913

Reviewed by Wenson Hsieh.

Source/WebCore:

No new tests, no observable behavior change yet.

In preparation for a future patch (for rdar://problem/31564652), plumb
all four obscured insets to WebCore/the Web Content process, instead of
just the top and left insets.

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::HistoryItem):

  • history/HistoryItem.h:

(WebCore::HistoryItem::obscuredInsets):
(WebCore::HistoryItem::setObscuredInsets):
(WebCore::HistoryItem::obscuredInset): Deleted.
(WebCore::HistoryItem::setObscuredInset): Deleted.

  • loader/HistoryController.cpp:

(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):

  • page/Page.h:

(WebCore::Page::obscuredInsets):
(WebCore::Page::setObscuredInsets):
(WebCore::Page::obscuredInset): Deleted.
(WebCore::Page::setObscuredInset): Deleted.
Adopt FloatBoxExtent for obscuredInsets (and adjust pluralization).

Source/WebKit2:

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::obscuredInsets):
(WebKit::operator==):
(WebKit::VisibleContentRectUpdateInfo::obscuredInset): Deleted.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<FloatRectInsets>::encode):
(IPC::ArgumentCoder<FloatRectInsets>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _restorePageScrollPosition:scrollOrigin:previousObscuredInset:scale:]):
(-[WKWebView _updateVisibleContentRects]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::restorePageState):

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::restorePageState):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::restorePageState):
(WebKit::WebPage::updateVisibleContentRects):
Adopt FloatBoxExtent for obscuredInsets (and adjust pluralization).

6:30 PM Changeset in webkit [215445] by joepeck@webkit.org
  • 17 edits
    14 adds in trunk

Web Inspector: Doesn't show size of compressed content correctly
https://bugs.webkit.org/show_bug.cgi?id=155112
<rdar://problem/25006728>

Reviewed by Alex Christensen and Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

New, exact size metrics, available after the load completes.

Source/WebCore:

Tests: http/tests/inspector/network/resource-sizes-disk-cache.html

http/tests/inspector/network/resource-sizes-memory-cache.html
http/tests/inspector/network/resource-sizes-network.html

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForMetrics):

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::clearNonTimingData):
(WebCore::NetworkLoadMetrics::operator==):
(WebCore::NetworkLoadMetrics::encode):
(WebCore::NetworkLoadMetrics::decode):

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebInspectorUI:

  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
Set an exact size.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource):
(WebInspector.Resource.prototype.get requestHeadersTransferSize):
(WebInspector.Resource.prototype.get requestBodyTransferSize):
(WebInspector.Resource.prototype.get responseHeadersTransferSize):
(WebInspector.Resource.prototype.get responseBodyTransferSize):
(WebInspector.Resource.prototype.get cachedResponseBodySize):
(WebInspector.Resource.prototype.get size):
(WebInspector.Resource.prototype.get networkEncodedSize):
(WebInspector.Resource.prototype.get networkDecodedSize):
(WebInspector.Resource.prototype.get networkTotalTransferSize):
(WebInspector.Resource.prototype.get estimatedNetworkEncodedSize):
(WebInspector.Resource.prototype.get estimatedTotalTransferSize):
(WebInspector.Resource.prototype.get compressed):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.updateWithMetrics):
(WebInspector.Resource.prototype.setCachedResponseBodySize):
(WebInspector.Resource.prototype.increaseSize):
(WebInspector.Resource.prototype.increaseTransferSize):
(WebInspector.Resource.prototype.get encodedSize): Deleted.
(WebInspector.Resource.prototype.get transferSize): Deleted.
Be more explicit with size getters.

(WebInspector.Resource.prototype.updateWithMetrics):
If we receive the size metrics, update the specific metric values.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshCompressed):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshDecodedSize):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshTransferSize):

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
Show exact values if we have them, otherwise fall back to the calculated
values during loading.

Source/WebKit2:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::sendResultForCacheEntry):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Include size information in network load metrics.

LayoutTests:

  • http/tests/inspector/network/resource-sizes-disk-cache-expected.txt: Added.
  • http/tests/inspector/network/resource-sizes-disk-cache.html: Added.
  • http/tests/inspector/network/resource-sizes-memory-cache-expected.txt: Added.
  • http/tests/inspector/network/resource-sizes-memory-cache.html: Added.
  • http/tests/inspector/network/resource-sizes-network-expected.txt: Added.
  • http/tests/inspector/network/resource-sizes-network.html: Added.

Test resource sizes under different load conditions.

  • platform/mac/http/tests/inspector/network/resource-sizes-memory-cache-expected.txt: Added.
  • platform/mac/http/tests/inspector/network/resource-sizes-network-expected.txt: Added.

Older versions of macOS will not have the new metrics, but test their output anyways.

  • http/tests/inspector/network/resources/404.php: Added.
  • http/tests/inspector/network/resources/gzipped-lorem-no-content-length.php: Added.
  • http/tests/inspector/network/resources/gzipped-lorem.php: Added.
  • http/tests/inspector/network/resources/lorem.txt: Added.

Different resources with fixed sizes (text, gzipped, 404 with fixed response).

  • http/tests/inspector/network/resources/resource-size-test.js: Added.

(TestPage.registerInitializer.InspectorTest.gracefulExpectEquals):
(TestPage.registerInitializer.window.addResourceSizeTest):
(TestPage.registerInitializer):
Shared test code for resource sizes.

  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
5:43 PM Changeset in webkit [215444] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

Enable video autoplay when getUserMedia is on
https://bugs.webkit.org/show_bug.cgi?id=170919

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Geoffrey Garen.

Source/WebCore:

Test: webrtc/video-autoplay.html

  • dom/Document.h:

(WebCore::Document::isCapturing):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::hasMediaStreamSrcObject):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted): Allowing playback if getUserMedia is capturing audio or video
on the document and if element is rendering MediaStream based content.

  • page/MediaProducer.h:

(WebCore::MediaProducer::isCapturing):

LayoutTests:

  • webrtc/video-autoplay-expected.txt: Added.
  • webrtc/video-autoplay.html: Added.
5:14 PM Changeset in webkit [215443] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

com.apple.WebKit.Networking.Development crashed in com.apple.WebKit: WebKit::NetworkRTCProvider::resolvedName
https://bugs.webkit.org/show_bug.cgi?id=170889

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Alex Christensen.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::Resolver::~Resolver): Unschedule the host resolution in addition to cancelling it.
Providing a test would need to stop the resolver between the time the resolver is created and gets
data in the network process. Or we would need to change Resolver to be instantiated/tested on its own.

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
4:26 PM Changeset in webkit [215442] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.17.1/Source

Versioning.

4:22 PM Changeset in webkit [215441] by beidson@apple.com
  • 9 edits in trunk

Make WKHTTPCookieStore public.
<rdar://problem/31024691> and https://bugs.webkit.org/show_bug.cgi?id=170920

Reviewed by Geoffrey Garen.

Source/WebKit2:

  • UIProcess/API/Cocoa/WKHTTPCookieStore.h:
  • UIProcess/API/Cocoa/WKHTTPCookieStore.mm:

(-[WKHTTPCookieStore getAllCookies:]):
(-[WKHTTPCookieStore allCookies:]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore httpCookieStore]):
(-[WKWebsiteDataStore _httpCookieStore]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • WebKit2.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST):

4:16 PM Changeset in webkit [215440] by Jon Davis
  • 3 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: new icon for Disable Caches button in Network Tab
https://bugs.webkit.org/show_bug.cgi?id=170196

Reviewed by Joseph Pecoraro.

  • UserInterface/Images/IgnoreCaches.svg: Added.

Added new art for the Disable Caches button.

  • UserInterface/Images/gtk/IgnoreCaches.svg: Added.

Used GTK's StepOver.svg for fallback art for GTK.

  • UserInterface/Images/NavigationItemClear.svg:

Improved artwork for Clear Console button icon to match the weight and
style of the Disable Caches button icon.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

3:50 PM Changeset in webkit [215439] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip webrtc/multi-video.html.
https://bugs.webkit.org/show_bug.cgi?id=170823

Unreviewed test gardening.

3:46 PM Changeset in webkit [215438] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix CMake build.

  • PlatformMac.cmake:
3:28 PM Changeset in webkit [215437] by Ryan Haddad
  • 5 edits in branches/safari-603-branch/LayoutTests

Merge r211155.

3:17 PM Changeset in webkit [215436] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebKit2

[MediaStream] Fix typo in UIDelegate::mediaCaptureStateDidChange
https://bugs.webkit.org/show_bug.cgi?id=170911

Reviewed by Youenn Fablet.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::mediaCaptureStateDidChange): Fix typo.

3:15 PM Changeset in webkit [215435] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Enabled state of "All Requests" XHR breakpoint not restored correctly
https://bugs.webkit.org/show_bug.cgi?id=170916

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WebInspector.DOMDebuggerManager):
Set breakpoint with backend agent, if enabled.

3:04 PM Changeset in webkit [215434] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest webrtc/video-mute.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170704

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Eric Carlson.

  • webrtc/video-mute.html: Another try at making the test not flaky.
2:51 PM Changeset in webkit [215433] by krollin@apple.com
  • 2 edits in trunk/Source/WebKit2

Move and update WebLoaderStrategy logging statement
https://bugs.webkit.org/show_bug.cgi?id=170140

Reviewed by Alex Christensen.

WebLoaderStrategy::scheduleLoad has a logging statement that says, in
part: "Resource has been queued for scheduling with the
NetworkProcess". This statement is emitted after the
ScheduleResourceLoad message has been successfully sent to the
NetworkProcess. The logging statement was added at this location to
indicate that the resource-load had been successfully handed off; it
pairs a similar logging statement that is emitted if the sending of
the ScheduleResourceLoad message fails.

I think it would be better to move this logging statement before the
ScheduleResourceLoad message is sent to the NetworkProcess (and change
its wording to "Resource is being scheduled with the NetworkProcess").
The reason for this change is to help make sure that the sequence of
logging statements is more deterministic. In the current form, the
message "Resource has been queued for scheduling with the
NetworkProcess" normally appears before any NetworkProcess logging
statements that indicate that the resource-loading is continuing
there, but in rare occasions the logging statements can be reversed.
This change in the ordering of the statements has caused a problem in
a script I've written that examines the resource-loading process and
looks for errors. By ensuring that the WebLoaderStrategy statement
always appears before the NetworkResourceLoader statement, the flow
makes better sense and the script can be more robust.

In making this change, we are probably not giving up any assurance
that the ScheduleResourceLoad message has been sent to the
NetworkResourceLoader. If the message is successfully sent, we'll see
logging in the NetworkProcess. If the message has not been sent, we'll
see WebLoaderStrategy logging an error.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

2:39 PM Changeset in webkit [215432] by jmarcell@apple.com
  • 27 edits in tags/Safari-604.1.17.1

Cherry-pick r215386. rdar://problem/31628104

2:34 PM Changeset in webkit [215431] by andersca@apple.com
  • 8 edits in trunk/Source

Stop using deprecated APIs, part 1
https://bugs.webkit.org/show_bug.cgi?id=170915
rdar://problem/31589635

Reviewed by Tim Horton.

Source/WebCore:

Get rid of the status parameter from ApplePayPaymentMethodUpdate.

  • Modules/applepay/ApplePayPaymentMethodUpdate.h:
  • Modules/applepay/ApplePayPaymentMethodUpdate.idl:
  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
(WebCore::ApplePaySession::completePaymentMethodSelection):

  • Modules/applepay/PaymentRequest.h:

Source/WebKit2:

Stop using the PKPaymentRequestPaymentMethodUpdate initializer that takes a status, it's been deprecated
and we always passed PKPaymentAuthorizationStatusSuccess anyway.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::encode):
(IPC::ArgumentCoder<WebCore::PaymentMethodUpdate>::decode):

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):

2:29 PM Changeset in webkit [215430] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.17.1

New tag.

2:24 PM Changeset in webkit [215429] by commit-queue@webkit.org
  • 71 edits in trunk

Disable outdated WritableStream API
https://bugs.webkit.org/show_bug.cgi?id=170749
<rdar://problem/31446233>

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No change of behavior.
Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • Configurations/FeatureDefines.xcconfig:
  • Modules/fetch/FetchBody.cpp:
  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::isDisturbedOrLocked):
(WebCore::FetchBodyOwner::blobLoadingSucceeded):
(WebCore::FetchBodyOwner::blobLoadingFailed):
(WebCore::FetchBodyOwner::blobChunk):

  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::didFail):
(WebCore::FetchResponse::BodyLoader::didReceiveData):

  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/FetchResponse.idl:
  • Modules/fetch/FetchResponseSource.cpp:
  • Modules/fetch/FetchResponseSource.h:
  • Modules/streams/ByteLengthQueuingStrategy.idl:
  • Modules/streams/ByteLengthQueuingStrategy.js:
  • Modules/streams/CountQueuingStrategy.idl:
  • Modules/streams/CountQueuingStrategy.js:
  • Modules/streams/ReadableByteStreamController.idl:
  • Modules/streams/ReadableByteStreamController.js:
  • Modules/streams/ReadableByteStreamInternals.js:
  • Modules/streams/ReadableStream.idl:
  • Modules/streams/ReadableStream.js:

(initializeReadableStream): Using readableByteStreamAPI runtime flag directly.

  • Modules/streams/ReadableStreamBYOBRequest.idl:
  • Modules/streams/ReadableStreamBYOBRequest.js:
  • Modules/streams/ReadableStreamDefaultController.idl:
  • Modules/streams/ReadableStreamDefaultController.js:
  • Modules/streams/ReadableStreamDefaultReader.idl:
  • Modules/streams/ReadableStreamDefaultReader.js:
  • Modules/streams/ReadableStreamInternals.js:
  • Modules/streams/ReadableStreamSource.h:
  • Modules/streams/ReadableStreamSource.idl:
  • Modules/streams/StreamInternals.js:
  • Modules/streams/WritableStream.idl:
  • Modules/streams/WritableStream.js:
  • Modules/streams/WritableStreamInternals.js:
  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::isReadableByteStreamAPIEnabled):
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

  • bindings/js/JSReadableStreamPrivateConstructors.cpp:

(WebCore::constructJSReadableStreamBYOBRequest):
(WebCore::JSBuiltinReadableStreamBYOBRequestPrivateConstructor::initializeExecutable):
(WebCore::createReadableStreamBYOBRequestPrivateConstructor):

  • bindings/js/JSReadableStreamPrivateConstructors.h:
  • bindings/js/JSReadableStreamSourceCustom.cpp:
  • bindings/js/ReadableStreamDefaultController.cpp:
  • bindings/js/ReadableStreamDefaultController.h:
  • bindings/js/WebCoreBuiltinNames.h:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setReadableByteStreamAPIEnabled):
(WebCore::RuntimeEnabledFeatures::readableByteStreamAPIEnabled):
(WebCore::RuntimeEnabledFeatures::setWritableStreamAPIEnabled):
(WebCore::RuntimeEnabledFeatures::writableStreamAPIEnabled):

  • testing/Internals.cpp:
  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences readableByteStreamAPIEnabled]):
(-[WebPreferences setReadableByteStreamAPIEnabled:]):
(-[WebPreferences writableStreamAPIEnabled]):
(-[WebPreferences setWritableStreamAPIEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WTF:

Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • wtf/FeatureDefines.h:

Tools:

Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:

  • A STREAMS_API compilation flag.
  • A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setFetchAPIEnabled):
(WTR::TestRunner::setWritableStreamAPIEnabled):
(WTR::TestRunner::setReadableByteStreamAPIEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
2:15 PM Changeset in webkit [215428] by Ryan Haddad
  • 2 edits in branches/safari-603-branch/LayoutTests

Update expected results for rdar://problem/31636583.

  • platform/mac/fast/text/complex-text-opacity-expected.txt:
1:37 PM Changeset in webkit [215427] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Show pause reason for "All Requests" XHR breakpoint
https://bugs.webkit.org/show_bug.cgi?id=170895

Reviewed by Joseph Pecoraro.

  • Localizations/en.lproj/localizedStrings.js:

Add generic pause reason text: "Requesting: <url>".

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WebInspector.DOMDebuggerManager.prototype.xhrBreakpointForURL):
Relocated helper method from the sidebar.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
Add an XHR breakpoint tree element when pause data contains a breakpoint
URL, otherwise just add a generic text row.

1:25 PM Changeset in webkit [215426] by jmarcell@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

1:24 PM Changeset in webkit [215425] by timothy_horton@apple.com
  • 34 edits
    4 adds in trunk

Provide a viewport parameter to disable clipping to the safe area
https://bugs.webkit.org/show_bug.cgi?id=170766
<rdar://problem/31564634>

Reviewed by Beth Dakin.

Tests: tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles.html,

tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles.html,

  • dom/ViewportArguments.cpp:

(WebCore::ViewportArguments::resolve):
(WebCore::setViewportFeature):

  • dom/ViewportArguments.h:

(WebCore::ViewportArguments::operator==):

  • page/ViewportConfiguration.cpp:

(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::operator<<):
(WebCore::ViewportConfiguration::description):

  • page/ViewportConfiguration.h:

(WebCore::ViewportConfiguration::Parameters::Parameters):
(WebCore::ViewportConfiguration::clipToSafeArea):
Add viewport parameter.

  • page/ChromeClient.h:
  • page/FrameView.h:
  • page/FrameView.cpp:

(WebCore::FrameView::enableSpeculativeTilingIfNeeded):
If not clipping to the safe area, enable "speculative" tiling immediately,
because the margin tiles can be visible immediately.

(WebCore::FrameView::hasExtendedBackgroundRectForPainting):
(WebCore::FrameView::updateTilesForExtendedBackgroundMode):
Don't check the setting here; just respect the mode that is computed
by calculateExtendedBackgroundMode.

(WebCore::FrameView::calculateExtendedBackgroundMode):
If the viewport parameter was set, add margin tiles on both axes.

(WebCore::FrameView::setClipToSafeArea):
Notify ChromeClient of the change, and re-compute the margin tile mode.

  • rendering/RenderLayerCompositor.h:
  • rendering/RenderLayerCompositor.cpp:

Factor out code that decides whether the content layer clips to bounds,
and make it take the new viewport parameter into account.

  • rendering/RenderObject.cpp:

Don't clip RenderView repaints to RenderView's GraphicsLayer bounds if
clip-to-safe-area is off, just like we do for slow-repaint objects in
extended background mode.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::setClipToSafeArea):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::clipToSafeArea):

  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::didChangeClipToSafeArea):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didChangeClipToSafeArea):

  • UIProcess/mac/PageClientImpl.h:

Forward clip-to-safe-area changes from ChromeClient to WKWebView.
Update visible content rects when it changes, which will
result in a call to updateFixedClippingView, as below.
Keep track of the current state in the UI process.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _contentMayDrawInObscuredInsets]):
Expose the current state of the clip-to-safe-area bit as SPI.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView updateFixedClippingView:]):
Disable fixed clipping when clip-to-safe-area is disabled.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::viewportConfigurationChanged):
Push the viewport's clip-to-safe-area bit onto the main frame's FrameView.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setObscuredInsets):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::setObscuredInsets):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setObscuredInsets):
Add a UIScriptController mechanism to install obscured insets
on the web view.

  • tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles-expected.txt: Added.
  • tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles.html: Added.
  • tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles-expected.txt: Added.
  • tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles.html: Added.
1:22 PM Changeset in webkit [215424] by mitz@apple.com
  • 9 edits
    7 adds in trunk

[Cocoa] Move isNullFunctionPointer down into WTF
https://bugs.webkit.org/show_bug.cgi?id=170892

Reviewed by Sam Weinig.

Source/WebCore:

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::webRTCAvailable): Changed to use WTF::isNullFunctionPointer,

and removed the static variable, so instead of loading from the initialization guard,
branching, then loading from the variable itself, we just load from the function pointer.

(WebCore::isNullFunctionPointer): Deleted.

Source/WebKit2:

  • Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:

(WebKit::ResourceLoadStatisticsClassifierCocoa::canUseCorePrediction): Changed to use

WTF::isNullFunctionPointer.

(WebKit::isNullFunctionPointer): Deleted.

Source/WTF:

Test: TestWebKitAPI/Tests/WTF/darwin/WeakLinking.cpp

  • WTF.xcodeproj/project.pbxproj: Added reference to new file.
  • wtf/darwin: Added.
  • wtf/darwin/WeakLinking.h: Added.

(WTF::isNullFunctionPointer): Copied from ResourceLoadStatisticsClassifierCocoa.cpp in

WebKit2 and changed into a function template that works with any function pointer.

Tools:

  • TestWebKitAPI/Configurations/TestWTF.xcconfig:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/darwin/WeakLinking.cpp: Added.

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS-v2.tbd: Added.
  • TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS.tbd: Added.
  • TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-macOS-v2.tbd: Added.
  • TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-macOS.tbd: Added.
1:07 PM Changeset in webkit [215423] by jiewen_tan@apple.com
  • 33 edits
    10 copies
    4 moves
    41 adds in trunk

[WebCrypto] Add support for ECDSA
https://bugs.webkit.org/show_bug.cgi?id=170789
<rdar://problem/31588604>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/hmac.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa-expected.txt:
  • web-platform-tests/WebCryptoAPI/sign_verify/test_hmac-expected.txt:

Source/WebCore:

This patch implements ECDSA according to the spec: https://www.w3.org/TR/WebCryptoAPI/#ecdsa.
Supported operations include sign, verify, generateKey, importKey and exportKey.

Tests: crypto/subtle/ecdh-generate-export-key-pkcs8-p256.html

crypto/subtle/ecdh-generate-export-key-pkcs8-p384.html
crypto/subtle/ecdsa-generate-export-jwk-key.html
crypto/subtle/ecdsa-generate-export-key-pkcs8.html
crypto/subtle/ecdsa-generate-export-key-raw.html
crypto/subtle/ecdsa-generate-export-key-spki.html
crypto/subtle/ecdsa-generate-key-sign-verify-p256.html
crypto/subtle/ecdsa-generate-key-sign-verify-p384.html
crypto/subtle/ecdsa-generate-key.html
crypto/subtle/ecdsa-import-jwk-private-key.html
crypto/subtle/ecdsa-import-jwk-public-key-alg-256.html
crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html
crypto/subtle/ecdsa-import-jwk-public-key.html
crypto/subtle/ecdsa-import-key-sign-p256.html
crypto/subtle/ecdsa-import-key-sign-p384.html
crypto/subtle/ecdsa-import-key-verify-p256.html
crypto/subtle/ecdsa-import-key-verify-p384.html
crypto/subtle/ecdsa-import-pkcs8-key.html
crypto/subtle/ecdsa-import-raw-key.html
crypto/subtle/ecdsa-import-spki-key.html
crypto/subtle/ecdsa-verify-malformed-parameters.html
crypto/workers/subtle/ecdsa-import-key-sign.html
crypto/workers/subtle/ecdsa-import-key-verify.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionSignPromise):
(WebCore::jsSubtleCryptoFunctionVerifyPromise):
Add missing parameters.

  • crypto/CommonCryptoUtilities.h:
  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):

  • crypto/CryptoAlgorithm.h:

Add missing parameters.

  • crypto/CryptoAlgorithmParameters.h:
  • crypto/algorithms/CryptoAlgorithmECDSA.cpp: Added.

(WebCore::CryptoAlgorithmECDSA::create):
(WebCore::CryptoAlgorithmECDSA::identifier):
(WebCore::CryptoAlgorithmECDSA::sign):
(WebCore::CryptoAlgorithmECDSA::verify):
(WebCore::CryptoAlgorithmECDSA::generateKey):
(WebCore::CryptoAlgorithmECDSA::importKey):
(WebCore::CryptoAlgorithmECDSA::exportKey):

  • crypto/algorithms/CryptoAlgorithmECDSA.h: Added.
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:

Add missing parameters.

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:

Add missing parameters.

  • crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp: Added.

(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):

  • crypto/mac/CommonCryptoDERUtilities.cpp: Added.

(WebCore::bytesUsedToEncodedLength):
(WebCore::extraBytesNeededForEncodedLength):
(WebCore::addEncodedASN1Length):
(WebCore::bytesNeededForEncodedLength):

  • crypto/mac/CommonCryptoDERUtilities.h:

(WebCore::bytesUsedToEncodedLength): Deleted.
(WebCore::extraBytesNeededForEncodedLength): Deleted.
(WebCore::addEncodedASN1Length): Deleted.
(WebCore::bytesNeededForEncodedLength): Deleted.
Move implementations to a .cpp file.

  • crypto/mac/CryptoAlgorithmECDSAMac.cpp: Added.

(WebCore::cryptoDigestAlgorithm):
(WebCore::signECDSA):
(WebCore::verifyECDSA):
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):

  • crypto/mac/CryptoAlgorithmRegistryMac.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

  • crypto/parameters/CryptoAlgorithmEcdsaParams.h: Added.
  • crypto/parameters/EcdsaParams.idl: Added.

LayoutTests:

  • crypto/subtle/ec-generate-key-malformed-parameters-expected.txt:
  • crypto/subtle/ec-generate-key-malformed-parameters.html:
  • crypto/subtle/ec-import-key-malformed-parameters-expected.txt:
  • crypto/subtle/ec-import-key-malformed-parameters.html:
  • crypto/subtle/ecdh-generate-export-key-pkcs8-p256-expected.txt: Renamed from LayoutTests/crypto/subtle/ecdh-generate-export-pkcs8-p256-expected.txt.
  • crypto/subtle/ecdh-generate-export-key-pkcs8-p256.html: Renamed from LayoutTests/crypto/subtle/ecdh-generate-export-pkcs8-p256.html.
  • crypto/subtle/ecdh-generate-export-key-pkcs8-p384-expected.txt: Renamed from LayoutTests/crypto/subtle/ecdh-generate-export-pkcs8-p384-expected.txt.
  • crypto/subtle/ecdh-generate-export-key-pkcs8-p384.html: Renamed from LayoutTests/crypto/subtle/ecdh-generate-export-pkcs8-p384.html.
  • crypto/subtle/ecdsa-generate-export-jwk-key-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-export-jwk-key.html: Added.
  • crypto/subtle/ecdsa-generate-export-key-pkcs8-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-export-key-pkcs8.html: Added.
  • crypto/subtle/ecdsa-generate-export-key-raw-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-export-key-raw.html: Added.
  • crypto/subtle/ecdsa-generate-export-key-spki-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-export-key-spki.html: Added.
  • crypto/subtle/ecdsa-generate-key-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-key-sign-verify-p256-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-key-sign-verify-p256.html: Added.
  • crypto/subtle/ecdsa-generate-key-sign-verify-p384-expected.txt: Added.
  • crypto/subtle/ecdsa-generate-key-sign-verify-p384.html: Added.
  • crypto/subtle/ecdsa-generate-key.html: Added.
  • crypto/subtle/ecdsa-import-jwk-private-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-jwk-private-key.html: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-256-expected.txt: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-256.html: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-384-expected.txt: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-alg-384.html: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-jwk-public-key.html: Added.
  • crypto/subtle/ecdsa-import-key-sign-p256-expected.txt: Added.
  • crypto/subtle/ecdsa-import-key-sign-p256.html: Added.
  • crypto/subtle/ecdsa-import-key-sign-p384-expected.txt: Added.
  • crypto/subtle/ecdsa-import-key-sign-p384.html: Added.
  • crypto/subtle/ecdsa-import-key-verify-p256-expected.txt: Added.
  • crypto/subtle/ecdsa-import-key-verify-p256.html: Added.
  • crypto/subtle/ecdsa-import-key-verify-p384-expected.txt: Added.
  • crypto/subtle/ecdsa-import-key-verify-p384.html: Added.
  • crypto/subtle/ecdsa-import-pkcs8-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-pkcs8-key.html: Added.
  • crypto/subtle/ecdsa-import-raw-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-raw-key.html: Added.
  • crypto/subtle/ecdsa-import-spki-key-expected.txt: Added.
  • crypto/subtle/ecdsa-import-spki-key.html: Added.
  • crypto/subtle/ecdsa-verify-malformed-parameters-expected.txt: Added.
  • crypto/subtle/ecdsa-verify-malformed-parameters.html: Added.
  • crypto/workers/subtle/ecdsa-import-key-sign-expected.txt: Added.
  • crypto/workers/subtle/ecdsa-import-key-sign.html: Added.
  • crypto/workers/subtle/ecdsa-import-key-verify-expected.txt: Added.
  • crypto/workers/subtle/ecdsa-import-key-verify.html: Added.
  • crypto/workers/subtle/resources/ecdsa-import-key-sign.js: Added.
  • crypto/workers/subtle/resources/ecdsa-import-key-verify.js: Added.
12:30 PM Changeset in webkit [215422] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: XHR breakpoints restored from settings do not appear in the sidebar
https://bugs.webkit.org/show_bug.cgi?id=170890

Reviewed by Joseph Pecoraro.

Need to check for existing breakpoints when XHRBreakpointTreeController
is constructed, instead of just listening for added breakpoints.

  • UserInterface/Controllers/XHRBreakpointTreeController.js:

(WebInspector.XHRBreakpointTreeController):
(WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointAdded):
(WebInspector.XHRBreakpointTreeController.prototype._addTreeElement):

12:26 PM Changeset in webkit [215421] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebKit2

[WK2] Respect a new internal setting for defaulting to character selection granularity
https://bugs.webkit.org/show_bug.cgi?id=170904
<rdar://problem/31364280>

Reviewed by Dan Bernstein.

Respect a new WebKitDebugDefaultSelectionGranularityCharacter user default by initializing
WKWebViewConfiguration with WKSelectionGranularityCharacter, but only when linked on or after the first iOS to
use WKSelectionGranularityCharacter by default.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

  • UIProcess/Cocoa/VersionChecks.h:
11:26 AM Changeset in webkit [215420] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebKit2

Provide a way for clients to unmute a media stream.
https://bugs.webkit.org/show_bug.cgi?id=170855
<rdar://problem/31656855>

Reviewed by Jon Lee.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setPageMuted:]): New.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
10:58 AM Changeset in webkit [215419] by timothy_horton@apple.com
  • 1 edit
    6 deletes in trunk/LayoutTests/imported/w3c

Remove some accidentally-added .orig files
https://bugs.webkit.org/show_bug.cgi?id=170908

Reviewed by Youenn Fablet.

  • web-platform-tests/resources/docs/api.md.orig: Removed.
  • web-platform-tests/resources/examples/apisample12.html.orig: Removed.
  • web-platform-tests/resources/webidl2/test/widlproc/doc/htmltodtd.xsl.orig: Removed.
  • web-platform-tests/resources/webidl2/test/widlproc/doc/widlproc.html.orig: Removed.
  • web-platform-tests/resources/webidl2/test/widlproc/examples/spectowidl.xsl.orig: Removed.
  • web-platform-tests/resources/webidl2/test/widlproc/src/widlprocxmltohtml.xsl.orig: Removed.
10:00 AM Changeset in webkit [215418] by commit-queue@webkit.org
  • 14 edits
    2 copies
    2 adds in trunk/Source

Refactor enumerateDevices to allow separate CaptureDeviceManagers for audio and video.
https://bugs.webkit.org/show_bug.cgi?id=170778

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-04-17
Source/WebCore:

Reviewed by Eric Carlson.

Add CoreAudioCaptureDeviceManager to enumerate CoreAudio devices.

Refactor RealtimeMediaSourceCenter and RealtimeMediaSourceCenterMac to provide independent audio and video capture device managers
and the abiliity to override the capture device managers.

CoreAudioCaptureSource now uses CoreAudioCaptureDeviceManager to use the specified device instead of the default one.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/CaptureDeviceManager.cpp:

(CaptureDeviceManager::getAudioSourcesInfo):
(CaptureDeviceManager::getVideoSourcesInfo):
(CaptureDeviceManager::getSourcesInfo): Deleted.

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::setAudioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::unsetAudioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::setVideoCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::unsetVideoCaptureDeviceManager):

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager):

  • platform/mediastream/mac/AVCaptureDeviceManager.h:
  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::refreshAVCaptureDevicesOfType):
(WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
(WebCore::AVCaptureDeviceManager::getAudioSourcesInfo):
(WebCore::AVCaptureDeviceManager::getVideoSourcesInfo):
(WebCore::AVCaptureDeviceManager::setUseAVFoundationAudioCapture): Deleted.
(WebCore::AVCaptureDeviceManager::getSourcesInfo): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureDevice.cpp: Added.

(WebCore::getDeviceInfo):
(WebCore::CoreAudioCaptureDevice::create):
(WebCore::CoreAudioCaptureDevice::CoreAudioCaptureDevice):
(WebCore::CoreAudioCaptureDevice::deviceID):
(WebCore::CoreAudioCaptureDevice::deviceClock):
(WebCore::CoreAudioCaptureDevice::isAlive):

  • platform/mediastream/mac/CoreAudioCaptureDevice.h: Copied from Source/WebCore/platform/mediastream/CaptureDeviceManager.h.
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp: Added.

(WebCore::CoreAudioCaptureDeviceManager::singleton):
(WebCore::CoreAudioCaptureDeviceManager::captureDevices):
(WebCore::deviceHasInputStreams):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::devicesChanged):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h: Copied from Source/WebCore/platform/mediastream/CaptureDeviceManager.h.
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture):
(WebCore::RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
(WebCore::RealtimeMediaSourceCenterMac::getMediaStreamDevices):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:

Source/WebKit2:

Reviewed by Tim Horton.

setUseAVFoundationAudioCapture is moved from AVCaptureDeviceManager to RealtimeMediaSourceCenterMac.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs):

9:37 AM Changeset in webkit [215417] by Ryan Haddad
  • 5 edits
    1 delete in trunk

Unreviewed, rolling out r215366.

This test is failing on performance bots.

Reverted changeset:

"Add performance test for asking the platform for a font for
U+2060 WORD JOINER"
https://bugs.webkit.org/show_bug.cgi?id=170842
http://trac.webkit.org/changeset/215366

9:15 AM Changeset in webkit [215416] by jbedard@apple.com
  • 2 edits in trunk/Tools

webkitpy: Correct poll when killing ServerProcess

Unreviewed infrastructure fix.

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess._kill): A polled process equaling 'None' means the process is running.

9:08 AM Changeset in webkit [215415] by jmarcell@apple.com
  • 1 copy in tags/Safari-603.2.4

Tag Safari-603.2.4.

8:44 AM Changeset in webkit [215414] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTestwebrtc/audio-replace-track.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170837

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Eric Carlson.

  • webrtc/audio-replace-track.html: Updating the test to be less flaky.
8:34 AM Changeset in webkit [215413] by eric.carlson@apple.com
  • 4 edits in trunk/Tools

[MediaStream] Enable getUserMedia API test
https://bugs.webkit.org/show_bug.cgi?id=170901
<rdar://problem/31656594>

Reviewed by Youenn Fablet.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add test.
  • TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:

(TestWebKitAPI::decidePolicyForUserMediaPermissionRequestCallBack):
(TestWebKitAPI::TEST): Enable capture with mock devices.

  • TestWebKitAPI/Tests/WebKit2/getUserMedia.html: Update to mediaDevices.getUserMedia
8:27 AM Changeset in webkit [215412] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

RTCPeerConnection addTrack does not require a stream parameter
https://bugs.webkit.org/show_bug.cgi?id=170894

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Alex Christensen.

Source/WebCore:

Test: webrtc/video-addTrack.html

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTrack): Removing obsolete error throwing.

LayoutTests:

  • webrtc/video-addTrack-expected.txt: Added.
  • webrtc/video-addTrack.html: Added.
8:01 AM Changeset in webkit [215411] by commit-queue@webkit.org
  • 10 edits
    2 adds in trunk/Source

Add an external libwebrtc encoder factory in WebCore
https://bugs.webkit.org/show_bug.cgi?id=170883

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-17
Reviewed by Alex Christensen.

Source/ThirdParty/libwebrtc:

Exporting some symbols.
Allowing to customize the creation of the H264 encoder.

  • Source/webrtc/media/base/codec.h:
  • Source/webrtc/media/engine/webrtcvideoencoderfactory.h
  • Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc:
  • Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.h:
  • Source/webrtc/video_decoder.h
  • Source/webrtc/video_encoder.h

Source/WebCore:

No change of behavior, WebCore factory instantiating the default libwebrtc H264 encoder.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::staticFactoryAndThreads):

  • platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp: Added.

(WebCore::VideoToolboxVideoEncoderFactory::CreateVideoEncoder):
(WebCore::VideoToolboxVideoEncoderFactory::DestroyVideoEncoder):

  • platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.h: Added.
8:00 AM Changeset in webkit [215410] by antti@apple.com
  • 7 edits in trunk/Source/WebCore

GraphicsLayerCA::recursiveCommitChanges should not descend into subtrees without changes
https://bugs.webkit.org/show_bug.cgi?id=170851

Reviewed by Simon Fraser.

With lots of layers this can be very slow as it always traverses the entire layer tree.
For example GIF animations on tumblr.com trigger expensive commits where almost nothing changes.

This patch adds m_hasDescendantsWithUncommittedChanges bit to GraphicsLayerCA. With this
we can avoid descending to branches without changes when committing.

This patch enabled the optimization on Mac.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::GraphicsLayerCA::syncPosition):

Set PositionChanged flag when syncing layer position. This flag does nothing except makes
next commit to update the coverage rect (so tiling gets updated).

(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):

Do all setting of m_uncommittedChanges bits via addUncommittedChanges function.

(WebCore::GraphicsLayerCA::recursiveCommitChanges):

Bail out if neither the current layer nor any of its descendants have any uncommited changes
and none of the ancestors had changes.

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
(WebCore::GraphicsLayerCA::addUncommittedChanges):

Set m_hasDescendantsWithUncommittedChanges bit in ancestors when mutating m_uncommittedChanges.

(WebCore::GraphicsLayerCA::noteLayerPropertyChanged):

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::RenderLayerCompositor::frameViewDidScroll):

Tell the scrolling layer that it needs to recompute coverage.
This also schedules a layer flush so no need to do that separately.

7:47 AM Changeset in webkit [215409] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] Update the Fedora dependencies for WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=170590

Patch by Xan Lopez <xan@igalia.com> on 2017-04-17
Reviewed by Carlos Alberto Lopez Perez.

  • gtk/install-dependencies: add a bunch of modules necessary to

get a proper set of GStreamer codecs for WebRTC.

6:51 AM Changeset in webkit [215408] by Yusuke Suzuki
  • 7 edits in trunk

[JSCOnly] Fix build failures in macOS
https://bugs.webkit.org/show_bug.cgi?id=170887

Reviewed by Alex Christensen.

.:

Align ICU header configuration to MacCMake port.

  • Source/cmake/OptionsJSCOnly.cmake:

Source/JavaScriptCore:

Align ICU header configuration to MacCMake port.

  • PlatformJSCOnly.cmake:

Source/WTF:

JSCOnly port does not use mac/MainThread.cpp.
We change the ifdef gurard to use generic implementaion in JSCOnly on macOS.

  • wtf/MainThread.cpp:
  • wtf/PlatformJSCOnly.cmake:
1:24 AM Changeset in webkit [215407] by jfbastien@apple.com
  • 20 edits in trunk/Source

B3: don't allow unsigned offsets in Value
https://bugs.webkit.org/show_bug.cgi?id=170692

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

MemoryValue and similar B3 opcode classes always expects a signed
offset. Giving it an out-of-bounds unsigned offset causes
implementation-defined behavior, which can cause badness as I just
fixed in WebAssembly. This patch makes it impossible to create a
Value opcodes with an unsigned value, or with an overly-large
value.

  • b3/B3AtomicValue.cpp:

(JSC::B3::AtomicValue::AtomicValue):

  • b3/B3AtomicValue.h:
  • b3/B3Common.h:

(JSC::B3::isRepresentableAs):

  • b3/B3EliminateCommonSubexpressions.cpp:
  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::scaleForShl):
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::addr):
(JSC::B3::Air::LowerToAir::tryAppendLea):

  • b3/B3MemoryValue.cpp:

(JSC::B3::MemoryValue::isLegalOffsetImpl):
(JSC::B3::MemoryValue::MemoryValue):

  • b3/B3MemoryValue.h:
  • b3/B3MemoryValueInlines.h:

(JSC::B3::MemoryValue::isLegalOffsetImpl):

  • b3/B3MoveConstants.cpp:
  • b3/B3ReduceStrength.cpp:
  • b3/B3StackmapSpecial.cpp:

(JSC::B3::StackmapSpecial::repForArg):

  • b3/B3Value.h:
  • b3/air/AirArg.cpp:

(JSC::B3::Air::Arg::stackAddrImpl):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::addr):
(JSC::B3::Air::Arg::stack):
(JSC::B3::Air::Arg::callArg):
(JSC::B3::Air::Arg::stackAddr):
(JSC::B3::Air::Arg::index):
(JSC::B3::Air::Arg::offset):
(JSC::B3::Air::Arg::isValidAddrForm):
(JSC::B3::Air::Arg::isValidIndexForm):
(JSC::B3::Air::Arg::asTrustedImm32):
(JSC::B3::Air::Arg::asAddress):
(JSC::B3::Air::Arg::asBaseIndex):

  • b3/air/AirLowerStackArgs.cpp:

(JSC::B3::Air::lowerStackArgs):

  • b3/testb3.cpp:

(JSC::B3::testMulArgStore):
(JSC::B3::testStore32):
(JSC::B3::testStoreConstant):
(JSC::B3::testStoreConstantPtr):
(JSC::B3::testStoreAddLoad32):
(JSC::B3::testStoreAddLoadImm32):
(JSC::B3::testStoreAddLoad8):
(JSC::B3::testStoreAddLoadImm8):
(JSC::B3::testStoreAddLoad16):
(JSC::B3::testStoreAddLoadImm16):
(JSC::B3::testStoreAddLoad64):
(JSC::B3::testStoreAddLoadImm64):
(JSC::B3::testStoreAddLoad32Index):
(JSC::B3::testStoreAddLoadImm32Index):
(JSC::B3::testStoreAddLoad64Index):
(JSC::B3::testStoreAddLoadImm64Index):
(JSC::B3::testStoreSubLoad):
(JSC::B3::testStoreAddLoadInterference):
(JSC::B3::testStoreAddAndLoad):
(JSC::B3::testStoreNegLoad32):
(JSC::B3::testStoreNegLoadPtr):
(JSC::B3::testLoadOffset):
(JSC::B3::testLoadOffsetNotConstant):
(JSC::B3::testLoadOffsetUsingAdd):
(JSC::B3::testLoadOffsetUsingAddInterference):
(JSC::B3::testLoadOffsetUsingAddNotConstant):
(JSC::B3::testStoreLoadStackSlot):
(JSC::B3::testLoad):
(JSC::B3::testInterpreter):
(JSC::B3::testTrappingStore):
(JSC::B3::testTrappingLoadAddStore):
(JSC::B3::testWasmAddress):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffset):
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::B3IRGenerator::emitLoadOp):
(JSC::Wasm::B3IRGenerator::emitStoreOp):

Source/WTF:

Add C++17's std::conjunction type trait, except for Microsoft VS
2015 update 2 and later because it adds the logical operator type
traits, event when C++ is pre-2017:
https://blogs.msdn.microsoft.com/vcblog/2016/01/22/vs-2015-update-2s-stl-is-c17-so-far-feature-complete/

  • wtf/StdLibExtras.h:

Apr 16, 2017:

11:02 PM Changeset in webkit [215406] by jmarcell@apple.com
  • 9 edits
    1 delete in branches/safari-603-branch

Roll out r211294 vi 215335. rdar://problem/31512298

7:59 PM Changeset in webkit [215405] by commit-queue@webkit.org
  • 7 edits in trunk

test262: test262/test/built-ins/Object/prototype/toLocaleString/primitive_this_value.js
https://bugs.webkit.org/show_bug.cgi?id=170882

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-16
Reviewed by Saam Barati.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncToLocaleString):
We should be using the this value without ToObject conversion both when
getting the potential accessor and calling it. In strict mode, the this
value will remain its simple value, in non-strict it is still converted.

LayoutTests:

  • js/dom/object-prototype-toLocaleString-expected.txt:
  • js/dom/script-tests/object-prototype-toLocaleString.js:

Test the case of toLocaleString where toString does not exist.

5:56 PM Changeset in webkit [215404] by Chris Dumez
  • 8 edits
    4 adds in trunk

CMD+R / CMD+Q is considered as user interaction and beforeunload alert is shown
https://bugs.webkit.org/show_bug.cgi?id=169995
<rdar://problem/23798897>

Reviewed by Sam Weinig.

Source/WebCore:

Any key event was considered as user interaction with the page, which meant that they
would allow beforeunload alerts to be shown even when they do not represent actual
user interaction (e.g CMD+R / CMD+Q / CMD+T keyboard shortcuts).

To address the issue, we now only treat as user interaction with the page key events
that are actually handled by the page (i.e. handled by JS, typed into a field, ...).

Tests: fast/events/beforeunload-alert-handled-keydown.html

fast/events/beforeunload-alert-unhandled-keydown.html

  • dom/Document.h:

(WebCore::Document::setUserDidInteractWithPage):
(WebCore::Document::userDidInteractWithPage):

  • dom/UserGestureIndicator.cpp:

(WebCore::UserGestureIndicator::UserGestureIndicator):

  • loader/FrameLoader.cpp:

(WebCore::shouldAskForNavigationConfirmation):

  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::internalKeyEvent):

  • page/EventHandler.h:

LayoutTests:

Add layout test coverage.

  • fast/events/beforeunload-alert-handled-keydown-expected.txt: Added.
  • fast/events/beforeunload-alert-handled-keydown.html: Added.
  • fast/events/beforeunload-alert-unhandled-keydown-expected.txt: Added.
  • fast/events/beforeunload-alert-unhandled-keydown.html: Added.
5:50 PM Changeset in webkit [215403] by commit-queue@webkit.org
  • 26 edits
    1 add
    1 delete in trunk

[WebIDL] Switch IDLAttributes.txt over to a more structured format so that more information can be added for each attribute
https://bugs.webkit.org/show_bug.cgi?id=170843

Patch by Sam Weinig <sam@webkit.org> on 2017-04-16
Reviewed by Chris Dumez.

.:

  • Source/cmake/WebKitMacros.cmake:

Update extension of IDLAttributes to .json

Source/WebCore:

  • Converts IDLAttributes.txt to IDLAttributes.json, and adds additional information for each attribute about what contexts they are valid in which is checked by the parser.
  • Removes CustomSetPrototype which was unused, and Immutable which did nothing.
  • DerivedSources.make:

Update extension of IDLAttributes to .json

  • WebCore.xcodeproj/project.pbxproj:

Update project file for new file name and add some missing IDL files.

  • bindings/scripts/CodeGenerator.pm:

Store the processed IDLAttributes in the code generator, so it can
be used for any additional Parser instantiations.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
Remove support for CustomSetPrototype. Nobody is using it.

  • bindings/scripts/IDLAttributes.json: Copied from Source/WebCore/bindings/scripts/IDLAttributes.txt.
  • bindings/scripts/IDLAttributes.txt: Removed.

Rename IDLAttributes.txt -> IDLAttributes.json and move the data
into a more structured format. For now each extended attribute can
have the following fields:

Required:

'contextsAllowed' -> Non-empty array of strings from the contexts array.

Optional:

'values' -> Non-empty array of strings allowed after the equal (=) sign in

the extended attribute. Like before, an empty string indicates it is
ok to not have a value and a star (*) indicates any string is allowed.
Not providing a values property at all indicates that no value is
allowed.

'standard' -> An object with information about the standard this attribute

comes from. Should only be added to attributes that come from standards.

'unsupported' -> A boolean with value true, indicating this property is not

yet supported. Should only be used for standard attributes.

'notes' -> A string with notes explaining something about this attribute.

  • bindings/scripts/IDLParser.pm:

Pass and store the processed extended attribute map to the parser, and use it
validate that extended attributes being added to things are appropriate for the
context. Fix FIXME in isExtendedAttributeApplicableToTypes by using the map to
implement the predicate, rather than hard coding the list.

  • bindings/scripts/generate-bindings.pl:

(generateEmptyHeaderAndCpp):
(loadIDLAttributes): Deleted.
(checkIDLAttributes): Deleted.
(checkIfIDLAttributesExists): Deleted.
Make specifying an IDL attributes file required. Switch to processing it
as a JSON file, and having the parser validate attributes.

  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/TestImplements.idl:
  • bindings/scripts/test/TestObj.idl:
  • bindings/scripts/test/TestSupplemental.idl:
  • bindings/scripts/test/TestTypedefs.idl:
  • Remove use of Immutable extended attribute in the tests, as it does nothing.
  • Remove use of the made up ReadOnly attribute, as the tests now use the IDLAttributes file to validate that the attributes are supported, so this would otherwise fail.
  • css/WebKitCSSMatrix.idl:
  • svg/SVGZoomEvent.idl:
  • Remove use of the Immutable extended attribute, as it does nothing.
  • page/NavigatorID.idl:
  • page/NavigatorLanguage.idl:
  • Remove use of the Nondeterministic extended attribute, as it does nothing.
  • Modules/mediasource/SourceBufferList.idl:

Remove use of CallWith on the interface. It is illegal, and does nothing.

  • animation/KeyframeEffect.idl:
  • animation/WebAnimation.idl:

Remove use of [Default=Undefined]. This construct does nothing and now
correctly fails to parse.

Tools:

  • DumpRenderTree/DerivedSources.make:
  • WebKitTestRunner/DerivedSources.make:
  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.generate_from_idl):
Pass IDLAttributes.json, as it is now mandatory to have one.

1:20 PM Changeset in webkit [215402] by commit-queue@webkit.org
  • 10 edits
    1 add in trunk

test262: test262/test/built-ins/isNaN/toprimitive-not-callable-throws.js
https://bugs.webkit.org/show_bug.cgi?id=170888

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-16
Reviewed by Saam Barati.

JSTests:

  • stress/computed-accessor.js:
  • stress/eval-in-arrow-function.js:
  • stress/rest-elements.js:
  • stress/string-object-define-own-property.js:

Remove unused shouldThrow.

  • stress/symbol-toprimitive-errors.js: Added.

Check for ToPrimitive TypeErrors.

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/ExceptionHelpers.h:
  • runtime/ExceptionHelpers.cpp:

(JSC::createInvalidInstanceofParameterErrorHasInstanceValueNotFunction):
Fix up this function name.

  • runtime/JSObject.cpp:

(JSC::callToPrimitiveFunction):
When called with @@isPrimitive, bail on undefined or null and
throw a type error if the value is not callable.

(JSC::JSObject::toPrimitive):
Use throw scope to check for exception.

1:01 PM Changeset in webkit [215401] by commit-queue@webkit.org
  • 4 edits
    1 add in trunk

test262: test262/test/language/expressions/tagged-template/template-object.js
https://bugs.webkit.org/show_bug.cgi?id=170878

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-16
Reviewed by Saam Barati.

JSTests:

  • stress/array-length-not-writable.js: Added.

(assert):

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/JSArray.cpp:

(JSC::JSArray::put):
The fast path for setting an Array's length should check if length is
writable before checking for and possibly throwing a RangeError.

10:37 AM Changeset in webkit [215400] by commit-queue@webkit.org
  • 9 edits in trunk

test262: test262/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js
https://bugs.webkit.org/show_bug.cgi?id=170879

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-16
Reviewed by Saam Barati.

JSTests:

  • ChakraCore/test/es5/enumerable.baseline-jsc:
  • test262.yaml:

Source/JavaScriptCore:

  • runtime/StringObject.h:
  • runtime/StringObject.cpp:

(JSC::StringObject::getOwnPropertyNames):
(JSC::StringObject::getOwnNonIndexPropertyNames):
Ensure 'length' comes after all indexed properties by moving
it out to the getOwnNonIndexPropertyNames method which is called
inside of getOwnPropertyNames after JSObject handles indices.

LayoutTests:

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
4:13 AM Changeset in webkit [215399] by commit-queue@webkit.org
  • 11 edits in trunk

test262: test262/test/built-ins/Date/prototype/Symbol.toPrimitive/name.js
https://bugs.webkit.org/show_bug.cgi?id=170884

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-16
Reviewed by Yusuke Suzuki.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/DatePrototype.cpp:

(JSC::DatePrototype::finishCreation):

  • runtime/FunctionPrototype.cpp:

(JSC::FunctionPrototype::addFunctionProperties):

  • runtime/RegExpPrototype.cpp:

(JSC::RegExpPrototype::finishCreation):

  • runtime/SymbolPrototype.cpp:

(JSC::SymbolPrototype::finishCreation):
Give symbol property functions proper function names.
This addresses function.name but not function.toString().

Apr 15, 2017:

11:24 PM Changeset in webkit [215398] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows build after r215396.
https://bugs.webkit.org/show_bug.cgi?id=170828

  • platform/graphics/win/FontPlatformDataWin.cpp:

(WebCore::FontPlatformData::openTypeTable):

7:40 PM Changeset in webkit [215397] by krollin@apple.com
  • 5 edits in trunk/Source/WebKit2

Include resource size in some existing logging
https://bugs.webkit.org/show_bug.cgi?id=170866

Reviewed by Alex Christensen.

In order to correlate resource load times with resource size, we log
when the resource is starting to be loaded and when the resource is
finished loading. In NetworkResourceLoader::didReceiveResponse, we
also log the expected resource length. However, we can only log the
length if it is provided in Content-Length, which is not always the
case. If it's not provided, we end up logging "length = -1". To make
up for this, change NetworkResourceLoader::didFinishLoading and
WebResourceLoader:: didFinishLoading to log the length once we know
it.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):

  • NetworkProcess/NetworkResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):

  • WebProcess/Network/WebResourceLoader.h:
5:09 PM Changeset in webkit [215396] by achristensen@apple.com
  • 5 edits in trunk/Source/WebCore

Remove unused SharedBuffer constructor
https://bugs.webkit.org/show_bug.cgi?id=170828

Reviewed by Brady Eidson.

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::append):

  • platform/SharedBuffer.h:

(WebCore::SharedBuffer::create):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::openTypeTable):

  • platform/graphics/win/FontPlatformDataWin.cpp:

(WebCore::FontPlatformData::openTypeTable):

3:44 PM Changeset in webkit [215395] by commit-queue@webkit.org
  • 10 edits in trunk

test262: test262/test/language/global-code/new.target-arrow.js
https://bugs.webkit.org/show_bug.cgi?id=170872

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-15
Reviewed by Saam Barati.

JSTests:

  • stress/async-arrow-functions-lexical-new.target-binding.js:

(shouldThrowAsync): Deleted.
(shouldThrowAsync.async): Deleted.
This code should have thrown a SyntaxError. Instead it was throwing
a ReferenceError for the internal @newTargetLocal variable.

  • stress/new-target-syntax-errors.js:

Cover the arrow function in global code cases.

  • ChakraCore.yaml:
  • ChakraCore/test/es6/globalLambdaNewTargetSyntaxError.baseline-jsc:

We now pass with an expected SyntaxError. Our error message is different.

  • test262.yaml:

Source/JavaScriptCore:

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):
Mark the global code scope.

(JSC::Parser<LexerType>::parseMemberExpression):
If new.target is detected in an arrow function defined in global scope
throw a SyntaxError.

  • parser/Parser.h:

(JSC::Scope::Scope):
(JSC::Scope::setIsGlobalCodeScope):
(JSC::Scope::isGlobalCodeScope):
Marker for a global code scope.

  • parser/ParserModes.h:

(JSC::isModuleParseMode):
(JSC::isProgramParseMode):
(JSC::isProgramOrModuleParseMode):
Helper for detecting global code based on parse mode.

11:15 AM Changeset in webkit [215394] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Unreviewed, rolling out r215393.
https://bugs.webkit.org/show_bug.cgi?id=170876

breaks scrollable iframes on ios (Requested by anttik on
#webkit).

Reverted changeset:

"GraphicsLayerCA::recursiveCommitChanges should not descend
into subtrees without changes"
https://bugs.webkit.org/show_bug.cgi?id=170851
http://trac.webkit.org/changeset/215393

6:15 AM Changeset in webkit [215393] by antti@apple.com
  • 5 edits in trunk/Source/WebCore

GraphicsLayerCA::recursiveCommitChanges should not descend into subtrees without changes
https://bugs.webkit.org/show_bug.cgi?id=170851

Reviewed by Simon Fraser.

With lots of layers this can be very slow as it always traverses the entire layer tree.
For example GIF animations on tumblr.com trigger expensive commits where almost nothing changes.

This patch adds m_hasDescendantsWithUncommittedChanges bit to GraphicsLayerCA. With this
we can avoid descending to branches without changes when committing.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):

Do all setting of m_uncommittedChanges bits via addUncommittedChanges function.

(WebCore::GraphicsLayerCA::recursiveCommitChanges):

Bail out if neither the current layer nor any of its descendants have any uncommited changes
and none of the ancestors had changes.

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
(WebCore::GraphicsLayerCA::addUncommittedChanges):

Set m_hasDescendantsWithUncommittedChanges bit in ancestors when mutating m_uncommittedChanges.

(WebCore::GraphicsLayerCA::noteLayerPropertyChanged):

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::RenderLayerCompositor::frameViewDidScroll):

Tell the scrolling layer that it needs to recompute coverage.
This also schedules a layer flush so no need to do that separately.

2:37 AM Changeset in webkit [215392] by wenson_hsieh@apple.com
  • 22 edits in trunk/Source

[WK2] Support data interaction of files into file inputs
https://bugs.webkit.org/show_bug.cgi?id=170803
<rdar://problem/31286130>

Reviewed by Tim Horton.

Source/WebCore:

Adds remaining support to allow data interaction of files onto inputs of type file. See per-change annotations
for more details. Unit tests to be added in the next patch.

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/AbstractPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::numberOfFiles):

  • platform/ios/WebItemProviderPasteboard.mm:

Implements numberOfFiles by counting the number of item providers that may be represented as a file, which
includes all item providers that contain at least one content UTI type.

(-[WebItemProviderPasteboard numberOfFiles]):

Adds boilerplate plumbing to fetch the number of files available on the pasteboard. On Mac, logic that
previously existed in DragData::numberOfFiles to query the number of files available in the pasteboard is now
on PlatformPasteboard instead, which both makes the implementation of DragData::numberOfFiles platform-invariant,
and also saves us one synchronous IPC call to the UI process in the WebKit2 implementation.

  • platform/mac/DragDataMac.mm:

(WebCore::DragData::containsFiles):
(WebCore::DragData::numberOfFiles):
(WebCore::DragData::asFilenames):

Add support for recognizing objects in the pasteboard that may be represented by files, and therefore may be
uploaded via file input. Following suit with behavior elsewhere on the platform, we consider item providers able
to be represented by a file if they contain at least one content UTI type.

  • platform/mac/PlatformPasteboardMac.mm:

Logic previously in DragData::numberOfFiles to get and then count all file path names in the pasteboard has been
moved here instead, and no longer needs to go through the pasteboard proxy.

(WebCore::PlatformPasteboard::numberOfFiles):

Source/WebKit/mac:

Add boilerplate plumbing for fetching the number of files in the pasteboard.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::getNumberOfFiles):

Source/WebKit2:

Implements remaining support for performing data interaction onto file inputs. There are two main changes at
this layer: plumbing the number of files in the pasteboard to the web process, and pulling the implementation of
createSandboxExtensionsIfNeeded out of Mac-specific WebViewImpl::createSandboxExtensionsIfNeeded and into
WebPageProxy::createSandboxExtensionsIfNeeded.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):

Relax special-casing of encoding and decoding filenames to be PLATFORM(COCOA) rather than PLATFORM(MAC).

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::getNumberOfFiles):

More boilerplate plumbing to deliver the number of files in the pasteboard to the web process.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::performDragOperation):
(WebKit::WebViewImpl::createSandboxExtensionsIfNeeded): Deleted.

Move the logic in WebViewImpl::createSandboxExtensionsIfNeeded over to WebPageProxy::createSandboxExtensionsIfNeeded.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::getNumberOfFiles):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2:06 AM Changeset in webkit [215391] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebKit/win

Unreviewed, fix the Windows build after r215385

r215385 introduced a new virtual method on ChromeClient that needs to be implemented in WebChromeClient for
Windows in WebKit1.

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::createIconForFiles):

  • WebCoreSupport/WebChromeClient.h:
1:47 AM Changeset in webkit [215390] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the build after r215389

Use WebCore::createTemporaryDirectory instead of -_webkit_createTemporaryDirectoryWithTemplatePrefix:.

  • platform/ios/WebItemProviderPasteboard.mm:

(temporaryFileURLForDataInteractionContent):

Apr 14, 2017:

11:48 PM Changeset in webkit [215389] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebCore

Implement a way in WebItemProviderPasteboard to perform actions after file loading completes
https://bugs.webkit.org/show_bug.cgi?id=170839
<rdar://problem/31286130>

Reviewed by Tim Horton, Andy Estes, and Dan Bernstein.

Introduces -[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:], which performs an action
after all item providers which are able to provide content are done loading their content into temporary file
URLs. If no item providers have available data, we will immediately invoke the action with an empty URL array.

For each item provider with data, we save the local URL returned in the load completion block to a randomly
generated path in the container's temporary directory. When all files are finished loading, we then invoke the
action with all file URLs that successfully loaded.

No new tests, since there is no change in behavior.

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

(temporaryFileURLForDataInteractionContent):
(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]):

8:12 PM Changeset in webkit [215388] by nvasilyev@apple.com
  • 8 edits
    6 adds in trunk

Web Inspector: WebSockets: messages with non-latin letters are displayed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=170760

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Add payloadLength property, which is used to display size. When payloadLength is unavailable,
it is calculated from payloadData by Web Inspector frontend.

This fixes <webkit.org/b/170609> Web Inspector: WebSockets: Transferred size is incorrect.

  • inspector/protocol/Network.json:

Source/WebCore:

Add payloadLength property, which is used to display size. When payloadLength is unavailable,
it is calculated from payloadData by Web Inspector frontend.

This fixes <webkit.org/b/170609> Web Inspector: WebSockets: Transferred size is incorrect.

Tests: http/tests/websocket/tests/hybi/inspector/binary.html

http/tests/websocket/tests/hybi/inspector/send-and-receive.html

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::didReceiveWebSocketFrame):
(WebCore::InspectorNetworkAgent::didSendWebSocketFrame):

Source/WebInspectorUI:

Add payloadLength property, which is used to display size. When payloadLength is unavailable,
it is calculated from payloadData by Web Inspector frontend.

This fixes <webkit.org/b/170609> Web Inspector: WebSockets: Transferred size is incorrect.

  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype._webSocketFrameReceivedOrSent):

  • UserInterface/Models/WebSocketResource.js:

(WebInspector.WebSocketResource.prototype.addFrame):

LayoutTests:

Test sending and receiving text and binary (blob and array buffer) data.

  • http/tests/websocket/tests/hybi/inspector/binary-expected.txt: Added.
  • http/tests/websocket/tests/hybi/inspector/binary.html: Added.
  • http/tests/websocket/tests/hybi/inspector/binary_wsh.py: Added.

(web_socket_do_extra_handshake):
(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/inspector/send-and-receive-expected.txt: Added.
  • http/tests/websocket/tests/hybi/inspector/send-and-receive.html: Added.
  • http/tests/websocket/tests/hybi/inspector/send-and-receive_wsh.py: Added.

(web_socket_do_extra_handshake):
(web_socket_transfer_data):

7:13 PM Changeset in webkit [215387] by sbarati@apple.com
  • 3 edits
    1 add in trunk

ParseInt intrinsic in DFG backend doesn't properly flush its operands
https://bugs.webkit.org/show_bug.cgi?id=170865

Reviewed by Mark Lam and Geoffrey Garen.

JSTests:

  • stress/parse-int-intrinsic-dfg-backend-flush.js: Added.

(assert):
(foo):

Source/JavaScriptCore:

The DFG backend code needed to first call .gpr()/.jsValueRegs()
before calling flushRegisters(), or the input JSValueOperand would
not be flushed.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileParseInt):

6:52 PM Changeset in webkit [215386] by mark.lam@apple.com
  • 27 edits in trunk

Update architectures in xcconfig files.
https://bugs.webkit.org/show_bug.cgi?id=170867
<rdar://problem/31628104>

Reviewed by Joseph Pecoraro.

Source/bmalloc:

  • Configurations/Base.xcconfig:

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/JavaScriptCore.xcconfig:
  • Configurations/ToolExecutable.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/opus.xcconfig:

Source/WebCore:

No new tests needed. Only updating xcconfig files.

  • Configurations/Base.xcconfig:
  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

No new tests needed. Only updating xcconfig files.

  • Configurations/Base.xcconfig:
  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • Configurations/Base.xcconfig:

Tools:

  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • MobileMiniBrowser/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • WebKitTestRunner/Configurations/Base.xcconfig:
6:14 PM Changeset in webkit [215385] by wenson_hsieh@apple.com
  • 23 edits
    2 adds in trunk/Source

[WK2] Support Icon creation from file URLs on iOS
https://bugs.webkit.org/show_bug.cgi?id=170809
<rdar://problem/31286130>

Reviewed by Tim Horton.

Source/WebCore:

Minor tweaks and refactoring to support displaying a WebCore::Icon from a list of filepaths on iOS. Please see
below annotations for more details. No new tests yet, as behavior on Mac should not have changed, and behavior
on iOS will not change until later patches land. Tests will be added in a later patch.

Most of the changes here remove platform special-casing in FileInputType for iOS and Mac, refactoring the code
such that it works for both platforms while preserving behavior.

  • html/FileInputType.cpp:

(WebCore::FileInputType::~FileInputType):
(WebCore::FileInputType::setFiles):
(WebCore::FileInputType::filesChosen):

  • html/FileInputType.h:

Un-guard m_fileIconLoader on iOS, and un-guard m_displayString for Mac. Consolidate logic in both version of
filesChosen and remove the iOS-specific version. Behavior when passing in an empty display string and null Icon
will be the same as that of the existing filesChosen method on Mac. Also, introduce a version of setFiles that
takes an additional RequestIcon enum that indicates whether or not to additionally use the new filepaths to
request an Icon update. filesChosen invokes this with RequestIcon::No if a non-null Icon was specified, as is
the case when uploading a file via the image picker on iOS.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::displayString):

  • html/HTMLInputElement.h:
  • html/InputType.cpp:
  • html/InputType.h:
  • loader/EmptyClients.h:
  • page/ChromeClient.h:

Introduce ChromeClient::createIconForFiles, which generates an icon representing the content at a list of file
paths. See WebKit and WebKit2 ChangeLogs for more details.

  • platform/FileChooser.h:

(WebCore::FileChooserClient::filesChosen):

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::fileTextValue):

Remove platform special-casing when generating the text to display when uploading a file. If a displayString
is specified, then we use the contents of the displayString; otherwise, fall back to using the input element's
FileList to compute the display string.

Source/WebKit/ios:

Adjust for changes in the ChromeClient in WebCore.

  • WebCoreSupport/WebChromeClientIOS.h:
  • WebCoreSupport/WebChromeClientIOS.mm:

(WebChromeClientIOS::createIconForFiles):

Source/WebKit/mac:

Adjust for changes in the ChromeClient in WebCore.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::loadIconForFiles):
(WebChromeClient::createIconForFiles):

Source/WebKit2:

Refactors file icon generation logic to support showing an Icon representing the content at a list of file paths
on iOS. Pulls out logic in WKFileUploadPanel responsible for generating the thumbnail image for a file input into
separate helpers in WebIconUtilities, and then uses these utilities in both WKFileUploadPanel and
WebChromeClientIOS.

  • Shared/ios/WebIconUtilities.h: Added.
  • Shared/ios/WebIconUtilities.mm: Added.

(WebKit::squareCropRectForSize):
(WebKit::squareImage):
(WebKit::thumbnailSizedImageForImage):
(WebKit::fallbackIconForFile):
(WebKit::iconForImageFile):
(WebKit::iconForVideoFile):
(WebKit::iconForFile):

Add logic for generating thumbnail icons, moved from WKFileUploadPanel.mm.

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(squareCropRectForSize): Deleted.
(squareImage): Deleted.
(thumbnailSizedImageForImage): Deleted.
(fallbackIconForFile): Deleted.
(iconForImageFile): Deleted.
(iconForVideoFile): Deleted.
(iconForFile): Deleted.

Remove logic for generating thumbnail icons.

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::loadIconForFiles):
(WebKit::WebChromeClient::createIconForFiles):

Rather than call Icon::createIconForFiles directly, loadIconForFiles now consults ChromeClient::createIconForFiles
instead. On other platforms, this just turns around and calls Icon::createIconForFiles, but on iOS, we use the
utilities introduced in WebIconUtilities to generate a file icon.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::createIconForFiles):

5:52 PM Changeset in webkit [215384] by beidson@apple.com
  • 13 edits
    1 add in trunk

Fix basic WKURLSchemeHandler bugs.
<rdar://problem/30647559> and https://bugs.webkit.org/show_bug.cgi?id=170862

Reviewed by Andy Estes.

Source/WebCore:

Covered by new API tests.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveDataOrBuffer):

Source/WebKit2:

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

  • UIProcess/WebURLSchemeHandlerTask.cpp:

(WebKit::WebURLSchemeHandlerTask::didReceiveResponse):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::addURLSchemeHandlerTaskProxy):
(WebKit::WebLoaderStrategy::removeURLSchemeHandlerTaskProxy):
(WebKit::WebLoaderStrategy::remove):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:

(WebKit::WebURLSchemeHandlerProxy::startNewTask):
(WebKit::WebURLSchemeHandlerProxy::taskDidComplete):
(WebKit::WebURLSchemeHandlerProxy::taskDidStopLoading):

  • WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
  • WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.cpp:

(WebKit::WebURLSchemeHandlerTaskProxy::WebURLSchemeHandlerTaskProxy):
(WebKit::WebURLSchemeHandlerTaskProxy::stopLoading):
(WebKit::WebURLSchemeHandlerTaskProxy::didReceiveResponse):
(WebKit::WebURLSchemeHandlerTaskProxy::didReceiveData):
(WebKit::WebURLSchemeHandlerTaskProxy::didComplete):
(WebKit::WebURLSchemeHandlerTaskProxy::hasLoader):

  • WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.h:

(WebKit::WebURLSchemeHandlerTaskProxy::identifier):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm: Added.

(-[SchemeHandler initWithData:mimeType:]):
(-[SchemeHandler dealloc]):
(-[SchemeHandler webView:startTask:]):
(-[SchemeHandler webView:stopTask:]):
(TEST):

5:18 PM Changeset in webkit [215383] by jmarcell@apple.com
  • 2 edits in branches/safari-603-branch/Source/JavaScriptCore

Cherry-pick r214637. rdar://problem/31615783

5:17 PM Changeset in webkit [215382] by jiewen_tan@apple.com
  • 20 edits
    4 copies
    23 adds in trunk

[WebCrypto] Support HKDF
https://bugs.webkit.org/show_bug.cgi?id=170636
<rdar://problem/23539827>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt:

Source/WebCore:

This patch implements HKDF according to the spec: https://www.w3.org/TR/WebCryptoAPI/#hkdf.
Supported operations include deriveKey, deriveBits, importKey and getKeyLength.

Tests: crypto/subtle/ecdh-import-key-derive-hkdf-key.html

crypto/subtle/hkdf-derive-bits-malformed-parametrs.html
crypto/subtle/hkdf-import-key-derive-bits.html
crypto/subtle/hkdf-import-key-derive-hmac-key.html
crypto/subtle/hkdf-import-key-malformed-parameters.html
crypto/subtle/hkdf-import-key.html
crypto/workers/subtle/hkdf-import-key-derive-bits.html
crypto/workers/subtle/hkdf-import-key-derive-hmac-key.html
crypto/workers/subtle/hkdf-import-key.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCryptoAlgorithmDictionary.cpp:

(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
Rename HKDF_CTR to HKDF.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::read):
Rename HKDF_CTR to HKDF.

  • crypto/CommonCryptoUtilities.h:
  • crypto/CryptoAlgorithmIdentifier.h:
  • crypto/CryptoAlgorithmParameters.h:
  • crypto/algorithms/CryptoAlgorithmHKDF.cpp: Added.

(WebCore::CryptoAlgorithmHKDF::create):
(WebCore::CryptoAlgorithmHKDF::identifier):
(WebCore::CryptoAlgorithmHKDF::deriveBits):
(WebCore::CryptoAlgorithmHKDF::importKey):
(WebCore::CryptoAlgorithmHKDF::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmHKDF.h: Added.
  • crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp: Added.

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmHKDFMac.cpp: Added.

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmRegistryMac.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

  • crypto/parameters/CryptoAlgorithmHkdfParams.h: Added.
  • crypto/parameters/HkdfParams.idl: Added.

LayoutTests:

  • TestExpectations:
  • crypto/subtle/ecdh-import-key-derive-hkdf-key-expected.txt: Added.
  • crypto/subtle/ecdh-import-key-derive-hkdf-key.html: Added.
  • crypto/subtle/hkdf-derive-bits-malformed-parametrs-expected.txt: Added.
  • crypto/subtle/hkdf-derive-bits-malformed-parametrs.html: Added.
  • crypto/subtle/hkdf-import-key-derive-bits-expected.txt: Added.
  • crypto/subtle/hkdf-import-key-derive-bits.html: Added.
  • crypto/subtle/hkdf-import-key-derive-hmac-key-expected.txt: Added.
  • crypto/subtle/hkdf-import-key-derive-hmac-key.html: Added.
  • crypto/subtle/hkdf-import-key-expected.txt: Added.
  • crypto/subtle/hkdf-import-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/hkdf-import-key-malformed-parameters.html: Added.
  • crypto/subtle/hkdf-import-key.html: Added.
  • crypto/workers/subtle/hkdf-import-key-derive-bits-expected.txt: Added.
  • crypto/workers/subtle/hkdf-import-key-derive-bits.html: Added.
  • crypto/workers/subtle/hkdf-import-key-derive-hmac-key-expected.txt: Added.
  • crypto/workers/subtle/hkdf-import-key-derive-hmac-key.html: Added.
  • crypto/workers/subtle/hkdf-import-key-expected.txt: Added.
  • crypto/workers/subtle/hkdf-import-key.html: Added.
  • crypto/workers/subtle/resources/hkdf-import-key-derive-bits.js: Added.
  • crypto/workers/subtle/resources/hkdf-import-key-derive-hmac-key.js: Added.
  • crypto/workers/subtle/resources/hkdf-import-key.js: Added.
5:09 PM Changeset in webkit [215381] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

webkit-patch failed to detect git repository
https://bugs.webkit.org/show_bug.cgi?id=170859

Patch by Bill Ming <mbbill@gmail.com> on 2017-04-14
Reviewed by Daniel Bates.

Windows cmd does not accept single quoted path. So, using
double quotes here will provide better platform compatibility.

  • Scripts/VCSUtils.pm:

(isGitDirectory):
(isGitSVNDirectory):
(svnRevisionForDirectory):
(svnInfoForPath):

4:26 PM Changeset in webkit [215380] by Ryan Haddad
  • 3 edits in trunk/Tools

Unreviewed, rolling out r215374.

This change causes LayoutTests to exit early with crashes on
Sierra.

Reverted changeset:

"webkitpy: Ignore previously launched pid when system is under
stress"
https://bugs.webkit.org/show_bug.cgi?id=170741
http://trac.webkit.org/changeset/215374

4:20 PM Changeset in webkit [215379] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: B3IRGenerator should use phis for result types
https://bugs.webkit.org/show_bug.cgi?id=170863

Reviewed by Filip Pizlo.

Currently, we use variables for the result types of control flow in
Wasm. We did this originally since we weren't sure that the phis we
generated would be optimal. Since then, we have verified that the edges
in wasm control flow ensure that each upsilon will dominate its phi
so we don't need to use variables.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::ControlData::ControlData):
(JSC::Wasm::B3IRGenerator::addTopLevel):
(JSC::Wasm::B3IRGenerator::addBlock):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::unify):

4:03 PM Changeset in webkit [215378] by dewei_zhu@apple.com
  • 12 edits
    2 adds in trunk/Websites/perf.webkit.org

Add sub-commit UI in commit log viewer.
https://bugs.webkit.org/show_bug.cgi?id=170379

Reviewed by Ryosuke Niwa.

Add an API to return sub-commits for a given commit.
Add sub-commit difference viewer into commit log viewer to show changed sub-commits between two commits.
Add 'ownsSubCommits' info in 'api/commits' return values.
Extend 'api/manifest' to include whether a repositories owns other repositories.
Only show this sub-commit difference viewer when a repository owns other repositories and both commits owns sub-commits.
Add unit tests for those new features.

  • browser-tests/commit-log-viewer-tests.js: Updated test cases.
  • public/api/commits.php: Added 'sub-commits' to provide sub-commit for a given commit.
  • public/include/commit-log-fetcher.php: Added function to query sub-commit from database. Added 'repository' and 'ownsSubCommits' fields in returning commits.
  • public/v3/components/expand-collapse-button.js: Added.

(ExpandCollapseButton):
(ExpandCollapseButton.prototype.didConstructShadowTree): Changes state on click and dispatches 'toggle' event.
(ExpandCollapseButton.sizeFactor):
(ExpandCollapseButton.buttonContent):
(ExpandCollapseButton.cssTemplate):

  • public/v3/components/commit-log-viewer.js:

(CommitLogViewer.prototype._renderCommitList): Added sub-commit viewer if two adjacent commits both have sub-commits.
(CommitLogViewer.cssTemplate):

  • public/v3/components/sub-commit-viewer.js: Added.

(SubCommitViewer): Added 'SubCommitViewer' class to represent the sub-commit differences between two given commits.`
(SubCommitViewer.prototype.didConstructShadowTree): Makes 'expand-collapse' button listen to 'toggle' event.
(SubCommitViewer.prototype._toggleVisibility): Updates UI once 'expand-collapse' button is clicked.
(SubCommitViewer.prototype.render): Render sub-commit view based on the state.
(SubCommitViewer.prototype._renderSubcommitTable): Generates sub-commits difference table entries.
(SubCommitViewer.htmlTemplate):
(SubCommitViewer.cssTemplate):

  • public/v3/index.html: Added 'sub-commit-viewer.js' and 'expand-collapse-button.js'.
  • public/v3/models/commit-log.js:

(CommitLog): Added '_subCommits'.
(CommitLog.prototype.updateSingleton): Updates 'rawData.ownsSubCommits' as well.
(CommitLog.prototype.ownsSubCommits):
(CommitLog.prototype.subCommits): Added. Returns sub-commits.
(CommitLog.prototype.fetchSubCommits): Added. Fetches sub-commits if haven't fetched them before.
(CommitLog.prototype._buildSubCommitMap): Added. Creates a map which maps repositories to commits.
(CommitLog.diffSubCommits): Added. Finds difference between two given commits.
(CommitLog.fetchBetweenRevisions): Updated due to '_constructFromRawData' change.
(CommitLog.fetchForSingleRevision): Updated due to '_constructFromRawData' change.
(CommitLog._constructFromRawData): Removed first argument 'repository' as it can be determined by calling 'Repository.findById'.

  • public/v3/models/repository.js:

(Repository):
(Repository.prototype.owner): Returns the owner id.
(Repository.prototype.ownedRepositories): Returns a list of repositories owned by this repository.

  • server-tests/api-commits-tests.js: Added tests for 'sub-commits' filter.
  • server-tests/api-manifest-tests.js: Added a test.
  • unit-tests/commit-log-tests.js: Added tests for 'fetchSubCommits' and 'diffSubCommits'.
  • unit-tests/resources/mock-v3-models.js: Added 'ownerRepository' and 'ownedRepository'.
3:17 PM Changeset in webkit [215377] by mitz@apple.com
  • 2 edits in trunk/Tools

[ios-simulator] API test WebKit2.AdditionalReadAccessAllowedURLs is failing
https://bugs.webkit.org/show_bug.cgi?id=170856

Disabled the newly-added test in the Simulator, which doesn’t enforce sandboxing.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AdditionalReadAccessAllowedURLs.mm:
2:03 PM Changeset in webkit [215376] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip workers/wasm-* LayoutTests on ios-simulator.

Unreviewed test gardening.

  • platform/ios/TestExpectations:
1:59 PM Changeset in webkit [215375] by zalan@apple.com
  • 6 edits
    2 adds in trunk

text-align start / end failure in table cells
https://bugs.webkit.org/show_bug.cgi?id=141417
<rdar://problem/31051672>

Reviewed by Antti Koivisto.

Source/WebCore:

Apply "text-align: center" on th elements when parent's computed value for the 'text-align' property
is its initial value, unless it is explicitly set.

Test: fast/table/center-th-when-parent-has-initial-text-align.html

  • css/CSSProperties.json:
  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyInitialTextAlign):
(WebCore::StyleBuilderCustom::applyValueTextAlign):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::applyProperty):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasExplicitlySetTextAlign):
(WebCore::RenderStyle::setHasExplicitlySetTextAlign):
(WebCore::RenderStyle::NonInheritedFlags::hasExplicitlySetTextAlign):
(WebCore::RenderStyle::NonInheritedFlags::setHasExplicitlySetTextAlign):

LayoutTests:

  • fast/table/center-th-when-parent-has-initial-text-align-expected.html: Added.
  • fast/table/center-th-when-parent-has-initial-text-align.html: Added.
1:52 PM Changeset in webkit [215374] by jbedard@apple.com
  • 3 edits in trunk/Tools

webkitpy: Ignore previously launched pid when system is under stress
https://bugs.webkit.org/show_bug.cgi?id=170741

Unreviewed infrastructure fix.

Drivers are destroyed between failing layout tests, which is not necessary and
prevents the work-around implemented in https://bugs.webkit.org/show_bug.cgi?id=170741.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:

(Worker._kill_driver): Do not destroy drivers when they are stopped.

  • Scripts/webkitpy/port/driver.py:

(Driver.stop): Reset driver values set in initializer.

1:52 PM Changeset in webkit [215373] by achristensen@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix Windows build after r215368.
https://bugs.webkit.org/show_bug.cgi?id=170641

  • CMakeLists.txt:

Add new directory containing files needed in WebCore.

1:34 PM Changeset in webkit [215372] by aestes@apple.com
  • 2 edits in trunk/Tools

[ios-simulator] API test WebKit2.WKWebProcessPlugInRangeHandle timing out
https://bugs.webkit.org/show_bug.cgi?id=167594

Re-enabled this API test now that webkit.org/b/161967 is fixed.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm:

(TEST):

1:29 PM Changeset in webkit [215371] by aestes@apple.com
  • 4 edits in trunk

[ios-simulator] API test WebKit2.DataDetectionReferenceDate timing out
https://bugs.webkit.org/show_bug.cgi?id=161967

Reviewed by Alexey Proskuryakov.

Source/WebCore:

DataDetectorsCoreSPI.h defined DDQueryOffset as a struct of two CFIndexes, which is 16 bytes
on LP64, but the struct is actually defined as two CFIndex-typed 32-bit bitfields, which is
8 bytes on LP64. This breaks the ABI on Public SDK builds when calling functions that take
or return DDQueryOffsets.

  • platform/spi/cocoa/DataDetectorsCoreSPI.h: Updated the DDQueryOffset definition for

Public SDK builds, and added a static_assert to detect future size changes at compile time.

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/DataDetection.mm:

(TEST): Re-enabled WebKit2.DataDetectionReferenceDate.

12:50 PM Changeset in webkit [215370] by caitp@igalia.com
  • 3 edits
    1 add in trunk

[JSC] use ExpressionErrorClassifier for AwaitExpression operand
https://bugs.webkit.org/show_bug.cgi?id=170844

Reviewed by Saam Barati.

JSTests:

  • stress/regress-170732.js: Added.

Source/JavaScriptCore:

In parseAssignmentExpression(), several cover grammars are handled, and
use ExpressionErrorClassifier to record hints about which grammars to
try.

In parseAwaitExpression(), the hints recorded during parsing of the
operand need to be discarded, because if they propagate to the outer
parseAssignmentExpression(), the hints will lead the parser down invalid
branches that should be skipped.

This change adds an additional ExpressionErrorClassifier to
parseAwaitExpression(), in order to discard hints recorded trying to
parse the operand.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseAwaitExpression):

11:48 AM Changeset in webkit [215369] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Removed unused and unimplemented methods from MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=170848

Reviewed by Jer Noble.

No new tests needed.

  • platform/graphics/MediaPlayer.h:
11:09 AM Changeset in webkit [215368] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

WebAssembly: There is a short window of time where a CodeBlock could be destroyed before all of its async compilation callbacks are called
https://bugs.webkit.org/show_bug.cgi?id=170641

Reviewed by Keith Miller.

There is an unlikely race when a CodeBlock compilation fails,
the module compiles a new CodeBlock for that memory mode, all while
the CodeBlock is notifying its callbacks that it has finished.
There is a chance that the Module could deref its failed CodeBlock
at that point, destroying it, before the callbacks were able to
grab a Ref to the CodeBlock. This patch fixes the race by having the
callbacks ref the CodeBlock.

This patch also has the Plan clear out all of its callbacks
once it gets completed. This adds an extra defense to anybody
that grabs refs to the Plan in the callback.

  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::CodeBlock):
(JSC::Wasm::CodeBlock::compileAsync):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::complete):

10:57 AM Changeset in webkit [215367] by Ryan Haddad
  • 2 edits in trunk/Tools

Unreviewed, rolling out r215363.

This change causes LayoutTests to exit early with crashes.

Reverted changeset:

"webkitpy: Ignore previously launched pid when system is under
stress"
https://bugs.webkit.org/show_bug.cgi?id=170741
http://trac.webkit.org/changeset/215363

10:57 AM Changeset in webkit [215366] by mmaxfield@apple.com
  • 5 edits
    1 add in trunk

Add performance test for asking the platform for a font for U+2060 WORD JOINER
https://bugs.webkit.org/show_bug.cgi?id=170842

Reviewed by Tim Horton.

PerformanceTests:

  • Layout/word-joiner.html: Added.

Source/WebCore:

No new tests because there is no behavior change.

  • platform/graphics/WidthCache.h:

(WebCore::WidthCache::add):
(WebCore::WidthCache::addSlowCase):

Source/WTF:

  • wtf/unicode/CharacterNames.h:
10:43 AM Changeset in webkit [215365] by fpizlo@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Air::RegLiveness should be constraint-based
https://bugs.webkit.org/show_bug.cgi?id=170817

Reviewed by Saam Barati.

Previously, I changed the Air liveness analyses based on Air::Liveness<> to be
constraint-based and this was a significant speed-up. Now I'm adding the same
functionality to RegLiveness.

This is a 1% speed-up on wasm B3 -O1 compile times.

  • b3/air/AirAllocateRegistersAndStackByLinearScan.cpp:
  • b3/air/AirLivenessAdapter.h:

(JSC::B3::Air::LivenessAdapter::LivenessAdapter):
(JSC::B3::Air::LivenessAdapter::prepareToCompute):
(JSC::B3::Air::LivenessAdapter::actionsAt):

  • b3/air/AirRegLiveness.cpp:

(JSC::B3::Air::RegLiveness::RegLiveness):
(JSC::B3::Air::RegLiveness::LocalCalcForUnifiedTmpLiveness::LocalCalcForUnifiedTmpLiveness):
(JSC::B3::Air::RegLiveness::LocalCalcForUnifiedTmpLiveness::execute):
(JSC::B3::Air::RegLiveness::LocalCalc::execute): Deleted.

  • b3/air/AirRegLiveness.h:

(JSC::B3::Air::RegLiveness::Actions::Actions):
(JSC::B3::Air::RegLiveness::LocalCalcBase::LocalCalcBase):
(JSC::B3::Air::RegLiveness::LocalCalcBase::live):
(JSC::B3::Air::RegLiveness::LocalCalcBase::isLive):
(JSC::B3::Air::RegLiveness::LocalCalc::LocalCalc):
(JSC::B3::Air::RegLiveness::LocalCalc::execute):
(JSC::B3::Air::RegLiveness::LocalCalc::live): Deleted.
(JSC::B3::Air::RegLiveness::LocalCalc::isLive): Deleted.

10:31 AM Changeset in webkit [215364] by Ryan Haddad
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r215350.

This change broke the Windows build.

Reverted changeset:

"Remove unused SharedBuffer constructor"
https://bugs.webkit.org/show_bug.cgi?id=170828
http://trac.webkit.org/changeset/215350

10:08 AM Changeset in webkit [215363] by jbedard@apple.com
  • 2 edits in trunk/Tools

webkitpy: Ignore previously launched pid when system is under stress
https://bugs.webkit.org/show_bug.cgi?id=170741

Unreviewed infrastructure fix.

Drivers are destroyed between failing layout tests, which is not necessary and
prevents the work-around implemented in https://bugs.webkit.org/show_bug.cgi?id=170741.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:

(Worker._kill_driver): Do not destroy drivers when they are stopped.

9:04 AM Changeset in webkit [215362] by jer.noble@apple.com
  • 29 edits in trunk/Source

[MediaSource] Push capabilities across process boundary during UIProcess capture.
https://bugs.webkit.org/show_bug.cgi?id=170814

Reviewed by Eric Carlson.

Source/WebCore:

There's no real reason for RealtimeMediaSourceCapabilities to be RefCounted nor to keep them from
being created on the stack. So in addition to making that class coder-compliant, change all the
classes that vend capabilities to use a unique_ptr<> instead of a RefPtr<>.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • Modules/webaudio/MediaStreamAudioSource.cpp:

(WebCore::MediaStreamAudioSource::capabilities):

  • Modules/webaudio/MediaStreamAudioSource.h:
  • platform/mediastream/MediaEndpoint.cpp:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::capabilities):

  • platform/mediastream/MediaStreamTrackPrivate.h:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeMediaSourceCapabilities.h:

(WebCore::CapabilityValueOrRange::encode):
(WebCore::CapabilityValueOrRange::decode):
(WebCore::RealtimeMediaSourceCapabilities::RealtimeMediaSourceCapabilities):
(WebCore::RealtimeMediaSourceCapabilities::supportedConstraints):
(WebCore::RealtimeMediaSourceCapabilities::setSupportedConstraints):
(WebCore::RealtimeMediaSourceCapabilities::encode):
(WebCore::RealtimeMediaSourceCapabilities::decode):
(WebCore::RealtimeMediaSourceCapabilities::create): Deleted.

  • platform/mediastream/RealtimeMediaSourceSettings.h:
  • platform/mediastream/mac/AVMediaCaptureSource.h:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::initializeCapabilities):
(WebCore::AVMediaCaptureSource::capabilities):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::capabilities):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::capabilities):

  • platform/mediastream/mac/RealtimeIncomingAudioSource.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::capabilities):

  • platform/mediastream/mac/RealtimeIncomingVideoSource.h:
  • platform/mock/MockRealtimeMediaSource.cpp:

(WebCore::MockRealtimeMediaSource::initializeCapabilities):
(WebCore::MockRealtimeMediaSource::capabilities):

  • platform/mock/MockRealtimeMediaSource.h:
  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:

Source/WebKit2:

Make a new synchronous getter for capabilities(), moderated by only requesting the capabilities() cross-process
the first time called.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::capabilities):
(WebKit::UserMediaCaptureManagerProxy::supportedConstraints):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::setCapabilities):
(WebKit::UserMediaCaptureManager::capabilities):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
8:13 AM Changeset in webkit [215361] by jbedard@apple.com
  • 2 edits in trunk/Tools

webkitpy: Ignore previously launched pid when system is under stress
https://bugs.webkit.org/show_bug.cgi?id=170741

Unreviewed infrastructure fix.

Server processes are destroyed in the driver, which is not necessary and prevents
the work-around implemented in https://bugs.webkit.org/show_bug.cgi?id=170741.

  • Scripts/webkitpy/port/driver.py:

(Driver.run_test): Do not destroy server process.
(Driver._start): Only create the server process if it is None.
(Driver.stop): Do not destroy server process.

2:08 AM Changeset in webkit [215360] by gskachkov@gmail.com
  • 2 edits in trunk/JSTests

Safari 10.1 JSON.parse returns incorrect object for numeric keys with decimal values
https://bugs.webkit.org/show_bug.cgi?id=170442

Reviewed by Yusuke Suzuki.

  • stress/object-number-properties.js:
12:59 AM Changeset in webkit [215359] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[JSC] Date.parse should accept wider range of representation
https://bugs.webkit.org/show_bug.cgi?id=170720

Reviewed by Darin Adler.

JSTests:

  • stress/date-relaxed.js: Added.

(shouldBe):
(throw.new.Error):

Source/WTF:

We would like to relax Date.parse to accept the representation "May 8".
At that time, we choose 2000 as a default year. This is because of
the following reason.

  1. According to the V8, this default value is compatible to the old KJS. While current V8 uses 2001, SpiderMonkey does not have such a fallback path. So this reason is not big deal.
  1. It is a leap year. When using new Date("Feb 29"), we assume that people want to save month and day. Leap year can save user inputs if they is valid. If we use the current year instead, the current year may not be a leap year. In that case, new Date("Feb 29").getMonth() becomes 2 (March).
  • wtf/DateMath.cpp:

(WTF::parseDateFromNullTerminatedCharacters):

Note: See TracTimeline for information about the timeline view.