Jul 1, 2018:

9:24 PM Changeset in webkit [233415] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

[WTF] RandomDevice should be initialized inside std::call_once

Reviewed by Darin Adler.

While Linux ports uses mutex-guarded static variables, Mac ports do not.
So we should guard static variables' initialization by using std::call_once.
This patch does it for RandomDevice.

  • wtf/OSRandomSource.cpp:


  • wtf/RandomDevice.h: Small fix for OS(FUCHSIA).
7:50 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
7:48 PM WebKitGTK/Gardening/Calendar/2018Logs created by Michael Catanzaro
6:52 PM Changeset in webkit [233414] by Fujii Hironori
  • 4 edits in trunk

[WK2] fast/parser/document-open-in-unload.html makes the following test crash

Reviewed by Ryosuke Niwa.


m_documentLoader can become null in the middle of
FrameLoader::commitProvisionalLoad by stopping the loading.

No new tests (Covered by existing tests).

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad): Do null check of m_documentLoader.


  • platform/wk2/TestExpectations: Unskipped fast/parser/document-open-in-unload.html.
6:36 PM Changeset in webkit [233413] by mmaxfield@apple.com
  • 7 edits
    2 adds in trunk

[Cocoa] LastResort in the font family list causes emoji with joiners to be rendered as multiple .notdef characters

Reviewed by Darin Adler.


Inside our complex text codepath, we perform our own font fallback, which
includes a function that asks "can this font support this grapheme cluster?"
Because of the mechanics of how fonts work, the implementation of this
function is "Does the font's cmap table support every character of the
cluster?" We were using Font::glyphForCharacter() to determine this; however,
this function maps certain control characters to the zero width space
character (with the intention that these control characters shouldn't be
visible in the fast text codepath). That replacement, however, was causing
us to get false negatives, because Apple Color Emoji doesn't support zero
width space. Therefore, Apple Color Emoji was looking like it didn't support
emoji combining sequences.

The best solution to this would be to get Font::glyphForCharacter() to stop
performing these replacements (see https://bugs.webkit.org/show_bug.cgi?id=187166).
However, that is too risky of a change to be making right now. Instead,
a more localized solution is to implement a version of "Does the font's cmap
table support every character of the cluster" that doesn't perform the
substitutions. This patch does exactly that, and uses a bit vector to cache
the results. In order to not have a giant bit vector, we take the old code
path if we know the substitutions won't affect us (and uses ASSERT()s to
validate this) so the bit vector only holds at maximum 3 words of storage.

Test: fast/text/emoji-with-joiner.html

  • platform/graphics/Font.cpp:

(WebCore::Font::platformSupportsCodePoint const):
(WebCore::Font::supportsCodePoint const):
(WebCore::Font::canRenderCombiningCharacterSequence const):

  • platform/graphics/Font.h:
  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::platformSupportsCodePoint const):


  • wtf/unicode/CharacterNames.h:


  • fast/text/emoji-with-joiner-expected.txt: Added.
  • fast/text/emoji-with-joiner.html: Added.
5:47 PM Changeset in webkit [233412] by Wenson Hsieh
  • 19 edits
    1 move
    4 adds
    1 delete in trunk

[macOS] Text replacements that end with symbols are expanded immediately

Reviewed by Darin Adler.


In shipping Safari, enabling grammar correction causes text shortcuts that end with symbols or punctuation marks
to immediately trigger when typing; normally, when grammar correction is off, this is only triggered after the
user has additionally inserted a punctuation mark or whitespace character after the replaced text.

This bug happens because enabling grammar checking causes the spell checking range to expand to the range of the
full sentence, so any text checking results that replace an existing range are triggered as long as they end
anywhere in the sentence. In contrast, when grammar checking is disabled, the spell checking range is limited to
the nearest adjacent word, which prevents text replacement from occurring elsewhere in the sentence.

However, after r232530, we now always expand the spell checking range to the extent of the sentence when a word
is typed regardless of whether grammar checking is enabled, which means that the issue described above now
happens everywhere. To fix this recent regression and the existing bug, we:

  • Augment our spellchecking codepaths to include a new automatic text replacement range, alongside

spellchecking and paragraph ranges.

  • Let this automatic text replacement range be the range of the adjacent word in the case where the user has

finished typing a word.

  • When marking and replacing text checking results, consult this new automatic text replacement instead of the

spellchecking range.

This keeps the behavior grammar and sentence retro correction results intact, while limiting the scope in which
text replacement results are applied.

Test: editing/spelling/text-replacement-after-typing-to-word.html

  • editing/AlternativeTextController.cpp:


  • editing/Editor.cpp:


Pass in the adjacent word range for the automaticReplacementRange, instead of the spell checking range (which
may be extended to the full range of the sentence).


Add an automaticReplacementRange argument to markAllMisspellingsAndBadGrammarInRanges, and adjust call sites
to pass in a range (generally the same as the spell checking range, but in the case where a word has been typed,
this is a narrower range).


When replacing text, only allow text replacement in the automatic replacement range rather than the spell
checking range.


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


Add a new version of this constructor that takes a single Range representing both the spellchecking range and
the automatic text replacement range, for convenience.


  • editing/SpellChecker.h:

Add plumbing for the automatic replacement range.

(WebCore::SpellCheckRequest::automaticReplacementRange const):

  • editing/TextCheckingHelper.cpp:

Add plumbing for the automatic replacement range, and new helpers to locate the range as offsets within the
text checking paragraph range.

(WebCore::TextCheckingParagraph::automaticReplacementStart const):
(WebCore::TextCheckingParagraph::automaticReplacementLength const):

  • editing/TextCheckingHelper.h:


Adds testing support for mocking NSSpellChecker's text checking results. See below for more details, and the new
layout test for an example of its usage.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/TestRunner.cpp:


Add bindings support in TestRunner to specify a set of text replacement mappings. Each entry in the dictionary
maps a string representing an input to the NSSpellChecker to some information describing the spell checking
result that LayoutTestSpellChecker will return.


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


Restore the original shared NSSpellchecker before transitioning to the next layout test, if needed.

  • DumpRenderTree/mac/DumpRenderTreeSpellChecker.mm: Removed.
  • DumpRenderTree/mac/TestRunnerMac.mm:


These testRunner methods ensure that -[NSSpellChecker sharedSpellChecker] is swizzled to return our mock
LayoutTestSpellChecker instance before calling into it.

  • DumpRenderTree/win/TestRunnerWin.cpp:


  • TestRunnerShared/cocoa/LayoutTestSpellChecker.h: Renamed from Tools/DumpRenderTree/mac/DumpRenderTreeSpellChecker.h.
  • TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: Added.

Moved DumpRenderTreeSpellChecker to LayoutTestSpellChecker, and made it compile for both WebKitTestRunner
(modern WebKit) and DumpRenderTree (legacy WebKit) by putting it in TestRunnerShared.

(-[LayoutTestTextCheckingResult initWithType:range:replacement:]):
(-[LayoutTestTextCheckingResult range]):
(-[LayoutTestTextCheckingResult resultType]):
(-[LayoutTestTextCheckingResult replacementString]):
(-[LayoutTestTextCheckingResult description]):

LayoutTestTextCheckingResult represents a fake NSTextCheckingResult containing spell checking results supplied
by the layout test.

(+[LayoutTestSpellChecker installIfNecessary]):
(+[LayoutTestSpellChecker uninstallAndReset]):

Helper methods to begin and end swizzling the shared NSSpellChecker.

(-[LayoutTestSpellChecker reset]):

Resets the state of the LayoutTestSpellChecker (this entails clearing the fake replacements dictionary and
turning off logging for recorded spellchecking responses).

(-[LayoutTestSpellChecker replacements]):
(-[LayoutTestSpellChecker setReplacements:]):
(-[LayoutTestSpellChecker setReplacementsFromJSObject:inContext:]):

Helper method to take a JSObjectRef supplied by the test runner and transform it into a map of spell checking
string inputs to LayoutTestTextCheckingResults.

(-[LayoutTestSpellChecker checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:]):

Consult the text replacement map and bail early if a match is found, before calling into real NSSpellChecker
logic to perform spellchecking.

(-[LayoutTestSpellChecker recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:]):

Reimplement the original functionality in DumpRenderTreeSpellChecker to make -recordResponse:… print to stdout
by overriding the method and printing if the -spellCheckerLoggingEnabled property has been set to YES.

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:


Adds a layout test to check that if a user has configured a text replacement that ends with punctuation, then:

  1. Typing that text replacement won't immediately trigger replacement.
  2. Text replacement is triggered after pressing enter.
  • editing/spelling/text-replacement-after-typing-to-word-expected.txt: Added.
  • editing/spelling/text-replacement-after-typing-to-word.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:
4:51 PM Changeset in webkit [233411] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[WPE][GTK] Fix retrieving backtrace from within flatpak sandbox in test runner

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-01
Reviewed by Michael Catanzaro.

The place where host tmp folder is mounted changed to /run/host/ we
need to take that into account.

Also explicitely close temporary files as relying on garbage collection to
remove them is a bad idea.

Also minor optimization avoiding to compile regex for each backtrace

  • Scripts/webkitpy/port/linux_get_crash_log.py:


3:38 PM Changeset in webkit [233410] by ddkilzer@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

JavaScriptCore: Fix clang static analyzer warnings: Assigned value is garbage or undefined

Reviewed by Mark Lam.

  • b3/air/AirEliminateDeadCode.cpp:

(JSC::B3::Air::eliminateDeadCode): Initialize changed.

  • parser/ParserTokens.h:

(JSC::JSTextPosition::JSTextPosition): Add struct member
initialization. Simplify default constructor.
(JSC::JSTokenLocation::JSTokenData): Move largest struct in the
union to the beginning to make it easy to zero out all fields.
(JSC::JSTokenLocation::JSTokenLocation): Add struct member
initialization. Simplify default constructor. Note that
endOffset was not being initialized previously.
(JSC::JSTextPosition::JSToken): Add struct member initialization
where necessary.

  • runtime/IntlObject.cpp:

(JSC::MatcherResult): Add struct member initialization.

11:23 AM Changeset in webkit [233409] by Darin Adler
  • 20 edits
    1 move
    1 add in trunk/Source

[Cocoa] Improve ARC compatibility of more code in JavaScriptCore

Reviewed by Dan Bernstein.


  • API/JSContext.mm:

(WeakContextRef::WeakContextRef): Deleted.
(WeakContextRef::~WeakContextRef): Deleted.
(WeakContextRef::get): Deleted.
(WeakContextRef::set): Deleted.

  • API/JSContextInternal.h: Removed unneeded header guards since this is

an Objective-C++ header. Removed unused WeakContextRef class. Removed declaration
of method -[JSContext initWithGlobalContextRef:] and JSContext property wrapperMap
since neither is used outside the class implementation.

  • API/JSManagedValue.mm:

(-[JSManagedValue initWithValue:]): Use a bridging cast.
(-[JSManagedValue dealloc]): Ditto.
(-[JSManagedValue didAddOwner:]): Ditto.
(-[JSManagedValue didRemoveOwner:]): Ditto.
(JSManagedValueHandleOwner::isReachableFromOpaqueRoots): Ditto.
(JSManagedValueHandleOwner::finalize): Ditto.

  • API/JSValue.mm:

(+[JSValue valueWithNewRegularExpressionFromPattern:flags:inContext:]): Ditto.
(+[JSValue valueWithNewErrorFromMessage:inContext:]): Ditto.
(-[JSValue valueForProperty:]): Ditto.
(-[JSValue setValue:forProperty:]): Ditto.
(-[JSValue deleteProperty:]): Ditto.
(-[JSValue hasProperty:]): Ditto.
(-[JSValue invokeMethod:withArguments:]): Ditto.
(valueToObjectWithoutCopy): Ditto. Also removed unneeded explicit type names.
(valueToArray): Ditto.
(valueToDictionary): Ditto.
(objectToValueWithoutCopy): Ditto.
(objectToValue): Ditto.

  • API/JSVirtualMachine.mm:

(+[JSVMWrapperCache addWrapper:forJSContextGroupRef:]): Ditto.
(+[JSVMWrapperCache wrapperForJSContextGroupRef:]): Ditto.
(-[JSVirtualMachine isOldExternalObject:]): Ditto.
(-[JSVirtualMachine addManagedReference:withOwner:]): Ditto.
(-[JSVirtualMachine removeManagedReference:withOwner:]): Ditto.
(-[JSVirtualMachine contextForGlobalContextRef:]): Ditto.
(-[JSVirtualMachine addContext:forGlobalContextRef:]): Ditto.
(scanExternalObjectGraph): Ditto.
(scanExternalRememberedSet): Ditto.

  • API/JSWrapperMap.mm:

(makeWrapper): Ditto.
(-[JSObjCClassInfo wrapperForObject:inContext:]): Ditto.
(-[JSWrapperMap objcWrapperForJSValueRef:inContext:]): Ditto.
(tryUnwrapObjcObject): Ditto.

  • API/ObjCCallbackFunction.mm:

(blockSignatureContainsClass): Ditto.
(objCCallbackFunctionForMethod): Switched from retain to CFRetain, but not
sure we will be keeping this the same way under ARC.
(objCCallbackFunctionForBlock): Use a bridging cast.

  • API/ObjcRuntimeExtras.h:

(protocolImplementsProtocol): Use a more specific type that includes the
explicit unsafe_unretained for copied protocol lists.
(forEachProtocolImplementingProtocol): Ditto.

  • inspector/remote/cocoa/RemoteInspectorCocoa.mm:

(Inspector::convertNSNullToNil): Added to replace the CONVERT_NSNULL_TO_NIL macro.
(Inspector::RemoteInspector::receivedSetupMessage): Use convertNSNullToNil.

  • inspector/remote/cocoa/RemoteInspectorXPCConnection.mm: Moved the

CFXPCBridge SPI to a header named CFXPCBridgeSPI.h.
(auditTokenHasEntitlement): Deleted. Moved to Entitlements.h/cpp in WTF.
(Inspector::RemoteInspectorXPCConnection::handleEvent): Use WTF::hasEntitlement.
(Inspector::RemoteInspectorXPCConnection::sendMessage): Use a bridging cast.


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

(WebKit::XPCServiceInitializerDelegate::hasEntitlement): Use WTF::hasEntitlement.

  • Shared/mac/SandboxUtilities.h: Removed connectedProcessHasEntitlement since

we can now use WTF::hasEntitlement instead.

  • Shared/mac/SandboxUtilities.mm: Ditto.
  • StorageProcess/ios/StorageProcessIOS.mm:

(WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement): Use

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::parentProcessHasServiceWorkerEntitlement): Ditto.


  • WTF.xcodeproj/project.pbxproj: Added CFXPCBridgeSPI.h, fixed a few

other small problems in the project file, and let Xcode fix a few too.

  • wtf/cocoa/Entitlements.h: Added hasEntitlement function with overloads

for an audit token and an XPC connection.

  • wtf/cocoa/Entitlements.mm:

(WTF::hasEntitlement): Added, with overloads for a SecTask, an audit token,
and an XPC connection.
(WTF::processHasEntitlement): Refactored to use the function above.

  • wtf/spi/cocoa/CFXPCBridgeSPI.h: Added.

Jun 30, 2018:

11:52 PM Changeset in webkit [233408] by abarth@webkit.org
  • 7 edits in trunk

Port JavaScriptCore to OS(FUCHSIA)

Reviewed by Daniel Bates.


  • Source/cmake/OptionsJSCOnly.cmake: Add back ICU.


  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::cacheFlush): Call zx_cache_flush to flush cache.

  • runtime/MachineContext.h: Fuchsia has the same mcontext_t as glibc.



  • wtf/Platform.h: Fuchsia uses mcontext_t to provide machine context.
