Timeline



May 8, 2017:

11:33 PM Changeset in webkit [216480] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216443 - Search events should not fire synchronously for search type input elements with incremental attribute set
https://bugs.webkit.org/show_bug.cgi?id=171376
<rdar://problem/31863296>

Reviewed by Chris Dumez.

Source/WebCore:

For some reasons, we fire search events immediately for search type input elements with incremental
attribute set only when the length of the input equals to zero. This behaviour should be prevented
as event listeners in the middle might perform unexpectedly.

Test: fast/forms/search/search-incremental-crash.html

  • html/SearchInputType.cpp:

(WebCore::SearchInputType::startSearchEventTimer):

LayoutTests:

  • fast/forms/search/search-incremental-crash-expected.txt: Added.
  • fast/forms/search/search-incremental-crash.html: Added.
11:14 PM Changeset in webkit [216479] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Refactor / Clean up DOMWindow.idl
https://bugs.webkit.org/show_bug.cgi?id=171843

Reviewed by Ryosuke Niwa.

Refactor / Clean up DOMWindow.idl to match the specification more closely:

No expected Web-facing change. Things that do not match the specification
have been annotated with FIXME comments.

  • page/DOMWindow.idl:
10:25 PM Changeset in webkit [216478] by commit-queue@webkit.org
  • 43 edits in trunk

Simplify ScrollingStateNode::scrollingStateTreeAsText
https://bugs.webkit.org/show_bug.cgi?id=171802

Patch by Frederic Wang <fwang@igalia.com> on 2017-05-08
Reviewed by Simon Fraser.

Source/WebCore:

The following simplifications are performed:

  • Rely on TextStream's internal value to manage indentation.
  • Use TextStream::dumpProperty and << to print simple properties.
  • Try and use TextStream::GroupScope for groups.

No new tests, only minor format changes in the dumped tree.

  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::dumpProperties):

  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::dumpProperties):
(WebCore::ScrollingStateNode::dump):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText):

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateOverflowScrollingNode.cpp:

(WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateOverflowScrollingNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateScrollingNode.h:
  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::dumpProperties):

  • page/scrolling/ScrollingStateStickyNode.h:

LayoutTests:

Update references due to minor format changes in text ouput of scrolling state trees.

  • fast/scrolling/ios/remove-scrolling-role-expected.txt:
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt:
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt:
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt:
  • tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
  • tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt:
  • tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt:
  • tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt:
  • tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt:
  • tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
  • tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt:
  • tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt:
  • tiled-drawing/scrolling/fixed/nested-fixed-expected.txt:
  • tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt:
  • tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
  • tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt:
  • tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt:
  • tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
  • tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt:
  • tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt:
  • tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt:
  • tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt:
10:14 PM Changeset in webkit [216477] by commit-queue@webkit.org
  • 11 edits in trunk/Source

Follow-up to bug 171710: use more references and reject if either audio or video source creation is failing
https://bugs.webkit.org/show_bug.cgi?id=171824

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

Source/WebCore:

Refactoring to use more references.
Only behavioral change is the rejection of the getUserMedia promise if either audio or video source creation is
failing. Previously, if audio source creation was failing, the promise would still resolve if video source was
sucessfully created.

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::audioFactory):
(WebCore::RealtimeMediaSourceCenter::videoFactory):
(WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager):

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::defaultAudioFactory): Deleted.
(WebCore::RealtimeMediaSourceCenter::defaultVideoFactory): Deleted.
(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureDeviceManager): Deleted.
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureDeviceManager): Deleted.

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
(WebCore::RealtimeMediaSourceCenterMac::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenterMac::bestSourcesForTypeAndConstraints):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioFactory):
(WebCore::RealtimeMediaSourceCenterMac::defaultVideoFactory):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenterMac::defaultVideoCaptureDeviceManager):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::defaultAudioFactory):
(WebCore::MockRealtimeMediaSourceCenter::defaultVideoFactory):
(WebCore::MockRealtimeMediaSourceCenter::defaultAudioCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::defaultVideoCaptureDeviceManager):

  • platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebKit2:

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

9:02 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
8:59 PM Changeset in webkit [216476] by Michael Catanzaro
  • 3 edits in trunk/LayoutTests

Unreviewed GTK expectations gardening

  • platform/gtk/TestExpectations:
  • webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav:
8:45 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
8:44 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
8:31 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
8:25 PM WebKitGTK/Gardening/Calendar/2016Logs created by Michael Catanzaro
8:24 PM Changeset in webkit [216475] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

REGRESSION(r213564): Flash video playback failures
https://bugs.webkit.org/show_bug.cgi?id=171840
<rdar://problem/32041569>

Reviewed by Alexey Proskuryakov.

The sandbox restrictions added in r213564 to prevent access to unused iokit properties
blocked some items needed for Flash video playback. This change relaxes the sandbox
to allow this software to run properly.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
8:16 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
7:46 PM Changeset in webkit [216474] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Drop [CEReactions] from CharacterData operations
https://bugs.webkit.org/show_bug.cgi?id=171813

Reviewed by Ryosuke Niwa.

Drop [CEReactions] from CharacterData operations to match the DOM specification:

I believe WebKit had this because Attr used to have Text child nodes. Therefore, modifying
those Text child nodes via the CharacterData API could modify the value of an attribute,
requiring us to run attributeChangedCallback for Custom Elements. However, as of
<https://trac.webkit.org/r216259>, Attr can no longer have Text child nodes.

I have also verified that Blink does not have [CEReactions] for those methods.

No new tests, no expected Web-facing behavior change.

  • dom/CharacterData.idl:
7:22 PM Changeset in webkit [216473] by achristensen@apple.com
  • 43 edits in trunk/Source/WebKit2

Reduce PassRefPtr use in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=171831

Reviewed by Chris Dumez.

  • UIProcess/API/C/WKPageGroup.cpp:

(WKPageGroupCreateWithIdentifier):

  • UIProcess/GenericCallback.h:

(WebKit::GenericCallback::create):
(WebKit::CallbackMap::put):

  • UIProcess/StatisticsRequest.cpp:

(WebKit::StatisticsRequest::StatisticsRequest):

  • UIProcess/StatisticsRequest.h:

(WebKit::StatisticsRequest::create):

  • UIProcess/TextChecker.h:
  • UIProcess/TextCheckerCompletion.cpp:

(WebKit::TextCheckerCompletion::create):

  • UIProcess/TextCheckerCompletion.h:
  • UIProcess/WebColorPicker.h:

(WebKit::WebColorPicker::create):

  • UIProcess/WebConnectionToWebProcess.cpp:

(WebKit::WebConnectionToWebProcess::create):

  • UIProcess/WebConnectionToWebProcess.h:
  • UIProcess/WebContextInjectedBundleClient.cpp:

(WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):

  • UIProcess/WebContextInjectedBundleClient.h:
  • UIProcess/WebContextMenuListenerProxy.h:

(WebKit::WebContextMenuListenerProxy::create):

  • UIProcess/WebCookieManagerProxy.cpp:

(WebKit::WebCookieManagerProxy::create):

  • UIProcess/WebCookieManagerProxy.h:
  • UIProcess/WebEditCommandProxy.h:

(WebKit::WebEditCommandProxy::create):

  • UIProcess/WebFormSubmissionListenerProxy.h:

(WebKit::WebFormSubmissionListenerProxy::create):

  • UIProcess/WebFrameListenerProxy.h:
  • UIProcess/WebFrameProxy.h:

(WebKit::WebFrameProxy::create):

  • UIProcess/WebFullScreenManagerProxy.cpp:

(WebKit::WebFullScreenManagerProxy::create):

  • UIProcess/WebFullScreenManagerProxy.h:
  • UIProcess/WebGeolocationManagerProxy.cpp:

(WebKit::WebGeolocationManagerProxy::create):

  • UIProcess/WebGeolocationManagerProxy.h:
  • UIProcess/WebIconDatabase.cpp:

(WebKit::WebIconDatabase::create):
(WebKit::WebIconDatabase::iconDataForPageURL):

  • UIProcess/WebIconDatabase.h:
  • UIProcess/WebMediaSessionFocusManager.cpp:

(WebKit::WebMediaSessionFocusManager::create):

  • UIProcess/WebMediaSessionFocusManager.h:
  • UIProcess/WebOpenPanelResultListenerProxy.h:

(WebKit::WebOpenPanelResultListenerProxy::create):

  • UIProcess/WebPageGroup.cpp:

(WebKit::WebPageGroup::create):

  • UIProcess/WebPageGroup.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::forceRepaint):
(WebKit::WebPageProxy::computePagesForPrinting):
(WebKit::WebPageProxy::drawRectToImage):
(WebKit::WebPageProxy::drawPagesToPDF):
(WebKit::WebPageProxy::drawPagesForPrinting):
(WebKit::WebPageProxy::callAfterNextPresentationUpdate):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/TextCheckerIOS.mm:

(WebKit::TextChecker::requestCheckingOfString):

  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::TextChecker::requestCheckingOfString):

  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):

  • UIProcess/mac/WKPrintingView.mm:

(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(-[WKPrintingView _drawPreview:]):

  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

(WebKit::NetscapePlugin::loadURL):
(WebKit::NetscapePlugin::manualStreamDidReceiveResponse):

  • WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:

(WebKit::NetscapePluginStream::NetscapePluginStream):

  • WebProcess/Plugins/Netscape/NetscapePluginStream.h:

(WebKit::NetscapePluginStream::create):

  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toFormData):

7:00 PM Changeset in webkit [216472] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove black background from video layer while in fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=171816

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

No new tests because no new behavior in DOM.

This changes the background of the video layer to clear when it goes into fullscreen
and back to black when it returns to inline to better facilitate fullsceen animations.

  • platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:

(WebCore::VideoFullscreenLayerManager::setVideoLayer):
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):

6:53 PM Changeset in webkit [216471] by Said Abou-Hallawa
  • 3 edits in trunk/Source/WebCore

The Incomplete asynchronously decoded image frame should be decoded every time it's drawn
https://bugs.webkit.org/show_bug.cgi?id=170836

Reviewed by Tim Horton.

The asynchronously decoded image frames has to be cached to prevent flickering,
but we have to keep requesting new decoding for the incomplete frame every time
it's drawn. This is to avoid drawing an incomplete image frame even after all
its encoded data is received.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::draw):

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::cacheAsyncFrameNativeImageAtIndex):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):

6:45 PM Changeset in webkit [216470] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebCore

Guard DragController::cleanupAfterSystemDrag to only clear drag state on Mac
https://bugs.webkit.org/show_bug.cgi?id=171771
<rdar://problem/32019149>

Reviewed by Tim Horton.

The call to dragEnded here seems to have been added because a client could override Mac WK1
WebUIDelegate methods to cause this cleanup to never be performed. Since this limitation only
applies to Mac, guard it as such.

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::cleanupAfterSystemDrag):

6:41 PM Changeset in webkit [216469] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

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

"It regressed JetStream on iOS by 7%" (Requested by saamyjoon
on #webkit).

Reverted changeset:

"GCController.cpp's collect() should be Async"
https://bugs.webkit.org/show_bug.cgi?id=171708
http://trac.webkit.org/changeset/216262

6:35 PM Changeset in webkit [216468] by sbarati@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

testWasmBoundsCheck and testCallFunctionWithHellaArguments is broken in testb3
https://bugs.webkit.org/show_bug.cgi?id=171392
<rdar://problem/31872222>

Reviewed by Keith Miller.

This patch fixes two bugs. The first one is:
Inside testb3, we were using the wrong WasmBoundsCheckValue constructor.
Everything compiled OK because of implicit casting in C. I've changed one
of the constructors to take arguments in a different order so we don't
run into this problem again.

The second bug was that Air::ShufflePair::inst was assuming that a move
from BigImm to its destination is always valid. This is not the case.
For example, the store, Move BigImm, Addr is not allowed. I refactored
the code to be correct by emitting more than one instruction when needeed.

When testing my changes, I ran ARM64 testb3 both in debug and
release. I ran into many pre-existing failures. I've opened
a new bug to fix those here: https://bugs.webkit.org/show_bug.cgi?id=171826

  • b3/B3WasmBoundsCheckValue.cpp:

(JSC::B3::WasmBoundsCheckValue::WasmBoundsCheckValue):

  • b3/B3WasmBoundsCheckValue.h:
  • b3/air/AirEmitShuffle.cpp:

(JSC::B3::Air::ShufflePair::insts):
(JSC::B3::Air::ShufflePair::inst): Deleted.

  • b3/air/AirEmitShuffle.h:
  • b3/air/AirLowerMacros.cpp:

(JSC::B3::Air::lowerMacros):

  • b3/testb3.cpp:

(JSC::B3::testLoadAcq42):
(JSC::B3::testStoreRelAddLoadAcq32):
(JSC::B3::testStoreRelAddLoadAcq8):
(JSC::B3::testStoreRelAddFenceLoadAcq8):
(JSC::B3::testStoreRelAddLoadAcq16):
(JSC::B3::testStoreRelAddLoadAcq64):
(JSC::B3::testSimplePatchpointWithOuputClobbersGPArgs):
(JSC::B3::testCheckMul):
(JSC::B3::testCheckMulMemory):
(JSC::B3::testCheckMul64):
(JSC::B3::testCheckMulFold):
(JSC::B3::testCheckMulFoldFail):
(JSC::B3::testCheckMulArgumentAliasing64):
(JSC::B3::testCheckMulArgumentAliasing32):
(JSC::B3::testCheckMul64SShr):
(JSC::B3::testCallFunctionWithHellaArguments):
(JSC::B3::functionWithHellaArguments2):
(JSC::B3::testCallFunctionWithHellaArguments2):
(JSC::B3::functionWithHellaArguments3):
(JSC::B3::testCallFunctionWithHellaArguments3):
(JSC::B3::testSpillDefSmallerThanUse):
(JSC::B3::testLateRegister):
(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled):
(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled2):
(JSC::B3::testMoveConstants):
(JSC::B3::testAtomicWeakCAS):
(JSC::B3::testAtomicStrongCAS):
(JSC::B3::testAtomicXchg):
(JSC::B3::testWasmBoundsCheck):
(JSC::B3::run):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):

5:32 PM Changeset in webkit [216467] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked http/tests/security/storage-blocking-loosened-plugin.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=171837

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-08

  • platform/mac-wk2/TestExpectations:
5:16 PM Changeset in webkit [216466] by Chris Dumez
  • 16 edits
    2 adds in trunk

Move offsetParent / offsetLeft / offsetTop / offsetWidth / offsetHeight from Element to HTMLElement
https://bugs.webkit.org/show_bug.cgi?id=171829

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Re-sync Web-Platform-Test after:

  • web-platform-tests/cssom-view/offsetParent_element_test.html:

Source/WebCore:

Move offsetParent / offsetLeft / offsetTop / offsetWidth / offsetHeight from Element to HTMLElement,
as per the specification:

Both Firefox and Chrome match the specification and also do not have the corresponding API on
SVGElement.

Bug tracking the similar move in Blink (completed over 1 year ago):

Note that for the inner SVG elements like <rect> and <circle> these attributes were returning 0,
because those aren't part of the CSS box model. They did return correct values for the <svg>
element itself, however.

Test: fast/css/htmlelement-offset-properties.html

  • dom/Element.idl:
  • Drop offset* attributes, now that they are on HTMLElement.
  • html/HTMLElement.idl:
  • Resync HTMLElement.idl with the specification: https://html.spec.whatwg.org/#htmlelement No behavior change besides what's indicated in the Changelog above. Things that do not match the spec have been annotated with FIXME comments.
  • Add offset* attributes that used to be on Element.

LayoutTests:

  • fast/css/htmlelement-offset-properties-expected.txt:
  • fast/css/htmlelement-offset-properties.html:

Add layout test coverage.

  • editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html:
  • fast/css-grid-layout/grid-item-display.html:
  • js/dom/dom-static-property-for-in-iteration-expected.txt:
  • mathml/presentation/menclose-notation-no-overlap-expected.txt:
  • mathml/presentation/menclose-notation-no-overlap.html:
  • platform/mac/inspector/model/remote-object-expected.txt:
  • svg/dynamic-updates/resources/SVGTestCase.js:

(clickAt):

  • svg/text/inline-text-destroy-attributes-crash.xhtml:

Use getClientBoundingRect() instead of offset* properties for non-HTML elements.

4:41 PM Changeset in webkit [216465] by Brian Burg
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: box model labels have bad alignment
https://bugs.webkit.org/show_bug.cgi?id=171817

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/BoxModelDetailsSectionRow.css:

(.details-section .row.box-model .label):
(body[dir=ltr] .details-section .row.box-model .label):
(body[dir=rtl] .details-section .row.box-model .label):
We can't just use a mirrored leading margin because all the
text here is center-aligned. Just hardcode a reasonable value.

4:39 PM Changeset in webkit [216464] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked imported/w3c/web-platform-tests/XMLHttpRequest/timeout-multiple-fetches.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169637

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-08

  • platform/ios-wk2/TestExpectations:
4:31 PM Changeset in webkit [216463] by commit-queue@webkit.org
  • 16 edits in trunk/Source

Add support for reading and writing settings from UIProcess audio capture
https://bugs.webkit.org/show_bug.cgi?id=171633

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

Source/WebCore:

Covered by manual testing and existing test sets.

Moving success/failure callbacks for applyConstraints.
Making main RealtimeMediaSource::applyConstraints virtual so that WebProcess source proxies can implement it by
doing an IPC call directly. Doing so for UIProcess CoreAudioCaptureSource.

Adding support for volume to CoreAudioCaptureSource by applying gain post-capturing.
Adding support for toggling echo cancellation in CoreAudioCaptureSource.
Adding support to change echo cancellation and sample rate by scheduling a reconfiguration of the audio unit.
To do so, we stop producing data, delete the audio unit and restart producing data.
Removing CoreAudioCaptureSource::supportedConstraints as it is redundant with
RealtimeMediaSourceSettings::supportedConstraints.

Setting sample rate only to the following values: 8000, 16000, 32000, 44100, 48000.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::applyConstraints):

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::applyConstraints):

  • platform/mediastream/MediaStreamTrackPrivate.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::applyConstraints):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeMediaSourceSettings.h:

(WebCore::RealtimeMediaSourceSettings::supportedConstraints):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::processMicrophoneSamples):
(WebCore::CoreAudioCaptureSource::cleanupAudioUnit):
(WebCore::CoreAudioCaptureSource::createAudioUnit):
(WebCore::CoreAudioCaptureSource::configureAudioUnit):
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::capabilities):
(WebCore::CoreAudioCaptureSource::settings):
(WebCore::CoreAudioCaptureSource::applySampleRate):
(WebCore::CoreAudioCaptureSource::applyEchoCancellation):
(WebCore::CoreAudioCaptureSource::scheduleReconfiguration):
(WebCore::CoreAudioCaptureSource::cleanupAudioUnits): Deleted.
(WebCore::CoreAudioCaptureSource::setupAudioUnits): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.h:

Source/WebKit2:

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::applyConstraints):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::setSettings):
(WebKit::UserMediaCaptureManager::Source::applyConstraintsSucceeded):
(WebKit::UserMediaCaptureManager::Source::applyConstraintsFailed):
(WebKit::UserMediaCaptureManager::createCaptureSource):
(WebKit::UserMediaCaptureManager::sourceSettingsChanged):
(WebKit::UserMediaCaptureManager::applyConstraints):
(WebKit::UserMediaCaptureManager::applyConstraintsSucceeded):
(WebKit::UserMediaCaptureManager::applyConstraintsFailed):
(WebKit::UserMediaCaptureManager::Source::setMuted): Deleted.
(WebKit::UserMediaCaptureManager::Source::setEnabled): Deleted.

  • WebProcess/cocoa/UserMediaCaptureManager.h:
  • WebProcess/cocoa/UserMediaCaptureManager.messages.in:
4:15 PM Changeset in webkit [216462] by Jonathan Bedard
  • 5 edits in trunk

Implement PlatformWebView::windowSnapshotImage and createBitmapContextFromWebView for iOS devices
https://bugs.webkit.org/show_bug.cgi?id=169421
<rdar://problem/30950171>

Reviewed by Tim Horton.

Tools:

  • DumpRenderTree/ios/PixelDumpSupportIOS.mm:

(createBitmapContextFromWebView): Implement for IOSurface.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::windowSnapshotImage): Use snapshot API for device.

LayoutTests:

  • platform/ios-device/TestExpectations: Mark compositing tests as failures, this

is due to a bug tracked in https://bugs.webkit.org/show_bug.cgi?id=170772.

4:12 PM Changeset in webkit [216461] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Request/Response toggles not working
https://bugs.webkit.org/show_bug.cgi?id=171833
<rdar://problem/31341637>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-08
Reviewed by Brian Burg.

  • UserInterface/Views/HierarchicalPathNavigationItem.js:

(WebInspector.HierarchicalPathNavigationItem.set components.let.componentsEqual):
(WebInspector.HierarchicalPathNavigationItem.prototype.set components):
If the new components being set were shallowly equal, then they wouldn't
actually be updated even if ultimately they are different. In this case
the Path Components with values "request" / "response" would not update
between different resources because the path components had equivalent
simple values. Provide a different discriminator (comparisonData) which
can be an object so these path components compare as necessarily different.

  • UserInterface/Views/HeapSnapshotClusterContentView.js:

(WebInspector.HeapSnapshotClusterContentView.createPathComponent):
(WebInspector.HeapSnapshotClusterContentView):

  • UserInterface/Views/ResourceClusterContentView.js:

(WebInspector.ResourceClusterContentView.createPathComponent):
(WebInspector.ResourceClusterContentView):
(WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):

  • UserInterface/Views/SVGImageResourceClusterContentView.js:

(WebInspector.SVGImageResourceClusterContentView):

  • UserInterface/Views/ScriptClusterTimelineView.js:

(WebInspector.ScriptClusterTimelineView.createPathComponent):
(WebInspector.ScriptClusterTimelineView):
Provide comparisonData for path components cases that would need it.

3:51 PM Changeset in webkit [216460] by fpizlo@apple.com
  • 7 edits
    2 adds in trunk/Source/JavaScriptCore

Expose a function to get proxy targets
https://bugs.webkit.org/show_bug.cgi?id=171797
<rdar://problem/32027549>

Reviewed by Mark Lam.

This exposes a new private API function, JSObjectGetProxyTarget(), that gets the target of a
proxy. It works with both ProxyObject and JSProxy, but it's primarily intended for use with
JSProxy.

  • API/JSObjectRef.cpp:

(JSObjectGetProxyTarget):

  • API/JSObjectRefPrivate.h:
  • API/tests/JSObjectGetProxyTargetTest.cpp: Added.

(testJSObjectGetProxyTarget):

  • API/tests/JSObjectGetProxyTargetTest.h: Added.
  • API/tests/testapi.c:

(main):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/ProxyObject.h:
  • shell/PlatformWin.cmake:
3:24 PM Changeset in webkit [216459] by mark.lam@apple.com
  • 5 edits
    1 add in trunk

op_throw_static_error's use of its first operand should be reflected in DFG BytecodeUseDef as well.
https://bugs.webkit.org/show_bug.cgi?id=171786
<rdar://problem/32051023>

Reviewed by Saam Barati.

JSTests:

  • stress/bug-171786.js: Added.

Source/JavaScriptCore:

  • bytecode/BytecodeDumper.cpp:

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

  • Fix BytecodeDumper to dump op_throw_static_error correctly. Previously, it was expecting op1 to always be a constant. r206870 changed it to take a variable string as well.
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):

  • Fix the bug.
  • dfg/DFGByteCodeParser.cpp:

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

  • Move the Phantom of op1 after the ThrowStaticError node, because technically, the ThrowStaticError represents op_throw_static_error, and op_throw_static_error uses op1. In practice, this probably doesn't matter, but let's have the code accurately communicate the behavior we're expecting.
3:17 PM Changeset in webkit [216458] by Chris Dumez
  • 7 edits
    2 adds in trunk

Drop non-standard document.implementation.createCSSStyleSheet() API
https://bugs.webkit.org/show_bug.cgi?id=171825

Reviewed by Simon Fraser.

Source/WebCore:

Drop non-standard document.implementation.createCSSStyleSheet() API.

This was never-implemented by Firefox and they actually rejected implementing it:

  • Drop non-standard document.implementation.createCSSStyleSheet() API

Blink dropped this API back in 2014 after getting UseCounter data showing this was not used:

The API is not useful in its current state because even though
document.implementation.createCSSStyleSheet() allows you to create a stylesheet, there is
currently no way to associate it with the document.

Test: fast/css/DOMImplementation.createCSSStyleSheet-obsolete.html

  • dom/DOMImplementation.idl:

LayoutTests:

  • fast/css/DOMImplementation.createCSSStyleSheet-obsolete-expected.txt:
  • fast/css/DOMImplementation.createCSSStyleSheet-obsolete.html:

Add layout test coverage.

  • fast/dom/StyleSheet/gc-parent-rule-expected.txt:
  • fast/dom/StyleSheet/gc-parent-rule.html:
  • fast/dom/StyleSheet/gc-parent-stylesheet-expected.txt:
  • fast/dom/StyleSheet/gc-parent-stylesheet.html:

Add utility functions to construct a CSSStyleSheet object and use it instead
of document.implementation.createCSSStyleSheet().

3:16 PM Changeset in webkit [216457] by jdiggs@igalia.com
  • 7 edits in trunk

AX: don't expose empty roledescription
https://bugs.webkit.org/show_bug.cgi?id=163647

Reviewed by Chris Fleizach.

Source/WebCore:

If the value of aria-roledescription is empty or contains only whitespace
characters, ignore the value. Also strip out leading or trailing whitespace
characters in the value.

No new tests: We already had coverage for an empty aria-roledescription value.
That test was updated to reflect the new behavior. New test cases were added
to cover a value that contains only whitespace characters, and a value with
leading and trailing whitespace characters.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::roleDescription):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper roleDescription]):

LayoutTests:

  • accessibility/aria-roledescription-expected.txt: New test cases, updated expectations.
  • accessibility/aria-roledescription.html: New test cases, updated expectations.
  • platform/gtk/accessibility/aria-roledescription-expected.txt: New test cases, updated expectations.
3:15 PM Changeset in webkit [216456] by Chris Dumez
  • 8 edits
    2 moves
    2 adds in trunk

Drop non-standard Element.scrollByLines() / scrollByPages()
https://bugs.webkit.org/show_bug.cgi?id=171820

Reviewed by Simon Fraser.

Source/WebCore:

Drop non-standard Element.scrollByLines() / scrollByPages().

Those were added a very long time ago (https://trac.webkit.org/changeset/7901/webkit)
for Safari RSS but does not seem to be used anymore.

Blink has already dropped it without issue back in 2014:

Their UseCounter data showed no usage:

Test: fast/css/element-scrollByLines-scrollByPages-obsolete.html

  • dom/Element.idl:

Source/WebInspectorUI:

Drop non-standard Element.scrollByLines() / scrollByPages() from
WebInspector code.

  • UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

  • LayoutTests/fast/css/element-scrollByLines-scrollByPages-obsolete-expected.txt:
  • LayoutTests/fast/css/element-scrollByLines-scrollByPages-obsolete.html:

Add layout test coverage.

  • fast/dom/non-numeric-values-numeric-parameters-expected.txt:
  • fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
  • fast/events/scroll-event-does-not-bubble.html:
  • fast/layers/scroll-overflow-no-layer-expected.txt: Renamed from LayoutTests/fast/layers/scrollByLines-overflow-no-layer-expected.txt.
  • fast/layers/scroll-overflow-no-layer.html: Renamed from LayoutTests/fast/layers/scrollByLines-overflow-no-layer.html.

Update existing tests to stop relying on the API.

3:12 PM Changeset in webkit [216455] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

CoreAudioSharedUnit should own its configuration parameters
https://bugs.webkit.org/show_bug.cgi?id=171812

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

Covered by manual tests.

Add sampleRate, volume and echoCancellation parameters to the shared audio unit.
Set default values when creating the shared audio unit and use those for the creation of new sources.
Add support for volume.
Add support for disabling echo cancellation.
Check valid sample rates when trying to apply a sample rate.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::volume):
(WebCore::CoreAudioSharedUnit::sampleRate):
(WebCore::CoreAudioSharedUnit::enableEchoCancellation):
(WebCore::CoreAudioSharedUnit::setVolume):
(WebCore::CoreAudioSharedUnit::setSampleRate):
(WebCore::CoreAudioSharedUnit::setEnableEchoCancellation):
(WebCore::CoreAudioSharedUnit::CoreAudioSharedUnit):
(WebCore::CoreAudioSharedUnit::setupAudioUnits):
(WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
(WebCore::CoreAudioSharedUnit::configureSpeakerProc):
(WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::applySampleRate):
(WebCore::CoreAudioCaptureSource::applyEchoCancellation):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
2:51 PM Changeset in webkit [216454] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked http/tests/websocket/tests/hybi/workers/close.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=171830

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-08

  • platform/ios-wk2/TestExpectations:
2:50 PM Changeset in webkit [216453] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/status-label/status-label-font.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171828

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:51 PM Changeset in webkit [216452] by jdiggs@igalia.com
  • 5 edits in trunk

AX: Setting aria-orientation="horizontal" on a listbox is being overridden on the Mac
https://bugs.webkit.org/show_bug.cgi?id=171821

Reviewed by Chris Fleizach.

Source/WebCore:

The Mac's AccessibilityObject wrapper was unconditionally returning vertical
as the orientation of listbox. Removing this override causes the author-specified
value to be exposed, with the default/implicit orientation continuing to be vertical.

No new tests. We already have coverage for the default/implicit orientation on a
listbox. A new test case was added to aria-orientation.html so that we would have
coverage for aria-orientation="horizontal" on a listbox.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

  • accessibility/aria-orientation-expected.txt: New test case.
  • accessibility/aria-orientation.html: New test case.
1:49 PM Changeset in webkit [216451] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Make it easy to dynamically show/hide a SettingsView
https://bugs.webkit.org/show_bug.cgi?id=171765
<rdar://problem/32031280>

Reviewed by Brian Burg.

This patch adds SettingsTabContentView.prototype.setSettingsViewVisible,
for dynamically showing/hiding a child view (and its NavigationBar item).
The following new behavior is relevant when more that one child SettingsView
exist in the Settings tab:

  • Hiding the selected view will cause a new view to become selected. The previous visible view is selected, if it exists. Otherwise the next visible view is used.
  • Showing a view when no views are selected cause the view to be selected.

As the Settings tab currently has only one child view, the behavior above
was tested by adding a handful of vanilla SettingsView objects to the tab
and toggling their visibility.

  • UserInterface/Views/NavigationBar.js:

Simplify overloaded parameter navigationItemOrIdentifierOrIndex, which
is used in a few places and is always an instance of NavigationItem.

(WebInspector.NavigationBar):
(WebInspector.NavigationBar.prototype.removeNavigationItem):
(WebInspector.NavigationBar.prototype.get selectedNavigationItem):
(WebInspector.NavigationBar.prototype.set selectedNavigationItem):
(WebInspector.NavigationBar.prototype.findNavigationItem):
Lookup a navigation item by its identifier.
(WebInspector.NavigationBar.prototype._findNavigationItem): Deleted.
Replaced overloaded private method with new public method.

  • UserInterface/Views/NavigationItem.js:

Cleanup.
(WebInspector.NavigationItem):
(WebInspector.NavigationItem.prototype.get identifier):
(WebInspector.NavigationItem.prototype.get element):
(WebInspector.NavigationItem.prototype.get minimumWidth):
(WebInspector.NavigationItem.prototype.get parentNavigationBar):

  • UserInterface/Views/SettingsTabContentView.css:

Use visibility: hidden instead of display: none when hiding the
NavigationBar, so that the selected view's top position stays the same.

(.content-view.settings):
(.content-view.settings .navigation-bar.invisible):

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView):
Switch to an array of SettingsViews instead of a map. Fast lookup isn't
a concern due to the small number of items, and having indices simplifies
traversing the previous/next items in setSettingsViewVisible.

(WebInspector.SettingsTabContentView.prototype.set selectedSettingsView):
Rename page to settingsView.
(WebInspector.SettingsTabContentView.prototype.addSettingsView):
(WebInspector.SettingsTabContentView.prototype.setSettingsViewVisible):
Shows/hides the specified view. Hiding the selected SettingsView will
cause another visible view to become selected, if one exists.

(WebInspector.SettingsTabContentView.prototype._updateNavigationBarVisibility):
Helper for updating navigation bar visibility after making a change
to the navigation items.

(WebInspector.SettingsTabContentView.prototype._navigationItemSelected):

1:36 PM Changeset in webkit [216450] by commit-queue@webkit.org
  • 9 edits in trunk

[CG] To decode an image frame asynchronously, pass the native size of the image to CGImageSourceCreateThumbnailAtIndex() if it's smaller than the sizeForDrawing
https://bugs.webkit.org/show_bug.cgi?id=170864
Source/WebCore:

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-08
Reviewed by Simon Fraser.

Tests: Existing tests were modified to test this patch.

The maxPixelSize was omitted when calling CGImageSourceCreateThumbnailAtIndex()
for the nativeSize image or when areaOf(nativeSize) < areaOf(sizeForDrawing).
The assumption was if we don't pass maxPixelSize, CG will create an image with the
nativeSize regardless how big this size is. It turns out this is wrong. CG has an
optimization to return a scaled down image if areaOf(nativeSize) is greater than
some maximum value.

This is not what we want for asynchronously image decoding. We want the decoded
frame to have the size we ask for, not some scaled down frame. The fix is to pass
always maxPixelSize to CGImageSourceCreateThumbnailAtIndex(). maxPixelSize will be
equal to maxDimension(sizeForDrawing) if sizeForDrawing is valid it is less than
maxDimension(nativeSize). Otherwise it will be equal to maxDimension(nativeSize).

  • platform/graphics/DecodingOptions.h:
  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::appendImageSourceOption):
(WebCore::appendImageSourceOptions):
(WebCore::imageSourceAsyncOptions):
(WebCore::ImageDecoder::createFrameImageAtIndex):

LayoutTests:

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-08
Reviewed by Simon Fraser.

  • fast/images/async-image-background-image-repeated-expected.html:
  • fast/images/async-image-background-image-repeated.html:
  • fast/images/resources/sprite-sheet-red-green-blue.png:
  • fast/images/sprite-sheet-image-draw-expected.html:
  • fast/images/sprite-sheet-image-draw.html:

Change the sprite image to be 200x33100 instead of 200x2100 and use it in drawing.
If the maxPixelSize is not passed to CGImageSourceCreateThumbnailAtIndex(), the
decoded farme of this image will be 30x5000 pixels (15% of the original size).

1:25 PM Changeset in webkit [216449] by Beth Dakin
  • 13 edits in trunk

WebKit should default to using sRGB with NSColor conversion instead of device
color space
https://bugs.webkit.org/show_bug.cgi?id=171745
-and corresponding-
rdar://problem/28314183

Reviewed by Tim Horton.

Source/WebCore:

  • platform/graphics/mac/ColorMac.mm:

(WebCore::makeRGBAFromNSColor):
(WebCore::nsColor):

LayoutTests:

  • editing/mac/attributed-string/anchor-element-expected.txt:
  • editing/mac/attributed-string/basic-expected.txt:
  • editing/mac/attributed-string/comment-cdata-section-expected.txt:
  • editing/mac/attributed-string/font-size-expected.txt:
  • editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • editing/mac/attributed-string/font-weight-expected.txt:
  • editing/mac/attributed-string/letter-spacing-expected.txt:
  • editing/mac/attributed-string/text-decorations-expected.txt:
  • editing/mac/attributed-string/vertical-align-expected.txt:
1:11 PM Changeset in webkit [216448] by achristensen@apple.com
  • 33 edits in trunk/Source

Reduce PassRefPtr use
https://bugs.webkit.org/show_bug.cgi?id=171809

Reviewed by Chris Dumez.

Source/WebCore:

  • platform/graphics/ca/PlatformCALayer.cpp:

(WebCore::PlatformCALayer::createCompatibleLayerOrTakeFromPool):

  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/TileCoverageMap.cpp:

(WebCore::TileCoverageMap::TileCoverageMap):

  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::TileGrid):

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(PlatformCALayerCocoa::create):
(PlatformCALayerCocoa::clone):
(PlatformCALayerCocoa::animationForKey):
(PlatformCALayerCocoa::createCompatibleLayer):

Source/WebKit2:

  • PluginProcess/PluginControllerProxy.cpp:

(WebKit::PluginControllerProxy::setInitializationReply):

  • PluginProcess/PluginControllerProxy.h:
  • PluginProcess/WebProcessConnection.cpp:

(WebKit::WebProcessConnection::destroyPlugin):
(WebKit::WebProcessConnection::createPlugin):

  • PluginProcess/WebProcessConnection.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::runOpenPanel):

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::registerUndoStep):

  • WebProcess/WebPage/VisitedLinkTableController.cpp:

(WebKit::VisitedLinkTableController::getOrCreate):

  • WebProcess/WebPage/VisitedLinkTableController.h:
  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::hitTest):
(WebKit::WebFrame::createSelectionSnapshot):

  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebOpenPanelResultListener.cpp:

(WebKit::WebOpenPanelResultListener::create):
(WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):

  • WebProcess/WebPage/WebOpenPanelResultListener.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::unapplyEditCommand):
(WebKit::WebPage::reapplyEditCommand):

  • WebProcess/WebPage/WebPageGroupProxy.cpp:

(WebKit::WebPageGroupProxy::create):

  • WebProcess/WebPage/WebPageGroupProxy.h:
  • WebProcess/WebPage/WebUndoStep.cpp:

(WebKit::WebUndoStep::create):

  • WebProcess/WebPage/WebUndoStep.h:

(WebKit::WebUndoStep::step):
(WebKit::WebUndoStep::WebUndoStep):

  • WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::create):
(WebKit::PlatformCALayerRemote::clone):
(WebKit::PlatformCALayerRemote::animationForKey):
(WebKit::PlatformCALayerRemote::createCompatibleLayer):

  • WebProcess/WebPage/mac/PlatformCALayerRemote.h:
  • WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
  • WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:

(WebKit::PlatformCALayerRemoteCustom::create):
(WebKit::PlatformCALayerRemoteCustom::clone):

1:07 PM Changeset in webkit [216447] by Jonathan Bedard
  • 3 edits in trunk/Tools

buildbot: Cleanup simulators after running tests
https://bugs.webkit.org/show_bug.cgi?id=171679

Reviewed by Aakash Jain.

simctl is partitioned for each user. Since kill-old-processes
is run as root, we need to specify the buildbot user when tearing
down simulators between steps.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(KillOldProcesses): Pass buildbot user to kill-old-processes.

  • BuildSlaveSupport/kill-old-processes:

