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

Timeline



Feb 9, 2019:

4:41 PM Changeset in webkit [241247] by benjamin@webkit.org
  • 2 edits in trunk/Tools

Add more tests for clampTo<>()
https://bugs.webkit.org/show_bug.cgi?id=194462

Reviewed by Geoffrey Garen.

Darin suggested to test the very last floating point number
at the boundaries when truncating to integer.
I added test for max/min and max-1/min-1.

  • TestWebKitAPI/Tests/WTF/MathExtras.cpp:

(TestWebKitAPI::TEST):

3:16 PM Changeset in webkit [241246] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, Lexer should use isLatin1 implementation in WTF
https://bugs.webkit.org/show_bug.cgi?id=194466

Follow-up after r241233 pointed by Darin.

  • parser/Lexer.cpp:

(JSC::isLatin1): Deleted.

1:00 PM Changeset in webkit [241245] by Darin Adler
  • 5 edits in trunk

Fix change log dates; I thought webkit-patch land would do it for me

1:00 PM Changeset in webkit [241244] by Darin Adler
  • 58 edits in trunk

Eliminate unnecessary String temporaries by using StringConcatenateNumbers
https://bugs.webkit.org/show_bug.cgi?id=194021

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • inspector/agents/InspectorConsoleAgent.cpp:

(Inspector::InspectorConsoleAgent::count): Remove String::number and let
makeString do the conversion without allocating/destroying a String.

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::objectGroupForBreakpointAction): Ditto.
(Inspector::InspectorDebuggerAgent::setBreakpointByUrl): Ditto.
(Inspector::InspectorDebuggerAgent::setBreakpoint): Ditto.

  • runtime/JSGenericTypedArrayViewInlines.h:

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

  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToFixed): Use String::numberToStringFixedWidth instead
of calling numberToFixedWidthString to do the same thing.
(JSC::numberProtoFuncToPrecision): Use String::number instead of calling
numberToFixedPrecisionString to do the same thing.

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::reportTopFunctions): Ditto.

Source/WebCore:

For floating point numbers, String::number gives a fixed precision result,
stripping trailing zeroes. When possible, I changed the code to instead use the
equivalent of String::numberToStringECMAScript, which is what makeString does by
default for floating point, gives the same results for many cases, and gives
better results in many others. However, for floats, we do not yet have a good
implementation, so instead I used FormattedNumber::fixedPrecision to match
the old behavior.

  • Modules/indexeddb/shared/IDBTransactionInfo.cpp:

(WebCore::IDBTransactionInfo::loggingString const): Remove String::number and let
makeString do the conversion without allocating/destroying a String.

  • Modules/websockets/ThreadableWebSocketChannel.cpp:

(WebCore::ThreadableWebSocketChannel::create): Ditto.

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect): Ditto. Added a cast to "unsigned" to sidestep the
ambiguity with 16-bit unsigned types that are sometimes used for numbers (uint16_t)
and sometimes used for UTF-16 code units (UChar) and can be the same type.

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::didFailSocketStream): Use ASCIILiteral when intializing
a string instead of just a normal C literal. Switched to makeString so we could
remove String::number and do the conversion without allocating/destroying a String.
(WebCore::WebSocketChannel::didFail): Ditto.
(WebCore::WebSocketChannel::processFrame): Ditto.

  • Modules/websockets/WebSocketFrame.cpp:

(WebCore::WebSocketFrame::parseFrame): Ditto.

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::readServerHandshake): Ditto.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::positionalDescriptionForMSAA const): Ditto.

  • bindings/js/JSDOMConvertNumbers.cpp:

(WebCore::rangeErrorString): Ditto.

  • css/CSSAspectRatioValue.cpp:

(WebCore::CSSAspectRatioValue::customCSSText const): Ditto. Used
FormattedNumber::fixedPrecision since these are floats.

  • css/DOMMatrixReadOnly.cpp:

(WebCore::DOMMatrixReadOnly::toString const): Use
StringBuilder::builder.appendECMAScriptNumber instead of
String::numberToStringECMAScript so we can do it without allocating/destroying
a String.

  • css/WebKitCSSMatrix.cpp:

(WebCore::WebKitCSSMatrix::toString const): Ditto.

  • dom/MessagePortIdentifier.h:

(WebCore::MessagePortIdentifier::logString const): Remove String::number and let
makeString do the conversion without allocating/destroying a String.

  • editing/cocoa/DataDetection.mm:

(WebCore::dataDetectorStringForPath): Remove unnecessary type casts on values
passed to String::number and to StringBuilder::appendNumber. These could do
harm if the values were out of range, and should not be necessary.

  • history/BackForwardItemIdentifier.h:

(WebCore::BackForwardItemIdentifier::logString const): Remove String::number
and let makeString do the conversion without allocating/destroying a String.

  • html/FTPDirectoryDocument.cpp:

(WebCore::processFileDateString): Ditto.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::getUniformLocation): Ditto.
(WebCore::WebGLRenderingContextBase::checkTextureCompleteness): Ditto.

  • inspector/agents/WebConsoleAgent.cpp:

(WebCore::WebConsoleAgent::didReceiveResponse): Ditto.

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::loadResourceSynchronously): Ditto.

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didFailLoadingManifest): Ditto.

  • page/PageSerializer.cpp:

(WebCore::PageSerializer::urlForBlankFrame): Ditto.

  • page/PrintContext.cpp:

(WebCore::PrintContext::pageProperty): Ditto.
(WebCore::PrintContext::pageSizeAndMarginsInPixels): Ditto.

  • page/WheelEventTestTrigger.cpp:

(WebCore::dumpState): Use StringBuilder::appendNumber instead of
String::number so we can do it without allocating/destroying a String.
Also use StringBuilder::appendLiteral on a literal.

  • page/cocoa/ResourceUsageOverlayCocoa.mm:

(WebCore::ResourceUsageOverlay::platformDraw): Pass explicit
KeepTrailingZeros to FormattedNumber::fixedPrecision to preserve behavior,
since default is now to truncate trailing zeros.

  • platform/graphics/Color.cpp:

(WebCore::Color::cssText): Use StringBuilder::appendNumber instead of
calling numberToFixedPrecisionString to do the same thing.

  • platform/graphics/ExtendedColor.cpp:

(WebCore::ExtendedColor::cssText): Ditto.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::animationIdentifier): Remove String::number and let makeString
do the conversion without allocating/destroying a String. Had to add
a typecast to convert the enumeration into an integer.

  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:

(WebCore::PlatformCAFilters::setFiltersOnLayer): Ditto.

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::description const): Ditto.

  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockMediaSample::MockMediaSample): Use AtomicString::number
instead of String::number to avoid unneccessarily allocating an additional
temporary String when an AtomicString already exists.

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::reportErrorToClient): Remove String::number
and let makeString do the conversion without allocating/destroying a String.

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::setMaximumSize): Ditto.
(WebCore::SQLiteDatabase::setSynchronous): Ditto. Had to add a typecast to
convert the enumeration into an integer.

  • svg/SVGAngleValue.cpp:

(WebCore::SVGAngleValue::valueAsString const): Ditto.

  • svg/SVGLengthValue.cpp:

(WebCore::SVGLengthValue::valueAsString const): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::configurationForViewport): Ditto. Used
FormattedNumber::fixedPrecision since these are floats.
(WebCore::Internals::getCurrentCursorInfo): Use StringBuilder::appendNumber
instead of calling numberToFixedPrecisionString to do the same thing.
(WebCore::Internals::queueMicroTask): Remove String::number and let makeString
do the conversion without allocating/destroying a String.
(WebCore::appendOffsets): Use StringBuilder::appendNumber instead of
String::number so we can do it without allocating/destroying a String.

  • workers/service/ServiceWorkerClientIdentifier.h:

(WebCore::ServiceWorkerClientIdentifier::toString const): Remove String::number
and let makeString do the conversion without allocating/destroying a String.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::databaseFilenameFromVersion): Ditto.

Source/WebKit:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::escapeIDForJSON): Use an ASCIILiteral to create a String.

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::makeVersionedDirectoryPath): Remove String::number and let
makeString do the conversion without allocating/destroying a String.

  • NetworkProcess/mac/RemoteNetworkingContext.mm: Removed "using namespace WebCore".

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): Remove String::number
and let makeString do the conversion without allocating/destroying a String.

  • NetworkProcess/webrtc/NetworkMDNSRegister.cpp: Removed "using namespace WebCore".

(WebKit::registerMDNSNameCallback): Added explicit WebCore prefix as needed.
(WebKit::NetworkMDNSRegister::registerMDNSName): Ditto. Also remove String::number
and let makeString do the conversion without allocating/destroying a String.

  • UIProcess/WebPageGroup.cpp:

(WebKit::pageGroupData): Remove String::number and let makeString do the conversion
without allocating/destroying a String.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::createInspectorTargets): Ditto.

  • UIProcess/ios/WKLegacyPDFView.mm:

(-[WKLegacyPDFView _URLForLinkAnnotation:]): Ditto.

  • WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:

(WebKit::uniqueWorldName): Ditto.

  • WebProcess/WebPage/WebPageInspectorTarget.cpp:

(WebKit::WebPageInspectorTarget::identifier const): Ditto.

Source/WTF:

  • wtf/URL.cpp:

(WTF::URL::setPort): Remove String::number and let makeString do the conversion
without allocating/destroying a String. Added a cast to "unsigned" to sidestep the
ambiguity with 16-bit unsigned types that are sometimes used for numbers (uint16_t)
and sometimes used for UTF-16 code units (UChar) and can be the same type.

  • wtf/text/StringConcatenateNumbers.h:

Changed FormattedNumber::fixedPrecision to more closely match String::number and
StringBuilder::appendNumber by defaulting to truncating trailing zeros and using
a named enumeration for the truncation policy rather than a boolean.

Tools:

  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:

(TestWebKitAPI::TEST): Change tests to use EXPECT_STREQ so failure messages are easier
to understand. Updated tests for changes to FormattedNumber::fixedPrecision.

12:37 PM Changeset in webkit [241243] by Alan Bujtas
  • 5 edits in trunk

[LFC][IFC] Add intrinsic width support for basic inline containers
https://bugs.webkit.org/show_bug.cgi?id=194473

Reviewed by Antti Koivisto.

Source/WebCore:

Preferred width computation logic is very similar to normal layout.
One of the main difference is that the preferred width codepath does not provide valid containing block width.
This patch implement basic inline container support by passing nullopt containing block width in UsedHorizontalValues.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layout const):
(WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
(WebCore::Layout::InlineFormattingContext::computeBorderAndPadding const):
(WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPadding const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox const):

  • layout/inlineformatting/InlineFormattingContext.h:

Tools:

Expand tests coverage (11 new tests -> 798)

  • LayoutReloaded/misc/LFC-passing-tests.txt: not sure why run-singly keeps producing different ordering.
11:44 AM Changeset in webkit [241242] by ysuzuki@apple.com
  • 4 edits in trunk/Source

Unreviewed, rolling in r241237 again
https://bugs.webkit.org/show_bug.cgi?id=194469

Source/JavaScriptCore:

  • runtime/JSString.h:

(JSC::jsSubstring):

Source/WTF:

After the measurement, this patch was unrelated to recent regression.

  • wtf/text/StringImpl.h:

(WTF::StringImpl::isSubString const):
(WTF::StringImpl::createSubstringSharingImpl):

9:52 AM Changeset in webkit [241241] by commit-queue@webkit.org
  • 4 edits in trunk/Source

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

Shows significant memory increase in WSL (Requested by
yusukesuzuki on #webkit).

Reverted changeset:

"[WTF] Use BufferInternal StringImpl if substring StringImpl
takes more memory"
https://bugs.webkit.org/show_bug.cgi?id=194469
https://trac.webkit.org/changeset/241237

8:04 AM Changeset in webkit [241240] by Michael Catanzaro
  • 3 edits in trunk/Source/WebKit

[GTK] Fix typo in the newly added API
https://bugs.webkit.org/show_bug.cgi?id=194472

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-02-09
Reviewed by Michael Catanzaro.

Fix a typo: enableed -> enabled.

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_set_enable_back_forward_navigation_gestures):

  • UIProcess/API/gtk/WebKitSettings.h:
1:39 AM Changeset in webkit [241239] by Nikita Vasilyev
  • 2 edits in trunk/LayoutTests

Web Inspector: fix typos in tests

Unreviewed test gardening.

  • inspector/css/force-page-appearance.html:
12:11 AM Changeset in webkit [241238] by benjamin@webkit.org
  • 2 edits in trunk/Tools

Fix MiniBrowser's entitlements
https://bugs.webkit.org/show_bug.cgi?id=192431

Reviewed by Joseph Pecoraro.

MiniBrowser's Extensions Manager was broken. The entitlement was missing for opening
files, making it impossible to load any extension.

  • MiniBrowser/MiniBrowser.entitlements:

Feb 8, 2019:

11:58 PM Changeset in webkit [241237] by ysuzuki@apple.com
  • 4 edits in trunk/Source

[WTF] Use BufferInternal StringImpl if substring StringImpl takes more memory
https://bugs.webkit.org/show_bug.cgi?id=194469

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/JSString.h:

(JSC::jsSubstring):

Source/WTF:

Because pointer is large and aligned in 64bit in 64bit architecture, BufferSubstring StringImpl
implementation takes more memory than BufferInternal StringImpl implementation for small strings.
And BufferInternal StringImpl does not have a problem like, small substring StringImpl keeps super
large owner StringImpl. This patch calculates the required size of memory and selects the more efficient one.

  • wtf/text/StringImpl.h:

(WTF::StringImpl::isSubString const):
(WTF::StringImpl::createSubstringSharingImpl):

11:43 PM Changeset in webkit [241236] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] CachedTypes should use jsString instead of JSString::create
https://bugs.webkit.org/show_bug.cgi?id=194471

Reviewed by Mark Lam.

Use jsString() here because JSString::create is a bit low-level API and it requires some invariant like "length is not zero".

  • runtime/CachedTypes.cpp:

(JSC::CachedJSValue::decode const):

11:04 PM Changeset in webkit [241235] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Speculative fix for Mojave API test after r241223
https://bugs.webkit.org/show_bug.cgi?id=194427

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCInitializationHandler):
(WebKit::XPCServiceMain):
Set the APPLEEVENTSSERVICENAME environment variable before handling any xpc messages like we used to.
I'll worry about making things right in the daemon later.

11:01 PM Changeset in webkit [241234] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Increase StructureIDTable initial capacity
https://bugs.webkit.org/show_bug.cgi?id=194468

Reviewed by Mark Lam.

Currently, # of structures just after initializing JSGlobalObject (precisely, initializing GlobalObject in
JSC shell), 281, already exceeds the current initial value 256. We should increase the capacity since
unnecessary resizing requires more operations, keeps old StructureID array until GC happens, and makes
more memory dirty. We also remove some structures that are no longer used.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::callbackObjectStructure const):
(JSC::JSGlobalObject::propertyNameIteratorStructure const): Deleted.

  • runtime/StructureIDTable.h:
  • runtime/VM.h:
8:40 PM Changeset in webkit [241233] by ysuzuki@apple.com
  • 6 edits
    1 add in trunk

[JSC] String.fromCharCode's slow path always generates 16bit string
https://bugs.webkit.org/show_bug.cgi?id=194466

Reviewed by Keith Miller.

JSTests:

  • stress/string-from-char-code-slow-path.js: Added.

(shouldBe):
(testWithLength):

Source/JavaScriptCore:

String.fromCharCode(a1) has a fast path and the most frequently used. And String.fromCharCode(a1, a2, ...)
goes to the slow path. However, in the slow path, we always create 16bit string. 16bit string takes 2x memory,
and even worse, taints ropes 16bit if 16bit string is included in the given rope. We find that acorn-wtb
creates very large strings multiple times with String.fromCharCode, and String.fromCharCode always produces
16bit string. However, only few strings are actually 16bit strings. This patch attempts to make 8bit string
as much as possible.

It improves non JIT acorn-wtb's peak and current memory footprint by 6% and 3% respectively.

  • runtime/StringConstructor.cpp:

(JSC::stringFromCharCode):

8:36 PM Changeset in webkit [241232] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

[WK2][macOS] Avoid creating new CVDisplayLink objects for each WebProcess
https://bugs.webkit.org/show_bug.cgi?id=194463

Reviewed by Tim Horton.

Avoid creating new CVDisplayLink objects for each WebProcess. We really only need one per
display, creating such object is expensive and it is even worse in a PSON world where we
swap process on navigation.

This patch moves the DisplayLink storing from WebProcessProxy to WebProcessPool. Also,
a DisplayLink can now be associated to several IPC connections instead of having a 1:1
mapping. When a DisplayLink no longer has any observers, we now merely stop it instead
of destroying it.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::startDisplayLink):
(WebKit::WebProcessPool::stopDisplayLink):
(WebKit::WebProcessPool::stopDisplayLinks):

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

