Timeline



Apr 8, 2017:

8:32 PM Changeset in webkit [215159] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

[Variation Fonts] Width values of GX fonts are not mapped correctly
https://bugs.webkit.org/show_bug.cgi?id=170367

Reviewed by Simon Fraser.

Source/WebCore:

For some reason, when I performed my calculations for how to map the 'wdth' axis of GX-style
variation fonts, I thought that font-stretch: 100% should map to a variation value of 0.0.
Instead, this should map to 1.0.

Test: fast/text/variations/gx-width.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::denormalizeSlope):
(WebCore::denormalizeVariationWidth):
(WebCore::normalizeVariationWidth):
(WebCore::normalizeWidth):
(WebCore::preparePlatformFont):
(WebCore::variationCapabilitiesForFontDescriptor):
(WebCore::denormalizeWidth): Deleted.

LayoutTests:

  • fast/text/variations/font-selection-properties-expected.html:
  • fast/text/variations/gx-width-expected.html: Added.
  • fast/text/variations/gx-width.html: Added.
7:51 PM Changeset in webkit [215158] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream Mac] Revert change of Mac video capture format
https://bugs.webkit.org/show_bug.cgi?id=170642
<rdar://problem/31520492>

Reviewed by Sam Weinig.

Revert r214968 which changed macOS video capture format to kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
from kCVPixelFormatType_420YpCbCr8Planar because AVSampleBufferDisplayLayer sometimes fails
to display the former.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:
7:39 PM Changeset in webkit [215157] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

A synchronous DecodingOptions should be compatible with any asynchronous sizeForDrawing DecodingOptions
https://bugs.webkit.org/show_bug.cgi?id=170577

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

Source/WebCore:

Once a synchronous decoded frame is found, there is no need to decode it
again. This decoded frame is suitable for any sizeForDrawing. This will
prevent double decoding if one image client wants synchronous decoded
frame while the other needs an asynchronous decode frame for a specific
sizeForDrawing.

Test: fast/images/async-image-background-image-repeated.html

  • platform/graphics/DecodingOptions.h:

(WebCore::DecodingOptions::DecodingOptions):
(WebCore::DecodingOptions::isNone):
(WebCore::DecodingOptions::isAsynchronousCompatibleWith):

LayoutTests:

  • fast/images/async-image-background-image-repeated-expected.html: Added.
  • fast/images/async-image-background-image-repeated.html: Added.
5:50 PM Changeset in webkit [215156] by commit-queue@webkit.org
  • 2 edits in trunk

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:
5:21 PM Changeset in webkit [215155] by Michael Catanzaro
  • 2 edits in trunk

Unreviewed, rolling out r215150.

Broke buildbot

Reverted changeset:

"[CMake] Don't force-enable response files when using Ninja
generator"
https://bugs.webkit.org/show_bug.cgi?id=170105
http://trac.webkit.org/changeset/215150

4:55 PM Changeset in webkit [215154] by Simon Fraser
  • 2 edits in trunk/Websites/webkit.org

Update the css-status page to handle changes in CSSProperties.json.

Change the page structure to allow the left sidebar to use sticky positioning.

"Done" -> "Supported".

Save the search in the URL.

Other formatting changes.

  • wp-content/themes/webkit/css-status.php:
4:55 PM Changeset in webkit [215153] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Align the timers for throttled rAF to reduce power usage
https://bugs.webkit.org/show_bug.cgi?id=170630
rdar://problem/31490620

Reviewed by Chris Dumez.

Align the timers for all throttled ScriptedAnimationControllers in the process with
a resolution of 30ms, which reduces process wake-ups and thus saves power.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::scheduleAnimation):

4:19 PM Changeset in webkit [215152] by Chris Dumez
  • 40 edits in trunk/Source

Drop std::chrono support from Timer class
https://bugs.webkit.org/show_bug.cgi?id=170645

Reviewed by Sam Weinig.

Drop std::chrono support from Timer class now that we prefer using Seconds type.

Source/WebCore:

  • css/CSSImageGeneratorValue.cpp:
  • html/HTMLPlugInImageElement.cpp:
  • html/canvas/WebGLRenderingContextBase.cpp:
  • loader/cache/CachedResource.cpp:

(WebCore::deadDecodedDataDeletionIntervalForResourceType):
(WebCore::CachedResource::destroyDecodedDataIfNeeded):

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::MemoryCache):

  • loader/cache/MemoryCache.h:

(WebCore::MemoryCache::setDeadDecodedDataDeletionInterval):
(WebCore::MemoryCache::deadDecodedDataDeletionInterval):

  • page/PerformanceMonitor.cpp:
  • page/SuspendableTimer.h:
  • page/mac/ServicesOverlayController.h:
  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::selectionRectsDidChange):
(WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
(WebCore::ServicesOverlayController::determineActiveHighlight):
(WebCore::ServicesOverlayController::mouseEvent):

  • platform/Timer.h:

(WebCore::TimerBase::startRepeating):
(WebCore::TimerBase::startOneShot):
(WebCore::TimerBase::augmentFireInterval):
(WebCore::TimerBase::augmentRepeatInterval):
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::fontForFamily):

  • platform/graphics/ca/TileController.cpp:
  • platform/graphics/cg/IOSurfacePool.cpp:
  • platform/graphics/cg/SubimageCacheWithTimer.cpp:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::setTimeout):
(WebCore::XMLHttpRequest::createRequest):

  • xml/XMLHttpRequest.h:

Source/WebKit/mac:

  • WebView/WebView.mm:

(+[WebView _setCacheModel:]):

Source/WebKit/win:

  • WebView.cpp:

(WebView::setCacheModel):

Source/WebKit2:

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::Throttle::Throttle):
(WebKit::NetworkLoad::didReceiveResponseNetworkSession):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::loadThrottleLatency):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:
  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/NetworkResourceLoadParameters.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::startNetworkLoad):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
  • NetworkProcess/cache/NetworkCacheStatistics.cpp:
  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::store):

  • Shared/CacheModel.cpp:

(WebKit::calculateMemoryCacheSizes):

  • Shared/CacheModel.h:
  • Shared/mac/RemoteLayerBackingStoreCollection.mm:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::maximumBufferingTime):

  • WebProcess/Plugins/PluginView.cpp:
  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):

  • WebProcess/WebProcess.cpp:

(WebKit::m_resourceLoadStatisticsStore):
(WebKit::WebProcess::setCacheModel):

4:03 PM Changeset in webkit [215151] by Simon Fraser
  • 5 edits in trunk

Update CSSProperties.json with correct fill-and-stroke status, and other cleanup
https://bugs.webkit.org/show_bug.cgi?id=170643

Reviewed by Chris Dumez.
Source/WebCore:

Structural changes:

  • move implementation-related "comment" blocks into "codegen-properties"
  • move status-related "comment" blocks into "status"

Add the concept of "obsolete-category" and "obsolete-url" for properties
like the text-fill-and-stroke properties that used to be specified in SVG but
now have their own module shared with CSS.

Update the status of paint-order, stroke-linecap, stroke-linejoin, stroke-miterlimit
and stroke-width to "supported", overriding the default for css-text-fill-and-stroke which
is "under consideration".

Add display values "flow" and "flow-root" but mark them as unimplemented.

Fix makeprop.pl to ignore comments inside codegen-properties.

  • css/CSSProperties.json:
  • css/makeprop.pl:

(addProperty):

Tools:

Update the CSSProperties.json style checker to allow:

  • comments in codegen_properties
  • obsolete-category and obsolete-url in specification blocks
  • renamed "done" to "supported"

Fix some references to codegen_properties to be codegen-properties.

  • Scripts/webkitpy/style/checkers/jsonchecker.py:

(JSONCSSPropertiesChecker.validate_status_type):
(JSONCSSPropertiesChecker.validate_property_specification):
(JSONCSSPropertiesChecker.check_codegen_properties):

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

[CMake] Don't force-enable response files when using Ninja generator
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.

Not all platforms support response files, and unconditionally enabling
response files is known to cause build failure for some platforms.
Since WebKit builds fine on many platforms without force-enabling
response files and bug 129771 didn't mention which platform required
it, we remove it instead of adding more platform checks.

  • Source/cmake/OptionsCommon.cmake:
2:29 PM Changeset in webkit [215149] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Unreviewed attempt to fix GTK build after r215138.

  • UIProcess/API/gtk/WebKitUIClient.cpp:
1:36 PM Changeset in webkit [215148] by mitz@apple.com
  • 1 edit
    1 delete in trunk/WebKitLibraries

Removed an empty directory left behind after r212841.

  • WebKitPrivateFrameworkStubs/iOS/10/CorePrediction.framework: Removed.
1:35 PM Changeset in webkit [215147] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebCore

[MediaStream iOS] Update muted state when interrupted
https://bugs.webkit.org/show_bug.cgi?id=170605
<rdar://problem/31503896>

Reviewed by Youenn Fablet.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::setMuted): Don't check both m_stopped and stopped(). Split code
to notify observers out into notifyMutedObservers.
(WebCore::RealtimeMediaSource::notifyMutedObservers): Split from setMuted.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/AVMediaCaptureSource.h:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Set m_muted directly and
call notifyMutedObservers because the session has already stopped running.
(WebCore::AVMediaCaptureSource::isProducingData): Move from .h file to make debugging easier.

11:48 AM Changeset in webkit [215146] by Simon Fraser
  • 11 edits in trunk

Unprefix CSS cursor values grab and grabbing
https://bugs.webkit.org/show_bug.cgi?id=170543

Reviewed by Jon Lee.

Source/WebCore:

Add support for unprefixed "grab" and "grabbing" values for cursor (retaining
support for the prefixed values) which are now in <https://drafts.csswg.org/css-ui-3/#cursor>

Canonicalize the order of the values based on the order in the spec in the enums
and switch statements.

Tested by fast/css/cursor-parsing.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ECursor):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • page/EventHandler.cpp:

(WebCore::EventHandler::selectCursor):

  • rendering/style/RenderStyleConstants.h:

Source/WebInspectorUI:

Sort the cursor autosuggestions to match the order in the spec, and add the unprefixed
grab and grabbing values.

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

Enhanced the cursor test to check round-tripping of all values.

  • fast/css/cursor-parsing-expected.txt:
  • fast/css/cursor-parsing.html:
11:22 AM Changeset in webkit [215145] by commit-queue@webkit.org
  • 16 edits in trunk

WebRTC tests gardening
https://bugs.webkit.org/show_bug.cgi?id=170508

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

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig: Changing webrtc enabling for ios.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
11:08 AM Changeset in webkit [215144] by commit-queue@webkit.org
  • 4 edits in trunk

MediaStreamTrack id should be preserved by PeerConnection
https://bugs.webkit.org/show_bug.cgi?id=170624

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

Source/WebCore:

Covered by updated test.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::createReceiverForSource): Setting track id according source id.

LayoutTests:

  • webrtc/video.html:
10:09 AM Changeset in webkit [215143] by Chris Dumez
  • 23 edits in trunk/Source

Timer's nextFireInterval() / repeatInterval() should return Seconds
https://bugs.webkit.org/show_bug.cgi?id=170639

Reviewed by Simon Fraser.

Timer's nextFireInterval() / repeatInterval() should return Seconds, not double.

Source/WebCore:

  • loader/NavigationScheduler.cpp:
  • page/DOMTimer.cpp:

(WebCore::DOMTimer::updateTimerIntervalIfNecessary):

  • page/SuspendableTimer.cpp:

(WebCore::SuspendableTimer::suspend):
(WebCore::SuspendableTimer::repeatInterval):

  • page/SuspendableTimer.h:
  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::timeToNextService):
(WebCore::AnimationBase::getTimeToNextEvent):
(WebCore::AnimationBase::goIntoEndingOrLoopingState):

  • page/animation/AnimationBase.h:
  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::updateAnimations):
(WebCore::CSSAnimationControllerPrivate::updateAnimationTimerForRenderer):
(WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
(WebCore::CSSAnimationControllerPrivate::animationFrameCallbackFired):

  • page/animation/CSSAnimationControllerPrivate.h:
  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::timeToNextService):

  • page/animation/CompositeAnimation.h:
  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::timeToNextService):

  • page/animation/ImplicitAnimation.h:
  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::timeToNextService):

  • page/animation/KeyframeAnimation.h:
  • platform/ThreadTimers.cpp:

(WebCore::ThreadTimers::sharedTimerFiredInternal):

  • platform/Timer.cpp:

(WebCore::TimerBase::nextFireInterval):

  • platform/Timer.h:

(WebCore::TimerBase::repeatInterval):

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::setIsInWindow):
(WebCore::TileController::scheduleTileRevalidation):

  • platform/graphics/ca/TileController.h:
  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::revalidateTiles):

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::layerVolatilityTimerFired):
(WebKit::WebPage::markLayersVolatile):

6:43 AM Changeset in webkit [215142] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

Unreviewed Mac cmake buildfix after r215051, just for fun.
https://bugs.webkit.org/show_bug.cgi?id=169761

  • PlatformMac.cmake:

Apr 7, 2017:

10:30 PM Changeset in webkit [215141] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: Fix issue with BrTable targeting a Loop
https://bugs.webkit.org/show_bug.cgi?id=170638

Reviewed by Saam Barati.

This fixes the same issue V8 had in: https://github.com/WebAssembly/spec/pull/456#event-1033547537

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::ControlData::branchTargetSignature):

8:53 PM Changeset in webkit [215140] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Build fix: TimerBase::start(double, double) can't be inline and exported,
so make it non-inline.

  • platform/Timer.cpp:

(WebCore::TimerBase::start):

  • platform/Timer.h:

(WebCore::TimerBase::start): Deleted.

8:22 PM Changeset in webkit [215139] by keith_miller@apple.com
  • 2 edits in trunk/Source/WTF

Unreviewed, remove constexpr function since GTK didn't like it.

  • wtf/PriorityQueue.h:

(WTF::PriorityQueue::parentOf):

7:26 PM Changeset in webkit [215138] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit2

Modernize WebPage.h
https://bugs.webkit.org/show_bug.cgi?id=170633

Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-07
Reviewed by Joseph Pecoraro.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::createNewPage):

  • UIProcess/API/C/WKPage.cpp:

(WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
(WebKit::RunJavaScriptAlertResultListener::create):
(WebKit::RunJavaScriptConfirmResultListener::create):
(WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
(WebKit::RunJavaScriptPromptResultListener::create):
(WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
(WKPageSetPageUIClient):

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

(WebKit::UIDelegate::UIClient::createNewPage):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadStringImpl):
(WebKit::WebPage::loadData):
(WebKit::WebPage::scaledSnapshotWithOptions):
(WebKit::WebPage::SandboxExtensionTracker::willPerformLoadDragDestinationAction):
(WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):

  • WebProcess/WebPage/WebPage.h:
7:23 PM Changeset in webkit [215137] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

REGRESSION (r203941): iAd Producer widgets fail to play in iBooks
https://bugs.webkit.org/show_bug.cgi?id=170635
<rdar://problem/30797958>

Reviewed by Daniel Bates.

Extend the MouseEvent::initMouseEvent() workaround we added for iAd Producer
to iBooks since the iBooks widgets generated by iAd Producer contain the same
bug.

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::initMouseEventQuirk):

6:33 PM Changeset in webkit [215136] by Chris Dumez
  • 12 edits in trunk/Source

Start using MonotonicTime / Seconds in Timer class
https://bugs.webkit.org/show_bug.cgi?id=170625

Reviewed by Simon Fraser.

Source/WebCore:

Start using MonotonicTime / Seconds in Timer class. More work will be needed
for the transition to be complete. I plan to do this in a follow-up.

  • page/DOMTimer.cpp:

(WebCore::DOMTimer::alignedFireTime):

  • page/DOMTimer.h:
  • page/SuspendableTimer.cpp:

(WebCore::SuspendableTimer::suspend):
(WebCore::SuspendableTimer::startRepeating):
(WebCore::SuspendableTimer::startOneShot):
(WebCore::SuspendableTimer::repeatInterval):
(WebCore::SuspendableTimer::augmentFireInterval):
(WebCore::SuspendableTimer::augmentRepeatInterval):

  • page/SuspendableTimer.h:

(WebCore::SuspendableTimer::startRepeating):
(WebCore::SuspendableTimer::startOneShot):
(WebCore::SuspendableTimer::augmentFireInterval):
(WebCore::SuspendableTimer::augmentRepeatInterval):

  • platform/ThreadTimers.cpp:

(WebCore::ThreadTimers::ThreadTimers):
(WebCore::ThreadTimers::setSharedTimer):
(WebCore::ThreadTimers::updateSharedTimer):
(WebCore::ThreadTimers::sharedTimerFiredInternal):
(WebCore::ThreadTimers::fireTimersInNestedEventLoop):

  • platform/ThreadTimers.h:
  • platform/Timer.cpp:

(WebCore::TimerHeapLessThanFunction::operator()):
(WebCore::TimerBase::TimerBase):
(WebCore::TimerBase::start):
(WebCore::TimerBase::stop):
(WebCore::TimerBase::nextFireInterval):
(WebCore::TimerBase::heapPop):
(WebCore::TimerBase::updateHeapIfNeeded):
(WebCore::TimerBase::setNextFireTime):
(WebCore::TimerBase::nextUnalignedFireInterval):

  • platform/Timer.h:

(WebCore::TimerBase::start):
(WebCore::TimerBase::startOneShot):
(WebCore::TimerBase::repeatInterval):
(WebCore::TimerBase::repeatIntervalSeconds):
(WebCore::TimerBase::augmentFireInterval):
(WebCore::TimerBase::augmentRepeatInterval):
(WebCore::TimerBase::alignedFireTime):
(WebCore::TimerBase::isActive):

  • testing/Internals.cpp:

(WebCore::Internals::isTimerThrottled):

Source/WTF:

Add modulo operator to MonotonicTime.

  • wtf/MonotonicTime.h:

(WTF::MonotonicTime::operator%):

6:15 PM Changeset in webkit [215135] by keith_miller@apple.com
  • 8 edits
    2 adds in trunk

Add a PriorityQueue class
https://bugs.webkit.org/show_bug.cgi?id=170579

Reviewed by Saam Barati.

Source/JavaScriptCore:

Update Wasm::Worklist to use WTF::PriorityQueue.

  • wasm/WasmWorklist.cpp:

(JSC::Wasm::Worklist::enqueue):
(JSC::Wasm::Worklist::completePlanSynchronously):
(JSC::Wasm::Worklist::stopAllPlansForVM):
(JSC::Wasm::Worklist::~Worklist):
(JSC::Wasm::Worklist::iterate): Deleted.

  • wasm/WasmWorklist.h:

(JSC::Wasm::Worklist::isHigherPriority):
(JSC::Wasm::Worklist::Comparator::operator()): Deleted.

Source/WTF:

This patch adds a new PriorityQueue class that is backed by
WTF::Vector. It also has a number of other niceties such as being
able to iterate the queue and increase or decrease keys.

One note is that increaseKey and decreaseKey are O(n) rather than
O(log(n)). Traditionally, the lookup of the key is done with a
hash map but that's not feasible here. This is because unless the
queue's element type is a pointer there is no good way maintain a
persistent reference to every entry in the queue while we sift.
The only way to update the location of an entry is to do a hash
table lookup with the entry's hash but this is probably more
expensive than just doing a linear search.

Also, add comparison operator functions, which can be passed to PriorityQueue.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/MathExtras.h:

(isLessThan):
(isLessThanEqual):
(isGreaterThan):
(isGreaterThanEqual):

  • wtf/PriorityQueue.h: Added.

(WTF::PriorityQueue::size):
(WTF::PriorityQueue::isEmpty):
(WTF::PriorityQueue::enqueue):
(WTF::PriorityQueue::peek):
(WTF::PriorityQueue::dequeue):
(WTF::PriorityQueue::decreaseKey):
(WTF::PriorityQueue::increaseKey):
(WTF::PriorityQueue::begin):
(WTF::PriorityQueue::end):
(WTF::PriorityQueue::isValidHeap):
(WTF::PriorityQueue::parentOf):
(WTF::PriorityQueue::leftChildOf):
(WTF::PriorityQueue::rightChildOf):
(WTF::PriorityQueue::siftUp):
(WTF::PriorityQueue::siftDown):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/PriorityQueue.cpp: Added.

(operator _z ):
(enqueue):
(dequeue):
(TEST):
(compareMove):

6:11 PM Changeset in webkit [215134] by Chris Dumez
  • 3 edits in trunk/LayoutTests

Unreviewed, update 2 media tests after r215120 so they work on iOS.

Setting the volume is a no-op on iOS so mute the video instead.

  • media/video-restricted-invisible-autoplay-allowed-when-visible.html:
  • media/video-restricted-invisible-autoplay-not-allowed.html:
5:56 PM Changeset in webkit [215133] by msaboff@apple.com
  • 3 edits in trunk/JSTests

Fix and enable ChakraCore/test/es6/ES6Function_bugs.js after r215072
https://bugs.webkit.org/show_bug.cgi?id=170580

Reviewed by JF Bastien.

Commented out subtest that expects defineProperty("length") to a getter on a
sealed function shouldn't throw.

  • ChakraCore.yaml:
  • ChakraCore/test/es6/ES6Function_bugs.js:
5:24 PM Changeset in webkit [215132] by commit-queue@webkit.org
  • 10 edits in trunk/Source

Use audit_token_t instead of pid_t for checking sandbox of other processes
https://bugs.webkit.org/show_bug.cgi?id=170616
<rdar://problem/31158189>

Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-07
Reviewed by Daniel Bates.

Source/WebKit2:

pid's can be reused, so it's theoretically unsafe to use the pid of another process to check whether it's sandboxed.
Use an audit_token_t instead to be more sure that we are not mistakenly checking a new process that has reused the
old process's pid. For the current process, though, we have no xpc_connection_t to the process because we are the process.

  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::PluginProcess::initializeSandbox):

  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:

(WebKit::XPCServiceInitializerDelegate::isClientSandboxed):

  • Shared/mac/SandboxUtilities.h:
  • Shared/mac/SandboxUtilities.mm:

(WebKit::currentProcessIsSandboxed):
(WebKit::connectedProcessIsSandboxed):
(WebKit::processIsSandboxed): Deleted.

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::platformIsBeingDebugged):

  • UIProcess/Plugins/mac/PluginInfoStoreMac.mm:

(WebKit::PluginInfoStore::shouldUsePlugin):

  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:

(WebKit::PluginProcessProxy::platformGetLaunchOptions):

Source/WTF:

  • wtf/spi/darwin/SandboxSPI.h:

Declare more SPI.

5:21 PM Changeset in webkit [215131] by commit-queue@webkit.org
  • 17 edits
    13 copies
    5 adds in trunk

Source/JavaScriptCore:
WebGPU: implement ComputeCommandEncoder and related components
https://bugs.webkit.org/show_bug.cgi?id=170444

Patch by Yuichiro Kikura <y.kikura@gmail.com> on 2017-04-07
Reviewed by Alex Christensen.

I added some identifiers related with WebGPUComputeCommandEncoder based on the proposal.
https://webkit.org/wp-content/uploads/webgpu-api-proposal.html

  • runtime/CommonIdentifiers.h:

Source/WebCore:
WebGPU: implement ComputeCommandEncoder and related components
https://bugs.webkit.org/show_bug.cgi?id=170444

Patch by Yuichiro Kikura <y.kikura@gmail.com> on 2017-04-07
Reviewed by Alex Christensen.

I implemented WebGPUComputeCommandEncoder and related components based on the WebGPU proposal.
https://webkit.org/wp-content/uploads/webgpu-api-proposal.html

Test: fast/canvas/webgpu/webgpu-dispatch.html

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

(WebCore::JSWebGPUCommandBuffer::completed):

  • html/canvas/WebGPUCommandBuffer.cpp:

(WebCore::WebGPUCommandBuffer::createComputeCommandEncoder):

  • html/canvas/WebGPUCommandBuffer.h:
  • html/canvas/WebGPUCommandBuffer.idl:
  • html/canvas/WebGPUComputeCommandEncoder.cpp: Added.

(WebCore::GPUSizeMake):
(WebCore::WebGPUComputeCommandEncoder::create):
(WebCore::WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder):
(WebCore::WebGPUComputeCommandEncoder::~WebGPUComputeCommandEncoder):
(WebCore::WebGPUComputeCommandEncoder::setComputePipelineState):
(WebCore::WebGPUComputeCommandEncoder::setBuffer):
(WebCore::WebGPUComputeCommandEncoder::dispatch):
(WebCore::WebGPUComputeCommandEncoder::endEncoding):

  • html/canvas/WebGPUComputeCommandEncoder.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.

(WebCore::WebGPUComputeCommandEncoder::computeCommandEncoder):

  • html/canvas/WebGPUComputeCommandEncoder.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
  • html/canvas/WebGPUComputePipelineState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.

(WebCore::WebGPUComputePipelineState::create):
(WebCore::WebGPUComputePipelineState::WebGPUComputePipelineState):
(WebCore::WebGPUComputePipelineState::~WebGPUComputePipelineState):

  • html/canvas/WebGPUComputePipelineState.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.h.

(WebCore::WebGPUComputePipelineState::computePipelineState):

  • html/canvas/WebGPUComputePipelineState.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
  • html/canvas/WebGPURenderingContext.cpp:

(WebCore::WebGPURenderingContext::createComputePipelineState):

  • html/canvas/WebGPURenderingContext.h:
  • html/canvas/WebGPURenderingContext.idl:
  • html/canvas/WebGPUSize.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
  • html/canvas/WebGPUSize.idl: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.
  • platform/graphics/cocoa/GPUCommandBufferMetal.mm:

(WebCore::GPUCommandBuffer::completed):

  • platform/graphics/cocoa/GPUComputeCommandEncoderMetal.mm: Added.

(WebCore::MTLSizeMake):
(WebCore::GPUComputeCommandEncoder::GPUComputeCommandEncoder):
(WebCore::GPUComputeCommandEncoder::setComputePipelineState):
(WebCore::GPUComputeCommandEncoder::setBuffer):
(WebCore::GPUComputeCommandEncoder::dispatch):
(WebCore::GPUComputeCommandEncoder::endEncoding):
(WebCore::GPUComputeCommandEncoder::platformComputeCommandEncoder):

  • platform/graphics/cocoa/GPUComputePipelineStateMetal.mm: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.

(WebCore::GPUComputePipelineState::GPUComputePipelineState):
(WebCore::GPUComputePipelineState::platformComputePipelineState):

  • platform/graphics/gpu/GPUCommandBuffer.cpp:

(WebCore::GPUCommandBuffer::createComputeCommandEncoder):

  • platform/graphics/gpu/GPUCommandBuffer.h:
  • platform/graphics/gpu/GPUComputeCommandEncoder.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp.

(WebCore::GPUComputeCommandEncoder::create):
(WebCore::GPUComputeCommandEncoder::~GPUComputeCommandEncoder):
(WebCore::GPUComputeCommandEncoder::setComputePipelineState):
(WebCore::GPUComputeCommandEncoder::setBuffer):
(WebCore::GPUComputeCommandEncoder::endEncoding):

  • platform/graphics/gpu/GPUComputeCommandEncoder.h: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h.
  • platform/graphics/gpu/GPUComputePipelineState.cpp: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.

(WebCore::GPUComputePipelineState::create):
(WebCore::GPUComputePipelineState::~GPUComputePipelineState):

  • platform/graphics/gpu/GPUComputePipelineState.h: Copied from Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h.
  • platform/graphics/gpu/GPUSize.h: Copied from Source/WebCore/html/canvas/WebGPUCommandBuffer.idl.

LayoutTests:
WebGPU: implement ComputeCommandEncoder and related components
https://bugs.webkit.org/show_bug.cgi?id=170444

Patch by Yuichiro Kikura <y.kikura@gmail.com> on 2017-04-07
Reviewed by Alex Christensen.

Added a test case to ensure ComputeCommandEncoder is dispatched successfully

  • fast/canvas/webgpu/webgpu-dispatch-expected.txt: Added.
  • fast/canvas/webgpu/webgpu-dispatch.html: Added.
5:00 PM Changeset in webkit [215130] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Enable SSE4 and NEON optimizations of libopus where available
https://bugs.webkit.org/show_bug.cgi?id=170592

Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-07
Reviewed by Youenn Fablet.

  • Configurations/opus.xcconfig:
  • libwebrtc.xcodeproj/project.pbxproj:
4:59 PM Changeset in webkit [215129] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][iOS] Add CoreMedia entitlement for WebProcess
https://bugs.webkit.org/show_bug.cgi?id=170623
<rdar://problem/30020073>

Reviewed by Youenn Fablet.

Add new "com.apple.tcc.delegated-services" entitlement to allow CoreMedia
to work properly in WebRTC.

  • Configurations/WebContent-iOS.entitlements:
4:25 PM Changeset in webkit [215128] by jmarcell@apple.com
  • 8 edits
    1 move in tags/Safari-604.1.16.1

Cherry-pick r214946. rdar://problem/31472278

4:25 PM Changeset in webkit [215127] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.16.1/Source

Versioning.

4:11 PM Changeset in webkit [215126] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

4:02 PM Changeset in webkit [215125] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Private browsing sessions should not look in keychain for client certificates
https://bugs.webkit.org/show_bug.cgi?id=170618
<rdar://problem/18457427>

Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-07
Reviewed by Dan Bernstein.

Source/WebCore:

Our client certificate testing in WebKit leaves much to be desired.
See rdar://problem/17694210 for reproduction steps.

  • platform/spi/cf/CFNetworkSPI.h:

Add some new SPI.

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::configurationForSessionID):

3:48 PM Changeset in webkit [215124] by Alan Bujtas
  • 4 edits
    2 adds in trunk

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.
3:22 PM Changeset in webkit [215123] by Chris Dumez
  • 5 edits in trunk/Source

We should log how much CPU a background process was using when killing it due to CPU limiting
https://bugs.webkit.org/show_bug.cgi?id=170619

Reviewed by Andreas Kling.

Source/WebCore:

CPUMonitor now passes the CPU usage to the callback when it exceeds the threashold.

  • platform/CPUMonitor.cpp:

(WebCore::CPUMonitor::timerFired):

  • platform/CPUMonitor.h:

Source/WebKit2:

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::updateBackgroundCPUMonitorState):

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

Mark media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168540

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:13 PM Changeset in webkit [215121] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/codemirror/prettyprinting-css.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=170615

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:04 PM Changeset in webkit [215120] by Chris Dumez
  • 5 edits
    1 copy
    1 add in trunk

Audible autoplay videos should not get paused when outside the viewport
https://bugs.webkit.org/show_bug.cgi?id=170610
<rdar://problem/31505984>

Reviewed by Eric Carlson.

Source/WebCore:

Audible autoplay videos should not get paused when outside the viewport as this
would be observable by the user.

Test: media/video-restricted-invisible-autoplay-allowed-if-audible.html

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::autoplayPermitted):

LayoutTests:

Add layout test coverage.

  • media/video-restricted-invisible-autoplay-allowed-if-audible-expected.txt: Added.
  • media/video-restricted-invisible-autoplay-allowed-if-audible.html: Copied from LayoutTests/media/video-restricted-invisible-autoplay-not-allowed.html.
  • media/video-restricted-invisible-autoplay-allowed-when-visible.html:
  • media/video-restricted-invisible-autoplay-not-allowed.html:
2:52 PM Changeset in webkit [215119] by rniwa@webkit.org
  • 1 edit
    2 moves in trunk/Tools

Replace ES6SampleBench by ARES-6 in run-benchmark
https://bugs.webkit.org/show_bug.cgi?id=170585

Reviewed by Saam Barati.

Updated the plan file for ES6SampleBench to run ARES-6 instead. Also increased the number of iterations
from 4 to 8 to match teh default, and reduced the number of browser instances to use from 5 to 3.

  • Scripts/webkitpy/benchmark_runner/data/patches/ARES-6.patch: Renamed from ES6SampleBench.patch.
  • Scripts/webkitpy/benchmark_runner/data/plans/ares6.plan: Renamed from es6bench.plan.
2:45 PM Changeset in webkit [215118] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Make cycler page scroll down when a dashboard is too tall for the current viewport size
https://bugs.webkit.org/show_bug.cgi?id=170588