(main): Specify the user for simctl if one has been provided.

1:03 PM Changeset in webkit [216446] by jer.noble@apple.com
  • 8 edits in trunk/Source

[Mac] Audio capture fails when shouldCaptureAudioInUIProcess is set.
https://bugs.webkit.org/show_bug.cgi?id=171710

Reviewed by Eric Carlson.

Source/WebCore:

Both the shouldCaptureAudioInUIProcess setting and useAVFoundationAudioCapture setting were trying to set
the audio factory for RealtimeMediaSourceCenter, and were stomping on each others' changes. Change the way
the useAVFoundationAudioCapture works so that it only affects the defaultAudioFactory, allowing that default
to be overridden by the shuoldCaptureAudioInUIProcess setting when it calls setAudioFactory().

  • page/Settings.cpp:

(WebCore::Settings::setUseAVFoundationAudioCapture):

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::audioFactory):
(WebCore::RealtimeMediaSourceCenter::videoFactory):
(WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager):

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::audioFactory): Deleted.
(WebCore::RealtimeMediaSourceCenter::videoFactory): Deleted.
(WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager): Deleted.
(WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager): Deleted.

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture):
(WebCore::RealtimeMediaSourceCenterMac::singleton):
(WebCore::RealtimeMediaSourceCenter::platformCenter):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioFactory):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioCaptureDeviceManager):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:

Source/WebKit2:

RealtimeMediaSourceCenterMac's setUseAVFoundationAudioCapture() is now accessed via a singleton.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs):

12:57 PM Changeset in webkit [216445] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit2

[macOS] com.macromedia.Flash Player ESR.plugin.sb is installed outside of PlugInSandboxProfiles
https://bugs.webkit.org/show_bug.cgi?id=171774

Reviewed by Dan Bernstein.

  • WebKit2.xcodeproj/project.pbxproj:
12:50 PM Changeset in webkit [216444] by mark.lam@apple.com
  • 2 edits in trunk/Source/WTF

Speculative Windows build fix after r216428.
https://bugs.webkit.org/show_bug.cgi?id=171776

Not reviewed.

  • wtf/StackTrace.h:
12:17 PM Changeset in webkit [216443] by jiewen_tan@apple.com
  • 3 edits
    2 adds in trunk

Search events should not fire synchronously for search type input elements with incremental attribute set
https://bugs.webkit.org/show_bug.cgi?id=171376
<rdar://problem/31863296>

Reviewed by Chris Dumez.

Source/WebCore:

For some reasons, we fire search events immediately for search type input elements with incremental
attribute set only when the length of the input equals to zero. This behaviour should be prevented
as event listeners in the middle might perform unexpectedly.

Test: fast/forms/search/search-incremental-crash.html

  • html/SearchInputType.cpp:

(WebCore::SearchInputType::startSearchEventTimer):

LayoutTests:

  • fast/forms/search/search-incremental-crash-expected.txt: Added.
  • fast/forms/search/search-incremental-crash.html: Added.
11:58 AM Changeset in webkit [216442] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

Clean UserMediaCaptureManager::capabilities return value
https://bugs.webkit.org/show_bug.cgi?id=171808

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

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::capabilities):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
11:40 AM Changeset in webkit [216441] by matthew_hanson@apple.com
  • 1 copy in branches/safari-604.1.21-branch

New Branch.

11:38 AM Changeset in webkit [216440] by Alan Bujtas
  • 5 edits
    2 adds in trunk

Text overlaps on http://www.duden.de/rechtschreibung/Acre
https://bugs.webkit.org/show_bug.cgi?id=171796
<rdar://problem/31036028>

Reviewed by Simon Fraser.

Source/WebCore:

Simple line layout pre-measures space using the primary font,
even if the space glyph requires a fallback font (and even if the string does not have a space in it at all).
When this width gets cached (see WidthCache) we might end up using it later during normal line layout and
it could produce incorrect layout.
This patch removes the space width caching from Simple line layout, since Font already caches it.

Test: fast/text/simple-line-layout-fallback-space-glyph.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::createLineRuns):

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):

  • rendering/SimpleLineLayoutTextFragmentIterator.h:

LayoutTests:

  • fast/text/simple-line-layout-fallback-space-glyph-expected.html: Added.
  • fast/text/simple-line-layout-fallback-space-glyph.html: Added.
11:28 AM Changeset in webkit [216439] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Refactor ImageInputType::width() / height() for clarity
https://bugs.webkit.org/show_bug.cgi?id=171810

Reviewed by Zalan Bujtas.

Refactor ImageInputType::width() / height() for clarity.

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):

11:19 AM Changeset in webkit [216438] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Bail out of simple line layout when hyphen needs a fallback font.
https://bugs.webkit.org/show_bug.cgi?id=171811

Reviewed by Antti Koivisto.

With hyphen: auto is set, we don't know if the hypen string is going to be used, until
after we started laying out the content and figured that the text overflows the line.
However it's too late to bail out of simple line layout at this point, so let's just
pre-check if the hyphen string needs a fallback font.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForStyle):

11:13 AM Changeset in webkit [216437] by clopez@igalia.com
  • 2 edits in trunk/Tools

REGRESSION(r216179): [GTK] Script install-dependencies misses liborc
https://bugs.webkit.org/show_bug.cgi?id=171681

Reviewed by Carlos Garcia Campos.

  • gtk/install-dependencies:
10:39 AM Changeset in webkit [216436] by commit-queue@webkit.org
  • 4 edits in trunk/Source

TURNS gathering is not working properly
https://bugs.webkit.org/show_bug.cgi?id=171747

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

Source/ThirdParty/libwebrtc:

  • Source/webrtc/base/openssladapter.cc: Adding support for SNI in case of TLS ice candidate gathering.

Source/WebCore:

Covered by manual tests.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration): Reveting TURNS ice server skipping.

10:39 AM Changeset in webkit [216435] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216431 - ComposedTreeIterator does not traverse all slotted children if the traversal root is a slot element.
https://bugs.webkit.org/show_bug.cgi?id=171375
<rdar://problem/31863184>

Reviewed by Zalan Bujtas.

Source/WebCore:

We were hitting an assert when using details element with a flow thread. The root cause for this turned
out to be that we only traversed the first slotted child if the traversal root was a slot element.

Test: fast/html/details-flow-thread.html

  • dom/ComposedTreeIterator.cpp:

(WebCore::ComposedTreeIterator::traverseNextLeavingContext):

Try to traverse to the next slotted child before testing if we at the end of the current context.

LayoutTests:

  • fast/html/details-flow-thread-expected.txt: Added.
  • fast/html/details-flow-thread.html: Added.
  • fast/shadow-dom/composed-tree-slots-expected.txt:
  • fast/shadow-dom/composed-tree-slots.html:

Expand the test so it also prints out slot subtrees using slots as traversal roots.

10:37 AM Changeset in webkit [216434] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.16

Merge r215614 - [cmake] WTF target should not have wtf and subdirectries in public interface
https://bugs.webkit.org/show_bug.cgi?id=171115

Reviewed by Michael Catanzaro.

In r209665 WEBCORE_FRAMEWORK macro started to export INCLUDE_DIRECTORIES of
targets as their public interface, so that linked targets can use them
implicitly without copying directory lists around. This matches existing
practice for all targets except WTF, headers from which are always included
with full path starting from "<wtf/...".

Since r209665 it became possible to include headers from wtf or its
subdirectories in CMake builds without using "<wtf/..." path. It should
not be allowed.

.:

  • Source/cmake/WebKitMacros.cmake: Support xxx_PRIVATE_HEADERS

CMake variables.

Source/WebCore:

  • platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Fix

incorrect include of WTF header.

Source/WTF:

  • wtf/CMakeLists.txt: WTF/wtf and its sudirectories should not be in

public include paths of WTF target.

10:36 AM Changeset in webkit [216433] by Michael Catanzaro
  • 7 edits
    2 deletes in trunk

Unreviewed, rolling out r216419.

Broke 70 layout tests on GTK bot

Reverted changeset:

"Ensure clean tree before AX cache update."
https://bugs.webkit.org/show_bug.cgi?id=171546
http://trac.webkit.org/changeset/216419

10:31 AM Changeset in webkit [216432] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

CoreAudioCaptureSource should not modify its shared unit if already started/stopped
https://bugs.webkit.org/show_bug.cgi?id=171804

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-08
Reviewed by Jer Noble.

Manual testing only since CoreAudioSharedUnit is not mocked.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::startProducingData): Exit early if source is already started.
(WebCore::CoreAudioCaptureSource::stopProducingData): Exit early if source is already stopped.

10:20 AM Changeset in webkit [216431] by Antti Koivisto
  • 5 edits
    2 adds in trunk

ComposedTreeIterator does not traverse all slotted children if the traversal root is a slot element.
https://bugs.webkit.org/show_bug.cgi?id=171375
<rdar://problem/31863184>

Reviewed by Zalan Bujtas.

Source/WebCore:

We were hitting an assert when using details element with a flow thread. The root cause for this turned
out to be that we only traversed the first slotted child if the traversal root was a slot element.

Test: fast/html/details-flow-thread.html

  • dom/ComposedTreeIterator.cpp:

(WebCore::ComposedTreeIterator::traverseNextLeavingContext):

Try to traverse to the next slotted child before testing if we at the end of the current context.

LayoutTests:

  • fast/html/details-flow-thread-expected.txt: Added.
  • fast/html/details-flow-thread.html: Added.
  • fast/shadow-dom/composed-tree-slots-expected.txt:
  • fast/shadow-dom/composed-tree-slots.html:

Expand the test so it also prints out slot subtrees using slots as traversal roots.

10:06 AM Changeset in webkit [216430] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: don't just emit extended offset adds for patch
https://bugs.webkit.org/show_bug.cgi?id=171799

Reviewed by Mark Lam.

It isn't necessary to restrict.

  • b3/air/AirLowerStackArgs.cpp:

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

9:59 AM WebKitGTK/2.16.x edited by Carlos Garcia Campos
(diff)
9:58 AM Changeset in webkit [216429] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r214969 - Do not use BLX for immediates (ARM-32)

https://bugs.webkit.org/show_bug.cgi?id=170351

Patch by Guilherme Iscaro <iscaro@profusion.mobi> on 2017-04-05
Reviewed by Mark Lam.

Currently the offline asm generator for 32-bit ARM code translates the
'call' meta-instruction (which may be found in LowLevelInterpreter.asm
and friends) to the ARM's BLX instrunction. The BLX instruction may be
used for labels (immediates) and registers and one side effect of BLX
is that it may switch the processor's instruction set.
A 'BLX register' instruction will change/remain the processor state to
ARM if the register_bit[0] is set to 0 or change/remain to Thumb if
register_bit[0] is set to 1. However, a 'BLX label' instruction will
always switch the processor state. It switches ARM to thumb and vice-versa.
This behaviour is unwanted, since the C++ code and the offlineasm generated code
are both compiled using the same instruction set, thus a instruction
set change will likely produce a crash. In order to fix the problem the
BL instruction can be used for labels. It will branch just like BLX,
but it won't change the instruction set. It's important to note that
Darwin is not affected by this problem, thus to minimize the impact of
this change the BL instruction will only be used on non-darwin targets.

BLX reference: http://infocenter.arm.com/help/topic/com.arm.doc.dui0489i/CIHBJCDC.html?resultof=%22%62%6c%78%22%20

  • offlineasm/arm.rb:
9:56 AM Changeset in webkit [216428] by mark.lam@apple.com
  • 63 edits in trunk/Source

Introduce ExceptionScope::assertNoException() and releaseAssertNoException().
https://bugs.webkit.org/show_bug.cgi?id=171776

Reviewed by Keith Miller.

Source/JavaScriptCore:

Instead of ASSERT(!scope.exception()), we can now do scope.assertNoException().
Ditto for RELEASE_ASSERT and scope.releaseAssertNoException().

The advantage of using ExceptionScope::assertNoException() and
releaseAssertNoException() is that if the assertion fails, these utility
functions will print the stack trace for where the unexpected exception is
detected as well as where the unexpected exception was thrown from. This makes
it much easier to debug the source of unhandled exceptions.

  • debugger/Debugger.cpp:

(JSC::Debugger::pauseIfNeeded):

  • dfg/DFGOperations.cpp:
  • interpreter/Interpreter.cpp:

(JSC::eval):
(JSC::notifyDebuggerOfUnwinding):
(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::execute):
(JSC::Interpreter::debug):

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::functionsOnStack):

  • jsc.cpp:

(GlobalObject::moduleLoaderResolve):
(GlobalObject::moduleLoaderFetch):
(functionGenerateHeapSnapshot):
(functionSamplingProfilerStackTraces):
(box):
(runWithScripts):

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::finishCreation):

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint):

  • runtime/Completion.cpp:

(JSC::rejectPromise):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedToString):

  • runtime/ExceptionHelpers.cpp:

(JSC::createError):

  • runtime/ExceptionScope.cpp:

(JSC::ExceptionScope::unexpectedExceptionMessage):

  • runtime/ExceptionScope.h:

(JSC::ExceptionScope::assertNoException):
(JSC::ExceptionScope::releaseAssertNoException):
(JSC::ExceptionScope::unexpectedExceptionMessage):

  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::defineOwnProperty):

  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::createCollator):
(JSC::IntlCollator::resolvedOptions):

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::resolvedOptions):
(JSC::IntlDateTimeFormat::format):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::createNumberFormat):
(JSC::IntlNumberFormat::resolvedOptions):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitiveByIndex):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncIncludes):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncHostPromiseRejectionTracker):

  • runtime/JSModuleEnvironment.cpp:

(JSC::JSModuleEnvironment::getOwnPropertySlot):

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::finishCreation):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::finishCreation):

  • runtime/JSONObject.cpp:

(JSC::Stringifier::toJSON):

  • runtime/JSObject.cpp:

(JSC::JSObject::ordinaryToPrimitive):

  • runtime/JSPropertyNameEnumerator.h:

(JSC::propertyNameEnumerator):

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorGetOwnPropertyDescriptors):
(JSC::objectConstructorDefineProperty):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncHasOwnProperty):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/ReflectObject.cpp:

(JSC::reflectObjectDefineProperty):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::StackFrame::nameFromCallee):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncRepeatCharacter):

  • runtime/TemplateRegistry.cpp:

(JSC::TemplateRegistry::getTemplateObject):

  • runtime/VM.cpp:

(JSC::VM::throwException):

  • runtime/VM.h:

(JSC::VM::nativeStackTraceOfLastThrow):
(JSC::VM::clearException):

  • wasm/WasmB3IRGenerator.cpp:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::create):

Source/WebCore:

No new tests because there's no behavior change in functionality. We're only
refactoring the code to use the new assertion utility function.

  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::QuickTimePluginReplacement::installReplacement):

  • bindings/js/JSCryptoKeySerializationJWK.cpp:

(WebCore::getJSArrayFromJSON):
(WebCore::getStringFromJSON):
(WebCore::getBooleanFromJSON):

  • bindings/js/JSCustomElementRegistryCustom.cpp:

(WebCore::JSCustomElementRegistry::whenDefined):

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::propagateExceptionSlowPath):
(WebCore::throwNotSupportedError):
(WebCore::throwInvalidStateError):
(WebCore::throwSecurityError):
(WebCore::throwDOMSyntaxError):
(WebCore::throwDataCloneError):
(WebCore::throwIndexSizeError):
(WebCore::throwTypeMismatchError):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::makeThisTypeErrorForBuiltins):
(WebCore::makeGetterTypeErrorForBuiltins):

  • bindings/js/JSDOMGlobalObjectTask.cpp:
  • bindings/js/JSDOMPromise.h:

(WebCore::callPromiseFunction):

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowMicrotaskCallback::call):

  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadExecState::~JSMainThreadExecState):

  • bindings/js/ReadableStreamDefaultController.cpp:

(WebCore::ReadableStreamDefaultController::isControlledReadableStreamLocked):

  • bindings/js/ReadableStreamDefaultController.h:

(WebCore::ReadableStreamDefaultController::enqueue):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateSerializerFunction):

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

(WebCore::JSTestNode::serialize):

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

(WebCore::JSTestObj::serialize):

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

(WebCore::JSTestSerialization::serialize):

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

(WebCore::JSTestSerializationInherit::serialize):

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

(WebCore::JSTestSerializationInheritFinal::serialize):

  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::getTypeFlags):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):

Source/WTF:

  1. Add an option to skip some number of top frames when capturing the StackTrace.
  2. Add an option to use an indentation string when dumping the StackTrace.
  • wtf/StackTrace.cpp:

(WTF::StackTrace::captureStackTrace):
(WTF::StackTrace::dump):

  • wtf/StackTrace.h:
9:55 AM Changeset in webkit [216427] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK+ test /webkit2/WebKitConsoleMessage/network-error after r215556.

Glib uses now Unicode quotes in error messages.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestConsoleMessage.cpp:

(testWebKitConsoleMessageNetworkError):

9:50 AM Changeset in webkit [216426] by Chris Dumez
  • 37 edits
    3 adds in trunk

Move 'style' from Element to HTMLElement / SVGElement and make it settable
https://bugs.webkit.org/show_bug.cgi?id=171795

Reviewed by Alex Christensen.

Source/WebCore:

Move 'style' from Element to HTMLElement / SVGElement and make it settable
as per:

Both Firefox and Chrome already match the specification (both for the
property location and having it settable).

Test: fast/css/Element-style.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • css/ElementCSSInlineStyle.idl: Added.
  • css/PropertySetCSSStyleDeclaration.h:
  • css/StyleProperties.cpp:

(WebCore::MutableStyleProperties::ensureCSSStyleDeclaration):
(WebCore::MutableStyleProperties::ensureInlineCSSStyleDeclaration):

  • css/StyleProperties.h:
  • dom/Attr.cpp:

(WebCore::Attr::style):

  • dom/Document.cpp:

(WebCore::Document::createCSSStyleDeclaration):

  • dom/Element.cpp:
  • dom/Element.h:
  • dom/Element.idl:
  • dom/StyledElement.cpp:

(WebCore::StyledElement::cssomStyle):

  • dom/StyledElement.h:
  • editing/Editor.cpp:

(WebCore::Editor::applyEditingStyleToElement):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):

  • html/HTMLElement.idl:
  • html/ImageInputType.cpp:

(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):
Fix bug that was found by fast/forms/input-width-height-attributes-without-renderer-loaded-image.html.
That test relied on setting HTMLElement.style which did not work until now. Call updateLayout()
*before* doing the renderer check.

  • inspector/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::asInspectorStyleSheet):
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):

  • inspector/InspectorCSSAgent.h:
  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyle::create):
(WebCore::InspectorStyle::InspectorStyle):
(WebCore::InspectorStyle::extractSourceData):
(WebCore::InspectorStyle::setText):
(WebCore::InspectorStyleSheet::inspectorStyleForId):
(WebCore::InspectorStyleSheetForInlineStyle::create):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
(WebCore::InspectorStyleSheetForInlineStyle::didModifyElementAttribute):
(WebCore::InspectorStyleSheetForInlineStyle::setStyleText):
(WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady):
(WebCore::InspectorStyleSheetForInlineStyle::inlineStyle):

  • inspector/InspectorStyleSheet.h:
  • svg/SVGElement.idl:

Source/WebKit/mac:

Build fix.

  • DOM/DOMElement.mm:

(-[DOMElement style]):

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::shouldApplyStyle):

  • WebView/WebFrame.mm:

(-[WebFrame _typingStyle]):

Source/WebKit2:

Build fix.

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::shouldApplyStyle):

LayoutTests:

  • accessibility/roles-exposed.html:

Add null check for element.style.

  • fast/css/Element-style-expected.txt: Added.
  • fast/css/Element-style.html: Added.

Add layout test coverage.

  • fast/forms/input-width-height-attributes-without-renderer-loaded-image-expected.txt:

Rebaseline test that was setting HTMLElement.style which was a no-op until this patch. Now that it actually
does something, the input element actually looses its renderer. This found a bug which I fixed in this
patch.

  • js/dom/dom-static-property-for-in-iteration-expected.txt:

Rebaseline as property enumeration order has changed.

9:43 AM Changeset in webkit [216425] by jdiggs@igalia.com
  • 7 edits
    2 adds
    3 deletes in trunk

AX: Propagate aria-readonly to grid descendants
https://bugs.webkit.org/show_bug.cgi?id=171189

Reviewed by Chris Fleizach.

Source/WebCore:

Propagate aria-readonly to grid descendants if the property is not
explicitly set on the descendant.

Test: accessibility/gtk/aria-readonly-propagated.html

Additional test cases also added to accessibility/aria-readonly.html

  • accessibility/AccessibilityARIAGridCell.cpp:

(WebCore::AccessibilityARIAGridCell::ariaReadOnlyValue):

  • accessibility/AccessibilityARIAGridCell.h:
  • accessibility/AccessibilityObject.h:

LayoutTests:

Add new test cases to aria-readonly.html. In addition, because the platform-specific
test expectations seem due to how platforms treat whitespace from the test file, hide
the test cases after the test is run so that there are no extraneous characters and
a single expectations file can be shared.

  • accessibility/aria-readonly-expected.txt: Updated.
  • accessibility/aria-readonly.html: Updated.
  • accessibility/gtk/aria-readonly-propagated-expected.txt: Added.
  • accessibility/gtk/aria-readonly-propagated.html: Added.
  • platform/mac-elcapitan/accessibility/aria-readonly-expected.txt: Removed.
  • platform/mac/accessibility/aria-readonly-expected.txt: Removed.
  • platform/win/accessibility/aria-readonly-expected.txt: Removed.
9:42 AM Changeset in webkit [216424] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Tools

Merge r216423 - Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/javascript-dialogs after r215404.

Sending down+up keys is no longer enough to simulate a real user interaction after r215404, the key events now
should be handled by the web process to be considered a user interaction. So, add an input to the HTML and send
characters to the input. Also fix typo in the function name.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:

(testWebViewJavaScriptDialogs):

9:40 AM Changeset in webkit [216423] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/javascript-dialogs after r215404.

Sending down+up keys is no longer enough to simulate a real user interaction after r215404, the key events now
should be handled by the web process to be considered a user interaction. So, add an input to the HTML and send
characters to the input. Also fix typo in the function name.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:

(testWebViewJavaScriptDialogs):

8:58 AM Changeset in webkit [216422] by Carlos Garcia Campos
  • 1 edit
    1 add in releases/WebKitGTK/webkit-2.16/LayoutTests

Unreviewed GTK+ gardening. Rebaseline fast/repaint/mutate-non-visible.html.

  • platform/gtk/fast/repaint/mutate-non-visible-expected.txt: Added.
8:55 AM Changeset in webkit [216421] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/LayoutTests

Unreviewed. Skip hls tests crashing with GST 1.8.

  • platform/gtk/TestExpectations:
8:47 AM Changeset in webkit [216420] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216307 - Renderers being destroyed should not be added to AX's deferred list.
https://bugs.webkit.org/show_bug.cgi?id=171768
<rdar://problem/31955660>

Reviewed by Simon Fraser.

Source/WebCore:

In certain cases, when custom scrollbars are present, while destroying the scrollbars' block parent, we

  • first remove the block from the AX's deferred list (AXObjectCache::remove)
  • destroy the render layer that owns the custom scrollbars (RenderLayer::destroyLayer)
  • detach the scrollbars from the parent (block) (RenderObject::removeFromParent)
    • clean up the block's lines (RenderBlock::deleteLines)
      • push the block back to the AX's deferred list (AXObjectCache::recomputeDeferredIsIgnored)

At this point no one will remove the current block from AX's deferred list.

Test: accessibility/crash-when-renderers-are-added-back-to-deferred-list.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::recomputeDeferredIsIgnored):
(WebCore::AXObjectCache::deferTextChanged):

LayoutTests:

  • accessibility/crash-when-renderers-are-added-back-to-deferred-list-expected.txt: Added.
  • accessibility/crash-when-renderers-are-added-back-to-deferred-list.html: Added.
8:33 AM Changeset in webkit [216419] by Alan Bujtas
  • 7 edits
    2 adds in trunk

Ensure clean tree before AX cache update.
https://bugs.webkit.org/show_bug.cgi?id=171546
<rdar://problem/31934942>

Source/WebCore:

While updating an accessibility object state, we might
perform unintentional style updates. This style update could
end up destroying renderes that are still referenced by function calls
on the callstack.
To avoid that, AXObjectCache should operate on a clean tree only.

Reviewed by Chris Fleizach.

Test: accessibility/crash-when-render-tree-is-not-clean.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::checkedStateChanged):
(WebCore::AXObjectCache::selectedChildrenChanged):
(WebCore::AXObjectCache::handleAriaExpandedChange):
(WebCore::AXObjectCache::handleActiveDescendantChanged):
(WebCore::AXObjectCache::handleAriaRoleChanged):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::handleAriaModalChange):
(WebCore::AXObjectCache::labelChanged):

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::checkedStateChanged):
(WebCore::AXObjectCache::handleActiveDescendantChanged):
(WebCore::AXObjectCache::handleAriaExpandedChange):
(WebCore::AXObjectCache::handleAriaRoleChanged):
(WebCore::AXObjectCache::handleAriaModalChange):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::selectedChildrenChanged):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):

  • dom/Element.cpp:

(WebCore::Element::attributeChanged):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setChecked):

LayoutTests:

Reviewed by Chris Fleizach.

  • accessibility/crash-when-render-tree-is-not-clean.html: Added.
8:26 AM Changeset in webkit [216418] by mmaxfield@apple.com
  • 18 edits
    194 adds in trunk

Unprefix unicode-bidi CSS values
https://bugs.webkit.org/show_bug.cgi?id=171761

Reviewed by Simon Fraser.

Source/WebCore:

Create new values which parse to the same internal state as the
prefixed values.

Tests: fast/text/bidi-unprefix.html

imported/w3c/i18n/bidi/bidi-embed-001.html
imported/w3c/i18n/bidi/bidi-embed-002.html
imported/w3c/i18n/bidi/bidi-embed-003.html
imported/w3c/i18n/bidi/bidi-embed-004.html
imported/w3c/i18n/bidi/bidi-embed-005.html
imported/w3c/i18n/bidi/bidi-embed-006.html
imported/w3c/i18n/bidi/bidi-embed-007.html
imported/w3c/i18n/bidi/bidi-embed-008.html
imported/w3c/i18n/bidi/bidi-embed-009.html
imported/w3c/i18n/bidi/bidi-embed-010.html
imported/w3c/i18n/bidi/bidi-embed-011.html
imported/w3c/i18n/bidi/bidi-isolate-001.html
imported/w3c/i18n/bidi/bidi-isolate-002.html
imported/w3c/i18n/bidi/bidi-isolate-003.html
imported/w3c/i18n/bidi/bidi-isolate-004.html
imported/w3c/i18n/bidi/bidi-isolate-005.html
imported/w3c/i18n/bidi/bidi-isolate-006.html
imported/w3c/i18n/bidi/bidi-isolate-007.html
imported/w3c/i18n/bidi/bidi-isolate-008.html
imported/w3c/i18n/bidi/bidi-isolate-009.html
imported/w3c/i18n/bidi/bidi-isolate-010.html
imported/w3c/i18n/bidi/bidi-isolate-011.html
imported/w3c/i18n/bidi/bidi-isolate-override-001.html
imported/w3c/i18n/bidi/bidi-isolate-override-002.html
imported/w3c/i18n/bidi/bidi-isolate-override-003.html
imported/w3c/i18n/bidi/bidi-isolate-override-004.html
imported/w3c/i18n/bidi/bidi-isolate-override-005.html
imported/w3c/i18n/bidi/bidi-isolate-override-006.html
imported/w3c/i18n/bidi/bidi-isolate-override-007.html
imported/w3c/i18n/bidi/bidi-isolate-override-008.html
imported/w3c/i18n/bidi/bidi-isolate-override-009.html
imported/w3c/i18n/bidi/bidi-isolate-override-010.html
imported/w3c/i18n/bidi/bidi-isolate-override-011.html
imported/w3c/i18n/bidi/bidi-isolate-override-012.html
imported/w3c/i18n/bidi/bidi-normal-001.html
imported/w3c/i18n/bidi/bidi-normal-002.html
imported/w3c/i18n/bidi/bidi-normal-003.html
imported/w3c/i18n/bidi/bidi-normal-004.html
imported/w3c/i18n/bidi/bidi-normal-005.html
imported/w3c/i18n/bidi/bidi-normal-006.html
imported/w3c/i18n/bidi/bidi-normal-007.html
imported/w3c/i18n/bidi/bidi-normal-008.html
imported/w3c/i18n/bidi/bidi-normal-009.html
imported/w3c/i18n/bidi/bidi-normal-010.html
imported/w3c/i18n/bidi/bidi-normal-011.html
imported/w3c/i18n/bidi/bidi-override-001.html
imported/w3c/i18n/bidi/bidi-override-002.html
imported/w3c/i18n/bidi/bidi-override-003.html
imported/w3c/i18n/bidi/bidi-override-004.html
imported/w3c/i18n/bidi/bidi-override-005.html
imported/w3c/i18n/bidi/bidi-override-006.html
imported/w3c/i18n/bidi/bidi-override-007.html
imported/w3c/i18n/bidi/bidi-override-008.html
imported/w3c/i18n/bidi/bidi-override-009.html
imported/w3c/i18n/bidi/bidi-override-010.html
imported/w3c/i18n/bidi/bidi-override-011.html
imported/w3c/i18n/bidi/bidi-override-012.html
imported/w3c/i18n/bidi/bidi-plaintext-001.html
imported/w3c/i18n/bidi/bidi-plaintext-003.html
imported/w3c/i18n/bidi/bidi-plaintext-005.html
imported/w3c/i18n/bidi/bidi-plaintext-006.html
imported/w3c/i18n/bidi/bidi-plaintext-007.html
imported/w3c/i18n/bidi/bidi-plaintext-008.html
imported/w3c/i18n/bidi/bidi-plaintext-009.html
imported/w3c/i18n/bidi/bidi-plaintext-010.html
imported/w3c/i18n/bidi/bidi-plaintext-011.html
imported/w3c/i18n/bidi/bidi-table-001.html
imported/w3c/i18n/bidi/bidi-unset-001.html
imported/w3c/i18n/bidi/bidi-unset-002.html
imported/w3c/i18n/bidi/bidi-unset-003.html
imported/w3c/i18n/bidi/bidi-unset-004.html
imported/w3c/i18n/bidi/bidi-unset-005.html
imported/w3c/i18n/bidi/bidi-unset-006.html
imported/w3c/i18n/bidi/bidi-unset-007.html
imported/w3c/i18n/bidi/bidi-unset-008.html
imported/w3c/i18n/bidi/bidi-unset-009.html
imported/w3c/i18n/bidi/bidi-unset-010.html
imported/w3c/i18n/bidi/block-embed-001.html
imported/w3c/i18n/bidi/block-embed-002.html
imported/w3c/i18n/bidi/block-embed-003.html
imported/w3c/i18n/bidi/block-override-001.html
imported/w3c/i18n/bidi/block-override-002.html
imported/w3c/i18n/bidi/block-override-003.html
imported/w3c/i18n/bidi/block-override-004.html
imported/w3c/i18n/bidi/block-override-isolate-001.html
imported/w3c/i18n/bidi/block-override-isolate-002.html
imported/w3c/i18n/bidi/block-override-isolate-003.html
imported/w3c/i18n/bidi/block-override-isolate-004.html
imported/w3c/i18n/bidi/block-plaintext-001.html
imported/w3c/i18n/bidi/block-plaintext-002.html
imported/w3c/i18n/bidi/block-plaintext-003.html
imported/w3c/i18n/bidi/block-plaintext-004.html
imported/w3c/i18n/bidi/block-plaintext-005.html
imported/w3c/i18n/bidi/block-plaintext-006.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EUnicodeBidi):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/html.css:

(bdi, output):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • html/HTMLElement.cpp:

(WebCore::unicodeBidiAttributeForDirAuto):

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):

  • html/track/VTTCue.cpp:

(WebCore::VTTCueBox::applyCSSProperties):

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

Import W3C's internationalization tests from
https://www.w3.org/International/tests/repo/results/writing-modes-bidi

  • fast/css/default-bidi-css-rules-expected.txt: Updating expected results.
  • fast/css/default-bidi-css-rules.html: Ditto.
  • fast/css/unicode-bidi-computed-value-expected.txt: Ditto.
  • fast/css/unicode-bidi-computed-value.html: Ditto.
  • fast/text/bidi-unprefix-expected.txt: Added. Test unprefixing.
  • fast/text/bidi-unprefix.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-001-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-001.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-002-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-002.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-003-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-003.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-004-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-004.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-005-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-005.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-006-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-006.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-007-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-007.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-008-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-008.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-009-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-009.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-010-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-010.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-011-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-embed-011.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-001-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-001.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-002-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-002.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-003-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-003.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-004-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-004.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-005-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-005.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-006-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-006.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-007-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-007.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-008-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-008.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-009-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-009.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-010-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-010.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-011-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-011.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-001-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-001.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-002-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-002.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-003-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-003.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-004-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-004.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-005-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-005.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-006-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-006.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-007-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-007.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-008-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-008.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-009-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-009.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-010-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-010.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-011-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-011.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-012-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-isolate-override-012.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-001-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-001.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-002-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-002.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-003-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-003.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-004-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-004.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-005-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-005.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-006-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-006.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-007-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-007.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-008-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-008.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-009-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-009.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-010-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-010.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-011-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-normal-011.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-001-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-001.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-002-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-002.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-003-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-003.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-004-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-004.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-005-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-005.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-006-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-006.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-007-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-007.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-008-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-008.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-009-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-009.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-010-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-010.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-011-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-011.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-012-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-override-012.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-001-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-001.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-003-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-003.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-005-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-005.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-006-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-006.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-007-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-007.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-008-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-008.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-009-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-009.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-010-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-010.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-011-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-plaintext-011.html: Added.
  • imported/w3c/i18n/bidi/bidi-table-001-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-table-001.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-001-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-001.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-002-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-002.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-003-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-003.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-004-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-004.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-005-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-005.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-006-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-006.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-007-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-007.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-008-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-008.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-009-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-009.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-010-expected.html: Added.
  • imported/w3c/i18n/bidi/bidi-unset-010.html: Added.
  • imported/w3c/i18n/bidi/block-embed-001-expected.html: Added.
  • imported/w3c/i18n/bidi/block-embed-001.html: Added.
  • imported/w3c/i18n/bidi/block-embed-002-expected.html: Added.
  • imported/w3c/i18n/bidi/block-embed-002.html: Added.
  • imported/w3c/i18n/bidi/block-embed-003-expected.html: Added.
  • imported/w3c/i18n/bidi/block-embed-003.html: Added.
  • imported/w3c/i18n/bidi/block-override-001-expected.html: Added.
  • imported/w3c/i18n/bidi/block-override-001.html: Added.
  • imported/w3c/i18n/bidi/block-override-002-expected.html: Added.
  • imported/w3c/i18n/bidi/block-override-002.html: Added.
  • imported/w3c/i18n/bidi/block-override-003-expected.html: Added.
  • imported/w3c/i18n/bidi/block-override-003.html: Added.
  • imported/w3c/i18n/bidi/block-override-004-expected.html: Added.
  • imported/w3c/i18n/bidi/block-override-004.html: Added.
  • imported/w3c/i18n/bidi/block-override-isolate-001-expected.html: Added.
  • imported/w3c/i18n/bidi/block-override-isolate-001.html: Added.
  • imported/w3c/i18n/bidi/block-override-isolate-002-expected.html: Added.
  • imported/w3c/i18n/bidi/block-override-isolate-002.html: Added.
  • imported/w3c/i18n/bidi/block-override-isolate-003-expected.html: Added.
  • imported/w3c/i18n/bidi/block-override-isolate-003.html: Added.
  • imported/w3c/i18n/bidi/block-override-isolate-004-expected.html: Added.
  • imported/w3c/i18n/bidi/block-override-isolate-004.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-001-expected.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-001.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-002-expected.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-002.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-003-expected.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-003.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-004-expected.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-004.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-005-expected.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-005.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-006-expected.html: Added.
  • imported/w3c/i18n/bidi/block-plaintext-006.html: Added.
  • imported/w3c/i18n/bidi/resources/sileot-webfont.woff: Added.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
7:24 AM Changeset in webkit [216417] by Carlos Garcia Campos
  • 26 edits
    5 adds in releases/WebKitGTK/webkit-2.16

Merge r216294 - Restrict SVG filters to accessible security origins
https://bugs.webkit.org/show_bug.cgi?id=118689
<rdar://problem/27362159>

Reviewed by Brent Fulgham.

Source/WebCore:

Certain SVG filters should only be allowed to operate
on content that is has SecurityOrigin access to. Implement
this by including a flag in PaintInfo and LayerPaintingInfo,
and have RenderWidget make sure the documents have acceptable
SecurityOrigins as it goes to paint.

This could be used as the first step in a "safe painting"
strategy, allowing some content to be rendered into a
canvas or via the element() CSS function... but it is only
a small first step.

Test: http/tests/css/filters-on-iframes.html

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::paint):

  • platform/ScrollView.h:
  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::paint):

  • platform/Scrollbar.h:
  • platform/Widget.h:
  • platform/graphics/filters/FilterOperation.h:

(WebCore::FilterOperation::shouldBeRestrictedBySecurityOrigin):

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::hasFilterThatShouldBeRestrictedBySecurityOrigin):

  • platform/graphics/filters/FilterOperations.h:
  • platform/mac/WidgetMac.mm:

(WebCore::Widget::paint):

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::build):

  • rendering/FilterEffectRenderer.h:
  • rendering/PaintInfo.h:

(WebCore::PaintInfo::PaintInfo):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):

  • rendering/RenderLayer.h:
  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::paint):

  • rendering/RenderScrollbar.h:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paintContents):

Source/WebKit2:

Update parameter lists.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::paint):

  • WebProcess/Plugins/PluginView.h:

LayoutTests:

Add a test that shows safe frames, unsafe frames, and
then a safe frame that itself has an unsafe frame, to
show that the security requirements are being forwarded
down the tree.

  • http/tests/css/filters-on-iframes-expected.html: Added.
  • http/tests/css/filters-on-iframes.html: Added.
  • http/tests/css/resources/blank.html: Added.
  • http/tests/css/resources/references-external.html: Added.
  • http/tests/css/resources/solid-red.html: Added.
7:06 AM Changeset in webkit [216416] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216253 - ASSERTION FAILED: !frame().document()->inRenderTreeUpdate() in WebCore::FrameView::layout(bool)
https://bugs.webkit.org/show_bug.cgi?id=171717

Reviewed by Brent Fulgham.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkCompleted):

Don't allow frame load to complete in the middle of a render tree update. Instead delay the check.

