Timeline



Sep 8, 2020:

10:14 PM Changeset in webkit [266775] by Lauro Moura
  • 2 edits in trunk/Tools

kill-old-processes: Remove stale Apache2 shm segments
https://bugs.webkit.org/show_bug.cgi?id=216068

Reviewed by Alexey Proskuryakov.

Based on original patch by Diego Pino Garcia.

When Apache2 terminates abruptely, it may not free up allocated shared
memory segments. When later Apache2 is started again, if its pid
matches the pid of orphan shm segments it fails believing there's
already an Apache2 instance running. To avoid this situation, after
killing Apache2 we check for potential orphaned shm segments and
remove them.

If any error happens during the cleanup, log the failure and continue
the script, addressing the issue that caused the initial revert in
r266536.

  • BuildSlaveSupport/kill-old-processes:

(removeOrphanShmSegments):
(orphanedShmSegmentsByUser):
(main):

9:37 PM Changeset in webkit [266774] by Fujii Hironori
  • 3 edits in trunk/Tools

[WinCairo] TestWTF.WTF.UniqueRef is crashing in Debug builds
https://bugs.webkit.org/show_bug.cgi?id=216303

Reviewed by Ryosuke Niwa.

The class A of UniqueRef.cpp and CompactUniquePtrTuple.cpp are
conflicting. CRT heap threw an exception due to allocator
mismatching while deleting class A object.

  • TestWebKitAPI/Tests/WTF/CompactUniquePtrTuple.cpp: Added a new namespace CompactUniquePtrTupleTest.
  • TestWebKitAPI/Tests/WTF/UniqueRef.cpp: Added a new namespace UniqueRefTest.

(TestWebKitAPI::function): Deleted an unused function.

9:32 PM Changeset in webkit [266773] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening after r266761.

  • platform/mac/TestExpectations: This should have been Mojave, not HighSierra.
9:27 PM Changeset in webkit [266772] by timothy_horton@apple.com
  • 3 edits in trunk/LayoutTests

[ iOS wk2 ] fast/attachment/attachment-thumbnail-preserves-aspect-ratio.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=216300
<rdar://problem/68542670>

Reviewed by Wenson Hsieh.

  • fast/attachment/attachment-thumbnail-preserves-aspect-ratio.html:

shouldBecomeDifferent only works if both of the strings it evals are evaluable in the global scope.

  • platform/ios-wk2/TestExpectations:

Remove the failure expectation.

9:12 PM Changeset in webkit [266771] by Chris Dumez
  • 9 edits in trunk/Source/WebKit

Regression(r260614) Power usage has increased due to extra thread hopping
https://bugs.webkit.org/show_bug.cgi?id=216296
<rdar://problem/67719299>

Reviewed by Simon Fraser.

Power usage has increased after r260614 due to extra thread hopping. To recover,
we now process the DisplayWasRefreshed IPC to a background queue if there is
scrolling going on and responsiveness is thus critical. In the common case, where
the user is not scrolling, we keep processing the IPC on the main thread, like
before r260614. This avoids extra thread hopping and saves power.

  • UIProcess/WebPageProxy.cpp:

(WebKit::ScrollingObserver::willSendWheelEvent):
(WebKit::ScrollingObserver::ScrollingObserver):
(WebKit::ScrollingObserver::singleton):
(WebKit::WebPageProxy::sendWheelEvent):

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::displayLinkCallback):

  • UIProcess/mac/DisplayLink.h:

(WebKit::DisplayLink::setShouldSendIPCOnBackgroundQueue):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::notifyScrollingTreesDisplayWasRefreshed):
(WebKit::EventDispatcher::displayWasRefreshed):

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::displayWasRefreshed):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
8:48 PM Changeset in webkit [266770] by ysuzuki@apple.com
  • 7 edits
    1 add in trunk

[JSC] returnEarlyFromInfiniteLoopsForFuzzing should return object
https://bugs.webkit.org/show_bug.cgi?id=216289
<rdar://problem/68496533>

Reviewed by Saam Barati.

JSTests:

  • stress/construct-return-early-from-infinite-loop-for-fuzzer.js: Added.

(foo):

Source/JavaScriptCore:

When returning early with returnEarlyFromInfiniteLoopsForFuzzing, we are returning with undefined.
But this is wrong when the callee is constructor since constructor is strongly assumed that it returns an object.
We should return some object from returnEarlyFromInfiniteLoopsForFuzzing. In this patch, we return global object
associated to this callee instead of undefined

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::~CodeBlock):

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileLoopHint):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_loop_hint):

  • llint/LowLevelInterpreter64.asm:
8:32 PM Changeset in webkit [266769] by rniwa@webkit.org
  • 9 edits in trunk/Source/WebCore

Having an iframe as a descendent node shouldn't require ElementRareData
https://bugs.webkit.org/show_bug.cgi?id=216264

Reviewed by Darin Adler.

Store the number of connected frames in the descendent nodes directly in Node using CompactUniquePtrTuple
in the same space as where we store the NodeRareData pointer. This avoids creating ElementRareData on every
ancestor element and shadow host / document of an iframe.

Also moved TabIndexState there to simply NodeFlags, and created CustomElementState to replace the existing
flags in NodeFlags to match the latest terminology used in the specification:
https://dom.spec.whatwg.org/#concept-element-custom-element-state

CustomElementState has four states: "uncustomized" (default; builtin elements), "undefined" (i.e. element has
a valid custom element but it hasn't been defined or upgraded yet), "custom" (a valid custom element instance),
and "failed" (upgrading has resulted in an error). Before this patch, "uncustomized" meant that neither
IsCustomElement nor IsEditingTextOrUndefinedCustomElementFlag is set, "undefined" had IsCustomElement
and IsEditingTextOrUndefinedCustomElementFlag set, and "custom" had IsCustomElement set but
IsEditingTextOrUndefinedCustomElementFlag unset whereas "failed" had the opposite.

No new tests since there should be no observable behavioral change.

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild): Mask out the bits stored in
the pointer in the 64-bit architecture. In the 32-bit architecture, the pointer is the first component
without any extra bits stored in it.

  • dom/Element.cpp:

(WebCore::Node::setTabIndexState): Moved from Node.h. Updated to use the newly introduced bitfields.
(WebCore::Node::setCustomElementState): Added.
(WebCore::Element::setIsDefinedCustomElement): Now updates CustomElementState in the newly added bitfields.
(WebCore::Element::setIsFailedCustomElementWithoutClearingReactionQueue): Ditto.
(WebCore::Element::setIsCustomElementUpgradeCandidate): Ditto.

  • dom/ElementRareData.cpp:
  • dom/ElementRareData.h:

(WebCore::ElementRareData): Moved m_unusualTabIndex and m_childIndex to NodeRareData for better packing.

  • dom/Node.cpp:

(WebCore::Node::materializeRareData):
(WebCore::Node::clearRareData):
(WebCore::Node::connectedSubframeCount const): Moved to the header file.
(WebCore::Node::incrementConnectedSubframeCount): Now updates the newly added bitfields.
(WebCore::Node::decrementConnectedSubframeCount): Ditto.

  • dom/Node.h:

(WebCore::Node::isUndefinedCustomElement const): Now uses CustomElementState in the newly added bitfields.
(WebCore::Node::isCustomElementUpgradeCandidate const): Ditto.
(WebCore::Node::isDefinedCustomElement const): Ditto.
(WebCore::Node::isFailedCustomElement const): Ditto.
(WebCore::Node::isEditingText const):
(WebCore::Node::connectedSubframeCount const): Moved here from cpp file.
(WebCore::Node::rareDataMemoryOffset):
(WebCore::Node::rareDataPointerMask): Added.
(WebCore::Node::CustomElementState): Added.
(WebCore::Node::RareDataBitFields): Added.
(WebCore::Node::rareDataBitfields const): Added.
(WebCore::Node::setRareDataBitfields): Added.
(WebCore::Node::tabIndexState const): Updated to use rareDataBitfields.
(WebCore::Node::setTabIndexState): Moved to Element.cpp.
(WebCore::Node::customElementState const): Added.
(WebCore::Node::hasRareData const):
(WebCore::Node::rareData const):

  • dom/NodeRareData.cpp:
  • dom/NodeRareData.h:

(WebCore::NodeRareData::UseType): Removed ConnectedFrameCount.
(WebCore::NodeRareData::NodeRareData):
(WebCore::NodeRareData::useTypes const):
(WebCore::NodeRareData::connectedSubframeCount const): Deleted.
(WebCore::NodeRareData::incrementConnectedSubframeCount): Deleted.
(WebCore::NodeRareData::decrementConnectedSubframeCount): Deleted.
(WebCore::NodeRareData): Moved m_unusualTabIndex and m_childIndex here for better packing in 64-bit architecture.

8:14 PM Changeset in webkit [266768] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

WebCore UnifiedSource81 builds for upwards of 10 minutes
https://bugs.webkit.org/show_bug.cgi?id=216297

Reviewed by Simon Fraser.

  • bindings/js/WebCoreBuiltinNames.h:

(WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
Work around an LLVM regression by disabling debugging in the
WebCoreBuiltinNames constructor. This is tracked by <rdar://68246686>.

This drops the WebCore release build time on my iMac Pro from 14 minutes to 6.

6:35 PM Changeset in webkit [266767] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] fast/attachment/attachment-thumbnail-preserves-aspect-ratio.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=216300

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
6:00 PM Changeset in webkit [266766] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Removed unneeded respondsToSelector checks on UIWKTextInteractionAssistant in WKContentViewInteraction.
https://bugs.webkit.org/show_bug.cgi?id=216204

Reviewed by Wenson Hsieh.

Over the years, we have had many selection and text interaction assistants, that may not have all
responded to the selectors we expect them to. This has left many respondsToSelector checks around that
should be removed, as they are unnecessary and an unneeded performance hit.

No behavior change, covered by existing tests.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _willStartScrollingOrZooming]):
(-[WKContentView _didEndScrollingOrZooming]):

5:52 PM Changeset in webkit [266765] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ macOS iOS ] svg/animations/smil-leak-element-instances-noBaseValRef.svg is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215353

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-09-08
Reviewed by Geoffrey Garen.

This patch reverts r265780 and goes in the opposite direction: allocating
lots and lots of objects, then proving that the number of live objects
did not grow a lot.

GCController can be conservative sometimes and leaves some objects here
and there. So we should not be checking that *all* the objects were freed
to verify there was no leak in allocating the SVG properties objects.

Instead we can check for an end-to-end test the memory did not grow a lot
despite the huge number of allocations.

  • svg/animations/smil-leak-element-instances-noBaseValRef.svg:
5:41 PM Changeset in webkit [266764] by Hector Lopez
  • 3 edits in trunk/LayoutTests

[ macOS iOS ] imported/w3c/web-platform-tests/IndexedDB/blob-valid-after-deletion.any.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=216298

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
5:23 PM Changeset in webkit [266763] by Chris Dumez
  • 4 edits
    2 adds in trunk

Drop non-standard name / units attributes from AudioParam
https://bugs.webkit.org/show_bug.cgi?id=216290

Reviewed by Geoffrey Garen.

Source/WebCore:

Drop non-standard name / units attributes from AudioParam:

Blink does not have them either.

Test: webaudio/audioparam-obsolete-api.html

  • Modules/webaudio/AudioParam.h:
  • Modules/webaudio/AudioParam.idl:

LayoutTests:

Add layout test coverage.

  • webaudio/audioparam-obsolete-api-expected.txt: Added.
  • webaudio/audioparam-obsolete-api.html: Added.
5:16 PM Changeset in webkit [266762] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Drop unnecessary AudioParam::m_smoothingConstant data member
https://bugs.webkit.org/show_bug.cgi?id=216291

Reviewed by Geoffrey Garen.

Drop unnecessary AudioParam::m_smoothingConstant data member. This constant is never changed.

No new tests, no web-facing behavior change.

  • Modules/webaudio/AudioParam.cpp:

(WebCore::AudioParam::AudioParam):
(WebCore::AudioParam::smooth):

  • Modules/webaudio/AudioParam.h:
4:47 PM Changeset in webkit [266761] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict,normal}-015.xht
https://bugs.webkit.org/show_bug.cgi?id=209250

Unreviewed test gardening.

  • platform/mac/TestExpectations: Limit image failure expectation to High Sierra & Catalina.
4:41 PM Changeset in webkit [266760] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[ Mac ] fast/history/page-cache-webdatabase-pending-transaction.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=207010

Unreviewed test gardening.

  • platform/mac/TestExpectations: The test isn't consistently timing out,

so mark it as flaky instead.

4:39 PM Changeset in webkit [266759] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ macOS wk2 Release ] imported/w3c/web-platform-tests/css/css-flexbox/quirks-auto-block-size-with-percentage-item.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=216292

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:32 PM Changeset in webkit [266758] by Ryan Haddad
  • 4 edits in trunk/LayoutTests

http/tests/history/back-with-fragment-change.php fails
https://bugs.webkit.org/show_bug.cgi?id=68278

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Mark test as consistently failing for macOS WK1.
  • platform/mac-wk2/TestExpectations: Mark test as flaky for macOS WK2.
  • platform/mac/TestExpectations: Remove general Mac expectation.
4:03 PM Changeset in webkit [266757] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

NetworkProcess: Check for invalid handle before writing salt file
https://bugs.webkit.org/show_bug.cgi?id=216285

Reviewed by Sihui Liu.

Covered by existing tests.

Fixes crashes in GTK/WPE after r266742.

  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::readOrMakeSalt):

3:58 PM Changeset in webkit [266756] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

Crashtracer inside PDFPlugin::createScrollbar.
<rdar://problem/68474062> and https://bugs.webkit.org/show_bug.cgi?id=216286

Reviewed by Tim Horton.

To quote Tim from r264945:
No new tests; timing is such that I can't reproduce without inserting
intentional delays into the main thread hops, which is further than
I'm willing to go for a test.

This is a speculative fix due to the aforementioned reproducibility issue.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::createScrollbar): Plugin hasn't been destroyed, and there's still a PluginView,

but the PluginView isn't in a frame. So null check that.

3:09 PM Changeset in webkit [266755] by Alan Coon
  • 1 copy in tags/Safari-610.1.28.10.1

Tag Safari-610.1.28.10.1.

2:51 PM Changeset in webkit [266754] by Chris Dumez
  • 19 edits in trunk/LayoutTests/imported/w3c

Unreviewed, rebaseline flaky webaudio WPT tests.

  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-biquad-connection-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-biquad-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-delay-connections-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-delay-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-gain-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-stereo-panner-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/no-dezippering-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/constant-source-output-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/no-dezippering-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-gainnode-interface/no-dezippering-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/automation-changes-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-equalpower-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-scriptprocessornode-interface/simple-input-output-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering-expected.txt:
2:46 PM Changeset in webkit [266753] by weinig@apple.com
  • 40 edits
    1 move
    9 adds
    2 deletes in trunk/Source/WebCore

[WebIDL] Add support for partial interface mixins
https://bugs.webkit.org/show_bug.cgi?id=216255

Reviewed by Darin Adler.

Add support for WebIDL 'partial interface mixins' and adopt them for a few
supplements of the DocumentOrShadowRoot mixin.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • dom/DocumentOrShadowRoot.idl:
  • css/DocumentOrShadowRootStyleSheets.idl: Added.
  • dom/DocumentOrShadowRootPointerLock.idl: Added.
  • Modules/pictureinpicture/DocumentOrShadowRootPictureInPicture.idl: Added.
  • animation/DocumentOrShadowRootAnimations.idl: Added.

Add new split-out IDLs.

  • bindings/scripts/CodeGenerator.pm:

(GenerateEmptyHeaderAndCpp):
Move empty file generation here (from generate-bindings.pl), allowing
for a simplified compilation model, where all IDLs given to generate-bindings.pl
now instantiate the CodeGenerator and it is the CodeGenerators job to figure
out if the file needs anything generated. This allows the dependencies file
to get out of the business of indicating that an IDL doesn't need generation,
and stick to just listing dependencies. This is important now that dependencies
like interface mixins can now have depencies of their own, partial interface mixins.

(ProcessInterfaces):
(ProcessDictionaries):
Move logic to avoid generation of mixins and partials here.

(ProcessInterfaceSupplementalDependencies):
Support recursively processing supplemental dependencies for partial interface
mixins. Ensure that we don't evaluate exposure when doing this, as that should
only happen on the final interface.

(shouldPropertyBeExposed):
Move all logic for exposure here, rather than splitting it up between here
and ProcessInterfaceSupplementalDependencies/ProcessDictionarySupplementalDependencies

  • bindings/scripts/generate-bindings.pl:

(generateBindings):
(generateEmptyHeaderAndCpp): Deleted.
Remove support for unused additionalIdlFiles option and simplify things
by having CodeGenerator work out whether it should generate an empty set of
files based on the files themselves rather than inferring it from the dependency
information.

  • bindings/scripts/preprocess-idls.pl:

(getPartialNamesFromIDL):
Add support for properly parsing partial interface mixins and stop disallowing
dependencies, like a mixin interface, from having its own dependences.

  • bindings/scripts/test/JS/JSTestConditionalIncludes.cpp:
  • bindings/scripts/test/JS/JSTestConditionalIncludes.h:
  • bindings/scripts/test/JS/JSTestIncludes.cpp: Removed.
  • bindings/scripts/test/JS/JSTestIncludes.h: Removed.
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestMixinInterface.cpp: Added.
  • bindings/scripts/test/JS/JSTestMixinInterface.h: Added.
  • bindings/scripts/test/JS/JSTestPartialMixinInterface.cpp: Added.
  • bindings/scripts/test/JS/JSTestPartialMixinInterface.h: Added.
  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestConditionalIncludes.idl:
  • bindings/scripts/test/TestIncludes.idl: Removed.
  • bindings/scripts/test/TestInterface.idl:
  • bindings/scripts/test/TestMixinInterface.idl: Added.
  • bindings/scripts/test/TestObj.idl:
  • bindings/scripts/test/TestPartialMixinInterface.idl: Added.

Rename TestIncludes to TestMixinInterface (since that is what it is testing)
and add TestPartialMixinInterface to test partial interface mixins.

2:40 PM Changeset in webkit [266752] by Peng Liu
  • 2 edits in trunk/Source/WebCore

Web process crashes at WebCore::HTMLMediaElement::prepareForVideoFullscreenStandby
https://bugs.webkit.org/show_bug.cgi?id=216283

Reviewed by Alex Christensen.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::prepareForVideoFullscreenStandby):

2:33 PM Changeset in webkit [266751] by Jonathan Bedard
  • 3 edits in trunk/Tools

[webkitcorepy] Register another package in the WebKit repository (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=216013
<rdar://problem/68097461>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(AutoInstall.register): Use pypiname instead of the package name.

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

Null check m_layerHostingContext in TiledCoreAnimationDrawingArea::sendDidFirstLayerFlushIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=216282
<rdar://problem/64933878>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-09-08
Reviewed by Tim Horton.

There's no reason to dereference null here. Let's not crash.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::sendDidFirstLayerFlushIfNeeded):

2:10 PM Changeset in webkit [266749] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r266681) [GTK] constexpr build failure in LTS/Debian with GCC 8
https://bugs.webkit.org/show_bug.cgi?id=216280

Patch by Lauro Moura <Lauro Moura> on 2020-09-08
Reviewed by Darin Adler and Alex Christensen.

  • platform/text/TextCodecSingleByte.cpp:

(WebCore::tableForDecoding):

2:08 PM Changeset in webkit [266748] by achristensen@apple.com
  • 8 edits in trunk

new URL("#") should throw an error
https://bugs.webkit.org/show_bug.cgi?id=216115

Reviewed by Yusuke Suzuki and Darin Adler.

Source/WebCore:

This aligns the DOM URL object with the specification and Firefox.
Covered by adding to fast/dom/DOMURL/url-constructor.html.

  • html/DOMURL.cpp:

(WebCore::DOMURL::create):

  • html/DOMURL.h:

LayoutTests:

  • fast/dom/DOMURL/url-constructor-expected.txt:
  • fast/dom/DOMURL/url-constructor.html:
  • inspector/unit-tests/url-utilities.html:
  • inspector/unit-tests/url-utilities-expected.txt:
1:32 PM Changeset in webkit [266747] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

re-enable TCSM on all OSs
https://bugs.webkit.org/show_bug.cgi?id=216281

Reviewed by Tadeu Zagallo.

  • runtime/Options.cpp:

(JSC::defaultTCSMValue):

1:24 PM Changeset in webkit [266746] by Chris Dumez
  • 17 edits in trunk

Fix precision issues in AudioParamTimeline when event times are very close
https://bugs.webkit.org/show_bug.cgi?id=216279

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-close-expected.txt:

Rebaseline test that is now passing.

  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-exponentialRampToValueAtTime-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-automation-position-expected.txt:

Rebaseline tests whose output has changed very slightly.

Source/WebCore:

Fix precision issues in AudioParamTimeline when event times are very close. To achieve this,
AudioParamTimeline::valuesForTimeRange() now uses frames for the range instead of time.
frames have the benefit of being more exact.

This change is based on audio_param_timeline.cc from Blink:

No new tests, rebaselined existing test.

  • Modules/webaudio/AudioParam.cpp:

(WebCore::AudioParam::calculateTimelineValues):

  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::valueForContextTime):
(WebCore::AudioParamTimeline::valuesForTimeRange):
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
(WebCore::AudioParamTimeline::isEventCurrent const):

  • Modules/webaudio/AudioParamTimeline.h:

LayoutTests:

Rebaseline tests whose output has changed very slightly.

  • webaudio/audioparam-cancel-and-hold-expected.txt:
  • webaudio/oscillator-custom-expected.wav:
  • webaudio/oscillator-sawtooth-expected.wav:
  • webaudio/oscillator-square-expected.wav:
  • webaudio/oscillator-triangle-expected.wav:
1:24 PM Changeset in webkit [266745] by youenn@apple.com
  • 12 edits in trunk/Source

Tighten checks when creating an audio buffer list
https://bugs.webkit.org/show_bug.cgi?id=216237
<rdar://problem/68271376>

Reviewed by Geoffrey Garen.

Source/WebCore:

Add a routine to check there is no multiplication integer overflow.

  • platform/audio/cocoa/WebAudioBufferList.cpp:

(WebCore::computeBufferSize):
(WebCore::WebAudioBufferList::isSupportedDescription):
(WebCore::WebAudioBufferList::setSampleCount):

  • platform/audio/cocoa/WebAudioBufferList.h:

Source/WebKit:

Add message checks to verify that no message integer overflows happen when processing audio buffer list messages.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::audioTrackRendererManager):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp:

(WebKit::RemoteAudioMediaStreamTrackRenderer::RemoteAudioMediaStreamTrackRenderer):
(WebKit::RemoteAudioMediaStreamTrackRenderer::audioSamplesStorageChanged):
(WebKit::RemoteAudioMediaStreamTrackRenderer::audioSamplesAvailable):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.h:
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.cpp:

(WebKit::RemoteAudioMediaStreamTrackRendererManager::RemoteAudioMediaStreamTrackRendererManager):
(WebKit::RemoteAudioMediaStreamTrackRendererManager::createRenderer):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::audioSamplesStorageChanged):
(WebKit::RemoteMediaRecorder::audioSamplesAvailable):

  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::RemoteAudio::audioSamplesAvailable):

12:49 PM Changeset in webkit [266744] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win] MiniBrowser URL bar can't insert a longer text than the window width
https://bugs.webkit.org/show_bug.cgi?id=216252

Reviewed by Per Arne Vollan.

  • MiniBrowser/win/MainWindow.cpp:

(MainWindow::createToolbar): Set ES_AUTOHSCROLL and for the URL
bar edit control. Removed ES_AUTOVSCROLL for it since it doesn't
scroll vertically.

12:47 PM Changeset in webkit [266743] by timothy_horton@apple.com
  • 20 edits
    3 adds in trunk

iOS: <attachment>'s QuickLook thumbnails can appear squished
https://bugs.webkit.org/show_bug.cgi?id=216209
<rdar://problem/67817706>

Reviewed by Wenson Hsieh.

Source/WebCore:

Test: fast/attachment/attachment-thumbnail-preserves-aspect-ratio.html

  • html/HTMLAttachmentElement.idl:
  • testing/Internals.cpp:

(WebCore::Internals::attachmentThumbnailInfo):

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

Expose the attachment thumbnail size via Internals.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderAttachmentInfo::RenderAttachmentInfo):
Allow the thumbnail aspect ratio to vary, instead of assuming it is always square.

Source/WebKit:

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::convertPlatformImageToBitmap):
Propagate an image of the same aspect ratio that QuickLook provided,
instead of squishing it to square.

  • UIProcess/QuickLookThumbnailLoader.mm:

(-[WKQLThumbnailLoadOperation start]):
Only request full thumbnails; we do not want the icon form, since <attachment>
already has one without QuickLook's help; if we can't get a full thumbnail,
we'll just leave it alone.

Tools:

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

(WTR::UIScriptController::insertAttachmentForFilePath):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::currentTestURL const):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
  • WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:

(WTR::UIScriptControllerCocoa::insertAttachmentForFilePath):
Make it possible to insert an attachment wrapping a file on disk
via UIScriptController.

LayoutTests:

  • fast/attachment/attachment-thumbnail-preserves-aspect-ratio-expected.txt: Added.
  • fast/attachment/attachment-thumbnail-preserves-aspect-ratio.html: Added.
  • fast/attachment/resources/400x200-circle.png: Added.
  • platform/ios/fast/attachment/attachment-thumbnail-preserves-aspect-ratio-expected.txt: Added.
  • resources/ui-helper.js:

(window.UIHelper.insertAttachmentForFilePath):
Add a test that dumps the thumbnail size for a 400x200 attachment.
We only run it on iOS, because on macOS, QuickLook always returns
an image of the size we ask for (400x400), padded with whitespace,
so the problem does not reproduce and the test doesn't work right there.
On iOS, the result used to be 400x400 and now is 400x200.

I tried and failed to make a more useful test (a ref test, actually
testing the presentation) because it's quite hard to match the
native <attachment> painting.

12:37 PM Changeset in webkit [266742] by sihui_liu@apple.com
  • 8 edits in trunk/Source

Remove storage WorkQueue in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=216199

Reviewed by Youenn Fablet.

Source/WebCore:

Move origin fetching code from NetworkProcess to IDBServer.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::collectOriginsForVersion const):
(WebCore::IDBServer::IDBServer::getOrigins const):

  • Modules/indexeddb/server/IDBServer.h:

Source/WebKit:

The only meaningful usage of this WorkQueue is iterating IndexedDB directories and collecting origins, while
there can be some IDB thread accessing the same directories. To remove the race, Let's just drop this WorkQueue
and fetch origins via WebIDBServer.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::getOrigins):

  • NetworkProcess/IndexedDB/WebIDBServer.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::addSessionStorageQuotaManager):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::addIndexedDatabaseSession):
(WebKit::NetworkProcess::addServiceWorkerSession):
(WebKit::NetworkProcess::ensurePathExists): Deleted.
(WebKit::NetworkProcess::postStorageTask): Deleted.
(WebKit::NetworkProcess::performNextStorageTask): Deleted.
(WebKit::NetworkProcess::collectIndexedDatabaseOriginsForVersion): Deleted.
(WebKit::NetworkProcess::indexedDatabaseOrigins): Deleted.

  • NetworkProcess/NetworkProcess.h:
12:29 PM Changeset in webkit [266741] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

EWS should set cq- flag when a patch fails to build or introduces layout-test failures
https://bugs.webkit.org/show_bug.cgi?id=214194

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeCompileWebKitResults.start): Set cq- on patch when patch fails to build.
(AnalyzeLayoutTestsResults.report_failure): Set cq- on patch when patch introduces layout-test failures.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
12:25 PM Changeset in webkit [266740] by commit-queue@webkit.org
  • 5 edits
    8 adds in trunk

CoreImage Implementation of CSS Filters invert(), opacity(), brightness(), contrast()
https://bugs.webkit.org/show_bug.cgi?id=215956

Patch by Frank Yang <guowei_yang@apple.com> on 2020-09-08
Reviewed by Darin Adler.

Source/WebCore:

Adding CoreImage support for 4 more CSS filters, invert, opacity, brightness, contrast,
which all uses FEComponentTransfer and the linear transfer function. Partially implemented
FEComponentTransfer to support linear function type so that the 4 CSS filters work properly

Tests: css3/filters/effect-brightness-square.html

css3/filters/effect-contrast-square.html
css3/filters/effect-invert-square.html
css3/filters/effect-opacity-square.html

  • platform/graphics/coreimage/FilterEffectRendererCoreImage.h:
  • platform/graphics/coreimage/FilterEffectRendererCoreImage.mm:

(WebCore::FilterEffectRendererCoreImage::isNullOrLinearComponentTransferFunction):

currently CoreImage can only render FEComponentTransfer filters if the transfer funtion
is only linear. A FEComponentTransfer filter using only linear function would have it's
red, green, blue, alpha functions types either be linear or null.

(WebCore::FilterEffectRendererCoreImage::supportsCoreImageRendering):

currently CoreImage can only render FEComponentTransfer filters if the transfer funtion
is only linear.

(WebCore::FilterEffectRendererCoreImage::connectCIFilters):

now returns image for FEComponentTransfer

(WebCore::FilterEffectRendererCoreImage::imageForFEComponentTransfer):

function that uses CIFilters to render FEComponentTransfer.

  • platform/graphics/filters/FEComponentTransfer.h:

(isType): added SPECIALIZE_TYPE_TRAITS so that we can downcast to FEComponentTransfer

LayoutTests:

  • css3/filters/effect-brightness-square-expected.html: Added.
  • css3/filters/effect-brightness-square.html: Added.
  • css3/filters/effect-contrast-square-expected.html: Added.
  • css3/filters/effect-contrast-square.html: Added.
  • css3/filters/effect-invert-square-expected.html: Added.
  • css3/filters/effect-invert-square.html: Added.
  • css3/filters/effect-opacity-square-expected.html: Added.
  • css3/filters/effect-opacity-square.html: Added.
12:22 PM Changeset in webkit [266739] by Aditya Keerthi
  • 4 edits
    2 adds in trunk

[macOS] Date/time inputs should preserve focus on value change
https://bugs.webkit.org/show_bug.cgi?id=216272

Reviewed by Wenson Hsieh.

Source/WebCore:

When the value of a date/time input is changed programmatically, the
inner elements of the input are rebuilt. Removing an inner element
that is focused results in the document's activeElement being nulled
out, and the date/time input loses focus.

To fix this issue, check to see whether the input has a focused field
prior to rebuilding. If there is a focused field, make an attempt to
focus the new field with the matching pseudo identifier. This ensures
that the focused field is preserved. If no matching identifier is found,
focus the first field to ensure the date/time input retains focus. The
second case can occur when the new value has different fields than the
old value, for example the presence/lack of a millisecond field in a
time input.

Test: fast/forms/date/date-preserve-focus-value-change.html

  • html/shadow/DateTimeEditElement.cpp:

(WebCore::DateTimeEditElement::focusedFieldElement const):
(WebCore::DateTimeEditElement::layout):

  • html/shadow/DateTimeEditElement.h:

LayoutTests:

  • fast/forms/date/date-preserve-focus-value-change-expected.txt: Added.
  • fast/forms/date/date-preserve-focus-value-change.html: Added.