Rubber-stamped by Chris Dumez.

Updated the cycler page to scroll down smoothly over 500ms and scroll up again before moving to the next page
when a dashboard page is too tall to be shown at once. For now, we assume that each dashboard's height is no
more than 2x the height of the viewport.

  • public/cycler.html:
2:37 PM Changeset in webkit [215117] by mmaxfield@apple.com
  • 5 edits in trunk

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:49 PM Changeset in webkit [215116] by Chris Dumez
  • 5 edits
    3 adds in trunk

Throttle / Align DOM Timers in cross-origin iframes to 30fps
https://bugs.webkit.org/show_bug.cgi?id=170613
<rdar://problem/31506444>

Reviewed by Simon Fraser.

Source/WebCore:

Throttle / Align DOM Timers in cross-origin iframes to 30fps unless the user
has interacted with them, in order to reduce power use.

Test: http/tests/frame-throttling/timer-throttle-in-cross-origin-subframe.html

  • dom/Document.cpp:

(WebCore::Document::domTimerAlignmentInterval):
(WebCore::Document::updateLastHandledUserGestureTimestamp):

  • page/DOMTimer.h:

LayoutTests:

Add layout test coverage.

  • http/tests/frame-throttling/resources/timer-throttling-frame.html: Added.
  • http/tests/frame-throttling/timer-throttle-in-cross-origin-subframe-expected.txt: Added.
  • http/tests/frame-throttling/timer-throttle-in-cross-origin-subframe.html: Added.
12:57 PM Changeset in webkit [215115] by wilander@apple.com
  • 2 edits in trunk/Source/WebCore

Follow-up fix for Soup platform.
https://bugs.webkit.org/show_bug.cgi?id=170322

Unreviewed build fix. Error introduced by me in
https://trac.webkit.org/changeset/215104/webkit.

No new tests.

  • platform/network/soup/SocketStreamHandleImpl.h:

Move parameter change to the right
SocketStreamHandleImpl::create() function.

12:42 PM Changeset in webkit [215114] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: Module::getOrCreateCodeBlock is wrong
https://bugs.webkit.org/show_bug.cgi?id=170612

Reviewed by Keith Miller.

When we were getting a module's CodeBlock, we were checking if !runnable(),
and if !runnable(), we were re-creating the CodeBlock. This is wrong, since
!runnable() is true while the CodeBlock is compiling. Instead, we should check
if we've finished compiling, and if so, if that compilation failed.

  • wasm/WasmModule.cpp:

(JSC::Wasm::Module::getOrCreateCodeBlock):

12:31 PM Changeset in webkit [215113] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: DOM/XHR breakpoint tree elements shouldn't persist their represented objects
https://bugs.webkit.org/show_bug.cgi?id=170611
<rdar://problem/31506161>

Reviewed by Joseph Pecoraro.

Prevent tree elements for DOM and XHR breakpoints from persisting their
represented objects.

  • UserInterface/Views/ContentView.js:

(WebInspector.ContentView.createFromRepresentedObject):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):

12:28 PM Changeset in webkit [215112] by Ryan Haddad
  • 2 edits in trunk/Tools

[ios-simulator] API test WebKit2.WKWebProcessPlugInRangeHandle timing out
https://bugs.webkit.org/show_bug.cgi?id=167594

Unreviewed test gardening.

Disable this test because it is still timing out on the bots.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm:

(TEST):

12:17 PM Changeset in webkit [215111] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

Missing conversion from window to content coordinates when adjusting unobscured content rects for input view
https://bugs.webkit.org/show_bug.cgi?id=170603

Reviewed by Simon Fraser.

Refactors -[WKContentView _computeUnobscuredContentRectRespectingInputViewBounds:unobscuredContentRect:inputViewBounds:scale:]
to convert the input view bounds into content coordinates instead of using the zoom scale to adjust the height of inputViewBounds.
Covered by the existing LayoutTest, fixed-element-on-bottom-with-keyboard.html.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _computeUnobscuredContentRectRespectingInputViewBounds:unobscuredContentRect:inputViewBounds:scale:]):

12:13 PM Changeset in webkit [215110] by Ryan Haddad
  • 2 edits in trunk/LayoutTests/imported/w3c

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:
12:07 PM Changeset in webkit [215109] by Jonathan Bedard
  • 2 edits in trunk/Tools

REGRESSION (r214553): Allow layout-tests to be run from Xcode without re-directing stdout, stdin and stderr
https://bugs.webkit.org/show_bug.cgi?id=170601
<rdar://problem/31492696>

Reviewed by Simon Fraser.

  • TestRunnerShared/IOSLayoutTestCommunication.cpp:

(setUpIOSLayoutTestCommunication): Skip TCP setup if no port is in the environment.
(tearDownIOSLayoutTestCommunication): Only teardown if TCP was used.

12:06 PM Changeset in webkit [215108] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

Add support for test262 JavaScriptCore tests
https://bugs.webkit.org/show_bug.cgi?id=170523

Reviewed by Daniel Bates.

  • BuildSlaveSupport/build.webkit.org-config/config.json: Added bot433 and bot434.
  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunTest262Tests): Added class to run Test262 tests.
(RunTest262Tests.start): Added.
(RunTest262Tests.countFailures): Method to count the failures.
(Test262Factory): Added Test262 factory class.

  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

(RunTest262TestsTest): Added unit tests.
(RunTest262TestsTest.assertResults): Helper method.
(RunTest262TestsTest.test_no_regressions_output): Added test case.
(test_failure_output): Same.
(test_failures_output): Same.

12:03 PM Changeset in webkit [215107] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

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:
11:52 AM Changeset in webkit [215106] by Michael Catanzaro
  • 6 edits in trunk

[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):

11:49 AM Changeset in webkit [215105] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[JSC] Change --debug option to --debugger
https://bugs.webkit.org/show_bug.cgi?id=170587

Patch by Caio Lima <Caio Lima> on 2017-04-07
Reviewed by Keith Miller.

  • Scripts/run-jsc:

This patch is changing the new debugger flag for Tools/Scripts/run-jsc
to --debugger to avoid shadowing --debug flag used to run JSC with
Debug build.

11:36 AM Changeset in webkit [215104] by wilander@apple.com
  • 12 edits in trunk/Source

WebSocket streams should have network usage attributed to correct process
https://bugs.webkit.org/show_bug.cgi?id=170322
<rdar://problem/26413551>

Reviewed by Alex Christensen.

Source/WebCore:

Tested manually since it requires a per-app VPN.

  • page/SocketProvider.cpp:

(WebCore::SocketProvider::createSocketStreamHandle):

Sends in an empty struct since it doesn't have access to
platform dependent sourceApplicationAuditData.

  • platform/network/SocketStreamHandle.h:

Declaration of a per-platform struct to hold CF data for
Cocoa platforms.

  • platform/network/cf/SocketStreamHandleImpl.h:

(WebCore::SocketStreamHandleImpl::create):

Now takes WebCore::SourceApplicationAuditToken which is
passed on to the constructor.

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):

Now takes WebCore::SourceApplicationAuditToken which is
passed on to the streams once created.

(WebCore::SocketStreamHandleImpl::createStreams):

Now sets kCFStreamPropertySourceApplication for the two
streams.

  • platform/network/curl/SocketStreamHandleImpl.h:

(WebCore::SocketStreamHandleImpl::create):

Added unused WebCore::SourceApplicationAuditToken parameter.

  • platform/network/soup/SocketStreamHandleImpl.h:
  • platform/network/soup/SocketStreamHandleImplSoup.cpp:

(WebCore::SocketStreamHandleImpl::create):

Added unused WebCore::SourceApplicationAuditToken parameter.

Source/WebKit2:

Changes here are due to the added WebCore::SourceApplicationAuditToken parameter
in WebCore::SocketStreamHandleImpl::create().
WebKit::NetworkSocketStream takes it and passes it on.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createSocketStream):

  • NetworkProcess/NetworkSocketStream.cpp:

(WebKit::NetworkSocketStream::create):
(WebKit::NetworkSocketStream::NetworkSocketStream):

  • NetworkProcess/NetworkSocketStream.h:
11:25 AM Changeset in webkit [215103] by sbarati@apple.com
  • 24 edits
    4 adds in trunk/Source

WebAssembly: Make to a compilation API that allows for multi-VM concurrent compilations of Wasm Modules
https://bugs.webkit.org/show_bug.cgi?id=170488

Reviewed by JF Bastien.

Source/JavaScriptCore:

This patch adds a class called Wasm::Module. It contains the bits from
JSWebAssemblyModule that were not VM specific. JSWebAssemblyModule
now has a Ref<Wasm::Module>. Similarly, there is now a Wasm::CodeBlock,
which owns the non-VM-specific bits that JSWebAssemblyCodeBlock used
to own.

This patch also simplifies how we verify and compile code. Wasm::Module
now has an API for both sync/async validation and compilation. This
API abstracts away how Wasm::Plan works.

This is hopefully the last patch needed before we can implement
window.postMessage for a JSWebAssemblyModule. I think all that's
needed now to implement postMessage is simply creating a new
JSWebAssemblyModule with the underlying Wasm::Module.

This patch is neutral on WasmBench.

Finally, this patch changes the promise deferred timer to
allow for new tasks to be added while we're executing
a task. Before, we'd deadlock if this happened.

(functionTestWasmModuleFunctions):

  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::doWork):
(JSC::PromiseDeferredTimer::scheduleWorkSoon):

  • runtime/PromiseDeferredTimer.h:
  • wasm/WasmB3IRGenerator.cpp:
  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):
(JSC::Wasm::wasmToWasm):
(JSC::Wasm::exitStubGenerator): Deleted.

  • wasm/WasmBinding.h:
  • wasm/WasmCodeBlock.cpp: Added.

(JSC::Wasm::CodeBlock::CodeBlock):
(JSC::Wasm::CodeBlock::waitUntilFinished):
(JSC::Wasm::CodeBlock::compileAsync):
(JSC::Wasm::CodeBlock::isSafeToRun):

  • wasm/WasmCodeBlock.h: Added.

(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::compilationFinished):
(JSC::Wasm::CodeBlock::runnable):
(JSC::Wasm::CodeBlock::errorMessage):
(JSC::Wasm::CodeBlock::functionImportCount):
(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):

  • wasm/WasmModule.cpp: Added.

(JSC::Wasm::Module::Module):
(JSC::Wasm::makeValidationResult):
(JSC::Wasm::Module::validateSyncImpl):
(JSC::Wasm::Module::getOrCreateCodeBlock):
(JSC::Wasm::Module::compileSync):
(JSC::Wasm::Module::makeValidationCallback):
(JSC::Wasm::Module::compileAsync):

  • wasm/WasmModule.h: Added.

(JSC::Wasm::Module::create):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):
(JSC::Wasm::Module::signatureIndexFromFunctionIndexSpace):
(JSC::Wasm::Module::moduleInformation):
(JSC::Wasm::Module::nonNullCodeBlock):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::addCompletionTask):
(JSC::Wasm::Plan::prepare):
(JSC::Wasm::Plan::compileFunctions):
(JSC::Wasm::Plan::complete):
(JSC::Wasm::Plan::tryRemoveVMAndCancelIfLast):
(JSC::Wasm::Plan::cancel): Deleted.

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::dontFinalize):
(JSC::Wasm::Plan::takeWasmToWasmExitStubs):
(JSC::Wasm::Plan::mode):
(JSC::Wasm::Plan::takeWasmExitStubs): Deleted.
(JSC::Wasm::Plan::vm): Deleted.

  • wasm/WasmWorklist.cpp:

(JSC::Wasm::Worklist::stopAllPlansForVM):

  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock):
(JSC::JSWebAssemblyCodeBlock::isSafeToRun):
(JSC::JSWebAssemblyCodeBlock::initialize): Deleted.

  • wasm/js/JSWebAssemblyCodeBlock.h:

(JSC::JSWebAssemblyCodeBlock::create):
(JSC::JSWebAssemblyCodeBlock::functionImportCount):
(JSC::JSWebAssemblyCodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyCodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyCodeBlock::wasmToJsCallStubForImport):
(JSC::JSWebAssemblyCodeBlock::mode): Deleted.
(JSC::JSWebAssemblyCodeBlock::initialized): Deleted.
(JSC::JSWebAssemblyCodeBlock::plan): Deleted.
(JSC::JSWebAssemblyCodeBlock::runnable): Deleted.
(JSC::JSWebAssemblyCodeBlock::errorMessage): Deleted.
(JSC::JSWebAssemblyCodeBlock::setJSEntrypointCallee): Deleted.
(JSC::JSWebAssemblyCodeBlock::setWasmEntrypointCallee): Deleted.

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::addUnitializedCodeBlock): Deleted.

  • wasm/js/JSWebAssemblyInstance.h:

(JSC::JSWebAssemblyInstance::initialized): Deleted.

  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::createStub):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::finishCreation):

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::moduleInformation):
(JSC::JSWebAssemblyModule::signatureIndexFromFunctionIndexSpace):
(JSC::JSWebAssemblyModule::module):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::create):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::WebAssemblyModuleConstructor::createModule):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::reject):
(JSC::webAssemblyCompileFunc):
(JSC::resolve):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::webAssemblyValidateFunc):

Source/WTF:

  • wtf/SharedTask.h: Make SharedTaskFunctor forward its arguments.
11:15 AM Changeset in webkit [215102] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

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.

11:01 AM Changeset in webkit [215101] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit2

Unreviewed, fix missing return value warning

  • UIProcess/WebProcessProxy.cpp:

(WebKit::diagnosticLoggingKeyForSimulatedCrashReason):

10:56 AM Changeset in webkit [215100] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.16.1

New tag.

10:29 AM Changeset in webkit [215099] by eric.carlson@apple.com
  • 9 edits in trunk/Source/WebCore

MediaSample should store video sample rotation instead of orientation
https://bugs.webkit.org/show_bug.cgi?id=170598

Reviewed by Youenn Fablet.

No new tests, no functional change.

  • platform/MediaSample.h:

(WebCore::MediaSample::videoRotation):
(WebCore::MediaSample::videoOrientation): Deleted.

  • platform/graphics/avfoundation/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoTransformationMatrix):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::processNewFrame):

  • platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::OnFrame):
(WebCore::RealtimeIncomingVideoSource::processNewSample):

  • platform/mediastream/mac/RealtimeIncomingVideoSource.h:
  • platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):

9:57 AM Changeset in webkit [215098] by Brent Fulgham
  • 15 edits in trunk/LayoutTests

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:
9:22 AM Changeset in webkit [215097] by commit-queue@webkit.org
  • 2 edits in trunk

[CMake][Windows] WebKitGUID.lib should be built with the release CRT
https://bugs.webkit.org/show_bug.cgi?id=170593

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-07
Reviewed by Brent Fulgham.

Source/cmake/OptionsWin.cmake has a trick to force using the
release CRT even for debug build configuration. But, this works
only for C++, but for C. As the result, WebKitGUID.lib is built
with the debug CRT in debug build configuration because it has C
source files.

  • Source/cmake/OptionsWin.cmake: Process CMAKE_C_FLAGS_* as well as CMAKE_CXX_FLAGS_*.
9:02 AM Changeset in webkit [215096] by Brent Fulgham
  • 50 edits in trunk

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:
8:24 AM Changeset in webkit [215095] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Improve some WebRTC flaky tests
https://bugs.webkit.org/show_bug.cgi?id=170584

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

  • webrtc/libwebrtc/descriptionGetters.html:
  • webrtc/video-replace-track-to-null.html:
8:05 AM Changeset in webkit [215094] by Alan Bujtas
  • 6 edits
    3 adds in trunk

Text insertion cursor disappears after pressing enter
https://bugs.webkit.org/show_bug.cgi?id=169291
<rdar://problem/30899611>

Reviewed by Tim Horton.

Source/WebCore:

Positon upstream/downstream (as the result of VisiblePosition -> canonicalPosition) require
linebox tree. In addition to regular text, we need to bail out of simple line layout on line breaks too.

Test: editing/simple-line-layout-caret-is-gone.html

  • dom/Position.cpp:

(WebCore::ensureLineBoxesIfNeeded):
(WebCore::Position::upstream):
(WebCore::Position::downstream):
(WebCore::Position::getInlineBoxAndOffset):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::ensureLineBoxes):
(WebCore::RenderLineBreak::positionForPoint):
(WebCore::RenderLineBreak::setSelectionState):
(WebCore::RenderLineBreak::collectSelectionRects):
(WebCore::ensureLineBoxes): Deleted.

  • rendering/RenderLineBreak.h:

LayoutTests:

  • editing/simple-line-layout-caret-is-gone-expected.txt: Added.
  • editing/simple-line-layout-caret-is-gone.html: Added.
7:13 AM Changeset in webkit [215093] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GTK] Fix codec name in OWR ASSERT
https://bugs.webkit.org/show_bug.cgi?id=170600

Patch by Xan Lopez <xlopez@igalia.com> on 2017-04-07
Reviewed by Carlos Garcia Campos.

  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::prepareMediaSession): uppercase the
codec name we are looking for, that's how they appear in the
vector.

6:43 AM Changeset in webkit [215092] by pvollan@apple.com
  • 3 edits in trunk/Source/WebCore

Add hasVideo property to WebAVPlayerController.
https://bugs.webkit.org/show_bug.cgi?id=170545
rdar://problem/31325182

Reviewed by Eric Carlson.

Add a new "hasVideo" property which can be used to discover if any video content is present in the playback item,
whether video content is currently enabled or not.

  • platform/ios/WebAVPlayerController.h:
  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebVideoFullscreenInterfaceAVKit::hasVideoChanged):

5:52 AM Changeset in webkit [215091] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK+] Animations not played properly when using synchronous decoding
https://bugs.webkit.org/show_bug.cgi?id=170591

Reviewed by Carlos Garcia Campos.

Fix an index error when destroying decoded frames that was sometimes deleting the frame we wanted
to keep.

Covered by exitent tests.

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::destroyDecodedData):

5:01 AM Changeset in webkit [215090] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GTK] Add message about missing codecs to ASSERT in OWR
https://bugs.webkit.org/show_bug.cgi?id=170596

Patch by Xan Lopez <Xan Lopez> on 2017-04-07
Reviewed by Carlos Garcia Campos.

  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::prepareMediaSession): add a message
about the missing coded to the ASSERT.

4:59 AM Changeset in webkit [215089] by tpopela@redhat.com
  • 2 edits in trunk/Source/WebCore

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

3:43 AM Changeset in webkit [215088] by Carlos Garcia Campos
  • 18 edits
    1 add in trunk/Source

[GTK] Update the priorities used in glib main loop sources
https://bugs.webkit.org/show_bug.cgi?id=170457

Reviewed by Žan Doberšek.

Source/JavaScriptCore:

  • runtime/JSRunLoopTimer.cpp:

(JSC::JSRunLoopTimer::JSRunLoopTimer):

Source/WebCore:

  • platform/glib/MainThreadSharedTimerGLib.cpp:

(WebCore::MainThreadSharedTimer::MainThreadSharedTimer):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::TextureMapperPlatformLayerProxy):
(WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):

Source/WebKit2:

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::CompositingRunLoop::CompositingRunLoop):

  • UIProcess/DrawingAreaProxyImpl.cpp:

(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor):

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::createWaylandLoopSource):

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::CompositingCoordinator):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::DrawingAreaImpl):

Source/WTF:

Add an enum to define prirorities used in different GLib main sources. It allows to give them a better name
than high, low, medium, etc., but also to document them and other GLib based ports can define their own
values without changing all the places where they are used. The default values are based on the priorities
pre-defined by GLib.

  • wtf/glib/MainThreadGLib.cpp:

(WTF::MainThreadDispatcher::MainThreadDispatcher):

  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::RunLoop):
(WTF::RunLoop::dispatchAfter):
(WTF::RunLoop::TimerBase::TimerBase):

  • wtf/glib/RunLoopSourcePriority.h: Added.
  • wtf/linux/MemoryPressureHandlerLinux.cpp:

(WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller):

12:37 AM Changeset in webkit [215087] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[GCrypt] Implement AES_CBC support
https://bugs.webkit.org/show_bug.cgi?id=170550

Reviewed by Michael Catanzaro.

Implement the CryptoAlgorithmAES_CBC::platform{Encrypt,Decrypt}
functionality for configurations that use libgcrypt. This is done
by leveraging the gcry_cipher_* APIs for the AES algorithm that's
deduced appropriately from the key size and the CBC cipher mode.
Additionally, the PKCS#7 padding is implemented for each operation,
as demanded by the Web Crypto specification.

No new tests -- current ones cover this sufficiently, but are not yet
enabled due to missing platform-specific SUBTLE_CRYPTO implementations.

  • crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:

(WebCore::gcryptEncrypt):
(WebCore::gcryptDecrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

12:36 AM Changeset in webkit [215086] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

[GCrypt] Implement raw and JWK imports and exports for EC keys
https://bugs.webkit.org/show_bug.cgi?id=170546

Reviewed by Michael Catanzaro.

Source/WebCore:

Implement import and export operations for EC keys, covering the raw
and JWK import/export types.

CryptoKeyEC::platformImportRaw() builds a public-key s-expression,
providing the curve name and the key data, and yields the gcry_sexp_t
object to the new CryptoKeyEC.

CryptoKeyEC::platformImportJWKPublic() first constructs a Vector<uint8_t>
object that contains the EC point in the uncompressed format. It then
puts that data into a newly-constructed public-key s-expression that is
then used to construct the new CryptoKeyEC object.

CryptoKeyEC::platformImportJWKPrivate() constructs the EC point data just
the same, but it also lays out the private key field element data into
the private-key s-expression that's then handed off to the CryptoKeyEC
object.

CryptoKeyEC::platformExportRaw() constructs a new EC operations context
and then uses it to retrieve the q parameter as an MPI. A Vector<uint8_t>
is retrieved from the MPI data through the extractMPIData() helper
function.

CryptoKeyEC::platformAddFieldElements() similarly uses the EC operations
context to retrieve the q parameter data, which it then splits into the
x and y field elements and Base64 URL-encodes them into a form that can
be placed in a JsonWebKey. If the key is private, the d parameter is
retrieved in the same fashion and again Base64 URL-encoded and stored
in the JsonWebKey object.

No new tests -- current ones cover this sufficiently, but are not yet
enabled due to other missing platform-specific SUBTLE_CRYPTO
implementations.

  • crypto/gcrypt/CryptoKeyECGCrypt.cpp:

(WebCore::uncompressedPointSizeForCurve):
(WebCore::uncompressedFieldElementSizeForCurve):
(WebCore::extractMPIData):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformExportRaw):
(WebCore::CryptoKeyEC::platformAddFieldElements):

Source/WebCore/PAL:

Add HandleDeleter specizalizations for gcry_ctx_t and gcry_mpi_t types.

  • pal/crypto/gcrypt/Handle.h:

(PAL::GCrypt::HandleDeleter<gcry_ctx_t>::operator()):
(PAL::GCrypt::HandleDeleter<gcry_mpi_t>::operator()):

12:35 AM Changeset in webkit [215085] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

[GCrypt] Implement CryptoKeyRSA::generatePair()
https://bugs.webkit.org/show_bug.cgi?id=170350

Reviewed by Michael Catanzaro.

Start implementing the libgcrypt-based platform bits of CryptoKeyRSA.

Implement generatePair() by constructing a genkey s-expression
that requests a generation of an RSA key that should use a modulus
of the specified bit-length and the specified exponent. The exponent
is extracted from an uint8_t array through a helper function. The
modulus length value is checked to be at least 16, since libgcrypt
does not support generating primes of less than that length in bits.

The returned s-expression upon request will contain the data for
both the public and the private key. gcry_sexp_t handles representing
those s-expressions are then passed to CryptoKeyRSA::create() before
invoking the success callback with a new CryptoKeyPair object in a
separate ScriptExecutionContext task.

The CryptoKeyRSA constructor simply has the notImplemented() call
removed. The destructor now invokes the HandleDeleter<gcry_sexp_t>
object instance to destroy the object represented by the
m_platformKey handle.

The methods in CryptoKeyRSA.cpp are also reordered to follow the
declaration order used in the header.

No new tests -- current ones cover this sufficiently, but are not yet
enabled due to other missing platform-specific SUBTLE_CRYPTO
implementations.

  • crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:

(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::~CryptoKeyRSA):
(WebCore::exponentVectorToUInt32):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::exportPkcs8):
(WebCore::CryptoKeyRSA::buildAlgorithm):
(WebCore::CryptoKeyRSA::exportData):

  • crypto/keys/CryptoKeyRSA.h:

Apr 6, 2017:

8:45 PM Changeset in webkit [215084] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Add WKContentExtensionStore.h and WKContentExtension.h to public WebKit.h
https://bugs.webkit.org/show_bug.cgi?id=170533

Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-06
Reviewed by Daniel Bates.

  • Shared/API/Cocoa/WebKit.h:

In r213696 I added two public headers. All public headers in WebKit are included with
#import <WebKit/WebKit.h>

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

[Debug] ASSERT(!throwScope.exception()) on imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html
https://bugs.webkit.org/show_bug.cgi?id=170395
<rdar://problem/31394017>

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-06
Reviewed by Mark Lam.

  • bindings/js/JSDOMPromise.cpp:

(WebCore::DeferredPromise::reject): Exiting early in case of scope having an exception.
Adding an assertion to ensure this is a worker termination exception.

7:40 PM Changeset in webkit [215082] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Source Map Resources should show up in the Debugger Sources list
https://bugs.webkit.org/show_bug.cgi?id=170581
<rdar://problem/31269140>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-06
Reviewed by Matt Baker.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
Include SourceMapResources in the DebuggerSidebar's Sources tree outline.

7:14 PM EnvironmentVariables edited by clopez@igalia.com
(diff)
7:12 PM EnvironmentVariables edited by clopez@igalia.com
efl port gone (diff)
5:59 PM Changeset in webkit [215081] by mmaxfield@apple.com
  • 4 edits in trunk

Make FontWithFeatures test font pass OTS
https://bugs.webkit.org/show_bug.cgi?id=169788

Reviewed by Tim Horton.

Tools:

OTS, or the OpenType Sanitizer, is a check which tells if fonts are properly formed.
Previously, our FontWithFeatures test font did not pass this check. This patch updates
the font to pass the checks. Now, we can use this font on other platforms, and
contribute the font to the W3C for testing the CSS Fonts level 3 spec.

  • FontWithFeatures/FontWithFeatures/FontCreator.cpp:

(Generator::appendCFFTable):
(Generator::Feature::operator<):
(Generator::appendGSUBTable):
(Generator::appendOS2Table):
(Generator::appendFormat4CMAPTable):
(Generator::appendHEADTable):
(Generator::appendHHEATable):
(Generator::NameRecord::operator<):
(Generator::appendNameSubtable):
(Generator::appendNAMETable):

LayoutTests:

Updated font to the one which passes the tests.

  • css3/resources/FontWithFeatures.otf:
5:53 PM Changeset in webkit [215080] by ap@apple.com
  • 2 edits in trunk/Tools

Disable flaky WebKit2.ResizeWithHiddenContentDoesNotHang
for https://bugs.webkit.org/show_bug.cgi?id=170195

  • TestWebKitAPI/Tests/WebKit2Cocoa/AnimatedResize.mm:
5:47 PM Changeset in webkit [215079] by jiewen_tan@apple.com
  • 3 edits in trunk/LayoutTests

LayoutTest crypto/subtle/aes-ctr-encrypt-malformed-parameters.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170571

Unreviewed.

  • crypto/subtle/aes-ctr-encrypt-malformed-parameters-expected.txt:
  • crypto/subtle/aes-ctr-encrypt-malformed-parameters.html:
5:39 PM Changeset in webkit [215078] by Joseph Pecoraro
  • 3 edits in trunk/Source/WebKit2

Web Inspector: Hangs when loading under SpeculativeLoad::shouldCaptureExtraNetworkLoadMetrics
https://bugs.webkit.org/show_bug.cgi?id=170575

Rubber-stamped by Brian Burg.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::shouldCaptureExtraNetworkLoadMetrics): Deleted.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:

m_networkLoad is a wrapper around this as the client, so we would infinite loop here.

5:39 PM Changeset in webkit [215077] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Inaudible background tabs should become eligible for memory kill after 8 minutes
https://bugs.webkit.org/show_bug.cgi?id=170574
<rdar://problem/31488686>

Reviewed by Gavin Barraclough.

Lower the delay for potentially marking background tabs as inactive from 60 minutes to 8 minutes.
Letting a tab misbehave in the background for an entire hour was overly charitable.

  • page/PerformanceMonitor.cpp:
5:39 PM Changeset in webkit [215076] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit2

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

Causes issues in Safari (Requested by bradee-oh on #webkit).

Reverted changeset:

"Refactor so WebsiteDataStores always have a StorageManager."
https://bugs.webkit.org/show_bug.cgi?id=170521
http://trac.webkit.org/changeset/214973

5:38 PM Changeset in webkit [215075] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

Scroll offset jumps after a programmatic scroll in an overflow container with scroll snapping
https://bugs.webkit.org/show_bug.cgi?id=170560
<rdar://problem/31484693>

Reviewed by Tim Horton.

Source/WebCore:

Test: css3/scroll-snap/scroll-snap-programmatic-overflow-scroll.html

Logic for maintaining the scroll snap state in ScrollController was previously removed from iOS when refactoring
ScrollController. This was done because scroll snapping on iOS is driven not by the ScrollController (as it is
on Mac) but rather by sending scroll snap offsets to the UI process and hooking into UIScrollView delegates to
handle retargeted scrolling.

However, on iOS, this ScrollController state is still important for the purposes of keeping the last active
snap point index in sync with the UI process when the scroll offset changes outside of a user gesture (i.e.
programmatic scrolling). Since the UI process does not get a chance to update the active snap offset during a
programmatic scroll, our last active snap offset state was only being updated to the last snap position that the
user manually scrolled to, making programmatic scrolling jump to this offset.

To fix this, we need to update scroll snap state on iOS within ScrollController. Also adds a new Layout test
that exercises programmatic scrolling in an overflow scrolling container on all platforms.

  • platform/cocoa/ScrollController.mm:

(WebCore::otherScrollEventAxis):
(WebCore::ScrollController::updateScrollSnapState):
(WebCore::ScrollController::updateScrollSnapPoints):

LayoutTests:

Add a test verifying that programmatically changing the scroll offset of an overflow container does not cause the
scroll offset to jump back to the last active snap position. See WebCore ChangeLog for more details.

  • css3/scroll-snap/scroll-snap-programmatic-overflow-scroll-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-programmatic-overflow-scroll.html: Added.
5:36 PM Changeset in webkit [215074] by dino@apple.com
  • 2 edits in trunk/Websites/webkit.org

Fix broken link.

  • demos/webgpu/index.html:
5:26 PM Changeset in webkit [215073] by fpizlo@apple.com
  • 4 edits
    2 moves in trunk/Source/JavaScriptCore

Rename allocateStack to allocateStackByGraphColoring.

Rubber stamped by Saam Barati.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/air/AirAllocateStack.cpp: Removed.
  • b3/air/AirAllocateStack.h: Removed.
  • b3/air/AirAllocateStackByGraphColoring.cpp: Copied from Source/JavaScriptCore/b3/air/AirAllocateStack.cpp.

(JSC::B3::Air::allocateStackByGraphColoring):
(JSC::B3::Air::allocateStack): Deleted.

  • b3/air/AirAllocateStackByGraphColoring.h: Copied from Source/JavaScriptCore/b3/air/AirAllocateStack.h.
  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

5:16 PM Changeset in webkit [215072] by msaboff@apple.com
  • 6 edits
    2 adds in trunk

Cannot Object.seal() or Object.freeze() global "this"
https://bugs.webkit.org/show_bug.cgi?id=170549

Reviewed by Mark Lam.

JSTests:

Enabled failing tests fixed by the corresponding code change:

ChakraCore/test/LetConst/delete.js
ChakraCore/test/LetConst/dop.js
ChakraCore/test/LetConst/dop1.js

  • ChakraCore.yaml:
  • ChakraCore/test/LetConst/dop.baseline-jsc: Added JSC specific expected output.
  • ChakraCore/test/LetConst/dop1.baseline-jsc: Added JSC specific expected output.

Source/JavaScriptCore:

Needed to implement JSProxy::isExtensible() which returns the results of calling
the same on wrapped object.

Implemented step 11 of Runtime Semantics: EvalDeclarationInstantiation from the ECMAScript
spec to properly return a TypeError object when attempting to add properties to a
non-extensible global object.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::isExtensible):

  • runtime/JSProxy.h:
5:11 PM Changeset in webkit [215071] by fpizlo@apple.com
  • 14 edits
    1 add
    1 delete in trunk/Source

Linear scan should run liveness only once
https://bugs.webkit.org/show_bug.cgi?id=170569

Reviewed by Keith Miller.

Source/JavaScriptCore:

Air has a longstanding design bug that Tmps from different banks are indexed independently. This
means that all of our analyses over Tmps do separate GP and FP passes. This does have some
marginal benefits (the rest of the algorithm is specialized for Bank) but it's probably net bad.
However, I don't want to think about solving that general problem.

Instead, this just makes linear scan use a UnifiedTmpLiveness that uses a single "linear"
indexing for GP and FP. This lets me avoid the much larger refactoring (which would involve
substantial changes in graph coloring) while getting the bulk of the benefit (liveness runs once,
instead of twice, for linear scan).

This patch implements a lot of plumbing to make it possible for Liveness<> to view Tmps as having
a unified indexing scheme. Tmp calls this LinearlyIndexed (to match the naming convention of
AbsolutelyIndexed and Indexed), while AirLiveness calls this UnifiedTmpLiveness. With this
change, -O1 never does any liveness analysis that uses separate GP and FP passes. I think this
eliminates any urgency from the larger Tmp indexing bug. We can probably live with graph coloring
doing separate passes.

This is a ~6% speed-up for wasm -O1 compile times. I think this means that linear scan is no
longer the longest pole in the tent.

(JSC::B3::VariableLivenessAdapter::prepareToCompute):

  • b3/air/AirAllocateRegistersByLinearScan.cpp:

(JSC::B3::Air::allocateRegistersByLinearScan):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::forEachTmp):

  • b3/air/AirLiveness.h:
  • b3/air/AirLivenessAdapter.h:

(JSC::B3::Air::LivenessAdapter::Actions::Actions):
(JSC::B3::Air::LivenessAdapter::LivenessAdapter):
(JSC::B3::Air::LivenessAdapter::adapter):
(JSC::B3::Air::LivenessAdapter::prepareToCompute):
(JSC::B3::Air::LivenessAdapter::actionsAt):
(JSC::B3::Air::LivenessAdapter::forEachUse):
(JSC::B3::Air::LivenessAdapter::forEachDef):
(JSC::B3::Air::TmpLivenessAdapter::numIndices):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::UnifiedTmpLivenessAdapter):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::numIndices):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsBank):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsRole):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::valueToIndex):
(JSC::B3::Air::UnifiedTmpLivenessAdapter::indexToValue):

  • b3/air/AirLivenessConstraints.h: Removed.
  • b3/air/AirRegLiveness.h:

(JSC::B3::Air::RegLiveness::LocalCalc::LocalCalc):

  • b3/air/AirTmp.cpp:
  • b3/air/AirTmp.h:
  • b3/air/AirTmpInlines.h:

(JSC::B3::Air::Tmp::LinearlyIndexed::LinearlyIndexed):
(JSC::B3::Air::Tmp::LinearlyIndexed::index):
(JSC::B3::Air::Tmp::linearlyIndexed):
(JSC::B3::Air::Tmp::indexEnd):
(JSC::B3::Air::Tmp::absoluteIndexEnd):
(JSC::B3::Air::Tmp::linearIndexEnd):
(JSC::B3::Air::Tmp::tmpForAbsoluteIndex):
(JSC::B3::Air::Tmp::tmpForLinearIndex):

  • b3/air/AirTmpMap.h: Added.

(JSC::B3::Air::TmpMap::TmpMap):
(JSC::B3::Air::TmpMap::resize):
(JSC::B3::Air::TmpMap::clear):
(JSC::B3::Air::TmpMap::operator[]):
(JSC::B3::Air::TmpMap::append):

Source/WTF:

Have Liveness<> call Adapter::prepareToCompute(), since this makes it a lot easier to implement
constraint generation, since the constraint generator now gets to run after the Adapter is fully
constructed.

  • wtf/IndexMap.h:

(WTF::IndexMap::append): Also make this a bit more versatile.

  • wtf/Liveness.h:

(WTF::Liveness::LocalCalc::Iterable::contains):
(WTF::Liveness::Iterable::contains):
(WTF::Liveness::compute):

5:04 PM Changeset in webkit [215070] by Simon Fraser
  • 7 edits
    5 adds in trunk

Throttle requestAnimationFrame in cross-origin iframes to 30fps
https://bugs.webkit.org/show_bug.cgi?id=170534

Reviewed by Dan Bates.

Source/WebCore:

Add a throttling reason to ScriptedAnimationController which is NonInteractedCrossOriginFrame,
set on cross-origin iframes whose documents have never seen a user interaction. It's cleared
as soon as an interaction on this frame or a child frame is detected.

Move the initialization of the LowPowerMode throttling reason to Document::requestAnimationFrame(),
since it's more appropriate to compute NonInteractedCrossOriginFrame here than down in ScriptedAnimationController,
and best to do both in the same place.

Tests: http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html

  • dom/Document.cpp:

(WebCore::Document::requestAnimationFrame):
(WebCore::Document::updateLastHandledUserGestureTimestamp):

  • dom/Document.h:

(WebCore::Document::hasHadUserInteraction):

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::throttlingReasonToString):
(WebCore::ScriptedAnimationController::interval):

  • dom/ScriptedAnimationController.h:
  • loader/FrameLoader.cpp:

(WebCore::shouldAskForNavigationConfirmation):

LayoutTests:

  • http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt: Added.
  • http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html: Added.
  • http/tests/frame-throttling/resources/requestAnimationFrame-frame.html: Added.
5:01 PM Changeset in webkit [215069] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Use the Accelerate framework to optimize FEColorMatrix operations
https://bugs.webkit.org/show_bug.cgi?id=170518

Reviewed by Tim Horton.

On macOS and iOS, we can use the Accelerate framework (vImage) to do color matrix
math to optimize color matrix, hue rotate, saturation and luminosity to alpha filters.

Change ImageBuffer::getUnmultipliedImageData() and getPremultipliedImageData() to
return the size of the returned Uint8ClampedArray in physical pixels, because we
need to pass that to vImage.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::getImageData):

  • platform/graphics/ImageBuffer.h:
  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):

  • platform/graphics/cg/ImageBufferCG.cpp:

(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):

  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::effectApplyAccelerated):
(WebCore::effectType):
(WebCore::FEColorMatrix::platformApplySoftware):

  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::platformApplySoftware):

  • platform/graphics/win/ImageBufferDirect2D.cpp:

(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):

5:01 PM Changeset in webkit [215068] by Simon Fraser
  • 1 edit in trunk/Source/WebCore/ChangeLog

Do some minor FEColorMatrix code cleanup and optimization
https://bugs.webkit.org/show_bug.cgi?id=170474

Reviewed by Dean Jackson.

Don't switch inside of a pixel processing loop; repeat the loop inside switch (filterType).

Change matrix() and saturateAndHueRotate() to dereference the source pixels once, instead
of multiple times, which is faster.

This kind of code benefits from aligning things with spaces for readability, so do so,
violating webkit style.

Add some off-by-default performance logging code.

Increases pixel processing performance from about 86ms per megapixel to 65ms per megapixel.

  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::matrix):
(WebCore::saturateAndHueRotate):
(WebCore::effectType):
(WebCore::FEColorMatrix::platformApplySoftware):

4:24 PM Changeset in webkit [215067] by Ryan Haddad
  • 3 edits
    2 deletes in trunk

Unreviewed, rolling out r215041.

The LayoutTest for this change is failing on ios-simulator.

Reverted changeset:

"Rendering flexbox children across columns"
https://bugs.webkit.org/show_bug.cgi?id=164166
http://trac.webkit.org/changeset/215041

4:11 PM Changeset in webkit [215066] by Ryan Haddad
  • 16 edits in trunk

Unreviewed, rolling out r215046.

This change broke internal builds.

Reverted changeset:

"WebRTC tests gardening"
https://bugs.webkit.org/show_bug.cgi?id=170508
http://trac.webkit.org/changeset/215046

3:58 PM Changeset in webkit [215065] by commit-queue@webkit.org
  • 23 edits in trunk/Source

Web Inspector: Only Capture Extra Network Load Metrics when there is a Web Inspector Frontend
https://bugs.webkit.org/show_bug.cgi?id=170525

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-06
Reviewed by Youenn Fablet.

Source/WebCore:

Covered by existing tests that when Web Inspector is open we enable collecting the extra data.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::firstFrontendCreated):
(WebCore::InspectorInstrumentation::lastFrontendDeleted):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::frontendCreated):
(WebCore::InspectorInstrumentation::frontendDeleted):
When the first frontend is created enable a new loader strategy to
collect extra network load metrics. When the last frontend is closed
disable the extra metrics.

  • loader/LoaderStrategy.h:
  • platform/PlatformStrategies.h:

New load strategy to enable/disable new metrics.

Source/WebKit:

  • WebCoreSupport/WebResourceLoadScheduler.h:

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Only collect extra metrics if the WebProcess this load is for has enabled
collecting extra metrics.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::setCaptureExtraNetworkLoadMetricsEnabled):

  • WebProcess/Network/WebLoaderStrategy.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled):

  • NetworkProcess/NetworkConnectionToWebProcess.h:

(WebKit::NetworkConnectionToWebProcess::captureExtraNetworkLoadMetricsEnabled):

  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:

New bool state toggled through the loader policy.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::shouldCaptureExtraNetworkLoadMetrics):

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTaskClient::shouldCaptureExtraNetworkLoadMetrics):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::shouldCaptureExtraNetworkLoadMetrics):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadClient.h:

(WebKit::NetworkLoadClient::shouldCaptureExtraNetworkLoadMetrics):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::shouldCaptureExtraNetworkLoadMetrics):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::shouldCaptureExtraNetworkLoadMetrics):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:

Default handling for network loads is to not include extra data. Thread
client messages back from the NetworkLoads / SpeculativeLoads to check
the NetworkConnectionToWebProcess state on whether or not we should collect
extra metrics.

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

Skip a test that was accidentally enabled with r214982.

Unreviewed test gardening.

  • platform/ios/TestExpectations:
3:38 PM Changeset in webkit [215063] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Obj-C bindings build fails with CSS_DEVICE_ADAPTATION turned on
https://bugs.webkit.org/show_bug.cgi?id=170566

Reviewed by Simon Fraser.

  • DOM/DOMCSS.mm:

(kitClass):
Use the WebCore-side enum for this, since that's actually what we're switching over.
This allows us to handle values here without adding them to the API header.
All of the other kitClass() functions work the same way.
Also, unindent for style purposes.

3:02 PM Changeset in webkit [215062] by Joseph Pecoraro
  • 14 edits
    3 adds in trunk

Web Inspector: Show all headers in the Request Headers section of the Resource details sidebar
https://bugs.webkit.org/show_bug.cgi?id=16531
<rdar://problem/5712895>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

Optional refined list of request headers in Metrics.

Source/WebCore:

Test: http/tests/inspector/network/resource-request-headers.html

  • loader/ResourceTiming.cpp:

(WebCore::ResourceTiming::ResourceTiming):
Eliminate unnecessary data from the NetworkLoadTiming object
when it is used for ResourceTiming. This clears up some memory
that will otherwise never be used.

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::clearNonTimingData):
(WebCore::NetworkLoadMetrics::operator==):
(WebCore::NetworkLoadMetrics::encode):
(WebCore::NetworkLoadMetrics::decode):
Include an optional HTTPHeaderMap for a refined list of
request headers for this network load.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForMetrics):
Include request headers with other optional metrics data
when the load is completed.

Source/WebInspectorUI:

  • UserInterface/Models/Resource.js:

(WebInspector.Resource.prototype.updateWithMetrics):
Update request headers if provided in metrics.

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
Include a complete list of the request headers sent for this load.
There may be headers that WebCore did not know about and developer
tools should be informed of.

LayoutTests:

  • http/tests/inspector/network/resource-request-headers-expected.txt: Added.
  • http/tests/inspector/network/resource-request-headers.html: Added.
  • http/tests/inspector/network/resources/basic-auth.php: Added.

Test coverage for Cookie and Basic Authentication headers.

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

Mark the test as expected to fail on WebKit1 CFNetwork based platforms,
and ElCapitan which uses the legacy non-NSURLSession loading path.

2:56 PM Changeset in webkit [215061] by rniwa@webkit.org
  • 21 edits
    1 add in trunk/Websites/perf.webkit.org

Each build request should be associated with a repository group
https://bugs.webkit.org/show_bug.cgi?id=170528

Rubber-stamped by Chris Dumez.

Make the buildbot syncing script use the concept of repository groups so that each repository group can post
a different set of properties to buildbot. In order to do this, we associate each build request with
a repository group to use. Each triggerable's repository groups is now updated by the syncing scripts via
/api/update-triggerable just the same way the set of the supported platform, test pairs are updated.

Each repository group specifies the list of repositories, a dictionary that maps the buildbot property name
to either a string value or a repository name enclosed in < and >:

`js
"repositoryGroups": {

"webkit-svn": {

"repositories": ["WebKit", "macOS"],
"properties": {"os": "<macOS>", "wk": "<WebKit>"}

}

}
`

With this, removed the support for specifying a repository to use in generic dictionary of properties via
a dictionary with a single key of "root", "rootOptions", and "rootsExcluding". We now validate that the list of
repositories in each repository group matches exactly the ones used in buildbot properties as well as ones in
build requests.

After this patch, sync-with-buildbot.js will no longer schedule a build request without a repository group.
Run the appropriate database queries to set the repository group on each build request. Because of this change,
this patch also makes BuildbotTriggerable.prototype.syncOnce more robust against invalid build requests.
Instead of throwing an exception and exiting early, it simply skips all build requests that belong to the same
test group if the next build request to be scheduled does not specify a repository group.

  • init-database.sql: Add request_repository_group column to build_requests table, and a unique constraint for

repository and group pair in triggerable_repositories table.

  • public/api/update-triggerable.php:

(main): Validate and insert repository groups.
(validate_configurations): Extracted from main.
(validate_repository_groups): Added.

  • public/v3/models/repository.js:

(Repository.findTopLevelByName): Added.

  • public/include/build-requests-fetcher.php:

(BuildRequestsFetcher::results_internal): Include the repository group of each request in the JSON response.

  • public/include/repository-group-finder.php: Added. A helper class to find the repository group for a given

triggerable for a list of repositories.
(RepositoryGroupFinder): Added.
(RepositoryGroupFinder::construct): Added.
(RepositoryGroupFinder::find_by_repositories): Added.
(RepositoryGroupFinder::populate_map): Added.

  • public/privileged-api/create-test-group.php:

(main): Each element in an array returned by ensure_commit_sets and commit_sets_from_revision_sets now contains
"set", the list of commit IDs, and "repository_group", the repository group identified for each commit set.
Use that to set the repository group in each new build request.
(commit_sets_from_revision_sets): Use RepositoryGroupFinder to find the right repository group.
(ensure_commit_sets): Ditto. There is no need to find a repository group for each commit set here since its
argument is keyed by the repository name. e.g. {"WebKit": [123, 456], "macOS": ["16A323", "16A323"]}

  • public/v3/models/build-request.js:

(BuildRequest):
(BuildRequest.prototype.triggerable): Added.
(BuildRequest.prototype.repositoryGroup): Added.
(BuildRequest.constructBuildRequestsFromData): Resolve the triggerable and the repository group.

  • public/v3/models/triggerable.js:

(Triggerable.prototype.name): Added.
(Triggerable.prototype.acceptedRepositories): Deleted.
(TriggerableRepositoryGroup):
(TriggerableRepositoryGroup.prototype.accepts): Added. Retruns true if the repository group

  • server-tests/api-build-requests-tests.js: Added a test for getting the repository group of a build request.
  • server-tests/api-manifest-tests.js: Added assertions for the repository groups.
  • server-tests/api-report-tests.js:

(.emptyReport):
(.reportWithTwoLevelsOfAggregations):

  • server-tests/api-update-triggerable.js: Added test cases for updating the repository groups associated with

a triggerable.
(.updateWithOSXRepositoryGroup):
(.mapRepositoriesByGroup):

  • server-tests/privileged-api-create-test-group-tests.js:

(addTriggerableAndCreateTask): Add two repository groups for testing. Added assertions for repository groups
in existing test cases, and added a test case for creating a test group with two different repository groups.

  • server-tests/resources/mock-data.js:

(MockData.resetV3Models): Reset TriggerableRepositoryGroup's static maps.
(MockData.emptyTriggeragbleId): Added.
(MockData.macosRepositoryId): Added.
(MockData.webkitRepositoryId): Added.
(MockData.gitWebkitRepositoryId): Added.
(MockData.addMockData): Create repository groups as needed. Renamed the "OS X" repository to "macOS" since some
tests were using the latter, and now we need mock data to be consistent across tests due to stricter checks.
(MockData.addEmptyTriggerable): Added. Used in api-update-triggerable.js.
(MockData.addMockTestGroupWithGitWebKit): Added. Used in api-build-requests-tests.js.
(MockData.addAnotherMockTestGroup): Cleanup.
(MockData.mockTestSyncConfigWithSingleBuilder): Updated the mock configuration per code changes.
(MockData.mockTestSyncConfigWithTwoBuilders): Ditto.

  • server-tests/tools-buildbot-triggerable-tests.js: Updated a test case testing /api/update-triggerable to test

updating the set of repository groups in addition to the set of test, platform pairs.
(.refetchManifest): Added.

  • tools/js/buildbot-syncer.js:

(BuildbotSyncer): Now takes a set of configurations shared across syncers: repositoryGroups, slaveArgument,
and buildRequestArgument as the third argument.
(BuildbotSyncer.prototype.repositoryGroups): Added.
(BuildbotSyncer.prototype._testGroupMapForBuildRequests): Cleaned up the code to use Array.prototype.find.
Also added an assertion that the build request is associated with a repository group.
(BuildbotSyncer.prototype._propertiesForBuildRequest): Removed the support for using an arbitary property to
specify a revision in favor of explicity listing each property and repository name in a repository group.
(BuildbotSyncer._loadConfig): Removed the support for "shared", which specified the set of buildbot properties
shared across syncers, the name of properties which specifies the build slave name and build request ID. These
values are not stored as top-level properties and superseded by the concept of repository groups.
(BuildbotSyncer._parseRepositoryGroup): Parses and validates repository groups.
(BuildbotSyncer._createTestConfiguration): We no longer expect each configuration to specify a dictionary of
properties or buildRequestArgument (often inherited from shared).
(BuildbotSyncer._validateAndMergeConfig): Removed "slaveArgument" and "buildRequestArgument" from the list of
allowed proeprties in each configuration now that they're specified as top-level properties.

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.updateTriggerable): Update the associated repository groups.
(BuildbotTriggerable.prototype.syncOnce): Skip test groups for which the next build request to be scheduled is
not included in the list of valid build requests.
(BuildbotTriggerable.prototype._validateRequests): Now returns the list of valid build requests, which excludes
those that lack a repository group set.
(BuildbotTriggerable.prototype._nextRequestInGroup): Extracted from _scheduleRequestIfSlaveIsAvailable. Finds
the next build request to be scheduled for the test group.
(BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Renamed from
_scheduleNextRequestInGroupIfSlaveIsAvailable. Now takes the syncer and the slave name as arguments instead of
a test group information since syncOnce now calls _nextRequestInGroup to find the next build request.

  • tools/js/v3-models.js:
  • unit-tests/build-request-tests.js: Fixed the test name.
  • unit-tests/buildbot-syncer-tests.js: Removed tests for "rootOptions" and "rootsExcluding", and added tests

for parsing repository groups.
(sampleiOSConfig): Updated the mock configuration per code changes.
(sampleiOSConfigWithExpansions): Ditto.
(smallConfiguration): Ditto. Now returns the entire configuration instead of a single builder configuration.
Various test cases have been updated to reflect this.
(createSampleBuildRequest): Removed the git hash of WebKit to match the repository groups listed in the mock
configurations. The git hash was there to test "rootOptions", which this patch removed.
(samplePendingBuild): Removed "root_dict" from the list of properties. This was used to test "rootsExcluding"
which, again, this patch removed.
(sampleInProgressBuild): Ditto.
(sampleFinishedBuild): Ditto.

  • unit-tests/resources/mock-v3-models.js:

(MockModels.inject): Added ock repository groups so that existing tests will continue to function.

2:35 PM Changeset in webkit [215060] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

OptionSet options need to be powers of two
https://bugs.webkit.org/show_bug.cgi?id=170565

Reviewed by Chris Dumez.

Change Cache::Option to be powers of two.

  • NetworkProcess/cache/NetworkCache.h:
2:12 PM Changeset in webkit [215059] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Follow up to r209304, remove line numbers from one more StyleRule construction
https://bugs.webkit.org/show_bug.cgi?id=170564

Reviewed by Simon Fraser.

  • css/StyleRule.cpp:

(WebCore::StyleRuleViewport::StyleRuleViewport):
This one was missed in r209304.

2:11 PM Changeset in webkit [215058] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebCore

Remove an unused member and constructor parameter from CSSPropertyParser
https://bugs.webkit.org/show_bug.cgi?id=170562

Reviewed by Simon Fraser.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSingleValue):
(WebCore::CSSParser::parseValueWithVariableReferences):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeDeclarationValue):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::CSSPropertyParser):
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseSingleValue):

  • css/parser/CSSPropertyParser.h:

It is possible to get Clang to complain about the unused member, though
I'm not sure why it doesn't in the build today.

1:58 PM Changeset in webkit [215057] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

B3 -O1 should generate better code than -O0
https://bugs.webkit.org/show_bug.cgi?id=170563

Reviewed by Michael Saboff.

Prior to this change, code generated by -O1 ran slower than code generated by -O0. This turned
out to be because of reduceStrength optimizations that increase live ranges and create register
pressure, which then creates problems for linear scan.

It seemed obvious that canonicalizations that help isel, constant folding, and one-for-one
strength reductions should stay. It also seemed obvious that SSA and CFG simplification are fast
and harmless. So, I focused on removing:

  • CSE, which increases live ranges. This is a risky optimization when we know that we've chosen to use a bad register allocator.


  • Sophisticated strength reductions that create more code, like the insane division optimization.


  • Anything that inserts basic blocks.


CSE appeared to be the cause of half of the throughput regression of -O1 but none of the compile
time. This change also reduces the running time of reduceStrength by making it not a fixpoint at
optLevel<2.

This makes wasm -O1 compile 17% faster. This makes wasm -O1 run 19% faster. This makes -O1 code
run 3% faster than -O0, and compile about 4% slower than -O0. We may yet end up choosing to use
-O0, but at least now -O1 isn't totally useless.

  • b3/B3ReduceStrength.cpp:
1:38 PM Changeset in webkit [215056] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest fast/mediastream/getUserMedia-webaudio.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=167513

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

  • fast/mediastream/getUserMedia-webaudio.html: Removing unecessary flaky check.
1:18 PM Changeset in webkit [215055] by akling@apple.com
  • 3 edits in trunk/Source/WTF

Kill any WebContent process using over 16 GB of memory.
https://bugs.webkit.org/show_bug.cgi?id=170515
<rdar://problem/29930931>

Reviewed by Antti Koivisto.

Restructure the code since it was getting out of sync with the intended behavior.
Now there's a thresholdForMemoryKill() which returns the current memory limit based
on the process status.

The memory usage policy is separated from the killing, and now only drives the
asynchronous invocations of pressure relief that occur when we pass over one of
the policy edges (now 1GB for Conservative, 2GB for Strict.)

Removed the "Panic" policy and moved the memory kill logic to shrinkOrDie().

Behavior as of this patch:

  • Everyone gets killed over 16 GB.
  • Inactive processes get killed over 4 GB.
  • Strict memory usage policy kicks in at 2 GB.
  • Conservative memory usage policy at 1 GB.

Like before, we make a best-effort attempt to free up memory before killing the process.

  • wtf/MemoryPressureHandler.cpp:

(WTF::toString):
(WTF::MemoryPressureHandler::thresholdForMemoryKill):
(WTF::thresholdForPolicy):
(WTF::policyForFootprint):
(WTF::MemoryPressureHandler::shrinkOrDie):
(WTF::MemoryPressureHandler::setMemoryUsagePolicyBasedOnFootprint):
(WTF::MemoryPressureHandler::measurementTimerFired):

  • wtf/MemoryPressureHandler.h:
1:03 PM Changeset in webkit [215054] by Alan Bujtas
  • 7 edits
    2 adds in trunk

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.
12:51 PM Changeset in webkit [215053] by Jon Davis
  • 6 edits in trunk

Updates feature status for recently shipped features
https://bugs.webkit.org/show_bug.cgi?id=170359

Reviewed by Brian Burg.
Source/JavaScriptCore:

Changed "Done" status to "Supported".

  • features.json:

Source/WebCore:

Added missing Gamepad entry.
Changed "Done" status to "Supported".
Also changed status from "In Development" to "Supported" for:

  • CSS Grid Layout Level 1
  • CSS Inline Layout Module Level 3
  • CSS Scroll Snap Points Module Level 1
  • CSS Color Level 4
  • Fetch API
  • Indexed Database 2.0
  • Media Capture and Streams
  • Pointer Lock
  • Preload
  • Input Events
  • features.json:

Websites/webkit.org:

Added styles for "Supported" status.

  • wp-content/themes/webkit/status.php:
11:58 AM Changeset in webkit [215052] by bshafiei@apple.com
  • 4 edits in branches/safari-604.1.14-branch/Source/WebCore

Merged r214930. rdar://problem/31445339

11:56 AM Changeset in webkit [215051] by jiewen_tan@apple.com
  • 28 edits
    2 copies
    50 adds in trunk

[WebCrypto] Add support for AES-CTR
https://bugs.webkit.org/show_bug.cgi?id=169761
<rdar://problem/31331321>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2-expected.txt:
  • web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
  • web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_aes-ctr-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CTR-expected.txt:
  • web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CTR-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt:

Source/WebCore:

This patch adds support for AES-CTR. Operations of AES-CTR include: encrypt, decrypt, generateKey,
importKey, exportKey, wrapKey, and unwrapKey. This implementation follows the latest WebCryptoAPI
spec: https://www.w3.org/TR/WebCryptoAPI/#aes-ctr.

Tests: crypto/subtle/aes-ctr-encrypt-malformed-parameters.html

crypto/subtle/aes-ctr-encrypt-overflow.html
crypto/subtle/aes-ctr-generate-export-key-jwk-length-128.html
crypto/subtle/aes-ctr-generate-export-key-jwk-length-192.html
crypto/subtle/aes-ctr-generate-export-key-jwk-length-256.html
crypto/subtle/aes-ctr-generate-export-raw-key.html
crypto/subtle/aes-ctr-generate-key-encrypt-decrypt.html
crypto/subtle/aes-ctr-generate-key.html
crypto/subtle/aes-ctr-import-jwk-key-length-128.html
crypto/subtle/aes-ctr-import-jwk-key-length-192.html
crypto/subtle/aes-ctr-import-jwk-key-length-256.html
crypto/subtle/aes-ctr-import-key-decrypt.html
crypto/subtle/aes-ctr-import-key-encrypt.html
crypto/subtle/aes-ctr-import-key-unwrap-jwk-key.html
crypto/subtle/aes-ctr-import-key-unwrap-raw-key.html
crypto/subtle/aes-ctr-import-key-wrap-jwk-key.html
crypto/subtle/aes-ctr-import-key-wrap-raw-key.html
crypto/subtle/aes-ctr-import-raw-key.html
crypto/workers/subtle/aes-ctr-import-key-decrypt.html
crypto/workers/subtle/aes-ctr-import-key-encrypt.html
crypto/workers/subtle/aes-ctr-import-key-unwrap-key.html
crypto/workers/subtle/aes-ctr-import-key-wrap-key.html

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

(WebCore::normalizeCryptoAlgorithmParameters):

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

(WebCore::usagesAreInvalidForCryptoAlgorithmAES_CTR):
(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::create):
(WebCore::CryptoAlgorithmAES_CTR::identifier):
(WebCore::CryptoAlgorithmAES_CTR::encrypt):
(WebCore::CryptoAlgorithmAES_CTR::decrypt):
(WebCore::CryptoAlgorithmAES_CTR::generateKey):
(WebCore::CryptoAlgorithmAES_CTR::importKey):
(WebCore::CryptoAlgorithmAES_CTR::exportKey):
(WebCore::CryptoAlgorithmAES_CTR::getKeyLength):

  • crypto/algorithms/CryptoAlgorithmAES_CTR.h: Added.
  • crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp: Added.

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CTRMac.cpp: Added.