7:05 AM Changeset in webkit [216415] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16

Merge r216246 - DRT's setAudioResultCallback() and IDBRequest::setResult() need to acquire the JSLock.
https://bugs.webkit.org/show_bug.cgi?id=171716
<rdar://problem/30878027>

Reviewed by Saam Barati.

Source/WebCore:

No new tests. This issue was caught by existing tests.

IDBRequest::setResult() needs to acquire the JSLock before calling toJS() (which
does JS conversion and therefore, potentially JS allocations).

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):

Tools:

setAudioResultCallback() needs to acquire the JSLock before calling toJS() (which
does JS conversion and therefore, potentially JS allocations) and accessing
methods of internal JS data structures (which may do JS invocation, etc).

  • DumpRenderTree/TestRunner.cpp:

(setAudioResultCallback):

7:03 AM Changeset in webkit [216414] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Tools

Merge r216241 - [GTK] TestController timeout source callback should return G_SOURCE_REMOVE
https://bugs.webkit.org/show_bug.cgi?id=171724

Reviewed by Michael Catanzaro.

It's currently returning CONTINUE which causes it to be called again even if the run loop has been stopped.

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:

(WTR::timeoutSource):

6:59 AM Changeset in webkit [216413] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216240 - [GStreamer] Do not report more errors after the first one
https://bugs.webkit.org/show_bug.cgi?id=171722

Reviewed by Xabier Rodriguez-Calvar.

We can receive several error messages for the same error from different elements. That's not expected by the
media source selection algorithm implementation. I don't know if didn't happen with previous versions of GST,
but since the upgrade to 1.10.4 several tests are failing because of this.

Fixes: media/video-error-does-not-exist.html

media/video-load-networkState.html
media/video-source-error.html
media/video-source-none-supported.html
media/video-source-moved.html

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Return early also when an error already occured.

6:58 AM Changeset in webkit [216412] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216239 - [GStreamer] Fix handling of gst errors in MediaPlayerPrivateGStreamer::handleMessage
https://bugs.webkit.org/show_bug.cgi?id=171721

Reviewed by Xabier Rodriguez-Calvar.

We are checking the GError only comparing the code, and ignoring the domain in some cases. Use g_error_matches()
in those cases instead of only checking the code.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

6:54 AM Changeset in webkit [216411] by Carlos Garcia Campos
  • 8 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216204 - REGRESSION (Safari 10.1): When 'transition' contains -ms-transform, transform-origin is also transitioned
https://bugs.webkit.org/show_bug.cgi?id=171250
<rdar://problem/31827243>

Reviewed by Geoffrey Garen.

Source/WebCore:

We were mapping unknown properties to 'all' animation. With this patch we ignore them instead.
The patch also implements roundtripping of unknown properties via CSSOM, matching Blink and Gecko.

Test: transitions/transition-unknown-property-ignore.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createTransitionPropertyValue):

Return the correct name for unknown properties.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationProperty):

Map any unknown property to AnimateUnknownProperty mode instead of falling back to the default of AnimateAll.
Save the unknown property name so we can roundtrip it properly.

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions):

Ignore AnimateUnknownProperty like AnimateNone.

  • platform/animation/Animation.h:

(WebCore::Animation::unknownProperty):
(WebCore::Animation::setUnknownProperty):

LayoutTests:

  • transitions/transition-unknown-property-ignore-expected.txt: Added.
  • transitions/transition-unknown-property-ignore.html: Added.
  • transitions/transitions-parsing-expected.txt:
  • transitions/transitions-parsing.html:

Update the roundtrip expectations for unknown properties. The new results match Blink and Gecko.

6:44 AM Changeset in webkit [216410] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216196 - Should never hit layout while updating the render tree.
https://bugs.webkit.org/show_bug.cgi?id=171643

Reviewed by Antti Koivisto.

Laying out a half-baked render tree is not a great idea. Especially considering
that layout (sadly) can mutate the render tree.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

6:40 AM Changeset in webkit [216409] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216188 - REGRESSION(STP): rgb() with calc() containing variables doesn't work
https://bugs.webkit.org/show_bug.cgi?id=169939

Reviewed by Zalan Bujtas.

Source/WebCore:

Added new test in fast/css/variables.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseValue):
Treat floats in calcs as integers when we can.

LayoutTests:

  • fast/css/variables/calc-float-to-int-expected.html: Added.
  • fast/css/variables/calc-float-to-int.html: Added.
6:39 AM Changeset in webkit [216408] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.16

Merge r216187 - Fix compilation with ICU 59.1
https://bugs.webkit.org/show_bug.cgi?id=171612

Reviewed by Mark Lam.

ICU 59.1 has broken source compatibility. Now it defines UChar as
char16_t, which does not allow automatic type conversion from unsigned
short in C++ code.

Source/JavaScriptCore:

  • API/JSStringRef.cpp:

(JSStringCreateWithCharacters):
(JSStringCreateWithCharactersNoCopy):
(JSStringGetCharactersPtr):

  • runtime/DateConversion.cpp:

(JSC::formatDateTime):

Source/WebKit2:

  • Shared/API/c/WKString.cpp:

(WKStringGetCharacters):

Tools:

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback):

6:33 AM Changeset in webkit [216407] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216159 - SearchInputType could end up with a mismatched renderer.
https://bugs.webkit.org/show_bug.cgi?id=171547
<rdar://problem/31935047>

Reviewed by Antti Koivisto.

Source/WebCore:

Normally we've got the correct renderer by the time we call into SearchInputType.
However, since HTMLInputElement::updateType() eagerly updates the type while the associated renderers are done lazily
(so we don't get them updated until after the next tree update), we could actually end up
with a mismatched renderer (e.g. through form submission).

Test: fast/forms/change-input-type-and-submit-form-crash.html

  • html/SearchInputType.cpp:

(WebCore::SearchInputType::addSearchResult):
(WebCore::SearchInputType::didSetValueByUserEdit):

LayoutTests:

  • fast/forms/change-input-type-and-submit-form-crash-expected.txt: Added.
  • fast/forms/change-input-type-and-submit-form-crash.html: Added.
6:32 AM Changeset in webkit [216406] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Tools

Merge r216350 - [GTK] Cannot sign in with new Google sign-in page
https://bugs.webkit.org/show_bug.cgi?id=171770

Unreviewed. This just adds a test.

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

6:32 AM Changeset in webkit [216405] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216343 - [GTK] Cannot sign in with new Google sign-in page
https://bugs.webkit.org/show_bug.cgi?id=171770

Reviewed by Carlos Garcia Campos.

Google's new authentication page does not work with the Firefox user
agent that's required to make various Google websites work. Special-case
accounts.google.com so that it receives our standard user agent.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):

6:32 AM Changeset in webkit [216404] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16

Merge r216139 - YouTube user agent quirk breaks new YouTube
https://bugs.webkit.org/show_bug.cgi?id=171603

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Our user agent quirk to make YouTube 360 work breaks the new YouTube UI, causing it to
attempt to use the obsolete custom elements v0 API. WebKit only supports the v1 API. We
have to remove this quirk.

Note this does not affect Safari as Apple ports don't use our user agent quirks.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):

Tools:

Remove the YouTube quirk test.

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

6:22 AM Changeset in webkit [216403] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216131 - RenderSearchField should not use isTextField() in SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT
https://bugs.webkit.org/show_bug.cgi?id=171608

Reviewed by Simon Fraser.

isTextField() is true for any generic single line text control.

  • rendering/RenderObject.h:

(WebCore::RenderObject::isSearchField):

  • rendering/RenderSearchField.h:
6:14 AM Changeset in webkit [216402] by Carlos Garcia Campos
  • 7 edits
    8 adds in releases/WebKitGTK/webkit-2.16/LayoutTests

Merge r216126 - Detach frame from document when entering page cache
https://bugs.webkit.org/show_bug.cgi?id=166774
<rdar://problem/29904368>

Reviewed by Chris Dumez.

  • TestExpectations: Unskip tests.
  • fast/history/page-cache-after-window-open-expected.txt: Update expected result.
  • fast/history/page-cache-after-window-open.html: Ditto.
  • fast/history/page-cache-with-opener-expected.txt: Ditto.
  • fast/history/page-cache-with-opener.html: Update test given its new expected behavior.
  • fast/history/resources/page-cache-window-with-opener.html: Ditto.
  • http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow-expected.txt: Added.
  • http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window3-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html: Added.
6:10 AM Changeset in webkit [216401] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216120 - Abandon the current load once the provisional loader detaches from the frame
https://bugs.webkit.org/show_bug.cgi?id=171577
<rdar://problem/31581227>

Source/WebCore:

Reviewed by Brent Fulgham and Brady Eidson.

We detach all child frames as part of setting our document loader to the provisional
document loader when committing a load for a frame. Detaching child frames invokes
the unload event handler on the child frames that can run arbitrary JavaScript script.
Among other things, such script can initiate a new load in the frame whose current
load is being committed. We should stop processing the current load as soon as we
detect that updating our document loader has started a new provisional load.

Test: fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::transitionToCommitted):

LayoutTests:

Reviewed by Brent Fulgham.

  • fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash-expected.txt: Added.
  • fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash.html: Added.
6:05 AM Changeset in webkit [216400] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216067 - [GStreamer] Dailymotion live stream videos don't play
https://bugs.webkit.org/show_bug.cgi?id=170767

Reviewed by Sergio Villar Senin.

The video shows a message saying that an error occurred and nothing is played. There are actually several
problems with dailymotion. The main issue is that URLs are redirected by the server, and GStreamer needs to
know the redirected URL. Once GStreamer knows the redirected URL the error message no longer appears, the video
starts but it always stops after a few seconds. This is because the source receives an early EOS while still
downloading the fragments. The reason of the early EOS is because dailymotion sends a wrong Content-Length header,
something that is expected to happen and we correctly handle that case when receiving the data, by updating the
size accordingly if the bytes received are longer than the expected content length. This particular case
doesn't work well with GStreamer automatic EOS handling, which is the default. At some point, GStreamer detects
that the bytes received are at least the expected ones and emits a GST_EVENT_EOS that the GstUriDownloader
handles finishing the download early. We should always disable automatic EOS, since we know when EOS actually
happens and we already call gst_app_src_end_of_stream(). This patch also emits a GST_EVENT_CUSTOM_DOWNSTREAM_STICKY
event to let GStreamer know about the HTTP headers sent and received.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init): Disable automatic EOS.
(webKitWebSrcGetProperty): Return the redirected URL in case of redirection.
(webKitWebSrcStart): Pass the ResourceRequest to the stream clients.
(webKitWebSrcQueryWithParent): Set the redirected URL in the query in case of redirection.
(webKitWebSrcSetUri): Clear also the redirected URL when setting a new URI.
(StreamingClient::StreamingClient): Use GRefPtr for the source and initialize the request too.
(StreamingClient::~StreamingClient): Remove explicit unref.
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived): Initialize the redirected URL in case of redirection. Create and push
the HTTP headers event.
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::accessControlCheckFailed):
(CachedResourceStreamingClient::loadFailed):
(ResourceHandleStreamingClient::ResourceHandleStreamingClient):
(ResourceHandleStreamingClient::didFail):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):

6:05 AM Changeset in webkit [216399] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216065 - [GTK] Crash at WebCore::ResourceHandle::clearClient() when streaming live video from dailymotion
https://bugs.webkit.org/show_bug.cgi?id=169725

Reviewed by Michael Catanzaro.

Make ResourceHandleStreamingClient refcounted and add an invalidate method to do the cleanup in the networking
thread while keeping a reference.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcStop): Call invalidate before reseting client pointer.
(webKitWebSrcStart): Ditto.
(ResourceHandleStreamingClient::ResourceHandleStreamingClient): Remove all cleanup code after the run loop run call.
(ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Just detach the thread.
(ResourceHandleStreamingClient::invalidate): Schedule a task on the networking thread to clean up and fiish the
run loop, protecting this.
(ResourceHandleStreamingClient::setDefersLoading): Protect this.
(ResourceHandleStreamingClient::didReceiveResponse): Do nothing if client was invalidated.
(ResourceHandleStreamingClient::didReceiveBuffer): Ditto.
(ResourceHandleStreamingClient::didFinishLoading): Ditto.

5:56 AM Changeset in webkit [216398] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216046 - Documents created using DOMParser.parseFromString should inherit their context document's origin / URL
https://bugs.webkit.org/show_bug.cgi?id=171499

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline web-platform-tests now that more checks are passing.

  • web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-expected.txt:

Source/WebCore:

Documents created using DOMParser.parseFromString should inherit their context document's
origin / URL:

Test: fast/dom/domparser-parsefromstring-origin.html

  • xml/DOMParser.cpp:

(WebCore::DOMParser::parseFromString):

LayoutTests:

Add layout test coverage. I have verified that this test passes in both Firefox and Chrome.

  • fast/dom/domparser-parsefromstring-origin-expected.txt: Added.
  • fast/dom/domparser-parsefromstring-origin.html: Added.
5:53 AM Changeset in webkit [216397] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216023 - Do not dispatch SVG load event in frameless documents
https://bugs.webkit.org/show_bug.cgi?id=171505
<rdar://problem/31799776>

Reviewed by Andreas Kling.

Source/WebCore:

We should not dispatch SVG load events in frameless documents. <https://trac.webkit.org/changeset/173028/webkit>
took care of most load events but forgot the SVG load event.

Test: fast/dom/domparser-parsefromstring-svg-load-event.html

  • dom/Document.cpp:

(WebCore::Document::implicitClose):

LayoutTests:

Add layout test coverage. I have verified that this test passes on both Firefox and Chrome.

  • fast/dom/domparser-parsefromstring-svg-load-event-expected.txt: Added.
  • fast/dom/domparser-parsefromstring-svg-load-event.html: Added.
5:45 AM Changeset in webkit [216396] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215976 - iBooks text can overlap, sometimes columns are shifted splitting words.
https://bugs.webkit.org/show_bug.cgi?id=171472
<rdar://problem/31096037>

Reviewed by Antti Koivisto.

Source/WebCore:

Instead of just checking if the glyph is taller than the line, we need to ensure that both the
ascent and the descent have enough space (this is for -webkit-line-box-contain: glyph).

Test: fast/text/simple-line-layout-glyph-overflows-line.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForText): compute the available space for the ascent/descent
and check them against the ceil-ed(see FontCascade::floatWidthForSimpleText) glyph min/max y.

LayoutTests:

  • fast/text/simple-line-layout-glyph-overflows-line-expected.html: Added.
  • fast/text/simple-line-layout-glyph-overflows-line.html: Added.
5:42 AM Changeset in webkit [216395] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215971 - Crash under WebCore::AccessibilityRenderObject::handleAriaExpandedChanged().
https://bugs.webkit.org/show_bug.cgi?id=171427
Source/WebCore:

rdar://problem/31863417

Reviewed by Brent Fulgham.

The AccessibilityRenderObject object might delete itself in handleAriaExpandedChanged() under the call
to the parentObject() method. This will cause a crash when accessing the object later in this method.
Protect the current object while executing arbitrary event code.

Test: accessibility/accessibility-crash-setattribute.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):

LayoutTests:

Reviewed by Brent Fulgham.

  • accessibility/accessibility-crash-setattribute-expected.txt: Added.
  • accessibility/accessibility-crash-setattribute.html: Added.
5:40 AM Changeset in webkit [216394] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215957 - App crashing: Dispatch queue: com.apple.root.user-interactive-qos / vBoxConvolve / WebCore::FEGaussianBlur::platformApplySoftware()
https://bugs.webkit.org/show_bug.cgi?id=171461
<rdar://problem/30534722>

Reviewed by Eric Carlson.

Source/WebCore:

We're getting reports of crashes in this function, caused by null or empty data being
passed to vImage. Guard against this, in a way that will ASSERT in debug builds if
anyone comes across it.

Test: css3/filters/blur-various-radii.html

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::accelerateBoxBlur): Return early if things don't look good.

LayoutTests:

Test a bunch of blurs a frame at a time.

  • css3/filters/blur-various-radii-expected.html: Added.
  • css3/filters/blur-various-radii.html: Added.
5:38 AM Changeset in webkit [216393] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.16

Merge r215940 - URLSearchParams should be reflective
https://bugs.webkit.org/show_bug.cgi?id=171345

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Merge https://github.com/w3c/web-platform-tests/pull/5736 to gain test
coverage.

  • web-platform-tests/url/urlsearchparams-constructor-expected.txt:
  • web-platform-tests/url/urlsearchparams-constructor.html:

Source/WebCore:

There was a bug in our implementation of [1] where we would replace
'+' with 0x20 *after* URL-decoding the string, instead of *before*.
This was causing us to replace URL-encoded '+' characters with 0x20.

[1] https://url.spec.whatwg.org/#concept-urlencoded-parser

No new tests, updated existing test.

  • platform/URLParser.cpp:
5:35 AM Changeset in webkit [216392] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.16/Source/bmalloc

Merge r215909 - bmalloc scavenger should know what page classes are allocating
https://bugs.webkit.org/show_bug.cgi?id=171384

Reviewed by Geoffrey Garen.

This change replaces m_isAllocatingPages with a per page class flag to track which page
classes are currently allocating. When scavenging, we skip page classes that are actively
allocating and come back to them on a subsequent pass. This reduces the amount of time it
takes for scavenger to free up pages as well as the total time it takes to handle all
page classes.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::concurrentScavenge):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeSmallPages):
(bmalloc::Heap::scavengeLargeObjects):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::deallocateLarge):

  • bmalloc/Heap.h:

(bmalloc::Heap::takeRequestedScavengerThreadQOSClass): Deleted.

  • bmalloc/VMHeap.h:

(bmalloc::VMHeap::deallocateSmallPage):

  • bmalloc/bmalloc.h:

(bmalloc::api::scavenge):

5:32 AM Changeset in webkit [216391] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215874 - Repeated layouts in Mail due to viewport units being used with auto-sizing
https://bugs.webkit.org/show_bug.cgi?id=171371
<rdar://problem/28780084>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: css3/viewport-percentage-lengths/vh-auto-size.html

Auto-sizing code would adjust the size of the view in the beginning of layout(). This would
end up invalidating style for elements that use vh units and we would perform main layout
with unclean style. This would result in endless layout loops and hit assert on debug.

  • page/FrameView.cpp:

(WebCore::FrameView::availableContentSizeChanged):

Ensure we heve clean style after resize if we are in pre-layout.

LayoutTests:

  • css3/viewport-percentage-lengths/vh-auto-size-expected.html: Added.
  • css3/viewport-percentage-lengths/vh-auto-size.html: Added.
5:30 AM Changeset in webkit [216390] by Carlos Garcia Campos
  • 2 edits
    1 add
    2 deletes in releases/WebKitGTK/webkit-2.16/Source/WebInspectorUI

Merge r216356 - [GTK] Web Inspector: Add new GTK+ icon for timeline recording stopwatch
https://bugs.webkit.org/show_bug.cgi?id=154088

Patch by Fujii Hironori <Fujii Hironori> on 2017-05-08
Reviewed by Carlos Garcia Campos.

Add a free icon and remove some unused ones for the Web Inspector
in GTK+.

  • UserInterface/Images/gtk/Stopwatch.png: Removed.
  • UserInterface/Images/gtk/Stopwatch.svg: Added.
  • UserInterface/Images/gtk/Stopwatch@2x.png: Removed.
  • UserInterface/Views/TimelineIcons.css:

(body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon): Deleted.

5:30 AM Changeset in webkit [216389] by Carlos Garcia Campos
  • 1 edit
    1 delete in releases/WebKitGTK/webkit-2.16/Source/WebInspectorUI

Merge r216064 - [GTK] Web Inspector: Remove GTK+ icon FontVariantSmallCaps.svg
https://bugs.webkit.org/show_bug.cgi?id=171542

Patch by Fujii Hironori <Fujii Hironori> on 2017-05-02
Reviewed by Carlos Garcia Campos.

This image is not used and Apple's one was removed in Bug 148720.

  • UserInterface/Images/gtk/FontVariantSmallCaps.svg: Removed.
5:30 AM Changeset in webkit [216388] by Carlos Garcia Campos
  • 1 edit
    2 deletes in releases/WebKitGTK/webkit-2.16/Source/WebInspectorUI

Merge r216063 - [GTK] Web Inspector: Remove GTK+ icons AnimationPlayStatePaused.svg and AnimationPlayStateRunning.svg
https://bugs.webkit.org/show_bug.cgi?id=171540

Patch by Fujii Hironori <Fujii Hironori> on 2017-05-02
Reviewed by Carlos Garcia Campos.

These images aren't used since r204152 (Bug 160566). Instead,
Plus13.svg and Minus.svg are used.

  • UserInterface/Images/gtk/BreakpointActionAdd.svg: Removed.
  • UserInterface/Images/gtk/BreakpointActionRemove.svg: Removed.
5:30 AM Changeset in webkit [216387] by Carlos Garcia Campos
  • 2 edits
    6 adds
    14 deletes in releases/WebKitGTK/webkit-2.16/Source/WebInspectorUI

Merge r215869 - [GTK] Web Inspector: Add new GTK+ icons for instrument icons
https://bugs.webkit.org/show_bug.cgi?id=153892
<rdar://problem/24510460>

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-27
Reviewed by Joseph Pecoraro.

Add more free icons from art-libre symbolic and removed some
unused ones for the Web Inspector in GTK+.

  • UserInterface/Images/gtk/Colors.png: Removed.
  • UserInterface/Images/gtk/Colors@2x.png: Removed.
  • UserInterface/Images/gtk/ColorsLarge.png: Removed.
  • UserInterface/Images/gtk/ColorsLarge@2x.png: Removed.
  • UserInterface/Images/gtk/Frames.png: Removed.
  • UserInterface/Images/gtk/Frames@2x.png: Removed.
  • UserInterface/Images/gtk/HeapAllocationsInstrument.svg: Added.
  • UserInterface/Images/gtk/LayoutInstrument.svg: Added.
  • UserInterface/Images/gtk/MemoryInstrument.svg: Added.
  • UserInterface/Images/gtk/Network.png: Removed.
  • UserInterface/Images/gtk/Network@2x.png: Removed.
  • UserInterface/Images/gtk/NetworkInstrument.svg: Added.
  • UserInterface/Images/gtk/NetworkLarge.png: Removed.
  • UserInterface/Images/gtk/NetworkLarge@2x.png: Removed.
  • UserInterface/Images/gtk/RenderingFramesInstrument.svg: Added.
  • UserInterface/Images/gtk/Script.png: Removed.
  • UserInterface/Images/gtk/Script@2x.png: Removed.
  • UserInterface/Images/gtk/ScriptLarge.png: Removed.
  • UserInterface/Images/gtk/ScriptLarge@2x.png: Removed.
  • UserInterface/Images/gtk/ScriptsInstrument.svg: Added.
  • UserInterface/Views/TimelineIcons.css:

(body:not(.mac-platform, .windows-platform) .network-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .network-icon.large .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .layout-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .layout-icon.large .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .script-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .script-icon.large .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .rendering-frame-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .memory-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon): Deleted.

4:50 AM Changeset in webkit [216386] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebInspectorUI

Merge r215868 - [GTK] Web Inspector: gtk/NavigationItemCurleyBraces.svg is licensed under NonCommercial CC
https://bugs.webkit.org/show_bug.cgi?id=170902

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-27
Reviewed by Michael Catanzaro.

  • UserInterface/Images/gtk/NavigationItemCurleyBraces.svg:

Replaced with new one created by me.

4:50 AM Changeset in webkit [216385] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebInspectorUI

Merge r215867 - [GTK] Web Inspector: some SVG images are specified 'currentColor' incorrectly
https://bugs.webkit.org/show_bug.cgi?id=170977

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-27
Reviewed by Michael Catanzaro.

The keyword 'currentColor' is specifed manually in Bug 150602.
But, some SVG images are specified incorrectly.

  • UserInterface/Images/gtk/NavigationItemTypes.svg: Do not stroke

with currentColor, but fill.

  • UserInterface/Images/gtk/UpDownArrows.svg: Ditto.
4:20 AM Changeset in webkit [216384] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215861 - Text gets cut off when bailing out of simple line layout with widows.
https://bugs.webkit.org/show_bug.cgi?id=171370
<rdar://problem/31563414>

Reviewed by Antti Koivisto.

Source/WebCore:

Normal line layout requires an extra layout to handle widows. See RenderBlockFlow::relayoutToAvoidWidows.

Test: fast/multicol/simple-line-layout-widows-when-switching-over-to-normal-line-layout.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::ensureLineBoxes):

LayoutTests:

  • fast/multicol/simple-line-layout-widows-when-switching-over-to-normal-line-layout-expected.html: Added.
  • fast/multicol/simple-line-layout-widows-when-switching-over-to-normal-line-layout.html: Added.
4:07 AM Changeset in webkit [216383] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215805 - Forced page break on :after triggers infinite loop in column balancing
https://bugs.webkit.org/show_bug.cgi?id=171309
rdar://problem/26285884

Reviewed by David Hyatt.

Source/WebCore:

Stop trying to balance the columns when the forced page breaks >= the number of
columns even when this number is 1. Content will always overflow to the next page.
see https://chromium.googlesource.com/chromium/src/+/fbbebf38cefb2712c912581eccb046ef363ec84e%5E%21/#F2

Test: fast/multicol/infinite-loop-when-forced-break.html

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::calculateBalancedHeight):

LayoutTests:

  • fast/multicol/infinite-loop-when-forced-break-expected.txt: Added.
  • fast/multicol/infinite-loop-when-forced-break.html: Added.
4:03 AM Changeset in webkit [216382] by Carlos Garcia Campos
  • 6 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r215790 - REGRESSION(206450): WebKit2PlatformMouseEvent m_modifierFlags not set
https://bugs.webkit.org/show_bug.cgi?id=171297
<rdar://problem/31530719>

Reviewed by Geoffrey Garen.

Source/WebKit2:

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):

Tools:

  • TestWebKitAPI/PlatformWebView.h:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/EventModifiers.cpp: Added.

(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::mouseDidMoveOverElement):
(TestWebKitAPI::setClients):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/mac/PlatformWebViewMac.mm:

(TestWebKitAPI::PlatformWebView::simulateRightClick):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):

4:01 AM Changeset in webkit [216381] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215787 - Relax the event firing ASSERT for Attr changes
https://bugs.webkit.org/show_bug.cgi?id=171236
<rdar://problem/30516349>

Reviewed by Dean Jackson.

Source/WebCore:

The assertions added in Bug 167318 were overly strict, and trigger for valid behavior.
Relax the assertion preventing event dispatch for the case of Attr elements at the
end of childrenChanged.

Test: fast/dom/HTMLLinkElement/event-while-removing-attribute.html

  • dom/Attr.cpp:

(WebCore::Attr::childrenChanged):

LayoutTests:

  • fast/dom/HTMLLinkElement/event-while-removing-attribute-expected.txt: Added.
  • fast/dom/HTMLLinkElement/event-while-removing-attribute.html: Added.
3:57 AM Changeset in webkit [216380] by Carlos Garcia Campos
  • 6 edits
    3 adds in releases/WebKitGTK/webkit-2.16

Merge r215784 - Limit allowed size of document.title to avoid locking WebKit clients
https://bugs.webkit.org/show_bug.cgi?id=165113
<rdar://problem/28324389>

Reviewed by Darin Adler.

Source/WebKit/mac:

When a web application attempts to set an extremely long title, truncate the
title to a more reasonable size.

We do this at at the presentation layer, rather than in the DOM, so that we do
not affect script function. Instead, we merely limit display to a level that is
reasonable for normal GUI widgets. Anything else needs to be truncated in the UI
layer, so it is a waste of effort to send across IPC.

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDidReceiveTitle):

Source/WebKit2:

When a web application attempts to set an extremely long title, truncate the
title to a more reasonable size.

We do this at at the presentation layer, rather than in the DOM, so that we do
not affect script function. Instead, we merely limit display to a level that is
reasonable for normal GUI widgets. Anything else needs to be truncated in the UI
layer, so it is a waste of effort to send across IPC.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
  • TestWebKitAPI/Tests/WebKit2/LimitTitleSize.cpp: Added.
  • TestWebKitAPI/Tests/WebKit2/set-long-title.html: Added.
  • TestWebKitAPI/Tests/mac/LimitTitleSize.mm: Added.
3:38 AM Changeset in webkit [216379] by Carlos Garcia Campos
  • 10 edits
    3 adds in releases/WebKitGTK/webkit-2.16

Merge r215736 - Content-Disposition header filename is ignored when 'download' attribute is specified in HTML
https://bugs.webkit.org/show_bug.cgi?id=171239
<rdar://problem/31789855>

Reviewed by Alex Christensen.

Source/WebCore:

Add isAttachmentWithFilename() utility method to ResourceResponse to implement:

Test: http/tests/download/anchor-download-attribute-content-disposition.html

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::isAttachmentWithFilename):

  • platform/network/ResourceResponseBase.h:

Source/WebKit2:

Content-Disposition header filename is ignored when 'download' attribute is specified in HTML.
This is not as per HTML specification:

Content-Disposition header filename is supposed to override the value of the download attribute.

Firefox and Chrome follow the specification.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::findPendingDownloadLocation):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::didReceiveResponse):

LayoutTests:

  • http/tests/security/anchor-download-allow-sameorigin.html:

Stop using attachment.php as resource for this download attribute test because attachment.php
returns a Content-Disposition header with a filename. Given the behavior change in this patch,
this resource is no longer suitable for testing the download attribute.

  • http/tests/download/anchor-download-attribute-content-disposition-expected.txt: Added.
  • http/tests/download/anchor-download-attribute-content-disposition.html: Added.
  • http/tests/download/resources/content-disposition-pass.php: Added.

Add layout test coverage.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:

Skip new test on platforms where the download attribute is not supported.

3:23 AM Changeset in webkit [216378] by Carlos Garcia Campos
  • 5 edits
    4 adds in releases/WebKitGTK/webkit-2.16

Merge r215660 - REGRESSION(r205374): <li> content inside <ul> should mid-word wrap when word-break: break-word is present.
https://bugs.webkit.org/show_bug.cgi?id=171108
<rdar://problem/30271747>

Reviewed by Dan Bernstein.

Source/WebCore:

This patch ensures that we search for mid-word breaks when a zero sized element has been committed on the line
unless it's an image or some other replaced element with special properties (e.g. list-style: inside).

Tests: fast/replaced/ul-li-word-break-break-word.html

fast/replaced/zero-width-image-force-linebreak.html

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::handleText): This matches pre-r205374 behaviour, but it's explicit about whether a
replaced width has already been committed on the current line.

  • rendering/line/LineWidth.cpp:

(WebCore::LineWidth::commit):

  • rendering/line/LineWidth.h:

(WebCore::LineWidth::hasCommittedReplaced):
(WebCore::LineWidth::addUncommittedReplacedWidth): These 2 last functions were removed with r205374 (and now I am adding them back).

LayoutTests:

  • fast/replaced/ul-li-word-break-break-word-expected.html: Added.
  • fast/replaced/ul-li-word-break-break-word.html: Added.
  • fast/replaced/zero-width-image-force-linebreak-expected.html: Added.
  • fast/replaced/zero-width-image-force-linebreak.html: Added.
3:17 AM Changeset in webkit [216377] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/LayoutTests

Unreviewed. Fix expectations of fast/events/drag-and-drop-link-containing-block.html.

  • platform/gtk/TestExpectations:
3:17 AM Changeset in webkit [216376] by Carlos Garcia Campos
  • 24 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215648 - Regression(r206240): XMLSerializer.serializeToString() does not properly escape '<' / '>' in attribute values
https://bugs.webkit.org/show_bug.cgi?id=171132
<rdar://problem/31426752>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Re-sync web-platform-tests/domparsing from upstream.

  • web-platform-tests/domparsing/DOMParser-parseFromString-html.html:
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-doctype.html:
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml.html:
  • web-platform-tests/domparsing/XMLSerializer-serializeToString.html:
  • web-platform-tests/domparsing/createContextualFragment.html:
  • web-platform-tests/domparsing/innerhtml-01.xhtml:
  • web-platform-tests/domparsing/innerhtml-03.xhtml:
  • web-platform-tests/domparsing/innerhtml-04.html:
  • web-platform-tests/domparsing/innerhtml-05.xhtml:
  • web-platform-tests/domparsing/innerhtml-06.html:
  • web-platform-tests/domparsing/innerhtml-07.html:
  • web-platform-tests/domparsing/insert-adjacent.html:
  • web-platform-tests/domparsing/insert_adjacent_html-xhtml.xhtml:
  • web-platform-tests/domparsing/insert_adjacent_html.html:
  • web-platform-tests/domparsing/outerhtml-01.html:
  • web-platform-tests/domparsing/outerhtml-02.html:
  • web-platform-tests/domparsing/style_attribute_html.html:
  • web-platform-tests/domparsing/w3c-import.log:
  • web-platform-tests/domparsing/xml-serialization.xhtml:

Source/WebCore:

Use XMLSerialization [1] in MarkupAccumulator::appendAttribute() when inXMLFragmentSerialization()
returns true, even if the node's associated document is an HTML document. When XMLSerializer.serializeToString()
is called on a Node, we want XML serialization, even if the node comes from an HTML document.

[1] https://w3c.github.io/DOM-Parsing/#dfn-xml-serialization

Test: fast/dom/XMLSerializer-serializeToString-entities.html

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::appendAttributeValue):
(WebCore::MarkupAccumulator::appendAttribute):

  • editing/MarkupAccumulator.h:

LayoutTests:

Add layout test coverage. This test is passing in both Firefox and Chrome.

  • fast/dom/XMLSerializer-serializeToString-entities-expected.txt: Added.
  • fast/dom/XMLSerializer-serializeToString-entities.html: Added.
3:11 AM Changeset in webkit [216375] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215632 - Validate vImage arguments
https://bugs.webkit.org/show_bug.cgi?id=171109
Source/WebCore:

rdar://problem/30236606

Patch by Per Arne Vollan <pvollan@apple.com> on 2017-04-21
Reviewed by Brent Fulgham.

When writing data to a canvas context, clip the source rectangle to the data rectangle
to make sure we will not attempt to read data outside of the buffer.

Test: fast/canvas/canvas-crash.html

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::putImageData):

LayoutTests:

Patch by Per Arne Vollan <pvollan@apple.com> on 2017-04-21
Reviewed by Brent Fulgham.

  • fast/canvas/canvas-crash-expected.txt: Added.
  • fast/canvas/canvas-crash.html: Added.
2:36 AM Changeset in webkit [216374] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of several tests.

  • platform/gtk/TestExpectations:
2:22 AM Changeset in webkit [216373] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215613 - Do not paint the border of the box if the dirty region does not intersect with border area
https://bugs.webkit.org/show_bug.cgi?id=170988

Reviewed by Simon Fraser.

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

  • platform/graphics/GeometryUtilities.cpp:

(WebCore::ellipseContainsPoint):
Checks if a point is within an ellipse.

  • platform/graphics/GeometryUtilities.h:

Replace header-guards with #pragma once.

  • platform/graphics/RoundedRect.cpp:

(WebCore::RoundedRect::contains):
Implemented to know the dirty rectangle intersects with rounded rectangle or not.

  • platform/graphics/RoundedRect.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintBorder):
When typing in decorated text box, the dirty rect generated only for the
inside of the text box, not for the decorations. So we can avoid the
calculations to draw borders if the inner border totally covers the
target surface. It will optimize the rendering process since we don't
have to render border decorations whenever we type somethings in side of
the text input element.

2:10 AM Changeset in webkit [216372] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215581 - Inline anchor elements cannot be dragged when starting the drag from a block descendant
https://bugs.webkit.org/show_bug.cgi?id=171062
<rdar://problem/31697835>

Reviewed by Tim Horton.

Source/WebCore:

Tweaks DragController::draggableElement to traverse the DOM instead of the render tree when finding a draggable
element. This prevents us from skipping elements that are in the DOM ancestor chain, but appear as siblings to
the hit-tested node's renderer in the render tree.

There was also previously a check to ensure that we skip anonymous RenderObjects while traversing up the chain,
but this is no longer necessary fter this change, since all the elements we traverse in the DOM should have
renderers that are not anonymous.

Test: fast/events/drag-and-drop-link-containing-block.html

  • page/DragController.cpp:

(WebCore::DragController::draggableElement):

LayoutTests:

Adds a new test on WK1 Mac to verify that link dragging succeeds when the link's anchor element is inline and
the drag is started from a block element under the link.

  • fast/events/drag-and-drop-link-containing-block-expected.txt: Added.
  • fast/events/drag-and-drop-link-containing-block.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:

Skip the test on iOS and Mac WK2.

2:04 AM Changeset in webkit [216371] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r215567 - Fix assertions in webProcessProxyFromConnection
https://bugs.webkit.org/show_bug.cgi?id=171025
<rdar://problem/31184073>

Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-20
Reviewed by Brady Eidson.

  • UIProcess/WebProcessPool.cpp:

(WebKit::webProcessProxyFromConnection):
If we have a Connection, then we have a valid process attached to that connection,
unless it's a Connection to a different type of child process.
Calling ChildProcessProxy::connection on other web processes that are in State::Launching,
then we get an assertion. Luckily, ChildProcessProxy::hasConnection was introduced in r210861
for this reason.

2:00 AM Changeset in webkit [216370] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215535 - Parsing large XML strings fails
https://bugs.webkit.org/show_bug.cgi?id=170999
<rdar://problem/17336267>

Reviewed by Brady Eidson.

Source/WebCore:

Test: fast/dom/xml-large.html

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLParserContext::createStringParser):
(WebCore::XMLParserContext::createMemoryParser):
Allow huge XML strings. They work fine in Chrome and Firefox.

LayoutTests:

  • fast/dom/xml-large-expected.txt: Added.
  • fast/dom/xml-large.html: Added.
1:58 AM Changeset in webkit [216369] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215528 - ASAN Crash running LayoutTests/inspector/worker tests
https://bugs.webkit.org/show_bug.cgi?id=170967
<rdar://problem/31256437>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-19
Reviewed by Alex Christensen.

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):
Make the MessagingProxy thread safe ref counted. Since it used to
delete itself, turn this into a ref (implicit on construction)
and deref (replacing delete this).

