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

Timeline



Apr 29, 2017:

10:02 PM Changeset in webkit [215982] by aakash_jain@apple.com
  • 8 edits in trunk/Tools

Use PEP8 style guide for raising exceptions in webkitpy.
https://bugs.webkit.org/show_bug.cgi?id=171439

Reviewed by Daniel Bates.

As per https://www.python.org/dev/peps/pep-0008/
"When raising an exception in Python 2, use raise ValueError('message')
instead of the older form raise ValueError, 'message'"

  • Scripts/webkitpy/common/net/irc/ircbot.py: Using new style for raising exceptions.
  • Scripts/webkitpy/common/thread/messagepump.py: Same.
  • Scripts/webkitpy/tool/bot/queueengine.py: Same.
  • Scripts/webkitpy/tool/commands/queues.py: Same.
  • Scripts/webkitpy/tool/commands/stepsequence.py: Same.
  • Scripts/webkitpy/tool/multicommandtool.py: Same.
  • Scripts/webkitpy/tool/steps/abstractstep.py: Same.
8:32 PM Changeset in webkit [215981] by commit-queue@webkit.org
  • 9 edits
    3 adds in trunk

Zero out PerformanceResourceTiming properties for cached cross-origin responses without Timing-Allow-Origin
https://bugs.webkit.org/show_bug.cgi?id=171394

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

LayoutTests/imported/w3c:

WebKit doesn't create multiple PerformanceResourceTiming entries for
loads that use the same CachedResource. However for revalidation
requests, which may happen for cached entries, we will send new
network requests. These tests cover whether revalidation requests
include timing data or not.

  • web-platform-tests/resource-timing/resources/rt-revalidation-response.py: Added.
  • web-platform-tests/resource-timing/rt-cors-expected.txt:
  • web-platform-tests/resource-timing/rt-cors.js:
  • web-platform-tests/resource-timing/rt-cors.worker-expected.txt:
  • web-platform-tests/resource-timing/rt-revalidate-requests-expected.txt: Added.
  • web-platform-tests/resource-timing/rt-revalidate-requests.html: Added.

Source/WebCore:

  • loader/ResourceTiming.cpp:

(WebCore::ResourceTiming::fromCache):
(WebCore::ResourceTiming::ResourceTiming):

  • loader/ResourceTiming.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
Include the timing-allow-origin check for cached responses.
Also, avoid including an extra entry for an ongoing cached resource
load, since when that load completes it should be reported.

8:30 PM Changeset in webkit [215980] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Readd assertion removed accidentally in r215955
https://bugs.webkit.org/show_bug.cgi?id=171466

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

Source/WebCore:

Unreviewed.

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::orientationChanged): Improved FIXME after review.

Source/WebKit2:

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::addItemFromUIProcess):

8:28 PM Changeset in webkit [215979] by aestes@apple.com
  • 7 edits in trunk/Source

[macOS] Picture-in-picture should be disabled in WebPlaybackControlsManager during external media playback
https://bugs.webkit.org/show_bug.cgi?id=171468
<rdar://problem/31900349>

Reviewed by Eric Carlson.

Source/WebCore:

  • platform/mac/WebPlaybackControlsManager.h: Declared canTogglePictureInPicture as a

readwrite property.

  • platform/mac/WebPlaybackControlsManager.mm: Synthesize canTogglePictureInPicture.

(-[WebPlaybackControlsManager canTogglePictureInPicture]): Deleted.

  • platform/mac/WebPlaybackSessionInterfaceMac.h:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::externalPlaybackChanged): Called
-[WebPlaybackControlsManager setCanTogglePictureInPicture:].

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateMediaTouchBar): Set canTogglePictureInPicture to YES by default
on WebPlaybackControlsManager.

8:06 PM Changeset in webkit [215978] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Fix tests broken by r215964.

Fix copy-paste error that caused the wrong paint phase to get passed to the fire writeLayerRenderers()
call, causing extra renderer dumping.

Also remove unused default arguments.

  • rendering/RenderTreeAsText.cpp:

(WebCore::writeLayerRenderers):
(WebCore::writeLayers):

2:25 PM Changeset in webkit [215977] by gskachkov@gmail.com
  • 5 edits in trunk

Deep nesting is leading to ReferenceError for hoisted function
https://bugs.webkit.org/show_bug.cgi?id=171456

Reviewed by Yusuke Suzuki.

Current patch fix error that appears during hoisting of the function
in block scope. Error happens only when exist some deep scope that lead
to increase scope stack, after which list of the hosted candidates do not
copied to updated scope stack.

Source/JavaScriptCore:

  • parser/Parser.h:

(JSC::Scope::Scope):

LayoutTests:

  • js/function-declaration-statement-expected.txt:
  • js/script-tests/function-declaration-statement.js:

(deepNesting.foo):
(deepNesting):
(deepNestingForFunctionDeclaration.foo):
(deepNestingForFunctionDeclaration):
(eval.deepNestingInEval.foo):
(eval.deepNestingInEval):
(eval.deepNestingForFunctionDeclarationInEval.foo):
(eval.deepNestingForFunctionDeclarationInEval):

2:16 PM Changeset in webkit [215976] by Alan Bujtas
  • 3 edits
    2 adds in trunk

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

Reviewed by Antti Koivisto.

Source/WebCore:

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

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

  • rendering/SimpleLineLayout.cpp:

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

LayoutTests:

  • fast/text/simple-line-layout-glyph-overflows-line-expected.html: Added.
  • fast/text/simple-line-layout-glyph-overflows-line.html: Added.
11:55 AM Changeset in webkit [215975] by n_wang@apple.com
  • 7 edits in trunk/Source/WebCore

AX: Improve performance of addChildren()/childrenChanged()
https://bugs.webkit.org/show_bug.cgi?id=171443

Reviewed by Chris Fleizach.

There's a lot of unnecessary work happening when childrenChanged() is being called.
Some of the improvements here:

  1. When childrenChanged() is being called on some element, we are marking its parent chain dirty. However, in the addChild() method we are then clearing each child of that 'dirty' parent, eventually making the entire tree dirty. Added a m_subTreeDirty flag and using the needsToUpdateChildren() check to make sure we are only clearing the right chain without updating the unchanged siblings.
  2. In the addChild() method we are calling accessibilityIsIgnored() on each child and that might lead to going up the parent chain again to get necessary information. Since we are already traversing the tree from top to bottom to add children, added a struct to store the information and pass it to the child so to avoid unnecessary traversal.
  3. Reduced the amount work of ARIA text controls perform when updating its parents in childrenChanged() so that we don't update a big portion of the tree while typing.

No new tests since this didn't change any functionality.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
(WebCore::AccessibilityNodeObject::childrenChanged):
(WebCore::AccessibilityNodeObject::insertChild):
(WebCore::AccessibilityNodeObject::addChildren):
(WebCore::AccessibilityNodeObject::isDescendantOfBarrenParent):

  • accessibility/AccessibilityNodeObject.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::AccessibilityObject):
(WebCore::AccessibilityObject::defaultObjectInclusion):
(WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityIsIgnoredFromParentData::AccessibilityIsIgnoredFromParentData):
(WebCore::AccessibilityIsIgnoredFromParentData::isNull):
(WebCore::AccessibilityObject::setNeedsToUpdateSubTree):
(WebCore::AccessibilityObject::needsToUpdateChildren):
(WebCore::AccessibilityObject::setIsIgnoredFromParentData):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::updateChildrenIfNecessary):
(WebCore::AccessibilityRenderObject::addChildren):

  • accessibility/AccessibilityRenderObject.h:

(WebCore::AccessibilityRenderObject::setRenderObject):
(WebCore::AccessibilityRenderObject::needsToUpdateChildren): Deleted.

11:33 AM Changeset in webkit [215974] by mitz@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

[Xcode] libwebrtc SRCROOT includes examples
https://bugs.webkit.org/show_bug.cgi?id=171478

Reviewed by Tim Horton.

  • Configurations/Base.xcconfig: Exclude the Source/webrtc/examples subdirectory from installsrc. Its contents are not used for building any of the targets in the project.
