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

Timeline



Apr 5, 2020:

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

Remove code that has no effect from loadURL
https://bugs.webkit.org/show_bug.cgi?id=210029

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-05
Reviewed by Darin Adler.

Remove setDomainForCachePartition from loadURL since it will be
overwritten in DocumentLoader::loadMainResource, this was
introduced by r213126.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

11:02 PM Changeset in webkit [259565] by Ross Kirsling
  • 4 edits in trunk

DLLLauncherMain print to console instead of opening window on fatal error
https://bugs.webkit.org/show_bug.cgi?id=206537

Reviewed by Fujii Hironori.

Source/JavaScriptCore:

  • shell/DLLLauncherMain.cpp:

(fatalError):

Tools:

  • win/DLLLauncher/DLLLauncherMain.cpp:

(fatalError):

9:34 PM Changeset in webkit [259564] by Ross Kirsling
  • 5 edits
    1 add in trunk

JSC shell shouldn't treat NUL as a terminator when printing a JS string
https://bugs.webkit.org/show_bug.cgi?id=210037

Reviewed by Darin Adler.

JSTests:

  • .gitattributes:
  • ChakraCore.yaml:
  • ChakraCore/test/es5/hasItem.baseline-jsc: Added.

Update baseline and mark it diffable (as plaintext) in spite of containing \0.

Source/JavaScriptCore:

Since JS strings aren't null-terminated, it's probably a better experience to not stop printing when we see \0.
That is, 'abc\0def' should be printed as abcdef and not abc.

This patch updates our printing of evaluation results as well as the print / printErr / debug functions.

  • jsc.cpp:

(printInternal):
(functionDebug):
(runInteractive):

9:22 PM Changeset in webkit [259563] by don.olmstead@sony.com
  • 6 edits in trunk

[CMake] Use WEBKIT_EXECUTABLE in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=206894

Reviewed by Adrian Perez de Castro.

.:

Add a MiniBrowser derived sources directory.

  • Source/cmake/WebKitFS.cmake:

Tools:

Modify CMake ports to use WEBKIT_EXECUTABLE when creating their respective
MiniBrowsers.

  • MiniBrowser/gtk/CMakeLists.txt:
  • MiniBrowser/win/CMakeLists.txt:
  • MiniBrowser/wpe/CMakeLists.txt:
9:14 PM Changeset in webkit [259562] by Manuel Rego Casasnovas
  • 11 edits
    2 adds in trunk

Computed style for "outline-offset" is wrong when "outline-style" is "none"
https://bugs.webkit.org/show_bug.cgi?id=209913

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Imported css/css-ui/parsing/outline-offset-computed.html from WPT.
And update baselines for web-animations tests.

  • web-platform-tests/css/css-ui/parsing/outline-offset-computed-expected.txt: Added.
  • web-platform-tests/css/css-ui/parsing/outline-offset-computed.html: Added.
  • web-platform-tests/css/css-ui/parsing/w3c-import.log:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

Source/WebCore:

Computed style for outline-offset was not returning the proper value
if "outline-style" was "none".
This was due to a check in RenderStyle::outlineOffset()
that this patch removes.

This code could be there because this is needed for "outline-width"
as specified in the spec (https://drafts.csswg.org/css-ui/#outline-props),
however there's nothing about this on the "outline-offset" property.

Test: imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::outlineOffset const):

LayoutTests:

Update baselines for web-animations tests.

  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
9:02 PM Changeset in webkit [259561] by Peng Liu
  • 4 edits in trunk/Source/WebCore

The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
https://bugs.webkit.org/show_bug.cgi?id=204979

Reviewed by Darin Adler.

We should use "#if HAVE(AVOBSERVATIONCONTROLLER)" instead of
"#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)".

Source/WebCore:

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):

Source/WebCore/PAL:

  • pal/spi/cocoa/AVKitSPI.h:
8:02 PM Changeset in webkit [259560] by don.olmstead@sony.com
  • 16 edits
    1 copy in trunk

[CMake] Add WebKit::WebKit target
https://bugs.webkit.org/show_bug.cgi?id=210033

Reviewed by Fujii Hironori.

.:

Use SET_AND_EXPOSE_TO_BUILD for the Plugin process since ENABLE(PLUGIN_PROCESS)
is used in the source code.

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit:

Use WEBKIT_EXECUTABLE macros for the Process executables. Rename the output
file names to fit with the macro's expectations.