(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
When dispatching have the lambda implicitly ref/deref with the
lambda to keep the proxy alive while a lambda is queued.

1:56 AM Changeset in webkit [216368] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215513 - Remove bogus assert for :not.
https://bugs.webkit.org/show_bug.cgi?id=170995
<rdar://problem/29693115>

Reviewed by Zalan Bujtas.

  • css/parser/CSSSelectorParser.cpp:
1:55 AM Changeset in webkit [216367] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r215508 - [GTK] WebKitAutocleanups.h regression in v2.16.1 release
https://bugs.webkit.org/show_bug.cgi?id=170987

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-04-19
Reviewed by Carlos Garcia Campos.

  • UIProcess/API/gtk/WebKitAutocleanups.h: Remove stray semicolon.
1:54 AM Changeset in webkit [216366] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215507 - Avoid repaints for invisible animations on tumblr.com/search/aww
https://bugs.webkit.org/show_bug.cgi?id=170986
<rdar://problem/28644580>

Reviewed by Andreas Kling.

Source/WebCore:

Test: fast/repaint/mutate-non-visible.html

  • rendering/style/RenderStyle.cpp:

(WebCore::requiresPainting):
(WebCore::RenderStyle::changeRequiresRepaint):

If an element is invisible it does not require repaint even if something else changes.

LayoutTests:

  • fast/repaint/mutate-non-visible-expected.txt: Added.
  • fast/repaint/mutate-non-visible.html: Added.
1:51 AM Changeset in webkit [216365] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215487 - 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):

1:47 AM Changeset in webkit [216364] by Carlos Garcia Campos
  • 15 edits
    4 adds in releases/WebKitGTK/webkit-2.16

Merge r215486 - 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.
1:24 AM Changeset in webkit [216363] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r215516 - r211670 broke double to int conversion.
https://bugs.webkit.org/show_bug.cgi?id=170961

Reviewed by Mark Lam.

In this patch, we take a template parameter way.
While it reduces duplicate code, it effectively produces
optimized code for operationToInt32SensibleSlow,
and fixes kraken pbkdf2 regression on Linux.

And this patch also fixes undefined behavior by changing
int32_t to uint32_t. If exp is 31, missingOne is 1 << 31,
INT32_MIN. Thus missingOne - 1 will cause int32_t overflow,
and it is an undefined behavior.

  • runtime/MathCommon.cpp:

(JSC::operationToInt32SensibleSlow):

  • runtime/MathCommon.h:

(JSC::toInt32Internal):
(JSC::toInt32):

1:24 AM Changeset in webkit [216362] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215482 - 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):

1:02 AM Changeset in webkit [216361] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215465 - 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):

1:02 AM Changeset in webkit [216360] by Carlos Garcia Campos
  • 7 edits
    4 adds in releases/WebKitGTK/webkit-2.16

Merge r215404 - 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.
12:56 AM Changeset in webkit [216359] by jcraig@apple.com
  • 2 edits
    2 adds in trunk/Websites/webkit.org

2017-05-08 James Craig <jcraig@apple.com>

More demo files for prefers-reduced-motion post
https://bugs.webkit.org/show_bug.cgi?id=170663

Unreviewed.

  • blog-files/prefers-reduced-motion/jaws.gif: Added.
  • blog-files/prefers-reduced-motion/jaws.jpg: Added.
  • blog-files/prefers-reduced-motion/prm.htm: New animated GIF example.
12:33 AM Changeset in webkit [216358] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r214939 - [GTK+] PNG animations that should run once are not played at all
https://bugs.webkit.org/show_bug.cgi?id=170499

Reviewed by Carlos Garcia Campos.

The repetition count reported bu the PNGImageDecoder is wrong. It's returning m_playCount - 1, which
means 0 for the animations that need to be played once. Change it to return an appropriate value.

Covered by existent tests.

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

(WebCore::PNGImageDecoder::repetitionCount):

  • platform/image-decoders/png/PNGImageDecoder.h:
12:32 AM Changeset in webkit [216357] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215375 - 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.
12:11 AM Changeset in webkit [216356] by commit-queue@webkit.org
  • 2 edits
    1 add
    2 deletes in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Add new GTK+ icon for timeline recording stopwatch
https://bugs.webkit.org/show_bug.cgi?id=154088

Patch by Fujii Hironori <Fujii Hironori> on 2017-05-08
Reviewed by Carlos Garcia Campos.

Add a free icon and remove some unused ones for the Web Inspector
in GTK+.

  • UserInterface/Images/gtk/Stopwatch.png: Removed.
  • UserInterface/Images/gtk/Stopwatch.svg: Added.
  • UserInterface/Images/gtk/Stopwatch@2x.png: Removed.
  • UserInterface/Views/TimelineIcons.css:

(body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon): Deleted.

12:06 AM Changeset in webkit [216355] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215352 - Large negative animation-delays may not work depending on machine uptime
https://bugs.webkit.org/show_bug.cgi?id=166962
<rdar://problem/30091526>

Reviewed by Tim Horton.

Source/WebCore:

If you set a really negative animation delay, it would cause
AnimationBase::m_startTime to become negative, because the delay
value was "bigger" than monotonicallyIncreasingTime.

However, the state machine was using -1 to mean that the start time
hadn't yet been set. Classic cmarrin!

Replace all the special values with std::optional, and use nullopt
to mean the value doesn't exist yet.

Test: animations/large-negative-delay.html

  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::updateStateMachine):
(WebCore::AnimationBase::fireAnimationEventsIfNeeded):
(WebCore::AnimationBase::getTimeToNextEvent):
(WebCore::AnimationBase::freezeAtTime):
(WebCore::AnimationBase::getElapsedTime):

  • page/animation/AnimationBase.h: Use std::optional.

(WebCore::AnimationBase::paused):

LayoutTests:

  • animations/large-negative-delay-expected.txt: Added.
  • animations/large-negative-delay.html: Added.

May 7, 2017:

10:31 PM Changeset in webkit [216354] by commit-queue@webkit.org
  • 365 edits in trunk/LayoutTests/imported/w3c

Regenerate w3c-import.log files after r215670
https://bugs.webkit.org/show_bug.cgi?id=171210

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

Updating all w3c-import.log files of web-platform-tests.
Fixing some import expectations.
Fixing some tests to match the current import revision, only syntatic changes (meta annotations and links to resources).

  • resources/import-expectations.json:
  • web-platform-tests/WebCryptoAPI/OWNERS:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker.js: meta annotation changes.
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CBC.worker.js: Ditto for all crypto tests.
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-KW.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_HMAC.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CBC.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-GCM.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-KW.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_HMAC.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.js:
  • web-platform-tests/WebCryptoAPI/tools/generate.py:
  • web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker.js:
  • web-platform-tests/css/css-grid-1/grid-layout-properties.html:
  • web-platform-tests/css/selectors4/focus-within-009.html:
  • web-platform-tests/domparsing/DOMParser-parseFromString-html.html:
  • web-platform-tests/domparsing/createContextualFragment.html:
  • web-platform-tests/domparsing/innerhtml-01.xhtml:
  • web-platform-tests/domparsing/innerhtml-03.xhtml:
  • web-platform-tests/domparsing/innerhtml-04.html:
  • web-platform-tests/domparsing/innerhtml-05.xhtml:
  • web-platform-tests/domparsing/innerhtml-06.html:
  • web-platform-tests/domparsing/innerhtml-07.html:
  • web-platform-tests/domparsing/insert-adjacent.html:
  • web-platform-tests/domparsing/insert_adjacent_html.html:
  • web-platform-tests/domparsing/outerhtml-01.html:
  • web-platform-tests/domparsing/outerhtml-02.html:
  • web-platform-tests/domparsing/xml-serialization.xhtml:
5:01 PM Changeset in webkit [216353] by commit-queue@webkit.org
  • 7 edits in trunk

Set the Response.blob() type based on the content-type header value.
https://bugs.webkit.org/show_bug.cgi?id=170849

Patch by Ben Kelly <ben@wanderview.com> on 2017-05-07
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/response/response-consume-expected.txt:

Source/WebCore:

There are two problems to fix here:

  1. Currently the FetchResponse class only called updateContentType()

when first created even though all the headers were not available. This
patch calls updateContentType() again after the headers are populated.

  1. The fetch design requires propagating the normalized blob

type to FetchBodyConsumer as well. Currently this is only done if
Response.blob() is called after the body is completely loaded. If
we hit the consumeOnceLoadingFinished() path, then the type is not
passed. This is similar to what was happening in bug 171489 with
ReadableStream bodies. This patch sets the type on the
FetchBodyConsumer in consumeOnceLoadingFinished() as well.

Theses changes allow WebKit to pass the "Consume response's body: from
fetch to blob" case in the WPT response-consume.html test.

Test: http://w3c-test.org/fetch/api/response/response-consume.html

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didReceiveResponse): Modified to
call FetchBodyOwner::updateContentType() after filling m_headers.
(WebCore::FetchBody::consumeOnceLoadingFinished): Call
FetchBodyConsumer::setContentType() when being consumed as
a blob.

  • Modules/fetch/FetchBody.h: Modify consumeOnceLoadingFinished()

to take the content type string.

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::consumeOnceLoadingFinished): Pass
the content type string down to FetchBody so it can be
propagated to the FetchBodyConsumer.

2:23 PM Changeset in webkit [216352] by Simon Fraser
  • 11 edits
    6 adds in trunk

[iOS] REGRESSION (r209409): getBoundingClientRect is wrong for fixed-position elements in resize/orientationchange
https://bugs.webkit.org/show_bug.cgi?id=171140
Source/WebCore:

Reviewed by Sam Weinig.

WebPage::dynamicViewportSizeUpdate() is called during rotation, and does a layout which needs to have
an up-to-date layout viewport, since the layout viewport state is detectable in orientationchange and
resize events via fetching the client rect of fixed elements. Normally we send in the layout viewport
from the UI process, but in this case we need to compute one in the web process. So factor code
into FrameView to do the computation, called from both places.

Tests: fast/events/ios/rotation/layout-viewport-during-rotation.html

fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html

  • page/FrameView.cpp:

(WebCore::FrameView::computeUpdatedLayoutViewportRect):

  • page/FrameView.h:

Source/WebKit2:

rdar://problem/31765167

Reviewed by Sam Weinig.

WebPage::dynamicViewportSizeUpdate() is called during rotation, and does a layout which needs to have
an up-to-date layout viewport, since the layout viewport state is detectable in orientationchange and
resize events via fetching the client rect of fixed elements. Normally we send in the layout viewport
from the UI process, but in this case we need to compute one in the web process. So factor code
into FrameView to do the computation, called from both places.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):

  • UIProcess/ios/WKContentView.mm:

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

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::computeCustomFixedPositionRect):

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::dynamicViewportSizeUpdate):

LayoutTests:

Reviewed by Sam Weinig.

Tests that fetch the dimensions of a fixed element in resize and orientationchange handlers,
which is a proxy for reading the layout viewport.

  • fast/events/ios/rotation/layout-viewport-during-rotation-expected.txt: Added.
  • fast/events/ios/rotation/layout-viewport-during-rotation.html: Added.
  • fast/events/ios/rotation/layout-viewport-during-safari-type-rotation-expected.txt: Added.
  • fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html: Added.
  • fast/events/ios/rotation/resources/rotation-utils.js: Added.

(stringFromRect):
(accumulateLog):
(logFixedObject):
(logFixedAndViewports):
(doTest):

1:02 PM Changeset in webkit [216351] by Chris Dumez
  • 35 edits in trunk/Source/WebCore

Drop remaining uses of PassRefPtr in editing code
https://bugs.webkit.org/show_bug.cgi?id=171787

Reviewed by Darin Adler.

Drop remaining uses of PassRefPtr in editing code.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::timerFired):

  • editing/ApplyStyleCommand.cpp:

(WebCore::toIdentifier):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::didApplyCommand):
(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/CompositeEditCommand.h:
  • editing/Editor.cpp:

(WebCore::Editor::shouldInsertFragment):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::performCutOrCopy):
(WebCore::Editor::willWriteSelectionToPasteboard):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::isSelectionUngrammatical):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
(WebCore::Editor::markMisspellingsOrBadGrammar):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::changeBackToReplacedString):

  • editing/Editor.h:
  • editing/EditorCommand.cpp:

(WebCore::executeInsertFragment):
(WebCore::Editor::command):
(WebCore::Editor::Command::Command):

  • editing/FormatBlockCommand.cpp:

(WebCore::FormatBlockCommand::formatRange):

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::indentIntoBlockquote):
(WebCore::IndentOutdentCommand::outdentParagraph):

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::fixOrphanedListChild):
(WebCore::InsertListCommand::mergeWithNeighboringLists):
(WebCore::InsertListCommand::doApplyForSingleParagraph):
(WebCore::InsertListCommand::unlistifyParagraph):
(WebCore::InsertListCommand::listifyParagraph):

  • editing/InsertListCommand.h:
  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::InsertTextCommand):

  • editing/InsertTextCommand.h:

(WebCore::InsertTextCommand::createWithMarkerSupplier):

  • editing/MoveSelectionCommand.cpp:

(WebCore::MoveSelectionCommand::MoveSelectionCommand):

  • editing/MoveSelectionCommand.h:

(WebCore::MoveSelectionCommand::create):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::removeNodePreservingChildren):
(WebCore::ReplacementFragment::removeNode):
(WebCore::ReplacementFragment::insertNodeBefore):
(WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
(WebCore::ReplacementFragment::removeUnrenderedNodes):
(WebCore::ReplacementFragment::removeInterchangeNodes):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
(WebCore::removeHeadContents):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::insertAsListItems):

  • editing/ReplaceSelectionCommand.h:
  • editing/SpellChecker.cpp:

(WebCore::SpellCheckRequest::SpellCheckRequest):
(WebCore::SpellCheckRequest::create):
(WebCore::SpellChecker::canCheckAsynchronously):
(WebCore::SpellChecker::isCheckable):
(WebCore::SpellChecker::requestCheckingFor):
(WebCore::SpellChecker::invokeRequest):
(WebCore::SpellChecker::enqueueRequest):
(WebCore::SpellChecker::didCheck):

  • editing/SpellChecker.h:

(WebCore::SpellCheckRequest::checkingRange):
(WebCore::SpellCheckRequest::paragraphRange):

  • editing/TextCheckingHelper.cpp:

(WebCore::expandToParagraphBoundary):
(WebCore::TextCheckingParagraph::TextCheckingParagraph):
(WebCore::TextCheckingParagraph::expandRangeToNextEnd):
(WebCore::TextCheckingParagraph::rangeLength):
(WebCore::TextCheckingParagraph::paragraphRange):
(WebCore::TextCheckingParagraph::subrange):
(WebCore::TextCheckingParagraph::offsetTo):
(WebCore::TextCheckingParagraph::offsetAsRange):
(WebCore::TextCheckingParagraph::text):
(WebCore::TextCheckingParagraph::checkingStart):
(WebCore::TextCheckingParagraph::checkingEnd):
(WebCore::TextCheckingParagraph::checkingLength):
(WebCore::TextCheckingHelper::TextCheckingHelper):
(WebCore::TextCheckingHelper::findFirstMisspelling):
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
(WebCore::TextCheckingHelper::isUngrammatical):
(WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
(WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):

  • editing/TextCheckingHelper.h:
  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::typingAddedToOpenCommand):

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::replaceSelectionWithAttributedString):

  • editing/gtk/EditorGtk.cpp:

(WebCore::Editor::pasteWithPasteboard):

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::pasteWithPasteboard):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::replaceNodeFromPasteboard):

  • editing/win/EditorWin.cpp:

(WebCore::Editor::pasteWithPasteboard):
(WebCore::createFragmentFromPlatformData):

  • page/DragController.cpp:

(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::startDrag):

12:59 PM Changeset in webkit [216350] by Michael Catanzaro
  • 2 edits in trunk/Tools

[GTK] Cannot sign in with new Google sign-in page
https://bugs.webkit.org/show_bug.cgi?id=171770

Unreviewed. This just adds a test.

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

12:10 PM Changeset in webkit [216349] by commit-queue@webkit.org
  • 13 edits in trunk

[MediaStream] r216197 caused some webrtc tests to fail
https://bugs.webkit.org/show_bug.cgi?id=171728

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

Source/WebCore:

Covered by existing tests.

Rename MediaStream::endStream to MediaStream::endCaptureTracks and only stopping capture tracks.
Using it when Document is asked to stop media capture.

Adding the ability to have only one active capture source at a time in a WebProcess.
This is done by keeping in its related factory the active capture source.
When a new source is created and started, it replaces the active capture source which becomes muted.
Using that mechanism for iOS.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::endCaptureTracks):
(WebCore::MediaStream::endStream): Deleted.

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStreamTrack.h:

(WebCore::MediaStreamTrack::isCaptureTrack):

  • dom/Document.cpp:

(WebCore::Document::stopMediaCapture):

  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioCaptureSourceFactory::setActiveSource):
(WebCore::AVAudioCaptureSource::setupCaptureSession):

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSourceFactory::setActiveSource):
(WebCore::AVVideoCaptureSource::setupCaptureSession):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSourceFactory::setActiveSource):
(WebCore::CoreAudioSharedUnit::startProducingData):

Source/WebKit2:

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Removing muting streams of the page requesting
additional capture streams. This is now done in the WebProcess.

LayoutTests:

  • platform/ios-wk2/TestExpectations:
11:03 AM Changeset in webkit [216348] by timothy_horton@apple.com
  • 27 edits
    3 adds in trunk/Source

Clean up some WebProcessProxy, WebPage, and message handler includes
https://bugs.webkit.org/show_bug.cgi?id=171791

Reviewed by Sam Weinig.

This is worth another ~10% off WebKit2 clean build time on Mac.
This time, the most impactful change is the removal of
UserMediaPermissionRequestManager.h from WebPage.h, which completely
eradicates JSC's VM.h (which is enormous) from WebPage.h (at least on Mac).

  • Scripts/webkit/messages.py:

(headers_for_type):
Stop specializing CompositionUnderline now that it has its own file.

  • Shared/API/c/WKDeprecatedFunctions.cpp:
  • Shared/WebCoreArgumentCoders.cpp:
  • UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
  • UIProcess/Gamepad/UIGamepadProvider.cpp:
  • UIProcess/HiddenPageThrottlingAutoIncreasesCounter.h: Added.
  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
  • UIProcess/Network/NetworkProcessProxy.cpp:
  • UIProcess/PerActivityStateCPUUsageSampler.cpp:
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::toWebCore):

  • UIProcess/VisibleWebPageCounter.h: Added.
  • UIProcess/VisitedLinkStore.h:
  • UIProcess/WebPageGroup.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessLifetimeTracker.cpp:
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.h:

Remove WebPageProxy and forward-declare a whole bunch of things.

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::userMediaAccessWasGranted):
(WebKit::WebPage::userMediaAccessWasDenied):
(WebKit::WebPage::didCompleteMediaDeviceEnumeration):
(WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
(WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::userMediaPermissionRequestManager):

  • WebProcess/WebPage/ios/FindControllerIOS.mm:
  • WebProcess/WebPage/ios/WebPageIOS.mm:
  • WebProcess/WebPage/mac/RemoteLayerTreeContext.h:

(WebKit::RemoteLayerTreeContext::deviceScaleFactor): Deleted.
(WebKit::RemoteLayerTreeContext::layerHostingMode): Deleted.

  • WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::deviceScaleFactor):
(WebKit::RemoteLayerTreeContext::layerHostingMode):

  • WebCore.xcodeproj/project.pbxproj:
  • editing/CompositionUnderline.h: Added.

(WebCore::CompositionUnderline::CompositionUnderline):

  • editing/Editor.h:

(WebCore::CompositionUnderline::CompositionUnderline): Deleted.
Move CompositionUnderline out of Editor.h, so that other files can
include that without Editor.h (which is quite large). Also, modernize it slightly.

3:24 AM Changeset in webkit [216347] by commit-queue@webkit.org
  • 20 edits
    24 adds in trunk

Implement Subresource Integrity (SRI)
https://bugs.webkit.org/show_bug.cgi?id=148363
LayoutTests/imported/w3c:

Patch by Sam Weinig <sam@webkit.org> on 2017-05-07
Reviewed by Daniel Bates.

  • web-platform-tests/html/dom/reflection-metadata-expected.txt:
  • web-platform-tests/html/dom/reflection-misc-expected.txt:

Update results now that we support the reflected 'integrity' property.

Source/WebCore:

<rdar://problem/18945879>

Patch by Sam Weinig <sam@webkit.org> on 2017-05-07
Reviewed by Daniel Bates.

Tests: http/tests/subresource-integrity/sri-disabled-with-setting.html

http/tests/subresource-integrity/sri-enabled-with-setting.html
http/tests/subresource-integrity/sri-script-cors.html
http/tests/subresource-integrity/sri-style-cors.html

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

Add new files.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::create):
(WebCore::LoadableClassicScript::notifyFinished):

  • dom/LoadableClassicScript.h:
  • dom/LoadableScript.h:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestClassicScript):
Store integrity metadata in the script fetcher so it can be passed to
the checked when script load finishes.

  • html/HTMLAttributeNames.in:

Add 'integrity'.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):
When requesting a stylesheet, cache the integrity metadata so it can
be used when the load completes (accessing the attribute at load completion
time is incorrect, as a script might have changed the attributes value since
the request was made).

(WebCore::HTMLLinkElement::setCSSStyleSheet):
Add an integrity check using the cached integrity metadata when a load
finishes.

  • html/HTMLLinkElement.h:

Add cached integrity metadata member.

  • html/HTMLLinkElement.idl:
  • html/HTMLScriptElement.idl:

Add integrity property.

  • html/parser/HTMLParserIdioms.h:

(WebCore::isNotHTMLSpace):
Templatize isNotHTMLSpace so it can work for both UChar and LChar.

  • loader/ResourceCryptographicDigest.cpp:

(WebCore::parseCryptographicDigestImpl):
(WebCore::parseEncodedCryptographicDigestImpl):
(WebCore::parseEncodedCryptographicDigest):
(WebCore::decodeEncodedResourceCryptographicDigest):

  • loader/ResourceCryptographicDigest.h:

Add concept of an encoded digest to more closely model the spec so that hashes
that match the grammar but are invalid (say, mixing base64 and base64URL) make
it through the algorithm longer, and don't cause us to load something that should
be blocked.

  • loader/SubresourceIntegrity.cpp: Added.
  • loader/SubresourceIntegrity.h: Added.

Add implementation of Subresource Integrity metadata validation allowing
for a CachedResource and integrity metadata to be passed for validation.

  • page/Settings.in:

Add setting for Subresource Integrity, defaulted to enabled.

LayoutTests:

<rdar://problem/18945879>

Patch by Sam Weinig <sam@webkit.org> on 2017-05-07
Reviewed by Daniel Bates.

Add tests for Subresource Integrity based off the ones from Web
Platform Tests. They have been changed to:

  • Split <link> and <script> testing.
  • Add additional tests:
    • Integrity hashes using base64URL encoding.
    • Integrity hashes using mixed base64 and base64URL encoding.
    • Integrity metadata that does not conform to the grammar at all.
    • Multiple valid, but only one matching, integrity hashes.
    • Non-matching integrity hash with options.
  • Run one at a time, so console output is consistent.

We can/should upstream these changes, but this avoids the possibility that
an update of the imported web-platform-tests could cause these tests to fail.

Also adds tests that show the Subresource Integrity setting works correctly.

  • http/tests/subresource-integrity: Added.
  • http/tests/subresource-integrity/.htaccess: Added.
  • http/tests/subresource-integrity/resources: Added.
  • http/tests/subresource-integrity/resources/alternate.css: Added.
  • http/tests/subresource-integrity/resources/crossorigin-anon-script.js: Added.
  • http/tests/subresource-integrity/resources/crossorigin-anon-style.css: Added.
  • http/tests/subresource-integrity/resources/crossorigin-creds-script.js: Added.
  • http/tests/subresource-integrity/resources/crossorigin-creds-style.css: Added.
  • http/tests/subresource-integrity/resources/crossorigin-ineligible-script.js: Added.
  • http/tests/subresource-integrity/resources/crossorigin-ineligible-style.css: Added.
  • http/tests/subresource-integrity/resources/matching-digest.js: Added.
  • http/tests/subresource-integrity/resources/non-matching-digest.js: Added.
  • http/tests/subresource-integrity/resources/sri-utilities.js: Added.
  • http/tests/subresource-integrity/resources/style.css: Added.
  • http/tests/subresource-integrity/sri-disabled-with-setting-expected.txt: Added.
  • http/tests/subresource-integrity/sri-disabled-with-setting.html: Added.
  • http/tests/subresource-integrity/sri-enabled-with-setting-expected.txt: Added.
  • http/tests/subresource-integrity/sri-enabled-with-setting.html: Added.
  • http/tests/subresource-integrity/sri-script-expected.txt: Added.
  • http/tests/subresource-integrity/sri-script.html: Added.
  • http/tests/subresource-integrity/sri-style-expected.txt: Added.
  • http/tests/subresource-integrity/sri-style.html: Added.
2:56 AM Changeset in webkit [216346] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215347 - Don't invalidate composition for style changes in non-composited layers
https://bugs.webkit.org/show_bug.cgi?id=170805
<rdar://problem/31606185>

Reviewed by Simon Fraser.

Source/WebCore:

Test: compositing/updates/animation-non-composited.html

In most cases they can't affect composition. Composition updates are expensive, this can
save a lot of work (tumblr.com animations hit this at the moment).

  • rendering/RenderElement.h:

(WebCore::RenderElement::createsGroup):
(WebCore::RenderElement::createsGroupForStyle):

Factor to a static function so we can test style directly.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::RenderLayerCompositor::styleChangeMayAffectIndirectCompositingReasons):

Test if style change might cause compositing change that can't be determined without compositing update.

  • rendering/RenderLayerCompositor.h:

LayoutTests:

  • compositing/updates/animation-non-composited-expected.txt: Added.
  • compositing/updates/animation-non-composited.html: Added.
2:45 AM Changeset in webkit [216345] by Carlos Garcia Campos
  • 26 edits
    4 adds
    2 deletes in releases/WebKitGTK/webkit-2.16

Merge r215315 - QuotaExceededError when saving to localStorage in private mode.
https://bugs.webkit.org/show_bug.cgi?id=157010

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by changes to existing test).

LocalStorage in private browsing is now effectively SessionStorage.
It's ephemeral, per-tab, and copied over to tabs window.open()'ed from the current.

  • loader/EmptyClients.cpp:

(WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):

  • page/Chrome.cpp:

(WebCore::Chrome::createWindow):

  • page/Page.cpp:

(WebCore::Page::ephemeralLocalStorage):
(WebCore::Page::setEphemeralLocalStorage):

  • page/Page.h:
  • page/SecurityOriginData.h:
  • storage/Storage.cpp:

(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
(WebCore::Storage::contains):
(WebCore::Storage::isDisabledByPrivateBrowsing): Deleted.

  • storage/StorageMap.h:
  • storage/StorageNamespaceProvider.cpp:

(WebCore::StorageNamespaceProvider::localStorageArea):

  • storage/StorageNamespaceProvider.h:
  • storage/StorageType.h:

(WebCore::isLocalStorage):
(WebCore::isPersistentLocalStorage):

Source/WebKit:

  • Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::close):

  • Storage/StorageNamespaceImpl.h:
  • Storage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace):

  • Storage/WebStorageNamespaceProvider.h:

Source/WebKit2:

  • WebProcess/Storage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::~StorageAreaMap):

  • WebProcess/Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::ephemeralLocalStorageArea):
(WebKit::StorageNamespaceImpl::copy):

  • WebProcess/Storage/StorageNamespaceImpl.h:
  • WebProcess/Storage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace):

  • WebProcess/Storage/WebStorageNamespaceProvider.h:

LayoutTests:

  • platform/mac-wk2/TestExpectations:
  • storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt:
  • storage/domstorage/localstorage/private-browsing-affects-storage.html:
  • storage/domstorage/localstorage/resources/private-browsing-1.html: Added.
  • storage/domstorage/localstorage/resources/private-browsing-2.html: Added.
  • storage/domstorage/localstorage/resources/private-browsing-3.html: Added.
  • storage/domstorage/localstorage/resources/private-browsing-storage-2.html: Added.
  • storage/domstorage/sessionstorage/private-browsing-affects-storage-expected.txt: Removed.
  • storage/domstorage/sessionstorage/private-browsing-affects-storage.html: Removed.
2:44 AM Changeset in webkit [216344] by Carlos Garcia Campos
  • 14 edits
    1 copy in releases/WebKitGTK/webkit-2.16/Source

Merge r214680 - Clean up the "StorageType" enum.
https://bugs.webkit.org/show_bug.cgi?id=170349

Reviewed by Tim Horton.

Source/WebCore:

  • Make this enum into an enum class
  • Add a new type specific for "transient local storage"

No new tests (No behavior change).

  • WebCore.xcodeproj/project.pbxproj:
  • inspector/InspectorDOMStorageAgent.cpp:

(WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):

  • inspector/InspectorInstrumentation.h:
  • loader/EmptyClients.cpp:
  • storage/Storage.cpp:

(WebCore::Storage::isDisabledByPrivateBrowsing):

  • storage/StorageArea.h:

(): Deleted.

  • storage/StorageEventDispatcher.cpp:

(WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):

  • storage/StorageType.h:

(WebCore::isLocalStorage):

Source/WebKit:

  • Storage/StorageAreaImpl.cpp:

(WebKit::StorageAreaImpl::dispatchStorageEvent):

  • Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::getOrCreateLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::close):

Source/WebKit2:

  • WebProcess/Storage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::dispatchStorageEvent):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):

  • WebProcess/Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):

2:29 AM Changeset in webkit [216343] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[GTK] Cannot sign in with new Google sign-in page
https://bugs.webkit.org/show_bug.cgi?id=171770

Reviewed by Carlos Garcia Campos.

Google's new authentication page does not work with the Firefox user
agent that's required to make various Google websites work. Special-case
accounts.google.com so that it receives our standard user agent.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):

May 6, 2017:

10:43 PM Changeset in webkit [216342] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

[Cocoa] CTFontDescriptorCreateMatchingFontDescriptor() is not case insensitive
https://bugs.webkit.org/show_bug.cgi?id=171636
<rdar://problem/30811218>

Reviewed by Dean Jackson.

Source/WebCore:

LastResort is the only name which needs to be looked up case-sensitively. We can handle
this in our existing function which handles special font names (like -apple-system) to
make sure that we always do the right thing.

Test: fast/text/lastResort.html

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::platformFontWithFamilySpecialCase):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::platformFontWithFamilySpecialCase):

  • platform/spi/cocoa/CoreTextSPI.h:

LayoutTests:

  • fast/text/lastResort-expected.html: Added.
  • fast/text/lastResort.html: Added.
10:18 PM Changeset in webkit [216341] by Chris Dumez
  • 4 edits
    2 adds in trunk

Implement the concept of cookie-averse document
https://bugs.webkit.org/show_bug.cgi?id=171746
<rdar://problem/32004466>

Reviewed by Sam Weinig.

Source/WebCore:

Implement the concept of cookie-averse document:

Test: fast/cookies/cookie-averse-document.html

  • dom/Document.cpp:

(WebCore::Document::isCookieAverse):
(WebCore::Document::cookie):
(WebCore::Document::setCookie):

  • dom/Document.h:

LayoutTests:

Add layout test coverage.

  • fast/cookies/cookie-averse-document-expected.txt: Added.
  • fast/cookies/cookie-averse-document.html: Added.
8:57 PM Changeset in webkit [216340] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r216339.

  • dom/Document.h:

(WebCore::Document::readyState):

8:48 PM Changeset in webkit [216339] by Chris Dumez
  • 32 edits in trunk

Align our IDL files with the latest DOM specification
https://bugs.webkit.org/show_bug.cgi?id=171777

Reviewed by Sam Weinig.

Source/WebCore:

Align our IDL files with the latest DOM specification:

No Web-facing behavior change. Things that do not match the specification
have been annotated with FIXME comments.

  • dom/CharacterData.idl:
  • dom/Comment.idl:
  • dom/CustomEvent.idl:
  • dom/DOMImplementation.idl:
  • dom/Document.cpp:
  • dom/Document.h:

(WebCore::Document::readyState):

  • dom/Document.idl:
  • dom/MutationObserver.idl:
  • dom/NamedNodeMap.idl:
  • dom/NodeFilter.idl:
  • dom/NodeIterator.idl:
  • dom/NodeList.idl:
  • dom/NonDocumentTypeChildNode.idl:
  • dom/ParentNode.idl:
  • dom/ProcessingInstruction.idl:
  • dom/Range.idl:
  • dom/ShadowRoot.idl:
  • dom/Text.idl:
  • dom/TreeWalker.idl:
  • html/DOMTokenList.idl:

Source/WebKit/mac:

Build fix.

  • DOM/DOMDocument.mm:

(-[DOMDocument readyState]):

Source/WebKit2:

GTK build fix.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:

(webkit_dom_document_get_ready_state):

LayoutTests:

Rebaseline a few tests.

  • fast/dom/Document/adoptNode-null-expected.txt:
  • fast/dom/Document/adoptNode-null.html:
  • fast/dom/Document/importNode-null-expected.txt:
  • fast/dom/Document/importNode-null.html:
  • fast/dom/Range/range-intersectsNode-expected.txt:
  • fast/text/text-combine-crash-expected.txt:
8:25 PM Changeset in webkit [216338] by timothy_horton@apple.com
  • 18 edits in trunk/Source

Reduce the number of includes in WebPage.h and WebProcess.h
https://bugs.webkit.org/show_bug.cgi?id=171779

Reviewed by Sam Weinig.

  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
  • WebProcess/Network/NetworkProcessConnection.cpp:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
  • WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
  • WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
  • WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
  • WebProcess/WebPage/FindController.cpp:
  • WebProcess/WebPage/WebFrame.cpp:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::disableEnumeratingAllNetworkInterfaces):
(WebKit::WebPage::enableEnumeratingAllNetworkInterfaces):
(WebKit::WebPage::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::disableEnumeratingAllNetworkInterfaces): Deleted.
(WebKit::WebPage::enableEnumeratingAllNetworkInterfaces): Deleted.

  • WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
  • WebProcess/WebProcess.cpp:
  • WebProcess/WebProcess.h:

In my measurement, this improves WebKit2 debug clean build time by
~10% for Mac and ~5% for iOS. The most valuable change is the one to
remove LibWebRTC headers..

  • page/TextIndicator.h:
8:18 PM Changeset in webkit [216337] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Mark http/tests/loading/resourceLoadStatistics/prevalent-resource-without-user-interaction.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=171785

  • platform/wk2/TestExpectations:
7:58 PM Changeset in webkit [216336] by ap@apple.com
  • 30 edits
    5 deletes in trunk

REGRESSION (r216294): The new test fails on WebKit1
https://bugs.webkit.org/show_bug.cgi?id=171780

Rolling back https://trac.webkit.org/r216294, https://trac.webkit.org/r216296,
https://trac.webkit.org/216299, https://trac.webkit.org/216330

Source/WebCore:

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::paint):

  • platform/ScrollView.h:
  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::paint):

  • platform/Scrollbar.h:
  • platform/Widget.h:
  • platform/graphics/filters/FilterOperation.h:

(WebCore::FilterOperation::movesPixels):
(WebCore::FilterOperation::shouldBeRestrictedBySecurityOrigin): Deleted.

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::hasFilterThatShouldBeRestrictedBySecurityOrigin): Deleted.

  • platform/graphics/filters/FilterOperations.h:
  • platform/gtk/WidgetGtk.cpp:

(WebCore::Widget::paint):

  • platform/ios/WidgetIOS.mm:

(WebCore::Widget::paint):

  • platform/mac/WidgetMac.mm:

(WebCore::Widget::paint):

  • platform/win/WidgetWin.cpp:

(WebCore::Widget::paint):

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::build):

  • rendering/FilterEffectRenderer.h:
  • rendering/PaintInfo.h:

(WebCore::PaintInfo::PaintInfo):
(): Deleted.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):

  • rendering/RenderLayer.h:
  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::paint):

  • rendering/RenderScrollbar.h:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paintContents):

Source/WebKit/win:

  • Plugins/PluginView.h:
  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::paint):

Source/WebKit2:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::paint):

  • WebProcess/Plugins/PluginView.h:

LayoutTests:

  • http/tests/css/filters-on-iframes-expected.html: Removed.
  • http/tests/css/filters-on-iframes.html: Removed.
  • http/tests/css/resources/blank.html: Removed.
  • http/tests/css/resources/references-external.html: Removed.
  • http/tests/css/resources/solid-red.html: Removed.
7:53 PM Changeset in webkit [216335] by Simon Fraser
  • 9 edits in trunk

[iOS WK2] Make rotation tests more reliable
https://bugs.webkit.org/show_bug.cgi?id=171778

Reviewed by Tim Horton.

Source/WebKit2:

Switching between "safari-style" rotation and normal rotation left state on the WKWebView
that would cause later viewport-sensitive tests to fail. The WKWebView would be left
with override layout parameters, and an override orientation, and these caused viewport
size to leak into later tests, and WebCore orientation to not get reset correctly.

Also, WKWebView was unregistering for UIWindowDidRotateNotification notifications when
an override orientation was set, and would never re-register, causing lost orientationchanged
events.

Fix by exposing WKWebView SPI to clear the various bits of overide state. Also don't unregister
from the UIWindowDidRotateNotification notification; it's already ignored anyway if it fires.

Also wait for a visible content rect update after resizing the WKWebVeiw between tests, to make sure
the WebProcess is caught up before proceeding with the test.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInterfaceOrientationOverride:]):
(-[WKWebView _clearInterfaceOrientationOverride]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _clearOverrideLayoutParameters]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Switching between "safari-style" rotation and normal rotation left state on the WKWebView
that would cause later viewport-sensitive tests to fail. The WKWebView would be left
with override layout parameters, and an override orientation, and these caused viewport
size to leak into later tests, and WebCore orientation to not get reset correctly.

Also, WKWebView was unregistering for UIWindowDidRotateNotification notifications when
an override orientation was set, and would never re-register, causing lost orientationchanged
events.

Fix by exposing WKWebView SPI to clear the various bits of overide state. Also don't unregister
from the UIWindowDidRotateNotification notification; it's already ignored anyway if it fires.

Also wait for a visible content rect update after resizing the WKWebVeiw between tests, to make sure
the WebProcess is caught up before proceeding with the test.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(-[PlatformWebViewController viewWillTransitionToSize:withTransitionCoordinator:]):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):
(WTR::TestController::platformConfigureViewForTest):

LayoutTests:

New baseline.

  • fast/events/ios/rotation/zz-no-rotation-expected.txt:
  • fast/events/ios/rotation/zz-no-rotation.html:
4:39 PM Changeset in webkit [216334] by Chris Dumez
  • 4 edits
    2 deletes in trunk

Unreviewed, rolling out r216333.

Caused layout test failures

Reverted changeset:

"Implement the concept of cookie-averse document"
https://bugs.webkit.org/show_bug.cgi?id=171746
http://trac.webkit.org/changeset/216333

1:32 PM Changeset in webkit [216333] by Chris Dumez
  • 4 edits
    2 adds in trunk

Implement the concept of cookie-averse document
https://bugs.webkit.org/show_bug.cgi?id=171746
<rdar://problem/32004466>