(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::processWillShutDown):
(WebKit::WebProcessProxy::shutDown):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::DisplayLink):
(WebKit::DisplayLink::addObserver):
(WebKit::DisplayLink::removeObserver):
(WebKit::DisplayLink::removeObservers):
(WebKit::DisplayLink::hasObservers const):
(WebKit::DisplayLink::displayLinkCallback):

  • UIProcess/mac/DisplayLink.h:
  • UIProcess/mac/WebProcessProxyMac.mm:

(WebKit::WebProcessProxy::startDisplayLink):
(WebKit::WebProcessProxy::stopDisplayLink):

8:06 PM Changeset in webkit [241231] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] CTLineGetGlyphRuns() might return nullptr
https://bugs.webkit.org/show_bug.cgi?id=194467
<rdar://problem/42423999>

Reviewed by Simon Fraser.

Be somewhat defensive to try to make sure this sort of thing doesn't happen in the future.

Covered by find/text/find-backwards.html

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

7:56 PM Changeset in webkit [241230] by keith_miller@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

We should only make rope strings when concatenating strings long enough.
https://bugs.webkit.org/show_bug.cgi?id=194465

Reviewed by Saam Barati.

This patch stops us from allocating a rope string if the resulting
rope would be smaller than the size of the JSRopeString object we
would need to allocate.

This patch also adds paths so that we don't unnecessarily allocate
JSString cells for primitives we are going to concatenate with a
string anyway.

  • dfg/DFGOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSString.h:
  • runtime/Operations.cpp:

(JSC::jsAddSlowCase):

  • runtime/Operations.h:

(JSC::jsString):
(JSC::jsAdd):

7:42 PM Changeset in webkit [241229] by mmaxfield@apple.com
  • 24 edits
    2 adds
    2 deletes in trunk

[Cocoa] Ask platform for generic font family mappings
https://bugs.webkit.org/show_bug.cgi?id=187723
<rdar://problem/41892438>

Reviewed by Brent Fulgham.

Source/WebCore:

WebKit API allows setting the generic font families for the USCRIPT_COMMON script.
When trying to style a character with a generic font family, we first look to see if
we have a mapping for the particular script the character is rendered with, and if we
don't find a match, we then check USCRIPT_COMMON.

In the Cocoa ports, the only way families get set for non-USCRIPT_COMMON scripts (aka
the only scripts which won't use the API families) is in
SettingsBase::initializeDefaultFontFamilies(). That function only sets the families
for the CJK scripts.

The mappings inside SettingsBase are incorrect and conflict with our policy regarding
user-installed fonts. Instead, we should be consulting with the platform for some of
these mappings, by calling CTFontDescriptorCreateForCSSFamily(). However, the WebKit
API still has to work to set the mappings for untagged content. Therefore, we use the
system mappings for language-tagged content, and the API mappings for non-language-tagged
content. This is a good balance that makes sure we always have a good mapping for every
language, but API clients can still set the mappings, too.

Test: fast/text/ja-sans-serif.html

  • css/CSSComputedStyleDeclaration.cpp:
  • css/CSSFontSelector.cpp:

(WebCore::resolveGenericFamily):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontFamily):

  • page/cocoa/SettingsBaseCocoa.mm:

(WebCore::SettingsBase::initializeDefaultFontFamilies):
(WebCore::osakaMonoIsInstalled): Deleted.

  • platform/graphics/FontDescription.cpp:

(WebCore::FontDescription::platformResolveGenericFamily):

  • platform/graphics/FontDescription.h:
  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::computeSpecializedChineseLocale):
(WebCore::cachedSpecializedChineseLocale):
(WebCore::languageChanged):
(WebCore::FontDescription::platformResolveGenericFamily):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::clear):
(WebCore::SystemFontDatabaseCoreText::serifFamily):
(WebCore::SystemFontDatabaseCoreText::sansSerifFamily):
(WebCore::SystemFontDatabaseCoreText::cursiveFamily):
(WebCore::SystemFontDatabaseCoreText::fantasyFamily):
(WebCore::SystemFontDatabaseCoreText::monospaceFamily):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Tools:

Allow testing infrastructure to use fonts that are returned from CTFontDescriptorCreateForCSSFamily().

  • DumpRenderTree/mac/DumpRenderTree.mm:

(allowedFontFamilySet):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::allowedFontFamilySet):

LayoutTests:

Update the tests to work with this new model.

  • fast/text/international/font-fallback-to-common-script-expected.html: Removed.
  • fast/text/international/font-fallback-to-common-script.html: Removed. This test is no longer testing

anything relevant.

  • fast/text/international/lang-sensitive-fonts-expected.html:
  • fast/text/international/lang-sensitive-fonts-xml-expected.html:
  • fast/text/international/lang-sensitive-fonts-xml.xhtml:
  • fast/text/international/lang-sensitive-fonts.html:
  • fast/text/international/locale-sensitive-fonts-expected.html:
  • fast/text/international/locale-sensitive-fonts.html:
  • fast/text/ja-sans-serif-expected-mismatch.html: Added.
  • fast/text/ja-sans-serif.html: Added.
7:05 PM Changeset in webkit [241228] by sbarati@apple.com
  • 14 edits
    1 add in trunk

Nodes that rely on being dominated by CheckInBounds should have a child edge to it
https://bugs.webkit.org/show_bug.cgi?id=194334
<rdar://problem/47844327>

Reviewed by Mark Lam.

JSTests:

  • stress/check-in-bounds-should-be-a-child-use.js: Added.

(func):

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGIntegerCheckCombiningPhase.cpp:

(JSC::DFG::IntegerCheckCombiningPhase::handleBlock):

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • dfg/DFGNodeType.h:
  • dfg/DFGSSALoweringPhase.cpp:

(JSC::DFG::SSALoweringPhase::lowerBoundsCheck):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCheckInBounds):
(JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):

6:31 PM Changeset in webkit [241227] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Audit: show keyboard shortcut in export tooltip
https://bugs.webkit.org/show_bug.cgi?id=194454

Reviewed by Matt Baker.

  • UserInterface/Views/AuditTestContentView.js:

(WI.AuditTestContentView):
(WI.AuditTestContentView.prototype.get saveData):
(WI.AuditTestContentView.prototype._exportResult): Added.
(WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
(WI.AuditTestContentView.prototype._exportAudit): Deleted.

  • Localizations/en.lproj/localizedStrings.js:
5:47 PM Changeset in webkit [241226] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: easier way to select a single line
https://bugs.webkit.org/show_bug.cgi?id=193305

Reviewed by Devin Rousso.

Start property selection after mousedown when mouse cursor moves 8px,
which is ~1.5 times the width of a text character in the style editor.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):

5:30 PM Changeset in webkit [241225] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Debugger Popover should work with value in template string ${identifier}
https://bugs.webkit.org/show_bug.cgi?id=194459
<rdar://problem/47932564>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-02-08
Reviewed by Devin Rousso.

  • UserInterface/Controllers/CodeMirrorTokenTrackingController.js:

(WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
When walking backwards to get the full expression we were walking outside
of the interpolation group outside ${inside}. Stop walking backwards once
we cross the boundary.

5:29 PM Changeset in webkit [241224] by commit-queue@webkit.org
  • 31 edits
    2 copies
    7 moves
    1 add in trunk

[GTK] Implement back/forward touchpad gesture
https://bugs.webkit.org/show_bug.cgi?id=193919

Patch by Alexander Mikhaylenko <exalm7659@gmail.com> on 2019-02-08
Reviewed by Michael Catanzaro.

Source/WebKit:

Move ViewSnapshotStore and ViewGestureController from Cocoa/Mac directory
to UIProcess/, also move some parts of mac/ViewGestreControllerMac.mm to
ViewGestureController.cpp, split up Mac- and iOS-specific parts of
ViewSnapshotStore.cpp into mac/ViewSnapshotMac.mm, then implement 2-finger
touchpad swipe back-forward gesture for GTK based on that.

To avoid name conflict, rename existing ViewGestureController class inside
UIProcess/API/gtk/WebKitWebViewBase.cpp into TouchGestureController.

Since GTK gestures can only work with 3 or 4 fingers, treat horizontal
scrolling events as a swipe as long as there's nowhere to scroll in that
direction and web page doesn't handle the scrolling.

This is only allowed for touchpads, even though it can theoretically work
with touch mice and trackpoints.

The gesture requires every item in back-forward list to have a snapshot.
There's already an existing infrastructure for that, so the patch changes
a bunch of #if PLATFORM(COCOA) statements to also check for GTK platform.
The snapshots have to be taken in sync, so the implementation draws webview
widget into a Cairo image surface.

The gesture is disabled by default, and can be enabled by setting the newly
added 'enable-back-forward-navigation-gestures' property in WebKitSettings to
true.

Gesture drawing is implemented via Cairo. When the gesture is active, the
actual page is drawn into a Cairo group, which is then drawn together with
a given snapshot, as well as dimming and a drop shadow over the "lower" layer.

Also add a memory pressure handler that clears snapshot store when low on memory.

  • DerivedSources-input.xcfilelist:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • Shared/SessionState.h: Add snapshot to back-forward items for GTK.
  • Shared/WebBackForwardListItem.h: Add snapshot to back-forward items for GTK.
  • SourcesCocoa.txt:
  • SourcesGTK.txt:
  • UIProcess/API/glib/WebKitSettings.cpp:

Added 'enable-back-forward-navigation-gestures' property for enabling the gesture.
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_enable_back_forward_navigation_gestures): Added, GTK only.
(webkit_settings_set_enable_back_forward_navigation_gestures): Added, GTK only.

  • UIProcess/API/glib/WebKitWebView.cpp:

(enableBackForwardNavigationGesturesChanged): Added, GTK only.
(webkitWebViewUpdateSettings):
(webkitWebViewDisconnectSettingsSignalHandlers):

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::setViewNeedsDisplay): Redraw the whole screen instead of a region during the gesture.
(WebKit::PageClientImpl::takeViewSnapshot): Added.
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Pass unhandled events to the gesture controller.
(WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot): Redraw the widget immediately after removing snapshot.
(WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): Added, send a notification to the gesture controller.
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame): Send a notification to the gesture controller.
(WebKit::PageClientImpl::didFinishLoadForMainFrame): Send a notification to the gesture controller.
(WebKit::PageClientImpl::didFailLoadForMainFrame): Added, send a notification to the gesture controller.
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): Send a notification to the gesture controller.
(WebKit::PageClientImpl::didRestoreScrollPosition): Added, send a notification to the gesture controller.

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitSettings.h:

Add webkit_settings_get_enable_back_forward_navigation_gestures() and webkit_settings_get_enable_back_forward_navigation_gestures()
to public API.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseDraw): Pass drawing to ViewGestureController during the gesture.
(webkitWebViewBaseScrollEvent): Pass scroll events to ViewGestureController during the gesture.
(webkitWebViewBaseGestureController): Renamed ViewGestureController to TouchGestureController.
(webkitWebViewBaseViewGestureController): Added.
(webkitWebViewBaseCreateWebPage): Create an instance of ViewGestureController.
(webkitWebViewBaseTakeViewSnapshot): Added.
(webkitWebViewBaseDidStartProvisionalLoadForMainFrame): Added.
(webkitWebViewBaseDidFirstVisuallyNonEmptyLayoutForMainFrame): Added.
(webkitWebViewBaseDidFinishLoadForMainFrame): Added.
(webkitWebViewBaseDidFailLoadForMainFrame): Added.
(webkitWebViewBaseDidSameDocumentNavigationForMainFrame): Added.
(webkitWebViewBaseDidRestoreScrollPosition): Added.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Mentioned the added functions in docs.
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitialize): Move the check from WebMemoryPressureHandlerCocoa.mm here.

  • UIProcess/PageClient.h: Add takeViewSnapshot() for GTK.
  • UIProcess/ViewGestureController.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp.

(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::disconnectFromProcess):
(WebKit::ViewGestureController::connectToProcess):
(WebKit::ViewGestureController::controllerForGesture):
(WebKit::ViewGestureController::takeNextGestureID):
(WebKit::ViewGestureController::willBeginGesture):
(WebKit::ViewGestureController::didEndGesture):
(WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
(WebKit::ViewGestureController::canSwipeInDirection const):
(WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
(WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::ViewGestureController::didRepaintAfterNavigation):
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
(WebKit::ViewGestureController::didRestoreScrollPosition):
(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::checkForActiveLoads):
(WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
(WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
(WebKit::ViewGestureController::SnapshotRemovalTracker::log const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::resume):
(WebKit::ViewGestureController::SnapshotRemovalTracker::start):
(WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
(WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):
(WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
(WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
(WebKit::ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent):
(WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
(WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
(WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
(WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
(WebKit::deltaShouldCancelSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::reset):
(WebKit::ViewGestureController::startSwipeGesture):
(WebKit::ViewGestureController::isPhysicallySwipingLeft const):
(WebKit::ViewGestureController::shouldUseSnapshotForSize):
(WebKit::ViewGestureController::forceRepaintIfNeeded):
(WebKit::ViewGestureController::willEndSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):

  • UIProcess/ViewGestureController.h: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.h.

(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
(WebKit::ViewGestureController::shouldIgnorePinnedState):
(WebKit::ViewGestureController::setShouldIgnorePinnedState):
(WebKit::ViewGestureController::hasActiveMagnificationGesture const):
(WebKit::ViewGestureController::setCustomSwipeViews):
(WebKit::ViewGestureController::setCustomSwipeViewsTopContentInset):
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
(WebKit::ViewGestureController::backgroundColorForCurrentSnapshot const):
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didFailLoadForMainFrame):
(WebKit::ViewGestureController::setSwipeGestureEnabled):
(WebKit::ViewGestureController::isSwipeGestureEnabled):
(WebKit::ViewGestureController::SnapshotRemovalTracker::pause):
(WebKit::ViewGestureController::SnapshotRemovalTracker::isPaused const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::hasRemovalCallback const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::renderTreeSizeThreshold const):
(WebKit::ViewGestureController::SnapshotRemovalTracker::setRenderTreeSizeThreshold):
(WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
(WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
(WebKit::ViewGestureController::SwipeProgressTracker::progress const):
(WebKit::ViewGestureController::SwipeProgressTracker::direction const):

  • UIProcess/ViewGestureController.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/ViewGestureController.messages.in.
  • UIProcess/ViewSnapshotStore.cpp: Copied from Source/WebKit/UIProcess/mac/ViewSnapshotStore.mm.

(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::singleton):
(WebKit::ViewSnapshotStore::didAddImageToSnapshot):
(WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
(WebKit::ViewSnapshotStore::pruneSnapshots):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::discardSnapshotImages):
(WebKit::ViewSnapshot::~ViewSnapshot):

  • UIProcess/ViewSnapshotStore.h: Renamed from Source/WebKit/UIProcess/mac/ViewSnapshotStore.h.

(WebKit::ViewSnapshot::setRenderTreeSize):
(WebKit::ViewSnapshot::renderTreeSize const):
(WebKit::ViewSnapshot::setBackgroundColor):
(WebKit::ViewSnapshot::backgroundColor const):
(WebKit::ViewSnapshot::setViewScrollPosition):
(WebKit::ViewSnapshot::viewScrollPosition const):
(WebKit::ViewSnapshot::setDeviceScaleFactor):
(WebKit::ViewSnapshot::deviceScaleFactor const):
(WebKit::ViewSnapshot::surface const):
(WebKit::ViewSnapshot::imageSizeInBytes const):
(WebKit::ViewSnapshot::size const):
(WebKit::ViewSnapshotStore::setDisableSnapshotVolatilityForTesting):
(WebKit::ViewSnapshotStore::disableSnapshotVolatilityForTesting const):

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::didRemoveItem): Unset snapshot for GTK.

  • UIProcess/WebMemoryPressureHandler.cpp: Copied from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.mm.

(WebKit::installMemoryPressureHandler):

  • UIProcess/WebMemoryPressureHandler.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.h.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::recordNavigationSnapshot): Take snapshots for GTK.

  • UIProcess/WebPageProxy.h:
  • UIProcess/gtk/ViewGestureControllerGtk.cpp: Added. This is a port of

UIProcess/mac/ViewGestureControllerMac.mm. SwipeProgressTracker class is a
re-implementation of trackSwipeEventWithOptions.
(WebKit::isEventStop):
(WebKit::ViewGestureController::platformTeardown):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::SwipeProgressTracker::SwipeProgressTracker):
(WebKit::ViewGestureController::SwipeProgressTracker::startTracking):
(WebKit::ViewGestureController::SwipeProgressTracker::reset):
(WebKit::ViewGestureController::SwipeProgressTracker::handleEvent):
(WebKit::ViewGestureController::SwipeProgressTracker::startAnimation):
(WebKit::easeOutCubic):
(WebKit::ViewGestureController::SwipeProgressTracker::onAnimationTick):
(WebKit::ViewGestureController::SwipeProgressTracker::endAnimation):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::handleSwipeGesture):
(WebKit::ViewGestureController::draw):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(WebKit::ViewGestureController::beginSimulatedSwipeInDirectionForTesting):
(WebKit::ViewGestureController::completeSimulatedSwipeInDirectionForTesting):

  • UIProcess/gtk/ViewSnapshotStoreGtk.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/WebMemoryPressureHandlerCocoa.mm.

(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::hasImage const):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::imageSizeInBytes const):
(WebKit::ViewSnapshot::size const):

  • UIProcess/gtk/WebProcessPoolGtk.cpp:

(WebKit::memoryPressureMonitorDisabled): Added.
(WebKit::WebProcessPool::platformInitialize): Install memory pressure handler.
(WebKit::WebProcessPool::platformInitializeWebProcess): Use memoryPressureMonitorDisabled().

  • UIProcess/mac/ViewGestureControllerMac.mm:

Moved many functions into UIProcess/ViewGestureController.cpp
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanEndSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanInfluenceSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventGetScrollingDeltas):
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::scrollEventCanInfluenceSwipe): Deleted.
(WebKit::deltaShouldCancelSwipe): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::handleEvent): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe): Deleted.
(WebKit::ViewGestureController::PendingSwipeTracker::reset): Deleted.
(WebKit::ViewGestureController::willEndSwipeGesture): Deleted.
(WebKit::ViewGestureController::shouldUseSnapshotForSize): Deleted.
(WebKit::ViewGestureController::isPhysicallySwipingLeft const): Deleted.
(WebKit::ViewGestureController::endSwipeGesture): Deleted.
(WebKit::ViewGestureController::forceRepaintIfNeeded): Deleted.
(WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded): Deleted.

  • UIProcess/mac/ViewSnapshotStoreMac.mm: Renamed from Source/WebKit/UIProcess/mac/ViewSnapshotStore.mm.

(WebKit::ViewSnapshotStore::snapshottingContext):
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::setSurface):
(WebKit::ViewSnapshot::hasImage const):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::setVolatile):
(WebKit::ViewSnapshot::asLayerContents):
(WebKit::ViewSnapshot::asImageForTesting):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:

Make SetRenderTreeSizeNotificationThreshold() cross-platform.
(WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
(WebKit::ViewGestureGeometryCollector::computeMinimumAndMaximumViewportScales const):
(WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):

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

Start using ViewGestureGeometryCollector for GTK.
(WebKit::WebPage::mainFrameDidLayout):

  • WebProcess/WebPage/WebPage.h:

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings): Add a test for 'enable-back-forward-navigation-gestures' property.

5:17 PM Changeset in webkit [241223] by achristensen@apple.com
  • 17 edits in trunk

Add SPI to use networking daemon instead of XPC service
https://bugs.webkit.org/show_bug.cgi?id=194427

Source/WebKit:

Reviewed by Geoffrey Garen.

There is still work to be done, but with the proper plist it starts and loads webpages!

  • NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm:

(WebKit::DaemonMain):

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCEventHandler):
(WebKit::XPCInitializationHandler):
(WebKit::XPCServiceMain):
(WebKit::XPCServiceEventHandler): Deleted.

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

(-[_WKProcessPoolConfiguration usesNetworkingDaemon]):
(-[_WKProcessPoolConfiguration setUsesNetworkingDaemon:]):

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::getLaunchOptions):

  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName):