11:03 AM Changeset in webkit [215973] by Yusuke Suzuki
  • 25 edits
    1 copy
    3 moves
    2 adds in trunk/Source

Move WebCore CPUTime to WTF and implement it in all the platforms
https://bugs.webkit.org/show_bug.cgi?id=171477

Reviewed by Chris Dumez.

Source/WebCore:

Move CPUTime to WTF. And rename getCPUTime to CPUTime::get().

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • page/ChromeClient.h:
  • page/PerformanceMonitor.cpp:

(WebCore::PerformanceMonitor::PerformanceMonitor):
(WebCore::PerformanceMonitor::measurePostLoadCPUUsage):
(WebCore::PerformanceMonitor::measurePostBackgroundingCPUUsage):
(WebCore::PerformanceMonitor::measureCPUUsageInActivityState):

  • page/PerformanceMonitor.h:
  • platform/CPUMonitor.cpp:

(WebCore::CPUMonitor::setCPULimit):
(WebCore::CPUMonitor::timerFired):

  • platform/CPUMonitor.h:

Source/WebKit2:

We now hold Seconds in CPUTime instead of int64_t. It finally sends
Seconds through WebKit2 IPC. We do not need to specialize ArgumentCoder
for Seconds since Seconds just holds double.

  • UIProcess/PerActivityStateCPUUsageSampler.cpp:

(WebKit::PerActivityStateCPUUsageSampler::PerActivityStateCPUUsageSampler):
(WebKit::PerActivityStateCPUUsageSampler::reportWebContentCPUTime):
(WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired):

  • UIProcess/PerActivityStateCPUUsageSampler.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::reportWebContentCPUTime):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessPool.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::reportProcessCPUTime):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WTF:

We move WebCore::CPUTime to WTF::CPUTime since it is useful even in JSC
and it does not depend on any external libraries.
And we additionally implement WTF::CPUTime in all the platforms: Windows and Unix.

In CPUTime, instead of holding int64_t, we hold MonotonicTime and Seconds.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CPUTime.cpp: Copied from Source/WebCore/platform/CPUTime.cpp.

(WTF::CPUTime::percentageCPUUsageSince):

  • wtf/CPUTime.h: Renamed from Source/WebCore/platform/CPUTime.h.
  • wtf/PlatformEfl.cmake:
  • wtf/PlatformGTK.cmake:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/PlatformMac.cmake:
  • wtf/PlatformWin.cmake:
  • wtf/cocoa/CPUTimeCocoa.mm: Renamed from Source/WebCore/platform/cocoa/CPUTimeCocoa.mm.

(WTF::timeValueToMicroseconds):
(WTF::CPUTime::get):

  • wtf/unix/CPUTimeUnix.cpp: Renamed from Source/WebCore/platform/CPUTime.cpp.

(WTF::timevalToSeconds):
(WTF::CPUTime::get):

  • wtf/win/CPUTimeWin.cpp: Added.

(WTF::fileTimeToSeconds):
(WTF::CPUTime::get):

9:32 AM Changeset in webkit [215972] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] LabelScopePtr is not necessary
https://bugs.webkit.org/show_bug.cgi?id=171474

Reviewed by Geoffrey Garen.

Originally, LabelScopePtr is introduced because LabelScopes uses Vector<> instead of SegmentedVector<>.
LabelScopePtr holds the pointer to the vector owner and index instead of the pointer to LabelScope directly
since Vector<> can relocate LocalScopes inside it.
The reason why LabelScopes use Vector instead is that there is code copying this vector. SegmentedVector<>
prohibits copying since it is so costly. So, we used Vector<> here instead of SegmentedVector<>.

But the latest code does not have copying code for LabelScopes. Thus, we can take the same design to Label and
RegisterID. Just use SegmentedVector<> and Ref<>/RefPtr<>. This patch removes LabelScopePtr since it is no
longer necessary. And use SegmentedVector for LabelScopes.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::reclaim):
(JSC::BytecodeGenerator::reclaimFreeRegisters):
(JSC::BytecodeGenerator::newLabelScope):
(JSC::BytecodeGenerator::newLabel):
(JSC::BytecodeGenerator::pushFinallyControlFlowScope):
(JSC::BytecodeGenerator::breakTarget):
(JSC::BytecodeGenerator::continueTarget):
(JSC::BytecodeGenerator::emitEnumeration):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/LabelScope.h:

(JSC::LabelScope::LabelScope):
(JSC::LabelScope::breakTarget):
(JSC::LabelScope::continueTarget):
(JSC::LabelScope::type):
(JSC::LabelScope::name):
(JSC::LabelScope::scopeDepth):
(JSC::LabelScope::ref):
(JSC::LabelScope::deref):
(JSC::LabelScope::refCount):
(JSC::LabelScopePtr::LabelScopePtr): Deleted.
(JSC::LabelScopePtr::operator=): Deleted.
(JSC::LabelScopePtr::~LabelScopePtr): Deleted.
(JSC::LabelScopePtr::operator!): Deleted.
(JSC::LabelScopePtr::operator*): Deleted.
(JSC::LabelScopePtr::operator->): Deleted.
(JSC::LabelScopePtr::null): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::DoWhileNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ContinueNode::trivialTarget):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::trivialTarget):
(JSC::BreakNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::LabelNode::emitBytecode):

Apr 28, 2017:

11:17 PM Changeset in webkit [215971] by pvollan@apple.com
  • 3 edits
    2 adds in trunk

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

rdar://problem/31863417

Reviewed by Brent Fulgham.

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

Test: accessibility/accessibility-crash-setattribute.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):

LayoutTests:

Reviewed by Brent Fulgham.

  • accessibility/accessibility-crash-setattribute-expected.txt: Added.
  • accessibility/accessibility-crash-setattribute.html: Added.
9:57 PM Changeset in webkit [215970] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening (Mac WK1)

Mark a LayoutTest as PASS on Mac WK1. This test is currently skipped globally,
but was meant to be enabled for WK1 on Mac. Followup to r213897.

  • platform/mac-wk1/TestExpectations:
8:55 PM Changeset in webkit [215969] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Diagnostic logging of navigations is too verbose
https://bugs.webkit.org/show_bug.cgi?id=171455
<rdar://problem/31543815>

Reviewed by Andreas Kling.

Diagnostic logging of navigation is too verbose. We log things that are not actually user
navigations (e.g. speculative loads, bookmark icon fetches, ...). To address the issue,
we now only log *observable* loads. We do so by only logging if the page is visible or
if it becomes visible.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::logNavigation): Deleted.

  • page/Page.cpp:

(WebCore::Page::setIsVisibleInternal):
(WebCore::Page::logNavigation):
(WebCore::Page::mainFrameLoadStarted):

  • page/Page.h:
7:07 PM Changeset in webkit [215968] by jdiggs@igalia.com
  • 18 edits in trunk

AX: ARIA "region" role which lacks an accessible name should not be treated as a landmark
https://bugs.webkit.org/show_bug.cgi?id=171180

Reviewed by Chris Fleizach.

Source/WebCore:

Remove mapping of LandmarkRegionRole for regions which lack an accessible name.
Doing so had a side effect of causing a number of DPub ARIA roles to stop being
mapped as ARIA landmarks. This is due to our internal role mappings, namely
treating the DPub ARIA landmark roles as if they were regions. Because DPub's
landmarks do not subclass region, and do not have the same name-from-author
requirement as region, create a new LandmarkDocRegionRole AccessibilityRole and
map DPub ARIA's generic landmarks to it.

No new tests because we already have sufficient coverage. Several existing
tests were given additional test cases to cover named and unnamed regions,
and test expectations updated accordingly.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
(WebCore::AccessibilityObject::isLandmark):
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::computedRoleString):

  • accessibility/AccessibilityObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