Reviewed by Sam Weinig.

Source/WebCore:

Implement the concept of cookie-averse document:

Test: fast/cookies/cookie-averse-document.html

  • dom/Document.cpp:

(WebCore::Document::isCookieAverse):
(WebCore::Document::cookie):
(WebCore::Document::setCookie):

  • dom/Document.h:

LayoutTests:

Add layout test coverage.

  • fast/cookies/cookie-averse-document-expected.txt: Added.
  • fast/cookies/cookie-averse-document.html: Added.
11:06 AM Changeset in webkit [216332] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Fix 32bit Windows build by giving correct parameters to MASM
https://bugs.webkit.org/show_bug.cgi?id=170833

Patch by Bill Ming <mbbill@gmail.com> on 2017-05-06
Reviewed by Alex Christensen.

  • CMakeLists.txt:
10:54 AM Changeset in webkit [216331] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

REGERSSION(r213499): Emoji with Fitzpatrick modifiers are drawn as two separate glyphs
https://bugs.webkit.org/show_bug.cgi?id=171750
<rdar://problem/31122612>

Reviewed by Zalan Bujtas.

Source/WebCore:

Emoji with Fitzpatrick modifiers need to take our complex text codepath. When looking through
the string to determine which code path to use, we ask if a particular codepoint is an emoji
group candidate. r213499 expanded the set of these candidates to include Fitzpatrick modifiers,
which means the next "if" statement would never be hit. Instead, we should check that "if"
statement first (because order is not important here). The next checks do not intersect with
any emoji group candidates.

Test: fast/text/fitzpatrick-combination.html

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

  • fast/text/fitzpatrick-combination-expected.html: Added.
  • fast/text/fitzpatrick-combination.html: Added.
10:31 AM Changeset in webkit [216330] by Simon Fraser
  • 3 edits in trunk/Source/WebKit/win

Fix Windows build after r216294.

  • Plugins/PluginView.h:
  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::paint):

10:16 AM Changeset in webkit [216329] by gskachkov@gmail.com
  • 4 edits in trunk

[ES6] Arrow function. Issue in access to this after eval('super()') within constructor
https://bugs.webkit.org/show_bug.cgi?id=171543

Reviewed by Saam Barati.

JSTests:

  • stress/arrowfunction-lexical-bind-supercall-4.js:

(J):
(K):

Source/JavaScriptCore:

Current patch force to use 'this' within arrow function or eval
from virtual scope each time, instead of using thisRegister.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::ensureThis):

10:15 AM Changeset in webkit [216328] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit2

Remove unused lambda capture
https://bugs.webkit.org/show_bug.cgi?id=171772

Reviewed by Yusuke Suzuki.

  • DatabaseProcess/DatabaseProcess.cpp:

(WebKit::DatabaseProcess::fetchWebsiteData):

8:05 AM Changeset in webkit [216327] by ddkilzer@apple.com
  • 8 edits in trunk/Source/WebKit2
messages_unittest.py should support a [-rreset-results] switch

<https://webkit.org/b/171627>

Reviewed by Daniel Bates.

This change adds support for a [-rreset-results] switch when

running messages_unittest.py to make it easy to update the
expected file results.

This also cleans up a lot of duplicate code in
messages_unittest.py by extracting common code into new methods
and by pushing code down into methods where it's actually used.

  • Scripts/webkit/LegacyMessageReceiver-expected.cpp:
  • Scripts/webkit/LegacyMessages-expected.h:
  • Scripts/webkit/MessageReceiver-expected.cpp:
  • Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
  • Scripts/webkit/Messages-expected.h:
  • Scripts/webkit/MessagesSuperclass-expected.h:
  • Update expected files using the new --reset-results switch.
  • Scripts/webkit/messages_unittest.py:
  • Remove what appears to be a debugging print statement.
  • Replace the code that reads in expected files with variables that contain the expected file names. The code to read in the contents moved into GeneratedFileContentsTest.assertGeneratedFileContentsEqual().

(ParsingTest.check_message):

  • Drive-by fix to change "!= None" to "is not None".

(GeneratedFileContentsTest.assertGeneratedFileContentsEqual):

Add support for [-rreset-results] switch here. This will

write out updated expected file contents when the switch is
used.

  • Push down most of the global code that reads in file contents into this method.
  • Change use of split('\n') into splitlines(False).

(GeneratedFileContentsTest.assertHeaderEqual): Add.

  • Extracts common code from test_receiver_headers().

(GeneratedFileContentsTest.assertImplementationEqual): Add.

  • Extracts common code from test_receiver_implementations().

(HeaderTest):
(HeaderTest.test_receiver_headers):

  • Rename from HeaderTest.test_header().
  • Simplify by calling assertHeaderEqual().

(ReceiverImplementationTest):
(ReceiverImplementationTest.test_receiver_implementations):

  • Rename from ReceiverImplementationTest.test_receiver_implementation().
  • Simplify by calling assertImplementationEqual().

(add_reset_results_to_unittest_help): Add.

Inserts help text for [-rreset-results] switch.

(parse_sys_argv): Add.

Parses [-rreset-results] switch, and then removes it from

sys.argv. We do this instead of using argparse so that the
original help for the unittest module is still shown when
using --help.

4:34 AM Changeset in webkit [216326] by Csaba Osztrogonác
  • 2 edits in trunk/Tools

[Mac][cmake] Buildfix after r216047
https://bugs.webkit.org/show_bug.cgi?id=171769

Unreviewed buildfix.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
3:58 AM Changeset in webkit [216325] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WTF

Merge r215180 - [GTK] Fix x32 build
https://bugs.webkit.org/show_bug.cgi?id=170673

Patch by Thorsten Glaser <tg@mirbsd.de> on 2017-04-10
Reviewed by Carlos Alberto Lopez Perez.

  • wtf/Platform.h:
3:24 AM Changeset in webkit [216324] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.16

Merge r215172 - REGRESSION(r205841): [GTK] Test fast/images/animated-png.html is failing since r205841
https://bugs.webkit.org/show_bug.cgi?id=168425

Reviewed by Said Abou-Hallawa.

Source/WebCore:

There is a problem with animations that are blending their frames into the previous frame. Due to a change
in how pixel components are premultiplied (the result is now rounded up), the parameters to the blending
operation may vary in one unit, causing the result of the blending to be different from the expected result.
In order to fix this, a new parameter is added to indicate whether we want to use rounding up when
premultiplying or not, and ImageBackingStore uses that parameter to disable rounding up.

Adjusted the expectation for fast/images/animated-png.html, as it must pass now.

  • platform/graphics/Color.cpp:

(WebCore::premultipliedChannel):
(WebCore::makePremultipliedRGBA):

  • platform/graphics/Color.h:
  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::blendPixel):
(WebCore::ImageBackingStore::pixelValue):

LayoutTests:

Adjusted expectation for fast/images/animated-png.html. It must pass now.

  • platform/gtk/TestExpectations:
1:55 AM Changeset in webkit [216323] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

RealtimeMediaSourceCenter callbacks should be passed as r-values
https://bugs.webkit.org/show_bug.cgi?id=171407

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

No change of behavior, this is mostly style here.

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):

  • platform/mock/MockRealtimeMediaSourceCenter.h:
1:49 AM Changeset in webkit [216322] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16

Merge r215156 - Elftoolchain ar doesn't support response files
https://bugs.webkit.org/show_bug.cgi?id=170105

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2017-04-08
Reviewed by Michael Catanzaro.

WebKit enables the use of response files when cmake and ninja is used.
However, the default implementation of ar command used in FreeBSD, which
is part of elftoolchain project, doesn't support reading arguments from
response files. To avoid causing undefined reference error on FreeBSD,
we disable the use of response files when elftoolchain ar is detected.

  • Source/cmake/OptionsCommon.cmake:
1:46 AM Changeset in webkit [216321] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215124 - Simple line layout: FlowContents::segmentIndexForRunSlow skips empty runs.
https://bugs.webkit.org/show_bug.cgi?id=170552

Reviewed by Antti Koivisto.

Source/WebCore:

The compare function passed to std::lower_bound completely misses empty runs.

Test: fast/text/simple-line-layout-hover-over-subsequent-linebreaks.html

  • rendering/SimpleLineLayoutFlowContents.cpp:

(WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):

LayoutTests:

  • fast/text/simple-line-layout-hover-over-subsequent-linebreaks-expected.txt: Added.
  • fast/text/simple-line-layout-hover-over-subsequent-linebreaks.html: Added.
1:36 AM Changeset in webkit [216320] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.16

Merge r215117 - REGRESSION(r211382): Complex text with justification erroneously overflows containers
https://bugs.webkit.org/show_bug.cgi?id=170399
<rdar://problem/31442008>

Reviewed by Simon Fraser.

Source/WebCore:

When we perform justification, we adjust glyphs' advances to add extra space between words.
ComplexTextController maintains an invariant where m_totalWidth is equal to the sum of these
advances. However, in RTL text, inserting extra justification space to the left of a glyph
would break that invariant, and would increase the advances of two glyphs instead of just
one. Then, when we go to draw the text, the sum of the advances is wider than m_totalWidth,
which means the glyphs would be drawn outside of their container.

This regressed in r211382 simply because of an oversight and because there were no tests for
this codepath.

Test: ComplexTextControllerTest.TotalWidthWithJustification

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

  • rendering/InlineBox.h:

(WebCore::InlineBox::InlineBox):

Tools:

Check for the invariant that the sum of the advances is equal to m_totalWidth.

  • TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::TEST_F):

1:30 AM Changeset in webkit [216319] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WTF

Merge r215107 - Include cstdio before using sscanf and stderr
https://bugs.webkit.org/show_bug.cgi?id=170098

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2017-04-07
Reviewed by Michael Catanzaro.

  • wtf/NumberOfCores.cpp:
1:30 AM Changeset in webkit [216318] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.16

Merge r215106 - [GTK] Various build errors when plugin support is disabled
https://bugs.webkit.org/show_bug.cgi?id=170015

Reviewed by Carlos Garcia Campos.

.:

Allow building with ENABLE_NETSCAPE_PLUGIN_API=ON and ENABLE_X11_TARGET=OFF. This should be
possible as Carlos worked to ensure windowless plugins work properly outside X11. The GTK2
plugin process still depends on ENABLE_X11_TARGET because a plugin that uses GTK+ surely
wants to display a window, and is not going to work outside X11. (If the plugin links to
GTK+ but does not display a window, it's dumb and deserves to be broken.)

Also, make ENABLE_PLUGIN_PROCESS conditional on ENABLE_NETSCAPE_PLUGIN_API, not
ENABLE_X11_TARGET.

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

  • PluginProcess/unix/PluginControllerProxyUnix.cpp:
  • UIProcess/API/gtk/WebKitWebsiteData.cpp:

(recordContainsSupportedDataTypes):
(toWebKitWebsiteDataTypes):

  • UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:

(toWebsiteDataTypes):

1:28 AM Changeset in webkit [216317] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215102 - REGRESSION(r204512): WebSocket errors with "Failed to send WebSocket frame." if too much data is sent
https://bugs.webkit.org/show_bug.cgi?id=170463

Reviewed by Michael Catanzaro.

This only reproduces when using WebSockets to communicate with an external server.
When communicating with a local server, CFWriteStreamWrite succeeds too reliably, so
CFWriteStreamCanAcceptBytes returns true, when sometimes it doesn't when communicating
across the real internet.

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::platformSendInternal):

  • platform/network/soup/SocketStreamHandleImplSoup.cpp:

(WebCore::SocketStreamHandleImpl::platformSendInternal):
Returning std::nullopt means there was an error, which is not true when the socket stream
is in a state where it cannot be written to because it is actively communicating.
Returning 0 means 0 new bytes were sent, so we will try again later.

1:23 AM Changeset in webkit [216316] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c

Merge r215110 - Rebaseline another test after r215096.
https://bugs.webkit.org/show_bug.cgi?id=170561
<rdar://problem/7415154>

Unreviewed test gardening.

  • web-platform-tests/url/url-setters-expected.txt:
1:23 AM Changeset in webkit [216315] by Carlos Garcia Campos
  • 13 edits in releases/WebKitGTK/webkit-2.16/LayoutTests

Merge r215098 - Rebaseline additional tests after r215096.
https://bugs.webkit.org/show_bug.cgi?id=170561
<rdar://problem/7415154>

LayoutTests/imported/w3c:

  • web-platform-tests/cors/allow-headers-expected.txt:
  • web-platform-tests/cors/origin-expected.txt:

LayoutTests:

  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-self-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-self-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-self-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-self-block-expected.txt:
  • http/tests/security/no-popup-from-sandbox-top-expected.txt:
  • http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
1:21 AM Changeset in webkit [216314] by Carlos Garcia Campos
  • 50 edits in releases/WebKitGTK/webkit-2.16

Merge r215096 - WebKit should percent encode single quotes in query strings
https://bugs.webkit.org/show_bug.cgi?id=170561
<rdar://problem/7415154>

Reviewed by Alex Christensen.

Source/WebCore:

Modify the characterClassTable to instruct the URLParser to convert
the single-quote character ' to %27 in URL query strings.

Tests: URLParserTest in TestWebKitAPI.

fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html
fast/frames/xss-auditor-handles-file-urls.html
http/tests/security/xssAuditor

  • platform/URLParser.cpp:

Tools:

Add a test case for single-quote in the URL query string.

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

LayoutTests:

Rebaseline tests after change.

  • fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame-expected.txt:
  • fast/frames/xss-auditor-handles-file-urls-expected.txt:
  • http/tests/security/xssAuditor/base-href-control-char-expected.txt:
  • http/tests/security/xssAuditor/base-href-expected.txt:
  • http/tests/security/xssAuditor/base-href-null-char-expected.txt:
  • http/tests/security/xssAuditor/base-href-scheme-relative-expected.txt:
  • http/tests/security/xssAuditor/embed-tag-control-char-expected.txt:
  • http/tests/security/xssAuditor/embed-tag-expected.txt:
  • http/tests/security/xssAuditor/embed-tag-javascript-url-expected.txt:
  • http/tests/security/xssAuditor/embed-tag-null-char-expected.txt:
  • http/tests/security/xssAuditor/form-action-expected.txt:
  • http/tests/security/xssAuditor/formaction-on-button-expected.txt:
  • http/tests/security/xssAuditor/formaction-on-input-expected.txt:
  • http/tests/security/xssAuditor/frameset-injection-expected.txt:
  • http/tests/security/xssAuditor/full-block-base-href-expected.txt:
  • http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
  • http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
  • http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
  • http/tests/security/xssAuditor/iframe-injection-expected.txt:
  • http/tests/security/xssAuditor/iframe-javascript-url-more-encoding-expected.txt:
  • http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding-expected.txt:
  • http/tests/security/xssAuditor/img-onerror-non-ASCII-char-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-ampersand-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-control-char-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-entities-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-null-char-expected.txt:
  • http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
  • http/tests/security/xssAuditor/object-embed-tag-expected.txt:
  • http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
  • http/tests/security/xssAuditor/object-tag-expected.txt:
  • http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
  • http/tests/security/xssAuditor/script-tag-expression-follows-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-16bit-unicode4-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-16bit-unicode5-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-comma-01-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-control-char-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-entities-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-null-char-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query-expected.txt:
  • http/tests/security/xssAuditor/svg-animate-expected.txt:
  • http/tests/security/xssAuditor/svg-script-tag-expected.txt:
  • http/tests/security/xssAuditor/xss-filter-bypass-big5-expected.txt:
  • http/tests/security/xssAuditor/xss-filter-bypass-sjis-expected.txt:
1:17 AM Changeset in webkit [216313] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215089 - AX: Don't crash if no renderer is available for AccessibilityRenderObject
https://bugs.webkit.org/show_bug.cgi?id=170448

Reviewed by Chris Fleizach.

Don't crash or assert if no renderer is available, but early return
gracefully (as in other places in the AccessibilityRenderObject.cpp).
Spotted by running some tests through dogtail.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isOffScreen):
(WebCore::AccessibilityRenderObject::isUnvisited):
(WebCore::AccessibilityRenderObject::isVisited):

1:14 AM Changeset in webkit [216312] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215054 - Simple line layout: Hittest always returns the first renderer in the block.
https://bugs.webkit.org/show_bug.cgi?id=170520
<rdar://problem/30979175>

Reviewed by Antti Koivisto.

Source/WebCore:

This is incorrect now with <br> support (multiple renderers within the same block flow).

Test: fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point.html

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint): Related fix. We don't yet support positionForPoint with multiple renderes.

  • rendering/SimpleLineLayoutFlowContents.h:

(WebCore::SimpleLineLayout::FlowContents::segmentForRun): Empty runs are all valid.

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::hitTestFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):

  • rendering/SimpleLineLayoutResolver.cpp:

(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): This should eventually return a list of renderes.

  • rendering/SimpleLineLayoutResolver.h:

(WebCore::SimpleLineLayout::RunResolver::flowContents):

LayoutTests:

  • fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point-expected.html: Added.
  • fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point.html: Added.
1:08 AM Changeset in webkit [216311] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16

Merge r215001 - [GTK] Build fails when using icecream, ccache and cmake 3.6
https://bugs.webkit.org/show_bug.cgi?id=170498

Reviewed by Michael Catanzaro.

Disable ninja response file when using icecream, ccache and cmake > 3.5.

  • Source/cmake/OptionsCommon.cmake:
1:08 AM Changeset in webkit [216310] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r215009 - [GTK] Fix build with MEDIA_CAPTURE enabled
https://bugs.webkit.org/show_bug.cgi?id=170539

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-04-06
Reviewed by Carlos Garcia Campos.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:

(webkit_dom_html_input_element_get_capture): Add missing namespace in usage of WebCore::MediaCaptureTypeNone.

May 5, 2017:

10:19 PM Changeset in webkit [216309] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Put does not properly consult the prototype chain
https://bugs.webkit.org/show_bug.cgi?id=171754

Reviewed by Saam Barati.

We should do a follow up that cleans up the rest of put. See:
https://bugs.webkit.org/show_bug.cgi?id=171759

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):

9:55 PM Changeset in webkit [216308] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[WTF] Use memoryFootprint for MemoryUsage retrieval in Linux
https://bugs.webkit.org/show_bug.cgi?id=171757

Reviewed by Michael Catanzaro.

This patch leverages memoryFootprint() to retrieve physical footprint in Linux.

  • wtf/linux/MemoryPressureHandlerLinux.cpp:

(WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

9:41 PM Changeset in webkit [216307] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Renderers being destroyed should not be added to AX's deferred list.
https://bugs.webkit.org/show_bug.cgi?id=171768
<rdar://problem/31955660>

Reviewed by Simon Fraser.

Source/WebCore:

In certain cases, when custom scrollbars are present, while destroying the scrollbars' block parent, we

  • first remove the block from the AX's deferred list (AXObjectCache::remove)
  • destroy the render layer that owns the custom scrollbars (RenderLayer::destroyLayer)
  • detach the scrollbars from the parent (block) (RenderObject::removeFromParent)
    • clean up the block's lines (RenderBlock::deleteLines)
      • push the block back to the AX's deferred list (AXObjectCache::recomputeDeferredIsIgnored)

At this point no one will remove the current block from AX's deferred list.

Test: accessibility/crash-when-renderers-are-added-back-to-deferred-list.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::recomputeDeferredIsIgnored):
(WebCore::AXObjectCache::deferTextChanged):

LayoutTests:

  • accessibility/crash-when-renderers-are-added-back-to-deferred-list-expected.txt: Added.
  • accessibility/crash-when-renderers-are-added-back-to-deferred-list.html: Added.
8:57 PM Changeset in webkit [216306] by jfbastien@apple.com
  • 25 edits in trunk/Source/JavaScriptCore

WebAssembly: Air::Inst::generate crashes on large binary on A64
https://bugs.webkit.org/show_bug.cgi?id=170215

Reviewed by Filip Pizlo.

ARM can't encode all offsets in a single instruction. We usualy
handle this type of detail early, or the macro assembler uses a
scratch register to take care of the large immediate. After
register allocation we assumed that we would never get large
offsets, and asserted this was the case. That was a fine
assumption with JavaScript, but WebAssembly ends up generating
stack frames which are too big to encode.

There are two places that needed to be fixed:

  1. AirGenerate
  2. AirLowerStackArgs

We now unconditionally pin the dataTempRegister on ARM64, and use
it when immediates don't fit.

Number 1. is easy: we're just incrementing SP, make sure we can
use a scratch register when that happens.

Number 2. is more complex: not all Inst can receive a stack
argument whose base register isn't SP or FP. Specifically,
Patchpoints and Stackmaps get very sad because they just want to
know the offset value, but when we materialize the offset as
follows:

Move (spill337), (spill201), %r0, @8735

Becomes (where %r16 is dataTempRegister):

Move $1404, %r16, @8736
Add64 %sp, %r16, @8736
Move (%r16), 2032(%sp), %r0, @8736

The code currently doesn't see through our little dance. To work
around this issue we introduce a new Air Arg kind:
ExtendedOffsetAddr. This is the same as a regular Addr, but with
an offset which may be too big to encode. Opcodes then declare
whether their arguments can handle such inputs, and if so we
generate them, otherwise we generate Addr as shown above.

None of this affects x86 because it can always encode large
immediates.

This patch also drive-by converts some uses of override to
final. It makes the code easier to grok, and maybe helps the
optimizer sometimes but really that doens't matter.

  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM64.h:
  • b3/B3CheckSpecial.cpp:

(JSC::B3::CheckSpecial::admitsExtendedOffsetAddr):

  • b3/B3CheckSpecial.h:
  • b3/B3Common.cpp:

(JSC::B3::pinnedExtendedOffsetAddrRegister): keep the CPU-specific
pinning information in a cpp file

  • b3/B3Common.h:
  • b3/B3PatchpointSpecial.cpp:

(JSC::B3::PatchpointSpecial::admitsExtendedOffsetAddr):

  • b3/B3PatchpointSpecial.h:
  • b3/B3StackmapSpecial.cpp:

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

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

(JSC::B3::Air::Arg::isStackMemory):
(JSC::B3::Air::Arg::jsHash):
(JSC::B3::Air::Arg::dump):
(WTF::printInternal):
(JSC::B3::Air::Arg::stackAddrImpl): Deleted. There was only one
use of this (in AirLowerStackArgs) and it was now confusing to
split the logic up between these two. Inline the code that used to
be here into its one usepoint instead.

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::extendedOffsetAddr):
(JSC::B3::Air::Arg::isExtendedOffsetAddr):
(JSC::B3::Air::Arg::isMemory):
(JSC::B3::Air::Arg::base):
(JSC::B3::Air::Arg::offset):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isValidForm):
(JSC::B3::Air::Arg::forEachTmpFast):
(JSC::B3::Air::Arg::forEachTmp):
(JSC::B3::Air::Arg::asAddress):
(JSC::B3::Air::Arg::stackAddr): Deleted.

  • b3/air/AirCCallSpecial.cpp:

(JSC::B3::Air::CCallSpecial::isValid):
(JSC::B3::Air::CCallSpecial::admitsExtendedOffsetAddr):
(JSC::B3::Air::CCallSpecial::generate):

  • b3/air/AirCCallSpecial.h:
  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::Code):
(JSC::B3::Air::Code::pinRegister): Check that the register wasn't
pinned before pinning it. It's likely a bug to pin the same
register twice.

  • b3/air/AirCustom.h:

(JSC::B3::Air::PatchCustom::admitsExtendedOffsetAddr):
(JSC::B3::Air::CCallCustom::admitsExtendedOffsetAddr):
(JSC::B3::Air::ShuffleCustom::admitsExtendedOffsetAddr):
(JSC::B3::Air::EntrySwitchCustom::admitsExtendedOffsetAddr):
(JSC::B3::Air::WasmBoundsCheckCustom::admitsExtendedOffsetAddr):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::generate):

  • b3/air/AirInst.h:
  • b3/air/AirInstInlines.h:

(JSC::B3::Air::Inst::admitsExtendedOffsetAddr):

  • b3/air/AirLowerStackArgs.cpp:

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

  • b3/air/AirPrintSpecial.cpp:

(JSC::B3::Air::PrintSpecial::admitsExtendedOffsetAddr):
(JSC::B3::Air::PrintSpecial::generate):

  • b3/air/AirPrintSpecial.h:
  • b3/air/AirSpecial.h:
  • b3/air/opcode_generator.rb:
8:27 PM Changeset in webkit [216305] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
https://bugs.webkit.org/show_bug.cgi?id=171736

Reviewed by Tim Horton.

Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
--guard-malloc.

Because an image format is not supported, the ImageObserver of the Image
is deleted then the Image itself is deleted. In BitmapImage destructor,
we make a call which ends up accessing the deleted ImageObserver.

To fix this, we need to change the BitImage destructor to avoid calling
ImageFrameCache::decodedSizeChanged() since it is not really needed.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::~BitmapImage):

6:59 PM Changeset in webkit [216304] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r212998): Web Inspector: bad spacing of go-to arrow for HTTP POST request data
https://bugs.webkit.org/show_bug.cgi?id=171674

Reviewed by Matt Baker.

  • UserInterface/Views/DetailsSection.css:

(body[dir=ltr] .details-section > .content > .group > .row.simple > .value .go-to-arrow):
(body[dir=rtl] .details-section > .content > .group > .row.simple > .value .go-to-arrow):
Swap margin-left and margin-right. This regressed when RTL support was added.

6:39 PM Changeset in webkit [216303] by timothy_horton@apple.com
  • 11 edits in trunk/Source

[Mac] Adjust cursor position for dragged link (and stop it from moving based on how fast you are dragging)
https://bugs.webkit.org/show_bug.cgi?id=171764
<rdar://problem/32005865>

Reviewed by Simon Fraser.

  • page/DragController.cpp:

(WebCore::DragController::startDrag):
Compute dragImageAnchorPoint only if it is needed.
Don't compute a random unused imageRect.
Factor link drag image offset computation out into DragImage functions
for platforms to override.

Pass dragOrigin (the mouseDown point), not mouseDraggedPoint, to
doSystemDrag, just like all the other drag types. This plus the
WebKit2 change makes the link stable vs. the cursor, instead of
positioned based on how fast you move after the mouse down.

  • page/DragController.h:
  • page/gtk/DragControllerGtk.cpp:
  • page/mac/DragControllerMac.mm:
  • page/win/DragControllerWin.cpp:

Move LinkDragBorderInset into DragImage, and share between the non-Mac platforms.

  • platform/DragImage.cpp:

(WebCore::dragOffsetForLinkDragImage):
(WebCore::anchorPointForLinkDragImage):

  • platform/DragImage.h:

As previously mentioned, move the computation of drag image offset here.

  • platform/mac/DragImageMac.mm:

(WebCore::dragOffsetForLinkDragImage):
(WebCore::anchorPointForLinkDragImage):
Put the new drag image to the bottom right of the cursor.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::dragImageForView):
Always use the last mouse down event to originate the drag; this was a 2004 hack
to work around a seemingly-fixed macOS bug that somehow propagated into WebKit2.
With WebKit2, this would cause trouble because currentEvent could move on
during the bounce to the Web Content process and back, causing the delta between
clientPoint and the mouse point to be dependent on timing, and thus causing the
link to sit at timing-dependent distance from the cursor, instead of exactly
where dragOffsetForLinkDragImage placed it.

6:10 PM Changeset in webkit [216302] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark compositing/tiling/non-active-window-tiles-size.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=171763

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-05

  • platform/mac-wk2/TestExpectations:
5:33 PM Changeset in webkit [216301] by oliver@apple.com
  • 12 edits in trunk

Move trivial String prototype functions to JS builtins
https://bugs.webkit.org/show_bug.cgi?id=171737

Reviewed by Saam Barati.

Source/JavaScriptCore:

Super simple change to migrate all of the old school
html-ifying string operations to builtin JS.

Core implementation is basically a 1-for-1 match to the spec.

  • builtins/StringPrototype.js:

(globalPrivate.createHTML):
(anchor):
(big):
(blink):
(bold):
(fixed):
(fontcolor):
(fontsize):
(italics):
(link):
(small):
(strike):
(sub):
(sup):

  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncBig): Deleted.
(JSC::stringProtoFuncSmall): Deleted.
(JSC::stringProtoFuncBlink): Deleted.
(JSC::stringProtoFuncBold): Deleted.
(JSC::stringProtoFuncFixed): Deleted.
(JSC::stringProtoFuncItalics): Deleted.
(JSC::stringProtoFuncStrike): Deleted.
(JSC::stringProtoFuncSub): Deleted.
(JSC::stringProtoFuncSup): Deleted.
(JSC::stringProtoFuncFontcolor): Deleted.
(JSC::stringProtoFuncFontsize): Deleted.
(JSC::stringProtoFuncAnchor): Deleted.
(JSC::stringProtoFuncLink): Deleted.

LayoutTests:

Updated output

  • js/dom/string-anchor-expected.txt:
  • js/dom/string-anchor.html:
  • js/dom/string-fontcolor-expected.txt:
  • js/dom/string-fontcolor.html:
  • js/dom/string-fontsize-expected.txt:
  • js/dom/string-fontsize.html:
  • js/dom/string-link-expected.txt:
  • js/dom/string-link.html:
5:24 PM Changeset in webkit [216300] by commit-queue@webkit.org
  • 3 edits in trunk/Source/bmalloc

Leaks always reports "WebKit Malloc Memory Pressure Handler" dispatch_queue/source as leaking
https://bugs.webkit.org/show_bug.cgi?id=171532

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-05
Reviewed by Geoffrey Garen.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Heap.h:

Store the dispatch_source_t in a member to avoid a false positive leak.

5:17 PM Changeset in webkit [216299] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

...and now the GTK and Windows builds.

  • platform/gtk/WidgetGtk.cpp:

(WebCore::Widget::paint):

  • platform/win/WidgetWin.cpp:

(WebCore::Widget::paint):

5:08 PM Changeset in webkit [216298] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

[WTF] Do not export deleted constructor in StringView
https://bugs.webkit.org/show_bug.cgi?id=171751

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-05
Reviewed by Alexey Proskuryakov.

  • wtf/text/StringView.h:
5:08 PM Changeset in webkit [216297] by beidson@apple.com
  • 6 edits in trunk

API test WebKit2.WebsiteDataStoreCustomPaths is failing on ios-simulator.
<rdar://problem/31977294> and https://bugs.webkit.org/show_bug.cgi?id=171513

Reviewed by Andy Estes.

Source/WebCore:

Covered by API test.

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::syncAllCookies):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

5:04 PM Changeset in webkit [216296] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix iOS build.

  • platform/ios/WidgetIOS.mm:

(WebCore::Widget::paint):

5:03 PM Changeset in webkit [216295] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Remove export from Intrinsic
https://bugs.webkit.org/show_bug.cgi?id=171752

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-05
Reviewed by Alexey Proskuryakov.

  • runtime/Intrinsic.h:
4:49 PM Changeset in webkit [216294] by dino@apple.com
  • 24 edits
    5 adds in trunk

Restrict SVG filters to accessible security origins
https://bugs.webkit.org/show_bug.cgi?id=118689
<rdar://problem/27362159>

Reviewed by Brent Fulgham.

Source/WebCore:

Certain SVG filters should only be allowed to operate
on content that is has SecurityOrigin access to. Implement
this by including a flag in PaintInfo and LayerPaintingInfo,
and have RenderWidget make sure the documents have acceptable
SecurityOrigins as it goes to paint.

This could be used as the first step in a "safe painting"
strategy, allowing some content to be rendered into a
canvas or via the element() CSS function... but it is only
a small first step.

Test: http/tests/css/filters-on-iframes.html

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::paint):

  • platform/ScrollView.h:
  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::paint):

  • platform/Scrollbar.h:
  • platform/Widget.h:
  • platform/graphics/filters/FilterOperation.h:

(WebCore::FilterOperation::shouldBeRestrictedBySecurityOrigin):

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::hasFilterThatShouldBeRestrictedBySecurityOrigin):

  • platform/graphics/filters/FilterOperations.h:
  • platform/mac/WidgetMac.mm:

(WebCore::Widget::paint):

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::build):

  • rendering/FilterEffectRenderer.h:
  • rendering/PaintInfo.h:

(WebCore::PaintInfo::PaintInfo):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):

  • rendering/RenderLayer.h:
  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::paint):

  • rendering/RenderScrollbar.h:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paintContents):

Source/WebKit2:

Update parameter lists.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::paint):

  • WebProcess/Plugins/PluginView.h:

LayoutTests:

Add a test that shows safe frames, unsafe frames, and
then a safe frame that itself has an unsafe frame, to
show that the security requirements are being forwarded
down the tree.

  • http/tests/css/filters-on-iframes-expected.html: Added.
  • http/tests/css/filters-on-iframes.html: Added.
  • http/tests/css/resources/blank.html: Added.
  • http/tests/css/resources/references-external.html: Added.
  • http/tests/css/resources/solid-red.html: Added.
4:46 PM Changeset in webkit [216293] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r216273.

This change caused an assertion failure on WK1.

Reverted changeset:

"Crash in ImageFrameCache::decodedSizeChanged() after image
load cancellation"
https://bugs.webkit.org/show_bug.cgi?id=171736
http://trac.webkit.org/changeset/216273

4:45 PM Changeset in webkit [216292] by Brian Burg
  • 4 edits in trunk

[Cocoa] Converting from WebCore::Cookie to NSHTTPCookie always marks cookies as session cookies
https://bugs.webkit.org/show_bug.cgi?id=171748
<rdar://problem/32027327>

Reviewed by Michael Catanzaro.

Source/WebCore:

The function that we use to convert from WebCore::Cookie to NSHTTPCookie was
also misusing the NSHTTPCookieDiscard property. If any value is provided for
this key, even @NO, CFNetwork interprets that to mean that the cookie has the
"session" flag.

This is known to affect cookies set via WebCookieManager, WKHTTPCookieStore,
and WebAutomationSession.

This is covered by existing test WebKit2.WKHTTPCookieStore.

  • platform/network/cocoa/CookieCocoa.mm:

(WebCore::Cookie::operator NSHTTPCookie *):
Don't include the property if the cookie is not a session cookie.

Tools:

Remove temporary workaround now that the assertion failure is fixed.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST):

4:39 PM Changeset in webkit [216291] by Simon Fraser
  • 14 edits
    7 adds in trunk

Make it possible to test rotation in iOS WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=171755

Reviewed by Tim Horton.

Tools:

Add to UIScriptController:

void simulateRotation(DeviceOrientation orientation, object callback);
void simulateRotationLikeSafari(DeviceOrientation orientation, object callback);

The former just does a view resize, as a simple WKWebView app would do. The second does
animation more like MobileSafari, using _begin/_endAnimatedResize. and associated override
layout size and interface orientation. The two behaviors produce different resize and
orientationchange events and sizes, and both need to be tested.

Rotation is initiated by a call on UIDevice, and responded to by the root view controller,
which is now a custom subclass (PlatformWebViewController).

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):

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

(WTR::toDeviceOrientation):
(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView _didEndRotation]):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(-[PlatformWebViewController viewWillTransitionToSize:withTransitionCoordinator:]):
(WTR::PlatformWebView::PlatformWebView):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::toUIDeviceOrientation):
(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):
(WTR::UIScriptController::platformClearAllCallbacks):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):

LayoutTests:

Two rotation tests and one that comes last to ensure that the device was not left in a rotated state.

  • fast/events/ios/rotation/basic-rotation-expected.txt: Added.
  • fast/events/ios/rotation/basic-rotation.html: Added.
  • fast/events/ios/rotation/safari-like-rotation-expected.txt: Added.
  • fast/events/ios/rotation/safari-like-rotation.html: Added.
  • fast/events/ios/rotation/zz-no-rotation-expected.txt: Added.
  • fast/events/ios/rotation/zz-no-rotation.html: Added.
4:33 PM Changeset in webkit [216290] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Ensure NSColorPickerTouchBarItem only uses sRGB colors
https://bugs.webkit.org/show_bug.cgi?id=171758
-and corresponding-
rdar://problem/28314183

Reviewed by Tim Horton.

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKTextTouchBarItemController itemForIdentifier:]):

4:26 PM Changeset in webkit [216289] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/loading/resourceLoadStatistics/prevalent-resource-without-user-interaction.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171756

Unreviewed test gardening.

  • platform/wk2/TestExpectations:
3:56 PM Changeset in webkit [216288] by Jonathan Bedard
  • 6 edits
    2 deletes in trunk/Tools

Use ImageDiff built by host SDK and remove ImageDiff from DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=168945
<rdar://problem/30745695>

Reviewed by David Kilzer.

Use ImageDiff built with the host machine's SDK and stop building ImageDiff with the
target SDK. These two changes must happen simultaneously because some archives will
clobber the ImageDiff from the host SDK with the ImageDiff from the target SDK.

  • DumpRenderTree/mac/Configurations/ImageDiff.xcconfig: Remove ImageDiff from project.
  • DumpRenderTree/PlatformWin.cmake: Remove ImageDiff. Note that the CMakeLists.txt in the

tools directory still includes ImageDiff.

  • DumpRenderTree/cg/ImageDiffCG.cpp: Removed.
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Removed.
  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._path_to_image_diff): Return the correct path to ImageDiff when building
locally or when running archives.

  • Scripts/webkitpy/port/image_diff.py:

(IOSSimulatorImageDiffer): Deleted.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.diff_image): Deleted.

3:53 PM Changeset in webkit [216287] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.21.0.1/Source

Versioning.

3:53 PM Changeset in webkit [216286] by matthew_hanson@apple.com
  • 4 edits in tags/Safari-604.1.21.0.1/Source

Cherry-pick r216229. rdar://problem/31978703

3:50 PM Changeset in webkit [216285] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

TURNS gathering is not working properly
https://bugs.webkit.org/show_bug.cgi?id=171747

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

Did manual testing on real TURNS servers.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration): Disabling TURNS servers gathering.

3:48 PM Changeset in webkit [216284] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.21.0.1

New tag.

3:48 PM Changeset in webkit [216283] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-604.1.22

Delete tag.

3:46 PM Changeset in webkit [216282] by matthew_hanson@apple.com
  • 4 edits in tags/Safari-604.1.21/Source

Revert r216268. rdar://problem/31978703

3:45 PM Changeset in webkit [216281] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.21/Source

Revert r216270.

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

Mark test http/tests/security/module-correct-mime-types.html slow.
https://bugs.webkit.org/show_bug.cgi?id=164960

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-05

  • platform/ios-wk2/TestExpectations:
3:35 PM Changeset in webkit [216279] by sbarati@apple.com
  • 13 edits
    3 adds in trunk

putDirectIndex does not properly do defineOwnProperty
https://bugs.webkit.org/show_bug.cgi?id=171591
<rdar://problem/31735695>

