⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

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:
Note: See TracTimeline for information about the timeline view.