(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getLaunchOptions):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::usesNetworkingDaemon const):

  • UIProcess/WebProcessPool.h:

Source/WTF:

Reviewed by Geoffrey Garen.

  • wtf/spi/darwin/XPCSPI.h:

Instead of using XPC bootstrap SPI, we just send a separate message.
xpc_copy_bootstrap does not seem to work in daemons.

Tools:

Reviewed by Geoffrey Garen

  • MiniBrowser/MiniBrowser.entitlements:
4:29 PM Changeset in webkit [241222] by ysuzuki@apple.com
  • 39 edits in trunk/Source

[JSC] Shrink sizeof(CodeBlock) more
https://bugs.webkit.org/show_bug.cgi?id=194419

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch further shrinks the size of CodeBlock, from 352 to 296 (304).

  1. CodeBlock copies so many data from ScriptExecutable even if ScriptExecutable

has the same information. These data is not touched in CodeBlock::~CodeBlock,
so we can just use the data in ScriptExecutable instead of holding it in CodeBlock.

  1. We remove m_instructions pointer since the ownership is managed by UnlinkedCodeBlock.

And we do not touch it in CodeBlock::~CodeBlock.

  1. We move m_calleeSaveRegisters from CodeBlock to CodeBlock::JITData. For baseline and LLInt

cases, this patch offers RegisterAtOffsetList::llintBaselineCalleeSaveRegisters() which returns
singleton to const RegisterAtOffsetList* usable for LLInt and Baseline JIT CodeBlocks.

  1. Move m_catchProfiles to RareData and materialize only when op_catch's slow path is called.
  1. Drop ownerScriptExecutable. ownerExecutable() returns ScriptExecutable*.
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::hash const):
(JSC::CodeBlock::sourceCodeForTools const):
(JSC::CodeBlock::dumpAssumingJITType const):
(JSC::CodeBlock::dumpSource):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::setCalleeSaveRegisters):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffset):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset const):
(JSC::CodeBlock::hasOpDebugForLineAndColumn):
(JSC::CodeBlock::newReplacement):
(JSC::CodeBlock::replacement):
(JSC::CodeBlock::computeCapabilityLevel):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::calleeSaveRegisters const):
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters):
(JSC::CodeBlock::updateOSRExitCounterAndCheckIfNeedToReoptimize):
(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
(JSC::CodeBlock::notifyLexicalBindingUpdate):
(JSC::CodeBlock::tryGetValueProfileForBytecodeOffset):
(JSC::CodeBlock::validate):
(JSC::CodeBlock::outOfLineJumpTarget):
(JSC::CodeBlock::arithProfileForBytecodeOffset):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::specializationKind const):
(JSC::CodeBlock::isStrictMode const):
(JSC::CodeBlock::isConstructor const):
(JSC::CodeBlock::codeType const):
(JSC::CodeBlock::isKnownNotImmediate):
(JSC::CodeBlock::instructions const):
(JSC::CodeBlock::ownerExecutable const):
(JSC::CodeBlock::thisRegister const):
(JSC::CodeBlock::source const):
(JSC::CodeBlock::sourceOffset const):
(JSC::CodeBlock::firstLineColumnOffset const):
(JSC::CodeBlock::createRareDataIfNecessary):
(JSC::CodeBlock::ownerScriptExecutable const): Deleted.
(JSC::CodeBlock::setThisRegister): Deleted.
(JSC::CodeBlock::calleeSaveRegisters const): Deleted.

  • bytecode/EvalCodeBlock.h:
  • bytecode/FunctionCodeBlock.h:
  • bytecode/GlobalCodeBlock.h:

(JSC::GlobalCodeBlock::GlobalCodeBlock):

  • bytecode/ModuleProgramCodeBlock.h:
  • bytecode/ProgramCodeBlock.h:
  • debugger/Debugger.cpp:

(JSC::Debugger::toggleBreakpoint):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::sourceID const):
(JSC::DebuggerCallFrame::sourceIDForCallFrame):

  • debugger/DebuggerScope.cpp:

(JSC::DebuggerScope::location const):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::InlineStackEntry::executable):
(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::parseCodeBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::isSupportedForInlining):
(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
(JSC::DFG::canUseOSRExitFuzzing):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::executableFor):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::restoreCalleeSavesFor):
(JSC::DFG::saveCalleeSavesFor):
(JSC::DFG::saveOrCopyCalleeSavesFor):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::handleExitCounts):

  • dfg/DFGOperations.cpp:
  • dfg/DFGToFTLDeferredCompilationCallback.cpp:

(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::callerSourceOrigin):

  • interpreter/Interpreter.cpp:

(JSC::eval):
(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::calleeSaveRegisters):
(JSC::StackVisitor::Frame::sourceURL const):
(JSC::StackVisitor::Frame::sourceID):
(JSC::StackVisitor::Frame::computeLineAndColumn const):

  • interpreter/StackVisitor.h:
  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitSaveCalleeSavesFor):
(JSC::AssemblyHelpers::emitSaveOrCopyCalleeSavesFor):
(JSC::AssemblyHelpers::emitRestoreCalleeSavesFor):

  • jit/CallFrameShuffleData.cpp:

(JSC::CallFrameShuffleData::setupCalleeSaveRegisters):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):

  • jit/JITToDFGDeferredCompilationCallback.cpp:

(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::Plan::finalize):
(JSC::JITWorklist::compileNow):

  • jit/RegisterAtOffsetList.cpp:

(JSC::RegisterAtOffsetList::llintBaselineCalleeSaveRegisters):

  • jit/RegisterAtOffsetList.h:

(JSC::RegisterAtOffsetList::at const):

  • runtime/ErrorInstance.cpp:

(JSC::appendSourceToError):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::newCodeBlockFor):

  • runtime/StackFrame.cpp:

(JSC::StackFrame::sourceID const):
(JSC::StackFrame::sourceURL const):
(JSC::StackFrame::computeLineAndColumn const):

Source/WebCore:

  • testing/Internals.cpp:

(WebCore::Internals::parserMetaData):

4:28 PM Changeset in webkit [241221] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Ensure that every builder in config.json has short name
https://bugs.webkit.org/show_bug.cgi?id=194461

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/loadConfig.py:
  • BuildSlaveSupport/ews-build/loadConfig_unittest.py: Updated unit-tests.
4:26 PM Changeset in webkit [241220] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[Cocoa] Optimize ResourceResponse::platformLazyInit()
https://bugs.webkit.org/show_bug.cgi?id=194438

Reviewed by Alex Christensen.

Optimize ResourceResponse::platformLazyInit(). Most of the CPU time currently goes into getting the
HTTP headers from CFNetwork:
"""
Sample Count, Samples %, CPU %, Symbol
46, 0.0%, 0.0%, WebCore::initializeHTTPHeaders(WebCore::OnlyCommonHeaders, NSHTTPURLResponse*, WebCore::HTTPHeaderMap&) (in WebCore)
34, 0.0%, 0.0%, HTTPHeaderDict::copyAsOrdinaryDict(CFAllocator const*) const (in CFNetwork)
11, 0.0%, 0.0%, CFDictionaryApplyFunction (in CoreFoundation)
"""

We currently have 2 levels of initialization: CommonFieldsOnly & AllFields. With WebKit2, most ResourceResponses get sent over IPC
and thus end up getting initialized twice, once with CommonFieldsOnly and then with AllFields.
This would cause us to call the expensive HTTPHeaderDict::copyAsOrdinaryDict() twice instead of once, simply to initialize the common
HTTP headers first and then the uncommon ones later.

This patch updates ResourceResponse::platformLazyInit() to initialize all HTTP headers at once, as soon as CommonFieldsOnly
initialization is requested, so that we no longer copy all HTTP headers twice.

  • platform/network/cocoa/ResourceResponseCocoa.mm:

(WebCore::initializeHTTPHeaders):
(WebCore::ResourceResponse::platformLazyInit):

4:25 PM Changeset in webkit [241219] by commit-queue@webkit.org
  • 16 edits
    2 adds in trunk

Web Inspector: Import / Export Heap Snapshots
https://bugs.webkit.org/show_bug.cgi?id=194448
<rdar://problem/47928093>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-02-08
Reviewed by Devin Rousso.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New strings.

  • UserInterface/Proxies/HeapSnapshotProxy.js:

(WI.HeapSnapshotProxy):
(WI.HeapSnapshotProxy.deserialize):
(WI.HeapSnapshotProxy.prototype.get imported):
(WI.HeapSnapshotProxy.prototype.get snapshotStringData):
(WI.HeapSnapshotProxy.prototype.set snapshotStringData):
Include an "imported" state on the HeapSnapshot and allow for
stashing the snapshotStringData on the main thread side.

  • UserInterface/Proxies/HeapSnapshotWorkerProxy.js:

(WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):

  • UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:

(HeapSnapshotWorker.prototype.clearSnapshots):
(HeapSnapshotWorker.prototype.createSnapshot):
Provide a specialized way to create an imported HeapSnapshot.
Track imported snapshots separately since they won't want to
be searched for live/dead objects due to active recording GCs.

  • UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:

(HeapSnapshot):
(HeapSnapshot.updateCategoriesAndMetadata):
(HeapSnapshot.allocationBucketCounts):
(HeapSnapshot.instancesWithClassName):
(HeapSnapshot.prototype.nodeWithIdentifier):
(HeapSnapshot.prototype.dominatedNodes):
(HeapSnapshot.prototype.retainedNodes):
(HeapSnapshot.prototype.retainers):
(HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
(HeapSnapshot.prototype.serialize):
(HeapSnapshot.prototype.serializeNode):
(HeapSnapshot.prototype._buildPostOrderIndexes):
(HeapSnapshot.prototype._buildDominatorIndexes):
(HeapSnapshot.prototype._buildRetainedSizes):
(HeapSnapshot.prototype._gcRootPathes.visitNode):
(HeapSnapshot.prototype._gcRootPathes):
Construct a HeapSnapshot knowinng whether or not it is imported.
Imported snapshots may be the "GCDebugging" snapshot type which
differs from "Inspector" by the number of node fields. So keep
the node field count a member instead of a global constant
in order to work with both snapshot types.

  • UserInterface/Models/HeapAllocationsInstrument.js:

(WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):

  • UserInterface/Protocol/ConsoleObserver.js:

(WI.ConsoleObserver.prototype.heapSnapshot):

  • UserInterface/Protocol/HeapObserver.js:

(WI.HeapObserver.prototype.trackingStart):
(WI.HeapObserver.prototype.trackingComplete):
Stash the original string JSON data on the main thread side
where we already have the data.

  • UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:

(WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
Don't show [S] icons for imported snapshots with no timestamp.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WI.HeapAllocationsTimelineView):
(WI.HeapAllocationsTimelineView.prototype.get navigationItems):
(WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
(WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
Import button that just creates a new snapshot.

  • UserInterface/Views/HeapSnapshotContentView.js:

(WI.HeapSnapshotContentView):
(WI.HeapSnapshotContentView.prototype.get navigationItems):
(WI.HeapSnapshotContentView.prototype.get supportsSave):
(WI.HeapSnapshotContentView.prototype.get saveData):
(WI.HeapSnapshotContentView.prototype._exportSnapshot):
Export button that saves the original data.

  • UserInterface/Views/TimelineTabContentView.js:

(WI.TimelineTabContentView.displayNameForRecord):
Specialized display string for imported snapshots.

LayoutTests:

  • inspector/heap/imported-snapshot-expected.txt: Added.
  • inspector/heap/imported-snapshot.html: Added.
  • platform/mac/TestExpectations:
4:24 PM Changeset in webkit [241218] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add short name to config.json
https://bugs.webkit.org/show_bug.cgi?id=194456

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/config.json: Added short name.
  • BuildSlaveSupport/ews-build/loadConfig.py:

(loadBuilderConfig): Set the short name as the builder description.

4:21 PM Changeset in webkit [241217] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

B3LowerMacros wrongly sets m_changed to true in the case of AtomicWeakCAS on x86
https://bugs.webkit.org/show_bug.cgi?id=194460

Reviewed by Mark Lam.

Trivial fix, should already be covered by testAtomicWeakCAS in testb3.cpp.

  • b3/B3LowerMacros.cpp:
3:51 PM Changeset in webkit [241216] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
https://bugs.webkit.org/show_bug.cgi?id=194445

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-02-08
Reviewed by Devin Rousso.

  • UserInterface/Base/Setting.js:
  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createDebugSettingsView):

3:50 PM Changeset in webkit [241215] by Alan Coon
  • 1 copy in tags/Safari-607.1.34

Tag Safari-607.1.34.

3:13 PM WebKitGTK/2.22.x edited by Adrian Perez de Castro
(diff)
3:06 PM Changeset in webkit [241214] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Use maxSingleCharacterString in comparisons instead of literal constants.
https://bugs.webkit.org/show_bug.cgi?id=194452

Reviewed by Yusuke Suzuki.

This way, if we ever change maxSingleCharacterString, it won't break all this code
that relies on it being 0xff implicitly.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStringSlice):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringSlice):

  • jit/ThunkGenerators.cpp:

(JSC::stringGetByValGenerator):
(JSC::charToString):

2:54 PM Changeset in webkit [241213] by Adrian Perez de Castro
  • 1 copy in releases/WebKitGTK/webkit-2.22.6

Release: WebKitGTK+ 2.22.6

2:53 PM Changeset in webkit [241212] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.22.4

Release: WPE WebKit 2.22.4

2:52 PM Changeset in webkit [241211] by Adrian Perez de Castro
  • 6 edits in releases/WebKitGTK/webkit-2.22

Unreviewed. Release WebKitGTK+ 2.22.6 and WPE WebKit 2.22.4

.:

  • Source/cmake/OptionsGTK.cmake: Bump version to 2.22.6
  • Source/cmake/OptionsWPE.cmake: Bump version to 2.22.4

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.22.6
  • wpe/NEWS: Add release notes for 2.22.4
2:32 PM Changeset in webkit [241210] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix DFG's doesGC() for CheckTierUp*, GetByVal, PutByVal*, and StringCharAt nodes.
https://bugs.webkit.org/show_bug.cgi?id=194446
<rdar://problem/47926792>

Reviewed by Saam Barati.

Fix doesGC() for the following nodes:

CheckTierUpAtReturn:

Calls triggerTierUpNow(), which calls triggerFTLReplacementCompile(),
which calls Worklist::completeAllReadyPlansForVM(), which uses DeferGC.

CheckTierUpInLoop:

Calls triggerTierUpNowInLoop(), which calls tierUpCommon(), which calls
Worklist::completeAllReadyPlansForVM(), which uses DeferGC.

CheckTierUpAndOSREnter:

Calls triggerOSREntryNow(), which calls tierUpCommon(), which calls
Worklist::completeAllReadyPlansForVM(), which uses DeferGC.

GetByVal:

case Array::String calls operationSingleCharacterString(), which calls
jsSingleCharacterString(), which can allocate a string.

PutByValDirect:
PutByVal:
PutByValAlias:

For the DFG only, the integer TypeArrays calls compilePutByValForIntTypedArray(),
which may call slow paths operationPutByValDirectStrict(), operationPutByValDirectNonStrict(),
operationPutByValStrict(), or operationPutByValNonStrict(). All of these
slow paths call putByValInternal(), which may create exception objects, or
call the generic JSValue::put() which may execute arbitrary code.

StringCharAt:

Can call operationSingleCharacterString(), which calls jsSingleCharacterString(),
which can allocate a string.

Also fix DFG::SpeculativeJIT::compileGetByValOnString() and FTL's compileStringCharAt()
to use the maxSingleCharacterString constant instead of a literal constant.

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnString):

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):