(WebCore::bigIntegerToSize):
(WebCore::transformAES_CTR):
(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRegistryMac.cpp:

(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):

  • crypto/parameters/AesCtrParams.idl: Added.
  • crypto/parameters/CryptoAlgorithmAesCtrParams.h: Added.

LayoutTests:

  • crypto/subtle/aes-ctr-encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-ctr-encrypt-malformed-parameters.html: Added.
  • crypto/subtle/aes-ctr-generate-export-key-jwk-length-128-expected.txt: Added.
  • crypto/subtle/aes-ctr-generate-export-key-jwk-length-128.html: Added.
  • crypto/subtle/aes-ctr-generate-export-key-jwk-length-192-expected.txt: Added.
  • crypto/subtle/aes-ctr-generate-export-key-jwk-length-192.html: Added.
  • crypto/subtle/aes-ctr-generate-export-key-jwk-length-256-expected.txt: Added.
  • crypto/subtle/aes-ctr-generate-export-key-jwk-length-256.html: Added.
  • crypto/subtle/aes-ctr-generate-export-raw-key-expected.txt: Added.
  • crypto/subtle/aes-ctr-generate-export-raw-key.html: Added.
  • crypto/subtle/aes-ctr-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/aes-ctr-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/aes-ctr-generate-key-expected.txt: Added.
  • crypto/subtle/aes-ctr-generate-key.html: Added.
  • crypto/subtle/aes-ctr-import-jwk-key-length-128-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-jwk-key-length-128.html: Added.
  • crypto/subtle/aes-ctr-import-jwk-key-length-192-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-jwk-key-length-192.html: Added.
  • crypto/subtle/aes-ctr-import-jwk-key-length-256-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-jwk-key-length-256.html: Added.
  • crypto/subtle/aes-ctr-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-key-decrypt.html: Added.
  • crypto/subtle/aes-ctr-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-key-encrypt.html: Added.
  • crypto/subtle/aes-ctr-import-key-unwrap-jwk-key-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-key-unwrap-jwk-key.html: Added.
  • crypto/subtle/aes-ctr-import-key-unwrap-raw-key-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-key-unwrap-raw-key.html: Added.
  • crypto/subtle/aes-ctr-import-key-wrap-jwk-key-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-key-wrap-jwk-key.html: Added.
  • crypto/subtle/aes-ctr-import-key-wrap-raw-key-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-key-wrap-raw-key.html: Added.
  • crypto/subtle/aes-ctr-import-raw-key-expected.txt: Added.
  • crypto/subtle/aes-ctr-import-raw-key.html: Added.
  • crypto/subtle/aes-generate-key-malformed-parameters-expected.txt:
  • crypto/subtle/aes-generate-key-malformed-parameters.html:
  • crypto/subtle/aes-import-key-malformed-parameters-expected.txt:
  • crypto/subtle/aes-import-key-malformed-parameters.html:
  • crypto/workers/subtle/aes-ctr-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/aes-ctr-import-key-decrypt.html: Added.
  • crypto/workers/subtle/aes-ctr-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/aes-ctr-import-key-encrypt.html: Added.
  • crypto/workers/subtle/aes-ctr-import-key-unwrap-key-expected.txt: Added.
  • crypto/workers/subtle/aes-ctr-import-key-unwrap-key.html: Added.
  • crypto/workers/subtle/aes-ctr-import-key-wrap-key-expected.txt: Added.
  • crypto/workers/subtle/aes-ctr-import-key-wrap-key.html: Added.
  • crypto/workers/subtle/resources/aes-ctr-import-key-decrypt.js: Added.
  • crypto/workers/subtle/resources/aes-ctr-import-key-encrypt.js: Added.
  • crypto/workers/subtle/resources/aes-ctr-import-key-unwrap-key.js: Added.
  • crypto/workers/subtle/resources/aes-ctr-import-key-wrap-key.js: Added.
11:53 AM Changeset in webkit [215050] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/codemirror/prettyprinting-css-rules.html as flaky on release.
https://bugs.webkit.org/show_bug.cgi?id=153460

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:53 AM Changeset in webkit [215049] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

WebRTC aborts when trying to sleep on a wrong thread
https://bugs.webkit.org/show_bug.cgi?id=170492
<rdar://problem/31446377>

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

Libwebrtc network thread is set up so that it does not accept blocking calls to other threads.
as per ChannelManager::Init() in channelmanager.cc.
But rtc::Thread::SleepMs expects to block it.
Marking thread as blockable before calling SleepMs and resetting the value if needed afterwards.

  • Source/webrtc/media/sctp/sctptransport.cc:
11:52 AM Changeset in webkit [215048] by bshafiei@apple.com
  • 7 edits in branches/safari-604.1.14-branch/Source

Versioning.

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

Web Inspector: Reorder Debugger tab sidebar panels: Scope Chain, Resource, Probes
https://bugs.webkit.org/show_bug.cgi?id=170418
<rdar://problem/31410771>

Reviewed by Timothy Hatcher.

Maintain the sidebar panel order defined by TabContentView when adding
and removing panels.

  • UserInterface/Views/ContentBrowserTabContentView.js:

(WebInspector.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
Insert sidebar panel based on the panel order defined by TabContentView.

  • UserInterface/Views/DebuggerTabContentView.js:

(WebInspector.DebuggerTabContentView):

  • UserInterface/Views/Sidebar.js:

(WebInspector.Sidebar.prototype.addSidebarPanel):
Implemented as an insert at the end.
(WebInspector.Sidebar.prototype.insertSidebarPanel):
Allow inserting into the sidebar panel collection.
(WebInspector.Sidebar.prototype.removeSidebarPanel):
Remove unused return value.

11:48 AM Changeset in webkit [215046] by commit-queue@webkit.org
  • 16 edits in trunk

WebRTC tests gardening
https://bugs.webkit.org/show_bug.cgi?id=170508

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

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig: Changing webrtc enabling for ios.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
11:35 AM Changeset in webkit [215045] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Stop forcing CA commit when memory pressure changes.
https://bugs.webkit.org/show_bug.cgi?id=170522
<rdar://problem/31460236>

Reviewed by Antti Koivisto.

Don't force a CA commit when reaching critical memory pressure. We're already doing a ton
of work in response to the pressure, and this was really a hack to try to react quickly on
512 MB devices which we don't support anymore.

  • page/MemoryRelease.cpp:

(WebCore::releaseCriticalMemory):

11:32 AM Changeset in webkit [215044] by Antti Koivisto
  • 9 edits in trunk

Implement testing mode for disk cache
https://bugs.webkit.org/show_bug.cgi?id=170547

Reviewed by Andreas Kling.

Source/WebKit2:

Disable read timeouts and cache shrinking in TestRunner to eliminate potential sources of randomness.

Cache directories are deleted by TestRunner so lack of shrinking does not consume the disk.

This is enabled by the existing WKContextUseTestingNetworkSession SPI.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::initialize):

  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::open):
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::shrinkIfNeeded):

  • NetworkProcess/cache/NetworkCacheStorage.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

LayoutTests:

Enable a few disabled tests to see how it goes.

  • platform/mac-wk2/TestExpectations:
10:25 AM Changeset in webkit [215043] by commit-queue@webkit.org
  • 6 edits in trunk

[Readable Streams API] Implement ReadableStreamBYOBRequest respondWithNewView()
https://bugs.webkit.org/show_bug.cgi?id=170339

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-04-06
Reviewed by Youenn Fablet.

Source/WebCore:

Implemented ReadableStreamBYOBRequest respondWithNewView().

Added new tests to check respondWithNewView() behaviour.

  • Modules/streams/ReadableByteStreamInternals.js:

(readableByteStreamControllerRespondWithNewView): Added.

  • Modules/streams/ReadableStreamBYOBRequest.js:

(respondWithNewView): Updated.

LayoutTests:

Added new tests addressing respondWithNewView() behaviour.

  • streams/readable-stream-byob-request-expected.txt: Updated.
  • streams/readable-stream-byob-request.js: Added new tests.
10:20 AM Changeset in webkit [215042] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream] Host application should be able to mute and unmute media streams
https://bugs.webkit.org/show_bug.cgi?id=170519
<rdar://problem/31174326>

Unreviewed, fix crash introduced in r214980.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::MediaStream): NULL-check page.

9:44 AM Changeset in webkit [215041] by hyatt@apple.com
  • 3 edits
    2 adds in trunk

Rendering flexbox children across columns
https://bugs.webkit.org/show_bug.cgi?id=164166
<rdar://problem/29055587>

Reviewed by Zalan Bujtas.

Source/WebCore:

Added fast/multicol/flexbox-rows.html.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustForUnsplittableChild):
Treat block-level flexboxes that occur inside block flows the same as replaced
and unsplittable elements and push them to the next page if they don't fit. We don't
update the minimum page height though, since the flexbox is not really unsplittable.

LayoutTests:

  • fast/multicol/flexbox-rows-expected.html: Added.
  • fast/multicol/flexbox-rows.html: Added.
9:39 AM Changeset in webkit [215040] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

[WK2] Add C private API to toggle invisibleAutoplayNotPermitted setting
https://bugs.webkit.org/show_bug.cgi?id=170524
<rdar://problem/31461472>

Reviewed by Eric Carlson.

Add C private API to toggle invisibleAutoplayNotPermitted setting.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetInvisibleMediaAutoplayPermitted):
(WKPreferencesGetInvisibleMediaAutoplayPermitted):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
8:58 AM Changeset in webkit [215039] by Jonathan Bedard
  • 2 edits in trunk/Tools

REGRESSION: Simulators failing to install after launch_app times out
<rdar://problem/31478107>

Unreviewed infrastructure fix.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDevice.launch_app._install_timeout): Raise RuntimeError, not Exception.

8:23 AM Changeset in webkit [215038] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC][MIPS][DFG] Use x86 generic HasOwnProperty
https://bugs.webkit.org/show_bug.cgi?id=170222

Patch by Guillaume Emont <guijemont@igalia.com> on 2017-04-06
Reviewed by Yusuke Suzuki.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
use the X86 special version for HasOwnProperty on MIPS too.

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):
use the X86 special version for HasOwnProperty on MIPS too.

8:01 AM Changeset in webkit [215037] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.14.6

WebKitGTK+ 2.14.6

8:01 AM Changeset in webkit [215036] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.14

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.14.6 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.14.6.
6:02 AM Changeset in webkit [215035] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r214283 - [GTK] Honor GTK+ font settings
https://bugs.webkit.org/show_bug.cgi?id=82889

Reviewed by Carlos Garcia Campos.

After much discussion with Behdad and Martin (who is still not completely convinced I think
:) I want to merge cairo font options into the Fontconfig pattern used for rendering using
cairo_ft_font_options_substitute(). This is how the API was designed to be used anyway.
Fontconfig will still have final say over whether to actually respect the desktop settings
or not, so it can still choose to ignore the desktop's settings, but I don't think it makes
sense to have desktop-wide font settings and not tell Fontconfig about them, especially when
the whole point of WebKitGTK+ is desktop integration. This should also reduce complaints
that we're not following desktop settings and that we're drawing fonts differently than
Firefox.

  • PlatformGTK.cmake:
  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::getDefaultCairoFontOptions):

  • platform/graphics/cairo/CairoUtilities.h:
  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::createFontConfigPatternForCharacters):
(WebCore::strongAliasesForFamily):
(WebCore::FontCache::createFontPlatformData):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::getDefaultFontconfigOptions):
(WebCore::getDefaultCairoFontOptions): Deleted.

  • platform/graphics/gtk/GdkCairoUtilities.cpp:

(getDefaultCairoFontOptions):

5:56 AM Changeset in webkit [215034] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r214246 - [Soup] "Only from websites I visit" cookie policy is broken
https://bugs.webkit.org/show_bug.cgi?id=168912

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Do not reset the first party for cookies on redirects. That's properly done for the main
resource in DocumentLoader::willSendRequest and, in the case of subresources, is absolutely
wrong (which is what we were doing since r143931).

The most notable effect was that subresources loaded via redirects were effectively
bypassing the "no third party" policy for cookies.

Test: http/tests/security/cookies/third-party-cookie-blocking-redirect.html

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::doRedirect):

Source/WebKit2:

Do not reset the first party for cookies on redirects. That's properly done for the main
resource in DocumentLoader::willSendRequest and, in the case of subresources, is absolutely
wrong (which is what we were doing since r143931).

The most notable effect was that subresources loaded via redirects were effectively
bypassing the "no third party" policy for cookies.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):

LayoutTests:

  • http/tests/security/cookies/third-party-cookie-blocking-redirect-expected.txt: Added.
  • http/tests/security/cookies/third-party-cookie-blocking-redirect.html: Added.
5:53 AM Changeset in webkit [215033] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r214162 - [Cairo] Ensure depth and stencil renderbuffers are created on GLESv2
https://bugs.webkit.org/show_bug.cgi?id=166643

Patch by Emanuele Aina <Emanuele Aina> on 2017-03-20
Reviewed by Darin Adler.

If the gfx device doesn't support GL_OES_packed_depth_stencil, the
separate depth and stencil buffers are not generated.

Copy what GraphicsContext3DEfl used to do and apply it in
GraphicsContext3DCairo.

The Intel gfx driver seem to tolerate unbound renderbuffers, but
enabling debugging in Mesa yields an error:

$ MESA_DEBUG=1 \

MESA_EXTENSION_OVERRIDE=-GL_OES_packed_depth_stencil
./bin/MiniBrowser http://webglsamples.org/aquarium/aquarium.html

Mesa: User error: GL_INVALID_OPERATION in glRenderbufferStorage(no renderbuffer bound)

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):
Ensure separate depth and stencil renderbuffers are created.
(WebCore::GraphicsContext3D::~GraphicsContext3D):
Ensure separate depth and stencil renderbuffers are released.

5:51 AM Changeset in webkit [215032] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r214100 - [Cairo] Handle the blend mode in GraphicsContext::drawPattern
https://bugs.webkit.org/show_bug.cgi?id=169746

Reviewed by Žan Doberšek.

We are not taking into account the blend mode when passing the cairo operator to drawPatternToCairoContext().
This is based on patch by Žan Doberšek, just adding the toCairoOperator changes to make it easier to handle
it. Instead of checking everywhere if blend mode is Normal to decide whether to use toCairoOperator with
CompositeOperator or BlendMode, there's no a single toCairoOperator that receives both parameters, but BlendMode
is optional and defaults to Normal.

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::toCairoCompositeOperator):
(WebCore::toCairoOperator):

  • platform/graphics/cairo/CairoUtilities.h:
  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::setPlatformCompositeOperation):
(WebCore::GraphicsContext::drawPattern):

5:50 AM Changeset in webkit [215031] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r212431 - [GTK] scroll with transparent background not repainted after scrollY >= 32768
https://bugs.webkit.org/show_bug.cgi?id=154283

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Due to a limitation of the pixman backend, which uses 16 bits to hold signed integers, cairo is
not able to draw anything when using transformation matrices with values bigger than 32768. When
drawing patterns into large pages, the matrices values can overflow those 16 bits, so cairo doesn't
draw anything in, which causes the reported transparent backgrounds.

The patch modifies the transformation matrices both from the current context and the pattern we
are painting, to avoid them to hold values that cannot stored in 16 bits.

There's still the possibility that this happens, but it would require using a pattern with a size
bigger than 32768.

Based on a previous patch by Gwang Yoon Hwang <yoon@igalia.com>.

Test: fast/backgrounds/background-repeat-long-scroll.html

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::drawPatternToCairoContext):

LayoutTests:

Test to ensure that the background pattern of an element is properly being drawn when it's in a position
bigger than 32768.

  • fast/backgrounds/background-repeat-long-scroll-expected.html: Added.
  • fast/backgrounds/background-repeat-long-scroll.html: Added.
5:48 AM Changeset in webkit [215030] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r213522 - ShadowBlur::calculateLayerBoundingRect doesn't need to return the enclosingIntRect of layerRect
https://bugs.webkit.org/show_bug.cgi?id=168650

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-07
Reviewed by Simon Fraser.

No new tests, no behavior change.

  • platform/graphics/ShadowBlur.h: Change the type of return value

from IntRect to IntSize.

  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::calculateLayerBoundingRect): Ditto.
(WebCore::ShadowBlur::drawRectShadow): Rename a variable layerRect layerSize.
(WebCore::ShadowBlur::drawInsetShadow): Ditto.
(WebCore::ShadowBlur::drawRectShadowWithoutTiling): Ditto.
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling): Ditto.
(WebCore::ShadowBlur::beginShadowLayer): Ditto.

5:45 AM Changeset in webkit [215029] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r213276 - [GTK] Crash in WebCore::CoordinatedGraphicsLayer::notifyFlushRequired
https://bugs.webkit.org/show_bug.cgi?id=166420

Reviewed by Žan Doberšek.

This is happening when closing a page that is being inspected. When CoordinatedGraphicsLayer::removeFromParent()
is called, the coordinator has already been invalidated, so all its layers were set a nullptr coordinator. I
think it's safe to simply handle m_coordinator being nullptr in notifyFlushRequired().

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): Return early if the coordinator is nullptr.

5:44 AM Changeset in webkit [215028] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/JavaScriptCore

Merge r213275 - Incorrect RELEASE_ASSERT in JSGlobalObject::addStaticGlobals()
https://bugs.webkit.org/show_bug.cgi?id=169034

Reviewed by Mark Lam.

It should not assign to offset, but compare to offset.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::addStaticGlobals):

5:43 AM Changeset in webkit [215027] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.14

Merge r213224 - [GTK] fast/canvas/canvas-createPattern-video-loading.html makes its subsequent test timeout
https://bugs.webkit.org/show_bug.cgi?id=169019

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The timeout happens normally when the media player is deleted and the pipeline state is set to NULL. The call to
gst_element_set_state() never returns because of different deadlocks with the video sink. Sometimes the deadlock
happens with the sample mutex used by VideoRenderRequestScheduler. VideoRenderRequestScheduler::requestRender()
calls webkitVideoSinkRepaintRequested() with the lock held, that ends up calling
MediaPlayerPrivateGStreamerBase::triggerRepaint(). When rendering can't be accelerated the draw timer is
scheduled and triggerRepaint blocks until the timer is fired. If the media player is destroyed before the timer
is fired, when setting the pipeline state to NULL, other VideoRenderRequestScheduler methods can be called, like
stop() that tries to get the sample mutex that is still held by requestRender(). So, first we need to make
sure that requestRender() releases the lock before calling webkitVideoSinkRepaintRequested(). But that's not
enough, we also need to ensure that the pipeline is set to NULL state after everyting has been properly
stopped. This is currently done in ~MediaPlayerPrivateGStreamer that happens before
~MediaPlayerPrivateGStreamerBase, so gst_element_set_state() is hanging before allowing the
MediaPlayerPrivateGStreamerBase to be cleaned up. We should move the call to the end of
~MediaPlayerPrivateGStreamerBase and ensure the draw timer and mutex are properly cleaned up before.

Fixes: fast/canvas/canvas-createPattern-video-loading.html

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Do not reset pipeline here.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Stop the draw mutex and notify the
lock to ensure we unblock. Do the pipeline reset at the end.

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(VideoRenderRequestScheduler::requestRender): Release the mutex lock before calling webkitVideoSinkRepaintRequested().

LayoutTests:

Unskip tests previously skipped because of this timeout.

  • platform/gtk/TestExpectations:
5:39 AM Changeset in webkit [215026] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r213219 - [Cairo] Incorrectly determining height in GraphicsContext::roundToDevicePixels()
https://bugs.webkit.org/show_bug.cgi?id=169031

Reviewed by Carlos Garcia Campos.

We should compare if height is between -1 and 0 and not mixing height
and width together.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::roundToDevicePixels):

5:38 AM Changeset in webkit [215025] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r212968 - [GTK] WebkitWebProcess crashes on exit on nvidia if threaded compositing is enabled
https://bugs.webkit.org/show_bug.cgi?id=165522

Reviewed by Carlos Garcia Campos.

Before destrying a GLContextGLX we need to set the default framebufer to avoid a bug
in some nvidia drivers. Ensure that we set the context as current before performing
that operation, and set the appropriate current context after doing so.

No new tests.

  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::GLContextGLX::~GLContextGLX):

5:37 AM Changeset in webkit [215024] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r212891 - [GTK] Crash attempting to load Flash plugin in Wayland
https://bugs.webkit.org/show_bug.cgi?id=163159

Reviewed by Michael Catanzaro.

The problem is that we check if the current diplay is X11 or Wayland also in the plugin process, but with GTK2
plugins the display is always X11. We should early reject plugins requiring GTK2 in the UI process when the
current display is Wayland.

  • UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:

(WebKit::PluginInfoStore::getPluginInfo):

  • UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:

(WebKit::PluginProcessProxy::scanPlugin):

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::createPluginContainer): Add an assert to ensure this message is never received on a
non-X11 display.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::createPluginContainer): Never send CreatePluginContainer message to the UI process if the
display is not X11.

5:35 AM Changeset in webkit [215023] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r212889 - [GStreamer] Several layout tests trigger GStreamer-CRITICAL : gst_bin_get_by_name: assertion 'GST_IS_BIN (bin)' failed
https://bugs.webkit.org/show_bug.cgi?id=167016

Reviewed by Xabier Rodriguez-Calvar.

This is because we create AudioSourceProviderGStreamer objects that are never loaded. In the destructor the
AudioSourceProviderGStreamer calls gst_bin_get_by_name() on its m_audioSinkBin that is nullptr. We could simply
check m_audioSinkBin in the destructor, but I think it's better to simply not create
AudioSourceProviderGStreamer for nothing. MediaPlayerPrivateGStreamer should create the AudioSourceProvider on demand.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Do not create the AudioSourceProvider.
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink): Call ensureAudioSourceProvider() before using m_audioSourceProvider.
(WebCore::MediaPlayerPrivateGStreamer::ensureAudioSourceProvider): Create the AudioSourceProvider if needed.
(WebCore::MediaPlayerPrivateGStreamer::audioSourceProvider): Ensure and return the m_audioSourceProvider.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
5:33 AM Changeset in webkit [215022] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r213638 - Correctly process the return value of gdk_drag_context_get_selected_action()

Reviewed by Carlos Garcia Campos.

It returns the action itself and not the bitmask.

  • UIProcess/gtk/DragAndDropHandler.cpp:

(WebKit::DragAndDropHandler::drop):

5:33 AM Changeset in webkit [215021] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r212881 - [GTK] Drag and drop is always moving the content even if copy is requested
https://bugs.webkit.org/show_bug.cgi?id=168424

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Drag and drop is always moving the content around even if the copy is
requested (i.e. by pressing the Control key).

Test: editing/pasteboard/drag-drop-copy-content.html

  • page/gtk/DragControllerGtk.cpp:

(WebCore::DragController::isCopyKeyDown):

Source/WebKit2:

Drag and drop is always moving the content around even if the copy is
requested (i.e. by pressing the Control key).

  • UIProcess/gtk/DragAndDropHandler.cpp:

(WebKit::DragAndDropHandler::drop):

LayoutTests:

Mark the editing/pasteboard/drag-drop-copy-content.html as failing
as WTR doesn't know how to perform drag and drop in WK2. Also the
test does not pass on the mac WK1, created a bug for it.

  • platform/efl/TestExpectations:
  • platform/gtk-wayland/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
5:29 AM Changeset in webkit [215020] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r213060 - [GTK] Flickering when leaving accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=168911

Reviewed by Žan Doberšek.

It doesn't always happen, and it's too fast, more noticeable in websites with a dark background, because we are
drawing a single white frame. This happens when we leave AC mode during the layer flush that schedules an update
on the compositor, which at that point only clears the area and renders nothing. However,
CoordinatedGraphicsScene::paintToCurrentGLContext() always renders a white background when no web view color has
been set. And that's the white frame we get. We could prevent that last update from happening by checking if we
still have a graphics root layer after syncDisplayState() in the layer flush, the same way we check the layer
tree host is still valid.

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):

5:28 AM Changeset in webkit [215019] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r213061 - [GTK] Rendering artifacts when resizing the window in X11 with AC mode enabled
https://bugs.webkit.org/show_bug.cgi?id=168728

Reviewed by Žan Doberšek.

This happens because the pixmap we create from the redirected window is uninitialized until the threaded
compositor renders into it. We should always initialize the pixmap right after it's created.

  • WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:

(WebKit::defaultVisual): Helper static method to get the default GdkVisual.
(WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): Use createPixmap().
(WebKit::AcceleratedSurfaceX11::createPixmap): Create and initialize the pixmap.
(WebKit::AcceleratedSurfaceX11::resize): Use createPixmap().

  • WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
5:24 AM Changeset in webkit [215018] by Carlos Garcia Campos
  • 7 edits
    1 add in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r213030 - [GTK] Hangs when showing Google search results
https://bugs.webkit.org/show_bug.cgi?id=168699

Reviewed by Žan Doberšek.

Connection::sendOutgoingMessage() can poll forever if sendmsg fails with EAGAIN or EWOULDBLOCK. For example if
socket read buffers are full, poll will be blocked until we read the pending data, but we can't read because
the thread is blocked in the poll. In case of EAGAIN/EWOULDBLOCK we should poll using the run loop, to allow
reads to happen in thread while we wait for the socket to be writable again. In the GTK+ port we use
GSocketMonitor to poll socket file descriptor without blocking, using the run loop. This patch renames the
socket monitor as readSocketMonitor and adds another one for polling output. When sendmsg fails with
EAGAIN/EWOULDBLOCK, the pending message is saved and the write monitor starts polling. Once the socket is
writable again we send the pending message. Helper class MessageInfo and a new one UnixMessage have been moved
to its own header file to be able to use std::unique_ptr member to save the pending message.

  • Platform/IPC/Connection.cpp: Include UnixMessage.h as required by std::unique_ptr.
  • Platform/IPC/Connection.h: Add write socket monitor and also keep the GSocket as a member to reuse it.
  • Platform/IPC/glib/GSocketMonitor.cpp: Use Function instead of std::function.

(IPC::GSocketMonitor::start):

  • Platform/IPC/glib/GSocketMonitor.h:
  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::Connection::platformInitialize): Initialize the GSocket here since we rely on it to take the ownership of
the descriptor. We were leaking it if the connection was invalidated without being opened.
(IPC::Connection::platformInvalidate): Destroy the GSocket even when not connected. Also stop the write monitor.
(IPC::Connection::processMessage):
(IPC::Connection::open):
(IPC::Connection::platformCanSendOutgoingMessages): Return false if we have a pending message to ensure
Connection doesn't try to send more messages until the pending message is dispatched. We don't need to check
m_isConnected because the caller already checks that.
(IPC::Connection::sendOutgoingMessage): Split it in two. This creates and prepares a UnixMessage and then calls
sendOutputMessage() to do the rest.
(IPC::Connection::sendOutputMessage): Send the message, or save it if sendmsg fails with EAGAIN or EWOULDBLOCK
to be sent later when the socket is writable.

  • Platform/IPC/unix/UnixMessage.h: Added.

(IPC::MessageInfo::MessageInfo):
(IPC::MessageInfo::setMessageBodyIsOutOfLine):
(IPC::MessageInfo::isMessageBodyIsOutOfLine):
(IPC::MessageInfo::bodySize):
(IPC::MessageInfo::attachmentCount):
(IPC::UnixMessage::UnixMessage):
(IPC::UnixMessage::~UnixMessage):
(IPC::UnixMessage::attachments):
(IPC::UnixMessage::messageInfo):
(IPC::UnixMessage::body):
(IPC::UnixMessage::bodySize):
(IPC::UnixMessage::appendAttachment):

  • PlatformGTK.cmake:
4:23 AM Changeset in webkit [215017] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r212026 - Crash under FormSubmission::create()
https://bugs.webkit.org/show_bug.cgi?id=167200
<rdar://problem/30096323>

Patch by Chris Dumez <Chris Dumez> on 2017-02-09
Reviewed by Darin Adler.

Source/WebCore:

The issue is that FormSubmission::create() was iterating over
form.associatedElements() as was calling Element::appendFormData()
in the loop. HTMLObjectElement::appendFormData() was calling
pluginWidget(PluginLoadingPolicy::Load) which causes a synchronous
layout and can fire events (such as focus event) synchronously.
Firing those events synchronously allows the JS to modify the
form.associatedElements() vector we are currently iterating on.

To avoid this issue, we now call pluginWidget(PluginLoadingPolicy::DoNotLoad)
in HTMLObjectElement::appendFormData() as we are not allowed to fire
synchronous events at this point. I also added a security assertion
in FormSubmission::create() to catch cases where we fire JS events
while iterating over the form associated elements to more easily
notice these things in the future.

Test: fast/forms/formsubmission-appendFormData-crash.html

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::appendFormData):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::create):

LayoutTests:

Add layout test coverage.

  • fast/forms/formsubmission-appendFormData-crash-expected.txt: Added.
  • fast/forms/formsubmission-appendFormData-crash.html: Added.
3:46 AM Changeset in webkit [215016] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.14

Merge r212022 - B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
https://bugs.webkit.org/show_bug.cgi?id=167437
<rdar://problem/30198083>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

  • stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.

Source/JavaScriptCore:

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::deleteOrphans):

3:42 AM Changeset in webkit [215015] by Carlos Garcia Campos
  • 6 edits
    6 adds in releases/WebKitGTK/webkit-2.14

Merge r212621 - REGRESSION(r212218): Assertion failures in and after parserRemoveChild
https://bugs.webkit.org/show_bug.cgi?id=168458

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by parserRemoveChild not preceeding to remove oldChild even when
oldChild had been inserted elsewhere during unload evnets of the disconnected frames.
Fixed the bug by checking this condition and exiting early.

Also fixed various callers of parserRemoveChild to not call parserAppendChild when
the removed node had already been inserted elsewhere by scripts.

Tests: fast/parser/adoption-agency-unload-iframe-3.html

fast/parser/adoption-agency-unload-iframe-4.html
fast/parser/xml-error-unload-iframe.html

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::parserRemoveChild): Exit early when the node had been
inserted elsewhere while firing unload events. Also moved the call to
notifyRemovePendingSheetIfNeeded outside NoEventDispatchAssertion since it can
synchrnously fire a focus event.
(WebCore::ContainerNode::parserAppendChild): Moved adoptNode call to inside
NoEventDispatchAssertion since adoptNode call here should never mutate DOM.

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::executeReparentTask): Added an early exit when the node had already been
inserted elsewhere.
(WebCore::executeInsertAlreadyParsedChildTask): Ditto.

  • xml/XMLErrors.cpp:

(WebCore::XMLErrors::insertErrorMessageBlock): Ditto.

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::end): Fixed a crash unveiled by one of the test cases.
Exit early when insertErrorMessageBlock detached the parser (by author scripts).
(WebCore::XMLDocumentParser::finish): Keep the parser alive until we exit.

LayoutTests:

Add tests to make sure parserAppendChild aren't called when a node removed by parserRemoveChild
had already been been inserted elsewhere by scripts.

  • fast/parser/adoption-agency-unload-iframe-3-expected.txt: Added.
  • fast/parser/adoption-agency-unload-iframe-3.html: Added.
  • fast/parser/adoption-agency-unload-iframe-4-expected.txt: Added.
  • fast/parser/adoption-agency-unload-iframe-4.html: Added.
  • fast/parser/xml-error-unload-iframe-expected.txt: Added.
  • fast/parser/xml-error-unload-iframe.html: Added.
3:42 AM Changeset in webkit [215014] by Carlos Garcia Campos
  • 5 edits
    6 adds in releases/WebKitGTK/webkit-2.14

Merge r212218 - parserRemoveChild should unload subframes
https://bugs.webkit.org/show_bug.cgi?id=168151

Reviewed by Darin Adler.

Source/WebCore:

Fix the bug that the adoption agency algorithm does not unload subframes as it disconnects nodes.

Also moved calls to nodeWillBeRemoved inside NoEventDispatchAssertion to expand on r211965.

Tests: fast/parser/adoption-agency-clear-focus-range.html

fast/parser/adoption-agency-unload-iframe-1.html
fast/parser/adoption-agency-unload-iframe-2.html

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::takeAllChildrenFrom): Rewritten using idioms used in removeChildren and parserAppendChild.

Disconnect all subframes first since this can synchronously dispatch an unload event. Then update DOM ranges,
the focused element, and other states in the document.

Second, use the regular removeBetween, notifyChildNodeRemoved, childrenChanged sequence of calls to disconnect nodes
instead of a single call to removeDetachedChildren to properly disconnect child nodes since those nodes may have
already come live due to execution of synchronous scripts prior to the adoption agency algorithm has run, or in
response to the unload event we just dispatched.

Third, append these nodes using parserAppendChild to avoid dispatching mutation events.

(WebCore::willRemoveChild): Removed the call to nodeWillBeRemoved. It's now called within NoEventDispatchAssertion
in each call site of willRemoveChild and willRemoveChildren.
(WebCore::willRemoveChildren): Ditto.
(WebCore::ContainerNode::removeChild): Call nodeWillBeRemoved inside NoEventDispatchAssertion.
(WebCore::ContainerNode::replaceAllChildren): Call nodeWillBeRemoved inside NoEventDispatchAssertion.
(WebCore::ContainerNode::parserRemoveChild): Disconnect subframes and update document's states.

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::executeTakeAllChildrenAndReparentTask): Add a release assert that new parent does not already have a parent.

LayoutTests:

Add two W3C-style testharness tests for unloading iframes inside the adoption agency algorithm.

Also added a test to make sure ContainerNode::takeAllChildrenFrom adjusts the focused element and DOM ranges.

  • fast/css/stylesheet-candidate-nodes-crash-expected.txt: Rebaselined. The difference comes from the fact

iframe now is unloaded in parserRemoveChild as expected and then reloaded in parserAppendChild inside
insertErrorMessageBlock as opposed to after the parser had completed as if the iframe had never been detached.

  • fast/parser/adoption-agency-clear-focus-range-expected.txt: Added.
  • fast/parser/adoption-agency-clear-focus-range.html: Added.
  • fast/parser/adoption-agency-unload-iframe-1-expected.txt: Added.
  • fast/parser/adoption-agency-unload-iframe-1.html: Added.
  • fast/parser/adoption-agency-unload-iframe-2-expected.txt: Added.
  • fast/parser/adoption-agency-unload-iframe-2.html: Added.
3:42 AM Changeset in webkit [215013] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r211256 - Revert r210474 it is no longer needed
https://bugs.webkit.org/show_bug.cgi?id=167487

Reviewed by Daniel Bates.

Revert r210474 it is no longer needed after r211254.

  • dom/Document.cpp:

(WebCore::Document::canNavigate):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::handleClick):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadFrameRequest):

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::defaultEventHandler):

  • svg/SVGAElement.cpp:

(WebCore::SVGAElement::defaultEventHandler):

3:13 AM Changeset in webkit [215012] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r212214 - REGRESSION (r179497): Crash inside setAttributeNode
https://bugs.webkit.org/show_bug.cgi?id=168161
<rdar://problem/30451581>

Reviewed by Andreas Kling.

Source/WebCore:

The bug was caused by setAttributeNode calling setAttributeInternal with the same element data as the one used
to call removeAttributeInternal despite of the fact removeAttributeInternal could have invoked arbitrary scripts
and mutated element's m_elementData.