11:00 PM Changeset in webkit [233407] by dbates@webkit.org
  • 2 edits in trunk/Tools

test-webkitpy never rebuilds lldbWebKitTester

Reviewed by David Kilzer.

Have test-webkitpy always call script build-lldbwebkittester to build lldbWebKitTester, if needed.

Currently test-webkitpy only calls script build-lldbwebkittester if lldbWebKitTester does not
exist in the build products directory for the active configuration (e.g. Debug); => we do not
build lldbWebKitTester again if its source changes (say, as a result of hacking on lldbWebKitTester).
Instead we should have test-webkitpy unconditionally call build-lldbwebkittester to ensure
that we have an up-to-date build of lldbWebKitTester.

  • Scripts/webkitpy/test/main.py:

(_find_lldb_webkit_tester): Deleted.

7:12 PM Changeset in webkit [233406] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Follow-up: Fix clang static analyzer warnings: Garbage return value

Address review feedback from Eric Carlson.

  • platform/mediastream/MediaConstraints.h:

(WebCore::NumericConstraint::valueForCapabilityRange const):

  • Use brace initialization for more local variables.
6:49 PM Changeset in webkit [233405] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Asan false positive: stack use after scope under WebCore::ApplyPropertyBorderImageModifier in WebCore::Length::Length(WebCore::Length&&)

Reviewed by Oliver Hunt.

We believe that we have found a bug in GCC's address sanitizer. It is blocking work on other
issues, so work around it by changing a temporary into a local variable.

  • css/StyleBuilderCustom.h:


6:16 PM WebKitGTK/2.20.x edited by Michael Catanzaro
6:15 PM Changeset in webkit [233404] by Michael Catanzaro
  • 3 edits in trunk/Source/ThirdParty

Fix off-by-one error in xdg_mime_get_simple_globs

Reviewed by Daniel Bates.

We have an off-by-one error here in some code that was added for WebKit. (This is not an
issue with upstream xdgmime.)

No new tests. This problem is caught by TestDownloads, but only when running with ASan

  • xdgmime/src/xdgmimecache.c:


  • xdgmime/src/xdgmimeglob.c:


5:06 PM Changeset in webkit [233403] by ddkilzer@apple.com
  • 8 edits in trunk/Source

Fix clang static analyzer warnings: Garbage return value

Reviewed by Eric Carlson.


  • bytecode/UnlinkedCodeBlock.cpp:


  • Use brace initialization for local variables.
  • debugger/DebuggerCallFrame.cpp:

(class JSC::LineAndColumnFunctor):

  • Use class member initialization for member variables.


  • platform/mediastream/MediaConstraints.h:

(WebCore::NumericConstraint::valueForCapabilityRange const):

  • Use brace initialization for local variables.


  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:


  • WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:


  • Use brace initialization for local variables.
2:07 PM Changeset in webkit [233402] by Michael Catanzaro
  • 2 edits in trunk/Tools

[CMake] build-webkit should be able to enable address sanitizer

Reviewed by Daniel Bates.

If 'set-webkit-configuration --asan' has been run, then build-webkit should pass
-DENABLE_ADDRESS_SANITIZER=ON to CMake, so that it actually does something.

This also works for build-jsc.

  • Scripts/webkitdirs.pm:


1:53 PM Changeset in webkit [233401] by abarth@webkit.org
  • 9 edits
    2 adds in trunk/Source/WTF


Reviewed by Yusuke Suzuki.

  • wtf/FastMalloc.cpp: Fuchsia does not have resource.h

(WTF::fastMallocStatistics): Skip collecting stats without resource.h

  • wtf/InlineASM.h: Fuchsia uses ELF
  • wtf/Platform.h: Define OS(FUCHSIA) as an OS(UNIX) variant
  • wtf/RandomDevice.cpp: Call zx_cprng_draw for crypographic randomness


  • wtf/ThreadingPthreads.cpp: Fuchsia does not have pthread_setschedparam


  • wtf/unix/CPUTimeFuchsia.cpp: Added.
11:44 AM Changeset in webkit [233400] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, add missing PLATFORM(COCOA) guard after r233207

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:


11:07 AM Changeset in webkit [233399] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Do not add the containing block's offset while computing the out-of-flow static position.

Reviewed by Antti Koivisto.

The static position for an out-of-flow elements is

  1. the distance from the parent's border box.
  2. climbing up on the containing block chain and offset the containers until we reach the out-of-flow element's containing block.
  • layout/FormattingContextGeometry.cpp:


11:06 AM Changeset in webkit [233398] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] If the top and bottom margins of a box are adjoining, then it is possible for margins to collapse through it.

Reviewed by Antti Koivisto.

  • layout/blockformatting/BlockMarginCollapse.cpp:


11:04 AM Changeset in webkit [233397] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Adjust final out-of-flow position with the computed margin value.

Reviewed by Antti Koivisto.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):

10:11 AM Changeset in webkit [233396] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit

Added a missing availability attribute.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
7:24 AM Changeset in webkit [233395] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Make check_flatpak() not verbose when only trying to run command inside flatpak

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-06-30
Reviewed by Michael Catanzaro.

  • flatpak/flatpakutils.py:


6:43 AM Changeset in webkit [233394] by graouts@webkit.org
  • 10 edits in trunk

[Web Animations] Make WPT test at timing-model/timelines/document-timelines.html pass reliably

Reviewed by Dean Jackson.


Record WPT test progressions.

  • web-platform-tests/web-animations/timing-model/timelines/document-timelines-expected.txt:


The Web Animations spec, along with the HTML5 event loop spec, specify some assumptions on the time reported by

  • it should only increase once per frame
  • it should have the same value as the timestamp passed to requestAnimationFrame() callbacks

The WPT test at web-platform-tests/web-animations/timing-model/timelines/document-timelines.html relies on these
assumptions to be true so that we check that the start time of a new animation is not the same as the timeline time
when it was created, since it will be in the "play-pending" state for a frame.

In order to support this, we add two new methods on DocumentAnimationScheduler. First, when a scheduled display update
fires, we record the timestamp and expose it via lastTimestamp() such that DocumentTimeline and ScriptedAnimationController
can use the same value when updating animations. Then, to know whether code is run as a result of a display update, we
expose isFiring().

Now, within DocumentTimeline::currentTime(), we can cache the current time this way:

  • if we're in the middle of a display update, use the value returned by lastTimestamp().
  • otherwise, compute what would have been the ideal number of frames (at 60fps or less if throttled) and add those to

the lastTimestamp() value.

Then, we remove this cached current time when both currently-running JavaScript has completed and all animation update
code has completed by waiting on the invalidation task to run.

  • animation/DocumentAnimationScheduler.cpp:


  • animation/DocumentAnimationScheduler.h:

(WebCore::DocumentAnimationScheduler::isFiring const):

  • animation/DocumentTimeline.cpp:


  • animation/DocumentTimeline.h:
  • dom/ScriptedAnimationController.cpp:



This test now passes reliably.

6:04 AM Changeset in webkit [233393] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] Make imported/mozilla/css-transitions/test_event-dispatch.html pass reliably


This test is no longer flaky, the fix for webkit.org/b/183834 fixed the issue.

  • platform/ios/TestExpectations:
12:08 AM Changeset in webkit [233392] by commit-queue@webkit.org
  • 5 edits in trunk

Unreviewed, rolling out r233391.

This patch broke Windows ports (Requested by fredw on

Reverted changeset:

"WTF's internal std::optional implementation should abort() on
bad optional access"

Jun 29, 2018:

11:42 PM Changeset in webkit [233391] by commit-queue@webkit.org
  • 5 edits in trunk

WTF's internal std::optional implementation should abort() on bad optional access

Patch by Frederic Wang <fwang@igalia.com> on 2018-06-29
Reviewed by Michael Catanzaro.


Currently, some ports built with recent compilers will cause the program to abort when one
tries to access the value of an unset std:optional (i.e. std::nullopt) as specified by C++17.
However, most ports still use WTF's internal std::optional implementation, which does not
verify illegal access. Hence it's not possible for developers working on these ports to
detect issues like bugs #186189, #186535, #186752, #186753, #187139 or #187145. WTF's version
of std::optional was introduced in bug #164199 but it was not possible to verify the
availability of the value inside constexpr member functions because the assert might involve
asm declarations. This commit introduces a new RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT macro
(a simplified version of RELEASE_ASSERT that can be used in constexpr context) and uses it in
WTF's implementation of std::optional.

  • wtf/Assertions.h: Define RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT as a version of

RELEASE_ASSERT that can be used in constexpr context (in particular avoids asm declarations).

  • wtf/Optional.h:

(std::optional::operator ->): Add an assert to ensure the optional value is available.
(std::optional::operator *): Ditto.
(std::optional::value const): Ditto.
(std::optional::value): Ditto.
(std::optional<T::value const): Ditto.


10:40 PM Changeset in webkit [233390] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

Crash under WebCore::AXObjectCache::handleMenuItemSelected

Reviewed by Chris Fleizach.


When a node is being destroyed, we deregister it from the AX cache through the Node's destructor.
But we did not remove the corresponding entry from the m_deferredFocusedNodeChange list. It would
then lead to a crash if we try to access the deleted node from m_deferredFocusedNodeChange.
Fixed it by removing the entry if the newly focused node is being destroyed.

Test: accessibility/accessibility-crash-focused-element-change.html

  • accessibility/AXObjectCache.cpp:



  • accessibility/accessibility-crash-focused-element-change-expected.txt: Added.
  • accessibility/accessibility-crash-focused-element-change.html: Added.
8:02 PM Changeset in webkit [233389] by Antti Koivisto
  • 3 edits
    2 adds in trunk

REGRESSION (r232806): Facebook login fields have blue fill background instead of white


Reviewed by Tim Horton.

This happens because a 'prefers-dark-interface' media query on UA sheet always evaluates to true in dark mode.

Tests: fast/forms/input-background-ua-media-query.html

  • css/MediaQueryEvaluator.cpp:


Make prefers-dark-interface media query match only when using system appearance.


Reviewed by Tim Horton.

  • fast/forms/input-background-ua-media-query-expected.html: Added.
  • fast/forms/input-background-ua-media-query.html: Added.
7:12 PM Changeset in webkit [233388] by dbates@webkit.org
  • 2 edits in trunk/Tools

build-webkit: Perl "use of uninitialized value $previousContents"

Reviewed by Michael Catanzaro.

Fixes an issue where reading an empty cached argument file would cause
Perl "uninitialized value" warnings of the form:

Use of uninitialized value $previousContents in chomp at C:/WebKit-BuildWorker/wincairo-wkl-debug/build/Tools/Scripts/webkitdirs.pm line 1969.
Use of uninitialized value $previousContents in string ne at C:/WebKit-BuildWorker/wincairo-wkl-debug/build/Tools/Scripts/webkitdirs.pm line 1972.

  • Scripts/webkitdirs.pm:


7:11 PM Changeset in webkit [233387] by dbates@webkit.org
  • 3 edits
    5 adds in trunk

REGRESSION (r230921): Cannot log in to forums.swift.org using GitHub account

Reviewed by Brent Fulgham.


Fixes an issue where a Same-Site cookies are not sent with any child window load if the
load is cross-origin with respect to the window's opener. One example where this issue
manifest itself was in the GitHub sign in flow on forums.swift.org.

Currently we always consider the origin of the window's opener (if we have one) when
determining whether a frame load request is same-origin and hence should send Same-Site
cookies when performing the request. So, when page A.com opens a child window to B.com and
then a person clicks a hyperlink or submits a form to B.com/b2 then we do not send Same-
Site cookies with the request to B.com/b2 (because its origin, B.com, is cross-origin
with its opener, A.com). But we should send Same-Site cookies with the request to B.com/b2
because it is same-origin with the page that initiated the request, B.com. Instead of
always considering the origin the window's opener for every frame load we should only
consider it for the first non-empty document load.

Tests: http/tests/cookies/same-site/fetch-in-about-blank-popup.html


  • loader/FrameLoader.cpp:



Add tests to ensure that Same-Site cookies are sent in a subsequent same-origin form submission
from a child window that is cross-origin with its opener. Also add a test to ensure that Same-Site
cookies are visible to an about:blank pop-up window (as about:blank is Same-Site with its opener
by definition of being same-origin with it).

  • http/tests/cookies/same-site/fetch-in-about-blank-popup-expected.txt: Added.
  • http/tests/cookies/same-site/fetch-in-about-blank-popup.html: Added.
  • http/tests/cookies/same-site/post-from-cross-site-popup-expected.txt: Added.
  • http/tests/cookies/same-site/post-from-cross-site-popup.html: Added.
  • http/tests/cookies/same-site/resources/post-from-popup.html: Added.
7:06 PM Changeset in webkit [233386] by dbates@webkit.org
  • 4 edits in trunk/Tools

Perl uninitialized value $isEnabled when running build-jsc using a CMake build

Reviewed by Tim Horton.

Share logic for computing the feature flags to enable in CMake with both script
build-webkit and script build-jsc instead of duplicating it. This also fixes a
bug in the version of this logic in build-jsc that was inadvertently not updated
in r222394. In r222394 we removed the notion of a default value for a feature flag
listed in webkitperl::FeatureList.

We keep the current behavior of build-jsc and leave it up to the build system
to determine whether to enable or disable ENABLE_EXPERIMENTAL_FEATURES.

  • Scripts/build-jsc:

(cMakeArgsFromFeatures): Deleted.

  • Scripts/build-webkit:

(cMakeArgsFromFeatures): Deleted; moved to webkitdirs.pm.

  • Scripts/webkitdirs.pm:

(cmakeArgsFromFeatures): Moved code from script build-webkit so that it can be shared
with build-jsc.

6:20 PM Changeset in webkit [233385] by timothy_horton@apple.com
  • 6 edits in trunk/Tools

Add -apple-color-filter and system appearance toggles to MiniBrowser

Reviewed by Simon Fraser.

  • MiniBrowser/mac/AppDelegate.m:


  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleAppleColorFilterEnabled:]):
(-[SettingsController appleColorFilterEnabled]):
(-[SettingsController toggleUseSystemAppearance:]):
(-[SettingsController useSystemAppearance]):

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController didChangeSettings]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController didChangeSettings]):

6:07 PM Changeset in webkit [233384] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

Resource Load Statistics: Make network process calls only for the process pool that the page belongs to

Reviewed by Chris Dumez.

Instead of iterating over all process pools, we should resolve which
process pool the page belongs to and call the network process only for
that pool. This is especially important since we use WTFMove for the
completion handlers.

This patch also renames "callback" to "completionHandler" for
the functions touched.

A FIXME comment is added to WebsiteDataStore::getAllStorageAccessEntries()
where we currently don't have a page ID to do the lookup with.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:


5:55 PM Changeset in webkit [233383] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Try to fix Windows build after r233377

  • builtins/BuiltinExecutables.cpp:


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

Skip media/picture-in-picture-interruption.html on iOS since it relies on 'runWithKeyDown'.

Unreviewed test gardening.

  • platform/ios/TestExpectations:
5:35 PM Changeset in webkit [233381] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Add utility methods to WebResourceLoadStatisticsStore to hop back and forth between threads

Reviewed by Brent Fulgham.

Add utility methods to WebResourceLoadStatisticsStore to hop back and forth between threads,
in order the simplify the code a little bit.

  • UIProcess/ResourceLoadStatisticsMemoryStore.cpp:


  • UIProcess/WebResourceLoadStatisticsStore.cpp:


  • UIProcess/WebResourceLoadStatisticsStore.h:
5:23 PM Changeset in webkit [233380] by Darin Adler
  • 4 edits
    4 moves
    1 add in trunk/Source/WTF

[Cocoa] reduce unnecessary use of .mm source files in WTF, spruce up some implementation details

Reviewed by Anders Carlsson.

  • WTF.xcodeproj/project.pbxproj: Update for file and directory renames, file type changes,

and deletions.

  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::holdOff): Deleted empty placeholder; this one is not needed.

  • wtf/PlatformMac.cmake: Update for file and directory renames, file type changes,

and deletions.

  • wtf/cocoa/CPUTimeCocoa.cpp: Renamed from Source/WTF/wtf/cocoa/CPUTimeCocoa.mm.
  • wtf/text/cocoa/StringImplCocoa.mm: Renamed from Source/WTF/wtf/text/mac/StringImplMac.mm.

Also removed an unneeded include.

  • wtf/text/cocoa/StringViewCocoa.mm: Renamed from Source/WTF/wtf/text/mac/StringViewObjC.mm.
  • wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp: Renamed from


5:06 PM Changeset in webkit [233379] by commit-queue@webkit.org
  • 9 edits
    2 adds in trunk

[macOS] Do not crash if there is an attempt to copy a file URL to the clipboard

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-06-29
Reviewed by Wenson Hsieh.


r210683 introduced logic to prevent file URLs from being copied to the clipboard
in unexpected cases. The current logic always crashes the WebProcess if
webProcessProxy->checkURLReceivedFromWebProcess returns false. Instead of
crashing, we can fail silently and not copy anything to the clipboard.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::setPasteboardPathnamesForType): Removed call to markCurrentlyDispatchedMessageAsInvalid() which was causing the process to crash.


Added a 'runSingly' option to the TestOptions struct. Setting this option to true
will force a new PlatformWebView to be created before running a test. This ensures
that any state set by previous tests are not preserved.

One example of the importance of having this ability is in the case where we want
to test functionality that deals with read access to files. If a test were to
load a valid file URL, universal read access will be granted in WebProcessProxy.
This prevents us from testing cases that rely on us not have universal read
access. Now, if we write the test using the 'runSingly' option, any state set
by previous tests is cleared. Consequently, our test will behave as expected.

  • WebKitTestRunner/PlatformWebView.h:

(WTR::PlatformWebView::viewSupportsOptions const):

  • WebKitTestRunner/TestController.cpp:


  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):


Added a test to ensure that the WebProcess does not crash if we attempt to copy a
file URL to the clipboard. The test also ensures the clipboard content remains

  • TestExpectations:
  • http/tests/security/pasteboard-file-url-expected.txt: Added.
  • http/tests/security/pasteboard-file-url.html: Added.
  • platform/mac-wk2/TestExpectations:
5:05 PM Changeset in webkit [233378] by sbarati@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Don't use tracePoints in JS/Wasm entry

Reviewed by Mark Lam.

This puts VM entry and Wasm entry tracePoints behind a runtime
option. This is a ~4x speedup on a soon to be released Wasm
benchmark. tracePoints should basically never run more than 50
times a second. Entering the VM and entering Wasm are user controlled,
and can happen hundreds of thousands of times in a second. Depending
on how the Wasm/JS code is structured, this can be disastrous for

  • runtime/Options.h:
  • runtime/VMEntryScope.cpp:


  • wasm/WasmBBQPlan.cpp:


  • wasm/js/WebAssemblyFunction.cpp:


4:40 PM Changeset in webkit [233377] by sbarati@apple.com
  • 19 edits
    2 adds in trunk

We shouldn't recurse into the parser when gathering metadata about various function offsets

Reviewed by Mark Lam.


  • microbenchmarks/try-get-by-id-basic.js:


  • microbenchmarks/try-get-by-id-polymorphic.js:


  • stress/array-push-with-force-exit.js:
  • stress/dont-crash-on-stack-overflow-when-parsing-builtin.js: Added.


  • stress/dont-crash-on-stack-overflow-when-parsing-default-constructor.js: Added.


  • stress/is-constructor.js:
  • stress/tailCallForwardArguments.js:



Prior to this patch, when we made a builtin, we had to make an UnlinkedFunctionExecutable
for that builtin. This required calling into the parser. However, the parser
may throw a stack overflow. We were not able to recover from that. The only
reason we called into the parser here is that we were gathering text offsets
and various metadata for things in the builtin function. This patch writes a
mini parser that figures this information out without calling into the full
parser. (I've also added a debug assert that verifies the mini parser stays in
sync with the full parser.) The result of this is that BuiltinExecutbles::createExecutable
always succeeds.

  • builtins/AsyncFromSyncIteratorPrototype.js:


  • builtins/BuiltinExecutables.cpp:


  • builtins/GlobalOperations.js:


  • builtins/PromiseOperations.js:


  • builtins/RegExpPrototype.js:


  • builtins/StringPrototype.js:


  • parser/Nodes.cpp:

(JSC::FunctionMetadataNode::operator== const):
(JSC::FunctionMetadataNode::dump const):

  • parser/Nodes.h:
  • parser/Parser.h:


  • parser/ParserError.h:

(JSC::ParserError::type const):

  • parser/ParserTokens.h:

(JSC::JSTextPosition::operator== const):
(JSC::JSTextPosition::operator!= const):

  • parser/SourceCode.h:

(JSC::SourceCode::operator== const):
(JSC::SourceCode::operator!= const):
(JSC::SourceCode::subExpression const):
(JSC::SourceCode::subExpression): Deleted.

4:33 PM Changeset in webkit [233376] by n_wang@apple.com
  • 4 edits
    2 adds in trunk

AX: [iOS] VoiceOver scroll position is jumpy in frames

Reviewed by Simon Fraser.


iOS is using delegate scrolling and we should not take into account
the scroll offset when converting rects.

Also fixed a issue where we want to scroll the element into view even
if it's partially visible.

Test: fast/scrolling/ios/iframe-scroll-into-view.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::scrollToMakeVisible const):

  • platform/ScrollView.cpp:

(WebCore::ScrollView::contentsToContainingViewContents const):


  • fast/scrolling/ios/iframe-scroll-into-view-expected.html: Added.
  • fast/scrolling/ios/iframe-scroll-into-view.html: Added.
4:17 PM Changeset in webkit [233375] by dbates@webkit.org
  • 2 edits in trunk/Tools

[lldb-webkit] Non-empty strings may be pretty-printed as empty

Reviewed by Simon Fraser.

For some reason lldb(1) sometimes has an issue accessing members of WTF::StringImplShape
via a WTF::StringImpl pointer (why?). Explicitly casting a WTF::StringImpl* to a
WTF::StringImplShape* before accessing such members makes LLDB happy.

I tried writing a test for this both for the LLVM project and to add to our lldb_webkit unit
tests to no avail. I have only been able to reproduce this bug sporadically during my WebCore/WebKit
debugging sessions so far.

  • lldb/lldb_webkit.py:

(WTFStringImplProvider.init): Explicitly cast the WTF::StringImpl* to WTF::StringImplShape*.
(WTFStringImplProvider.get_data8): Update code now that we are directly accessing WTF::StringImplShape*.
(WTFStringImplProvider.get_data16): Ditto.

3:56 PM Changeset in webkit [233374] by Chris Dumez
  • 5 edits
    1 add in trunk

WebKitLegacy: Can trigger recursive loads triggering debug assertions

Reviewed by Brent Fulgham.


In order to support asynchronous policy delegates, r229722 added a call to
FrameLoader::clearProvisionalLoadForPolicyCheck() when starting a navigation
policy decision in PolicyChecker::checkNavigationPolicy(). This calls
stopLoading() on the current provisional loader if there is one, and potentially
calls the didFailProvisionalLoadWithError cleint delegate. This delegate call
is synchronous on WebKit1, so the client may start a new load from this delegate
and re-enter Webcore. This happens in practive with Quickens 2017 / 2018 on Mac.

Before r229722, this was not an issue because pending loads were canceled after
the (asynchronous) navigation policy decision, via FrameLoader::stopAllLoaders().
FrameLoader::stopAllLoaders() sets a m_inStopAllLoaders flag and we return early
in FrameLoader::loadRequest() when this flag is set to prevent recursive loads.

To maintain shipping behavior as much as possible, this patch introduces a similar
inClearProvisionalLoadForPolicyCheck which gets set during
FrameLoader::clearProvisionalLoadForPolicyCheck() and we prevent new loads while
this flag is set.

I have verified that Quickens 2017 / 2018 works again after this change and I added
API test coverage for this behavior.

  • loader/FrameLoader.cpp:


  • loader/FrameLoader.h:


Add API test coverage.

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

(-[StartLoadInDidFailProvisionalLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
(-[StartLoadInDidFailProvisionalLoadDelegate webView:didFinishLoadForFrame:]):

3:51 PM Changeset in webkit [233373] by Lucas Forschler
  • 2 edits in trunk/Tools

Teach bisect-builds to retrieve supported platforms from the rest api.

2:17 PM Changeset in webkit [233372] by keith_miller@apple.com
  • 2 edits in trunk/Tools

run-jsc should print when jsc exits with non-zero status

Reviewed by Saam Barati.

  • Scripts/run-jsc:
2:00 PM Changeset in webkit [233371] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Regression(r233359): Caused ITP tests to be flaky

Reviewed by Youenn Fablet.

r233359 started using m_resolvedConfiguration.resourceLoadStatisticsDirectory instead of
m_configuration.resourceLoadStatisticsDirectory for the ITP path. This is consistent
with what we do for other database paths so that things like '~' in paths get resolved.

This introduced flakiness because the resourceLoadStatisticsDirectory was never getting
resolved and m_resolvedConfiguration.resourceLoadStatisticsDirectory was not set.
Update the WebsiteDataStore so that m_resolvedConfiguration.resourceLoadStatisticsDirectory
properly gets set to the resolved version of m_configuration.resourceLoadStatisticsDirectory.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:


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

Layout Test webrtc/datachannel/mdns-ice-candidates.html is flaky

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-06-29

1:47 PM Changeset in webkit [233369] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Layout Test js/error-should-not-strong-reference-global-object.html is flaky on macOS

Unreviewed test gardening

Patch by Truitt Savell <Truitt Savell> on 2018-06-29

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
1:25 PM Changeset in webkit [233368] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add timeout to webkitpy and webkitperl tests

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(RunWebKitPerlTests.init): Set timeout of 2 minutes.
(RunWebKitPyTests.init): Ditto.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
1:11 PM Changeset in webkit [233367] by wilander@apple.com
  • 6 edits in trunk/Source/WebKit

Resource Load Statistics: Don't create a WebResourceLoadStatisticsStore for ephemeral sessions

Reviewed by Brent Fulgham and Chris Dumez.

Most of the changes in this patch remove the boolean parameter for tracking
ephemeral sessions and the IsReadOnly enum.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]):

Now returns early for ephemeral sessions.

  • UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:


  • UIProcess/ResourceLoadStatisticsPersistentStorage.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:


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


Now returns early for ephemeral sessions.


12:24 PM Changeset in webkit [233366] by Said Abou-Hallawa
  • 4 edits
    2 adds in trunk

Infinite loop if a <use> element references its ancestor and the DOMNodeInserted event handler of one its ancestor's descents updates the document style

Reviewed by Antti Koivisto.


This patches fixes two issues:
-- SVGTRefTargetEventListener should not assume it has to be attached to
target when its handleEvent() is called.
Because SVGTRefTargetEventListener::handleEvent() references the target
element, we just return if the listener is detached.

-- The <use> element should not clone its shadow tree if it references one
of its ancestors. The DOMNodeInserted of any node in the target element
tree may issue a document command. This document command will cause the
shadow tree to be re-cloned so this will cause infinite loop to happen.

Test: svg/dom/svg-use-infinite-loop-cloning.html

  • svg/SVGTRefElement.cpp:


  • svg/SVGUseElement.cpp:



  • svg/dom/svg-use-infinite-loop-cloning-expected.txt: Added.
  • svg/dom/svg-use-infinite-loop-cloning.html: Added.
11:54 AM Changeset in webkit [233365] by Manuel Rego Casasnovas
  • 4 edits in trunk

[WPE] Three CSS Grid Layout tests crash due to valueless std::optional access

Reviewed by Frédéric Wang.


This is a simple fix for the crash we're getting on WPE
in IndefiniteSizeStrategy::freeSpaceForStretchAutoTracksStep().

Covered by existent tests, just remove them from TestExpectations file.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::IndefiniteSizeStrategy::freeSpaceForStretchAutoTracksStep const):
Check if minSize is null before trying to access it's value.


as they're passing now.

11:12 AM Changeset in webkit [233364] by clopez@igalia.com
  • 2 edits in trunk/Tools

[WPE]: Fix exception handling when flatpak is not installed

Unreviewed followup-fix after r233362

This was causing failures when flatpak is not installed.

  • flatpak/flatpakutils.py:


10:55 AM Changeset in webkit [233363] by Ross Kirsling
  • 5 edits in trunk

[JSCOnly] Restore Windows build.

Reviewed by Michael Catanzaro.


  • Source/cmake/OptionsJSCOnly.cmake:

Don't forget to set -DUCHAR_TYPE=wchar_t for ICU on Windows.
Use bin64/lib64 on Windows (for consistency with full WebKit build).


  • Scripts/build-jsc:

Fix condition for disabling FTL JIT on Windows.

  • Scripts/webkitdirs.pm:

JSCOnly should still use bin64 on Windows (for consistency with full WebKit build).
JSCOnly already defaults to 64-bit on Windows with Ninja -- ensure that this is true even with MSBuild.

10:47 AM Changeset in webkit [233362] by commit-queue@webkit.org
  • 15 edits
    16 adds in trunk

[GTK][WPE]: Add a way to setup our development environment inside flatpak

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-06-29
Reviewed by Carlos Alberto Lopez Perez.


This patch introduce a way to setup the development environment inside flatpak[0]
removing the need for jhbuild when doing so. Anything needed to build/run minibrowser/ run
layout tests is provided either but the org.gnome.Sdk runtime or built with flatpak-builder.

The workflow is very similar to the "jhbuild based" one except that you should use update-webkit$PORTNAME-flatpak instead
of update-webkit$PORTNAME-libs and that script requires to specify a build configuration (--release is default).

Our scripts have been updated to be able to run inside that new build environment.

Since everything runs inside a flatpak sandbox, gdb needs to be run from within the sandbox, the script exposes a way to do it
easily with the --gdb option:

$ webkit-flatpak --gdb [-m COREDUMPCTL MATCHES]

The Layout test GDBCrashLogGenerator has been taugth how to use that and is able to retrieve stacktrace as with the jhbuild based workflow.

[0] http://flatpak.org

  • Scripts/build-webkit:
  • Scripts/generate-jsc-bundle:


  • Scripts/run-gtk-tests:
  • Scripts/run-minibrowser:
  • Scripts/run-webdriver-tests:
  • Scripts/run-webkit-tests:
  • Scripts/run-wpe-tests:
  • Scripts/update-webkitgtk-libs:
  • Scripts/update-webkitwpe-libs:
  • Scripts/webkit-flatpak: Added.
  • Scripts/webkitdirs.pm:


  • Scripts/webkitpy/port/base.py:


  • Scripts/webkitpy/port/gtk.py:


  • Scripts/webkitpy/port/linux_get_crash_log.py:


  • Scripts/webkitpy/port/wpe.py:


  • Scripts/webkitpy/w3c/wpt_runner.py:


  • flatpak/files/default.xkm: Added.
  • flatpak/files/httpd-autogen.sh: Added.
  • flatpak/flatpakutils.py: Added.


  • flatpak/org.webkit.GTK.yaml: Added.
  • flatpak/org.webkit.WPE.yaml: Added.
  • flatpak/org.webkit.WebKit.yaml: Added.
  • flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Added.
  • flatpak/patches/xvfb-0001-HACK-Avoid-compiling-a-kbm-file.patch: Added.


  • http/conf/flatpak-httpd.conf: Added. Apache configuration file to be used inside flaptak.
