Timeline



May 5, 2017:

10:19 PM Changeset in webkit [216309] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Put does not properly consult the prototype chain
https://bugs.webkit.org/show_bug.cgi?id=171754

Reviewed by Saam Barati.

We should do a follow up that cleans up the rest of put. See:
https://bugs.webkit.org/show_bug.cgi?id=171759

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):

9:55 PM Changeset in webkit [216308] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[WTF] Use memoryFootprint for MemoryUsage retrieval in Linux
https://bugs.webkit.org/show_bug.cgi?id=171757

Reviewed by Michael Catanzaro.

This patch leverages memoryFootprint() to retrieve physical footprint in Linux.

  • wtf/linux/MemoryPressureHandlerLinux.cpp:

(WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

9:41 PM Changeset in webkit [216307] by Alan Bujtas
  • 3 edits
    2 adds in trunk

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

Reviewed by Simon Fraser.

Source/WebCore:

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

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

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

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

  • accessibility/AXObjectCache.cpp:

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

LayoutTests:

  • accessibility/crash-when-renderers-are-added-back-to-deferred-list-expected.txt: Added.
  • accessibility/crash-when-renderers-are-added-back-to-deferred-list.html: Added.
8:57 PM Changeset in webkit [216306] by jfbastien@apple.com
  • 25 edits in trunk/Source/JavaScriptCore

WebAssembly: Air::Inst::generate crashes on large binary on A64
https://bugs.webkit.org/show_bug.cgi?id=170215

Reviewed by Filip Pizlo.

ARM can't encode all offsets in a single instruction. We usualy
handle this type of detail early, or the macro assembler uses a
scratch register to take care of the large immediate. After
register allocation we assumed that we would never get large
offsets, and asserted this was the case. That was a fine
assumption with JavaScript, but WebAssembly ends up generating
stack frames which are too big to encode.

There are two places that needed to be fixed:

  1. AirGenerate
  2. AirLowerStackArgs

We now unconditionally pin the dataTempRegister on ARM64, and use
it when immediates don't fit.

Number 1. is easy: we're just incrementing SP, make sure we can
use a scratch register when that happens.

Number 2. is more complex: not all Inst can receive a stack
argument whose base register isn't SP or FP. Specifically,
Patchpoints and Stackmaps get very sad because they just want to
know the offset value, but when we materialize the offset as
follows:

Move (spill337), (spill201), %r0, @8735

Becomes (where %r16 is dataTempRegister):

Move $1404, %r16, @8736
Add64 %sp, %r16, @8736
Move (%r16), 2032(%sp), %r0, @8736

The code currently doesn't see through our little dance. To work
around this issue we introduce a new Air Arg kind:
ExtendedOffsetAddr. This is the same as a regular Addr, but with
an offset which may be too big to encode. Opcodes then declare
whether their arguments can handle such inputs, and if so we
generate them, otherwise we generate Addr as shown above.

None of this affects x86 because it can always encode large
immediates.

This patch also drive-by converts some uses of override to
final. It makes the code easier to grok, and maybe helps the
optimizer sometimes but really that doens't matter.

  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM64.h:
  • b3/B3CheckSpecial.cpp:

(JSC::B3::CheckSpecial::admitsExtendedOffsetAddr):

  • b3/B3CheckSpecial.h:
  • b3/B3Common.cpp:

(JSC::B3::pinnedExtendedOffsetAddrRegister): keep the CPU-specific
pinning information in a cpp file

  • b3/B3Common.h:
  • b3/B3PatchpointSpecial.cpp:

(JSC::B3::PatchpointSpecial::admitsExtendedOffsetAddr):

  • b3/B3PatchpointSpecial.h:
  • b3/B3StackmapSpecial.cpp:

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

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

(JSC::B3::Air::Arg::isStackMemory):
(JSC::B3::Air::Arg::jsHash):
(JSC::B3::Air::Arg::dump):
(WTF::printInternal):
(JSC::B3::Air::Arg::stackAddrImpl): Deleted. There was only one
use of this (in AirLowerStackArgs) and it was now confusing to
split the logic up between these two. Inline the code that used to
be here into its one usepoint instead.

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::extendedOffsetAddr):
(JSC::B3::Air::Arg::isExtendedOffsetAddr):
(JSC::B3::Air::Arg::isMemory):
(JSC::B3::Air::Arg::base):
(JSC::B3::Air::Arg::offset):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isValidForm):
(JSC::B3::Air::Arg::forEachTmpFast):
(JSC::B3::Air::Arg::forEachTmp):
(JSC::B3::Air::Arg::asAddress):
(JSC::B3::Air::Arg::stackAddr): Deleted.

  • b3/air/AirCCallSpecial.cpp:

(JSC::B3::Air::CCallSpecial::isValid):
(JSC::B3::Air::CCallSpecial::admitsExtendedOffsetAddr):
(JSC::B3::Air::CCallSpecial::generate):

  • b3/air/AirCCallSpecial.h:
  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::Code):
(JSC::B3::Air::Code::pinRegister): Check that the register wasn't
pinned before pinning it. It's likely a bug to pin the same
register twice.

  • b3/air/AirCustom.h:

(JSC::B3::Air::PatchCustom::admitsExtendedOffsetAddr):
(JSC::B3::Air::CCallCustom::admitsExtendedOffsetAddr):
(JSC::B3::Air::ShuffleCustom::admitsExtendedOffsetAddr):
(JSC::B3::Air::EntrySwitchCustom::admitsExtendedOffsetAddr):
(JSC::B3::Air::WasmBoundsCheckCustom::admitsExtendedOffsetAddr):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::generate):

  • b3/air/AirInst.h:
  • b3/air/AirInstInlines.h:

(JSC::B3::Air::Inst::admitsExtendedOffsetAddr):

  • b3/air/AirLowerStackArgs.cpp:

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

  • b3/air/AirPrintSpecial.cpp:

(JSC::B3::Air::PrintSpecial::admitsExtendedOffsetAddr):
(JSC::B3::Air::PrintSpecial::generate):

  • b3/air/AirPrintSpecial.h:
  • b3/air/AirSpecial.h:
  • b3/air/opcode_generator.rb:
8:27 PM Changeset in webkit [216305] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
https://bugs.webkit.org/show_bug.cgi?id=171736

Reviewed by Tim Horton.

Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
--guard-malloc.

Because an image format is not supported, the ImageObserver of the Image
is deleted then the Image itself is deleted. In BitmapImage destructor,
we make a call which ends up accessing the deleted ImageObserver.

To fix this, we need to change the BitImage destructor to avoid calling
ImageFrameCache::decodedSizeChanged() since it is not really needed.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::~BitmapImage):

6:59 PM Changeset in webkit [216304] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r212998): Web Inspector: bad spacing of go-to arrow for HTTP POST request data
https://bugs.webkit.org/show_bug.cgi?id=171674

Reviewed by Matt Baker.

  • UserInterface/Views/DetailsSection.css:

(body[dir=ltr] .details-section > .content > .group > .row.simple > .value .go-to-arrow):
(body[dir=rtl] .details-section > .content > .group > .row.simple > .value .go-to-arrow):
Swap margin-left and margin-right. This regressed when RTL support was added.

6:39 PM Changeset in webkit [216303] by timothy_horton@apple.com
  • 11 edits in trunk/Source

[Mac] Adjust cursor position for dragged link (and stop it from moving based on how fast you are dragging)
https://bugs.webkit.org/show_bug.cgi?id=171764
<rdar://problem/32005865>

Reviewed by Simon Fraser.

  • page/DragController.cpp:

(WebCore::DragController::startDrag):
Compute dragImageAnchorPoint only if it is needed.
Don't compute a random unused imageRect.
Factor link drag image offset computation out into DragImage functions
for platforms to override.

Pass dragOrigin (the mouseDown point), not mouseDraggedPoint, to
doSystemDrag, just like all the other drag types. This plus the
WebKit2 change makes the link stable vs. the cursor, instead of
positioned based on how fast you move after the mouse down.

  • page/DragController.h:
  • page/gtk/DragControllerGtk.cpp:
  • page/mac/DragControllerMac.mm:
  • page/win/DragControllerWin.cpp:

Move LinkDragBorderInset into DragImage, and share between the non-Mac platforms.

  • platform/DragImage.cpp:

(WebCore::dragOffsetForLinkDragImage):
(WebCore::anchorPointForLinkDragImage):

  • platform/DragImage.h:

As previously mentioned, move the computation of drag image offset here.

  • platform/mac/DragImageMac.mm:

(WebCore::dragOffsetForLinkDragImage):
(WebCore::anchorPointForLinkDragImage):
Put the new drag image to the bottom right of the cursor.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::dragImageForView):
Always use the last mouse down event to originate the drag; this was a 2004 hack
to work around a seemingly-fixed macOS bug that somehow propagated into WebKit2.
With WebKit2, this would cause trouble because currentEvent could move on
during the bounce to the Web Content process and back, causing the delta between
clientPoint and the mouse point to be dependent on timing, and thus causing the
link to sit at timing-dependent distance from the cursor, instead of exactly
where dragOffsetForLinkDragImage placed it.

6:10 PM Changeset in webkit [216302] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark compositing/tiling/non-active-window-tiles-size.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=171763

Unreviewed test gardening.

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

  • platform/mac-wk2/TestExpectations:
5:33 PM Changeset in webkit [216301] by oliver@apple.com
  • 12 edits in trunk

Move trivial String prototype functions to JS builtins
https://bugs.webkit.org/show_bug.cgi?id=171737

Reviewed by Saam Barati.

Source/JavaScriptCore:

Super simple change to migrate all of the old school
html-ifying string operations to builtin JS.

Core implementation is basically a 1-for-1 match to the spec.

  • builtins/StringPrototype.js:

(globalPrivate.createHTML):
(anchor):
(big):
(blink):
(bold):
(fixed):
(fontcolor):
(fontsize):
(italics):
(link):
(small):
(strike):
(sub):
(sup):

  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncBig): Deleted.
(JSC::stringProtoFuncSmall): Deleted.
(JSC::stringProtoFuncBlink): Deleted.
(JSC::stringProtoFuncBold): Deleted.
(JSC::stringProtoFuncFixed): Deleted.
(JSC::stringProtoFuncItalics): Deleted.
(JSC::stringProtoFuncStrike): Deleted.
(JSC::stringProtoFuncSub): Deleted.
(JSC::stringProtoFuncSup): Deleted.
(JSC::stringProtoFuncFontcolor): Deleted.
(JSC::stringProtoFuncFontsize): Deleted.
(JSC::stringProtoFuncAnchor): Deleted.
(JSC::stringProtoFuncLink): Deleted.

LayoutTests:

Updated output

  • js/dom/string-anchor-expected.txt:
  • js/dom/string-anchor.html:
  • js/dom/string-fontcolor-expected.txt:
  • js/dom/string-fontcolor.html:
  • js/dom/string-fontsize-expected.txt:
  • js/dom/string-fontsize.html:
  • js/dom/string-link-expected.txt:
  • js/dom/string-link.html:
5:24 PM Changeset in webkit [216300] by commit-queue@webkit.org
  • 3 edits in trunk/Source/bmalloc

Leaks always reports "WebKit Malloc Memory Pressure Handler" dispatch_queue/source as leaking
https://bugs.webkit.org/show_bug.cgi?id=171532

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-05
Reviewed by Geoffrey Garen.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Heap.h:

Store the dispatch_source_t in a member to avoid a false positive leak.

5:17 PM Changeset in webkit [216299] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

...and now the GTK and Windows builds.

  • platform/gtk/WidgetGtk.cpp:

(WebCore::Widget::paint):

  • platform/win/WidgetWin.cpp:

(WebCore::Widget::paint):

5:08 PM Changeset in webkit [216298] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

[WTF] Do not export deleted constructor in StringView
https://bugs.webkit.org/show_bug.cgi?id=171751

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-05
Reviewed by Alexey Proskuryakov.

  • wtf/text/StringView.h:
5:08 PM Changeset in webkit [216297] by beidson@apple.com
  • 6 edits in trunk

API test WebKit2.WebsiteDataStoreCustomPaths is failing on ios-simulator.
<rdar://problem/31977294> and https://bugs.webkit.org/show_bug.cgi?id=171513

Reviewed by Andy Estes.

Source/WebCore:

Covered by API test.

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::syncAllCookies):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

5:04 PM Changeset in webkit [216296] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix iOS build.

  • platform/ios/WidgetIOS.mm:

(WebCore::Widget::paint):

5:03 PM Changeset in webkit [216295] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Remove export from Intrinsic
https://bugs.webkit.org/show_bug.cgi?id=171752

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-05
Reviewed by Alexey Proskuryakov.

  • runtime/Intrinsic.h:
4:49 PM Changeset in webkit [216294] by dino@apple.com
  • 24 edits
    5 adds in trunk

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

Reviewed by Brent Fulgham.

Source/WebCore:

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

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

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

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

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

(WebCore::ScrollView::paint):

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

(WebCore::Scrollbar::paint):

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

(WebCore::FilterOperation::shouldBeRestrictedBySecurityOrigin):

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::hasFilterThatShouldBeRestrictedBySecurityOrigin):

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

(WebCore::Widget::paint):

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::build):

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

(WebCore::PaintInfo::PaintInfo):

  • rendering/RenderLayer.cpp:

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

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

(WebCore::RenderScrollbar::paint):

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

(WebCore::RenderWidget::paintContents):

Source/WebKit2:

Update parameter lists.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::paint):

  • WebProcess/Plugins/PluginView.h:

LayoutTests:

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

  • http/tests/css/filters-on-iframes-expected.html: Added.
  • http/tests/css/filters-on-iframes.html: Added.
  • http/tests/css/resources/blank.html: Added.
  • http/tests/css/resources/references-external.html: Added.
  • http/tests/css/resources/solid-red.html: Added.
4:46 PM Changeset in webkit [216293] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r216273.

This change caused an assertion failure on WK1.

Reverted changeset:

"Crash in ImageFrameCache::decodedSizeChanged() after image
load cancellation"
https://bugs.webkit.org/show_bug.cgi?id=171736
http://trac.webkit.org/changeset/216273

4:45 PM Changeset in webkit [216292] by BJ Burg
  • 4 edits in trunk

[Cocoa] Converting from WebCore::Cookie to NSHTTPCookie always marks cookies as session cookies
https://bugs.webkit.org/show_bug.cgi?id=171748
<rdar://problem/32027327>

Reviewed by Michael Catanzaro.

Source/WebCore:

The function that we use to convert from WebCore::Cookie to NSHTTPCookie was
also misusing the NSHTTPCookieDiscard property. If any value is provided for
this key, even @NO, CFNetwork interprets that to mean that the cookie has the
"session" flag.

This is known to affect cookies set via WebCookieManager, WKHTTPCookieStore,
and WebAutomationSession.

This is covered by existing test WebKit2.WKHTTPCookieStore.

  • platform/network/cocoa/CookieCocoa.mm:

(WebCore::Cookie::operator NSHTTPCookie *):
Don't include the property if the cookie is not a session cookie.

Tools:

Remove temporary workaround now that the assertion failure is fixed.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST):

4:39 PM Changeset in webkit [216291] by Simon Fraser
  • 14 edits
    7 adds in trunk

Make it possible to test rotation in iOS WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=171755

Reviewed by Tim Horton.

Tools:

Add to UIScriptController:

void simulateRotation(DeviceOrientation orientation, object callback);
void simulateRotationLikeSafari(DeviceOrientation orientation, object callback);

The former just does a view resize, as a simple WKWebView app would do. The second does
animation more like MobileSafari, using _begin/_endAnimatedResize. and associated override
layout size and interface orientation. The two behaviors produce different resize and
orientationchange events and sizes, and both need to be tested.

Rotation is initiated by a call on UIDevice, and responded to by the root view controller,
which is now a custom subclass (PlatformWebViewController).

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):

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

(WTR::toDeviceOrientation):
(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView _didEndRotation]):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(-[PlatformWebViewController viewWillTransitionToSize:withTransitionCoordinator:]):
(WTR::PlatformWebView::PlatformWebView):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::toUIDeviceOrientation):
(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):
(WTR::UIScriptController::platformClearAllCallbacks):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateRotation):
(WTR::UIScriptController::simulateRotationLikeSafari):

LayoutTests:

Two rotation tests and one that comes last to ensure that the device was not left in a rotated state.

  • fast/events/ios/rotation/basic-rotation-expected.txt: Added.
  • fast/events/ios/rotation/basic-rotation.html: Added.
  • fast/events/ios/rotation/safari-like-rotation-expected.txt: Added.
  • fast/events/ios/rotation/safari-like-rotation.html: Added.
  • fast/events/ios/rotation/zz-no-rotation-expected.txt: Added.
  • fast/events/ios/rotation/zz-no-rotation.html: Added.
4:33 PM Changeset in webkit [216290] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Ensure NSColorPickerTouchBarItem only uses sRGB colors
https://bugs.webkit.org/show_bug.cgi?id=171758
-and corresponding-
rdar://problem/28314183

Reviewed by Tim Horton.

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKTextTouchBarItemController itemForIdentifier:]):

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

Mark http/tests/loading/resourceLoadStatistics/prevalent-resource-without-user-interaction.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171756

Unreviewed test gardening.

  • platform/wk2/TestExpectations:
3:56 PM Changeset in webkit [216288] by Jonathan Bedard
  • 6 edits
    2 deletes in trunk/Tools

Use ImageDiff built by host SDK and remove ImageDiff from DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=168945
<rdar://problem/30745695>

Reviewed by David Kilzer.

Use ImageDiff built with the host machine's SDK and stop building ImageDiff with the
target SDK. These two changes must happen simultaneously because some archives will
clobber the ImageDiff from the host SDK with the ImageDiff from the target SDK.

  • DumpRenderTree/mac/Configurations/ImageDiff.xcconfig: Remove ImageDiff from project.
  • DumpRenderTree/PlatformWin.cmake: Remove ImageDiff. Note that the CMakeLists.txt in the

tools directory still includes ImageDiff.

  • DumpRenderTree/cg/ImageDiffCG.cpp: Removed.
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Removed.
  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._path_to_image_diff): Return the correct path to ImageDiff when building
locally or when running archives.

  • Scripts/webkitpy/port/image_diff.py:

(IOSSimulatorImageDiffer): Deleted.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.diff_image): Deleted.

3:53 PM Changeset in webkit [216287] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.21.0.1/Source

Versioning.

3:53 PM Changeset in webkit [216286] by matthew_hanson@apple.com
  • 4 edits in tags/Safari-604.1.21.0.1/Source

Cherry-pick r216229. rdar://problem/31978703

3:50 PM Changeset in webkit [216285] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

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

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

Did manual testing on real TURNS servers.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration): Disabling TURNS servers gathering.

3:48 PM Changeset in webkit [216284] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.21.0.1

New tag.

3:48 PM Changeset in webkit [216283] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-604.1.22

Delete tag.

3:46 PM Changeset in webkit [216282] by matthew_hanson@apple.com
  • 4 edits in tags/Safari-604.1.21/Source

Revert r216268. rdar://problem/31978703

3:45 PM Changeset in webkit [216281] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.21/Source

Revert r216270.

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

Mark test http/tests/security/module-correct-mime-types.html slow.
https://bugs.webkit.org/show_bug.cgi?id=164960

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
3:35 PM Changeset in webkit [216279] by sbarati@apple.com
  • 13 edits
    3 adds in trunk

putDirectIndex does not properly do defineOwnProperty
https://bugs.webkit.org/show_bug.cgi?id=171591
<rdar://problem/31735695>

Reviewed by Geoffrey Garen.

JSTests:

  • stress/array-prototype-splice-making-typed-array.js:

(test):

  • stress/array-species-config-array-constructor.js:

(shouldThrow):
(test):

  • stress/put-direct-index-broken-2.js: Added.

(assert):
(test):
(makeLengthWritable):
(set get restoreOldDesc):

  • stress/put-direct-index-broken.js: Added.

(whatToTest):
(tryRunning):
(tryItOut):

  • stress/put-indexed-getter-setter.js: Added.

(foo.X.prototype.set 7):
(foo.X.prototype.get 7):
(foo.X):
(foo):

Source/JavaScriptCore:

This patch fixes putDirectIndex and its JIT implementations to be
compatible with the ES6 spec. I think our code became out of date
when we implemented ArraySpeciesCreate since ArraySpeciesCreate may
return arbitrary objects. We perform putDirectIndex on that arbitrary
object. The behavior we want is as if we performed defineProperty({configurable:true, enumerable:true, writable:true}).
However, we weren't doing this. putDirectIndex assumed it could just splat
data into any descendent of JSObject's butterfly. For example, this means
we'd just splat into the butterfly of a typed array, even though a typed
array doesn't use its butterfly to store its indexed properties in the usual
way. Also, typed array properties are non-configurable, so this operation
should throw. This also means if we saw a ProxyObject, we'd just splat
into its butterfly, but this is obviously wrong because ProxyObject should
intercept the defineProperty operation.

This patch fixes this issue by adding a whitelist of cell types that can
go down putDirectIndex's fast path. Anything not in that whitelist will
simply call into defineOwnProperty.

  • bytecode/ByValInfo.h:

(JSC::jitArrayModePermitsPutDirect):

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine):

  • jit/JITOperations.cpp:
  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncSplice):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createStructure):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):

  • runtime/JSObject.cpp:

(JSC::canDoFastPutDirectIndex):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
(JSC::JSObject::putDirectIndexBeyondVectorLength): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::putDirectIndex):
(JSC::JSObject::canSetIndexQuicklyForPutDirect): Deleted.

  • runtime/JSType.h:
3:30 PM Changeset in webkit [216278] by Ryan Haddad
  • 5 edits
    2 deletes in trunk

Unreviewed, rolling out r216275.

This change broke internal builds.

Reverted changeset:

"[Cocoa] CTFontDescriptorCreateMatchingFontDescriptor() is not
case insensitive"
https://bugs.webkit.org/show_bug.cgi?id=171636
http://trac.webkit.org/changeset/216275

3:23 PM Changeset in webkit [216277] by Brent Fulgham
  • 8 edits in trunk/Source/WebKit2

[WK2][iOS][macOS] Expand sandbox to access vm.footprint_suspend
https://bugs.webkit.org/show_bug.cgi?id=171749
<rdar://problem/32019494>

Reviewed by Geoffrey Garen.

The 'sysctl' whitelist needs to be extended to support an additional VM-related feature.

  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
3:03 PM Changeset in webkit [216276] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.22

New tag.

2:54 PM Changeset in webkit [216275] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

[Cocoa] CTFontDescriptorCreateMatchingFontDescriptor() is not case insensitive
https://bugs.webkit.org/show_bug.cgi?id=171636
<rdar://problem/30811218>

Reviewed by Dean Jackson.

Source/WebCore:

LastResort is the only name which needs to be looked up case-sensitively. We can handle
this in our existing function which handles special font names (like -apple-system) to
make sure that we always do the right thing.

Test: fast/text/lastResort.html

  • platform/spi/cocoa/CoreTextSPI.h:
  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::platformFontWithFamilySpecialCase):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::platformFontWithFamilySpecialCase):

LayoutTests:

  • fast/text/lastResort-expected.html: Added.
  • fast/text/lastResort.html: Added.
2:36 PM Changeset in webkit [216274] by Yusuke Suzuki
  • 5 edits
    1 delete in trunk/Source/WTF

[GTK][JSCOnly] Merge MainThread implementations and use generic one
https://bugs.webkit.org/show_bug.cgi?id=171738

Reviewed by Michael Catanzaro.

GLib MainThread implementation is generic enough to be used in JSCOnly.
We move it to generic/ and GTK (GLib ports) and JSCOnly use it.
And we also drop GLib MainThread's isMainThread function because
generic thread ID one is enough.

This patch also cleans up initializing main thread code by using std::call_once.

  • wtf/MainThread.cpp:

(WTF::initializeMainThread):
(WTF::isMainThread):
(WTF::initializeMainThreadToProcessMainThread):
(WTF::initializeWebThread):
(WTF::canAccessThreadLocalDataForThread):
(WTF::initializeMainThreadOnce): Deleted.
(WTF::initializeMainThreadToProcessMainThreadOnce): Deleted.
(WTF::initializeWebThreadOnce): Deleted.

  • wtf/PlatformGTK.cmake:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/generic/MainThreadGeneric.cpp:

(WTF::MainThreadDispatcher::MainThreadDispatcher):
(WTF::MainThreadDispatcher::schedule):
(WTF::MainThreadDispatcher::fired):
(WTF::scheduleDispatchFunctionsOnMainThread):

  • wtf/glib/MainThreadGLib.cpp: Removed.
2:35 PM Changeset in webkit [216273] by Said Abou-Hallawa
  • 3 edits in trunk/Source/WebCore

Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
https://bugs.webkit.org/show_bug.cgi?id=171736

Reviewed by Tim Horton.

Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
--guard-malloc.

Because an image format is not supported, the ImageObserver of the Image
is deleted then the Image itself is deleted. In BitmapImage destructor,
we make a call which ends up accessing the deleted ImageObserver.

To fix this, we need to setImageObsever of the Image to-be-deleted to
nullptr. So the Image can avoid accessing its ImageObserver, while it is
being deleted. Also we can change the BitImage destructor to avoid calling
ImageFrameCache::decodedSizeChanged() since it is not really needed.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::clearImage):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::~BitmapImage):

2:15 PM Changeset in webkit [216272] by BJ Burg
  • 2 edits in trunk/Tools

API test WebKit2.WKHTTPCookieStore fails due to possible issue with handling non-session cookies
https://bugs.webkit.org/show_bug.cgi?id=171748

Unreviewed test gardening.

The assertion failure will be investigated separately in order to avoid rolling out
the fix for "secure" cookies. This assertion fails even without r216258 applied.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST):

1:52 PM Changeset in webkit [216271] by Jonathan Bedard
  • 6 edits
    2 copies in trunk/Tools

Unreviewed, rolling out r216260.

Breaks internal iOS testers

Reverted changeset:

"Use ImageDiff built by host SDK and remove ImageDiff from
DumpRenderTree"
https://bugs.webkit.org/show_bug.cgi?id=168945
http://trac.webkit.org/changeset/216260

1:52 PM Changeset in webkit [216270] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.21/Source

Versioning.

1:36 PM Changeset in webkit [216269] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unskip media/click-placeholder-not-pausing.html.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:33 PM Changeset in webkit [216268] by matthew_hanson@apple.com
  • 4 edits in tags/Safari-604.1.21/Source

Cherry-pick r216229. rdar://problem/31978703

1:31 PM Changeset in webkit [216267] by Joseph Pecoraro
  • 5 edits in trunk/LayoutTests

REGRESSION: LayoutTest streams/reference-implementation/readable-stream-templated.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=171580
<rdar://problem/32009647>

Rubber-stamped by Alexey Proskuryakov.

Rebaseline expectations. This test was previously flakey so the results were
missed unless the test was run with --force.

  • streams/reference-implementation/readable-stream-templated-expected.txt:
  • streams/reference-implementation/readable-stream-templated.html:

Silence unhandled rejections. This test did not expect unhandled promise
rejections to affect test results, so ignore them.

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

[macOS Sierra] LayoutTest http/tests/inspector/network/resource-request-headers.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170702
<rdar://problem/31616643>

Rubber-stamped by Brian Burg.

  • platform/mac-wk2/TestExpectations:
  • http/tests/inspector/network/resource-request-headers.html:

Make this test unflakey by ensuring we wait for the load to complete.

1:23 PM Changeset in webkit [216265] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit2

Resource Load Statistics: Don't cover in-memory and disk caches during website data removal
https://bugs.webkit.org/show_bug.cgi?id=171741
<rdar://problem/32020691>

Reviewed by Brent Fulgham.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

No longer removes WebsiteDataType::DiskCache or WebsiteDataType::MemoryCache.

1:21 PM Changeset in webkit [216264] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] include JSCInlines.h in ObjectInitializationScope.cpp
https://bugs.webkit.org/show_bug.cgi?id=171744

Patch by Guillaume Emont <guijemont@igalia.com> on 2017-05-05
Reviewed by Mark Lam.

  • runtime/ObjectInitializationScope.cpp:
12:44 PM Changeset in webkit [216263] by BJ Burg
  • 4 edits in trunk/Source

CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::commonVMSlow + 57
https://bugs.webkit.org/show_bug.cgi?id=171669
<rdar://problem/31967684>

Reviewed by Mark Lam.

Source/WebCore:

  • bindings/js/CommonVM.h:

(WebCore::commonVMOrNull):
Add an inline accessor function to expose the global variable.

Source/WebKit2:

safaridriver's AutomaticInspection capability causes us to call WebInspectorProxy::connect()
underneath the Automation.inspectBrowsingContext command. This fires a NeedDebuggerBreak
interrupt for the web content's VM, but this is racy because the web content process may
not yet be fully initialized when this interrupt is handled.

To work around this, just don't deliver any interrupts if the VM singleton is still null.
This is a reliable signal that the web content process is not fully initialized yet. Not delivering
is harmless; the interrupt only exists to break out of infinite loops in JS code, but there
could not be any such infinite loop yet if the web content process is not fully initialized.

  • WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp:

(WebKit::WebInspectorInterruptDispatcher::notifyNeedDebuggerBreak):

12:43 PM Changeset in webkit [216262] by fpizlo@apple.com
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Saam Barati.

No new tests because no change in behavior.

This is one step towards not requesting sync GCs in WebCore. I'm landing this incrementally to
make bisecting super easy.

  • bindings/js/GCController.cpp:

(WebCore::collect):

12:31 PM Changeset in webkit [216261] by BJ Burg
  • 2 edits in trunk/Source/WebKit2

Web Automation: cookie-related commands don't work correctly
https://bugs.webkit.org/show_bug.cgi?id=171713
<rdar://problem/29829930>

Reviewed by Alexey Proskuryakov.

Commands that use WebCookieManager directly should complete when
the manager's completion handler is called. Otherwise, this will race
with subsequent accesses to cookies via the web process (document.cookie).

Also, these commands need to use the active browsing context's session ID.
They currently use the process pool's storage session, which is wrong
since we specially configure automation instances with an ephemeral store.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::addSingleCookie):
(WebKit::WebAutomationSession::deleteAllCookies):

12:26 PM Changeset in webkit [216260] by Jonathan Bedard
  • 6 edits
    2 deletes in trunk/Tools

Use ImageDiff built by host SDK and remove ImageDiff from DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=168945
<rdar://problem/30745695>

Reviewed by David Kilzer.

Use ImageDiff built with the host machine's SDK and stop building ImageDiff with the
target SDK. These two changes must happen simultaneously because some archives will
clobber the ImageDiff from the host SDK with the ImageDiff from the target SDK.

  • DumpRenderTree/mac/Configurations/ImageDiff.xcconfig: Remove ImageDiff from project.
  • DumpRenderTree/PlatformWin.cmake: Remove ImageDiff. Note that the CMakeLists.txt in the

tools directory still includes ImageDiff.

  • DumpRenderTree/cg/ImageDiffCG.cpp: Removed.
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Removed.
  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._path_to_image_diff): Return the correct path to ImageDiff when building
locally or when running archives.

  • Scripts/webkitpy/port/image_diff.py:

(IOSSimulatorImageDiffer): Deleted.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.diff_image): Deleted.

12:26 PM Changeset in webkit [216259] by Chris Dumez
  • 26 edits
    2 adds
    183 deletes in trunk

Attr Nodes should not have children
https://bugs.webkit.org/show_bug.cgi?id=171688
<rdar://problem/31998412>

Reviewed by Andreas Kling.

Source/WebCore:

Attr Nodes should not have children as per the latest DOM specification:

Firefox and Chrome both have been matching the DOM specification for a while so I think
we should do the same. This aligns us with other browsers, simplifies the code, is
more efficient and the code being removed has been prone to security bugs.

Test: fast/dom/Attr/cannot-have-children.html

  • dom/Attr.cpp:

(WebCore::Attr::Attr):
(WebCore::Attr::create):
(WebCore::Attr::setValue):
(WebCore::Attr::cloneNodeInternal):

  • dom/Attr.h:
  • Have Attr subclass Node instead of ContainerNode as it can no longer have children.
  • Drop logic to dealing with children / creating a Text child.
  • dom/CharacterData.cpp:

(WebCore::CharacterData::notifyParentAfterChange):
Drop useless check found by the compiler. parentNode() can no longer be an Attr node.

  • dom/Node.cpp:

(WebCore::appendTextContent):
appendTextContent() is called by Node.TextContent(). For Attr Nodes, we should no longer traverse
its subtree to gather Text Nodes. Instead, we now return Attr.value, as per the specification:

  • dom/Range.cpp:

(WebCore::lengthOfContentsInNode):
As per https://dom.spec.whatwg.org/#concept-node-length, we should return the number of children
for Attr Nodes, which will always be 0.

  • xml/XPathUtil.cpp:

(WebCore::XPath::isValidContextNode):
Always return true for TEXT_NODE as the !(node->parentNode() && node->parentNode()->isAttributeNode())
check will also with true now. This is because a parentNode() cannot be an Attribute Node.