12:11 PM Changeset in webkit [266738] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

Fix Internals::supportsVCPEncoder on BigSur
https://bugs.webkit.org/show_bug.cgi?id=216174
<rdar://problem/66492801>

Reviewed by Geoffrey Garen.

  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html:

Increase timeout.

12:03 PM Changeset in webkit [266737] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

Do not use mouse events in http/wpt/html/dom/elements/images/hover-image-change.html
https://bugs.webkit.org/show_bug.cgi?id=216265

Reviewed by Antti Koivisto.

  • http/wpt/html/dom/elements/images/hover-image-change.html:

Mouse events do not work in iOS. Instead, use style change through changing class of an element.

11:55 AM Changeset in webkit [266736] by Megan Gardner
  • 4 edits in trunk/Source

Switch from deprecated secondarySelectedControlColor to unemphasizedSelectedContentBackgroundColor.
https://bugs.webkit.org/show_bug.cgi?id=216207

Reviewed by Darin Adler.

Source/WebCore:

No behavior change.

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const):
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const):
(WebCore::RenderThemeMac::systemColor const):

Source/WebKitLegacy/mac:

  • Plugins/WebPluginController.mm:

(-[WebPluginController webPlugInContainerSelectionColor]):

11:49 AM Changeset in webkit [266735] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Incorrect decimal separator in Network web inspector
https://bugs.webkit.org/show_bug.cgi?id=216177

Patch by Patrick Angle <Patrick Angle> on 2020-09-08
Reviewed by Brian Burg.

Removed separate bytes and suffix pieces for resources sizes, allowing the suffix to be localized and the number
to be correctly formatted for the locale.

  • UserInterface/Base/Utilities.js: Number.bytesToString(...) now accepts a byte threshold to support

ResourceSizesContentView where we want less jitter between B and KB as you up/down through resources.

  • UserInterface/Views/ResourceSizesContentView.css:

(.resource-sizes > .content > section.network .bytes): Adopted text-align from .bytes-group.
(.resource-sizes > .content > section.network .bytes-group): Deleted.
(.resource-sizes > .content > section.network .suffix): Deleted.

  • UserInterface/Views/ResourceSizesContentView.js: No longer using a separate suffix element for sizes.

(WI.ResourceSizesContentView.prototype.initialLayout.createSizeComponents):
(WI.ResourceSizesContentView.prototype.initialLayout):
(WI.ResourceSizesContentView.prototype._formattedSizeComponent): Replaces _sizeComponents.
(WI.ResourceSizesContentView.prototype._refreshResourceSizeSection):
(WI.ResourceSizesContentView.prototype._sizeComponents): Deleted.

11:33 AM Changeset in webkit [266734] by Alan Coon
  • 8 edits in branches/safari-610.1.28.10-branch/Source

Versioning.

WebKit-7610.1.28.10.1

11:29 AM Changeset in webkit [266733] by Alan Coon
  • 1 copy in branches/safari-610.1.28.10-branch

New branch.

11:07 AM Changeset in webkit [266732] by Alan Coon
  • 1 copy in tags/Safari-610.1.28.1.8

Tag Safari-610.1.28.1.8.

11:03 AM Changeset in webkit [266731] by Alan Coon
  • 8 edits in branches/safari-610.1.28.1-branch/Source

Versioning.

WebKit-7610.1.28.1.8

10:56 AM Changeset in webkit [266730] by aakash_jain@apple.com
  • 6 edits in trunk/Tools

Use https urls instead of http in webkitpy
https://bugs.webkit.org/show_bug.cgi?id=216276

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/checkout/scm/scm_mock.py:
  • Scripts/webkitpy/common/config/urls.py:
  • Scripts/webkitpy/common/config/urls_unittest.py: Changed few http urls to https, leaving a mix of http and https for testing.
  • Scripts/webkitpy/common/config/watchlist:
  • Scripts/webkitpy/style/checkers/cpp.py:
10:51 AM Changeset in webkit [266729] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Derive big5, jis0208 and jis0212 tables from ICU
https://bugs.webkit.org/show_bug.cgi?id=216253

Patch by Alex Christensen <achristensen@webkit.org> on 2020-09-08
Reviewed by Darin Adler.

This substantially reduces the size of WebCore's binary data without changing behavior.
The EUC-KR table has so many differences from ICU it isn't worth the extraction.
Verified by many assertions and web platform tests.

  • platform/text/EncodingTables.cpp:

(WebCore::jis0208):
(WebCore::jis0212):
(WebCore::big5):
(WebCore::eucKR):
(WebCore::checkEncodingTableInvariants):

  • platform/text/EncodingTables.h:

(WebCore::stableSortByFirst):
(WebCore::findLastInSortedPairs): Deleted.

  • platform/text/TextCodecCJK.cpp:

(WebCore::jis0208EncodeIndex):
(WebCore::codePointJIS0208):
(WebCore::codePointJIS0212):
(WebCore::eucJPEncode):
(WebCore::iso2022JPEncode):
(WebCore::shiftJISEncode):
(WebCore::eucKREncodingIndex):
(WebCore::TextCodecCJK::eucKRDecode):
(WebCore::big5EncodeIndex):
(WebCore::big5Encode):
(WebCore::TextCodecCJK::big5Decode):
(WebCore::jis0208DecodeIndex): Deleted.
(WebCore::big5DecodeIndex): Deleted.

10:38 AM Changeset in webkit [266728] by Peng Liu
  • 21 edits in trunk/Source

Clean up functions and state variables related to the picture-in-picture implementation
https://bugs.webkit.org/show_bug.cgi?id=215972

Reviewed by Jer Noble.

Source/WebCore:

This patch cleans up variables and functions related to changing video presentation mode
in HTMLVideoElement and HTMLMediaElement. It cleans up some event-related code as well.

This patch also simplifies the process of entering the picture-in-picture mode.
The XPC message VideoFullscreenManagerProxy::DidEnterFullscreen from the UI process
will provide the picture-in-picture window size if the video is entering picture-in-picture,
so that we can get rid of the intermediate state (waiting for the initial picture-in-picture
window frame).

With this patch, all presentation mode change requests need to go through the HTMLVideoElement.
Normally, video presentation mode change requests come from the web process where a page
calls the fullscreen/picture-in-picture API or a user interacts with the modern media controls.
However, through gestures, the UI process may request to change the presentation mode
(e.g., from fullscreen to picture-in-picture). The web process side will be like a dry run
because the tasks in the UI process are mostly completed before the web process receives
the request. The motivation to do that is to guarantee correct events are fired.
All scenarios sharing the same code path also help us avoid regressions because we don't
have a good way to create regression tests for the scenarios where presentation mode change
requests come from the UI process.

Covered by existing tests.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::dispatchEvent):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::setVideoFullscreenStandby):
(WebCore::HTMLMediaElement::willBecomeFullscreenElement):
Simplify the implementation.
(WebCore::HTMLMediaElement::willStopBeingFullscreenElement):
(WebCore::HTMLMediaElement::isVideoLayerInline):
(WebCore::HTMLMediaElement::setVideoFullscreenFrame):
(WebCore::HTMLMediaElement::setFullscreenMode):
Delete function HTMLVideoElement::fullscreenModeChanged() and move its code
to this function.
(WebCore::HTMLMediaElement::fullscreenModeChanged): Deleted.

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::fullscreenMode const):
Replace fullscreenModeChanged() with a private function setFullscreenMode().
Change "void setVideoFullscreenFrame(FloatRect)" to "void setVideoFullscreenFrame(const FloatRect&)".

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::webkitDisplayingFullscreen):
(WebCore::HTMLVideoElement::toPresentationMode):
(WebCore::HTMLVideoElement::webkitSetPresentationMode):
(WebCore::HTMLVideoElement::setPresentationMode):
(WebCore::HTMLVideoElement::didEnterFullscreenOrPictureInPicture):
(WebCore::HTMLVideoElement::didExitFullscreenOrPictureInPicture):
(WebCore::HTMLVideoElement::didBecomeFullscreenElement):
(WebCore::HTMLVideoElement::setVideoFullscreenFrame):
(WebCore::toPresentationMode): Deleted.
(WebCore::HTMLVideoElement::setFullscreenMode): Deleted.
(WebCore::HTMLVideoElement::fullscreenModeChanged): Deleted.
(WebCore::HTMLVideoElement::didStopBeingFullscreenElement): Deleted.

  • html/HTMLVideoElement.h:

Only HTMLVIdeoElement::setPresentationMode() can be used by other modules (PlaybackSessionManager
or VideoFullscreenManager) to change the video presentation mode.
This patch defines different callbacks regarding the fullscreen mode change transition
for FullscreenManager and VideoFullscreenManager.

  • didBecomeFullscreenElement for FullscreenManager.
  • didEnterFullscreenOrPictureInPicture and didExitFullscreenOrPictureInPicture for

VideoFullscreenManager.
This patch removes m_isWaitingForPictureInPictureWindowFrame and renames m_isChangingPresentationMode
to m_isChangingVideoFullscreenMode.

  • platform/cocoa/PlaybackSessionModelMediaElement.mm:

(WebCore::PlaybackSessionModelMediaElement::togglePictureInPicture):

  • platform/cocoa/VideoFullscreenChangeObserver.h:
  • platform/cocoa/VideoFullscreenModelVideoElement.mm:

(WebCore::VideoFullscreenModelVideoElement::requestFullscreenMode):
(WebCore::VideoFullscreenModelVideoElement::fullscreenModeChanged):
(WebCore::VideoFullscreenModelVideoElement::setHasVideo):
(WebCore::VideoFullscreenModelVideoElement::setVideoDimensions):
(WebCore::VideoFullscreenModelVideoElement::willEnterPictureInPicture):
(WebCore::VideoFullscreenModelVideoElement::didEnterPictureInPicture):
(WebCore::VideoFullscreenModelVideoElement::failedToEnterPictureInPicture):
(WebCore::VideoFullscreenModelVideoElement::willExitPictureInPicture):
(WebCore::VideoFullscreenModelVideoElement::didExitPictureInPicture):
Iterate a copy of the HashSet of VideoFullscreenModelClient pointers because a callback may
remove the client itself during the iteration.

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

(-[WebAVPlayerLayer calculateTargetVideoFrame]):
(-[WebAVPlayerLayer layoutSublayers]):
(WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
(VideoFullscreenInterfaceAVKit::cleanupFullscreen):
(VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
(VideoFullscreenInterfaceAVKit::failedToStartPictureInPicture):
(VideoFullscreenInterfaceAVKit::doSetup):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):
(VideoFullscreenInterfaceAVKit::willEnterStandbyFromPictureInPicture): Deleted.
(VideoFullscreenInterfaceAVKit::setWillEnterStandbyFromPictureInPicture): Deleted.
Add a property isPictureInPicture to WebAVPlayerLayer, which will set to YES if
a layer is created for picture-in-picture.
This property is used in -[WebAVPlayerLayer layoutSublayers] to skip
the unnecessary calculation of "targetVideoFrame" because the PiP window will
always have the same aspect ratio as the video content, so we can set
"targetVideoFrame" to be the bounds of the layer. Moreover, the calculation may
lead to rounding errors for some numbers and the errors may trigger unnecessary
picture-in-picture window resize events.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

This file has been moved to WebCore so we don't need to include WebCore headers
in a way like "#include <WebCore/XXX.h>".

  • platform/mac/VideoFullscreenInterfaceMac.mm:

(-[WebVideoFullscreenInterfaceMacObjC enterPIP]):
(-[WebVideoFullscreenInterfaceMacObjC boundsDidChangeForVideoViewContainer:]):
(WebCore::VideoFullscreenInterfaceMac::enterFullscreen):
Add PIPState::EnteringPIP. Notify the observer that the video has entered
picture-in-picture after the PiP window size is finalized.

Source/WebKit:

This patch adds an optional FloatSize parameter to the VideoFullscreenManager::DidEnterFullscreen message.
Also, it enables the picture-in-picture and fullscreen events when a video element enters picture-in-picture
from the fullscreen mode.

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

(WebKit::VideoFullscreenModelContext::didEnterFullscreen):
(WebKit::VideoFullscreenModelContext::prepareToExitFullscreen):
(WebKit::VideoFullscreenModelContext::willEnterPictureInPicture):
(WebKit::VideoFullscreenModelContext::didEnterPictureInPicture):
(WebKit::VideoFullscreenModelContext::failedToEnterPictureInPicture):
(WebKit::VideoFullscreenModelContext::willExitPictureInPicture):
(WebKit::VideoFullscreenModelContext::didExitPictureInPicture):
(WebKit::VideoFullscreenManagerProxy::ensureClientForContext):
(WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::VideoFullscreenManagerProxy::enterFullscreen):
(WebKit::VideoFullscreenManagerProxy::didEnterFullscreen):
Use ensureClientForContext() instead of addClientForContext() in setupFullscreenWithID()
to avoid leaking VideoFullscreenInterfaceAVKit instances.
Iterate a copy of the HashSet of VideoFullscreenModelClient pointers because a callback may
remove the client itself during the iteration.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullScreenWindowController prepareToExitPictureInPicture]):

  • UIProcess/mac/WKFullScreenWindowController.h:
  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController didExitPictureInPicture]):
Fix leaking of VideoFullscreenInterfaceMac.

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

(WebKit::VideoFullscreenManager::fullscreenModeChanged):
We need to change the fullscreen mode in the VideoFullscreenInterfaceContext instance as well.
(WebKit::VideoFullscreenManager::didEnterFullscreen):
(WebKit::VideoFullscreenManager::didCleanupFullscreen):
Call didExitFullscreenOrPictureInPicture() instead of didStopBeingFullscreenElement(), which
is for the FullscreenManager.

9:46 AM Changeset in webkit [266727] by Simon Fraser
  • 1 edit
    3 adds in trunk/LayoutTests

Add a standalone version of the test runtime tree map viewer, that can accept stats.json from a local test run
https://bugs.webkit.org/show_bug.cgi?id=189396

Reviewed by Darin Adler.

Add the viewer and a sample stats.json file. Devs can drag a stats.json file into test-duration-treemap.html to
see the map (or specify it as a url parameter).

A future patch will hook this up to results.html.

  • fast/harness/stats.json: Added.
  • fast/harness/test-duration-treemap-expected.txt: Added.
  • fast/harness/test-duration-treemap.html: Added.
8:25 AM Changeset in webkit [266726] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] AcceleratedBackingStoreWayland might erroneously try to use SHM with older wpebackend-fdo
https://bugs.webkit.org/show_bug.cgi?id=216254

Patch by Mike Gorse <mgorse@suse.com> on 2020-09-08
Reviewed by Adrian Perez de Castro.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::tryInitializeSHM): Return false for wpebackend-fdo < 1.7.0.

8:16 AM Changeset in webkit [266725] by Chris Lord
  • 2 edits in trunk/LayoutTests

[GStreamer] Some convolvernode tests are flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=216118

Unreviewed test gardening.

Some tests are causing random, subsequently run tests to crash. Skip
these tests on affected platforms.

  • platform/glib/TestExpectations:
7:53 AM Changeset in webkit [266724] by commit-queue@webkit.org
  • 8 edits
    4 adds in trunk/Tools

[Flatpak SDK] Follow-up fixes for 0.3 branch
https://bugs.webkit.org/show_bug.cgi?id=216239

Patch by Philippe Normand <pnormand@igalia.com> on 2020-09-08
Reviewed by Žan Doberšek.

  • buildstream/elements/filtered.bst: Enable sccache on aarch64 too.
  • buildstream/elements/flatpak/sdk.bst: Enable the rust extension, can be useful eg, when

using gst-build to have the Rust plugins enabled.

  • buildstream/elements/freedesktop-sdk.bst: Switch to tracking branch instead of tags.
  • buildstream/elements/sdk-build-depends/rapidjson.bst: Bump to current git master and add a

patch fixing aarch64 build.

  • buildstream/elements/sdk-platform.bst: Add procps, needed at least for test-webkitpy
  • buildstream/elements/sdk/gst-plugin-dav1d.bst: Added.
  • buildstream/elements/sdk/gst-plugins-bad.bst: Fix build for aarch64.
  • buildstream/elements/sdk/sccache.bst: Disable dist server, we need the client only. The

server builds only on x86_64 anyway.

  • buildstream/files/gst-plugin-dav1d/Cargo.lock: Added.
  • buildstream/patches/rapidjson-0001-Fix-build-warnings-emitted-by-GCC-10-on-Aarch64.patch: Added.
7:24 AM Changeset in webkit [266723] by Karl Rackler
  • 2 edits in trunk/LayoutTests

Removed 6 forms and 3 tables test expectations for Big Sur
rdar://68372418

Unreviewed test gardening.

  • platform/mac/TestExpectations:
6:26 AM Changeset in webkit [266722] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant FormattingContext::Quirks::lineDescentNeedsCollapsing
https://bugs.webkit.org/show_bug.cgi?id=216259

Reviewed by Antti Koivisto.

This function is not needed anymore. InlineBoxes start collapsed by default and they get stretched when they gain content
(and the root inline box has no imaginary strut in non-standard mode).

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

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const): Deleted.

6:18 AM Changeset in webkit [266721] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

[GStreamer] Follow-up of "Convert custom GObject subclasses to WEBKIT_DEFINE_TYPE"
https://bugs.webkit.org/show_bug.cgi?id=204673
<rdar://problem/68455348>

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-09-08
Reviewed by Carlos Garcia Campos.

This a continuation of 204673 since a post-merge review came up: it
was also needed to remove g_type_class_add_private() calls.

No new tests needed.

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(_WebKitWebAudioSrcPrivate::_WebKitWebAudioSrcPrivate):
(webkit_web_audio_src_class_init):

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(webkit_video_sink_class_init):

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webkit_media_clear_key_decrypt_class_init):

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkit_media_common_encryption_decrypt_class_init):

  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:

(webkit_media_thunder_decrypt_class_init):

4:59 AM Changeset in webkit [266720] by commit-queue@webkit.org
  • 8 edits in trunk

Fix crash in image-loading-lazy-slow.html WPT test
https://bugs.webkit.org/show_bug.cgi?id=215998

Patch by Rob Buis <rbuis@igalia.com> on 2020-09-08
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Adjust image-loading-lazy-slow.html to enable lazy image loading.

  • web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html:

Source/WebCore:

When setting images to an empty src, make sure
to reset any lazy image load information.

  • html/LazyLoadImageObserver.h:
  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::elementDidMoveToNewDocument):
(WebCore::ImageLoader::resetLazyImageLoading):

  • loader/ImageLoader.h:

(WebCore::ImageLoader::isDeferred const):

LayoutTests:

Mark image-loading-lazy-slow.html as ImageOnlyFailure.

3:49 AM Changeset in webkit [266719] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[GTK] Unreviewed gardening. Mark several API-GTK tests as failures after r266697.

  • TestWebKitAPI/glib/TestExpectations.json:
1:52 AM Changeset in webkit [266718] by Pablo Saavedra
  • 11 edits
    2 adds in trunk/Source/WebKit

[GLIB] RemoteInspectorServer is not started if WebKitWebContext is not created already created
https://bugs.webkit.org/show_bug.cgi?id=216120

Reviewed by Carlos Garcia Campos.

Added a WebKit/UIProcess/API/glib/WebKitInitialize what implements
its own webkitInitialize() to ensure the inspector server is
initialized as early as possible, before other api calls that would
depend on the inspector server being running.

The RemoteInspectorServer initialization is not longer
asociated to the initialization of the WebProcessPoolGLib.

The webkitInitialize() extends the shared InitializeWebKit2();
and also includes the initialization of the RemoteInspectorServer
so the initialization of the remote inspector server can be now
triggered by the initialization of many other API objects too:
WebKitInputMethodContext, WebKitSettings, WebKitUserContentManager,
WebKitWebContext, WebKitWebsiteDataManager,
WebKitUserContentFilterStore, WebKitWebViewBase.

  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/API/glib/WebKitInitialize.cpp: Added.

(WebKit::initializeRemoteInspectorServer):
(WebKit::webkitInitialize):

  • UIProcess/API/glib/WebKitInitialize.h: Added.
  • UIProcess/API/glib/WebKitInputMethodContext.cpp:

(webkit_input_method_context_class_init):

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_class_init):

  • UIProcess/API/glib/WebKitUserContentFilterStore.cpp:

(webkit_user_content_filter_store_class_init):

  • UIProcess/API/glib/WebKitUserContentManager.cpp:
  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_class_init):

  • UIProcess/API/glib/WebKitWebsiteDataManager.cpp:

(webkit_website_data_manager_class_init):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkit_web_view_base_class_init):

  • UIProcess/glib/WebProcessPoolGLib.cpp:

(WebKit::WebProcessPool::platformInitialize):
(WebKit::initializeRemoteInspectorServer): Deleted.

1:48 AM Changeset in webkit [266717] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Comparing styles with large but identical custom property maps is slow
https://bugs.webkit.org/show_bug.cgi?id=216241
<rdar://problem/67946605>

Reviewed by Darin Adler.

In a full style rebuild we lose sharing of equal StyleCustomPropertyDatas between the old and the new style.
Custom properties are usually defined in document element and this lack of sharing inherits to all elements.
Without sharing equality comparisons end up requiring deep comparisons, which can be slow if there are thousands of properties.

Fix by deduplicating identical property maps between the old the new style. All the descendants that inherit the properties will
now be cheap to compare.

The patch also contains some other basic custom property optimizations.

Going to full screen and back on youtube, this patch reduces time in the longest style update from ~460ms to ~90ms.

  • css/CSSCustomPropertyValue.cpp:

(WebCore::CSSCustomPropertyValue::equals const):

Check for pointer equality first.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::deduplicateInheritedCustomProperties):

Deduplicate if the properties are equal but not shared.

(WebCore::RenderStyle::setInheritedCustomPropertyValue):
(WebCore::RenderStyle::setNonInheritedCustomPropertyValue):

Check if the value is already in the map before triggering copy-on-write.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setInheritedCustomPropertyValue): Deleted.
(WebCore::RenderStyle::setNonInheritedCustomPropertyValue): Deleted.

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyCustomProperty):

Don't create unnecesary copies of CSSCustomPropertyValue.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

Try to deduplicate before comparing the styles.

12:35 AM Changeset in webkit [266716] by svillar@igalia.com
  • 6 edits in trunk

[css-flex] Don't skip flexboxes with auto height for percentage computations in quirks mode
https://bugs.webkit.org/show_bug.cgi?id=216249

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Fixed the (FAIL) expectations of two WPT tests that are now passing.

  • web-platform-tests/css/css-flexbox/percentage-size-quirks-expected.txt: Replaced FAIL with PASS.
  • web-platform-tests/css/css-flexbox/quirks-auto-block-size-with-percentage-item-expected.txt: Ditto.

Source/WebCore:

We shouldn't skip flexboxes with height:auto when going up the ancestor chain as we do with other types as grid.

Apart from that, we force flexible box to follow strict mode even when document is in quirks mode as flexbox
was invented way after quirky browsers. This matches Chromium, Edge (pre-Chromium) and Firefox behaviour.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const): Don't skip flexboxes.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const): Ignore quirks mode for flexboxes.

12:21 AM Changeset in webkit [266715] by ysuzuki@apple.com
  • 6 edits
    4 adds in trunk

[JSC] Special property caching should check Structure's cacheability
https://bugs.webkit.org/show_bug.cgi?id=216222

Reviewed by Saam Barati.

JSTests:

  • stress/module-namespace-object-caching.js: Added.

(shouldBe):
(async fn):

  • stress/not-cache-over-uncacheable-dictionary.js: Added.

(shouldBe):

  • stress/resources/to-string-module.js: Added.

(export.toString):

  • stress/resources/value-of-module.js: Added.

(export.valueOf):

Source/JavaScriptCore:

While StructureRareData::cacheSpecialPropertySlow caches properties, the way it takes is incomplete.
It is not checking Structure's cacheability. We were caching miss condition even if structure is !propertyAccessesAreCacheableForAbsence.
We should perform the same check done in IC case. Strictly speaking, we can cache value for uncacheable-dictionary because we are setting
property change watchpoint (which will fire). But it sounds not so profitable if this structure is uncacheable.

  • runtime/JSObject.cpp:

(JSC::JSObject::convertToUncacheableDictionary):

  • runtime/JSObject.h:
  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::cacheSpecialPropertySlow):

  • tools/JSDollarVM.cpp:

(JSC::functionToUncacheableDictionary):
(JSC::JSDollarVM::finishCreation):

Sep 7, 2020:

9:30 PM Changeset in webkit [266714] by rniwa@webkit.org
  • 11 edits in trunk/Source/WebCore

Move all remaining flags from ElementRareData to Node to reduce the frequency
https://bugs.webkit.org/show_bug.cgi?id=216208

Reviewed by Darin Adler.

This patch moves all remaining bit flags from ElementRareData to Node::m_nodeFlags. It also stores
tabIndex of 0 and -1 in Node::m_nodeFlags to avoid creating ElementRareData for these common values.

No new tests since there should be no behavioral change.

  • dom/Element.cpp:

(WebCore::Element::clearTabIndexExplicitlyIfNeeded): Deleted. Merged into setTabIndexExplicitly.
(WebCore::Element::setTabIndexExplicitly): Now takes Optional<int>. Stores 0 and -1 as node flags.
(WebCore::Element::tabIndexSetExplicitly const): Added the special casing for 0 and -1.
(WebCore::Element::removedFromAncestor):
(WebCore::Element::containsFullScreenElement const): Deleted.
(WebCore::Element::setContainsFullScreenElement):
(WebCore::Element::hasPendingResources const): Deleted.
(WebCore::Element::setHasPendingResources): Deleted.
(WebCore::Element::clearHasPendingResources): Deleted.
(WebCore::Element::hasCSSAnimation const): Deleted.
(WebCore::Element::setHasCSSAnimation): Deleted.
(WebCore::Element::clearHasCSSAnimation): Deleted.
(WebCore::Element::createElementIdentifier):

  • dom/Element.h:

(WebCore::Element::hasPendingResources const): Moved here from Element.cpp.
(WebCore::Element::setHasPendingResources): Ditto.
(WebCore::Element::clearHasPendingResources): Ditto.
(WebCore::Element::hasCSSAnimation const): Ditto.
(WebCore::Element::setHasCSSAnimation): Ditto.
(WebCore::Element::clearHasCSSAnimation): Ditto.
(WebCore::Element::containsFullScreenElement const): Ditto.

  • dom/ElementRareData.cpp:
  • dom/ElementRareData.h:

(WebCore::ElementRareData::tabIndex const): Deleted.
(WebCore::ElementRareData::setTabIndexExplicitly): Deleted.
(WebCore::ElementRareData::tabIndexSetExplicitly const): Deleted.
(WebCore::ElementRareData::clearTabIndexExplicitly): Deleted.
(WebCore::ElementRareData::containsFullScreenElement): Deleted.
(WebCore::ElementRareData::setContainsFullScreenElement): Deleted.
(WebCore::ElementRareData::hasPendingResources const): Deleted.
(WebCore::ElementRareData::setHasPendingResources): Deleted.
(WebCore::ElementRareData::hasCSSAnimation const): Deleted.
(WebCore::ElementRareData::setHasCSSAnimation): Deleted.
(WebCore::ElementRareData::hasElementIdentifier const): Deleted.
(WebCore::ElementRareData::setHasElementIdentifier): Deleted.
(WebCore::ElementRareData::useTypes const): Added the missing use types for style maps, part list,
and part names.
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::unusualTabIndex const): Renamed from tabIndex.
(WebCore::ElementRareData::setUnusualTabIndex): Ditto from setTabIndexExplicitly.

  • dom/Node.cpp:

(WebCore::stringForRareDataUseType): Added the missing strings.

  • dom/Node.h:

(WebCore::Node::NodeFlags): Moved bit flags from ElementRareData and reserved the two highest bits
to store TabIndexState.
(WebCore::Node::s_tabIndexStateBitOffset): Added.
(WebCore::Node::s_tabIndexStateBitMask): Added.
(WebCore::Node::TabIndexState): Added.
(WebCore::Node::tabIndexState const): Added.
(WebCore::Node::setTabIndexState): Added.

  • dom/NodeRareData.h:

(WebCore::NodeRareData::UseType): Added the missing use types: style maps, part list, and part names.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::parseAttribute):

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::parseAttribute):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::parseAttribute):

8:50 PM Changeset in webkit [266713] by rniwa@webkit.org
  • 5 edits in trunk

Make CompactUniquePtrTuple actually work with subclassing and custom deleter
https://bugs.webkit.org/show_bug.cgi?id=216225

Reviewed by Darin Adler.

Source/WTF:

Fixed bugs in CompactUniquePtrTuple which prevented subclassing and custom deleter to work.

  • wtf/CompactPointerTuple.h:

(WTF::CompactPointerTuple::CompactPointerTuple): Added move constructor with implicit cast
of a convertible pointer type.

  • wtf/CompactUniquePtrTuple.h:

(WTF::makeCompactUniquePtr): Added the missing deleter from the return type.
(WTF::CompactUniquePtrTuple::CompactUniquePtrTuple): Allow Deleter to be different if it's
the default deleter in the move constructor so that CompactUniquePtrTuple<U, Type> could be
moved to CompactUniquePtrTuple<T, Type> if U is convertible to T without having to specify
the same deleter (std::default_delete<U> is not same as std::default_delete<T> but allow it).
(WTF::CompactUniquePtrTuple::operator=): Ditto.
(WTF::CompactUniquePtrTuple::setPointer): Ditto from std::unique_ptr.
(WTF::CompactUniquePtrTuple): Friend declare all other specializations of CompactUniquePtrTuple
so that the above fixes work.

Tools:

  • TestWebKitAPI/Tests/WTF/CompactUniquePtrTuple.cpp:

(TestWebKitAPI::A::~A): Make this virtual.
(TestWebKitAPI::B): Added.
(TestWebKitAPI::B::B): Added.
(TestWebKitAPI::B::~B): Added.
(WTF_CompactUniquePtrTuple.Subclassing): Added. Tests subclassing.
(TestWebKitAPI::ADeleter): Added.
(TestWebKitAPI::ADeleter::operator() const):
(WTF_CompactUniquePtrTuple.Deleter): Added. Tests a custom deleter.

7:46 PM Debugging With Visual Studio edited by Fujii Hironori
(diff)
6:35 PM Changeset in webkit [266712] by Chris Dumez
  • 12 edits
    5 adds
    2 deletes in trunk

AudioParam.cancelAndHoldAtTime() is missing
https://bugs.webkit.org/show_bug.cgi?id=215947
<rdar://problem/68362061>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/webaudio/idlharness.https.window-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurveAtTime-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueCurveAtTime-expected.txt:

Source/WebCore:

Add implementation for AudioParam.cancelAndHoldAtTime():

This patch is based on the following Blink commit by Raymond Toy:

Tests: webaudio/audioparam-cancel-and-hold.html

webaudio/cancel-values-crash-913217.html

  • Modules/webaudio/AudioParam.cpp:
  • Modules/webaudio/AudioParam.h:
  • Modules/webaudio/AudioParam.idl:
  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::setValueAtTime):