Add Headers.cmake which lists out all the public headers that are currently
shared by the PlayStation and Windows ports. This is then included on each
platform that is using it. Additionally use WEBKIT_COPY_FILES to create a
target which copies headers.

Finally use WEBKIT_FRAMEWORK_TARGET to create a WebKit target. Its dependent
on the WebKit library itself, the processes being built, and any headers that
are copied. This ensures that everything is built for dependent targets.

  • CMakeLists.txt:
  • Headers.cmake: Copied from Source/WebKit/PlatformPlayStation.cmake.
  • PlatformFTW.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • PlatformPlayStation.cmake:
  • PlatformWPE.cmake:
  • PlatformWin.cmake:

Tools:

Use the WebKit::WebKit target for MiniBrowser and TestWebKit. This removes
the need to have WebProcess and NetworkProcess as dependencies since they are
attached to the WebKit::WebKit target.

Remove references to WebKitFrameworkHeaders as it is now WebKit_CopyHeaders.
It is also a dependency of WebKit::WebKit so it does not need to be listed
as a dependency.

  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformPlayStation.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • WebKitTestRunner/CMakeLists.txt:
5:28 PM Changeset in webkit [259559] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Address review comments after r259550
https://bugs.webkit.org/show_bug.cgi?id=208472

Reviewed by Darin Adler.

  • platform/ios/ValidationBubbleIOS.mm:

Change a few named constants to be constexpr instead, and add comments describing their purpose.

(label):
(updateLabelFrame):

Rename these helper functions and move them up the file. Turn what was previously named
WebValidationBubbleViewController_labelFrame into updateLabelFrame, and have it additionally update the
view controller's label's frame to avoid repeating this logic in the subclassed method implementations below.

(callSuper):
(WebValidationBubbleViewController_viewDidLoad):
(WebValidationBubbleViewController_viewWillLayoutSubviews):
(WebValidationBubbleViewController_viewSafeAreaInsetsDidChange):
(allocWebValidationBubbleViewControllerInstance):

Instead of using -valueForKey, use objc_getAssociatedObject and objc_setAssociatedObject, with
OBJC_ASSOCIATION_RETAIN_NONATOMIC.

(WebCore::ValidationBubble::ValidationBubble):
(invokeUIViewControllerSelector): Deleted.
(WebValidationBubbleViewController_dealloc): Deleted.

Remove the -dealloc override. We don't need this anymore, since we're now using associated objects with
OBJC_ASSOCIATION_RETAIN_NONATOMIC to hold on to and keep track of our label.

(WebValidationBubbleViewController_labelFrame): Deleted.
(WebValidationBubbleViewController_label): Deleted.

4:25 PM Changeset in webkit [259558] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Putting "memory" back to ensureStillAliveHere
https://bugs.webkit.org/show_bug.cgi?id=210028

Reviewed by Keith Miller.

We put "memory" back to make ensureStillAliveHere compiler-barrier.

  • runtime/EnsureStillAliveHere.h:

(JSC::ensureStillAliveHere):

  • runtime/JSCJSValue.h:

(JSC::ensureStillAliveHere):

4:23 PM Changeset in webkit [259557] by Simon Fraser
  • 8 edits in trunk/Source/WebCore

Make RenderObject TextStream-loggable
https://bugs.webkit.org/show_bug.cgi?id=210035

Reviewed by Zalan Bujtas.

Add operator<<(TextStream, const RenderObject&) and add virtual debugDescription() functions on
Node and RenderObject which should eventually replace the awkward formatForDebugger(char* buffer, unsigned length).

Convert RenderLayer to use renderer's debug description.

  • dom/Element.cpp:

(WebCore::Element::debugDescription const):

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

(WebCore::Node::debugDescription const):
(WebCore::operator<<):

  • dom/Node.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::name const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::debugDescription const):
(WebCore::operator<<):

  • rendering/RenderObject.h:
3:59 PM Changeset in webkit [259556] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

ARM64 moveConditionallyDouble() for DoubleNotEqualAndOrdered is wrong.
https://bugs.webkit.org/show_bug.cgi?id=210039
<rdar://problem/61321778>

Reviewed by Yusuke Suzuki.

For the scenario where the dest register is same as the then case register, there
is one csel instruction that should be checking the overflow condition to test
for unordered operands. Instead, we were testing for the not equal condition.
This patch fixes it to check for the overflow condition.

This bug was caught by testmasm.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):