2:17 PM Changeset in webkit [241209] by Nikita Vasilyev
  • 4 edits
    2 adds in trunk

Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
https://bugs.webkit.org/show_bug.cgi?id=182523
<rdar://problem/37260209>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Close CSS comments, append missing closed quotes and right parenthesis.

  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions.completeUnbalancedValue):

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.set rawValue):

LayoutTests:

Test common cases of unmatched quotes, parenthesis, comments, and trailing backslashes.

  • inspector/unit-tests/css-completions-expected.txt: Added.
  • inspector/unit-tests/css-completions.html: Added.
2:11 PM Changeset in webkit [241208] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test accessibility/set-value-not-work-for-disabled-sliders.html is failing
https://bugs.webkit.org/show_bug.cgi?id=194451

Unreviewed test gardening.

  • platform/win/TestExpectations:
1:39 PM Changeset in webkit [241207] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

[Web GPU] Build fix for MTLStorageMode availability on different Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=194443

Unreviewed build fix.

For MTLTextures, MTLStorageModeManaged is only available on macOS. Other platforms,
if not using MTLStorageModePrivate, must use MTLStorageModeShared.

Behavior unchanged.

Patch by Justin Fan <Justin Fan> on 2019-02-08

  • platform/graphics/gpu/cocoa/GPUTextureMetal.mm:

(WebCore::storageModeForPixelFormatAndSampleCount):

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

Layout Test media/audio-concurrent-supported.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=188017

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: The test is not flaky anymore. Remove expectation.
1:19 PM Changeset in webkit [241205] by Truitt Savell
  • 15 edits in trunk/Source

Unreviewed, rolling out r241197.

Broke iOS Simulator Debug build and casued 1 API failure on
High Sierra

Reverted changeset:

"Add SPI to use networking daemon instead of XPC service"
https://bugs.webkit.org/show_bug.cgi?id=194427
https://trac.webkit.org/changeset/241197

12:36 PM Changeset in webkit [241204] by Beth Dakin
  • 2 edits in trunk/Source/WebKit

Abstract and discussion comments needed for afterScreenUpdates
https://bugs.webkit.org/show_bug.cgi?id=194442

Reviewed by Wenson Hsieh.

Forgot to add these comments with https://bugs.webkit.org/show_bug.cgi?id=194362

  • UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
11:48 AM Changeset in webkit [241203] by pvollan@apple.com
  • 5 edits in trunk

[WebVTT] Inline WebVTT styles should start with '::cue'
https://bugs.webkit.org/show_bug.cgi?id=194227
<rdar://problem/47791087>

Reviewed by Eric Carlson.

Source/WebCore:

Check that the CSS string starts with '::cue' and is successfully parsed before adding it
to the CSS stylesheet list. Also, the caption preferences CSS string should start with
'::cue', since it is added inside the video shadow root element.

Test: media/track/track-cue-css.html

  • html/track/WebVTTParser.cpp:

(WebCore::WebVTTParser::checkAndStoreStyleSheet):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride const):

LayoutTests:

  • media/track/captions-webvtt/css-styling.vtt:
11:46 AM Changeset in webkit [241202] by Jonathan Bedard
  • 4 edits in trunk/Tools

webkitpy: CrashLogs.find_all_logs may return a string or a dictionary
https://bugs.webkit.org/show_bug.cgi?id=194418

Reviewed by Lucas Forschler.

Do not include errors trying when finding crashlogs at the end of
a run-webkit-tests run since we don't process those errors.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort._look_for_all_crash_logs_in_log_dir):

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort._look_for_all_crash_logs_in_log_dir):

  • Scripts/webkitpy/port/watch_device.py:

(WatchDevicePort._look_for_all_crash_logs_in_log_dir):

11:18 AM Changeset in webkit [241201] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] SourceProviderCacheItem should be small
https://bugs.webkit.org/show_bug.cgi?id=194432

Reviewed by Saam Barati.

Some JetStream2 tests stress the JS parser. At that time, so many SourceProviderCacheItems are created.
While they are removed when full-GC happens, it significantly increases the peak memory usage.
This patch reduces the size of SourceProviderCacheItem from 56 to 32.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseFunctionInfo):

  • parser/ParserModes.h:
  • parser/ParserTokens.h:
  • parser/SourceProviderCacheItem.h:

(JSC::SourceProviderCacheItem::endFunctionToken const):
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):

10:49 AM Changeset in webkit [241200] by youenn@apple.com
  • 10 edits in trunk

Running RTCRtpSender.getCapabilities("video") before initial offer breaks VP8
https://bugs.webkit.org/show_bug.cgi?id=194380
<rdar://problem/47916514>

Reviewed by Eric Carlson.

Source/WebCore:

Set whether VP8 is supported at creation of the page.
This ensures that any call creating a peer connection factory will end up supporting the runtime flag configuration.

Add internal API to enable resetting the factory to enable proper testing.

Covered by updated test.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::createLibWebRTCPeerConnectionBackend):

  • page/Page.cpp:

(WebCore::m_applicationManifest):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • testing/Internals.cpp:

(WebCore::Internals::clearPeerConnectionFactory):

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

LayoutTests:

  • webrtc/video-mute-vp8-expected.txt:
  • webrtc/video-mute-vp8.html:
10:20 AM Changeset in webkit [241199] by Beth Dakin
  • 6 edits in trunk

Add afterScreenUpdates to WKSnapshotConfiguration
https://bugs.webkit.org/show_bug.cgi?id=194362
-and corresponding-
<rdar://problem/40655528> Please add an "after screen updates" property to
WKSnapshotConfiguration (to solve blank snapshots)

Reviewed by Tim Horton.

Source/WebKit:

This is the WebKit equivalent of - (UIView *)snapshotViewAfterScreenUpdates:(BOOL)afterUpdates;
This makes our snapshotting API more predictable and reliable on iOS devices,
which is why the new configuration property defaults to YES.

New property that defaults to YES.

  • UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
  • UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:

(-[WKSnapshotConfiguration init]):
(-[WKSnapshotConfiguration copyWithZone:]):

When afterScreenUpdates is set, invoke the snapshot via
callAfterNextPresentationUpdate.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _callCompletionHandler:withSnapshotImage:atDeviceScale:]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm:

(TEST):

10:18 AM Changeset in webkit [241198] by aestes@apple.com
  • 6 edits in trunk

[WebIDL] Support serializing sequences and FrozenArrays of non-interfaces
https://bugs.webkit.org/show_bug.cgi?id=190997
<rdar://problem/35983035>

Reviewed by Brent Fulgham.

Source/WebCore:

Support serializing sequences and FrozenArrays of types that aren't interfaces. This is
needed to properly serialize PaymentAddress, which has a FrozenArray of DOMStrings.