10:42 AM Changeset in webkit [233361] by david_fenton@apple.com
  • 8 edits
    3 deletes in trunk

Unreviewed, rolling out r233349.

caused 42 crashes on iOS GuardMalloc and iOS ASan tests

Reverted changeset:

"[Web Animations] Using a Web Animation leaks the Document"

10:15 AM Changeset in webkit [233360] by jer.noble@apple.com
  • 6 edits
    2 adds in trunk

Returning PiP'd video to fullscreen while playing leaves video muted.

Reviewed by Eric Carlson.


Test: media/picture-in-picture-interruption.html

Don't reset the media session's state at the end of an interruption if it wasn't changed an the beginning of one.

  • platform/audio/PlatformMediaSession.cpp:


  • testing/Internals.cpp:


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


  • media/picture-in-picture-interruption-expected.txt: Added.
  • media/picture-in-picture-interruption.html: Added.
9:54 AM Changeset in webkit [233359] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Stop using lambdas for WebResourceLoadStatisticsStore to interact with its WebsiteDataStore

Reviewed by Brent Fulgham.

Stop using lambdas for WebResourceLoadStatisticsStore to interact with its WebsiteDataStore. Instead,
WebResourceLoadStatisticsStore now holds a weak pointer to its WebsiteDataStore and is able to call
methods on it directly. Reducing the indirection makes the code less complex and more understandable.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:


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


8:24 AM Changeset in webkit [233358] by Ryan Haddad
  • 2 edits in trunk/Source/bmalloc

Unreviewed, rolling out r233347.

Causes crashes during WK1 tests.

Reverted changeset:

"Disable IsoHeaps when Gigacage is off"

8:20 AM Changeset in webkit [233357] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] When the formatting root is also a containing block for out-of-flow elements.

Reviewed by Antti Koivisto.

Out-of-flow descendants' layout requires their containing block height to be computed. This patch takes care of the case
when the containing block is also a formatting context root (e.g. relative positioned with overflow other than visible).

  • layout/Verification.cpp:

(WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree const):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):

7:47 AM Changeset in webkit [233356] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Do not skip the next inflow sibling after finishing a formatting context root layout.

Reviewed by Antti Koivisto.

Since the block formatting layout is based on pre-order traversal, after finishing a formatting
context layout (which takes care of its entire subtre), we need to visit the next (in-flow)sibling.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):

7:17 AM Changeset in webkit [233355] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test imported/mozilla/css-animations/test_animation-starttime.html is failing.

Unreviewed test gardening.

  • platform/win/TestExpectations:
7:10 AM Changeset in webkit [233354] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test fast/text/mark-matches-broken-line-rendering.html is failing

Unreviewed test gardening.

  • platform/win/TestExpectations:
7:00 AM WebKitGTK/2.20.x edited by Adrian Perez de Castro
6:52 AM Changeset in webkit [233353] by magomez@igalia.com
  • 2 edits in trunk/Source/WebKit

[WPE] Some frames are dropped when using rAF to animate an element

Always call renderNextFrame in ThreadedCompositor::requestDisplayRefreshMonitorUpdate()
so we have to process any pending layer flush request.

Reviewed by Žan Doberšek.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:


5:35 AM Changeset in webkit [233352] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

Layout Test compositing/animation/layer-for-filling-animation.html is a flaky failure


This test needed to be modified to account for the pending state being updated at a different time,
so we just wait a frame to ensure the animation is ended. See r233325.

  • compositing/animation/layer-for-filling-animation.html:
5:34 AM Changeset in webkit [233351] by graouts@webkit.org
  • 4 edits in trunk/LayoutTests

[mac][wk2] REGRESSION (Tiled Drawing): Some css3/ tests fail with fringing around tiled background-images that intersect tile boundaries

Unreviewed. This test has not been flaky on all ports by GTK for a long time.

  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/wincairo/TestExpectations:
12:55 AM Changeset in webkit [233350] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC] The static position for an out-of-flow box should include the previous sibling's collapsed margin

Reviewed by Antti Koivisto.

When computing the static position of an absolutely positioned box, we need to look at the previous sibling's bottom margin.
If the previous sibling happens to collapse its bottom margin with the parent's bottom margin, we still need to account for it
and compute the static vertical position as if the bottom margin was not collapsed.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeFloatingHeightAndMargin const):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):

  • layout/FormattingContextGeometry.cpp:


  • layout/LayoutContext.cpp:


  • layout/Verification.cpp:


  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeInFlowHeightAndMargin const):

  • layout/displaytree/DisplayBox.cpp:

(WebCore::Display::Box::nonCollapsedMarginBox const):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::nonCollapsedMarginTop const):
(WebCore::Display::Box::nonCollapsedMarginBottom const):

Jun 28, 2018:

10:45 PM Changeset in webkit [233349] by graouts@webkit.org
  • 8 edits
    4 adds in trunk

[Web Animations] Using a Web Animation leaks the Document

Reviewed by Dean Jackson.


Test: webanimations/leak-document-with-web-animation.html

We need to ensure that any remaining animation is cleared when the DocumentTimeline is detached from its Document.
We rename WebAnimation::prepareAnimationForRemoval() to WebAnimation::remove() since it really actively disassociates
the animation from its timeline.

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::removeAnimationsForElement): We no longer need the call to removeAnimation()
since the new WebAnimation::remove() method will also set the timeline to null which will eventually call
removeAnimation() on the disassociated timeline.

  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::prepareAnimationForRemoval): Deleted.

  • animation/DeclarativeAnimation.h:
  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::detachFromDocument): Call remove() on all known animations.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::remove): Set the timeline to null to fully disassociate this animation from its timeline.
(WebCore::WebAnimation::setTimeline): Factor the internal timeline-association code out of this JS API method so
that we can call this code without any JS-facing implications.
(WebCore::WebAnimation::prepareAnimationForRemoval): Deleted.

  • animation/WebAnimation.h:


Add a new test that creates an Animation object in JS within an iframe and checks that removing
the iframe clears its Document.

  • webanimations/leak-document-with-web-animation-expected.txt: Added.
  • webanimations/leak-document-with-web-animation.html: Added.
  • webanimations/resources/web-animation-leak-iframe.html: Added.
8:45 PM Changeset in webkit [233348] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Out-of-flow positioned height does not necessarily equal to "bottom - top".

Reviewed by Antti Koivisto.

According to the spec "For absolutely positioned elements, the used values of the vertical dimensions must satisfy this constraint:
'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom' = height of containing block"
With a non-auto "height" value, the bottom - top does not necessarily compute to the height of the element.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):

6:40 PM Changeset in webkit [233347] by msaboff@apple.com
  • 2 edits in trunk/Source/bmalloc

Disable IsoHeaps when Gigacage is off

Reviewed by Saam Barati.

If Gigacage is disabled, it may be due to lack of address space.
Therefore we should also turn off IsoHeaps since it uses more virtual
address space as well.

  • bmalloc/IsoTLS.cpp:


6:37 PM Changeset in webkit [233346] by msaboff@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

IsoCellSet::sweepToFreeList() not safe when Full GC in process

Reviewed by Mark Lam.

  • heap/IsoCellSet.cpp:

(JSC::IsoCellSet::sweepToFreeList): Changed the "stale marks logic" to match what
is in MarkedBlock::Handle::specializedSweep where it takes into account whether
or not we are in the process of marking during a full GC.

  • heap/MarkedBlock.h:
  • heap/MarkedBlockInlines.h:

(JSC::MarkedBlock::Handle::areMarksStaleForSweep): New helper.

6:19 PM Changeset in webkit [233345] by commit-queue@webkit.org
  • 6 edits in trunk

Find in page for typographic quotes does not find low (German) quotes

Patch by Olivia Barnett <obarnett@apple.com> on 2018-06-28
Reviewed by Tim Horton.

Added additional quote test to LayoutTests/fast/text/find-quotes.html.

Added functionality to replace German quotes when matching.

  • editing/TextIterator.cpp:



Patch by Olivia Barnett <obarnett@apple.com> on 2018-06-28
Reviewed by Tim Horton.

Added Unicode definitions for German quotation marks.

  • wtf/unicode/CharacterNames.h:


Patch by Olivia Barnett <obarnett@apple.com> on 2018-06-28
Reviewed by Tim Horton.

Added additional test for German quotes.

  • fast/text/find-quotes.html:
6:00 PM Changeset in webkit [233344] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Unreviewed test gardening.

  • platform/ios/TestExpectations:
5:53 PM Changeset in webkit [233343] by Alan Bujtas
  • 1 edit
    111 adds in trunk/LayoutTests

[LFC] Add block formatting only test cases

Reviewed by Antti Koivisto.

These tests are expected to generate the same tree output on every platform (no text, strictly block only).

  • fast/block/block-only/absolute-auto-with-sibling-margin-bottom-expected.txt: Added.
  • fast/block/block-only/absolute-auto-with-sibling-margin-bottom.html: Added.
  • fast/block/block-only/absolute-height-stretch-expected.txt: Added.
  • fast/block/block-only/absolute-height-stretch.html: Added.
  • fast/block/block-only/absolute-left-auto-expected.txt: Added.
  • fast/block/block-only/absolute-left-auto.html: Added.
  • fast/block/block-only/absolute-left-right-top-bottom-auto-expected.txt: Added.
  • fast/block/block-only/absolute-left-right-top-bottom-auto.html: Added.
  • fast/block/block-only/absolute-nested-expected.txt: Added.
  • fast/block/block-only/absolute-nested.html: Added.
  • fast/block/block-only/absolute-nested2-expected.txt: Added.
  • fast/block/block-only/absolute-nested2.html: Added.
  • fast/block/block-only/absolute-position-when-containing-block-is-not-in-the-formatting-context-expected.txt: Added.
  • fast/block/block-only/absolute-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
  • fast/block/block-only/absolute-position-when-containing-block-is-not-in-the-formatting-context2-expected.txt: Added.
  • fast/block/block-only/absolute-position-when-containing-block-is-not-in-the-formatting-context2.html: Added.
  • fast/block/block-only/absolute-simple-expected.txt: Added.
  • fast/block/block-only/absolute-simple.html: Added.
  • fast/block/block-only/absolute-width-shrink-to-fit-expected.txt: Added.
  • fast/block/block-only/absolute-width-shrink-to-fit.html: Added.
  • fast/block/block-only/absolute-width-stretch-expected.txt: Added.
  • fast/block/block-only/absolute-width-stretch.html: Added.
  • fast/block/block-only/absolute-with-static-block-position-nested-expected.txt: Added.
  • fast/block/block-only/absolute-with-static-block-position-nested.html: Added.
  • fast/block/block-only/almost-intruding-left-float-simple-expected.txt: Added.
  • fast/block/block-only/almost-intruding-left-float-simple.html: Added.
  • fast/block/block-only/border-simple-expected.txt: Added.
  • fast/block/block-only/border-simple.html: Added.
  • fast/block/block-only/fixed-nested-expected.txt: Added.
  • fast/block/block-only/fixed-nested.html: Added.
  • fast/block/block-only/float-left-when-container-has-padding-margin-expected.txt: Added.
  • fast/block/block-only/float-left-when-container-has-padding-margin.html: Added.
  • fast/block/block-only/floating-box-clear-both-simple-expected.txt: Added.
  • fast/block/block-only/floating-box-clear-both-simple.html: Added.
  • fast/block/block-only/floating-box-clear-right-simple-expected.txt: Added.
  • fast/block/block-only/floating-box-clear-right-simple.html: Added.
  • fast/block/block-only/floating-box-left-and-right-multiple-expected.txt: Added.
  • fast/block/block-only/floating-box-left-and-right-multiple-with-top-offset-expected.txt: Added.
  • fast/block/block-only/floating-box-left-and-right-multiple-with-top-offset.html: Added.
  • fast/block/block-only/floating-box-left-and-right-multiple.html: Added.
  • fast/block/block-only/floating-box-right-simple-expected.txt: Added.
  • fast/block/block-only/floating-box-right-simple.html: Added.
  • fast/block/block-only/floating-box-with-clear-siblings-expected.txt: Added.
  • fast/block/block-only/floating-box-with-clear-siblings.html: Added.
  • fast/block/block-only/floating-box-with-clear-simple-expected.txt: Added.
  • fast/block/block-only/floating-box-with-clear-simple.html: Added.
  • fast/block/block-only/floating-box-with-new-formatting-context-expected.txt: Added.
  • fast/block/block-only/floating-box-with-new-formatting-context.html: Added.
  • fast/block/block-only/floating-box-with-relative-positioned-sibling-expected.txt: Added.
  • fast/block/block-only/floating-box-with-relative-positioned-sibling.html: Added.
  • fast/block/block-only/floating-left-right-simple-expected.txt: Added.
  • fast/block/block-only/floating-left-right-simple.html: Added.
  • fast/block/block-only/floating-left-right-with-all-margins-expected.txt: Added.
  • fast/block/block-only/floating-left-right-with-all-margins.html: Added.
  • fast/block/block-only/floating-lefts-and-rights-simple-expected.txt: Added.
  • fast/block/block-only/floating-lefts-and-rights-simple.html: Added.
  • fast/block/block-only/floating-multiple-lefts-expected.txt: Added.
  • fast/block/block-only/floating-multiple-lefts-in-body-expected.txt: Added.
  • fast/block/block-only/floating-multiple-lefts-in-body.html: Added.
  • fast/block/block-only/floating-multiple-lefts-multiple-lines-expected.txt: Added.
  • fast/block/block-only/floating-multiple-lefts-multiple-lines.html: Added.
  • fast/block/block-only/floating-multiple-lefts.html: Added.
  • fast/block/block-only/floating-with-new-block-formatting-context-expected.txt: Added.
  • fast/block/block-only/floating-with-new-block-formatting-context.html: Added.
  • fast/block/block-only/margin-collapse-bottom-bottom-expected.txt: Added.
  • fast/block/block-only/margin-collapse-bottom-bottom.html: Added.
  • fast/block/block-only/margin-collapse-bottom-nested-expected.txt: Added.
  • fast/block/block-only/margin-collapse-bottom-nested.html: Added.
  • fast/block/block-only/margin-collapse-first-last-are-floating-expected.txt: Added.
  • fast/block/block-only/margin-collapse-first-last-are-floating.html: Added.
  • fast/block/block-only/margin-collapse-simple-expected.txt: Added.
  • fast/block/block-only/margin-collapse-simple.html: Added.
  • fast/block/block-only/margin-collapse-top-nested-expected.txt: Added.
  • fast/block/block-only/margin-collapse-top-nested.html: Added.
  • fast/block/block-only/margin-collapse-when-child-has-padding-border-expected.txt: Added.
  • fast/block/block-only/margin-collapse-when-child-has-padding-border.html: Added.
  • fast/block/block-only/margin-collapse-with-block-formatting-context-expected.txt: Added.
  • fast/block/block-only/margin-collapse-with-block-formatting-context.html: Added.
  • fast/block/block-only/margin-collapse-with-block-formatting-context2-expected.txt: Added.
  • fast/block/block-only/margin-collapse-with-block-formatting-context2.html: Added.
  • fast/block/block-only/margin-left-right-sizing-expected.txt: Added.
  • fast/block/block-only/margin-left-right-sizing-out-of-flow-expected.txt: Added.
  • fast/block/block-only/margin-left-right-sizing-out-of-flow.html: Added.
  • fast/block/block-only/margin-left-right-sizing.html: Added.
  • fast/block/block-only/margin-propagation-simple-content-height-expected.txt: Added.
  • fast/block/block-only/margin-propagation-simple-content-height.html: Added.
  • fast/block/block-only/margin-sibling-collapse-propagated-expected.txt: Added.
  • fast/block/block-only/margin-sibling-collapse-propagated.html: Added.
  • fast/block/block-only/margin-simple-expected.txt: Added.
  • fast/block/block-only/margin-simple.html: Added.
  • fast/block/block-only/negative-margin-simple-expected.txt: Added.
  • fast/block/block-only/negative-margin-simple.html: Added.
  • fast/block/block-only/padding-nested-expected.txt: Added.
  • fast/block/block-only/padding-nested.html: Added.
  • fast/block/block-only/padding-simple-expected.txt: Added.
  • fast/block/block-only/padding-simple.html: Added.
  • fast/block/block-only/relative-auto-expected.txt: Added.
  • fast/block/block-only/relative-auto-with-parent-offset-expected.txt: Added.
  • fast/block/block-only/relative-auto-with-parent-offset.html: Added.
  • fast/block/block-only/relative-auto.html: Added.
  • fast/block/block-only/relative-bottom-expected.txt: Added.
  • fast/block/block-only/relative-bottom.html: Added.
  • fast/block/block-only/relative-position-when-containing-block-is-not-in-the-formatting-context-expected.txt: Added.
  • fast/block/block-only/relative-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
  • fast/block/block-only/relative-right-expected.txt: Added.
  • fast/block/block-only/relative-right.html: Added.
  • fast/block/block-only/relative-siblings-expected.txt: Added.
  • fast/block/block-only/relative-siblings.html: Added.
  • fast/block/block-only/relative-simple-expected.txt: Added.
  • fast/block/block-only/relative-simple.html: Added.