Add new test cases to several tests so that we have coverage for both named and
unnamed regions, which now have different mappings. In aria-namefrom-author.html,
the region role was replaced with the table role because the test requires elements
which have mapped ARIA roles and lack an author-provided name. A region which lacks
an author-provided name is no longer mapped as an ARIA role as per the spec. Table
was introduced in ARIA 1.1 and serves the same purpose with respect to what is
being tested.

  • accessibility/aria-namefrom-author.html:
  • accessibility/gtk/xml-roles-exposed-expected.txt:
  • accessibility/gtk/xml-roles-exposed.html:
  • accessibility/mac/aria-grouping-roles.html:
  • accessibility/roles-computedRoleString.html:
  • accessibility/roles-exposed.html:
  • platform/gtk/accessibility/roles-exposed-expected.txt:
  • platform/mac/accessibility/roles-computedRoleString-expected.txt:
  • platform/mac/accessibility/roles-exposed-expected.txt:
6:55 PM Changeset in webkit [215967] by Simon Fraser
  • 4 edits in trunk

Add system trace points for Document::updateTouchEventRegions()
https://bugs.webkit.org/show_bug.cgi?id=171470
rdar://problem/31901239

Reviewed by Tim Horton.

Add trace markers for updateTouchEventRegions.

Source/WTF:

  • wtf/SystemTracing.h:

Tools:

  • Tracing/SystemTracePoints.plist:
6:19 PM Changeset in webkit [215966] by Joseph Pecoraro
  • 2 edits in trunk/LayoutTests

LayoutTests/js/dom/Promise-static-all/race.html are flakey - Unhandled Promise Rejection messages
https://bugs.webkit.org/show_bug.cgi?id=171445

Unreviewed test gardening.

  • js/dom/Promise-static-all.html:

Fix an accidentally commented out line.

6:06 PM Changeset in webkit [215965] by Jonathan Bedard
  • 7 edits in trunk/Tools

webkitpy: Add apple_additions to webkitpy to insert Internal tools
https://bugs.webkit.org/show_bug.cgi?id=170461
<rdar://problem/31433077>

Reviewed by Daniel Bates.

Allow a package to be pulled in by run-webkit-tests which provides an interface to
run layout tests on an iOS device. If this package is not available, throw an
exception when attempting to run layout tests on an iOS device.

  • Scripts/webkitpy/port/config.py:

(apple_additions): Import apple_additions package.

  • Scripts/webkitpy/port/device.py:

(Device.install_dylibs): Pass a directory with all the frameworks and dylibs to be
installed on a device.
(Device.prepare_for_testing): Pass a list of ports to forward from the device to the
host, the bundle id of the app to be used for testing and a path to the layout test
directory to be mounted on the device.
(Device.finished_testing):

  • Scripts/webkitpy/port/factory.py:

(platform_options): Add apple_additions platform options if apple_additions exists.

  • Scripts/webkitpy/port/ios.py:

(IOSPort.setup_test_run): Install dylibs and frameworks on the device, pass ports
to forward, the bundle ID of the testing app and the layout tests directory to
each device.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort):
(IOSDevicePort.default_child_processes): Query apple_additions for the number of child
processes to be run.
(IOSDevicePort.using_multiple_devices): Always assume multiple devices are used. When
a single device is used, it is still accessed through an array.
(IOSDevicePort._device_for_worker_number_map): Query apple_additions for the device
for worker number map.
(IOSDevicePort._driver_class): Query apple_additions for the test driver.
(IOSDevicePort.determine_full_port_name): Use class variable over hard-coded string.
(IOSDevicePort.check_for_leaks): No implementation for iOSDevicePort.
(IOSDevicePort.look_for_new_crash_logs): Ditto.
(IOSDevicePort.look_for_new_samples): Ditto.
(IOSDevicePort.sample_process): Ditto.
(IOSDevicePort._build_driver_flags): Use class variable over hard-coded string.
(IOSDevicePort._create_devices): Check that devices are available for testing and check
that we have enough devices for each child process.
(IOSDevicePort.clean_up_test_run): Have apple_additions preform any needed clean up.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_operating_system):
(IOSDeviceTest.test_spindump): Override method from DarwinTest.
(IOSDeviceTest.test_sample_process): Ditto.
(IOSDeviceTest.test_sample_process_exception): Ditto.

5:48 PM Changeset in webkit [215964] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Enhance showLayerTree() to show fragments
https://bugs.webkit.org/show_bug.cgi?id=171469

Reviewed by Zalan Bujtas.

Have showLayerTree() dump fragments, like:

normal flow list(1)

layer 0x11c1879c0 at (0,0) size 700x1858 backgroundClip at (0,0) size 2120x779 clip at (0,0) size 2120x779

fragment 0: bounds in layer at (0,0) size 700x1858 fragment bounds at (0,0) size 700x779
fragment 1: bounds in layer at (710,-779) size 700x1858 fragment bounds at (710,0) size 700x779
fragment 2: bounds in layer at (1420,-1558) size 700x1858 fragment bounds at (1420,0) size 700x300

RenderMultiColumnFlowThread 0x11f1f3340 at (0,0) size 700x1858

We want these to show before the child renderers, so factor that code into writeLayerRenderers().

Overloading of write() for layers doesn't help anyone, so call it writeLayer() for searchability.

  • rendering/RenderLayer.cpp:

(WebCore::showLayerTree):

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

(WebCore::writeLayer):
(WebCore::writeLayerRenderers):
(WebCore::writeLayers):

  • rendering/RenderTreeAsText.h:
5:48 PM Changeset in webkit [215963] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Modernize RenderTreeAsText code
https://bugs.webkit.org/show_bug.cgi?id=171458

Reviewed by Zalan Bujtas.

Use modern loops. More references to render objects and layers.

  • rendering/RenderTreeAsText.cpp:

(WebCore::write):
(WebCore::writeRenderNamedFlowThreads):
(WebCore::writeLayers):
(WebCore::writeSelection):
(WebCore::externalRepresentation):

5:44 PM Changeset in webkit [215962] by Wenson Hsieh
  • 9 edits in trunk

Fix and re-enable data interaction unit tests
https://bugs.webkit.org/show_bug.cgi?id=171446
<rdar://problem/31820646>

Reviewed by Tim Horton.

Source/WebCore:

Three small tweaks to get all data interaction tests passing again (changes detailed below).
Fixes a failing unit test: DataInteractionTests.RespectsExternalSourceFidelityRankings.

  • page/mac/DragControllerMac.mm:

When dropping in a plain text editable area, don't consider kUTTypeText to be a UTI supported by the destination.
This is because doing so would cause rich text UTIs, such as kUTTypeHTML, to match, so that the plain text area
would report HTML as a preferred UTI type to load when dropping rich content over it. What we want to check for
conformance here is really kUTTypePlainText.

(WebCore::DragController::updatePreferredTypeIdentifiersForDragHandlingMethod):

  • platform/Pasteboard.h:
  • platform/ios/PasteboardIOS.mm:

The default Pasteboard constructor no longer makes a sync call to the UI process to get the change count.
Instead, we introduce a new constructor that takes and sets the change count. This default constructor was used
from three places: Pasteboard::createForCopyAndPaste, Pasteboard::createPrivate and StaticPasteboard::create.

The first two call sites have been refactored to first fetch the change count from the UI process and then pass
it in to the constructor.

(WebCore::changeCountForPasteboard):
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::types):

  • platform/mac/DragDataMac.mm:

(WebCore::typeIsAppropriateForSupportedTypes):
(WebCore::DragData::updatePreferredTypeIdentifiers):

Remove the two-pass heuristic. Instead, we should follow this policy: "select the highest fidelity UTI that
conforms to one of the destination's supported types".

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::Pasteboard):

Tools:

Enables all DataInteractionTests, and adjusts file upload tests to no longer write to a temporary file before
registering with the UIItemProvider, and instead just register data directly via
-registerDataRepresentationForTypeIdentifier:visibility:loadHandler:.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):
(temporaryURLForDataInteractionFileLoad): Deleted.
(cleanUpDataInteractionTemporaryPath): Deleted.
(-[UIItemProvider registerFileRepresentationForTypeIdentifier:withData:filename:]): Deleted.

  • TestWebKitAPI/ios/DataInteractionSimulator.h:
  • TestWebKitAPI/ios/DataInteractionSimulator.mm:
5:34 PM Changeset in webkit [215961] by beidson@apple.com
  • 20 edits in trunk

Teach the DatabaseProcess to be fully SessionID aware
https://bugs.webkit.org/show_bug.cgi?id=171451