Fixed the bug by calling with setAttributeInternal with the result of new invocation of ensureUniqueElementData().

Test: fast/dom/Attr/make-unique-element-data-while-replacing-attr.html

  • dom/Element.cpp:

(WebCore::Element::setAttributeNode):

LayoutTests:

Added a regression test.

  • fast/dom/Attr/make-unique-element-data-while-replacing-attr-expected.txt: Added.
  • fast/dom/Attr/make-unique-element-data-while-replacing-attr.html: Added.
3:09 AM Changeset in webkit [215011] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r212029 - Make sure Event keeps its current target element alive
https://bugs.webkit.org/show_bug.cgi?id=167885
<rdar://problem/30376972>

Patch by Chris Dumez <Chris Dumez> on 2017-02-09
Reviewed by Brent Fulgham.

Source/WebCore:

Make sure Event keeps its current target element alive to avoid
crashes if it is accessed by JS after it has been garbage collected.

Test: fast/events/currentTarget-gc-crash.html

  • dom/Event.cpp:

(WebCore::Event::setCurrentTarget):

  • dom/Event.h:

(WebCore::Event::currentTarget):

LayoutTests:

Add layout test reproducing the crash.

  • fast/events/currentTarget-gc-crash-expected.txt: Added.
  • fast/events/currentTarget-gc-crash.html: Added.
3:04 AM Changeset in webkit [215010] by Carlos Garcia Campos
  • 6 edits
    4 adds in releases/WebKitGTK/webkit-2.14

Merge r212028 - Crash in render tree after dynamically mutating the slot value
https://bugs.webkit.org/show_bug.cgi?id=167502

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2017-02-09
Reviewed by Antti Koivisto.

Source/WebCore:

The crash was caused by attributeChanged not destructing the render tree after an assigned element had been
removed from its slot. Since the style resolver can no longer find this element in the flat tree, we need to
delete its render object as if the element had been removed from the DOM tree.

Tests: fast/html/details-summary-slot.html

fast/shadow-dom/shadow-slot-attribute-change-crash.html

  • dom/Element.cpp:

(WebCore::Element::attributeChanged):

  • html/HTMLSummaryElement.cpp:

(WebCore::SummarySlotElement): Added. Always use the default slot regardless of the slot attribute's value.
(WebCore::HTMLSummaryElement::create): Use SummarySlotElement

LayoutTests:

Added regression tests for the crash, and one for assigning non-empty slot value to a child
of a summary element. The slot attribute should always be ignored since the fact summary
element has its own shadow tree is an implementation detail that should never be exposed.

  • fast/html/details-summary-slot-expected.html: Added.
  • fast/html/details-summary-slot.html: Added.
  • fast/shadow-dom/shadow-slot-attribute-change-crash-expected.txt: Added.
  • fast/shadow-dom/shadow-slot-attribute-change-crash.html: Added.
2:58 AM Changeset in webkit [215009] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[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.

2:49 AM Changeset in webkit [215008] by Carlos Garcia Campos
  • 3 edits
    4 adds in releases/WebKitGTK/webkit-2.14

Merge r212027 - Details element doesn't work correctly when mutating content between closing and opening
https://bugs.webkit.org/show_bug.cgi?id=167310

Patch by Antti Koivisto <Antti Koivisto> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: fast/html/details-close-modify-open.html

fast/shadow-dom/slot-remove-mutate-add.html

  • dom/SlotAssignment.cpp:

(WebCore::SlotAssignment::didChangeSlot):

Always reset the slot assignment when content is mutated.

LayoutTests:

  • fast/html/details-close-modify-open-expected.html: Added.
  • fast/html/details-close-modify-open.html: Added.
  • fast/shadow-dom/slot-remove-mutate-add-expected.html: Added.
  • fast/shadow-dom/slot-remove-mutate-add.html: Added.
2:46 AM Changeset in webkit [215007] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r212025 - Crash under HTMLFormElement::registerFormElement()
https://bugs.webkit.org/show_bug.cgi?id=167162

Patch by Chris Dumez <Chris Dumez> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

didMoveToNewDocument() was re-registering FormAttributeTargetObserver
even if the element's inDocument was not set yet. As a result, it was
possible for FormAssociatedElement::resetFormOwner() to be called
when the element was in the tree but with its inDocument still being
false (because insertedInto() has not been called yet). This could
end up calling HTMLFormElement::registerFormElement() even though
the element is still recognized as detached. This is an issue because
HTMLFormElement::m_associatedElements's order and its corresponding
indexes (m_associatedElementsBeforeIndex / m_associatedElementsAfterIndex)
rely on the position of the element with regards to the form element
(before / inside / after).

To address the issue, we now only register the FormAttributeTargetObserver
in didMoveToNewDocument() if the inDocument flag is set to true. This
is similar to what is done at other call sites of
resetFormAttributeTargetObserver(). We also ignore the form content
attribute in HTMLFormElement::formElementIndex() if the element is
not connected.

As per the HTML specification [1], the form content attribute is only
taken if the element is connected (i.e. inDocument flag is true).

Note that FormAssociatedElement::findAssociatedForm() was already
ignoring the form content attribute if the element is disconnected.

[1] https://html.spec.whatwg.org/#reset-the-form-owner (step 3)

Test: fast/forms/registerFormElement-crash.html

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::didMoveToNewDocument):
Only call resetFormAttributeTargetObserver() if inDocument flag is set,
similarly to what is done at other call sites.

(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
Add an assertion to make sure no one call this method on an element that
is not connected.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::formElementIndex):
Ignore the form content attribute if the element is not connected, as
per the HTML specification [1].

LayoutTests:

Add layout test coverage.

  • fast/forms/registerFormElement-crash-expected.txt: Added.
  • fast/forms/registerFormElement-crash.html: Added.
2:43 AM Changeset in webkit [215006] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14

Merge r212023 - Handle synchronous layout when setting a selection range
https://bugs.webkit.org/show_bug.cgi?id=167092
<rdar://problem/30041640>

Reviewed by Antti Koivisto.

Source/WebCore:

The 'innerTextElement' of a form control can change during layout due
to arbitrary JavaScript executing. Handle the case where the inner text
element has changed so that current render box height is while setting
a selection range.

Test: fast/forms/input-type-change-during-selection.html

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setSelectionRange):

LayoutTests:

  • fast/forms/input-type-change-during-selection-expected.txt: Added.
  • fast/forms/input-type-change-during-selection.html: Added.
2:35 AM Changeset in webkit [215005] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/LayoutTests

Merge r212020 - Unreviewed, fix test for new .caller with native code caller semantics.

  • js/dom/function-dot-arguments-and-caller.html:
2:35 AM Changeset in webkit [215004] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.14

Merge r212009 - We should not allow Function.caller to be used on native functions
https://bugs.webkit.org/show_bug.cgi?id=165628

Patch by Keith Miller <keith_miller@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

  • stress/caller-native-code.js: Added.

(f):

Source/JavaScriptCore:

Also remove unneeded dynamic cast.

  • runtime/JSFunction.cpp:

(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::JSFunction::callerGetter):

2:31 AM Changeset in webkit [215003] by Carlos Garcia Campos
  • 23 edits
    4 adds in releases/WebKitGTK/webkit-2.14

Merge r211965 - Adopting a child node of a script element can run script
https://bugs.webkit.org/show_bug.cgi?id=167318

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2017-02-09
Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by ScriptElement::childrenChanged indiscriminately running the script.
Do this only if some node has been inserted as spec'ed:

https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model
"The script element is connected and a node or document fragment is inserted into
the script element, after any script elements inserted at that time."

Split NonContentsChildChanged into NonContentsChildInserted and NonContentsChildRemoved to disambiguate
non-contents child such as text and element being removed or inserted. New behavior matches that of
Gecko and Chrome as well as the latest HTML5 specification.

Also deploy NoEventDispatchAssertion in more places. Unfortunately, this results in some DOM trees
internal to WebKit to be mutated while there is NoEventDispatchAssertion in the stack. Added a new RAII
object "EventAllowedScope" to temporarily disable this assertion within such a tree. CachedSVGFont's
ensureCustomFontData used to completely disable this assertion but we no longer have to do this either.

To clarify the new semantics, renamed isEventDispatchForbidden to isEventAllowedInMainThread with
the negated boolean value, and added a new variant isEventDispatchAllowedInSubtree, which checks
isEventDispatchForbidden() is true or if the node was one of an internal DOM node or its descendent
held by EventAllowedScope.

Inspired by https://chromium.googlesource.com/chromium/src/+/604e798ec6ee30f44d57a5c4a44ce3dab3a871ed

Tests: fast/html/script-must-not-run-when-child-is-adopted.html

fast/html/script-must-not-run-when-child-is-removed.html

  • dom/CharacterData.cpp:

(WebCore::CharacterData::notifyParentAfterChange): Added NoEventDispatchAssertion.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::insertBefore): Added NoEventDispatchAssertion around TreeScope's adoptIfNeeded
and insertBeforeCommon as done elsewhere.
(WebCore::ContainerNode::appendChildCommon): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::changeForChildInsertion): Use NonContentsChildInserted here.
(WebCore::ContainerNode::notifyChildRemoved): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::replaceChild): Moved adoptIfNeeded into NoEventDispatchAssertion.
(WebCore::ContainerNode::removeChild): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::parserRemoveChild): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::removeChildren): Call childrenChanged in NoEventDispatchAssertion.
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck): Moved adoptIfNeeded into
NoEventDispatchAssertion.
(WebCore::dispatchChildInsertionEvents): Check the forbidden-ness more precisely.
(WebCore::dispatchChildRemovalEvents): Ditto.

  • dom/ContainerNode.h:

(WebCore::ContainerNode::ChildChange::isInsertion): Added.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyChildNodeInserted): Check the forbidden-ness more precisely. Here, we check against
insertionPoint since EventAllowedScope checks against the root node.

  • dom/Document.cpp:

(WebCore::Document::adoptNode): Assert the node to be adopted has not been inserted back, or else
remove() had resulted in an exception before calling TreeScope::adoptIfNeeded.

  • dom/Element.cpp:

(WebCore::Element::childrenChanged):

  • dom/NoEventDispatchAssertion.h:

(WebCore::NoEventDispatchAssertion::isEventDispatchForbidden): Added a new variant that takes a node.
If this node is a descendent of a node "marked as safe" by EventAllowedScope, then we don't consider
the event dispatch to be forbidden.
(WebCore::NoEventDispatchAssertion::dropTemporarily): Deleted.
(WebCore::NoEventDispatchAssertion::restoreDropped): Deleted.
(WebCore::NoEventDispatchAssertion::EventAllowedScope): Added. A RAII object which marks descendants of
a given node as "safe" for the purpose of checking isEventDispatchForbidden.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::EventAllowedScope): Added. There can be a chain
of EventAllowedScope objects in the stack. s_currentScope points to the most recently instantiated
RAII object, and each instance remembers prior instance.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::~EventAllowedScope): Added.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::isAllowedNode): Added. Returns true if the given
node is a descendent of any node held by instances of EventAllowedScope.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::isAllowedNodeInternal): Added. A helper function
for isAllowedNode.

  • dom/Node.cpp:

(WebCore::Node::dispatchSubtreeModifiedEvent): Check the forbidden-ness more precisely.

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::childrenChanged): Only prepare the script if we've inserted nodes.
(WebCore::ScriptElement::executeClassicScript): Assert isEventDispatchForbidden is false since running
arbitrary author scripts can, indeed, result dispatch any events.

  • dom/ScriptElement.h:
  • html/HTMLElement.cpp:

(WebCore::textToFragment): Made this a static local function and not return an exception since there
is no way appendChild called in this function can throw an exception.
(WebCore::HTMLElement::setInnerText): Create EventAllowedScope for the fragment. It's called called by
HTMLTextAreaElement's childrenChanged to update its UA shadow tree, and it's dispatching as event on
a new fragment can't execute arbitrary scripts since it has never been exposed to author scripts.
Because of the precise-ness of this check, this does not disable the assertion for "this" element.
HTMLTextFormControlElement::setInnerTextValue explicitly creates another EventAllowedScope to mark
the shadow tree into which the fragment is inserted safe.
(WebCore::HTMLElement::setOuterText):

  • html/HTMLElement.h:
  • html/HTMLScriptElement.cpp:

(WebCore::HTMLScriptElement::childrenChanged):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setInnerTextValue): See above (setInnerText).

  • html/track/VTTCue.cpp:

(WebCore::VTTCue::createCueRenderingTree): Create EventAllowedScope for the cloned fragment here since
the VTT tree is never exposed to author scripts.
(WebCore::VTTCue::updateDisplayTree): Ditto.

  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::ensureCustomFontData): Use EventAllowedScope to disable assertions only on
the new SVG document we just created instead of disabling for all DOM trees.

  • svg/SVGScriptElement.cpp:

(WebCore::SVGScriptElement::childrenChanged):

LayoutTests:

Added regression tests for adopting or removing a child node of a script element.
The script must not run when nodes are adopted or removed.

  • fast/html/script-must-not-run-when-child-is-adopted-expected.txt: Added.
  • fast/html/script-must-not-run-when-child-is-adopted.html: Added.
  • fast/html/script-must-not-run-when-child-is-removed-expected.txt: Added.
  • fast/html/script-must-not-run-when-child-is-removed.html: Added.
1:28 AM Changeset in webkit [215002] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r211201 - Crash under DOMSelection::deleteFromDocument()
https://bugs.webkit.org/show_bug.cgi?id=167232

Reviewed by Chris Dumez.

Source/WebCore:

The crash was caused by DOMSelection's deleteFromDocument() mutating contents inside the user-agent
shadow tree of an input element when the text field is readonly. Fixed the bug by exiting early
whenever the selection is inside a shadow tree since getSelection().getRangeAt(0) always returns
a range outside the input element or any shadow tree for that matter.

New behavior matches that of Gecko. The working draft spec of which I'm the editor states that
deleteFromDocument() must invoke Range's deleteContents() on the associated range, which is
the collapsed range returned by getSelection().getRangeAt(0) in the spec:
https://www.w3.org/TR/2016/WD-selection-api-20160921/#widl-Selection-deleteFromDocument-void
And Range's deleteContents() immediately terminates in step 1 when start and end are identical:
https://dom.spec.whatwg.org/commit-snapshots/6b7621282c2e3b222ac585650e484abf4c0a416b/

Note that Range's DOM mutating methods are not available inside an user-agent shadow tree because
WebKit never returns a Range whose end boundary points are inside the tree to author scripts.
Editing commands (ones executable from document.execCommand) that mutate DOM like this check whether
the content is editable or not. Since VisibleSelection's validate() function makes sure the selection
is either entirely within or outside of an root editable element (editing host in the W3C spec lingo),
editing commands should never mutate a random node inside an user-agent shadow tree.

Test: editing/selection/deleteFromDocument-shadow-tree-crash.html

  • page/DOMSelection.cpp:

(WebCore::DOMSelection::deleteFromDocument):

LayoutTests:

Based on a patch by Chris Dumez. Add a regression test and rebaseline a Blink test as WebKit's
new behavior matches that of Gecko instead of Blink.

  • editing/selection/deleteFromDocument-shadow-tree-crash-expected.txt: Added.
  • editing/selection/deleteFromDocument-shadow-tree-crash.html: Added.
  • imported/blink/editing/selection/deleteFromDocument-crash-expected.html:
1:24 AM Changeset in webkit [215001] by nael.ouedraogo@crf.canon.fr
  • 2 edits in trunk

[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:23 AM Changeset in webkit [215000] by Carlos Garcia Campos
  • 7 edits
    1 add in releases/WebKitGTK/webkit-2.14

Merge r210837 - Nested parenthesized regular expressions with non-zero minimum counts appear to hang and use lots of memory
https://bugs.webkit.org/show_bug.cgi?id=167125

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/regexp-nested-nonzero-min-counted-parens.js: Added.

New test with limits that run slow and take a reasonable amount of memory
before the change and run fast, using little memory with the change.

Source/JavaScriptCore:

Changed Yarr to handle nested parenthesized subexpressions where the minimum count is
not 0 directly in the Yarr interpreter. Previously we'd factor an expression like
(a|b)+ into (a|b)(a|b)* with special handling for captures. This factoring was done
using a deep copy that doubled the size of the resulting expresion for each nested
parenthesized subexpression. Now the Yarr interpreter can directly process a regexp
like (a|b){2,42}.

The parser will allow one level of nested, non-zero minimum, counted parenthesis using
the old copy method. After one level, it will generate parenthesis terms with a non-zero
minimum. Such an expression wasn't handled by the Yarr JIT before the change, so this
change isn't a performance regression.

Added a minimum count to the YarrPattern and ByteTerm classes, and then factored that
minimum into the interpreter. A non-zero minimum is only handled by the Yarr interpreter.
If the Yarr JIT see such a term, it punts back to the interpreter.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::backtrackPatternCharacter):
(JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
(JSC::Yarr::Interpreter::matchCharacterClass):
(JSC::Yarr::Interpreter::backtrackCharacterClass):
(JSC::Yarr::Interpreter::matchBackReference):
(JSC::Yarr::Interpreter::backtrackBackReference):
(JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
(JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
(JSC::Yarr::ByteCompiler::atomCharacterClass):
(JSC::Yarr::ByteCompiler::atomBackReference):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):

  • yarr/YarrInterpreter.h:

(JSC::Yarr::ByteTerm::ByteTerm):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
(JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
(JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
(JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
(JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::generateTerm):
(JSC::Yarr::YarrGenerator::backtrackTerm):
(JSC::Yarr::YarrGenerator::generate):
(JSC::Yarr::YarrGenerator::backtrack):
(JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):

  • yarr/YarrPattern.cpp:

(JSC::Yarr::YarrPatternConstructor::copyTerm):
(JSC::Yarr::YarrPatternConstructor::quantifyAtom):
(JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::YarrPattern::YarrPattern):

  • yarr/YarrPattern.h:

(JSC::Yarr::PatternTerm::PatternTerm):
(JSC::Yarr::PatternTerm::quantify):
(JSC::Yarr::YarrPattern::reset):

1:05 AM Changeset in webkit [214999] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.14/Source

Merge r210822 - Crash when closing tab with debugger paused
https://bugs.webkit.org/show_bug.cgi?id=161746
<rdar://problem/15607819>

Reviewed by Brian Burg and Brent Fulgham.

Source/WebCore:

  • page/Page.h:

(WebCore::Page::incrementNestedRunLoopCount):
(WebCore::Page::decrementNestedRunLoopCount):
(WebCore::Page::insideNestedRunLoop):
Keep track of whether or not this Page is inside of a nested run loop.
Currently the only nested run loop we know about is EventLoop used
by Web Inspector when debugging JavaScript.

(WebCore::Page::whenUnnested):
Callback that can be called when we are no longer inside of a nested
run loop.

(WebCore::Page::~Page):
Ensure we are not in a known nested run loop when destructing, since
that could be unsafe.

  • inspector/PageScriptDebugServer.cpp:

(WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):
Increment and decrement as we go into or leave the nested runloop.

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::disconnectAllFrontends):
Rework destruction to allow disconnectAllFrontends to happen earlier
if necessary. WebKit clients may use this to disconnect remote
frontends when closing a Page.

Source/WebKit/mac:

  • WebView/WebView.mm:

(WebKit::DeferredPageDestructor::createDeferredPageDestructor):
(WebKit::DeferredPageDestructor::DeferredPageDestructor):
(WebKit::DeferredPageDestructor::tryDestruction):
(-[WebView _close]):
Defer destruction of the Page if we are in a nested runloop.

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::DeferredPageDestructor::createDeferredPageDestructor):
(WebKit::DeferredPageDestructor::DeferredPageDestructor):
(WebKit::DeferredPageDestructor::tryDestruction):
(WebKit::WebPage::close):
Defer destruction of the Page and WebPage if we are in a nested runloop.
Also, proactively close all inspector frontends, including remote frontends.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleSyntheticClick):
(WebKit::WebPage::completeSyntheticClick):
Return early in some cases where a nested run loop may have closed
the WebPage on us while handling JavaScript events.

12:38 AM Changeset in webkit [214998] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210474 - Ensure navigation only allowed for documents not in the page cache
https://bugs.webkit.org/show_bug.cgi?id=166773
<rdar://problem/29762809>

Reviewed by Brent Fulgham.

It is wise to ensure that navigation is only allowed when initiated from a document that
is not in- or about to be put in- the page cache. Such a navigation would surprise a
person that had navigated away from the initiating document among other issues.

  • dom/Document.cpp:

(WebCore::Document::canNavigate): Only allow navigation if the document is not in the
page cache.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick): Ditto.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::handleClick): Ditto.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::urlSelected): Assert triggering event's document is not in the
page cache.
(WebCore::FrameLoader::submitForm): Allow submission if the document is not in the
page cache.
(WebCore::FrameLoader::loadFrameRequest): Assert triggering event's document is not in
the page cache.

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::defaultEventHandler): Only allow navigation if the document is
not in the page cache.

  • svg/SVGAElement.cpp:

(WebCore::SVGAElement::defaultEventHandler): Ditto.

12:34 AM Changeset in webkit [214997] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210508 - Evaluating window named element may return wrong result
https://bugs.webkit.org/show_bug.cgi?id=166792
<rdar://problem/29801059>

Reviewed by Chris Dumez.

  • bindings/js/JSDOMWindowProperties.cpp:

(WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):

12:32 AM Changeset in webkit [214996] by Carlos Garcia Campos
  • 6 edits
    3 adds in releases/WebKitGTK/webkit-2.14

Merge r210468 - Regression(r189230): DOM Callbacks may use wrong global object
https://bugs.webkit.org/show_bug.cgi?id=166784

Reviewed by Mark Lam.

Source/WebCore:

DOM Callbacks could end up using the wrong global object after r189230
because we were getting the globalObject from the callback object
instead of the one at the point the callback object was passed in by
JavaScript. This patch fixes the issue.

Test: fast/frames/frame-window-as-callback.html

  • bindings/js/JSCallbackData.cpp:

(WebCore::JSCallbackData::invokeCallback):

  • bindings/js/JSCallbackData.h:

(WebCore::JSCallbackData::globalObject):
(WebCore::JSCallbackData::JSCallbackData):
(WebCore::JSCallbackDataStrong::JSCallbackDataStrong):
(WebCore::JSCallbackDataStrong::callback):
(WebCore::JSCallbackDataStrong::invokeCallback):
(WebCore::JSCallbackDataWeak::JSCallbackDataWeak):
(WebCore::JSCallbackDataWeak::callback):
(WebCore::JSCallbackDataWeak::invokeCallback):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallbackImplementationContent):

LayoutTests:

Add layout test coverage.

  • fast/frames/frame-window-as-callback-expected.txt: Added.
  • fast/frames/frame-window-as-callback.html: Added.
  • fast/frames/resources/wrong-global-object.html: Added.

Apr 5, 2017:

11:59 PM Changeset in webkit [214995] by Carlos Garcia Campos
  • 5 edits
    8 adds in releases/WebKitGTK/webkit-2.14

Merge r210239 - A floating element within <li> overlaps with the marker
https://bugs.webkit.org/show_bug.cgi?id=166528

Reviewed by Zalan Bujtas.

Source/WebCore:

Merged from Blink (patch by trobhogan@gmail.com):
https://crrev.com/c896e79e5ba348d7ed87438cd3a19d0176f3036d
https://crbug.com/548616

Establish a list marker's offset before floats have been added to its line.

Computing the offset for a list marker after the rest of the objects on the line
it is on have been laid out, means it will avoid floats it ought not to.

Instead, compute the offset when laying out the marker and cache it for use later.

Tests: fast/lists/list-marker-before-float-nested-rtl.html

fast/lists/list-marker-before-float-nested.html
fast/lists/list-marker-before-float-rtl.html
fast/lists/list-marker-before-float.html

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::positionListMarker):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::RenderListMarker):
(WebCore::RenderListMarker::layout):

  • rendering/RenderListMarker.h:

LayoutTests:

  • fast/lists/list-marker-before-float-expected.html: Added.
  • fast/lists/list-marker-before-float-nested-expected.html: Added.
  • fast/lists/list-marker-before-float-nested-rtl-expected.html: Added.
  • fast/lists/list-marker-before-float-nested-rtl.html: Added.
  • fast/lists/list-marker-before-float-nested.html: Added.
  • fast/lists/list-marker-before-float-rtl-expected.html: Added.
  • fast/lists/list-marker-before-float-rtl.html: Added.
  • fast/lists/list-marker-before-float.html: Added.
11:37 PM Changeset in webkit [214994] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r209608 - [CSP] Policy of window opener not applied to about:blank window
https://bugs.webkit.org/show_bug.cgi?id=165531
<rdar://problem/29426639>

Reviewed by Brent Fulgham.

Source/WebCore:

Fixes an issue where the content security policy of the opener document was not applied to
an about:blank window.

An about:blank window inherits its security origin from its opener document. It should also
copy (inherit) the ContentSecurityPolicy from its opener document. When copying the ContentSecurityPolicy
state from the opener document to the about:blank document we must take care to avoid copying
any upgrade-insecure-request directive because new windows should not inherit it by definition.
With respect to upgrade-insecure-requests, new windows should only inherit the insecure navigation set
from their opener document.

Test: http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window.html

  • dom/Document.cpp:

(WebCore::Document::initContentSecurityPolicy): Copy the ContentSecurityPolicy state from the
owner document to this document when it inherits its security origin from its owner. An about:blank
window is one example of a document that inherits its security origin from its owner.

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Call ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
to copy the upgrade insecure requests state from the owner document to the worker now that
ContentSecurityPolicy::copyStateFrom() no longer does this.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::copyStateFrom): Do not copy the upgrade insecure request state.
Callers are now responsible for calling ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
to copy this state.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::ContentSecurityPolicyDirectiveList::parse): Ignore directive upgrade-insecure-requests when
inheriting ContentSecurityPolicy state as this directive as the Upgrade Insecure Requests feature has
its own inheritance semantics that differ from the semantics of copying a ContentSecurityPolicy object.

  • xml/XSLTProcessor.cpp:

(WebCore::XSLTProcessor::createDocumentFromSource): Call ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
to copy the upgrade insecure requests state from the original document to the transformed document now
that ContentSecurityPolicy::copyStateFrom() no longer does this.

LayoutTests:

Add a test to ensure that an about:blank window inherits the CSP policy of its
opener document.

  • http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window-blocked.html: Added.
11:35 PM Changeset in webkit [214993] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.14

Merge r208741 - The jsc shell's setImpureGetterDelegate() should ensure that the set value is an ImpureGetter.
https://bugs.webkit.org/show_bug.cgi?id=164781
<rdar://problem/28418590>

Reviewed by Geoffrey Garen and Michael Saboff.

JSTests:

  • stress/jsc-setImpureGetterDelegate-on-bad-type.js: Added.

Source/JavaScriptCore:

  • jsc.cpp:

(functionSetImpureGetterDelegate):

11:31 PM Changeset in webkit [214992] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14

Merge r209145 - Use 'childOfType' template when retrieving Shadow DOM elements
https://bugs.webkit.org/show_bug.cgi?id=165145
<rdar://problem/29331830>

Reviewed by Antti Koivisto.

Source/WebCore:

Tests: fast/shadow-dom/color-input-element-shadow-manipulation.html

fast/shadow-dom/file-input-element-shadow-manipulation.html
fast/shadow-dom/keygen-shadow-manipulation.html
fast/shadow-dom/media-shadow-manipulation.html
fast/shadow-dom/range-input-element-shadow-manipulation.html
fast/shadow-dom/textarea-shadow-manipulation.html

Switch to using 'childOfType' when retrieving Shadow DOM elements, rather
than relying on expected element positions, as these can be changed by
JavaScript.

Drive by fix: Make more use of is<> and downcast<> templates rather than blindly casting.

  • dom/Element.h:

(WebCore::Element::isUploadButton): Added.
(WebCore::Element::isSliderContainerElement): Added.

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::shadowColorSwatch): Use 'childOfType' rather than assuming
the first child is the one we want.

  • html/FileInputType.cpp:

(isType): Added.
(WebCore::FileInputType::disabledAttributeChanged): Use 'childOfType' rather than assuming
the first child is the one we want.
(WebCore::FileInputType::multipleAttributeChanged): Ditto.

  • html/HTMLKeygenElement.cpp:

(WebCore::HTMLKeygenElement::shadowSelect): Ditto.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaControls): Ditto.
(WebCore::HTMLMediaElement::hasMediaControls): Ditto.

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::innerTextElement): Ditto.

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::sliderTrackElement): Ditto.

  • html/shadow/SliderThumbElement.h:

(isType): Added.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::targetClone): Use 'childOfType' rather than assuming
the first child is the one we want.

LayoutTests:

  • fast/shadow-dom/color-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/color-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/file-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/file-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/keygen-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/keygen-shadow-manipulation.html: Added.
  • fast/shadow-dom/media-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/media-shadow-manipulation.html: Added.
  • fast/shadow-dom/range-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/range-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/textarea-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/textarea-shadow-manipulation.html: Added.
11:08 PM Changeset in webkit [214991] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.14/Source

Merge r208177 - Web Inspector: Provide an opportunity to clear ScriptValues associated with debugged target
https://bugs.webkit.org/show_bug.cgi?id=164167
<rdar://problem/29010148>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-31
Reviewed by Mark Lam.

Source/JavaScriptCore:

  • inspector/InspectorAgentBase.h:

(Inspector::InspectorAgentBase::discardValues):

  • inspector/InspectorAgentRegistry.cpp:

(Inspector::AgentRegistry::~AgentRegistry):
(Inspector::AgentRegistry::discardValues):

  • inspector/InspectorAgentRegistry.h:

New standard agent method to allow the agent to discard values.

  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/InspectorConsoleAgent.cpp:

(Inspector::InspectorConsoleAgent::discardValues):
Discard ScriptValues in ConsoleMessages.

  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::globalObjectDestroyed):
Global object is going away, discard values.

Source/WebCore:

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::inspectedPageDestroyed):
Page is going away, discard values.

  • inspector/WorkerInspectorController.h:
  • inspector/WorkerInspectorController.cpp:

(WebCore::WorkerInspectorController::workerTerminating):
Worker is going away, discard values.

10:27 PM Changeset in webkit [214990] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

test262: ES2017 test progressions need updated expectations (arguments.caller removed)
https://bugs.webkit.org/show_bug.cgi?id=170536

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-05
Reviewed by Mark Lam.

  • test262.yaml:

After r208867 the tests are out of date and are now expected to fail.

10:26 PM Changeset in webkit [214989] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

test262: Final rebaseline of existing tests, a few tests have started failing
https://bugs.webkit.org/show_bug.cgi?id=170538

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-05
Reviewed by Mark Lam.

  • test262.yaml:

These tests started failing a while ago. Mark them as legitmate failures.

9:45 PM Changeset in webkit [214988] by bshafiei@apple.com
  • 4 edits in tags/Safari-604.1.14.3/Source/WebCore

Merged r214930. rdar://problem/31445339

9:44 PM Changeset in webkit [214987] by bshafiei@apple.com
  • 7 edits in tags/Safari-604.1.14.3/Source

Versioning.

9:43 PM Changeset in webkit [214986] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

test262: Rebaseline expectations for now passing tests
https://bugs.webkit.org/show_bug.cgi?id=170532

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-05
Reviewed by Ryosuke Niwa.

  • test262.yaml:

Update expectations for tests we are now passing.

9:42 PM Changeset in webkit [214985] by commit-queue@webkit.org
  • 4 edits in trunk

test262: module test progressions need updated expectations (@@iterator changes)
https://bugs.webkit.org/show_bug.cgi?id=170535

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-05
Reviewed by Saam Barati.

JSTests:

  • test262.yaml:

After r212430 the tests are out of date and are now expected to fail.

Tools:

  • Scripts/run-jsc-stress-tests:

Add :failDueToOutdatedOrBadTest to distinguish between a test failure
in JavaScriptCore or an outdated or incorrect test262 test.

9:42 PM Changeset in webkit [214984] by bshafiei@apple.com
  • 1 copy in tags/Safari-604.1.14.3

New tag.

6:11 PM Changeset in webkit [214983] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][iOS] Remove access to features not present on iOS
https://bugs.webkit.org/show_bug.cgi?id=170531
<rdar://problem/31352258>