3:01 PM Changeset in webkit [259555] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Sort JavaScriptCore Xcode project file

file to try to force buildbots to rebuild and resign
JavaScriptCore.framework. Some bots are stuck with a codesign
error after r259545.

11:23 AM Changeset in webkit [259554] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

ensureStillAliveHere can take the value in any location
https://bugs.webkit.org/show_bug.cgi?id=210028

Reviewed by Mark Lam.

It shouldn't matter if the value is on the stack or in a register
because we're not going to do anything with it. Also, there's no
reason to clobber memory.

  • runtime/EnsureStillAliveHere.h:

(JSC::ensureStillAliveHere):

11:21 AM Changeset in webkit [259553] by zandobersek@gmail.com
  • 9 edits in trunk/Source

Unreviewed, adding missing header inclusions to get
non-unified build building.

Source/JavaScriptCore:

  • heap/HeapSnapshotBuilder.h:
  • tools/Integrity.h:

Source/WebCore:

  • html/HTMLCanvasElement.cpp:
  • loader/ResourceLoadNotifier.h:
  • workers/service/ServiceWorkerProvider.h:

Source/WebKit:

  • Shared/UserContentControllerParameters.cpp:
11:11 AM Changeset in webkit [259552] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Change s_entropyBitsShiftForStructurePointer to 48 bits.
https://bugs.webkit.org/show_bug.cgi?id=210022
<rdar://problem/61310696>

Reviewed by Keith Miller.

This is ok because the top 16 bits of the 64-bit address is not used. We can
fill out the top 16-bits of the encodedStructureBits with the lowest 16-bits of
the StructureID (which includes the 7-bits of entropy).

  • runtime/StructureIDTable.h:
9:49 AM Changeset in webkit [259551] by dbates@webkit.org
  • 4 edits in trunk/Tools

RequestTextInputContext.Simple iframe sub-tests may sometimes fail
https://bugs.webkit.org/show_bug.cgi?id=210010
<rdar://problem/61303697>

Reviewed by Simon Fraser and Darin Adler.

Make the iframe sub tests wait until the DOM Load event has fired in the main frame.
When it fires this means that all immediate child frames (like the one added by these
sub tests) have fired their DOM Load event. This ensures deterministic results.

Also while I am here, extract out the iframe sub-tests into their own TEST() method
for testing and debugging convenience. I also fixed up -performAfterLoading so that
it wouldn't leak the user script string and made it work if called more than once in the
same TEST() by caching this script and only adding it to the user content controller
once. Moreover, removed duplication by writing it in terms of -performAfterReceivingMessage.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(TEST):
(webViewLoadHTMLStringAndWaitForDOMLoadEvent): Helper function to load an HTML string
into a web view and wait until a DOM Load event is fired at the main frame.

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView performAfterLoading:]): Modernized and simplified. Modified user script
to use addEventListener() instead of onload as the latter overrides any existing load handler.
This user script is also added only to the main frame since all existing callers just
want to know that all main frame and immediate child frames loaded. Also listen for the load
event during the capture phase, which is a tiny bit faster to receive, instead of the bubbling
phase. See second paragraph above for more details on the changes I made to this function.

9:34 AM Changeset in webkit [259550] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[iOS] Ugly and misaligned form validation bubble
https://bugs.webkit.org/show_bug.cgi?id=208472
<rdar://problem/59984027>

Reviewed by Tim Horton.

In iOS 13, the view of a UIViewController that is presented as a popover encompasses the arrow (connected to
the popover) that points to the target rect. This means that our current logic for laying out the inner text
label of a form validation bubble on iOS no longer works, since it sets a frame that is offset vertically and
horizontally from the bounds of the view controller's view.

To fix this, we need to respect the safe area insets of the view controller's view when laying out the label.
The idiomatic way to do this is to subclass -viewSafeAreaInsetsDidChange and -viewWillLayoutSubviews on the view
controller, and update the subview's (i.e. label's) frame; unfortunately, since ValidationBubble is implemented
in WebCore, we can't explicitly link against UIKit, so we need to dynamically create a UIViewController subclass
and override these subclassing hooks to get our desired behavior.

  • platform/ValidationBubble.h:
  • platform/ios/ValidationBubbleIOS.mm:

(invokeUIViewControllerSelector):
(WebValidationBubbleViewController_dealloc):
(WebValidationBubbleViewController_viewDidLoad):
(WebValidationBubbleViewController_viewWillLayoutSubviews):
(WebValidationBubbleViewController_viewSafeAreaInsetsDidChange):
(WebValidationBubbleViewController_labelFrame):
(WebValidationBubbleViewController_label):
(allocWebValidationBubbleViewControllerInstance):

Subclass and create a custom UIViewController to ensure that the label is vertically centered in its popover.
See above for more details.

(WebCore::ValidationBubble::ValidationBubble):
(WebCore::ValidationBubble::show):

Minor style fixes: remove extraneous .get()s on RetainPtr, and use property syntax when possible.

(WebCore::ValidationBubble::setAnchorRect):

Additionally remove a line of code that currently forces the form validation popover to present below its target
rect (and therefore have an arrow pointing up). It wasn't apparent why this logic was added in r208361, but it
seems the intention wasn't to restrict the popover to presenting below the target.

This allows the form validation popover to show up in the case where the input element is aligned to the very
bottom of the web view, such that there isn't enough space below the field to show the validation bubble.

1:59 AM Changeset in webkit [259549] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] JSArrayIterator's size is wrong
https://bugs.webkit.org/show_bug.cgi?id=210020

Reviewed by Mark Lam.

Internal-size of JSArrayIterator should be 3, not 4.

  • runtime/JSArrayIterator.h:
1:41 AM Changeset in webkit [259548] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Rolling out r259545: causing CodeSigning error in jsc EWS bot.
https://bugs.webkit.org/show_bug.cgi?id=210018

Not reviewed.

1:34 AM Changeset in webkit [259547] by mark.lam@apple.com
  • 24 edits
    2 adds in trunk/Source/JavaScriptCore

Add some structureID integrity checks to various runtime functions.
https://bugs.webkit.org/show_bug.cgi?id=210015
<rdar://problem/58116514>

Reviewed by Keith Miller.

Specifically, implementations of toString(), toValue(), and a few others.
I also moved the HeapCell version of ensureStillAliveHere() into the new
EnsureStillAliveHere.h/cpp since it's useful for any pointers, not just HeapCells.

This change is performance neutral on JetStream 2.0, Speedometer-2, and PLT5.

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

(JSC::ensureStillAliveHere): Deleted.

  • heap/HeapCell.h:

(JSC::ensureStillAliveHere): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToString):

  • runtime/BigIntPrototype.cpp:

(JSC::bigIntProtoFuncToStringImpl):
(JSC::bigIntProtoFuncValueOf):

  • runtime/BooleanPrototype.cpp:

(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):

  • runtime/DatePrototype.cpp:

(JSC::formatLocaleDate):
(JSC::formateDateInstance):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToPrimitiveSymbol):

  • runtime/EnsureStillAliveHere.cpp: Added.

(JSC::ensureStillAliveHere):

  • runtime/EnsureStillAliveHere.h: Added.

(JSC::ensureStillAliveHere):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedToString):

  • runtime/ErrorPrototype.cpp:

(JSC::errorProtoFuncToString):

  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncToString):

  • runtime/JSCell.cpp:

(JSC::JSCell::toObjectSlow const):

  • runtime/NumberPrototype.cpp:

(JSC::toThisNumber):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncToString):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncToString):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncToString):

  • runtime/StructureIDTable.h:

(JSC::StructureIDTable::validate):
(JSC::StructureIDTable::isValid): Deleted.

  • runtime/SymbolPrototype.cpp:

(JSC::symbolProtoGetterDescription):
(JSC::symbolProtoFuncToString):
(JSC::symbolProtoFuncValueOf):

  • tools/Integrity.h:
  • tools/IntegrityInlines.h:

(JSC::Integrity::auditStructureID):

  • wasm/js/WebAssemblyGlobalPrototype.cpp:

(JSC::getGlobal):

1:12 AM Changeset in webkit [259546] by Alexey Shvayka
  • 10 edits in trunk

Octal escapes should be max 3 digits and syntax errors in Unicode patterns
https://bugs.webkit.org/show_bug.cgi?id=167067

Reviewed by Ross Kirsling.

JSTests:

  • test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

This patch:

a) Adds SyntaxError for octal escapes in Unicode patterns, while preserving /\0/u
being parsed as null character escape. Grammar: https://tc39.es/ecma262/#prod-CharacterEscape