Reviewed by Geoffrey Garen.
Source/WebKit2:

SessionIDs were already at the periphery of IDB and the DatabaseProcess.
Getting a separate IDBServer per SessionID is a pretty straightforward improvement.

  • DatabaseProcess/DatabaseProcess.cpp:

(WebKit::DatabaseProcess::idbServer):
(WebKit::DatabaseProcess::initializeWebsiteDataStore):
(WebKit::DatabaseProcess::fetchWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
(WebKit::DatabaseProcess::indexedDatabaseOrigins):
(WebKit::DatabaseProcess::initializeDatabaseProcess): Deleted.
(WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists): Deleted.
(WebKit::DatabaseProcess::absoluteIndexedDatabasePathFromDatabaseRelativePath): Deleted.

  • DatabaseProcess/DatabaseProcess.h:

(WebKit::DatabaseProcess::indexedDatabaseDirectory): Deleted.

  • DatabaseProcess/DatabaseProcess.messages.in:
  • DatabaseProcess/DatabaseToWebProcessConnection.cpp:

(WebKit::DatabaseToWebProcessConnection::establishIDBConnectionToServer):

  • DatabaseProcess/DatabaseToWebProcessConnection.h:
  • DatabaseProcess/DatabaseToWebProcessConnection.messages.in:
  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:

(WebKit::WebIDBConnectionToClient::create):
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::renameObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::renameIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getAllRecords):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
(WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
(WebKit::WebIDBConnectionToClient::getAllDatabaseNames):

  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
  • Shared/Databases/DatabaseProcessCreationParameters.cpp:

(WebKit::DatabaseProcessCreationParameters::encode):
(WebKit::DatabaseProcessCreationParameters::decode):

  • Shared/Databases/DatabaseProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureDatabaseProcess):
(WebKit::WebProcessPool::resolvePathsForSandboxExtensions):
(WebKit::WebProcessPool::pageAddedToProcess):

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

(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
(WebKit::WebsiteDataStore::databaseProcessParameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::resolvedIndexedDatabaseDirectory):

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::create):
(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
  • WebProcess/Databases/WebToDatabaseProcessConnection.cpp:

(WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:
5:20 PM Changeset in webkit [215960] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked media/track/track-in-band-style.html as flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=171465

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-04-28

  • platform/mac/TestExpectations:
5:17 PM Changeset in webkit [215959] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.19.0.1/Source

Versioning.

5:10 PM Changeset in webkit [215958] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.19.0.1

New tag.

4:34 PM Changeset in webkit [215957] by dino@apple.com
  • 3 edits
    2 adds in trunk

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

Reviewed by Eric Carlson.

Source/WebCore:

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

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

  • platform/graphics/filters/FEGaussianBlur.cpp:

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

LayoutTests:

Test a bunch of blurs a frame at a time.

  • css3/filters/blur-various-radii-expected.html: Added.
  • css3/filters/blur-various-radii.html: Added.
4:28 PM Changeset in webkit [215956] by Chris Dumez
  • 22 edits in trunk

Stop using legacy ClientRect / ClientRectList in Internals
https://bugs.webkit.org/show_bug.cgi?id=171412

Reviewed by Simon Fraser.

Source/WebCore:

Stop using legacy ClientRect / ClientRectList in Internals amd use the
newer DOMRect instead.

  • dom/DOMRect.idl:
  • page/Page.cpp:

(WebCore::Page::nonFastScrollableRects):
(WebCore::Page::touchEventRectsForEvent):
(WebCore::Page::passiveTouchEventListenerRects):

  • page/Page.h:
  • testing/Internals.cpp:

(WebCore::Internals::absoluteCaretBounds):
(WebCore::Internals::boundingBox):
(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::layoutViewportRect):
(WebCore::Internals::visualViewportRect):
(WebCore::Internals::touchEventRectsForEvent):
(WebCore::Internals::passiveTouchEventListenerRects):
(WebCore::Internals::nonFastScrollableRects):
(WebCore::Internals::selectionBounds):

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

LayoutTests:

Rebaseline existing tests as DOMRect has more properties than ClientRect.

  • fast/visual-viewport/nonzoomed-rects-expected.txt:
  • fast/visual-viewport/rtl-nonzoomed-rects-expected.txt:
  • fast/visual-viewport/rtl-zoomed-rects-expected.txt:
  • fast/visual-viewport/rubberbanding-viewport-rects-expected.txt:
  • fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt:
  • fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt:
  • fast/visual-viewport/zoomed-fixed-expected.txt:
  • fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
  • fast/visual-viewport/zoomed-rects-expected.txt:
  • inspector/dom/hideHighlight-expected.txt:
  • inspector/dom/highlightQuad-expected.txt:
  • inspector/dom/highlightRect-expected.txt:
4:26 PM Changeset in webkit [215955] by commit-queue@webkit.org
  • 37 edits
    1 add in trunk/Source

getUserMedia video streams should follow device orientation
https://bugs.webkit.org/show_bug.cgi?id=171284

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

Source/WebCore:

Only really affects AVVideoCaptureSource on iOS. Manually testing the following cases:

  • Mac: no change of behavior
  • iOS: page loaded in portrait, video is portrait. page loaded in landscape, video is landscape
  • iOS: changing the device orientation makes the video samples to be moved to landscape/portrait.
  • Same tests as above with peer connection.

Making Document having an OrientationNotifier that AVVideoCaptureSources get registered to.
Making AVVideoCaptureSource an OrientationNotifier::Observer so that it can changes width/height if needed.

Refactoring to specialize CaptureFactory in VideoCaptureFactory and AudioCaptureFactory.
Refactoring to return a CaptureSourceOrError instead of passing an out parameter plus returning a RefPtr.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::allow):

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::orientationChanged):

  • dom/Document.h:
  • page/Frame.cpp:

(WebCore::Frame::orientationChanged):

  • platform/OrientationNotifer.h: Copied from Source/WebKit2/UIProcess/Cocoa/UserMediaCaptureManagerProxy.h.

(WebCore::OrientationNotifier::Observer::setNotifier):
(WebCore::OrientationNotifier::Observer::~Observer):
(WebCore::OrientationNotifier::orientationChanged):
(WebCore::OrientationNotifier::addObserver):
(WebCore::OrientationNotifier::removeObserver):

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::monitorOrientation):

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

(WebCore::CaptureSourceOrError::CaptureSourceOrError):
(WebCore::CaptureSourceOrError::operator bool):
(WebCore::CaptureSourceOrError::source):

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::setAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::setVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::defaultAudioFactory):
(WebCore::RealtimeMediaSourceCenter::defaultVideoFactory):
(WebCore::RealtimeMediaSourceCenter::audioFactory):
(WebCore::RealtimeMediaSourceCenter::videoFactory):

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

(WebCore::AVAudioCaptureSource::create):
(WebCore::AVAudioCaptureSource::factory):

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

(WebCore::AVVideoCaptureSource::create):
(WebCore::AVVideoCaptureSource::factory):
(WebCore::AVVideoCaptureSource::monitorOrientation):
(WebCore::AVVideoCaptureSource::orientationChanged):
(WebCore::AVVideoCaptureSource::processNewFrame):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):
(WebCore::CoreAudioCaptureSource::factory):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:

(WebCore::MockRealtimeAudioSource::create):

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

(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSourceMac::orientationChanged):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
(WebCore::RealtimeMediaSourceCenterMac::bestSourcesForTypeAndConstraints):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioFactory):
(WebCore::RealtimeMediaSourceCenterMac::defaultVideoFactory):

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

(WebCore::RealtimeMediaSourceCenterOwr::createMediaStream):

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::create):
(WebCore::MockRealtimeAudioSource::factory):

  • platform/mock/MockRealtimeAudioSource.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
(WebCore::MockRealtimeMediaSourceCenter::defaultAudioFactory):
(WebCore::MockRealtimeMediaSourceCenter::defaultVideoFactory):

  • platform/mock/MockRealtimeMediaSourceCenter.h:
  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSource::factory):

  • platform/mock/MockRealtimeVideoSource.h:

Source/WebKit2:

Refactoring to specialize CaptureFactory in VideoCaptureFactory and AudioCaptureFactory.
Refactoring to return a CaptureSourceOrError instead of passing an out parameter in addition to returning a RefPtr.

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

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

(WebKit::UserMediaCaptureManager::createCaptureSource):
(WebKit::UserMediaCaptureManager::createMediaSourceForCaptureDeviceWithConstraints): Deleted.

  • WebProcess/cocoa/UserMediaCaptureManager.h:
3:41 PM Changeset in webkit [215954] by Chris Dumez
  • 12 edits in trunk/Source/WebKit2

[iOS] We should not take a background assertion for the UIProcess when app is MobileMail
https://bugs.webkit.org/show_bug.cgi?id=171435
<rdar://problem/31132330>

Reviewed by Geoffrey Garen.

Add SPI to disable taking on background process assertions in the UIProcess.
This is useful for MobileMail.

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration shouldTakeUIBackgroundAssertion]):
(-[_WKProcessPoolConfiguration setShouldTakeUIBackgroundAssertion:]):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::NetworkProcessProxy):

  • UIProcess/ProcessAssertion.h:

(WebKit::ProcessAssertion::setClient):

  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::ProcessThrottler):
(WebKit::m_shouldTakeUIBackgroundAssertion):
(WebKit::ProcessThrottler::didConnectToProcess):

  • UIProcess/ProcessThrottler.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::WebProcessPool):

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

(WebKit::WebProcessProxy::WebProcessProxy):

3:39 PM Changeset in webkit [215953] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Unreviewed attempt to fix iOS build after r215943.

  • Configurations/Base.xcconfig:
3:37 PM Changeset in webkit [215952] by commit-queue@webkit.org
  • 16 edits in trunk/Source/WebCore

Unify how BitmapImage handles the availability of a decoded for large and animated images
https://bugs.webkit.org/show_bug.cgi?id=171410

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

Rename some functions which are related to animation frame availability.
Make BitmapImage call ImageObserver::imageFrameAvailable() whenever a
frame is available regardless it is for an animated or for a large image.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::isVisibleInViewport):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::autoplayPermitted):
(WebCore::isMainContentForPurposesOfAutoplay):

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImageObserver::imageFrameAvailable):
(WebCore::CachedImage::imageFrameAvailable):
(WebCore::CachedImage::usesImageContainerSize): Deleted.
(WebCore::CachedImage::imageHasRelativeWidth): Deleted.
(WebCore::CachedImage::imageHasRelativeHeight): Deleted.
(WebCore::CachedImage::CachedImageObserver::animationAdvanced): Deleted.
(WebCore::CachedImage::animationAdvanced): Deleted.

  • loader/cache/CachedImage.h:
  • loader/cache/CachedImageClient.h:

(WebCore::CachedImageClient::imageFrameAvailable):
(WebCore::CachedImageClient::newImageAnimationFrameAvailable): Deleted.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::internalAdvanceAnimation):
(WebCore::BitmapImage::imageFrameAvailableAtIndex):
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex): Deleted.

  • platform/graphics/BitmapImage.h:
  • platform/graphics/Image.h:

(WebCore::Image::imageFrameAvailableAtIndex):
(WebCore::Image::newFrameNativeImageAvailableAtIndex): Deleted.

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::cacheAsyncFrameNativeImageAtIndex):

  • platform/graphics/ImageObserver.h:
  • platform/graphics/ImageTypes.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::shouldRepaintInVisibleRect):
(WebCore::RenderElement::imageFrameAvailable):
(WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded):
(WebCore::shouldRepaintForImageAnimation): Deleted.
(WebCore::RenderElement::newImageAnimationFrameAvailable): Deleted.

  • rendering/RenderElement.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::updateVisibleViewportRect):

  • svg/graphics/SVGImageClients.h:
3:33 PM Changeset in webkit [215951] by commit-queue@webkit.org
  • 4 edits in trunk

ARGUMENT BAD: time, time >= 0
https://bugs.webkit.org/show_bug.cgi?id=164336
rdar://problem/29314891

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

Source/WebCore:

Handle invalid duration and current time when calculating remaining time.

Test media/modern-media-controls/pip-support/pip-support-click.html now works without a workaround
in media/modern-media-controls/pip-support/pip-support-enabled.html

  • platform/mac/WebVideoFullscreenHUDWindowController.mm:

(-[WebVideoFullscreenHUDWindowController remainingTimeText]):

LayoutTests:

Remove workaround that affected other tests.

  • media/modern-media-controls/pip-support/pip-support-click.html:
3:10 PM Changeset in webkit [215950] by Jonathan Bedard
  • 2 edits in trunk/Tools

Unreviewed follow-up to r214705.

shut.copytree will fail if given a file as an argument instead of a directory.

  • Scripts/webkitpy/common/system/filesystem.py:

(FileSystem.copy_to_base_host): Use copytree when source is a directory and copyfile
when source is a file.
(FileSystem.copy_from_base_host): Ditto.

2:45 PM Changeset in webkit [215949] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Add WebCore::protocolIsJavaScript(StringView)
https://bugs.webkit.org/show_bug.cgi?id=171396

Reviewed by Alex Christensen.

Add an overload of WebCore::protocolIsJavaScript() that takes a StringView to
avoid the need for a caller to allocate a new String object when converting
from a StringView to a String. We are not using this functionality at the moment,
but we will in the patch for <https://bugs.webkit.org/show_bug.cgi?id=170925>.

No functionality has changed. So, no new tests.

  • platform/URL.cpp: Remove an outdated comment about protocolIs(StringView, const char*).

This overload was removed in r212508.
(WebCore::protocolIsInternal): Added.
(WebCore::protocolIs): Implemented in terms of WebCore::protocolIsInternal().
(WebCore::URL::protocolIs): Ditto.
(WebCore::protocolIsJavaScript): Added; overload that takes a StringView.
(WebCore::mimeTypeFromDataURL): Modified to use WebCore::protocolIsInternal().

  • platform/URL.h:
2:44 PM Changeset in webkit [215948] by aestes@apple.com
  • 19 edits in trunk/Source

[macOS] WebPlaybackControlsManager needs to know when the selected text or audio track changes
https://bugs.webkit.org/show_bug.cgi?id=171434
<rdar://problem/31887922>

Reviewed by Eric Carlson.

Source/WebCore:

  • dom/GenericEventQueue.cpp:

(WebCore::GenericEventQueue::hasPendingEventsOfType): Added to check if a pending event
exists of a certain type.

  • dom/GenericEventQueue.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setSelectedTextTrack): Even if no track modes change, fire a
change event when the track to select is off or automatic so that
WebPlaybackSessionModelMediaElement detects the change.

  • html/track/TrackListBase.cpp:

(TrackListBase::isChangeEventScheduled): Returns true if m_asyncEventQueue has a pending
change event.

  • html/track/TrackListBase.h:
  • platform/cocoa/WebPlaybackSessionModel.h:

(WebCore::WebPlaybackSessionModelClient::audioMediaSelectionIndexChanged):
(WebCore::WebPlaybackSessionModelClient::legibleMediaSelectionIndexChanged):

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::setMediaElement): Registered/unregistered for
the change event on the audio and text tracks.
(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName): Called
updateMediaSelectionIndices() when the change event fires.
(WebCore::WebPlaybackSessionModelMediaElement::updateMediaSelectionOptions): Renamed from
updateLegibleOptions().
(WebCore::WebPlaybackSessionModelMediaElement::updateMediaSelectionIndices): Called
audioMediaSelectionIndexChanged() and legibleMediaSelectionIndexChanged() on m_clients with
the updated indices.
(WebCore::WebPlaybackSessionModelMediaElement::legibleMediaSelectedIndex): Fixed a bug
where selectedIndex would never be set to offIndex if offIndex is 0 (which it usually is).
(WebCore::WebPlaybackSessionModelMediaElement::updateLegibleOptions): Renamed to
updateMediaSelectionOptions().

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager setAudioMediaSelectionIndex:]): Set
_currentAudioTouchBarMediaSelectionOption to the object at selectedIndex and manually
triggered a KVO notification. We can't call -setCurrentAudioTouchBarMediaSelectionOption:
here since that will send a message back to the Web process.
(-[WebPlaybackControlsManager setLegibleMediaSelectionIndex:]): Ditto for
_currentLegibleTouchBarMediaSelectionOption.

  • platform/mac/WebPlaybackSessionInterfaceMac.h:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionIndexChanged): Called