(WebCore::AudioParamTimeline::linearRampToValueAtTime):
(WebCore::AudioParamTimeline::exponentialRampToValueAtTime):
(WebCore::AudioParamTimeline::setTargetAtTime):
(WebCore::AudioParamTimeline::setValueCurveAtTime):
(WebCore::AudioParamTimeline::insertEvent):
(WebCore::AudioParamTimeline::cancelAndHoldAtTime):
(WebCore::AudioParamTimeline::removeCancelledEvents):
(WebCore::AudioParamTimeline::valueForContextTime):
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
(WebCore::AudioParamTimeline::linearRampAtTime):
(WebCore::AudioParamTimeline::exponentialRampAtTime):
(WebCore::AudioParamTimeline::valueCurveAtTime):
(WebCore::AudioParamTimeline::handleCancelValues):

  • Modules/webaudio/AudioParamTimeline.h:

(WebCore::AudioParamTimeline::ParamEvent::createSetValueEvent):
(WebCore::AudioParamTimeline::ParamEvent::createLinearRampEvent):
(WebCore::AudioParamTimeline::ParamEvent::createExponentialRampEvent):
(WebCore::AudioParamTimeline::ParamEvent::createSetTargetEvent):
(WebCore::AudioParamTimeline::ParamEvent::createSetValueCurveEvent):
(WebCore::AudioParamTimeline::ParamEvent::createCancelValuesEvent):
(WebCore::AudioParamTimeline::ParamEvent::ParamEvent):
(WebCore::AudioParamTimeline::ParamEvent::type const):
(WebCore::AudioParamTimeline::ParamEvent::savedEvent):
(WebCore::AudioParamTimeline::ParamEvent::setCancelledValue):
(WebCore::AudioParamTimeline::ParamEvent::hasDefaultCancelledValue const):
(WebCore::AudioParamTimeline::ParamEvent::curvePointsPerSecond const):
(WebCore::AudioParamTimeline::ParamEvent::curveEndValue const):

LayoutTests:

  • webaudio/audioparam-cancel-and-hold-expected.txt: Added.
  • webaudio/audioparam-cancel-and-hold.html: Added.
  • webaudio/cancel-values-crash-913217-expected.txt: Added.
  • webaudio/cancel-values-crash-913217.html: Added.
  • webaudio/resources/audio-param.js: Added.

Import layout test coverage from Blink.

  • webaudio/audioparam-setValueCurveAtTime-expected.txt: Removed.
  • webaudio/audioparam-setValueCurveAtTime.html: Removed.

Remove outdated test. This test is now part of web-platform-tests at
webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurveAtTime.html
and is now passing.

3:35 PM Changeset in webkit [266711] by Karl Rackler
  • 1 edit
    9 deletes in trunk/LayoutTests

Remove duplicate test expectaions from platform/mac-bigsur
rdar://68372418

Unreviewed test gardening.

  • platform/mac-bigsur/fast/css/text-overflow-input-expected.txt: Removed.
  • platform/mac-bigsur/fast/forms/button-sizes-expected.txt: Removed.
  • platform/mac-bigsur/fast/forms/button-table-styles-expected.txt: Removed.
  • platform/mac-bigsur/fast/forms/input-button-sizes-expected.txt: Removed.
  • platform/mac-bigsur/fast/forms/listbox-bidi-align-expected.txt: Removed.
  • platform/mac-bigsur/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt: Removed.
  • platform/mac-bigsur/tables/mozilla/bugs/bug2479-3-expected.txt: Removed.
  • platform/mac-bigsur/tables/mozilla/bugs/bug33855-expected.txt: Removed.
  • platform/mac-bigsur/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt: Removed.
1:55 PM Changeset in webkit [266710] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Unreviewed, reverting r266645.
https://bugs.webkit.org/show_bug.cgi?id=216251

Caused MotionMark regression

Reverted changeset:

"Move lazy DisplayLink tear down logic from the WebProcess to
the UIProcess"
https://bugs.webkit.org/show_bug.cgi?id=216195
https://trac.webkit.org/changeset/266645

12:36 PM Changeset in webkit [266709] by weinig@apple.com
  • 12 edits
    12 adds in trunk

[WebIDL] Fix issues found by preprocess-idls.pl parser validation and enabled parser validation by default for the tests
https://bugs.webkit.org/show_bug.cgi?id=216246

Reviewed by Darin Adler.

Source/WebCore:

Enabling preprocess-idls.pl's validation parser for run-bindings-tests revealed a few issues
that this change fixes:

  • Includes statements (as well as any other non-extended attribute related statement) in a comment were being treated as being part of the document. Fixed this by moving the existing c/c++ style comment removal from getInterfaceExtendedAttributesFromIDL to processIDL so it is run for all IDLs. Since getInterfaceExtendedAttributesFromIDL was called for most files anyway, this doesn't measurably change the performance.
  • Some test IDLs did not have their primary interface name matching the name of the IDL file. This resulted in a number of tests not actually producing any output. Updated the tests themselves to match name.

To ensure we don't regress here, the validation parser is now always enabled when running
the tests, and preprocess-idls.pl has been updated to be a little less noisy when running
with the validation parser enabled (unless you specify --verbose) so that the test output
is not disturbed.

  • bindings/scripts/preprocess-idls.pl:

(processIDL):
(getPartialNamesFromIDL):
(getIncludedInterfacesFromIDL):
(isCallbackInterfaceFromIDL):
(isMixinInterfaceFromIDL):
(containsIterableInterfaceFromIDL):
(containsInterfaceOrCallbackInterfaceFromIDL):
(containsInterfaceWithConstantsFromIDL):
(getInterfaceExtendedAttributesFromIDL):
(getUndefinedBaseDictionariesFromIDL):

  • bindings/scripts/test/JS/JSTestDomainSecurity.cpp: Added.
  • bindings/scripts/test/JS/JSTestDomainSecurity.h: Added.
  • bindings/scripts/test/JS/JSTestMapLike.cpp: Added.
  • bindings/scripts/test/JS/JSTestMapLike.h: Added.
  • bindings/scripts/test/JS/JSTestReadOnlyMapLike.cpp: Added.
  • bindings/scripts/test/JS/JSTestReadOnlyMapLike.h: Added.
  • bindings/scripts/test/JS/JSTestReadOnlySetLike.cpp: Added.
  • bindings/scripts/test/JS/JSTestReadOnlySetLike.h: Added.
  • bindings/scripts/test/JS/JSTestReportExtraMemoryCost.cpp: Added.
  • bindings/scripts/test/JS/JSTestReportExtraMemoryCost.h: Added.
  • bindings/scripts/test/JS/JSTestSetLike.cpp: Added.
  • bindings/scripts/test/JS/JSTestSetLike.h: Added.
  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestDomainSecurity.idl:
  • bindings/scripts/test/TestMapLike.idl:
  • bindings/scripts/test/TestObj.idl:
  • bindings/scripts/test/TestReadOnlyMapLike.idl:
  • bindings/scripts/test/TestReadOnlySetLike.idl:
  • bindings/scripts/test/TestReportExtraMemoryCost.idl:
  • bindings/scripts/test/TestSetLike.idl:

Tools:

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.generate_supplemental_dependency):
Enable the parser validation for preprocess-idls.pl to catch accidental differences between
the fast regex based scanner in preprocess-idls.pl and the real IDL parser.

12:04 PM Changeset in webkit [266708] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Fix https://trac.webkit.org/changeset/266508 as per post-commit comments
https://bugs.webkit.org/show_bug.cgi?id=216242

Reviewed by Alex Christensen.

No change of behavior.

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::toRTCRtpCapabilities):

11:54 AM Changeset in webkit [266707] by Alan Bujtas
  • 3 edits in trunk/LayoutTests

Unreviewed rebaselining.

The test output (render tree dump) is sensitive to float precision.

r266509 slightly changed the way we compute the run's horizontal position
and its new position is 0.000061px more to the right. The integral ceil that we apply
to the run's width computation in the dump-render-tree-as-text makes the final value go from 39px to 40px.
(Note that final width value has dependency on the horizontal positon.)

  • platform/ios-wk2/TestExpectations:
  • platform/ios/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
11:42 AM Changeset in webkit [266706] by weinig@apple.com
  • 17 edits
    1 copy
    3 adds in trunk/Source/WebCore

[WebIDL] Support extended attributes on includes statements to allow for conditionalized inclusion
https://bugs.webkit.org/show_bug.cgi?id=216235

Reviewed by Darin Adler.

In some circumstancs, such as with the AnimationFrameProvider interface mixin, it is
useful to only include a mixin based on some conditional. For AnimationFrameProvider,
we currently only want to include it in DedicatedWorkerGlobalScope if ENABLE(OFFSCREEN_CANVAS)
is set at compile time, and the runtime feature flag offscreenCanvasEnabled() is turned
on. To support that, this change adds support for specifying extended attributes on the
includes statement itself, and having those extended attributes applied to each member
of the mixin. For AnimationFrameProvider in DedicatedWorkerGlobalScope, that looks like:

[Conditional=OFFSCREEN_CANVAS, EnabledAtRuntime=OffscreenCanvas] DedicatedWorkerGlobalScope includes AnimationFrameProvider;

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:

Add new files, update xcfilelists.

  • animation/AnimationFrameProvider.idl: Added.
  • page/DOMWindow.idl:
  • workers/DedicatedWorkerGlobalScope.idl:

Split AnimationFrameProvider.idl out into its own mixin (as specified) and included it in
both DOMWindow and DedicatedWorkerGlobalScope (conditionally).

  • bindings/scripts/CodeGenerator.pm:

(ProcessDocument):
(ProcessDictionaryAndEnumerationImplementedAsOverrides):
(ProcessInterfaces):
(ProcessCallbackFunctions):
(ProcessDictionaries):
(ProcessEnumerations):
Split processing of each different type of top level type into its own function,
and defer processing of supplemental dependencies until the primary type has been
selected.

(MergeExtendedAttributesFromSupplemental):
(IsValidSupplementalInterface):
(IsValidSupplementalDictionary):
(ProcessInterfaceSupplementalDependencies):
(ProcessDictionarySupplementalDependencies):
Split ProcessSupplementalDependencies into ProcessInterfaceSupplementalDependencies
and ProcessDictionarySupplementalDependencies, which now get passed the primary
interface or dictionary that needs supplementing. ProcessInterfaceSupplementalDependencies
now also supports merging extended attributes from includes statements and checking
that all includes are listed in the dependency set.

  • bindings/scripts/IDLAttributes.json:

Allow setting use of Conditional, EnabledAtRuntime and EnabledBySetting for
includes statements.

  • bindings/scripts/IDLParser.pm:

(parseIncludesStatement):
Fix ordering of struct members so that extendedAttributes is always last (no real
good reason other than most of the structs already did this and the lack of consistency
bothered me). Add extendedAttributes to IDLIncludesStatement and set it when
parsing.

  • bindings/scripts/preprocess-idls.pl:

(getIncludedInterfacesFromIDL):
Fix bug in regex (found easily by the validation parser!) that incorrectly required the interface
name in the includes statement to be the first word on a line.

  • bindings/scripts/test/BindingTestGlobalConstructors.idl:
  • bindings/scripts/test/JS/JSTestConditionalIncludes.cpp: Added.
  • bindings/scripts/test/JS/JSTestConditionalIncludes.h: Added.
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestConditionalIncludes.idl: Added.
  • bindings/scripts/test/TestIncludes.idl:

Add tests for extended attributes on includes statements.

10:55 AM Changeset in webkit [266705] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Add memory cache with/without validation to logResourceResponseSource
https://bugs.webkit.org/show_bug.cgi?id=216244
<rdar://problem/64184239>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-09-07
Reviewed by Darin Adler.

  • loader/ResourceLoader.cpp:

(WebCore::logResourceResponseSource):

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::memoryCacheKey):
(WebCore::DiagnosticLoggingKeys::memoryCacheAfterValidationKey):

  • page/DiagnosticLoggingKeys.h:
10:43 AM Changeset in webkit [266704] by Darin Adler
  • 2 edits in trunk/LayoutTests
  • platform/mac-wk2/TestExpectations: Revert change I accidentally included in my last patch.
10:11 AM Changeset in webkit [266703] by Darin Adler
  • 14 edits in trunk

Make TextCodecCJK and TextCodecSingleByte thread-safe and refactor a bit to share code
https://bugs.webkit.org/show_bug.cgi?id=216229

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/eof-utf-8-one.html:
  • web-platform-tests/encoding/eof-utf-8-three.html:
  • web-platform-tests/encoding/eof-utf-8-two.html:

Updated these files with fresh copies. Somehow, the trailing invalid
UTF-8 sequences from these files must have gotten lost when we
re-synced web-platform-tests/encoding from upstream. If we do that
again, then these tests will start failing again.

Source/WebCore:

The text encoding machinery is usable on multiple threads, but our new TextCodec
classes have some global data structures that need to be guarded to keep that intact.

  • platform/text/EncodingTables.cpp:

(WebCore::checkEncodingTableInvariants): One-time check for invariants that clients
of these tables depend on.

  • platform/text/EncodingTables.h: Added checkEncodingTableInvariants. Also Added

function templates for encoding tables: Added findFirstInSortedPairs,
findLastInSortedPairs and findInSortedPairs for searching a sorted array of pairs
used as a map. Added sortByFirst to aid in the creation of such a sorted array.
And added isSortedByFirst and sortedFirstsAreUnique so we can assert those invariants.
One of the good features of the findInSortedPairs functions is that they handle integer
values that don't fit in an integral key type, returning WTF::nullopt in that case.
That lets us pass code point values when looking in tables that use code units as their
key, without separately checking if they are in range, which otherwise requires
converting to UChar and checking for equality or calling U_IS_BMP.

  • platform/text/TextCodecCJK.cpp:

(WebCore::TextCodecCJK::TextCodecCJK): Call checkEncodingTableInvariants.
(WebCore::TextCodecCJK::encode const): Ditto.
(WebCore::jis0208DecodeIndex): Use std::call_once for thread safety.
Use sortByFirst and sortedFirstsAreUnique.
(WebCore::codePointJIS0208): Use findFirstInSortedPairs.
(WebCore::codePointJIS0212): Ditto.
(WebCore::TextCodecCJK::eucJPDecode): Cast to char instad of LChar when adding
an ASCII character to a StringBuilder.
(WebCore::eucJPEncode): Use the name codePoint instead of c to match other
surrounding code. Use findLastInSortedPairs.
(WebCore::iso2022JPEncode): Removed some unneeded casts to uint8_t when appending
bytes to a Vector. Added a static_assert to check the size of iso2022JPKatakana.
Use findLastInSortedPairs.
(WebCore::shiftJISEncode): Use findInSortedPairs.
(WebCore::eucKREncodingIndex): Use std::call_once for thread safety.
Use sortByFirst and sortedFirstsAreUnique.
(WebCore::eucKREncode): Removed some unneeded casts to uint8_t when appending
bytes to a Vector. Use findFirstInSortedPairs.
(WebCore::TextCodecCJK::eucKRDecode): Use findFirstInSortedPairs.
(WebCore::big5Encode): Use findInSortedPairs. Also renamed c to codePoint.
(WebCore::big5DecodeIndex): Use std::call_once for thread safety.
Use sortByFirst and sortedFirstsAreUnique.
(WebCore::TextCodecCJK::big5Decode): Use findFirstInSortedPairs. Cast to char
instad of LChar when adding an ASCII character to a StringBuilder.

  • platform/text/TextCodecSingleByte.cpp:

(WebCore::tableForEncoding): Return an IteratorRange instead of a pair of
pointer and size. This works with std::begin/end. Also make table with actual
encoded bytes, by adding 0x80 here, rather than doing that when using the table.
(WebCore::encode): Use std::call_once for thread safety.
Use sortByFirst and sortedFirstsAreUnique. The code before was not sorting at
all, which means it probably didn't work in any cases where the code units
happen to not be in ascending order. We should add some test cases.
(WebCore::decode): Use findFirstInSortedPairs. Also use StringView::codePoints
because these are likely to be 8-bit strings and we don't need to temporarily
upconvert them to 16-bit just to encode them. Should probably later measure if
the use of StringView::upconvertedCharacters plus CodePointIterator<UChar>
instead of StringView::codePoints is better for performance in the CJK encoding
functions. This approach means more branching inside the loop, but the other
version involves memory allocation and a second loop when the characters are
all 8-bit.

Tools:

  • TestWebKitAPI/Tests/WTF/StringView.cpp:

(TestWebKitAPI::TEST): Removed an unused variable. At one point, with
code that I wrote and now have rolled out, this was causing a build failure.

LayoutTests:

tests. They were failing because the tests were imported into the source
tree improperly and are passing now that is fixed.

10:02 AM Changeset in webkit [266702] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Build failure; cannot find seccomp.h
https://bugs.webkit.org/show_bug.cgi?id=216226

Patch by Mike Gorse <mgorse@suse.com> on 2020-09-07
Reviewed by Darin Adler.

No new tests (build fix only).

  • PlatformGTK.cmake: Add LIBSECCOMP_INCLUDE_DIRS to

WebKit_SYSTEM_INCLUDE_DIRECTORIES.

9:11 AM Changeset in webkit [266701] by youenn@apple.com
  • 5 edits in trunk

Fix Internals::supportsVCPEncoder on BigSur
https://bugs.webkit.org/show_bug.cgi?id=216174

Reviewed by Eric Carlson.

Source/WebCore:

Fixed by unflaked test.

  • testing/Internals.cpp:

(WebCore::Internals::supportsVCPEncoder):
All MacOS supported versions now supports VCP.

LayoutTests:

  • platform/mac-wk2/TestExpectations:
  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder-expected.txt:
  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html:

Slight modification to make the test run faster and output more comprehensive error message if error happens.

9:11 AM Changeset in webkit [266700] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Update IDLAttributes.json to forbid Exposed on dictionary
https://bugs.webkit.org/show_bug.cgi?id=216243

Reviewed by Alex Christensen.

  • bindings/scripts/IDLAttributes.json:
8:51 AM Changeset in webkit [266699] by youenn@apple.com
  • 7 edits
    12 adds in trunk

Safari takes too long to fetch images from memory cache
https://bugs.webkit.org/show_bug.cgi?id=216048
<rdar://problem/68260952>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/stale-while-revalidate/stale-image.html:
  • web-platform-tests/html/dom/elements/images/bypass-cache-revalidation-expected.txt: Added.
  • web-platform-tests/html/dom/elements/images/bypass-cache-revalidation.html: Added.
  • web-platform-tests/html/dom/elements/images/image.py: Added.

(main):

Source/WebCore:

In case of image resource, we skip revalidation if the stored image is from the same document.
This is inline with https://html.spec.whatwg.org/#updating-the-image-data:list-of-available-images
which defines a list of available images for each Document.
In case fetch mode is different, we do not skip revalidation as we might otherwise bypass security checks.

Tests: http/wpt/html/dom/elements/images/bypass-cache-redirection-revalidation.html

http/wpt/html/dom/elements/images/hover-image-change.html
imported/w3c/web-platform-tests/html/dom/elements/images/bypass-cache-revalidation.html

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::load):
(WebCore::CachedImage::canSkipRevalidation const):

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

(WebCore::CachedResourceLoader::determineRevalidationPolicy const):

LayoutTests:

  • http/wpt/html/dom/elements/images/bypass-cache-redirection-revalidation-expected.txt: Added.
  • http/wpt/html/dom/elements/images/bypass-cache-redirection-revalidation.html: Added.
  • http/wpt/html/dom/elements/images/hover-image-change-expected.html: Added.
  • http/wpt/html/dom/elements/images/hover-image-change.html: Added.
  • http/wpt/html/dom/elements/images/redirect.py: Added.
5:37 AM Changeset in webkit [266698] by youenn@apple.com
  • 27 edits
    8 adds in trunk

Add missing members to RTCIceCandidate
https://bugs.webkit.org/show_bug.cgi?id=216075

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCIceCandidate-constructor-expected.txt:
  • web-platform-tests/webrtc/RTCIceCandidate-constructor.html:
  • web-platform-tests/webrtc/idlharness.https.window-expected.txt:

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:

Source/WebCore:

Sync IDL with latest spec.
Add missing enums and make use of libwebrtc parse routine to get fields from candidate SDP.
Covered by updated tests.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/mediastream/RTCIceCandidate.cpp:

(WebCore::RTCIceCandidate::RTCIceCandidate):
(WebCore::RTCIceCandidate::create):

  • Modules/mediastream/RTCIceCandidate.h:
  • Modules/mediastream/RTCIceCandidate.idl:
  • Modules/mediastream/RTCIceCandidateInit.h:
  • Modules/mediastream/RTCIceCandidateInit.idl:
  • Modules/mediastream/RTCIceCandidateType.h: Added.
  • Modules/mediastream/RTCIceCandidateType.idl: Added.
  • Modules/mediastream/RTCIceComponent.h: Added.
  • Modules/mediastream/RTCIceComponent.idl: Added.
  • Modules/mediastream/RTCIceProtocol.h: Added.
  • Modules/mediastream/RTCIceProtocol.idl: Added.
  • Modules/mediastream/RTCIceTcpCandidateType.h: Added.
  • Modules/mediastream/RTCIceTcpCandidateType.idl: Added.
  • Modules/mediastream/RTCStatsReport.h:
  • Modules/mediastream/RTCStatsReport.idl:
  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:

(WebCore::iceCandidateState):
(WebCore::fillRTCIceCandidateStats):

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::toRTCIceComponent):
(WebCore::toRTCIceProtocol):
(WebCore::toRTCIceTcpCandidateType):
(WebCore::toRTCIceCandidateType):
(WebCore::parseIceCandidateSDP):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::MockLibWebRTCPeerConnectionForIceCandidates::sendCandidates):

LayoutTests:

  • fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt:
3:09 AM Changeset in webkit [266697] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

[GStreamer] Convert custom GObject subclasses to WEBKIT_DEFINE_TYPE
https://bugs.webkit.org/show_bug.cgi?id=204673

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-09-07
Reviewed by Philippe Normand.

Instead of using G_DEFINE_TYPE macro use rather WEBKIT_DEFINE_TYPE
since it handles private structures.

No new tests since no functional changes.

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

Renamed the private structure to match with class name so it can
be autogeneterated by the macro.
(_WebKitWebAudioSrcPrivate::_WebKitWebAudioSrcPrivate): add
constructure.
(_WebKitWebAudioSrcPrivate::~_WebKitWebAudioSrcPrivate): add
destructor.
(webkit_web_audio_src_class_init): remove duplicated
initialization.
(webKitWebAudioSrcConstructed): add constructed vmethod to
initalize some private members.
(webKitWebAudioSrcSetProperty): renamed private structure.
(webKitWebAudioSrcGetProperty): ditto.
(webKitWebAudioSrcAllocateBuffersAndRenderAudio): ditto.
(webKitWebAudioSrcLoop): ditto.

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(webkitVideoSinkConstructed): add constructed vmethod to initalize
some private members.
(webkit_video_sink_class_init): remove duplicated initialization.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webkit_media_clear_key_decrypt_class_init): remove duplicated
initialization.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkit_media_common_encryption_decrypt_class_init): remove
duplicated initialization.
(constructed): add constructed vmethod to initalize some private
members.

  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:

(webkit_media_thunder_decrypt_class_init): remove duplicated
initialization.

2:54 AM Changeset in webkit [266696] by svillar@igalia.com
  • 7 edits in trunk

[css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them
https://bugs.webkit.org/show_bug.cgi?id=212264

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/percentage-heights-003-expected.txt: There were 3 subtests

marked as failures. All of them work fine now.

Source/WebCore:

Implement https://github.com/w3c/csswg-drafts/commit/5b5db39d21f3658ae2f4d7992daaf822aca178d8 which modified
the way percentages were resolved in flexible items with indefinite sizes. From now on we can pretend that
they're really definite.

This allows us to mark 3 tests which were testing percentages in flex items as correct.

Based on Blink's crrev.com/1247184 by <cbiesinger@chromium.org>

This is a reland of r263399 which got reverted due to bug 214655. This same patch was previously relanded in
r262124 which got reverted due to the bug fixed in r263389.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::mainSizeForPercentageResolution): Do only check flex container main size
definiteness when computing the main size for percentage resolution, no need to check flex basis at all.

LayoutTests:

  • css3/flexbox/definite-main-size-expected.txt: Updated expectation.
  • css3/flexbox/definite-main-size.html: Updated comment.
2:20 AM Changeset in webkit [266695] by svillar@igalia.com
  • 7 edits
    2 deletes in trunk

[css-flexbox] min-height: auto not applied to nested flexboxes.
https://bugs.webkit.org/show_bug.cgi?id=210089

Reviewed by Daniel Bates.

Source/WebCore:

Nested flexboxes with column direction were not computing correctly min-size:auto because
we were explicitly preventing them from doing so in the code. Implemented the required bits to
make it work correctly and thus removed the retriction. The idea is to set an indefinite override
containing block size so that percentages would be resolved to auto as spec'ed. The code which
decides whether to apply min-size:auto was refactored in the shouldApplyMinSizeAutoForChild() method.

In order not to cause regressions some other two additional changes were also implemented. First we
had to adjust childHasIntrinsicMainAxisSize() so that it also takes into account the cases where
shouldApplyMinSizeAutoForChild() is true and return true. Secondly we had to add an additional case
to mainAxisLengthIsDefinite() so that it returns false for column flows where the flexBasis is intrinsic.

Inspired by Blink's crrev.com/c/1641510, crrev.com/c/1269995 & crrev.com/c/1786297 by <cbiesinger@chromium.org>

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::shouldApplyMinSizeAutoForChild const): Refactored from
RenderFlexibleBox::adjustChildSizeForMinAndMax.
(WebCore::RenderFlexibleBox::mainAxisLengthIsDefinite const): Additional case for column flows.
(WebCore::RenderFlexibleBox::layoutFlexItems): Reset m_hasDefiniteHeight to Unknown after calling
constructFlexItem() because the latter might set now an override containing block height which basically
potentially makes any cached size value incorrect.
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Directly call shouldApplyMinSizeAutoForChild().
(WebCore::RenderFlexibleBox::constructFlexItem): Set an indefinite override containing block size for
children with percentage sizes so that they're resolved as auto.
(WebCore::RenderFlexibleBox::childHasIntrinsicMainAxisSize const): Return true for those cases where the
main axis length is indefinite and also when shouldApplyMinSizeAutoForChild().

  • rendering/RenderFlexibleBox.h:

LayoutTests:

Apart from enabling some tests we're removing a test which is now invalid as it was added
under the condition that we were not matching the specs wrt percentage height computation in
column flexboxes.

  • TestExpectations: Removed two test cases that are passing now.
  • fast/flexbox/nested-column-intrinsic-min-disabled-expected.html: Removed.
  • fast/flexbox/nested-column-intrinsic-min-disabled.html: Removed.
  • platform/ios/fast/forms/auto-fill-button/input-strong-password-auto-fill-button-expected.txt: Updated.
  • platform/mac/fast/forms/auto-fill-button/input-strong-password-auto-fill-button-expected.txt: Ditto.
1:28 AM Changeset in webkit [266694] by jh718.park@samsung.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Remove the build warning below since r266567.
warning: parameter ‘hint’ set but not used [-Wunused-but-set-parameter]

  • runtime/JSObject.cpp:

(JSC::callToPrimitiveFunction):

Sep 6, 2020:

11:19 PM Changeset in webkit [266693] by mmaxfield@apple.com
  • 8 edits in trunk/Source

[iOS] attachmentActionFont() Needs to use kCTFontSymbolicTrait: @(kCTFontTraitTightLeading | kCTFontTraitEmphasized) to get the short emphasized footnote font
https://bugs.webkit.org/show_bug.cgi?id=215707
<rdar://problem/63930892>

Reviewed by Darin Adler.

Source/WebCore:

This is the correct way to get the short emphasized footnote font.

  • rendering/RenderThemeIOS.mm:

(WebCore::attachmentActionFont):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h: Add an optimzation for platforms which support it.

Source/WTF:

  • wtf/PlatformHave.h:
11:11 PM Changeset in webkit [266692] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebCore

[Cocoa] Prepare for migrating to CTFontHasTable() once it's faster than CTFontCopyAvailableTables()
https://bugs.webkit.org/show_bug.cgi?id=215688

Reviewed by Darin Adler.

Source/WebCore:

We can directly ask Core Text for the information we're looking for.

No new tests because there is no behavior change.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontType::FontType):

  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::fontHasVerticalGlyphs):

  • platform/graphics/opentype/OpenTypeCG.cpp:

(WebCore::OpenType::fontHasMathTable):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:
8:11 PM Writing testharness Tests edited by Fujii Hironori
(diff)
7:34 PM Writing Layout Tests for DumpRenderTree edited by Fujii Hironori
Use js-test.js instread of js-test-pre.js (diff)
7:22 PM Changeset in webkit [266691] by Wenson Hsieh
  • 19 edits in trunk/Source/WebCore

Make WebCore::WritingMode an 8-bit enum class
https://bugs.webkit.org/show_bug.cgi?id=216233

Reviewed by Darin Adler.

Narrow WebCore::WritingMode to an 8-bit enum class; no change in behavior.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator WritingMode const):

  • css/CSSProperty.cpp:

(WebCore::resolveToPhysicalProperty):

  • dom/Element.cpp:

(WebCore::toScrollAlignmentForInlineDirection):
(WebCore::toScrollAlignmentForBlockDirection):

  • page/FrameView.cpp:

(WebCore::paginationModeForRenderStyle):

  • platform/text/WritingMode.h:
  • rendering/GridBaselineAlignment.cpp:

(WebCore::BaselineGroup::isOppositeBlockFlow const):
(WebCore::BaselineGroup::isOrthogonalBlockFlow const):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::adjustBorderBoxRectForPainting):
(WebCore::RenderBlock::paintRectToClipOutFromBorder):
(WebCore::RenderBlock::borderTop const):
(WebCore::RenderBlock::borderLeft const):
(WebCore::RenderBlock::borderBottom const):
(WebCore::RenderBlock::borderRight const):

  • rendering/RenderBox.cpp:

(WebCore::shouldFlipBeforeAfterMargins):
(WebCore::RenderBox::visualOverflowRectForPropagation const):
(WebCore::RenderBox::layoutOverflowRectForPropagation const):

  • rendering/RenderDetailsMarker.cpp:

(WebCore::RenderDetailsMarker::orientation const):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::isLeftToRightFlow const):
(WebCore::RenderFlexibleBox::transformedWritingMode const):
(WebCore::RenderFlexibleBox::flowAwareBorderBefore const):
(WebCore::RenderFlexibleBox::flowAwareBorderAfter const):
(WebCore::RenderFlexibleBox::flowAwarePaddingBefore const):
(WebCore::RenderFlexibleBox::flowAwarePaddingAfter const):
(WebCore::RenderFlexibleBox::flowAwareMarginBeforeForChild const):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paddingTop const):
(WebCore::RenderTableCell::paddingBottom const):
(WebCore::RenderTableCell::paddingLeft const):
(WebCore::RenderTableCell::paddingRight const):

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForStyle):

  • rendering/shapes/ShapeOutsideInfo.cpp:

(WebCore::borderBeforeInWritingMode):
(WebCore::borderAndPaddingBeforeInWritingMode):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::borderBefore const):
(WebCore::RenderStyle::borderAfter const):
(WebCore::RenderStyle::borderBeforeWidth const):
(WebCore::RenderStyle::borderAfterWidth const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialWritingMode):
(WebCore::RenderStyle::setWritingMode):

  • style/StyleAdjuster.cpp:

(WebCore::Style::Adjuster::adjust const):

  • style/StyleBuilderState.cpp:

(WebCore::Style::BuilderState::adjustStyleForInterCharacterRuby):

7:07 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
6:57 PM Debugging With Visual Studio edited by Fujii Hironori
(diff)
6:33 PM Changeset in webkit [266690] by mmaxfield@apple.com
  • 7 edits in trunk/Source

CTFontGetPhysicalSymbolicTraits() is faster than CTFontCopyPhysicalFont()/CTFontGetSymbolicTraits()
https://bugs.webkit.org/show_bug.cgi?id=215685

Reviewed by Darin Adler.

Source/WebCore:

Instead of making the two calls, we can make a single call that has the same effect.

No new tests because there is no behavior change.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::computeNecessarySynthesis):
(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/cocoa/FontCacheCoreText.h:
  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges const):

Source/WTF:

  • wtf/PlatformHave.h:
5:59 PM Changeset in webkit [266689] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[MotionMark - Multiply] Web process spends ~1% of total samples in PropertyCascade::resolveDirectionAndWritingMode
https://bugs.webkit.org/show_bug.cgi?id=216223

Reviewed by Darin Adler.

A few subtests in MotionMark (Leaves, Focus, Design, and especially Multiply) spend large amounts of time in
style resolution (Document::resolveStyle) due to constant style changes across many elements during every
frame. In Multiply, ~3-4% of the time underneath Document::resolveStyle is spent resolving direction and
writing modes inside PropertyCascade::resolveDirectionAndWritingMode (i.e., ~2.3 million invocations). This
helper function is responsible for computing the text direction and CSS writing mode that is used to resolve
direction-aware CSS properties (which are enumerated in CSSProperty::isDirectionAwareProperty). Resolving the
direction and writing mode involves iterating over all of the matched CSS properties (m_matchResult) in the
property cascade in search of CSS properties for writing and direction, which can be relatively expensive when
there are lots of properties in the cascade.

However, if there are no direction-aware CSS properties in the cascade, this work can actually be elided; to
achieve this, we can store the inherited Direction in m_direction, and then lazily resolve it if needed.

I measured this locally to yield a little under ~1% in the Multiply subtest in MotionMark. Otherwise, there is
no change in behavior; see below for more details.

  • style/PropertyCascade.cpp:

(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::set):

If we encounter a direction-aware CSS property, then use direction() to ensure that the direction and writing
mode are resolved.

(WebCore::Style::PropertyCascade::direction const):

Make this getter call resolveDirectionAndWritingMode if needed.

  • style/PropertyCascade.h:

Add a new bool member to keep track of whether or not the CSS direction has not yet been resolved. Note that
since this member variable fits within the padding after Direction m_direction;, this class is still the same
size.

(WebCore::Style::PropertyCascade::direction const): Deleted.

5:52 PM Changeset in webkit [266688] by mmaxfield@apple.com
  • 11 edits
    1 add in trunk

Make GlyphBufferAdvance and GlyphBufferOrigin more robust
https://bugs.webkit.org/show_bug.cgi?id=215143

Reviewed by Zalan Bujtas.

Source/WebCore:

GlyphBuffer contains vectors of advances and origins, which are conceptually
FloatSizes and FloatPoints. However, we need to pass these arrays into CTFontShapeGlyphs()
or CTFontTransformGlyphsWithLanguage(), which expects these vectors to use platform types.
Rather than converting in/out of platform types around the call site, we can simply use
the platform types throughout. Indeed, that's what we're doing today.

However, the mechanism we use today to make this platform-independent is to make a struct
which inherits from the platform types. Then, we static_cast the array of the struct to
an array of the base type. This is brittle, because it relies on the assumption that the
struct doesn't have any members added to it, which would change the stride of the array
and feed garbage into the shaping function.

Instead, a better design is to typedef the native type, and have all interactions with the
types go through standalone functions which deal with the native type. That way, we can't
accidentally change the size of the array elements.

No new tests because there is no behavior change.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::advance):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):
(WebCore::FontCascade::layoutComplexText const):
(WebCore::FontCascade::drawGlyphBuffer const):
(WebCore::FontCascade::drawEmphasisMarks const):
(WebCore::GlyphToPathTranslator::extents):
(WebCore::GlyphToPathTranslator::advance):

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::add):
(WebCore::GlyphBuffer::makeHole):
(WebCore::GlyphBuffer::expandLastAdvance):
(WebCore::GlyphBuffer::flatten):
(WebCore::GlyphBufferAdvance::GlyphBufferAdvance): Deleted.
(WebCore::GlyphBufferAdvance::operator FloatSize): Deleted.
(WebCore::GlyphBufferAdvance::setWidth): Deleted.
(WebCore::GlyphBufferAdvance::setHeight): Deleted.
(WebCore::GlyphBufferAdvance::width const): Deleted.
(WebCore::GlyphBufferAdvance::height const): Deleted.
(WebCore::GlyphBufferAdvance::encode const): Deleted.
(WebCore::GlyphBufferAdvance::decode): Deleted.
(WebCore::GlyphBufferOrigin::GlyphBufferOrigin): Deleted.
(WebCore::GlyphBufferOrigin::operator FloatPoint): Deleted.
(WebCore::GlyphBufferOrigin::setX): Deleted.
(WebCore::GlyphBufferOrigin::setY): Deleted.
(WebCore::GlyphBufferOrigin::x const): Deleted.
(WebCore::GlyphBufferOrigin::y const): Deleted.
(WebCore::GlyphBufferOrigin::encode const): Deleted.
(WebCore::GlyphBufferOrigin::decode): Deleted.
(WebCore::toFloatSize): Deleted.

  • platform/graphics/GlyphBufferMembers.h: Added.

(WebCore::createGlyphBufferAdvance):
(WebCore::floatSizeFromGlyphBufferAdvance):
(WebCore::setGlyphBufferAdvanceWidth):
(WebCore::setGlyphBufferAdvanceHeight):
(WebCore::glyphBufferAdvanceWidth):
(WebCore::glyphBufferAdvanceHeight):
(WebCore::createGlyphBufferOrigin):
(WebCore::floatPointFromGlyphBufferOrigin):
(WebCore::setGlyphBufferOriginX):
(WebCore::setGlyphBufferOriginY):
(WebCore::glyphBufferOriginX):
(WebCore::glyphBufferOriginY):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::advanceOneCharacter):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::DrawGlyphs::computeBounds):

Tools:

  • TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::TEST_F):

5:20 PM Changeset in webkit [266687] by weinig@apple.com
  • 8 edits in trunk

[WebIDL] Add mode to preprocess-idls.pl to validate fast regex based scanner with the normal IDL parser
https://bugs.webkit.org/show_bug.cgi?id=216231

Reviewed by Darin Adler.

Source/WebCore:

To aid tracking down mistakes in the fast regex based scanner in preprocess-idls.pl, this
adds a validation mode to the script which checks the results against what the normal, much
slower, IDL parser gets. In building it, it caught that we were not creating a dependency on
RTCRtpCodingParameters.idl for dictionaries that derived from it because it was missing from
DerivedSources.make/CMakeLists.txt, which would have manifested in confusing build errors
in some cases.

  • CMakeLists.txt:
  • DerivedSources.make:
  • bindings/scripts/generate-bindings-all.pl:

Add missing RTCRtpCodingParameters.idl and update invocation of preprocess-idls.pl to
pass in idlAttributesFile, which the parser needs (it is not read when not validating).

  • bindings/scripts/test/SupplementalDependencies.dep:

Updated to include missing dictionary dependencies.

  • bindings/scripts/preprocess-idls.pl:

(GeneratePartialInterface):
(processIDL):
(getPartialNamesFromIDL):
(getIncludedInterfacesFromIDL):
(isCallbackInterfaceFromIDL):
(isMixinInterfaceFromIDL):
(containsIterableInterfaceFromIDL):
(containsInterfaceOrCallbackInterfaceFromIDL):
(containsInterfaceWithConstantsFromIDL):
(getInterfaceExtendedAttributesFromIDL):
(getUndefinedBaseDictionariesFromIDL):
(shouldExposeInterface):
(getFileContents): Deleted.
(interfaceIsIterable): Deleted.
(containsInterfaceFromIDL): Deleted.
(interfaceHasConstantAttribute): Deleted.
(updateDictionaryDependencies): Deleted.

  • Allow enabling a validation mode via the $validateAgainstParser variable which parses each IDL with the normal IDL parser and compares results.
  • Updates a bunch of naming to be more clear about which variables contain file names vs. file paths.
  • Renames functions to use more consistent naming.
  • Fixes bug in dictionary dependency analysis that silently ignored dependencies that weren't in the file list.

Tools:

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.generate_supplemental_dependency):
Update for rename from idlFilesList to idlFileNamesList and to pass the idlAttributesFile argument.

5:00 PM Changeset in webkit [266686] by mmaxfield@apple.com
  • 16 edits in trunk/Source/WebCore

Remove all non-web-exposed uses of ENABLE(VARIATION_FONTS)
https://bugs.webkit.org/show_bug.cgi?id=216211

Reviewed by Darin Adler.

This is the first step toward enabling variation fonts on all ports.
This patch compiles internal data structures on all ports, keeping care to not make
any web-exposed changes. It also stops consulting with ENABLE(VARIATION_FONTS) on
Cocoa platforms, since the flag is enabled on all Cocoa platforms and we've been
shipping it for years.

No new tests because there is no behavior change.

  • css/CSSFontVariationValue.cpp:
  • css/CSSFontVariationValue.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::equals const):
(WebCore::CSSValue::cssText const):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isFontFeatureValue const):
(WebCore::CSSValue::isFontVariationValue const):

  • platform/graphics/FontCache.h:

(WebCore::FontDescriptionKey::FontDescriptionKey):
(WebCore::FontDescriptionKey::operator== const):
(WebCore::FontDescriptionKey::computeHash const):

  • platform/graphics/FontCascadeDescription.cpp:
  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::setFeatureSettings):
(WebCore::FontDescription::setVariationSettings):
(WebCore::FontDescription::operator== const):
(WebCore::FontDescription::encode const):
(WebCore::FontDescription::decode):

  • platform/graphics/FontTaggedSettings.cpp:

(WebCore::operator<<):

  • platform/graphics/FontTaggedSettings.h:

(WebCore::FontVariationSettings::isEmpty const): Deleted.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::denormalizeVariationWidth):
(WebCore::normalizeVariationWidth):
(WebCore::preparePlatformFont):
(WebCore::extractVariationBounds):
(WebCore::variationCapabilitiesForFontDescriptor):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::supportsFormat):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setFontVariationSettings):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::fontVariationSettings const):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertFontVariationSettings):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInheritFontFeatureSettings):
(WebCore::Style::BuilderCustom::applyInheritFontVariationSettings):

4:42 PM Changeset in webkit [266685] by Alan Bujtas
  • 17 edits
    1 move in trunk/Source/WebCore

[LFC][IFC] Rename Display::LineBox to Display::Line
https://bugs.webkit.org/show_bug.cgi?id=216232

Reviewed by Sam Weinig.

Display::LineBox represent a line and not to be confused with Layout::LineBox which represents a collection of inline boxes.

  • WebCore.xcodeproj/project.pbxproj:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):

  • layout/displaytree/DisplayInlineContent.h:

(WebCore::Display::InlineContent::lineForRun const):
(WebCore::Display::InlineContent::lineBoxForRun const): Deleted.

  • layout/displaytree/DisplayLine.h: Renamed from Source/WebCore/layout/displaytree/DisplayLineBox.h.

(WebCore::Display::Line::rect const):
(WebCore::Display::Line::scrollableOverflow const):
(WebCore::Display::Line::inkOverflow const):
(WebCore::Display::Line::left const):
(WebCore::Display::Line::right const):
(WebCore::Display::Line::top const):
(WebCore::Display::Line::bottom const):
(WebCore::Display::Line::width const):
(WebCore::Display::Line::height const):
(WebCore::Display::Line::baseline const):
(WebCore::Display::Line::Line):
(WebCore::Display::Line::moveVertically):

  • layout/displaytree/DisplayPainter.cpp:

(WebCore::Display::paintInlineContent):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::createDisplayBoxesForLineContent):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineFormattingState.h:

(WebCore::Layout::InlineFormattingState::shrinkDisplayInlineContent):

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::LineBox::constructInlineBoxes):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):
(WebCore::LayoutIntegration::LineLayout::lineCount const):
(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::collectOverflow):
(WebCore::LayoutIntegration::LineLayout::paint):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::outputInlineRuns):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):

  • layout/tableformatting/TableFormattingContextGeometry.cpp:

(WebCore::Layout::TableFormattingContext::Geometry::usedBaselineForCell):

  • rendering/line/LineLayoutTraversalDisplayRunPath.h:

(WebCore::LineLayoutTraversal::DisplayRunPath::baseline const):
(WebCore::LineLayoutTraversal::DisplayRunPath::line const):
(WebCore::LineLayoutTraversal::DisplayRunPath::lineBox const): Deleted.

4:09 PM Changeset in webkit [266684] by Chris Dumez
  • 11 edits in trunk

ConvolverNode incorrectly outputs silence because m_reverb is null
https://bugs.webkit.org/show_bug.cgi?id=216230

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Unreviewed, rebaseline tests that are now passing.

  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-2-chan-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-4-chan-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-upmixing-1-channel-response-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:

Source/WebCore:

ConvolverNode relies on m_reverb to to audio processing. m_reverb would get initialized
when calling ConvolverNode::setBuffer(). However, setting the buffer would cause
ConvolverNode::checkNumberOfChannelsForInput(), which could cause unitialize() and then
initialize() to get called. The issue was that unitialize() would null out m_reverb
and nothing would re-initialize it.

No new tests, rebaselined existing tests.

  • Modules/webaudio/ConvolverNode.cpp:

(WebCore::ConvolverNode::initialize): Deleted.
(WebCore::ConvolverNode::uninitialize): Deleted.

  • Modules/webaudio/ConvolverNode.h:

LayoutTests:

Unreviewed, unskip tests that should hopefully not be flaky anymore, not that they
are passing.

3:20 PM Changeset in webkit [266683] by mmaxfield@apple.com
  • 18 edits in trunk

Letter-spacing should disable ligatures
https://bugs.webkit.org/show_bug.cgi?id=176215
<rdar://problem/17044265>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

This test is sensitive the order of the CSSPropertyID enum values.

  • web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Apparently this

test is sensitive to the ordering of CSSPropertyID enum values in CSSPropertyNames.h.
I filed https://bugs.webkit.org/show_bug.cgi?id=216170 about this.

Source/WebCore:

The CSS Text spec[1] says:
"When the effective spacing between two characters is not zero (due to either justification
or a non-zero value of letter-spacing), user agents should not apply optional ligatures."

The CSS Fonts spec[2] describes exactly how this is supposed to work:
"Step 11. Feature settings determined by properties other than font-variant or
font-feature-settings are applied. For example, setting a non-default value for the
letter-spacing property disables optional ligatures."

Disabling ligatures requires modifying font features, which means that the information about
whether we should disable them or not needs to be inside the FontDescription. This patch adds
a new bit, m_shouldDisableLigaturesForSpacing, to FontDescription. preparePlatformFont()
reads this bit and disables ligatures appropriately.

There's a bit of complexity here because the letter-spacing value itself lies inside the
RenderStyle, but the derived bit lies inside the FontDescriptor, which is one reason why
this patch migrates letter-spacing to use custom codegen functions. There's also a bit of
complexity about dependencies which is explained in a comment in
maybeUpdateFontForLetterSpacing().

[1] https://drafts.csswg.org/css-text-3/#letter-spacing-property
[2] https://drafts.csswg.org/css-fonts-4/#feature-variation-precedence

Test: imported/w3c/web-platform-tests/css/css-fonts/font-feature-resolution-001.html

  • css/CSSProperties.json: letter-spacing has to be high-priority because it affects font

selection, but it has to be processed after zoom because its <length> value is sensitive to
zoom. This adds a new keyword CSSProperties.json: sink-property which can let a property
sink to the bottom of its priority bucket.

  • css/makeprop.pl:

(addProperty):
(sortByDescendingPriorityAndName):

  • platform/graphics/FontCache.h:

(WebCore::FontDescriptionKey::makeFlagsKey):

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::shouldDisableLigaturesForSpacing const):
(WebCore::FontDescription::setShouldDisableLigaturesForSpacing):
(WebCore::FontDescription::operator== const):
(WebCore::FontDescription::encode const):
(WebCore::FontDescription::decode):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont): We can get into a situation where "liga" and "clig" don't
match, which means whichever one is later clobbers whichever one is earlier when applied to
AAT fonts. We need to make sure these values match so we don't get surprising results.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setLetterSpacing):
(WebCore::RenderStyle::setLetterSpacingWithoutUpdatingFontDescription):

  • rendering/style/RenderStyle.h:
  • style/StyleBuilderCustom.h:

(WebCore::Style::applyLetterSpacing):
(WebCore::Style::BuilderCustom::applyInheritLetterSpacing):
(WebCore::Style::BuilderCustom::applyInitialLetterSpacing):
(WebCore::Style::maybeUpdateFontForLetterSpacing):
(WebCore::Style::BuilderCustom::applyValueLetterSpacing):
(WebCore::Style::BuilderCustom::applyValueWebkitLocale):
(WebCore::Style::BuilderCustom::applyInitialFontFamily):
(WebCore::Style::BuilderCustom::applyInheritFontFamily):
(WebCore::Style::BuilderCustom::applyValueFontFamily):
(WebCore::Style::BuilderCustom::applyInitialFontSize):
(WebCore::Style::BuilderCustom::applyInheritFontSize):
(WebCore::Style::BuilderCustom::applyValueFontSize):

  • style/StyleBuilderState.h:

Tools:

  • Scripts/webkitpy/style/checkers/jsonchecker.py:

(JSONCSSPropertiesChecker.check_codegen_properties):

LayoutTests:

imported/w3c/web-platform-tests/css/css-fonts/font-feature-resolution-001.html passes now.

  • TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt:

Apparently this test is sensitive to the ordering of CSSPropertyID enum values in CSSPropertyNames.h.
I filed https://bugs.webkit.org/show_bug.cgi?id=216170 about this.

  • platform/mac-wk1/editing/mac/attributed-string/letter-spacing-expected.txt: Updated.
  • platform/mac-mojave-wk1/editing/mac/attributed-string/letter-spacing-expected.txt: Updated
2:32 PM Changeset in webkit [266682] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[LFC][IFC] LineBox should contain all inline boxes
https://bugs.webkit.org/show_bug.cgi?id=216221

Reviewed by Antti Koivisto.

In this patch we decouple the line box and the line.

Previously the LineBox was pretty much representing the line.
It was responsible for both placing the inline boxes and sizing the line and position itself based on line-height/half leading.
Now the LineBox is only responsible for placing the inline boxes and sizing itself, it has no position geometry anymore neither
does it compute the line height.
The line size is computed later using the combination of line-height property/LineBox height/FontMetrics::lineSpacing/half leading.
This geometry is preserved in Display::LineBox (this needs to be renamed to Display::Line).

  1. LineBuilder places the runs on the line after each other (at this point they only have horizontal geometry).
  2. LineBreaker tells when to stop.
  3. We start constructing inline boxes for the runs (root inline box etc) and place them inside an LineBox. This is when horizontal and vertical alignment happen.
  4. We use the fully sized LineBox to compute the line geometry. Note that the line's geometry does not necessarily match the LineBox width/height (see below).
  5. We construct a Display::LineBox for the line and Display::Runs for the runs inside the inline boxes.

LineBox:

  • fully contains all the inline boxes, both horizontally and vertically.
  • has only width and height geometry
  • height is not constrained by the line-height property
  • does not have the concept of overflow.

Line:

  • contains the LineBox, but the LineBox can overflow the line, both horizontally and vertically.
  • has position relative to the root block container.

Simple case.
<div>font went crazy with line spacing</div>

_ line

| |
| | line spacing |
| v |

| -------------------------------------------LineBox | -------------------------------------------
| |
| line box height | |
----v--------------------------------------| alignment baseline

| |
| | line spacing | |
|v_| scrollable overflow

When glyphs in subsequent lines overflow:
<div style="line-height: 5px; font-size: 20px;">line box overflows the line</div>

_ LineBox

| |
| | line box height |
| | |

-Line

| | | | |
| | | line height | | |

-v--------------------

| | |

| alignment baseline

| | |
|v_|

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::createDisplayBoxesForLineContent):

12:10 PM Changeset in webkit [266681] by Darin Adler
  • 26 edits in trunk/Source

TextCodec refinements
https://bugs.webkit.org/show_bug.cgi?id=216219

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • parser/Lexer.h:

(JSC::Lexer<UChar>::isWhiteSpace): Use byteOrderMark constant.

Source/WebCore:

  • dom/TextDecoder.cpp:

(WebCore::TextDecoder::bytesNeededForFullBOMIgnoreCheck const): Deleted.
(WebCore::TextDecoder::isBeginningOfIncompleteBOM const): Deleted.
(WebCore::TextDecoder::ignoreBOMIfNecessary): Deleted.
(WebCore::TextDecoder::decode): Call stripByteOrderMark on the TextCodec
to tell it to ignore the BOM, once when creating the codec, and also after
each non-streaming invocation. Removed the rest of the BOM handling.

  • dom/TextDecoder.h: Removed WaitForMoreBOMBytes, ignoreBOMIfNecessary,

bytesNeededForFullBOMIgnoreCheck, isBeginningOfIncompleteBOM, m_buffer,
m_bomIgnoredIfNecessary, and made m_options const.

  • platform/text/TextCodec.h: Added a virtual stripByteOrderMark function

to be used before decoding; does nothing by default. Changed the encode
function to be a const member function to help implementers remember to
not have it save any state, unlike the decode function which should.

  • platform/text/TextCodecCJK.cpp: Moved the TextCodecCJK::Encoding

enumeration in here.
(WebCore::jis0208DecodeIndex): Use a named type and use std::size
instead of WTF_ARRAY_LENGTH.
(WebCore::codePointJIS0212): Ditto.
(WebCore::iso2022JPEncode): Made this a non-member function and moved
the encoding state in here since each call to encode is separate and
we don't want to leave any state behind in the TextCodec between calls.
(WebCore::eucKREncodingIndex): Use a refernece instead of a pointer
and std::size instead of WTF_ARRAY_LENGTH.
(WebCore::big5DecodeIndex): Ditto.
(WebCore::TextCodecCJK::encode const): Made const.

  • platform/text/TextCodecCJK.h: Marked the class final, moved

the enumeration values for Encoding, ISO2022JPEncoderState, and
m_iso2022JPEncoderState out of the class definition. Made encode const.

  • platform/text/TextCodecICU.cpp:

(WebCore::TextCodecICU::encode const): Made const.

  • platform/text/TextCodecICU.h: Marked the class final, and

rearranged the class members to match other TextCodec classes,
with register functions before the constructor and destructor.
Made encode const.

  • platform/text/TextCodecLatin1.cpp:

(WebCore::TextCodecLatin1::encode const): Made const.

  • platform/text/TextCodecLatin1.h: Removed a stray blank line

and made encode const.

  • platform/text/TextCodecReplacement.cpp:

(WebCore::TextCodecReplacement::encode const): Added.

  • platform/text/TextCodecReplacement.h: Marked the class final,

changed it to no longer derive from TextCodecUTF8, and added
an encode function.

  • platform/text/TextCodecSingleByte.cpp: Moved the

TextCodecSingleByte::Encoding enumeration in here and changed
from Iso to ISO. Added SingleByteDecodeTable type and
moved TextCodecSingleByte::EncodeTable in here and renamed
it to SingleByteEncodeTable so it's not a class member any more.
Marked all the decode tables static since we don't get internal
linkage from just marking them constexpr, while moving to use
the SingleByteDecodeTable type.
(WebCore::tableForEncoding): Use SingleByteDecodeTable and
SingleByteEncodeTable type names. Use std::count to count the
replacement characters instead of writing our own loop.
Use std::size(decodeTable) instead of defining a tableSize.
Update for ISO name change. Use RELEASE_ASSERT_NOT_REACHED so
we don't have to write a dead code return statement.
(WebCore::tableForDecoding): Use SingleByteDecideTable type
for return value. Update for ISO name change. Use
RELEASE_ASSERT_NOT_REACHED so we don't have to write a dead
code return statement. Also make this constexpr since it's
just selecting a global based on an enumeration value.
(WebCore::encode): Made this a non-member function since it
does not need access to TextCodec members. This helps us keep
implementation details out of the header.
(WebCore::decode): Ditto.
(WebCore::TextCodecSingleByte::encode const): Made this const
and updated to call the non-member function.
(WebCore::TextCodecSingleByte::decode): Ditto.
(WebCore::TextCodecSingleByte::registerCodecs): Update for
the ISO name change.

  • platform/text/TextCodecSingleByte.h: Marked the class

final, and moved the enumeration values for Encoding, EncodeTable,
and the encode and decode functions that take table arguments
all out of the class definition. Made encode const.

  • platform/text/TextCodecUTF16.cpp:

(WebCore::TextCodecUTF16::decode): Added logic to drop the first
byte order mark after m_shouldStripByteOrderMark is set to true.
Changed code to call through rather than recursively calling self
in the case of an unpaired lead surrogate, removing the need to
put the processBytesShared lambda into a Function. Renamed the
processBytesShared lambda to processCodeUnit.
(WebCore::TextCodecUTF16::encode const): Made const.

  • platform/text/TextCodecUTF16.h: Marked the class final, added

a stripByteOrderMark member function and a m_shouldStripByteOrderMark
data member, and made encode const.

  • platform/text/TextCodecUTF8.cpp:

(WebCore::TextCodecUTF8::handlePartialSequence): Added logic to
drop the first byte order mark after m_shouldStripByteOrderMark is
set to true, making sure to keep it out of the hot ASCII decode loop.
(WebCore::TextCodecUTF8::decode): Ditto. Also added code to make sure
the partial sequence is cleared out as part of a flush even when
stopOnError is true.
(WebCore::TextCodecUTF8::encodeUTF8): Renamed this so it can be
a static member function, so it can be called by TextCodecReplacement.
(WebCore::TextCodecUTF8::encode const): Made this const and have it
call encodeUTF8.

  • platform/text/TextCodecUTF8.h: Marked the class final, added

a stripByteOrderMark member function and a m_shouldStripByteOrderMark
data member, added static member function encodeUTF8, and made the
encode function const.

  • platform/text/TextCodecUserDefined.cpp:

(WebCore::TextCodecUserDefined::encode const): Made const.

  • platform/text/TextCodecUserDefined.h: Marked the class final and

made encode const.

  • xml/XSLStyleSheetLibxslt.cpp:

(WebCore::XSLStyleSheet::parseString): Use byteOrderMark.

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::switchToUTF16): Ditto.
(WebCore::nativeEndianUTF16Encoding): Ditto.

Source/WTF:

  • wtf/unicode/CharacterNames.h: Use constexpr instead of just const.

Added byteOrderMark, synonym for zeroWidthNoBreakSpace.

8:59 AM Changeset in webkit [266680] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][IFC] Move Line handing to LineBuilder
https://bugs.webkit.org/show_bug.cgi?id=216200

Reviewed by Antti Koivisto.

  1. LineBuilder owns Line now.
  2. LineBuilder can build line for both layout and intrinsic width computation (now these are two distinct code paths).
  3. LineBuilder also constructs the LineBox when needed (This was previously in InlineFormattingContext::lineLayout).
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
(WebCore::Layout::InlineFormattingContext::constraintsForLine): Deleted.

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

(WebCore::Layout::InlineFormattingContext::Geometry::computedTextIndent const): Deleted.

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::LineBox::formattingContext const):
(WebCore::Layout::LineBox::root const):
(WebCore::Layout::LineBox::layoutState const):

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::contentLogicalWidth const):
(WebCore::Layout::LineBox::formattingContext const): Deleted.
(WebCore::Layout::LineBox::root const): Deleted.
(WebCore::Layout::LineBox::layoutState const): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::constraintsForLine):
(WebCore::Layout::LineBuilder::commitFloats):
(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::commitPartialContent):
(WebCore::Layout::LineBuilder::rebuildLine):
(WebCore::Layout::LineBuilder::layoutState const):

  • layout/inlineformatting/InlineLineBuilder.h:

Sep 5, 2020:

9:56 PM Changeset in webkit [266679] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, suppress exception checking after unwrapForOldFunctions
https://bugs.webkit.org/show_bug.cgi?id=216193

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):

7:49 PM Changeset in webkit [266678] by weinig@apple.com
  • 74 edits
    1 copy
    2 adds
    1 delete in trunk/Source/WebCore

[WebIDL] Add support for interface mixins
https://bugs.webkit.org/show_bug.cgi?id=216217

Reviewed by Darin Adler.

Implement support for WebIDL interface mixins, which are interface fragments
that can be included into other interfaces (using an 'includes' statement),
but do not create new types themselves.

Prior to this, we have been emulating the behavior by allowing any interface
to be included in another interface, and marking some interfaces with the
[LegacyNoInterfaceObject] extended attribute. This change codifies that with
in the spec approved way.

  • Updates IDL parser to parse mixin interfaces (and fixes the parsing of callback interfaces to be a bit more strict while I was there).
  • Updates IDL pre-processor to avoid creating global variables and IsoSubspaces for mixins.
  • Updates IDL code generator to only support including mixin interfaces during supplemental inclusion.
  • Updates IDL files to use interface mixin where appropriately specified.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • CMakeLists.txt:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • dom/DeviceOrientationOrMotionEvent.idl: Removed.

Remove DeviceOrientationOrMotionEvent.idl and corresponding generated files, inlining
it into DeviceMotionEvent.idl and DeviceOrientationEvent.idl as specified. This is
needed as mixin interfaces do not support static operations or attributes.

  • bindings/scripts/CodeGenerator.pm:

(IsValidSupplementalInterface):
(IsValidSupplementalDictionary):
(ProcessSupplementalDependencies):
(GetInterfaceExtendedAttributesFromName):
Update IDL code generator to only support including mixin interfaces during
supplemental inclusion. Also removes some left of remnents of exception interface
support.

  • bindings/scripts/IDLParser.pm:

(parseCallbackRestOrInterface):
(parseCallbackInterface):
(parseCallbackInterfaceMembers):
(parseCallbackInterfaceMember):
(parseMixin):
(parseMixinMembers):
(parseMixinMember):
(parseNamespace):
(parsePartialInterfaceMember):
(parseAttributeOrOperationForStringifierOrStatic):
Update IDL parser to parse mixin interfaces and fix the parsing of callback
interfaces to match the spec by restricting its members to constants and
regular functions.

  • bindings/scripts/preprocess-idls.pl:

(isMixinInterfaceFromIDL):
(containsInterfaceFromIDL):
(getInterfaceExtendedAttributesFromIDL):
(containsInterfaceOrExceptionFromIDL): Deleted.
Ensure mixin interfaces don't get exposed on any global objects and
remove some left of remnents of exception interface support.

  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.cpp: Added.
  • bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.h: Added.
  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestIncludes.idl:
  • bindings/scripts/test/TestLegacyNoInterfaceObject.idl: Added.
  • bindings/scripts/test/TestOperationBase.idl:

Update bindings tests to use mixins for includes. Add new dedicated
[LegacyNoInterfaceObject] since it was no longer being tested.

  • Modules/fetch/FetchBody.idl:
  • Modules/mediasource/VideoPlaybackQuality.idl:
  • Modules/speech/SpeechSynthesis.idl:
  • Modules/speech/SpeechSynthesisVoice.idl:
  • Modules/streams/ReadableStreamSink.idl:
  • accessibility/AccessibilityRole.idl:
  • accessibility/AriaAttributes.idl:
  • animation/Animatable.idl:
  • css/ElementCSSInlineStyle.idl:
  • css/StyleMedia.idl:
  • dom/ChildNode.idl:
  • dom/DeviceMotionEvent.idl:
  • dom/DeviceOrientationEvent.idl:
  • dom/Document.idl:
  • dom/DocumentAndElementEventHandlers.idl:
  • dom/DocumentOrShadowRoot.idl:
  • dom/EventListener.idl:
  • dom/GlobalEventHandlers.idl:
  • dom/NavigatorMaxTouchPoints.idl:
  • dom/NonDocumentTypeChildNode.idl:
  • dom/NonElementParentNode.idl:
  • dom/ParentNode.idl:
  • dom/Slotable.idl:
  • html/HTMLHyperlinkElementUtils.idl:
  • html/HTMLOrForeignElement.idl:
  • html/canvas/CanvasCompositing.idl:
  • html/canvas/CanvasDrawImage.idl:
  • html/canvas/CanvasDrawPath.idl:
  • html/canvas/CanvasFillStrokeStyles.idl:
  • html/canvas/CanvasFilters.idl:
  • html/canvas/CanvasGradient.idl:
  • html/canvas/CanvasImageData.idl:
  • html/canvas/CanvasImageSmoothing.idl:
  • html/canvas/CanvasPath.idl:
  • html/canvas/CanvasPathDrawingStyles.idl:
  • html/canvas/CanvasRect.idl:
  • html/canvas/CanvasShadowStyles.idl:
  • html/canvas/CanvasState.idl:
  • html/canvas/CanvasText.idl:
  • html/canvas/CanvasTextDrawingStyles.idl:
  • html/canvas/CanvasTransform.idl:
  • html/canvas/CanvasUserInterface.idl:
  • html/canvas/WebGLRenderingContextBase.idl:
  • page/GlobalCrypto.idl:
  • page/GlobalPerformance.idl:
  • page/Navigator.idl:
  • page/NavigatorID.idl:
  • page/NavigatorLanguage.idl:
  • page/NavigatorOnLine.idl:
  • page/NavigatorPlugins.idl:
  • page/NavigatorServiceWorker.idl:
  • page/NavigatorShare.idl:
  • page/WindowEventHandlers.idl:
  • page/WindowOrWorkerGlobalScope.idl:
  • svg/SVGFilterPrimitiveStandardAttributes.idl:
  • svg/SVGFitToViewBox.idl:
  • svg/SVGTests.idl:
  • svg/SVGURIReference.idl:
  • svg/SVGZoomAndPan.idl:
  • workers/AbstractWorker.idl:
  • xml/XPathEvaluator.idl:
  • xml/XPathNSResolver.idl:

Update IDLs.

6:36 PM Changeset in webkit [266677] by Wenson Hsieh
  • 10 edits in trunk/Source

[MotionMark] RenderLayer::paintLayerContents spends ~5% of the time in MonotonicTime::now() in Multiply
https://bugs.webkit.org/show_bug.cgi?id=216190

Reviewed by Darin Adler.

Source/WebCore:

In several of MotionMark's subtests (for instance, Multiply), we spent a large amount of time underneath
RenderLayer::paintLayerContents due to both the large number of layers and the need to frequently repaint
each layer (all of which are constantly being animated). Underneath this method, a nontrivial amount of time
(~5%) is then spent grabbing the system time via MonotonicTime::now().

We can avoid this extra work by instead using the timestamp of the last rendering update (before we started
painting), which we keep track of using a new member variable on Page. See below for more details, as well as
the WebKit2 ChangeLog.

  • page/ChromeClient.h:

(WebCore::ChromeClient::timestampForPaintFrequencyTracking const):

Add a client hook to fetch the timestamp to use when tracking painting frequency. See the WebKit2 ChangeLog for
more details.

  • page/Page.cpp:

(WebCore::Page::updateRendering):

Update m_lastRenderingUpdateTimestamp.

  • page/Page.h:

(WebCore::Page::lastRenderingUpdateTimestamp const):

  • rendering/PaintFrequencyTracker.h:

Drive-by cleanup: narrow the PaintFrequency enum to bool width.

(WebCore::PaintFrequencyTracker::begin):
(WebCore::SinglePaintFrequencyTracking::SinglePaintFrequencyTracking):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintLayerContents):

Call out to the client layer to return a timestamp for tracking painting frequency. By default, this is simply
the current time (MonotonicTime::now()), but ports (namely, WebKit2) may opt for a coarser granularity.

(WebCore::RenderLayer::simulateFrequentPaint):

  • rendering/RenderLayer.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::timestampForPaintFrequencyTracking const):

In WebKit2, we can assume (with the exception of SVG pages) that we must've performed a rendering update prior
to tracking painting frequencies. As such, we can use the page's rendering update timestamp instead of the real
current time (MonotonicTime::now()).

Note that in WebKit1, it is possible for any client to force a synchronous paint of the page before the page has
performed a rendering update, which triggers assertions in SinglePaintFrequencyTracking::end(). As such, we
stick with MonotonicTime::now() in WebKit1.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
5:44 PM Changeset in webkit [266676] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Fix formatting of LegacyOverrideBuiltIns
https://bugs.webkit.org/show_bug.cgi?id=216218

Reviewed by Darin Adler.

Neglected to fix this bit of feedback in a previous change. Makes
enum class LegacyOverrideBuiltIns a bit more readable.

  • bindings/js/JSDOMAbstractOperations.h:
5:26 PM Changeset in webkit [266675] by Oriol Brufau
  • 6 edits
    2 adds in trunk

[css-grid] Use min-content size for intrinsic maximums resolution
https://bugs.webkit.org/show_bug.cgi?id=216142

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT test.

  • web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:

Source/WebCore:

By mistake the specification used to say that, for items spanning
multiple tracks, the growth limits of the tracks with an intrinsic max
track sizing function should grow to accommodate the minimum
contribution of the item.

But this was a mistake, because an intrinsic max track sizing function
can only be min-content or max-content. So instead of distributing the
minimum contribution, it should be the min-content contribution.

The spec has been fixed and there is a CSSWG resolution in
https://github.com/w3c/csswg-drafts/issues/4790

This patch fixes the problem by reverting r207290. The change is likely
web compatible, since it only affects a rare edge case with 'minmax()'
where the min sizing function is 'auto' or a fixed value smaller than
the min-content contribution, the max sizing function is 'min-content',
and an item whose minimum contribution is forced to be different than
the min-content contribution, and spans multiple tracks.

This is a port of https://crrev.com/803871 from Chromium.

Tests: fast/css-grid-layout/grid-intrinsic-maximums.html

imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithm::itemSizeForTrackSizeComputationPhase const):

LayoutTests:

Update test expectations. Some are wrong due to bug 216144.

  • fast/css-grid-layout/grid-intrinsic-maximums-expected.html:
5:11 PM Changeset in webkit [266674] by Oriol Brufau
  • 60 edits
    1 delete in trunk

[css-logical] Ship flow-relative shorthand and offset properties
https://bugs.webkit.org/show_bug.cgi?id=216178

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update test expectations and remove instances of
<!-- webkit-test-runner [ internal:CSSLogicalEnabled=true ] -->

  • web-platform-tests/css/css-cascade/parsing/all-valid-expected.txt:
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-001-expected.txt:
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-002-expected.txt:
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-003-expected.txt:
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-004-expected.txt:
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-005-expected.txt:
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-007-expected.txt:
  • web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-016-expected.txt:
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-007-expected.txt:
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-012-expected.txt:
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-014-expected.txt:
  • web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-016-expected.txt:
  • web-platform-tests/css/css-logical/animation-001-expected.txt:
  • web-platform-tests/css/css-logical/animation-002-expected.txt:
  • web-platform-tests/css/css-logical/getComputedStyle-listing-expected.txt:
  • web-platform-tests/css/css-logical/inheritance-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-border-color.html:
  • web-platform-tests/css/css-logical/logical-box-border-shorthands.html:
  • web-platform-tests/css/css-logical/logical-box-border-style.html:
  • web-platform-tests/css/css-logical/logical-box-border-width.html:
  • web-platform-tests/css/css-logical/logical-box-inset.html:
  • web-platform-tests/css/css-logical/logical-box-margin.html:
  • web-platform-tests/css/css-logical/logical-box-padding.html:
  • web-platform-tests/css/css-logical/parsing/border-block-color-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-block-color-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-block-style-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-block-style-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-block-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-block-width-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-block-width-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-inline-color-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-inline-color-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-inline-style-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-inline-style-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-inline-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-inline-width-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/border-inline-width-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/inset-block-inline-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/inset-block-inline-shorthand-expected.txt:
  • web-platform-tests/css/css-logical/parsing/inset-block-inline-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/inset-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/inset-shorthand-expected.txt:
  • web-platform-tests/css/css-logical/parsing/inset-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/margin-block-inline-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/margin-block-inline-shorthand-expected.txt:
  • web-platform-tests/css/css-logical/parsing/margin-block-inline-valid-expected.txt:
  • web-platform-tests/css/css-logical/parsing/padding-block-inline-computed-expected.txt:
  • web-platform-tests/css/css-logical/parsing/padding-block-inline-shorthand-expected.txt:
  • web-platform-tests/css/css-logical/parsing/padding-block-inline-valid-expected.txt:
  • web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-001-expected.txt:
  • web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-001-expected.txt:
  • web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-001-expected.txt:
  • web-platform-tests/quirks/unitless-length/excluded-properties-001.html:
  • web-platform-tests/quirks/unitless-length/excluded-properties-003.html:

Source/WebCore:

This patch ships the logical properties that were already implemented behind a flag.
Specifically:

  • border-block, border-block-color, border-block-style, border-block-width
  • border-inline, border-inline-color, border-inline-style, border-inline-width
  • inset-block-start, inset-block-end, inset-inline-start, inset-inline-end
  • inset, inset-block, inset-inline
  • margin-block, margin-inline
  • padding-block, padding-inline

Tests: imported/w3c/web-platform-tests/css/css-cascade/parsing/all-valid.html

imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-001.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-002.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-003.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-004.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-005.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-007.html
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-016.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-007.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-012.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-014.html
imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-016.html
imported/w3c/web-platform-tests/css/css-logical/animation-001.html
imported/w3c/web-platform-tests/css/css-logical/animation-002.html
imported/w3c/web-platform-tests/css/css-logical/getComputedStyle-listing.html
imported/w3c/web-platform-tests/css/css-logical/inheritance.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-border-color.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-border-shorthands.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-border-style.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-border-width.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-inset.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-margin.html
imported/w3c/web-platform-tests/css/css-logical/logical-box-padding.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-block-color-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-block-color-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-block-style-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-block-style-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-block-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-block-width-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-block-width-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-inline-color-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-inline-color-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-inline-style-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-inline-style-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-inline-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-inline-width-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/border-inline-width-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/inset-block-inline-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/inset-block-inline-shorthand.html
imported/w3c/web-platform-tests/css/css-logical/parsing/inset-block-inline-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/inset-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/inset-shorthand.html
imported/w3c/web-platform-tests/css/css-logical/parsing/inset-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/margin-block-inline-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/margin-block-inline-shorthand.html
imported/w3c/web-platform-tests/css/css-logical/parsing/margin-block-inline-valid.html
imported/w3c/web-platform-tests/css/css-logical/parsing/padding-block-inline-computed.html
imported/w3c/web-platform-tests/css/css-logical/parsing/padding-block-inline-shorthand.html
imported/w3c/web-platform-tests/css/css-logical/parsing/padding-block-inline-valid.html
imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-001.html
imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-001.html
imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-001.html
imported/w3c/web-platform-tests/quirks/unitless-length/excluded-properties-001.html
imported/w3c/web-platform-tests/quirks/unitless-length/excluded-properties-003.html

  • css/CSSProperties.json: Enable logical properties by default.
  • css/makeprop.pl: Avoid compile warning when generating isEnabledCSSProperty if there is no property behind flag.

LayoutTests:

css-properties-behind-flags.html used to check that CSS properties
disabled behind a flag were effectible disabled.
But there is no longer any CSS property disabled behind a flag, so I'm
just removing it.

  • platform/mac/TestExpectations:
  • webexposed/css-properties-behind-flags-expected.txt: Removed.
  • webexposed/css-properties-behind-flags.html: Removed.
3:27 PM Changeset in webkit [266673] by mmaxfield@apple.com
  • 6 edits
    1 delete in trunk/Source/WebCore

[iOS Family] Remove the concept of custom fallback fonts
https://bugs.webkit.org/show_bug.cgi?id=215690

Reviewed by Sam Weinig.

They're no longer necessary for iOS, and macOS doesn't
even have the concept of custom fallback fonts, so we
can just remove the entire concept.

  • platform/graphics/FontCache.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/cocoa/FontCacheCoreText.h:
  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::requiresCustomFallbackFont): Deleted.
(WebCore::FontCache::getCustomFallbackFont): Deleted.

2:34 PM Changeset in webkit [266672] by mmaxfield@apple.com
  • 15 edits
    2 adds in trunk/Source

[Cocoa] USE(PLATFORM_SYSTEM_FALLBACK_LIST) is true on all Cocoa platforms, so there's no need to consult it in Cocoa-specific files
https://bugs.webkit.org/show_bug.cgi?id=215684

Reviewed by Darin Adler.

Source/WebCore:

Removes dead code.

No new tests because there is no behavior change.

  • Configurations/WebCore.xcconfig:
  • PlatformFTW.cmake:
  • PlatformWin.cmake:
  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):

  • platform/FreeType.cmake:
  • platform/graphics/FontCascadeDescription.cpp:

(WebCore::FontCascadeDescription::effectiveFamilyCount const): Deleted.
(WebCore::FontCascadeDescription::effectiveFamilyAt const): Deleted.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::invalidateFontCache):

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::FontCascadeDescription::effectiveFamilyAt const):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges const):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
  • platform/graphics/harfbuzz/FontDescriptionHarfBuzz.cpp: Added. Moved port-specific

implementations into port-specific files.
(WebCore::FontCascadeDescription::effectiveFamilyCount const):
(WebCore::FontCascadeDescription::effectiveFamilyAt const):

  • platform/graphics/win/FontDescriptionWin.cpp: Added. Moved port-specific

implementations into port-specific files.
(WebCore::FontCascadeDescription::effectiveFamilyCount const):
(WebCore::FontCascadeDescription::effectiveFamilyAt const):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Source/WTF:

  • wtf/PlatformUse.h:
1:54 PM Changeset in webkit [266671] by achristensen@apple.com
  • 4 edits in trunk

XML documents in iframes should not inherit encoding from parent frame
https://bugs.webkit.org/show_bug.cgi?id=216216

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/utf-32-from-win1252-expected.txt:

Source/WebCore:

This seems to match the behavior of Chrome and Firefox.
Covered by newly passing web platform tests, which other browsers already pass.

  • loader/DocumentWriter.cpp:

(WebCore::canReferToParentFrameEncoding):

1:10 PM Changeset in webkit [266670] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: AXI: Audit: obtuse error strings
https://bugs.webkit.org/show_bug.cgi?id=201080
<rdar://problem/54648118>

Patch by Greg Doolittle <gr3g@apple.com> on 2020-09-05
Reviewed by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):

1:06 PM Changeset in webkit [266669] by Devin Rousso
  • 20 edits
    11 adds in trunk

Web Inspector: allow DOM breakpoints to be configured
https://bugs.webkit.org/show_bug.cgi?id=215795

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • inspector/protocol/DOMDebugger.json:

Add an options parameter to DOMDebugger.setDOMBreakpoint to allow configuration.

Source/WebCore:

Tests: inspector/dom-debugger/attribute-modified-style.html

inspector/dom-debugger/dom-breakpoints.html
inspector/dom-debugger/dom-breakpoint-attribute-modified.html
inspector/dom-debugger/dom-breakpoint-node-removed-ancestor.html
inspector/dom-debugger/dom-breakpoint-node-removed-direct.html
inspector/dom-debugger/dom-breakpoint-subtree-modified-add.html
inspector/dom-debugger/dom-breakpoint-subtree-modified-remove.html

  • inspector/agents/page/PageDOMDebuggerAgent.h:
  • inspector/agents/page/PageDOMDebuggerAgent.cpp:

(WebCore::PageDOMDebuggerAgent::disable):
(WebCore::PageDOMDebuggerAgent::setDOMBreakpoint):
(WebCore::PageDOMDebuggerAgent::removeDOMBreakpoint):
(WebCore::PageDOMDebuggerAgent::frameDocumentUpdated):
(WebCore::calculateDistance): Added.
(WebCore::PageDOMDebuggerAgent::willInsertDOMNode):
(WebCore::PageDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::PageDOMDebuggerAgent::didRemoveDOMNode):
(WebCore::PageDOMDebuggerAgent::willModifyDOMAttr):
(WebCore::PageDOMDebuggerAgent::willInvalidateStyleAttr):
(WebCore::PageDOMDebuggerAgent::buildPauseDataForDOMBreakpoint): Added.
(WebCore::domTypeForName): Deleted.
(WebCore::domTypeName): Deleted.
(WebCore::PageDOMDebuggerAgent::didInsertDOMNode): Deleted.
(WebCore::PageDOMDebuggerAgent::descriptionForDOMEvent): Deleted.
(WebCore::PageDOMDebuggerAgent::updateSubtreeBreakpoints): Deleted.
(WebCore::PageDOMDebuggerAgent::hasBreakpoint): Deleted.
Replace the bitmask with separate HashMap for each type of DOM breakpoint. Instead of
propagating the SubtreeModified bit to the entire subtree when new nodes are added (which
means there's an entry in the HashMap for every descendant) and removing them all when
that node is removed, only keep nodes in each HashMap if it directly has a DOM breakpoint.
Walk up the ancestor chain when nodes are added/removed to determine if there is a nearby
breakpoint to pause. When a node is removed, remove any existing DOM breakpoint if it's
owner is part of the removed subtree.

  • inspector/agents/worker/WorkerDOMDebuggerAgent.h:
  • inspector/agents/worker/WorkerDOMDebuggerAgent.cpp:

(WebCore::WorkerDOMDebuggerAgent::setDOMBreakpoint):

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):

Source/WebInspectorUI:

  • UserInterface/Controllers/DOMManager.js:

(WI.DOMManager.prototype._setChildNodes):
Dispatch events for each new child node added and each existing child node removed so that
any listeners can also know when new nodes are added via a full children payload update.

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WI.DOMDebuggerManager):
(WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
(WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._detachDOMBreakpointsForFrame): Added.
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._setDOMBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._removeDOMBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointEditablePropertyChanged): Added.
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointActionsChanged): Added.
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDOMNodeWillChange): Added.
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDOMNodeDidChange): Added.
(WI.DOMDebuggerManager.prototype._childFrameWasRemoved):
(WI.DOMDebuggerManager.prototype._mainResourceDidChange):
(WI.DOMDebuggerManager.prototype._nodeInserted):
(WI.DOMDebuggerManager.prototype._nodeRemoved):
(WI.DOMDebuggerManager.prototype._detachDOMBreakpoint): Deleted.
(WI.DOMDebuggerManager.prototype._detachBreakpointsForFrame): Deleted.
(WI.DOMDebuggerManager.prototype._updateDOMBreakpoint): Deleted.
Recursively walk any added node's subtree to resolve and set any matching DOM breakpoints.
Iterate all existing DOM breakpoints to see if the owner node is part of the subtree of any
removed nodes and remove ot if so.

  • UserInterface/Models/DOMBreakpoint.js:

(WI.DOMBreakpoint):
(WI.DOMBreakpoint.displayNameForType):
(WI.DOMBreakpoint.fromJSON):
(WI.DOMBreakpoint.prototype.get editable): Added.
(WI.DOMBreakpoint.prototype.get domNode): Added.
(WI.DOMBreakpoint.prototype.set domNode): Added.
(WI.DOMBreakpoint.prototype.get domNodeIdentifier): Deleted.
(WI.DOMBreakpoint.prototype.set domNodeIdentifier): Deleted.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype.closed):
(WI.DOMTreeContentView.prototype._domTreeElementAdded):
(WI.DOMTreeContentView.prototype._domBreakpointAddedOrRemoved):
(WI.DOMTreeContentView.prototype._handleDOMBreakpointDisabledStateChanged):
(WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeWillChange): Added.
(WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeDidChange): Added.
(WI.DOMTreeContentView.prototype._updateBreakpointStatus):
(WI.DOMTreeContentView.prototype._restoreBreakpointsAfterUpdate):
(WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeChanged): Deleted.

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
(WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointDOMNodeWillChange): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointDOMNodeDidChange): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointDOMNodeChanged): Deleted.
Use a WI.DOMNode instead of an identifier instead of fetching the node for the identifier
each time and checking if is valid.

LayoutTests:

  • inspector/debugger/resources/breakpoint-options-utilities.js:

(TestPage.registerInitializer.InspectorTest.BreakpointOptions.addTestCases):

  • inspector/dom-debugger/resources/dom-breakpoint-utilities.js: Added.

(TestPage.registerInitializer.InspectorTest.DOMBreakpoint.teardown):
(TestPage.registerInitializer.InspectorTest.DOMBreakpoint.createBreakpoint):
(TestPage.registerInitializer.InspectorTest.DOMBreakpoint.addBreakpoint):
(TestPage.registerInitializer.InspectorTest.DOMBreakpoint.awaitQuerySelector):

  • inspector/dom-debugger/attribute-modified-style.html:
  • inspector/dom-debugger/attribute-modified-style-expected.txt:
  • inspector/dom-debugger/dom-breakpoints.html:
  • inspector/dom-debugger/dom-breakpoints-expected.txt:
  • inspector/dom-debugger/dom-breakpoint-attribute-modified.html: Added.
  • inspector/dom-debugger/dom-breakpoint-attribute-modified-expected.txt: Added.
  • inspector/dom-debugger/dom-breakpoint-node-removed-ancestor.html: Added.
  • inspector/dom-debugger/dom-breakpoint-node-removed-ancestor-expected.txt: Added.
  • inspector/dom-debugger/dom-breakpoint-node-removed-direct.html: Added.
  • inspector/dom-debugger/dom-breakpoint-node-removed-direct-expected.txt: Added.
  • inspector/dom-debugger/dom-breakpoint-subtree-modified-add.html: Added.
  • inspector/dom-debugger/dom-breakpoint-subtree-modified-remove-expected.txt: Added.
  • inspector/dom-debugger/dom-breakpoint-subtree-modified-remove.html: Added.
  • inspector/dom-debugger/dom-breakpoint-subtree-modified-add-expected.txt: Added.
12:48 PM Changeset in webkit [266668] by achristensen@apple.com
  • 12 edits
    1 delete in trunk

TextDecoder should properly handle streams
https://bugs.webkit.org/show_bug.cgi?id=216202

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/streams/decode-non-utf8.any-expected.txt:
  • web-platform-tests/encoding/streams/decode-non-utf8.any.js:
  • web-platform-tests/encoding/streams/decode-non-utf8.any.worker-expected.txt:
  • web-platform-tests/encoding/streams/decode-split-character.any-expected.txt:
  • web-platform-tests/encoding/streams/decode-split-character.any.worker-expected.txt:
  • web-platform-tests/encoding/streams/realms.window-expected.txt:
  • web-platform-tests/encoding/textdecoder-fatal-streaming-expected.txt: Removed.
  • web-platform-tests/encoding/textdecoder-fatal-streaming.any-expected.txt:
  • web-platform-tests/encoding/textdecoder-fatal-streaming.any.worker-expected.txt:

Source/WebCore:

A TextCodec keeps state when it decodes part of valid input, such as the first byte of a multibyte sequence.
TextEncoding::decode makes a new TextCodec and throws away that state.
In order to properly handle streaming, we need to keep the TextCodec and call TextCodec::decode directly.

Covered by newly passing web platform tests. I also added a test that failed in my first implementation attempt
but passes now in WebKit as well as Chromium. Firefox hasn't implemented TextDecoderStream yet, but this test will
hopefully help them not make the same mistake I did.

  • dom/TextDecoder.cpp:

(WebCore::TextDecoder::decode):
(WebCore::codeUnitByteSize): Deleted.

  • dom/TextDecoder.h:
11:21 AM Changeset in webkit [266667] by mmaxfield@apple.com
  • 9 edits in trunk/Source

[Cocoa] CTFontIsSystemUIFont() is faster than CTFontDescriptorIsSystemUIFont()/CTFontCopyFontDescriptor()
https://bugs.webkit.org/show_bug.cgi?id=215687

Reviewed by Darin Adler.

Source/WebCore:

Instead of making the two calls, we can make a single call that has the same effect.

No new tests because there is no behavior change.

  • platform/graphics/FontPlatformData.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::fontIsSystemFont):

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::primaryFontIsSystemFont const):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::isSystemFont):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Source/WTF:

  • wtf/PlatformHave.h:
11:07 AM Changeset in webkit [266666] by mmaxfield@apple.com
  • 4 edits in trunk/Source

[Cocoa] Migrate off SPI in Font::platformWidthForGlyph()
https://bugs.webkit.org/show_bug.cgi?id=215670

Reviewed by Zalan Bujtas.

Source/WebCore:

All the tests pass, and the microbenchmark attached to <rdar://problem/21026016> says it isn't a regression.

  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::platformWidthForGlyph const):

Source/WTF:

  • wtf/PlatformUse.h:
10:57 AM Changeset in webkit [266665] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

[macOS] Don't apply synthetic bold or italics to emoji
https://bugs.webkit.org/show_bug.cgi?id=215686

Reviewed by Darin Adler.

Source/WebCore:

Italicized emoji are one of the most hideous things I've ever seen.

This unifies the behavior between macOS and iOS.

Test: fast/text/emoji-synthesis.html

  • WebCore.xcodeproj/xcshareddata/xcschemes/WebCore.xcscheme:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::computeNecessarySynthesis):

LayoutTests:

  • fast/text/emoji-synthesis-expected.html: Added.
  • fast/text/emoji-synthesis.html: Added.
  • platform/win/TestExpectations:
  • platform/mac/fast/text/fallback-traits-fixup-expected.txt:
10:55 AM Changeset in webkit [266664] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

REGRESSION (r260571): Scrolling on weather.com in Safari causes the gradient background to flicker (fixed backgrounds)
https://bugs.webkit.org/show_bug.cgi?id=216192
<rdar://problem/68192010>

Reviewed by Tim Horton.

If a page has slow-scrolling reasons, like background-attachment:fixed on a non-root element,
then we should never update layer positions on the scrolling thread, since this results
in scroll position being out of sync with the painted background position.

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::canUpdateLayersOnScrollingThread const):
(WebCore::ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout):
(WebCore::ThreadedScrollingTree::delayedRenderingUpdateDetectionTimerFired):
(WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread):

  • page/scrolling/ThreadedScrollingTree.h:
10:51 AM Changeset in webkit [266663] by mmaxfield@apple.com
  • 8 edits
    1 delete in trunk/Source/WebCore

[Cocoa] Unify implementation of custom font name aliases between all Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=215689

Reviewed by Darin Adler.

The existing code is duplicated almost verbatim. There's no point in having two copies of the same thing.

No new tests because there is no behavior change.

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::fontWithFamilySpecialCase):
(WebCore::fontWithFamily):

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

(WebCore::FontCascadeDescription::effectiveFamilyCount const):
(WebCore::FontCascadeDescription::effectiveFamilyAt const):

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::baseSystemFontDescriptor): Deleted.
(WebCore::systemFontModificationAttributes): Deleted.
(WebCore::systemFontDescriptor): Deleted.
(WebCore::platformFontWithFamilySpecialCase): Deleted.

  • platform/graphics/mac/FontCacheMac.mm: Removed.
10:14 AM Changeset in webkit [266662] by weinig@apple.com
  • 189 edits
    1 copy
    7 moves
    4 adds
    5 deletes in trunk/Source

[WebIDL] Realign our IDL extended attribute names with those specified in WebIDL
https://bugs.webkit.org/show_bug.cgi?id=216194

Reviewed by Darin Adler.

Source/WebCore:

Over time, the WebIDL and HTML specifications have added / renamed extended attributes and we have
not stayed up to date. This updates the names everywhere and URLs in IDLAttributes.json.

[AllowShared] -> new, marked as unsupported
[HTMLConstructor] - > new, marked as unsupported
[LegacyLenientSetter] -> renamed from [LenientSetter], still unsupported
[LegacyLenientThis] -> renamed from [LenientThis]
[LegacyNamespace] -> new, marked as unsupported
[LegacyNoInterfaceObject] -> renamed from [NoInterfaceObject]
[LegacyNullToEmptyString] -> renamed from [TreatNullAs=EmptyString]
[LegacyOverrideBuiltIns] -> renamed from OverrideBuiltins
[LegacyTreatNonObjectAsNull] -> renamed from [TreatNonObjectAsNull], still unsupported
[LegacyUnforgeable] -> renamed from [Unforgeable]
[Serializable] -> new, marked as unsupported
[Transferable] -> new, marked as unsupported

  • Modules/applepay/ApplePayCancelEvent.idl:
  • Modules/applepay/ApplePayPaymentAuthorizedEvent.idl:
  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl:
  • Modules/applepay/ApplePayShippingContactSelectedEvent.idl:
  • Modules/applepay/ApplePayShippingMethodSelectedEvent.idl:
  • Modules/applepay/ApplePayValidateMerchantEvent.idl:
  • Modules/fetch/FetchBody.idl:
  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/mediasource/VideoPlaybackQuality.idl:
  • Modules/mediastream/RTCPeerConnection.idl:
  • Modules/plugins/QuickTimePluginReplacement.idl:
  • Modules/quota/StorageInfo.idl:
  • Modules/quota/StorageQuota.idl:
  • Modules/speech/SpeechSynthesis.idl:
  • Modules/speech/SpeechSynthesisVoice.idl:
  • Modules/streams/ReadableStreamSink.idl:
  • Modules/streams/ReadableStreamSource.idl:
  • Modules/webaudio/WebKitAudioBufferSourceNode.idl:
  • Modules/webaudio/WebKitAudioListener.idl:
  • Modules/webaudio/WebKitDynamicsCompressorNode.idl:
  • Modules/webaudio/WebKitOscillatorNode.idl:
  • Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb:
  • accessibility/AccessibilityRole.idl:
  • accessibility/AriaAttributes.idl:
  • animation/Animatable.idl:
  • bindings/IDLTypes.h:
  • bindings/js/DOMWrapperWorld.h:

(WebCore::DOMWrapperWorld::disableLegacyOverrideBuiltInsBehavior):
(WebCore::DOMWrapperWorld::shouldDisableLegacyOverrideBuiltInsBehavior const):
(WebCore::DOMWrapperWorld::disableOverrideBuiltinsBehavior): Deleted.
(WebCore::DOMWrapperWorld::shouldDisableOverrideBuiltinsBehavior const): Deleted.

  • bindings/js/JSDOMAbstractOperations.h:

(WebCore::isVisibleNamedProperty):
(WebCore::accessVisibleNamedProperty):

  • bindings/js/JSDOMConvertNullable.h:
  • bindings/js/JSDOMConvertStrings.h:

(WebCore::Converter<IDLTreatNullAsEmptyAdaptor<T>>::convert): Deleted.
(WebCore::JSConverter<IDLTreatNullAsEmptyAdaptor<T>>::convert): Deleted.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateGetOwnPropertySlot):
(GenerateGetOwnPropertySlotByIndex):
(GeneratePut):
(GeneratePutByIndex):
(GenerateIsLegacyUnforgeablePropertyName):
(GenerateDefineOwnProperty):
(GenerateDeletePropertyCommon):
(AttributeShouldBeOnInstance):
(OperationShouldBeOnInstance):
(IsAcceleratedDOMAttribute):
(GetJSCAttributesForAttribute):
(GenerateHeader):
(GenerateImplementation):
(GenerateAttributeGetterTrampolineDefinition):
(GenerateAttributeSetterTrampolineDefinition):
(IsAnnotatedType):
(GetAnnotatedIDLType):
(GenerateConstructorHelperMethods):
(NeedsConstructorProperty):
(IsLegacyUnforgeable):
(ComputeFunctionSpecial):
(GenerateIsUnforgeablePropertyName): Deleted.
(IsUnforgeable): Deleted.

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/preprocess-idls.pl:
  • bindings/scripts/test/BindingTestGlobalConstructors.idl:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.cpp: Added.
  • bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.h: Added.
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp: Added.
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.h: Added.
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp: Added.
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.h: Added.
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: Removed.
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h: Removed.
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: Removed.
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h: Removed.
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: Removed.
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h: Removed.
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: Removed.
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h: Removed.
  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestIncludes.idl:
  • bindings/scripts/test/TestLegacyOverrideBuiltIns.idl: Added.
  • bindings/scripts/test/TestNamedSetterWithLegacyOverrideBuiltIns.idl: Added.
  • bindings/scripts/test/TestNamedSetterWithLegacyUnforgeableProperties.idl: Added.
  • bindings/scripts/test/TestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.idl: Added.
  • bindings/scripts/test/TestNamedSetterWithOverrideBuiltins.idl: Removed.
  • bindings/scripts/test/TestNamedSetterWithUnforgableProperties.idl: Removed.
  • bindings/scripts/test/TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.idl: Removed.
  • bindings/scripts/test/TestObj.idl:
  • bindings/scripts/test/TestOperationBase.idl:
  • bindings/scripts/test/TestOverrideBuiltins.idl: Removed.
  • css/CSSStyleDeclaration.idl:
  • css/CSSUnknownRule.idl:
  • css/ElementCSSInlineStyle.idl:
  • css/MediaList.idl:
  • css/StyleMedia.idl:
  • dom/CharacterData.idl:
  • dom/ChildNode.idl:
  • dom/DOMImplementation.idl:
  • dom/DOMStringMap.idl:
  • dom/DeviceOrientationOrMotionEvent.idl:
  • dom/Document.idl:
  • dom/DocumentAndElementEventHandlers.idl:
  • dom/DocumentOrShadowRoot.idl:
  • dom/Element.idl:
  • dom/Event.idl:
  • dom/EventListener.idl:
  • dom/GlobalEventHandlers.idl:
  • dom/NavigatorMaxTouchPoints.idl:
  • dom/NonDocumentTypeChildNode.idl:
  • dom/NonElementParentNode.idl:
  • dom/ParentNode.idl:
  • dom/ShadowRoot.idl:
  • dom/Slotable.idl:
  • html/HTMLBodyElement.idl:
  • html/HTMLDocument.idl:
  • html/HTMLElement.idl:
  • html/HTMLFontElement.idl:
  • html/HTMLFormElement.idl:
  • html/HTMLFrameElement.idl:
  • html/HTMLHyperlinkElementUtils.idl:
  • html/HTMLIFrameElement.idl:
  • html/HTMLImageElement.idl:
  • html/HTMLInputElement.idl:
  • html/HTMLObjectElement.idl:
  • html/HTMLOrForeignElement.idl:
  • html/HTMLOutputElement.idl:
  • html/HTMLTableCellElement.idl:
  • html/HTMLTableElement.idl:
  • html/HTMLTableRowElement.idl:
  • html/HTMLTextAreaElement.idl:
  • html/canvas/ANGLEInstancedArrays.idl:
  • html/canvas/CanvasCompositing.idl:
  • html/canvas/CanvasDrawImage.idl:
  • html/canvas/CanvasDrawPath.idl:
  • html/canvas/CanvasFillStrokeStyles.idl:
  • html/canvas/CanvasFilters.idl:
  • html/canvas/CanvasImageData.idl:
  • html/canvas/CanvasImageSmoothing.idl:
  • html/canvas/CanvasPath.idl:
  • html/canvas/CanvasPathDrawingStyles.idl:
  • html/canvas/CanvasRect.idl:
  • html/canvas/CanvasShadowStyles.idl:
  • html/canvas/CanvasState.idl:
  • html/canvas/CanvasText.idl:
  • html/canvas/CanvasTextDrawingStyles.idl:
  • html/canvas/CanvasTransform.idl:
  • html/canvas/CanvasUserInterface.idl:
  • html/canvas/EXTBlendMinMax.idl:
  • html/canvas/EXTColorBufferFloat.idl:
  • html/canvas/EXTColorBufferHalfFloat.idl:
  • html/canvas/EXTFragDepth.idl:
  • html/canvas/EXTShaderTextureLOD.idl:
  • html/canvas/EXTTextureFilterAnisotropic.idl:
  • html/canvas/EXTsRGB.idl:
  • html/canvas/OESElementIndexUint.idl:
  • html/canvas/OESStandardDerivatives.idl:
  • html/canvas/OESTextureFloat.idl:
  • html/canvas/OESTextureFloatLinear.idl:
  • html/canvas/OESTextureHalfFloat.idl:
  • html/canvas/OESTextureHalfFloatLinear.idl:
  • html/canvas/OESVertexArrayObject.idl:
  • html/canvas/WebGLColorBufferFloat.idl:
  • html/canvas/WebGLCompressedTextureASTC.idl:
  • html/canvas/WebGLCompressedTextureATC.idl:
  • html/canvas/WebGLCompressedTextureETC.idl:
  • html/canvas/WebGLCompressedTextureETC1.idl:
  • html/canvas/WebGLCompressedTexturePVRTC.idl:
  • html/canvas/WebGLCompressedTextureS3TC.idl:
  • html/canvas/WebGLCompressedTextureS3TCsRGB.idl:
  • html/canvas/WebGLDebugRendererInfo.idl:
  • html/canvas/WebGLDebugShaders.idl:
  • html/canvas/WebGLDepthTexture.idl:
  • html/canvas/WebGLDrawBuffers.idl:
  • html/canvas/WebGLLoseContext.idl:
  • html/canvas/WebGLRenderingContextBase.idl:
  • html/canvas/WebGLVertexArrayObjectOES.idl:
  • html/track/TextTrackCueGeneric.idl:
  • html/track/VTTRegionList.idl:
  • inspector/CommandLineAPIHost.idl:
  • inspector/InspectorFrontendHost.idl:
  • page/DOMWindow.idl:
  • page/GlobalCrypto.idl:
  • page/GlobalPerformance.idl:
  • page/Location.idl:
  • page/NavigatorID.idl:
  • page/NavigatorLanguage.idl:
  • page/NavigatorOnLine.idl:
  • page/NavigatorPlugins.idl:
  • page/NavigatorServiceWorker.idl:
  • page/NavigatorShare.idl:
  • page/RemoteDOMWindow.idl:
  • page/WindowEventHandlers.idl:
  • page/WindowOrWorkerGlobalScope.idl:
  • svg/SVGFilterPrimitiveStandardAttributes.idl:
  • svg/SVGFitToViewBox.idl:
  • svg/SVGTests.idl:
  • svg/SVGURIReference.idl:
  • svg/SVGZoomAndPan.idl:
  • testing/GCObservation.idl:
  • testing/InternalSettings.idl:
  • testing/Internals.idl:
  • testing/InternalsMapLike.idl:
  • testing/InternalsSetLike.idl:
  • testing/MallocStatistics.idl:
  • testing/MemoryInfo.idl:
  • testing/MockCDMFactory.idl:
  • testing/MockContentFilterSettings.idl:
  • testing/MockPageOverlay.idl:
  • testing/MockPaymentCoordinator.idl:
  • testing/ServiceWorkerInternals.idl:
  • testing/TypeConversions.idl:
  • testing/WebFakeXRDevice.idl:
  • testing/WebFakeXRInputController.idl:
  • testing/WebXRTest.idl:
  • workers/AbstractWorker.idl:
  • xml/XPathNSResolver.idl:

Source/WebKit:

  • WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:

(WebKit::InjectedBundleScriptWorld::disableOverrideBuiltinsBehavior):
Update for new name WebCore::DOMWrapperWorld.

8:57 AM Changeset in webkit [266661] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

-Wreturn-type warning in BaseAudioContext.cpp
https://bugs.webkit.org/show_bug.cgi?id=216215

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-09-05
Reviewed by Darin Adler.

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::periodicWave):

8:45 AM Changeset in webkit [266660] by Darin Adler
  • 12 edits
    3 deletes in trunk

CSS revert should serialize as "revert", not "Revert"
https://bugs.webkit.org/show_bug.cgi?id=216187

Reviewed by Anders Carlsson.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-color-adjust/parsing/color-scheme-valid-expected.txt: Expect

one additional test to pass instead of fail.

  • web-platform-tests/css/css-values/unset-value-storage-expected.txt: Expect pass instead of fail.
  • web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Ditto.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-values/unset-value-storage.html

imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block.html

  • css/CSSRevertValue.cpp:

(WebCore::CSSRevertValue::customCSSText const): Use lowercase "revert".

  • css/StyleProperties.cpp:

(WebCore::isCSSWideValueKeyword): Added. Replaces isInitialOrInherit.
(WebCore::StyleProperties::fontValue const): Use isCSSWideValueKeyword rather
than isInitialOrInherit.
(WebCore::StyleProperties::getLayeredShorthandValue const): Ditto. Also
rearranged thee function a bit and shortened some excessively wordy code.
(WebCore::StyleProperties::getShorthandValue const): Ditto.
(WebCore::StyleProperties::borderPropertyValue const): Ditto.
(WebCore::StyleProperties::asText const): Added code to properly handle the
case where both background-position/repeat-x and -y are the same CSS-wide
value keyword as well as cases involving "initial". The general case above
handles these properly, but background-position/repeat have their own code,
which needed to repeat some of the same logic.
(WebCore::StyleProperties::PropertyReference::cssText const): Use makeString
instead of StringBuilder.

  • dom/StyledElement.cpp:

(WebCore::StyledElement::styleAttributeChanged): Removed incorrect code that
detached the CSS object model style wrapper from the element when the style
attribute was removed. This was incorrect behavior; it should stay attached.
This fix happens to be tested by the same file as the "revert"/"Revert" fix
and I wanted the whole file to pass, not just one more test.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::addBlockStyle): Rewrote for simplicity, but
also so this works properly when inlineStyle is non-null but empty. This case
arises in one test now because of the change to StyledElement above.

LayoutTests:

  • editing/spelling/spelling-dots-position-expected.html: Remove some unneeded style text.

Caught my eye because it uses "background-position: initial".

  • fast/css/background-position-serialize-expected.txt: Updated for a progression.

We now correctly omit "background-position: initial initial; background-repeat: initial initial;".

  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Removed.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Removed.

These were only needed because the failure strings depended on the exact set of attributes.
But the test passes now.

8:18 AM Changeset in webkit [266659] by Darin Adler
  • 4 edits in trunk

Implement serialization of CSSPropertyGap
https://bugs.webkit.org/show_bug.cgi?id=216210

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-align/parsing/gap-valid-expected.txt: Expect pass.

Source/WebCore:

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const): Use get2Values to serialize
the gap shorthand.

3:11 AM Changeset in webkit [266658] by rniwa@webkit.org
  • 5 edits in trunk

Unreviewed, reverting r266614 and r266657.
https://bugs.webkit.org/show_bug.cgi?id=216213

Broke builds

Reverted changesets:

"Fix Internals::supportsVCPEncoder on BigSur"
https://bugs.webkit.org/show_bug.cgi?id=216174
https://trac.webkit.org/changeset/266614

"Fix the build after r266614"
https://bugs.webkit.org/show_bug.cgi?id=216174
https://trac.webkit.org/changeset/266657

Patch by Commit Queue <commit-queue@webkit.org> on 2020-09-05

12:20 AM Changeset in webkit [266657] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the build after r266614
https://bugs.webkit.org/show_bug.cgi?id=216174

Unreviewed.

  • testing/Internals.cpp:

(WebCore::Internals::supportsVCPEncoder): These parentheses really should be in
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h,
but I don't know the process for updating that third-party library. This is a
short-term build fix.

Sep 4, 2020:

11:43 PM Changeset in webkit [266656] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

CSS :visited color taken on non-visited link when using CSS variables
https://bugs.webkit.org/show_bug.cgi?id=210525

Source/WebCore:

Patch by Tyler Wilcock <Tyler Wilcock> on 2020-09-04
Reviewed by Darin Adler.

This patch fixes a bug in which :visited styles with variables (custom properties)
were being applied to non-visited links, as the builder link match state was
unconditionally changed from MatchVisited to MatchDefault when resolving said variables.
Now all link state mutations are limited to the smallest scope possible, meaning the
erroneous reset to MatchDefault is no longer necessary.

Test: fast/css/link-with-variable-styling.html

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyCustomProperty): Limit m_linkState mutations with SetForScope to prevent said
mutations from leaking out and causing unintended side effects.

LayoutTests:

Add reftest ensuring :visited link styles don't override regular styles
for links that have not yet been visited.

Patch by Tyler Wilcock <Tyler Wilcock> on 2020-09-04
Reviewed by Darin Adler.

  • fast/css/link-with-variable-styling-expected.html: Added.
  • fast/css/link-with-variable-styling.html: Added.
9:53 PM Changeset in webkit [266655] by ysuzuki@apple.com
  • 19 edits
    2 adds in trunk

[JSC] Align legacy Intl constructor behavior to spec
https://bugs.webkit.org/show_bug.cgi?id=216193

Reviewed by Darin Adler.

JSTests:

  • stress/intl-datetimeformat.js:
  • stress/intl-legacy-constructors.js: Added.

(shouldBe):
(shouldThrow):
(testLegacyConstructor):

  • stress/intl-numberformat.js:

Source/JavaScriptCore:

Legacy Intl constructors (Intl.DateTimeFormat and Intl.NumberFormat) have special handling when it is called via Intl.DateTimeFormat() form.
This allowed legacy Intl constructors to be used with prototype-based inheritance without using class syntax. This legacy behavior is later specified
explicitly in the spec. So we should align our implementation to the spec's one.

  1. When defining fallback formats, we need to put them into the property which is visible via Symbol("IntlLegacyConstructedSymbol").
  2. Even if the provided thisValue is IntlDateTimeFormat* / IntlNumberFormat*, we should create another instance and put it to Symbol("IntlLegacyConstructedSymbol") field.

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::intlLegacyConstructedSymbol const):

  • runtime/CommonIdentifiers.h:
  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructor::finishCreation):
(JSC::callIntlDateTimeFormat):

  • runtime/IntlDateTimeFormatInlines.h: Added.

(JSC::IntlDateTimeFormat::unwrapForOldFunctions):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncFormatToParts):
(JSC::IntlDateTimeFormatPrototypeFuncFormatRange):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):

  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructor::finishCreation):
(JSC::callIntlNumberFormat):

  • runtime/IntlNumberFormatInlines.h:

(JSC::IntlNumberFormat::unwrapForOldFunctions):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncFormatToParts):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):

  • runtime/IntlObject.cpp:

(JSC::createDateTimeFormatConstructor):
(JSC::createNumberFormatConstructor):

  • runtime/IntlObjectInlines.h:

(JSC::constructIntlInstanceWithWorkaroundForLegacyIntlConstructor):
(JSC::unwrapForLegacyIntlConstructor):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::dateTimeFormatConstructor):
(JSC::JSGlobalObject::dateTimeFormatPrototype):
(JSC::JSGlobalObject::numberFormatConstructor):
(JSC::JSGlobalObject::numberFormatPrototype):

9:07 PM Changeset in webkit [266654] by commit-queue@webkit.org
  • 30 edits
    2 copies
    2 adds in trunk

Move PDF heads-up display to UI process on macOS
https://bugs.webkit.org/show_bug.cgi?id=215780
<rdar://problem/58715847>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-09-04
Reviewed by Tim Horton.

Source/WebKit:

This has many benefits including the one in the radar, testability, and moving WebKit-specific code from PDFKit to WebKit.

Now that the HUD is displayed in the UI process instead of in the web content, zooming in keeps the HUD the same size.
A 3d-transformed iframe with a PDF in it now shows the HUD in the place you can click on it, instead of in the transformed PDF.
Also, moving the mouse to the HUD within the first 3 seconds prevents it from hiding, which it does when the mouse leaves the HUD.
The rest of the behavior I think should be the same. Most users should not notice any difference.

Functionality covered by API tests, the first tests for PDF content interaction!

  • Scripts/webkit/messages.py:
  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView _createPDFHUD:rect:]):
(-[WKView _pdfHUD:changedLocation:]):
(-[WKView _removePDFHUD:]):
(-[WKView _removeAllPDFHUDs]):

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView mouseMoved:]):
(-[WKWebView mouseDown:]):
(-[WKWebView mouseUp:]):
(-[WKWebView _createPDFHUD:rect:]):
(-[WKWebView _pdfHUD:changedLocation:]):
(-[WKWebView _removePDFHUD:]):
(-[WKWebView _removeAllPDFHUDs]):

  • UIProcess/API/mac/WKWebViewPrivateForTestingMac.h:
  • UIProcess/API/mac/WKWebViewTestingMac.mm:

(-[WKWebView pdfHUDs]):

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

(WebKit::WebViewImpl::createPDFHUD):
(WebKit::WebViewImpl::updatePDFHUDLocation):
(WebKit::WebViewImpl::removePDFHUD):
(WebKit::WebViewImpl::removeAllPDFHUDs):

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

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::processDidTerminate):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): Deleted.
(WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication): Deleted.

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::createPDFHUD):
(WebKit::PageClientImpl::updatePDFHUDLocation):
(WebKit::PageClientImpl::removePDFHUD):
(WebKit::PageClientImpl::removeAllPDFHUDs):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
(WebKit::WebPageProxy::createPDFHUD):
(WebKit::WebPageProxy::removePDFHUD):
(WebKit::WebPageProxy::updatePDFHUDLocation):
(WebKit::WebPageProxy::pdfZoomIn):
(WebKit::WebPageProxy::pdfZoomOut):
(WebKit::WebPageProxy::pdfSaveToPDF):
(WebKit::WebPageProxy::pdfOpenWithPreview):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(-[WKPDFLayerControllerDelegate openWithNativeApplication]):
(-[WKPDFLayerControllerDelegate saveToPDF]):
(WebKit::PDFPlugin::PDFPlugin):
(WebKit::PDFPlugin::~PDFPlugin):
(WebKit::PDFPlugin::frameForHUD const):
(WebKit::PDFPlugin::calculateSizes):
(WebKit::PDFPlugin::convertFromPDFViewToRootView const):
(WebKit::PDFPlugin::visibilityDidChange):
(WebKit::PDFPlugin::zoomIn):
(WebKit::PDFPlugin::zoomOut):
(WebKit::PDFPlugin::save):
(WebKit::PDFPlugin::openWithPreview):

  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::zoomPDFIn):
(WebKit::WebPage::zoomPDFOut):
(WebKit::WebPage::savePDF):
(WebKit::WebPage::openPDFWithPreview):
(WebKit::WebPage::createPDFHUD):
(WebKit::WebPage::updatePDFHUDLocation):
(WebKit::WebPage::removePDFHUD):

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:

(pdfData):
(TEST):
(checkFrame):

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

(-[TestUIDelegate _webView:saveDataToFile:suggestedFilename:mimeType:originatingURL:]):

8:52 PM Changeset in webkit [266653] by Karl Rackler
  • 2 edits in trunk/LayoutTests

(REGRESSION (r266045): [ Big Sur ] 6 forms and 3 tables tests are a constant failure with approximately 1px difference)
rdar://68372418

Unreviewed test gardening.

  • platform/mac/TestExpectations:
8:41 PM Changeset in webkit [266652] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix build when using non-standard unified sources.

  • Modules/applepay/ApplePayPaymentMethod.h:

There was a missing include.

7:51 PM Changeset in webkit [266651] by achristensen@apple.com
  • 6 edits in trunk

Align KOI8-U and ibm866 encodings with Chrome, Firefox, and the specification
https://bugs.webkit.org/show_bug.cgi?id=216184

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/single-byte-decoder-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • platform/text/TextCodecICU.cpp:
  • platform/text/TextCodecSingleByte.cpp:

(WebCore::tableForEncoding):
(WebCore::tableForDecoding):
(WebCore::TextCodecSingleByte::registerEncodingNames):
(WebCore::TextCodecSingleByte::registerCodecs):

  • platform/text/TextCodecSingleByte.h:
6:05 PM Changeset in webkit [266650] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

handleXPCEndpointMessages does not check XPC object is an xpc_endpoint_t
https://bugs.webkit.org/show_bug.cgi?id=216196
<rdar://problem/68198293>

Reviewed by Per Arne Vollan.

Add a check to have sure the XPC object is indeed an xpc_endpoint_t before
using it.

  • WebProcess/cocoa/HandleXPCEndpointMessages.mm:

(WebKit::handleXPCEndpointMessages):

5:19 PM Changeset in webkit [266649] by weinig@apple.com
  • 14 edits
    3 moves
    1 add
    1 delete in trunk/Source/WebCore

[WebIDL] Adopt LegacyFactoryFunction extended attribute in lieu of NamedConstructor
https://bugs.webkit.org/show_bug.cgi?id=213316

Reviewed by Darin Adler.

Rename the following the extended attributes to more closely align with WebIDL:

NamedConstructor -> LegacyFactoryFunction
ConstructorCallWith -> LegacyFactoryFunctionCallWith
ConstructorEnabledBySetting -> LegacyFactoryFunctionEnabledBySetting
ConstructorMayThrowException -> LegacyFactoryFunctionMayThrowException

Note, ConstructorCallWith, ConstructorEnabledBySetting and ConstructorMayThrowException
were only used with NamedConstructors previously as normal constructors don't require
interface level extended attributes for these as the extended attribute can be directly
on the constructor itself. Ideally, we would do the same with LegacyFactoryFunction by
allowing extended attributes on the operator itself like:

[

...
LegacyFactoryFunction=[CallWith=Document] Audio(optional [AtomString] DOMString src)

]

but this requires changes to the IDLParser (which are straightforward) and creates a lot of
additional complexity inside the very hacky preprocess-idls.pl reproducing those parser changes.
I will leave that additional cleanup for a subsequent change.

  • html/HTMLAudioElement.idl:
  • html/HTMLImageElement.idl:
  • html/HTMLOptionElement.idl:
  • html/track/TextTrackCue.idl:

Update to use new names.

  • bindings/js/JSDOMLegacyFactoryFunction.h: Copied from bindings/js/JSDOMNamedConstructor.h.
  • bindings/js/JSDOMNamedConstructor.h: Removed.
  • WebCore.xcodeproj/project.pbxproj:

Update for rename of JSDOMNamedConstructor.h to JSDOMLegacyFactoryFunction.h

  • bindings/scripts/CodeGeneratorJS.pm:
  • bindings/scripts/IDLParser.pm:

(applyExtendedAttributeList):

  • bindings/scripts/preprocess-idls.pl:

(GenerateConstructorAttributes):
Update IDL processing to handle new names.

  • bindings/scripts/IDLAttributes.json:

Update extended attribute definitions for new names. Removed unused Constructor extended attribute.

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp: Copied from bindings/scripts/test/JS/JSTestNamedConstructor.cpp.
  • bindings/scripts/test/JS/JSTestLegacyFactoryFunction.h: Copied from bindings/scripts/test/JS/JSTestNamedConstructor.h.
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Removed.
  • bindings/scripts/test/JS/JSTestNamedConstructor.h: Removed.
  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestLegacyFactoryFunction.idl: Copied from bindings/scripts/test/TestNamedConstructor.idl.
  • bindings/scripts/test/TestNamedConstructor.idl: Removed.

Update tests for new names.

4:38 PM Changeset in webkit [266648] by Truitt Savell
  • 2 edits in trunk/LayoutTests

fast/text/international/generic-font-family-language-traditional.html is passing, remove expectation.
rdar://60227623

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:34 PM Changeset in webkit [266647] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Correct typo in expectation for imported/blink/fast/text/international/text-shaping-arabic.html
rdar://41103260

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:32 PM Changeset in webkit [266646] by Truitt Savell
  • 2 edits in trunk/LayoutTests

imported/blink/fast/text/international/text-shaping-arabic.html is Passing on Big Sur
rdar://41103260

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:30 PM Changeset in webkit [266645] by Chris Dumez
  • 6 edits in trunk/Source

Move lazy DisplayLink tear down logic from the WebProcess to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=216195

Reviewed by Simon Fraser.

Move lazy DisplayLink tear down logic from the WebProcess to the UIProcess, now that the
DisplayLink has been moved to the UIProcess due to sandboxing.

After a DisplayLink no longer has any clients, we keep it firing up to 20 times without
any clients in case a new client gets added shortly after. The idea was to avoid killing
and respawning too many threads when adding and removing clients in quick succession.
However, now that the DisplayLink lives in the UIProcess side and sends IPC to the
WebProcesses every time it fires, it makes a lot more sense to implement this logic in
the UIProcess side, to avoid sending unnecessary IPC to processes that do not care about
it.

Source/WebCore:

  • platform/graphics/DisplayRefreshMonitor.cpp:

(WebCore::DisplayRefreshMonitor::displayDidRefresh):

  • platform/graphics/DisplayRefreshMonitor.h:

(WebCore::DisplayRefreshMonitor::shouldBeTerminated const):

Source/WebKit:

  • UIProcess/mac/DisplayLink.cpp:

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

  • UIProcess/mac/DisplayLink.h:
4:19 PM Changeset in webkit [266644] by Chris Dumez
  • 3 edits in trunk/LayoutTests

REGRESSION(266399?): [ iOS wk2 ] imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_hash.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=216124
<rdar://problem/68282113>

Unreviewed, rebaselined test on iOS.

  • platform/ios-wk2/TestExpectations:
  • platform/ios/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_hash-expected.txt:
4:01 PM Changeset in webkit [266643] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION (r265603): ASSERTION FAILED: m_suspended in WebCore::SuspendableTimerBase::resume() seen with http/tests/security/no-indexeddb-from-sandbox.html
https://bugs.webkit.org/show_bug.cgi?id=215465

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:45 PM Changeset in webkit [266642] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION (r265603): ASSERTION FAILED: m_suspended in WebCore::SuspendableTimerBase::resume() seen with http/tests/security/no-indexeddb-from-sandbox.html
https://bugs.webkit.org/show_bug.cgi?id=215465

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:33 PM Changeset in webkit [266641] by Alexey Shvayka
  • 2 edits in trunk/Source/JavaScriptCore

Array.prototype.push should always perform Set? in strict mode
https://bugs.webkit.org/show_bug.cgi?id=216121

Unreviewed, address Darin's feedback on r266581.

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncPush): Remove unnecessary static_cast<uint64_t>.

3:29 PM Changeset in webkit [266640] by Jonathan Bedard
  • 3 edits
    1 copy in trunk/Tools

[webkitcorepy] Add mock Response object
https://bugs.webkit.org/show_bug.cgi?id=216150
<rdar://problem/68307522>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/mocks/init.py:
  • Scripts/libraries/webkitcorepy/webkitcorepy/mocks/requests.py: Added.

(Response): A response object similar to the one used by requests.

2:58 PM Changeset in webkit [266639] by Alan Coon
  • 1 copy in tags/Safari-610.2.4

Tag Safari-610.2.4.

2:44 PM Changeset in webkit [266638] by Jonathan Bedard
  • 5 edits in trunk/Tools

run-webkit-tests rebuilds ImageDiff every time
https://bugs.webkit.org/show_bug.cgi?id=204420
<rdar://problem/68232690>

Reviewed by Tim Horton.

  • Scripts/webkitpy/port/base.py:

(Port.check_image_diff): Check the version of ImageDiff we actually intend to use.
(Port): Use webkitcorepy's Memoize in _path_to_image_diff.
(Port._build_image_diff): Clear the memoized cache after building ImageDiff.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort): Memoize _path_to_image_diff.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort): Memoize _path_to_image_diff.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort): Memoize _path_to_image_diff.

2:21 PM Changeset in webkit [266637] by Karl Rackler
  • 2 edits in trunk/LayoutTests

[ Big Sur ] imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framerate.html is a flaky failure/timeout)
rdar://68364365

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:45 PM Changeset in webkit [266636] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[GTK] Unreviewed test gardening. Mark several GTK API tests as flaky.

These tests were failing in EWS GTK-API tests bots, but I didn't
manage to reproduce the failures in tip of master.

  • TestWebKitAPI/glib/TestExpectations.json:
1:43 PM Changeset in webkit [266635] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa,EME] -outputObscuredDueToInsufficientExternalProtection KVO will set OutputObscured for all attached MediaKeySessions.
https://bugs.webkit.org/show_bug.cgi?id=216185

Reviewed by Eric Carlson.

When EME clients add licenses that have, for instance, different HDCP level requirements, the keyStatus for
each key in the Session (and indeed all attached MediaKeySessions) will be marked as OutputRestricted, since
it is impossible to tell from that KVO which key or session was responsible for creating the violation.

On platforms where the more granular -willOutputBeObscuredDueToInsufficientExternalProtectionForDisplays: query
is available, ignore the KVO from AVSampleBufferDisplayLayer, and rely entirely on the per-request query to
determine key status.

Drive-by fix: add logging when we receive the -outputObscuredDueToInsufficientExternalProtection KVO notification, and
include keyIDs in the keyStatus logging.

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

(WTF::LogArgument<WebCore::CDMInstanceFairPlayStreamingAVFObjC::Keys>::toString):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyStatuses const):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyRequestHasInsufficientProtectionForDisplayID const):

1:17 PM Changeset in webkit [266634] by sihui_liu@apple.com
  • 8 edits in trunk/Source

Webpages flash when switching between windows
https://bugs.webkit.org/show_bug.cgi?id=216012

Reviewed by Tim Horton.

Source/WebCore/PAL:

  • pal/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit:

Based on patches from Tim Horton. To avoid flash, we need to make sure view to be selected updates its content
before UI process commits its transaction. We did this by making UI process block until receiving a reply
DidUpdateActivityState from web process. However, web process did not make sure the reply would be sent after
normal rendering update and corresponding transasction commit. Instead, it flushed transactions in progress and
replied. To fix this, now we make web process reply in transaction commit handler after rendering update, if
there is an active transaction.