b) Limits consumeOctal() to 3 digits only, preventing it from consuming leading zeros.
Grammar: https://tc39.es/ecma262/#prod-annexB-LegacyOctalEscapeSequence

Both changes align JSC with V8 and SpiderMonkey.

  • yarr/YarrErrorCode.cpp:

(JSC::Yarr::errorMessage):
(JSC::Yarr::errorToThrow):

  • yarr/YarrErrorCode.h:
  • yarr/YarrParser.h:

(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::consumeOctal):

LayoutTests:

  • fast/regex/script-tests/pcre-test-1.js:
  • js/regexp-unicode-expected.txt:
  • js/script-tests/regexp-unicode.js:

Apr 4, 2020:

11:17 PM Changeset in webkit [259545] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

copy jsc CLI into JavaScriptCore.framework earlier
https://bugs.webkit.org/show_bug.cgi?id=210018

Reviewed by Mark Lam.

Some of our test scripts only copy the JavaScriptCore.framework
into the test directory and try to run jsc from there. We should
copy the jsc CLI ASAP so we don't need to build all the other test
binaries unless we actually need them.

10:09 PM Changeset in webkit [259544] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Remove LockHistory parameter from loadWithNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=210007

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-04
Reviewed by Darin Adler.

Remove LockHistory parameter from loadWithNavigationAction since NavigationAction
has a member for this. Where needed explicitly set the LockHistory on the actions.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):

  • loader/FrameLoader.h:
9:16 PM Changeset in webkit [259543] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix v2: HTMLFormElement should use WeakPtr to keep track of its FormNamedItem
https://bugs.webkit.org/show_bug.cgi?id=209925

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::elementFromPastNamesMap const):
(WebCore::HTMLFormElement::addToPastNamesMap):

  • Apply macros consistently. Regressed in r259513 and was not fixed by r259527.
8:44 PM Changeset in webkit [259542] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GTK] Update test baseline after r259438 and garden crashes

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/accessibility/menu-list-sends-change-notification-expected.txt:
5:42 PM Changeset in webkit [259541] by Wenson Hsieh
  • 7 edits in trunk

Add a fourth round of logging to help diagnose <webkit.org/b/209685>
https://bugs.webkit.org/show_bug.cgi?id=210011

Reviewed by Darin Adler.

Source/WebCore:

Augment logging in WebItemProviderPasteboard to additionally dump a backtrace when registering item providers
when initiating a drag on iOS. Logging thus far suggests that this is due to an IPC dispatch race when sending
the following messages to the UI process: WebPasteboardProxy::writeCustomData and
WebPasteboardProxy::writeStringToPasteboard. While writeCustomData is dispatched synchronously,
writeStringToPasteboard is dispatched asynchronously; this means that it is possible for the call to
writeCustomData to be dispatched before writeStringToPasteboard even if the web process sends the
writeCustomData message later, due to the UI-process-side mechanism for immediately dispatching incoming sync
IPC if it is currently processing sync IPC itself.

A backtrace here should help to confirm this theory.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard stageRegistrationLists:]):

Source/WebKit:

Remove all logging previously added to WKContentView and DragDropInteractionState.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::clearStagedDragSource):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _didHandleDragStartRequest:]):

Tools:

Remove all logging previously added to DragAndDropSimulator.

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):

5:03 PM Changeset in webkit [259540] by Chris Dumez
  • 20 edits in trunk

[iOS] Simplify ProcessAssertion class in preparation for switch to RunningBoard
https://bugs.webkit.org/show_bug.cgi?id=209984
<rdar://problem/61273941>

Reviewed by Darin Adler.

Source/WebKit:

Simplify ProcessAssertion class in preparation for switch to RunningBoard. There
is a slight mismatch between the way BKS and RunningBoard process assertion API.
This refactoring makes it so that we can use the same ProcessAssertion class in
WebKit to work with either BKS or RunningBoard. Support for RunningBoard will
come later.

In particular, the following changes were made:

  • Replace AssertionState & AssertionReason enums with a single ProcessAssertionType one since RunningBoard does not have 2 separate concepts.
  • Drop ProcessAssertion::setState() since it is not possible to change the flags on an existing RunningBoard assertion. Instead, we are expected to create a brand new process assertion of the expected type.
  • NetworkProcess/Downloads/DownloadMap.cpp:

(WebKit::DownloadMap::add):

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _setAssertionTypeForTesting:]):
(-[WKWebView _setAssertionStateForTesting:]): Deleted.

  • UIProcess/Downloads/DownloadProxyMap.cpp:

(WebKit::DownloadProxyMap::createDownloadProxy):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendProcessDidResume):
(WebKit::NetworkProcessProxy::takeUploadAssertion):
(WebKit::NetworkProcessProxy::didSetAssertionState): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/ProcessAssertion.cpp:

(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState): Deleted.

  • UIProcess/ProcessAssertion.h:

(WebKit::ProcessAssertion::type const):
(WebKit::ProcessAssertion::state const): Deleted.

  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::expectedAssertionType):
(WebKit::ProcessThrottler::updateAssertionTypeNow):
(WebKit::ProcessThrottler::setAssertionType):
(WebKit::ProcessThrottler::updateAssertionIfNeeded):
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::prepareToSuspendTimeoutTimerFired):
(WebKit::ProcessThrottler::processReadyToSuspend):
(WebKit::ProcessThrottler::sendPrepareToSuspendIPC):
(WebKit::ProcessThrottler::expectedAssertionState): Deleted.
(WebKit::ProcessThrottler::updateAssertionStateNow): Deleted.
(WebKit::ProcessThrottler::setAssertionState): Deleted.

  • UIProcess/ProcessThrottler.h:
  • UIProcess/ProcessThrottlerClient.h:

(WebKit::ProcessThrottlerClient::didSetAssertionType):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::setWebProcessHasUploads):
(WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didSetAssertionType):
(WebKit::WebProcessProxy::didSetAssertionState): Deleted.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::setAssertionTypeForTesting):
(WebKit::WebProcessProxy::setAssertionStateForTesting): Deleted.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::flagsForAssertionType):
(WebKit::toBKSProcessAssertionReason):
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount):
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
(WebKit::flagsForState): Deleted.
(WebKit::reasonForState): Deleted.
(WebKit::ProcessAssertion::setState): Deleted.
(WebKit::ProcessAndUIAssertion::setState): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
4:44 PM Changeset in webkit [259539] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebKit

[GPUP] Remove unnecessary RemoteCDMInstanceSessionIdentifier argument from RemoteCDMFactory::addSession()
<https://webkit.org/b/210006>

Reviewed by Darin Adler.

  • WebProcess/GPU/media/RemoteCDMFactory.cpp:

(WebKit::RemoteCDMFactory::addSession):

  • Remove argument. Use session parameter to retrieve the ID.
  • WebProcess/GPU/media/RemoteCDMFactory.h:

(WebKit::RemoteCDMFactory::addSession):

  • Remove argument.
  • WebProcess/GPU/media/RemoteCDMInstance.cpp:

(WebKit::RemoteCDMInstance::createSession):

  • Remove argument.
3:39 PM Changeset in webkit [259538] by Doug Kelly
  • 2 edits in trunk/Source/WebCore

Additional sanity checks in compareAnimationsByCompositeOrder()
https://bugs.webkit.org/show_bug.cgi?id=209996

Reviewed by Geoffrey Garen.

compareAnimationsByCompositeOrder() is used by std::sort() which requires strict weak ordering.
This adds additional checks to ensure strict weak ordering is maintained, first by ensuring
the transitionProperty string is different before returning that comparison, then by only using
if the animation is a CSSTransition or CSSAnimation if the left hand and right hand sides differ.
This should leave all remaining cases to sort by the global animation list.

No new tests; this should be covered by existing tests and should not change functionality
otherwise.

  • animation/WebAnimationUtilities.cpp:

(WebCore::compareAnimationsByCompositeOrder):

2:42 PM Changeset in webkit [259537] by Fujii Hironori
  • 3 edits in trunk/Source/WTF

[Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in WTF
https://bugs.webkit.org/show_bug.cgi?id=209955

Reviewed by Darin Adler.

Clang 10 reports a compilation warning for int to float
conversions losing the precision. The warning is often reported
for code converting a floating point value to an integer value.
For example:

Optional<int> positive_float_to_int(float f) {

if (f > INT_MAX)

return nullopt;

return static_cast<int>(f);

}

INT_MAX is implicitly converted float, but float can't keep the
precision of such large value. And, C++ spec doesn't specify
whether it would be rounded up or down. Above code should be
rewritten to:

Optional<int> positive_float_to_int(float f) {

if (f >= pow(2, 31))

return nullopt;

return static_cast<int>(f);

}

Instead of using pow, this change added a template variable
maxPlusOne<T>.

  • wtf/MathExtras.h:

(powerOfTwo): Added.
(doubleToInteger): Added.
(maxPlusOne): Added.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):