5:05 PM Changeset in webkit [233342] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Make sure the WebResourceLoadStatisticsStore gets destroyed on the main thread

Reviewed by Youenn Fablet.

Have WebResourceLoadStatisticsStore subclass ThreadSafeRefCounted<WebResourceLoadStatisticsStore, WTF::DestructionThread::Main>
instead of IPC::Connection::WorkQueueMessageReceiver. This makes sure that the WebResourceLoadStatisticsStore
objects get destroyed on the main thread, even if the last ref was held by a background thread.

Also, methods called by IPC are now called on the main thread instead of the background queue. I think it is clearer for all
of WebResourceLoadStatisticsStore usage to be on the main thread. Expensive work is still done on the background queue, inside
the persistent / memory store classes.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:


  • UIProcess/WebResourceLoadStatisticsStore.h:
4:57 PM Changeset in webkit [233341] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

REGRESSION (233281): fast/dom/location-new-window-no-crash.html and some other tests are timing out

Reviewed by Zalan Bujtas.

We need still need to re-enable memory cache client calls even when not doing other post-resolution callbacks.

  • style/StyleTreeResolver.cpp:


Add a separate queue for this.


4:57 PM Changeset in webkit [233340] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

Add nullptr check for xpc_connection_t in AuthenticationManager::initializeConnection

Reviewed by Brent Fulgham.

In some rare cases as shown by crash tracers that the passed xpc_connection_t object could be nullptr,
and xpc_connection_set_event_handler won't do the nullptr check on its parameters. Therefore, we should
do it by ourselves.

  • Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:


  • UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:

(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc const):

4:52 PM Changeset in webkit [233339] by Wenson Hsieh
  • 18 edits in trunk

[iOS] DataTransfer.getData always returns the empty string when dropping text

Reviewed by Ryosuke Niwa.


Currently, DataTransfer.getData() always returns the empty string on drop. This is because all data on drop is
backed by local files in the temporary directory, so the number of files is never 0; this, combined with the
fact that WebKit will suppress access to the DataTransfer object if there is one or more file in the pasteboard,
means that getData() never works for drag and drop on iOS at the moment. To fix this, we need to know whether a
dropped item provider is a file.

Ideally, we'd have a flag to tell us whether or not an NSItemProvider being dropped is a file, or instead just
inline data - in fact, this flag already exists in the form of UIPreferredPresentationStyle. Unfortunately, not
all apps that vend draggable files specify this, so we can't simply ask the item provider whether it's intended
to be a file. As a workaround, we can use several heuristics to determine the "file content state" of the drag
pasteboard on iOS (see below for more details).

This patch adds some plumbing through the client layers to grab a list of item information describing each
dropped item provider on iOS. Using this information, we tweak the logic in Pasteboard::fileContentState to make
an educated guess at whether or not the pasteboard really contains files; if we determine that the pasteboard
probably contains no files, we'll allow DataTransfer.getData() to retrieve information from the pasteboard.
Otherwise, if the pasteboard may contain files, we'll fall back to our current behavior of including the "Files"
type in DataTransfer.types and allowing the page to grab file data using DataTransfer.files or

Tests: DataInteractionTests.DataTransferGetDataReadPlainAndRichText


  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::filesFromPasteboardAndItemList const):

Check Pasteboard::fileContentState() to ensure that we don't expose files when DataTransfer.types does not
contain the "Files" type, and vice versa, and DataTranser.files is also empty in this case.

  • dom/DataTransferItemList.cpp:
  • platform/PasteboardItemInfo.h:

Add a couple of additional members to PasteboardItemInfo: suggestedFileName and hasDeclaredNonTextType, a flag
that indicates whether or not the pasteboard item has a type representation that is a declared type, but is not
a text type (i.e. does not conform to "public.text", "public.url", or rich text format with attachment types).

(WebCore::PasteboardItemInfo::encode const):

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/cocoa/PasteboardCocoa.mm:


Instead of always considering a dropped item provider on iOS to represent a file, only do so if at least one of
the following conditions are met:

  • The drop session contains multiple item providers (flocking text selections is a very rare use case).
  • The item provider was explicitly marked as an attachment.
  • The item provider has a suggested file name.
  • The item provider has any other content that is not text.

In the case where none of the above conditions are met, the item provider (if it ends up being a file) is
essentially indistinguishable from inline data. An example of this is dropping a plain text file that is
unnamed, with no presentation style, and alongside no other items nor other known type representations. These
are cases in which whether the item is treated as a file or as inline data is (hopefully) irrelevant.

  • platform/ios/PlatformPasteboardIOS.mm:



Add plumbing to grab information for each item in the pasteboard. See WebCore ChangeLog for more detail.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:


  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:


  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:


Add plumbing to grab information for each item in the pasteboard. See WebCore ChangeLog for more detail.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:



Add 2 new API tests to verify that:

  • When dropping an item with text, markup, and URL representations, the page is allowed to get "text/html",

"text/plain" and "text/uri-list" data.

  • Adding a suggested name to a plain text item causes WebKit to treat it as a file, and suppress access to


Additionally tweaks a couple of existing API tests. Namely, in two API tests
(ExternalSourceOverrideDropFileUpload and ExternalSourceHTMLToUploadArea) only a markup string is dropped, and
we previously expected to handle the drop as a file. To allow this test to continue serving its purpose, tweak
them such that the registered items appear to be file-backed (i.e. by adding a suggested filename in one of the
tests, and specifying UIPreferredPresentationStyleAttachment in the other).

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:


4:23 PM Changeset in webkit [233338] by timothy@apple.com
  • 2 edits in trunk/Source/WebCore

Don't force black text when TextIndicator draws backgrounds or all content.

Reviewed by Tim Horton.

  • page/TextIndicator.cpp:

Only set SnapshotOptionsForceBlackText when TextIndicatorOptionRespectTextColor and
TextIndicatorOptionPaintBackgrounds are not set.

4:01 PM Changeset in webkit [233337] by Kocsen Chung
  • 7 edits in tags/Safari-606.1.23.1/Source


3:58 PM Changeset in webkit [233336] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.23.1

New tag.

3:45 PM Changeset in webkit [233335] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Early return when handling fetch event in case service worker origin does not match origin of a subresource load

Reviewed by Chris Dumez.

Stop crashing the service worker process in case a subresource load origin is not matching a service worker origin.
Instead, just return early so that the load will be handled by the network process.

Keep crashing in case a navigation load is not matching its service worker origin.
Add more logging to help with the debugging.

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:


3:38 PM Changeset in webkit [233334] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r213000): copy from Search results content view broken

Reviewed by Timothy Hatcher.

Since WI._copy listens for a copy event from the document, it is called
after CodeMirror handles the event and sets clipboard data. If WI._copy
finds a custom copy handler to call, that handler can determine whether
to overwrite the current clipboard data, or leave it alone.

SearchTabContentView's handleCopyEvent method should return early if the
content tree outline doesn't have the focus. This prevents the selection
in the TextEditor from being overwritten, without any special knowledge of
the content browser's current view.

  • UserInterface/Views/SearchTabContentView.js:


3:14 PM Changeset in webkit [233333] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Fix a bug ComponentBase that wrong content template may be used.

Reviewed by Ryosuke Niwa.

ComponentBase uses '_parsed' to mark whether content and style templates of a class
is parsed. However, derived class parsing will be skipped as 'Derive._parsed' is available
via prototype chain whenever the base class is parsed.

  • browser-tests/component-base-tests.js: Added unit tests.
  • public/v3/components/base.js: Added 'hasOwnProperty' to make sure current class is parsed.


3:13 PM Changeset in webkit [233332] by Basuke Suzuki
  • 4 edits in trunk/Tools

Unreviewed, rolling out r226652.

"PlatformInfo should never be instantiated in isolation. So, PlatformInfo should
not have default argument values. The preferred way to get a PlatformInfo object
is to instantiate a Host object." (Requested by dbates).

Reverted changeset:

"[webkitpy] PlatformInfo should have default argument for casual use"

2:55 PM Changeset in webkit [233331] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Fullscreen exits when placeholder is removed then added during a single runloop.

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-06-28
Reviewed by Jer Noble.

Instead of closing fullscreen as soon as the placeholder is removed from the view hierarchy,
give the placeholder until the next runloop to be re-added to the view hierarchy.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullScreenWindowController placeholderWillMoveToSuperview:]):

2:54 PM Changeset in webkit [233330] by Simon Fraser
  • 2 edits in trunk/Tools

Try to address test failures on the bots.

Allow the test to distinguish between a failure to find the variable, and an error
reporting vector capacity.

  • lldb/lldb_webkit_unittest.py:


2:48 PM Changeset in webkit [233329] by timothy@apple.com
  • 7 edits in trunk

Find on page selection color isn't adapted for dark mode.

Unreviewed, revert part of r233280.

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Use pure yellow again.



Unreviewed test gardening.

  • fast/css/apple-system-control-colors-expected.txt: Use pure yellow for find.
  • fast/text/mark-matches-broken-line-rendering-expected.html:
  • fast/text/mark-matches-rendering-expected.html:

Use -apple-system-find-highlight-background to work on all macOS versions.

  • platform/mac-sierra/fast/css/apple-system-control-colors-expected.txt: Use pure yellow for find.
2:23 PM Changeset in webkit [233328] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Handle the case of registerMDNSNameCallback called several times

Reviewed by Eric Carlson.

This is a speculative fix on the basis that registerMDNSNameCallback may be called several times.
In that case, we would have freed the context after the first call and would reuse it for the second call.

Instead, keep a map of pending requests and pass to registerMDNSNameCallback an identifier to that map.
If the map has no value for that identifier, return early.

  • NetworkProcess/webrtc/NetworkMDNSRegister.cpp:


  • NetworkProcess/webrtc/NetworkMDNSRegister.h:

(): Deleted.

2:21 PM Changeset in webkit [233327] by Jonathan Bedard
  • 4 edits in trunk/Source/WebCore/PAL

Build fix (2) after r233266

Unreviewed build fix.

  • pal/cf/CoreMediaSoftLink.cpp: Distinguish between IOS and MINIMAL_SIMULATOR.
  • pal/cf/CoreMediaSoftLink.h: Ditto.
  • pal/spi/cocoa/LaunchServicesSPI.h: LSApplicationProxy should be conditionalized on HAVE(APP_LINKS).
2:15 PM Changeset in webkit [233326] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

MeasurementSetAnalyzer should check triggerable availability before creating confirming A/B tests.

Reviewed by Ryosuke Niwa.

If the triggerable is not available, MeasurmentSetAnalyzer should only create analysis task without
confirming A/B tests.

  • tools/js/measurement-set-analyzer.js: Added logic to check triggerable availability.


  • unit-tests/measurement-set-analyzer-tests.js: Updated unit tests and added a new unit test for this change.
2:13 PM Changeset in webkit [233325] by graouts@webkit.org
  • 10 edits in trunk

[Web Animations] Make imported/mozilla/css-animations/test_animation-starttime.html pass reliably

Reviewed by Dean Jackson.


Mark progressions in the Mozilla CSS Animations tests.

  • css-animations/test_animation-starttime-expected.txt:


We need to run pending tasks in the "update animations" procedure to ensure that the start time has been set
to a different time than the timeline time at the time the animation was asked to play(). This ensure the
timeline current time has progressed and can be queried to a different value in a requestAnimationFrame()

When invalidating events, we need to make sure we disregard instances when an animation has and is still pending
so that we wait until we change the pending state to work out which events to enqueue.

  • animation/DeclarativeAnimation.cpp:


  • animation/DocumentTimeline.cpp:


  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::timeToNextRequiredTick const):

  • animation/WebAnimation.h:


This test now passes reliably so we remove any specific expectation. Another test needed to be modified to account for
the pending state being updated at a different time, so we just wait a frame to ensure the animation is started.

2:00 PM Changeset in webkit [233324] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebCore

Release assert in ScriptController::canExecuteScripts via WebCore::SVGUseElement::insertedIntoAncestor

Reviewed by Zalan Bujtas.

The bug was caused by SVGUseElement::notifyFinished firing a DOM event via SVGUseElement::updateExternalDocument
inside SVGUseElement::insertedIntoAncestor. Ideally, we make every call to notifyFinished asynchronous
but simply delay the call to updateExternalDocument() until didFinishInsertingNode() for now.

No new tests since the failure is caught with the newly added assertion in notifyFinished by existing SVG tests
such as svg/batik/filters/filterRegions.svg and svg/batik/text/smallFonts.svg. Unfortunately, I could not
construct a test case which hits this release assertion since the real crash happens when the cached resource
had an error but in the all cases I could find, the resource response with an error results in a reload or
an asynchronous failure callback.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::didAddClient): Added a FIXME.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::insertedIntoAncestor): Delay the call to updateExternalDocument.
(WebCore::SVGUseElement::didFinishInsertingNode): Invoke updateExternalDocument.
(WebCore::SVGUseElement::notifyFinished): Added an assertion.

  • svg/SVGUseElement.h:
1:59 PM Changeset in webkit [233323] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed attempt to fix Win Cairo build after r233310.

  • UIProcess/WebResourceLoadStatisticsStore.h:
1:58 PM Changeset in webkit [233322] by Lucas Forschler
  • 2 edits in trunk/Tools

Teach Windows EWS bots to use WEBKIT_API_KEY.

1:52 PM Changeset in webkit [233321] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed attempt to fix Win Cairo build after r233310.

  • UIProcess/WebResourceLoadStatisticsStore.h:
1:17 PM Changeset in webkit [233320] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r233309.

Invalidates previous database model without versioning

Reverted changeset:

"Fix encoding / decoding issues in ResourceLoadStatistics"