Reviewed by Geoffrey Garen.

JSTests:

  • stress/array-prototype-splice-making-typed-array.js:

(test):

  • stress/array-species-config-array-constructor.js:

(shouldThrow):
(test):

  • stress/put-direct-index-broken-2.js: Added.

(assert):
(test):
(makeLengthWritable):
(set get restoreOldDesc):

  • stress/put-direct-index-broken.js: Added.

(whatToTest):
(tryRunning):
(tryItOut):

  • stress/put-indexed-getter-setter.js: Added.

(foo.X.prototype.set 7):
(foo.X.prototype.get 7):
(foo.X):
(foo):

Source/JavaScriptCore:

This patch fixes putDirectIndex and its JIT implementations to be
compatible with the ES6 spec. I think our code became out of date
when we implemented ArraySpeciesCreate since ArraySpeciesCreate may
return arbitrary objects. We perform putDirectIndex on that arbitrary
object. The behavior we want is as if we performed defineProperty({configurable:true, enumerable:true, writable:true}).
However, we weren't doing this. putDirectIndex assumed it could just splat
data into any descendent of JSObject's butterfly. For example, this means
we'd just splat into the butterfly of a typed array, even though a typed
array doesn't use its butterfly to store its indexed properties in the usual
way. Also, typed array properties are non-configurable, so this operation
should throw. This also means if we saw a ProxyObject, we'd just splat
into its butterfly, but this is obviously wrong because ProxyObject should
intercept the defineProperty operation.

This patch fixes this issue by adding a whitelist of cell types that can
go down putDirectIndex's fast path. Anything not in that whitelist will
simply call into defineOwnProperty.

  • bytecode/ByValInfo.h:

(JSC::jitArrayModePermitsPutDirect):

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine):

  • jit/JITOperations.cpp:
  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncSplice):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createStructure):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):

  • runtime/JSObject.cpp:

(JSC::canDoFastPutDirectIndex):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
(JSC::JSObject::putDirectIndexBeyondVectorLength): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::putDirectIndex):
(JSC::JSObject::canSetIndexQuicklyForPutDirect): Deleted.

  • runtime/JSType.h:
3:30 PM Changeset in webkit [216278] by Ryan Haddad
  • 5 edits
    2 deletes in trunk

Unreviewed, rolling out r216275.

This change broke internal builds.

Reverted changeset:

"[Cocoa] CTFontDescriptorCreateMatchingFontDescriptor() is not
case insensitive"
https://bugs.webkit.org/show_bug.cgi?id=171636
http://trac.webkit.org/changeset/216275

3:23 PM Changeset in webkit [216277] by Brent Fulgham
  • 8 edits in trunk/Source/WebKit2

[WK2][iOS][macOS] Expand sandbox to access vm.footprint_suspend
https://bugs.webkit.org/show_bug.cgi?id=171749
<rdar://problem/32019494>

Reviewed by Geoffrey Garen.

The 'sysctl' whitelist needs to be extended to support an additional VM-related feature.

  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
3:03 PM Changeset in webkit [216276] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.22

New tag.

2:54 PM Changeset in webkit [216275] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

[Cocoa] CTFontDescriptorCreateMatchingFontDescriptor() is not case insensitive
https://bugs.webkit.org/show_bug.cgi?id=171636
<rdar://problem/30811218>

Reviewed by Dean Jackson.

Source/WebCore:

LastResort is the only name which needs to be looked up case-sensitively. We can handle
this in our existing function which handles special font names (like -apple-system) to
make sure that we always do the right thing.

Test: fast/text/lastResort.html

  • platform/spi/cocoa/CoreTextSPI.h:
  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::platformFontWithFamilySpecialCase):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::platformFontWithFamilySpecialCase):

LayoutTests:

  • fast/text/lastResort-expected.html: Added.
  • fast/text/lastResort.html: Added.
2:36 PM Changeset in webkit [216274] by Yusuke Suzuki
  • 5 edits
    1 delete in trunk/Source/WTF

[GTK][JSCOnly] Merge MainThread implementations and use generic one
https://bugs.webkit.org/show_bug.cgi?id=171738

Reviewed by Michael Catanzaro.

GLib MainThread implementation is generic enough to be used in JSCOnly.
We move it to generic/ and GTK (GLib ports) and JSCOnly use it.
And we also drop GLib MainThread's isMainThread function because
generic thread ID one is enough.

This patch also cleans up initializing main thread code by using std::call_once.

  • wtf/MainThread.cpp:

(WTF::initializeMainThread):
(WTF::isMainThread):
(WTF::initializeMainThreadToProcessMainThread):
(WTF::initializeWebThread):
(WTF::canAccessThreadLocalDataForThread):
(WTF::initializeMainThreadOnce): Deleted.
(WTF::initializeMainThreadToProcessMainThreadOnce): Deleted.
(WTF::initializeWebThreadOnce): Deleted.

  • wtf/PlatformGTK.cmake:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/generic/MainThreadGeneric.cpp:

(WTF::MainThreadDispatcher::MainThreadDispatcher):
(WTF::MainThreadDispatcher::schedule):
(WTF::MainThreadDispatcher::fired):
(WTF::scheduleDispatchFunctionsOnMainThread):

  • wtf/glib/MainThreadGLib.cpp: Removed.
2:35 PM Changeset in webkit [216273] by Said Abou-Hallawa
  • 3 edits in trunk/Source/WebCore

Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
https://bugs.webkit.org/show_bug.cgi?id=171736

Reviewed by Tim Horton.

Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
--guard-malloc.

Because an image format is not supported, the ImageObserver of the Image
is deleted then the Image itself is deleted. In BitmapImage destructor,
we make a call which ends up accessing the deleted ImageObserver.

To fix this, we need to setImageObsever of the Image to-be-deleted to
nullptr. So the Image can avoid accessing its ImageObserver, while it is
being deleted. Also we can change the BitImage destructor to avoid calling
ImageFrameCache::decodedSizeChanged() since it is not really needed.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::clearImage):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::~BitmapImage):

2:15 PM Changeset in webkit [216272] by Brian Burg
  • 2 edits in trunk/Tools

API test WebKit2.WKHTTPCookieStore fails due to possible issue with handling non-session cookies
https://bugs.webkit.org/show_bug.cgi?id=171748

Unreviewed test gardening.

The assertion failure will be investigated separately in order to avoid rolling out
the fix for "secure" cookies. This assertion fails even without r216258 applied.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST):

1:52 PM Changeset in webkit [216271] by Jonathan Bedard
  • 6 edits
    2 copies in trunk/Tools

Unreviewed, rolling out r216260.

Breaks internal iOS testers

Reverted changeset:

"Use ImageDiff built by host SDK and remove ImageDiff from
DumpRenderTree"
https://bugs.webkit.org/show_bug.cgi?id=168945
http://trac.webkit.org/changeset/216260

1:52 PM Changeset in webkit [216270] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.21/Source

Versioning.

1:36 PM Changeset in webkit [216269] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unskip media/click-placeholder-not-pausing.html.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:33 PM Changeset in webkit [216268] by matthew_hanson@apple.com
  • 4 edits in tags/Safari-604.1.21/Source

Cherry-pick r216229. rdar://problem/31978703

1:31 PM Changeset in webkit [216267] by Joseph Pecoraro
  • 5 edits in trunk/LayoutTests

REGRESSION: LayoutTest streams/reference-implementation/readable-stream-templated.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=171580
<rdar://problem/32009647>

Rubber-stamped by Alexey Proskuryakov.

Rebaseline expectations. This test was previously flakey so the results were
missed unless the test was run with --force.

  • streams/reference-implementation/readable-stream-templated-expected.txt:
  • streams/reference-implementation/readable-stream-templated.html:

Silence unhandled rejections. This test did not expect unhandled promise
rejections to affect test results, so ignore them.

1:31 PM Changeset in webkit [216266] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

[macOS Sierra] LayoutTest http/tests/inspector/network/resource-request-headers.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170702
<rdar://problem/31616643>

Rubber-stamped by Brian Burg.

  • platform/mac-wk2/TestExpectations:
  • http/tests/inspector/network/resource-request-headers.html:

Make this test unflakey by ensuring we wait for the load to complete.

1:23 PM Changeset in webkit [216265] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit2

Resource Load Statistics: Don't cover in-memory and disk caches during website data removal
https://bugs.webkit.org/show_bug.cgi?id=171741
<rdar://problem/32020691>

Reviewed by Brent Fulgham.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

No longer removes WebsiteDataType::DiskCache or WebsiteDataType::MemoryCache.

1:21 PM Changeset in webkit [216264] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] include JSCInlines.h in ObjectInitializationScope.cpp
https://bugs.webkit.org/show_bug.cgi?id=171744

Patch by Guillaume Emont <guijemont@igalia.com> on 2017-05-05
Reviewed by Mark Lam.

  • runtime/ObjectInitializationScope.cpp:
12:44 PM Changeset in webkit [216263] by Brian Burg
  • 4 edits in trunk/Source

CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::commonVMSlow + 57
https://bugs.webkit.org/show_bug.cgi?id=171669
<rdar://problem/31967684>

Reviewed by Mark Lam.

Source/WebCore:

  • bindings/js/CommonVM.h:

(WebCore::commonVMOrNull):
Add an inline accessor function to expose the global variable.

Source/WebKit2:

safaridriver's AutomaticInspection capability causes us to call WebInspectorProxy::connect()
underneath the Automation.inspectBrowsingContext command. This fires a NeedDebuggerBreak
interrupt for the web content's VM, but this is racy because the web content process may
not yet be fully initialized when this interrupt is handled.

To work around this, just don't deliver any interrupts if the VM singleton is still null.
This is a reliable signal that the web content process is not fully initialized yet. Not delivering
is harmless; the interrupt only exists to break out of infinite loops in JS code, but there
could not be any such infinite loop yet if the web content process is not fully initialized.

  • WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp:

(WebKit::WebInspectorInterruptDispatcher::notifyNeedDebuggerBreak):

12:43 PM Changeset in webkit [216262] by fpizlo@apple.com
  • 2 edits in trunk/Source/WebCore

GCController.cpp's collect() should be Async
https://bugs.webkit.org/show_bug.cgi?id=171708

Reviewed by Saam Barati.

No new tests because no change in behavior.

This is one step towards not requesting sync GCs in WebCore. I'm landing this incrementally to
make bisecting super easy.

  • bindings/js/GCController.cpp:

(WebCore::collect):

12:31 PM Changeset in webkit [216261] by Brian Burg
  • 2 edits in trunk/Source/WebKit2

Web Automation: cookie-related commands don't work correctly
https://bugs.webkit.org/show_bug.cgi?id=171713
<rdar://problem/29829930>

Reviewed by Alexey Proskuryakov.

Commands that use WebCookieManager directly should complete when
the manager's completion handler is called. Otherwise, this will race
with subsequent accesses to cookies via the web process (document.cookie).

Also, these commands need to use the active browsing context's session ID.
They currently use the process pool's storage session, which is wrong
since we specially configure automation instances with an ephemeral store.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::addSingleCookie):
(WebKit::WebAutomationSession::deleteAllCookies):

12:26 PM Changeset in webkit [216260] by Jonathan Bedard
  • 6 edits
    2 deletes in trunk/Tools

Use ImageDiff built by host SDK and remove ImageDiff from DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=168945
<rdar://problem/30745695>

Reviewed by David Kilzer.

Use ImageDiff built with the host machine's SDK and stop building ImageDiff with the
target SDK. These two changes must happen simultaneously because some archives will
clobber the ImageDiff from the host SDK with the ImageDiff from the target SDK.

  • DumpRenderTree/mac/Configurations/ImageDiff.xcconfig: Remove ImageDiff from project.
  • DumpRenderTree/PlatformWin.cmake: Remove ImageDiff. Note that the CMakeLists.txt in the

tools directory still includes ImageDiff.

  • DumpRenderTree/cg/ImageDiffCG.cpp: Removed.
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Removed.
  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._path_to_image_diff): Return the correct path to ImageDiff when building
locally or when running archives.

  • Scripts/webkitpy/port/image_diff.py:

(IOSSimulatorImageDiffer): Deleted.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.diff_image): Deleted.

12:26 PM Changeset in webkit [216259] by Chris Dumez
  • 26 edits
    2 adds
    183 deletes in trunk

Attr Nodes should not have children
https://bugs.webkit.org/show_bug.cgi?id=171688
<rdar://problem/31998412>

Reviewed by Andreas Kling.

Source/WebCore:

Attr Nodes should not have children as per the latest DOM specification:

Firefox and Chrome both have been matching the DOM specification for a while so I think
we should do the same. This aligns us with other browsers, simplifies the code, is
more efficient and the code being removed has been prone to security bugs.

Test: fast/dom/Attr/cannot-have-children.html

  • dom/Attr.cpp:

(WebCore::Attr::Attr):
(WebCore::Attr::create):
(WebCore::Attr::setValue):
(WebCore::Attr::cloneNodeInternal):

  • dom/Attr.h:
  • Have Attr subclass Node instead of ContainerNode as it can no longer have children.
  • Drop logic to dealing with children / creating a Text child.
  • dom/CharacterData.cpp:

(WebCore::CharacterData::notifyParentAfterChange):
Drop useless check found by the compiler. parentNode() can no longer be an Attr node.

  • dom/Node.cpp:

(WebCore::appendTextContent):
appendTextContent() is called by Node.TextContent(). For Attr Nodes, we should no longer traverse
its subtree to gather Text Nodes. Instead, we now return Attr.value, as per the specification:

  • dom/Range.cpp:

(WebCore::lengthOfContentsInNode):
As per https://dom.spec.whatwg.org/#concept-node-length, we should return the number of children
for Attr Nodes, which will always be 0.

  • xml/XPathUtil.cpp:

(WebCore::XPath::isValidContextNode):
Always return true for TEXT_NODE as the !(node->parentNode() && node->parentNode()->isAttributeNode())
check will also with true now. This is because a parentNode() cannot be an Attribute Node.

LayoutTests:

  • fast/dom/Attr/cannot-have-children-expected.txt: Added.
  • fast/dom/Attr/cannot-have-children.html: Added.