-[WebPlaybackControlsManager setAudioMediaSelectionIndex:].
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionIndexChanged): Called
-[WebPlaybackControlsManager setLegibleMediaSelectionIndex:].

Source/WebKit2:

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionIndex): Set
m_audioMediaSelectedIndex and notified clients.
(WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionIndex): Ditto for
m_legibleMediaSelectedIndex.
(WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionIndex): Called
WebPlaybackSessionModelContext::setAudioMediaSelectionIndex().
(WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionIndex): Called
WebPlaybackSessionModelContext::setLegibleMediaSelectionIndex().

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionInterfaceContext::audioMediaSelectionIndexChanged): Called
WebPlaybackSessionManager:: audioMediaSelectionIndexChanged().
(WebKit::WebPlaybackSessionInterfaceContext::legibleMediaSelectionIndexChanged): Called
WebPlaybackSessionManager::legibleMediaSelectionIndexChanged().
(WebKit::WebPlaybackSessionManager::audioMediaSelectionIndexChanged): Sent
WebPlaybackSessionManagerProxy::SetAudioMediaSelectionIndex().
(WebKit::WebPlaybackSessionManager::legibleMediaSelectionIndexChanged): Sent
WebPlaybackSessionManagerProxy::SetLegibleMediaSelectionIndex().

2:22 PM Changeset in webkit [215947] by dbates@webkit.org
  • 4 edits in trunk/Source/WTF

Add StringView::toExistingAtomicString()
https://bugs.webkit.org/show_bug.cgi?id=171405

Reviewed by Andreas Kling.

Similar to the reasons for JSString::toExistingAtomicString() we should expose a way to
convert a StringView to an existing atomic string. Looking up an atomic string is more
efficient that creating one, which requires a lookup and memory allocation.

We are not making use of StringView::toExistingAtomicString() now, but will in the patch
for <https://bugs.webkit.org/show_bug.cgi?id=170925>.

  • wtf/text/AtomicStringImpl.cpp:

(WTF::AtomicStringImpl::lookUp): Modified to take a const LChar*/UChar*.
(WTF::AtomicStringImpl::lookUpInternal): Renamed to AtomicStringImpl::lookup() to avoid
an extra function call.

  • wtf/text/AtomicStringImpl.h:
  • wtf/text/StringView.h:

(WTF::StringView::toExistingAtomicString): Added.

2:16 PM Changeset in webkit [215946] by Chris Dumez
  • 9 edits
    1 copy
    2 adds in trunk

Range.getClientRects() / getBoundingClientRect() should return DOMRect types
https://bugs.webkit.org/show_bug.cgi?id=171393

Reviewed by Simon Fraser.

Source/WebCore:

Range.getClientRects() / getBoundingClientRect() should return DOMRect types:

Test: fast/dom/Range/getBoundingClientRect-getClientRects-return-type.html

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/DOMRect.cpp: Copied from Source/WebCore/dom/DOMRect.h.

(WebCore::createDOMRectVector):

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

(WebCore::Element::getClientRects):

  • dom/Range.cpp:

(WebCore::Range::getClientRects):
(WebCore::Range::getBoundingClientRect):

  • dom/Range.h:
  • dom/Range.idl:

LayoutTests:

Add layout test coverage.

  • fast/dom/Range/getBoundingClientRect-getClientRects-return-type-expected.txt: Added.
  • fast/dom/Range/getBoundingClientRect-getClientRects-return-type.html: Added.
2:02 PM Changeset in webkit [215945] by Chris Dumez
  • 8 edits
    1 delete in trunk

Tweak window.open features argument tokenizer to match HTML standard and Edge
https://bugs.webkit.org/show_bug.cgi?id=170548

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt:

Rebaseline test now that more checks are passing. The remaining failures are because the test currently expects "noopener=0" / "noopener=false" to activate
the 'noopener' feature. The test matches the specification which currently says that if the 'noopener' key is present, then the 'noopener' feature should be
activated, no matter its value. However, I am intentionally not making this change yet because:

  • This behavior would be inconsistent with other Window features
  • There is upstream discussion on this (https://github.com/whatwg/html/issues/2600) and the current feedback is that the specification should likely change to treat 'noopener' more consistently with other features.

I will follow-up once the specification / test settles.

  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html:

Re-sync test from upstream after https://github.com/w3c/web-platform-tests/pull/5715.

Source/WebCore:

Update window.open() features argument tokenizer to match HTML standard:

Also update window.open() to return null instead of the window when
the 'noopener' feature is activated, as per:

No new tests, rebaselined existing test.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):
Update window.open() to return null instead of the window when
the 'noopener' feature is activated, as per:

  • page/WindowFeatures.cpp:

(WebCore::isSeparator):
Treat all ASCII spaces as feature separators, as per:

This has the effect of adding U+000C (FormFeed) as a separator.

(WebCore::processFeaturesString):
Align tokenizing code with the specification:

In particular, the following changes were made:

  • After the key, skip to first '=', but don't skip past a ',' or a non-separator. The "or a non-separator" part is new in the spec (step 3.6.1) and is now implemented.
  • After looking for the '=', only treat what follows as a value if the current character is a separator. This is as per step 7 in the spec.

These changes now cause us to parse 'foo noopener=1' as ('foo', ), ('noopener', '1').

1:57 PM Changeset in webkit [215944] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

Implement ondevicechange
https://bugs.webkit.org/show_bug.cgi?id=169872

Unreviewed, remove some dead code accidentally committed in r215929.

  • platform/mediastream/CaptureDeviceManager.cpp:
1:52 PM Changeset in webkit [215943] by Chris Dumez
  • 8 edits in trunk

Update DOMTokenList.replace() to match the latest DOM specification
https://bugs.webkit.org/show_bug.cgi?id=171388

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Re-sync web-platform-test after:

This adds test coverage for the behavior change in this patch.

  • web-platform-tests/dom/nodes/Element-classlist.html:

Source/WebCore:

Update DOMTokenList.replace() to match the latest DOM specification after:

The latest spec text is at:

The behavior change in this patch causes (a, b, c).replace(a, c) to return
(c, b) instead of (b, c). This new behavior is aligned with Firefox as well.

No new tests, updated existing test.

  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::replace):

Source/WTF:

Add Vector::findMatching() API which takes in a lambda function for convenience.
Add optional startIndex parameter to Vector::removeFirstMatching() / removeAllMatching()
to remove items only after given index.

  • wtf/Vector.h:

(WTF::minCapacity>::findMatching):
(WTF::minCapacity>::find):
(WTF::minCapacity>::removeFirstMatching):
(WTF::minCapacity>::removeAllMatching):

Tools:

Add API test coverage for new Vector API.

  • TestWebKitAPI/Tests/WTF/Vector.cpp:

(TestWebKitAPI::TEST):

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

WebKitTestRunner/DumpRenderTree prevent device from sleeping
https://bugs.webkit.org/show_bug.cgi?id=170731

Reviewed by Alex Christensen.

While running layout tests on a device, the device should not be put asleep.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(dumpRenderTree): Disable idle timer.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformInitialize): Ditto.

1:48 PM Changeset in webkit [215941] by beidson@apple.com
  • 34 edits
    2 copies in trunk

Start of support for multiple WebsiteDataStore/SessionIDs per process
https://bugs.webkit.org/show_bug.cgi?id=171422

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by API tests.

  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::ensureSession):

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

  • CMakeLists.txt:
  • WebKit2.xcodeproj/project.pbxproj:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::destroyPrivateBrowsingSession): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/RemoteNetworkingContext.h:
  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • Shared/WebsiteDataStoreParameters.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h.

(WebKit::WebsiteDataStoreParameters::WebsiteDataStoreParameters):
(WebKit::WebsiteDataStoreParameters::encode):
(WebKit::WebsiteDataStoreParameters::decode):

  • Shared/WebsiteDataStoreParameters.h: Copied from Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h.
  • UIProcess/API/APIWebsiteDataStore.cpp:

(API::WebsiteDataStore::defaultDataStore):
(API::WebsiteDataStore::createLegacy):
(API::WebsiteDataStore::WebsiteDataStore):
(API::WebsiteDataStore::create): Deleted.

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

(-[WKWebsiteDataStore _initWithConfiguration:]):

  • UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:

(webkitWebsiteDataManagerCreate):
(webkitWebsiteDataManagerGetDataStore):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_weakPtrFactory):

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

(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::pageAddedToProcess):
(WebKit::WebProcessPool::pageRemovedFromProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::create):
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:

(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
(WebKit::WebFrameNetworkingContext::storageSession):

  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:

(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):

  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::addWebsiteDataStore):
(WebKit::WebProcess::destroySession):
(WebKit::WebProcess::destroyPrivateBrowsingSession): Deleted.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

1:43 PM Changeset in webkit [215940] by Chris Dumez
  • 5 edits in trunk

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

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

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

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

Source/WebCore:

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

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

No new tests, updated existing test.

  • platform/URLParser.cpp:
1:42 PM Changeset in webkit [215939] by commit-queue@webkit.org
  • 25 edits in trunk

Adding a runtime flag specific to MediaDevices
https://bugs.webkit.org/show_bug.cgi?id=171433

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

Source/WebCore:

Covered by existing tests.

Adding a preference for MediaDevices.
Setting media devices runtime flag to false by default.
Setting peer connection and media stream flags to true by default.
Activating mediaDevices and getUserMedia Navigator properties based on media devices flag.

  • Modules/mediastream/NavigatorMediaDevices.idl:
  • Modules/mediastream/NavigatorUserMedia.idl:
  • page/RuntimeEnabledFeatures.cpp:

(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::mediaDevicesEnabled):
(WebCore::RuntimeEnabledFeatures::setMediaDevicesEnabled):

Source/WebKit/mac:

Adding a preference for MediaDevices.
Setting media devices runtime flag to false by default.
Setting peer connection and media stream flags to true by default.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences mediaDevicesEnabled]):
(-[WebPreferences setMediaDevicesEnabled:]):

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

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Adding a preference for MediaDevices.
Setting media devices runtime flag to false by default.
Setting peer connection and media stream flags to true by default.
Sending microphone sandbox extension based on media devices and not media stream flag.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetMediaDevicesEnabled):
(WKPreferencesGetMediaDevicesEnabled):

  • UIProcess/API/C/WKPreferencesRef.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Updating WTR and DRT as peer connection and media stream runtime flags are enabled by default.
Setting media devices runtime flag to true for WTR and DRT.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):

  • TestWebKitAPI/Tests/WebKit2/EnumerateMediaDevices.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setMediaDevicesEnabled):
(WTR::TestRunner::setMediaStreamEnabled): Deleted.
(WTR::TestRunner::setPeerConnectionEnabled): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

1:13 PM Changeset in webkit [215938] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

LayoutTests/js/dom/Promise-static-all/race.html are flakey - Unhandled Promise Rejection messages
https://bugs.webkit.org/show_bug.cgi?id=171445

Reviewed by Saam Barati.

  • js/dom/Promise-static-all.html:
  • js/dom/Promise-static-race.html:

Silence the console messages for unhandled rejections in this test.
There are unhandled rejections and messages sometimes appear
depending on the order of events on the page. The messages are not
important for this test so just mute them.

12:53 PM Changeset in webkit [215937] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, skip imported/w3c/web-platform-tests/html/semantics/tabular-data/processing-model-1/span-limits.html in Debug builds

This test is slow.

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

Mark imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171094

Unreviewed test gardening.

12:46 PM Changeset in webkit [215935] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

Implement ondevicechange
https://bugs.webkit.org/show_bug.cgi?id=169872

Unreviewed, fix test crash.

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::addDevicesChangedObserver): "nextToken" must be static.

12:08 PM Changeset in webkit [215934] by dino@apple.com
  • 4 edits
    1 add in trunk

[WebGPU] Label MTLCommandQueues with a prefix for internal telemetry
https://bugs.webkit.org/show_bug.cgi?id=171441
<rdar://problem/31826915>

Reviewed by Tim Horton.

Source/WebCore:

Prefix any label that is set by the WebGPU API so that
our telemetry can identify the use. Don't expose that
prefix to the API though.

New API Test: GPUCommandQueue

  • platform/graphics/cocoa/GPUCommandQueueMetal.mm:

(WebCore::GPUCommandQueue::GPUCommandQueue):
(WebCore::GPUCommandQueue::label):
(WebCore::GPUCommandQueue::setLabel):

Tools:

Add an API test for GPUCommandQueue, exercising creation
and setting the label.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm: Added.

(TestWebKitAPI::TEST_F):

11:39 AM Changeset in webkit [215933] by Ryan Haddad
  • 2 edits in trunk/LayoutTests/imported/w3c

Rebaseline imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl.html after r215916.

Unreviewed test gardening.

  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:
11:17 AM Changeset in webkit [215932] by jdiggs@igalia.com
  • 7 edits
    2 adds in trunk

[ATK] aria-modal="true" should be exposed via ATK_STATE_MODAL
https://bugs.webkit.org/show_bug.cgi?id=171188

Reviewed by Chris Fleizach.

Source/WebCore:

Include ATK_STATE_MODAL in the AtkObject's state set if the accessible
element's node is the current ARIA modal node.

Test: accessibility/gtk/aria-modal-state-exposed.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isAriaModalNode):

  • accessibility/AccessibilityObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(setAtkStateSetFromCoreObject):

Tools:

Add "AXModal" attribute string so that we can test the state's exposure.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::boolAttributeValue):

LayoutTests:

  • accessibility/gtk/aria-modal-state-exposed-expected.txt: Added.
  • accessibility/gtk/aria-modal-state-exposed.html: Added.
10:52 AM Changeset in webkit [215931] by Ryan Haddad
  • 5 edits in trunk/LayoutTests

Rebaselining test after r215916.
https://bugs.webkit.org/show_bug.cgi?id=171438

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-04-28

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
10:51 AM Changeset in webkit [215930] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Revert instrumentation from https://bugs.webkit.org/show_bug.cgi?id=170086 that is no longer needed.
https://bugs.webkit.org/show_bug.cgi?id=170094

Reviewed by JF Bastien and Keith Miller.

  • heap/Heap.cpp:

(JSC::Heap::resumeThePeriphery):

10:22 AM Changeset in webkit [215929] by eric.carlson@apple.com
  • 25 edits
    2 adds in trunk

Implement ondevicechange
https://bugs.webkit.org/show_bug.cgi?id=169872
<rdar://problem/28945035>

Reviewed by Jer Noble.

Source/WebCore:

Test: fast/mediastream/device-change-event.html

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::MediaDevices): Register for devicechange callbacks.
(WebCore::MediaDevices::~MediaDevices): Unregister.
(WebCore::MediaDevices::scheduledEventTimerFired):

  • Modules/mediastream/MediaDevices.h:
  • Modules/mediastream/MediaDevices.idl:
  • Modules/mediastream/MediaDevicesEnumerationRequest.cpp:

(WebCore::MediaDevicesEnumerationRequest::setDeviceInfo): Remove unnecessary instance variables.

  • Modules/mediastream/MediaDevicesEnumerationRequest.h:
  • Modules/mediastream/MediaDevicesRequest.cpp:

(WebCore::MediaDevicesRequest::start): Remove m_idHashSalt, it isn't used. RealtimeMediaSourceCenter
now has the method to hash ids and group IDs.
(WebCore::hashString): Deleted.
(WebCore::MediaDevicesRequest::hashID): Deleted.

  • Modules/mediastream/MediaDevicesRequest.h:
  • dom/Document.h:

(WebCore::Document::setDeviceIDHashSalt):
(WebCore::Document::deviceIDHashSalt):

  • dom/EventNames.h: Add devicechange.
  • dom/EventTargetFactory.in: Add MediaDevices.
  • html/HTMLAttributeNames.in: Add ondevicechange.
  • platform/mediastream/CaptureDeviceManager.cpp:

(WebCore::CaptureDeviceManager::captureDeviceFromPersistentID): Renamed from captureDeviceFromDeviceID
and changed to return a std::optional<CaptureDevice>.
(WebCore::CaptureDeviceManager::captureDeviceFromDeviceID): Deleted.

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::addStringToSHA): New, add string bytes to SHA1. Moved from MediaDevicesRequest
so we can use for in testing.
(WebCore::RealtimeMediaSourceCenter::hashStringWithSalt): Generate hash for a string with a
salt. Moved from MediaDevicesRequest so we can use for in testing.
(WebCore::RealtimeMediaSourceCenter::captureDeviceWithUniqueID): Find a CaptureDevice given
a unique ID and the process hash salt.
(WebCore::RealtimeMediaSourceCenter::setDeviceEnabled): Enable/disable a device. Used for
layout tests only.
(WebCore::RealtimeMediaSourceCenter::addDevicesChangedObserver): Add a devices changed listener.
(WebCore::RealtimeMediaSourceCenter::removeDevicesChangedObserver): Remove a listener.
(WebCore::RealtimeMediaSourceCenter::captureDevicesChanged): Notify listeners.

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

(WebCore::AVCaptureDeviceManager::addDevicesChangedObserver): Update for change to captureDeviceFromDeviceID.

  • platform/mock/MockRealtimeMediaSource.cpp:

(WebCore::MockRealtimeMediaSource::audioDevices): All devices are enabled by default.
(WebCore::MockRealtimeMediaSource::videoDevices): Ditto.

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Drive-by cleanup: use the vector
of devices instead of making assumptions about the number.
(WebCore::MockRealtimeMediaSourceCenter::getMediaStreamDevices): Only include enabled devices.
(WebCore::MockRealtimeMediaSourceCenter::setDeviceEnabled): Enable or disable a device.

  • platform/mock/MockRealtimeMediaSourceCenter.h:
  • testing/Internals.cpp:

(WebCore::Internals::setMediaDeviceState): Enable or disable a mock capture device.

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

LayoutTests:

  • fast/mediastream/device-change-event-expected.txt: Added.
  • fast/mediastream/device-change-event.html: Added.
10:16 AM Changeset in webkit [215928] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix memory corruption issue after r215883.
https://bugs.webkit.org/show_bug.cgi?id=171365

Reviewed by Brady Eidson.

This fixes a crash when starting WebKit2.

  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::NetworkStorageSession):
Initialize m_platformCookieStorage with the default constructor of RetainPtr,
then call NetworkStorageSession::cookieStorage which checks m_platformCookieStorage
for null. It was checking uninitialized memory when we had m_platformCookieStorage
in the initializer list.

10:08 AM Changeset in webkit [215927] by jdiggs@igalia.com
  • 4 edits
    2 adds in trunk

AX: Implement aria-value support for focusable separators
https://bugs.webkit.org/show_bug.cgi?id=171169

Reviewed by Chris Fleizach.

Source/WebCore:

Add SplitterRole to the roles which support range value and are considered a range
control, as long as the SplitterRole element is focusable. Also replace ATK's role-
based check with a call to supportsRangeValue() when determining if the AtkValue
interface should be implemented.

Test: accessibility/separator-values.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isRangeControl):
(WebCore::AccessibilityObject::supportsRangeValue):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(getInterfaceMaskFromObject):

LayoutTests:

  • accessibility/separator-values-expected.txt: Added.
  • accessibility/separator-values.html: Added.
9:28 AM Changeset in webkit [215926] by jdiggs@igalia.com
  • 5 edits
    2 adds in trunk

[ATK] GridCellRole should implement AtkTableCell (regression?)
https://bugs.webkit.org/show_bug.cgi?id=171179

Reviewed by Chris Fleizach.

Source/WebCore:

Add GridCellRole to the group of roles which should implement AtkTableCell.

Test: accessibility/gtk/interface-table-cell.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(getInterfaceMaskFromObject):

Tools:

Add new "AXInterfaceTableCell" attribute so that we can test whether or
not there is an implementation of AtkTableCell (i.e. without risking false
negatives from bugs in the interface's implementation).

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::boolAttributeValue):

LayoutTests:

  • accessibility/gtk/interface-table-cell-expected.txt: Added.
  • accessibility/gtk/interface-table-cell.html: Added.
8:59 AM Changeset in webkit [215925] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.19/Source/WebCore

Cherry-pick r215917. rdar://problem/31878197

4:53 AM Changeset in webkit [215924] by magomez@igalia.com
  • 16 edits in trunk

REGRESSION(r215211): [GTK] Several webgl related tests are failing
https://bugs.webkit.org/show_bug.cgi?id=170730

Reviewed by Said Abou-Hallawa.

Source/WebCore:

There is a wrong situation in the image decoders where the complete data has been assigned
to them but the size of the image hasn't been decoded yet. This is causing rendering
issues in webgl when decoding the images used as textures. To fix this, we refactor how the
encoded data status is stored to avoid that situation: the status is handled completely
by ImageDecoder.h, and it's the one forcing the decode of the size when data gets assigned
to the decoders.

Covered by existent tests.

  • platform/image-decoders/ImageDecoder.h:

(WebCore::ImageDecoder::isAllDataReceived):
(WebCore::ImageDecoder::setData):
(WebCore::ImageDecoder::encodedDataStatus):
(WebCore::ImageDecoder::isSizeAvailable):
(WebCore::ImageDecoder::setSize):
(WebCore::ImageDecoder::setFailed):
(WebCore::ImageDecoder::failed):

  • platform/image-decoders/bmp/BMPImageDecoder.cpp:

(WebCore::BMPImageDecoder::frameBufferAtIndex):
(WebCore::BMPImageDecoder::decode):
(WebCore::BMPImageDecoder::encodedDataStatus): Deleted.

  • platform/image-decoders/bmp/BMPImageDecoder.h:
  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::frameCount):
(WebCore::GIFImageDecoder::frameBufferAtIndex):
(WebCore::GIFImageDecoder::decode):
(WebCore::GIFImageDecoder::encodedDataStatus): Deleted.

  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/ico/ICOImageDecoder.cpp:

(WebCore::ICOImageDecoder::setData):
(WebCore::ICOImageDecoder::frameCount):
(WebCore::ICOImageDecoder::frameBufferAtIndex):
(WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
(WebCore::ICOImageDecoder::decode):
(WebCore::ICOImageDecoder::decodeAtIndex):
(WebCore::ICOImageDecoder::encodedDataStatus): Deleted.

  • platform/image-decoders/ico/ICOImageDecoder.h:
  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::frameBufferAtIndex):
(WebCore::JPEGImageDecoder::decode):
(WebCore::JPEGImageDecoder::encodedDataStatus): Deleted.

  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::frameBufferAtIndex):
(WebCore::PNGImageDecoder::decode):
(WebCore::PNGImageDecoder::encodedDataStatus): Deleted.

  • platform/image-decoders/png/PNGImageDecoder.h:
  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::frameBufferAtIndex):
(WebCore::WEBPImageDecoder::decode):
(WebCore::WEBPImageDecoder::encodedDataStatus): Deleted.

  • platform/image-decoders/webp/WEBPImageDecoder.h:

LayoutTests:

Adjust test expectations for the tests that were failing. They must pass now.

  • platform/gtk/TestExpectations:
12:04 AM Changeset in webkit [215923] by beidson@apple.com
  • 8 edits in trunk/Source/WebKit2

Teach WebProcessPool to track a map of SessionIDs to WebPageProxys to manage their lifetime
https://bugs.webkit.org/show_bug.cgi?id=171408

Reviewed by Alex Christensen.

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::sessionID):

  • UIProcess/API/APIPageConfiguration.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::close):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::pageAddedToProcess):
(WebKit::WebProcessPool::pageRemovedFromProcess):

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

(WebKit::WebProcessProxy::createWebPage):
(WebKit::WebProcessProxy::addExistingWebPage):
(WebKit::WebProcessProxy::removeWebPage):

  • UIProcess/WebProcessProxy.h:
Note: See TracTimeline for information about the timeline view.