In the switching case, view to be unselected will detach from root layer in its web process, which makes its
content empty. This change is independent from the UI process commit, so we want this to happen after UI process
commits (which submits the view hierachy change). Otherwise, empty content(white flash) on the unselected view
will be displayed. To fix this, we let UI process send the activity state change message in transaction commit
handler, if there is an active transaction.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::scheduleActivityStateUpdate):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setSuppressVisibilityUpdates):
(WebKit::WebPageProxy::activityStateDidChange):
(WebKit::WebPageProxy::dispatchActivityStateChange):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::updateRendering):
(WebKit::TiledCoreAnimationDrawingArea::handleActivityStateChangeCallbacks):
(WebKit::TiledCoreAnimationDrawingArea::handleActivityStateChangeCallbacksIfNeeded):
(WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
(WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired): Deleted.

1:06 PM Changeset in webkit [266633] by Alan Coon
  • 1 copy in tags/Safari-610.2.3.1

Tag Safari-610.2.3.1.

1:04 PM Changeset in webkit [266632] by Alan Coon
  • 8 edits in branches/safari-610.2.3-branch/Source

Versioning.

WebKit-7610.2.3.1

12:22 PM Changeset in webkit [266631] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.29.91

WPE WebKit 2.29.91

12:21 PM Changeset in webkit [266630] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.30

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.29.91 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for the 2.29.91 release.
12:19 PM Changeset in webkit [266629] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Notify bot watchers about pre-existing and flaky test failures for JSC tests
https://bugs.webkit.org/show_bug.cgi?id=215948

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeJSCTestsResults.start):
(AnalyzeJSCTestsResults.send_email_for_flaky_failure):
(AnalyzeJSCTestsResults):
(AnalyzeJSCTestsResults.send_email_for_pre_existing_failure):

12:12 PM Changeset in webkit [266628] by Jonathan Bedard
  • 4 edits
    4 copies
    14 adds in trunk/Tools

[webkitscmpy] Add root, branch and remote for local SCM repositories
https://bugs.webkit.org/show_bug.cgi?id=215960
<rdar://problem/67968919>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py: Added.

(Memoize): Add a memoize call that can cache a response for a set amount of time
Or be explicitly cleared.

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py: Added.

(TestMemoize):

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local: Added.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/init.py: Added.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: Added.

(Git): Object representing a local git checkout.
(Git.is_checkout): Check if a given path is a git checkout.
(Git.init): Initialize a Git checkout.
(Git.root_path): Return the path for the root of the local repository.
(Git.branch): Return the current branch.
(Git.remote): Return the url of the remote.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py: Added.

(Scm): Base class for all local SCM checkouts.
(Scm.Exception):
(Scm.from_path): Given a path, return an instantiated SVN object from that
path, if possible.
(Scm.init):
(Scm.root_path): Virtual function implemented by children.
(Scm.branch): Ditto.
(Scm.remote): Ditto.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py: Added.

(Svn): Object representing a local Svn checkout.
(Svn.is_checkout): Check if a given path is a svn checkout.
(Svn.init): Initialize a Svn checkout.
(Svn.info): Return the contents of svn info as a dictionary.
(Svn.root_path): Return the path for the root of the local repository.
(Svn.branch): Return the current branch.
(Svn.remote): Return the url of the remote.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks: Added.
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/init.py: Added.
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local: Added.
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/init.py: Added.
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Added.

(Git): Mock a local Git repository.
(Git.init):

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py: Added.

(Svn): Mock a local SVN repository.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test: Added.
  • Scripts/libraries/webkitscmpy/webkitscmpy/test/init.py: Added.
  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: Added.

(TestGit):

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/scm_unittest.py: Added.

(TestScm):

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py: Added.

(TestSvn):

11:54 AM Changeset in webkit [266627] by Chris Dumez
  • 11 edits in trunk

Improve interpolation algorithm in OscillatorNode
https://bugs.webkit.org/show_bug.cgi?id=216183

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-oscillator-connections-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/osc-basic-waveform-expected.txt:

Source/WebCore:

Align our OscillatorNode implementation with Chromium to get us a few more
passes on WPT tests. In particular, the following changes were made:

  • Align detune AudioParam nominal range values with Chromium's.
  • We now clamp the frequency value to lie within Nyquist frequency.
  • Use different interpolation algorithms based on frequency.
  • Split A-Rate / K-Rate processing code into separate functions for clarity.

No new tests, rebaselined existing tests.

  • Modules/webaudio/OscillatorNode.cpp:

(WebCore::detuneToFrequencyMultiplier):
(WebCore::clampFrequency):
(WebCore::OscillatorNode::OscillatorNode):
(WebCore::OscillatorNode::calculateSampleAccuratePhaseIncrements):
(WebCore::doInterpolation):
(WebCore::OscillatorNode::processARate):
(WebCore::OscillatorNode::processKRate):
(WebCore::OscillatorNode::process):

  • Modules/webaudio/OscillatorNode.h:

LayoutTests:

Unskip test that should no longer be flaky now that it is passing.

11:50 AM Changeset in webkit [266626] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Notify bot watchers about pre-existing and flaky test failures for API tests
https://bugs.webkit.org/show_bug.cgi?id=215949

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeAPITestsResults.analyzeResults):
(AnalyzeAPITestsResults.send_email_for_flaky_failure):
(AnalyzeAPITestsResults):
(AnalyzeAPITestsResults.send_email_for_pre_existing_failure):

11:48 AM Changeset in webkit [266625] by Alan Coon
  • 1 copy in branches/safari-610.2.3-branch

New branch.

11:42 AM Changeset in webkit [266624] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Localization: typo in WAI-ARIA string ("[the] element have")
https://bugs.webkit.org/show_bug.cgi?id=216176

Patch by Patrick Angle <Patrick Angle> on 2020-09-04
Reviewed by Devin Rousso.

Resolved element not being pluralized in some audit test descriptions.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):

11:30 AM Changeset in webkit [266623] by weinig@apple.com
  • 7 edits in trunk/Source/WebCore

[WebIDL] Remove support for exception interfaces from WebIDL parser and code generators
https://bugs.webkit.org/show_bug.cgi?id=216129

Reviewed by Chris Dumez.

Replace exception interfaces, only used by DOMException.idl, OverconstrainedError.idl
and the tests, with a new "Exception" extended attribute on the interface.

The way WebIDL specifies things, the extended attribute should not really be necessary,
as the DOMException interface is specifically called out as having special EcmaScript
bindings (https://heycam.github.io/webidl/#es-DOMException-specialness), but since
OverconstrainedError is currently relying on those semantics, using an extended attribute
was a useful tool to maintain parity.

  • Modules/mediastream/OverconstrainedError.idl:
  • bindings/scripts/test/TestException.idl:
  • dom/DOMException.idl:

Replace use of special "exception" style interface with Exception extended attribute.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):
Replace $interface->isException with $interface->extendedAttributes->{Exception}

  • bindings/scripts/IDLAttributes.json:

Add new Exception attribute.

  • bindings/scripts/IDLParser.pm:

(parseDefinition):
(parseDictionaryMembers):
(parseDictionaryMember):
(parseArgument):
(parseArgumentsRest):
(parseException): Deleted.
(parseExceptionMembers): Deleted.
(parseOptionalOrRequiredArgument): Deleted.
(parseExceptionMember): Deleted.
(parseExceptionField): Deleted.
Remove custom exception parsing. Update places using the $nextExceptionField_1 and $nextExceptionMembers_1
to use more clearly named constants.

11:23 AM Changeset in webkit [266622] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Localization: "Low/Medium/High" strings need separate keys for different uses in the UI
https://bugs.webkit.org/show_bug.cgi?id=216136

Reviewed by Brian Burg.

Provide enough context to understand what nouns "low/medium/high" are used with
("impact" and "priority", in our case). This is necessary to determine adjectives'
grammatical gender.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/Resource.js:

(WI.Resource.displayNameForPriority):

  • UserInterface/Views/CPUTimelineView.js:

(WI.CPUTimelineView.prototype._layoutEnergyChart):
Drive-by: merge two if blocks into one to minimize code repetition.

11:06 AM Changeset in webkit [266621] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Fix indentation after r266533
https://bugs.webkit.org/show_bug.cgi?id=193274

  • dom/TextEncoder.cpp:

(WebCore::TextEncoder::encodeInto):

  • dom/TextEncoder.idl:
10:46 AM Changeset in webkit [266620] by achristensen@apple.com
  • 26 edits
    2 deletes in trunk

Align EUC-JP, ISO-2022-JP, and Shift_JIS decoding with Chrome, Firefox, and the specification
https://bugs.webkit.org/show_bug.cgi?id=216168

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/iso-2022-jp-decoder-expected.txt: Removed.
  • web-platform-tests/encoding/iso-2022-jp-decoder.any-expected.txt:
  • web-platform-tests/encoding/iso-2022-jp-decoder.any.worker-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode-errors-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-csiso2022jp-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars-csiso2022jp.html:
  • web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars.html:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-csshiftjis-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-errors-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-ms932-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-ms_kanji-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-shift-jis-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-sjis-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-windows-31j-expected.txt:
  • web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-x-sjis-expected.txt:
  • web-platform-tests/encoding/streams/decode-non-utf8.any-expected.txt:
  • web-platform-tests/encoding/streams/decode-non-utf8.any.worker-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • platform/text/EncodingTables.cpp:
  • platform/text/EncodingTables.h:
  • platform/text/TextCodecCJK.cpp:

(WebCore::WTF_ARRAY_LENGTH):
(WebCore::TextCodecCJK::decodeCommon):
(WebCore::codePointJIS0208):
(WebCore::codePointJIS0212):
(WebCore::TextCodecCJK::eucJPDecode):
(WebCore::TextCodecCJK::iso2022JPDecode):
(WebCore::TextCodecCJK::iso2022JPEncode):
(WebCore::TextCodecCJK::shiftJISDecode):
(WebCore::TextCodecCJK::eucKRDecode):
(WebCore::TextCodecCJK::big5Decode):
(WebCore::TextCodecCJK::decode):

  • platform/text/TextCodecCJK.h:

LayoutTests:

  • platform/mac/imported/w3c/web-platform-tests/encoding/eof-shift_jis-expected.txt: Removed.
10:23 AM Changeset in webkit [266619] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Add a fast path in TransformationMatrix::mapRect(const FloatRect&) for affine transformations
https://bugs.webkit.org/show_bug.cgi?id=216139

Reviewed by Tim Horton.

Add a fast path when mapping 2D points through affine transformation matrices that takes advantage of both:

  1. The predetermined 0 and 1 values in affine transformation matrices.
  2. The fact that points in the FloatRect are aligned with x and y axes (as opposed to a FloatQuad of 4 arbitrary

points), which allows us to avoid mapping all 4 corners of the rect through the matrix.

The current implementation of this method maps each of the 4 corners through the transformation matrix, creates
a FloatQuad using these 4 transformed points, and then asks the FloatQuad for its bounding box. This requires
a total of 26 floating point additions, 24 multiplications and 20 comparisons, as well as a small (but
measurable) amount of overhead when creating the FloatPoints and FloatQuad and asking for the bounding rect.

We can pare this down to just 8 additions, 8 multiplications, and 4 comparisons by using a different strategy
that instead branches on the 4 relevant matrix coefficients a, b, c, d (rather than the each of the final x
and y coordinates) to determine which of the min or max x and y values to multiply in order to compute the min
and max x and y coordinates in the final bounding rect.

In a quick microbenchmark that maps FloatRects through an affine TransformationMatrix, this roughly halves the
time spent in TransformationMatrix::mapRect; on the Multiply subtest of MotionMark (which invokes this method
~17 million times, almost entirely with affine transformation matrices), I measured a ~1% improvement.

  • platform/graphics/transforms/TransformationMatrix.cpp:

(WebCore::TransformationMatrix::mapRect const):

10:22 AM Changeset in webkit [266618] by Darin Adler
  • 6 edits in trunk/Source/WebCore

Simplify some editing code
https://bugs.webkit.org/show_bug.cgi?id=216097

Reviewed by Sam Weinig.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::replaceAllChildrenWithNewText):
If string is empty, don't add a text node. Turns out all callers wanted
this behavior.

  • dom/Node.cpp:

(WebCore::Node::setTextContent): Simplify by relying on new behavior
of replaceAllChildrenWithNewText when passed an empty string.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::setTextAsChildOfElement): Use
replaceAllChildrenWithNewText instead of the unnecessarily complicated
code that was here. Also simplify the VisibeSelection manipulation at
the end of the function.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::setInnerText): Simplify by relying on new
behavior of replaceAllChildrenWithNewText when passed an empty string.

  • page/DOMSelection.cpp:

(WebCore::DOMSelection::deleteFromDocument): Simplify by using the
selection function that takes a SimpleRange rather than the one that
takes two containers and offsets.

10:18 AM Changeset in webkit [266617] by weinig@apple.com
  • 6 edits in trunk/Source/WebCore

[WebIDL] Remove support for the legacycaller special operation type in favor of an extended attribute
https://bugs.webkit.org/show_bug.cgi?id=216157

Reviewed by Anders Carlsson.

WebIDL no longer specifies the legacycaller special operation type, so to make our
parser more closely match the spec, this change removes support for it. Since we still
need something for HTMLAllCollection's override of Call?, it is replaced with a
new extended attribute [LegacyCaller], which has the same semantics as the old special.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddLegacyCallerOperationIfNeeded):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/IDLParser.pm:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::jsTestGlobalObjectTestDefaultToJSONConstructorGetter):
(WebCore::jsTestGlobalObjectTestDefaultToJSONConstructor):
(WebCore::setJSTestGlobalObjectTestDefaultToJSONConstructorSetter):
(WebCore::setJSTestGlobalObjectTestDefaultToJSONConstructor):

  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestObj.idl:
  • html/HTMLAllCollection.idl:
10:00 AM Changeset in webkit [266616] by Chris Dumez
  • 6 edits
    2 adds in trunk

REGRESSION(macOS Big Sur) https://magenta.github.io/lofi-player/ is broken
https://bugs.webkit.org/show_bug.cgi?id=216163
<rdar://problem/68198173>

Reviewed by Eric Carlson.

Source/WebCore:

Address a crash and a backward-compatibility issue on https://magenta.github.io/lofi-player/.

Test: webaudio/webkitofflineaudiocontext-startRendering-crash.html

  • Modules/webaudio/AudioBufferSourceNode.idl:
  • Modules/webaudio/AudioListener.idl:
  • Modules/webaudio/OscillatorNode.idl:

Even after fixing the crash, the game would fail to load because it expected
window.OscillatorNode to exist. When we started working on modern Web Audio,
we renamed the non-standard oscillator node to WebKitOscillatorNode and
added a new standards compliant OscillatorNode behind a runtime flag (off
by default). As a result, window.OscillatorNode no longer existed on Big Sur,
which is not backward compatible. To address the issue, we now expose
window.OscillatorNode even if modern unprefixed WebAudio is not enabled and
we merely disable its constructor at runtime. The same policy applies to
AudioBufferSourceNode & AudioListener because we did the exact same thing
for these interfaces.

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::startRendering):
Make sure we call lazyInitialize() before we start offline rendering.
The context may not be initialized yet if no audio nodes were created
for this context. This is similar to what is done in our modern Web
Audio code in OfflineAudioContext::startOfflineRendering(), which is
why the crash was not reproducible when enabling the Modern Web Audio
experimental feature.

LayoutTests:

Add layout test that was reproducing the crash on https://magenta.github.io/lofi-player/.

  • webaudio/webkitofflineaudiocontext-startRendering-crash-expected.txt: Added.
  • webaudio/webkitofflineaudiocontext-startRendering-crash.html: Added.
9:40 AM Changeset in webkit [266615] by youenn@apple.com
  • 9 edits
    1 copy
    41 adds in trunk

Binding generator is not always computing the right interface attributes
https://bugs.webkit.org/show_bug.cgi?id=216173

Reviewed by Alex Christensen.

Source/WebCore:

Update the regular expression to make sure preprocess-idls.pl computes the right attributes for interfaces.
Previously, it was causing issues if a dictionary defined before an interface in the same file had some extended attributes.
Add some global objects IDL files to enable binding test coverage.
Covered by binding tests and existing layout tests.

  • bindings/scripts/preprocess-idls.pl:

(getInterfaceExtendedAttributesFromIDL):

  • bindings/scripts/test/BindingTestGlobalConstructors.idl: Added.
  • bindings/scripts/test/DOMWindow.idl: Added.
  • bindings/scripts/test/DOMWindowConstructors.idl: Added.
  • bindings/scripts/test/DedicatedWorkerGlobalScope.idl: Added.
  • bindings/scripts/test/DedicatedWorkerGlobalScopeConstructors.idl: Added.
  • bindings/scripts/test/ExposedToWorkerAndWindow.idl: Added.
  • bindings/scripts/test/JS/JSBindingTestGlobalConstructors.cpp: Added.
  • bindings/scripts/test/JS/JSBindingTestGlobalConstructors.h: Added.
  • bindings/scripts/test/JS/JSDOMWindow.cpp: Added.

(WebCore::JSDOMWindowConstructor::prototypeForStructure):
(WebCore::JSDOMWindowConstructor::initializeProperties):
(WebCore::JSDOMWindowPrototype::finishCreation):
(WebCore::JSDOMWindow::JSDOMWindow):
(WebCore::JSDOMWindow::finishCreation):
(WebCore::JSDOMWindow::getConstructor):
(WebCore::IDLAttribute<JSDOMWindow>::cast):
(WebCore::jsDOMWindowConstructor):
(WebCore::setJSDOMWindowConstructor):
(WebCore::jsDOMWindowExposedToWorkerAndWindowConstructorGetter):
(WebCore::jsDOMWindowExposedToWorkerAndWindowConstructor):
(WebCore::setJSDOMWindowExposedToWorkerAndWindowConstructorSetter):
(WebCore::setJSDOMWindowExposedToWorkerAndWindowConstructor):
(WebCore::jsDOMWindowTestNodeConstructorGetter):
(WebCore::jsDOMWindowTestNodeConstructor):
(WebCore::setJSDOMWindowTestNodeConstructorSetter):
(WebCore::setJSDOMWindowTestNodeConstructor):
(WebCore::jsDOMWindowTestObjectConstructorGetter):
(WebCore::jsDOMWindowTestObjectConstructor):
(WebCore::setJSDOMWindowTestObjectConstructorSetter):
(WebCore::setJSDOMWindowTestObjectConstructor):
(WebCore::jsDOMWindowTestPromiseRejectionEventConstructorGetter):
(WebCore::jsDOMWindowTestPromiseRejectionEventConstructor):
(WebCore::setJSDOMWindowTestPromiseRejectionEventConstructorSetter):
(WebCore::setJSDOMWindowTestPromiseRejectionEventConstructor):
(WebCore::JSDOMWindow::subspaceForImpl):
(WebCore::JSDOMWindow::analyzeHeap):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSDOMWindow::toWrapped):

  • bindings/scripts/test/JS/JSDOMWindow.h: Added.

(WebCore::JSDOMWindow::create):
(WebCore::JSDOMWindow::createStructure):
(WebCore::JSDOMWindow::subspaceFor):
(WebCore::JSDOMWindow::wrapped const):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSDOMWindowConstructors.cpp: Added.
  • bindings/scripts/test/JS/JSDOMWindowConstructors.h: Added.
  • bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.cpp: Added.

(WebCore::JSDedicatedWorkerGlobalScopeConstructor::prototypeForStructure):
(WebCore::JSDedicatedWorkerGlobalScopeConstructor::initializeProperties):
(WebCore::JSDedicatedWorkerGlobalScopePrototype::finishCreation):
(WebCore::JSDedicatedWorkerGlobalScope::JSDedicatedWorkerGlobalScope):
(WebCore::JSDedicatedWorkerGlobalScope::finishCreation):
(WebCore::JSDedicatedWorkerGlobalScope::getConstructor):
(WebCore::jsDedicatedWorkerGlobalScopeConstructor):
(WebCore::setJSDedicatedWorkerGlobalScopeConstructor):
(WebCore::JSDedicatedWorkerGlobalScope::subspaceForImpl):
(WebCore::JSDedicatedWorkerGlobalScope::analyzeHeap):

  • bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.h: Added.

(WebCore::JSDedicatedWorkerGlobalScope::create):
(WebCore::JSDedicatedWorkerGlobalScope::createStructure):
(WebCore::JSDedicatedWorkerGlobalScope::subspaceFor):
(WebCore::JSDedicatedWorkerGlobalScope::wrapped const):

  • bindings/scripts/test/JS/JSDedicatedWorkerGlobalScopeConstructors.cpp: Added.
  • bindings/scripts/test/JS/JSDedicatedWorkerGlobalScopeConstructors.h: Added.
  • bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp: Added.

(WebCore::convertDictionary<ExposedToWorkerAndWindow::Dict>):
(WebCore::convertDictionaryToJS):
(WebCore::JSExposedToWorkerAndWindowConstructor::construct):
(WebCore::JSExposedToWorkerAndWindowConstructor::prototypeForStructure):
(WebCore::JSExposedToWorkerAndWindowConstructor::initializeProperties):
(WebCore::JSExposedToWorkerAndWindowPrototype::finishCreation):
(WebCore::JSExposedToWorkerAndWindow::JSExposedToWorkerAndWindow):
(WebCore::JSExposedToWorkerAndWindow::finishCreation):
(WebCore::JSExposedToWorkerAndWindow::createPrototype):
(WebCore::JSExposedToWorkerAndWindow::prototype):
(WebCore::JSExposedToWorkerAndWindow::getConstructor):
(WebCore::JSExposedToWorkerAndWindow::destroy):
(WebCore::IDLOperation<JSExposedToWorkerAndWindow>::cast):
(WebCore::jsExposedToWorkerAndWindowConstructor):
(WebCore::setJSExposedToWorkerAndWindowConstructor):
(WebCore::jsExposedToWorkerAndWindowPrototypeFunctionDoSomethingBody):
(WebCore::jsExposedToWorkerAndWindowPrototypeFunctionDoSomething):
(WebCore::JSExposedToWorkerAndWindow::subspaceForImpl):
(WebCore::JSExposedToWorkerAndWindow::analyzeHeap):
(WebCore::JSExposedToWorkerAndWindowOwner::isReachableFromOpaqueRoots):
(WebCore::JSExposedToWorkerAndWindowOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSExposedToWorkerAndWindow::toWrapped):

  • bindings/scripts/test/JS/JSExposedToWorkerAndWindow.h: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h.

(WebCore::JSExposedToWorkerAndWindow::create):
(WebCore::JSExposedToWorkerAndWindow::createStructure):
(WebCore::JSExposedToWorkerAndWindow::subspaceFor):
(WebCore::wrapperOwner):
(WebCore::wrapperKey):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSPaintWorkletGlobalScope.cpp: Added.

(WebCore::JSPaintWorkletGlobalScopeConstructor::prototypeForStructure):
(WebCore::JSPaintWorkletGlobalScopeConstructor::initializeProperties):
(WebCore::JSPaintWorkletGlobalScopePrototype::finishCreation):
(WebCore::JSPaintWorkletGlobalScope::JSPaintWorkletGlobalScope):
(WebCore::JSPaintWorkletGlobalScope::finishCreation):
(WebCore::JSPaintWorkletGlobalScope::getConstructor):
(WebCore::jsPaintWorkletGlobalScopeConstructor):
(WebCore::setJSPaintWorkletGlobalScopeConstructor):
(WebCore::JSPaintWorkletGlobalScope::subspaceForImpl):
(WebCore::JSPaintWorkletGlobalScope::analyzeHeap):

  • bindings/scripts/test/JS/JSPaintWorkletGlobalScope.h: Added.

(WebCore::JSPaintWorkletGlobalScope::create):
(WebCore::JSPaintWorkletGlobalScope::createStructure):
(WebCore::JSPaintWorkletGlobalScope::subspaceFor):
(WebCore::JSPaintWorkletGlobalScope::wrapped const):

  • bindings/scripts/test/JS/JSPaintWorkletGlobalScopeConstructors.cpp: Added.
  • bindings/scripts/test/JS/JSPaintWorkletGlobalScopeConstructors.h: Added.
  • bindings/scripts/test/JS/JSServiceWorkerGlobalScope.cpp: Added.

(WebCore::JSServiceWorkerGlobalScopeConstructor::prototypeForStructure):
(WebCore::JSServiceWorkerGlobalScopeConstructor::initializeProperties):
(WebCore::JSServiceWorkerGlobalScopePrototype::finishCreation):
(WebCore::JSServiceWorkerGlobalScope::JSServiceWorkerGlobalScope):
(WebCore::JSServiceWorkerGlobalScope::finishCreation):
(WebCore::JSServiceWorkerGlobalScope::getConstructor):
(WebCore::jsServiceWorkerGlobalScopeConstructor):
(WebCore::setJSServiceWorkerGlobalScopeConstructor):
(WebCore::JSServiceWorkerGlobalScope::subspaceForImpl):
(WebCore::JSServiceWorkerGlobalScope::analyzeHeap):

  • bindings/scripts/test/JS/JSServiceWorkerGlobalScope.h: Added.

(WebCore::JSServiceWorkerGlobalScope::create):
(WebCore::JSServiceWorkerGlobalScope::createStructure):
(WebCore::JSServiceWorkerGlobalScope::subspaceFor):
(WebCore::JSServiceWorkerGlobalScope::wrapped const):

  • bindings/scripts/test/JS/JSServiceWorkerGlobalScopeConstructors.cpp: Added.
  • bindings/scripts/test/JS/JSServiceWorkerGlobalScopeConstructors.h: Added.
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::jsTestGlobalObjectDOMWindowConstructorGetter):
(WebCore::jsTestGlobalObjectDOMWindowConstructor):
(WebCore::setJSTestGlobalObjectDOMWindowConstructorSetter):
(WebCore::setJSTestGlobalObjectDOMWindowConstructor):
(WebCore::jsTestGlobalObjectDedicatedWorkerGlobalScopeConstructorGetter):
(WebCore::jsTestGlobalObjectDedicatedWorkerGlobalScopeConstructor):
(WebCore::setJSTestGlobalObjectDedicatedWorkerGlobalScopeConstructorSetter):
(WebCore::setJSTestGlobalObjectDedicatedWorkerGlobalScopeConstructor):
(WebCore::jsTestGlobalObjectPaintWorkletGlobalScopeConstructorGetter):
(WebCore::jsTestGlobalObjectPaintWorkletGlobalScopeConstructor):
(WebCore::setJSTestGlobalObjectPaintWorkletGlobalScopeConstructorSetter):
(WebCore::setJSTestGlobalObjectPaintWorkletGlobalScopeConstructor):
(WebCore::jsTestGlobalObjectServiceWorkerGlobalScopeConstructorGetter):
(WebCore::jsTestGlobalObjectServiceWorkerGlobalScopeConstructor):
(WebCore::setJSTestGlobalObjectServiceWorkerGlobalScopeConstructorSetter):
(WebCore::setJSTestGlobalObjectServiceWorkerGlobalScopeConstructor):
(WebCore::jsTestGlobalObjectWorkerGlobalScopeConstructorGetter):
(WebCore::jsTestGlobalObjectWorkerGlobalScopeConstructor):
(WebCore::setJSTestGlobalObjectWorkerGlobalScopeConstructorSetter):
(WebCore::setJSTestGlobalObjectWorkerGlobalScopeConstructor):
(WebCore::jsTestGlobalObjectWorkletGlobalScopeConstructorGetter):
(WebCore::jsTestGlobalObjectWorkletGlobalScopeConstructor):
(WebCore::setJSTestGlobalObjectWorkletGlobalScopeConstructorSetter):
(WebCore::setJSTestGlobalObjectWorkletGlobalScopeConstructor):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
  • bindings/scripts/test/JS/JSWorkerGlobalScope.cpp: Added.

(WebCore::JSWorkerGlobalScopeConstructor::prototypeForStructure):
(WebCore::JSWorkerGlobalScopeConstructor::initializeProperties):
(WebCore::JSWorkerGlobalScopePrototype::finishCreation):
(WebCore::JSWorkerGlobalScope::JSWorkerGlobalScope):
(WebCore::JSWorkerGlobalScope::finishCreation):
(WebCore::JSWorkerGlobalScope::createPrototype):
(WebCore::JSWorkerGlobalScope::prototype):
(WebCore::JSWorkerGlobalScope::getConstructor):
(WebCore::IDLAttribute<JSWorkerGlobalScope>::cast):
(WebCore::jsWorkerGlobalScopeConstructor):
(WebCore::setJSWorkerGlobalScopeConstructor):
(WebCore::jsWorkerGlobalScopeExposedToWorkerAndWindowConstructorGetter):
(WebCore::jsWorkerGlobalScopeExposedToWorkerAndWindowConstructor):
(WebCore::setJSWorkerGlobalScopeExposedToWorkerAndWindowConstructorSetter):
(WebCore::setJSWorkerGlobalScopeExposedToWorkerAndWindowConstructor):
(WebCore::jsWorkerGlobalScopeTestNodeConstructorGetter):
(WebCore::jsWorkerGlobalScopeTestNodeConstructor):
(WebCore::setJSWorkerGlobalScopeTestNodeConstructorSetter):
(WebCore::setJSWorkerGlobalScopeTestNodeConstructor):
(WebCore::jsWorkerGlobalScopeTestObjectConstructorGetter):
(WebCore::jsWorkerGlobalScopeTestObjectConstructor):
(WebCore::setJSWorkerGlobalScopeTestObjectConstructorSetter):
(WebCore::setJSWorkerGlobalScopeTestObjectConstructor):
(WebCore::jsWorkerGlobalScopeTestPromiseRejectionEventConstructorGetter):
(WebCore::jsWorkerGlobalScopeTestPromiseRejectionEventConstructor):
(WebCore::setJSWorkerGlobalScopeTestPromiseRejectionEventConstructorSetter):
(WebCore::setJSWorkerGlobalScopeTestPromiseRejectionEventConstructor):
(WebCore::JSWorkerGlobalScope::subspaceForImpl):
(WebCore::JSWorkerGlobalScope::analyzeHeap):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSWorkerGlobalScope::toWrapped):

  • bindings/scripts/test/JS/JSWorkerGlobalScope.h: Added.

(WebCore::JSWorkerGlobalScope::create):
(WebCore::JSWorkerGlobalScope::createStructure):
(WebCore::JSWorkerGlobalScope::subspaceFor):
(WebCore::JSWorkerGlobalScope::wrapped const):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSWorkerGlobalScopeConstructors.cpp: Added.
  • bindings/scripts/test/JS/JSWorkerGlobalScopeConstructors.h: Added.
  • bindings/scripts/test/JS/JSWorkletGlobalScope.cpp: Added.

(WebCore::JSWorkletGlobalScopeConstructor::prototypeForStructure):
(WebCore::JSWorkletGlobalScopeConstructor::initializeProperties):
(WebCore::JSWorkletGlobalScopePrototype::finishCreation):
(WebCore::JSWorkletGlobalScope::JSWorkletGlobalScope):
(WebCore::JSWorkletGlobalScope::finishCreation):
(WebCore::JSWorkletGlobalScope::createPrototype):
(WebCore::JSWorkletGlobalScope::prototype):
(WebCore::JSWorkletGlobalScope::getConstructor):
(WebCore::jsWorkletGlobalScopeConstructor):
(WebCore::setJSWorkletGlobalScopeConstructor):
(WebCore::JSWorkletGlobalScope::subspaceForImpl):
(WebCore::JSWorkletGlobalScope::analyzeHeap):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSWorkletGlobalScope::toWrapped):

  • bindings/scripts/test/JS/JSWorkletGlobalScope.h: Added.