Add layout test coverage. I have verified that this test passes in both
Firefox and Chrome.

  • dom/html/level1/*: Removed legacy / outdated tests.
  • dom/xhtml/level1/*: Removed legacy / outdated tests.
  • fast/dom/Attr/child-nodes-cache-expected.txt: Removed.
  • fast/dom/Attr/child-nodes-cache.html: Removed.
  • fast/dom/Attr/child-nodes-length-cache-expected.txt: Removed.
  • fast/dom/Attr/child-nodes-length-cache.html: Removed.
  • fast/dom/Attr/invalidate-nodelist-after-attr-setvalue-expected.txt: Removed.
  • fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html: Removed.
  • fast/dom/attribute-change-on-mutate-expected.txt: Removed.
  • fast/dom/attribute-change-on-mutate.html: Removed.
  • svg/custom/image-with-attr-change-after-delete-crash-expected.txt: Removed.
  • svg/custom/image-with-attr-change-after-delete-crash.html: Removed.
  • traversal/moz-bug590771-expected.txt: Removed.
  • traversal/moz-bug590771.html: Removed.

Removed some outdated tests.

  • fast/custom-elements/reactions-for-webkit-extensions-expected.txt:
  • fast/custom-elements/reactions-for-webkit-extensions.html:
  • fast/dom/Attr/change-id-via-attr-node-value-expected.txt:
  • fast/dom/Attr/change-id-via-attr-node-value.html:
  • fast/dom/Element/normalize-crash.html:
  • fast/dom/Element/normalize-crash2.html:
  • fast/dom/HTMLLinkElement/event-while-removing-attribute-expected.txt:
  • fast/dom/HTMLLinkElement/event-while-removing-attribute.html:
  • fast/dom/MutationObserver/observe-attributes-expected.txt:
  • fast/dom/MutationObserver/observe-attributes.html:
  • fast/dom/import-attribute-node.html:
  • fast/dom/insertedIntoDocument-child.html:
  • fast/dom/insertedIntoDocument-sibling.html:
  • fast/dom/no-assert-for-malformed-js-url-attribute-expected.txt:
  • fast/dom/no-assert-for-malformed-js-url-attribute.html:
  • fast/dom/normalize-attributes-mutation-event-crash.html:
  • fast/dom/serialize-nodes.xhtml:
  • http/tests/security/xss-DENIED-iframe-src-alias-expected.txt:

Update existing tests so they stop relying on Attr Node having Text children.

12:21 PM Changeset in webkit [216258] by Brian Burg
  • 4 edits in trunk

[Cocoa] Converting from WebCore::Cookie to NSHTTPCookie always marks cookies as secure
https://bugs.webkit.org/show_bug.cgi?id=171700
<rdar://problem/32017975>

Reviewed by Brady Eidson.

Source/WebCore:

The function that we use to convert from WebCore::Cookie to NSHTTPCookie was
misusing the NSHTTPCookieSecure property. If any value is provided for this key,
even @NO, CFNetwork interprets that to mean that the cookie has the "secure" flag.
Thus, in some cases we would store an "insecure" cookie on a site that uses the
http:// protocol, and be unable to later retrieve the cookie. This is known to
affect cookies set via WebCookieManager, WKHTTPCookieStore, and WebAutomationSession.

This is covered by existing test WebKit2.WKHTTPCookieStore.
The test had a bug that masked this problem.

  • platform/network/cocoa/CookieCocoa.mm:

(WebCore::Cookie::operator NSHTTPCookie *):
Don't include the property if the cookie is not secure.

Tools:

Fix a mistake in the test that should have caught this bug.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST):
The assertions that were meant to check round-tripping were actually checking
the properties of the original cookie objects, not the round-tripped ones.
This test now fails without the bugfix and passes when it is applied.

12:20 PM Changeset in webkit [216257] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebCore

Add SPI to WebItemProviderPasteboard to synchronously load data with a given timeout
https://bugs.webkit.org/show_bug.cgi?id=171725
<rdar://problem/32014052>

Reviewed by Beth Dakin.

Adds a synchronousTimeout: argument to doAfterLoadingProvidedContentIntoFileURLs:. If a positive timeout
interval is specified by the client, then we will block the main thread for at most that amount of time after
beginning to load from the item providers.

To do this, we introduce another dispatch_group_t in parallel to the fileLoadingGroup that is entered and
left in the same places. However, instead of attaching a handler block, we simply perform a synchronous wait for
either the time limit to be reached, or the item providers to finish loading.

No new tests -- no change in behavior yet.

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

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

12:16 PM Changeset in webkit [216256] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Clean up Attr.idl
https://bugs.webkit.org/show_bug.cgi?id=171691

Reviewed by Andreas Kling.

Clean up Attr.idl to match the spec:

No Web-facing behavior change except for Attr properties being enumerated
in a slightly different order.

  • dom/Attr.idl:
11:45 AM Changeset in webkit [216255] by dbates@webkit.org
  • 4 edits in trunk/Tools

Use EXPECT_EQ() when comparing strings in TestWebKitAPI tests
https://bugs.webkit.org/show_bug.cgi?id=171698

Reviewed by Darin Adler.

We should use EXPECT_EQ() instead of EXPECT_TRUE() to compare WTF::String() objects
so that we get pretty diff output when the actual string differs from the expected
string as opposed to seeing a boolean result. The former makes makes it straightforward
to diagnose a regression without reading the code for the test or instrumenting it to
determine the actual string that was compared.

  • TestWebKitAPI/Tests/WTF/WTFString.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm:

(TestWebKitAPI::TEST_F):

11:41 AM Changeset in webkit [216254] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark w3c test persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=161360

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:39 AM Changeset in webkit [216253] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: !frame().document()->inRenderTreeUpdate() in WebCore::FrameView::layout(bool)
https://bugs.webkit.org/show_bug.cgi?id=171717

Reviewed by Brent Fulgham.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkCompleted):

Don't allow frame load to complete in the middle of a render tree update. Instead delay the check.

11:22 AM Changeset in webkit [216252] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark 2 webrtc test as failing.
https://bugs.webkit.org/show_bug.cgi?id=171728

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-05

  • platform/ios-wk2/TestExpectations:
11:14 AM Changeset in webkit [216251] by Chris Dumez
  • 5 edits in trunk

Refactor / Clean up Element.idl
https://bugs.webkit.org/show_bug.cgi?id=171734

Reviewed by Sam Weinig.

Source/WebCore:

Refactor / Clean up Element.idl to match the latest specification:

There is no Web-facing behavior change in this patch besides the Element properties
being enumerated in a slightly different order. Things that do not match the
specification have merely been annotated with FIXME comments for now. This makes
it much more obvious what's standard, what's not and what needs fixing.

  • dom/Element.idl:

LayoutTests:

Rebaseline a couple of tests due to Element properties being enumerated in a slightly
different order and because exception messages have changed slightly.

  • fast/dom/Element/attr-param-typechecking-expected.txt:
  • js/dom/dom-static-property-for-in-iteration-expected.txt:
11:13 AM Changeset in webkit [216250] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Link drag images for apple.com front page links have a lot of spurious whitespace
https://bugs.webkit.org/show_bug.cgi?id=171719
<rdar://problem/32010854>

Reviewed by Wenson Hsieh.

  • page/DragController.cpp:

(WebCore::DragController::startDrag):
Use the white-space-simplified string that we put on the pasteboard
for the drag image, too!

11:11 AM Changeset in webkit [216249] by Chris Dumez
  • 15 edits
    3 moves in trunk

Rename webProcessDidCrashWithReason callback to webProcessDidTerminate and stop calling webProcessDidCrash for client terminations
https://bugs.webkit.org/show_bug.cgi?id=171624

Reviewed by Dan Bernstein.

Source/WebKit2:

Follow-up fixes after r216129 based on feedback I have received:

  • Rename webProcessDidCrashWithReason callback function to webProcessDidTerminate given that this is called for non-crashes (e.g. terminations requested by the client).
  • Rename WKProcessCrashReason / ProcessCrashReason to WKProcessTerminationReason / ProcessTerminationReason for consistency with the new naming.
  • Stop calling processDidCrash / webProcessDidCrash for terminations requested by the client, to maintain pre-r216129 behavior. Those are not crashes (The client used an API such as WKPageTerminateProcess()). webProcessDidTerminate will still be called though.
  • Fix a bug where - for terminations due to resource limits - WebPageProxy::processDidCrash() was getting called twice: First by WebProcessProxy::requestTermination() with reason "RequestedByClient" then a second time by WebProcessProxy::terminateProcessDueToResourceLimits() with the proper reason.
  • Shared/ProcessTerminationReason.h: Renamed from Source/WebKit2/Shared/ProcessCrashReason.h.
  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::processDidTerminate):

  • UIProcess/API/C/WKAPICast.h:

(WebKit::toAPI):

  • UIProcess/API/C/WKPage.cpp:

(WKPageTerminate):
(WKPageSetPageNavigationClient):

  • UIProcess/API/C/WKPageNavigationClient.h:
  • UIProcess/API/C/WKProcessTerminationReason.h: Renamed from Source/WebKit2/UIProcess/API/C/WKProcessCrashReason.h.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _killWebContentProcessAndResetState]):

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

(WebKit::NavigationState::NavigationClient::processDidTerminate):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidTerminate):

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

(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::requestTermination):
(WebKit::WebProcessProxy::logDiagnosticMessageForResourceLimitTermination):
(WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

  • UIProcess/WebProcessProxy.h:
  • WebKit2.xcodeproj/project.pbxproj:

Tools:

Extend API test coverage to cover crashes in addition to terminations requested by the client.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/ProcessDidTerminate.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKit2/ProcessDidCrashWithReason.cpp.

(TestWebKitAPI::webProcessWasTerminatedByClient):
(TestWebKitAPI::webProcessCrashed):
(TestWebKitAPI::TEST):

11:10 AM Changeset in webkit [216248] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Mac cmake buildfix after r216037
https://bugs.webkit.org/show_bug.cgi?id=171558

Patch by Derek Schuff <dschuff@chromium.org> on 2017-05-05
Reviewed by JF Bastien.

  • PlatformMac.cmake:
10:35 AM Changeset in webkit [216247] by clopez@igalia.com
  • 2 edits in trunk/Source/WebKit2

[GTK] Enable runtime flag for MediaDevices with enable-media-stream property.
https://bugs.webkit.org/show_bug.cgi?id=171730

Reviewed by Michael Catanzaro.

After r215939 the MediaDevices runtime setting has to be enabled
also to use MediaStream / WebRTC.

Enable it as part of the enable-media-stream property of the
WebKitGTK+ API.

  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_set_enable_media_stream):

9:14 AM Changeset in webkit [216246] by mark.lam@apple.com
  • 4 edits in trunk

DRT's setAudioResultCallback() and IDBRequest::setResult() need to acquire the JSLock.
https://bugs.webkit.org/show_bug.cgi?id=171716
<rdar://problem/30878027>

Reviewed by Saam Barati.

Source/WebCore:

No new tests. This issue was caught by existing tests.

IDBRequest::setResult() needs to acquire the JSLock before calling toJS() (which
does JS conversion and therefore, potentially JS allocations).

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):

Tools:

setAudioResultCallback() needs to acquire the JSLock before calling toJS() (which
does JS conversion and therefore, potentially JS allocations) and accessing
methods of internal JS data structures (which may do JS invocation, etc).

  • DumpRenderTree/TestRunner.cpp:

(setAudioResultCallback):

8:49 AM Changeset in webkit [216245] by commit-queue@webkit.org
  • 5 edits in trunk

REGRESSION (r215951): LayoutTest media/modern-media-controls/placard-support/placard-support-pip.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=171610
<rdar://problem/31976820>

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

Source/WebKit/mac:

Fullscreen state gets confused because WK1 WebChromeClient doesn't implement exitVideoFullscreenToModeWithoutAnimation.

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

(WebChromeClient::exitVideoFullscreenToModeWithoutAnimation):

LayoutTests:

enable test: media/modern-media-controls/pip-support/pip-support-click.html

  • platform/mac-wk1/TestExpectations:
8:33 AM Changeset in webkit [216244] by Jonathan Bedard
  • 2 edits in trunk/Tools

buildbot: Cleanup simulators after running tests
https://bugs.webkit.org/show_bug.cgi?id=171679
<rdar://problem/31994361>

Reviewed by Aakash Jain.

We shutdown the simulator process between tests, but in some cases, this is not
sufficient. Explicitly shutdown every booted simulator.

  • BuildSlaveSupport/kill-old-processes:

(main): Shutdown all booted simulators.

6:37 AM Changeset in webkit [216243] by Carlos Garcia Campos
  • 8 edits in trunk

[GTK] Assertion failure in Inspector::RemoteInspector::setRemoteInspectorClient when disposing WebKitWebContext
https://bugs.webkit.org/show_bug.cgi?id=171644

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Fix ASSERT that requires given client to be a valid pointer, since it's valid to pass nullptr to unset the
client. The ASSERT now ensures that client is set or unset. I also renamed the function to setClient because
setRemoteInspectorClient is redundant for a class named RemoteInspector. And added a getter too, to check if the
remote inspector has a client.

  • inspector/remote/RemoteInspector.cpp:

(Inspector::RemoteInspector::setClient):

  • inspector/remote/RemoteInspector.h:

Source/WebKit2:

Ensure that it's not possible to enable automation in more than one WebKitWebContext at the same time. Instead
of creating the AutomationClient unconditionally when the context is constructed, it's now created only when
automation is enabled, and deleted if it's disabled.

  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_is_automation_allowed):
(webkit_web_context_set_automation_allowed):

  • UIProcess/Cocoa/AutomationClient.mm:

(WebKit::AutomationClient::AutomationClient):
(WebKit::AutomationClient::~AutomationClient):

Tools:

Check that only one WebKitWebContext can have automation enabled.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp:

(testAutomationSessionRequestSession):

6:29 AM Changeset in webkit [216242] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of tests failing after GST upgrade to 1.10.4.

  • platform/gtk/TestExpectations:
6:20 AM Changeset in webkit [216241] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] TestController timeout source callback should return G_SOURCE_REMOVE
https://bugs.webkit.org/show_bug.cgi?id=171724

Reviewed by Michael Catanzaro.

It's currently returning CONTINUE which causes it to be called again even if the run loop has been stopped.

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:

(WTR::timeoutSource):

5:05 AM Changeset in webkit [216240] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GStreamer] Do not report more errors after the first one
https://bugs.webkit.org/show_bug.cgi?id=171722

Reviewed by Xabier Rodriguez-Calvar.

We can receive several error messages for the same error from different elements. That's not expected by the
media source selection algorithm implementation. I don't know if didn't happen with previous versions of GST,
but since the upgrade to 1.10.4 several tests are failing because of this.

Fixes: media/video-error-does-not-exist.html

media/video-load-networkState.html
media/video-source-error.html
media/video-source-none-supported.html
media/video-source-moved.html

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Return early also when an error already occured.

5:02 AM Changeset in webkit [216239] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GStreamer] Fix handling of gst errors in MediaPlayerPrivateGStreamer::handleMessage
https://bugs.webkit.org/show_bug.cgi?id=171721

Reviewed by Xabier Rodriguez-Calvar.

We are checking the GError only comparing the code, and ignoring the domain in some cases. Use g_error_matches()
in those cases instead of only checking the code.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

4:56 AM Changeset in webkit [216238] by Carlos Garcia Campos
  • 2 edits
    5 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline several tests.

  • platform/gtk/editing/simple-line-layout-caret-is-gone-expected.txt: Added.
  • platform/gtk/fast/repaint/mutate-non-visible-expected.txt: Added.
  • platform/gtk/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt:
  • platform/gtk/http/tests/security/video-cross-origin-accessfailure-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt: Added.
1:53 AM Changeset in webkit [216237] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix wrong assert after r215176.

Cairo surface received by computeMD5HashStringForCairoSurface() doesn't need to be ARGB32 since r215176, it
could also be RGB24 when created from a web view snapshot.

  • WebKitTestRunner/cairo/TestInvocationCairo.cpp:

(WTR::computeMD5HashStringForCairoSurface):

1:37 AM Changeset in webkit [216236] by zandobersek@gmail.com
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening.

  • platform/gtk/TestExpectations: Enable already-passing Web Crypto layout tests

for the GTK+ port. Also update expectations for the imported W3C Web Crypto tests.

May 4, 2017:

11:37 PM Changeset in webkit [216235] by Brian Burg
  • 2 edits in trunk/Tools

lldb_webkit.py should provide a type summary for WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=171670

Reviewed by Jer Noble.

Just print out the underlying string using the WTFString provider.

  • lldb/lldb_webkit.py:

(lldb_init_module):
(WebCoreURL_SummaryProvider):
(WebCoreURLProvider):
(WebCoreURLProvider.
init):
(WebCoreURLProvider.to_string):

10:37 PM Changeset in webkit [216234] by commit-queue@webkit.org
  • 64 edits
    6 copies
    73 adds in trunk

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

Multiple LayoutTests crashing in Document::page() (Requested
by ap on #webkit).

Reverted changeset:

"Remove support for legacy Notifications"
https://bugs.webkit.org/show_bug.cgi?id=171487
http://trac.webkit.org/changeset/216206

10:09 PM Changeset in webkit [216233] by Chris Dumez
  • 37 edits in trunk/Source/WebCore

Drop remaining uses of PassRefPtr from CompositeEditCommand
https://bugs.webkit.org/show_bug.cgi?id=171645

Reviewed by Darin Adler.

Drop remaining uses of PassRefPtr from CompositeEditCommand.

  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
(WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
(WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes):
(WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
(WebCore::ApplyStyleCommand::removeCSSStyle):
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
(WebCore::ApplyStyleCommand::splitTextAtStart):
(WebCore::ApplyStyleCommand::splitTextAtEnd):
(WebCore::ApplyStyleCommand::splitTextElementAtStart):
(WebCore::ApplyStyleCommand::splitTextElementAtEnd):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::addBlockStyle):
(WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
(WebCore::ApplyStyleCommand::applyInlineStyleChange):
(WebCore::ApplyStyleCommand::joinChildTextNodes):

  • editing/BreakBlockquoteCommand.cpp:

(WebCore::BreakBlockquoteCommand::doApply):

  • editing/CompositeEditCommand.cpp:

(WebCore::applyCommand):
(WebCore::CompositeEditCommand::insertNodeAt):
(WebCore::CompositeEditCommand::removeChildrenInRange):
(WebCore::CompositeEditCommand::removeNode):
(WebCore::CompositeEditCommand::removeNodePreservingChildren):
(WebCore::CompositeEditCommand::removeNodeAndPruneAncestors):
(WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
(WebCore::CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes):
(WebCore::CompositeEditCommand::prune):
(WebCore::CompositeEditCommand::splitTextNode):
(WebCore::CompositeEditCommand::splitElement):
(WebCore::CompositeEditCommand::mergeIdenticalElements):
(WebCore::CompositeEditCommand::splitTextNodeContainingElement):
(WebCore::CompositeEditCommand::positionOutsideTabSpan):
(WebCore::CompositeEditCommand::removeNodeAttribute):
(WebCore::CompositeEditCommand::setNodeAttribute):
(WebCore::CompositeEditCommand::deleteInsignificantText):
(WebCore::CompositeEditCommand::removePlaceholderAt):
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
(WebCore::CompositeEditCommand::pushAnchorElementDown):
(WebCore::CompositeEditCommand::cleanupAfterDeletion):
(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/CompositeEditCommand.h:
  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
(WebCore::DeleteSelectionCommand::removeNodeUpdatingStates):
(WebCore::DeleteSelectionCommand::removeNode):
(WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
(WebCore::DeleteSelectionCommand::removeRedundantBlocks):

  • editing/DeleteSelectionCommand.h:
  • editing/Editor.cpp:

(WebCore::ClearTextCommand::CreateAndApply):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::handleAcceptedCandidate):

  • editing/EditorCommand.cpp:

(WebCore::executeFormatBlock):

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::outdentParagraph):

  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::doApply):

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::fixOrphanedListChild):
(WebCore::InsertListCommand::doApplyForSingleParagraph):
(WebCore::InsertListCommand::unlistifyParagraph):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::insertTab):

  • editing/ModifySelectionListLevel.cpp:

(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeBefore):
(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeAfter):
(WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange):
(WebCore::DecreaseSelectionListLevelCommand::doApply):

  • editing/RemoveNodePreservingChildrenCommand.cpp:

(WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
(WebCore::RemoveNodePreservingChildrenCommand::doApply):

  • editing/RemoveNodePreservingChildrenCommand.h:

(WebCore::RemoveNodePreservingChildrenCommand::create):

  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand):
(WebCore::ReplaceNodeWithSpanCommand::doApply):
(WebCore::ReplaceNodeWithSpanCommand::doUnapply):
(WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand):

  • editing/ReplaceNodeWithSpanCommand.h:

(WebCore::ReplaceNodeWithSpanCommand::create):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::removeNodePreservingChildren):
(WebCore::ReplacementFragment::removeInterchangeNodes):
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
(WebCore::handleStyleSpansBeforeInsertion):
(WebCore::ReplaceSelectionCommand::handleStyleSpans):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
(WebCore::ReplaceSelectionCommand::insertAsListItems):
(WebCore::ReplaceSelectionCommand::performTrivialReplace):

  • editing/SetNodeAttributeCommand.cpp:

(WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand):
(WebCore::SetNodeAttributeCommand::getNodesInCommand):

  • editing/SetNodeAttributeCommand.h:

(WebCore::SetNodeAttributeCommand::create):

  • editing/SimplifyMarkupCommand.cpp:

(WebCore::SimplifyMarkupCommand::doApply):
(WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):

  • editing/SimplifyMarkupCommand.h:
  • editing/SplitElementCommand.cpp:

(WebCore::SplitElementCommand::SplitElementCommand):
(WebCore::SplitElementCommand::executeApply):
(WebCore::SplitElementCommand::getNodesInCommand):

  • editing/SplitElementCommand.h:

(WebCore::SplitElementCommand::create):

  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::SplitTextNodeCommand):
(WebCore::SplitTextNodeCommand::doApply):
(WebCore::SplitTextNodeCommand::doUnapply):
(WebCore::SplitTextNodeCommand::doReapply):
(WebCore::SplitTextNodeCommand::insertText1AndTrimText2):

  • editing/SplitTextNodeCommand.h:

(WebCore::SplitTextNodeCommand::create):

  • editing/SplitTextNodeContainingElementCommand.cpp:

(WebCore::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
(WebCore::SplitTextNodeContainingElementCommand::doApply):

  • editing/SplitTextNodeContainingElementCommand.h:

(WebCore::SplitTextNodeContainingElementCommand::create):

  • editing/TextInsertionBaseCommand.cpp:

(WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::makeEditableRootEmpty):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):

9:04 PM Changeset in webkit [216232] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix misspelled word "interrupt" as pointed out by Darin Adler
in <https://bugs.webkit.org/show_bug.cgi?id=171577>.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::transitionToCommitted):

8:24 PM Changeset in webkit [216231] by mark.lam@apple.com
  • 2 edits in trunk/Tools

API test WTF.StaticStringImpl crashing in TestWebKitAPI::WTF_StaticStringImpl_Test::TestBody() + 3188
https://bugs.webkit.org/show_bug.cgi?id=171702

Reviewed by Filip Pizlo.

The test was supposed to use the MAKE_STATIC_STRING_IMPL macro. I had previously
changed it to instantiate an automatic StaticStringImpl (i.e. stack allocated) to
confirm that the test will detect a regression. Unfortunately, I forgot to
change it back to using MAKE_STATIC_STRING_IMPL before I landed the test.
This patch fixes that.

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::neverDestroyedString):

8:20 PM Changeset in webkit [216230] by Ryan Haddad
  • 2 edits in trunk/Tools

Disable failing API test WebKit2.ResizeWithHiddenContentDoesNotHang.
https://bugs.webkit.org/show_bug.cgi?id=170195

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AnimatedResize.mm:

(TEST):

7:32 PM Changeset in webkit [216229] by commit-queue@webkit.org
  • 4 edits in trunk/Source

UIColor +whiteColor and +clearColor are ambiguous and need to be casted when soft linked.
https://bugs.webkit.org/show_bug.cgi?id=171704

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

Source/WebCore:

No new tests because no behavior change.

Fix build by casting result of +clearColor to UIColor.

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(clearUIColor):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):
(WebVideoFullscreenInterfaceAVKit::didStopPictureInPicture):

Source/WebKit/mac:

Fix build by casting result of +whiteColor to UIColor.

  • WebView/WebView.mm:

(-[WebView _createImageWithPlatterForImage:boundingRect:contentScaleFactor:clippingRects:]):

7:19 PM Changeset in webkit [216228] by Chris Dumez
  • 3 edits
    2 adds in trunk

Element.slot should be marked as [Unscopable]
https://bugs.webkit.org/show_bug.cgi?id=171683

Reviewed by Darin Adler.

Source/WebCore:

Element.slot should be marked as [Unscopable]:

Test: fast/shadow-dom/Element-slot-unscopable.html

  • dom/Element.idl:

LayoutTests:

Add layout test coverage. This test is passing in Firefox and Chrome.

  • fast/shadow-dom/Element-slot-unscopable-expected.txt: Added.
  • fast/shadow-dom/Element-slot-unscopable.html: Added.
7:11 PM Changeset in webkit [216227] by commit-queue@webkit.org
  • 24 edits in trunk

[Win] Remove redundant macros that are set in the CMake config
https://bugs.webkit.org/show_bug.cgi?id=171571

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-04
Reviewed by Brent Fulgham.

.:

  • Source/cmake/OptionsWin.cmake:

Source/JavaScriptCore:

  • config.h:

Source/ThirdParty/ANGLE:

  • CMakeLists.txt:

Source/WebCore:

No new tests. No change in behavior.

  • WebCorePrefix.h:
  • config.h:
  • platform/win/COMPtr.h:
  • platform/win/WindowsTouch.h:
  • testing/js/WebCoreTestSupportPrefix.h:

Source/WebCore/PAL:

No new tests. No change in behavior.

  • config.h:

Source/WebKit/win:

  • COMEnumVariant.h:
  • COMPropertyBag.h:
  • WebKitPrefix.h:

Source/WTF:

  • config.h:

Tools:

  • DumpRenderTree/config.h:
  • MiniBrowser/win/stdafx.h:
  • TestWebKitAPI/config.h:
7:07 PM Changeset in webkit [216226] by timothy_horton@apple.com
  • 4 edits
    1 add in trunk/Source/WebCore

[Mac] Modernize image for dragged link
https://bugs.webkit.org/show_bug.cgi?id=171701
<rdar://problem/31978818>

Reviewed by Simon Fraser.

  • WebCore.xcodeproj/project.pbxproj:
  • page/mac/DragControllerMac.mm:
  • platform/mac/DragImageMac.mm:

(WebCore::dragImageSize):
(WebCore::scaleDragImage):
(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):
(WebCore::LinkImageLayout::LinkImageLayout):
(WebCore::LinkImageLayout::layOutText):
(WebCore::LinkImageLayout::addLine):
(WebCore::createDragImageForLink):
(WebCore::fontFromNSFont): Deleted.
(WebCore::canUseFastRenderer): Deleted.
(WebCore::widthWithFont): Deleted.
(WebCore::drawAtPoint): Deleted.
(WebCore::drawDoubledAtPoint): Deleted.

  • platform/spi/cocoa/LinkPresentationSPI.h: Added.

Improve the design of URL drag images.
The margins are increased, the background is now white, the text is
not drawn doubled-up, the title will now wrap to two lines, and the
domain name will appear simplified and de-punycoded.

Much of the implementation of text painting is borrowed from
<attachment> for now, but we should figure out how to generalize
it for UI-like parts of WebKit in the future.

6:53 PM Changeset in webkit [216225] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

Change the asynchronous image decoding tests to use the event webkitImageFrameReady
https://bugs.webkit.org/show_bug.cgi?id=171634

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-04
Reviewed by Simon Fraser.

To test the async image decoding reliably we need to do the following:

-- Make sure to load the image before setting its src to the element.
-- Call document.body.offsetHeight to force layout.
-- Call testRunner.display() to force the first paint.
-- Use the webkitImageFrameReady to reliably know when an image frame is ready.
-- When webkitImageFrameReady is fired call testRunner.notifyDone(). This

will force the second paint.

  • fast/images/async-image-background-image-repeated.html:
  • fast/images/async-image-background-image.html:
  • fast/images/sprite-sheet-image-draw.html:
6:42 PM Changeset in webkit [216224] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

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

not quite ready (Requested by thorton on #webkit).

Reverted changeset:

"[Mac] Modernize image for dragged link"
https://bugs.webkit.org/show_bug.cgi?id=171701
http://trac.webkit.org/changeset/216223

6:36 PM Changeset in webkit [216223] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

[Mac] Modernize image for dragged link
https://bugs.webkit.org/show_bug.cgi?id=171701
<rdar://problem/31978818>

Reviewed by Simon Fraser.

  • page/mac/DragControllerMac.mm:
  • platform/mac/DragImageMac.mm:

(WebCore::dragImageSize):
(WebCore::scaleDragImage):
(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):
(WebCore::LinkImageLayout::LinkImageLayout):
(WebCore::LinkImageLayout::addLine):
(WebCore::createDragImageForLink):
(WebCore::fontFromNSFont): Deleted.
(WebCore::canUseFastRenderer): Deleted.
(WebCore::widthWithFont): Deleted.
(WebCore::drawAtPoint): Deleted.
(WebCore::drawDoubledAtPoint): Deleted.
Improve the design of URL drag images.
The margins are increased, the background is now white, the text is
not drawn doubled-up, the title will now wrap to two lines, and the
domain name will appear simplified and de-punycoded.

Much of the implementation of text painting is borrowed from
<attachment> for now, but we should figure out how to generalize
it for UI-like parts of WebKit in the future.

6:05 PM Changeset in webkit [216222] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark webrtc/libwebrtc/descriptionGetters.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171703

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-04

  • platform/mac-wk2/TestExpectations:
5:57 PM Changeset in webkit [216221] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Use if instead of return early for 13 places in WebAVPlayerController
https://bugs.webkit.org/show_bug.cgi?id=171692

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

No new tests because no behavior change.

  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController play:]):
(-[WebAVPlayerController pause:]):
(-[WebAVPlayerController togglePlayback:]):
(-[WebAVPlayerController beginScrubbing:]):
(-[WebAVPlayerController endScrubbing:]):
(-[WebAVPlayerController seekToTime:]):
(-[WebAVPlayerController beginScanningForward:]):
(-[WebAVPlayerController endScanningForward:]):
(-[WebAVPlayerController beginScanningBackward:]):
(-[WebAVPlayerController endScanningBackward:]):
(-[WebAVPlayerController seekToBeginning:]):
(-[WebAVPlayerController seekToEnd:]):
(-[WebAVPlayerController toggleMuted:]):

5:46 PM Changeset in webkit [216220] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Gardening: Build fix for Windows after r216217.
https://bugs.webkit.org/show_bug.cgi?id=171586

Not reviewed.

  • shell/PlatformWin.cmake:
5:06 PM Changeset in webkit [216219] by commit-queue@webkit.org
  • 8 edits in trunk/Tools

Add testRunner.display() to force displaying the web page for testing
https://bugs.webkit.org/show_bug.cgi?id=171694

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-04
Reviewed by Simon Fraser.

Unlike testRunner.displayAndTrackRepaints(), this new function forces
drawing the web page but without track repaints.

  • DumpRenderTree/TestRunner.cpp:

(displayCallback):
(TestRunner::staticFunctions):

  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::display):

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::display):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::display):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
4:37 PM Changeset in webkit [216218] by fpizlo@apple.com
  • 19 edits
    4 adds in trunk/Source

JSC::Heap should expose a richer API for requesting GCs
https://bugs.webkit.org/show_bug.cgi?id=171690

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:


I want to stop WebCore from requesting synchronous GCs. But various parts of that work
may cause regressions, so I'd like to land it separately from the functionality that is
needed on the JSC side. This change is mostly a JSC-side refactoring that does not
change behavior. In the future I'll land the behavior changes (i.e. not requesting sync
GCs).

This change allows you to enumerate over synchronousness, so that we can make all APIs
take synchronousness as an argument. It replaces the collectAllGarbage API with a
collectNow(Synchronousness, GCRequest) API. GCRequest is a new concept, which subsumes
std::optional<CollectionScope> and gives us the ability to register callbacks along
with a GC. So, you can ask for an async GC and get a callback when it's done.

Also adds ability to request that fastMalloc memory be released after the incremental
sweeper finishes.

  • API/JSBase.cpp:

(JSSynchronousGarbageCollectForDebugging):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::doCollection):

  • heap/FullGCActivityCallback.h:
  • heap/GCRequest.cpp: Added.

(JSC::GCRequest::subsumedBy):
(JSC::GCRequest::dump):

  • heap/GCRequest.h: Added.

(JSC::GCRequest::GCRequest):

  • heap/Heap.cpp:

(JSC::Heap::collect):
(JSC::Heap::collectNow):
(JSC::Heap::collectAsync):
(JSC::Heap::collectSync):
(JSC::Heap::runBeginPhase):
(JSC::Heap::runEndPhase):
(JSC::Heap::requestCollection):
(JSC::Heap::willStartCollection):
(JSC::Heap::sweeper):
(JSC::Heap::collectNowFullIfNotDoneRecently):
(JSC::Heap::shouldDoFullCollection):
(JSC::Heap::collectAllGarbage): Deleted.
(JSC::Heap::collectAllGarbageIfNotDoneRecently): Deleted.

  • heap/Heap.h:
  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::buildSnapshot):

  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::doSweep):

  • heap/IncrementalSweeper.h:

(JSC::IncrementalSweeper::freeFastMallocMemoryAfterSweeping):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::doTestCollectionsIfNeeded):

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::sweep):

  • heap/Synchronousness.cpp: Added.

(WTF::printInternal):

  • heap/Synchronousness.h: Added.
  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::InspectorHeapAgent::gc):

  • jsc.cpp:

(functionGCAndSweep):
(runJSC):

  • tools/JSDollarVMPrototype.cpp:

(JSC::JSDollarVMPrototype::gc):

  • wasm/WasmMemory.cpp:

Source/WebCore:

No new tests because this is just a refactoring.

Change some function calls now that some JSC::Heap APIs got renamed.

  • bindings/js/GCController.cpp:

(WebCore::collect):
(WebCore::GCController::garbageCollectNow):
(WebCore::GCController::garbageCollectNowIfNotDoneRecently):

4:24 PM Changeset in webkit [216217] by mark.lam@apple.com
  • 71 edits
    2 adds in trunk

NeverDestroyed<String>(ASCIILiteral(...)) is not thread safe.
https://bugs.webkit.org/show_bug.cgi?id=171586
<rdar://problem/31873190>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

JavaScriptCore allows multiple VMs to be instantiated, and each of these should
be able to run concurrently on different threads. There is code in the VM that
allocates NeverDestroyed<String>(ASCIILiteral(...)) to defined immortal strings
meant to be shared by all VMs.

However, NeverDestroyed<String>(ASCIILiteral(...)) is not thread-safe because
each thread will ref and deref the underlying StringImpl. Since this ref and
deref is not done in a thread-safe way, the NeverDestroyed<String> may get
destroyed due to the ref/deref races. Additionally, each thread may modify the
StringImpl by setting its hash and also twiddling its flags.

The fix is to use the StaticStringImpl class which is safe for ref/derefing
concurrently from different threads. StaticStringImpl is also pre-set with a
hash on construction, and its flags are set in such a way as to prevent twiddling
at runtime. Hence, we will be able to share a NeverDestroyed<String> between
VMs, as long as it is backed by a StaticStringImpl.

An alternative solution would be to change all the uses of NeverDestroyed<String>
to use per-VM strings. However, this solution is cumbersome, and makes it harder
to allocate the intended shared string. It also uses more memory and takes more
CPU time because it requires allocating the same string for each VM instance.
The StaticStringImpl solution wins out because it is more efficient and is easier
to use.

The StaticStringImpl solution also can be used in WTF without a layer violation.
See Source/WTF/wtf/text/icu/TextBreakIteratorICU.h for an example.

Also added the MultithreadedMultiVMExecutionTest which runs multiple VMs in
multiple threads, all banging on the BuiltinExecutable's baseConstructorCode
NeverDestroyed<String>. The test will manifest the issue reliably (before this
fix) if run on an ASAN build.

  • API/tests/MultithreadedMultiVMExecutionTest.cpp: Added.

(threadsList):
(startMultithreadedMultiVMExecutionTest):
(finalizeMultithreadedMultiVMExecutionTest):

  • API/tests/MultithreadedMultiVMExecutionTest.h: Added.
  • API/tests/testapi.c:

(main):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createDefaultConstructor):

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::objectGroupForBreakpointAction):

  • replay/scripts/CodeGeneratorReplayInputsTemplates.py:
  • replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::SavedMouseButton>::type):

  • replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::SavedMouseButton>::type):

  • replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::HandleWheelEvent>::type):

  • replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::FormCombo>::type):

  • replay/scripts/tests/expected/generate-input-with-guard.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::GetCurrentTime>::type):
(JSC::InputTraits<Test::SetRandomSeed>::type):

  • replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::ArrayOfThings>::type):
(JSC::InputTraits<Test::SavedHistory>::type):

  • replay/scripts/tests/expected/generate-inputs-with-flags.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::ScalarInput1>::type):
(JSC::InputTraits<Test::ScalarInput2>::type):

  • replay/scripts/tests/expected/generate-memoized-type-modes.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::ScalarInput>::type):
(JSC::InputTraits<Test::MapInput>::type):

  • runtime/IntlObject.cpp:

(JSC::numberingSystemsForLocale):

Source/WebCore:

No new tests because we're just converting uses of ASCIILiteral (in the
instantiation of NeverDestroyed<String> and NeverDestroyed<const String>) to
MAKE_STATIC_STRING_IMPL.

The correctness of using MAKE_STATIC_STRING_IMPL is tested in the newly added
API test in this patch.

Also changed "static NeverDestroyed<ASCIILiteral>" instances in
SQLiteIDBBackingStore.cpp to "static const char* const" because they are only
ever used to get the underlying const char*.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):

  • Modules/mediastream/MediaEndpointSessionDescription.cpp:
  • Modules/mediastream/RTCRtpTransceiver.cpp:
  • Modules/mediastream/SDPProcessor.cpp:
  • Modules/navigatorcontentutils/NavigatorContentUtils.cpp:

(WebCore::customHandlersStateString):
(WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):

  • Modules/speech/SpeechSynthesis.cpp:

(WebCore::SpeechSynthesis::boundaryEventOccurred):

  • accessibility/AccessibilityMediaControls.cpp:

(WebCore::AccessibilityMediaControl::controlTypeName):
(WebCore::AccessibilityMediaControl::title):
(WebCore::AccessibilityMediaControlsContainer::elementTypeName):
(WebCore::AccessibilityMediaTimeline::helpText):
(WebCore::AccessibilityMediaTimeDisplay::accessibilityDescription):

  • bindings/js/JSLazyEventListener.cpp:

(WebCore::eventParameterName):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):

  • css/CSSDefaultStyleSheets.cpp:

(WebCore::screenEval):
(WebCore::printEval):

  • css/MediaList.cpp:

(WebCore::addResolutionWarningMessageToConsole):

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parseAuthorStyleSheet):

  • dom/Document.cpp:

(WebCore::Document::readyState):

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::notifyFinished):

  • dom/PseudoElement.cpp:

(WebCore::PseudoElement::pseudoElementNameForEvents):

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::shouldAddNamespaceElement):

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::dataDetectorURLProtocol):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
(WebCore::createMarkupInternal):

  • html/FormController.cpp:

(WebCore::formStateSignature):

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::appendFormData):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::realizeSaves):
(WebCore::CanvasRenderingContext2D::getImageData):

  • html/parser/XSSAuditor.cpp:

(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):

  • html/track/VTTCue.cpp:

(WebCore::startKeyword):
(WebCore::middleKeyword):
(WebCore::endKeyword):
(WebCore::leftKeyword):
(WebCore::rightKeyword):
(WebCore::verticalGrowingLeftKeyword):
(WebCore::verticalGrowingRightKeyword):
(WebCore::VTTCue::determineTextDirection):
(WebCore::VTTCue::markFutureAndPastNodes):

  • inspector/InspectorCSSAgent.cpp:

(WebCore::computePseudoClassMask):

  • inspector/InspectorIndexedDBAgent.cpp:
  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::sourceMapURLForResource):

  • inspector/PageDebuggerAgent.cpp:

(WebCore::PageDebuggerAgent::sourceMapURLForScript):

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::notifyFinished):

  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::corsPolicyPreventedLoad):

  • loader/icon/IconDatabase.cpp:

(WebCore::IconDatabase::defaultDatabaseFilename):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin):

  • page/UserContentURLPattern.cpp:

(WebCore::UserContentURLPattern::parse):

  • platform/MIMETypeRegistry.cpp:

(WebCore::defaultMIMEType):

  • platform/animation/Animation.cpp:

(WebCore::Animation::initialName):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::engineDescription):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::engineDescription):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::similarFont):

  • platform/gtk/UserAgentGtk.cpp:

(WebCore::platformVersionForUAString):

  • platform/mock/mediasource/MockBox.cpp:

(WebCore::MockTrackBox::type):
(WebCore::MockInitializationBox::type):
(WebCore::MockSampleBox::type):

  • platform/network/HTTPHeaderValues.cpp:

(WebCore::HTTPHeaderValues::textPlainContentType):
(WebCore::HTTPHeaderValues::formURLEncodedContentType):
(WebCore::HTTPHeaderValues::noCache):
(WebCore::HTTPHeaderValues::maxAge0):

  • platform/network/HTTPParsers.cpp:

(WebCore::parseXSSProtectionHeader):

  • replay/MemoizedDOMResult.cpp:

(JSC::InputTraits<MemoizedDOMResultBase>::type):

  • svg/SVGTransformValue.cpp:

(WebCore::SVGTransformValue::transformTypePrefixForParsing):

Source/WebKit2:

  • Shared/API/APIError.cpp:

(API::Error::webKitErrorDomain):
(API::Error::webKitNetworkErrorDomain):
(API::Error::webKitPolicyErrorDomain):
(API::Error::webKitPluginErrorDomain):
(API::Error::webKitDownloadErrorDomain):
(API::Error::webKitPrintErrorDomain):

  • Shared/WebPreferencesKeys.cpp:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::executeEditCommand):

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::didBeginEditing):
(WebKit::WebEditorClient::respondToChangedContents):
(WebKit::WebEditorClient::respondToChangedSelection):
(WebKit::WebEditorClient::didEndEditing):

Source/WTF:

StaticStringImpl is meant to be thread-safe. However, it has a bug: it did not
set the s_hashFlagDidReportCost flag. As a result, if cost() is called on it,
different threads may try to change its flags bits at the same time. This patch
changes StaticStringImpl to always set the s_hashFlagDidReportCost flag.

Also factored out StringImplShape and made StringImpl and StaticStringImpl extend
it. This makes it more clear that the 2 are intended to have the same shape.
Note: there is already a static_assert that the 2 have the same size. This
change also ensures that they both have the same shape, which is a requirement in
order for StaticStringImpl to work.

Introduced the MAKE_STATIC_STRING_IMPL macro as a convenient way to instantiate
StaticStringImpls from literal strings. This allows us to trivially change

NeverDestroyed<String> myString(ASCIILiteral("myString"));

to ...

NeverDestroyed<String> myString(MAKE_STATIC_STRING_IMPL("myString"));

and by so doing, make it thread-safe.

MAKE_STATIC_STRING_IMPL instantiates a lambda function to create the static
StaticStringImpls.

  • wtf/text/StringImpl.h:

(WTF::StringImplShape::StringImplShape):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::cost):
(WTF::StringImpl::setHash):
(WTF::StringImpl::StaticStringImpl::StaticStringImpl):
(WTF::StringImpl::StaticStringImpl::operator StringImpl&):

  • wtf/text/WTFString.h:

(WTF::String::String):

  • wtf/text/icu/TextBreakIteratorICU.h:

(WTF::caretRules):

Tools:

API test for exercising StaticStringImpl and the MAKE_STATIC_STRING_IMPL macro.

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::neverDestroyedString):
(TestWebKitAPI::getNeverDestroyedStringAtStackDepth):
(TestWebKitAPI::TEST):

4:18 PM Changeset in webkit [216216] by commit-queue@webkit.org
  • 16 edits in trunk/Source

Source/WebCore:
Add muted to WebPlaybackSessionModel.
https://bugs.webkit.org/show_bug.cgi?id=171592
rdar://problem/31814074

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

No behavior change. This just adds the ability for UI to mute.

  • platform/cocoa/WebPlaybackSessionModel.h:

(WebCore::WebPlaybackSessionModelClient::mutedChanged):

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
(WebCore::WebPlaybackSessionModelMediaElement::toggleMuted):
(WebCore::WebPlaybackSessionModelMediaElement::observedEventNames):
(WebCore::WebPlaybackSessionModelMediaElement::isMuted):

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

(-[WebAVPlayerController toggleMuted:]):

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

(WebCore::WebPlaybackSessionInterfaceAVKit::mutedChanged):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(WebVideoFullscreenControllerContext::mutedChanged):
(WebVideoFullscreenControllerContext::isMuted):
(WebVideoFullscreenControllerContext::toggleMuted):

  • platform/spi/ios/MediaPlayerSPI.h:

Source/WebKit2:
Add mute to WebPlaybackSessionModel.
https://bugs.webkit.org/show_bug.cgi?id=171592
rdar://problem/31814074

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

Plumb through muted.

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionModelContext::toggleMuted):
(WebKit::WebPlaybackSessionModelContext::setMuted):
(WebKit::WebPlaybackSessionManagerProxy::setMuted):
(WebKit::WebPlaybackSessionManagerProxy::toggleMuted):

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.messages.in:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionInterfaceContext::mutedChanged):
(WebKit::WebPlaybackSessionManager::mutedChanged):
(WebKit::WebPlaybackSessionManager::toggleMuted):

4:04 PM Changeset in webkit [216215] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebCore

REGRESSION(r216138): Web Inspector: ASSERT(!content.isNull()) when checking for source map url opening inspector
https://bugs.webkit.org/show_bug.cgi?id=171697
<rdar://problem/31999512>

Reviewed by Matt Baker.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResourceContent):
Always set base64Encoded when returning true. Return the empty
string instead of a null string matching previous behavior.

4:03 PM Changeset in webkit [216214] by commit-queue@webkit.org
  • 1 edit
    13 adds in trunk/PerformanceTests

[INTL] Add PerformanceTests for Intl objects
https://bugs.webkit.org/show_bug.cgi?id=171695

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-05-04
Reviewed by Benjamin Poulain.

  • Intl/collator-compare-all-options.html: Added.
  • Intl/collator-compare-default.html: Added.
  • Intl/collator-create-all-options.html: Added.
  • Intl/collator-create-default.html: Added.
  • Intl/datetimeformat-create-all-options.html: Added.
  • Intl/datetimeformat-create-default.html: Added.
  • Intl/datetimeformat-format-all-options.html: Added.
  • Intl/datetimeformat-format-default.html: Added.
  • Intl/numberformat-create-all-options.html: Added.
  • Intl/numberformat-create-default.html: Added.
  • Intl/numberformat-format-all-options.html: Added.
  • Intl/numberformat-format-default.html: Added.
3:35 PM Changeset in webkit [216213] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebKit2

[WK2] Image action sheets sometimes do not dismiss when beginning data interaction
https://bugs.webkit.org/show_bug.cgi?id=171687
<rdar://problem/31996534>

Reviewed by Beth Dakin.

When presenting an image sheet using WKActionSheetAssistant, we may present the popover asynchronously. In this
case, even if -cleanupSheet is invoked after -showImageSheet, the popover will still be presented. To fix this,
add a flag, _hasPendingActionSheet, that is set to true when an image action sheet will be presented in the
future.

In cleanupSheet, we revert this flag to NO, and in the sheet presentation block, we first check to see if there
is a pending action sheet. If there is not, then simply do not invoke the image sheet presentation block.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant cleanupSheet]):

3:28 PM Changeset in webkit [216212] by wenson_hsieh@apple.com
  • 26 edits
    1 add in trunk

[WK2] Add support for keeping the selection in a focused editable element when dragging begins
https://bugs.webkit.org/show_bug.cgi?id=171585
<rdar://problem/31544320>

Reviewed by Beth Dakin and Zalan Bujtas.

Source/WebCore:

Covered by 4 API tests.

  • dom/DocumentMarker.h:

Introduces the DraggedContent DocumentMarker type, which applies to the Range in the DOM that is being used as
a drag source. Also adds DraggedContentData, which contains nodes found by the TextIterator in the process of
finding Ranges to mark.

(WebCore::DocumentMarker::AllMarkers::AllMarkers):

  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::addDraggedContentMarker):
(WebCore::shouldInsertAsSeparateMarker):
(WebCore::DocumentMarkerController::addMarker):

When adding DocumentMarkers of type DraggedContent, keep adjacent RenderReplaced elements separate, rather than
merging them into existing RenderedDocumentMarkers. This is because the data for each of these (i.e. the target
node) needs to be preserved.

(WebCore::DocumentMarkerController::markersFor):

Bail and return an empty list if the map of document markers cannot possibly contain a dragged content marker.

  • dom/DocumentMarkerController.h:
  • page/DragController.h:
  • page/DragState.h:

Add draggedContentRange to DragState. This tracks the Range that is being dragged; it is created when the drag
session has begun, and ends when drag session finishes (either via WebPage::dragEnded or WebPage::dragCancelled).

  • page/EventHandler.cpp:

(WebCore::repaintContentsOfRange):
(WebCore::EventHandler::dragCancelled):

Called when a drag is cancelled in the UI process without a session ever getting a chance to begin. We use this
as a hook to remove all DraggedContent document markers from the document of the dragged content range.

(WebCore::EventHandler::didStartDrag):

Called when a drag session has begun in the UI process. We use this as a hook to set up document markers for the
Range of content being dragged.

(WebCore::EventHandler::dragSourceEndedAt):

Called when a drag session ends. We use this as a hook to remove all DraggedContent document markers from the
document of the dragged content range.

(WebCore::EventHandler::draggedElement):

  • page/EventHandler.h:
  • page/FocusController.cpp:

(WebCore::shouldClearSelectionWhenChangingFocusedElement):

Prevent the selection from clearing when the previously focused element is editable and also contains the drag
source element. Ideally, we should experiment with clearing out the selection whenever the element is blurred
(and not have additional restrictions on editability and containing the drag source), but this change is much
riskier.

(WebCore::FocusController::setFocusedElement):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):

Use RenderText::draggedContentStartEnd to find the range of text (if any) that is dragged content, and paint
these ranges of text at a lower alpha using TextPainter::paintTextInRange.

  • rendering/RenderReplaced.cpp:

(WebCore::draggedContentContainsReplacedElement):

Determines whether or not the element being rendered is contained within a dragged content range. Assuming that
the DraggedContent type flag is set in DocumentMarkerController, we first look to see whether or not the
container node is in the document marker map. If so, instead of consulting node offset ranges (since this is, in
the worst-case, linear in the number of sibling nodes per RenderReplaced) we simply check the DraggedContentData
to see if the current element being rendered matches one of the target nodes.

(WebCore::RenderReplaced::paint):

If the element rendered by this RenderReplaced is dragged content, then render it at a low alpha.

  • rendering/RenderText.cpp:

(WebCore::RenderText::draggedContentRangesBetweenOffsets):

Determines what range of text, if any, contains dragged content by consulting the Document's DocumentMarkers.

  • rendering/RenderText.h:
  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintTextInRange):

Teach TextPainter to only paint a given range in a TextRun.

  • rendering/TextPainter.h:

Add TextPainter support for specifying special text offset ranges when rendering a TextRun, such that each
special range in text is rendered after applying some modification to the GraphicsContext.

Source/WebKit2:

Minor adjustments and refactoring in WebKit2. See WebCore ChangeLog for more details.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::startDrag):
(WebKit::WebPageProxy::didStartDrag):

Factor out code in WebPageProxy that sends a WebPage::DidStartDrag message to the web process into a separate
helper, and tweak the places where we directly send this IPC message to the web process to instead call this
helper.

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::setDragImage):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didStartDrag):
(WebKit::WebPage::dragCancelled):

Clear out state in the web process and call out to the EventHandler to handle drag cancellation and the drag
start response from the UI process.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::didStartDrag): Deleted.
(WebKit::WebPage::dragCancelled): Deleted.

Tools:

Adds 1 new unit test and tweaks existing tests to check that when first responder status is lost after beginning
a drag while editing, content is still moved (and not copied) when performing data interaction on a different
element. ContentEditableMoveParagraphs checks that content can be shifted within a single element via a move
operation rather than a copy.

See WebCore ChangeLog for more details.

Tests: DataInteractionSimulator.ContentEditableToContentEditable

DataInteractionSimulator.ContentEditableToTextarea
DataInteractionSimulator.ContentEditableMoveParagraphs
DataInteractionSimulator.TextAreaToInput

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/two-paragraph-contenteditable.html: Added.
  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

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

(-[DataInteractionSimulator initWithWebView:]):
(-[DataInteractionSimulator dealloc]):
(-[DataInteractionSimulator _advanceProgress]):
(-[DataInteractionSimulator waitForInputSession]):
(-[DataInteractionSimulator _webView:focusShouldStartInputSession:]):
(-[DataInteractionSimulator _webView:didStartInputSession:]):

2:46 PM Changeset in webkit [216211] by commit-queue@webkit.org
  • 165 edits in trunk

Tools:
Rename TestRunner.display() to TestRunner::displayAndTrackRepaints()
https://bugs.webkit.org/show_bug.cgi?id=171641

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-04
Reviewed by Simon Fraser.

The plan is to add back the TestRunner.display() which does the display
only without track repaints.

  • DumpRenderTree/DumpRenderTree.h:
  • DumpRenderTree/TestRunner.cpp:

(displayAndTrackRepaintsCallback):
(TestRunner::staticFunctions):
(displayCallback): Deleted.
(displayInvalidatedRegionCallback): Deleted.

  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(displayWebView):
(displayAndTrackRepaintsWebView):

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::displayAndTrackRepaints):
(TestRunner::display): Deleted.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::displayAndTrackRepaints):
(TestRunner::display): Deleted.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::displayAndTrackRepaints):
(WTR::TestRunner::display): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:
Rename testRunner.displayAndTrackRepaints() to testRunner.displayAndTrackRepaints()
https://bugs.webkit.org/show_bug.cgi?id=171641

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-04
Reviewed by Simon Fraser.

Replace all the calls to testRunner.displayAndTrackRepaints() by testRunner.displayAndTrackRepaints()
Replace all the calls to testRunner.displayInvalidatedRegion() by
testRunner.displayAndTrackRepaints() since the former is a copy of the later.

  • compositing/clip-change.html:
  • compositing/geometry/foreground-offset-change.html:
  • compositing/geometry/limit-layer-bounds-transformed-overflow.html:
  • compositing/iframes/become-composited-nested-iframes.html:
  • compositing/iframes/become-overlapped-iframe.html:
  • compositing/iframes/connect-compositing-iframe-delayed.html:
  • compositing/iframes/connect-compositing-iframe.html:
  • compositing/iframes/connect-compositing-iframe2.html:
  • compositing/iframes/connect-compositing-iframe3.html:
  • compositing/iframes/enter-compositing-iframe.html:
  • compositing/iframes/iframe-content-flipping.html:
  • compositing/iframes/iframe-resize.html:
  • compositing/iframes/iframe-size-to-zero.html:
  • compositing/iframes/iframe-src-change.html:
  • compositing/iframes/invisible-nested-iframe-hide.html:
  • compositing/iframes/invisible-nested-iframe-show.html:
  • compositing/iframes/leave-compositing-iframe.html:
  • compositing/iframes/overlapped-iframe-iframe.html:
  • compositing/iframes/overlapped-iframe.html:
  • compositing/iframes/overlapped-nested-iframes.html:
  • compositing/iframes/repaint-after-losing-scrollbars.html:
  • compositing/iframes/resources/fixed-position-subframe.html:
  • compositing/iframes/resources/fixed-position-transformed-subframe.html:
  • compositing/iframes/resources/scrollgrandchild-inner.html:
  • compositing/iframes/scrolling-iframe.html:
  • compositing/overflow/content-gains-scrollbars.html:
  • compositing/overflow/content-loses-scrollbars.html:
  • compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html:
  • compositing/overflow/overflow-scrollbar-layers.html:
  • compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html:
  • compositing/overflow/repaint-after-losing-scrollbars.html:
  • compositing/patterns/direct-pattern-compositing-add-text-expected.html:
  • compositing/patterns/direct-pattern-compositing-add-text.html:
  • compositing/patterns/direct-pattern-compositing-change-expected.html:
  • compositing/patterns/direct-pattern-compositing-change.html:
  • compositing/patterns/direct-pattern-compositing-load-expected.html:
  • compositing/patterns/direct-pattern-compositing-load.html:
  • compositing/plugins/invalidate_rect.html:
  • compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint.html:
  • compositing/repaint/iframes/compositing-iframe-scroll-repaint.html:
  • compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint.html:
  • compositing/repaint/newly-composited-on-scroll.html:
  • compositing/repaint/newly-composited-repaint-rect.html:
  • compositing/repaint/page-scale-repaint.html:
  • compositing/repaint/requires-backing-repaint.html:
  • compositing/repaint/transform-style-change.html:
  • compositing/rtl/rtl-overflow-invalidation.html:
  • compositing/scroll-painted-composited-content.html:
  • compositing/tiling/huge-layer-resize.html:
  • compositing/video-page-visibility.html:
  • compositing/video/video-with-invalid-source.html:
  • compositing/webgl/webgl-repaint.html:
  • css3/filters/multiple-filters-invalidation.html:
  • css3/flexbox/repaint-column-reverse.html:
  • css3/flexbox/repaint-during-resize-no-flex.html:
  • css3/flexbox/repaint-rtl-column.html:
  • css3/flexbox/repaint.html:
  • displaylists/canvas-display-list.html:
  • displaylists/resources/dump-target-display-list.js:

(doTest):

  • displaylists/resources/dump-target-replay-list.js:

(doTest):

  • fast/animation/request-animation-frame-detach-element.html:
  • fast/animation/request-animation-frame-detach-element2.html:
  • fast/animation/request-animation-frame-during-modal.html:
  • fast/animation/request-animation-frame-iframe.html:
  • fast/animation/request-animation-frame-iframe2.html:
  • fast/animation/script-tests/request-animation-frame-cancel.js:
  • fast/animation/script-tests/request-animation-frame-cancel2.js:
  • fast/animation/script-tests/request-animation-frame-disabled.js:
  • fast/animation/script-tests/request-animation-frame-prefix.js:

(window.webkitRequestAnimationFrame):
(window.testRunner.window.setTimeout):

  • fast/animation/script-tests/request-animation-frame-time-unit.js:

(window.requestAnimationFrame):

  • fast/animation/script-tests/request-animation-frame-timestamps-advance.js:

(window.requestAnimationFrame):
(window.testRunner.window.setTimeout):

  • fast/animation/script-tests/request-animation-frame-timestamps.js:
  • fast/animation/script-tests/request-animation-frame-within-callback.js:
  • fast/animation/script-tests/request-animation-frame.js:
  • fast/backgrounds/obscured-background-child-style-change-expected.html:
  • fast/backgrounds/obscured-background-child-style-change.html:
  • fast/backgrounds/solid-color-context-restore.html:
  • fast/canvas/canvas-as-image-incremental-repaint.html:
  • fast/canvas/canvas-incremental-repaint-2.html:
  • fast/canvas/canvas-incremental-repaint.html:
  • fast/canvas/canvas-resize-after-paint.html:
  • fast/canvas/resources/repaint.js:

(runRepaintTest):

  • fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js:

(TestControllerPaint):

  • fast/canvas/webgl/canvas-test.html:
  • fast/canvas/webgl/webgl-layer-update.html:
  • fast/css/pseudostyle-anonymous-text.html:
  • fast/css/relative-positioned-block-crash.html:
  • fast/dom/Window/post-message-crash.html:
  • fast/dom/Window/web-timing-minimal-performance-now.html:
  • fast/dynamic/containing-block-change.html:
  • fast/dynamic/layer-no-longer-paginated.html:
  • fast/events/touch/gesture/pad-gesture-cancel.js:
  • fast/events/touch/gesture/pad-gesture-fling.js:
  • fast/forms/hidden-listbox.html:
  • fast/forms/listbox-clip.html:
  • fast/frames/inline-object-inside-frameset.html:
  • fast/frames/transparent-scrollbar.html:
  • fast/images/animated-background-image-crash.html:
  • fast/layers/add-layer-with-nested-stacking.html:
  • fast/layers/inline-dirty-z-order-lists.html:
  • fast/layers/layer-content-visibility-change.html:
  • fast/layers/nested-layers-1.html:
  • fast/layers/nested-layers-2.html:
  • fast/layers/nested-layers-3.html:
  • fast/layers/nested-layers-4.html:
  • fast/layers/remove-layer-with-nested-stacking.html:
  • fast/overflow/hidden-scrollbar-resize.html:
  • fast/reflections/inline-crash.html:
  • fast/repaint/animation-after-layer-scroll.html:
  • fast/repaint/background-shorthand-with-gradient-and-height-changes.html:
  • fast/repaint/fixed-child-move-after-scroll.html:
  • fast/repaint/fixed-child-of-fixed-move-after-scroll.html:
  • fast/repaint/fixed-child-of-transformed-move-after-scroll.html:
  • fast/repaint/fixed-move-after-scroll.html:
  • fast/repaint/no-animation-outside-viewport-subframe.html:
  • fast/repaint/no-animation-outside-viewport.html:
  • fast/repaint/obscured-background-no-repaint.html:
  • fast/repaint/overflow-hidden-in-overflow-hidden-scrolled.html:
  • fast/repaint/renderer-destruction-by-invalidateSelection-crash.html:
  • fast/repaint/repaint-during-scroll-with-zoom.html:
  • fast/repaint/resources/fixed-move-after-keyboard-scroll-iframe.html:
  • fast/repaint/resources/iframe-scroll-repaint-iframe.html:
  • fast/repaint/resources/line-flow-with-floats.js:

(beginTest):

  • fast/repaint/resources/repaint.js:

(runRepaintTest):

  • fast/repaint/table-overflow-hidden-in-overflow-hidden-scrolled.html:
  • fast/replaced/width100percent-textarea.html:
  • fast/scrolling/scrollbar-tickmarks-hittest.html:
  • fast/table/border-collapsing/cached-69296.html:
  • fast/table/border-collapsing/cached-cell-append.html:
  • fast/table/border-collapsing/cached-cell-remove.html:
  • fast/table/border-collapsing/cached-change-cell-border-color.html:
  • fast/table/border-collapsing/cached-change-cell-border-width.html:
  • fast/table/border-collapsing/cached-change-cell-sl-border-color.html:
  • fast/table/border-collapsing/cached-change-col-border-color.html:
  • fast/table/border-collapsing/cached-change-col-border-width.html:
  • fast/table/border-collapsing/cached-change-colgroup-border-color.html:
  • fast/table/border-collapsing/cached-change-colgroup-border-width.html:
  • fast/table/border-collapsing/cached-change-row-border-color.html:
  • fast/table/border-collapsing/cached-change-row-border-width.html:
  • fast/table/border-collapsing/cached-change-table-border-color.html:
  • fast/table/border-collapsing/cached-change-table-border-width.html:
  • fast/table/border-collapsing/cached-change-tbody-border-color.html:
  • fast/table/border-collapsing/cached-change-tbody-border-width.html:
  • fast/table/empty-section-crash.html:
  • fast/text/font-initial.html:
  • fast/text/international/harfbuzz-runs-with-no-glyph.html:
  • fast/text/text-shadow-extreme-value.html:
  • http/tests/misc/slow-loading-image-in-pattern.html:
  • media/audio-repaint.html:
  • media/media-document-audio-repaint.html:
  • plugins/windowless_plugin_paint_test.html:
  • scrollbars/scrollbar-percent-padding-crash.html:
  • svg/custom/non-scaling-stroke-update.svg:
  • svg/custom/stale-resource-data-crash.svg:
2:42 PM Changeset in webkit [216210] by beidson@apple.com
  • 2 edits in trunk/Tools

[ios-simulator] API test WebKit2.WebsiteDataStoreCustomPaths is failing.
https://bugs.webkit.org/show_bug.cgi?id=171513

Unreviewed gardening.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

(TEST): Skip the failing parts of the test on iOS for now.

2:39 PM Changeset in webkit [216209] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Crash when pointer lock element is removed before pointer lock allowed arrives.
https://bugs.webkit.org/show_bug.cgi?id=171642

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

Make sure there a pending lock before attempting to complete pointer lock.

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::didAcquirePointerLock):

2:27 PM Changeset in webkit [216208] by Chris Dumez
  • 4 edits in trunk

Reformat / Clean up Node.idl to match the specification
https://bugs.webkit.org/show_bug.cgi?id=171686

Reviewed by Sam Weinig.

Source/WebCore:

Reformat / Clean up Node.idl to match the specification:

There should be no Web-facing behavior change, except for Node properties
being enumerated in a slightly different order.

  • dom/Node.idl:

LayoutTests:

Rebaseline existing test now that the Node properties are enumerated in a
slightly different order.

  • js/dom/dom-static-property-for-in-iteration-expected.txt:
2:06 PM Changeset in webkit [216207] by Jonathan Bedard
  • 3 edits
    4 copies
    6 adds in trunk/Tools

Make ImageDiff stand-alone
https://bugs.webkit.org/show_bug.cgi?id=168939

Reviewed by David Kilzer.

Create ImageDiff without dependencies on bmalloc and WTF so that it exists as a
stand-alone project. Note that this change does not eliminate the ImageDiff inside
the DumpRenderTree project.

  • ImageDiff/ImageDiff.xcodeproj: Added.
  • ImageDiff/ImageDiff.xcodeproj/project.pbxproj: Added.
  • ImageDiff/Makefile: Use ImageDiff project.
  • ImageDiff/PlatformMac.cmake: Added.
  • ImageDiff/PlatformWin.cmake: Added.
  • ImageDiff/cg: Added.
  • ImageDiff/cg/Configurations: Added.
  • ImageDiff/cg/Configurations/Base.xcconfig: Copied from Tools/DumpRenderTree/mac/Configurations/Base.xcconfig.
  • ImageDiff/cg/Configurations/DebugRelease.xcconfig: Copied from Tools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig.
  • ImageDiff/cg/Configurations/ImageDiff.xcconfig: Copied from Tools/DumpRenderTree/mac/Configurations/ImageDiff.xcconfig.
  • ImageDiff/cg/ImageDiff.cpp: Copied from Tools/DumpRenderTree/cg/ImageDiffCG.cpp.

(createImageFromStdin): Stop using RetainPtr.
(createDifferenceImage): Ditto.
(main): Ditto.

  • Scripts/build-imagediff: Stop building WTF and bmalloc.
1:56 PM Changeset in webkit [216206] by weinig@apple.com
  • 63 edits
    11 deletes in trunk

Remove support for legacy Notifications
https://bugs.webkit.org/show_bug.cgi?id=171487

Reviewed by Jon Lee.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Remove definition of ENABLE_LEGACY_NOTIFICATIONS.

Source/WebCore:

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

Remove files.

  • Configurations/FeatureDefines.xcconfig:

Remove definition of ENABLE_LEGACY_NOTIFICATIONS.

  • DerivedSources.make:

Remove IDL files.

  • Modules/notifications/DOMWindowNotifications.cpp: Removed.
  • Modules/notifications/DOMWindowNotifications.h: Removed.
  • Modules/notifications/DOMWindowNotifications.idl: Removed.
  • Modules/notifications/NotificationCenter.cpp: Removed.
  • Modules/notifications/NotificationCenter.h: Removed.
  • Modules/notifications/NotificationCenter.idl: Removed.
  • Modules/notifications/NotificationClient.h:
  • Modules/notifications/NotificationController.cpp:
  • Modules/notifications/NotificationController.h:
  • Modules/notifications/WorkerGlobalScopeNotifications.cpp: Removed.
  • Modules/notifications/WorkerGlobalScopeNotifications.h: Removed.
  • Modules/notifications/WorkerGlobalScopeNotifications.idl: Removed.
  • Modules/notifications/Notification.idl:
  • Modules/notifications/Notification.cpp:
  • Modules/notifications/Notification.h:
  • dom/EventTargetFactory.in:
  • page/DOMWindow.cpp:
  • workers/WorkerThread.h:

Remove code legacy Notification code. Replace use of NotificationCenter with direct
calls to the NotificationClient.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Remove definition of ENABLE_LEGACY_NOTIFICATIONS.

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:
  • WebCoreSupport/WebNotificationClient.h:
  • WebCoreSupport/WebNotificationClient.mm:
  • WebView/WebNotification.mm:
  • WebView/WebNotificationInternal.h:
  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _notificationIDForTesting:]):
Remove legacy notification specific code.

Source/WebKit/win:

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::WebChromeClient):

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
  • WebCoreSupport/WebDesktopNotificationsDelegate.h:

Remove legacy notification specific code.

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebProcessCreationParameters.cpp:
  • Shared/WebProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:
  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/Notifications/WebNotificationManager.cpp:
  • WebProcess/Notifications/WebNotificationManager.h:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:
  • WebProcess/WebCoreSupport/WebNotificationClient.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebProcess.cpp:

Remove legacy notification specific code.

Source/WTF:

  • wtf/FeatureDefines.h:

Remove definition of ENABLE_LEGACY_NOTIFICATIONS.

Tools:

  • DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:

(DRTDesktopNotificationPresenter::checkNotificationPermission):

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Remove use and definition of ENABLE_LEGACY_NOTIFICATIONS.

LayoutTests:

  • Remove fast/notifications/. It was skipped on all platforms and use legacy Notifications API.
  • Remove http/notifications/legacy. It tested the legacy API.
  • Update two tests in fast/history to use the non-legacy API to test page cache + notifications.
  • Update TestExpectations for removals.
  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • fast/history/page-cache-notification-non-suspendable.html:
  • fast/history/page-cache-notification-suspendable.html:
  • fast/notifications: Removed.
  • fast/notifications/notification-after-close-expected.txt: Removed.
  • fast/notifications/notification-after-close.html: Removed.
  • fast/notifications/notification-permisssion-deletable-expected.txt: Removed.
  • fast/notifications/notification-permisssion-deletable.html: Removed.
  • fast/notifications/notifications-cancel-request-permission-expected.txt: Removed.
  • fast/notifications/notifications-cancel-request-permission.html: Removed.
  • fast/notifications/notifications-check-permission-expected.txt: Removed.
  • fast/notifications/notifications-check-permission.html: Removed.
  • fast/notifications/notifications-click-event-expected.txt: Removed.
  • fast/notifications/notifications-click-event-focus-expected.txt: Removed.
  • fast/notifications/notifications-click-event-focus.html: Removed.
  • fast/notifications/notifications-click-event.html: Removed.
  • fast/notifications/notifications-constructor-request-permission-expected.txt: Removed.
  • fast/notifications/notifications-constructor-request-permission.html: Removed.
  • fast/notifications/notifications-constructor-with-permission-expected.txt: Removed.
  • fast/notifications/notifications-constructor-with-permission.html: Removed.
  • fast/notifications/notifications-constructor-without-permission-expected.txt: Removed.
  • fast/notifications/notifications-constructor-without-permission.html: Removed.
  • fast/notifications/notifications-display-close-events-expected.txt: Removed.
  • fast/notifications/notifications-display-close-events.html: Removed.
  • fast/notifications/notifications-document-close-crash-expected.txt: Removed.
  • fast/notifications/notifications-document-close-crash.html: Removed.
  • fast/notifications/notifications-event-stop-propagation-expected.txt: Removed.
  • fast/notifications/notifications-event-stop-propagation.html: Removed.
  • fast/notifications/notifications-multi-events-expected.txt: Removed.
  • fast/notifications/notifications-multi-events.html: Removed.
  • fast/notifications/notifications-no-icon-expected.txt: Removed.
  • fast/notifications/notifications-no-icon.html: Removed.
  • fast/notifications/notifications-permission-expected.txt: Removed.
  • fast/notifications/notifications-permission.html: Removed.
  • fast/notifications/notifications-replace-expected.txt: Removed.
  • fast/notifications/notifications-replace.html: Removed.
  • fast/notifications/notifications-request-permission-expected.txt: Removed.
  • fast/notifications/notifications-request-permission-optional-expected.txt: Removed.
  • fast/notifications/notifications-request-permission-optional.html: Removed.
  • fast/notifications/notifications-request-permission.html: Removed.
  • fast/notifications/notifications-rtl-expected.txt: Removed.
  • fast/notifications/notifications-rtl.html: Removed.
  • fast/notifications/notifications-sandbox-permission-expected.txt: Removed.
  • fast/notifications/notifications-sandbox-permission.html: Removed.
  • fast/notifications/notifications-window-close-crash-expected.txt: Removed.
  • fast/notifications/notifications-window-close-crash.html: Removed.
  • fast/notifications/notifications-with-permission-expected.txt: Removed.
  • fast/notifications/notifications-with-permission.html: Removed.
  • fast/notifications/notifications-without-permission-expected.txt: Removed.
  • fast/notifications/notifications-without-permission.html: Removed.
  • fast/notifications/request-notification-permission-while-reloading-expected.txt: Removed.
  • fast/notifications/request-notification-permission-while-reloading.html: Removed.
  • fast/notifications/resources: Removed.
  • fast/notifications/resources/notifications-cancel-request-permission.html: Removed.
  • fast/notifications/resources/notifications-iframe.html: Removed.
  • http/tests/notifications/legacy: Removed.
  • http/tests/notifications/legacy/double-show-expected.txt: Removed.
  • http/tests/notifications/legacy/double-show.html: Removed.
  • http/tests/notifications/legacy/events-expected.txt: Removed.
  • http/tests/notifications/legacy/events.html: Removed.
  • http/tests/notifications/legacy/notification-request-permission-then-navigate-expected.txt: Removed.
  • http/tests/notifications/legacy/notification-request-permission-then-navigate.html: Removed.
  • http/tests/notifications/legacy/request-expected.txt: Removed.
  • http/tests/notifications/legacy/request-no-callback-expected.txt: Removed.
  • http/tests/notifications/legacy/request-no-callback.html: Removed.
  • http/tests/notifications/legacy/request.html: Removed.
  • http/tests/notifications/legacy/resources: Removed.
  • http/tests/notifications/legacy/resources/notify-opener-done.html: Removed.
  • http/tests/notifications/legacy/resources/request-permission-then-navigate.html: Removed.
  • http/tests/notifications/legacy/show-expected.txt: Removed.
  • http/tests/notifications/legacy/show.html: Removed.
  • http/tests/notifications/legacy/window-show-on-click-expected.txt: Removed.
  • http/tests/notifications/legacy/window-show-on-click.html: Removed.
1:20 PM Changeset in webkit [216205] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked http/tests/xmlhttprequest/workers/methods-async.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=160368

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-05-04

  • platform/ios-wk2/TestExpectations:
1:16 PM Changeset in webkit [216204] by Antti Koivisto
  • 8 edits
    2 adds in trunk

REGRESSION (Safari 10.1): When 'transition' contains -ms-transform, transform-origin is also transitioned
https://bugs.webkit.org/show_bug.cgi?id=171250
<rdar://problem/31827243>

Reviewed by Geoffrey Garen.

Source/WebCore:

We were mapping unknown properties to 'all' animation. With this patch we ignore them instead.
The patch also implements roundtripping of unknown properties via CSSOM, matching Blink and Gecko.

Test: transitions/transition-unknown-property-ignore.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createTransitionPropertyValue):

Return the correct name for unknown properties.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationProperty):

Map any unknown property to AnimateUnknownProperty mode instead of falling back to the default of AnimateAll.
Save the unknown property name so we can roundtrip it properly.

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions):

Ignore AnimateUnknownProperty like AnimateNone.

  • platform/animation/Animation.h:

(WebCore::Animation::unknownProperty):
(WebCore::Animation::setUnknownProperty):

LayoutTests:

  • transitions/transition-unknown-property-ignore-expected.txt: Added.
  • transitions/transition-unknown-property-ignore.html: Added.
  • transitions/transitions-parsing-expected.txt:
  • transitions/transitions-parsing.html:

Update the roundtrip expectations for unknown properties. The new results match Blink and Gecko.

1:08 PM Changeset in webkit [216203] by aestes@apple.com
  • 13 edits in trunk/Tools

Give +testwebkitapi_configurationWithTestPlugInClassName: a shorter name
https://bugs.webkit.org/show_bug.cgi?id=171673

Reviewed by Dan Bernstein.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AdditionalReadAccessAllowedURLs.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleParameters.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/CancelFontSubresource.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm:

(configurationWithContentFilterSettings):
(-[LazilyLoadPlatformFrameworksController init]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptions.mm:

(runTestWithWidth):

  • TestWebKitAPI/Tests/WebKit2Cocoa/UserContentWorld.mm:

(TEST):

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/WKWebViewConfigurationExtras.h:
  • TestWebKitAPI/WKWebViewConfigurationExtras.mm:

(+[WKWebViewConfiguration _test_configurationWithTestPlugInClassName:]):
(+[WKWebViewConfiguration testwebkitapi_configurationWithTestPlugInClassName:]): Renamed to
+_test_configurationWithTestPlugInClassName:

1:02 PM Changeset in webkit [216202] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Clean up MutationRecord.idl
https://bugs.webkit.org/show_bug.cgi?id=171685

Reviewed by Sam Weinig.

Clean up MutationRecord.idl to match the specification:

There is no Web-facing behavior change.

  • dom/MutationRecord.idl:
1:00 PM Changeset in webkit [216201] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[GTK][JSCOnly] Implement memoryFootprint for Linux
https://bugs.webkit.org/show_bug.cgi?id=171680

Reviewed by Carlos Alberto Lopez Perez.

Darwin's phys_footprint returns the amount of dirty anonymous memory in the process.
This patch implements the same thing in Linux by reading /proc/self/smaps.
We sum sizes of private dirty pages in anonymous regions.

  • wtf/MemoryFootprint.cpp:

(WTF::forEachLine):
(WTF::memoryFootprint):

12:55 PM Changeset in webkit [216200] by Chris Dumez
  • 4 edits in trunk

Reformat / clean up Event.idl
https://bugs.webkit.org/show_bug.cgi?id=171675

Reviewed by Sam Weinig.

Source/WebCore:

Reformat / clean up Event.idl to match the latest spec more closely:

There is no web-facing behavior change, except for properties being
enumerated in a slightly different order.

  • dom/Event.idl:

LayoutTests:

Rebaseline test now that the Event properties are in a slightly different order.

  • inspector/model/remote-object-get-properties-expected.txt:
12:49 PM Changeset in webkit [216199] by dbates@webkit.org
  • 7 edits in trunk/Source/WebCore

Cleanup: Extract CachedScript::mimeTypeAllowedByNosniff() into a common function
https://bugs.webkit.org/show_bug.cgi?id=171678

Reviewed by Andy Estes.

Extract CachedScript::mimeTypeAllowedByNosniff() into a common function that can
be shared by LoadableClassicScript and WorkerScriptLoader.

No functionality was changed. So, no new tests.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::notifyFinished): Modified to use WebCore::isScriptAllowedByNosniff().

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::mimeType): Deleted; incorporated into WebCore::isScriptAllowedByNosniff().
(WebCore::CachedScript::mimeTypeAllowedByNosniff): Deleted; incorporated into WebCore::isScriptAllowedByNosniff().

  • loader/cache/CachedScript.h:
  • platform/network/ResourceResponseBase.cpp:

(WebCore::isScriptAllowedByNosniff): Added. Note that it is sufficient to extract the MIME type
as-is and query the MIME type registry because the MIME type registry performs look ups case-insensitively.

  • platform/network/ResourceResponseBase.h:
  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::didReceiveResponse): Modified to use WebCore::isScriptAllowedByNosniff().
(WebCore::mimeTypeAllowedByNosniff): Deleted.

11:39 AM Changeset in webkit [216198] by commit-queue@webkit.org
  • 73 edits in trunk/Source/WebCore

Make the [EnabledBySetting] extended attribute work for any attribute or operation on a prototype
https://bugs.webkit.org/show_bug.cgi?id=171588

Patch by Sam Weinig <sam@webkit.org> on 2017-05-04
Reviewed by Dean Jackson.

  • bindings/js/JSDOMIterator.h:

(WebCore::JSDOMIterator::createPrototype):

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):

  • bindings/js/JSDOMWrapperCache.h:

(WebCore::getDOMStructure):
(WebCore::getDOMPrototype):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):
Update to account for createPrototype and prototype taking the global object by reference.

  • bindings/scripts/CodeGeneratorJS.pm:

(NeedsSettingsCheckForPrototypeProperty):
Add predicate to determine if an interface has any settings enabled properties on the prototype,
needed to determine if we should pass the global object to finishCreation.

(GenerateHeader):
Update signature of both createPrototype and prototype to take JSDOMGlobalObject& rather than
a JSC::JSGlobalObject*, this allows us to pass the more specific type to the prototype constructor,
and access the ScriptExecutionContext for the Settings.

(GeneratePropertiesHashTable):
Update to return, via out parameter, arrays with the attributes and operations that specify EnabledBySetting. This
mimics the model used for RuntimeEnabledFeatures.

(GenerateImplementation):
In {Class}Prototype::finishCreation, add code to check settings to see if an attribute or operation should be enabled,
and if it shouldn't remove it from the object. This, again, is modeled on RuntimeEnabledFeatures.

(GeneratePrototypeDeclaration):
Update signatures to take JSDOMGlobalObject& and specialize finishCreation to take one if there are any properties
that require settings to enable.

(GenerateConstructorHelperMethods):
Update for new signature of prototype(...).

  • bindings/scripts/test/JS/JSInterfaceName.cpp:
  • bindings/scripts/test/JS/JSInterfaceName.h:
  • bindings/scripts/test/JS/JSMapLike.cpp:
  • bindings/scripts/test/JS/JSMapLike.h:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.h:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.h:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
  • bindings/scripts/test/JS/JSTestGlobalObject.h:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
  • bindings/scripts/test/JS/JSTestIterable.cpp:
  • bindings/scripts/test/JS/JSTestIterable.h:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerialization.h:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.h:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.h:

Update test results for new test values and changes in signatures to pass JSDOMGlobalObject.

  • bindings/scripts/test/TestObj.idl:

Add tests for [EnableBySetting] for attributes and operations.

  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • bridge/runtime_method.h:
  • bridge/runtime_object.h:
  • inspector/CommandLineAPIHost.cpp:

Update createPrototype function to take the global object by reference.

11:32 AM Changeset in webkit [216197] by eric.carlson@apple.com
  • 33 edits
    2 adds in trunk

[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>

Reviewed by Jer Noble.

Source/WebCore:

No new layout tests, added an API test instead.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::endStream): New, stop all tracks.

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStreamRegistry.cpp:

(WebCore::MediaStreamRegistry::unregisterStream): Minor cleanup.
(WebCore::MediaStreamRegistry::forEach): New, call the lambda with each stream.
(WebCore::MediaStreamRegistry::MediaStreamRegistry): Deleted, unused.

  • Modules/mediastream/MediaStreamRegistry.h:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::stopTrack): Add parameter so caller can specify if an 'ended'
event should be sent or not.
(WebCore::MediaStreamTrack::trackMutedChanged): Don't post an event if the track has ended.

  • Modules/mediastream/MediaStreamTrack.h:
  • dom/Document.cpp:

(WebCore::Document::stopMediaCapture): Stop all streams in the document.

  • dom/Document.h:
  • page/Page.cpp:

(WebCore::Page::stopMediaCapture): Stop all streams.

  • page/Page.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Display a black frame
when the stream ends.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Signal a characteristics
change to HTMLMediaElement refresh state.

  • platform/mediastream/MediaStreamPrivate.h:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::stopProducingData): Don't return early if the session isn't
running, we always need to clear m_session on iOS.

Source/WebKit2:

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMediaCaptureEnabled): New.
(WKPageGetMediaCaptureEnabled): New.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setMediaCaptureEnabled:]): New.
(-[WKWebView _mediaCaptureEnabled]): New.

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

(WebKit::UIDelegate::setDelegate): Initialize webViewRequestUserMediaAuthorizationForDevicesURLMainFrameURLDecisionHandler
and webViewCheckUserMediaPermissionForURLMainFrameURLFrameIdentifierDecisionHandler on macOS
and iOS.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
Initialize the rejection timer.
(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
Call invalidatePendingRequests.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests): Invalidate all
pending requests.
(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::rejectionTimerFired): Reject a promise and
schedule the timer if there are any others pending.
(WebKit::UserMediaPermissionRequestManagerProxy::scheduleNextRejection):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Don't
prompt the user if capture is disabled.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::clearCachedState): Deleted.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Stop capture in the current
page on iOS.
(WebKit::UserMediaProcessManager::setCaptureEnabled):

  • UIProcess/UserMediaProcessManager.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setMediaCaptureEnabled):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::mediaCaptureEnabled):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::cancelPendingRequests): New, cancel all pending
requests.
(WebKit::UserMediaPermissionRequestManager::cancelUserMediaRequest): Deny the request.
(WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopMediaCapture):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/UserMediaDisabled.mm: Added.

(-[UserMediaMessageHandler userContentController:didReceiveScriptMessage:]):
(-[UserMediaUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[UserMediaUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(MediaCaptureDisabledTest::SetUp):
(MediaCaptureDisabledTest::loadTestAndWaitForMessage):
(TEST_F):

  • TestWebKitAPI/Tests/WebKit2Cocoa/disableGetUserMedia.html: Added.
11:27 AM Changeset in webkit [216196] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Should never hit layout while updating the render tree.
https://bugs.webkit.org/show_bug.cgi?id=171643

Reviewed by Antti Koivisto.

Laying out a half-baked render tree is not a great idea. Especially considering
that layout (sadly) can mutate the render tree.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

11:25 AM Changeset in webkit [216195] by dbates@webkit.org
  • 6 edits
    1 add in trunk

importScripts() should respect X-Content-Type-Options: nosniff
https://bugs.webkit.org/show_bug.cgi?id=171248
<rdar://problem/31819023>

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

Update expected results for Web Platform Tests that now pass.

  • web-platform-tests/fetch/nosniff/importscripts-expected.txt: Added.
  • web-platform-tests/fetch/nosniff/worker-expected.txt:

Source/WebCore:

Do not load a worker script if it has the HTTP response header "X-Content-Type-Options: nosniff"
and its Content-type header is not an allowed JavaScript script mime type. This behavior follows
from <https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-imported-script> (3 May 2017),
<https://fetch.spec.whatwg.org/#concept-fetch> (2 May 2017), and <https://fetch.spec.whatwg.org/#concept-main-fetch>.

  • workers/WorkerScriptLoader.cpp:

(WebCore::mimeTypeAllowedByNosniff): Added.
(WebCore::WorkerScriptLoader::didReceiveResponse): Mark the load as failed if the response
is not allowed by X-Content-Type-Options: nosniff.

LayoutTests:

Unskip web-platform-tests/fetch/nosniff/importscripts as it now passes.

11:02 AM Changeset in webkit [216194] by Said Abou-Hallawa
  • 2 edits in trunk/LayoutTests

Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).

  • plugins/windowless_plugin_paint_test.html:
10:46 AM Changeset in webkit [216193] by Caio Lima
  • 2 edits in trunk/Tools

Unreviewed, Adding self to contributors.json

  • Scripts/webkitpy/common/config/contributors.json: Added name.
10:44 AM Changeset in webkit [216192] by Said Abou-Hallawa
  • 2 edits in trunk/LayoutTests

Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).

  • compositing/video/video-with-invalid-source.html:
10:19 AM Changeset in webkit [216191] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip media/modern-media-controls/pip-support/pip-support-click.html on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171610

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:45 AM Changeset in webkit [216190] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

9:41 AM Changeset in webkit [216189] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.21

Tag Safari-604.1.21.

8:41 AM Changeset in webkit [216188] by hyatt@apple.com
  • 3 edits
    2 adds in trunk

REGRESSION(STP): rgb() with calc() containing variables doesn't work
https://bugs.webkit.org/show_bug.cgi?id=169939

Reviewed by Zalan Bujtas.

Source/WebCore:

Added new test in fast/css/variables.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseValue):
Treat floats in calcs as integers when we can.

LayoutTests:

  • fast/css/variables/calc-float-to-int-expected.html: Added.
  • fast/css/variables/calc-float-to-int.html: Added.
8:33 AM Changeset in webkit [216187] by Konstantin Tokarev
  • 7 edits in trunk

Fix compilation with ICU 59.1
https://bugs.webkit.org/show_bug.cgi?id=171612

Reviewed by Mark Lam.

ICU 59.1 has broken source compatibility. Now it defines UChar as
char16_t, which does not allow automatic type conversion from unsigned
short in C++ code.

Source/JavaScriptCore:

  • API/JSStringRef.cpp:

(JSStringCreateWithCharacters):
(JSStringCreateWithCharactersNoCopy):
(JSStringGetCharactersPtr):

  • runtime/DateConversion.cpp:

(JSC::formatDateTime):

Source/WebKit2:

  • Shared/API/c/WKString.cpp:

(WKStringGetCharacters):

Tools:

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback):

7:58 AM Changeset in webkit [216186] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

[Cocoa] -[WKWebsiteDataStore httpCookieStore] is declared in the main @interface but implemented in a category
https://bugs.webkit.org/show_bug.cgi?id=171657

Reviewed by Sam Weinig.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore httpCookieStore]): Moved from the WKPrivate category into the main

@implementation block.

7:41 AM Changeset in webkit [216185] by aestes@apple.com
  • 9 edits in trunk

[Cocoa] Add an optional width parameter to -[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]
https://bugs.webkit.org/show_bug.cgi?id=171646
<rdar://problem/30306321>

Reviewed by Tim Horton.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:

(-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]): Called
-renderedImageWithOptions:width: with a nil width.
(-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:width:]): Passed an optional width
to InjectedBundleNodeHandle::renderedImage().

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::imageForRect): If a width is specified, create an image graphics context at that
width, preserving the aspect ratio of paintingRect.
(WebKit::InjectedBundleNodeHandle::renderedImage):

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptions.mm:

(runTestWithWidth):
(TEST):
(-[RenderedImageWithOptionsObject didRenderImageWithSize:]): Deleted.

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptionsPlugIn.mm:

(-[RenderedImageWithOptionsPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[RenderedImageWithOptionsPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):
(-[RenderedImageWithOptionsPlugIn renderImageWithWidth:completionHandler:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptionsProtocol.h:
7:30 AM Changeset in webkit [216184] by commit-queue@webkit.org
  • 2 edits
    3 adds in trunk/Tools

[GTK] Fontconfig 2.11.2 in JHBuild does not build with glibc 2.25+ or gperf 3.1+
https://bugs.webkit.org/show_bug.cgi?id=171649

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-05-04
Reviewed by Carlos Garcia Campos.

Add two patches picked from the upstream repository to fix building of
the Fontconfig module in JHBuild. Additionally, this needed a patch to
add "autogen.sh" as it is not included in release tarballs. Also:
building the module with srcdir!=builddir prevents "fcobjshash.gperf"
being regenerated (which is needed) so this is disabled for the
Fontconfig module.

  • gtk/jhbuild.modules:
  • gtk/patches/fontconfig-2.11.1-add-autogen.patch: Added.
  • gtk/patches/fontconfig-Avoid-conflicts-with-integer-width-macros-from-TS-18661-1-2014.patch: Added.
  • gtk/patches/fontconfig-Fix-the-build-issue-with-gperf-3.1.patch: Added.
5:56 AM Changeset in webkit [216183] by commit-queue@webkit.org
  • 33 edits
    2 deletes in trunk

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

FTBFS for iOS due to missing WebPageProxy::stopMediaCapture()
implementation. (Requested by ddkilzer on #webkit).

Reverted changeset:

"[MediaStream] Allow host application to enable/disable media
capture"
https://bugs.webkit.org/show_bug.cgi?id=171292
http://trac.webkit.org/changeset/216172

5:42 AM Changeset in webkit [216182] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

[Threaded Compositor] SHOULD NEVER BE REACHED in WebKit::CompositingRunLoop::updateCompleted
https://bugs.webkit.org/show_bug.cgi?id=171336

Reviewed by Michael Catanzaro.

We are assuming that all calls to ThreadedCompositor::renderLayerTree() happen because of an scheduled update,
but that's not true in the case of ThreadedCompositor::forceRepaint(). In that case we never want to call
CompositingRunLoop::updateCompleted().

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::forceRepaint):
(WebKit::ThreadedCompositor::sceneUpdateFinished):

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
5:30 AM Changeset in webkit [216181] by ddkilzer@apple.com
  • 5 edits in trunk/Source/WebKit2

check-webkit-style exits with an error while parsing Source/WebKit2/Scripts/webkit/ directory: KeyError: 'st'
<https://bugs.webkit.org/show_bug.cgi?id=171510>

Reviewed by Daniel Bates.

The problem was that 'import parser' was ambiguous since there
is a built-in parser module that comes with Python. Changing
'import parser' to 'from webkit import parser' fixed the error
in check-webkit-style (and pylint) by forcing it to load the
local 'parser' module, but then running messages_unittest.py
directly would fail because .../Source/WebKit2/Scripts was not
in the module search path by default. This is fixed by using
sys.path.append() to add .../Source/WebKit2/Scripts to the
module search path based on the path to messages_unittest.py.

As an added bonus, this patch also fixes all webkit-style issues
in Source/WebKit2/Scripts/webkit/*.py files.

  • Scripts/webkit/messages.py:
  • Separate local module imports from built-in modules for consistency.
  • Fix whitespace issues for check-webkit-style, and remove stray semi-colon.
  • Scripts/webkit/messages_unittest.py:
  • Update sys.path to find the 'webkit' module based on the path to messages_unittest.py. This makes 'from webkit import ...' statements work when running messages_unittest.py directly.
  • Change 'messages' and 'parser' modules to use 'from webkit import ...' format for consistency.
  • Fix whitespace issues for check-webkit-style.
  • Scripts/webkit/model.py:
  • Fix whitespace issue for check-webkit-style.
  • Scripts/webkit/parser.py:
  • Fix whitespace issue for check-webkit-style.
5:20 AM Changeset in webkit [216180] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

stress/call-apply-exponential-bytecode-size.js.no-llint failing on 32-bit debug for OOM on executable memory
https://bugs.webkit.org/show_bug.cgi?id=171008

Reviewed by Yusuke Suzuki.

This patch lowers the threshold for .call/.apply recursion
in an attempt to emit less code and not impact perf.
We're currently failing tests on x86-32 by running out
of executable memory. If perf gets impacted because of this,
then I'll apply a stricter change just to 32-bit platforms.
However, if this doesn't negatively impact perf, it's all around
better than all platforms emit less bytecode.

  • bytecompiler/NodesCodegen.cpp:
4:57 AM Changeset in webkit [216179] by commit-queue@webkit.org
  • 3 edits
    6 deletes in trunk/Tools

[GTK] Bump GStreamer version to 1.10.4 in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=171595

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-05-04
Reviewed by Xabier Rodriguez-Calvar.

  • gtk/jhbuild.modules:
  • gtk/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Removed.
  • gtk/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Removed.
  • gtk/patches/gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch: Removed.
  • gtk/patches/gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch: Removed.
  • gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch:
  • gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Removed.
  • gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Removed.
4:40 AM Changeset in webkit [216178] by Yusuke Suzuki
  • 30 edits
    14 adds in trunk

[JSC] Math unary functions should be handled by DFG
https://bugs.webkit.org/show_bug.cgi?id=171269

Reviewed by Saam Barati.

JSTests:

  • stress/arith-acos-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueACosNoArgument):
(testNoArgument):
(opaqueAllTypesACos):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueACosForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueACosForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueACosForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueACosWithException):
(testException):

  • stress/arith-acosh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueACoshNoArgument):
(testNoArgument):
(opaqueAllTypesACosh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueACoshForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueACoshForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueACoshForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueACoshWithException):
(testException):

  • stress/arith-asin-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueASinNoArgument):
(testNoArgument):
(opaqueAllTypesASin):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueASinForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueASinForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueASinForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueASinWithException):
(testException):

  • stress/arith-asinh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueASinhNoArgument):
(testNoArgument):
(opaqueAllTypesASinh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueASinhForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueASinhForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueASinhForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueASinhWithException):
(testException):

  • stress/arith-atan-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueATanNoArgument):
(testNoArgument):
(opaqueAllTypesATan):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueATanForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueATanForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueATanForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueATanWithException):
(testException):

  • stress/arith-atanh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueATanhNoArgument):
(testNoArgument):
(opaqueAllTypesATanh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueATanhForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueATanhForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueATanhForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueATanhWithException):
(testException):

  • stress/arith-cbrt-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueCbrtNoArgument):
(testNoArgument):
(opaqueAllTypesCbrt):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueCbrtForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueCbrtForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueCbrtForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueCbrtWithException):
(testException):

  • stress/arith-cosh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueCoshNoArgument):
(testNoArgument):
(opaqueAllTypesCosh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueCoshForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueCoshForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueCoshForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueCoshWithException):
(testException):

  • stress/arith-expm1-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueExpm1NoArgument):
(testNoArgument):
(opaqueAllTypesExpm1):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueExpm1ForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueExpm1ForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueExpm1ForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueExpm1WithException):
(testException):

  • stress/arith-log10-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueLog10NoArgument):
(testNoArgument):
(opaqueAllTypesLog10):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueLog10ForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueLog10ForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueLog10ForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueLog10WithException):
(testException):

  • stress/arith-log2-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueLog2NoArgument):
(testNoArgument):
(opaqueAllTypesLog2):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueLog2ForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueLog2ForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueLog2ForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueLog2WithException):
(testException):

  • stress/arith-sinh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueSinhNoArgument):
(testNoArgument):
(opaqueAllTypesSinh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueSinhForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueSinhForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueSinhForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueSinhWithException):
(testException):

  • stress/arith-tan-on-various-types.js:

(isIdentical):

  • stress/arith-tanh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueTanhNoArgument):
(testNoArgument):
(opaqueAllTypesTanh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueTanhForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueTanhForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueTanhForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueTanhWithException):
(testException):

Source/JavaScriptCore:

ArithSin, ArithCos, and ArithLog are just calling a C runtime function.
While handling them in DFG is not very effective for performance, they
can drop some type checks & value conversions and mark them as pure
operations. It is effective if they are involved in some complex
optimization phase. Actually, ArithLog is effective in kraken.

While a few of Math functions have DFG nodes, basically math functions
are pure. And large part of these functions are just calling a C runtime
function. This patch generalizes these nodes in DFG as ArithUnary. And
we annotate many unary math functions with Intrinsics and convert them
to ArithUnary in DFG. It also cleans up duplicate code in ArithSin,
ArithCos, and ArithLog. If your math function has some good DFG / FTL
optimization rather than calling a C runtime function, you should add
a specialized DFG node, like ArithSqrt.

We also create a new namespace JSC::Math. Inside it, we collect math functions.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGArithMode.cpp:

(JSC::DFG::arithUnaryFunction):
(JSC::DFG::arithUnaryOperation):
(WTF::printInternal):

  • dfg/DFGArithMode.h:
  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasArithUnaryType):
(JSC::DFG::Node::arithUnaryType):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithUnary):
(JSC::DFG::SpeculativeJIT::compileArithCos): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithTan): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithSin): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithLog): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • 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::compileArithUnary):
(JSC::FTL::DFG::LowerDFGToB3::compileArithSin): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileArithCos): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileArithTan): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileArithLog): Deleted.

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::doubleUnary):
(JSC::FTL::Output::doubleSin): Deleted.
(JSC::FTL::Output::doubleCos): Deleted.
(JSC::FTL::Output::doubleTan): Deleted.
(JSC::FTL::Output::doubleLog): Deleted.

  • ftl/FTLOutput.h:
  • runtime/Intrinsic.h:
  • runtime/MathCommon.cpp:

(JSC::Math::log1p):

  • runtime/MathCommon.h:
  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncTan):
(JSC::mathProtoFuncACosh):
(JSC::mathProtoFuncASinh):
(JSC::mathProtoFuncATanh):
(JSC::mathProtoFuncCbrt):
(JSC::mathProtoFuncCosh):
(JSC::mathProtoFuncExpm1):
(JSC::mathProtoFuncLog1p):
(JSC::mathProtoFuncLog10):
(JSC::mathProtoFuncLog2):
(JSC::mathProtoFuncSinh):
(JSC::mathProtoFuncTanh):

2:03 AM Changeset in webkit [216177] by Carlos Garcia Campos
  • 2 edits
    1 copy
    2 adds in trunk/LayoutTests

Unreviewed gardening. Update main expectations of http/tests/inspector/network/resource-request-headers.html.

And add platform specific results for mac-wk2.

  • http/tests/inspector/network/resource-request-headers-expected.txt:
  • platform/mac-wk2/http/tests/inspector/network/resource-request-headers-expected.txt: Copied from LayoutTests/http/tests/inspector/network/resource-request-headers-expected.txt.
12:38 AM Changeset in webkit [216176] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r214947 - Show a log message when an invalid message is received in non cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=170506

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-04-05
Reviewed by Michael Catanzaro.

We just crash, but without knowing the details about the message it's impossible to debug.

  • Shared/ChildProcess.cpp:

(WebKit::ChildProcess::didReceiveInvalidMessage):

Note: See TracTimeline for information about the timeline view.