1:09 PM Changeset in webkit [233319] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Split memory store logic out of WebResourceLoadStatisticsStore to clarify threading model

Unreviewed, temporarily disable main thread assertion added to flushAndDestroyPersistentStore()
in r233310, until Bug 187143 is fixed.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:


12:52 PM Changeset in webkit [233318] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

[ews-build] Add support for WebKitPy-Tests-EWS

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/factories.py: Added WebKitPyFactory.
  • BuildSlaveSupport/ews-build/steps.py: Added build step RunWebKitPyTests.
  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
  • BuildSlaveSupport/ews-build/config.json: Updated to use CamelCase.
12:42 PM Changeset in webkit [233317] by youenn@apple.com
  • 2 edits
    1 add in trunk/Source/WebKit

Add sandbox to microdone plugin

Reviewed by Brent Fulgham.

  • Resources/PlugInSandboxProfiles/cn.microdone.cmb.safari: Added.
  • WebKit.xcodeproj/project.pbxproj:
12:14 PM Changeset in webkit [233316] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Web Inspector: REGRESSION(r223770): "Open Link" context menu action on a linkified URL doesn't work

Reviewed by Joseph Pecoraro.

When Web Inspector's page receives a navigation request, it's supposed to redirect any
non-Inspector navigations to be loaded in the inspected page. When I refactored to use
modern a policy delegate, the one line that redirects the loads was left out.

No new tests, because inspector tests can't navigate the inspector or inspected pages.

  • UIProcess/mac/WKInspectorViewController.mm:

(-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):

11:51 AM Changeset in webkit [233315] by timothy@apple.com
  • 6 edits in trunk/Source/WebCore

Focus ring color does not honor dark mode or system accent color.

Reviewed by Tim Horton.

Pass the focus ring color through to the GraphicsContext methods that draw it.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::GraphicsContext::focusRingColor): Deleted.

  • platform/mac/ThemeMac.mm:


  • rendering/RenderElement.cpp:


  • rendering/RenderImage.cpp:


11:36 AM Changeset in webkit [233314] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Crash when _topConstraint is null in element fullscreen.

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

NSArray can't contain a null pointer, so check for null before creating an array from a pointer.
Use the recommended +deactivateConstraints: instead of -removeConstraints:.

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(-[WKFullScreenViewController showUI]):
(-[WKFullScreenViewController hideUI]):

10:35 AM Changeset in webkit [233313] by dbates@webkit.org
  • 2 edits in trunk/Tools

Fix the iOS build following r233299

Only build lldbWebKitTester on Mac as that is the only supported platform at the time of writing.

  • Makefile:
10:24 AM Changeset in webkit [233312] by jer.noble@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening; media/video-buffering-allowed.html is flakey due to not completing in time.

Remove the artificial early timeout (1s) in this test.

  • media/video-buffering-allowed.html:
10:12 AM Changeset in webkit [233311] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (r232040): Cursor jumping in Safari text fields

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-06-28
Reviewed by Tim Horton.


r232040 enabled click events to fire on nodes that are already being edited in
iOS. This resulted FrameSelection::setSelection being called twice. One call
originated from the UIWKTextInteractionAssistant, which snaps the caret to word
boundaries. The other call originates from handleMousePressEvent in EventHandler,
and uses character boundaries. Consequently, we see the caret jumping around.

To fix this issue, an early return was added in the handleMousePressEvent
codepath, which prevents FrameSelection::setSelection from being called when
clicking on a node that is already being edited. This ensures that the
UIWKTextInteractionAssistant codepath is the only influence on the caret position.

Test: fast/events/ios/click-selectionchange-once.html

  • page/EventHandler.cpp:



Added test to ensure that the 'selectionchange' event is only fired once per
click in an editable node.

  • fast/events/ios/click-selectionchange-once-expected.txt: Added.
  • fast/events/ios/click-selectionchange-once.html: Added.
10:07 AM Changeset in webkit [233310] by Chris Dumez
  • 9 edits
    1 move
    2 adds in trunk/Source/WebKit

Split memory store logic out of WebResourceLoadStatisticsStore to clarify threading model

Reviewed by Brent Fulgham.

Split memory store logic out of WebResourceLoadStatisticsStore and into a ResourceLoadStatisticsMemoryStore class
to clarify the threading model. Previously, some of the methods of the WebResourceLoadStatisticsStore had to be
called on the main thread and some of them on the background queue, which was confusing and error prone. Now,
all WebResourceLoadStatisticsStore methods (except for IPC ones which will be addressed in a follow-up) are called
on the main thread. The ResourceLoadStatisticsMemoryStore objects is constructed / used and destroyed on the
background queue, similarly to the ResourceLoadStatisticsPersistentStore. The WebResourceLoadStatisticsStore
objects merely proxies calls from WebKit to those persistent / memory stores and takes care of hopping back and
forth between the background thread and the work queue.

While spliting code code, I found several instances where we were calling completion handlers on the wrong thread.
I fixed those in this patch now that the model is clearer.

We can likely clean up (organize the code a bit better) in a follow-up). This patch takes care of splitting the
code as it was. Code that was called on the background queue was moved to ResourceLoadStatisticsMemoryStore class
and code that was called on the main thread stays in WebResourceLoadStatisticsStore.

  • CMakeLists.txt:
  • UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm: Renamed from Source/WebKit/UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm.


  • UIProcess/ResourceLoadStatisticsMemoryStore.cpp: Added.

(WebKit::OperatingDate::secondsSinceEpoch const):
(WebKit::OperatingDate::operator== const):
(WebKit::OperatingDate::operator< const):
(WebKit::OperatingDate::operator<= const):
(WebKit::ResourceLoadStatisticsMemoryStore::isPrevalentResource const):
(WebKit::ResourceLoadStatisticsMemoryStore::isVeryPrevalentResource const):
(WebKit::ResourceLoadStatisticsMemoryStore::isGrandfathered const):
(WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveDataRecords const):
(WebKit::ResourceLoadStatisticsMemoryStore::createEncoderFromData const):
(WebKit::ResourceLoadStatisticsMemoryStore::processStatistics const):
(WebKit::ResourceLoadStatisticsMemoryStore::hasHadUnexpiredRecentUserInteraction const):
(WebKit::ResourceLoadStatisticsMemoryStore::hasStatisticsExpired const):

  • UIProcess/ResourceLoadStatisticsMemoryStore.h: Added.

(WebKit::ResourceLoadStatisticsMemoryStore::isEmpty const):

  • UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:


  • UIProcess/ResourceLoadStatisticsPersistentStorage.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:


  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebResourceLoadStatisticsTelemetry.cpp:


  • UIProcess/WebResourceLoadStatisticsTelemetry.h:
  • WebKit.xcodeproj/project.pbxproj:
10:07 AM Changeset in webkit [233309] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Fix encoding / decoding issues in ResourceLoadStatistics

Reviewed by Brent Fulgham.

  • loader/ResourceLoadStatistics.cpp:

Do not return early if the container we're trying to encode is empty. Instead,
have the encoder encode an empty array. This is important for encoding / decoding
to be fully symmetric. Otherwise, when trying to decode one of these empty containers,
the decoder would fail (silently since we were ignoring decoding errors). Worse, the
decoder might succeed but actually be decoding the *next* container in the file, since
we have several HashCountedSets / HashSets encoded one after another.

Return a boolean to indicate if the decoding suceeded or not.

Check for container decoding errors and return false when decoding fails.
Otherwise, we would just silently keep going.

10:03 AM Changeset in webkit [233308] by sihui_liu@apple.com
  • 4 edits in trunk

Cookie API: cookie creation time is wrong

Reviewed by Geoffrey Garen.


Covered by API test: WebKit.WKHTTPCookieStoreCreationTime.

  • platform/network/cocoa/CookieCocoa.mm:

(WebCore::Cookie::operator NSHTTPCookie * _Nullable const):


Add test coverage: make sure the cookie creation time returned is the same as set.

  • TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:


8:42 AM Changeset in webkit [233307] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC] Add Display::Box::nonCollapsedMarginBox for verification purposes.

Reviewed by Antti Koivisto.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeFloatingHeightAndMargin const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):

  • layout/Verification.cpp:


  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeInFlowHeightAndMargin const):

  • layout/displaytree/DisplayBox.cpp:

(WebCore::Display::Box::nonCollapsedMarginBox const):

  • layout/displaytree/DisplayBox.h:


8:37 AM Changeset in webkit [233306] by Simon Fraser
  • 4 edits in trunk/Tools

The lldb vector summary provider always shows zero capacity

Reviewed by Daniel Bates.

WTFVectorProvider in lldb_webkit.py was calling GetChildMemberWithName('m_capacity')
on the buffer instead of the valobj.

  • lldb/lldbWebKitTester/main.cpp:


  • lldb/lldb_webkit.py:


  • lldb/lldb_webkit_unittest.py:


8:35 AM Changeset in webkit [233305] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

[GTK] ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) when dragging file into webview

Reviewed by Carlos Garcia Campos.

We check using the GdkDragContext to ensure the DroppingContext is still alive (present in
m_droppingContexts), but access it via the pointer to the DroppingContext that could be
dangling. This happens on every drag. I can't actually reproduce the original assertion
since I'm currently working with an asan build, but I imagine it's probably the same issue
that I'm fixing here.

  • UIProcess/gtk/DragAndDropHandler.cpp:


7:35 AM Changeset in webkit [233304] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] The margin bottom of the document element does not collapse with its last inflow child's bottom margin.

Reviewed by Antti Koivisto.

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockFormattingContextGeometry.cpp:


  • layout/blockformatting/BlockMarginCollapse.cpp:


1:02 AM Changeset in webkit [233303] by abarth@webkit.org
  • 5 edits
    1 delete in trunk

Switch OS(FUCHSIA) to using JSCOnly

Reviewed by Yusuke Suzuki.


Rather than creating a Fuchsia port, OS(FUCHSIA) now uses the JSCOnly

  • CMakeLists.txt: Set the WTF_OS_FUCHSIA flag
  • Source/cmake/OptionsFuchsia.cmake: Removed.
  • Source/cmake/OptionsJSCOnly.cmake: Temporarily disable ICU for

OS(FUCHSIA). We'll get ICU wired in, but I'd like to work through the
other compile errors first.


Switch Fuchsia from being a port to just being an OS. We now use a
CMAKE_TOOLCHAIN_FILE to configure the toolchain and the target triple.

  • Scripts/webkitdirs.pm: Remove isFuchsia() and clients. Turns out we

can do everything we need using a CMAKE_TOOLCHAIN_FILE via the
--cmakeargs flag.

12:55 AM Fuchsia edited by abarth@webkit.org
12:37 AM Changeset in webkit [233302] by krit@webkit.org
  • 16 edits
    6 copies
    2 adds in trunk

[css-masking] Update clip-path box mapping to unified box

Reviewed by Simon Fraser.


The box mapping for fill-box, stroke-box, view-box on HTML elements
and content-box, padding-box, margin-box, border-box for SVG elements
was aligned with the transform-box CSS property.

Furthermore, the keywords fill changed to fill-box and stroke changed
to stroke-box.


Update the -webkit-clip-path property.

Tests: svg/clip-path/clip-path-shape-border-box-expected.svg


  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::operator CSSBoxType const):

  • css/CSSValueKeywords.in:
  • css/StyleBuilderConverter.h:


  • css/parser/CSSPropertyParser.cpp:


  • rendering/RenderBlock.cpp:


  • rendering/RenderLayer.cpp:


  • rendering/shapes/BoxShape.cpp:


  • rendering/shapes/ShapeOutsideInfo.cpp:

(WebCore::ShapeOutsideInfo::logicalTopOffset const):
(WebCore::ShapeOutsideInfo::logicalLeftOffset const):

  • rendering/style/RenderStyleConstants.h:
  • rendering/svg/SVGRenderingContext.cpp:



Update existing tests and add new tests to check the slightly different behavior.

  • fast/masking/parsing-clip-path-shape-expected.txt:
  • fast/masking/parsing-clip-path-shape.html:
  • svg/clip-path/clip-path-shape-border-box-expected.svg: Added.
  • svg/clip-path/clip-path-shape-border-box.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-stroke.svg.
  • svg/clip-path/clip-path-shape-content-box-expected.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-fill.svg.
  • svg/clip-path/clip-path-shape-content-box.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-fill.svg.
  • svg/clip-path/clip-path-shape-fill.svg:
  • svg/clip-path/clip-path-shape-margin-box-expected.svg: Added.
  • svg/clip-path/clip-path-shape-margin-box.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-stroke.svg.
  • svg/clip-path/clip-path-shape-padding-box-expected.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-fill.svg.
  • svg/clip-path/clip-path-shape-padding-box.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-fill.svg.
  • svg/clip-path/clip-path-shape-stroke.svg:
12:27 AM Changeset in webkit [233301] by rniwa@webkit.org
  • 2 edits in trunk/Tools

Make MotionMark's plan file more robust against code changes

Reviewed by Saam Barati.

Moved the code to auto-start the test to the load event listener.

  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/MotionMark.patch:
12:15 AM WikiStart edited by abarth@webkit.org

Jun 27, 2018:

11:55 PM Fuchsia edited by abarth@webkit.org
9:46 PM Fuchsia edited by abarth@webkit.org
9:45 PM Fuchsia created by abarth@webkit.org
9:25 PM Changeset in webkit [233300] by timothy@apple.com
  • 5 edits in trunk/Source

Don't expose new semantic -apple-system color keywords on iOS.

Reviewed by Tim Horton.

  • DerivedSources.make: Use gnu++14, since gnu++17 is giving errors on macOS 10.12.


  • css/CSSValueKeywords.in: Define new semantic colors only on macOS.
9:19 PM Changeset in webkit [233299] by dbates@webkit.org
  • 6 edits
    11 adds in trunk/Tools

Add some tests for lldb_webkit.py

Reviewed by Alexey Proskuryakov.

Adds some tests to ensure we do not regress LLDB pretty-printing of WTF::StringImpl
and WTF::String objects.

The tests make use of the LLDB Python API (lldb.py) and a simple debug-built test
program, lldbWebKitTester, to run. For now, we only support building lldbWebKitTester
on Mac.

  • Makefile: Build the simple test tool lldbWebKitTester on Mac.
  • Scripts/build-lldbwebkittester: Added.


  • Scripts/dump-class-layout: Extract logic to compute the path to the LLDB Python module

from here to Scripts/webkitpy/common/system/systemhost.py so that it can used by both
this script and lldb/lldb_webkit_unittest.py. Also import the lldb module at the top of
the file and take advantage of Python's default error semantics to throw an exception
if the import fails instead of handling it ourself. This has the side effect that we
now always import the LLDB Python module even if this script is invoked with --help.
If this turns out to be a significant annoyance then we can look to dynamically import
the module as we did before this change.
(developer_dir): Deleted.
(import_lldb): Deleted.

  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py: Update FIXME comment to reflect

that fact that test-webkitpy does not support class and module fixtures. This is because
test-webkitpy currently implements parallelism by breaking down existing test classes
into individual test methods itself and having each worker run exactly one test method (via
unittest.TestLoader.loadTestsFromName()) at a time. As a result of this reorganization,
setUpModule()/setUpClass() are called for each test method as opposed to once per test
class/test module.
(remove_dir): Ditto.

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

(SystemHost.path_to_lldb_python_directory): Added.

  • Scripts/webkitpy/test/main.py:

(_find_lldb_webkit_tester): Returns whether there exists a Debug or Release-built lldbWebKitTester.
(_build_lldb_webkit_tester): Builds lldbWebKitTester. For now, we only support building
lldbWebKitTester on Mac.
(main): Add Tools/lldb to the test search path if the platform has lldb.py.
(Tester.run): Pass a boolean as to whether we will run the lldb_webkit unit tests.
(Tester._run_tests): Modified to take a boolean as to whether to run the lldb_webkit unit tests.
If we will run these tests then build lldbWebKitTester if it has not already been built as the
unit tests depend on this program.

  • lldb/lldbWebKitTester/Configurations/Base.xcconfig: Added.
  • lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: Added.
  • lldb/lldbWebKitTester/Configurations/lldbWebKitTester.xcconfig: Added.
  • lldb/lldbWebKitTester/Makefile: Added.
  • lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Added.
  • lldb/lldbWebKitTester/main.cpp: Added.


  • lldb/lldb_webkit_unittest.py: Added.


8:05 PM Changeset in webkit [233298] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC] Compute both the collapsed and the non-collapsed margin values.

Reviewed by Antti Koivisto.

For validation purposes only at this point.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeFloatingHeightAndMargin const):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:


  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeInFlowHeightAndMargin const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:


  • layout/blockformatting/BlockMarginCollapse.cpp:


6:57 PM Changeset in webkit [233297] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Align inFlowNonReplacedHeightAndMargin() style with the rest of the compute functions.

Reviewed by Antti Koivisto.

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:


6:29 PM Changeset in webkit [233296] by Megan Gardner
  • 7 edits in trunk/Source/WebKit

Fix IBeam issues with iPad apps on Mac

Reviewed by Wenson Hsieh.

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):

Add functionality to determine what a caret rect should be, but as it is
expensive, it should only be done for this platform.

  • Shared/ios/InteractionInformationRequest.cpp:


  • Shared/ios/InteractionInformationRequest.h:

As there is no way to premptively request information on hover, we need to use
the last cached information, but only if it is close to the point we are about
to request information for. So having a way to determine if a point is very close
to a previous point is a good idea.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _currentPositionInformationIsApproximateForRequest:]):
(-[WKContentView closestPositionToPoint:]):

UIKit is using this function to determine if we should show an Ibeam or not.
So we need to implement it, at least for this platform.

  • WebProcess/WebPage/ios/WebPageIOS.mm:


Pass up the calculated caret rect, but only for iPad apps on Mac.

6:10 PM Changeset in webkit [233295] by Yusuke Suzuki
  • 4 edits in trunk/Source

[GTK][WPE] Use LazyNeverDestroyed<XErrorTrapper> to remove static initializers

Reviewed by Michael Catanzaro.


Do not allow copying since XErrorTrapper's logic relies on the address of XErrorTrapper.

  • platform/graphics/x11/XErrorTrapper.h:


Use LazyNeverDestroyed<XErrorTrapper> instead of global std::unique_ptr<XErrorTrapper>.
Since this variable's exit time destructor is not important in this code, using
LazyNeverDestroyed<XErrorTrapper> is fine. This removes the last static initializer
of libwebkit2gtk.so.

  • PluginProcess/unix/PluginProcessMainUnix.cpp:
6:04 PM Changeset in webkit [233294] by abarth@webkit.org
  • 4 edits
    1 add in trunk

Add Fuchsia support to build-jsc

Reviewed by Yusuke Suzuki.


Add Fuchsia port to cmake build system. After this patch, the build
errors out due to a missing sysroot.

  • CMakeLists.txt:
  • Source/cmake/OptionsFuchsia.cmake: Added.


Add Fuchsia port to webkitdirs.pm. This patch is sufficient to make
build-jsc kick off a cmake for Fuchsia.

  • Scripts/webkitdirs.pm:


5:32 PM Changeset in webkit [233293] by Kocsen Chung
  • 2 edits in tags/Safari-606.1.23/Source/WebCore

Cherry-pick r233279. rdar://problem/41539197

Crash under SWServer::unregisterServiceWorkerClient()

Reviewed by Youenn Fablet.

Connections are usually destroyed before their SWServer. However, as per crash traces, it is possible
for SWServers to get destroyed while they still have connections. When this happens, the connections
(which are owned by the SWServer) get destroyed with other SWServer data members. In turn, the
connection destructor tries to unregister its clients from the server that is currently being destroyed.

To address the issue, the SWServer destructor now destroys remaining connections early, before SWServer's
other data members get destroyed.

  • workers/service/server/SWServer.cpp: (WebCore::SWServer::~SWServer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233279 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5:25 PM Changeset in webkit [233292] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark imported/blink/storage/indexeddb/blob-delete-objectstore-db.html as flaky.

Unreviewed test gardening.

5:18 PM Changeset in webkit [233291] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add some more register state information when we crash in repatchPutById

Reviewed by Mark Lam.

This will help us gather info when we end up seeing a ObjectPropertyConditionSet
with an offset that is different than what the put tells us.

  • jit/Repatch.cpp:


5:15 PM Changeset in webkit [233290] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

Rebase LayoutTests/http/tests/contentextensions/subresource-redirect-blocked-expected.txt after r233269


  • http/tests/contentextensions/subresource-redirect-blocked-expected.txt:
4:46 PM Changeset in webkit [233289] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] Align inFlowNonReplacedWidthAndMargin() style with the rest of the compute functions.

Reviewed by Antti Koivisto.

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:


4:43 PM Changeset in webkit [233288] by dbates@webkit.org
  • 4 edits in trunk/Tools

style-queue "AttributeError: 'NoneType' object has no attribute 'is_obsolete'" when processing security patch

Reviewed by David Kilzer.

Teach the style queue how to refetch a patch from the status server as we did for non-Style
EWS queues.

  • Scripts/webkitpy/tool/bot/stylequeuetask.py:

(StyleQueueTask.validate): Similar to change made to EarlyWarningSystemTask.validate() in r233107,
only check if the bug associated with the patch we are processing is closed if the attachment has a
non-None Bug object.

  • Scripts/webkitpy/tool/commands/earlywarningsystem.py:

(AbstractEarlyWarningSystem.refetch_patch): Extract logic to refetch a patch from here...

  • Scripts/webkitpy/tool/commands/queues.py:

(PatchProcessingQueue._refetch_patch): ... to here.
(StyleQueue.refetch_patch): Turn around and call PatchProcessingQueue._refetch_patch().

4:28 PM Changeset in webkit [233287] by krit@webkit.org
  • 5 edits
    2 adds in trunk

-webkit-clip-path wrong offset for clipPath references

Reviewed by Simon Fraser.


Compute the correct offset for reference clip-paths by reusing
some of the logic from basic shapes.
Makes reference based clip-path interoperable and follows the

Test: css3/masking/clip-path-reference-2.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::computeClipPath const):


Add test for reference clip-path offset. Correct a broken test.
All tests in the repo for references are interoperable between Gecko, Blink
and WebKit now.

  • css3/masking/clip-path-reference-2-expected.html: Added.
  • css3/masking/clip-path-reference-2.html: Added.
  • css3/masking/clip-path-reference-userSpaceOnUse-expected.html:
  • css3/masking/clip-path-reference-userSpaceOnUse.html:
4:22 PM Changeset in webkit [233286] by Tadeu Zagallo
  • 2 edits in trunk/Tools

Unreviewed, add myself as a WebKit committer.

  • Scripts/webkitpy/common/config/contributors.json:
4:13 PM Changeset in webkit [233285] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix a bug in $vm.callFrame() and apply previously requested renaming of $vm.println to print.

Reviewed by Keith Miller.

$vm.callFrame()'s JSDollarVMCallFrame::finishCreation()
should be checking for codeBlock instead of !codeBlock
before using the codeBlock.

I also renamed some other "print" functions to use "dump" instead
to match their underlying C++ code that they will call e.g.

  • tools/JSDollarVM.cpp:

(JSC::functionPrintSourceFor): Deleted.
(JSC::functionPrintBytecodeFor): Deleted.
(JSC::doPrintln): Deleted.
(JSC::functionPrintln): Deleted.
(JSC::functionPrintCallFrame): Deleted.
(JSC::functionPrintStack): Deleted.

  • tools/VMInspector.cpp:

(JSC::DumpFrameFunctor::operator() const):
(JSC::PrintFrameFunctor::PrintFrameFunctor): Deleted.
(JSC::PrintFrameFunctor::operator() const): Deleted.
(JSC::VMInspector::printCallFrame): Deleted.
(JSC::VMInspector::printStack): Deleted.
(JSC::VMInspector::printValue): Deleted.

  • tools/VMInspector.h:
3:53 PM Changeset in webkit [233284] by youenn@apple.com
  • 2 edits
    8 adds in trunk/Source/WebKit

Add a sandbox profile for some additional bank plugins

Reviewed by Brent Fulgham.

  • Resources/PlugInSandboxProfiles/cfca.com.npCryptoKit.CGB.MAC.sb: Added.
  • Resources/PlugInSandboxProfiles/cfca.com.npP11CertEnroll.MAC.CGB.sb: Added.
  • Resources/PlugInSandboxProfiles/com.apple.BocomSubmitCtrl.sb: Added.
  • Resources/PlugInSandboxProfiles/com.apple.NPSafeInput.sb: Added.
  • Resources/PlugInSandboxProfiles/com.apple.NPSafeSubmit.sb: Added.
  • Resources/PlugInSandboxProfiles/com.cfca.npSecEditCtl.MAC.BOC.plugin.sb: Added.
  • Resources/PlugInSandboxProfiles/com.cmbchina.CMBSecurity.sb: Added.
  • Resources/PlugInSandboxProfiles/com.ftsafe.NPAPI-Core-Safe-SoftKeybaord.plugin.rfc1034identifier.sb: Added.
  • WebKit.xcodeproj/project.pbxproj:
3:49 PM Changeset in webkit [233283] by Jonathan Bedard
  • 3 edits in trunk/Source/WebCore/PAL

Build fix after r233266

Unreviewed build fix.

  • pal/cf/CoreMediaSoftLink.cpp: Do not soft-link CMSampleBufferCallForEachSample for

iOS 12 and up on iPhone device and simulator.

  • pal/cf/CoreMediaSoftLink.h: Ditto.
3:43 PM Changeset in webkit [233282] by bshafiei@apple.com
  • 7 edits in trunk/Source


3:25 PM Changeset in webkit [233281] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Don't invoke post resolution callbacks when resolving computed style

Reviewed by Geoff Garen.


Post-resolution callbacks should only be invoked when we resolve the full document style,
not when resolving computed style for a single element.

Tests: fast/dom/object-computed-style-event.html

  • dom/Document.cpp:


  • dom/Element.cpp:


Also ref the ancestor stack to be safe.

  • style/StyleTreeResolver.cpp:


Add an option to not drain the callback queue on destruction. In this mode we
just block network loads.

  • style/StyleTreeResolver.h:


  • fast/dom/object-computed-style-event-expected.txt: Added.
  • fast/dom/object-computed-style-event.html: Added.
3:14 PM Changeset in webkit [233280] by timothy@apple.com
  • 13 edits in trunk

Find on page selection color isn't adapted for dark mode.

Reviewed by Tim Horton.


  • page/mac/TextIndicatorWindow.mm:

(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Use [NSColor findHighlightColor].

  • platform/mac/LocalDefaultSystemAppearance.h:

(WebCore::LocalDefaultSystemAppearance::usingDarkAppearance const): Added.

  • platform/mac/LocalDefaultSystemAppearance.mm:

(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance): Set m_usingDarkAppearance.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paintPlatformDocumentMarkers): Use TextPaintPhase::Decoration since this
matches step three of InlineTextBox::paint ("Paint fancy decorations"). This allows TextMatch to
paint a forground and not end up painting during this "fancy decorations" phase.
(WebCore::InlineTextBox::resolveStyleForMarkedText): Set the fillColor for TextMarker to force a
dark text color which will draw over the yellow highlight.
(WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers): Added support for TextPaintPhase::Decoration.
Seperate DocumentMarker::TelephoneNumber and DocumentMarker::TextMatch. Have DocumentMarker::TextMatch
support Forground and Background phases.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::activeTextSearchHighlightColor const): Added. Call the platfrom version.
(WebCore::RenderTheme::inactiveTextSearchHighlightColor const): Added. Ditto.
(WebCore::RenderTheme::platformActiveTextSearchHighlightColor const): Added StyleColor::Options.
(WebCore::RenderTheme::platformInactiveTextSearchHighlightColor const): Ditto.

  • rendering/RenderTheme.h:
  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Added.
(WebCore::RenderThemeMac::platformInactiveTextSearchHighlightColor const): Added.
(WebCore::RenderThemeMac::platformColorsDidChange): Clear new color caches.
(WebCore::RenderThemeMac::systemColor const): Cache system colors by light and dark mode.


  • fast/css/apple-system-control-colors-expected.txt: Updated.
  • fast/text/mark-matches-broken-line-rendering-expected.html: Ditto.
  • fast/text/mark-matches-rendering-expected.html: Ditto.
2:43 PM Changeset in webkit [233279] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under SWServer::unregisterServiceWorkerClient()

Reviewed by Youenn Fablet.

Connections are usually destroyed before their SWServer. However, as per crash traces, it is possible
for SWServers to get destroyed while they still have connections. When this happens, the connections
(which are owned by the SWServer) get destroyed with other SWServer data members. In turn, the
connection destructor tries to unregister its clients from the server that is currently being destroyed.

To address the issue, the SWServer destructor now destroys remaining connections early, before SWServer's
other data members get destroyed.

  • workers/service/server/SWServer.cpp:


2:26 PM Changeset in webkit [233278] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Add logging to try to diagnose where we get a null structure.

Reviewed by Mark Lam.

Add a logging to JSObject::toPrimitive to help diagnose a nullptr
structure crash.

This code should be removed when we fix <rdar://problem/33451840>

  • runtime/JSObject.cpp:


  • runtime/JSObject.h:


2:15 PM Changeset in webkit [233277] by youenn@apple.com
  • 9 edits in trunk/Source

NetworkLoadChecker should not need to hard ref NetworkConnectionToWebProcess

Reviewed by Daniel Bates.


No change of behavior.
Add a way to set the client receiving any CSP warning/error notification.

  • page/csp/ContentSecurityPolicy.h:



Removed the need for NetworkLoadChecker to reference a NetworkConnectionToWebProcess.
Instead a CSP client is given to NetworkLoadChecker when needed.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:


  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::addConsoleMessage): Deleted.
(WebKit::NetworkLoadChecker::sendCSPViolationReport): Deleted.
(WebKit::NetworkLoadChecker::enqueueSecurityPolicyViolationEvent): Deleted.

  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/NetworkResourceLoader.cpp:


  • NetworkProcess/PingLoad.cpp:


  • NetworkProcess/PingLoad.h:
2:10 PM Changeset in webkit [233276] by dbates@webkit.org
  • 3 edits in trunk/Tools

webkit-patch should ignore non-ASCII characters in the status server API key

Reviewed by Lucas Forschler.

The API key should only consists of ASCII characters. If it contains any
non-ASCII characters then log a warning and ignore them.

  • Scripts/webkitpy/common/net/statusserver.py:

(StatusServer.set_api_key): Force conversion to ASCII.

  • Scripts/webkitpy/tool/main.py:

(WebKitPatch._status_server_api_key): Convert to ASCII, ignoring non-ASCII
characters and logging a warning.

1:10 PM Changeset in webkit [233275] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Do not collapse margin with the parent when element has border/padding.

Reviewed by Antti Koivisto.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):

  • layout/blockformatting/BlockMarginCollapse.cpp:


1:01 PM Changeset in webkit [233274] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Fix Windows build after r233268.

  • platform/graphics/ca/win/PlatformCALayerWin.cpp:

(PlatformCALayerWin::hasContents const):

  • platform/graphics/ca/win/PlatformCALayerWin.h:
12:59 PM Changeset in webkit [233273] by youenn@apple.com
  • 1 edit
    1 move
    6 adds in trunk/LayoutTests/imported/w3c

Add Cross-Origin-Resource-Policy tests for workers and service workers

Reviewed by Chris Dumez.

  • web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker-expected.txt: Added.
  • web-platform-tests/fetch/cross-origin-resource-policy/fetch-in-service-worker.html: Added.
  • web-platform-tests/fetch/cross-origin-resource-policy/fetch.any-expected.txt: Added.
  • web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.html: Added.
  • web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/cross-origin-resource-policy/fetch.html.
  • web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker-expected.txt: Added.
  • web-platform-tests/fetch/cross-origin-resource-policy/fetch.any.worker.html: Added.
12:23 PM Changeset in webkit [233272] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC] Out-of-flow positioned element's height depends on its containing block's height.

Reviewed by Antti Koivisto.

We can't really compute the final height of an out-of-flow element until after its containing block's height is computed.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):

  • layout/FormattingContext.h:
  • layout/LayoutContext.cpp:


  • layout/LayoutContext.h:
  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):

  • layout/layouttree/LayoutContainer.h:

(WebCore::Layout::Container::outOfFlowDescendants const):
(WebCore::Layout::Container::outOfFlowDescendants): Deleted.

12:19 PM Changeset in webkit [233271] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

[Wincairo] Add support for context menus to non-legacy minibrowser

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2018-06-27
Reviewed by Ryosuke Niwa.

  • UIProcess/WebPageProxy.h:
  • UIProcess/win/PageClientImpl.cpp:


  • UIProcess/win/PageClientImpl.h:
  • UIProcess/win/WebContextMenuProxyWin.cpp:


  • UIProcess/win/WebContextMenuProxyWin.h:
  • UIProcess/win/WebPageProxyWin.cpp:


  • UIProcess/win/WebView.cpp:


  • UIProcess/win/WebView.h:
11:34 AM Changeset in webkit [233270] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.23

Tag Safari-606.1.23.

11:23 AM Changeset in webkit [233269] by youenn@apple.com
  • 9 edits
    3 adds in trunk

Disable content blockers in NetworkLoadChecker except for ping loads

Reviewed by Chris Dumez.


Add internals API to reload a frame without content extensions.

Test: http/tests/contentextensions/reload-without-contentextensions.html

  • testing/Internals.cpp:


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


  • NetworkProcess/NetworkLoadChecker.cpp:


  • NetworkProcess/NetworkLoadChecker.h:


  • NetworkProcess/PingLoad.cpp:


  • http/tests/contentextensions/reload-without-contentextensions-expected.txt: Added.
  • http/tests/contentextensions/reload-without-contentextensions.html: Added.
  • http/tests/contentextensions/reload-without-contentextensions.html.json: Added.
11:22 AM Changeset in webkit [233268] by Simon Fraser
  • 18 edits
    3 adds in trunk

https://hackernoon.com/ uses lots of layer backing store

Reviewed by Tim Horton.


Drive-by typo fix.

  • bmalloc/Scavenger.cpp:



The existing "backing store detached" logic, which was used to eliminate backing store
for compositing layers outside the viewport, had a number of bugs that allowed layers
to have backing store when they should not.

Specifically, any code path that ended up in setNeedsDisplay{InRect}() in PlatformCALayer
could trigger backing store creation on layers that should have never had any.

Rather than monkeypatch all the GraphicsLayerCA call sites that call setNeedsDisplay{InRect}(),
just bail early from the PlatformCALayer* methods that trigger repaints.

Tests didn't catch this because they just dumped the state of the backingStoreAttached flag. To fix this,
create backingStoreAttachedForTesting() which also tests whether the layer has contents.

Test: compositing/backing/backing-store-attachment-outside-viewport.html

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties const):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::backingStoreAttachedForTesting const):

  • platform/graphics/GraphicsLayerClient.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::backingStoreAttachedForTesting const):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(PlatformCALayerCocoa::hasContents const):


PlatformCALayerRemote was actually holding onto backing stores for layers with
backing store detached, which could increase memory use. When told that backing stores
are not attached, explicitly throw away the backing, and re-create it (via setNeedsDisplay)
when attached. This is now similar to what PlatformLayerCACocoa does.

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::hasContents const):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:


New test.

  • compositing/backing/backing-store-attachment-outside-viewport-expected.txt: Added.
  • compositing/backing/backing-store-attachment-outside-viewport.html: Added.
11:07 AM Changeset in webkit [233267] by ddkilzer@apple.com
  • 10 edits in trunk/Source/WebCore

Fix clang static analyzer warnings: Branch condition evaluates to a garbage value

Reviewed by Zalan Bujtas.

This patch changes two stack-allocated bool variables into
std::optional<bool> since the functions that set the variable
may return early without setting it. It also changes one
stack-allocated pointer to be initialized to nullptr.

  • animation/AnimationTimeline.cpp:

Update for change to CSSPropertyAnimation::getPropertyAtIndex()
argument type.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::writeImageToPasteboard): Initialize
cachedImage stack pointer to nullptr since getImage() has an
early return that doesn't set cachedImage.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::writeImageToPasteboard): Ditto.

  • page/animation/CSSPropertyAnimation.cpp:


  • page/animation/CSSPropertyAnimation.h:


  • Change method to take std::optional<bool> instead of bool as second argument since the method may return early without setting isShorthand.
  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions): Update for
change to CSSPropertyAnimation::getPropertyAtIndex() argument

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::placeBoxesInBlockDirection): Also
rename local emphasisMarkIsOver to emphasisMarkIsAbove to
match other call sites.
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):

  • Update for change to InlineTextBox::emphasisMarkExistsAndIsAbove() argument type.
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):

  • Change method to take std::optional<bool> instead of bool as second argument since the method may return early without setting above.


  • Update for change to InlineTextBox::emphasisMarkExistsAndIsAbove() argument type.
  • rendering/InlineTextBox.h:

(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):

  • Change method to take std::optional<bool> instead of bool.
11:02 AM Changeset in webkit [233266] by Jonathan Bedard
  • 17 edits
    1 copy
    19 adds in trunk

Enable WebKit iOS 12 build

Reviewed by David Kilzer.


  • pal/cf/CoreMediaSoftLink.cpp: Condition some CoreMedia functions on version.
  • pal/cf/CoreMediaSoftLink.h: Ditto.
  • pal/spi/cocoa/NSXPCConnectionSPI.h: Use XPCSPI.h instead of xpc.h.
  • pal/spi/ios/QuickLookSPI.h: QLItem adopts QLPreviewItem.
  • pal/spi/ios/SystemPreviewSPI.h: Fix compiler errors.


  • Platform/spi/ios/PDFKitSPI.h: Added PDFKit SPI.
  • Platform/spi/ios/UIKitSPI.h: Add new UIKit SPI and UICompositingMode enumeration.
  • UIProcess/ios/WKPDFView.mm: Use PDFKitSPI header.
  • UIProcess/ios/WKSystemPreviewView.mm: Use CoreGraphicsSPI.h.
  • UIProcess/ios/fullscreen/WKFullscreenStackView.mm: Use QuartzCoreSPI.h.


  • wtf/spi/darwin/XPCSPI.h: Add endpoint and connection declarations.


  • Scripts/configure-xcode-for-ios-development:

(copyMissingHeadersFromSDKToSDKIfNeeded): Copy launch.h into embedded SDKs.


  • WebKitPrivateFrameworkStubs/iOS/12: Added.
10:59 AM Changeset in webkit [233265] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

CSS Animation Triggers is not an experimental feature, should be globally off by default

Reviewed by Dean Jackson.

  • Shared/WebPreferences.yaml:
10:41 AM Changeset in webkit [233264] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Promote the Secure Context API feature from experimental-yet-on-by-default to always-on

Reviewed by Dan Bates.

  • Shared/WebPreferences.yaml:

Secure Context API is on by default, it's not experimental anymore.

10:38 AM Changeset in webkit [233263] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Make Link Preload an on-by-default feature

Reviewed by Ryosuke Niwa.

  • Shared/WebPreferences.yaml:

This should be on, not experimental. It already shipped on in the past.

10:01 AM Changeset in webkit [233262] by rmorisset@apple.com
  • 2 edits in trunk/Tools

[WSL] Add a control-flow stack to the execution rules in WSL.ott

Rubberstamped by Filip Pizlo.

The goal of this is to enable (future) rules about uniform control flow for barriers.
It required adding two new special construct: Join(s) and JoinExpr(e) whose only role is to pop the last element of the stack.

9:36 AM Changeset in webkit [233261] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Regression(r233208): Completion handler does not get called on GTK port

Reviewed by Antti Koivisto.

Make sure UpdatePrevalentDomainsToPartitionOrBlockCookiesHandler's completion handler
gets called on non-COCOA ports.

  • UIProcess/WebResourceLoadStatisticsStore.h:
9:18 AM Changeset in webkit [233260] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Move formatting context root layout logic to a dedicated function.

Reviewed by Antti Koivisto.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layout const):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):

  • layout/blockformatting/BlockFormattingContext.h:
9:13 AM Changeset in webkit [233259] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Compute static position for out-of-flow elements only when required.

Reviewed by Antti Koivisto.

Computing static position for out-of-flow elements could be somewhat expensive, so let's not do it unless we actually need it.

  • layout/FormattingContextGeometry.cpp:


  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::staticPositionForOutOfFlowPositioned): Deleted.

9:13 AM Changeset in webkit [233258] by Ms2ger@igalia.com
  • 2 edits in trunk/WebDriverTests

[GTK][WPE] Update expectations for WebDriver tests.

Unreviewed gardening.

9:10 AM Changeset in webkit [233257] by n_wang@apple.com
  • 3 edits
    2 adds
    2 deletes in trunk

AX: [iOS] Remove the ability to set keyboard focus when VoiceOver takes focus

Reviewed by Chris Fleizach.


We shouldn't set keyboard focus when assistive technology takes focus since
this is causing website incompatibility issues by causing focus to be lost.

Test: accessibility/ios-simulator/accessibility-focus-do-not-set-focus.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):


  • accessibility/ios-simulator/accessibility-focus-do-not-set-focus-expected.txt: Added.
  • accessibility/ios-simulator/accessibility-focus-do-not-set-focus.html: Added.
  • accessibility/ios-simulator/dom-focus-fires-on-correct-element-expected.txt: Removed.
  • accessibility/ios-simulator/dom-focus-fires-on-correct-element.html: Removed.
8:14 AM Changeset in webkit [233256] by rmorisset@apple.com
  • 2 edits in trunk/Tools

[WSL] Fix minor formatting issues in the grammar section

Rubberstamped by Filip Pizlo.

8:07 AM Changeset in webkit [233255] by Michael Catanzaro
  • 4 edits in trunk/Source/ThirdParty

MIME type subclass check should guard against small strings

Reviewed by Carlos Garcia Campos.

Sadly, this code is duplicated between two different files because it is not good.

  • xdgmime/README.webkit:
  • xdgmime/src/xdgmime.c:


  • xdgmime/src/xdgmimecache.c:


8:04 AM Changeset in webkit [233254] by rmorisset@apple.com
  • 3 edits in trunk/Tools

[WSL] Put the full grammar in the Sphinx document

Rubberstamped by Filip Pizlo.

Put the grammar's production rules in the Sphinx document, along with a few comments and the rules for desugaring.
Also includes a bit of clean-up of the antlr rules.

4:19 AM Changeset in webkit [233253] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

DFG's compileReallocatePropertyStorage() and compileAllocatePropertyStorage() slow paths should also clear unused properties.

Reviewed by Yusuke Suzuki.


  • stress/regress-187091.js: Added.


Previously, when compileReallocatePropertyStorage() and compileAllocatePropertyStorage()
take their slow paths, the slow path would jump back to the fast path right after
the emitted code which clears the unused property values. As a result, the
unused properties are not initialized. We've fixed this by adding the slow path
generators before we emit the code to clear the unused properties.

  • dfg/DFGSpeculativeJIT.cpp:


3:05 AM Changeset in webkit [233252] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[JSC] ArrayPatternNode::emitDirectBinding does not return assignment target value if dst is nullptr

Reviewed by Mark Lam.


  • stress/direct-binding-return-result.js: Added.



ArrayPatternNode::emitDirectBinding should return a register with an assignment target instead of filling
the result with undefined if dst is nullptr. While dst == ignoredResult() means we do not require
the result, dst == nullptr just means "dst is required, but a register for dst is not allocated.".
This patch fixes emitDirectBinding to return an appropriate value with an allocated register for dst.

ArrayPatternNode::emitDirectBinding() should be removed later since it does not follow array spreading protocol,
but it should be done in a separate patch since it would be performance sensitive.

  • bytecompiler/NodesCodegen.cpp:


2:34 AM Changeset in webkit [233251] by emilio
  • 2 edits in trunk/Source/WebCore

Move clearChildNeedsStyleRecalc into resetStyleForNonRenderedDescendants.

Reviewed by Antti Koivisto.

Every caller does this already.

No new tests, no change in behavior.

  • style/StyleTreeResolver.cpp:


1:27 AM Changeset in webkit [233250] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

When trying to print a very long email on iOS, the print preview is blank

Reviewed by Timothy Hatcher.

  • UIProcess/ios/WebPageProxyIOS.mm:

ChildProcessProxy::sendSync has a (surprising) default timeout of 1 second,
(as opposed to Connection::sendSync's default timeout of ∞ seconds).
The printing path already waits ∞ seconds for the final PDF, but currently
uses the default 1 second timeout for page count computation. If page
count computation takes more than 1 second, the preview will be blank.
Since the print preview is generated asynchronously, we really want
to wait until it's done, and not give up after 1 second.

1:19 AM Changeset in webkit [233249] by Yusuke Suzuki
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

[GTK][WPE] Remove gflags from libwebrtc build

Reviewed by Alejandro G. Castro.

gflags is used only in libyuv unit tests. So the Apple ports do not build & link it.
GTK and WPE can do the same thing: not building gflags. By doing so, we can achieve
the following results.

  1. Remove static initializers defined for gflags.
  2. Reduce binary size.
  • CMakeLists.txt:
1:16 AM Changeset in webkit [233248] by tpopela@redhat.com
  • 4 edits in trunk/Source/WebCore

[GStreamer] Coverity scan issues

Reviewed by Xabier Rodriguez-Calvar.

Fix uninitialized members.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
  • platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
1:13 AM Changeset in webkit [233247] by zandobersek@gmail.com
  • 3 edits
    1 add in trunk/Source/WebCore

[GCrypt] Move definitions of GCryptUtilities helpers into a separate source file

Reviewed by Michael Catanzaro.

Move the GCryptUtilities helpers that operate on libgcrypt values and
constants into a separate source file. This limits a bit the amount of
inlining the compiler might feel compelled to do, and the resulting
shared library is 8kB smaller in size.

  • crypto/gcrypt/GCryptUtilities.cpp: Copied from Source/WebCore/crypto/gcrypt/GCryptUtilities.h.


  • crypto/gcrypt/GCryptUtilities.h:

(WebCore::hmacAlgorithm): Deleted.
(WebCore::digestAlgorithm): Deleted.
(WebCore::hashCryptoDigestAlgorithm): Deleted.
(WebCore::mpiLength): Deleted.
(WebCore::mpiData): Deleted.
(WebCore::mpiZeroPrefixedData): Deleted.
(WebCore::mpiSignedData): Deleted.

  • platform/SourcesGCrypt.txt:
Note: See TracTimeline for information about the timeline view.