We should support serializing sequences of interfaces too, but that's slightly more
complicated since it involves iterating the sequence and serializing each of its items. I
left that as a follow-up task, since I don't see any IDLs that currently need this.

We also don't support serializing sequences with the CachedAttribute or CustomGetter
extended attributes, because WebIDL specifies that a new array should be created when
converting an IDL sequence into an ECMAScript value.

Added bindings test cases to TestSerialization.idl and PaymentAddress test cases to
http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html.

  • bindings/scripts/CodeGenerator.pm:

(GetInterfaceForType): Renamed from GetInterfaceForAttribute.
(IsSerializableType): Modified to allow sequences and FrozenArrays of non-interface types.
(hasCachedAttributeOrCustomGetterExtendedAttribute): Added a helper to determine if an
attribute has the CachedAttribute or CustomGetter extended attributes.
(IsSerializableAttribute): Checked for sequences with the CachedAttribute or CustomGetter
extended attributes before calling IsSerializableType.
(GetInterfaceForAttribute): Renamed to GetInterfaceForType.

  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/TestSerialization.idl:

LayoutTests:

  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html:
9:18 AM Changeset in webkit [241197] by achristensen@apple.com
  • 15 edits in trunk/Source

Add SPI to use networking daemon instead of XPC service
https://bugs.webkit.org/show_bug.cgi?id=194427

Reviewed by Geoffrey Garen.

Source/WebKit:

There is still work to be done, but with the proper plist it starts and loads webpages!

  • NetworkProcess/EntryPoint/Cocoa/Daemon/DaemonEntryPoint.mm:

(WebKit::DaemonMain):

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCEventHandler):
(WebKit::XPCInitializationHandler):
(WebKit::XPCServiceMain):
(WebKit::XPCServiceEventHandler): Deleted.

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

(-[_WKProcessPoolConfiguration usesNetworkingDaemon]):
(-[_WKProcessPoolConfiguration setUsesNetworkingDaemon:]):

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::getLaunchOptions):

  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName):
(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getLaunchOptions):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::usesNetworkingDaemon const):

  • UIProcess/WebProcessPool.h:

Source/WTF:

  • wtf/spi/darwin/XPCSPI.h:

Instead of using XPC bootstrap SPI, we just send a separate message.
xpc_copy_bootstrap does not seem to work in daemons.

9:05 AM Changeset in webkit [241196] by sihui_liu@apple.com
  • 15 edits
    1 add in trunk/Source/WebCore

IndexedDB tests leak documents
https://bugs.webkit.org/show_bug.cgi?id=189435
<rdar://problem/44240043>

Reviewed by Geoffrey Garen.

Remove use of JSC::Strong in IndexedDatabase.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::update):
(WebCore::IDBCursor::continuePrimaryKey):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):

  • Modules/indexeddb/IDBCursor.h:

(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::value):
(WebCore::IDBCursor::keyWrapper):
(WebCore::IDBCursor::primaryKeyWrapper):
(WebCore::IDBCursor::valueWrapper):
(WebCore::IDBCursor::key const): Deleted.
(WebCore::IDBCursor::primaryKey const): Deleted.
(WebCore::IDBCursor::value const): Deleted.

  • Modules/indexeddb/IDBCursor.idl:
  • Modules/indexeddb/IDBCursorWithValue.idl:
  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::putForCursorUpdate):

  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::~IDBRequest):
(WebCore::IDBRequest::result const):
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
(WebCore::IDBRequest::setResultToUndefined):
(WebCore::IDBRequest::resultCursor):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):

  • Modules/indexeddb/IDBRequest.h:

(WebCore::IDBRequest::resultWrapper):

  • Modules/indexeddb/IDBRequest.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSIDBCursorCustom.cpp:

(WebCore::JSIDBCursor::key const):
(WebCore::JSIDBCursor::primaryKey const):
(WebCore::JSIDBCursor::visitAdditionalChildren):

  • bindings/js/JSIDBCursorWithValueCustom.cpp:

(WebCore::JSIDBCursorWithValue::value const):
(WebCore::JSIDBCursorWithValue::visitAdditionalChildren):

  • bindings/js/JSIDBRequestCustom.cpp: Added.

(WebCore::JSIDBRequest::result const):
(WebCore::JSIDBRequest::visitAdditionalChildren):

  • inspector/agents/InspectorIndexedDBAgent.cpp:
6:46 AM Changeset in webkit [241195] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC] The used containing block width value is optional
https://bugs.webkit.org/show_bug.cgi?id=194428

Reviewed by Antti Koivisto.

The preferred width codepath cannot provide a valid used containing block width value.

"The percentage is calculated with respect to the width of the generated box's containing block.
If the containing block's width depends on this element's width, then the resulting layout is undefined in CSS 2.2."

Let's use 0 as used value for now.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedPadding):
(WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):

  • layout/LayoutUnits.h:

(WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

  • page/FrameViewLayoutContext.cpp:
5:57 AM Changeset in webkit [241194] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[LFC] Horizontal geometry compute functions should take the containing block's width as a used value
https://bugs.webkit.org/show_bug.cgi?id=194424

Reviewed by Antti Koivisto.

This is in preparation for passing optional containing block width for the preferred with codepath.

  • layout/FormattingContext.cpp:

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

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

(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedBorder):
(WebCore::Layout::FormattingContext::Geometry::computedPadding):
(WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):

  • layout/LayoutUnits.h:

(WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPadding const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

1:54 AM Changeset in webkit [241193] by sbarati@apple.com
  • 2 edits in trunk/PerformanceTests

Update JetStream2 CLI to not print "ms" since we now just print the score values
https://bugs.webkit.org/show_bug.cgi?id=193981

Reviewed by Yusuke Suzuki.

  • JetStream2/JetStreamDriver.js:

(DefaultBenchmark.prototype.updateUIAfterRun):
(DefaultBenchmark):
(WSLBenchmark.prototype.updateUIAfterRun):
(WSLBenchmark):
(WasmBenchmark.prototype.updateUIAfterRun):
(WasmBenchmark):

1:46 AM Changeset in webkit [241192] by benjamin@webkit.org
  • 7 edits in trunk

clampTo(): do not convert the input to double when dealing with integers
https://bugs.webkit.org/show_bug.cgi?id=194263
<rdar://problem/47692312>

Reviewed by Darin Adler.

Source/WebCore:

Make the calls to clampTo<float>() unambiguous.

  • page/FrameView.cpp:

(WebCore::FrameView::computeUpdatedLayoutViewportRect):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setOpacity):
(WebCore::RenderStyle::setShapeImageThreshold):

Source/WTF:

Previously, every use of clampTo() was converting the input to double,
doing the comparison in double, then casting back to whatever type was needed.

In many case, that was very wasteful. WebKit has many cases of clampTo() with
the same type as input/output, or with integer types of different size/sign.

This patch adds a few versions of clampTo() for the common cases seen in WebKit.
In each case, I tried to minimize the amount of conversion needed at runtime.

  • wtf/MathExtras.h:

(clampTo):

Tools:

  • TestWebKitAPI/Tests/WTF/MathExtras.cpp:

(TestWebKitAPI::testClampFloatingPointToFloatingPoint):
(TestWebKitAPI::testClampFloatingPointToInteger):
(TestWebKitAPI::testClampSameSignIntegers):
(TestWebKitAPI::testClampUnsignedToSigned):
(TestWebKitAPI::testClampSignedToUnsigned):

12:48 AM Changeset in webkit [241191] by Keith Rollin
  • 3 edits
    1 add in trunk/Source/WebKit

Unreviewed build fix.

r241135 modified how entitlements were built up for the macOS. Those
changes broke the iOSMac builds. Bring back some deletions in order to
fix iOSMac.

  • Configurations/PluginService.64.xcconfig:
  • Configurations/PluginService.entitlements: Added.
  • WebKit.xcodeproj/project.pbxproj:
12:37 AM Changeset in webkit [241190] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Source/WebCore:
When performing AXPress, check to see if the menu list is disabled.
https://bugs.webkit.org/show_bug.cgi?id=193878

Patch by Eric Liang <ericliang@apple.com> on 2019-02-08
Reviewed by Chris Fleizach.

Test: accessibility/mac/press-not-work-for-disabled-menu-list.html

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::press):

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:
Check if receive AXPressDidFail notification when performing AXPress action on disabled MenuList.
https://bugs.webkit.org/show_bug.cgi?id=193878

Patch by Eric Liang <ericliang@apple.com> on 2019-02-08
Reviewed by Chris Fleizach.

  • accessibility/mac/press-not-work-for-disabled-menu-list.html: Added.
Note: See TracTimeline for information about the timeline view.