12:36 PM Changeset in webkit [259536] by Alexey Shvayka
  • 10 edits in trunk

'\u' should throw an early SyntaxError exception, but instead evaluates to 'u'
https://bugs.webkit.org/show_bug.cgi?id=198790

Reviewed by Yusuke Suzuki.

JSTests:

  • mozilla/ecma/Array/15.4.5.1-1.js:
  • mozilla/ecma/LexicalConventions/7.7.4.js:
  • test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

This change removes special-case for '\u', invoking parseUnicodeEscape() right away,
aligning string literals with ES6 template literals. parseComplexEscape() method
signature is greatly simplified, JSC is aligned with V8 and SpiderMonkey.

Grammar: https://tc39.es/ecma262/#prod-UnicodeEscapeSequence
(Hex4Digits or '{' is required, otherwise parsing fails)

  • parser/Lexer.cpp:

(JSC::Lexer<T>::parseComplexEscape):
(JSC::Lexer<T>::parseStringSlowCase):
(JSC::Lexer<T>::parseTemplateLiteral):

  • parser/Lexer.h:

LayoutTests:

  • js/script-tests/unicode-escape-sequences.js:
  • js/unicode-escape-sequences-expected.txt:
11:56 AM Changeset in webkit [259535] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, skip stress/typed-array-subarray-can-throw-oom-error.js on memory-limited archs, and mark it slow
https://bugs.webkit.org/show_bug.cgi?id=209974

  • stress/typed-array-subarray-can-throw-oom-error.js:
11:52 AM Changeset in webkit [259534] by Wenson Hsieh
  • 7 edits in trunk

Add even more logging to try and diagnose <webkit.org/b/209685>
https://bugs.webkit.org/show_bug.cgi?id=210008

Reviewed by Tim Horton.

Source/WebCore:

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard stageRegistrationLists:]):

Source/WebKit:

Revert all (except one) of the logging statements added in r259518, and add several new ones. This last logging
pass demonstrated that DragController had failed to start a drag, since -[WKContentView _didHandleDragStartRequest:]
receives word that the drag has started, yet there are no staged drag items.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::clearStagedDragSource):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView cleanUpDragSourceSessionState]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:sessionWillBegin:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:canHandleSession:]):
(-[WKContentView dropInteraction:sessionDidEnter:]):
(-[WKContentView dropInteraction:sessionDidExit:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):

Tools:

Replace old logging with new logging (in different places).

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):

Rule out the possibility that the WebKit client (in this case, the drag and drop simulator) is overriding the
list of drag items by logging the given NSItemProvider that will be used to start the drag.

11:38 AM Changeset in webkit [259533] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Ahom text is busted
https://bugs.webkit.org/show_bug.cgi?id=209898
<rdar://problem/60571257>

Reviewed by Tim Horton.

https://en.wikipedia.org/wiki/Ahom_language

The Ahom language, U+11700 - U+1173F, requires the complex text codepath.
This patch also makes some languages adjacent in codepoint-space (Dogra,
Dives Akuru, Nandinagari, Zanabazar Square, Soyombo, Warang Citi, and
Pau Cin Hau) use the complex path too.

At some point, we really need to make the fast text codepath opt-in instead
of opt-out. This patch is a simple band-aid fix until we can do that.

No new tests because I can't find an appropriately licenced font.
There is Noto Serif Ahom, but that's licenced under SIL OFL, and I'm
not sure if that's an acceptable license to be committed to WebKit.
https://github.com/googlefonts/noto-fonts/tree/master/hinted/NotoSerifAhom

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::characterRangeCodePath):

11:16 AM Changeset in webkit [259532] by Antti Koivisto
  • 20 edits
    1 copy
    8 deletes in trunk

Implement the css-color-4 behavior for inheritance of currentColor
https://bugs.webkit.org/show_bug.cgi?id=193171
<rdar://problem/47287516>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-text-decor/parsing/text-decoration-color-computed-expected.txt:
  • web-platform-tests/css/css-transitions/currentcolor-animation-001-expected.txt:
  • web-platform-tests/svg/pservers/scripted/stop-color-inheritance-currentcolor-expected.txt:

Source/WebCore:

In CSS3/4 'currentcolor' inherits as 'currentcolor' instead of as a resolved color value.