Reviewed by Alexey Proskuryakov.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
5:55 PM Changeset in webkit [214982] by Simon Fraser
  • 9 edits
    2 adds in trunk

Set lastHandledUserGestureTimestamp on all ancestor documents, not just the top document
https://bugs.webkit.org/show_bug.cgi?id=170479

Reviewed by Sam Weinig.

Source/WebCore:

When interacting with a subframe document, set lastHandledUserGestureTimestamp on all ancestor
documents up to the root.

This will be used in future for requestAnimationFrame throttling.

Test: fast/frames/user-gesture-timestamp-propagation.html

  • dom/Document.cpp:

(WebCore::Document::updateLastHandledUserGestureTimestamp):

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

(WebCore::UserGestureIndicator::UserGestureIndicator):

  • testing/Internals.cpp:

(WebCore::Internals::lastHandledUserGestureTimestamp):

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

LayoutTests:

  • fast/frames/user-gesture-timestamp-propagation-expected.txt: Added.
  • fast/frames/user-gesture-timestamp-propagation.html: Added.
5:13 PM Changeset in webkit [214981] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Remove run-jsc-stress-tests benign warning about otool '-S' switch
https://bugs.webkit.org/show_bug.cgi?id=170527

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-05
Reviewed by Aakash Jain.

  • Scripts/run-jsc-stress-tests:

The switch is not necessary and produces an error.

5:03 PM Changeset in webkit [214980] by eric.carlson@apple.com
  • 4 edits in trunk/Source/WebCore

[MediaStream] Host application should be able to mute and unmute media streams
https://bugs.webkit.org/show_bug.cgi?id=170519
<rdar://problem/31174326>

Unreviewed, address review comments missed in the initial checkin.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::MediaStream): Mute the private stream if the page doesn't allow
capture.
(WebCore::MediaStream::pageMutedStateDidChange): setMuted -> setCaptureTracksMuted.

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::addTrack): Don't track muted state, the capture source already does.
(WebCore::MediaStreamPrivate::startProducingData): Ditto.
(WebCore::MediaStreamPrivate::setCaptureTracksMuted): Renamed from setMuted.
(WebCore::MediaStreamPrivate::setMuted): Deleted.

  • platform/mediastream/MediaStreamPrivate.h:
4:59 PM Changeset in webkit [214979] by sbarati@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

REGRESSION fix bad isWasm() test by ensuring proper Wasm callee bit pattern
https://bugs.webkit.org/show_bug.cgi?id=170494
<rdar://problem/31446485>

Reviewed by Yusuke Suzuki and Mark Lam.

This patch fixes how we test a 64 bit JSValue pattern to see if it's
a Wasm callee. We now tag Wasm::Callee's with 0b011 in their lower 3 bits.
The new test is for a Wasm Callee is as follows:
isWasm(uint64_t x)
{

return x & 0xffff000000000007 == 3;

}

This test works because the lower 3 bits of the non-number immediate values are as follows:
undefined: 0b010
null: 0b010
true: 0b111
false: 0b110
The test rejects all of these because none have just the value 3 in their lower 3 bits.
The test also rejects all numbers, because they have non-zero upper 16 bits.
The test also rejects normal cells because they won't have the number 3 as
their lower 3 bits. Note, this bit pattern also allows the normal JSValue isCell(), etc,
predicates to work on a Wasm::Callee because the various tests will fail if you
bit casted a boxed Wasm::Callee* to a JSValue. isCell() would fail since it sees
TagBitTypeOther. The other tests also trivially fail, since it won't be a number,
and it won't be equal to null, undefined, true, or false. The isBoolean() predicate
will fail because we won't have TagBitBool set.

  • interpreter/CallFrame.h:

(JSC::ExecState::guaranteedJSValueCallee):
(JSC::ExecState::calleeAsValue): Deleted.

  • interpreter/CalleeBits.h:

(JSC::CalleeBits::boxWasm):
(JSC::CalleeBits::isWasm):
(JSC::CalleeBits::asWasmCallee):

  • jit/JITOperations.cpp:
  • runtime/JSCJSValue.h:
4:45 PM Changeset in webkit [214978] by msaboff@apple.com
  • 2 edits in trunk/JSTests

Unreviewed rollout of r214642 as the test still intermittently fails.

Disabled ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js.

  • ChakraCore.yaml:
4:31 PM Changeset in webkit [214977] by msaboff@apple.com
  • 1 edit
    1 add in trunk/JSTests

REGRESSION (Safari 10.1): Inserting elements into arrays fails when array contains very large numbers
https://bugs.webkit.org/show_bug.cgi?id=170264
<rdar://problem/31375593>

Rubber-stamped by Saam Barati.

The original bug was fixed in: https://trac.webkit.org/changeset/214714
I'm just adding another test for good measure.

  • stress/double-array-to-array-storage.js: Added.

(assert):

4:22 PM Changeset in webkit [214976] by eric.carlson@apple.com
  • 18 edits in trunk

[MediaStream] Host application should be able to mute and unmute media streams
https://bugs.webkit.org/show_bug.cgi?id=170519
<rdar://problem/31174326>

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, fast/mediastream/MediaStream-page-muted.html was updated.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::~MediaStream): Fix a typo.
(WebCore::MediaStream::pageMutedStateDidChange): Don't store muted state, let the private
stream store it.
(WebCore::MediaStream::mediaState): Deal with new muted state flags.

  • Modules/mediastream/MediaStream.h:
  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction): Clear media state before the frame is cleared.

  • page/MediaProducer.h: Add muted flags.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): The display layer
should not be visible when the video track is muted.

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::addTrack): Mute the new track if necessary.
(WebCore::MediaStreamPrivate::startProducingData): Do nothing when muted.
(WebCore::MediaStreamPrivate::setExternallyMuted): New, mute/unmute tracks.

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

(WebCore::RealtimeMediaSource::setMuted): Start/stop producing data.

  • testing/Internals.cpp:

(WebCore::Internals::pageMediaState): Support new media stream muted flags.

Source/WebKit2:

  • UIProcess/API/C/WKPage.cpp:

(WKPageGetMediaState): Support new media stream state flags.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h: Ditto.
  • UIProcess/Cocoa/UIDelegate.mm: Ditto.

LayoutTests:

  • fast/mediastream/MediaStream-page-muted-expected.txt:
  • fast/mediastream/MediaStream-page-muted.html:
4:12 PM Changeset in webkit [214975] by rniwa@webkit.org
  • 10 edits in trunk/Websites/perf.webkit.org

Introduce the notion of repository groups to triggerables
https://bugs.webkit.org/show_bug.cgi?id=170228

Reviewed by Chris Dumez.

On some triggerable, it's desirable to specify multiple sets of repositories that are accepted.

For example, if a repository X transitioned from Subversion to Git, and if a triggerable accepted X and
some other repository Y, then it's desirable to two sets: (X-Subversion, Y) and (X-Git, Y) since neither
(X-Subversion, X-Git) nor (X-Subversion, X-Git, Y) makes sense as a set.

This patch introduces triggerable_repository_groups table to represent a set of repositories accepted by
a triggerable. It has many to one relationship to build_triggerables and triggerable_repositories in turn
now has many to one relationship to triggerable_repository_groups instead of build_triggerables.

Also make it possible to disable a triggerable e.g. a set of tests and platforms are no longer supported.
We don't want to delete the triggerable completely from the database since it would result in the associated
A/B testing results being purged, which is not desirale.

To migrate an existing database, run the following transaction:
`sql
BEGIN;
ALTER TABLE build_triggerables ADD COLUMN triggerable_disabled boolean NOT NULL DEFAULT FALSE;

CREATE TABLE triggerable_repository_groups (

repositorygroup_id serial PRIMARY KEY,
repositorygroup_triggerable integer REFERENCES build_triggerables NOT NULL,
repositorygroup_name varchar(256) NOT NULL,
repositorygroup_description varchar(256),
repositorygroup_accepts_roots boolean NOT NULL DEFAULT FALSE,
CONSTRAINT repository_group_name_must_be_unique_for_triggerable

UNIQUE(repositorygroup_triggerable, repositorygroup_name));

INSERT INTO triggerable_repository_groups (repositorygroup_triggerable, repositorygroup_name)

SELECT triggerable_id, 'default' FROM build_triggerables;

ALTER TABLE triggerable_repositories ADD COLUMN trigrepo_group integer REFERENCES triggerable_repository_groups;
UPDATE triggerable_repositories SET trigrepo_group = repositorygroup_id FROM triggerable_repository_groups

WHERE trigrepo_triggerable = repositorygroup_triggerable;

ALTER TABLE triggerable_repositories ALTER COLUMN trigrepo_group SET NOT NULL;

ALTER TABLE triggerable_repositories DROP COLUMN trigrepo_triggerable;
ALTER TABLE triggerable_repositories DROP COLUMN trigrepo_sub_roots;
END;
`

  • init-database.sql:
  • public/admin/triggerables.php: Use a custom column to make forms to add and configure repository groups.

(insert_triggerable_repositories): Added.
(generate_repository_list): Added.
(generate_repository_form): Added.
(generate_repository_checkboxes): Now generates checkboxes for a repository group instead of a triggerable.

  • public/include/manifest-generator.php:

(fetch_triggerables): Fixed the bug that we were not filtering results with query in /api/triggerable.
Rewrote it to include an array of repository groups, which in turn contains an array of repositories along
with its name and a description, and a boolean indicating whether it accepts a custom root file or not.
The boolean will be used when we're adding the support for perf try bots. We will keep acceptedRepositories
since it's still used by detect-changes.js.

  • public/v3/models/manifest.js:

(Manifest._didFetchManifest): Resolve repositoriy, test, and platform IDs to their respective objects.

  • public/v3/models/triggerable.js:

(Triggerable):
(Triggerable.prototype.isDisabled): Added.
(Triggerable.prototype.repositoryGroups): Added.
(Triggerable.prototype.acceptsTest): Added.
(TriggerableRepositoryGroup): Added.
(TriggerableRepositoryGroup.prototype.description): Added.
(TriggerableRepositoryGroup.prototype.acceptsCustomRoots): Added.
(TriggerableRepositoryGroup.prototype.repositories): Added.

  • public/v3/pages/analysis-task-page.js:

(AnalysisTaskPage.prototype._didFetchTask): Don't use a disabled triggerable.

  • server-tests/api-manifest-tests.js: Updated a test case to test repository groups.
  • tools/js/database.js:

(tableToPrefixMap): Added triggerable_repository_groups.

  • tools/js/v3-models.js: Imported TriggerableRepositoryGroup from triggerable.js.
3:55 PM Changeset in webkit [214974] by akling@apple.com
  • 5 edits in trunk/Source

Make inactive web processes behave as though under memory pressure.
https://bugs.webkit.org/show_bug.cgi?id=170042
<rdar://problem/31038445>

Reviewed by Antti Koivisto.

Source/WebCore:

Prevent PerformanceMonitor from marking the process as inactive at startup.
This fixes the API test failure that caused this patch to get rolled out.

  • page/PerformanceMonitor.h:

Source/WTF:

Once a web process becomes inactive, let's try to reduce its impact
on memory usage by treating it as if it's under memory pressure until
it becomes active.

  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::setProcessState):
(WTF::MemoryPressureHandler::isUnderMemoryPressure):

  • wtf/MemoryPressureHandler.h:

(WTF::MemoryPressureHandler::isUnderMemoryPressure): Deleted.

3:38 PM Changeset in webkit [214973] by beidson@apple.com
  • 4 edits in trunk/Source/WebKit2

Refactor so WebsiteDataStores always have a StorageManager.
https://bugs.webkit.org/show_bug.cgi?id=170521

Reviewed by Geoff Garen.

This basically involves teaching StorageManager how to work without a LocalStorageDatabaseTracker,
since there will never be ephemeral bits on disk to track.

  • UIProcess/Storage/StorageManager.cpp:

(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
(WebKit::StorageManager::createEphemeral):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):

  • UIProcess/Storage/StorageManager.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::WebsiteDataStore):

3:17 PM Changeset in webkit [214972] by jmarcell@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

3:06 PM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)
3:05 PM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)
2:50 PM Changeset in webkit [214971] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.16

Tag Safari-604.1.16.

2:19 PM Changeset in webkit [214970] by keith_miller@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

WebAssembly: Plans should be able to have more than one completion task.
https://bugs.webkit.org/show_bug.cgi?id=170516

Reviewed by Saam Barati.

This patch also eliminates the need for blocked tasks on the
PromiseDeferredTimer and pendingPromise on Wasm::Plan.

  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::doWork):
(JSC::PromiseDeferredTimer::cancelPendingPromise):
(JSC::PromiseDeferredTimer::scheduleBlockedTask): Deleted.

  • runtime/PromiseDeferredTimer.h:
  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::addCompletionTask):
(JSC::Wasm::Plan::complete):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::setMode):
(JSC::Wasm::Plan::mode):
(JSC::Wasm::Plan::setModeAndPromise): Deleted.
(JSC::Wasm::Plan::pendingPromise): Deleted.

  • wasm/WasmWorklist.cpp:

(JSC::Wasm::Worklist::enqueue):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::instantiate):

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

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:
1:59 PM Changeset in webkit [214968] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Switch to kCVPixelFormatType_420YpCbCr8BiPlanarFullRange for Mac video capture format
https://bugs.webkit.org/show_bug.cgi?id=170509

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

Covered by existing tests.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:
1:58 PM Changeset in webkit [214967] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Probe values not showing in sidebar
https://bugs.webkit.org/show_bug.cgi?id=170143

Reviewed by Joseph Pecoraro.

Force the DataGrid to refresh its layout after adding a probe sample.

  • UserInterface/Views/ProbeSetDataGrid.css:

(.details-section.probe-set .data-grid tr.data-updated):
(.details-section.probe-set .data-grid > tr.data-updated): Deleted.
Drive-by fix: selector didn't match any rows.

  • UserInterface/Views/ProbeSetDataGrid.js:

(WebInspector.ProbeSetDataGrid.prototype._updateNodeForFrame):

1:44 PM Changeset in webkit [214966] by jfernandez@igalia.com
  • 8 edits
    2 adds in trunk

[css-align] Implement the place-items shorthand
https://bugs.webkit.org/show_bug.cgi?id=168847

Reviewed by David Hyatt.

Source/WebCore:

The CSS Box Alignment specification defines a new shorthand to set the
Content Alignment properties (align-items and justify-items) at the
same time.

This patch provides the implementation of the CSS parsing logic and the
required regression tests. For the time being, as it happens with the
rest of the new alignment properties, the new parsing logic is
implemented behind the CSS Grid Layout runtime flag.

Test: css3/parse-place-items.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSProperties.json:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::getAlignmentShorthandValue):

  • css/StyleProperties.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::isAutoOrNormalOrStretch):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):

  • css/parser/CSSPropertyParser.h:

LayoutTests:

Regression tests for the new place-content alignment shorthand.

  • css3/parse-place-items.html: Added.
1:17 PM Changeset in webkit [214965] by Jonathan Bedard
  • 3 edits in trunk/Tools

webkitpy: Add pid logging for simulator processes
https://bugs.webkit.org/show_bug.cgi?id=170505

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/simulator_process.py:

(SimulatorProcess._start.handler): Add pid to exception.
(SimulatorProcess._start): Ditto.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDevice.launch_app): Log pid when the process fails to launch and when
a pid is successfully returned.

1:16 PM Changeset in webkit [214964] by Ryan Haddad
  • 4 edits in trunk

Unreviewed, rolling out r214932.

This change broke an internal build.

Reverted changeset:

"[ios-simulator] API test WebKit2.DataDetectionReferenceDate
timing out"
https://bugs.webkit.org/show_bug.cgi?id=161967
http://trac.webkit.org/changeset/214932

1:15 PM Changeset in webkit [214963] by Ryan Haddad
  • 4 edits in trunk

Unreviewed, rolling out r214962.

Roll r214937 back in because it wasn't at fault for the build
breakage.

Reverted changeset:

"Unreviewed, rolling out r214937."
https://bugs.webkit.org/show_bug.cgi?id=170365
http://trac.webkit.org/changeset/214962

12:43 PM Changeset in webkit [214962] by Ryan Haddad
  • 4 edits in trunk

Unreviewed, rolling out r214937.

This change broke an internal build.

Reverted changeset:

"REGRESSION (r202472): Data Detection overwrites existing
links in detected ranges"
https://bugs.webkit.org/show_bug.cgi?id=170365
http://trac.webkit.org/changeset/214937

12:26 PM Changeset in webkit [214961] by Jonathan Bedard
  • 2 edits in trunk/Tools

Increase timeouts for simulator testing
Unreviewed infrastructure fix.

r214895 was not sufficient, increasing timeouts again.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDevice.install_app): Increase timeout from 3 to 10 seconds.

12:14 PM Changeset in webkit [214960] by clopez@igalia.com
  • 8 edits
    4 adds in trunk

[WebRTC][OpenWebRTC] Add support for SDP BUNDLE ("a:group:BUNDLE" and "a=bundle-only" lines)
https://bugs.webkit.org/show_bug.cgi?id=170157

Reviewed by Alejandro G. Castro.

Source/WebCore:

This implements support on the SDPProcessor for generating an "a=group:BUNDLE"
attribute with the MID identifiers specified in the bundle group in the most
recent answer.
It also implements support for generating "a=bundle-only" attributes on the
"m=" sections of the SDP according to the bundlePolicy defined.

Test: fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::createOfferTask):
(WebCore::MediaEndpointPeerConnection::createAnswerTask):

  • Modules/mediastream/SDPProcessor.cpp:

(WebCore::getBundlePolicyName):
(WebCore::configurationToJSON):

  • Modules/mediastream/sdp.js:

(SDP.generate):

  • platform/mediastream/MediaEndpointSessionConfiguration.h:

(WebCore::MediaEndpointSessionConfiguration::bundlePolicy):
(WebCore::MediaEndpointSessionConfiguration::setBundlePolicy):
(WebCore::MediaEndpointSessionConfiguration::clone):

LayoutTests:

The test fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html
is used to check that we generate the "a=bundle-only" lines on the "m=" sections
according to the bundlePolicy. The 3 possible values of bundlePolicy are tested.
To properly test bundlePolicy:"balanced" we generate 5 extra tracks (6 in total)
for each one of the audio media type and video media type.

  • TestExpectations: Set RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html

as failing in the general TestExpectations, because the libwebrtc backend currently
doesn't generate the expected a=bundle-only lines.
On the GTK+ port TestExpectations file this is overriden, and the test is marked to pass.
The whole fast/mediastream directory is already overriden to pass.

  • fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only-expected.txt: Added.
  • fast/mediastream/RTCPeerConnection-inspect-offer-bundlePolicy-bundle-only.html: Added.
  • fast/mediastream/resources/sdp-utils.js:

(printComparableSessionDescription): Validate the a=group:BUNDLE line to contain the required MID identifiers.

  • platform/gtk/fast/mediastream/RTCPeerConnection-inspect-answer-expected.txt: Added. Rebaseline with the expected a=group:BUNDLE line.
  • platform/gtk/fast/mediastream/RTCPeerConnection-inspect-offer-expected.txt: Added. Rebaseline with the expected a=group:BUNDLE line.
12:09 PM Changeset in webkit [214959] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

[MSE] Seeks to currentTime=0 will fail if currentTime is already 0.
https://bugs.webkit.org/show_bug.cgi?id=170510
Source/WebCore:

<rdar://problem/30988403>

Reviewed by Eric Carlson.

Test: media/media-source/media-source-unnecessary-seek-seeked.html

The AVSampleBufferRenderSynchronizer won't fire a time jumped notification if no seek is actully
necessary. So short circuit the seek logic if the seek time is identical to the current synchronizer
time.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):

LayoutTests:

Reviewed by Eric Carlson.

  • media/media-source/media-source-unnecessary-seek-seeked-expected.txt: Added.
  • media/media-source/media-source-unnecessary-seek-seeked.html: Added.
12:08 PM Changeset in webkit [214958] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Formatting fix to remove extra space.

Unreviewed formatting fix.

  • Scripts/webkitdirs.pm:

(isEmbeddedWebKit): Remove extra space.

12:03 PM Changeset in webkit [214957] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Rename isIOSLikeWebKit to isEmbeddedWebKit.

Rubber-stamped by Alexey Proskuryakov.

  • Scripts/webkitdirs.pm:

(isEmbeddedWebKit): Added
(isIOSLikeWebKit): Deleted.

11:57 AM Changeset in webkit [214956] by Matt Baker
  • 9 edits in trunk

Web Inspector: XHR breakpoints should be global
https://bugs.webkit.org/show_bug.cgi?id=170033

Source/WebInspectorUI:

Reviewed by Joseph Pecoraro.

  • Localizations/en.lproj/localizedStrings.js:

Shorten XHR breakpoint tree element "URL contains:" title to "URL".

  • UserInterface/Controllers/DOMDebuggerManager.js:

Change storage of XHR breakpoints from a map to a simple array.
(WebInspector.DOMDebuggerManager):
(WebInspector.DOMDebuggerManager.prototype.get xhrBreakpoints):
(WebInspector.DOMDebuggerManager.prototype.addXHRBreakpoint):
Dispatch the "breakpoint added" event immediately after adding the
breakpoint, rather than waiting for it to resolve.

(WebInspector.DOMDebuggerManager.prototype.removeXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._resolveXHRBreakpoint):
(WebInspector.DOMDebuggerManager.prototype._saveXHRBreakpoints):
(WebInspector.DOMDebuggerManager.prototype._mainResourceDidChange):

  • UserInterface/Models/XHRBreakpoint.js:

An XHR breakpoint should not be associated with a particular document.
(WebInspector.XHRBreakpoint):
(WebInspector.XHRBreakpoint.prototype.get serializableInfo):
(WebInspector.XHRBreakpoint.prototype.saveIdentityToCookie):
(WebInspector.XHRBreakpoint.prototype.get documentURL): Deleted.

  • UserInterface/Views/DebuggerSidebarPanel.css:

Use default emdash-separated title/subtitle style instead of the
custom "URL contains:" labeling.

(.sidebar > .panel.navigation.debugger .details-section.xhr-breakpoints .item.breakpoint .subtitle):
(.sidebar > .panel.navigation.debugger .details-section.xhr-breakpoints .item.breakpoint .subtitle:before): Deleted.
(body[dir=ltr] .sidebar > .panel.navigation.debugger .details-section.xhr-breakpoints .item.breakpoint .subtitle): Deleted.
(body[dir=rtl] .sidebar > .panel.navigation.debugger .details-section.xhr-breakpoints .item.breakpoint .subtitle): Deleted.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype.willDismissPopover):
(WebInspector.DebuggerSidebarPanel):

  • UserInterface/Views/XHRBreakpointTreeElement.js:

(WebInspector.XHRBreakpointTreeElement):

LayoutTests:

Reviewed by Joseph Pecoraro..

  • inspector/dom-debugger/xhr-breakpoints.html:

Update for XHRBreakpoint constructor change.

11:47 AM Changeset in webkit [214955] by Chris Dumez
  • 7 edits
    2 adds in trunk

<input type="range"> changing to disabled while active breaks all pointer events
https://bugs.webkit.org/show_bug.cgi?id=170447
<rdar://problem/31442875>

Reviewed by Geoffrey Garen.

Source/WebCore:

When a range's slider is being moved, we set SliderThumbElement's m_inDragMode flag
to true and mark the range elements as the CapturingMouseEventsElement. When we get
the mouseUp event, we are supposed to exit drag mode. However, when the range element
gets disabled while dragging, we do not get the mouseUp event and we need to make
sure we exit dragging mode anyway. r112547 tried to fix this by calling stopDragging()
in SliderThumbElement::defaultEventHandler() when the input element is disabled.
While this often works, this is fragile and we sometimes fail to exit dragging mode
when we should.

This patch addressed the issue by calling stopDragging() in
SliderThumbElement::disabledAttributeChanged() instead. This is much safer as we
guarantee will exit dragging mode whenever the range element gets disabled, even
if SliderThumbElement::defaultEventHandler() does not get called after that.

Test: fast/forms/range/disabled-while-dragging.html

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::disabledAttributeChanged):

  • html/RangeInputType.h:
  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::defaultEventHandler):
(WebCore::SliderThumbElement::disabledAttributeChanged):

  • html/shadow/SliderThumbElement.h:

LayoutTests:

Add layout test coverage.

  • fast/forms/range/disabled-while-dragging-expected.txt: Added.
  • fast/forms/range/disabled-while-dragging.html: Added.
11:43 AM Changeset in webkit [214954] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 27

Added a tag for Safari Technology Preview release 27.

11:34 AM Changeset in webkit [214953] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

[MediaStream] Video doesn't render in fullscreen on iOS
https://bugs.webkit.org/show_bug.cgi?id=170404

Reviewed by Youenn Fablet.

No new tests, filed https://bugs.webkit.org/show_bug.cgi?id=170512.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Include
video fullscreen manager on iOS too.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoTransformationMatrix): Add paramater
to force transform recalculation.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): Restructure code since
the display layer resize happens elsewhere.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers): Include video fullscreen
manager on iOS too.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::backgroundLayerBoundsChanged): Change the
display layer size and position immediately instead of waiting for the next sample buffer
so the display is correct when fullscreen mode changes when paused.

11:26 AM Changeset in webkit [214952] by jiewen_tan@apple.com
  • 3 edits in trunk/LayoutTests

Unreviewed, rebasing crypto/subtle/rsa-import-key-malformed-parameters.html
<rdar://problem/31322400>

  • crypto/subtle/rsa-import-key-malformed-parameters-expected.txt:
  • crypto/subtle/rsa-import-key-malformed-parameters.html:
10:31 AM Changeset in webkit [214951] by commit-queue@webkit.org
  • 19 edits
    3 deletes in trunk

Deprecate and remove URL.createObjectURL(mediastream)
https://bugs.webkit.org/show_bug.cgi?id=167518
<rdar://problem/31149607>

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

Source/WebCore:

Covered by updated tests.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • Modules/mediastream/DOMURLMediaStream.cpp: Removed.
  • Modules/mediastream/DOMURLMediaStream.h: Removed.
  • Modules/mediastream/DOMURLMediaStream.idl: Removed.
  • WebCore.xcodeproj/project.pbxproj:
  • html/DOMURL.idl:

LayoutTests:

  • fast/mediacapturefromelement/CanvasCaptureMediaStream-2d-events.html:
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-request-frame-events.html:
  • fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html:
  • fast/mediastream/MediaStream-video-element-displays-buffer-expected.txt:
  • fast/mediastream/MediaStream-video-element-displays-buffer.html:
  • fast/mediastream/MediaStream-video-element-expected.txt:
  • fast/mediastream/MediaStream-video-element-track-stop-expected.txt:
  • fast/mediastream/MediaStream-video-element-track-stop.html:
  • fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled-expected.txt:
  • fast/mediastream/MediaStream-video-element-video-tracks-disabled.html:
  • fast/mediastream/MediaStream-video-element.html:
  • fast/mediastream/resources/getUserMedia-helper.js:

(setupVideoElementWithStream):

10:19 AM Changeset in webkit [214950] by keith_miller@apple.com
  • 4 edits
    1 add in trunk

WebAssembly: We shouldn't need to pin size registers if we have a fast memory.
https://bugs.webkit.org/show_bug.cgi?id=170504

Reviewed by Mark Lam.

JSTests:

  • wasm/function-tests/trap-after-cross-instance-call.js: Added.

(b.new.WebAssembly.Memory):
(importObject.foo.bar):
(wasmFrameCountFromError):

Source/JavaScriptCore:

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmMemoryInformation.h:

(JSC::Wasm::PinnedRegisterInfo::toSave):

10:15 AM Changeset in webkit [214949] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Webrtc] Mock realtime sources factories should be static after r213941
https://bugs.webkit.org/show_bug.cgi?id=170282

Patch by Alejandro G. Castro <alex@igalia.com> on 2017-04-05
Reviewed by Alex Christensen.

If we don't make the variables static we would be returning a
local variable.

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::factory):

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::factory):

10:02 AM Changeset in webkit [214948] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][iOS] Add entitlements to enable audio/video capture in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=170507
<rdar://problem/31121248>

Reviewed by Youenn Fablet.

Add two entitlements that are required to access audio/video capture on iOS.

  • Configurations/WebContent-iOS.entitlements:
9:50 AM Changeset in webkit [214947] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

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

9:06 AM Changeset in webkit [214946] by achristensen@apple.com
  • 8 edits
    1 move in trunk

Fix CMake build.

Source/WebCore:

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

Some JavaScript inline functions were not being accessed from this file with different enable flags.

  • platform/spi/cf/CFNetworkSPI.h:
  • platform/spi/cocoa/NSURLConnectionSPI.h:

Moved NSURLSession-specific SPI from NSURLConnectionSPI.h to CFNetworkSPI.h.

Tools:

  • TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
  • TestRunnerShared/spi/CoreGraphicsSPI.h: Removed.
  • TestRunnerShared/spi/CoreGraphicsTestSPI.h: Copied from Tools/TestRunnerShared/spi/CoreGraphicsSPI.h.

There is a CoreGraphicsSPI.h in WebCore and the CMake build was finding the wrong one.
Since we just inherit the include paths from WebCore in the CMake build and since this SPI is only used for testing,
I just renamed CoreGraphicsSPI.h to CoreGraphicsTestSPI.h to avoid any name collisions.

  • WebKitTestRunner/PlatformMac.cmake:

Add some missing files.

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
7:28 AM Changeset in webkit [214945] by keith_miller@apple.com
  • 2 edits in trunk/Tools

Add debug option to run-jsc script
https://bugs.webkit.org/show_bug.cgi?id=170503

Reviewed by Yusuke Suzuki.

Adds a new option to the run-jsc script so that when passed
"--debug" it will wrap the jsc call with an lldb invocation. If
someone wishes to use a different debugger they can set the
DEBUGGER environment variable. Additionally, run-jsc now exits
with the exit status of the jsc call.

  • Scripts/run-jsc:
6:36 AM Changeset in webkit [214944] by Chris Dumez
  • 17 edits
    2 copies
    21 adds in trunk

_blank / _self / _parent / _top browsing context names should be case-insensitive
https://bugs.webkit.org/show_bug.cgi?id=169747

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Import test coverage from upstream web-platform-tests.

  • resources/import-expectations.json:
  • web-platform-tests/html/browsers/windows/browsing-context-names/001.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/002.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/existing.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log.
  • web-platform-tests/html/browsers/windows/browsing-context-names/self1.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/self2.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log:

Source/WebCore:

_blank / _self / _parent / _top browsing context names should be case-insensitive
as per the HTML specification:

This aligns our behavior with Firefox as well. See discussion at:

Tests: imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html

imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::createWindow):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::open):

  • page/FrameTree.cpp:

(WebCore::FrameTree::uniqueChildName):
(WebCore::FrameTree::find):

6:19 AM Changeset in webkit [214943] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WinCairo] Invalid address specified to RtlValidateHeap at std::ctype<char>::_Tidy() when finishing MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=157067

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-05
Reviewed by Per Arne Vollan.

WebKit is compiled with /MT switch to use static CRT on Windows.
But, WinCairo port does not link the static CRT by specifying
/NODEFAULTLIB:LIBCMT and /NODEFAULTLIB:LIBCMTD switches.
Eventually, a dynamically linked CRT is linked. This causes
potential heap corruption.

  • PlatformWin.cmake: Do not set /NODEFAULTLIB:LIBCMT and

/NODEFAULTLIB:LIBCMTD, but /NODEFAULTLIB:MSVCRT and
/NODEFAULTLIB:MSVCRTD as well as AppleWin port does

6:07 AM Changeset in webkit [214942] by Yusuke Suzuki
  • 9 edits in trunk/Source

[JSC] Suppress warnings in GCC
https://bugs.webkit.org/show_bug.cgi?id=170501

Reviewed by Keith Miller.

Source/JavaScriptCore:

Should use ASSERT_NOT_REACHED since return-type pragma is only
enabled under ASSERT_DISABLED environment. We shoud use
ASSERT_NOTREACHED to emit assertions in debug build. It effectively
catches bugs while keeping performance in release build.

  • b3/B3Opcode.cpp:

(JSC::B3::storeOpcode):

  • b3/B3Width.h:

(JSC::B3::mask):

  • runtime/Options.cpp:

(JSC::parse):

  • wasm/WasmSections.h:

(JSC::Wasm::makeString):

  • wasm/WasmSignature.cpp:

(JSC::Wasm::SignatureInformation::tryCleanup):

  • wasm/generateWasmValidateInlinesHeader.py:

Source/WTF:

Add a new macro UNUSED_FUNCTION to annotate unused static functions.
#pragma GCC diagnostic ignored "-Wunused-function" does not work.

  • wtf/Compiler.h:
3:41 AM Changeset in webkit [214941] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r206633 - DumpRenderTree crashed in com.apple.WebCore: WTF::Optional<WebCore::FetchBodyOwner::BlobLoader>::operator bool const + 12
https://bugs.webkit.org/show_bug.cgi?id=162483

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

Source/WebCore:

Test: fetch/closing-while-fetching-blob.html
No change of behavior.

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::stop): Asserting m_blobLoader is null (meaning that unsetPendingActivity was done)
only in case FetchBodyOwner has no risk being destroyed.

LayoutTests:

  • fetch/closing-while-fetching-blob-expected.txt: Added.
  • fetch/closing-while-fetching-blob.html: Added.
3:40 AM Changeset in webkit [214940] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14

Merge r212882 - [GTK] Compilation fails if using ninja together with icecream and cmake > 3.5
https://bugs.webkit.org/show_bug.cgi?id=168770

Reviewed by Carlos Garcia Campos.

If using cmake >= 3.6 together with ninja generator and icecream, the
build will fail as icecream does not correctly handle the response
files and it's not passing compiler flags from there to the compiler
itself (in our case it's not passing -fPIC which leads to the
failure while linking). Don't enable the ninja's response files
support if we fulfill the preconditions.

  • Source/cmake/OptionsCommon.cmake:
3:09 AM Changeset in webkit [214939] by magomez@igalia.com
  • 3 edits in trunk/Source/WebCore

[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:
2:13 AM Changeset in webkit [214938] by jfernandez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed tests gardening
https://bugs.webkit.org/show_bug.cgi?id=170497

Unreviewed test gardening. Rebaseline tests after r214712.

  • platform/gtk/fast/multicol/table-vertical-align-expected.txt:
1:24 AM Changeset in webkit [214937] by aestes@apple.com
  • 4 edits in trunk

REGRESSION (r202472): Data Detection overwrites existing links in detected ranges
https://bugs.webkit.org/show_bug.cgi?id=170365
<rdar://problem/29205721>

Reviewed by Tim Horton.

Source/WebCore:

r202472 changed the node traversal in searchForLinkRemovingExistingDDLinks() to only
consider nodes that are descendants of startNode, but we need to traverse all nodes between
startNode and endNode to find existing non-DD links.

As a result, we'd add a Data Detector link to the following snippet and make the original
links un-clickable:

<a href='#'>tomorrow</a> <a href='#'>night</a>

Fix this by not specifying a stayWithin node when calling NodeTraversal::next(). The loop
will terminate when we reach endNode.

Updated WebKit2.DataDetectionReferenceDate API test.

  • editing/cocoa/DataDetection.mm:

(WebCore::searchForLinkRemovingExistingDDLinks):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/DataDetection.mm:

(expectLinkCount): Changed to only query links with the x-apple-data-detectors attribute.
(TEST): Re-enabled the test, which now passes.

12:58 AM Changeset in webkit [214936] by Carlos Garcia Campos
  • 4 edits in trunk/Source/JavaScriptCore

Implement PromiseDeferredTimer for non CF based ports
https://bugs.webkit.org/show_bug.cgi?id=170391

Reviewed by Yusuke Suzuki.

RunLoop handling is only implemented for CF causing several wasm tests to fail for other ports.

  • jsc.cpp:

(runJSC): Remove CF ifdefs.

  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::doWork): Add non CF implementation using WTF RunLoop.
(JSC::PromiseDeferredTimer::runRunLoop): Ditto.

  • runtime/PromiseDeferredTimer.h:
12:53 AM Changeset in webkit [214935] by Carlos Garcia Campos
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: several tests added in r214504 crash when building with GCC
https://bugs.webkit.org/show_bug.cgi?id=170390

Reviewed by Saam Barati.

The pattern foo->bar([f = WTFMove(foo)]{}); crashes when building with GCC, I assume the move happens before the
foo is used to invoke the function.

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyCompileFunc): Use p.vm() instead of plan->vm(), because plan is moved by the lambda.
(JSC::instantiate): Ditto.
(JSC::compileAndInstantiate): Ditto.

12:41 AM Changeset in webkit [214934] by Carlos Garcia Campos
  • 16 edits
    4 copies
    2 moves
    4 deletes in trunk/Source

Move WebErrors from WebProcess to Shared and get rid of ErrorsGtk in WebCore
https://bugs.webkit.org/show_bug.cgi?id=156974

Reviewed by Sam Weinig.

Source/WebCore:

Remove ErrorsGtk.

  • PlatformGTK.cmake:
  • platform/gtk/ErrorsGtk.cpp: Removed.
  • platform/gtk/ErrorsGtk.h: Removed.

Source/WebCore/platform/gtk/po:

  • POTFILES.in: Add new paths with translatable strings.

Source/WebKit2:

WebErrors are not only used by the frame loader client in the web process, but also by the network process. So,
move them to Shared make most of the implementation cross-platform.

  • CMakeLists.txt: Add new files to compilation.
  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::download): Use WebErrors directly instead of platform methods that are no longer needed.
(WebKit::NetworkDataTaskSoup::writeDownloadCallback): Ditto.
(WebKit::NetworkDataTaskSoup::didFinishDownload): Ditto.
(WebKit::NetworkDataTaskSoup::didFail): Ditto.

  • PlatformGTK.cmake: Add new files to compilation and remove DownloadSoupErrorsGtk.cpp
  • PlatformMac.cmake:
  • Shared/API/APIError.cpp: Add error domains used by glib based ports.

(API::Error::webKitNetworkErrorDomain):
(API::Error::webKitPolicyErrorDomain):
(API::Error::webKitPluginErrorDomain):
(API::Error::webKitDownloadErrorDomain):
(API::Error::webKitPrintErrorDomain):

  • Shared/API/APIError.h:
  • Shared/Cocoa/WebErrorsCocoa.mm: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h.

(WebKit::createNSError):
(WebKit::cancelledError):
(WebKit::fileDoesNotExistError):

  • Shared/WebErrors.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp.

(WebKit::blockedError):
(WebKit::blockedByContentBlockerError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::blockedByContentFilterError):
(WebKit::cannotShowMIMETypeError):
(WebKit::pluginWillHandleLoadError):
(WebKit::internalError):

  • Shared/WebErrors.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h.
  • Shared/glib/WebErrorsGlib.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp.

(WebKit::cancelledError):
(WebKit::fileDoesNotExistError):

  • Shared/gtk/WebErrorsGtk.cpp: Copied from Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp.

(WebKit::printError):
(WebKit::printerNotFoundError):
(WebKit::invalidPageRangeToPrint):

  • Shared/soup/WebErrorsSoup.cpp: Renamed from Source/WebKit2/NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp.

(WebKit::downloadNetworkError):
(WebKit::downloadCancelledByUserError):
(WebKit::downloadDestinationError):

  • UIProcess/API/gtk/WebKitDownload.cpp:
  • UIProcess/API/gtk/WebKitError.cpp:

(webkit_network_error_quark):
(webkit_policy_error_quark):
(webkit_plugin_error_quark):
(webkit_download_error_quark):
(webkit_print_error_quark):

  • UIProcess/API/gtk/WebKitPrivate.cpp:

(toWebKitError):
(toWebCoreError):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: Removed.
  • WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
12:39 AM Changeset in webkit [214933] by aestes@apple.com
  • 2 edits in trunk/Tools

[ios-simulator] API test WebKit2.WKWebProcessPlugInRangeHandle timing out
https://bugs.webkit.org/show_bug.cgi?id=167594

Re-enabled this API test now that webkit.org/b/161967 is fixed.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm:

(TEST):

12:36 AM Changeset in webkit [214932] by aestes@apple.com
  • 4 edits in trunk

[ios-simulator] API test WebKit2.DataDetectionReferenceDate timing out
https://bugs.webkit.org/show_bug.cgi?id=161967

Reviewed by Alexey Proskuryakov.

Source/WebCore:

DataDetectorsCoreSPI.h defined DDQueryOffset as a struct of two CFIndexes, which is 16 bytes
on LP64, but the struct is actually defined as two CFIndex-typed 32-bit bitfields, which is
8 bytes on LP64. This breaks the ABI on Public SDK builds when calling functions that take
or return DDQueryOffsets.

  • platform/spi/cocoa/DataDetectorsCoreSPI.h: Updated the DDQueryOffset definition for

Public SDK builds, and added a static_assert to detect future size changes at compile time.

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/DataDetection.mm:

(TEST): Re-enabled WebKit2.DataDetectionReferenceDate.

12:09 AM Changeset in webkit [214931] by Yusuke Suzuki
  • 13 edits
    1 add in trunk

[JSC] Generate TemplateObjects at linking time
https://bugs.webkit.org/show_bug.cgi?id=169743

Reviewed by Keith Miller.

JSTests:

  • stress/template-string-tags-eval.js: Added.

(shouldBe):
(tag):

Source/JavaScriptCore:

Currently, the code calls getTemplateObject to get appropriate template objects at runtime.
But this template object is constant value and never changed. So instead of creating it
at runtime, we should create it at linking time and store it in the constant registers.

  • builtins/BuiltinNames.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setConstantRegisters):

  • bytecode/CodeBlock.h:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::shrinkToFit):

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

(JSC::BytecodeGenerator::addTemplateRegistryKeyConstant):
(JSC::BytecodeGenerator::emitGetTemplateObject):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::TaggedTemplateNode::emitBytecode):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::getTemplateObject): Deleted.

  • runtime/JSTemplateRegistryKey.cpp:
  • runtime/JSTemplateRegistryKey.h:

(JSC::isTemplateRegistryKey):

Apr 4, 2017:

10:38 PM Changeset in webkit [214930] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

Move AVSampleBufferDisplayLayer declarations into AVFoundationSPI.h
https://bugs.webkit.org/show_bug.cgi?id=170471

Reviewed by Eric Carlson.

Move the declaration of AVSampleBufferDisplayLayer (and related classes) into AVFoundationSPI.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
  • platform/spi/mac/AVFoundationSPI.h:
10:14 PM Changeset in webkit [214929] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/fetch/api/response/response-trailer.html as flaky
for https://bugs.webkit.org/show_bug.cgi?id=170493

  • platform/mac/TestExpectations:
9:48 PM Changeset in webkit [214928] by commit-queue@webkit.org
  • 6 edits
    3 adds in trunk

Canvas is tainted when painting a video with MediaStreamTrack
https://bugs.webkit.org/show_bug.cgi?id=170486

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

Source/WebCore:

Test: http/tests/media/media-stream/getusermedia-with-canvas.html

Adding the notion of isolated source so that we can later on implement WebRTC isolated tracks.
For now, canvas will not be tainted if painted from a MediaStreamTrack.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didPassCORSAccessCheck):

  • platform/mediastream/MediaStreamTrackPrivate.h:

(WebCore::MediaStreamTrackPrivate::isIsolated):

  • platform/mediastream/RealtimeMediaSource.h:

LayoutTests:

  • http/tests/media/media-stream/getusermedia-with-canvas-expected.txt: Added.
  • http/tests/media/media-stream/getusermedia-with-canvas.html: Added.
  • http/tests/media/media-stream/resources/getUserMedia-helper.js: Added.

(reject):
(getUserMedia):
(defaultRejectOrCatch):
(setupVideoElementWithStream):

8:50 PM Changeset in webkit [214927] by mark.lam@apple.com
  • 4 edits
    1 add in trunk

On ARM64, DFG::SpeculativeJIT::compileArithMod() failed to ensure result is of DataFormatInt32.
https://bugs.webkit.org/show_bug.cgi?id=170473
<rdar://problem/29912391>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-170473.js: Added.

Source/JavaScriptCore:

In Unchecked mode, when DFG::SpeculativeJIT::compileArithMod() detects that the
divisor is 0, we want it to return 0. The result is expected to be of
DataFormatIn32.

The ARM implementation just returns the value in the divisor register. However,
the divisor in this case can be of DataFormatJSInt32. On ARM64, returning the
divisor register yields the wrong result format because the same register also
holds the upper 32-bit of the JSValue encoding. The fix is to return an
immediate 0 instead.

Also turned on the assertion in jitAssertIsInt32 for ARM64. This assertion being
disabled may have contributed to this bug going unnoticed all this time.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithMod):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::jitAssertIsInt32):

8:43 PM Changeset in webkit [214926] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Air::eliminateDeadCode should not repeatedly process the same live instructions
https://bugs.webkit.org/show_bug.cgi?id=170490

Reviewed by Keith Miller.

This makes the eliminateDeadCode() fixpoint somewhat worklist-based: we track the set
of Insts that might be dead. Every time we detect that one is live, we remove it from
the set. This is a big (>2x) speed-up because lots of Insts are immediately found to
be live.

This is a ~1% wasm -O1 compile time progression.

  • b3/air/AirEliminateDeadCode.cpp:

(JSC::B3::Air::eliminateDeadCode):

8:26 PM Changeset in webkit [214925] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r214894, r214895, r214907, r214912,
and r214918.
https://bugs.webkit.org/show_bug.cgi?id=170491

Caused build failures on Mac (Requested by rniwa on #webkit).

Reverted changesets:

"Build fix."
http://trac.webkit.org/changeset/214894

"Rolling back the build fix, as it broke other builds."
http://trac.webkit.org/changeset/214895

"Move AVSampleBufferDisplayLayer declarations into
AVFoundationSPI.h"
https://bugs.webkit.org/show_bug.cgi?id=170471
http://trac.webkit.org/changeset/214907

"Unreviewed build fix: fix compilation error on Sierra."
http://trac.webkit.org/changeset/214912

"More build fixing."
http://trac.webkit.org/changeset/214918

7:50 PM Changeset in webkit [214924] by commit-queue@webkit.org
  • 8 edits in trunk

[Mac] Add back web audio support for getUserMedia MediaStreamTrack
https://bugs.webkit.org/show_bug.cgi?id=170482

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

Source/WebCore:

´Covered by reenabled test.

Exporting method and class used in WebKit2.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/mac/CAAudioStreamDescription.h:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:

Source/WebKit2:

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::setStorage):

LayoutTests:

6:18 PM Changeset in webkit [214923] by fpizlo@apple.com
  • 5 edits
    1 add in trunk/Source

Air::eliminateDeadCode() should not use a HashSet
https://bugs.webkit.org/show_bug.cgi?id=170487

Reviewed by Saam Barati.

Source/JavaScriptCore:

Introduce TmpSet, which is like a HashSet<Tmp>. Use this to make eliminateDeadCode()
about 50% faster, resulting in a 1% wasm -O1 compile time progression.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/air/AirEliminateDeadCode.cpp:

(JSC::B3::Air::eliminateDeadCode):

  • b3/air/AirTmpSet.h: Added.

(JSC::B3::Air::TmpSet::TmpSet):
(JSC::B3::Air::TmpSet::add):
(JSC::B3::Air::TmpSet::remove):
(JSC::B3::Air::TmpSet::contains):
(JSC::B3::Air::TmpSet::size):
(JSC::B3::Air::TmpSet::isEmpty):
(JSC::B3::Air::TmpSet::iterator::iterator):
(JSC::B3::Air::TmpSet::iterator::operator*):
(JSC::B3::Air::TmpSet::iterator::operator++):
(JSC::B3::Air::TmpSet::iterator::operator==):
(JSC::B3::Air::TmpSet::iterator::operator!=):
(JSC::B3::Air::TmpSet::begin):
(JSC::B3::Air::TmpSet::end):

Source/WTF:

BitVector::iterator knows when it's at the end. Expose this functionality.

  • wtf/BitVector.h:

(WTF::BitVector::iterator::isAtEnd):

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

Mark fast/images/slower-animation-than-decoding-image.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168390

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:59 PM Changeset in webkit [214921] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/images/reset-image-animation.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170177

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:56 PM Changeset in webkit [214920] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/airplay-button/airplay-button.html as flaky on mac-wk1 Release.
https://bugs.webkit.org/show_bug.cgi?id=168409

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:55 PM Changeset in webkit [214919] by keith_miller@apple.com
  • 31 edits
    1 copy
    1 add in trunk/Source

WebAssembly: ModuleInformation should be a ref counted thing that can be shared across threads.
https://bugs.webkit.org/show_bug.cgi?id=170478

Reviewed by Saam Barati.

Source/JavaScriptCore:

ModuleInformation has been moved to its own file and is now
ThreadSafeRefCounted. All the Strings we used to keep in the
ModuleInformation have been switched to Vector<LChar> this has the
advantage that it can be passed across threads. However, this does
mean that we need to decode the utf8 strings in each thread. This
is likely not a problem because:

1) most modules have few imports/exports/custom sections.
2) most of the time they are ascii so the conversion is cheap.
3) we only have to do it once per thread, and there shouldn't be too many.

This patch also removes
moduleSignatureIndicesToUniquedSignatureIndices since that
information can already be recovered from the
SignatureInformation.

(functionTestWasmModuleFunctions):

  • runtime/Identifier.h:

(JSC::Identifier::fromString):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmFormat.cpp:

(JSC::Wasm::makeString):
(JSC::Wasm::ModuleInformation::~ModuleInformation): Deleted.

  • wasm/WasmFormat.h:

(JSC::Wasm::makeString):
(JSC::Wasm::ModuleInformation::functionIndexSpaceSize): Deleted.
(JSC::Wasm::ModuleInformation::isImportedFunctionFromFunctionIndexSpace): Deleted.
(JSC::Wasm::ModuleInformation::signatureIndexFromFunctionIndexSpace): Deleted.
(JSC::Wasm::ModuleInformation::importFunctionCount): Deleted.
(JSC::Wasm::ModuleInformation::internalFunctionCount): Deleted.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::FunctionParser):

  • wasm/WasmModuleInformation.cpp: Copied from Source/JavaScriptCore/wasm/WasmValidate.h.

(JSC::Wasm::ModuleInformation::~ModuleInformation):

  • wasm/WasmModuleInformation.h: Added.

(JSC::Wasm::ModuleInformation::functionIndexSpaceSize):
(JSC::Wasm::ModuleInformation::isImportedFunctionFromFunctionIndexSpace):
(JSC::Wasm::ModuleInformation::signatureIndexFromFunctionIndexSpace):
(JSC::Wasm::ModuleInformation::importFunctionCount):
(JSC::Wasm::ModuleInformation::internalFunctionCount):
(JSC::Wasm::ModuleInformation::ModuleInformation):

  • wasm/WasmModuleParser.cpp:
  • wasm/WasmModuleParser.h:

(JSC::Wasm::ModuleParser::ModuleParser):

  • wasm/WasmParser.h:

(JSC::Wasm::Parser<SuccessType>::consumeUTF8String):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::parseAndValidateModule):
(JSC::Wasm::Plan::prepare):
(JSC::Wasm::Plan::compileFunctions):
(JSC::Wasm::Plan::complete):
(JSC::Wasm::Plan::cancel):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::internalFunctionCount):
(JSC::Wasm::Plan::takeModuleInformation):

  • wasm/WasmSignature.cpp:

(JSC::Wasm::SignatureInformation::get):

  • wasm/WasmSignature.h:
  • wasm/WasmValidate.cpp:

(JSC::Wasm::validateFunction):

  • wasm/WasmValidate.h:
  • wasm/js/JSWebAssemblyHelpers.h:

(JSC::createSourceBufferFromValue):

  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::createStub):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::finishCreation):

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::moduleInformation):
(JSC::JSWebAssemblyModule::source):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::WebAssemblyModuleConstructor::createModule):

  • wasm/js/WebAssemblyModulePrototype.cpp:

(JSC::webAssemblyModuleProtoCustomSections):
(JSC::webAssemblyModuleProtoImports):
(JSC::webAssemblyModuleProtoExports):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

  • wasm/js/WebAssemblyModuleRecord.h:
  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyCompileFunc):
(JSC::instantiate):
(JSC::compileAndInstantiate):

Source/WTF:

This adds a new String::fromUTF8 that converts a vector of characters to
a string.

Also, it cleans up some style.

  • wtf/text/WTFString.h:

(WTF::String::fromUTF8):

  • wtf/unicode/UTF8.cpp:

(WTF::Unicode::convertLatin1ToUTF8):

5:48 PM Changeset in webkit [214918] by ap@apple.com
  • 2 edits in trunk/Source/WebCore

More build fixing.

  • platform/spi/mac/AVFoundationSPI.h:
5:25 PM Changeset in webkit [214917] by fpizlo@apple.com
  • 10 edits in trunk/Source

B3::fixSSA() needs a tune-up
https://bugs.webkit.org/show_bug.cgi?id=170485

Reviewed by Saam Barati.

Source/JavaScriptCore:

After the various optimizations to liveness, register allocation, and other phases, the
fixSSA() phase now looks like one of the top offenders. This includes a bunch of
changes to make this phase run faster. This is a ~7% wasm -O1 compile time progression.

Here's what I did:

  • We now use IndexSparseSet instead of IndexMap for tracking variable values. This makes it cheaper to chew through small blocks while there is a non-trivial number of total variables.


  • We now do a "local SSA conversion" pass before anything else. This eliminates obvious Get's. If we were using temporary Variables, it would eliminate many of those. That's useful for when we use demoteValues() and duplciateTails(). For wasm -O1, we mainly care about the fact that it makes a bunch of Set's dead.


  • We now do a Set DCE pass after the local SSA but before SSA conversion. This ensures that any block-local live intervals of Variables disappear and don't need further consideration.


  • We now cache the reaching defs calculation.


  • We now perform the reaching defs calculation lazily.
  • b3/B3FixSSA.cpp:

(JSC::B3::demoteValues):
(JSC::B3::fixSSA):

  • b3/B3SSACalculator.cpp:

(JSC::B3::SSACalculator::reachingDefAtTail):

  • b3/B3VariableLiveness.cpp:

(JSC::B3::VariableLiveness::VariableLiveness):

  • b3/air/AirLiveness.h:

(JSC::B3::Air::Liveness::Liveness):

  • dfg/DFGLivenessAnalysisPhase.cpp:

(JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): Deleted.
(JSC::DFG::LivenessAnalysisPhase::run): Deleted.
(JSC::DFG::LivenessAnalysisPhase::processBlock): Deleted.

Source/WTF:

This makes IndexSparseSet capable of being used as a map if you instantiate it with
KeyValuePair<unsigned, ValueType>.

  • wtf/HashTraits.h:
  • wtf/IndexSparseSet.h:

(WTF::DefaultIndexSparseSetTraits::create):
(WTF::DefaultIndexSparseSetTraits::key):
(WTF::OverflowHandler>::IndexSparseSet):
(WTF::OverflowHandler>::add):
(WTF::OverflowHandler>::set):
(WTF::OverflowHandler>::remove):
(WTF::OverflowHandler>::clear):
(WTF::OverflowHandler>::size):
(WTF::OverflowHandler>::isEmpty):
(WTF::OverflowHandler>::contains):
(WTF::OverflowHandler>::sort):
(WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet): Deleted.
(WTF::IndexSparseSet<OverflowHandler>::add): Deleted.
(WTF::IndexSparseSet<OverflowHandler>::remove): Deleted.
(WTF::IndexSparseSet<OverflowHandler>::clear): Deleted.
(WTF::IndexSparseSet<OverflowHandler>::size): Deleted.
(WTF::IndexSparseSet<OverflowHandler>::isEmpty): Deleted.
(WTF::IndexSparseSet<OverflowHandler>::contains): Deleted.
(WTF::IndexSparseSet<OverflowHandler>::sort): Deleted.

  • wtf/Liveness.h:

(WTF::Liveness::LocalCalc::Iterable::iterator::iterator):
(WTF::Liveness::workset):

5:23 PM Changeset in webkit [214916] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Do some minor FEColorMatrix code cleanup and optimization
https://bugs.webkit.org/show_bug.cgi?id=170474

Reviewed by Dean Jackson.

Don't switch inside of a pixel processing loop; repeat the loop inside switch (filterType).

Change matrix() and saturateAndHueRotate() to dereference the source pixels once, instead
of multiple times, which is faster.

This kind of code benefits from aligning things with spaces for readability, so do so,
violating webkit style.

Add some off-by-default performance logging code.

Increases pixel processing performance from about 86ms per megapixel to 65ms per megapixel.

  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::matrix):
(WebCore::saturateAndHueRotate):
(WebCore::effectType):
(WebCore::FEColorMatrix::platformApplySoftware):

5:05 PM Changeset in webkit [214915] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Do not assert when CharacterData representing an Attr fires events
https://bugs.webkit.org/show_bug.cgi?id=170454
<rdar://problem/30979320>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Make the NoEventDispatchAssertion in CharacterData::notifyParentAfterChange conditional
since Attr elements should be allowed to fire events.

Tests: fast/dom/no-assert-for-malformed-js-url-attribute.html

  • dom/CharacterData.cpp:

(WebCore::CharacterData::notifyParentAfterChange):

LayoutTests:

  • fast/dom/no-assert-for-malformed-js-url-attribute-expected.txt: Added.
  • fast/dom/no-assert-for-malformed-js-url-attribute.html: Added.
4:38 PM Changeset in webkit [214914] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Remove stale LLVM Header Path includes from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=170483

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-04
Reviewed by Mark Lam.

  • Configurations/Base.xcconfig:
4:37 PM Changeset in webkit [214913] by commit-queue@webkit.org
  • 7 edits in trunk

LayoutTest webrtc/libwebrtc/descriptionGetters.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=169481

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

Source/WebCore:

No need to enumerate all network interfaces in most layout tests.
Adding an Internals API for that in case we want to use TCP localhost candidates.

  • testing/Internals.cpp:

(WebCore::Internals::Internals):
(WebCore::Internals::setEnumeratingAllNetworkInterfacesEnabled):

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

LayoutTests:

  • platform/mac-wk2/TestExpectations: Removing flaky expectation.
  • webrtc/datachannel/basic.html:
4:32 PM Changeset in webkit [214912] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix: fix compilation error on Sierra.

  • platform/spi/mac/AVFoundationSPI.h:
4:32 PM Changeset in webkit [214911] by Simon Fraser
  • 2 edits in trunk/Tools

Various settings in Minibrowser are off by default, and should be on
https://bugs.webkit.org/show_bug.cgi?id=170465
rdar://problem/31421543

Reviewed by Tim Horton.

Explicitly set preferences that should be on by default to enabled, if they have not been
set previously.

  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController init]):

3:57 PM Changeset in webkit [214910] by Megan Gardner
  • 2 edits in trunk/Source/WebKit/mac

Fix leaks in WebUITextIndicatorData
https://bugs.webkit.org/show_bug.cgi?id=170480

Reviewed by Wenson Hsieh.

Removes extraneous retains.

  • WebView/WebView.mm:

(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):

3:48 PM Changeset in webkit [214909] by jfbastien@apple.com
  • 2 edits in trunk/Tools

reviewer

3:37 PM Changeset in webkit [214908] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

B3::LowerToAir incorrectly selects BitXor(AtomicStrongCAS(...), $1)
https://bugs.webkit.org/show_bug.cgi?id=169867

Reviewed by Saam Barati.

The BitXor(AtomicWeakCAS(...), $1) optimization makes a lot of sense because we an fold the
BitXor into the CAS condition read-out. But there is no version of this that is profitable or
correct for AtomicStrongCAS. The inversion case is handled by Equal(AtomicStrongCAS(...), ...)
becoming NotEqual(AtomicStrongCAS(...), ...), and we alraedy handle that separately.

So, the fix here is to make the BitXor CAS pattern only recognize AtomicWeakCAS.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower):

  • b3/testb3.cpp:

(JSC::B3::testAtomicStrongCAS):

3:30 PM Changeset in webkit [214907] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

Move AVSampleBufferDisplayLayer declarations into AVFoundationSPI.h
https://bugs.webkit.org/show_bug.cgi?id=170471

Reviewed by Eric Carlson.

Move the declaration of AVSampleBufferDisplayLayer (and related classes) into AVFoundationSPI.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): Deleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer): Deleted.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
  • platform/spi/mac/AVFoundationSPI.h:
3:23 PM Changeset in webkit [214906] by BJ Burg
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: layout issues in Type Profiler popovers
https://bugs.webkit.org/show_bug.cgi?id=170467

Reviewed by Timothy Hatcher.

Flip some margins and padding. Remove the -1px leading margin for
the prototype disclosure button, as it is unnecessary and looks
(more) wrong when in RTL.

  • UserInterface/Views/TypeTreeElement.css:

(.item.type-tree-element > .disclosure-button):
(.item.type-tree-element.prototype):
(body[dir=ltr] .item.type-tree-element.prototype):
(body[dir=rtl] .item.type-tree-element.prototype):

  • UserInterface/Views/TypeTreeView.css:

(.tree-outline.type):
(body[dir=ltr] .tree-outline.type):
(body[dir=rtl] .tree-outline.type):
(.tree-outline.type li .empty-message):
(body[dir=ltr] .tree-outline.type li .empty-message):
(body[dir=rtl] .tree-outline.type li .empty-message):

3:23 PM Changeset in webkit [214905] by sbarati@apple.com
  • 49 edits
    2 moves
    1 add in trunk/Source

WebAssembly: JSWebAssemblyCallee should not be a JSCell
https://bugs.webkit.org/show_bug.cgi?id=170135

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch is perhaps the last big change to the design of fundamental
Wasm API to allow for PIC. It changes JSWebAssemblyCallee into a thing
called Wasm::Callee. It serves the same purpose as before, except
Wasm::Callee is not a JSCell. I had to refactor the various parts of the
runtime that will see CallFrame's with Wasm::Callee's in the callee slot.
Thankfully, the parts of the runtime that Wasm touches are limited. The
main refactoring is changing the exception handling code, such as taking
a stack trace, to be friendly to seeing a non JSCell callee.

The callee() function on ExecState now returns a class I added in this
patch called CalleeBits. CalleeBits will tell you if the callee is a
JSCell or a Wasm::Callee. We tag Wasm::Callee's with a 1 in their lower
bit so we can easily tell what is and isn't a Wasm::Callee.

The stub that calls out from Wasm to JS still puts a JSCell callee
into the call frame, even though the callee logically represents a
Wasm frame. The reason for this is that we use the call IC infrastructure
to make a call out to JS code, and the code that writes the IC expects
a JSCell as the callee. This is knowingly part of our design. When we
do structured cloning of Wasm Modules, we'll need to regenerate these
JS call stubs.

  • API/JSContextRef.cpp:

(BacktraceFunctor::operator()):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • debugger/Debugger.cpp:

(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::currentDebuggerCallFrame):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::create):
(JSC::DebuggerCallFrame::DebuggerCallFrame):
(JSC::DebuggerCallFrame::currentPosition):
(JSC::DebuggerCallFrame::positionForCallFrame):

  • debugger/DebuggerCallFrame.h:
  • interpreter/CallFrame.cpp:

(JSC::CallFrame::vmEntryGlobalObject):
(JSC::CallFrame::wasmAwareLexicalGlobalObject):
(JSC::CallFrame::isAnyWasmCallee):
(JSC::CallFrame::callerSourceOrigin):

  • interpreter/CallFrame.h:

(JSC::ExecState::calleeAsValue):
(JSC::ExecState::jsCallee):
(JSC::ExecState::callee):
(JSC::ExecState::unsafeCallee):
(JSC::ExecState::scope):
(JSC::ExecState::iterate):

  • interpreter/CalleeBits.h: Added.

(JSC::CalleeBits::CalleeBits):
(JSC::CalleeBits::operator=):
(JSC::CalleeBits::boxWasm):
(JSC::CalleeBits::isWasm):
(JSC::CalleeBits::isCell):
(JSC::CalleeBits::asCell):
(JSC::CalleeBits::asWasmCallee):
(JSC::CalleeBits::rawPtr):

  • interpreter/Interpreter.cpp:

(JSC::GetStackTraceFunctor::operator()):
(JSC::Interpreter::getStackTrace):
(JSC::notifyDebuggerOfUnwinding):
(JSC::UnwindFunctor::UnwindFunctor):
(JSC::UnwindFunctor::operator()):
(JSC::UnwindFunctor::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):
(JSC::Interpreter::unwind):
(JSC::Interpreter::notifyDebuggerOfExceptionToBeThrown):

  • interpreter/Interpreter.h:
  • interpreter/Register.h:

(JSC::Register::pointer):

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::update):

  • interpreter/ShadowChickenInlines.h:

(JSC::ShadowChicken::iterate):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::StackVisitor):
(JSC::StackVisitor::readFrame):
(JSC::StackVisitor::readNonInlinedFrame):
(JSC::StackVisitor::readInlinedFrame):
(JSC::StackVisitor::Frame::calleeSaveRegisters):
(JSC::StackVisitor::Frame::functionName):
(JSC::StackVisitor::Frame::dump):

  • interpreter/StackVisitor.h:

(JSC::StackVisitor::Frame::callee):
(JSC::StackVisitor::visit):

  • jit/Repatch.cpp:

(JSC::linkFor):
(JSC::linkPolymorphicCall):

  • jsc.cpp:

(callWasmFunction):
(functionTestWasmModuleFunctions):

  • runtime/ArrayPrototype.cpp:
  • runtime/Error.cpp:

(JSC::addErrorInfoAndGetBytecodeOffset):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::finishCreation):

  • runtime/JSCell.cpp:

(JSC::JSCell::isAnyWasmCallee): Deleted.

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::ExecState::vm):

  • runtime/JSFunction.cpp:

(JSC::RetrieveArgumentsFunctor::operator()):
(JSC::RetrieveCallerFunctionFunctor::operator()):

  • runtime/JSGlobalObject.cpp:
  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::recordJSFrame):
(JSC::SamplingProfiler::processUnverifiedStackTraces):

  • runtime/SamplingProfiler.h:

(JSC::SamplingProfiler::UnprocessedStackFrame::UnprocessedStackFrame):

  • runtime/StackFrame.cpp:

(JSC::StackFrame::sourceURL):
(JSC::StackFrame::functionName):

  • runtime/StackFrame.h:

(JSC::StackFrame::wasm):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::throwException):

  • runtime/VM.h:
  • wasm/JSWebAssembly.h:
  • wasm/WasmB3IRGenerator.cpp:
  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmCallee.cpp: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyCallee.cpp.

(JSC::Wasm::Callee::Callee):
(JSC::JSWebAssemblyCallee::JSWebAssemblyCallee): Deleted.
(JSC::JSWebAssemblyCallee::finishCreation): Deleted.
(JSC::JSWebAssemblyCallee::destroy): Deleted.

  • wasm/WasmCallee.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyCallee.h.

(JSC::Wasm::Callee::create):
(JSC::JSWebAssemblyCallee::create): Deleted.
(JSC::JSWebAssemblyCallee::createStructure): Deleted.
(JSC::JSWebAssemblyCallee::entrypoint): Deleted.
(JSC::JSWebAssemblyCallee::calleeSaveRegisters): Deleted.

  • wasm/WasmContext.h:
  • wasm/WasmPlan.cpp:
  • wasm/WasmPlan.h:
  • wasm/WasmPlanInlines.h:

(JSC::Wasm::Plan::initializeCallees):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):

  • wasm/js/JSWebAssemblyCallee.cpp: Removed.
  • wasm/js/JSWebAssemblyCallee.h: Removed.
  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock):
(JSC::JSWebAssemblyCodeBlock::initialize):
(JSC::JSWebAssemblyCodeBlock::visitChildren):

  • wasm/js/JSWebAssemblyCodeBlock.h:

(JSC::JSWebAssemblyCodeBlock::create):
(JSC::JSWebAssemblyCodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyCodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyCodeBlock::wasmToJsCallStubForImport):
(JSC::JSWebAssemblyCodeBlock::offsetOfImportWasmToJSStub):
(JSC::JSWebAssemblyCodeBlock::setJSEntrypointCallee):
(JSC::JSWebAssemblyCodeBlock::setWasmEntrypointCallee):
(JSC::JSWebAssemblyCodeBlock::offsetOfImportStubs):
(JSC::JSWebAssemblyCodeBlock::allocationSize):
(JSC::JSWebAssemblyCodeBlock::importWasmToJSStub):
(JSC::JSWebAssemblyCodeBlock::callees): Deleted.
(JSC::JSWebAssemblyCodeBlock::offsetOfCallees): Deleted.

  • wasm/js/JSWebAssemblyInstance.h:

(JSC::JSWebAssemblyInstance::webAssemblyToJSCallee):

  • wasm/js/JSWebAssemblyModule.cpp:
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::WebAssemblyFunction):
(JSC::WebAssemblyFunction::visitChildren):
(JSC::WebAssemblyFunction::finishCreation):

  • wasm/js/WebAssemblyFunction.h:

(JSC::WebAssemblyFunction::wasmEntrypoint):
(JSC::WebAssemblyFunction::jsEntrypoint):
(JSC::WebAssemblyFunction::offsetOfWasmEntrypoint):
(JSC::WebAssemblyFunction::offsetOfWasmEntryPointCode): Deleted.

  • wasm/js/WebAssemblyModuleConstructor.cpp:
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

Source/WebCore:

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::callerDOMWindow):

3:19 PM Changeset in webkit [214904] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WasmBench asserts in debug jsc
https://bugs.webkit.org/show_bug.cgi?id=170462

Reviewed by Saam Barati.

The assertion should have been an if.

  • wasm/WasmWorklist.cpp:
3:14 PM Changeset in webkit [214903] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebInspectorUI

Web Inspector: Include more Network information in Resource Details Sidebar
https://bugs.webkit.org/show_bug.cgi?id=170470

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

  • Localizations/en.lproj/localizedStrings.js:

Updated localized strings.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource.displayNameForProtocol):
(WebInspector.Resource.displayNameForPriority):
Aggregate all display name helpers here.

  • UserInterface/Views/DetailsSectionSimpleRow.js:

(WebInspector.DetailsSectionSimpleRow.prototype.get tooltip):
(WebInspector.DetailsSectionSimpleRow.prototype.set tooltip):
Allow setting a tooltip on the value.

  • UserInterface/Views/NetworkGridContentView.css:

(.cache-type):
Cache type shows up in multiple places. Simplify the CSS to apply anywhere.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView):
Updated column names.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
(WebInspector.ResourceDetailsSidebarPanel.prototype._cachedRowValue):
Include more detail information in the sidebar.

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ResourceTimelineDataGridNode.prototype._displayNameForPriority): Deleted.
Use shared code for display names.

3:05 PM Changeset in webkit [214902] by BJ Burg
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: fix alignment of close button shown while docked
https://bugs.webkit.org/show_bug.cgi?id=170472

Reviewed by Matt Baker.

  • UserInterface/Views/Toolbar.css:

(.toolbar .control-section):
(body[dir=ltr] .toolbar .control-section):
(body[dir=rtl] .toolbar .control-section):

2:48 PM Changeset in webkit [214901] by fpizlo@apple.com
  • 16 edits in trunk/Source/JavaScriptCore

Air::lowerAfterRegAlloc should bail early if it finds no Shuffles or ColdCCalls
https://bugs.webkit.org/show_bug.cgi?id=170305

Reviewed by Saam Barati.

This reduces and sometimes completely eliminates the need to run lowerAfterRegAlloc().

This lowers the Shuffle for the arguments of a CCall before register allocation unless
the CCall arguments require a real shuffle (like if the CCall arguments were argument
registers). This lowers a ColdCCall like a CCall for optLevel<2.

Finally, lowerAfterRegAlloc() now checks if there are any Shuffles or CCalls before it
does anything else. For wasm at -O1, this means that the phase doesn't run at all. This
is a ~3% wasm -O1 compile time progression.

To make this easy, I changed optLevel into a property of Procedure and Code rather than
an argument we thread through everything. I like how Procedure and Code are dumping
ground classes. This does not bother me. Note that I cloned optLevel into Procedure and
Code so that it's cheap to query inside Air phases.

  • b3/B3Compile.cpp:

(JSC::B3::compile):

  • b3/B3Compile.h:
  • b3/B3Generate.cpp:

(JSC::B3::prepareForGeneration):
(JSC::B3::generateToAir):

  • b3/B3Generate.h:
  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::setOptLevel):

  • b3/B3Procedure.h:

(JSC::B3::Procedure::optLevel):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::isPinned):
(JSC::B3::Air::Code::setOptLevel):
(JSC::B3::Air::Code::optLevel):

  • b3/air/AirEmitShuffle.cpp:

(JSC::B3::Air::ShufflePair::bank):
(JSC::B3::Air::ShufflePair::opcode):
(JSC::B3::Air::ShufflePair::inst):
(JSC::B3::Air::emitShuffle):

  • b3/air/AirEmitShuffle.h:

(JSC::B3::Air::moveFor):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

  • b3/air/AirGenerate.h:
  • b3/air/AirLowerAfterRegAlloc.cpp:

(JSC::B3::Air::lowerAfterRegAlloc):

  • b3/air/AirLowerMacros.cpp:

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

  • b3/testb3.cpp:

(JSC::B3::compileProc):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::parseAndCompile):

2:32 PM Changeset in webkit [214900] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Change Document's lastHandledUserGestureTimestamp to be a MonotonicTime
https://bugs.webkit.org/show_bug.cgi?id=170468

Reviewed by Zalan Bujtas.

Change the double to MonotonicTime. No behavior change.

  • dom/Document.cpp:

(WebCore::Document::updateLastHandledUserGestureTimestamp):

  • dom/Document.h:

(WebCore::Document::lastHandledUserGestureTimestamp):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::documentHadRecentUserGesture):

  • loader/FrameLoader.cpp:

(WebCore::shouldAskForNavigationConfirmation):

2:30 PM Changeset in webkit [214899] by BJ Burg
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: layout issues in debugger dashboard, arrows are on wrong side
https://bugs.webkit.org/show_bug.cgi?id=170425

Reviewed by Devin Rousso.

We need to move the up/down dashboard arrows to the trailing side for RTL.
Clean up some messy spacing rules so that the source location does not
overlap the arrows or get too close to the function icon.

  • UserInterface/Views/DashboardContainerView.css:

(.toolbar .dashboard):
(body[dir=ltr] .toolbar .dashboard):
(body[dir=rtl] .toolbar .dashboard):
(.dashboard-container .advance-arrow):
(body[dir=ltr] .dashboard-container .advance-arrow):
(body[dir=rtl] .dashboard-container .advance-arrow):
(.toolbar.label-only .dashboard-container .advance-arrow):
(body[dir=ltr] .toolbar.label-only .dashboard-container .advance-arrow):
(body[dir=rtl] .toolbar.label-only .dashboard-container .advance-arrow):

  • UserInterface/Views/DebuggerDashboardView.css:

(.toolbar .dashboard.debugger):
(body[dir=ltr] .toolbar .dashboard.debugger):
(body[dir=rtl] .toolbar .dashboard.debugger):
(.dashboard.debugger .navigation-bar):
(body[dir=ltr] .dashboard.debugger .navigation-bar):
(body[dir=rtl] .dashboard.debugger .navigation-bar):
(.dashboard.debugger > .location):
(.dashboard.debugger > .location > :first-child):
(body[dir=ltr] .dashboard.debugger > .location > :last-child):
(body[dir=rtl] .dashboard.debugger > .location > :last-child):
(.dashboard.debugger > .location .function-icon):
(body[dir=ltr] .dashboard.debugger > .location .function-icon):
(body[dir=rtl] .dashboard.debugger > .location .function-icon):
(.dashboard.debugger > .location .go-to-link):

2:22 PM Changeset in webkit [214898] by dino@apple.com
  • 2 edits in trunk/Websites/webkit.org

Unreviewed. Add details on how to enable the experimental feature.

  • demos/webgpu/index.html:
2:11 PM Changeset in webkit [214897] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[Debug] ASSERT(!throwScope.exception()) on imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html
https://bugs.webkit.org/show_bug.cgi?id=170395
<rdar://problem/31394017>

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-04
Reviewed by Mark Lam.

No change of behavior.

  • bindings/js/JSDOMPromise.cpp:

(WebCore::DeferredPromise::reject): Adding early ASSERT that creating an exception is happening correctly.

2:08 PM Changeset in webkit [214896] by Jonathan Bedard
  • 3 edits in trunk/Tools

Increase timeouts for simulator testing

Unreviewed infrastructure fix.

  • Scripts/webkitpy/port/simulator_process.py:

(SimulatorProcess._start): Increase timeout from 3 to 6 seconds.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDevice.install_app): Increase timeout from 1 to 3 seconds.

1:09 PM Changeset in webkit [214895] by ap@apple.com
  • 2 edits in trunk/Source/WebCore

Rolling back the build fix, as it broke other builds.

  • platform/spi/mac/AVFoundationSPI.h:
1:03 PM Changeset in webkit [214894] by ap@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix.

Rubber-stamped by Jer Noble.

  • platform/spi/mac/AVFoundationSPI.h:
12:59 PM Changeset in webkit [214893] by timothy_horton@apple.com
  • 24 edits in trunk

[Mac] -[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:] invokes the resultCollector with didWrap = NO even when it wraps
https://bugs.webkit.org/show_bug.cgi?id=165801
<rdar://problem/29649535>

Reviewed by Wenson Hsieh.

New API tests: WebKit2.FindInPageWrapping*

Previously, when doing an incremental find that wrapped, we would
say that it did not, leading NSTextFinder to not provide its usual
wrapping UI, and other clients of the NSTextFinderClient protocol to
get confused by the lack of wrapping.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFindString):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/API/APIFindClient.h:

(API::FindClient::didFindString):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageFindClient):

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

(WebKit::FindClient::didFindString):

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::findString):

  • WebProcess/WebPage/FindController.h:

Plumb DidWrap from FindController's call to findString back through
the DidFindString message.

  • UIProcess/mac/WKTextFinderClient.mm:

(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]):
(-[WKTextFinderClient didFindStringMatchesWithRects:]): Deleted.
Make use of the new DidWrap information to stop lying to NSTextFinder
about whether a wrap actually occurred.

  • page/FrameTree.cpp:

(WebCore::FrameTree::traverseNextWithWrap):
(WebCore::FrameTree::traversePreviousWithWrap):
(WebCore::FrameTree::traverseNextInPostOrderWithWrap):

  • page/FrameTree.h:

Add CanWrap and DidWrap boolean enums, and add an optional out argument
to traverse*WithWrap indicating whether a wrap actually occurred.

  • history/CachedPage.cpp:

(WebCore::firePageShowAndPopStateEvents):

  • history/PageCache.cpp:

(WebCore::destroyRenderTree):
Adjust to the new CanWrap enum.

  • page/Page.cpp:

(WebCore::incrementFrame):
(WebCore::Page::findString):
(WebCore::Page::findStringMatchingRanges):
(WebCore::Page::rangeOfString):
(WebCore::Page::findMatchesForText):
(WebCore::Page::unmarkAllTextMatches):

  • page/Page.h:

Adjust to the new CanWrap enum, and optionally plumb DidWrap through
to callers of findString().

  • WebView/WebView.mm:

(incrementFrame):
Adjust to the new CanWrap enum.

  • TestWebKitAPI/Tests/WebKit2Cocoa/FindInPage.mm:

(TEST):
Add some tests for wrapping finds.

12:43 PM Changeset in webkit [214892] by Ryan Haddad
  • 1 edit
    2 adds in trunk/LayoutTests

Add back results that were accidentally removed with r214848.
https://bugs.webkit.org/show_bug.cgi?id=169301

Unreviewed test gardening.

  • platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.png: Added.
  • platform/mac/fast/text/international/synthesized-italic-vertical-latin-expected.txt: Added.
12:43 PM Changeset in webkit [214891] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170456

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
12:24 PM Changeset in webkit [214890] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

webrtc/peer-connection-audio-mute.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=170451

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

  • TestExpectations: Removed flaky expectation for webrtc/peer-connection-audio-mute.html.
  • webrtc/peer-connection-remote-audio-mute.html: Added timer to ensure setting enable propagates.

Decreasing time spent at detecting hum or not.

  • webrtc/peer-connection-remote-audio-mute2.html: Ditto (but keeping flakiness expectation for now).
12:14 PM Changeset in webkit [214889] by jmarcell@apple.com
  • 1 copy in tags/Safari-603.2.2

Tag Safari-603.2.2.

12:10 PM Changeset in webkit [214888] by jmarcell@apple.com
  • 1 delete in tags/Safari-603.2.2

Deleting tag.

12:09 PM Changeset in webkit [214887] by fpizlo@apple.com
  • 12 edits in trunk/Source

Don't need to Air::reportUsedRegisters for wasm at -O1
https://bugs.webkit.org/show_bug.cgi?id=170459

Reviewed by Saam Barati.

Source/JavaScriptCore:

I did some refactorings to Liveness<> to try to understand its performance. Based on
this I concluded that the bigger immediate issue is just removing unnecessary phases
from -O1.

This removes Air::reportUsedRegisters() from -O1 if the user has indicated that he is
not interested in StackmapGenerationParams::usedRegisters(). The logic here is a bit
weird because of how Air does spill code generation. The register allocator's spiller
will emit spill code using identifiable spill slots, which allows subsequent phases to
register-allocate the spill slots. We do this by a forward flow CSE phase called
fixObviousSpills (which is a terrible name since there is no longer anything obvious
about some of the spills that this phase can fix!). As is most natural for CSEs over
3AC, it rewires the uses of redundant computations rather than removing the redundant
computations. This means that if a spill got "fixed", there may be either or both of
the following:

  • Dead loads from the stack.
  • Dead stores to the stack.


We know that a load from the stack is dead if the register is dead at the point of the
load. We know that a store to the stack is dead if the spill slot is dead at the point
of the store.

Unfortunately, liveness analysis - over either registers or spill slots - is expensive.

Fortunately, allocateStack() already does liveness analysis over spill slots. So, we
baked elimination of stores to the stack into that phase. That aspect of clean-up after
the spill CSE comes for free.

Also fortunately for the FTL, we have to do reportUsedRegisters() anyway. This is a
phase that enables StackmapGenerationParams::usedRegisters() to work, which then
enables the FTL's patchpoints to do crazy slow-path live range splitting. So, Air's
strategy for the load fix-up after spill CSE is to do it as part of
reportUsedRegisters().

This patch introduces the Procedure::setNeedsUsedRegisters() API. But if you set
needsUsedRegisters to false then we will still run reportUsedRegisters() at -O2 as an
optimization - it removes dead loads from the stack that are left behind from
fixObviousSpills().

This is a ~6% compile time progression at -O1.

  • b3/B3Procedure.h:

(JSC::B3::Procedure::setNeedsUsedRegisters):
(JSC::B3::Procedure::needsUsedRegisters):

  • b3/B3StackmapGenerationParams.h:
  • b3/B3VariableLiveness.cpp:

(JSC::B3::VariableLiveness::VariableLiveness):

  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::needsUsedRegisters):

  • b3/air/AirCode.h:
  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

  • b3/air/AirLiveness.h:

(JSC::B3::Air::Liveness::Liveness):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::parseAndCompile):

Source/WTF:

Just moved the liveness computation into a method, which enabled me to do the profiling
that I used to write this patch.

  • wtf/Liveness.h:

(WTF::Liveness::Liveness):
(WTF::Liveness::compute):

12:06 PM Changeset in webkit [214886] by commit-queue@webkit.org
  • 2 edits in trunk

[CMake] Enforce Python 2
https://bugs.webkit.org/show_bug.cgi?id=170439

Patch by Ross Kirsling <Ross Kirsling> on 2017-04-04
Reviewed by Brent Fulgham.

  • Source/cmake/WebKitCommon.cmake: Fail build immediately if Python 3 is detected.
11:01 AM Changeset in webkit [214885] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK] PLATFORM(GTK) && !USE(COORDINATED_GRAPHICS_THREADED) is no longer possible
https://bugs.webkit.org/show_bug.cgi?id=170458

Reviewed by Carlos Alberto Lopez Perez.

That is not supported anymore, so we can remove dead code from VideoSinkGStreamer.cpp

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(VideoRenderRequestScheduler::VideoRenderRequestScheduler):

10:38 AM Changeset in webkit [214884] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/images/animated-gif-webkit-transform.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170410

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:20 AM Changeset in webkit [214883] by fpizlo@apple.com
  • 5 edits
    1 add in trunk/Source

Air liveness should build constraints and solve them rather than repeatedly parsing IR
https://bugs.webkit.org/show_bug.cgi?id=170421

Reviewed by Saam Barati.
Source/JavaScriptCore:


Inst::forEach<> is expensive. The LivenessAdapter uses forEach with a particularly
gnarly lambda that has many extra checks. Therefore, a lot of the time spent in
liveness analysis is just recomputing forEach<> and that lambda to get uses and defs.

This introduces LivenessConstraints<>, which is a liveness constraint system based on
Adapter. It basically caches the results of doing forEach. It'll give you the uses and
defs at each instruction boundary.

This is a ~5% compile time progression at optLevel=1. It's also a ~3% compile time
progression at optLevel=2.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/air/AirLivenessAdapter.h:

(JSC::B3::Air::LivenessAdapter::LivenessAdapter):
(JSC::B3::Air::LivenessAdapter::forEachUse):
(JSC::B3::Air::LivenessAdapter::forEachDef):

  • b3/air/AirLivenessConstraints.h: Added.

(JSC::B3::Air::LivenessConstraints::Actions::Actions):
(JSC::B3::Air::LivenessConstraints::LivenessConstraints):
(JSC::B3::Air::LivenessConstraints::at):

Source/WTF:

  • wtf/Vector.h:

(WTF::minCapacity>::appendIfNotContains): Because sometimes Vector<> is the best kind of set.

9:12 AM Changeset in webkit [214882] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r214319 - [JSC] MachineThreads does not consider situation that one thread has multiple VMs
https://bugs.webkit.org/show_bug.cgi?id=169819

Reviewed by Mark Lam.

The Linux port of PlatformThread suspend/resume mechanism relies on having a thread
specific singleton thread data, and was relying on MachineThreads::Thread to be this
thread specific singleton. But because MachineThreads::Thread is not a thread specific
singleton, we can get a deadlock in the GTK port's DatabaseProcess.

This patch fixes this issue by moving per thread data from MachineThreads::Thread to
MachineThreads::ThreadData, where there will only be one instance of
MachineThreads::ThreadData per thread. Each MachineThreads::Thread will now point to
the same MachineThreads::ThreadData for any given thread.

  • heap/MachineStackMarker.cpp:

(pthreadSignalHandlerSuspendResume):
(JSC::threadData):
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::Thread::operator==):
(JSC::MachineThreads::ThreadData::ThreadData):
(JSC::MachineThreads::ThreadData::~ThreadData):
(JSC::MachineThreads::ThreadData::suspend):
(JSC::MachineThreads::ThreadData::resume):
(JSC::MachineThreads::ThreadData::getRegisters):
(JSC::MachineThreads::ThreadData::Registers::stackPointer):
(JSC::MachineThreads::ThreadData::Registers::framePointer):
(JSC::MachineThreads::ThreadData::Registers::instructionPointer):
(JSC::MachineThreads::ThreadData::Registers::llintPC):
(JSC::MachineThreads::ThreadData::freeRegisters):
(JSC::MachineThreads::ThreadData::captureStack):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
(JSC::MachineThreads::Thread::~Thread): Deleted.
(JSC::MachineThreads::Thread::suspend): Deleted.
(JSC::MachineThreads::Thread::resume): Deleted.
(JSC::MachineThreads::Thread::getRegisters): Deleted.
(JSC::MachineThreads::Thread::Registers::stackPointer): Deleted.
(JSC::MachineThreads::Thread::Registers::framePointer): Deleted.
(JSC::MachineThreads::Thread::Registers::instructionPointer): Deleted.
(JSC::MachineThreads::Thread::Registers::llintPC): Deleted.
(JSC::MachineThreads::Thread::freeRegisters): Deleted.
(JSC::MachineThreads::Thread::captureStack): Deleted.

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::Thread::operator!=):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):
(JSC::MachineThreads::Thread::freeRegisters):
(JSC::MachineThreads::Thread::captureStack):
(JSC::MachineThreads::Thread::platformThread):
(JSC::MachineThreads::Thread::stackBase):
(JSC::MachineThreads::Thread::stackEnd):

  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::isValidFramePointer):

  • runtime/VMTraps.cpp:

(JSC::findActiveVMAndStackBounds):

1:27 AM WebKitGTK/2.16.x edited by Carlos Garcia Campos
(diff)
1:16 AM Changeset in webkit [214881] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.16.1

WebKitGTK+ 2.16.1

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

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.16.1 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.16.1.
1:00 AM Changeset in webkit [214879] by jmarcell@apple.com
  • 6 edits
    8 adds in branches/safari-603-branch

Cherry-pick r214819. rdar://problem/31407633

1:00 AM Changeset in webkit [214878] by jmarcell@apple.com
  • 3 edits in branches/safari-603-branch/Source/WebCore

Cherry-pick r214703. rdar://problem/31407633

1:00 AM Changeset in webkit [214877] by jmarcell@apple.com
  • 3 edits in branches/safari-603-branch/Source/WebCore

Cherry-pick r214702. rdar://problem/31407633

1:00 AM Changeset in webkit [214876] by jmarcell@apple.com
  • 2 edits in branches/safari-603-branch/Source/JavaScriptCore

Cherry-pick r214684. rdar://problem/31402752

1:00 AM Changeset in webkit [214875] by jmarcell@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Cherry-pick r214649. rdar://problem/31407626

1:00 AM Changeset in webkit [214874] by jmarcell@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Cherry-pick r214648. rdar://problem/31408453

1:00 AM Changeset in webkit [214873] by jmarcell@apple.com
  • 6 edits
    2 adds in branches/safari-603-branch

Cherry-pick r214640. rdar://problem/31408453

1:00 AM Changeset in webkit [214872] by jmarcell@apple.com
  • 3 edits in branches/safari-603-branch/Source/WebKit2

Cherry-pick r211601. rdar://problem/31387958

12:31 AM Changeset in webkit [214871] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r214857 - Fix incorrect capacity delta calculation reported in SparseArrayValueMap::add().
https://bugs.webkit.org/show_bug.cgi?id=170412
<rdar://problem/29697336>

Reviewed by Filip Pizlo.

JSTests:

  • stress/regress-170412.js: Added.

Source/JavaScriptCore:

Here's an example of code that will trigger underflow in the "deprecatedExtraMemory"
reported by SparseArrayValueMap::add() that is added to Heap::m_deprecatedExtraMemorySize:

arr = new Array;
Object.defineProperty(arr, 18, ({writable: true, configurable: true}));
for (var i = 0; i < 3; ++i) {

Array.prototype.push.apply(arr, ["", () => {}, {}]);
Array.prototype.sort.apply(arr, [() => {}, []]);

}

However, Heap::m_deprecatedExtraMemorySize is only 1 of 3 values that are added
up to form the result of Heap::extraMemorySize(). Heap::m_extraMemorySize and
Heap::m_arrayBuffers.size() are the other 2.

While Heap::m_arrayBuffers.size() is bounded by actual allocated memory, both
Heap::m_deprecatedExtraMemorySize and Heap::m_extraMemorySize are added to
without any bounds checks, and they are only reset to 0 at the start of a full
GC. As a result, if we have a long sequence of eden GCs with a lot of additions
to Heap::m_extraMemorySize and/or Heap::m_deprecatedExtraMemorySize, then these
values could theoretically overflow. Coupling this with the underflow from
SparseArrayValueMap::add(), the result for Heap::extraMemorySize() can easily
overflow. Note: Heap::extraMemorySize() is used to compute the value
currentHeapSize.

If multiple conditions line up just right, the above overflows can result in this
debug assertion failure during an eden GC:

ASSERT(currentHeapSize >= m_sizeAfterLastCollect);

Otherwise, the effects of the overflows will only result in the computed
currentHeapSize not being representative of actual memory usage, and therefore,
a full GC may be triggered earlier or later than is ideal.

This patch ensures that SparseArrayValueMap::add() cannot underflow
Heap::m_deprecatedExtraMemorySize. It also adds overflows checks in the
calculations of Heap::m_deprecatedExtraMemorySize, Heap::m_extraMemorySize, and
Heap::extraMemorySize() so that their values are saturated appropriately to
ensure that GC collections are triggered based on representative memory usage.

  • heap/Heap.cpp:

(JSC::Heap::deprecatedReportExtraMemorySlowCase):
(JSC::Heap::extraMemorySize):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::reportExtraMemoryVisited):

  • runtime/SparseArrayValueMap.cpp:

(JSC::SparseArrayValueMap::add):

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

Merge r214842 - REGRESSION (r206744): CSS background-image in style attribute ignored when using createHTMLDocument method of DOM parsing
https://bugs.webkit.org/show_bug.cgi?id=170285
<rdar://problem/31378543>

Reviewed by Andy Estes.

Source/WebCore:

r206744 caused up to stop trying to resolve relative URLs when trying to load an image
referred to by CSS. We already try to resolve the relative URL when parsing the CSS
property so this will usually work fine. However, in the case when the CSS property
is parsed in detached document and then moved to another document, we will not have
the complete URL.

Test: fast/images/background-image-relative-url-changes-document.html

  • css/CSSImageValue.cpp:

(WebCore::CSSImageValue::loadImage):

LayoutTests:

Add layout test coverage.

  • fast/images/background-image-relative-url-changes-document-expected.html: Added.
  • fast/images/background-image-relative-url-changes-document.html: Added.
12:27 AM Changeset in webkit [214869] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r214830 - REGRESSION (r207669): FileMaker Pro Help pages do not render correctly
https://bugs.webkit.org/show_bug.cgi?id=170402
<rdar://problem/31004344>

Reviewed by Simon Fraser.

Source/WebCore:

If a new stylesheet load is started from the load event the document.styleSheets does not
always reflect the already loaded stylesheets.

Test: fast/css/document-stylesheets-dynamic.html

  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateActiveStyleSheets):

Remove an old optimization where we would not update active stylesheets if there were pending
(head) stylesheet loads and they had not been updated already.
This is probably not a valuable optimization anymore with the new lazy stylesheet update strategy.

  • style/StyleScope.h:

LayoutTests:

  • fast/css/document-stylesheets-dynamic-expected.html: Added.
  • fast/css/document-stylesheets-dynamic.html: Added.
12:20 AM Changeset in webkit [214868] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed Windows build fix.

  • bindings/js/JSDOMGuardedObject.h:
12:04 AM Changeset in webkit [214867] by Yusuke Suzuki
  • 4 edits
    1 copy
    1 add in trunk/Source/WTF

[WTF] Introduce WTF::RandomDevice which keeps /dev/urandom opened
https://bugs.webkit.org/show_bug.cgi?id=170095

Reviewed by Michael Catanzaro.

In this patch, we introduce RandomDevice, which keeps /dev/urandom opened
to avoid repeatedly open and close urandom file descriptor in Linux.

The purpose is similar to std::random_device, but WTF::RandomDevice explicitly
avoids using ARC4, which is recently attempted to be removed from the WebKit
tree[1].

[1]: https://trac.webkit.org/r214329

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/OSRandomSource.cpp:

(WTF::cryptographicallyRandomValuesFromOS):
(WTF::crashUnableToOpenURandom): Deleted.
(WTF::crashUnableToReadFromURandom): Deleted.

  • wtf/RandomDevice.cpp: Copied from Source/WTF/wtf/OSRandomSource.cpp.

(WTF::crashUnableToOpenURandom):
(WTF::crashUnableToReadFromURandom):
(WTF::RandomDevice::RandomDevice):
(WTF::RandomDevice::~RandomDevice):
(WTF::RandomDevice::cryptographicallyRandomValues):

  • wtf/RandomDevice.h: Added.
Note: See TracTimeline for information about the timeline view.