LayoutTests:

  • fast/dom/Attr/cannot-have-children-expected.txt: Added.
  • fast/dom/Attr/cannot-have-children.html: Added.

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

  • dom/html/level1/*: Removed legacy / outdated tests.
  • dom/xhtml/level1/*: Removed legacy / outdated tests.
  • fast/dom/Attr/child-nodes-cache-expected.txt: Removed.
  • fast/dom/Attr/child-nodes-cache.html: Removed.
  • fast/dom/Attr/child-nodes-length-cache-expected.txt: Removed.
  • fast/dom/Attr/child-nodes-length-cache.html: Removed.
  • fast/dom/Attr/invalidate-nodelist-after-attr-setvalue-expected.txt: Removed.
  • fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html: Removed.
  • fast/dom/attribute-change-on-mutate-expected.txt: Removed.
  • fast/dom/attribute-change-on-mutate.html: Removed.
  • svg/custom/image-with-attr-change-after-delete-crash-expected.txt: Removed.
  • svg/custom/image-with-attr-change-after-delete-crash.html: Removed.
  • traversal/moz-bug590771-expected.txt: Removed.
  • traversal/moz-bug590771.html: Removed.

Removed some outdated tests.

  • fast/custom-elements/reactions-for-webkit-extensions-expected.txt:
  • fast/custom-elements/reactions-for-webkit-extensions.html:
  • fast/dom/Attr/change-id-via-attr-node-value-expected.txt:
  • fast/dom/Attr/change-id-via-attr-node-value.html:
  • fast/dom/Element/normalize-crash.html:
  • fast/dom/Element/normalize-crash2.html:
  • fast/dom/HTMLLinkElement/event-while-removing-attribute-expected.txt:
  • fast/dom/HTMLLinkElement/event-while-removing-attribute.html:
  • fast/dom/MutationObserver/observe-attributes-expected.txt:
  • fast/dom/MutationObserver/observe-attributes.html:
  • fast/dom/import-attribute-node.html:
  • fast/dom/insertedIntoDocument-child.html:
  • fast/dom/insertedIntoDocument-sibling.html:
  • fast/dom/no-assert-for-malformed-js-url-attribute-expected.txt:
  • fast/dom/no-assert-for-malformed-js-url-attribute.html:
  • fast/dom/normalize-attributes-mutation-event-crash.html:
  • fast/dom/serialize-nodes.xhtml:
  • http/tests/security/xss-DENIED-iframe-src-alias-expected.txt:

Update existing tests so they stop relying on Attr Node having Text children.

12:21 PM Changeset in webkit [216258] by BJ Burg
  • 4 edits in trunk

[Cocoa] Converting from WebCore::Cookie to NSHTTPCookie always marks cookies as secure
https://bugs.webkit.org/show_bug.cgi?id=171700
<rdar://problem/32017975>

Reviewed by Brady Eidson.

Source/WebCore:

The function that we use to convert from WebCore::Cookie to NSHTTPCookie was
misusing the NSHTTPCookieSecure property. If any value is provided for this key,
even @NO, CFNetwork interprets that to mean that the cookie has the "secure" flag.
Thus, in some cases we would store an "insecure" cookie on a site that uses the
http:// protocol, and be unable to later retrieve the cookie. This is known to
affect cookies set via WebCookieManager, WKHTTPCookieStore, and WebAutomationSession.

This is covered by existing test WebKit2.WKHTTPCookieStore.
The test had a bug that masked this problem.

  • platform/network/cocoa/CookieCocoa.mm:

(WebCore::Cookie::operator NSHTTPCookie *):
Don't include the property if the cookie is not secure.

Tools:

Fix a mistake in the test that should have caught this bug.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST):
The assertions that were meant to check round-tripping were actually checking
the properties of the original cookie objects, not the round-tripped ones.
This test now fails without the bugfix and passes when it is applied.

12:20 PM Changeset in webkit [216257] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

Add SPI to WebItemProviderPasteboard to synchronously load data with a given timeout
https://bugs.webkit.org/show_bug.cgi?id=171725
<rdar://problem/32014052>

Reviewed by Beth Dakin.

Adds a synchronousTimeout: argument to doAfterLoadingProvidedContentIntoFileURLs:. If a positive timeout
interval is specified by the client, then we will block the main thread for at most that amount of time after
beginning to load from the item providers.

To do this, we introduce another dispatch_group_t in parallel to the fileLoadingGroup that is entered and
left in the same places. However, instead of attaching a handler block, we simply perform a synchronous wait for
either the time limit to be reached, or the item providers to finish loading.

No new tests -- no change in behavior yet.

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

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

12:16 PM Changeset in webkit [216256] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Clean up Attr.idl
https://bugs.webkit.org/show_bug.cgi?id=171691

Reviewed by Andreas Kling.

Clean up Attr.idl to match the spec:

No Web-facing behavior change except for Attr properties being enumerated
in a slightly different order.

  • dom/Attr.idl:
11:45 AM Changeset in webkit [216255] by dbates@webkit.org
  • 4 edits in trunk/Tools

Use EXPECT_EQ() when comparing strings in TestWebKitAPI tests
https://bugs.webkit.org/show_bug.cgi?id=171698

Reviewed by Darin Adler.

We should use EXPECT_EQ() instead of EXPECT_TRUE() to compare WTF::String() objects
so that we get pretty diff output when the actual string differs from the expected
string as opposed to seeing a boolean result. The former makes makes it straightforward
to diagnose a regression without reading the code for the test or instrumenting it to
determine the actual string that was compared.

  • TestWebKitAPI/Tests/WTF/WTFString.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm:

(TestWebKitAPI::TEST_F):

11:41 AM Changeset in webkit [216254] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark w3c test persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=161360

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:39 AM Changeset in webkit [216253] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Brent Fulgham.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkCompleted):

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

11:22 AM Changeset in webkit [216252] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark 2 webrtc test as failing.
https://bugs.webkit.org/show_bug.cgi?id=171728

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
11:14 AM Changeset in webkit [216251] by Chris Dumez
  • 5 edits in trunk

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

Reviewed by Sam Weinig.

Source/WebCore:

Refactor / Clean up Element.idl to match the latest specification:

There is no Web-facing behavior change in this patch besides the Element properties
being enumerated in a slightly different order. Things that do not match the
specification have merely been annotated with FIXME comments for now. This makes
it much more obvious what's standard, what's not and what needs fixing.

  • dom/Element.idl:

LayoutTests:

Rebaseline a couple of tests due to Element properties being enumerated in a slightly
different order and because exception messages have changed slightly.

  • fast/dom/Element/attr-param-typechecking-expected.txt:
  • js/dom/dom-static-property-for-in-iteration-expected.txt:
11:13 AM Changeset in webkit [216250] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Link drag images for apple.com front page links have a lot of spurious whitespace
https://bugs.webkit.org/show_bug.cgi?id=171719
<rdar://problem/32010854>

Reviewed by Wenson Hsieh.

  • page/DragController.cpp:

(WebCore::DragController::startDrag):
Use the white-space-simplified string that we put on the pasteboard
for the drag image, too!

11:11 AM Changeset in webkit [216249] by Chris Dumez
  • 15 edits
    3 moves in trunk

Rename webProcessDidCrashWithReason callback to webProcessDidTerminate and stop calling webProcessDidCrash for client terminations
https://bugs.webkit.org/show_bug.cgi?id=171624

Reviewed by Dan Bernstein.

Source/WebKit2:

Follow-up fixes after r216129 based on feedback I have received:

  • Rename webProcessDidCrashWithReason callback function to webProcessDidTerminate given that this is called for non-crashes (e.g. terminations requested by the client).
  • Rename WKProcessCrashReason / ProcessCrashReason to WKProcessTerminationReason / ProcessTerminationReason for consistency with the new naming.
  • Stop calling processDidCrash / webProcessDidCrash for terminations requested by the client, to maintain pre-r216129 behavior. Those are not crashes (The client used an API such as WKPageTerminateProcess()). webProcessDidTerminate will still be called though.
  • Fix a bug where - for terminations due to resource limits - WebPageProxy::processDidCrash() was getting called twice: First by WebProcessProxy::requestTermination() with reason "RequestedByClient" then a second time by WebProcessProxy::terminateProcessDueToResourceLimits() with the proper reason.
  • Shared/ProcessTerminationReason.h: Renamed from Source/WebKit2/Shared/ProcessCrashReason.h.
  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::processDidTerminate):

  • UIProcess/API/C/WKAPICast.h:

(WebKit::toAPI):

  • UIProcess/API/C/WKPage.cpp:

(WKPageTerminate):
(WKPageSetPageNavigationClient):

  • UIProcess/API/C/WKPageNavigationClient.h:
  • UIProcess/API/C/WKProcessTerminationReason.h: Renamed from Source/WebKit2/UIProcess/API/C/WKProcessCrashReason.h.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _killWebContentProcessAndResetState]):

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

(WebKit::NavigationState::NavigationClient::processDidTerminate):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidTerminate):

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

(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::requestTermination):
(WebKit::WebProcessProxy::logDiagnosticMessageForResourceLimitTermination):
(WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

  • UIProcess/WebProcessProxy.h:
  • WebKit2.xcodeproj/project.pbxproj:

Tools:

Extend API test coverage to cover crashes in addition to terminations requested by the client.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/ProcessDidTerminate.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKit2/ProcessDidCrashWithReason.cpp.

(TestWebKitAPI::webProcessWasTerminatedByClient):
(TestWebKitAPI::webProcessCrashed):
(TestWebKitAPI::TEST):

11:10 AM Changeset in webkit [216248] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Mac cmake buildfix after r216037
https://bugs.webkit.org/show_bug.cgi?id=171558

Patch by Derek Schuff <dschuff@chromium.org> on 2017-05-05
Reviewed by JF Bastien.

  • PlatformMac.cmake:
10:35 AM Changeset in webkit [216247] by clopez@igalia.com
  • 2 edits in trunk/Source/WebKit2

[GTK] Enable runtime flag for MediaDevices with enable-media-stream property.
https://bugs.webkit.org/show_bug.cgi?id=171730

Reviewed by Michael Catanzaro.

After r215939 the MediaDevices runtime setting has to be enabled
also to use MediaStream / WebRTC.

Enable it as part of the enable-media-stream property of the
WebKitGTK+ API.

  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_set_enable_media_stream):

9:14 AM Changeset in webkit [216246] by mark.lam@apple.com
  • 4 edits in trunk

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

Reviewed by Saam Barati.

Source/WebCore:

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

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

  • Modules/indexeddb/IDBRequest.cpp:

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

Tools:

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

  • DumpRenderTree/TestRunner.cpp:

(setAudioResultCallback):

8:49 AM Changeset in webkit [216245] by commit-queue@webkit.org
  • 5 edits in trunk

REGRESSION (r215951): LayoutTest media/modern-media-controls/placard-support/placard-support-pip.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=171610
<rdar://problem/31976820>

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

Source/WebKit/mac:

Fullscreen state gets confused because WK1 WebChromeClient doesn't implement exitVideoFullscreenToModeWithoutAnimation.

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

(WebChromeClient::exitVideoFullscreenToModeWithoutAnimation):

LayoutTests:

enable test: media/modern-media-controls/pip-support/pip-support-click.html

  • platform/mac-wk1/TestExpectations:
8:33 AM Changeset in webkit [216244] by Jonathan Bedard
  • 2 edits in trunk/Tools

buildbot: Cleanup simulators after running tests
https://bugs.webkit.org/show_bug.cgi?id=171679
<rdar://problem/31994361>

Reviewed by Aakash Jain.

We shutdown the simulator process between tests, but in some cases, this is not
sufficient. Explicitly shutdown every booted simulator.

  • BuildSlaveSupport/kill-old-processes:

(main): Shutdown all booted simulators.

6:37 AM Changeset in webkit [216243] by Carlos Garcia Campos
  • 8 edits in trunk

[GTK] Assertion failure in Inspector::RemoteInspector::setRemoteInspectorClient when disposing WebKitWebContext
https://bugs.webkit.org/show_bug.cgi?id=171644

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Fix ASSERT that requires given client to be a valid pointer, since it's valid to pass nullptr to unset the
client. The ASSERT now ensures that client is set or unset. I also renamed the function to setClient because
setRemoteInspectorClient is redundant for a class named RemoteInspector. And added a getter too, to check if the
remote inspector has a client.

  • inspector/remote/RemoteInspector.cpp:

(Inspector::RemoteInspector::setClient):

  • inspector/remote/RemoteInspector.h:

Source/WebKit2:

Ensure that it's not possible to enable automation in more than one WebKitWebContext at the same time. Instead
of creating the AutomationClient unconditionally when the context is constructed, it's now created only when
automation is enabled, and deleted if it's disabled.

  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_is_automation_allowed):
(webkit_web_context_set_automation_allowed):

  • UIProcess/Cocoa/AutomationClient.mm:

(WebKit::AutomationClient::AutomationClient):
(WebKit::AutomationClient::~AutomationClient):

Tools:

Check that only one WebKitWebContext can have automation enabled.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp:

(testAutomationSessionRequestSession):

6:29 AM Changeset in webkit [216242] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of tests failing after GST upgrade to 1.10.4.

  • platform/gtk/TestExpectations:
6:20 AM Changeset in webkit [216241] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

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

Reviewed by Michael Catanzaro.

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

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:

(WTR::timeoutSource):

5:05 AM Changeset in webkit [216240] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Xabier Rodriguez-Calvar.

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

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

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

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

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

5:02 AM Changeset in webkit [216239] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Xabier Rodriguez-Calvar.

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

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

4:56 AM Changeset in webkit [216238] by Carlos Garcia Campos
  • 2 edits
    5 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline several tests.

  • platform/gtk/editing/simple-line-layout-caret-is-gone-expected.txt: Added.
  • platform/gtk/fast/repaint/mutate-non-visible-expected.txt: Added.
  • platform/gtk/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt:
  • platform/gtk/http/tests/security/video-cross-origin-accessfailure-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt: Added.
1:53 AM Changeset in webkit [216237] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix wrong assert after r215176.

Cairo surface received by computeMD5HashStringForCairoSurface() doesn't need to be ARGB32 since r215176, it
could also be RGB24 when created from a web view snapshot.

  • WebKitTestRunner/cairo/TestInvocationCairo.cpp:

(WTR::computeMD5HashStringForCairoSurface):

1:37 AM Changeset in webkit [216236] by zandobersek@gmail.com
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening.

  • platform/gtk/TestExpectations: Enable already-passing Web Crypto layout tests

for the GTK+ port. Also update expectations for the imported W3C Web Crypto tests.

May 4, 2017:

11:37 PM Changeset in webkit [216235] by BJ Burg
  • 2 edits in trunk/Tools

lldb_webkit.py should provide a type summary for WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=171670

Reviewed by Jer Noble.

Just print out the underlying string using the WTFString provider.

  • lldb/lldb_webkit.py:

(lldb_init_module):
(WebCoreURL_SummaryProvider):
(WebCoreURLProvider):
(WebCoreURLProvider.
init):
(WebCoreURLProvider.to_string):

10:37 PM Changeset in webkit [216234] by commit-queue@webkit.org
  • 64 edits
    6 copies
    73 adds in trunk

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

Multiple LayoutTests crashing in Document::page() (Requested
by ap on #webkit).

Reverted changeset:

"Remove support for legacy Notifications"
https://bugs.webkit.org/show_bug.cgi?id=171487
http://trac.webkit.org/changeset/216206

10:09 PM Changeset in webkit [216233] by Chris Dumez
  • 37 edits in trunk/Source/WebCore

Drop remaining uses of PassRefPtr from CompositeEditCommand
https://bugs.webkit.org/show_bug.cgi?id=171645

Reviewed by Darin Adler.

Drop remaining uses of PassRefPtr from CompositeEditCommand.

  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
(WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
(WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes):
(WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
(WebCore::ApplyStyleCommand::removeCSSStyle):
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
(WebCore::ApplyStyleCommand::splitTextAtStart):
(WebCore::ApplyStyleCommand::splitTextAtEnd):
(WebCore::ApplyStyleCommand::splitTextElementAtStart):
(WebCore::ApplyStyleCommand::splitTextElementAtEnd):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::addBlockStyle):
(WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
(WebCore::ApplyStyleCommand::applyInlineStyleChange):
(WebCore::ApplyStyleCommand::joinChildTextNodes):

  • editing/BreakBlockquoteCommand.cpp:

(WebCore::BreakBlockquoteCommand::doApply):

  • editing/CompositeEditCommand.cpp:

(WebCore::applyCommand):
(WebCore::CompositeEditCommand::insertNodeAt):
(WebCore::CompositeEditCommand::removeChildrenInRange):
(WebCore::CompositeEditCommand::removeNode):
(WebCore::CompositeEditCommand::removeNodePreservingChildren):
(WebCore::CompositeEditCommand::removeNodeAndPruneAncestors):
(WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
(WebCore::CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes):
(WebCore::CompositeEditCommand::prune):
(WebCore::CompositeEditCommand::splitTextNode):
(WebCore::CompositeEditCommand::splitElement):
(WebCore::CompositeEditCommand::mergeIdenticalElements):
(WebCore::CompositeEditCommand::splitTextNodeContainingElement):
(WebCore::CompositeEditCommand::positionOutsideTabSpan):
(WebCore::CompositeEditCommand::removeNodeAttribute):
(WebCore::CompositeEditCommand::setNodeAttribute):
(WebCore::CompositeEditCommand::deleteInsignificantText):
(WebCore::CompositeEditCommand::removePlaceholderAt):
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
(WebCore::CompositeEditCommand::pushAnchorElementDown):
(WebCore::CompositeEditCommand::cleanupAfterDeletion):
(WebCore::CompositeEditCommand::moveParagraphs):

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

(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
(WebCore::DeleteSelectionCommand::removeNodeUpdatingStates):
(WebCore::DeleteSelectionCommand::removeNode):
(WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
(WebCore::DeleteSelectionCommand::removeRedundantBlocks):

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

(WebCore::ClearTextCommand::CreateAndApply):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::handleAcceptedCandidate):

  • editing/EditorCommand.cpp:

(WebCore::executeFormatBlock):

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::outdentParagraph):

  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::doApply):

  • editing/InsertListCommand.cpp:

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

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::insertTab):

  • editing/ModifySelectionListLevel.cpp:

(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeBefore):
(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeAfter):
(WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange):
(WebCore::DecreaseSelectionListLevelCommand::doApply):

  • editing/RemoveNodePreservingChildrenCommand.cpp:

(WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
(WebCore::RemoveNodePreservingChildrenCommand::doApply):

  • editing/RemoveNodePreservingChildrenCommand.h:

(WebCore::RemoveNodePreservingChildrenCommand::create):

  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand):
(WebCore::ReplaceNodeWithSpanCommand::doApply):
(WebCore::ReplaceNodeWithSpanCommand::doUnapply):
(WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand):

  • editing/ReplaceNodeWithSpanCommand.h:

(WebCore::ReplaceNodeWithSpanCommand::create):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::removeNodePreservingChildren):
(WebCore::ReplacementFragment::removeInterchangeNodes):
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
(WebCore::handleStyleSpansBeforeInsertion):
(WebCore::ReplaceSelectionCommand::handleStyleSpans):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
(WebCore::ReplaceSelectionCommand::insertAsListItems):
(WebCore::ReplaceSelectionCommand::performTrivialReplace):

  • editing/SetNodeAttributeCommand.cpp:

(WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand):
(WebCore::SetNodeAttributeCommand::getNodesInCommand):

  • editing/SetNodeAttributeCommand.h:

(WebCore::SetNodeAttributeCommand::create):

  • editing/SimplifyMarkupCommand.cpp:

(WebCore::SimplifyMarkupCommand::doApply):
(WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):

  • editing/SimplifyMarkupCommand.h:
  • editing/SplitElementCommand.cpp:

(WebCore::SplitElementCommand::SplitElementCommand):
(WebCore::SplitElementCommand::executeApply):
(WebCore::SplitElementCommand::getNodesInCommand):

  • editing/SplitElementCommand.h:

(WebCore::SplitElementCommand::create):

  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::SplitTextNodeCommand):
(WebCore::SplitTextNodeCommand::doApply):
(WebCore::SplitTextNodeCommand::doUnapply):
(WebCore::SplitTextNodeCommand::doReapply):
(WebCore::SplitTextNodeCommand::insertText1AndTrimText2):

  • editing/SplitTextNodeCommand.h:

(WebCore::SplitTextNodeCommand::create):

  • editing/SplitTextNodeContainingElementCommand.cpp:

(WebCore::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
(WebCore::SplitTextNodeContainingElementCommand::doApply):

  • editing/SplitTextNodeContainingElementCommand.h:

(WebCore::SplitTextNodeContainingElementCommand::create):

  • editing/TextInsertionBaseCommand.cpp:

(WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::makeEditableRootEmpty):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):

9:04 PM Changeset in webkit [216232] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix misspelled word "interrupt" as pointed out by Darin Adler
in <https://bugs.webkit.org/show_bug.cgi?id=171577>.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::transitionToCommitted):

8:24 PM Changeset in webkit [216231] by mark.lam@apple.com
  • 2 edits in trunk/Tools

API test WTF.StaticStringImpl crashing in TestWebKitAPI::WTF_StaticStringImpl_Test::TestBody() + 3188
https://bugs.webkit.org/show_bug.cgi?id=171702

Reviewed by Filip Pizlo.

The test was supposed to use the MAKE_STATIC_STRING_IMPL macro. I had previously
changed it to instantiate an automatic StaticStringImpl (i.e. stack allocated) to
confirm that the test will detect a regression. Unfortunately, I forgot to
change it back to using MAKE_STATIC_STRING_IMPL before I landed the test.
This patch fixes that.

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::neverDestroyedString):

8:20 PM Changeset in webkit [216230] by Ryan Haddad
  • 2 edits in trunk/Tools

Disable failing API test WebKit2.ResizeWithHiddenContentDoesNotHang.
https://bugs.webkit.org/show_bug.cgi?id=170195

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AnimatedResize.mm:

(TEST):

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

UIColor +whiteColor and +clearColor are ambiguous and need to be casted when soft linked.
https://bugs.webkit.org/show_bug.cgi?id=171704

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

Source/WebCore:

No new tests because no behavior change.

Fix build by casting result of +clearColor to UIColor.

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(clearUIColor):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):
(WebVideoFullscreenInterfaceAVKit::didStopPictureInPicture):

Source/WebKit/mac:

Fix build by casting result of +whiteColor to UIColor.

  • WebView/WebView.mm:

(-[WebView _createImageWithPlatterForImage:boundingRect:contentScaleFactor:clippingRects:]):

7:19 PM Changeset in webkit [216228] by Chris Dumez
  • 3 edits
    2 adds in trunk

Element.slot should be marked as [Unscopable]
https://bugs.webkit.org/show_bug.cgi?id=171683

Reviewed by Darin Adler.

Source/WebCore:

Element.slot should be marked as [Unscopable]:

Test: fast/shadow-dom/Element-slot-unscopable.html

  • dom/Element.idl:

LayoutTests:

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

  • fast/shadow-dom/Element-slot-unscopable-expected.txt: Added.
  • fast/shadow-dom/Element-slot-unscopable.html: Added.
7:11 PM Changeset in webkit [216227] by commit-queue@webkit.org
  • 24 edits in trunk

[Win] Remove redundant macros that are set in the CMake config
https://bugs.webkit.org/show_bug.cgi?id=171571

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-04
Reviewed by Brent Fulgham.

.:

  • Source/cmake/OptionsWin.cmake:

Source/JavaScriptCore:

  • config.h:

Source/ThirdParty/ANGLE:

  • CMakeLists.txt:

Source/WebCore:

No new tests. No change in behavior.

  • WebCorePrefix.h:
  • config.h:
  • platform/win/COMPtr.h:
  • platform/win/WindowsTouch.h:
  • testing/js/WebCoreTestSupportPrefix.h:

Source/WebCore/PAL:

No new tests. No change in behavior.

  • config.h:

Source/WebKit/win:

  • COMEnumVariant.h:
  • COMPropertyBag.h:
  • WebKitPrefix.h:

Source/WTF:

  • config.h:

Tools:

  • DumpRenderTree/config.h:
  • MiniBrowser/win/stdafx.h:
  • TestWebKitAPI/config.h:
7:07 PM Changeset in webkit [216226] by timothy_horton@apple.com
  • 4 edits
    1 add in trunk/Source/WebCore

[Mac] Modernize image for dragged link
https://bugs.webkit.org/show_bug.cgi?id=171701
<rdar://problem/31978818>

Reviewed by Simon Fraser.

  • WebCore.xcodeproj/project.pbxproj:
  • page/mac/DragControllerMac.mm:
  • platform/mac/DragImageMac.mm:

(WebCore::dragImageSize):
(WebCore::scaleDragImage):
(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):
(WebCore::LinkImageLayout::LinkImageLayout):
(WebCore::LinkImageLayout::layOutText):
(WebCore::LinkImageLayout::addLine):
(WebCore::createDragImageForLink):
(WebCore::fontFromNSFont): Deleted.
(WebCore::canUseFastRenderer): Deleted.
(WebCore::widthWithFont): Deleted.
(WebCore::drawAtPoint): Deleted.
(WebCore::drawDoubledAtPoint): Deleted.

  • platform/spi/cocoa/LinkPresentationSPI.h: Added.

Improve the design of URL drag images.
The margins are increased, the background is now white, the text is
not drawn doubled-up, the title will now wrap to two lines, and the
domain name will appear simplified and de-punycoded.

Much of the implementation of text painting is borrowed from
<attachment> for now, but we should figure out how to generalize
it for UI-like parts of WebKit in the future.

6:53 PM Changeset in webkit [216225] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

Change the asynchronous image decoding tests to use the event webkitImageFrameReady
https://bugs.webkit.org/show_bug.cgi?id=171634

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

To test the async image decoding reliably we need to do the following:

-- Make sure to load the image before setting its src to the element.
-- Call document.body.offsetHeight to force layout.
-- Call testRunner.display() to force the first paint.
-- Use the webkitImageFrameReady to reliably know when an image frame is ready.
-- When webkitImageFrameReady is fired call testRunner.notifyDone(). This

will force the second paint.

  • fast/images/async-image-background-image-repeated.html:
  • fast/images/async-image-background-image.html:
  • fast/images/sprite-sheet-image-draw.html:
6:42 PM Changeset in webkit [216224] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

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

not quite ready (Requested by thorton on #webkit).

Reverted changeset:

"[Mac] Modernize image for dragged link"
https://bugs.webkit.org/show_bug.cgi?id=171701
http://trac.webkit.org/changeset/216223

6:36 PM Changeset in webkit [216223] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

[Mac] Modernize image for dragged link
https://bugs.webkit.org/show_bug.cgi?id=171701
<rdar://problem/31978818>

Reviewed by Simon Fraser.

  • page/mac/DragControllerMac.mm:
  • platform/mac/DragImageMac.mm:

(WebCore::dragImageSize):
(WebCore::scaleDragImage):
(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):
(WebCore::LinkImageLayout::LinkImageLayout):
(WebCore::LinkImageLayout::addLine):
(WebCore::createDragImageForLink):
(WebCore::fontFromNSFont): Deleted.
(WebCore::canUseFastRenderer): Deleted.
(WebCore::widthWithFont): Deleted.
(WebCore::drawAtPoint): Deleted.
(WebCore::drawDoubledAtPoint): Deleted.
Improve the design of URL drag images.
The margins are increased, the background is now white, the text is
not drawn doubled-up, the title will now wrap to two lines, and the
domain name will appear simplified and de-punycoded.

Much of the implementation of text painting is borrowed from
<attachment> for now, but we should figure out how to generalize
it for UI-like parts of WebKit in the future.

6:05 PM Changeset in webkit [216222] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark webrtc/libwebrtc/descriptionGetters.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171703

Unreviewed test gardening.

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

  • platform/mac-wk2/TestExpectations:
5:57 PM Changeset in webkit [216221] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Use if instead of return early for 13 places in WebAVPlayerController
https://bugs.webkit.org/show_bug.cgi?id=171692

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

No new tests because no behavior change.

  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController play:]):
(-[WebAVPlayerController pause:]):
(-[WebAVPlayerController togglePlayback:]):
(-[WebAVPlayerController beginScrubbing:]):
(-[WebAVPlayerController endScrubbing:]):
(-[WebAVPlayerController seekToTime:]):
(-[WebAVPlayerController beginScanningForward:]):
(-[WebAVPlayerController endScanningForward:]):
(-[WebAVPlayerController beginScanningBackward:]):
(-[WebAVPlayerController endScanningBackward:]):
(-[WebAVPlayerController seekToBeginning:]):
(-[WebAVPlayerController seekToEnd:]):
(-[WebAVPlayerController toggleMuted:]):

5:46 PM Changeset in webkit [216220] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Gardening: Build fix for Windows after r216217.
https://bugs.webkit.org/show_bug.cgi?id=171586

Not reviewed.

  • shell/PlatformWin.cmake:
5:06 PM Changeset in webkit [216219] by commit-queue@webkit.org
  • 8 edits in trunk/Tools

Add testRunner.display() to force displaying the web page for testing
https://bugs.webkit.org/show_bug.cgi?id=171694

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

Unlike testRunner.displayAndTrackRepaints(), this new function forces
drawing the web page but without track repaints.

  • DumpRenderTree/TestRunner.cpp:

(displayCallback):
(TestRunner::staticFunctions):

  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::display):

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::display):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::display):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
4:37 PM Changeset in webkit [216218] by fpizlo@apple.com
  • 19 edits
    4 adds in trunk/Source

JSC::Heap should expose a richer API for requesting GCs
https://bugs.webkit.org/show_bug.cgi?id=171690

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:


I want to stop WebCore from requesting synchronous GCs. But various parts of that work
may cause regressions, so I'd like to land it separately from the functionality that is
needed on the JSC side. This change is mostly a JSC-side refactoring that does not
change behavior. In the future I'll land the behavior changes (i.e. not requesting sync
GCs).

This change allows you to enumerate over synchronousness, so that we can make all APIs
take synchronousness as an argument. It replaces the collectAllGarbage API with a
collectNow(Synchronousness, GCRequest) API. GCRequest is a new concept, which subsumes
std::optional<CollectionScope> and gives us the ability to register callbacks along
with a GC. So, you can ask for an async GC and get a callback when it's done.

Also adds ability to request that fastMalloc memory be released after the incremental
sweeper finishes.

  • API/JSBase.cpp:

(JSSynchronousGarbageCollectForDebugging):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::doCollection):

  • heap/FullGCActivityCallback.h:
  • heap/GCRequest.cpp: Added.

(JSC::GCRequest::subsumedBy):
(JSC::GCRequest::dump):

  • heap/GCRequest.h: Added.

(JSC::GCRequest::GCRequest):

  • heap/Heap.cpp:

(JSC::Heap::collect):
(JSC::Heap::collectNow):
(JSC::Heap::collectAsync):
(JSC::Heap::collectSync):
(JSC::Heap::runBeginPhase):
(JSC::Heap::runEndPhase):
(JSC::Heap::requestCollection):
(JSC::Heap::willStartCollection):
(JSC::Heap::sweeper):
(JSC::Heap::collectNowFullIfNotDoneRecently):
(JSC::Heap::shouldDoFullCollection):
(JSC::Heap::collectAllGarbage): Deleted.
(JSC::Heap::collectAllGarbageIfNotDoneRecently): Deleted.

  • heap/Heap.h:
  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::buildSnapshot):

  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::doSweep):

  • heap/IncrementalSweeper.h:

(JSC::IncrementalSweeper::freeFastMallocMemoryAfterSweeping):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::doTestCollectionsIfNeeded):

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::sweep):

  • heap/Synchronousness.cpp: Added.

(WTF::printInternal):

  • heap/Synchronousness.h: Added.
  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::InspectorHeapAgent::gc):

  • jsc.cpp:

(functionGCAndSweep):
(runJSC):

  • tools/JSDollarVMPrototype.cpp:

(JSC::JSDollarVMPrototype::gc):

  • wasm/WasmMemory.cpp:

Source/WebCore:

No new tests because this is just a refactoring.

Change some function calls now that some JSC::Heap APIs got renamed.

  • bindings/js/GCController.cpp:

(WebCore::collect):
(WebCore::GCController::garbageCollectNow):
(WebCore::GCController::garbageCollectNowIfNotDoneRecently):

4:24 PM Changeset in webkit [216217] by mark.lam@apple.com
  • 71 edits
    2 adds in trunk

NeverDestroyed<String>(ASCIILiteral(...)) is not thread safe.
https://bugs.webkit.org/show_bug.cgi?id=171586
<rdar://problem/31873190>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

JavaScriptCore allows multiple VMs to be instantiated, and each of these should
be able to run concurrently on different threads. There is code in the VM that
allocates NeverDestroyed<String>(ASCIILiteral(...)) to defined immortal strings
meant to be shared by all VMs.

However, NeverDestroyed<String>(ASCIILiteral(...)) is not thread-safe because
each thread will ref and deref the underlying StringImpl. Since this ref and
deref is not done in a thread-safe way, the NeverDestroyed<String> may get
destroyed due to the ref/deref races. Additionally, each thread may modify the
StringImpl by setting its hash and also twiddling its flags.

The fix is to use the StaticStringImpl class which is safe for ref/derefing
concurrently from different threads. StaticStringImpl is also pre-set with a
hash on construction, and its flags are set in such a way as to prevent twiddling
at runtime. Hence, we will be able to share a NeverDestroyed<String> between
VMs, as long as it is backed by a StaticStringImpl.

An alternative solution would be to change all the uses of NeverDestroyed<String>
to use per-VM strings. However, this solution is cumbersome, and makes it harder
to allocate the intended shared string. It also uses more memory and takes more
CPU time because it requires allocating the same string for each VM instance.
The StaticStringImpl solution wins out because it is more efficient and is easier
to use.

The StaticStringImpl solution also can be used in WTF without a layer violation.
See Source/WTF/wtf/text/icu/TextBreakIteratorICU.h for an example.

Also added the MultithreadedMultiVMExecutionTest which runs multiple VMs in
multiple threads, all banging on the BuiltinExecutable's baseConstructorCode
NeverDestroyed<String>. The test will manifest the issue reliably (before this
fix) if run on an ASAN build.

  • API/tests/MultithreadedMultiVMExecutionTest.cpp: Added.

(threadsList):
(startMultithreadedMultiVMExecutionTest):
(finalizeMultithreadedMultiVMExecutionTest):

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

(main):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createDefaultConstructor):

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::objectGroupForBreakpointAction):

  • replay/scripts/CodeGeneratorReplayInputsTemplates.py:
  • replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::SavedMouseButton>::type):

  • replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::SavedMouseButton>::type):

  • replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::HandleWheelEvent>::type):

  • replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::FormCombo>::type):

  • replay/scripts/tests/expected/generate-input-with-guard.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::GetCurrentTime>::type):
(JSC::InputTraits<Test::SetRandomSeed>::type):

  • replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::ArrayOfThings>::type):
(JSC::InputTraits<Test::SavedHistory>::type):

  • replay/scripts/tests/expected/generate-inputs-with-flags.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::ScalarInput1>::type):
(JSC::InputTraits<Test::ScalarInput2>::type):

  • replay/scripts/tests/expected/generate-memoized-type-modes.json-TestReplayInputs.cpp:

(JSC::InputTraits<Test::ScalarInput>::type):
(JSC::InputTraits<Test::MapInput>::type):

  • runtime/IntlObject.cpp:

(JSC::numberingSystemsForLocale):

Source/WebCore:

No new tests because we're just converting uses of ASCIILiteral (in the
instantiation of NeverDestroyed<String> and NeverDestroyed<const String>) to
MAKE_STATIC_STRING_IMPL.

The correctness of using MAKE_STATIC_STRING_IMPL is tested in the newly added
API test in this patch.

Also changed "static NeverDestroyed<ASCIILiteral>" instances in
SQLiteIDBBackingStore.cpp to "static const char* const" because they are only
ever used to get the underlying const char*.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):

  • Modules/mediastream/MediaEndpointSessionDescription.cpp:
  • Modules/mediastream/RTCRtpTransceiver.cpp:
  • Modules/mediastream/SDPProcessor.cpp:
  • Modules/navigatorcontentutils/NavigatorContentUtils.cpp:

(WebCore::customHandlersStateString):
(WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):

  • Modules/speech/SpeechSynthesis.cpp:

(WebCore::SpeechSynthesis::boundaryEventOccurred):

  • accessibility/AccessibilityMediaControls.cpp:

(WebCore::AccessibilityMediaControl::controlTypeName):
(WebCore::AccessibilityMediaControl::title):
(WebCore::AccessibilityMediaControlsContainer::elementTypeName):
(WebCore::AccessibilityMediaTimeline::helpText):
(WebCore::AccessibilityMediaTimeDisplay::accessibilityDescription):

  • bindings/js/JSLazyEventListener.cpp:

(WebCore::eventParameterName):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):

  • css/CSSDefaultStyleSheets.cpp:

(WebCore::screenEval):
(WebCore::printEval):

  • css/MediaList.cpp:

(WebCore::addResolutionWarningMessageToConsole):

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parseAuthorStyleSheet):

  • dom/Document.cpp:

(WebCore::Document::readyState):

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::notifyFinished):

  • dom/PseudoElement.cpp:

(WebCore::PseudoElement::pseudoElementNameForEvents):

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::shouldAddNamespaceElement):

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::dataDetectorURLProtocol):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
(WebCore::createMarkupInternal):

  • html/FormController.cpp:

(WebCore::formStateSignature):

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::appendFormData):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::realizeSaves):
(WebCore::CanvasRenderingContext2D::getImageData):

  • html/parser/XSSAuditor.cpp:

(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):

  • html/track/VTTCue.cpp:

(WebCore::startKeyword):
(WebCore::middleKeyword):
(WebCore::endKeyword):
(WebCore::leftKeyword):
(WebCore::rightKeyword):
(WebCore::verticalGrowingLeftKeyword):
(WebCore::verticalGrowingRightKeyword):
(WebCore::VTTCue::determineTextDirection):
(WebCore::VTTCue::markFutureAndPastNodes):

  • inspector/InspectorCSSAgent.cpp:

(WebCore::computePseudoClassMask):

  • inspector/InspectorIndexedDBAgent.cpp:
  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::sourceMapURLForResource):

  • inspector/PageDebuggerAgent.cpp:

(WebCore::PageDebuggerAgent::sourceMapURLForScript):

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::notifyFinished):

  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::corsPolicyPreventedLoad):

  • loader/icon/IconDatabase.cpp:

(WebCore::IconDatabase::defaultDatabaseFilename):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin):

  • page/UserContentURLPattern.cpp:

(WebCore::UserContentURLPattern::parse):

  • platform/MIMETypeRegistry.cpp:

(WebCore::defaultMIMEType):

  • platform/animation/Animation.cpp:

(WebCore::Animation::initialName):

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::engineDescription):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::engineDescription):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::similarFont):

  • platform/gtk/UserAgentGtk.cpp:

(WebCore::platformVersionForUAString):

  • platform/mock/mediasource/MockBox.cpp:

(WebCore::MockTrackBox::type):
(WebCore::MockInitializationBox::type):
(WebCore::MockSampleBox::type):

  • platform/network/HTTPHeaderValues.cpp:

(WebCore::HTTPHeaderValues::textPlainContentType):
(WebCore::HTTPHeaderValues::formURLEncodedContentType):
(WebCore::HTTPHeaderValues::noCache):
(WebCore::HTTPHeaderValues::maxAge0):

  • platform/network/HTTPParsers.cpp:

(WebCore::parseXSSProtectionHeader):

  • replay/MemoizedDOMResult.cpp:

(JSC::InputTraits<MemoizedDOMResultBase>::type):

  • svg/SVGTransformValue.cpp:

(WebCore::SVGTransformValue::transformTypePrefixForParsing):

Source/WebKit2:

  • Shared/API/APIError.cpp:

(API::Error::webKitErrorDomain):
(API::Error::webKitNetworkErrorDomain):
(API::Error::webKitPolicyErrorDomain):
(API::Error::webKitPluginErrorDomain):
(API::Error::webKitDownloadErrorDomain):
(API::Error::webKitPrintErrorDomain):

  • Shared/WebPreferencesKeys.cpp:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::executeEditCommand):

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::didBeginEditing):
(WebKit::WebEditorClient::respondToChangedContents):
(WebKit::WebEditorClient::respondToChangedSelection):
(WebKit::WebEditorClient::didEndEditing):

Source/WTF:

StaticStringImpl is meant to be thread-safe. However, it has a bug: it did not
set the s_hashFlagDidReportCost flag. As a result, if cost() is called on it,
different threads may try to change its flags bits at the same time. This patch
changes StaticStringImpl to always set the s_hashFlagDidReportCost flag.

Also factored out StringImplShape and made StringImpl and StaticStringImpl extend
it. This makes it more clear that the 2 are intended to have the same shape.
Note: there is already a static_assert that the 2 have the same size. This
change also ensures that they both have the same shape, which is a requirement in
order for StaticStringImpl to work.

Introduced the MAKE_STATIC_STRING_IMPL macro as a convenient way to instantiate
StaticStringImpls from literal strings. This allows us to trivially change

NeverDestroyed<String> myString(ASCIILiteral("myString"));

to ...

NeverDestroyed<String> myString(MAKE_STATIC_STRING_IMPL("myString"));

and by so doing, make it thread-safe.

MAKE_STATIC_STRING_IMPL instantiates a lambda function to create the static
StaticStringImpls.

  • wtf/text/StringImpl.h:

(WTF::StringImplShape::StringImplShape):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::cost):
(WTF::StringImpl::setHash):
(WTF::StringImpl::StaticStringImpl::StaticStringImpl):
(WTF::StringImpl::StaticStringImpl::operator StringImpl&):

  • wtf/text/WTFString.h:

(WTF::String::String):

  • wtf/text/icu/TextBreakIteratorICU.h:

(WTF::caretRules):

Tools:

API test for exercising StaticStringImpl and the MAKE_STATIC_STRING_IMPL macro.

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::neverDestroyedString):
(TestWebKitAPI::getNeverDestroyedStringAtStackDepth):
(TestWebKitAPI::TEST):

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

Source/WebCore:
Add muted to WebPlaybackSessionModel.
https://bugs.webkit.org/show_bug.cgi?id=171592
rdar://problem/31814074

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

No behavior change. This just adds the ability for UI to mute.

  • platform/cocoa/WebPlaybackSessionModel.h:

(WebCore::WebPlaybackSessionModelClient::mutedChanged):

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

(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
(WebCore::WebPlaybackSessionModelMediaElement::toggleMuted):
(WebCore::WebPlaybackSessionModelMediaElement::observedEventNames):
(WebCore::WebPlaybackSessionModelMediaElement::isMuted):

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

(-[WebAVPlayerController toggleMuted:]):

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

(WebCore::WebPlaybackSessionInterfaceAVKit::mutedChanged):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(WebVideoFullscreenControllerContext::mutedChanged):
(WebVideoFullscreenControllerContext::isMuted):
(WebVideoFullscreenControllerContext::toggleMuted):

  • platform/spi/ios/MediaPlayerSPI.h:

Source/WebKit2:
Add mute to WebPlaybackSessionModel.
https://bugs.webkit.org/show_bug.cgi?id=171592
rdar://problem/31814074

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

Plumb through muted.

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

(WebKit::WebPlaybackSessionModelContext::toggleMuted):
(WebKit::WebPlaybackSessionModelContext::setMuted):
(WebKit::WebPlaybackSessionManagerProxy::setMuted):
(WebKit::WebPlaybackSessionManagerProxy::toggleMuted):

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

(WebKit::WebPlaybackSessionInterfaceContext::mutedChanged):
(WebKit::WebPlaybackSessionManager::mutedChanged):
(WebKit::WebPlaybackSessionManager::toggleMuted):

4:04 PM Changeset in webkit [216215] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebCore

REGRESSION(r216138): Web Inspector: ASSERT(!content.isNull()) when checking for source map url opening inspector
https://bugs.webkit.org/show_bug.cgi?id=171697
<rdar://problem/31999512>

Reviewed by Matt Baker.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResourceContent):
Always set base64Encoded when returning true. Return the empty
string instead of a null string matching previous behavior.

4:03 PM Changeset in webkit [216214] by commit-queue@webkit.org
  • 1 edit
    13 adds in trunk/PerformanceTests

[INTL] Add PerformanceTests for Intl objects
https://bugs.webkit.org/show_bug.cgi?id=171695

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-05-04
Reviewed by Benjamin Poulain.

  • Intl/collator-compare-all-options.html: Added.
  • Intl/collator-compare-default.html: Added.
  • Intl/collator-create-all-options.html: Added.
  • Intl/collator-create-default.html: Added.
  • Intl/datetimeformat-create-all-options.html: Added.
  • Intl/datetimeformat-create-default.html: Added.
  • Intl/datetimeformat-format-all-options.html: Added.
  • Intl/datetimeformat-format-default.html: Added.
  • Intl/numberformat-create-all-options.html: Added.
  • Intl/numberformat-create-default.html: Added.
  • Intl/numberformat-format-all-options.html: Added.
  • Intl/numberformat-format-default.html: Added.
3:35 PM Changeset in webkit [216213] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

[WK2] Image action sheets sometimes do not dismiss when beginning data interaction
https://bugs.webkit.org/show_bug.cgi?id=171687
<rdar://problem/31996534>

Reviewed by Beth Dakin.

When presenting an image sheet using WKActionSheetAssistant, we may present the popover asynchronously. In this
case, even if -cleanupSheet is invoked after -showImageSheet, the popover will still be presented. To fix this,
add a flag, _hasPendingActionSheet, that is set to true when an image action sheet will be presented in the
future.

In cleanupSheet, we revert this flag to NO, and in the sheet presentation block, we first check to see if there
is a pending action sheet. If there is not, then simply do not invoke the image sheet presentation block.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant cleanupSheet]):

3:28 PM Changeset in webkit [216212] by Wenson Hsieh
  • 26 edits
    1 add in trunk

[WK2] Add support for keeping the selection in a focused editable element when dragging begins
https://bugs.webkit.org/show_bug.cgi?id=171585
<rdar://problem/31544320>

Reviewed by Beth Dakin and Zalan Bujtas.

Source/WebCore:

Covered by 4 API tests.

  • dom/DocumentMarker.h:

Introduces the DraggedContent DocumentMarker type, which applies to the Range in the DOM that is being used as
a drag source. Also adds DraggedContentData, which contains nodes found by the TextIterator in the process of
finding Ranges to mark.

(WebCore::DocumentMarker::AllMarkers::AllMarkers):

  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::addDraggedContentMarker):
(WebCore::shouldInsertAsSeparateMarker):
(WebCore::DocumentMarkerController::addMarker):

When adding DocumentMarkers of type DraggedContent, keep adjacent RenderReplaced elements separate, rather than
merging them into existing RenderedDocumentMarkers. This is because the data for each of these (i.e. the target
node) needs to be preserved.

(WebCore::DocumentMarkerController::markersFor):

Bail and return an empty list if the map of document markers cannot possibly contain a dragged content marker.

  • dom/DocumentMarkerController.h:
  • page/DragController.h:
  • page/DragState.h:

Add draggedContentRange to DragState. This tracks the Range that is being dragged; it is created when the drag
session has begun, and ends when drag session finishes (either via WebPage::dragEnded or WebPage::dragCancelled).

  • page/EventHandler.cpp:

(WebCore::repaintContentsOfRange):
(WebCore::EventHandler::dragCancelled):

Called when a drag is cancelled in the UI process without a session ever getting a chance to begin. We use this
as a hook to remove all DraggedContent document markers from the document of the dragged content range.

(WebCore::EventHandler::didStartDrag):

Called when a drag session has begun in the UI process. We use this as a hook to set up document markers for the
Range of content being dragged.

(WebCore::EventHandler::dragSourceEndedAt):

Called when a drag session ends. We use this as a hook to remove all DraggedContent document markers from the
document of the dragged content range.

(WebCore::EventHandler::draggedElement):

  • page/EventHandler.h:
  • page/FocusController.cpp:

(WebCore::shouldClearSelectionWhenChangingFocusedElement):

Prevent the selection from clearing when the previously focused element is editable and also contains the drag
source element. Ideally, we should experiment with clearing out the selection whenever the element is blurred
(and not have additional restrictions on editability and containing the drag source), but this change is much
riskier.

(WebCore::FocusController::setFocusedElement):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):

Use RenderText::draggedContentStartEnd to find the range of text (if any) that is dragged content, and paint
these ranges of text at a lower alpha using TextPainter::paintTextInRange.

  • rendering/RenderReplaced.cpp:

(WebCore::draggedContentContainsReplacedElement):

Determines whether or not the element being rendered is contained within a dragged content range. Assuming that
the DraggedContent type flag is set in DocumentMarkerController, we first look to see whether or not the
container node is in the document marker map. If so, instead of consulting node offset ranges (since this is, in
the worst-case, linear in the number of sibling nodes per RenderReplaced) we simply check the DraggedContentData
to see if the current element being rendered matches one of the target nodes.

(WebCore::RenderReplaced::paint):

If the element rendered by this RenderReplaced is dragged content, then render it at a low alpha.

  • rendering/RenderText.cpp:

(WebCore::RenderText::draggedContentRangesBetweenOffsets):

Determines what range of text, if any, contains dragged content by consulting the Document's DocumentMarkers.

  • rendering/RenderText.h:
  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintTextInRange):

Teach TextPainter to only paint a given range in a TextRun.

  • rendering/TextPainter.h:

Add TextPainter support for specifying special text offset ranges when rendering a TextRun, such that each
special range in text is rendered after applying some modification to the GraphicsContext.

Source/WebKit2:

Minor adjustments and refactoring in WebKit2. See WebCore ChangeLog for more details.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::startDrag):
(WebKit::WebPageProxy::didStartDrag):

Factor out code in WebPageProxy that sends a WebPage::DidStartDrag message to the web process into a separate
helper, and tweak the places where we directly send this IPC message to the web process to instead call this
helper.

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::setDragImage):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didStartDrag):
(WebKit::WebPage::dragCancelled):

Clear out state in the web process and call out to the EventHandler to handle drag cancellation and the drag
start response from the UI process.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::didStartDrag): Deleted.
(WebKit::WebPage::dragCancelled): Deleted.

Tools:

Adds 1 new unit test and tweaks existing tests to check that when first responder status is lost after beginning
a drag while editing, content is still moved (and not copied) when performing data interaction on a different
element. ContentEditableMoveParagraphs checks that content can be shifted within a single element via a move
operation rather than a copy.

See WebCore ChangeLog for more details.

Tests: DataInteractionSimulator.ContentEditableToContentEditable

DataInteractionSimulator.ContentEditableToTextarea
DataInteractionSimulator.ContentEditableMoveParagraphs
DataInteractionSimulator.TextAreaToInput

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/two-paragraph-contenteditable.html: Added.
  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

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

(-[DataInteractionSimulator initWithWebView:]):
(-[DataInteractionSimulator dealloc]):
(-[DataInteractionSimulator _advanceProgress]):
(-[DataInteractionSimulator waitForInputSession]):
(-[DataInteractionSimulator _webView:focusShouldStartInputSession:]):
(-[DataInteractionSimulator _webView:didStartInputSession:]):

2:46 PM Changeset in webkit [216211] by commit-queue@webkit.org
  • 165 edits in trunk

Tools:
Rename TestRunner.display() to TestRunner::displayAndTrackRepaints()
https://bugs.webkit.org/show_bug.cgi?id=171641

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

The plan is to add back the TestRunner.display() which does the display
only without track repaints.

  • DumpRenderTree/DumpRenderTree.h:
  • DumpRenderTree/TestRunner.cpp:

(displayAndTrackRepaintsCallback):
(TestRunner::staticFunctions):
(displayCallback): Deleted.
(displayInvalidatedRegionCallback): Deleted.

  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(displayWebView):
(displayAndTrackRepaintsWebView):

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::displayAndTrackRepaints):
(TestRunner::display): Deleted.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::displayAndTrackRepaints):
(TestRunner::display): Deleted.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::displayAndTrackRepaints):
(WTR::TestRunner::display): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:
Rename testRunner.displayAndTrackRepaints() to testRunner.displayAndTrackRepaints()
https://bugs.webkit.org/show_bug.cgi?id=171641

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

Replace all the calls to testRunner.displayAndTrackRepaints() by testRunner.displayAndTrackRepaints()
Replace all the calls to testRunner.displayInvalidatedRegion() by
testRunner.displayAndTrackRepaints() since the former is a copy of the later.

  • compositing/clip-change.html:
  • compositing/geometry/foreground-offset-change.html:
  • compositing/geometry/limit-layer-bounds-transformed-overflow.html:
  • compositing/iframes/become-composited-nested-iframes.html:
  • compositing/iframes/become-overlapped-iframe.html:
  • compositing/iframes/connect-compositing-iframe-delayed.html:
  • compositing/iframes/connect-compositing-iframe.html:
  • compositing/iframes/connect-compositing-iframe2.html:
  • compositing/iframes/connect-compositing-iframe3.html:
  • compositing/iframes/enter-compositing-iframe.html:
  • compositing/iframes/iframe-content-flipping.html:
  • compositing/iframes/iframe-resize.html:
  • compositing/iframes/iframe-size-to-zero.html:
  • compositing/iframes/iframe-src-change.html:
  • compositing/iframes/invisible-nested-iframe-hide.html:
  • compositing/iframes/invisible-nested-iframe-show.html:
  • compositing/iframes/leave-compositing-iframe.html:
  • compositing/iframes/overlapped-iframe-iframe.html:
  • compositing/iframes/overlapped-iframe.html:
  • compositing/iframes/overlapped-nested-iframes.html:
  • compositing/iframes/repaint-after-losing-scrollbars.html:
  • compositing/iframes/resources/fixed-position-subframe.html:
  • compositing/iframes/resources/fixed-position-transformed-subframe.html:
  • compositing/iframes/resources/scrollgrandchild-inner.html:
  • compositing/iframes/scrolling-iframe.html:
  • compositing/overflow/content-gains-scrollbars.html:
  • compositing/overflow/content-loses-scrollbars.html:
  • compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html:
  • compositing/overflow/overflow-scrollbar-layers.html:
  • compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html:
  • compositing/overflow/repaint-after-losing-scrollbars.html:
  • compositing/patterns/direct-pattern-compositing-add-text-expected.html:
  • compositing/patterns/direct-pattern-compositing-add-text.html:
  • compositing/patterns/direct-pattern-compositing-change-expected.html:
  • compositing/patterns/direct-pattern-compositing-change.html:
  • compositing/patterns/direct-pattern-compositing-load-expected.html:
  • compositing/patterns/direct-pattern-compositing-load.html:
  • compositing/plugins/invalidate_rect.html:
  • compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint.html:
  • compositing/repaint/iframes/compositing-iframe-scroll-repaint.html:
  • compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint.html:
  • compositing/repaint/newly-composited-on-scroll.html:
  • compositing/repaint/newly-composited-repaint-rect.html:
  • compositing/repaint/page-scale-repaint.html:
  • compositing/repaint/requires-backing-repaint.html:
  • compositing/repaint/transform-style-change.html:
  • compositing/rtl/rtl-overflow-invalidation.html:
  • compositing/scroll-painted-composited-content.html:
  • compositing/tiling/huge-layer-resize.html:
  • compositing/video-page-visibility.html:
  • compositing/video/video-with-invalid-source.html:
  • compositing/webgl/webgl-repaint.html:
  • css3/filters/multiple-filters-invalidation.html:
  • css3/flexbox/repaint-column-reverse.html:
  • css3/flexbox/repaint-during-resize-no-flex.html:
  • css3/flexbox/repaint-rtl-column.html:
  • css3/flexbox/repaint.html:
  • displaylists/canvas-display-list.html:
  • displaylists/resources/dump-target-display-list.js:

(doTest):

  • displaylists/resources/dump-target-replay-list.js:

(doTest):

  • fast/animation/request-animation-frame-detach-element.html:
  • fast/animation/request-animation-frame-detach-element2.html:
  • fast/animation/request-animation-frame-during-modal.html:
  • fast/animation/request-animation-frame-iframe.html:
  • fast/animation/request-animation-frame-iframe2.html:
  • fast/animation/script-tests/request-animation-frame-cancel.js:
  • fast/animation/script-tests/request-animation-frame-cancel2.js:
  • fast/animation/script-tests/request-animation-frame-disabled.js:
  • fast/animation/script-tests/request-animation-frame-prefix.js:

(window.webkitRequestAnimationFrame):
(window.testRunner.window.setTimeout):

  • fast/animation/script-tests/request-animation-frame-time-unit.js:

(window.requestAnimationFrame):

  • fast/animation/script-tests/request-animation-frame-timestamps-advance.js:

(window.requestAnimationFrame):
(window.testRunner.window.setTimeout):

  • fast/animation/script-tests/request-animation-frame-timestamps.js:
  • fast/animation/script-tests/request-animation-frame-within-callback.js:
  • fast/animation/script-tests/request-animation-frame.js:
  • fast/backgrounds/obscured-background-child-style-change-expected.html:
  • fast/backgrounds/obscured-background-child-style-change.html:
  • fast/backgrounds/solid-color-context-restore.html:
  • fast/canvas/canvas-as-image-incremental-repaint.html:
  • fast/canvas/canvas-incremental-repaint-2.html:
  • fast/canvas/canvas-incremental-repaint.html:
  • fast/canvas/canvas-resize-after-paint.html:
  • fast/canvas/resources/repaint.js:

(runRepaintTest):

  • fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js:

(TestControllerPaint):

  • fast/canvas/webgl/canvas-test.html:
  • fast/canvas/webgl/webgl-layer-update.html:
  • fast/css/pseudostyle-anonymous-text.html:
  • fast/css/relative-positioned-block-crash.html:
  • fast/dom/Window/post-message-crash.html:
  • fast/dom/Window/web-timing-minimal-performance-now.html:
  • fast/dynamic/containing-block-change.html:
  • fast/dynamic/layer-no-longer-paginated.html:
  • fast/events/touch/gesture/pad-gesture-cancel.js:
  • fast/events/touch/gesture/pad-gesture-fling.js:
  • fast/forms/hidden-listbox.html:
  • fast/forms/listbox-clip.html:
  • fast/frames/inline-object-inside-frameset.html:
  • fast/frames/transparent-scrollbar.html:
  • fast/images/animated-background-image-crash.html:
  • fast/layers/add-layer-with-nested-stacking.html:
  • fast/layers/inline-dirty-z-order-lists.html:
  • fast/layers/layer-content-visibility-change.html:
  • fast/layers/nested-layers-1.html:
  • fast/layers/nested-layers-2.html:
  • fast/layers/nested-layers-3.html:
  • fast/layers/nested-layers-4.html:
  • fast/layers/remove-layer-with-nested-stacking.html:
  • fast/overflow/hidden-scrollbar-resize.html:
  • fast/reflections/inline-crash.html:
  • fast/repaint/animation-after-layer-scroll.html:
  • fast/repaint/background-shorthand-with-gradient-and-height-changes.html:
  • fast/repaint/fixed-child-move-after-scroll.html:
  • fast/repaint/fixed-child-of-fixed-move-after-scroll.html:
  • fast/repaint/fixed-child-of-transformed-move-after-scroll.html:
  • fast/repaint/fixed-move-after-scroll.html:
  • fast/repaint/no-animation-outside-viewport-subframe.html:
  • fast/repaint/no-animation-outside-viewport.html:
  • fast/repaint/obscured-background-no-repaint.html:
  • fast/repaint/overflow-hidden-in-overflow-hidden-scrolled.html:
  • fast/repaint/renderer-destruction-by-invalidateSelection-crash.html:
  • fast/repaint/repaint-during-scroll-with-zoom.html:
  • fast/repaint/resources/fixed-move-after-keyboard-scroll-iframe.html:
  • fast/repaint/resources/iframe-scroll-repaint-iframe.html:
  • fast/repaint/resources/line-flow-with-floats.js:

(beginTest):

  • fast/repaint/resources/repaint.js:

(runRepaintTest):

  • fast/repaint/table-overflow-hidden-in-overflow-hidden-scrolled.html:
  • fast/replaced/width100percent-textarea.html:
  • fast/scrolling/scrollbar-tickmarks-hittest.html:
  • fast/table/border-collapsing/cached-69296.html:
  • fast/table/border-collapsing/cached-cell-append.html:
  • fast/table/border-collapsing/cached-cell-remove.html:
  • fast/table/border-collapsing/cached-change-cell-border-color.html:
  • fast/table/border-collapsing/cached-change-cell-border-width.html:
  • fast/table/border-collapsing/cached-change-cell-sl-border-color.html:
  • fast/table/border-collapsing/cached-change-col-border-color.html:
  • fast/table/border-collapsing/cached-change-col-border-width.html:
  • fast/table/border-collapsing/cached-change-colgroup-border-color.html:
  • fast/table/border-collapsing/cached-change-colgroup-border-width.html:
  • fast/table/border-collapsing/cached-change-row-border-color.html:
  • fast/table/border-collapsing/cached-change-row-border-width.html:
  • fast/table/border-collapsing/cached-change-table-border-color.html:
  • fast/table/border-collapsing/cached-change-table-border-width.html:
  • fast/table/border-collapsing/cached-change-tbody-border-color.html:
  • fast/table/border-collapsing/cached-change-tbody-border-width.html:
  • fast/table/empty-section-crash.html:
  • fast/text/font-initial.html:
  • fast/text/international/harfbuzz-runs-with-no-glyph.html:
  • fast/text/text-shadow-extreme-value.html:
  • http/tests/misc/slow-loading-image-in-pattern.html:
  • media/audio-repaint.html:
  • media/media-document-audio-repaint.html:
  • plugins/windowless_plugin_paint_test.html:
  • scrollbars/scrollbar-percent-padding-crash.html:
  • svg/custom/non-scaling-stroke-update.svg:
  • svg/custom/stale-resource-data-crash.svg:
2:42 PM Changeset in webkit [216210] by beidson@apple.com
  • 2 edits in trunk/Tools

[ios-simulator] API test WebKit2.WebsiteDataStoreCustomPaths is failing.
https://bugs.webkit.org/show_bug.cgi?id=171513

Unreviewed gardening.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

(TEST): Skip the failing parts of the test on iOS for now.

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

Crash when pointer lock element is removed before pointer lock allowed arrives.
https://bugs.webkit.org/show_bug.cgi?id=171642

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-04
Reviewed by Jer Noble.

Make sure there a pending lock before attempting to complete pointer lock.

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::didAcquirePointerLock):

2:27 PM Changeset in webkit [216208] by Chris Dumez
  • 4 edits in trunk

Reformat / Clean up Node.idl to match the specification
https://bugs.webkit.org/show_bug.cgi?id=171686

Reviewed by Sam Weinig.

Source/WebCore:

Reformat / Clean up Node.idl to match the specification:

There should be no Web-facing behavior change, except for Node properties
being enumerated in a slightly different order.

  • dom/Node.idl:

LayoutTests:

Rebaseline existing test now that the Node properties are enumerated in a
slightly different order.

  • js/dom/dom-static-property-for-in-iteration-expected.txt:
2:06 PM Changeset in webkit [216207] by Jonathan Bedard
  • 3 edits
    4 copies
    6 adds in trunk/Tools

Make ImageDiff stand-alone
https://bugs.webkit.org/show_bug.cgi?id=168939

Reviewed by David Kilzer.

Create ImageDiff without dependencies on bmalloc and WTF so that it exists as a
stand-alone project. Note that this change does not eliminate the ImageDiff inside
the DumpRenderTree project.

  • ImageDiff/ImageDiff.xcodeproj: Added.
  • ImageDiff/ImageDiff.xcodeproj/project.pbxproj: Added.
  • ImageDiff/Makefile: Use ImageDiff project.
  • ImageDiff/PlatformMac.cmake: Added.
  • ImageDiff/PlatformWin.cmake: Added.
  • ImageDiff/cg: Added.
  • ImageDiff/cg/Configurations: Added.
  • ImageDiff/cg/Configurations/Base.xcconfig: Copied from Tools/DumpRenderTree/mac/Configurations/Base.xcconfig.
  • ImageDiff/cg/Configurations/DebugRelease.xcconfig: Copied from Tools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig.
  • ImageDiff/cg/Configurations/ImageDiff.xcconfig: Copied from Tools/DumpRenderTree/mac/Configurations/ImageDiff.xcconfig.
  • ImageDiff/cg/ImageDiff.cpp: Copied from Tools/DumpRenderTree/cg/ImageDiffCG.cpp.

(createImageFromStdin): Stop using RetainPtr.
(createDifferenceImage): Ditto.
(main): Ditto.

  • Scripts/build-imagediff: Stop building WTF and bmalloc.
1:56 PM Changeset in webkit [216206] by weinig@apple.com
  • 63 edits
    11 deletes in trunk

Remove support for legacy Notifications
https://bugs.webkit.org/show_bug.cgi?id=171487

Reviewed by Jon Lee.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Remove definition of ENABLE_LEGACY_NOTIFICATIONS.

Source/WebCore:

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

Remove files.

  • Configurations/FeatureDefines.xcconfig:

Remove definition of ENABLE_LEGACY_NOTIFICATIONS.

  • DerivedSources.make:

Remove IDL files.

  • Modules/notifications/DOMWindowNotifications.cpp: Removed.
  • Modules/notifications/DOMWindowNotifications.h: Removed.
  • Modules/notifications/DOMWindowNotifications.idl: Removed.
  • Modules/notifications/NotificationCenter.cpp: Removed.
  • Modules/notifications/NotificationCenter.h: Removed.
  • Modules/notifications/NotificationCenter.idl: Removed.
  • Modules/notifications/NotificationClient.h:
  • Modules/notifications/NotificationController.cpp:
  • Modules/notifications/NotificationController.h:
  • Modules/notifications/WorkerGlobalScopeNotifications.cpp: Removed.
  • Modules/notifications/WorkerGlobalScopeNotifications.h: Removed.
  • Modules/notifications/WorkerGlobalScopeNotifications.idl: Removed.
  • Modules/notifications/Notification.idl:
  • Modules/notifications/Notification.cpp:
  • Modules/notifications/Notification.h:
  • dom/EventTargetFactory.in:
  • page/DOMWindow.cpp:
  • workers/WorkerThread.h:

Remove code legacy Notification code. Replace use of NotificationCenter with direct
calls to the NotificationClient.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Remove definition of ENABLE_LEGACY_NOTIFICATIONS.

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:
  • WebCoreSupport/WebNotificationClient.h:
  • WebCoreSupport/WebNotificationClient.mm:
  • WebView/WebNotification.mm:
  • WebView/WebNotificationInternal.h:
  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _notificationIDForTesting:]):
Remove legacy notification specific code.

Source/WebKit/win:

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::WebChromeClient):

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
  • WebCoreSupport/WebDesktopNotificationsDelegate.h:

Remove legacy notification specific code.

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebProcessCreationParameters.cpp:
  • Shared/WebProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:
  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/Notifications/WebNotificationManager.cpp:
  • WebProcess/Notifications/WebNotificationManager.h:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:
  • WebProcess/WebCoreSupport/WebNotificationClient.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebProcess.cpp:

Remove legacy notification specific code.

Source/WTF:

  • wtf/FeatureDefines.h:

Remove definition of ENABLE_LEGACY_NOTIFICATIONS.

Tools:

  • DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:

(DRTDesktopNotificationPresenter::checkNotificationPermission):

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Remove use and definition of ENABLE_LEGACY_NOTIFICATIONS.

LayoutTests:

  • Remove fast/notifications/. It was skipped on all platforms and use legacy Notifications API.
  • Remove http/notifications/legacy. It tested the legacy API.
  • Update two tests in fast/history to use the non-legacy API to test page cache + notifications.
  • Update TestExpectations for removals.
  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • fast/history/page-cache-notification-non-suspendable.html:
  • fast/history/page-cache-notification-suspendable.html:
  • fast/notifications: Removed.
  • fast/notifications/notification-after-close-expected.txt: Removed.
  • fast/notifications/notification-after-close.html: Removed.
  • fast/notifications/notification-permisssion-deletable-expected.txt: Removed.
  • fast/notifications/notification-permisssion-deletable.html: Removed.
  • fast/notifications/notifications-cancel-request-permission-expected.txt: Removed.
  • fast/notifications/notifications-cancel-request-permission.html: Removed.
  • fast/notifications/notifications-check-permission-expected.txt: Removed.
  • fast/notifications/notifications-check-permission.html: Removed.
  • fast/notifications/notifications-click-event-expected.txt: Removed.
  • fast/notifications/notifications-click-event-focus-expected.txt: Removed.
  • fast/notifications/notifications-click-event-focus.html: Removed.
  • fast/notifications/notifications-click-event.html: Removed.
  • fast/notifications/notifications-constructor-request-permission-expected.txt: Removed.
  • fast/notifications/notifications-constructor-request-permission.html: Removed.
  • fast/notifications/notifications-constructor-with-permission-expected.txt: Removed.
  • fast/notifications/notifications-constructor-with-permission.html: Removed.
  • fast/notifications/notifications-constructor-without-permission-expected.txt: Removed.
  • fast/notifications/notifications-constructor-without-permission.html: Removed.
  • fast/notifications/notifications-display-close-events-expected.txt: Removed.
  • fast/notifications/notifications-display-close-events.html: Removed.
  • fast/notifications/notifications-document-close-crash-expected.txt: Removed.
  • fast/notifications/notifications-document-close-crash.html: Removed.
  • fast/notifications/notifications-event-stop-propagation-expected.txt: Removed.
  • fast/notifications/notifications-event-stop-propagation.html: Removed.
  • fast/notifications/notifications-multi-events-expected.txt: Removed.
  • fast/notifications/notifications-multi-events.html: Removed.
  • fast/notifications/notifications-no-icon-expected.txt: Removed.
  • fast/notifications/notifications-no-icon.html: Removed.
  • fast/notifications/notifications-permission-expected.txt: Removed.
  • fast/notifications/notifications-permission.html: Removed.
  • fast/notifications/notifications-replace-expected.txt: Removed.
  • fast/notifications/notifications-replace.html: Removed.
  • fast/notifications/notifications-request-permission-expected.txt: Removed.
  • fast/notifications/notifications-request-permission-optional-expected.txt: Removed.
  • fast/notifications/notifications-request-permission-optional.html: Removed.
  • fast/notifications/notifications-request-permission.html: Removed.
  • fast/notifications/notifications-rtl-expected.txt: Removed.
  • fast/notifications/notifications-rtl.html: Removed.
  • fast/notifications/notifications-sandbox-permission-expected.txt: Removed.
  • fast/notifications/notifications-sandbox-permission.html: Removed.
  • fast/notifications/notifications-window-close-crash-expected.txt: Removed.
  • fast/notifications/notifications-window-close-crash.html: Removed.
  • fast/notifications/notifications-with-permission-expected.txt: Removed.
  • fast/notifications/notifications-with-permission.html: Removed.
  • fast/notifications/notifications-without-permission-expected.txt: Removed.
  • fast/notifications/notifications-without-permission.html: Removed.
  • fast/notifications/request-notification-permission-while-reloading-expected.txt: Removed.
  • fast/notifications/request-notification-permission-while-reloading.html: Removed.
  • fast/notifications/resources: Removed.
  • fast/notifications/resources/notifications-cancel-request-permission.html: Removed.
  • fast/notifications/resources/notifications-iframe.html: Removed.
  • http/tests/notifications/legacy: Removed.
  • http/tests/notifications/legacy/double-show-expected.txt: Removed.
  • http/tests/notifications/legacy/double-show.html: Removed.
  • http/tests/notifications/legacy/events-expected.txt: Removed.
  • http/tests/notifications/legacy/events.html: Removed.
  • http/tests/notifications/legacy/notification-request-permission-then-navigate-expected.txt: Removed.
  • http/tests/notifications/legacy/notification-request-permission-then-navigate.html: Removed.
  • http/tests/notifications/legacy/request-expected.txt: Removed.
  • http/tests/notifications/legacy/request-no-callback-expected.txt: Removed.
  • http/tests/notifications/legacy/request-no-callback.html: Removed.
  • http/tests/notifications/legacy/request.html: Removed.
  • http/tests/notifications/legacy/resources: Removed.
  • http/tests/notifications/legacy/resources/notify-opener-done.html: Removed.
  • http/tests/notifications/legacy/resources/request-permission-then-navigate.html: Removed.
  • http/tests/notifications/legacy/show-expected.txt: Removed.
  • http/tests/notifications/legacy/show.html: Removed.
  • http/tests/notifications/legacy/window-show-on-click-expected.txt: Removed.
  • http/tests/notifications/legacy/window-show-on-click.html: Removed.
1:20 PM Changeset in webkit [216205] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked http/tests/xmlhttprequest/workers/methods-async.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=160368

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
1:16 PM Changeset in webkit [216204] by Antti Koivisto
  • 8 edits
    2 adds in trunk

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

Reviewed by Geoffrey Garen.

Source/WebCore:

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

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

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createTransitionPropertyValue):

Return the correct name for unknown properties.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationProperty):

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

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions):

Ignore AnimateUnknownProperty like AnimateNone.

  • platform/animation/Animation.h:

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

LayoutTests:

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

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

1:08 PM Changeset in webkit [216203] by aestes@apple.com
  • 13 edits in trunk/Tools

Give +testwebkitapi_configurationWithTestPlugInClassName: a shorter name
https://bugs.webkit.org/show_bug.cgi?id=171673

Reviewed by Dan Bernstein.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AdditionalReadAccessAllowedURLs.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleParameters.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/CancelFontSubresource.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm:

(configurationWithContentFilterSettings):
(-[LazilyLoadPlatformFrameworksController init]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptions.mm:

(runTestWithWidth):

  • TestWebKitAPI/Tests/WebKit2Cocoa/UserContentWorld.mm:

(TEST):

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/WKWebViewConfigurationExtras.h:
  • TestWebKitAPI/WKWebViewConfigurationExtras.mm:

(+[WKWebViewConfiguration _test_configurationWithTestPlugInClassName:]):
(+[WKWebViewConfiguration testwebkitapi_configurationWithTestPlugInClassName:]): Renamed to
+_test_configurationWithTestPlugInClassName:

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

Clean up MutationRecord.idl
https://bugs.webkit.org/show_bug.cgi?id=171685

Reviewed by Sam Weinig.

Clean up MutationRecord.idl to match the specification:

There is no Web-facing behavior change.

  • dom/MutationRecord.idl:
1:00 PM Changeset in webkit [216201] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[GTK][JSCOnly] Implement memoryFootprint for Linux
https://bugs.webkit.org/show_bug.cgi?id=171680

Reviewed by Carlos Alberto Lopez Perez.

Darwin's phys_footprint returns the amount of dirty anonymous memory in the process.
This patch implements the same thing in Linux by reading /proc/self/smaps.
We sum sizes of private dirty pages in anonymous regions.

  • wtf/MemoryFootprint.cpp:

(WTF::forEachLine):
(WTF::memoryFootprint):

12:55 PM Changeset in webkit [216200] by Chris Dumez
  • 4 edits in trunk

Reformat / clean up Event.idl
https://bugs.webkit.org/show_bug.cgi?id=171675

Reviewed by Sam Weinig.

Source/WebCore:

Reformat / clean up Event.idl to match the latest spec more closely:

There is no web-facing behavior change, except for properties being
enumerated in a slightly different order.

  • dom/Event.idl:

LayoutTests:

Rebaseline test now that the Event properties are in a slightly different order.

  • inspector/model/remote-object-get-properties-expected.txt:
12:49 PM Changeset in webkit [216199] by dbates@webkit.org
  • 7 edits in trunk/Source/WebCore

Cleanup: Extract CachedScript::mimeTypeAllowedByNosniff() into a common function
https://bugs.webkit.org/show_bug.cgi?id=171678

Reviewed by Andy Estes.

Extract CachedScript::mimeTypeAllowedByNosniff() into a common function that can
be shared by LoadableClassicScript and WorkerScriptLoader.

No functionality was changed. So, no new tests.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::notifyFinished): Modified to use WebCore::isScriptAllowedByNosniff().

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::mimeType): Deleted; incorporated into WebCore::isScriptAllowedByNosniff().
(WebCore::CachedScript::mimeTypeAllowedByNosniff): Deleted; incorporated into WebCore::isScriptAllowedByNosniff().

  • loader/cache/CachedScript.h:
  • platform/network/ResourceResponseBase.cpp:

(WebCore::isScriptAllowedByNosniff): Added. Note that it is sufficient to extract the MIME type
as-is and query the MIME type registry because the MIME type registry performs look ups case-insensitively.

  • platform/network/ResourceResponseBase.h:
  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::didReceiveResponse): Modified to use WebCore::isScriptAllowedByNosniff().
(WebCore::mimeTypeAllowedByNosniff): Deleted.

11:39 AM Changeset in webkit [216198] by commit-queue@webkit.org
  • 73 edits in trunk/Source/WebCore

Make the [EnabledBySetting] extended attribute work for any attribute or operation on a prototype
https://bugs.webkit.org/show_bug.cgi?id=171588

Patch by Sam Weinig <sam@webkit.org> on 2017-05-04
Reviewed by Dean Jackson.

  • bindings/js/JSDOMIterator.h:

(WebCore::JSDOMIterator::createPrototype):

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):

  • bindings/js/JSDOMWrapperCache.h:

(WebCore::getDOMStructure):
(WebCore::getDOMPrototype):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):
Update to account for createPrototype and prototype taking the global object by reference.

  • bindings/scripts/CodeGeneratorJS.pm:

(NeedsSettingsCheckForPrototypeProperty):
Add predicate to determine if an interface has any settings enabled properties on the prototype,
needed to determine if we should pass the global object to finishCreation.

(GenerateHeader):
Update signature of both createPrototype and prototype to take JSDOMGlobalObject& rather than
a JSC::JSGlobalObject*, this allows us to pass the more specific type to the prototype constructor,
and access the ScriptExecutionContext for the Settings.

(GeneratePropertiesHashTable):
Update to return, via out parameter, arrays with the attributes and operations that specify EnabledBySetting. This
mimics the model used for RuntimeEnabledFeatures.

(GenerateImplementation):
In {Class}Prototype::finishCreation, add code to check settings to see if an attribute or operation should be enabled,
and if it shouldn't remove it from the object. This, again, is modeled on RuntimeEnabledFeatures.

(GeneratePrototypeDeclaration):
Update signatures to take JSDOMGlobalObject& and specialize finishCreation to take one if there are any properties
that require settings to enable.

(GenerateConstructorHelperMethods):
Update for new signature of prototype(...).

  • bindings/scripts/test/JS/JSInterfaceName.cpp:
  • bindings/scripts/test/JS/JSInterfaceName.h:
  • bindings/scripts/test/JS/JSMapLike.cpp:
  • bindings/scripts/test/JS/JSMapLike.h:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.h:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.h:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
  • bindings/scripts/test/JS/JSTestGlobalObject.h:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
  • bindings/scripts/test/JS/JSTestIterable.cpp:
  • bindings/scripts/test/JS/JSTestIterable.h:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerialization.h:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.h:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.h:

Update test results for new test values and changes in signatures to pass JSDOMGlobalObject.

  • bindings/scripts/test/TestObj.idl:

Add tests for [EnableBySetting] for attributes and operations.

  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • bridge/runtime_method.h:
  • bridge/runtime_object.h:
  • inspector/CommandLineAPIHost.cpp:

Update createPrototype function to take the global object by reference.

11:32 AM Changeset in webkit [216197] by eric.carlson@apple.com
  • 33 edits
    2 adds in trunk

[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>

Reviewed by Jer Noble.

Source/WebCore:

No new layout tests, added an API test instead.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::endStream): New, stop all tracks.

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStreamRegistry.cpp:

(WebCore::MediaStreamRegistry::unregisterStream): Minor cleanup.
(WebCore::MediaStreamRegistry::forEach): New, call the lambda with each stream.
(WebCore::MediaStreamRegistry::MediaStreamRegistry): Deleted, unused.

  • Modules/mediastream/MediaStreamRegistry.h:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::stopTrack): Add parameter so caller can specify if an 'ended'
event should be sent or not.
(WebCore::MediaStreamTrack::trackMutedChanged): Don't post an event if the track has ended.

  • Modules/mediastream/MediaStreamTrack.h:
  • dom/Document.cpp:

(WebCore::Document::stopMediaCapture): Stop all streams in the document.

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

(WebCore::Page::stopMediaCapture): Stop all streams.

  • page/Page.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Display a black frame
when the stream ends.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Signal a characteristics
change to HTMLMediaElement refresh state.

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

(WebCore::AVMediaCaptureSource::stopProducingData): Don't return early if the session isn't
running, we always need to clear m_session on iOS.

Source/WebKit2:

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMediaCaptureEnabled): New.
(WKPageGetMediaCaptureEnabled): New.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setMediaCaptureEnabled:]): New.
(-[WKWebView _mediaCaptureEnabled]): New.

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

(WebKit::UIDelegate::setDelegate): Initialize webViewRequestUserMediaAuthorizationForDevicesURLMainFrameURLDecisionHandler
and webViewCheckUserMediaPermissionForURLMainFrameURLFrameIdentifierDecisionHandler on macOS
and iOS.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
Initialize the rejection timer.
(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
Call invalidatePendingRequests.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests): Invalidate all
pending requests.
(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::rejectionTimerFired): Reject a promise and
schedule the timer if there are any others pending.
(WebKit::UserMediaPermissionRequestManagerProxy::scheduleNextRejection):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Don't
prompt the user if capture is disabled.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::clearCachedState): Deleted.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Stop capture in the current
page on iOS.
(WebKit::UserMediaProcessManager::setCaptureEnabled):

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

(WebKit::WebPageProxy::setMediaCaptureEnabled):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::mediaCaptureEnabled):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::cancelPendingRequests): New, cancel all pending
requests.
(WebKit::UserMediaPermissionRequestManager::cancelUserMediaRequest): Deny the request.
(WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopMediaCapture):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/UserMediaDisabled.mm: Added.

(-[UserMediaMessageHandler userContentController:didReceiveScriptMessage:]):
(-[UserMediaUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[UserMediaUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(MediaCaptureDisabledTest::SetUp):
(MediaCaptureDisabledTest::loadTestAndWaitForMessage):
(TEST_F):

  • TestWebKitAPI/Tests/WebKit2Cocoa/disableGetUserMedia.html: Added.
11:27 AM Changeset in webkit [216196] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Antti Koivisto.

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

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

11:25 AM Changeset in webkit [216195] by dbates@webkit.org
  • 6 edits
    1 add in trunk

importScripts() should respect X-Content-Type-Options: nosniff
https://bugs.webkit.org/show_bug.cgi?id=171248
<rdar://problem/31819023>

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

Update expected results for Web Platform Tests that now pass.

  • web-platform-tests/fetch/nosniff/importscripts-expected.txt: Added.
  • web-platform-tests/fetch/nosniff/worker-expected.txt:

Source/WebCore:

Do not load a worker script if it has the HTTP response header "X-Content-Type-Options: nosniff"
and its Content-type header is not an allowed JavaScript script mime type. This behavior follows
from <https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-imported-script> (3 May 2017),
<https://fetch.spec.whatwg.org/#concept-fetch> (2 May 2017), and <https://fetch.spec.whatwg.org/#concept-main-fetch>.

  • workers/WorkerScriptLoader.cpp:

(WebCore::mimeTypeAllowedByNosniff): Added.
(WebCore::WorkerScriptLoader::didReceiveResponse): Mark the load as failed if the response
is not allowed by X-Content-Type-Options: nosniff.

LayoutTests:

Unskip web-platform-tests/fetch/nosniff/importscripts as it now passes.

11:02 AM Changeset in webkit [216194] by Said Abou-Hallawa
  • 2 edits in trunk/LayoutTests

Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).

  • plugins/windowless_plugin_paint_test.html:
10:46 AM Changeset in webkit [216193] by Caio Lima
  • 2 edits in trunk/Tools

Unreviewed, Adding self to contributors.json

  • Scripts/webkitpy/common/config/contributors.json: Added name.
10:44 AM Changeset in webkit [216192] by Said Abou-Hallawa
  • 2 edits in trunk/LayoutTests

Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).

  • compositing/video/video-with-invalid-source.html:
10:19 AM Changeset in webkit [216191] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip media/modern-media-controls/pip-support/pip-support-click.html on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171610

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:45 AM Changeset in webkit [216190] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

9:41 AM Changeset in webkit [216189] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.21

Tag Safari-604.1.21.

8:41 AM Changeset in webkit [216188] by hyatt@apple.com
  • 3 edits
    2 adds in trunk

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

Reviewed by Zalan Bujtas.

Source/WebCore:

Added new test in fast/css/variables.

  • css/CSSCalculationValue.cpp:

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

LayoutTests:

  • fast/css/variables/calc-float-to-int-expected.html: Added.
  • fast/css/variables/calc-float-to-int.html: Added.
8:33 AM Changeset in webkit [216187] by Konstantin Tokarev
  • 7 edits in trunk

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

Reviewed by Mark Lam.

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

Source/JavaScriptCore:

  • API/JSStringRef.cpp:

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

  • runtime/DateConversion.cpp:

(JSC::formatDateTime):

Source/WebKit2:

  • Shared/API/c/WKString.cpp:

(WKStringGetCharacters):

Tools:

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback):

7:58 AM Changeset in webkit [216186] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

[Cocoa] -[WKWebsiteDataStore httpCookieStore] is declared in the main @interface but implemented in a category
https://bugs.webkit.org/show_bug.cgi?id=171657

Reviewed by Sam Weinig.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore httpCookieStore]): Moved from the WKPrivate category into the main

@implementation block.

7:41 AM Changeset in webkit [216185] by aestes@apple.com
  • 9 edits in trunk

[Cocoa] Add an optional width parameter to -[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]
https://bugs.webkit.org/show_bug.cgi?id=171646
<rdar://problem/30306321>

Reviewed by Tim Horton.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:

(-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]): Called
-renderedImageWithOptions:width: with a nil width.
(-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:width:]): Passed an optional width
to InjectedBundleNodeHandle::renderedImage().

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::imageForRect): If a width is specified, create an image graphics context at that
width, preserving the aspect ratio of paintingRect.
(WebKit::InjectedBundleNodeHandle::renderedImage):

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptions.mm:

(runTestWithWidth):
(TEST):
(-[RenderedImageWithOptionsObject didRenderImageWithSize:]): Deleted.

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptionsPlugIn.mm:

(-[RenderedImageWithOptionsPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[RenderedImageWithOptionsPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):
(-[RenderedImageWithOptionsPlugIn renderImageWithWidth:completionHandler:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptionsProtocol.h:
7:30 AM Changeset in webkit [216184] by commit-queue@webkit.org
  • 2 edits
    3 adds in trunk/Tools

[GTK] Fontconfig 2.11.2 in JHBuild does not build with glibc 2.25+ or gperf 3.1+
https://bugs.webkit.org/show_bug.cgi?id=171649

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

Add two patches picked from the upstream repository to fix building of
the Fontconfig module in JHBuild. Additionally, this needed a patch to
add "autogen.sh" as it is not included in release tarballs. Also:
building the module with srcdir!=builddir prevents "fcobjshash.gperf"
being regenerated (which is needed) so this is disabled for the
Fontconfig module.

  • gtk/jhbuild.modules:
  • gtk/patches/fontconfig-2.11.1-add-autogen.patch: Added.
  • gtk/patches/fontconfig-Avoid-conflicts-with-integer-width-macros-from-TS-18661-1-2014.patch: Added.
  • gtk/patches/fontconfig-Fix-the-build-issue-with-gperf-3.1.patch: Added.
5:56 AM Changeset in webkit [216183] by commit-queue@webkit.org
  • 33 edits
    2 deletes in trunk

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

FTBFS for iOS due to missing WebPageProxy::stopMediaCapture()
implementation. (Requested by ddkilzer on #webkit).

Reverted changeset:

"[MediaStream] Allow host application to enable/disable media
capture"
https://bugs.webkit.org/show_bug.cgi?id=171292
http://trac.webkit.org/changeset/216172

5:42 AM Changeset in webkit [216182] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

[Threaded Compositor] SHOULD NEVER BE REACHED in WebKit::CompositingRunLoop::updateCompleted
https://bugs.webkit.org/show_bug.cgi?id=171336

Reviewed by Michael Catanzaro.

We are assuming that all calls to ThreadedCompositor::renderLayerTree() happen because of an scheduled update,
but that's not true in the case of ThreadedCompositor::forceRepaint(). In that case we never want to call
CompositingRunLoop::updateCompleted().

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::forceRepaint):
(WebKit::ThreadedCompositor::sceneUpdateFinished):

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
5:30 AM Changeset in webkit [216181] by ddkilzer@apple.com
  • 5 edits in trunk/Source/WebKit2

check-webkit-style exits with an error while parsing Source/WebKit2/Scripts/webkit/ directory: KeyError: 'st'
<https://bugs.webkit.org/show_bug.cgi?id=171510>

Reviewed by Daniel Bates.

The problem was that 'import parser' was ambiguous since there
is a built-in parser module that comes with Python. Changing
'import parser' to 'from webkit import parser' fixed the error
in check-webkit-style (and pylint) by forcing it to load the
local 'parser' module, but then running messages_unittest.py
directly would fail because .../Source/WebKit2/Scripts was not
in the module search path by default. This is fixed by using
sys.path.append() to add .../Source/WebKit2/Scripts to the
module search path based on the path to messages_unittest.py.

As an added bonus, this patch also fixes all webkit-style issues
in Source/WebKit2/Scripts/webkit/*.py files.

  • Scripts/webkit/messages.py:
  • Separate local module imports from built-in modules for consistency.
  • Fix whitespace issues for check-webkit-style, and remove stray semi-colon.
  • Scripts/webkit/messages_unittest.py:
  • Update sys.path to find the 'webkit' module based on the path to messages_unittest.py. This makes 'from webkit import ...' statements work when running messages_unittest.py directly.
  • Change 'messages' and 'parser' modules to use 'from webkit import ...' format for consistency.
  • Fix whitespace issues for check-webkit-style.
  • Scripts/webkit/model.py:
  • Fix whitespace issue for check-webkit-style.
  • Scripts/webkit/parser.py:
  • Fix whitespace issue for check-webkit-style.
5:20 AM Changeset in webkit [216180] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

stress/call-apply-exponential-bytecode-size.js.no-llint failing on 32-bit debug for OOM on executable memory
https://bugs.webkit.org/show_bug.cgi?id=171008

Reviewed by Yusuke Suzuki.

This patch lowers the threshold for .call/.apply recursion
in an attempt to emit less code and not impact perf.
We're currently failing tests on x86-32 by running out
of executable memory. If perf gets impacted because of this,
then I'll apply a stricter change just to 32-bit platforms.
However, if this doesn't negatively impact perf, it's all around
better than all platforms emit less bytecode.

  • bytecompiler/NodesCodegen.cpp:
4:57 AM Changeset in webkit [216179] by commit-queue@webkit.org
  • 3 edits
    6 deletes in trunk/Tools

[GTK] Bump GStreamer version to 1.10.4 in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=171595

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-05-04
Reviewed by Xabier Rodriguez-Calvar.

  • gtk/jhbuild.modules:
  • gtk/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Removed.
  • gtk/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Removed.
  • gtk/patches/gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch: Removed.
  • gtk/patches/gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch: Removed.
  • gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch:
  • gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Removed.
  • gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Removed.
4:40 AM Changeset in webkit [216178] by Yusuke Suzuki
  • 30 edits
    14 adds in trunk

[JSC] Math unary functions should be handled by DFG
https://bugs.webkit.org/show_bug.cgi?id=171269

Reviewed by Saam Barati.

JSTests:

  • stress/arith-acos-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueACosNoArgument):
(testNoArgument):
(opaqueAllTypesACos):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueACosForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueACosForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueACosForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueACosWithException):
(testException):

  • stress/arith-acosh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueACoshNoArgument):
(testNoArgument):
(opaqueAllTypesACosh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueACoshForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueACoshForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueACoshForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueACoshWithException):
(testException):

  • stress/arith-asin-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueASinNoArgument):
(testNoArgument):
(opaqueAllTypesASin):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueASinForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueASinForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueASinForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueASinWithException):
(testException):

  • stress/arith-asinh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueASinhNoArgument):
(testNoArgument):
(opaqueAllTypesASinh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueASinhForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueASinhForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueASinhForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueASinhWithException):
(testException):

  • stress/arith-atan-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueATanNoArgument):
(testNoArgument):
(opaqueAllTypesATan):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueATanForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueATanForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueATanForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueATanWithException):
(testException):

  • stress/arith-atanh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueATanhNoArgument):
(testNoArgument):
(opaqueAllTypesATanh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueATanhForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueATanhForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueATanhForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueATanhWithException):
(testException):

  • stress/arith-cbrt-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueCbrtNoArgument):
(testNoArgument):
(opaqueAllTypesCbrt):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueCbrtForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueCbrtForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueCbrtForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueCbrtWithException):
(testException):

  • stress/arith-cosh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueCoshNoArgument):
(testNoArgument):
(opaqueAllTypesCosh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueCoshForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueCoshForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueCoshForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueCoshWithException):
(testException):

  • stress/arith-expm1-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueExpm1NoArgument):
(testNoArgument):
(opaqueAllTypesExpm1):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueExpm1ForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueExpm1ForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueExpm1ForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueExpm1WithException):
(testException):

  • stress/arith-log10-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueLog10NoArgument):
(testNoArgument):
(opaqueAllTypesLog10):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueLog10ForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueLog10ForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueLog10ForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueLog10WithException):
(testException):

  • stress/arith-log2-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueLog2NoArgument):
(testNoArgument):
(opaqueAllTypesLog2):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueLog2ForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueLog2ForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueLog2ForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueLog2WithException):
(testException):

  • stress/arith-sinh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueSinhNoArgument):
(testNoArgument):
(opaqueAllTypesSinh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueSinhForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueSinhForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueSinhForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueSinhWithException):
(testException):

  • stress/arith-tan-on-various-types.js:

(isIdentical):

  • stress/arith-tanh-on-various-types.js: Added.

(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueTanhNoArgument):
(testNoArgument):
(opaqueAllTypesTanh):
(testAllTypesCall):
(testSingleTypeCall):
(testConstant):
(opaqueTanhForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueTanhForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueTanhForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueTanhWithException):
(testException):

Source/JavaScriptCore:

ArithSin, ArithCos, and ArithLog are just calling a C runtime function.
While handling them in DFG is not very effective for performance, they
can drop some type checks & value conversions and mark them as pure
operations. It is effective if they are involved in some complex
optimization phase. Actually, ArithLog is effective in kraken.

While a few of Math functions have DFG nodes, basically math functions
are pure. And large part of these functions are just calling a C runtime
function. This patch generalizes these nodes in DFG as ArithUnary. And
we annotate many unary math functions with Intrinsics and convert them
to ArithUnary in DFG. It also cleans up duplicate code in ArithSin,
ArithCos, and ArithLog. If your math function has some good DFG / FTL
optimization rather than calling a C runtime function, you should add
a specialized DFG node, like ArithSqrt.

We also create a new namespace JSC::Math. Inside it, we collect math functions.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGArithMode.cpp:

(JSC::DFG::arithUnaryFunction):
(JSC::DFG::arithUnaryOperation):
(WTF::printInternal):

  • dfg/DFGArithMode.h:
  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasArithUnaryType):
(JSC::DFG::Node::arithUnaryType):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithUnary):
(JSC::DFG::SpeculativeJIT::compileArithCos): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithTan): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithSin): Deleted.
(JSC::DFG::SpeculativeJIT::compileArithLog): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileArithUnary):
(JSC::FTL::DFG::LowerDFGToB3::compileArithSin): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileArithCos): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileArithTan): Deleted.
(JSC::FTL::DFG::LowerDFGToB3::compileArithLog): Deleted.

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::doubleUnary):
(JSC::FTL::Output::doubleSin): Deleted.
(JSC::FTL::Output::doubleCos): Deleted.
(JSC::FTL::Output::doubleTan): Deleted.
(JSC::FTL::Output::doubleLog): Deleted.

  • ftl/FTLOutput.h:
  • runtime/Intrinsic.h:
  • runtime/MathCommon.cpp:

(JSC::Math::log1p):

  • runtime/MathCommon.h:
  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncTan):
(JSC::mathProtoFuncACosh):
(JSC::mathProtoFuncASinh):
(JSC::mathProtoFuncATanh):
(JSC::mathProtoFuncCbrt):
(JSC::mathProtoFuncCosh):
(JSC::mathProtoFuncExpm1):
(JSC::mathProtoFuncLog1p):
(JSC::mathProtoFuncLog10):
(JSC::mathProtoFuncLog2):
(JSC::mathProtoFuncSinh):
(JSC::mathProtoFuncTanh):

2:03 AM Changeset in webkit [216177] by Carlos Garcia Campos
  • 2 edits
    1 copy
    2 adds in trunk/LayoutTests

Unreviewed gardening. Update main expectations of http/tests/inspector/network/resource-request-headers.html.

And add platform specific results for mac-wk2.

  • http/tests/inspector/network/resource-request-headers-expected.txt:
  • platform/mac-wk2/http/tests/inspector/network/resource-request-headers-expected.txt: Copied from LayoutTests/http/tests/inspector/network/resource-request-headers-expected.txt.
12:38 AM Changeset in webkit [216176] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r214947 - Show a log message when an invalid message is received in non cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=170506

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-04-05
Reviewed by Michael Catanzaro.

We just crash, but without knowing the details about the message it's impossible to debug.

  • Shared/ChildProcess.cpp:

(WebKit::ChildProcess::didReceiveInvalidMessage):

May 3, 2017:

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

Merge r214915 - Do not assert when CharacterData representing an Attr fires events
https://bugs.webkit.org/show_bug.cgi?id=170454
<rdar://problem/30979320>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Make the NoEventDispatchAssertion in CharacterData::notifyParentAfterChange conditional
since Attr elements should be allowed to fire events.

Tests: fast/dom/no-assert-for-malformed-js-url-attribute.html

  • dom/CharacterData.cpp:

(WebCore::CharacterData::notifyParentAfterChange):

LayoutTests:

  • fast/dom/no-assert-for-malformed-js-url-attribute-expected.txt: Added.
  • fast/dom/no-assert-for-malformed-js-url-attribute.html: Added.
11:14 PM Changeset in webkit [216174] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

REGRESSION(r215686): Incremental reads from SharedBuffer are wrong after r215686
https://bugs.webkit.org/show_bug.cgi?id=171602

Reviewed by Michael Catanzaro.

In TextTrackLoader::processNewCueData() and PNGImageReader::decode() we changed the patter to read data from a
SharedBuffer at a given offset. The new pattern is not correct, because it assumes the whole segment is always
read, and the new offset is not correct when that's not the case. This has broken the rendering of png images in
the GTK+ port, only the first bytes are correctly decoded and drawn, but not the rest of the image.

Fixes: editing/pasteboard/paste-image-using-image-data.html

  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::processNewCueData):

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

(WebCore::PNGImageReader::decode):

10:50 PM Changeset in webkit [216173] by sbarati@apple.com
  • 9 edits in trunk

How we build polymorphic cases is wrong when making a call from Wasm
https://bugs.webkit.org/show_bug.cgi?id=171527

Reviewed by JF Bastien.

Source/JavaScriptCore:

This patches fixes a bug when we emit a polymorphic call IC from
Wasm. We were incorrectly assuming that if we made a call *from wasm*,
then the thing we are *calling to* does not have a CodeBlock. This
is obviously wrong. This patch fixes the incorrect assumption.

This patch also does two more things:

  1. Add a new option that makes us make calls to JS using a

slow path instead of using a call IC.

  1. Fixes a potential GC bug where we didn't populate JSWebAssemblyCodeBlock's

JSWebAssemblyModule pointer.

  • jit/Repatch.cpp:

(JSC::linkPolymorphicCall):

  • runtime/Options.h:
  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):

  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::create):
(JSC::JSWebAssemblyCodeBlock::finishCreation):

  • wasm/js/JSWebAssemblyCodeBlock.h:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finalizeCreation):

Tools:

  • Scripts/run-jsc-stress-tests:
9:48 PM Changeset in webkit [216172] by eric.carlson@apple.com
  • 33 edits
    2 adds in trunk

[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>

Reviewed by Jer Noble.

Source/WebCore:

No new layout tests, added an API test instead.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::endStream): New, stop all tracks.

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStreamRegistry.cpp:

(WebCore::MediaStreamRegistry::unregisterStream): Minor cleanup.
(WebCore::MediaStreamRegistry::forEach): New, call the lambda with each stream.
(WebCore::MediaStreamRegistry::MediaStreamRegistry): Deleted, unused.

  • Modules/mediastream/MediaStreamRegistry.h:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::stopTrack): Add parameter so caller can specify if an 'ended'
event should be sent or not.
(WebCore::MediaStreamTrack::trackMutedChanged): Don't post an event if the track has ended.

  • Modules/mediastream/MediaStreamTrack.h:
  • dom/Document.cpp:

(WebCore::Document::stopMediaCapture): Stop all streams in the document.

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

(WebCore::Page::stopMediaCapture): Stop all streams.

  • page/Page.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Display a black frame
when the stream ends.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Signal a characteristics
change to HTMLMediaElement refresh state.

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

(WebCore::AVMediaCaptureSource::stopProducingData): Don't return early if the session isn't
running, we always need to clear m_session on iOS.

Source/WebKit2:

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMediaCaptureEnabled): New.
(WKPageGetMediaCaptureEnabled): New.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setMediaCaptureEnabled:]): New.
(-[WKWebView _mediaCaptureEnabled]): New.

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

(WebKit::UIDelegate::setDelegate): Initialize webViewRequestUserMediaAuthorizationForDevicesURLMainFrameURLDecisionHandler
and webViewCheckUserMediaPermissionForURLMainFrameURLFrameIdentifierDecisionHandler on macOS
and iOS.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
Initialize the rejection timer.
(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
Call invalidatePendingRequests.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests): Invalidate all
pending requests.
(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::rejectionTimerFired): Reject a promise and
schedule the timer if there are any others pending.
(WebKit::UserMediaPermissionRequestManagerProxy::scheduleNextRejection):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Don't
prompt the user if capture is disabled.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::clearCachedState): Deleted.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Stop capture in the current
page on iOS.
(WebKit::UserMediaProcessManager::setCaptureEnabled):

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

(WebKit::WebPageProxy::setMediaCaptureEnabled):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::mediaCaptureEnabled):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::cancelPendingRequests): New, cancel all pending
requests.
(WebKit::UserMediaPermissionRequestManager::cancelUserMediaRequest): Deny the request.
(WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopMediaCapture):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/UserMediaDisabled.mm: Added.

(-[UserMediaMessageHandler userContentController:didReceiveScriptMessage:]):
(-[UserMediaUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[UserMediaUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(MediaCaptureDisabledTest::SetUp):
(MediaCaptureDisabledTest::loadTestAndWaitForMessage):
(TEST_F):

  • TestWebKitAPI/Tests/WebKit2Cocoa/disableGetUserMedia.html: Added.
9:16 PM Changeset in webkit [216171] by wilander@apple.com
  • 15 edits
    2 adds in trunk

Resource Load Statistics: Remove all statistics for modifiedSince website data removals
https://bugs.webkit.org/show_bug.cgi?id=171584
<rdar://problem/24702576>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):

Now clears all regardless of the modifiedSince parameter's value.

Source/WebKit2:

These are all test infrastructure changes.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours):

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStoreModifiedSinceHours):

  • UIProcess/WebResourceLoadStatisticsManager.h:

Tools:

New function to call the clear function that takes a modifiedSince parameter.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

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

(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html: Added.
8:08 PM Changeset in webkit [216170] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the macOS Public SDK build
https://bugs.webkit.org/show_bug.cgi?id=171635
<rdar://problem/31812751>

Unreviewed because the commit queue told me to say this.

  • platform/spi/cocoa/AVKitSPI.h:
7:16 PM Changeset in webkit [216169] by keith_miller@apple.com
  • 5 edits
    1 add in trunk

Array.prototype.sort should also allow a null comparator
https://bugs.webkit.org/show_bug.cgi?id=171621
JSTests:

Reviewed by Michael Saboff.

Add test to make it less likely we revert to the incompatable behavior.
Also, fix now incorrect tests.

  • ChakraCore/test/Array/array_sort.baseline-jsc:
  • stress/array-sort-bad-comparator.js:

(test):

  • stress/sort-null-comparator.js: Added.

(assertEq):

Source/JavaScriptCore:

<rdar://problem/30757933>

Reviewed by Michael Saboff.

It looks like sort not accepting a null comparator
causes some pages to stop working. Those pages work in
Chrome/Firefox so we should try to match them.

  • builtins/ArrayPrototype.js:

(sort):

7:02 PM Changeset in webkit [216168] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit2

Maintain interaction information imageURL as a URL, not a string
https://bugs.webkit.org/show_bug.cgi?id=171639

Reviewed by Sam Weinig.

  • Shared/ios/InteractionInformationAtPosition.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _previewItemController:commitPreview:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

6:40 PM Changeset in webkit [216167] by jdiggs@igalia.com
  • 4 edits
    2 adds in trunk

AX: aria-rowspan value should be ignored if td/th rowspan value is provided
https://bugs.webkit.org/show_bug.cgi?id=171214

Reviewed by Chris Fleizach.

Source/WebCore:

Return -1 in AccessibilityTableCell::ariaColumnSpan() and ariaRowSpan() if the
cell element has an explicit value for the native host language's span attribute.
Add checks to AccessibilityTableCell::columnIndexRange() and rowIndexRange() so
that we prefer an author-provided ARIA span value over an implicit host-language
span value. Similarly, add checks to AccessibilityARIAGridCell::columnIndexRange()
and rowIndexRange() so that we fall back on implicit host-language span values
when there is no author-provided ARIA span value and the ARIA cell is associated
with a cell element.

Test: accessibility/aria-cellspans-with-native-cellspans.html

  • accessibility/AccessibilityARIAGridCell.cpp:

(WebCore::AccessibilityARIAGridCell::ariaRowSpanWithRowIndex):
(WebCore::AccessibilityARIAGridCell::columnIndexRange):

  • accessibility/AccessibilityTableCell.cpp:

(WebCore::AccessibilityTableCell::rowIndexRange):
(WebCore::AccessibilityTableCell::columnIndexRange):
(WebCore::AccessibilityTableCell::ariaColumnSpan):
(WebCore::AccessibilityTableCell::ariaRowSpan):

LayoutTests:

  • accessibility/aria-cellspans-with-native-cellspans-expected.txt: Added.
  • accessibility/aria-cellspans-with-native-cellspans.html: Added.
6:39 PM Changeset in webkit [216166] by webkit@devinrousso.com
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r215630): Web Inspector: Option-Click on URL in Styles sidebar does not work
https://bugs.webkit.org/show_bug.cgi?id=171569

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
Add missing frame parameter to WebInspector.openURL.

6:37 PM Changeset in webkit [216165] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit/mac

[Cocoa] Stop exporting symbols for ivars that were made private
https://bugs.webkit.org/show_bug.cgi?id=171631

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-03
Reviewed by Dan Bernstein.

  • WebKit.exp:
6:20 PM Changeset in webkit [216164] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/xmlhttprequest/methods.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171638

Unreviewed test gardening.

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

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

Mark scrollingcoordinator/ios/nested-fixed-layer-positions.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171628

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
6:00 PM Changeset in webkit [216162] by Ryan Haddad
  • 33 edits
    2 deletes in trunk

Unreviewed, rolling out r216160 and r216161.
https://bugs.webkit.org/show_bug.cgi?id=171640

These changes broke the iOS build. (Requested by mlewis13 on
#webkit).

Reverted changesets:

"[MediaStream] Allow host application to enable/disable media
capture"
https://bugs.webkit.org/show_bug.cgi?id=171292
http://trac.webkit.org/changeset/216160

"[MediaStream] Allow host application to enable/disable media
capture"
https://bugs.webkit.org/show_bug.cgi?id=171292
http://trac.webkit.org/changeset/216161

Patch by Commit Queue <commit-queue@webkit.org> on 2017-05-03

5:27 PM Changeset in webkit [216161] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebKit2

[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>

Unreviewed build fix.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::clearUserMediaState):

  • UIProcess/WebPageProxy.h:
5:03 PM Changeset in webkit [216160] by eric.carlson@apple.com
  • 33 edits
    2 adds in trunk

[MediaStream] Allow host application to enable/disable media capture
https://bugs.webkit.org/show_bug.cgi?id=171292
<rdar://problem/31821492>

Reviewed by Jer Noble.

Source/WebCore:

No new layout tests, added an API test instead.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::endStream): New, stop all tracks.

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStreamRegistry.cpp:

(WebCore::MediaStreamRegistry::unregisterStream): Minor cleanup.
(WebCore::MediaStreamRegistry::forEach): New, call the lambda with each stream.
(WebCore::MediaStreamRegistry::MediaStreamRegistry): Deleted, unused.

  • Modules/mediastream/MediaStreamRegistry.h:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::stopTrack): Add parameter so caller can specify if an 'ended'
event should be sent or not.
(WebCore::MediaStreamTrack::trackMutedChanged): Don't post an event if the track has ended.

  • Modules/mediastream/MediaStreamTrack.h:
  • dom/Document.cpp:

(WebCore::Document::stopMediaCapture): Stop all streams in the document.

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

(WebCore::Page::stopMediaCapture): Stop all streams.

  • page/Page.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Display a black frame
when the stream ends.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Signal a characteristics
change to HTMLMediaElement refresh state.

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

(WebCore::AVMediaCaptureSource::stopProducingData): Don't return early if the session isn't
running, we always need to clear m_session on iOS.

Source/WebKit2:

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMediaCaptureEnabled): New.
(WKPageGetMediaCaptureEnabled): New.
(WKPageClearUserMediaState): Deleted, unused.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setMediaCaptureEnabled:]): New.
(-[WKWebView _mediaCaptureEnabled]): New.

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

(WebKit::UIDelegate::setDelegate): Initialize webViewRequestUserMediaAuthorizationForDevicesURLMainFrameURLDecisionHandler
and webViewCheckUserMediaPermissionForURLMainFrameURLFrameIdentifierDecisionHandler on macOS
and iOS.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
Initialize the rejection timer.
(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
Call invalidatePendingRequests.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests): Invalidate all
pending requests.
(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::rejectionTimerFired): Reject a promise and
schedule the timer if there are any others pending.
(WebKit::UserMediaPermissionRequestManagerProxy::scheduleNextRejection):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Don't
prompt the user if capture is disabled.
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::clearCachedState): Deleted.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Stop capture in the current
page on iOS.
(WebKit::UserMediaProcessManager::setCaptureEnabled):

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

(WebKit::WebPageProxy::setMediaCaptureEnabled):
(WebKit::WebPageProxy::clearUserMediaState): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::mediaCaptureEnabled):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::cancelPendingRequests): New, cancel all pending
requests.
(WebKit::UserMediaPermissionRequestManager::cancelUserMediaRequest): Deny the request.
(WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopMediaCapture):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/UserMediaDisabled.mm: Added.

(-[UserMediaMessageHandler userContentController:didReceiveScriptMessage:]):
(-[UserMediaUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[UserMediaUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(MediaCaptureDisabledTest::SetUp):
(MediaCaptureDisabledTest::loadTestAndWaitForMessage):
(TEST_F):

  • TestWebKitAPI/Tests/WebKit2Cocoa/disableGetUserMedia.html: Added.
4:57 PM Changeset in webkit [216159] by Alan Bujtas
  • 3 edits
    2 adds in trunk

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

Reviewed by Antti Koivisto.

Source/WebCore:

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

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

  • html/SearchInputType.cpp:

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

LayoutTests:

  • fast/forms/change-input-type-and-submit-form-crash-expected.txt: Added.
  • fast/forms/change-input-type-and-submit-form-crash.html: Added.
4:52 PM Changeset in webkit [216158] by Ryan Haddad
  • 8 edits in branches/safari-603-branch/LayoutTests

Unreviewed test gardening.

  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/dom/reflection-text-expected.txt:
  • platform/ios-simulator/TestExpectations:
  • platform/ios-simulator/compositing/geometry/fixed-in-composited-expected.txt:
  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
  • scrollingcoordinator/ios/sync-layer-positions-after-scroll-expected.txt:
4:50 PM Changeset in webkit [216157] by jiewen_tan@apple.com
  • 2 edits
    2 adds in trunk/Tools

[WebCrypto] Add an api test for testing wrapping/unwrapping serialized crypto keys
https://bugs.webkit.org/show_bug.cgi?id=171350
<rdar://problem/28600836>

Patched by Brady Eidson.

Reviewed by Brent Fulgham.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/NavigationClientDefaultCrypto.cpp: Added.

(TestWebKitAPI::runJavaScriptAlert):
(TestWebKitAPI::decidePolicyForNavigationAction):
(TestWebKitAPI::decidePolicyForNavigationResponse):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2/navigation-client-default-crypto.html: Added.
4:50 PM Changeset in webkit [216156] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

Make the VPIO audio unit a singleton, shared between multiple CaptureSources
https://bugs.webkit.org/show_bug.cgi?id=171622

Reviewed by Eric Carlson.

Move the implemnetation of CoreAudioCaptureSource into a shared singleton class, CoreAudioSharedUnit,
which will send audio to each of it's client CoreAudioCaptureSources. The first registered client will
define the settings used by the shared unit.

Drive-by fixes: Fix up setUseAVFoundationAudioCapture() to always accept the first value set.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::isProducingData):
(WebCore::CoreAudioSharedUnit::microphoneFormat):
(WebCore::CoreAudioSharedUnit::singleton):
(WebCore::CoreAudioSharedUnit::addClient):
(WebCore::CoreAudioSharedUnit::removeClient):
(WebCore::CoreAudioSharedUnit::addEchoCancellationSource):
(WebCore::CoreAudioSharedUnit::removeEchoCancellationSource):
(WebCore::CoreAudioSharedUnit::preferredIOBufferSize):
(WebCore::CoreAudioSharedUnit::setupAudioUnits):
(WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
(WebCore::CoreAudioSharedUnit::configureSpeakerProc):
(WebCore::CoreAudioSharedUnit::checkTimestamps):
(WebCore::CoreAudioSharedUnit::provideSpeakerData):
(WebCore::CoreAudioSharedUnit::speakerCallback):
(WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
(WebCore::CoreAudioSharedUnit::microphoneCallback):
(WebCore::CoreAudioSharedUnit::cleanupAudioUnits):
(WebCore::CoreAudioSharedUnit::startProducingData):
(WebCore::CoreAudioSharedUnit::stopProducingData):
(WebCore::CoreAudioSharedUnit::suspend):
(WebCore::CoreAudioSharedUnit::defaultInputDevice):
(WebCore::CoreAudioCaptureSource::create):
(WebCore::CoreAudioCaptureSource::factory):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::addEchoCancellationSource):
(WebCore::CoreAudioCaptureSource::removeEchoCancellationSource):
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):
(WebCore::CoreAudioCaptureSource::audioSourceProvider):
(WebCore::CoreAudioCaptureSource::preferredSampleRate): Deleted.
(WebCore::CoreAudioCaptureSource::preferredIOBufferSize): Deleted.
(WebCore::CoreAudioCaptureSource::configureMicrophoneProc): Deleted.
(WebCore::CoreAudioCaptureSource::configureSpeakerProc): Deleted.
(WebCore::CoreAudioCaptureSource::checkTimestamps): Deleted.
(WebCore::CoreAudioCaptureSource::provideSpeakerData): Deleted.
(WebCore::CoreAudioCaptureSource::speakerCallback): Deleted.
(WebCore::CoreAudioCaptureSource::processMicrophoneSamples): Deleted.
(WebCore::CoreAudioCaptureSource::microphoneCallback): Deleted.
(WebCore::CoreAudioCaptureSource::cleanupAudioUnits): Deleted.
(WebCore::CoreAudioCaptureSource::defaultInputDevice): Deleted.
(WebCore::CoreAudioCaptureSource::setupAudioUnits): Deleted.
(WebCore::CoreAudioCaptureSource::suspend): Deleted.
(WebCore::CoreAudioCaptureSource::resume): Deleted.

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

(WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture):

4:48 PM Changeset in webkit [216155] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

getUserMedia() fails because devices list is empty / inactive
https://bugs.webkit.org/show_bug.cgi?id=171626

Reviewed by Eric Carlson.

When creating a AVAudioSessionCaptureDevice, set the device's enabled state to true if the port description
has any items in its dataSources property (which is the best analogue to "isActive" we have in AVAudioSession).

Also, when creating the generic list of CaptureDevices, use the copy constructor to ensure the enabled state
gets copied to the new generic device.

  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:

(WebCore::AVAudioSessionCaptureDevice::create):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):

4:21 PM Changeset in webkit [216154] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Implement the imageready event to reliably test the async image decoding
https://bugs.webkit.org/show_bug.cgi?id=171016

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

The event will be fired for each client of the image. Firing the event
will happen after finishing the decoding and repainting the client.

Existing tests will be modified in a separate patch to use this event.

  • dom/Element.cpp:

(WebCore::Element::dispatchWebKitImageReadyEventForTesting):

  • dom/Element.h:
  • page/Settings.in:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::imageFrameAvailable):

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

Mark media/modern-media-controls/slider/slider-styles.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171629

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:00 PM Changeset in webkit [216152] by timothy_horton@apple.com
  • 7 edits in trunk/Source

Maintain interaction information URL as a URL, not a string
https://bugs.webkit.org/show_bug.cgi?id=171623

Reviewed by Simon Fraser.

No new tests, not a behavior change.

  • platform/URL.h:
  • Shared/ios/InteractionInformationAtPosition.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showAttachmentSheet]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView annotation:isBeingPressedAtPoint:controller:]):
(-[WKPDFView actionSheetAssistant:performAction:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

3:36 PM Changeset in webkit [216151] by mark.lam@apple.com
  • 5 edits in trunk/Source

Use the CLoop for CPU(ARM64E).
https://bugs.webkit.org/show_bug.cgi?id=171620
<rdar://problem/31973027>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • llint/LLIntOfflineAsmConfig.h:
  • tools/SigillCrashAnalyzer.cpp:

(JSC::SigillCrashAnalyzer::dumpCodeBlock):

Source/WTF:

  • wtf/Platform.h:
3:30 PM Changeset in webkit [216150] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

LayoutTest http/tests/inspector/network/fetch-network-data.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=166038
<rdar://problem/29488489>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-03
Reviewed by Matt Baker.

  • platform/mac/TestExpectations:
  • http/tests/inspector/network/fetch-network-data.html:
  • http/tests/inspector/network/xhr-request-data-encoded-correctly.html:

Use singleFireEventListener instead of awaitEvent so that the follow-up event handlers
can be added synchronously instead of in a microtask. When the microtask happened later
than other incoming events then the follow-up handlers would have been added too late.

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

Mark imported/w3c/web-platform-tests/html/webappapis/timers/negative-settimeout.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170699.

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
3:15 PM Changeset in webkit [216148] by caitp@igalia.com
  • 3 edits
    1 delete in trunk/JSTests

[JSC] remove unneeded asyncFunctionTests.yaml
https://bugs.webkit.org/show_bug.cgi?id=171611

Reviewed by Yusuke Suzuki.

Async functions have shipped, and those tests are run as part of
JSTests/stress and JSTests/test262.yaml. The file is no longer needed.

  • asyncFunctionTests.yaml: Removed.
  • stress/async-await-long-loop.js:
  • stress/async-await-throw-loop.js:
3:13 PM Changeset in webkit [216147] by Nikita Vasilyev
  • 7 edits
    2 copies in trunk/Source/WebInspectorUI

Uncaught Exception: Can't make a ContentView for an unknown representedObject of type: IndexedDatabase
https://bugs.webkit.org/show_bug.cgi?id=167473
<rdar://problem/30249715>

Reviewed by Matt Baker.

When an indexed database is selected in the Storage navigation sidebar, show its host, security origin, and version.

Previously, selecting an indexed database didn't change the content view. It could lead to a misleading state
when an indexed database is selected in the sidebar, but the content view showed previously selected item such as
Cookies or Local Storage.

  • UserInterface/Main.html:
  • UserInterface/Views/ContentView.css:

(.content-view .details-section):
(.content-view .details-section > .content):
(.content-view .details-section > .content > .group > .row.simple > .label):
(.content-view .details-section:last-child):

  • UserInterface/Views/ContentView.js:

(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):

  • UserInterface/Views/IndexedDatabaseContentView.css: Added.

(.indexed-database.content-view):
(.indexed-database.content-view .indexed-database-details):
(.indexed-database.content-view .details-section > .header):

  • UserInterface/Views/IndexedDatabaseContentView.js: Added.

(WebInspector.IndexedDatabaseContentView):

  • UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js:

(WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.inspect):
Don't show the details sidebar for IndexedDB top level item since it has the same content as the content view.

  • UserInterface/Views/StorageSidebarPanel.js:

(WebInspector.StorageSidebarPanel._treeSelectionDidChange):

  • UserInterface/Views/StorageTabContentView.js:

(WebInspector.StorageTabContentView.prototype.canShowRepresentedObject):
(WebInspector.StorageTabContentView):

3:06 PM Changeset in webkit [216146] by jmarcell@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

3:04 PM Changeset in webkit [216145] by Simon Fraser
  • 8 edits in trunk

Have WKWebView call _updateVisibleContentRects for the current transaction if possible, rather than always delaying
https://bugs.webkit.org/show_bug.cgi?id=171619
Source/WebKit2:

Also fixes webkit.org/b/170153 and webkit.org/b/170195

Reviewed by Tim Horton.

In r214391 we started adding the pre-commit handler in a dispatch_async() to ensure that
the handler would always run, since we couldn't reliably test the phase of the current
transaction. Now that problem has been solved (rdar://problem/31253952) we can go back to
checking the transaction phase on newer iOS versions. If we're too late for the current transaction
we still need to dispatch_async() to get into the next one.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _addUpdateVisibleContentRectPreCommitHandler]):
(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):

Tools:

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

Reviewed by Tim Horton.

Re-enable WebKit2.ResizeWithHiddenContentDoesNotHang.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AnimatedResize.mm:

(TEST):

LayoutTests:

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

Reviewed by Tim Horton.

These tests need to wait a bit for the scrolling state of the document to be updated.

  • fast/scrolling/ios/touch-scroll-pointer-events-none.html:
  • fast/scrolling/ios/touch-scroll-visibility-hidden.html:
  • platform/ios-wk2/TestExpectations:
2:56 PM Changeset in webkit [216144] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r216129): ASSERTION FAILED: m_process->state() == WebProcessProxy::State::Terminated
https://bugs.webkit.org/show_bug.cgi?id=171616

Reviewed by Brady Eidson.

Stop calling resetStateAfterProcessExited() in WebPageProxy::terminateProcess() as the call to
WebProcessProxy::requestTermination() already causes WebPageProxy::processDidCrash() to be called
after r216129. WebPageProxy::processDidCrash() already takes care of calling
resetStateAfterProcessExited().

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::terminateProcess):

2:55 PM Changeset in webkit [216143] by yoav@yoav.ws
  • 4 edits
    2 adds in trunk

Link preload HTMLPreloadScanner support
https://bugs.webkit.org/show_bug.cgi?id=170747

Reviewed by Youenn Fablet.

Source/WebCore:

Test: http/tests/preload/preloadscanner_download_resources.html

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Initialize link preload flag.
(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): Create a request only if the type is known (so ignore
preloads with unknown type).
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Add handling for link preload and the as attribute.
(WebCore::TokenPreloadScanner::StartTagScanner::relAttributeIsStyleSheet): Get LinkRelAttribute as input.
(WebCore::TokenPreloadScanner::StartTagScanner::resourceType): Return an std::optional, in case the preload type is unknown.
(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload): Return true for the link preload case.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::preload): Return the resource rather than a nullptr if it's already in m_preloads.

LayoutTests:

  • http/tests/preload/preloadscanner_download_resources-expected.txt: Added.
  • http/tests/preload/preloadscanner_download_resources.html: Added.
2:36 PM Changeset in webkit [216142] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/preload/single_download_preload.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171331

Unreviewed test gardening.

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

Mark perf/object-keys.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=171617

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
2:01 PM Changeset in webkit [216140] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 29

Added a tag for Safari Technology Preview release 29.

1:51 PM Changeset in webkit [216139] by Michael Catanzaro
  • 4 edits in trunk

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

Reviewed by Carlos Garcia Campos.

Source/WebCore:

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

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

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):

Tools:

Remove the YouTube quirk test.

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

1:36 PM Changeset in webkit [216138] by commit-queue@webkit.org
  • 10 edits in trunk/Source

Web Inspector: 404 Image Load does not appear as a failure in Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=171587
<rdar://problem/13222846>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-03
Reviewed by Matt Baker.

Source/WebCore:

  • inspector/InspectorPageAgent.h:
  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResourceContent):
(WebCore::prepareCachedResourceBuffer): Deleted.
Inline the function to make this less confusing.

(WebCore::InspectorPageAgent::buildObjectForFrameTree):
Treat a DecodeError as a failure.

Source/WebInspectorUI:

  • UserInterface/Models/Resource.js:

(WebInspector.Resource.prototype.createObjectURL):
This may return null if the data is not a Blob. This can happen if we
loaded non-base64Encoded text content for an Image. Such as a 404 response.

(WebInspector.Resource.prototype.hadLoadingError):
Consistent way to check for any kind of loading error.

(WebInspector.Resource.prototype.getImageSize):
Handle failure to create an object URL.

  • UserInterface/Views/FontResourceContentView.js:

(WebInspector.FontResourceContentView.prototype.contentAvailable):

  • UserInterface/Views/ImageResourceContentView.js:

(WebInspector.ImageResourceContentView.prototype.contentAvailable):
Handle failure to create an object URL.

1:33 PM Changeset in webkit [216137] by keith_miller@apple.com
  • 5 edits
    1 add in trunk

Different behaviour with the .sort(callback) method (unlike Firefox & Chrome)
https://bugs.webkit.org/show_bug.cgi?id=47825

Reviewed by Saam Barati.

JSTests:

  • stress/sorting-boolean-result-comparator.js: Added.

(checkArray):

Source/JavaScriptCore:

This patch makes our sort function match the behavior of Firefox
and Chrome when the result of the comparison function is a
boolean. When we first switched to using merge sort, it regressed
JQuery sorting of DOM nodes by 30%. The regression was do to the
fact that JQuery was using compareDocumentPosition to compare the
locations of objects. Since one of the benchmarks would pass a
reverse sorted list to the sort function we would end up walking
the entire DOM to do comparisons. The solution to this was to
merge based on comparison(right, left) rather than
comparison(left, right). Although, in practice this does nothing
since sort could just as easily receive an already sorted list and
we're back in the same spot.

The downside of sorting with comparison(right, left) is that to
maintain stability when sorting, you only want to merge from right
when the comparison function returns a negative value. This is
where the problem with booleans comes in. Since booleans toNumber
false to 0 and true to 1 both values are "equal". This patch fixes
this by special casing boolean return values.

  • builtins/ArrayPrototype.js:

(sort.merge):

LayoutTests:

Fix broken test.

  • http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts-expected.txt:
1:28 PM Changeset in webkit [216136] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/xmlhttprequest/supported-xml-content-types.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171613

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
12:43 PM Changeset in webkit [216135] by commit-queue@webkit.org
  • 6 edits
    1 add in trunk

Async image decoding should be disabled for snapshots, printing and preview
https://bugs.webkit.org/show_bug.cgi?id=171467
Source/WebCore:

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

Asynchronous image decoding should only be used for window display where
RenderElements can be repainted and painted. For cases where there is only
one chance to draw the image, synchronous decoding should be used.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintIntoRect):

Tools:

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

Add a API test for snapshotting with large images. Ensure the images are
drawn correctly which implies they should have been synchronously decoded.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/large-red-square-image.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm:

(TEST):

12:33 PM Changeset in webkit [216134] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: VO skips cells after cell with aria-colspan
https://bugs.webkit.org/show_bug.cgi?id=171579

Reviewed by Chris Fleizach.

Source/WebCore:

We should consider the previous cells' column span value when
calculating the column index.

Test: accessibility/mac/aria-grid-column-span.html

  • accessibility/AccessibilityARIAGridCell.cpp:

(WebCore::AccessibilityARIAGridCell::columnIndexRange):

LayoutTests:

  • accessibility/mac/aria-grid-column-span-expected.txt: Added.
  • accessibility/mac/aria-grid-column-span.html: Added.
12:27 PM Changeset in webkit [216133] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

ASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest crypto/workers/crypto-random-values-limits-worker.html
https://bugs.webkit.org/show_bug.cgi?id=171462
<rdar://problem/31906859>

Reviewed by Brent Fulgham.

Covered by existing tests.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
Clear Crypto early in destruction since its ContextDestructionObserver
destruction makes checks about the WorkerThread.

12:27 PM Changeset in webkit [216132] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit2

Handle KVO updating of the "hasOnlySecureContent" before a page results in an HTTP auth challenge.
https://bugs.webkit.org/show_bug.cgi?id=171607

Reviewed by Andy Estes.

To test this fix we'd need the combination of an HTTPD inside API tests, so no test for now.

  • UIProcess/PageLoadState.cpp:

(WebKit::PageLoadState::hasOnlySecureContent): If the state is provisional, check the provisional URL instead.

12:17 PM Changeset in webkit [216131] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

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

Reviewed by Simon Fraser.

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

  • rendering/RenderObject.h:

(WebCore::RenderObject::isSearchField):

  • rendering/RenderSearchField.h:
12:02 PM Changeset in webkit [216130] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebCore

Remove ScrollingCoordinator::supportsFixedPositionLayers()
https://bugs.webkit.org/show_bug.cgi?id=171557

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

No new tests, behavior is not changed.

  • page/FrameView.cpp:

(WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::synchronousScrollingReasons):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::supportsFixedPositionLayers): Deleted.

  • page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:

(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):

  • page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:

(): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

11:54 AM Changeset in webkit [216129] by Chris Dumez
  • 14 edits
    3 adds in trunk

[WK2] Extend processDidCrash delegate to let the client know the reason for the crash
https://bugs.webkit.org/show_bug.cgi?id=171565
<rdar://problem/31204417>

Reviewed by Sam Weinig.

Source/WebKit2:

Extend processDidCrash delegate to let the client know the reason for the crash. This
is needed by some clients to distinguish actual crashes from terminations due to
resource limits.

  • Shared/ProcessCrashReason.h: Added.
  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::processDidCrash):

  • UIProcess/API/C/WKAPICast.h:

(WebKit::toAPI):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageNavigationClient):

  • UIProcess/API/C/WKPageNavigationClient.h:
  • UIProcess/API/C/WKProcessCrashReason.h: Added.
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::processDidCrash):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidCrash):

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

(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::requestTermination):
(WebKit::diagnosticLoggingKeyForTerminationReason):
(WebKit::toProcessCrashReason):
(WebKit::WebProcessProxy::terminateProcessDueToResourceLimits):
(WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

  • UIProcess/WebProcessProxy.h:
  • WebKit2.xcodeproj/project.pbxproj:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/ProcessDidCrashWithReason.cpp: Added.

(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::didCrashWithReason):
(TestWebKitAPI::TEST):

11:41 AM Changeset in webkit [216128] by Chris Dumez
  • 25 edits
    2 deletes in trunk/Source/WebCore

Use PassRefPtr less in CompositeEditCommand
https://bugs.webkit.org/show_bug.cgi?id=171590

Reviewed by Sam Weinig.

Use PassRefPtr less in CompositeEditCommand.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/ApplyStyleCommand.cpp:

(WebCore::hasNoAttributeOrOnlyStyleAttribute):
(WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
(WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
(WebCore::isEmptyFontTag):
(WebCore::ApplyStyleCommand::doApply):
(WebCore::ApplyStyleCommand::applyBlockStyle):
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::dummySpanAncestorForNode):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::ApplyStyleCommand::applyInlineStyle):
(WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
(WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun):
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
(WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes):
(WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
(WebCore::ApplyStyleCommand::removeCSSStyle):
(WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
(WebCore::ApplyStyleCommand::removeInlineStyle):
(WebCore::ApplyStyleCommand::shouldSplitTextElement):
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::addBlockStyle):
(WebCore::ApplyStyleCommand::joinChildTextNodes):

  • editing/ApplyStyleCommand.h:

(WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::removeChildrenInRange):
(WebCore::CompositeEditCommand::mergeIdenticalElements):
(WebCore::CompositeEditCommand::insertTextIntoNode):
(WebCore::CompositeEditCommand::deleteTextFromNode):
(WebCore::CompositeEditCommand::replaceTextInNode):
(WebCore::CompositeEditCommand::replaceSelectedTextInNode):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
(WebCore::CompositeEditCommand::removeNodeAttribute):
(WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
(WebCore::CompositeEditCommand::deleteInsignificantText):
(WebCore::CompositeEditCommand::removePlaceholderAt):
(WebCore::CompositeEditCommand::cleanupAfterDeletion):
(WebCore::CompositeEditCommand::moveParagraphs):

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

(WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
(WebCore::DeleteFromTextNodeCommand::doApply):
(WebCore::DeleteFromTextNodeCommand::doUnapply):
(WebCore::DeleteFromTextNodeCommand::getNodesInCommand):

  • editing/DeleteFromTextNodeCommand.h:

(WebCore::DeleteFromTextNodeCommand::create):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::deleteTextFromNode):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::fixupWhitespace):

  • editing/DeleteSelectionCommand.h:
  • editing/EditingAllInOne.cpp:
  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl):
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
(WebCore::EditingStyle::wrappingStyleForSerialization):
(WebCore::styleFromMatchedRulesForElement):
(WebCore::EditingStyle::mergeStyleFromRules):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
(WebCore::EditingStyle::removePropertiesInElementDefaultStyle):

  • editing/EditingStyle.h:
  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::tryIndentingAsListItem):

  • editing/InsertIntoTextNodeCommand.cpp:

(WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
(WebCore::InsertIntoTextNodeCommand::getNodesInCommand):

  • editing/InsertIntoTextNodeCommand.h:

(WebCore::InsertIntoTextNodeCommand::create):

  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::doApply):

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::mergeWithNeighboringLists):
(WebCore::InsertListCommand::listifyParagraph):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::performOverwrite):
(WebCore::InsertTextCommand::doApply):
(WebCore::InsertTextCommand::insertTab):

  • editing/MergeIdenticalElementsCommand.cpp:

(WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
(WebCore::MergeIdenticalElementsCommand::doApply):
(WebCore::MergeIdenticalElementsCommand::doUnapply):
(WebCore::MergeIdenticalElementsCommand::getNodesInCommand):

  • editing/MergeIdenticalElementsCommand.h:

(WebCore::MergeIdenticalElementsCommand::create):

  • editing/RemoveCSSPropertyCommand.cpp: Removed.
  • editing/RemoveCSSPropertyCommand.h: Removed.
  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::appendElement):
(WebCore::styleFromMatchedRulesAndInlineDecl):
(WebCore::createMarkupInternal):

10:54 AM Changeset in webkit [216127] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/websocket/tests/hybi/inspector/binary.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171553

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:52 AM Changeset in webkit [216126] by dbates@webkit.org
  • 7 edits
    8 adds in trunk/LayoutTests

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

Reviewed by Chris Dumez.

  • TestExpectations: Unskip tests.
  • fast/history/page-cache-after-window-open-expected.txt: Update expected result.
  • fast/history/page-cache-after-window-open.html: Ditto.
  • fast/history/page-cache-with-opener-expected.txt: Ditto.
  • fast/history/page-cache-with-opener.html: Update test given its new expected behavior.
  • fast/history/resources/page-cache-window-with-opener.html: Ditto.
  • http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow-expected.txt: Added.
  • http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window3-expected.txt: Added.
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html: Added.
10:51 AM Changeset in webkit [216125] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking three imported/w3c/web-platform-tests/webrtc test as flaky failures.
https://bugs.webkit.org/show_bug.cgi?id=171605

Unreviewed test gardening.

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

  • platform/mac-wk2/TestExpectations:
10:47 AM Changeset in webkit [216124] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked test http/tests/local/blob/send-sliced-data-blob.html as flaky failure and timeout.
https://bugs.webkit.org/show_bug.cgi?id=171564

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
10:18 AM Changeset in webkit [216123] by jdiggs@igalia.com
  • 3 edits
    3 adds in trunk

AX: Treat cells with ARIA table cell properties as cells
https://bugs.webkit.org/show_bug.cgi?id=171178

Reviewed by Chris Fleizach.

Source/WebCore:

Add the following checks to heuristics in AccessibilityTable::isDataTable():

  1. If the author has provided a valid aria-rowcount or aria-colcount value on the table element, expose it as a data table.
  2. If the author has provided a valid aria-colindex or aria-rowindex on the cell element, expose it as a data table.
  3. If the author has provided a valid aria-rowindex on the row element, expose it as a data table.
  4. If the author has provided a value for aria-colspan or aria-rowspan on a cell, expose it as a data table (even though we are supposed to ignore the value for the purpose of exposing the span via platform accessibility APIs)

Remove the heuristic that a table with only one cell is "not a good AXTable candidate."
It prevents us from ever doing the above checks.

Test: accessibility/minimal-table-with-aria-is-data-table.html

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::isDataTable):

LayoutTests:

  • accessibility/minimal-table-with-aria-is-data-table-expected.txt: Added.
  • accessibility/minimal-table-with-aria-is-data-table.html: Added.
  • platform/gtk/accessibility/minimal-table-with-aria-is-data-table-expected.txt: Added.
10:17 AM Changeset in webkit [216122] by commit-queue@webkit.org
  • 5 edits in trunk

[INTL] Support dashed values in unicode locale extensions
https://bugs.webkit.org/show_bug.cgi?id=171480

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-05-03
Reviewed by JF Bastien.

Source/JavaScriptCore:

Implements the UnicodeExtensionSubtags operation and updates the ResolveLocale operation to use it.
This fixes locale extensions with values that include '-'. The following calendars work now:
ethiopic-amete-alem
islamic-umalqura
islamic-tbla
islamic-civil
islamic-rgsa

While updating IntlObject, the comments containing spec text were replaced with a single url at the
top of each function pointing to the relevant part of ECMA-402.

  • runtime/IntlObject.cpp:

(JSC::unicodeExtensionSubTags): Added.
(JSC::resolveLocale): Updated to latest standard.

LayoutTests:

Added tests for calendar locale extensions that contain '-'.

  • js/intl-datetimeformat-expected.txt:
  • js/script-tests/intl-datetimeformat.js:
10:06 AM Changeset in webkit [216121] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[Cairo] Handle extended colors in gradients
https://bugs.webkit.org/show_bug.cgi?id=171596

Reviewed by Michael Catanzaro.

Check if every gradient color step is an extended color and use asExtended() instead of getRGBA() in such case.

Fixes: css3/color/gradients.html

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::platformGradient):

9:58 AM Changeset in webkit [216120] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

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

Source/WebCore:

Reviewed by Brent Fulgham and Brady Eidson.

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

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

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::transitionToCommitted):

LayoutTests:

Reviewed by Brent Fulgham.

  • fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash-expected.txt: Added.
  • fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash.html: Added.
9:52 AM Changeset in webkit [216119] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Cleanup: Remove out-of-date comment and null check from DocumentLoader::detachFromFrame()
https://bugs.webkit.org/show_bug.cgi?id=171604

Reviewed by Brady Eidson.

We no longer want to passively allow DocumentLoader::detachFromFrame() to be called twice.
It does not make sense to be called twice and should never be called twice. A release assert
in DocumentLoader::cancelPolicyCheckIfNeeded() (added in r187558) called by DocumentLoader::detachFromFrame()
enforces this invariant. Therefore we can remove the null check of DocumentLoader::m_frame
and the comment that explains the purpose of this null check from DocumentLoader::detachFromFrame().

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::detachFromFrame):

9:28 AM Changeset in webkit [216118] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the Windows build after r216117.
https://bugs.webkit.org/show_bug.cgi?id=171601

  • css/CSSAllInOne.cpp:
7:04 AM Changeset in webkit [216117] by Antti Koivisto
  • 7 edits
    2 moves in trunk/Source/WebCore

Rename StyleInvalidationAnalysis to Style::Invalidator
https://bugs.webkit.org/show_bug.cgi?id=171601

Reviewed by Žan Doberšek.

Also move it to the 'style' directory.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/StyleInvalidationAnalysis.cpp: Removed.
  • css/StyleInvalidationAnalysis.h: Removed.
  • dom/ExtensionStyleSheets.cpp:
  • style/AttributeChangeInvalidation.cpp:

(WebCore::Style::AttributeChangeInvalidation::invalidateDescendants):

  • style/ClassChangeInvalidation.cpp:

(WebCore::Style::ClassChangeInvalidation::invalidateDescendantStyle):

  • style/StyleInvalidator.cpp: Copied from Source/WebCore/css/StyleInvalidationAnalysis.cpp.

(WebCore::Style::Invalidator::Invalidator):
(WebCore::Style::Invalidator::invalidateIfNeeded):
(WebCore::Style::Invalidator::invalidateStyleForTree):
(WebCore::Style::Invalidator::invalidateStyle):
(WebCore::shouldDirtyAllStyle): Deleted.
(WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis): Deleted.
(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded): Deleted.
(WebCore::StyleInvalidationAnalysis::invalidateStyleForTree): Deleted.
(WebCore::StyleInvalidationAnalysis::invalidateStyle): Deleted.

  • style/StyleInvalidator.h: Copied from Source/WebCore/css/StyleInvalidationAnalysis.h.

(WebCore::StyleInvalidationAnalysis::dirtiesAllStyle): Deleted.
(WebCore::StyleInvalidationAnalysis::hasShadowPseudoElementRulesInAuthorSheet): Deleted.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):
(WebCore::Style::Scope::analyzeStyleSheetChange):

5:47 AM Changeset in webkit [216116] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of several tests.

  • platform/gtk/TestExpectations:
3:18 AM Changeset in webkit [216115] by Carlos Garcia Campos
  • 1 edit
    2 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline inspector resource size tests.

Libsoup doesn't provide the required information to fill all those size metrics.

  • platform/gtk/http/tests/inspector/network/resource-sizes-memory-cache-expected.txt: Added.
  • platform/gtk/http/tests/inspector/network/resource-sizes-network-expected.txt: Added.
1:55 AM Changeset in webkit [216114] by Carlos Garcia Campos
  • 5 edits
    2 adds in trunk/Source/WebKit2

[GTK] Add GTK+ implementation of WebAutomationSession
https://bugs.webkit.org/show_bug.cgi?id=171431

Reviewed by Michael Catanzaro.

Add platform dependent methods for GTK+ to synthesize events.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitUIClient.cpp: Always resize the window for web views controlled by automation.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: Added.

(WebKit::modifiersToEventState):
(WebKit::mouseButtonToGdkButton):
(WebKit::doMouseEvent):
(WebKit::doMotionEvent):
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
(WebKit::doKeyStrokeEvent):
(WebKit::keyCodeForVirtualKey):
(WebKit::WebAutomationSession::platformSimulateKeyStroke):
(WebKit::WebAutomationSession::platformSimulateKeySequence):
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):

1:32 AM Changeset in webkit [216113] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.17.1

WebKitGTK+ 2.17.1

1:30 AM Changeset in webkit [216112] by Carlos Garcia Campos
  • 4 edits in trunk

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

.:

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

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.17.1.
12:15 AM Changeset in webkit [216111] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[Soup] Add request headers to network load metrics
https://bugs.webkit.org/show_bug.cgi?id=171545

Reviewed by Sergio Villar Senin.

This will make the headers to appear in the web inspector.

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

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didGetHeaders):

May 2, 2017:

8:59 PM Changeset in webkit [216110] by ddkilzer@apple.com
  • 3 edits
    1 add in trunk/Tools

check-webkit-style should also keep js-test-post[-async].js in sync
<https://webkit.org/b/171568>

Reviewed by Joseph Pecoraro.

  • Scripts/webkitpy/style/checker.py:

(_NEVER_SKIPPED_JS_FILES): Add new list that just contains
JavaScript files not to be skipped.
(_NEVER_SKIPPED_FILES): Update to use _NEVER_SKIPPED_JS_FILES.
(CheckerDispatcher._create_checker): Update to use
_NEVER_SKIPPED_JS_FILES.

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

(ALL_JS_TEST_FUNCTION_FILES): Rename from ALL_JS_TEST_FILES.
This is the list of files containing functions that need to be
kept in sync.
(KEEP_JS_TEST_FILES_IN_SYNC): Change to list-of-lists format so
we can keep more sets of files in sync between
LayoutTests/resources and LayoutTests/http/tests/resources.
(JSTestChecker.check): Update to use KEEP_JS_TEST_FILES_IN_SYNC
as list of lists. Update for ALL_JS_TEST_FUNCTION_FILES rename.
(JSTestChecker.check_js_test_files): Add 'file_group' argument
for list of files to check instead of using
KEEP_JS_TEST_FILES_IN_SYNC.
(JSTestChecker.check_js_test_functions): Update for
ALL_JS_TEST_FUNCTION_FILES rename.

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

(JSTestCheckerTestCase):
(JSTestCheckerTestCase.test_map_functions_to_dict):

  • Add test case for map_functions_to_dict() in jstest.py.
7:48 PM Changeset in webkit [216109] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Build fix after r216078
https://bugs.webkit.org/show_bug.cgi?id=171554

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-02
Reviewed by Saam Barati.

  • API/tests/testapi.c:
7:48 PM Changeset in webkit [216108] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

ews should indicate in logs when it fails to fetch the attachment
https://bugs.webkit.org/show_bug.cgi?id=171583

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/net/bugzilla/bugzilla.py:

(Bugzilla.fetch_attachment): Added log statement.

5:11 PM Changeset in webkit [216107] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Typo in AVAudioSessionCaptureDeviceManager.mm
https://bugs.webkit.org/show_bug.cgi?id=171572

Patch by Andrew Gold <agold@apple.com> on 2017-05-02
Reviewed by Jer Noble.

We attempt to call +[AVAudioSession sharedSession], but the actual method is
called +[AVAudioSession sharedInstance].

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):

4:15 PM Changeset in webkit [216106] by dbates@webkit.org
  • 2 edits in trunk/Source

Source/WebCore:
Improve scrolling tree logging
https://bugs.webkit.org/show_bug.cgi?id=171574

Patch by Simon Fraser <Simon Fraser> on 2017-05-02
Reviewed by Tim Horton.

Make a call to showScrollingStateTree() print debugging-related information like node and layer IDs.
Required fixing scrolling state tree nodes to respect ScrollingStateTreeAsTextBehavior, and fixing
fixed and sticky nodes to call super.

Also enhance compositing logging to show layer IDs, and to log for layer scrolling tree registration.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::scrollingStateTreeAsText):

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

(WebCore::ScrollingStateFixedNode::dumpProperties):

  • page/scrolling/ScrollingStateNode.cpp:

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

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

(WebCore::ScrollingStateScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::dumpProperties):

  • page/scrolling/ScrollingStateTree.cpp:

(showScrollingStateTree):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeState):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

Source/WTF:
Fix the build after <https://trac.webkit.org/changeset/216102>
(https://bugs.webkit.org/show_bug.cgi?id=170925)

Export into global scope ASCIICaseInsensitiveStringViewHashTranslator.

Also fix indentation of member functions of ASCIICaseInsensitiveStringViewHashTranslator.

  • wtf/text/StringHash.h:
4:07 PM Changeset in webkit [216105] by dbates@webkit.org
  • 2 edits in trunk/Source/WTF

Fix the build after <https://trac.webkit.org/changeset/216102>
(https://bugs.webkit.org/show_bug.cgi?id=170925)

Export into global scope ASCIICaseInsensitiveStringViewHashTranslator.

Also fix indentation of member functions of ASCIICaseInsensitiveStringViewHashTranslator.

  • wtf/text/StringHash.h:
4:06 PM Changeset in webkit [216104] by Simon Fraser
  • 3 edits
    2 adds in trunk

Dynamically added position:fixed element is in the wrong place
https://bugs.webkit.org/show_bug.cgi?id=170280
rdar://problem/31374008

Reviewed by Tim Horton.

Source/WebKit2:

Layers for position:fixed elements have their positions reconciled after scrolls
via AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions() and GraphicsLayerCA::syncPosition(),
which updates the GraphicsLayer's position, but does not push it to the PlatformCALayer.

This bug was a case where a position:fixed element gained a fixed ancestor, so had a GraphicsLayerCA whose
position had been updated via syncPosition() in the past. A subsequent layout updated the GraphicsLayerCA position,
but to a value that was the same as its pre-sync position, so the PlatformCALayerRemote's position didn't change,
but there was no signal to the UI process to restore the layer's pre-scrolled position.

Fix by avoiding the early return in PlatformCALayerRemote::setPosition(), to ensure that GraphicsLayerCA
geometry updates in the web process always send new positions to the UI process.

  • WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::setPosition):

LayoutTests:

  • scrollingcoordinator/ios/nested-fixed-layer-positions-expected.html: Added.
  • scrollingcoordinator/ios/nested-fixed-layer-positions.html: Added.
4:06 PM Changeset in webkit [216103] by Simon Fraser
  • 14 edits in trunk/Source/WebCore

Improve scrolling tree logging
https://bugs.webkit.org/show_bug.cgi?id=171574

Reviewed by Tim Horton.

Make a call to showScrollingStateTree() print debugging-related information like node and layer IDs.
Required fixing scrolling state tree nodes to respect ScrollingStateTreeAsTextBehavior, and fixing
fixed and sticky nodes to call super.

Also enhance compositing logging to show layer IDs, and to log for layer scrolling tree registration.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::scrollingStateTreeAsText):

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

(WebCore::ScrollingStateFixedNode::dumpProperties):

  • page/scrolling/ScrollingStateNode.cpp:

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

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

(WebCore::ScrollingStateScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::dumpProperties):

  • page/scrolling/ScrollingStateTree.cpp:

(showScrollingStateTree):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeState):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

3:51 PM Changeset in webkit [216102] by dbates@webkit.org
  • 15 edits in trunk/Source

Using StringView.split() instead of String.split() in some places
https://bugs.webkit.org/show_bug.cgi?id=170925

Reviewed by Darin Adler.

Source/WebCore:

Replace some uses of String.split() with StringView.split() (added in r211087) as the latter
avoids the need to allocate an intermediary Vector of substrings. Instead StringView.split()
returns an iterator for traversing the substrings.

No functionality changed. So, no new tests.

  • accessibility/AccessibilityObject.cpp: Convert some typedefs to modern C++ using declarations.

(WebCore::ASCIICaseInsensitiveStringViewHashTranslator::hash): Added.
(WebCore::ASCIICaseInsensitiveStringViewHashTranslator::equal): Added.
(WebCore::AccessibilityObject::ariaRoleToWebCoreRole): Modified code to use StringView.split().
(WebCore::AccessibilityObject::elementsFromAttribute): Ditto.

  • dom/TreeScope.cpp:

(WebCore::TreeScope::getElementById): Added.

  • dom/TreeScope.h:
  • html/LinkRelAttribute.cpp:

(WebCore::LinkRelAttribute::LinkRelAttribute): Modified code to use StringView.split().

  • html/parser/XSSAuditor.cpp:

(WebCore::semicolonSeparatedValueContainsJavaScriptURL): Ditto.

  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:

(WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Ditto.

  • platform/network/CacheValidation.cpp:

(WebCore::collectVaryingRequestHeaders): Simplify code by using the String.split(UChar, Vector<String>&) overload.

  • svg/SVGAnimationElement.cpp:

(WebCore::parseKeyTimes): Modified code to use StringView.split().

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::setMediaSessionRestrictions): Ditto.
(WebCore::Internals::setMediaElementRestrictions): Ditto.
(WebCore::Internals::setAudioContextRestrictions): Ditto.
(WebCore::Internals::setPageMuted): Ditto.

  • testing/Internals.h:

Source/WTF:

Add HashMap::get() overload that takes a HashTranslator.

  • wtf/HashMap.h:
3:50 PM Changeset in webkit [216101] by yoon@igalia.com
  • 13 edits in trunk/Source

[GTK] Drop coordinated surfaces from the compositing thread as soon as possible
https://bugs.webkit.org/show_bug.cgi?id=171544

Reviewed by Žan Doberšek.

Source/WebCore:

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:

Remove atlasesToRemove from the GraphicsState. It is not a commit
state anymore.

Source/WebKit2:

Released coordinated surface from the main thread didn't be freed until
next commit message because the deletion of coordinated surfaces is
considered as a part of scene state. We need to release corresponding
surfaces whenever the compositing coordinator drops update atlases to
reduce memory usages.

No new tests, only an optimization.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:

Remove atlasesToRemove from the GraphicsState. it is not a commit
state anymore.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::syncUpdateAtlases):
(WebKit::CoordinatedGraphicsScene::releaseUpdateAtlases):

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::CompositingCoordinator::releaseAtlases): Pass the list of
released update atlases to the compositing thread right after cleaning
up deactivated update atlases.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::clearPendingStateChanges):
(WebKit::CompositingCoordinator::removeUpdateAtlas):
(WebKit::CompositingCoordinator::releaseAtlases):

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

(WebKit::ThreadedCoordinatedLayerTreeHost::releaseUpdateAtlases):

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
3:24 PM Changeset in webkit [216100] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Move flaky expectation for svg/animations/getCurrentTime-pause-unpause.html ios-wk1 to ios TestExpectations file.

Unreviewed test gardening.

  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
3:24 PM Changeset in webkit [216099] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=170907

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:17 PM Changeset in webkit [216098] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit2

Inform clients when viewport-fit state changes, so they can recompute insets
https://bugs.webkit.org/show_bug.cgi?id=171573
<rdar://problem/31947614>

Reviewed by Simon Fraser.

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

(-[WKWebView _didChangeAvoidsUnsafeArea]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didChangeAvoidsUnsafeArea):
For clients who use setObscuredInsets/setUnobscuredSafeAreaInsets
themselves, we need to let them know when the current state of
viewport-fit changes so that they can recompute the insets.

3:15 PM Changeset in webkit [216097] by yoon@igalia.com
  • 9 edits in trunk/Source

[GTK] Recycle textures while handling tiles
https://bugs.webkit.org/show_bug.cgi?id=171541

Reviewed by Žan Doberšek.

Source/WebCore:

  • platform/graphics/texmap/TextureMapperTile.h:

Modified m_texture as a protected member to avoid unnessary
refcountings from the CoordinatedBackingStore.

  • platform/graphics/texmap/coordinated/CoordinatedSurface.h:

Use reference instead of RefPtr to pass BitmapTexture

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

Source/WebKit2:

  • Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:

(WebKit::CoordinatedBackingStoreTile::swapBuffers):
Whenever we create new tiles or delete tiles, CoordGfx creates and
deletes textures accordingly. We should avoid this kind of heavy
operations whenever possible. This patch modifies to use the texture
pool to reduce texture allocations. Also this patch reduces number of
resetting textures, which is also expensive operation.

  • Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:

(WebKit::WebCoordinatedSurface::copyToTexture):
Modified to pass BitmapTexture as a reference.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:

(WebKit::ThreadSafeCoordinatedSurface::copyToTexture): Ditto.

2:29 PM Changeset in webkit [216096] by Alan Bujtas
  • 6 edits
    2 adds in trunk

Defer AX cache update when text content changes until after layout is finished.
https://bugs.webkit.org/show_bug.cgi?id=171429
<rdar://problem/31885984>

Reviewed by Simon Fraser.

Source/WebCore:

When the content of the RenderText changes (even as the result of a text-transform change)
instead of updating the AX cache eagerly (and trigger layout on a half-backed render tree)
we should just defer it until after the subsequent layout is done.

Test: accessibility/crash-while-adding-text-child-with-transform.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::recomputeDeferredIsIgnored):
(WebCore::AXObjectCache::deferTextChanged):
(WebCore::AXObjectCache::performDeferredIsIgnoredChange): Deleted.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::deferTextChanged):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::performDeferredIsIgnoredChange): Deleted.

  • page/FrameView.cpp:

(WebCore::FrameView::performPostLayoutTasks):

  • rendering/RenderText.cpp:

(WebCore::RenderText::setText):

LayoutTests:

  • accessibility/crash-while-adding-text-child-with-transform-expected.txt: Added.
  • accessibility/crash-while-adding-text-child-with-transform.html: Added.
2:24 PM Changeset in webkit [216095] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit2

Stop using strcpy() in WebProcess::registerWithStateDumper() in WebProcessCocoa.mm
<https://webkit.org/b/171520>

Reviewed by Chris Dumez.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::registerWithStateDumper): Switch from
strcpy() to strlcpy(), removing comment in the process.

2:13 PM Changeset in webkit [216094] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Remove an extraneous call to dispatch_group_async in WebItemProviderPasteboard.mm
https://bugs.webkit.org/show_bug.cgi?id=171561

Reviewed by Tim Horton.

In -[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:], the lifetime of the dispatch group
fileLoadingGroup is already guarded by dispatch_group_enter/leave calls when beginning and concluding an
item provider load, respectively. As such, the call to dispatch_group_async serves no purpose and should be removed.

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

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]):

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

MediaDevices is not enabled for MobileSafari
https://bugs.webkit.org/show_bug.cgi?id=171433
<rdar://problem/31923178>

Patch by Andrew Gold <agold@apple.com> on 2017-05-02
Reviewed by Youenn Fablet.

Added the Cocoa API for toggling this feature and removed API for toggling
MediaStreamEnabled since it will always be on.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _mediaDevicesEnabled]):
(-[WKPreferences _setMediaDevicesEnabled:]):
(-[WKPreferences _mediaStreamEnabled]): Deleted.
(-[WKPreferences _setMediaStreamEnabled:]): Deleted.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1:30 PM Changeset in webkit [216092] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[LibWebRTC] Set explicitly logging level in debug mode
https://bugs.webkit.org/show_bug.cgi?id=171562

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

No change of behavior.

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::initializePeerConnectionFactoryAndThreads): Setting explictly LibWebRTC logging to Info level for
debug builds if WebRTC channel is on.

1:28 PM Changeset in webkit [216091] by ddkilzer@apple.com
  • 1 edit
    1 delete in trunk/Tools

Rolling out jstest_unittest.py so it can be reviewed

Follow-up fix for:
check-webkit-style should keep JavaScript test functions in sync
<https://webkit.org/b/171424>

  • Scripts/webkitpy/style/checkers/jstest_unittest.py: Remove.
1:10 PM Changeset in webkit [216090] by ddkilzer@apple.com
  • 9 edits
    2 adds in trunk

check-webkit-style should keep JavaScript test functions in sync
<https://webkit.org/b/171424>

Reviewed by Joseph Pecoraro.

JSTests:

This change makes shouldBe(), shouldNotBe(), shouldNotThrow()
and shouldThrow() in sync with other copies of these methods.

  • stress/resources/standalone-pre.js:

(shouldBe): Fix whitespace. Prefix 'exception' and 'quiet'
variables with underscore.
(shouldThrow): Fix whitespace.

Tools:

Add a new JSTestChecker for check-webkit-style that keeps these
two files in sync:

LayoutTests/http/tests/resources/js-test-pre.js
LayoutTests/resources/js-test-pre.js

And keeps implementations of shouldBe(), shouldNotBe(),
shouldNotThrow(), and shouldThrow() in sync across multiple
files (with the ability to add more functions later):

JSTests/stress/resources/standalone-pre.js
LayoutTests/http/tests/resources/js-test-pre.js
LayoutTests/resources/js-test-pre.js
LayoutTests/resources/js-test.js
LayoutTests/resources/standalone-pre.js

  • Scripts/webkitpy/style/checker.py: Remove unused import. Add

import for JSTestChecker.
(_NEVER_SKIPPED_FILES): Add array of file names that are never
skipped regardless of other rules.
(_all_categories): Add JSTestChecker categories.
(CheckerDispatcher.should_skip_without_warning): Use
_NEVER_SKIPPED_FILES.
(CheckerDispatcher._create_checker): Return JSTestChecker for
the files to check.

  • Scripts/webkitpy/style/checkers/jstest.py: Add.

(map_functions_to_dict): Parse JavaScript source by splitting on
/function\s+/ regex. This is good enough for the sanity checks
to keep function implementations in sync.
(strip_blank_lines_and_comments): Strips blank lines and lines
with comments from the end of a chunk of text representing a
function.
(JSTestChecker): New checker.
(JSTestChecker.init):
(JSTestChecker.check):
(JSTestChecker.check_js_test_files): Keeps whole files in sync.
(JSTestChecker.check_js_test_functions): Keeps individual
functions in sync.

  • Scripts/webkitpy/style/checkers/jstest_unittest.py: Add test

case.
(JSTestTestCase):
(JSTestTestCase.test_map_functions_to_dict):

LayoutTests:

This change attempts to fix all whitespace issues in these two
files (which are now identical and will be kept in sync by
check-webkit-style):

LayoutTests/http/tests/resources/js-test-pre.js
LayoutTests/resources/js-test-pre.js

It also syncs the implementation of shouldBe(), shouldNotBe(),
shouldNotThrow() and shouldThrow() across the following files:

JSTests/stress/resources/standalone-pre.js
LayoutTests/http/tests/resources/js-test-pre.js
LayoutTests/resources/js-test-pre.js
LayoutTests/resources/js-test.js
LayoutTests/resources/standalone-pre.js

Only interesting (non-whitespace) changes are listed below.

  • http/tests/resources/js-test-pre.js: Copy from resources/js-test-pre.js.

(shouldBe): Prefix 'exception' and 'quiet' variables with
underscore.
(shouldNotBe): Ditto.

  • resources/js-test-pre.js:

(shouldBe): Prefix 'exception' and 'quiet' variables with
underscore.
(shouldNotBe): Ditto.

  • resources/js-test.js:

(shouldBe): Prefix 'quiet' variable with underscore. Use
stringify() when printing '_bv' value.

  • resources/standalone-pre.js:

(shouldBe): Prefix 'exception' and 'quiet' variables with
underscore.
(shouldNotBe): Ditto.

1:07 PM Changeset in webkit [216089] by jdiggs@igalia.com
  • 9 edits
    2 moves in trunk

AX: Update implementation of aria-orientation
https://bugs.webkit.org/show_bug.cgi?id=171166

Reviewed by Chris Fleizach.

Source/WebCore:

Update AccessibilityRenderObject::orientation() to be consistent with what is
in the ARIA 1.1 spec. Also add an isTreeGrid() convenience method to be consistent
with what we do for other roles.

Test: accessibility/aria-orientation.html

  • accessibility/AccessibilityARIAGridRow.cpp:

(WebCore::AccessibilityARIAGridRow::isARIATreeGridRow):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::isTreeGrid):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::orientation):

Tools:

Return "AXUnknownOrientation" when ATK_STATE_VERTICAL and ATK_STATE_HORIZONTAL
are both absent from the state set. Before we were returning an empty string
which was not consistent with what the Mac port does, thus making shared tests
harder.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::orientation):

LayoutTests:

Moved the mac aria-orientation.html test to the shared tests and add several
new test cases to it. Update the orientation-related assertion in two tests
to reflect the ARIA 1.1 behavior.

  • accessibility/aria-orientation-expected.txt: Renamed from LayoutTests/accessibility/mac/aria-orientation-expected.txt.
  • accessibility/aria-orientation.html: Renamed from LayoutTests/accessibility/mac/aria-orientation.html.
  • accessibility/mac/slider-supports-actions.html: Updated.
  • accessibility/gtk/combobox-descendants-orientation-crash-expected.txt: Updated.
12:35 PM Changeset in webkit [216088] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

REGRESSION (r211382): Partial right-to-left text runs are painted at an offset (breaks Find indicators, Look Up, and custom ::selection style)
https://bugs.webkit.org/show_bug.cgi?id=169517
<rdar://problem/30652443>

Reviewed by Dean Jackson.

Source/WebCore:

FontCascade::getGlyphsAndAdvancesForComplexText() is tasked with calculating paint advances for a
subrange of RTL text. It does this by creating a ComplexTextController, telling it to iterate to
the beginning of the subrange (outputting to a GlyphBuffer), then telling it to iterate to the end
of the subrange (outputting to another GlyphBuffer). Because the text is RTL, the sum of the
advances gathered so far is the distance from the right edge of the text to the left edge of the
subrange (because we advance in logical order). Therefore, the x-coordinate we are at now is the
total width minus the sum of both of the GlyphBuffers. For some reason, when I wrote this code I
forgot to add in the contribution from the first GlyphBuffer. Unfortunately, this particular
codepath is rarely hit in practice and completely untested, which made me miss it when I wrote it.

Test: fast/text/complex-text-selection.html

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):

LayoutTests:

  • fast/text/complex-text-selection-expected.html: Added.
  • fast/text/complex-text-selection.html: Added.
  • platform/ios/TestExpectations:
12:22 PM Changeset in webkit [216087] by Joseph Pecoraro
  • 2 edits in trunk/LayoutTests

[Mac] WK1: http/tests/inspector/network/resource-sizes tests are failing

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:

Skip these tests on WebKit1. They depend on the NSURLSession
loading path which is not used in WebKit1.

12:14 PM Changeset in webkit [216086] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix pedantic C compilers.

  • API/tests/testapi.c:

(markingConstraint):
(testMarkingConstraints):

12:13 PM Changeset in webkit [216085] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cmake build.

  • CMakeLists.txt:
12:03 PM Changeset in webkit [216084] by Chris Dumez
  • 9 edits in trunk

[macOS] Flaky Crash under EventTarget::fireEventListeners on imported/blink/paint/deprecatedpaintlayer/non-self-painting-layer-overrides-visibility.html
https://bugs.webkit.org/show_bug.cgi?id=171406
<rdar://problem/30945281>

Reviewed by Eric Carlson.

Source/WebCore:

I was unfortunately unable to reproduce the flaky crash locally. However, the crash trace
indicates that one of the EventTarget::scriptExecutionContext() overrides is returning a
stale ScriptExecutionContext pointer. Since a GenericEventQueue is involved, the EventTarget
is likely a media-related object. I therefore audited media classes that override
EventTarget::scriptExecutionContext() and found several that look unsafe. I am fixing those
by having them override ContextDestructionObserver, instead of having a raw
ScriptExecutionContext pointer member. This makes sure the pointer gets nulled out whenever
the scriptexecutioncontext gets destroyed, ensuring that those classes's
EventTarget::scriptExecutionContext() overrides can never return a stale pointer.

  • Modules/mediasource/SourceBufferList.cpp:

(WebCore::SourceBufferList::SourceBufferList):

  • Modules/mediasource/SourceBufferList.h:
  • html/track/TextTrack.cpp:

(WebCore::TextTrack::TextTrack):

  • html/track/TextTrack.h:
  • html/track/TrackListBase.cpp:

(TrackListBase::TrackListBase):

  • html/track/TrackListBase.h:

LayoutTests:

Unskip test.

  • platform/mac/TestExpectations:
12:02 PM Changeset in webkit [216083] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Document style resolvers should share user rulesets
https://bugs.webkit.org/show_bug.cgi?id=171549

Reviewed by Andreas Kling.

Large user stylesheets (like those used by ad blockers) can end up using lots of memory if
a document uses large number of shadow trees. User style is inherently per-document and
the resulting rulesets can be shared between the document and the shadow trees.

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::DocumentRuleSets):
(WebCore::DocumentRuleSets::userStyle):

Return per-document user style for shadow trees.

(WebCore::DocumentRuleSets::collectFeatures):

  • css/DocumentRuleSets.h:

(WebCore::DocumentRuleSets::setUsesSharedUserStyle):
(WebCore::DocumentRuleSets::userStyle): Deleted.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::initializeUserStyle):

Separate user style initialization from construction.

  • css/StyleResolver.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):

Don't initialize user style for user agents shadow trees.

11:46 AM Changeset in webkit [216082] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked test svg/animations/animated-svg-image-removed-from-document-paused.html as flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=171559

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
11:45 AM Changeset in webkit [216081] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marked test imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription.html as flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=170818

Unreviewed test gardening.

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

  • platform/mac-wk2/TestExpectations:
11:43 AM Changeset in webkit [216080] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r213036): Crash in -[WKContentView _webTouchEventsRecognized:] when a touch event arrives after a WebPageProxy has been invalidated
https://bugs.webkit.org/show_bug.cgi?id=171539
<rdar://problem/31614982>

Reviewed by Tim Horton.

Prior to r213036, the layer tree transaction at last touch start was tracked by
WebPageProxy::handleTouchEventSynchronously(), which would ask the drawing area proxy for
its most recent transaction ID after ensuring that the WebPageProxy was valid.

r213036 moved the tracking up to -[WKContentView _webTouchEventsRecognized:], but failed to
check if _page was valid before asking for its drawing area proxy's last transaction ID; the
drawing area proxy is set to null on WebPageProxy invalidation.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _webTouchEventsRecognized:]): Added an early return if _page isn't valid.

11:02 AM Changeset in webkit [216079] by mmaxfield@apple.com
  • 7 edits
    2 adds in trunk

Font Loading API specifies font is loaded but sizing of font after load reports inconsistent values
https://bugs.webkit.org/show_bug.cgi?id=168533

Reviewed by Zalan Bujtas.

Source/WebCore:

Previously, we were marking all local() fonts as immediately successful,
regardless of whether or not they were present on the system. Instead, we
should use the load() function to make this determination and mark the font
as failed if it doesn't exist. (This is, after all, the whole point of the
load() function). This brings us in-line with Firefox's and Chrome's
behavior.

Test: fast/text/font-loading-local.html

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::pump): Remote loading requires the FontSelector,
but it isn't available for local fonts. Now that load() is called for both
local and remote fonts, the ASSERT() should be lowered into the load()
function and scoped to just the case where we have a remote font.
(WebCore::CSSFontFace::font): Ditto.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::CSSFontFaceSource): Don't immediatley set
the success/failure state for local fonts.
(WebCore::CSSFontFaceSource::load): Move loading logic from font() to
load(). None of this code is new; it just is moved.
(WebCore::CSSFontFaceSource::font): Delete code moved to load().

  • css/CSSFontFaceSource.h:
  • css/FontFace.cpp:

(WebCore::FontFace::create):

LayoutTests:

  • fast/text/font-loading-local-expected.txt: Added.
  • fast/text/font-loading-local.html: Added.
  • fast/text/web-font-load-fallback-during-loading.html:
11:00 AM Changeset in webkit [216078] by fpizlo@apple.com
  • 5 edits
    4 adds in trunk/Source/JavaScriptCore

JSC C API should expose GC marking constraints and weak references
https://bugs.webkit.org/show_bug.cgi?id=171554

Reviewed by Geoffrey Garen.

This exposes an API that lets you participate in the GC's fixpoint. You can ask the GC
what is marked and you can tell the GC to mark things. The constraint callback cannot
do a whole lot, but it can query marking state and it can dereference weak references.

Additionally, this exposes a very simple weak reference API in C.

  • API/JSMarkingConstraintPrivate.cpp: Added.

(JSC::isMarked):
(JSC::mark):
(JSContextGroupRegisterMarkingConstraint):

  • API/JSMarkingConstraintPrivate.h: Added.
  • API/JSWeakPrivate.cpp: Added.

(OpaqueJSWeak::OpaqueJSWeak):
(JSWeakCreate):
(JSWeakRetain):
(JSWeakRelease):
(JSWeakGetObject):

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

(markingConstraint):
(testMarkingConstraints):
(main):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::appendHiddenUnbarriered):
(JSC::SlotVisitor::appendHidden):

11:00 AM Changeset in webkit [216077] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore/PAL

Make "PAL/pal" and "PAL/pal/crypto" directories private
https://bugs.webkit.org/show_bug.cgi?id=171524

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-05-02
Reviewed by Myles C. Maxfield.

Make the "PAL/pal" and "PAL/pal/crypto" directories private to force WebCore sources
to include PAL headers in "#include <pal/*.h>" style.

  • pal/CMakeLists.txt:
10:55 AM Changeset in webkit [216076] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

JSFixedArray::allocationSize() should not allow for allocation failure.
https://bugs.webkit.org/show_bug.cgi?id=171516

Reviewed by Geoffrey Garen.

Since JSFixedArray::createFromArray() now handles allocation failures by throwing
OutOfMemoryErrors, its helper function allocationSize() (which computes the buffer
size to allocate) should also allow for allocation failure on overflow.

This issue is covered by the stress/js-fixed-array-out-of-memory.js test when
run on 32-bit builds.

  • runtime/JSFixedArray.h:

(JSC::JSFixedArray::tryCreate):
(JSC::JSFixedArray::allocationSize):

10:49 AM Changeset in webkit [216075] by commit-queue@webkit.org
  • 3 edits
    3 adds in trunk

Source/WebCore:
Allow media stream based videos with sound to autoplay if the page is already playing sound
https://bugs.webkit.org/show_bug.cgi?id=171447

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

Test: http/tests/media/autoplay-if-audio-is-playing.html for ensuring non-mediastream based video will not autoplay.
Manual testing for the autoplay of media stream based videos since such a test should happen without using getUserMedia.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted):

LayoutTests:
Allow media stream based videos with sound autoplay if the page is already playing sound
https://bugs.webkit.org/show_bug.cgi?id=171447

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

  • http/tests/media/autoplay-if-audio-is-playing-expected.txt: Added.
  • http/tests/media/autoplay-if-audio-is-playing.html: Added.
  • http/tests/media/resources/test-25fps.mp4: Added.
10:41 AM Changeset in webkit [216074] by Chris Dumez
  • 24 edits in trunk/Source/WebCore

Use PassRefPtr less in editing code
https://bugs.webkit.org/show_bug.cgi?id=171534

Reviewed by Geoffrey Garen.

Use PassRefPtr less in editing code.

  • editing/AppendNodeCommand.cpp:

(WebCore::AppendNodeCommand::AppendNodeCommand):
(WebCore::AppendNodeCommand::getNodesInCommand):

  • editing/AppendNodeCommand.h:

(WebCore::AppendNodeCommand::create):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange):

  • editing/BreakBlockquoteCommand.cpp:

(WebCore::BreakBlockquoteCommand::doApply):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::insertNodeBefore):
(WebCore::CompositeEditCommand::insertNodeAfter):
(WebCore::CompositeEditCommand::insertNodeAt):
(WebCore::CompositeEditCommand::appendNode):
(WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
(WebCore::CompositeEditCommand::mergeIdenticalElements):
(WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition):
(WebCore::CompositeEditCommand::appendBlockPlaceholder):
(WebCore::CompositeEditCommand::insertBlockPlaceholder):
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
(WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
(WebCore::CompositeEditCommand::moveParagraphs):

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

(WebCore::CreateLinkCommand::doApply):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
(WebCore::DeleteSelectionCommand::mergeParagraphs):

  • editing/FormatBlockCommand.cpp:

(WebCore::FormatBlockCommand::formatRange):

  • editing/IndentOutdentCommand.cpp:

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

  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::doApply):

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

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

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

(WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
(WebCore::InsertNodeBeforeCommand::doApply):
(WebCore::InsertNodeBeforeCommand::doUnapply):
(WebCore::InsertNodeBeforeCommand::getNodesInCommand):

  • editing/InsertNodeBeforeCommand.h:

(WebCore::InsertNodeBeforeCommand::create):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
(WebCore::InsertParagraphSeparatorCommand::doApply):

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

(WebCore::InsertTextCommand::positionInsideTextNode):
(WebCore::InsertTextCommand::insertTab):

  • editing/ModifySelectionListLevel.cpp:

(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeBefore):
(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeAfter):
(WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange):
(WebCore::IncreaseSelectionListLevelCommand::doApply):

  • editing/RemoveNodePreservingChildrenCommand.cpp:

(WebCore::RemoveNodePreservingChildrenCommand::doApply):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
(WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
(WebCore::ReplaceSelectionCommand::insertAsListItems):

  • editing/SimplifyMarkupCommand.cpp:

(WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):

9:58 AM Changeset in webkit [216073] by commit-queue@webkit.org
  • 4 edits in trunk

Set Response.blob() type correctly when body is a ReadableStream.
https://bugs.webkit.org/show_bug.cgi?id=171489

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

LayoutTests/imported/w3c:

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

Source/WebCore:

The Fetch API specification requires setting the blob contentType
using the Content-Type header value, if present. Currently WebKit
only sets the type on the FetchBodyConsumer when FetchBody::blob()
is called. Unfortunately, this is never called if the body is
actually a ReadableStream.

This change allows WebKit to pass the "Consume response's body: from
stream to blob" case in the WPT response-consume.html test.

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

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::startConsumingStream): Modified to call
FetchBodyConsumer::setContentType() before processing the stream.

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

Marked test http/tests/xmlhttprequest/methods-async.html as flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=171530

Unreviewed test gardening.

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

  • platform/ios-wk2/TestExpectations:
9:22 AM Changeset in webkit [216071] by Ryan Haddad
  • 6 edits in trunk/Source/WebCore

Unreviewed, rolling out r216069.

This change broke the build.

Reverted changeset:

"Document style resolvers should share user rulesets"
https://bugs.webkit.org/show_bug.cgi?id=171549
http://trac.webkit.org/changeset/216069

7:33 AM Changeset in webkit [216070] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit2

Web Automation: generate resizeWindowOfBrowsingContext and moveWindowOfBrowsingContext for all platforms
https://bugs.webkit.org/show_bug.cgi?id=171107

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-05-02
Reviewed by Brian Burg.

The implementation is actually cross-platform, so it could be moved from WebAutomationSessionMac.mm to
WebAutomationSession.cpp and simply return a NotImplemented error for iOS. This will allow to use these methods
in other platforms.

  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext): Deleted.
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext): Deleted.

7:30 AM Changeset in webkit [216069] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Document style resolvers should share user rulesets
https://bugs.webkit.org/show_bug.cgi?id=171549

Reviewed by Andreas Kling.

Large user stylesheets (like those used by ad blockers) can end up using lots of memory if
a document uses large number of shadow trees. User style is inherently per-document and
the resulting rulesets can be shared between the document and the shadow trees.

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::DocumentRuleSets):
(WebCore::DocumentRuleSets::userStyle):

Return per-document user style for shadow trees.

(WebCore::DocumentRuleSets::collectFeatures):

  • css/DocumentRuleSets.h:

(WebCore::DocumentRuleSets::setUsesSharedUserStyle):
(WebCore::DocumentRuleSets::userStyle): Deleted.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::initializeUserStyle):

Separate user style initialization from construction.

  • css/StyleResolver.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):

Don't initialize user style for user agents shadow trees.

3:52 AM Changeset in webkit [216068] by yoon@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Remove undefined nativeImage method from the ImageBuffer's header
https://bugs.webkit.org/show_bug.cgi?id=171502

Unreviewed, remove a dead code accidentally committed in r194630.

  • platform/graphics/ImageBuffer.h: Remove nativeImage method.

It is accidentally added during a refectorying at r194630, and there is
no definition for this method.

3:05 AM Changeset in webkit [216067] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Sergio Villar Senin.

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

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

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

1:55 AM Changeset in webkit [216066] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Adding logging to RTCPeerConnection to allow WebRTC application debugging
https://bugs.webkit.org/show_bug.cgi?id=171531

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-02
Reviewed by Jon Lee.

No change of behavior.
This allows easier debugging of webrtc-enabled web pages.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::createOfferSucceeded):
(WebCore::PeerConnectionBackend::createOfferFailed):
(WebCore::PeerConnectionBackend::createAnswerSucceeded):
(WebCore::PeerConnectionBackend::createAnswerFailed):
(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
(WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
(WebCore::PeerConnectionBackend::addIceCandidateFailed):
(WebCore::PeerConnectionBackend::newICECandidate):
(WebCore::PeerConnectionBackend::doneGatheringCandidates):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::queuedCreateOffer):
(WebCore::RTCPeerConnection::queuedCreateAnswer):
(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):

1:48 AM Changeset in webkit [216065] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Michael Catanzaro.

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

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

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

1:39 AM Changeset in webkit [216064] by commit-queue@webkit.org
  • 1 edit
    1 delete in trunk/Source/WebInspectorUI

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

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

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

  • UserInterface/Images/gtk/FontVariantSmallCaps.svg: Removed.
1:27 AM Changeset in webkit [216063] by commit-queue@webkit.org
  • 1 edit
    2 deletes in trunk/Source/WebInspectorUI

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

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

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

  • UserInterface/Images/gtk/BreakpointActionAdd.svg: Removed.
  • UserInterface/Images/gtk/BreakpointActionRemove.svg: Removed.

May 1, 2017:

11:49 PM Changeset in webkit [216062] by zandobersek@gmail.com
  • 4 edits in trunk

[GCrypt] ECDSA signing and verification support
https://bugs.webkit.org/show_bug.cgi?id=171103

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Implement WebCrypto ECDSA support for configurations that
are using libgcrypt.

For signing, the provided data is first hashed with the specified
digest algorithm and embedded into a data s-expression. It's then
passed to gcry_pk_sign() along with the private key, returning a
sig-val s-expression. The r and s parameters are then retrieved from
that sig-val and their data extracted and concatenated in the output
Vector<>.

For verification, the data is again hashed and embedded into a data
s-expression. The r and s parameters are extracted from the passed-in
signature Vector<> and embedded into a sig-val s-expression. The data
and sig-val s-expressions are then passed to gcry_pk_verify() along
with the public key. The verification succeeds if no error is returned
and fails if the returned error code is GPG_ERR_BAD_SIGNATURE.

  • crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:

(WebCore::hashCryptoDigestAlgorithm):
(WebCore::hashAlgorithmName):
(WebCore::mpiData):
(WebCore::gcryptSign):
(WebCore::gcryptVerify):
(WebCore::CryptoAlgorithmECDSA::platformSign):
(WebCore::CryptoAlgorithmECDSA::platformVerify):

LayoutTests:

  • platform/gtk/TestExpectations: Enable the passing ECDSA tests under

crypto/subtle/. The ECDSA tests that utilize PKCS #8 and SPKI remain
skipped since support for that hasn't landed yet.

11:37 PM Changeset in webkit [216061] by zandobersek@gmail.com
  • 4 edits
    2 adds in trunk

[GCrypt] HKDF bit derivation support
https://bugs.webkit.org/show_bug.cgi?id=171074

Reviewed by Michael Catanzaro.

Source/WebCore:

Implement bit derivation support for the HKDF algorithm for configurations
that use libgcrypt.

libgcrypt doesn't provide HKDF support out of the box, so we have to
implement the two steps manually. In the first one, we retrieve the
pseudo-random key by using the specified MAC algorithm with the salt data
as the key and the key data as the input keying material.

In the expand step, we do the required amount of iterations to derive
a sufficient amount of data, using the same MAC algorithm with the
pseudo-random key from the previous step on the data we compose from the
previous block data, the info data, and the current iteration value. The
resulting blocks are appended together until they can be clipped to the
desired output length.

  • crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:

(WebCore::macAlgorithmForHashFunction):
(WebCore::gcryptDeriveBits):
(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

LayoutTests:

The crypto/subtle/hkdf-derive-bits-length-limits.html test is added, testing the
corner-case length values for which the bit derivation operation must succeed or
fail for any specified SHA hash algorithm. With HashLen as the algorithm's output
length, the operation should reject for lengths of 0 or above 255 * HashLen * 8.
The operation should resolve for lengths between the two limits, with testing
performed on lengths of 8 (the minimum output length), HashLen * 8 (matching the
output length of the hash algorithm), and 255 * HashLen * 8 (the maximum
derivation output length).

  • crypto/subtle/hkdf-derive-bits-length-limits-expected.txt: Added.
  • crypto/subtle/hkdf-derive-bits-length-limits.html: Added.
  • platform/gtk/TestExpectations: Enable the HKDF tests under crypto/subtle/.
11:34 PM Changeset in webkit [216060] by zandobersek@gmail.com
  • 6 edits
    2 adds in trunk

[GCrypt] ECDH bit derivation support
https://bugs.webkit.org/show_bug.cgi?id=171070

Reviewed by Michael Catanzaro.

Source/WebCore:

Implement bit derivation support for the ECDH algorithm for configurations
that use libgcrypt.

This is done by retrieving the private key data and wrapping it in a new
data s-expression. That's then encrypted with the public key, and the
returned s-expression contains the shared point data. That data is then
decoded into an EC point, from which the x-coordinate is retrieved. This
coordinate data is finally our bit derivation result.

  • crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:

(WebCore::gcryptDerive):
(WebCore::CryptoAlgorithmECDH::platformDeriveBits):

Source/WebCore/PAL:

Add PAL::GCrypt::HandleDeleter specialization for the
gcry_mpi_point_t type.

  • pal/crypto/gcrypt/Handle.h:

(PAL::GCrypt::HandleDeleter<gcry_mpi_point_t>::operator()):

LayoutTests:

The crypto/subtle/ecdh-derive-bits-length-limits.html test is added, testing the
corner-case length values for which the bit derivation operation must succeed or
fail. When specifying 0 as the length, the returned result must match the EC key
size in length. 8, tested as the minimum non-zero value, and the key size for
each key must also correctly resolve and return a resulting ArrayBuffer whose
length in bytes must match the requested length. Derivations for byte-aligned
values should start rejecting immediately for length values that are bigger than
the EC key's length.

  • crypto/subtle/ecdh-derive-bits-length-limits-expected.txt: Added.
  • crypto/subtle/ecdh-derive-bits-length-limits.html: Added.
  • platform/gtk/TestExpectations: Enable Web Crypto ECDH tests under crypto/subtle/

that are passing now that the proper implementation has been added. The remaining
failing ECDH tests use PKCS #8 and SPKI key import/export formats, which are not
supported yet.

10:30 PM Changeset in webkit [216059] by mitz@apple.com
  • 2 edits in trunk/Source/WTF

[Xcode] It’s easy to accidentally install a WTF header outside /usr/local/include/wtf
https://bugs.webkit.org/show_bug.cgi?id=171533

Reviewed by Andy Estes.

  • WTF.xcodeproj/project.pbxproj: Removed the WTF target’s Headers build phase. Its existence was making it easy to accidentally add a header to the target and make it Private, which would have Xcode install a copy of it right under /usr/local/include, in addition to the copy installed under /usr/local/include/wtf by the Copy WTF Headers target. Also got rid of INSTALL_PATH_PREFIX in the script build phase in the Copy WTF Headers target, because it is being never set anymore.
9:32 PM Changeset in webkit [216058] by zandobersek@gmail.com
  • 3 edits in trunk/Source/JavaScriptCore

[aarch64][Linux] m_allowScratchRegister assert hit in MacroAssemblerARM64 under B3::Air::CCallSpecial::generate()
https://bugs.webkit.org/show_bug.cgi?id=170672

Reviewed by Filip Pizlo.

In Air::CCallSpecial::admitsStack() we reject admitting the callee argument on
the stack for ARM64 because that can lead to disallowed usage of the scratch
register in MacroAssemblerARM64 when generating a call with an address Arg
in Air::CCallSpecial::generate().

The testLinearScanWithCalleeOnStack test is added to testb3. It reproduces the
original issue by force-spilling everything on the stack and enforcing the use
of the linear scan register allocation by using an optimization level of 1.

  • b3/air/AirCCallSpecial.cpp:

(JSC::B3::Air::CCallSpecial::admitsStack):

  • b3/testb3.cpp:

(JSC::B3::testLinearScanWithCalleeOnStack):
(JSC::B3::run):

8:14 PM Changeset in webkit [216057] by mitz@apple.com
  • 2 edits in trunk/Source/WTF

WTF installs an extra copy of a header outside /usr/local/include/wtf

  • WTF.xcodeproj/project.pbxproj: Demoted CPUTime.h from Private to Project.
7:04 PM Changeset in webkit [216056] by sbarati@apple.com
  • 4 edits in trunk/LayoutTests

REGRESSION: LayoutTest workers/wasm-hashset-many.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=171449

Unreviewed.

  • platform/win/TestExpectations: Skip Wasm tests on Windows.
  • workers/wasm-hashset-many-expected.txt:
  • workers/wasm-hashset/many-test.js: Make wasm-hashset-many run fewer workers.
6:47 PM Changeset in webkit [216055] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Use RELEASE_LOG_ERROR() to do process termination logging
https://bugs.webkit.org/show_bug.cgi?id=171521

Reviewed by Andreas Kling.

Use RELEASE_LOG_ERROR() to do process termination logging instead of RELEASE_LOG().
This makes the issue more visible in Console.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

6:33 PM Changeset in webkit [216054] by commit-queue@webkit.org
  • 6 edits in trunk

Ensure RealtimeOutgoingVideoSource sends a black frame when its related source is muted
https://bugs.webkit.org/show_bug.cgi?id=171497

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

Source/WebCore:

Covered by updated test.

When the track is being muted or disabled, send a black frame explicitly.
VideoToolBox sometimes does not output a frame until it receives the other.
That is why we end up sending two frames, the second asynchronously so that libwebrtc will not skip it.
Also storing the rotation so that we keep the same rotation for black frames.
Storing width and height for consistency as well.

  • platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):
(WebCore::RealtimeOutgoingVideoSource::stop):
(WebCore::RealtimeOutgoingVideoSource::sourceMutedChanged):
(WebCore::RealtimeOutgoingVideoSource::sourceEnabledChanged):
(WebCore::RealtimeOutgoingVideoSource::setSizeFromSource):
(WebCore::RealtimeOutgoingVideoSource::sendBlackFrame):
(WebCore::RealtimeOutgoingVideoSource::sendFrame):
(WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):

  • platform/mediastream/mac/RealtimeOutgoingVideoSource.h:

LayoutTests:

  • webrtc/video-mute.html: Updating the test to make debugging clearer.
6:28 PM Changeset in webkit [216053] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit2

Only try to get sandbox extension handle for IndexedDB directory if it is set.
rdar://problem/31925828 and https://bugs.webkit.org/show_bug.cgi?id=171522

Reviewed by Andy Estes.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):

6:24 PM Changeset in webkit [216052] by commit-queue@webkit.org
  • 26 edits
    1 move in trunk/LayoutTests/imported/w3c

Eliminate ?pipe=sub from Resource Timing Tests
https://bugs.webkit.org/show_bug.cgi?id=171525

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-01
Reviewed by Youenn Fablet.

  • web-platform-tests/resource-timing/resources/rt-utilities.sub.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/rt-utilities.js.

Rename with ".sub.js" to automatically get substitutions.

  • web-platform-tests/resource-timing/resources/rt-iframe-1.html:
  • web-platform-tests/resource-timing/resources/rt-iframe-2.html:
  • web-platform-tests/resource-timing/resources/rt-worker-resources.js:
  • web-platform-tests/resource-timing/rt-cors.html:
  • web-platform-tests/resource-timing/rt-cors.worker.js:
  • web-platform-tests/resource-timing/rt-initiatorType-css.html:
  • web-platform-tests/resource-timing/rt-initiatorType-element.html:
  • web-platform-tests/resource-timing/rt-initiatorType-fetch.html:
  • web-platform-tests/resource-timing/rt-initiatorType-media.html:
  • web-platform-tests/resource-timing/rt-initiatorType-other.html:
  • web-platform-tests/resource-timing/rt-initiatorType-script-module.html:
  • web-platform-tests/resource-timing/rt-initiatorType-xmlhttprequest.html:
  • web-platform-tests/resource-timing/rt-initiatorType.worker.js:
  • web-platform-tests/resource-timing/rt-nextHopProtocol.html:
  • web-platform-tests/resource-timing/rt-nextHopProtocol.worker.js:
  • web-platform-tests/resource-timing/rt-performance-extensions.html:
  • web-platform-tests/resource-timing/rt-performance-extensions.worker.js:
  • web-platform-tests/resource-timing/rt-resource-errors.html:
  • web-platform-tests/resource-timing/rt-resource-ignored.html:
  • web-platform-tests/resource-timing/rt-resources-per-frame.html:
  • web-platform-tests/resource-timing/rt-resources-per-worker.html:
  • web-platform-tests/resource-timing/rt-revalidate-requests.html:
  • web-platform-tests/resource-timing/rt-serialization.html:
  • web-platform-tests/resource-timing/rt-shared-resource-in-frames.html:
  • web-platform-tests/resource-timing/rt-shared-resource-in-workers.html:

Update include of rt-utilities.

6:16 PM Changeset in webkit [216051] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Simplify Resource Timing handling of cached resource
https://bugs.webkit.org/show_bug.cgi?id=171526

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-01
Reviewed by Youenn Fablet.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::init):
(WebCore::SubresourceLoader::reportResourceTiming):
Use auto in ResourceTiming construction.
Eliminate an outdated comment.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
We can avoid the checks around the request.origin. It should already
be the cases we were checking and asserting because of login in
CachedResourceLoader::prepareFetch.

6:07 PM Changeset in webkit [216050] by Ryan Haddad
  • 7 edits
    1 move in trunk/Source/WebCore

Unreviewed, rolling out r216024.

This change caused ios-simulator LayoutTests to exit early
with assertion failures.

Reverted changeset:

"Add audio device change notifications to AudioSession."
https://bugs.webkit.org/show_bug.cgi?id=171403
http://trac.webkit.org/changeset/216024

6:00 PM Changeset in webkit [216049] by ddkilzer@apple.com
  • 4 edits in trunk

Stop using sprintf() in JavaScriptCore debugger
<https://webkit.org/b/171512>

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • disassembler/udis86/udis86.c:

(ud_insn_hex): Switch from sprintf() to snprintf().

Tools:

  • Scripts/webkitpy/style/checker.py:

(_PATH_RULES_SPECIFIER): Ignore some formatting checkers since
Source/JavaScriptCore/disassembler/udis86/ is generated code.

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

Marked LayoutTest/http/tests/preload/not_delaying_window_onload_before_discovery.html as flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=171528

Unreviewed test Gardening.

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

  • platform/ios-wk2/TestExpectations:
5:08 PM Changeset in webkit [216047] by timothy_horton@apple.com
  • 53 edits
    6 adds
    4 deletes in trunk

Expose viewport-fit instead of clip-to-safe-area
https://bugs.webkit.org/show_bug.cgi?id=171503
<rdar://problem/31918249>

Reviewed by Simon Fraser.

Tests: fast/viewport/ios/viewport-fit-auto.html

fast/viewport/ios/viewport-fit-contain.html
fast/viewport/ios/viewport-fit-cover.html

  • dom/ConstantPropertyMap.cpp:

(WebCore::ConstantPropertyMap::buildValues):
(WebCore::ConstantPropertyMap::updateConstantsForUnobscuredSafeAreaInsets):
(WebCore::ConstantPropertyMap::didChangeSafeAreaInsets):
(WebCore::ConstantPropertyMap::updateConstantsForObscuredInsets): Deleted.
(WebCore::ConstantPropertyMap::didChangeObscuredInsets): Deleted.

  • dom/ConstantPropertyMap.h:

Retrieve the safe area insets from page, instead of assuming that we should
just expose the entire obscured inset. Also, do some renames.

  • dom/ViewportArguments.cpp:

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

  • dom/ViewportArguments.h:

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

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

(WebCore::FrameView::enableSpeculativeTilingIfNeeded):
(WebCore::FrameView::calculateExtendedBackgroundMode):
(WebCore::FrameView::setClipToSafeArea): Deleted.

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

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

  • page/ViewportConfiguration.h:

(WebCore::ViewportConfiguration::avoidsUnsafeArea):
(WebCore::ViewportConfiguration::Parameters::Parameters):
(WebCore::ViewportConfiguration::clipToSafeArea): Deleted.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateRootContentLayerClipping):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::repaintUsingContainer):
Un-do changes to support clip-to-safe-area, and instead implement
a new viewport-fit argument in the viewport meta tag, which takes
"auto", "contain", and "cover". "auto" and "contain" cause web content
to lay out excluding the safe area inset from the layout size, while
"cover" causes web content to expand into the unsafe area.

  • page/Page.cpp:

(WebCore::Page::setUnobscuredSafeAreaInsets):
(WebCore::Page::setObscuredInsets): Deleted.

  • page/Page.h:

(WebCore::Page::setObscuredInsets):
(WebCore::Page::unobscuredSafeAreaInsets):
Keep safe area and obscured insets separately.

  • Shared/VisibleContentRectUpdateInfo.cpp:

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

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::unobscuredSafeAreaInsets):
(WebKit::operator==):
Plumb the safe area insets down from the UI process to the Web Content
process inside the visible content rect update, alongside the obscured
insets.

  • Shared/mac/RemoteLayerTreeTransaction.h:

(WebKit::RemoteLayerTreeTransaction::avoidsUnsafeArea):
(WebKit::RemoteLayerTreeTransaction::setAvoidsUnsafeArea):

  • Shared/mac/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::description):

  • UIProcess/PageClient.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didChangeAvoidsUnsafeArea):
(WebKit::PageClientImpl::didChangeClipToSafeArea): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didCommitLayerTree):

  • UIProcess/mac/PageClientImpl.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::didChangeClipToSafeArea): Deleted.

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

(WebKit::WebPage::willCommitLayerTree):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::updateVisibleContentRects):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::setAvoidsUnsafeArea):
(WebKit::WebPageProxy::setClipToSafeArea): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::avoidsUnsafeArea):
(WebKit::WebPageProxy::clipToSafeArea): Deleted.

  • UIProcess/WebPageProxy.messages.in:

Plumb the effective value of viewport-fit (whether or not to avoid
the safe area for layout purposes) from the Web Content process
to the UI process inside the layer tree transaction.
Also, remove clip-to-safe-area plumbing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _computedContentInset]):
(-[WKWebView _computedUnobscuredSafeAreaInset]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _updateScrollViewInsetAdjustmentBehavior]):
(-[WKWebView _safeAreaShouldAffectObscuredInsets]):
(-[WKWebView _unobscuredSafeAreaInsets]):
(-[WKWebView _setUnobscuredSafeAreaInsets:]):
(-[WKWebView _contentMayDrawInObscuredInsets]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Make use of the effective value of viewport-fit to decide whether to
take the safe area into account when computing the obscured insets,
and expose this to clients (in the case that they need to know
because they push their own obscured insets down). Also expose a
safe area inset setter for that case as well.

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

(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
Remove a piece of the clip-to-safe-area implementation, and plumb
safe area insets into the visible content rect update info.

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

(-[WKScrollView initWithFrame:]):
(-[WKScrollView _contentInsetAdjustmentBehaviorWasExternallyOverridden]):
(-[WKScrollView _setContentInsetAdjustmentBehavior:]):
(-[WKScrollView _setContentInsetAdjustmentBehaviorInternal:]):
Keep track of whether the client has ever touched the content inset adjustment
behavior; if they have, we won't manage it ourselves.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setSafeAreaInsets):
(WTR::UIScriptController::setObscuredInsets): Deleted.

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

(WTR::UIScriptController::setSafeAreaInsets):
(WTR::UIScriptController::setObscuredInsets): Deleted.

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView setOverrideSafeAreaInsets:]):
(-[TestRunnerWKWebView _safeAreaInsetsForFrame:inSuperview:]):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIKitSPI.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setSafeAreaInsets):
(WTR::UIScriptController::setObscuredInsets): Deleted.
Expose a safe area inset setter instead of obscured insets.

  • TestExpectations:
  • fast/css/variables/constants/ios/safe-area-inset-set-expected.html:
  • fast/css/variables/constants/ios/safe-area-inset-set.html:
  • fast/viewport/ios/viewport-fit-auto-expected.txt: Added.
  • fast/viewport/ios/viewport-fit-auto.html: Added.
  • fast/viewport/ios/viewport-fit-contain-expected.txt: Added.
  • fast/viewport/ios/viewport-fit-contain.html: Added.
  • fast/viewport/ios/viewport-fit-cover-expected.txt: Added.
  • fast/viewport/ios/viewport-fit-cover.html: Added.
  • tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles-expected.txt: Removed.
  • tiled-drawing/ios/viewport-clip-to-safe-area-no-gets-margin-tiles.html: Removed.
  • tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles-expected.txt: Removed.
  • tiled-drawing/ios/viewport-clip-to-safe-area-yes-gets-no-margin-tiles.html: Removed.

Remove clip-to-safe-area tests and add some viewport-fit tests. Also, adjust
safe-area-inset-set to use the new UIScriptController setSafeAreaInset method.

5:02 PM Changeset in webkit [216046] by Chris Dumez
  • 6 edits
    2 adds in trunk

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

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

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

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

Source/WebCore:

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

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

  • xml/DOMParser.cpp:

(WebCore::DOMParser::parseFromString):

LayoutTests:

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

  • fast/dom/domparser-parsefromstring-origin-expected.txt: Added.
  • fast/dom/domparser-parsefromstring-origin.html: Added.
5:01 PM Changeset in webkit [216045] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/debugger/tail-recursion.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168387

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:01 PM Changeset in webkit [216044] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline two fast/visual-viewport tests for iOS.

Unreviewed test gardening.

  • platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt:
  • platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
4:54 PM Changeset in webkit [216043] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Web Inspector: ASSERT(!m_startedComposite) fails when recording on non-Cocoa Timeline
https://bugs.webkit.org/show_bug.cgi?id=171363

Patch by Ross Kirsling <Ross Kirsling> on 2017-05-01
Reviewed by Matt Baker.

  • page/FrameView.cpp:

(WebCore::FrameView::flushCompositingStateIncludingSubframes): Add PLATFORM(COCOA) guard.

4:18 PM Changeset in webkit [216042] by Wenson Hsieh
  • 2 edits in trunk/Tools

Unreviewed, fix the build on a new internal SDK

Replace usages of NSItemProviderRepresentationVisibilityAll with
UIItemProviderRepresentationOptionsVisibilityAll.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]):
(TestWebKitAPI::TEST):

4:00 PM Changeset in webkit [216041] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

[Cocoa] Replace uses of [get…Class() alloc] in TestWebKitAPI
<https://webkit.org/b/171493>

Reviewed by Dan Bernstein.

  • TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm:

Remove UIKit soft-link since TestWebKitAPI links to
UIKit.framework.
(TestWebKitAPI::WebKit1_AudioSessionCategoryIOS_Test): Use
UIWindow and UIWebView classes directly.

  • TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm:

Remove UIKit soft-link since TestWebKitAPI links to
UIKit.framework.
(RequiresUserActionForPlaybackTest::createWebView): Use UIWindow
class directly.

3:55 PM Changeset in webkit [216040] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Stop using strcpy() in fullyQualifiedInfoTableName() from Database.cpp
<https://webkit.org/b/171517>

Reviewed by Brady Eidson.

  • Modules/webdatabase/Database.cpp:

(WebCore::fullyQualifiedInfoTableName): Switch from strcpy() to
snprintf().

3:54 PM Changeset in webkit [216039] by Joseph Pecoraro
  • 4 edits in trunk/LayoutTests

[GTK] Two test started to fail after due to unhandled promise rejection reported after r215916
https://bugs.webkit.org/show_bug.cgi?id=171491

Unreviewed test gardening.

  • js/promises-tests/promises-tests-2-3-3.html:

Silence unhandled expectation messages for this test.

  • media/video-fullscreen-restriction-removed-expected.txt:

Rebaseline expected results with unhandled expectation message.

  • platform/gtk/TestExpectations:
3:52 PM Changeset in webkit [216038] by Chris Fleizach
  • 11 edits
    3 adds in trunk

AX: Support time@datetime for verbosity clarification of dates, times, and durations
https://bugs.webkit.org/show_bug.cgi?id=171498
<rdar://problem/12985540>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Expose the datetime attribute value.

Test: accessibility/datetime-attribute.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::datetimeAttributeValue):

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

(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

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

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

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

LayoutTests:

  • accessibility/datetime-attribute.html: Added.
  • accessibility/roles-computedRoleString-expected.txt:
  • platform/gtk/accessibility/datetime-attribute-expected.txt: Added.
  • platform/gtk/accessibility/roles-exposed-expected.txt:
  • platform/mac/accessibility/datetime-attribute-expected.txt: Added.
  • platform/mac/accessibility/roles-computedRoleString-expected.txt:
  • platform/mac/accessibility/roles-exposed-expected.txt:
3:41 PM Changeset in webkit [216037] by beidson@apple.com
  • 22 edits
    9 moves in trunk

Update names in WKURLSchemeHandler/WKURLSchemeHandlerTask APIs.
<rdar://problem/31824838> and https://bugs.webkit.org/show_bug.cgi?id=171508

Reviewed by Andy Estes.

Source/WebKit2:

This patch:

  • Renames WKURLSchemeHandlerTask to WKURLSchemeTask
  • Renames the method "startTask" to "startURLSchemeTask"
  • Renames the method "stopTask" to "stopURLSchemeTask"

To those effects it's basically a global replace.

  • Shared/API/APIObject.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • UIProcess/API/APIURLSchemeTask.cpp: Renamed from Source/WebKit2/UIProcess/API/APIURLSchemeHandlerTask.cpp.

(API::URLSchemeTask::create):
(API::URLSchemeTask::URLSchemeTask):

  • UIProcess/API/APIURLSchemeTask.h: Renamed from Source/WebKit2/UIProcess/API/APIURLSchemeHandlerTask.h.
  • UIProcess/API/Cocoa/WKURLSchemeHandler.h:
  • UIProcess/API/Cocoa/WKURLSchemeTask.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandlerTask.h.
  • UIProcess/API/Cocoa/WKURLSchemeTask.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandlerTask.mm.

(raiseExceptionIfNecessary):
(-[WKURLSchemeTaskImpl request]):
(-[WKURLSchemeTaskImpl didReceiveResponse:]):
(-[WKURLSchemeTaskImpl didReceiveData:]):
(-[WKURLSchemeTaskImpl didFinish]):
(-[WKURLSchemeTaskImpl didFailWithError:]):
(-[WKURLSchemeTaskImpl _apiObject]):

  • UIProcess/API/Cocoa/WKURLSchemeTaskInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandlerTaskInternal.h.

(WebKit::wrapper):

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

(WebKit::WebURLSchemeHandlerCocoa::platformStartTask):
(WebKit::WebURLSchemeHandlerCocoa::platformStopTask):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeHandlerTask): Deleted.
(WebKit::WebPageProxy::stopURLSchemeHandlerTask): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebURLSchemeHandler.cpp:

(WebKit::WebURLSchemeHandler::startTask):

  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.cpp: Renamed from Source/WebKit2/UIProcess/WebURLSchemeHandlerTask.cpp.

(WebKit::WebURLSchemeTask::create):
(WebKit::WebURLSchemeTask::WebURLSchemeTask):
(WebKit::WebURLSchemeTask::didReceiveResponse):
(WebKit::WebURLSchemeTask::didReceiveData):
(WebKit::WebURLSchemeTask::didComplete):
(WebKit::WebURLSchemeTask::pageDestroyed):
(WebKit::WebURLSchemeTask::stop):

  • UIProcess/WebURLSchemeTask.h: Renamed from Source/WebKit2/UIProcess/WebURLSchemeHandlerTask.h.

(WebKit::WebURLSchemeTask::identifier):
(WebKit::WebURLSchemeTask::request):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::addURLSchemeTaskProxy):
(WebKit::WebLoaderStrategy::removeURLSchemeTaskProxy):
(WebKit::WebLoaderStrategy::remove):
(WebKit::WebLoaderStrategy::addURLSchemeHandlerTaskProxy): Deleted.
(WebKit::WebLoaderStrategy::removeURLSchemeHandlerTaskProxy): Deleted.

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

(WebKit::WebPage::urlSchemeTaskDidReceiveResponse):
(WebKit::WebPage::urlSchemeTaskDidReceiveData):
(WebKit::WebPage::urlSchemeTaskDidComplete):
(WebKit::WebPage::urlSchemeHandlerTaskDidReceiveResponse): Deleted.
(WebKit::WebPage::urlSchemeHandlerTaskDidReceiveData): Deleted.
(WebKit::WebPage::urlSchemeHandlerTaskDidComplete): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:

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

  • WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
  • WebProcess/WebPage/WebURLSchemeTaskProxy.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.cpp.

(WebKit::WebURLSchemeTaskProxy::WebURLSchemeTaskProxy):
(WebKit::WebURLSchemeTaskProxy::startLoading):
(WebKit::WebURLSchemeTaskProxy::stopLoading):
(WebKit::WebURLSchemeTaskProxy::didReceiveResponse):
(WebKit::WebURLSchemeTaskProxy::didReceiveData):
(WebKit::WebURLSchemeTaskProxy::didComplete):
(WebKit::WebURLSchemeTaskProxy::hasLoader):

  • WebProcess/WebPage/WebURLSchemeTaskProxy.h: Renamed from Source/WebKit2/WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.h.

(WebKit::WebURLSchemeTaskProxy::request):
(WebKit::WebURLSchemeTaskProxy::identifier):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm:

(-[SchemeHandler webView:startURLSchemeTask:]):
(-[SchemeHandler webView:stopURLSchemeTask:]):
(-[SchemeHandler webView:startTask:]): Deleted.
(-[SchemeHandler webView:stopTask:]): Deleted.

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

Marked fast/mediastream/getUserMedia-webaudio.html as flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=170960

Unreviewed test gardening.

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

  • platform/mac-wk2/TestExpectations:
3:24 PM Changeset in webkit [216035] by Joseph Pecoraro
  • 29 edits
    3 adds in trunk

RejectedPromiseTracker should produce better callstacks and avoid capturing callstacks unless there is a debugger/inspector
https://bugs.webkit.org/show_bug.cgi?id=171416
<rdar://problem/31899425>

Reviewed by Saam Barati and Brian Burg.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/event_pause_noautoplay-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/event_play_noautoplay-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/paused_true_during_pause-expected.txt:
  • web-platform-tests/streams/piping/close-propagation-forward-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-backward-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-forward-expected.txt:
  • web-platform-tests/streams/piping/flow-control-expected.txt:
  • web-platform-tests/streams/piping/general-expected.txt:

Rebaseline results. Better stack trace for errors includes correct line numbers.
Explicit rejections with a value do not include backtraces without a debugger.

Source/WebCore:

Test: inspector/console/message-stack-trace.html

  • dom/RejectedPromiseTracker.cpp:

(WebCore::UnhandledPromise::UnhandledPromise):
(WebCore::UnhandledPromise::callStack):
Switch to RefPtr to allow not capturing the stack.

(WebCore::createScriptCallStackFromReason):
Use the VM's lastException if the value in the exception is the
rejected promise value. Using the Exception call stack is important
because uncaught exceptions in promise rejections trigger a built-in
try/catch and re-enter JavaScript before passing the Error through
to the RejectionTracker. When possible, we don't want to capture the
new stack originating from the try/catch. Instead, we want the stack
from before the try/catch when the error was created.

  • dom/ScriptExecutionContext.h:
  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection):
Switch to a pointer since the stack could be empty.

LayoutTests:

  • inspector/console/message-stack-trace-expected.txt: Added.
  • inspector/console/message-stack-trace.html: Added.

Test console stack traces from various places where console messages
are generated and the stacks are important.

  • inspector/console/resources/log-console-stack-trace.js: Added.

(TestPage.registerInitializer.logCallFrame):
(TestPage.registerInitializer.window.logConsoleMessageStackTrace):
Like the logger for Debugger StackTrace but for Console StackTrace.

  • inspector/debugger/break-on-exception-throw-in-promise-expected.txt:
  • inspector/debugger/break-on-uncaught-exception-throw-in-promise-expected.txt:
  • fast/mediastream/MediaStream-MediaElement-setObject-null-expected.txt:
  • http/tests/security/video-cross-origin-caching-expected.txt:
  • js/dom/unhandled-promise-rejection-bindings-type-error-expected.txt:
  • js/dom/unhandled-promise-rejection-console-report-expected.txt:
  • js/promises-tests/promises-tests-2-2-6-expected.txt:
  • streams/reference-implementation/pipe-to-options-expected.txt:
  • streams/reference-implementation/readable-stream-templated-expected.txt:
  • streams/reference-implementation/writable-stream-abort-expected.txt:
  • streams/reference-implementation/writable-stream-expected.txt:
  • webrtc/libwebrtc/release-while-creating-offer-expected.txt:
  • webrtc/libwebrtc/release-while-setting-local-description-expected.txt:

Rebaseline results. Better stack trace for errors includes correct line numbers.
Explicit rejections with a value do not include backtraces without a debugger.

3:03 PM Changeset in webkit [216034] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r216033.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):

2:53 PM Changeset in webkit [216033] by Joseph Pecoraro
  • 2 edits in trunk/LayoutTests

LayoutTest/imported/w3c/web-platform-tests/resource-timing/rt-revalidate-requests.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=171511

Unreviewed test gardening.

2:53 PM Changeset in webkit [216032] by jmarcell@apple.com
  • 2 edits in trunk/Tools

Add a new function for getting the Git hash for a pure git directory.
https://bugs.webkit.org/show_bug.cgi?id=171450

Reviewed by David Kilzer.

  • Scripts/VCSUtils.pm:

(gitHashForDirectory):

2:52 PM Changeset in webkit [216031] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update TestExpectations for http/tests/fetch/fetch-in-worker-crash.html.

Unreviewed test gardening.

2:49 PM Changeset in webkit [216030] by aakash_jain@apple.com
  • 11 edits in trunk

fix check-webkit-style errors in webkitpy about two blank lines before class definitions
https://bugs.webkit.org/show_bug.cgi?id=171509

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/config/committers.py: Added two blank lines before class definition.
  • Scripts/webkitpy/layout_tests/models/test_run_results.py: Ditto.
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py: Ditto.
  • Scripts/webkitpy/port/base_unittest.py: Ditto.
  • Scripts/webkitpy/port/device.py: Ditto.
  • Scripts/webkitpy/port/linux_get_crash_log.py: Ditto.
  • Scripts/webkitpy/style/checkers/featuredefines.py: Ditto.
  • Scripts/webkitpy/style/checkers/jsonchecker.py: Ditto.
  • Scripts/webkitpy/tool/bot/patchanalysistask.py: Ditto.
  • Scripts/webkitpy/layout_tests/controllers/manager_unittest.py: Ditto.

(ManagerTest.test_uses_custom_device.MockCustomDevicePort): Added blank line before method.
(ManagerTest.test_uses_custom_device): Removed extra blank line at end of file.

2:38 PM Changeset in webkit [216029] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

Use AVAudioSession to enumerate audio capture devices on iOS
https://bugs.webkit.org/show_bug.cgi?id=170861
<rdar://problem/31653658>

Reviewed by Eric Carlson.

Hook up the new AVAudioSessionCaptureDeviceManager class to CoreAudioCaptureSource and to the (increasingly ill-named)
RealtimeMediaSourceCenterMac.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::create):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture):

2:19 PM Changeset in webkit [216028] by jdiggs@igalia.com
  • 9 edits in trunk

[ATK] Expose values of aria-rowcount, aria-colcount, aria-rowindex, aria-colindex, aria-rowspan, and aria-colspan as object attributes
https://bugs.webkit.org/show_bug.cgi?id=171496

Reviewed by Chris Fleizach.

Source/WebCore:

Expose valid, author-provided values as an object attribute. In order to distinguish
author-provided values from the default returned by WebCore Accessibility (1), change
the default return value to -1. We cannot return 0 because the ARIA spec states that
0 is a valid value for authors to provide to indicate that the cell spans the remaining
rows in the row group.

Also removed some legacy code. The "layout-guess" attribute was needed and expected
as a way for AT-SPI2-based assistive technologies to identify layout tables. WebCore
Accessibility does not expose tables which are purely for layout as accessible tables,
and WebKitGtk uses that implementation, thus this attribute is no longer relevant.

No new tests. Unskipped existing test which is now passing.

  • accessibility/AccessibilityARIAGridCell.cpp:

(WebCore::AccessibilityARIAGridCell::ariaRowSpanWithRowIndex):
(WebCore::AccessibilityARIAGridCell::columnIndexRange):

  • accessibility/AccessibilityTableCell.cpp:

(WebCore::AccessibilityTableCell::ariaColumnSpan):
(WebCore::AccessibilityTableCell::ariaRowSpan):

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

(webkitAccessibleGetAttributes):

Tools:

Add new attribute names so that the values of the object attributes can be tested.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::numberAttributeValue):

LayoutTests:

  • platform/gtk/TestExpectations: Unskip accessibility/aria-table-attributes.html
2:17 PM Changeset in webkit [216027] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Air::fixObviousSpills should remove totally redundant instructions
https://bugs.webkit.org/show_bug.cgi?id=171131

Reviewed by Saam Barati.

This is a modest compile-time-neutral improvement to fixObviousSpills. That phase
builds up a classic alias analysis data structure over spills and registers and then
uses it to remove the most common spill pathologies we encounter. For example, if you
use a spill but the spill is aliased to a register or constant, then we can replace the
use of the spill with a use of the register or constant.

But that phase was missing perhaps one of the most obvious fixups that its analysis
allows us to do: if any instruction creates an alias we already know about, then the
instruction is redundant. This turned out to be super important for
https://bugs.webkit.org/show_bug.cgi?id=171075. That patch didn't work out, but this
kind of optimization might be a good clean-up for many other kinds of optimizations.

  • b3/air/AirFixObviousSpills.cpp:
2:15 PM Changeset in webkit [216026] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/visual-viewport/rtl-zoomed-rects.html for mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171500

Unreviewed test gardening.

  • platform/mac-wk1/fast/visual-viewport/rtl-zoomed-rects-expected.txt:
2:13 PM Changeset in webkit [216025] by Ryan Haddad
  • 8 edits in trunk/LayoutTests

Rebaselined fast/visual-viewport/ tests.
https://bugs.webkit.org/show_bug.cgi?id=171500

Unreviewed test gardening.

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

  • platform/ios-wk2/fast/visual-viewport/nonzoomed-rects-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rtl-nonzoomed-rects-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rtl-zoomed-rects-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/zoomed-fixed-expected.txt: Added.
  • platform/ios-wk2/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt: Added.
  • platform/ios-wk2/fast/visual-viewport/zoomed-rects-expected.txt:
2:06 PM Changeset in webkit [216024] by jer.noble@apple.com
  • 7 edits
    1 move in trunk/Source/WebCore

Add audio device change notifications to AudioSession.
https://bugs.webkit.org/show_bug.cgi?id=171403

Reviewed by Eric Carlson.

Add notifications to AudioSession which fire when the current input and output audio devices
change. Also add a notification when audio services are lost (which will only fire on iOS).
Take this opportunity to make the existing hardwareMutedStateDidChange() notification be
platform agnostic, to move the outputDeviceSupportsLowPowerMode() code from AudioHardwareListener,
and to do a few more clean-ups of the AudioSession code.

  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):

  • html/HTMLMediaElement.h:
  • platform/audio/AudioSession.cpp:

(WebCore::AudioSession::AudioSession):

  • platform/audio/AudioSession.h:

(WebCore::AudioSession::Observer::hardwareMutedStateDidChange):
(WebCore::AudioSession::Observer::audioInputDeviceChanged):
(WebCore::AudioSession::Observer::audioOutputDeviceChanged):
(WebCore::AudioSession::Observer::audioServicesLost):
(WebCore::AudioSession::Observer::audioServicesReset):
(WebCore::AudioSession::MutedStateObserver::~MutedStateObserver): Deleted.

  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSessionPrivate::AudioSessionPrivate):
(WebCore::AudioSession::AudioSession):
(WebCore::AudioSession::setCategoryOverride):
(WebCore::AudioSession::categoryOverride):
(WebCore::AudioSession::isMuted):
(WebCore::AudioSession::outputDeviceSupportsLowPowerMode):
(WebCore::AudioSession::addObserver):
(WebCore::AudioSession::removeObserver):

  • platform/audio/mac/AudioSessionMac.mm: Renamed from Source/WebCore/platform/audio/mac/AudioSessionMac.cpp.

(WebCore::defaultDevice):
(WebCore::AudioSessionPrivate::AudioSessionPrivate):
(WebCore::AudioSession::AudioSession):
(WebCore::AudioSession::~AudioSession):
(WebCore::AudioSession::category):
(WebCore::AudioSession::setCategory):
(WebCore::AudioSession::categoryOverride):
(WebCore::AudioSession::setCategoryOverride):
(WebCore::AudioSession::sampleRate):
(WebCore::AudioSession::bufferSize):
(WebCore::AudioSession::numberOfOutputChannels):
(WebCore::AudioSession::tryToSetActive):
(WebCore::AudioSession::preferredBufferSize):
(WebCore::AudioSession::setPreferredBufferSize):
(WebCore::AudioSession::isMuted):
(WebCore::currentDeviceSupportsLowPowerBufferSize):
(WebCore::AudioSession::outputDeviceSupportsLowPowerMode):
(WebCore::AudioSession::addObserver):
(WebCore::AudioSession::removeObserver):

1:40 PM Changeset in webkit [216023] by Chris Dumez
  • 3 edits
    2 adds in trunk

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

Reviewed by Andreas Kling.

Source/WebCore:

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

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

  • dom/Document.cpp:

(WebCore::Document::implicitClose):

LayoutTests:

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

  • fast/dom/domparser-parsefromstring-svg-load-event-expected.txt: Added.
  • fast/dom/domparser-parsefromstring-svg-load-event.html: Added.
11:50 AM Changeset in webkit [216022] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip editing/execCommand/show-modal-dialog-during-execCommand.html on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171501

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:45 AM Changeset in webkit [216021] by Ryan Haddad
  • 4 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html after r215956.

Unreviewed test gardening.

  • 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:
11:09 AM Changeset in webkit [216020] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Tweak how long we allow a process to go over its background CPU limit
https://bugs.webkit.org/show_bug.cgi?id=170460
<rdar://problem/31433141>

Reviewed by Geoffrey Garen.

Tweak how long we allow a process to go over its background CPU limit. We now use 8 minutes
intervals (instead of previously 15). This is less conservative and aligned with our memory
kills.

  • WebProcess/cocoa/WebProcessCocoa.mm:
11:08 AM Changeset in webkit [216019] by Chris Dumez
  • 31 edits in trunk/Source

Remove some usage of PassRefPtr in editing code
https://bugs.webkit.org/show_bug.cgi?id=171490

Reviewed by Darin Adler.

Source/WebCore:

Remove some usage of PassRefPtr in editing code.

  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::markersInRange):
(DocumentMarkerController::hasMarkers):
(DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):

  • dom/DocumentMarkerController.h:
  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::isSpellingMarkerAllowed):
(WebCore::AlternativeTextController::show):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
(WebCore::AlternativeTextController::recordAutocorrectionResponse):
(WebCore::AlternativeTextController::markReversed):
(WebCore::AlternativeTextController::markCorrection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::applyDictationAlternative):

  • editing/AlternativeTextController.h:

(WebCore::AlternativeTextController::UNLESS_ENABLED):

  • editing/ApplyStyleCommand.cpp:

(WebCore::createFontElement):
(WebCore::createStyleSpanElement):
(WebCore::ApplyStyleCommand::ApplyStyleCommand):
(WebCore::copyStyleOrCreateEmpty):
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun):
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
(WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
(WebCore::ApplyStyleCommand::removeInlineStyle):
(WebCore::ApplyStyleCommand::shouldSplitTextElement):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
(WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyleChange):

  • editing/ApplyStyleCommand.h:

(WebCore::ApplyStyleCommand::create):
(WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::applyCommandToComposite):
(WebCore::CompositeEditCommand::applyStyledElement):
(WebCore::CompositeEditCommand::removeStyledElement):
(WebCore::CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes):
(WebCore::CompositeEditCommand::inputText):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
(WebCore::CompositeEditCommand::pushAnchorElementDown):

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

(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):

  • editing/DictationCommand.cpp:

(WebCore::DictationCommand::insertTextRunWithoutNewlines):

  • editing/EditingStyle.cpp:

(WebCore::copyEditingProperties):
(WebCore::copyPropertiesFromComputedStyle):
(WebCore::extractPropertyValue):
(WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
(WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
(WebCore::EditingStyle::setStyle):
(WebCore::EditingStyle::copy):
(WebCore::EditingStyle::extractAndRemoveBlockProperties):
(WebCore::EditingStyle::extractAndRemoveTextDirection):
(WebCore::EditingStyle::mergeInlineStyleOfElement):
(WebCore::extractEditingProperties):
(WebCore::EditingStyle::styleAtSelectionStart):
(WebCore::getPropertiesNotIn):

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

(WebCore::Editor::handleTextEvent):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::insertOrderedList):
(WebCore::Editor::insertUnorderedList):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::changeBackToReplacedString):
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::rangeForPoint):

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

(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):

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

(WebCore::SpellChecker::requestCheckingFor):
(WebCore::SpellChecker::didCheckSucceed):

  • editing/SpellChecker.h:

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

  • editing/SpellingCorrectionCommand.cpp:

(WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
(WebCore::SpellingCorrectionCommand::willApplyCommand):
(WebCore::SpellingCorrectionCommand::doApply):
(WebCore::SpellingCorrectionCommand::targetRanges):

  • editing/SpellingCorrectionCommand.h:

(WebCore::SpellingCorrectionCommand::create):

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

(WebCore::TextCheckingParagraph::expandRangeToNextEnd):
(WebCore::TextCheckingParagraph::rangeLength):
(WebCore::TextCheckingParagraph::paragraphRange):
(WebCore::TextCheckingParagraph::subrange):
(WebCore::TextCheckingParagraph::offsetTo):
(WebCore::TextCheckingParagraph::offsetAsRange):
(WebCore::TextCheckingParagraph::text):
(WebCore::TextCheckingParagraph::checkingStart):

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

(WebCore::TypingCommand::insertTextRunWithoutNewlines):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverterCaches::computedStylePropertyForElement):
(HTMLConverterCaches::inlineStylePropertyForElement):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::interpretationsForCurrentRoot):

Source/WebKit/ios:

  • WebCoreSupport/WebFrameIOS.mm:

(-[WebFrame previousUnperturbedDictationResultBoundaryFromPosition:]):
(-[WebFrame nextUnperturbedDictationResultBoundaryFromPosition:]):

Source/WebKit/mac:

  • WebView/WebFrame.mm:

(-[WebFrame dictationResultMetadataForRange:]):
(-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):

10:36 AM Changeset in webkit [216018] by Beth Dakin
  • 8 edits in trunk

On-screen panel for candidate bar is in the wrong place when the caret is at the
start of a paragraph
https://bugs.webkit.org/show_bug.cgi?id=171453
-and corresponding-
rdar://problem/29779764

Reviewed by Tim Horton.

Source/WebKit/mac:

This bug only happens when the caret is at the beginning of the paragraph, and it
is because Range::absoluteTextQuads() returns no quads in this case. I think it
might be correct that absoluteTextQuads() returns no quads in this case, so this
patch fixes the bug at the call site by using absoluteCaretBounds() in this case.

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::handleRequestedCandidates):

Source/WebKit2:

This bug only happens when the caret is at the beginning of the paragraph, and it
is because Range::absoluteTextQuads() returns no quads in this case. I think it
might be correct that absoluteTextQuads() returns no quads in this case, so this
patch fixes the bug at the call site by using absoluteCaretBounds() in this case.

SPI for testing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _candidateRect]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Bug fix.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::platformEditorState):

Tools:

This test hard-codes the y-coordinate for the expected candidateRect.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewCandidateTests.mm:

(TEST):

10:06 AM Changeset in webkit [216017] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style: Enable sprintf(), strcat(), strcpy() and printf() format checks
<https://webkit.org/b/171494>

Reviewed by Brent Fulgham.

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

(check_language): Change categories for certain checkers from
'runtime/printf' to 'security/printf' so they are no longer
filtered.
(CppChecker.categories): Add 'security/printf'.

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

(CppStyleTest.test_insecure_string_operations): Add new test for
sprintf(), strcat() and strcpy().
(CppStyleTest.test_format_strings): Update test results for new
'security/printf' category use.

10:06 AM Changeset in webkit [216016] by jer.noble@apple.com
  • 6 edits
    5 adds in trunk/Source/WebCore

Add notifications from CaptureDeviceManager (and subclasses) when device lists change
https://bugs.webkit.org/show_bug.cgi?id=171442

Reviewed by Youenn Fablet.

Add a new callback-based notification to CaptureDeviceManager which fires when the underlying list
of devices changes. Add support for enumerating AVAudioSession capture devices.

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

(nextObserverToken):
(CaptureDeviceManager::addCaptureDeviceChangedObserver):
(CaptureDeviceManager::removeCaptureDeviceChangedObserver):

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.h: Added.
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm: Added.

(WebCore::AVAudioSessionCaptureDevice::create):
(WebCore::AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h: Added.
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm: Added.

(-[WebAVAudioSessionAvailableInputsListener initWithCallback:]):
(-[WebAVAudioSessionAvailableInputsListener invalidate]):
(-[WebAVAudioSessionAvailableInputsListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::AVAudioSessionCaptureDeviceManager::singleton):
(WebCore::AVAudioSessionCaptureDeviceManager::captureDevices):
(WebCore::AVAudioSessionCaptureDeviceManager::audioSessionCaptureDevices):
(WebCore::AVAudioSessionCaptureDeviceManager::audioSessionDeviceWithUID):
(WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices):

  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::deviceConnected):
(WebCore::AVCaptureDeviceManager::deviceDisconnected):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::devicesChanged):

9:58 AM Changeset in webkit [216015] by jdiggs@igalia.com
  • 4 edits in trunk

AX: [GTK] Add support to query for aria-current
https://bugs.webkit.org/show_bug.cgi?id=149016

Reviewed by Chris Fleizach.

Tools:

Implement support for "AXARIACurrent" string attribute value.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

  • platform/gtk/TestExpectations: Unskip now-passing test.
9:11 AM Changeset in webkit [216014] by dbates@webkit.org
  • 2 edits in trunk/Source/WTF

Cleanup: Change ASCIICaseInsensitiveHash from a class to a struct
https://bugs.webkit.org/show_bug.cgi?id=171460

Reviewed by Sam Weinig.

All of the members of ASCIICaseInsensitiveHash have public visibility.
We are underutilizing the purpose of a class - defaults to private
visibility of members. We should change ASCIICaseInsensitiveHash from
a class to a struct, which by definition defaults to public visibility
for members.

  • wtf/text/StringHash.h:
6:10 AM Changeset in webkit [216013] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r216000): test-webkitpy fails after adding new soft-linked class checker

Unreviewed.

Follow-up fix for:
[Cocoa] Have check-webkit-style advise against use of [get…Class() alloc]
https://bugs.webkit.org/show_bug.cgi?id=171486

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

(check_soft_link_class_alloc): Use (\w+) instead of ([\s]+) to
match and capture the function name. The latter also mistakenly
matches C-preprocessor directives.
(CppChecker.categories): Add 'runtime/soft-linked-alloc', which
is a requirement for the CppChecker class.

1:41 AM Changeset in webkit [216012] by Carlos Garcia Campos
  • 3 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline giantRowspan tests after r215914.

  • platform/gtk/fast/table/giantRowspan-expected.txt:
  • platform/gtk/fast/table/giantRowspan2-expected.txt:
1:39 AM Changeset in webkit [216011] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of several test.

  • platform/gtk/TestExpectations:
1:07 AM Changeset in webkit [216010] by Carlos Garcia Campos
  • 1 edit
    10 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline several WPT fetch API tests.

  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.any.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt: Added.
12:56 AM Changeset in webkit [216009] by jdiggs@igalia.com
  • 5 edits in trunk

AX: AccessibilityTable::ariaRowCount() and ariaColumnCount() should not return -1 unless that is the author-provided value
https://bugs.webkit.org/show_bug.cgi?id=171475

Reviewed by Chris Fleizach.

Source/WebCore:

If the author has provided a valid value, return it. Otherwise, return 0.

No new tests needed. Update existing test expectations to reflect the change.

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::ariaColumnCount):
(WebCore::AccessibilityTable::ariaRowCount):

LayoutTests:

  • accessibility/table-detection-expected.txt: Updated.
  • accessibility/table-with-rules-expected.txt: Updated.
12:53 AM Changeset in webkit [216008] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of several test.

  • platform/gtk/TestExpectations:
12:49 AM Changeset in webkit [216007] by jdiggs@igalia.com
  • 19 edits in trunk

AX: Implement support for ARIA "figure" and "term" roles; update AXRoleDescription mapping for "feed" role
https://bugs.webkit.org/show_bug.cgi?id=171183

Reviewed by Chris Fleizach.

Source/WebCore:

Create FeedRole, FigureRole, and TermRole and map them on the Mac and Gtk
ports. Also rename AccessibilityObject::isFigure() to isFigureElement()
for clarity as this method is specific to the HTML element and not the role.

No new tests needed: We have existing tests that cover mappings. Add new test cases
to roles-exposed.html, xml-roles-exposed.html, and roles-computedRoleString.html.

  • English.lproj/Localizable.strings:
  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::captionForFigure):
(WebCore::AccessibilityNodeObject::alternativeText):

  • accessibility/AccessibilityObject.cpp:

(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::isFigureElement): Added.
(WebCore::AccessibilityObject::isFigure): Deleted.

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

(WebCore::AccessibilityRenderObject::exposesTitleUIElement):
(WebCore::AccessibilityRenderObject::titleUIElement):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

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

  • platform/LocalizedStrings.cpp:

(WebCore::AXFeedText):

  • platform/LocalizedStrings.h:

LayoutTests:

New test cases added and expectations updated.

  • accessibility/gtk/xml-roles-exposed-expected.txt:
  • accessibility/gtk/xml-roles-exposed.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:
12:03 AM Changeset in webkit [216006] by Carlos Garcia Campos
  • 17 edits
    4 adds in trunk

[GTK] Add automation session API
https://bugs.webkit.org/show_bug.cgi?id=171428

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore/platform/gtk/po:

  • POTFILES.in: Add WebKitAutomationSession.cpp.

Source/WebKit2:

Add new API to allow WebKitGTK+ to be controlled by automation. By default it's disabled, applications have to
explicitly call webkit_web_context_set_automation_allowed() to enabled it. When a new automation session is
requested, the signal WebKitWebContext::automation-started is emitted with a newly created
WebKitAutomationSession, similar to how WebKitWebContext::download-started works. The user should connect to it
have access to the WebKitAutomationSession and connect it its signals. When a new web view is requested to be
created in a WebKitAutomationSession, the signal WebKitAutomationSession::create-web-view is emitted. The user
should connect to it and return a WebKitWebView. The web views used for automation are special ones and need to
be created with the new WebKitWebView:is-controlled-by-automation construct property enabled, otherwise we will
refuse to create the requested browsing context.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitAutomationSession.cpp: Added.

(webkitAutomationSessionSetProperty):
(webkitAutomationSessionConstructed):
(webkit_automation_session_class_init):
(webkitAutomationSessionCreate):
(webkitAutomationSessionGetSession):
(webkit_automation_session_get_id):

  • UIProcess/API/gtk/WebKitAutomationSession.h: Added.
  • UIProcess/API/gtk/WebKitAutomationSessionPrivate.h: Added.
  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_class_init):
(webkit_web_context_is_automation_allowed):
(webkit_web_context_set_automation_allowed):
(webkitWebContextCreatePageForWebView):

  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewConstructed):
(webkitWebViewSetProperty):
(webkitWebViewGetProperty):
(webkit_web_view_class_init):
(webkit_web_view_is_controlled_by_automation):

  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/gtk/webkit2.h:

Tools:

Add an automation mode to MiniBrowser using the new API and add a unit test too.

  • MiniBrowser/gtk/BrowserWindow.c:

(webViewTitleChanged):
(webViewDecidePolicy):
(newTabCallback):
(openPrivateWindow):
(browserWindowFinalize):
(browser_window_init):
(browser_window_get_or_create_web_view_for_automation):

  • MiniBrowser/gtk/BrowserWindow.h:
  • MiniBrowser/gtk/main.c:

(createBrowserTab):
(createWebViewForAutomationCallback):
(automationStartedCallback):
(main):

  • TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
  • TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp: Added.

(testAutomationSessionRequestSession):
(beforeAll):
(afterAll):

12:02 AM Changeset in webkit [216005] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ debug build after r216002.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:

(WebKit::wrapClientRectList):

Note: See TracTimeline for information about the timeline view.