Value 'currentcolor' is represented in RenderStyle as invalid Color object. This has been true
even before the explicit property value for it was added. Fallback to 'color' has always been
the default behavior of most color properties.

As a result the correct behavior falls pretty easily from WebKit code. It essentially amounts to allowing
color properties to inherit normally even when they are invalid/currentcolor.

In future we might want to wrap RenderStyle color values into a type that makes 'currentcolor' more explicit.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSGradientValue.cpp:

(WebCore::CSSGradientValue::gradientWithStylesResolved):

  • css/CSSProperties.json:
  • Remove 'no-default-color' which triggered to old inheritance behavior.
  • Rename initial value invalidColor to currentColor for clarity.
  • css/makeprop.pl:

Code for 'no-default-color' generation is not needed anymore.

(generateInheritValueSetter):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::colorIncludingFallback const):

Resolve 'background-color' like the rest so setting it to 'currentcolor' works correctly.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::currentColor):
(WebCore::RenderStyle::invalidColor): Deleted.

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::createFilterOperations):
(WebCore::Style::BuilderState::colorFromPrimitiveValue const):

Don't resolve 'currentcolor', instead return it as a value.

(WebCore::Style::BuilderState::colorFromPrimitiveValueWithResolvedCurrentColor const):

Helper for a few cases where we still resolve current color during style building time. It is
used for filters and generated images.

  • style/StyleBuilderState.h:
  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::stopColorIncludingOpacity const):

Resolve 'currentcolor' during use time for svg color stops.

LayoutTests:

  • TestExpectations:
  • fast/borders/border-color-inherit-expected.html: Copied from LayoutTests/fast/borders/border-color-inherit.html.
  • fast/borders/border-color-inherit.html:

Fix for the new behavior and make it a reftest.

  • fast/css/webkit-text-fill-color-inherit.html:
  • platform/gtk/fast/borders/border-color-inherit-expected.png: Removed.
  • platform/gtk/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/ios/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/mac/fast/borders/border-color-inherit-expected.png: Removed.
  • platform/mac/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/win/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/wincairo/fast/borders/border-color-inherit-expected.txt: Removed.
  • platform/wpe/fast/borders/border-color-inherit-expected.txt: Removed.
10:06 AM Changeset in webkit [259531] by Peng Liu
  • 10 edits
    2 adds in trunk

REGRESSION (r259095): ASSERTION FAILED: m_videoFullscreenMode != VideoFullscreenModeNone seen with TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
https://bugs.webkit.org/show_bug.cgi?id=209680

Reviewed by Jer Noble.

Source/WebCore:

API test: WebKitLegacy.PreemptVideoFullscreen

Call fullscreenModeChanged(VideoFullscreenModeNone) right before calling the
functions of ChromeClient to make sure the state (m_videoFullscreenMode)
has the expected value when some callbacks come back to the video element.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::dispatchEvent):
(WebCore::HTMLMediaElement::exitFullscreen):

Add null pointer checkings to fix two crashes found in stress tests.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::requestVideoContentLayer):
(VideoFullscreenControllerContext::returnVideoContentLayer):

Source/WebKitLegacy/mac:

With this patch, the WebKit-Legacy can support multiple video elements request
to enter video fullscreen almost at the same time, and only the last one will succeed.
Also, this patch fixes webkit.org/b/209610 for WebKit-Legacy.

  • WebView/WebView.mm:
  • WebView/WebViewData.h:

Tools:

Add an API test for the video fullscreen support of WebKitLegacy on iOS.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm: Added.

(-[VideoFullscreenStressUIWebViewDelegate webViewDidFinishLoad:]):
(-[VideoFullscreenStressUIWebViewDelegate uiWebView:didCommitLoadForFrame:]):
(-[VideoFullscreenStressUIWebViewDelegate handleEvent:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitLegacy/ios/two-videos.html: Added.

LayoutTests:

Remove the crashing expectation for media/media-fullscreen-return-to-inline.html

  • platform/mac/TestExpectations:
9:14 AM Changeset in webkit [259530] by mark.lam@apple.com
  • 2 edits in trunk/JSTests

Gardening: skip test for ARMv7 and MIPS to green the bots until the failure can be investigated.
https://bugs.webkit.org/show_bug.cgi?id=210003

Not reviewed.

  • stress/typed-array-subarray-can-throw-oom-error.js:
Note: See TracTimeline for information about the timeline view.