(WebCore::JSWorkletGlobalScope::create):
(WebCore::JSWorkletGlobalScope::createStructure):
(WebCore::JSWorkletGlobalScope::subspaceFor):
(WebCore::JSWorkletGlobalScope::wrapped const):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSWorkletGlobalScopeConstructors.cpp: Added.
  • bindings/scripts/test/JS/JSWorkletGlobalScopeConstructors.h: Added.
  • bindings/scripts/test/PaintWorkletGlobalScope.idl: Added.
  • bindings/scripts/test/PaintWorkletGlobalScopeConstructors.idl: Added.
  • bindings/scripts/test/ServiceWorkerGlobalScope.idl: Added.
  • bindings/scripts/test/ServiceWorkerGlobalScopeConstructors.idl: Added.
  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/WorkerGlobalScope.idl: Added.
  • bindings/scripts/test/WorkerGlobalScopeConstructors.idl: Added.
  • bindings/scripts/test/WorkletGlobalScope.idl: Added.
  • bindings/scripts/test/WorkletGlobalScopeConstructors.idl: Added.
  • dom/TextEncoder.idl:

Tools:

Add support to validate global constructor idl file generator.

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.generate_from_idl):
(BindingsTests.generate_supplemental_dependency):
(BindingsTests.main):

9:39 AM Changeset in webkit [266614] by youenn@apple.com
  • 5 edits in trunk

Fix Internals::supportsVCPEncoder on BigSur
https://bugs.webkit.org/show_bug.cgi?id=216174

Reviewed by Eric Carlson.

Source/WebCore:

Fixed by unflaked test.

  • testing/Internals.cpp:

(WebCore::Internals::supportsVCPEncoder):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder-expected.txt:
  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html:

Slight modification to make the test run faster and output more comprehensive error message if error happens.

9:35 AM Changeset in webkit [266613] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] Add client decoder entitlement
https://bugs.webkit.org/show_bug.cgi?id=216175
<rdar://problem/67532128>

Reviewed by Brent Fulgham.

Add client decoder entitlement in the WebContent process on macOS.

  • Scripts/process-entitlements.sh:
9:25 AM Changeset in webkit [266612] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Localization: typo in WAI-ARIA string ("[the] element have")
https://bugs.webkit.org/show_bug.cgi?id=216176

Patch by Patrick Angle <Patrick Angle> on 2020-09-04
Reviewed by Brian Burg.

Resolved auxiliary verb in localizable strings having the wrong pluralization for the singular element.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):

9:11 AM Changeset in webkit [266611] by youenn@apple.com
  • 5 edits
    2 adds in trunk

MediaRecorder timeslice parameter causing internal error on longer videos
https://bugs.webkit.org/show_bug.cgi?id=216076
<rdar://problem/68209422>

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/wpt/fetch/blob-range.html

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::readDataAsync):

Source/WebKit:

Test: http/wpt/fetch/blob-range.html

  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::readData):
readData can be re-entrant so we need to reset m_currentItemReadSize before consuming data.

LayoutTests:

  • http/wpt/fetch/blob-range-expected.txt: Added.
  • http/wpt/fetch/blob-range.html: Added.
8:44 AM Changeset in webkit [266610] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

REGRESSION (r241734): [iOS] Changing the value of a select element and tapping on another results in two changes
https://bugs.webkit.org/show_bug.cgi?id=216077

Reviewed by Darin Adler.

Source/WebKit:

r241734 added a call to [self _endEditing] in
[WKContentView _elementDidBlur] to ensure that any open form controls
are dismissed when using the keyboard to change focus.
[self _endEditing] calls [_inputPeripheral endEditing], which
eventually calls [WKFormControl controlEndEditing].

However, if the focus is changed by tapping on another form control, a
a gesture recognizer calls [_inputPeripheral endEditing]. Consequently,
changing the focused element by tapping results in two calls to
[WKFormControl controlEndEditing]. First from the gesture recognizer,
and then from [WKContentView _elementDidBlur].

For certain form controls on iPhone, such as the select element,
controlEndEditing is responsible for updating the element's value in
the WebProcess. Note that the same is not true on iPad, as
controlEndEditing simply dismisses a popover. Now, the first call to
[WKSelectSinglePicker controlEndEditing] correctly updates the expected
select element. However, when tapping on another select element, the
second call to [WKSelectSinglePicker controlEndEditing] also attempts
to update the value of the focused element. By this time, the focused
element in the WebProcess is the second select element. Consequently,
changing the value in one select element and then tapping another
results in updates to both elements.

To fix this issue, while preserving the intent of r241734, we should
prevent callers from being able to end editing in a control twice. Note
that WKFormPeripheralBase already keeps track of the editing state of a
control in a boolean variable _editing. If the control has finished
being edited, _editing is set to false. This patch adds an early return
to [WKFormPeripheralBase endEditing] if _editing is false, ensuring
controlEndEditing is never called twice. For parity, also ensure that
controlBeginEditing can only be called if the control is not already
being edited.

Test: fast/forms/ios/select-picker-change-and-focus-another-select.html

  • UIProcess/ios/forms/WKFormPeripheralBase.mm:

(-[WKFormPeripheralBase beginEditing]): Early return if control is already being edited.
(-[WKFormPeripheralBase endEditing]): Early return if control is not being edited.

LayoutTests:

  • fast/forms/ios/select-picker-change-and-focus-another-select-expected.txt: Added.
  • fast/forms/ios/select-picker-change-and-focus-another-select.html: Added.
8:23 AM Changeset in webkit [266609] by youenn@apple.com
  • 6 edits in trunk

TextDecoderStreamDecoder.@encoding is broken
https://bugs.webkit.org/show_bug.cgi?id=216169

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/streams/decode-attributes.any-expected.txt:
  • web-platform-tests/encoding/streams/decode-attributes.any.worker-expected.txt:

Source/WebCore:

Binding generator does not support private attributes.
Use a private method instead.
Covered by rebased tests.

  • dom/TextDecoderStream.js:

(initializeTextDecoderStream):

  • dom/TextDecoderStreamDecoder.idl:
8:03 AM Changeset in webkit [266608] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

WebCore::DOMTimerFireState constructor fails to initialize m_initialDOMTreeVersion, m_previous on worker threads
<https://webkit.org/b/216085>

Reviewed by Darin Adler.

  • page/DOMTimer.cpp:

(WebCore::DOMTimerFireState):

  • Reorder instance variables so more logic can be moved into the initializer list.
7:57 AM Changeset in webkit [266607] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[macOS] UI process sometimes crashes under -[WKSharingServicePickerDelegate sharingService:didShareItems:]
https://bugs.webkit.org/show_bug.cgi?id=216167
<rdar://problem/68287449>

Reviewed by Anders Carlsson.

It's not clear what causes the array of items in this delegate method to be empty, but we should at least be
robust against this scenario and avoid crashing the application process.

  • UIProcess/mac/WKSharingServicePickerDelegate.mm:

(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):

7:43 AM Changeset in webkit [266606] by Kate Cheney
  • 4 edits in trunk/Source/WebKit

WebProcessProxy::checkURLReceivedFromWebProcess() does not always need to check the back/forward list
https://bugs.webkit.org/show_bug.cgi?id=216109
<rdar://problem/59867349>

Reviewed by Brady Eidson.

We should not need to check the back/forward list when setting a
pasteboard URL because any valid pasteboard URL will be handled
by one of the other if-statements in
WebProcessProxy::checkURLReceivedFromWebProcess(), therefore checking
again is a waste of time.

This also hardens the process against potential abuse by preventing
the possibility of an invalid URL in the back/forward list being
saved in the pasteboard property list.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::setPasteboardURL):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):

  • UIProcess/WebProcessProxy.h:
7:39 AM Changeset in webkit [266605] by Alan Bujtas
  • 5 edits
    2 moves in trunk/Source/WebCore

[LFC][IFC] Rename LineLayoutContext to LineBuilder
https://bugs.webkit.org/show_bug.cgi?id=216166

Reviewed by Antti Koivisto.

LineLayoutContext builds the line.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineLineBuilder.cpp: Renamed from Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp.

(WebCore::Layout::endsWithSoftWrapOpportunity):
(WebCore::Layout::isAtSoftWrapOpportunity):
(WebCore::Layout::nextWrapOpportunity):
(WebCore::Layout::LineCandidate::InlineContent::runs const):
(WebCore::Layout::LineCandidate::InlineContent::logicalWidth const):
(WebCore::Layout::LineCandidate::InlineContent::trailingLineBreak const):
(WebCore::Layout::LineCandidate::InlineContent::appendLineBreak):
(WebCore::Layout::LineCandidate::InlineContent::setTrailingLineBreak):
(WebCore::Layout::LineCandidate::FloatContent::list const):
(WebCore::Layout::LineCandidate::FloatContent::intrusiveWidth const):
(WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):
(WebCore::Layout::LineCandidate::InlineContent::reset):
(WebCore::Layout::LineCandidate::FloatContent::append):
(WebCore::Layout::LineCandidate::FloatContent::reset):
(WebCore::Layout::LineCandidate::reset):
(WebCore::Layout::LineBuilder::inlineItemWidth const):
(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::nextContentForLine):
(WebCore::Layout::LineBuilder::commitFloats):
(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::commitPartialContent):
(WebCore::Layout::LineBuilder::rebuildLine):

  • layout/inlineformatting/InlineLineBuilder.h: Renamed from Source/WebCore/layout/inlineformatting/LineLayoutContext.h.

(WebCore::Layout::LineBuilder::InlineItemRange::isEmpty const):
(WebCore::Layout::LineBuilder::InlineItemRange::size const):
(WebCore::Layout::LineBuilder::formattingContext const):
(WebCore::Layout::LineBuilder::root const):

6:57 AM Changeset in webkit [266604] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Share bots between JSC builder and tester queues
https://bugs.webkit.org/show_bug.cgi?id=215934

Reviewed by Carlos Alberto Lopez Perez.

  • BuildSlaveSupport/ews-build/config.json:
5:59 AM Changeset in webkit [266603] by Alan Bujtas
  • 10 edits
    2 moves in trunk/Source/WebCore

Rename LineBuilder to Line
https://bugs.webkit.org/show_bug.cgi?id=216165

Reviewed by Antti Koivisto.

This class evolved to the actual line and LineLayoutContext became the LineBuilder.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):

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

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineLine.cpp: Renamed from Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp.

(WebCore::Layout::isWhitespacePreserved):
(WebCore::Layout::Line::Line):
(WebCore::Layout::Line::~Line):
(WebCore::Layout::Line::open):
(WebCore::Layout::Line::clearContent):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::removeTrailingTrimmableContent):
(WebCore::Layout::Line::visuallyCollapsePreWrapOverflowContent):
(WebCore::Layout::Line::moveLogicalLeft):
(WebCore::Layout::Line::moveLogicalRight):
(WebCore::Layout::Line::append):
(WebCore::Layout::Line::appendPartialTrailingTextItem):
(WebCore::Layout::Line::appendWith):
(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendInlineContainerStart):
(WebCore::Layout::Line::appendInlineContainerEnd):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendReplacedInlineBox):
(WebCore::Layout::Line::appendLineBreak):
(WebCore::Layout::Line::isRunVisuallyNonEmpty const):
(WebCore::Layout::Line::formattingContext const):
(WebCore::Layout::Line::TrimmableTrailingContent::TrimmableTrailingContent):
(WebCore::Layout::Line::TrimmableTrailingContent::addFullyTrimmableContent):
(WebCore::Layout::Line::TrimmableTrailingContent::addPartiallyTrimmableContent):
(WebCore::Layout::Line::TrimmableTrailingContent::remove):
(WebCore::Layout::Line::TrimmableTrailingContent::removePartiallyTrimmableContent):
(WebCore::Layout::Line::Run::Run):
(WebCore::Layout::Line::Run::expand):
(WebCore::Layout::Line::Run::hasTrailingLetterSpacing const):
(WebCore::Layout::Line::Run::trailingLetterSpacing const):
(WebCore::Layout::Line::Run::removeTrailingLetterSpacing):
(WebCore::Layout::Line::Run::removeTrailingWhitespace):
(WebCore::Layout::Line::Run::visuallyCollapseTrailingWhitespace):
(WebCore::Layout::Line::Run::setExpansionBehavior):
(WebCore::Layout::Line::Run::expansionBehavior const):
(WebCore::Layout::Line::Run::setHorizontalExpansion):

  • layout/inlineformatting/InlineLine.h: Renamed from Source/WebCore/layout/inlineformatting/InlineLineBuilder.h.

(WebCore::Layout::Line::setHasIntrusiveFloat):
(WebCore::Layout::Line::hasIntrusiveFloat const):
(WebCore::Layout::Line::isVisuallyEmpty const):
(WebCore::Layout::Line::lineLogicalWidth const):
(WebCore::Layout::Line::contentLogicalWidth const):
(WebCore::Layout::Line::availableWidth const):
(WebCore::Layout::Line::trimmableTrailingWidth const):
(WebCore::Layout::Line::isTrailingRunFullyTrimmable const):
(WebCore::Layout::Line::Run::isText const):
(WebCore::Layout::Line::Run::isBox const):
(WebCore::Layout::Line::Run::isLineBreak const):
(WebCore::Layout::Line::Run::isContainerStart const):
(WebCore::Layout::Line::Run::isContainerEnd const):
(WebCore::Layout::Line::Run::layoutBox const):
(WebCore::Layout::Line::Run::style const):
(WebCore::Layout::Line::Run::textContent const):
(WebCore::Layout::Line::Run::logicalWidth const):
(WebCore::Layout::Line::Run::logicalLeft const):
(WebCore::Layout::Line::Run::logicalRight const):
(WebCore::Layout::Line::Run::expansion const):
(WebCore::Layout::Line::Run::hasExpansionOpportunity const):
(WebCore::Layout::Line::Run::expansionOpportunityCount const):
(WebCore::Layout::Line::Run::hasTrailingWhitespace const):
(WebCore::Layout::Line::Run::trailingWhitespaceWidth const):
(WebCore::Layout::Line::Run::moveHorizontally):
(WebCore::Layout::Line::Run::shrinkHorizontally):
(WebCore::Layout::Line::Run::setNeedsHyphen):
(WebCore::Layout::Line::Run::hasCollapsibleTrailingWhitespace const):
(WebCore::Layout::Line::Run::hasCollapsedTrailingWhitespace const):
(WebCore::Layout::Line::runs const):
(WebCore::Layout::Line::contentLogicalRight const):
(WebCore::Layout::Line::TrimmableTrailingContent::width const):
(WebCore::Layout::Line::TrimmableTrailingContent::isEmpty const):
(WebCore::Layout::Line::TrimmableTrailingContent::isTrailingRunFullyTrimmable const):
(WebCore::Layout::Line::TrimmableTrailingContent::isTrailingRunPartiallyTrimmable const):
(WebCore::Layout::Line::TrimmableTrailingContent::reset):
(WebCore::Layout::Line::Run::trailingWhitespaceType const):

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::collectHangingContent):
(WebCore::Layout::horizontalAlignmentOffset):
(WebCore::Layout::LineBox::LineBox):
(WebCore::Layout::LineBox::inlineRectForTextRun const):
(WebCore::Layout::LineBox::constructInlineBoxes):

  • layout/inlineformatting/InlineLineBox.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::layoutInlineContent):
(WebCore::Layout::LineLayoutContext::close):
(WebCore::Layout::LineLayoutContext::commitFloats):
(WebCore::Layout::LineLayoutContext::handleFloatsAndInlineContent):
(WebCore::Layout::LineLayoutContext::commitPartialContent):
(WebCore::Layout::LineLayoutContext::rebuildLine):

  • layout/inlineformatting/LineLayoutContext.h:
5:58 AM Changeset in webkit [266602] by Oriol Brufau
  • 24 edits
    34 adds in trunk/LayoutTests

[css-grid] Import grid tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=216147

LayoutTests/imported/w3c:

Import grid tests from WPT.

Reviewed by Carlos Alberto Lopez Perez.

  • web-platform-tests/css/css-grid/alignment/grid-baseline-align-001-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-baseline-align-001.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-gutters-014-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-gutters-014.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9-expected.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html: Added.
  • web-platform-tests/css/css-grid/alignment/w3c-import.log:
  • web-platform-tests/css/css-grid/grid-definition/grid-auto-explicit-rows-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/grid-definition/grid-auto-explicit-rows-001.html: Added.
  • web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-columns-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-columns-001.html:
  • web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001.html:
  • web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-rows-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-rows-001.html:
  • web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001-expected.html:
  • web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001.html:
  • web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001-expected.html:
  • web-platform-tests/css/css-grid/grid-definition/grid-template-rows-fit-content-001.html:
  • web-platform-tests/css/css-grid/grid-definition/support/testing-utils.js:

(testGridTemplateColumnsRows):

  • web-platform-tests/css/css-grid/grid-definition/w3c-import.log:
  • web-platform-tests/css/css-grid/grid-items/grid-item-flex-container-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-item-flex-container-001.html: Added.
  • web-platform-tests/css/css-grid/grid-items/w3c-import.log:
  • web-platform-tests/css/css-grid/grid-model/grid-gutters-and-tracks-001.html:
  • web-platform-tests/css/css-grid/layout-algorithm/flex-and-intrinsic-sizes-002-expected.xht: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/flex-and-intrinsic-sizes-002.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-003-expected.txt:
  • web-platform-tests/css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-003.html:
  • web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:
  • web-platform-tests/css/css-grid/parsing/grid-template-areas-invalid-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-template-areas-invalid.html:
  • web-platform-tests/css/css-grid/parsing/grid-template-areas-one-cell-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-template-areas-one-cell.html: Added.
  • web-platform-tests/css/css-grid/parsing/w3c-import.log:

LayoutTests:

Reviewed by Carlos Alberto Lopez Perez.

Mark some new tests as failing.

5:57 AM Changeset in webkit [266601] by Adrian Perez de Castro
  • 2 edits in trunk

Unreviewed. [WPE] Bump version numbers

  • Source/cmake/OptionsWPE.cmake:
5:38 AM Changeset in webkit [266600] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Horizontal alignment should move the inline boxes and not the line box
https://bugs.webkit.org/show_bug.cgi?id=216153

Reviewed by Antti Koivisto.

When the "text-align" property triggers horizontal alignment, the line content (inline boxes and runs) should
be moved horizontally while the line box should stay at the initial top/left position.
This patch is also a preparation for making the LineBox more aligned with the spec.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::m_inlineFormattingContext):
(WebCore::Layout::LineBox::inlineRectForTextRun const):
(WebCore::Layout::LineBox::constructInlineBoxes):

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::horizontalAlignmentOffset const):

5:25 AM Changeset in webkit [266599] by Carlos Garcia Campos
  • 2 edits in trunk

Unreviewed. [GTK] Bump version numbers

  • Source/cmake/OptionsGTK.cmake:
5:12 AM Changeset in webkit [266598] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.29.92

WebKitGTK 2.29.92

5:12 AM Changeset in webkit [266597] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.29.92 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.29.92.
4:16 AM Changeset in webkit [266596] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.30

Merge r266584 - [GLIB] Stop using firefox user agent quirk for google docs
https://bugs.webkit.org/show_bug.cgi?id=215845

Reviewed by Adrian Perez de Castro.

Source/WebCore:

It causes problems with the CSP headers when accounts.youtube.com is used by google login and it no longer works
for google docs in any case.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):

Tools:

Update API tests. Bring back UserAgentQuirks.cpp to the build that was removed in r244857.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

4:16 AM Changeset in webkit [266595] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.30

Merge r266297 - [WPE] Enable Notifications support
https://bugs.webkit.org/show_bug.cgi?id=215924

Reviewed by Philippe Normand.

.:

Enable web notifications support for the WPE port. The code is shared with the GTK
port, but as we do not try to find and enable libnotify the default implementation
is a stub: embedders can customize how to display notifications by connecting to
the WebKitWebView:show-notification signal. This way we do not add any additional
build dependencies.

  • Source/cmake/OptionsWPE.cmake: Flip ENABLE_NOTIFICATIONS to ON.

LayoutTests:

  • platform/wpe/TestExpectations: Update test expectations.
4:16 AM Changeset in webkit [266594] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore

Merge r266577 - Unreviewed. [GLIB] Add missing return

There's no change in behavior because jsObjectCall() returns undefined in case of failure, but fixes a memory leak.

  • API/glib/JSCValue.cpp:

(jsc_value_object_invoke_methodv):

4:16 AM Changeset in webkit [266593] by Carlos Garcia Campos
  • 14 edits in releases/WebKitGTK/webkit-2.30

Merge r266576 - [GTK] Unexpected User-Agent on redirect
https://bugs.webkit.org/show_bug.cgi?id=191858

Reviewed by Youenn Fablet.

Source/WebKit:

Clear the user agent on new request after a redirect to ensure a new one is computed taking into account the
quirks if needed. Also ensure quirks are applied for downloads started in the UI process.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Clear the user agent on new request.

  • UIProcess/API/glib/WebKitDownloadClient.cpp:
  • UIProcess/WebPageProxy.h: Add userAgentForURL().
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::download): Use userAgentForURL() instead of userAgent().

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::userAgentForURL): Implement it to apply quirks if needed.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::userAgentForURL): Just return the web page user agent.

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::userAgentForURL): Ditto.

  • UIProcess/playstation/WebPageProxyPlayStation.cpp:

(WebKit::WebPageProxy::userAgentForURL): Ditto.

  • UIProcess/win/WebPageProxyWin.cpp:

(WebKit::WebPageProxy::userAgentForURL): Ditto.

  • UIProcess/wpe/WebPageProxyWPE.cpp:

(WebKit::WebPageProxy::userAgentForURL): Ditto.

Tools:

Add unit tests to check the user agent is sent in headers and preserved after a redirect for both main resource
and subresources.

  • TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:

(serverCallback):
(testDownloadUserAgent):
(beforeAll):

  • TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:

(testUserAgent):
(serverCallback):
(beforeAll):

4:16 AM Changeset in webkit [266592] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebKit

Merge r266389 - [GTK][WPE] Do not use the default WebsiteDataStore for downloads
https://bugs.webkit.org/show_bug.cgi?id=216001

Reviewed by Adrian Perez de Castro.

Use the web context one instead.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextStartDownload):

4:16 AM Changeset in webkit [266591] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.30

Merge r266000 - [GTK][WPE] Debug crashes in backdrop filter tests
https://bugs.webkit.org/show_bug.cgi?id=215209

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2020-08-20
Reviewed by Adrian Perez de Castro.

Source/WebCore:

This only happens in WKTR because RenderLayerCompositor::flushPendingLayerChanges() is called from
RenderLayerCompositor::layerTreeAsText(), so the coordinator doesn't know layers are being flushed and we don't
return early from notifyFlushRequired(). We don't really need to have a coordinator associated to the backdrop
layer, we just need to attach the layer to the coordinator to ensure it's updated.

  • platform/graphics/nicosia/NicosiaAnimation.cpp:

(Nicosia::Animation::applyInternal): Handle AnimatedPropertyWebkitBackdropFilter.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer): Detach also the backdrop layer.
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): Attach the backdrop layer to the
coordinator if there's one.
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers): Do not call this for the
backdrop layer.
(WebCore::CoordinatedGraphicsLayer::invalidateCoordinator): Set coordinator to nullptr.
(WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded): Set the coordinator and attach
the layer. Also attach the backdrop layer.
(WebCore::CoordinatedGraphicsLayer::setCoordinator): Deleted.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Source/WebKit:

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::~CompositingCoordinator): Use invalidateCoordinator() instead of setCoordinator()
that has been removed.
(WebKit::CompositingCoordinator::createGraphicsLayer): Use setCoordinatorIncludingSubLayersIfNeeded() instead of
attaching the layer directly.
(WebKit::CompositingCoordinator::attachLayer): Do not call setCoordinator(), the caller is expected to set the
coordinator.

LayoutTests:

Remove expectations for tests that are now passing.

  • platform/glib/TestExpectations:
4:16 AM Changeset in webkit [266590] by Carlos Garcia Campos
  • 12 edits in releases/WebKitGTK/webkit-2.30/Source

Merge r266388 - [Linux] Web Inspector: show per thread cpu usage
https://bugs.webkit.org/show_bug.cgi?id=215883

Reviewed by Adrian Perez de Castro.

Source/JavaScriptCore:

Remove platform specific getter machThread() and add thread() to return the Thread instead. The caller knows how
to get the machThread or id from a Thread.

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::reportTopBytecodes):
(JSC::SamplingProfiler::machThread): Deleted.

  • runtime/SamplingProfiler.h:

(JSC::SamplingProfiler::thread):

Source/WebCore:

Get per thread CPU usage and information to fill ResourceUsageData in Linux.

  • page/ResourceUsageThread.h:
  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::ResourceUsageThread::platformSaveStateBeforeStarting): Update to new API in SamplingProfiler.

  • page/linux/ResourceUsageThreadLinux.cpp:

(WebCore::ResourceUsageThread::platformSaveStateBeforeStarting): Initialize m_samplingProfilerThreadID.
(WebCore::threadInfoMap):
(WebCore::threadCPUUsage):
(WebCore::collectCPUUsage):
(WebCore::ResourceUsageThread::platformCollectCPUData):
(WebCore::cpuUsage): Deleted.

Source/WTF:

Add API to get the thread ID in Linux platform.

  • wtf/Threading.cpp:

(WTF::Thread::initializeInThread):

  • wtf/Threading.h:

(WTF::Thread::id const):

  • wtf/ThreadingPrimitives.h:
  • wtf/posix/ThreadingPOSIX.cpp:

(WTF::Thread::currentID):

4:16 AM Changeset in webkit [266589] by Carlos Garcia Campos
  • 12 edits in releases/WebKitGTK/webkit-2.30/Source

Merge r266227 - [GTK] Include the run loop source name in frame rendering timeline
https://bugs.webkit.org/show_bug.cgi?id=215847

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Include the given name in rendering frame record data.

  • inspector/TimelineRecordFactory.cpp:

(WebCore::TimelineRecordFactory::createRenderingFrameData):

  • inspector/TimelineRecordFactory.h:
  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::internalStart):

Source/WebInspectorUI:

Show the frame name if present in timeline panel.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/TimelineManager.js:

(WI.TimelineManager.prototype._processRecord):

  • UserInterface/Models/RenderingFrameTimelineRecord.js:

(WI.RenderingFrameTimelineRecord):
(WI.RenderingFrameTimelineRecord.prototype.get name):

  • UserInterface/Views/TimelineTabContentView.js:

(WI.TimelineTabContentView.displayNameForRecord):

Source/WTF:

Pass the run loop source name to the observer.

  • wtf/RunLoop.h:
  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::RunLoop):
(WTF::RunLoop::notify):

4:16 AM WebKitGTK/2.30.x edited by Carlos Garcia Campos
(diff)
4:16 AM Changeset in webkit [266588] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WTF

Merge r266331 - [GTK] REGRESSION(r150392) insufficient space allocation results in heap corruption
https://bugs.webkit.org/show_bug.cgi?id=215976

Patch by Jim Mason <jmason@ibinx.com> on 2020-08-30
Reviewed by Carlos Garcia Campos.

  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::TimerBase::TimerBase):

4:15 AM Changeset in webkit [266587] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.30/Source

Merge r266103 - [GTK] Implement rendering frames timeline panel for GTK+ port
https://bugs.webkit.org/show_bug.cgi?id=150392
<rdar://problem/23200510>

Reviewed by Brian Burg.

Source/WebCore:

Use new RunLoop API to observe the run loop events when the GLib event loop is used.

  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::internalStop):

  • inspector/agents/InspectorTimelineAgent.h:

Source/WTF:

Add API to observe RunLoop events for GLib event loop implementation.

  • wtf/RunLoop.h:
  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::RunLoop): Use RunLoopSource struct and initialize the RunLoop.
(WTF::RunLoop::observe): Add the given observer to the set.
(WTF::RunLoop::notify): Notife observers of the given event.
(WTF::RunLoop::TimerBase::TimerBase): Use RunLoopSource struct and initialize the RunLoop.

4:15 AM Changeset in webkit [266586] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.30

Merge r265940 - REGRESSION(r265856) [GTK][WPE] hybi websockets tests failing
https://bugs.webkit.org/show_bug.cgi?id=215679

Reviewed by Carlos Garcia Campos.

Source/WebKit:

r265856 changed WebSocketChannel to expect AbnormalClosure when the
closing handshake is not received.

Covered by existing tests.

  • NetworkProcess/soup/WebSocketTaskSoup.cpp:

(WebKit::WebSocketTask::didFail):

LayoutTests:

Rebaseline and update expectations.

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/websocket/tests/hybi/close-code-and-reason-expected.txt:
  • platform/glib/http/tests/websocket/tests/hybi/workers/close-code-and-reason-expected.txt:
4:15 AM Changeset in webkit [266585] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.30/Source/WebKit

Merge r265856 - WebSocketChannel::didClose should correctly compute whether a closing handshake was received
https://bugs.webkit.org/show_bug.cgi?id=215644

Reviewed by Darin Adler.

Covered by LayoutTests/http/tests/websocket/tests/hybi/close-code-and-reason.html with NSURLSession code path enabled.

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::didClose):
As noted by Jiten Mehta, absence of closing handshake from the server is notified by WebSocketChannel::CloseEventCodeAbnormalClosure.
Update check accordingly.

4:14 AM Changeset in webkit [266584] by Carlos Garcia Campos
  • 6 edits in trunk

[GLIB] Stop using firefox user agent quirk for google docs
https://bugs.webkit.org/show_bug.cgi?id=215845

Reviewed by Adrian Perez de Castro.

Source/WebCore:

It causes problems with the CSP headers when accounts.youtube.com is used by google login and it no longer works
for google docs in any case.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):

Tools:

Update API tests. Bring back UserAgentQuirks.cpp to the build that was removed in r244857.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

1:31 AM Changeset in webkit [266583] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Update test expectations after r266559.

  • platform/glib/TestExpectations:
1:23 AM Changeset in webkit [266582] by Diego Pino Garcia
  • 3 edits
    1 delete in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Update baselines after r266528.

  • platform/glib/imported/w3c/web-platform-tests/encoding/single-byte-decoder-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/encoding/textdecoder-fatal-single-byte.any-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/encoding/textdecoder-fatal-single-byte.any.worker-expected.txt:
1:05 AM Changeset in webkit [266581] by Alexey Shvayka
  • 4 edits in trunk

Array.prototype.push should always perform Set? in strict mode
https://bugs.webkit.org/show_bug.cgi?id=216121

Reviewed by Darin Adler.

JSTests:

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

Source/JavaScriptCore:

This patch fixes arrayProtoFuncPush() to throw a TypeError if putting an
index beyond UINT32_MAX has failed, aligning JSC with the spec [1], V8,
and SpiderMonkey. Also, refactors the method leveraging putByIndexInline().

Array.prototype.push microbenchmarks, including varargs tests, are neutral.

[1]: https://tc39.es/ecma262/#sec-array.prototype.push (step 5.b)

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncPush):

12:02 AM Changeset in webkit [266580] by James Darpinian
  • 2 edits in trunk/Tools

Update James Darpinian's status to committer
https://bugs.webkit.org/show_bug.cgi?id=216154

Reviewed by Kenneth Russell.

  • Scripts/webkitpy/common/config/contributors.json:
Note: See TracTimeline for information about the timeline view.