Timeline



Dec 9, 2019:

9:02 PM Changeset in webkit [253320] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix the x86_64 probe so that we can get a full stack trace with libunwind and lldb.
https://bugs.webkit.org/show_bug.cgi?id=205050

Reviewed by Michael Saboff.

Before this patch, the stack trace from inside a probe function is cut off at ctiMasmProbeTrampoline:

(lldb) bt

  • thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xbbadbeef)

...
frame #4: 0x0000000100824607 JavaScriptCore`WTF::Function<void (JSC::Probe::Context&)>::operator(this=0x000000010b88bd00, in=0x00007ffeefbfd400)(JSC::Probe::Context&) const at Function.h:79:35
frame #5: 0x0000000100823996 JavaScriptCore`JSC::stdFunctionCallback(context=0x00007ffeefbfd400) at MacroAssembler.cpp:53:5
frame #6: 0x000000010082701e JavaScriptCore`JSC::Probe::executeProbe(state=0x00007ffeefbfd480) at ProbeContext.cpp:51:5
frame #7: 0x000000010082614b JavaScriptCore`ctiMasmProbeTrampoline + 299

(lldb)

After this patch, we'll now get the full stack trace from inside the probe function:

(lldb) bt

  • thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xbbadbeef)

...
frame #4: 0x0000000100826d17 JavaScriptCore`WTF::Function<void (JSC::Probe::Context&)>::operator(this=0x0000000106b878f8, in=0x00007ffeefbfd400)(JSC::Probe::Context&) const at Function.h:79:35
frame #5: 0x0000000100826106 JavaScriptCore`JSC::stdFunctionCallback(context=0x00007ffeefbfd400) at MacroAssembler.cpp:53:5
frame #6: 0x000000010082986e JavaScriptCore`JSC::Probe::executeProbe(state=0x00007ffeefbfd480) at ProbeContext.cpp:51:5
frame #7: 0x00000001008289a2 JavaScriptCore`ctiMasmProbeTrampoline + 338
frame #8: 0x0000466db28025be
frame #9: 0x0000000100754ffc JavaScriptCore`llint_entry at LowLevelInterpreter.asm:994
frame #10: 0x0000000100738173 JavaScriptCore`vmEntryToJavaScript at LowLevelInterpreter64.asm:307
frame #11: 0x0000000101489307 JavaScriptCore`JSC::JITCode::execute(this=0x0000000106ba1520, vm=0x0000000106d00000, protoCallFrame=0x00007ffeefbfd9b8) at JITCodeInlines.h:38:38
frame #12: 0x0000000101488982 JavaScriptCore`JSC::Interpreter::executeProgram(this=0x0000000106bfd1f8, source=0x00007ffeefbff090, (null)=0x000000010d0e0000, thisObj=0x000000010d0e8020) at Interpreter.cpp:847:51
frame #13: 0x00000001017d1f9c JavaScriptCore`JSC::evaluate(globalObject=0x000000010d0e0000, source=0x00007ffeefbff090, thisValue=JSValue @ 0x00007ffeefbfef60, returnedException=0x00007ffeefbff0b0) at Completion.cpp:146:38
frame #14: 0x000000010005838f jsc`runWithOptions(globalObject=0x000000010d0e0000, options=0x00007ffeefbff620, success=0x00007ffeefbff48b) at jsc.cpp:2670:35
frame #15: 0x000000010002a0da jsc`jscmain(this=0x00007ffeefbff5a0, vm=0x0000000106d00000, globalObject=0x000000010d0e0000, success=0x00007ffeefbff48b)::$_6::operator()(JSC::VM&, GlobalObject*, bool&) const at jsc.cpp:3157:13
frame #16: 0x0000000100006eff jsc`int runJSC<jscmain(int, char)::$_6>(options=0x00007ffeefbff620, isWorker=false, func=0x00007ffeefbff5a0)::$_6 const&) at jsc.cpp:3003:9
frame #17: 0x0000000100005988 jsc`jscmain(argc=10, argv=0x00007ffeefbff6c8) at jsc.cpp:3150:18
frame #18: 0x000000010000575e jsc`main(argc=10, argv=0x00007ffeefbff6c8) at jsc.cpp:2498:15
frame #19: 0x00007fff6cfc4da9 libdyld.dylib`start + 1
frame #20: 0x00007fff6cfc4da9 libdyld.dylib`start + 1

(lldb)

The difference is that the x86_64 ctiMasmProbeTrampoline now uses the standard
function prologue, and keeps %rbp pointing to trampoline function's semblance of
a frame that libunwind can understand while it calls the probe function.

  • assembler/MacroAssemblerX86Common.cpp:
8:07 PM Changeset in webkit [253319] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Put CustomGetterSetter and DOMAttributeGetterSetter in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=205044

Reviewed by Sam Weinig.

Put CustomGetterSetter and DOMAttributeGetterSetter in IsoSubspace.

  • runtime/CustomGetterSetter.h:

(JSC::CustomGetterSetter::subspaceFor):

  • runtime/DOMAttributeGetterSetter.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
7:57 PM Changeset in webkit [253318] by ysuzuki@apple.com
  • 8 edits
    2 deletes in trunk/Source/JavaScriptCore

[JSC] Remove NativeStdFunctionCell
https://bugs.webkit.org/show_bug.cgi?id=205045

Reviewed by Sam Weinig.

NativeStdFunctionCell is introduced because we were not able to make derived classes of JSFunction destructible.
But now we can do that by using IsoSubspace. And we already have IsoSubspace for JSNativeStdFunction. So we do
not need to have NativeStdFunctionCell cell. This patch removes it. And making JSNativeStdFunction destructible.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • inspector/InjectedScriptBase.cpp:

(Inspector::InjectedScriptBase::makeAsyncCall):

  • runtime/JSNativeStdFunction.cpp:

(JSC::JSNativeStdFunction::JSNativeStdFunction):
(JSC::JSNativeStdFunction::visitChildren):
(JSC::JSNativeStdFunction::finishCreation):
(JSC::runStdFunction):
(JSC::JSNativeStdFunction::create):

  • runtime/JSNativeStdFunction.h:
  • runtime/NativeStdFunctionCell.cpp: Removed.
  • runtime/NativeStdFunctionCell.h: Removed.
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
6:39 PM Changeset in webkit [253317] by Kocsen Chung
  • 2 edits
    1 add in branches/safari-608-branch/Tools/TestWebKitAPI

Apply patch. rdar://problem/57363565

6:10 PM Changeset in webkit [253316] by eric.carlson@apple.com
  • 10 edits in trunk/Source

Rename media in the GPU process preference
https://bugs.webkit.org/show_bug.cgi?id=205013
<rdar://problem/57755319>

Reviewed by Tim Horton.

Source/WebCore:

  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences useGPUProcessForMedia]):
(-[WebPreferences setUseGPUProcessForMedia:]):
(-[WebPreferences outOfProcessMediaEnabled]): Deleted.
(-[WebPreferences setOutOfProcessMediaEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

5:54 PM Changeset in webkit [253315] by Fujii Hironori
  • 2 edits in trunk/Source/WTF

[MSVC] writeNumberToBufferUnsigned is unsafe for bool type
https://bugs.webkit.org/show_bug.cgi?id=204873

Reviewed by Darin Adler.

MSVC reports warning for using / operator for bool type.

warning C4804: '/': unsafe use of type 'bool' in operation

And, 'bool' isn't expected to be serialized as '0' or '1'. 'bool' isn't supported.

  • wtf/text/IntegerToStringConversion.h: Added a static_assert to ensure UnsignedIntegerType isn't bool.
5:54 PM Changeset in webkit [253314] by Tadeu Zagallo
  • 11 edits
    2 deletes in trunk/Source/JavaScriptCore

[WebAssembly] Remove WasmValidate
https://bugs.webkit.org/show_bug.cgi?id=205037

Reviewed by Saam Barati.

It's currently only used when JSC_useWasmLLInt is false and it creates an additional instantiation
of Wasm::FunctionParser, which adds about 100kb to the binary size. This does not introduce any
behavior changes with the default options, but it means that we'll generate bytecode when calling
WebAssembly.validate/new WebAssembly.Module even when the WasmLLInt is disabled.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::didReceiveFunctionData):

  • wasm/WasmEntryPlan.cpp:
  • wasm/WasmLLIntPlan.cpp:
  • wasm/WasmModule.cpp:

(JSC::Wasm::makeValidationResult):
(JSC::Wasm::makeValidationCallback):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):

  • wasm/WasmModule.h:
  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmPlan.cpp:
  • wasm/WasmValidate.cpp: Removed.
  • wasm/WasmValidate.h: Removed.
5:50 PM Changeset in webkit [253313] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

[WinCairo] Add support of Unicode surrogate pair for simple texts
https://bugs.webkit.org/show_bug.cgi?id=205003

Reviewed by Don Olmstead.

FontCache::systemFallbackForCharacters of Windows port was working
only for BMP because it's using GetFontUnicodeRanges API which
supports only BMP. Use GetCharacterPlacement API to get glyphs for
non-BMP.

GlyphPage::fill of WinCairo port was working only for BMP because
it's using GetGlyphIndices API which supports only BMP. Use
GetCharacterPlacement API to get glyphs for non-BMP.

This change can be tested by pixel tests, but WinCairo port
doesn't include -expected.png files yet. Tested manually.

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::currentFontContainsCharacterNonBMP): Added.
(WebCore::currentFontContainsCharacter): Changed to take a string
instead of a 16bit character.
(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:

(WebCore::GlyphPage::fill): Use GetCharacterPlacement for non-BMP.

5:48 PM Changeset in webkit [253312] by Patrick Griffis
  • 7 edits
    1 copy
    35 adds in trunk/LayoutTests

Import secure cookie tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=204193

Reviewed by Carlos Alberto Lopez Perez.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/cookies/resources/cookie-helper.sub.js: Added.

(credFetch):
(assert_dom_cookie):
(assert_cookie):
(resetSameSiteCookies):
(resetSecureCookies):

  • web-platform-tests/cookies/resources/drop.py: Added.

(main):

  • web-platform-tests/cookies/resources/dropSameSite.py: Added.

(main):

  • web-platform-tests/cookies/resources/dropSecure.py: Added.

(main):

  • web-platform-tests/cookies/resources/echo-cookie.html: Added.
  • web-platform-tests/cookies/resources/echo-json.py: Added.

(main):

  • web-platform-tests/cookies/resources/helpers.py: Added.

(setNoCacheAndCORSHeaders):
(makeCookieHeader):
(makeCookieHeader.makeAV):
(makeDropCookie):
(readParameter):
(readCookies):

  • web-platform-tests/cookies/resources/imgIfMatch.py: Added.

(main):

  • web-platform-tests/cookies/resources/list.py: Added.

(main):

  • web-platform-tests/cookies/resources/postToParent.py: Added.

(main):

  • web-platform-tests/cookies/resources/redirectWithCORSHeaders.py: Added.

(main):

  • web-platform-tests/cookies/resources/set-cookie.py: Added.

(main):

  • web-platform-tests/cookies/resources/set.py: Added.

(main):

  • web-platform-tests/cookies/resources/setSameSite.py: Added.

(main):

  • web-platform-tests/cookies/resources/setSecure.py: Added.

(main):

  • web-platform-tests/cookies/resources/testharness-helpers.js: Added.

(executeNextTest):
(executeTestsSerially):

  • web-platform-tests/cookies/secure/set-from-dom.https.sub-expected.txt: Added.
  • web-platform-tests/cookies/secure/set-from-dom.https.sub.html: Added.
  • web-platform-tests/cookies/secure/set-from-dom.sub-expected.txt: Added.
  • web-platform-tests/cookies/secure/set-from-dom.sub.html: Added.
  • web-platform-tests/cookies/secure/set-from-http.https.sub-expected.txt: Added.
  • web-platform-tests/cookies/secure/set-from-http.https.sub.html: Added.
  • web-platform-tests/cookies/secure/set-from-http.https.sub.html.headers: Added.
  • web-platform-tests/cookies/secure/set-from-http.sub-expected.txt: Added.
  • web-platform-tests/cookies/secure/set-from-http.sub.html: Added.
  • web-platform-tests/cookies/secure/set-from-http.sub.html.headers: Added.
  • web-platform-tests/cookies/secure/set-from-ws.sub-expected.txt: Added.
  • web-platform-tests/cookies/secure/set-from-ws.sub.html: Added.
  • web-platform-tests/cookies/secure/set-from-wss.https.sub-expected.txt: Added.
  • web-platform-tests/cookies/secure/set-from-wss.https.sub.html: Added.

LayoutTests:

Mark newly imported test as failing.
Pending fix for WPE/GTK in webkit.org/b/169356

  • platform/gtk/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/wpe/TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/content-security-policy/reporting/report-same-origin-with-cookies-expected.txt: Added.
5:12 PM Changeset in webkit [253311] by Jonathan Bedard
  • 2 edits in trunk/Tools

test-webkitpy: Remove --<configuration> flags from CI
https://bugs.webkit.org/show_bug.cgi?id=205016

Reviewed by Stephanie Lewis.

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunPythonTests): Remove --debug/--release flags to test-webkitpy.

4:57 PM Changeset in webkit [253310] by Simon Fraser
  • 3 edits in trunk/LayoutTests

compositing/video/video-border-radius-clipping.html is a flaky Image Failure
https://bugs.webkit.org/show_bug.cgi?id=204951
rdar://problem/57703078

Unreviewed test gardening. Make the test seek so we have a higher chance
of getting a video frame. It's apparently impossible to know when we have
a frame for ref testing.

  • compositing/video/video-border-radius-clipping-expected.html:
  • compositing/video/video-border-radius-clipping.html:
4:53 PM Changeset in webkit [253309] by Megan Gardner
  • 10 edits
    2 adds in trunk

Fill HighlightRangeGroup and HighlightMap with values from JavaScript
https://bugs.webkit.org/show_bug.cgi?id=204934
Source/WebCore:

rdar://problem/57686335

Reviewed by Simon Fraser.

Fillout HighlightMap and HighlightRangeGroup with the information that we're passed from
the JavaScript side. Make sure that the javascript objects are filled out correctly.

Test: highlight/highlight-map-and-group.html

  • Modules/highlight/HighlightMap.cpp:

(WebCore::HighlightMap::synchronizeBackingMap):
(WebCore::HighlightMap::setFromMapLike):
(WebCore::HighlightMap::clear):
(WebCore::HighlightMap::remove):
(WebCore::HighlightMap::getGroupForStyle):
(WebCore::HighlightMap::addHighlightGroup): Deleted.
(WebCore::HighlightMap::namedItem const): Deleted.
(WebCore::HighlightMap::setNamedItem): Deleted.
(WebCore::HighlightMap::deleteNamedProperty): Deleted.

  • Modules/highlight/HighlightMap.h:

(WebCore::HighlightMap::backingMap):
(WebCore::HighlightMap::synchronizeBackingMap): Deleted.
(WebCore::HighlightMap::clear): Deleted.

  • Modules/highlight/HighlightMap.idl:
  • Modules/highlight/HighlightRangeGroup.cpp:

(WebCore::HighlightRangeGroup::HighlightRangeGroup):
(WebCore::HighlightRangeGroup::initializeSetLike):
(WebCore::HighlightRangeGroup::removeFromSetLike):
(WebCore::HighlightRangeGroup::clearFromSetLike):
(WebCore::HighlightRangeGroup::addToSetLike):
(WebCore::HighlightRangeGroup::addRange): Deleted.
(WebCore::HighlightRangeGroup::removeRange): Deleted.
(WebCore::HighlightRangeGroup::Iterator::Iterator): Deleted.
(WebCore::HighlightRangeGroup::Iterator::next): Deleted.

  • Modules/highlight/HighlightRangeGroup.h:

(WebCore::HighlightRangeGroup::ranges const):
(): Deleted.
(WebCore::HighlightRangeGroup::createIterator): Deleted.

  • Modules/highlight/HighlightRangeGroup.idl:
  • dom/StaticRange.cpp:

(WebCore::StaticRange::operator== const):

  • dom/StaticRange.h:

LayoutTests:

Reviewed by Simon Fraser.

  • highlight/highlight-map-and-group-expected.txt: Added.
  • highlight/highlight-map-and-group.html: Added.
4:47 PM Changeset in webkit [253308] by Truitt Savell
  • 29 edits
    4 deletes in trunk

Unreviewed, rolling out r253299.

Casued 30+ imported/ test failures on Mac wk2

Reverted changeset:

"Throttling requestAnimationFrame should be controlled by
RenderingUpdateScheduler"
https://bugs.webkit.org/show_bug.cgi?id=204713
https://trac.webkit.org/changeset/253299

4:43 PM Changeset in webkit [253307] by Alan Coon
  • 8 edits in trunk/Source

Versioning.

4:38 PM Changeset in webkit [253306] by Alan Coon
  • 3 edits
    1 add in branches/safari-609.1.12-branch

Cherry-pick r253280. rdar://problem/57733405

[WebAssembly] Fix LLIntGenerator's checkConsistency contract
https://bugs.webkit.org/show_bug.cgi?id=204998
<rdar://problem/57733405>

Reviewed by Mark Lam.

JSTests:

  • wasm/regress/stack-consistency.js: Added.

Source/JavaScriptCore:

We check the consistency of the WebAssembly parser's expression stack every time the LLIntGenerator calls
push to allocate a new stack value. However, if we call push more than once (e.g. in a loop), the stack
is no longer consistent, since those values have not yet been placed in the parser's expression stack, so
the generator and parser's stacks are out of sync. Instead, whenever we need to push multiple values, we
should first manually call checkConsistency before any pushes, and all pushes after that should be replaced
with push(NoConsistencyCheck).

  • wasm/WasmLLIntGenerator.cpp: (JSC::Wasm::LLIntGenerator::callInformationForCaller): (JSC::Wasm::LLIntGenerator::addArguments): (JSC::Wasm::LLIntGenerator::addLocal):

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

4:08 PM Changeset in webkit [253305] by Alan Coon
  • 1 copy in branches/safari-609.1.12-branch

New branch.

3:39 PM Changeset in webkit [253304] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

Regression(r249329) ViewGestureController::requestRenderTreeSizeNotificationIfNeeded() sometimes uses wrong webPageID for IPC
https://bugs.webkit.org/show_bug.cgi?id=205012

Reviewed by Tim Horton.

  • UIProcess/InspectorTargetProxy.cpp:

(WebKit::InspectorTargetProxy::connect):
(WebKit::InspectorTargetProxy::disconnect):
(WebKit::InspectorTargetProxy::sendMessageToTargetBackend):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::initializeWebPage):
(WebKit::ProvisionalPageProxy::goToBackForwardItem):
(WebKit::ProvisionalPageProxy::messageSenderConnection const):
(WebKit::ProvisionalPageProxy::messageSenderDestinationID const):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::SuspendedPageProxy):
(WebKit::SuspendedPageProxy::unsuspend):
(WebKit::SuspendedPageProxy::close):
(WebKit::SuspendedPageProxy::messageSenderConnection const):
(WebKit::SuspendedPageProxy::messageSenderDestinationID const):

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

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Have SuspendedPageProxy & ProvisionalPageProxy subclass IPC::MessageSender so that we can call send()
on them without having to pass in a PageIdentifier. Passing a PageIdentifier was error-prone.

  • UIProcess/ViewGestureController.cpp:

(WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded):
When there was a provisonal page proxy, we would properly send the IPC to the provisional page's process
but would use the wrong PageIdentifier for the IPC. We would use the identifier of the committed WebPage
instead of the one of the provisional WebPage.

3:23 PM Changeset in webkit [253303] by Tadeu Zagallo
  • 3 edits
    1 add in trunk

REGRESSION(r253140): WebAssembly validation should check for unmatched else before calling addElse/addElseToUnreachable
https://bugs.webkit.org/show_bug.cgi?id=205022
<rdar://problem/57748159>

Reviewed by Saam Barati.

JSTests:

  • wasm/regress/unmatched-else.js: Added.

(catch):

Source/JavaScriptCore:

When moving the validation code into the parser in r253140, I missed the validation check of whether
an if block was at the top of the control stack before calling addElse/addElseToUnreachable.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

2:53 PM Changeset in webkit [253302] by Wenson Hsieh
  • 14 edits in trunk

Finish encoding/decoding support for DisplayList::SetState
https://bugs.webkit.org/show_bug.cgi?id=205018

Reviewed by Tim Horton.

Source/WebCore:

Finishes encoding and decoding support for the SetState display list item. See below for more details.

  • platform/graphics/Gradient.h:

(WebCore::Gradient::ColorStop::encode const):
(WebCore::Gradient::ColorStop::decode):
(WebCore::Gradient::LinearData::encode const):
(WebCore::Gradient::LinearData::decode):
(WebCore::Gradient::RadialData::encode const):
(WebCore::Gradient::RadialData::decode):
(WebCore::Gradient::ConicData::encode const):
(WebCore::Gradient::ConicData::decode):
(WebCore::Gradient::encode const):
(WebCore::Gradient::decode):

Introduce encoding and decoding support for WebCore::Gradient, and all of its constituent data members.

  • platform/graphics/GraphicsContext.h:

Remove ShadowColorChange, which was unused; instead, shadow color changes are indicated by the ShadowChange
flag, which also encompasses shadow offset and blur.

  • platform/graphics/Image.h:

Move DisplayList::ImageHandle to ImageHandle in Image.h, so that it can be referenced in the encode/decode
methods of WebCore::Pattern.

  • platform/graphics/Pattern.h:

(WebCore::Pattern::encode const):
(WebCore::Pattern::decode):

Introduce encoding and decoding support for WebCore::Pattern.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::FillRectWithGradient::FillRectWithGradient):

Implement encode and decode for FillRectWithGradient, now that we're able to encode and decode Gradients.

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetState::encode const):
(WebCore::DisplayList::SetState::decode):

Encode the remaining data members of a GraphicsContextStateChange's state. These are: strokeGradient,
strokePattern, fillGradient, fillPattern, shadowOffset, shadowBlur, shadowColor (which was not previously being
encoded due to ShadowColorChange never being set), strokeThickness, textDrawingMode, strokeStyle, fillRule,
compositeOperator, blendMode, imageInterpolationQuality, shouldAntialias, shouldSmoothFonts,
shouldSubpixelQuantizeFonts and shadowsIgnoreTransforms.

(WebCore::DisplayList::FillRectWithGradient::encode const):
(WebCore::DisplayList::FillRectWithGradient::decode):
(WebCore::DisplayList::Item::encode const):
(WebCore::DisplayList::Item::decode):
(WebCore::DisplayList::FillRectWithGradient::FillRectWithGradient): Deleted.

Source/WebKit:

Replaces WebCore::DisplayList::ImageHandle with just WebCore::ImageHandle. See WebCore ChangeLog for more
details.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ImageHandle>::encode):
(IPC::ArgumentCoder<ImageHandle>::decode):
(IPC::ArgumentCoder<DisplayList::ImageHandle>::encode): Deleted.
(IPC::ArgumentCoder<DisplayList::ImageHandle>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:

LayoutTests:

Rebaseline several display list layout tests.

  • displaylists/layer-dispay-list-expected.txt:
  • platform/mac-wk1/displaylists/extent-includes-shadow-expected.txt:
  • platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt:
2:19 PM Changeset in webkit [253301] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for word-break: break-word (and overflow-wrap)
https://bugs.webkit.org/show_bug.cgi?id=205024
<rdar://problem/57766087>

Reviewed by Antti Koivisto.

isTextSplitAtArbitraryPositionAllowed() returns true if the text content can just split anywhere.
word-break: break-word behaves like that unless the line already has breaking opportunity.
See https://www.w3.org/TR/css-text-3/#word-break-property

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::isTextContentWrappingAllowed):
(WebCore::Layout::isContentSplitAllowed):
(WebCore::Layout::isTextSplitAtArbitraryPositionAllowed):
(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::wordBreakingBehavior const):
(WebCore::Layout::LineBreaker::tryBreakingTextRun const):
(WebCore::Layout::isContentWrappingAllowed): Deleted.

  • layout/inlineformatting/InlineLineBreaker.h:
1:42 PM Changeset in webkit [253300] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Stop active DOM objects in removedLastRef
https://bugs.webkit.org/show_bug.cgi?id=204975

Reviewed by Antti Koivisto.

Always stop active DOM objects before reaching the destructor.

  • dom/Document.cpp:

(WebCore::Document::~Document):
(WebCore::Document::removedLastRef):
(WebCore::Document::commonTeardown):
(WebCore::Document::prepareForDestruction):

1:12 PM Changeset in webkit [253299] by commit-queue@webkit.org
  • 29 edits
    4 adds in trunk

Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler
https://bugs.webkit.org/show_bug.cgi?id=204713

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-12-09
Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/animation/request-animation-frame-throttling-outside-viewport.html

requestAnimationFrame is throttled by a timer although its callback are
serviced by the page RenderingUpdate. This led to excessive rAF firing
which makes it more than the preferred frame per seconds.

The solution is to have two throttling types:

1) Page throttling (or full throttling) which slows down all the steps of

RenderingUpdate for the main document and all the sub-documents.

2) Document throttling (or partial throttling) which only slows down the

rAF of a certain document.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::animationInterval const):
(WebCore::DocumentTimeline::updateThrottlingState): Deleted.

  • animation/DocumentTimeline.h:

There is no need to have DocumentTimeline throttling. It is throttled
when the page RenderingUpdate is throttled.

  • dom/Document.cpp:

(WebCore::Document::requestAnimationFrame):
(WebCore::Document::updateLastHandledUserGestureTimestamp):
LowPowerMode throttling is now handled by the page. So remove its handling
in the Document side.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::page const):
(WebCore::ScriptedAnimationController::interval const):
(WebCore::ScriptedAnimationController::isThrottled const):
(WebCore::ScriptedAnimationController::registerCallback):
(WebCore::ScriptedAnimationController::cancelCallback):
(WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::throttlingReasonToString): Deleted.
(WebCore::throttlingReasonsToString): Deleted.
(WebCore::ScriptedAnimationController::addThrottlingReason): Deleted.
(WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted.
(WebCore::ScriptedAnimationController::animationTimerFired): Deleted.

  • dom/ScriptedAnimationController.h:

(WebCore::ScriptedAnimationController::addThrottlingReason):
(WebCore::ScriptedAnimationController::removeThrottlingReason):
Get rid of the rAF throttling timer. Service the rAF callback only when
the period from the current time stamp till the last service time stamp
is greater than the preferred rAF interval .

  • page/FrameView.cpp:

(WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
ThrottlingReason is now defined outside ScriptedAnimationController.

  • page/Page.cpp:

(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):
Use forEachDocument().

(WebCore::Page::preferredRenderingUpdateInterval const):
Calculate the preferred RenderingUpdate interval from the throttling
reasons.

(WebCore::Page::setIsVisuallyIdleInternal):
(WebCore::Page::handleLowModePowerChange):
Call adjustRenderingUpdateFrequency() when isLowPowerModeEnabled or
IsVisuallyIdle is toggled.

(WebCore::updateScriptedAnimationsThrottlingReason): Deleted.

  • page/Page.h:

(WebCore::Page::isRenderingUpdateThrottled const):

  • page/RenderingUpdateScheduler.cpp:

(WebCore::RenderingUpdateScheduler::adjustFramesPerSecond):
(WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency):
Change the preferredFramesPerSecond of the DisplayRefreshMonitor if the
throttling is not aggressive e.g. 10_s. Otherwise use the timer.

(WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
Call adjustFramesPerSecond() when DisplayRefreshMonitor is created.

(WebCore::RenderingUpdateScheduler::startTimer):

  • page/RenderingUpdateScheduler.h:
  • platform/graphics/AnimationFrameRate.h: Added.

(WebCore::preferredFrameInterval):
(WebCore::preferredFramesPerSecond):

  • platform/graphics/DisplayRefreshMonitor.h:

(WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond):

  • platform/graphics/DisplayRefreshMonitorManager.cpp:

(WebCore::DisplayRefreshMonitorManager::monitorForClient):
Rename createMonitorForClient() to monitorForClient() since it may return
a cached DisplayRefreshMonitor.

(WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond):
(WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
No need to call registerClient(). This function was just ensuring the
DisplayRefreshMonitor is created. scheduleAnimation() does the same thing.

(WebCore::DisplayRefreshMonitorManager::createMonitorForClient): Deleted.
(WebCore::DisplayRefreshMonitorManager::registerClient): Deleted.

  • platform/graphics/DisplayRefreshMonitorManager.h:

(WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager): Deleted.

  • platform/graphics/GraphicsLayerUpdater.cpp:

(WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):

  • platform/graphics/ios/DisplayRefreshMonitorIOS.mm:

(-[WebDisplayLinkHandler setPreferredFramesPerSecond:]):
Set the preferredFramesPerSecond of the CADisplayLink.

Source/WebKit:

Create an IPC message on the DrawingArea to send a message from the
WebProcess to the UIProcess to setPreferredFramesPerSecond of the
DisplayRefreshMonitor.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(-[WKOneShotDisplayLinkHandler setPreferredFramesPerSecond:]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::setPreferredFramesPerSecond):
Set the preferredFramesPerSecond of the CADisplayLink.

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:

(WebKit::RemoteLayerTreeDisplayRefreshMonitor::setPreferredFramesPerSecond):
Delegate the call to RemoteLayerTreeDrawingArea.

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::setPreferredFramesPerSecond):
Send the IPC message from the WebProcess to the UIProcess.

LayoutTests:

  • fast/animation/request-animation-frame-throttling-outside-viewport-expected.txt: Added.
  • fast/animation/request-animation-frame-throttling-outside-viewport.html: Added.
  • fast/animation/request-animation-frame-throttling-lowPowerMode-expected.txt:
  • fast/animation/request-animation-frame-throttling-lowPowerMode.html:
  • fast/animation/resources/frame-with-animation-2.html: Added.
12:51 PM Changeset in webkit [253298] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

GetByIdVariant::dumpInContext() should not ref UniqueStringImpls.
https://bugs.webkit.org/show_bug.cgi?id=205023
<rdar://problem/57747265>

Reviewed by Saam Barati.

This is because GetByIdVariant::dumpInContext() may be called from the compiler
thread. GetByIdVariant::dumpInContext() inadvertently invoking the String copy
constructor on an Identifier, which in turn, refs the underlying UniqueStringImpl.
This results in a race against the mutator to adjust the refCount.

The fix is to have GetByIdVariant::dumpInContext() print the underlying
StringImpl instead of the Identifier itself.

  • bytecode/GetByIdVariant.cpp:

(JSC::GetByIdVariant::dumpInContext const):

12:05 PM Changeset in webkit [253297] by youenn@apple.com
  • 7 edits
    6 adds in trunk

NetworkResourceLoader should consume its sandbox extensions when starting a fetch through service worker
https://bugs.webkit.org/show_bug.cgi?id=204883
<rdar://problem/57568535>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Allow http/wpt tests to use LayoutTests/resources files.

  • resources/config.json:

Source/WebKit:

Consume sandbox extensions in network process before sending fetch task to service worker.
This makes sure network process can send proper sandbox extensions to the service worker and it also ensures
it will have the necessary rights to access the file if the fetch task is not handled by service worker.
Test: http/wpt/service-workers/file-upload.html

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::consumeSandboxExtensionsIfNeeded):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::startFetch):

LayoutTests:

  • http/tests/resources/create-temp-file-iframe.html: Added.
  • http/tests/resources/delete-temp-file-iframe.html: Added.
  • http/wpt/service-workers/file-upload-check.py: Added.
  • http/wpt/service-workers/file-upload-expected.txt: Added.
  • http/wpt/service-workers/file-upload-worker.js: Added.
  • http/wpt/service-workers/file-upload.html: Added.
11:23 AM Changeset in webkit [253296] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, speculative tvOS build fix after r253231.

  • platform/ios/WebCoreMotionManager.mm:

(-[WebCoreMotionManager sendMotionData:withHeading:]):

10:37 AM Changeset in webkit [253295] by Truitt Savell
  • 2 edits in trunk/LayoutTests

(r252889) webrtc/peerconnection-page-cache.html is crashing on iOS Debug
https://bugs.webkit.org/show_bug.cgi?id=205017

Unreviewed test gardening.

  • platform/ios/TestExpectations:
10:34 AM Changeset in webkit [253294] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] fix fast/text/simple-lines-multiple-renderers-break.html
https://bugs.webkit.org/show_bug.cgi?id=205014
<rdar://problem/57756348>

Reviewed by Antti Koivisto.

When dealing with series of runs (<span>text</span><span>content</span>) a partial content does not
necessarily mean partial runs. The content can actually be split right at a run boundary.
In such cases we have a partial trailing content but not a partial trailing run.

This patch also covers the case when the overflown run can't be split and
we attempt to find a previous breakable run (in the list of candidate runs).
Since it's guaranteed (with the FIXME of the extremely long hyphen) that all the previous runs fit the line,
we just pass in an infinite available width to LineBreaker::tryBreakingTextRun indicating that we only look for the last breakable position.

e.g. <span style="word-break: break-all">breakable</span><span>and</span><span>longandunbreakablecontent</span>
[breakable][and][longandunbreakablecontent] <- we try to commit this continuous list of runs
[longandunbreakablecontent] <- does not fit so let's go back to the previous runs to see if any of them can be split -> [breakableand].
result:
breakable
andlongandunbreakablecontent

  • layout/inlineformatting/InlineFormattingContext.cpp:

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

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::wordBreakingBehavior const):
(WebCore::Layout::LineBreaker::tryBreakingTextRun const):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::processUncommittedContent):

  • layout/inlineformatting/LineLayoutContext.h:
10:34 AM Changeset in webkit [253293] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the macCatalyst build after r253267

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

10:00 AM Changeset in webkit [253292] by achristensen@apple.com
  • 9 edits in trunk

Re-disable TLS1.0 and TLS1.1 by default
https://bugs.webkit.org/show_bug.cgi?id=204922
<rdar://problem/57677752>

Reviewed by Youenn Fablet.

Source/WebKit:

Covered by updated API tests.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

Tools:

  • TestWebKitAPI/TCPServer.cpp:

(TestWebKitAPI::TCPServer::respondWithOK):

  • TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:

(TestWebKitAPI::TEST):
(TestWebKitAPI::getWebSocketEventWebKitLegacy):

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

Unreviewed, fix debug assertion for ApplePay API tests on iOS after r253277.

Disable server preconnect if the load will be handled by the LegacyCustomProtocolManager.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::preconnectTo):

9:12 AM Changeset in webkit [253290] by Darin Adler
  • 31 edits
    1 delete in trunk/Source

Streamline PODIntervalTree code and remove ValueToString
https://bugs.webkit.org/show_bug.cgi?id=199782

Reviewed by Anders Carlsson.

Source/WebCore:

  • dom/Element.cpp: Updated includes.
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests const): Moved this
function out of line so we don't have to include PODIntervalTree.h in the header.
But also, it's only used inside this file. Also updated for m_cueData.
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): More of the same.
(WebCore::HTMLMediaElement::textTrackAddCue): Ditto.
(WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto.
(WebCore::HTMLMediaElement::currentlyActiveCues const): Ditto.

  • html/HTMLMediaElement.h: Changed to not include PODIntervalTree.h, which in turn

includes PODRedBlackTree.h, to significantly cut down how many times we have to
compile those headers. Moved some functions out of line. Made m_cueData to hold the
two cue-related objects so they don't have to be defined in the header. Also
removed ValueToString specializations.

  • html/track/TextTrackCue.cpp:

(WebCore::operator<<): Added debug-only overload of TextStream operator.
(WebCore::TextTrackCue::debugString const): Deleted.

  • html/track/TextTrackCue.h: Updated for the above.
  • html/track/VTTCue.h: Added comments about the incorrect implementation of

isType for VTTCue. Tweaked formatting a bit as well.

  • platform/LayoutUnit.h: Removed ValueToString specialization.
  • platform/PODInterval.h: Use #pragma once. Removed inaccurate comments

saying this works only with POD. Use TextStream instead of ValueToString.
Added overloads to the constructor so we can do move semantics instead of
copy semantics, slightly better for WeakPtr. Removed the toString function
and added an overload of operator<< with TextStream. Use "{ }" instead of
"0" as the default value for user data.

  • platform/PODIntervalTree.h: Removed unneeded includes and unusual default

argument types for the templates. Changed setNeedsFullOrderingComparisons
and node updating to use template arguments instead of virtual functions
and runtime setters. This allowed removal of the constructor and the init
function since the defaults take care of both. Removed the overload of
the allOverlaps function that uses an out argument. Removed unneeded use
of WTF_MAKE_NONCOPYABLE. Use "{ }" instead of 0 for the default value
for user data. Changed the createInterval function to use move semantics.
Changed the nextIntervalAfter function to just take a point, not require
and interval and use its high point. The PODIntervalTree::updateNode
function is replaced with the PODIntervalNodeUpdater::update function.
Removed the ValueToString use and the overriding as well and replaced
with TextStream use.

  • platform/PODRedBlackTree.h: Updated comments to reflect the fact

that this is not specific to POD and uses TextStream. Also that the
needsFullOrderingComparisons technique is now a template argument.
Use pragma once. Added FIXME about a few major improvements we should
make.
(WebCore::PODRedBlackTree::~PODRedBlackTree): Made non-virtual since
we use template arguments for polymorphism and don't need virtual
functions too.
(WebCore::PODRedBlackTree::clear): Rewrote to use a non-recursive
algorithm to delete the tree nodes.
(WebCore::PODRedBlackTree::add): Added an overload that takes an
rvalue reference for move semantics.
(WebCore::PODRedBlackTree::visitInorder const): Deleted.
(WebCore::PODRedBlackTree::size const): Deleted.
(WebCore::PODRedBlackTree::isEmpty const): Replaced the inefficiently
implemented size function with this much faster function. Could have
also made a more efficient size function, but no client needs it.
(WebCore::PODRedBlackTree::setNeedsFullOrderingComparisons): Deleted.
(WebCore::PODRedBlackTree::checkInvariants const): Made non-virtual
since there is no need for polymorphism.
(WebCore::PODRedBlackTree::Node::Node): Use rvalue reference and
move semantics.
(WebCore::PODRedBlackTree::Node::copyFrom): Deleted.
(WebCore::PODRedBlackTree::Node::moveDataFrom): Use move instead of
copy. Also removed the gratuitous use of virtual.
(WebCore::PODRedBlackTree::updateNode): Made non-virtual and instead
call through the NodeUpdaterType (actually more like "traits").
(WebCore::PODRedBlackTree::treeSearch const): Use template argument
instead of data member.
(WebCore::PODRedBlackTree::treeSuccessor): Made a static member function.
(WebCore::PODRedBlackTree::treeMinimum): Ditto.
(WebCore::PODRedBlackTree::treeSuccessorInPostOrder): Added. Useful
when deleting the tree so we visit children before deleting the parent.
(WebCore::PODRedBlackTree::deleteNode): Use moveDataFrom when moving
the data from a node that we are about to delete.
(WebCore::PODRedBlackTree::visitInorderImpl const): Deleted.
(WebCore::PODRedBlackTree::markFree): Deleted.
(WebCore::PODRedBlackTree::Counter): Deleted.
(WebCore::PODRedBlackTree::dumpFromNode const): Use TextStream.

  • platform/graphics/FloatPolygon.cpp:

(WebCore::FloatPolygon::FloatPolygon): Tweaked coding style a bit.
(WebCore::FloatPolygon::overlappingEdges const): Changed to use a return
value instead of an out argument. Also tweaked coding style a bit.
(WebCore::FloatPolygonEdge::debugString const): Deleted.
(WebCore::ooperator>>): Implemented TextStream overload.

  • platform/graphics/FloatPolygon.h: Updated for above, removed

ValueToString specialization.

  • rendering/FloatingObjects.cpp:

(WebCore::FloatingObject::debugString const): Deleted.
(WebCore::operator<<): Implemented TextStream overload.

  • rendering/FloatingObjects.h: Ditto. Also removed include of

PODIntervalTree.h and used a forward declaration instead.

  • rendering/RenderBlock.cpp: Updated includes.
  • rendering/RenderFragmentContainer.cpp:

(WebCore::RenderFragmentContainer::debugString const): Deleted.
(WebCore::operator<<): Implemented TextStream overload.

  • rendering/RenderFragmentContainer.h: Ditto.
  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::FragmentSearchAdapter::FragmentSearchAdapter):
Moved this class here from the header, moving the one function body that was
already here up in the file.
(WebCore::RenderFragmentedFlow::fragmentAtBlockOffset const): Refactored and
tweaked code sequence a bit, did not change logic.
(WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):
Tweaked code style a bit.

  • rendering/RenderFragmentedFlow.h: Moved FragmentSearchAdapter out of the

header, and tweaked coding style a bit. Removed ValueToString specialization.

  • rendering/shapes/PolygonShape.cpp:

(WebCore::PolygonShape::getExcludedInterval const): Updated to use the
return value from the overlappingEdges function rather than an out argument.

  • rendering/updating/RenderTreeBuilder.cpp: Updated includes.
  • rendering/updating/RenderTreeBuilderFirstLetter.h: Updated forward declarations.
  • rendering/updating/RenderTreeBuilderMultiColumn.cpp: Updated includes.
  • rendering/updating/RenderTreePosition.h: Removed includes of

RenderFragmentedFlow.h, RenderText.h, and RenderView.h, since none are
needed by this header.

  • rendering/updating/RenderTreeUpdater.cpp: Updated includes.

Source/WTF:

  • WTF.xcodeproj/project.pbxproj: Remove ValueToString.h.
  • wtf/CMakeLists.txt: Ditto.
  • wtf/MediaTime.cpp:

(WTF::operator<<): Implement debug-only TextStream serialization
based on toJSONString.

  • wtf/MediaTime.h: Ditto.
  • wtf/text/ValueToString.h: Removed.
8:41 AM Changeset in webkit [253289] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Do not create PartialContent for a single character run when it does not fit.
https://bugs.webkit.org/show_bug.cgi?id=205010
<rdar://problem/57752705>

Reviewed by Antti Koivisto.

Use ContentWrappingRule::Keep instead of ContentWrappingRule::Split when dealing with single character overflown runs on empty lines.
<div style="width: 0px; word-break: break-all">text</div> <- produces single character runs.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContextForInlineContent):

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::left const):
(WebCore::Layout::InlineTextItem::right const):

7:36 AM Changeset in webkit [253288] by youenn@apple.com
  • 20 edits
    2 adds in trunk

Add an option to capture audio in GPU process
https://bugs.webkit.org/show_bug.cgi?id=205007

Reviewed by Eric Carlson.

Source/WebCore:

Add JS console logging of error when trying to create a MediaStream.
Test: fast/mediastream/captureAudioInGPUProcess.html

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::allow):

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::createMediaStream):

  • platform/mediastream/RealtimeMediaSourceCenter.h:

Source/WebKit:

Add a flag to make audio capture in GPU process.
In WebProcess, if trying to capture through GPUProcess, send back an error since this is not implemented.

  • Shared/WebPreferences.yaml:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetCaptureAudioInGPUProcessEnabled):
(WKPreferencesGetCaptureAudioInGPUProcessEnabled):

  • UIProcess/API/C/WKPreferencesRef.h:
  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::createWebPage):

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::initialize):
(WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource):

  • WebProcess/cocoa/UserMediaCaptureManager.h:

(WebKit::UserMediaCaptureManager::AudioFactory::setShouldCaptureInGPUProcess):

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

  • fast/mediastream/captureAudioInGPUProcess-expected.txt: Added.
  • fast/mediastream/captureAudioInGPUProcess.html: Added.
7:28 AM Changeset in webkit [253287] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

[LFC][Integration] Hit testing
https://bugs.webkit.org/show_bug.cgi?id=205008

Reviewed by Zalan Bujtas.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::paint):
(WebCore::LayoutIntegration::LineLayout::hitTest):

Hit test LFC.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::LayoutTreeContent::addLayoutBoxForRenderer):

Add Layout::Box -> RenderObject map.

  • layout/layouttree/LayoutTreeBuilder.h:

(WebCore::Layout::LayoutTreeContent::rendererForLayoutBox const):
(WebCore::Layout::LayoutTreeContent::addLayoutBoxForRenderer): Deleted.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::hitTestInlineChildren):

Call into LFC hit test function.

6:46 AM Changeset in webkit [253286] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Fix fast/text/word-break.html
https://bugs.webkit.org/show_bug.cgi?id=204999
<rdar://problem/57736608>

Reviewed by Antti Koivisto.

Keep at least one character on the line when even the first character overflows and the line is empty.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::Content::firstTextRunIndex const):

  • layout/inlineformatting/InlineLineBreaker.h:
6:24 AM Changeset in webkit [253285] by youenn@apple.com
  • 5 edits in trunk

fast/mediastream/mediastreamtrack-video-clone.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205006

Reviewed by Eric Carlson.

Source/WebCore:

Covered by test no longer flaky.

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::clone):
When cloning the source, clone its size in addition to its settings.

LayoutTests:

  • fast/mediastream/mediastreamtrack-video-clone-expected.txt:
  • fast/mediastream/mediastreamtrack-video-clone.html:

Add br to spot any potential issue with video elements to text dump.

1:18 AM Changeset in webkit [253284] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] Crashes in MediaPlayerPrivateGStreamer::ensureGstGLContext
https://bugs.webkit.org/show_bug.cgi?id=204848

Reviewed by Michael Catanzaro.

Make sure the GL video sink uses a valid WebKit shared GL context.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(ensureGstGLContext):
(webKitGLVideoSinkProbePlatform):

12:17 AM Changeset in webkit [253283] by Wenson Hsieh
  • 6 edits in trunk/Source/WebCore

Add encoding and decoding support for more DisplayListItems
https://bugs.webkit.org/show_bug.cgi?id=205001

Reviewed by Tim Horton.

Adds boilerplate code to encode and decode the following display list items: SetLineCap, SetLineDash,
SetLineJoin, SetMiterLimit, ClearShadow, Clip, ClipOut, ClipOutToPath, ClipPath, BeginTransparencyLayer,
EndTransparencyLayer, DrawLine, DrawLinesForText, DrawDotsForDocumentMarker, DrawEllipse, DrawFocusRingPath,
DrawFocusRingRects, FillRectWithRoundedHole, FillEllipse, StrokeRect, StrokePath, StrokeEllipse,
ApplyStrokePattern, ApplyFillPattern, ApplyDeviceScaleFactor, DrawTiledImage, DrawTiledScaledImage, and
DrawPattern.

  • platform/graphics/GraphicsContext.h:

(WebCore::DocumentMarkerLineStyle::encode const):
(WebCore::DocumentMarkerLineStyle::decode):

  • platform/graphics/GraphicsTypes.h:
  • platform/graphics/WindRule.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

Additionally make a few other WebCore classes and enums encodable and decodable.

(WebCore::DisplayList::SetLineCap::SetLineCap):
(WebCore::DisplayList::SetLineDash::SetLineDash):
(WebCore::DisplayList::SetLineJoin::SetLineJoin):
(WebCore::DisplayList::SetMiterLimit::SetMiterLimit):
(WebCore::DisplayList::ClearShadow::ClearShadow):
(WebCore::DisplayList::Clip::Clip):
(WebCore::DisplayList::ClipOut::ClipOut):
(WebCore::DisplayList::ClipOutToPath::ClipOutToPath):
(WebCore::DisplayList::ClipPath::ClipPath):
(WebCore::DisplayList::DrawLine::DrawLine):
(WebCore::DisplayList::DrawLinesForText::DrawLinesForText):
(WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker):
(WebCore::DisplayList::DrawEllipse::DrawEllipse):
(WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath):
(WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects):
(WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole):
(WebCore::DisplayList::FillEllipse::FillEllipse):
(WebCore::DisplayList::StrokeRect::StrokeRect):
(WebCore::DisplayList::StrokeEllipse::StrokeEllipse):
(WebCore::DisplayList::StrokePath::StrokePath):

Also remove m_blockLocation from StrokePath (this member variable was unused, and seems to have been copied over
from other drawing items).

(WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer):
(WebCore::DisplayList::EndTransparencyLayer::EndTransparencyLayer):
(WebCore::DisplayList::ApplyStrokePattern::ApplyStrokePattern):
(WebCore::DisplayList::ApplyFillPattern::ApplyFillPattern):
(WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::SetLineCap::encode const):
(WebCore::DisplayList::SetLineCap::decode):
(WebCore::DisplayList::SetLineDash::encode const):
(WebCore::DisplayList::SetLineDash::decode):
(WebCore::DisplayList::SetLineJoin::encode const):
(WebCore::DisplayList::SetLineJoin::decode):
(WebCore::DisplayList::SetMiterLimit::encode const):
(WebCore::DisplayList::SetMiterLimit::decode):
(WebCore::DisplayList::ClearShadow::encode const):
(WebCore::DisplayList::ClearShadow::decode):
(WebCore::DisplayList::Clip::encode const):
(WebCore::DisplayList::Clip::decode):
(WebCore::DisplayList::ClipOut::encode const):
(WebCore::DisplayList::ClipOut::decode):
(WebCore::DisplayList::ClipOutToPath::encode const):
(WebCore::DisplayList::ClipOutToPath::decode):
(WebCore::DisplayList::ClipPath::encode const):
(WebCore::DisplayList::ClipPath::decode):
(WebCore::DisplayList::DrawTiledImage::encode const):
(WebCore::DisplayList::DrawTiledImage::decode):
(WebCore::DisplayList::DrawTiledScaledImage::encode const):
(WebCore::DisplayList::DrawTiledScaledImage::decode):
(WebCore::DisplayList::DrawPattern::DrawPattern):
(WebCore::DisplayList::DrawPattern::encode const):
(WebCore::DisplayList::DrawPattern::decode):
(WebCore::DisplayList::BeginTransparencyLayer::encode const):
(WebCore::DisplayList::BeginTransparencyLayer::decode):
(WebCore::DisplayList::EndTransparencyLayer::encode const):
(WebCore::DisplayList::EndTransparencyLayer::decode):
(WebCore::DisplayList::DrawLine::encode const):
(WebCore::DisplayList::DrawLine::decode):
(WebCore::DisplayList::DrawLinesForText::encode const):
(WebCore::DisplayList::DrawLinesForText::decode):
(WebCore::DisplayList::DrawDotsForDocumentMarker::encode const):
(WebCore::DisplayList::DrawDotsForDocumentMarker::decode):
(WebCore::DisplayList::DrawEllipse::encode const):
(WebCore::DisplayList::DrawEllipse::decode):
(WebCore::DisplayList::DrawFocusRingPath::encode const):
(WebCore::DisplayList::DrawFocusRingPath::decode):
(WebCore::DisplayList::DrawFocusRingRects::encode const):
(WebCore::DisplayList::DrawFocusRingRects::decode):
(WebCore::DisplayList::FillRectWithRoundedHole::encode const):
(WebCore::DisplayList::FillRectWithRoundedHole::decode):
(WebCore::DisplayList::FillEllipse::encode const):
(WebCore::DisplayList::FillEllipse::decode):
(WebCore::DisplayList::StrokeRect::encode const):
(WebCore::DisplayList::StrokeRect::decode):
(WebCore::DisplayList::StrokePath::encode const):
(WebCore::DisplayList::StrokePath::decode):
(WebCore::DisplayList::StrokeEllipse::encode const):
(WebCore::DisplayList::StrokeEllipse::decode):
(WebCore::DisplayList::ApplyStrokePattern::encode const):
(WebCore::DisplayList::ApplyStrokePattern::decode):
(WebCore::DisplayList::ApplyFillPattern::encode const):
(WebCore::DisplayList::ApplyFillPattern::decode):
(WebCore::DisplayList::ApplyDeviceScaleFactor::encode const):
(WebCore::DisplayList::ApplyDeviceScaleFactor::decode):
(WebCore::DisplayList::Item::encode const):
(WebCore::DisplayList::Item::decode):
(WebCore::DisplayList::SetLineCap::SetLineCap): Deleted.
(WebCore::DisplayList::SetLineDash::SetLineDash): Deleted.
(WebCore::DisplayList::SetLineJoin::SetLineJoin): Deleted.
(WebCore::DisplayList::SetMiterLimit::SetMiterLimit): Deleted.
(WebCore::DisplayList::ClearShadow::ClearShadow): Deleted.
(WebCore::DisplayList::Clip::Clip): Deleted.
(WebCore::DisplayList::ClipOut::ClipOut): Deleted.
(WebCore::DisplayList::ClipOutToPath::ClipOutToPath): Deleted.
(WebCore::DisplayList::ClipPath::ClipPath): Deleted.
(WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer): Deleted.
(WebCore::DisplayList::EndTransparencyLayer::EndTransparencyLayer): Deleted.
(WebCore::DisplayList::DrawLine::DrawLine): Deleted.
(WebCore::DisplayList::DrawLinesForText::DrawLinesForText): Deleted.
(WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker): Deleted.
(WebCore::DisplayList::DrawEllipse::DrawEllipse): Deleted.
(WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath): Deleted.
(WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects): Deleted.
(WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole): Deleted.
(WebCore::DisplayList::FillEllipse::FillEllipse): Deleted.
(WebCore::DisplayList::StrokeRect::StrokeRect): Deleted.
(WebCore::DisplayList::StrokePath::StrokePath): Deleted.
(WebCore::DisplayList::StrokeEllipse::StrokeEllipse): Deleted.
(WebCore::DisplayList::ApplyStrokePattern::ApplyStrokePattern): Deleted.
(WebCore::DisplayList::ApplyFillPattern::ApplyFillPattern): Deleted.
(WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor): Deleted.

Dec 8, 2019:

11:25 PM Changeset in webkit [253282] by timothy_horton@apple.com
  • 5 edits in trunk/Tools

REGRESSION: Crash under UIScriptControllerIOS::simulateAccessibilitySettingsChangeNotification
https://bugs.webkit.org/show_bug.cgi?id=205002

Reviewed by Wenson Hsieh.

Keep a strong reference to the UIScriptController while running async tasks.
UIScriptContext will be nulled out if the view was torn down, but this way
we keep the UIScriptController itself and can find the null UIScriptContext
reliably.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::doAsyncTask):
(WTR::UIScriptControllerIOS::zoomToScale):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptControllerMac::doAsyncTask):
(WTR::UIScriptControllerMac::activateDataListSuggestion):
(WTR::UIScriptControllerMac::removeViewFromWindow):
(WTR::UIScriptControllerMac::addViewToWindow):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::doAfterPresentationUpdate):
(WTR::UIScriptControllerIOS::doAfterNextStablePresentationUpdate):
(WTR::UIScriptControllerIOS::ensurePositionInformationIsUpToDateAt):
(WTR::UIScriptControllerIOS::doAfterVisibleContentRectUpdate):
(WTR::UIScriptControllerIOS::zoomToScale):
(WTR::UIScriptControllerIOS::retrieveSpeakSelectionContent):
(WTR::UIScriptControllerIOS::simulateAccessibilitySettingsChangeNotification):
(WTR::UIScriptControllerIOS::touchDownAtPoint):
(WTR::UIScriptControllerIOS::liftUpAtPoint):
(WTR::UIScriptControllerIOS::twoFingerSingleTapAtPoint):
(WTR::UIScriptControllerIOS::doubleTapAtPoint):
(WTR::UIScriptControllerIOS::stylusDownAtPoint):
(WTR::UIScriptControllerIOS::stylusMoveToPoint):
(WTR::UIScriptControllerIOS::stylusUpAtPoint):
(WTR::UIScriptControllerIOS::stylusTapAtPointWithModifiers):
(WTR::UIScriptControllerIOS::dragFromPointToPoint):
(WTR::UIScriptControllerIOS::longPressAtPoint):
(WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard):
(WTR::UIScriptControllerIOS::dismissFilePicker):
(WTR::UIScriptControllerIOS::applyAutocorrection):
(WTR::UIScriptControllerIOS::simulateRotation):
(WTR::UIScriptControllerIOS::simulateRotationLikeSafari):
(WTR::UIScriptControllerIOS::setDidStartFormControlInteractionCallback):
(WTR::UIScriptControllerIOS::setDidEndFormControlInteractionCallback):
(WTR::UIScriptControllerIOS::setDidShowContextMenuCallback):
(WTR::UIScriptControllerIOS::setDidDismissContextMenuCallback):
(WTR::UIScriptControllerIOS::setWillBeginZoomingCallback):
(WTR::UIScriptControllerIOS::setDidEndZoomingCallback):
(WTR::UIScriptControllerIOS::setDidShowKeyboardCallback):
(WTR::UIScriptControllerIOS::setDidHideKeyboardCallback):
(WTR::UIScriptControllerIOS::setWillPresentPopoverCallback):
(WTR::UIScriptControllerIOS::setDidDismissPopoverCallback):
(WTR::UIScriptControllerIOS::setDidEndScrollingCallback):
(WTR::UIScriptControllerIOS::activateDataListSuggestion):
(WTR::UIScriptControllerIOS::doAfterDoubleTapDelay):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptControllerMac::zoomToScale):
(WTR::UIScriptControllerMac::simulateAccessibilitySettingsChangeNotification):
(WTR::UIScriptControllerMac::chooseMenuAction):
(WTR::UIScriptControllerMac::activateAtPoint):

5:52 PM Changeset in webkit [253281] by yousuke.kimoto@sony.com
  • 5 edits in trunk/Source/JavaScriptCore

[WinCairo] Refine initialization and error handling in RemoteInspectorSocket
https://bugs.webkit.org/show_bug.cgi?id=204338

Reviewed by Fujii Hironori.

RemoteInspectorSocket socket error handling is not enough,
which should be refined to avoid error cases.

  • inspector/remote/socket/RemoteInspectorSocket.h: Modifed return value checks to hanlde error cases.
  • inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp: Refined check error handling.

(Inspector::RemoteInspectorSocketEndpoint::createListener):

  • inspector/remote/socket/posix/RemoteInspectorSocketPOSIX.cpp: Ditto

(Inspector::Socket::connect):
(Inspector::Socket::listen):
(Inspector::Socket::setup):
(Inspector::Socket::isListening):
(Inspector::Socket::getPort):
(Inspector::Socket::preparePolling):

  • inspector/remote/socket/win/RemoteInspectorSocketWin.cpp: Ditto

(Inspector::Socket::Socket::create):
(Inspector::Socket::setOpt):
(Inspector::Socket::bindAndListen):
(Inspector::Socket::connect):
(Inspector::Socket::accept):
(Inspector::Socket::createPair):
(Inspector::Socket::setup):
(Inspector::Socket::isListening):
(Inspector::Socket::getPort):
(Inspector::Socket::read):
(Inspector::Socket::write):
(Inspector::Socket::preparePolling): Initialized 'poll' with zero

5:35 PM Changeset in webkit [253280] by Tadeu Zagallo
  • 3 edits
    1 add in trunk

[WebAssembly] Fix LLIntGenerator's checkConsistency contract
https://bugs.webkit.org/show_bug.cgi?id=204998
<rdar://problem/57733405>

Reviewed by Mark Lam.

JSTests:

  • wasm/regress/stack-consistency.js: Added.

Source/JavaScriptCore:

We check the consistency of the WebAssembly parser's expression stack every time the LLIntGenerator calls
push to allocate a new stack value. However, if we call push more than once (e.g. in a loop), the stack
is no longer consistent, since those values have not yet been placed in the parser's expression stack, so
the generator and parser's stacks are out of sync. Instead, whenever we need to push multiple values, we
should first manually call checkConsistency before any pushes, and all pushes after that should be replaced
with push(NoConsistencyCheck).

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::addArguments):
(JSC::Wasm::LLIntGenerator::addLocal):

3:27 PM Changeset in webkit [253279] by rniwa@webkit.org
  • 11 edits in trunk/Source/WebCore

There should be one MicrotaskQueue per EventLoop
https://bugs.webkit.org/show_bug.cgi?id=204492
<rdar://problem/57420645>

Reviewed by Antti Koivisto.

This patch makes microtask queue and the microtasks for mutation observers and custom elements
specific to each event loop so that only similar origin windows share the same microtask queue
and mutation observer's compound microtask or custom element's backup element queue.

As a result, we can remove the workaround we added in r247222.

Because microtasks for mutation observers and custom elements are shared across similar origin
window agents, we can't use any one document's task group to schedule these. Instead, we create
a new "perpetual" task group in WindowEventLoop which is never suspended or stopped. It's the
responsibility of mutation observer and custom elements' code to deal with suspened or stopped
documents as it has been the case.

See also: https://dom.spec.whatwg.org/#queue-a-mutation-observer-compound-microtask

https://html.spec.whatwg.org/multipage/custom-elements.html#backup-element-queue

Test: editing/pasteboard/paste-does-not-fire-promises-while-sanitizing-web-content.html

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementQueue::add): Renamed from CustomElementReactionQueue::ElementQueue to
allow forward declaration in EventLoop.h.
(WebCore::CustomElementQueue::invokeAll): Ditto.
(WebCore::CustomElementQueue::processQueue): Ditto.
(WebCore::CustomElementReactionQueue::enqueueElementOnAppropriateElementQueue):
(WebCore::CustomElementReactionQueue::processBackupQueue):
(WebCore::CustomElementReactionQueue::ensureBackupQueue): Deleted. Moved to WindowEventLoop.
(WebCore::CustomElementReactionQueue::backupElementQueue): Ditto.

  • dom/CustomElementReactionQueue.h:

(WebCore::CustomElementQueue): Renamed from CustomElementReactionQueue::ElementQueue to allow
forward declaration in EventLoop.h.

  • dom/Document.cpp:

(WebCore::Document::finishedParsing): Removed the workaround added in r247222.
(WebCore::Document::eventLoop):
(WebCore::Document::windowEventLoop): Added.

  • dom/Document.h:
  • dom/MutationObserver.cpp:

(WebCore::activeMutationObservers): Deleted. Moved to WindowEventLoop.
(WebCore::suspendedMutationObservers): Ditto.
(WebCore::signalSlotList): Ditto.
(WebCore::MutationObserver::queueMutationObserverCompoundMicrotask): Ditto.
(WebCore::MutationObserver::enqueueMutationRecord):
(WebCore::MutationObserver::enqueueSlotChangeEvent):
(WebCore::MutationObserver::setHasTransientRegistration):
(WebCore::MutationObserver::notifyMutationObservers): Now takes WindowEventLoop since various
lists and hash maps are specific to each WindowEventLoop.

  • dom/MutationObserver.h:
  • dom/WindowEventLoop.cpp:

(WebCore::WindowEventLoop::WindowEventLoop): Create m_perpetualTaskGroupForSimilarOriginWindowAgents.
(WebCore::WindowEventLoop::microtaskQueue):
(WebCore::WindowEventLoop::queueMutationObserverCompoundMicrotask):
(WebCore::WindowEventLoop::backupElementQueue):

  • dom/WindowEventLoop.h:
  • editing/markup.cpp:

(WebCore::createPageForSanitizingWebContent): Removed the workaround added in r247222.

  • page/Page.h:

(WebCore::Page::setIsForSanitizingWebContent): Ditto.
(WebCore::Page::isForSanitizingWebContent const): Ditto.

1:31 PM Changeset in webkit [253278] by Wenson Hsieh
  • 5 edits in trunk/Source

Move WebCore::Path encoders and decoders into WebCore from WebCoreArgumentCoders
https://bugs.webkit.org/show_bug.cgi?id=204993

Reviewed by Tim Horton.

Source/WebCore:

Move encoding and decoding logic from WebCoreArgumentCoders into WebCore. The ability to encode or decode Paths
is needed in order to encode or decode DisplayListItems that contain Paths; since these encoders live in
WebCore, the encoders for Paths should live there as well.

No change in behavior.

  • platform/graphics/Path.cpp:
  • platform/graphics/Path.h:

Also fixes up the indentation of the Path class in this header, such that the class declaration isn't indented
one level past the namespace.

(WebCore::Path::isNull const):
(WebCore::Path::platformPath const):
(WebCore::Path::circleControlPoint):
(WebCore::Path::encode const):
(WebCore::Path::decode):

Source/WebKit:

Remove Encoder/Decoder support for WebCore::Path.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::pathEncodeApplierFunction): Deleted.
(IPC::ArgumentCoder<Path>::encode): Deleted.
(IPC::ArgumentCoder<Path>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:
1:30 PM Changeset in webkit [253277] by Chris Dumez
  • 17 edits in trunk

Preconnect to server as early as possible in WebPage::LoadRequest
https://bugs.webkit.org/show_bug.cgi?id=204992

Reviewed by Antti Koivisto.

Preconnect to server as early as possible in WebPage::LoadRequest. This avoids delaying the
connection to the server until after the policy check and is a ~1.3% progression on PLT5 on
both macOS and iOS.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::preconnectTo):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadRequest):

11:10 AM Changeset in webkit [253276] by youenn@apple.com
  • 16 edits in trunk/Source/WebCore

Do not use DOMGuarded for maplike
https://bugs.webkit.org/show_bug.cgi?id=204879

Reviewed by Darin Adler.

Update maplike according setlike model where we support syncing at creation of the JS wrapper
and syncing whenever setlike/maplike methods are called.
Removing DOMGuardedObject makes implementation more lightweight, there is less things to implement on DOM side
and it allows collecting the private map to free memory if needed.

Covered by existing tests and rebased binding tests.

  • Modules/highlight/HighlightMap.cpp:

(WebCore::HighlightMap::initializeMapLike):

  • Modules/highlight/HighlightMap.h:

(WebCore::HighlightMap::synchronizeBackingMap): Deleted.
(WebCore::HighlightMap::backingMap): Deleted.

  • Modules/mediastream/RTCStatsReport.h:

(WebCore::RTCStatsReport::create):
(WebCore::RTCStatsReport::initializeMapLike):
(WebCore::RTCStatsReport::RTCStatsReport):
(WebCore::RTCStatsReport::synchronizeBackingMap): Deleted.
(WebCore::RTCStatsReport::backingMap): Deleted.
(WebCore::RTCStatsReport::addStats): Deleted.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::createStatsCollector):

  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:

(WebCore::LibWebRTCStatsCollector::~LibWebRTCStatsCollector):
(WebCore::initializeRTCStatsReportBackingMap):
(WebCore::LibWebRTCStatsCollector::OnStatsDelivered):

  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:
  • bindings/js/JSDOMMapLike.cpp:

(WebCore::getBackingMap):
(WebCore::clearBackingMap):
(WebCore::setToBackingMap):
(WebCore::forwardAttributeGetterToBackingMap):
(WebCore::forwardFunctionCallToBackingMap):
(WebCore::forwardForEachCallToBackingMap):
(WebCore::initializeBackingMap): Deleted.
(WebCore::createBackingMap): Deleted.

  • bindings/js/JSDOMMapLike.h:

(WebCore::DOMMapAdapter::DOMMapAdapter):
(WebCore::DOMMapAdapter::set):
(WebCore::DOMMapAdapter::clear):
(WebCore::getAndInitializeBackingMap):
(WebCore::forwardSizeToMapLike):
(WebCore::forwardEntriesToMapLike):
(WebCore::forwardKeysToMapLike):
(WebCore::forwardValuesToMapLike):
(WebCore::forwardClearToMapLike):
(WebCore::forwardForEachToMapLike):
(WebCore::forwardGetToMapLike):
(WebCore::forwardHasToMapLike):
(WebCore::forwardSetToMapLike):
(WebCore::forwardDeleteToMapLike):
(): Deleted.
(WebCore::DOMMapLike::set): Deleted.
(WebCore::synchronizeBackingMap): Deleted.

  • bindings/js/JSDOMSetLike.cpp:
  • bindings/js/JSDOMSetLike.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/JSMapLike.cpp:

(WebCore::JSMapLike::finishCreation):

  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:

(WebCore::JSReadOnlyMapLike::finishCreation):

  • testing/InternalsMapLike.cpp:

(WebCore::InternalsMapLike::initializeMapLike):
(WebCore::InternalsMapLike::synchronizeBackingMap): Deleted.

  • testing/InternalsMapLike.h:

(WebCore::InternalsMapLike::backingMap): Deleted.

11:10 AM Changeset in webkit [253275] by youenn@apple.com
  • 17 edits in trunk

Support different resolutions for video tracks captured from UIProcess
https://bugs.webkit.org/show_bug.cgi?id=204945

Reviewed by Eric Carlson.

Source/WebCore:

Remove whether the a source is remote or not.
Previously we were doing the distinction as resizing would happen in WebProcess and not in UIProcess.
We are now moving away from doing resizing in WebProcess.
Covered by existing tests.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeMediaSourceFactory.h:
  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

(WebCore::RealtimeVideoCaptureSource::adaptVideoSample):
For remote tracks, we also update the size for observers.

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::m_source):
(WebCore::RealtimeVideoSource::sourceSettingsChanged):
Update computation of size based on rotation.
This makes sure we have resizing done right.

  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::emitFrame):

Source/WebKit:

Change video capture in uiprocess to an experimental flag.
Add support for remote video source cloning by sending some IPC to UIProcess and cloning the source there.
This triggers IPC for both cloning and cloned sources but this allows to do resizing in UIProcess instead of WebProcess.
We thus disable video capture resizing in WebProcess.

  • Shared/WebPreferences.yaml:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::start):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::stop):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::requestToEnd):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::preventSourceFromStopping):
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::startProducingData):
(WebKit::UserMediaCaptureManagerProxy::stopProducingData):
(WebKit::UserMediaCaptureManagerProxy::clone):
(WebKit::UserMediaCaptureManagerProxy::requestToEnd):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::sourceID const):
(WebKit::UserMediaCaptureManager::Source::settings const):
(WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable):
(WebKit::UserMediaCaptureManager::Source::requestToEnd):
(WebKit::UserMediaCaptureManager::Source::stopBeingObserved):
(WebKit::UserMediaCaptureManager::cloneSource):
(WebKit::UserMediaCaptureManager::cloneVideoSource):
(WebKit::UserMediaCaptureManager::requestToEnd):
(WebKit::UserMediaCaptureManager::VideoFactory::setVideoCapturePageState):

  • WebProcess/cocoa/UserMediaCaptureManager.h:

LayoutTests:

  • fast/mediastream/mediastreamtrack-video-clone-expected.txt:
  • fast/mediastream/mediastreamtrack-video-clone.html:
8:41 AM Changeset in webkit [253274] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Tighten Mac sandbox by removing microphone access
https://bugs.webkit.org/show_bug.cgi?id=204939

Reviewed by Brent Fulgham.

No change of behavior, we do audio capture in UIProcess.

  • WebProcess/com.apple.WebProcess.sb.in:
8:29 AM Changeset in webkit [253273] by Caio Lima
  • 3 edits in trunk/JSTests

[ARMv7] Skip flaky stress tests
https://bugs.webkit.org/show_bug.cgi?id=204996

Unreviewed gardening.

  • stress/incremental-marking-should-not-dead-lock-in-new-property-transition.js:
  • stress/sampling-profiler-should-not-sample-beyond-stack-bounds.js:
8:14 AM Changeset in webkit [253272] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Add logging to NetworkRTCMonitor
https://bugs.webkit.org/show_bug.cgi?id=204850
<rdar://problem/57618773>

Reviewed by Eric Carlson.

Add logging and send IPC message back to WebProcess even if monitoring is stopped.
No observable change of behavior.

  • NetworkProcess/webrtc/NetworkRTCMonitor.cpp:

(WebKit::NetworkRTCMonitor::startUpdatingIfNeeded):
(WebKit::NetworkRTCMonitor::stopUpdating):
(WebKit::NetworkRTCMonitor::onNetworksChanged):

7:58 AM Changeset in webkit [253271] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Add more logging to physical socket server when a socket file descriptor is invalid
https://bugs.webkit.org/show_bug.cgi?id=204948

Reviewed by Darin Adler.

  • Source/webrtc/rtc_base/physical_socket_server.cc:
7:30 AM Changeset in webkit [253270] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

[LFC][Integration] Collect overflow from lines
https://bugs.webkit.org/show_bug.cgi?id=204994

Reviewed by Zalan Bujtas.

  • layout/displaytree/DisplayLineBox.h:

(WebCore::Display::LineBox::logicalRect const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::computeVisualOverflow):
(WebCore::LayoutIntegration::LineLayout::collectOverflow):

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):

Connect to LFC layout.

7:10 AM Changeset in webkit [253269] by Alan Bujtas
  • 10 edits in trunk/Source/WebCore

[LFC][IFC] Switch over to float based types in inline layout
https://bugs.webkit.org/show_bug.cgi?id=204995
<rdar://problem/57733349>

Reviewed by Antti Koivisto.

Due to the relatively significant difference between float and LayoutUnit's precision, IFC
is unable to produce matching layout under the same constraints.
Let's switch over to float based types until after either CLL switches over to LayoutUnit
or LayoutUnit gains high enough precision.

See webkit.org/b/204986 for more info.

  • layout/LayoutUnits.h:

(WebCore::Layout::maxInlineLayoutUnit):

  • layout/Verification.cpp:

(WebCore::Layout::areEssentiallyEqual):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

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

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::wordBreakingBehavior const):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignContentHorizontally const):
(WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
(WebCore::Layout::LineBuilder::halfLeadingMetrics):
(WebCore::Layout::LineBuilder::TrimmableContent::append):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::inlineItemWidth):

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):
(WebCore::Layout::TextUtil::fixedPitchWidth):
(WebCore::Layout::TextUtil::split):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::paint):

Dec 7, 2019:

9:59 PM Changeset in webkit [253268] by commit-queue@webkit.org
  • 42 edits in trunk

Make ColorSpace an enum class
https://bugs.webkit.org/show_bug.cgi?id=204970

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-12-07
Reviewed by Sam Weinig.

Source/WebCore:

So it can be encoded and decoded through the IPC messages.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):

  • html/CustomPaintCanvas.cpp:

(WebCore::CustomPaintCanvas::copiedImage const):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::createImageBuffer const):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawTextInternal):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::drawPattern):

  • platform/graphics/Color.cpp:

(WebCore::operator<<):

  • platform/graphics/Color.h:

(WebCore::Color::Color):

  • platform/graphics/ColorSpace.h:

(): Deleted.

  • platform/graphics/CustomPaintImage.cpp:

(WebCore::CustomPaintImage::drawPattern):

  • platform/graphics/ExtendedColor.cpp:

(WebCore::ExtendedColor::create):
(WebCore::ExtendedColor::cssText const):

  • platform/graphics/ExtendedColor.h:
  • platform/graphics/GradientImage.cpp:

(WebCore::GradientImage::drawPattern):

  • platform/graphics/ImageBuffer.cpp:

(WebCore::ImageBuffer::transformColorSpace):

  • platform/graphics/ImageBuffer.h:
  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::ImageBuffer::createCompatibleBuffer):

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::leakCGColor):

  • platform/graphics/cg/GraphicsContextCG.h:

(WebCore::cachedCGColorSpace):

  • platform/graphics/filters/FEFlood.h:
  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::drawLighting):

  • platform/graphics/filters/FETile.cpp:

(WebCore::FETile::platformApplySoftware):

  • platform/graphics/filters/FilterEffect.h:
  • platform/graphics/filters/SourceGraphic.h:

(WebCore::SourceGraphic::SourceGraphic):

  • platform/graphics/win/ImageBufferDirect2D.cpp:

(WebCore::ImageBuffer::createCompatibleBuffer):

  • platform/mac/ThemeMac.mm:

(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::buildReferenceFilter):
(WebCore::CSSFilter::build):
(WebCore::CSSFilter::apply):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderLayerBacking.cpp:

(WebCore::patternForTouchAction):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintProgressBar):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::applyClippingToContext):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::buildPrimitives const):
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):

  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::createMaskAndSwapContextForTextGradient):

  • rendering/svg/RenderSVGResourceMasker.cpp:

(WebCore::RenderSVGResourceMasker::applyResource):
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::createTileImage const):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::bufferForeground):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::drawPatternForContainer):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImage::platformApplySoftware):

Source/WebKit:

  • Shared/WebCoreArgumentCoders.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/ExtendedColor.cpp:

(TestWebKitAPI::TEST):
(TestWebKitAPI::makeColor):

7:57 PM Changeset in webkit [253267] by Wenson Hsieh
  • 24 edits
    4 adds in trunk

[iOS] WKWebView touch event gesture recognition should not block the application process main thread when possible
https://bugs.webkit.org/show_bug.cgi?id=204664
<rdar://problem/38670692>

Reviewed by Tim Horton.

Source/WebKit:

Adds a mechanism that allows some sync touch events on iOS to be sent asynchronously. To do this, we use the
deferring gesture mechanism introduced in trac.webkit.org/r253005 to defer all gestures under WKContentView (and
WebKit-owned scroll views) when a touch starts, such that they will not recognize until we know that the page
has either prevented default or not (assuming that the touch was over an active listener). See below for more
details.

Tests: fast/events/touch/ios/prevent-default-on-touch-start-with-slow-event-listener.html

fast/events/touch/ios/scroll-on-touch-start-with-slow-event-listener.html

  • UIProcess/GenericCallback.h:
  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:

(-[WKChildScrollView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
(-[WKChildScrollView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]):

Implement gesture recognizer delegate hooks to add dynamic failure requirements between a child scroll view's
gestures and the new deferring gesture recognizers on WKContentView. This allows pan gestures over a scrollable
container to hold off on recognizing while the deferring gesture recognizer has not failed yet.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handlePreventableTouchEvent):
(WebKit::WebPageProxy::handleUnpreventableTouchEvent):

Rename handleTouchEventSynchronously and handleTouchEventAsynchronously to handlePreventableTouchEvent and
handleUnpreventableTouchEvent, respectively. Instead of always sending touchstart events that may prevent native
gestures synchronously, we may now go through the same EventDispatcher::TouchEvent codepath used when
dispatching touch events in passive tracking regions. However, in the case of preventable touchstarts, we
additionally store a completion callback that is invoked after the touch event has been handled by the page; we
then either un-defer or prevent native gestures here (depending on whether the page prevented default) by
calling PageClient::doneDeferringNativeGestures.

Non-touchstart events are still dispatched synchronously, to ensure that calling preventDefault() on touchmove
and touchend continue to prevent default gestures from recognizing.

(WebKit::WebPageProxy::boolCallback):
(WebKit::WebPageProxy::handleTouchEventSynchronously): Deleted.
(WebKit::WebPageProxy::handleTouchEventAsynchronously): Deleted.

See above.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::isHandlingPreventableTouchStart const):

This is used in WKContentView to determine whether deferring gestures need to remain active after the touch
ends. See below for more detail.

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::doneDeferringNativeGestures):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[UIGestureRecognizer _wk_cancel]):
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):

Add and remove the new deferring gesture recognizers here.

(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _webTouchEvent:preventsNativeGestures:]):
(-[WKContentView _doneDeferringNativeGestures:]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView ensurePositionInformationIsUpToDate:]):

Drive-by fix: add a missing hasRunningProcess check that causes a flaky assertion under
AuxiliaryProcessProxy::connection() in layout tests.

(-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]):

Add dynamic failure requirements between WKContentView's gestures (including all text interaction, context menu,
and drag and drop gestures) and the new deferring gesture recognizers.

(-[WKContentView _didStartProvisionalLoadForMainFrame]):

Force the two-finger double tap gesture recognizer to reset when loading a new page. Without this, the layout
test fast/events/ios/click-event-while-editing-node.html will rarely fail when run after a test that dispatches
a two-finger tap, such as fast/events/ios/click-event-two-finger-single-tap-meta-key.html. This is because the
new deferring gestures will temporarily unite multi-finger tap gestures with one-finger double tap gestures in
the same subgraph when performing a tap gesture with more than one finger. This means that there's a 300 ms
delay before a normal single tap can be recognized again, which (without forcing the two-finger double tap to
reset) would cause a subsequent test that loads in under 300 ms and attempts to send a tap to fail.

(-[WKContentView deferringGestureRecognizer:shouldDeferGesturesAfterBeginningTouchesWithEvent:]):

Avoid deferring native gestures if the scroll view is decelerating; this matches behavior of the web touch event
gesture recognizer.

(-[WKContentView deferringGestureRecognizer:shouldDeferGesturesAfterEndingTouchesWithEvent:]):

Normally, after -touchesEnded:withEvent:, we stop deferring native gesture recognizers by failing the deferring
gestures. However, if we're still waiting for a response from the web process, then let
-_doneDeferringNativeGestures: handle this instead.

(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):
(-[WKContentView deferringGestureRecognizer:shouldDeferGesturesWithEvent:]): Deleted.

Renamed to -shouldDeferGesturesAfterBeginningTouchesWithEvent:.

  • UIProcess/ios/WKDeferringGestureRecognizer.h:
  • UIProcess/ios/WKDeferringGestureRecognizer.mm:

(-[WKDeferringGestureRecognizer touchesBegan:withEvent:]):
(-[WKDeferringGestureRecognizer touchesEnded:withEvent:]):

Override this and add a new delegate hook to determine whether we want the deferring gesture recognizer to
immediately fail when touches end. It's important to override this and transition to failure state in this case,
since not doing so could mean that the deferring gestures stay in Possible state forever; this may lead to the
gesture subgraph containing these deferring gestures being unable to reset, since it's waiting for the deferring
gesture to either fail or end.

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
(-[WKScrollView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]):

Defer more scroll view gestures.

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::touchEvent):

Add an optional CallbackID parameter to this IPC message. If a callback ID is given, then we avoid coalescing
the touch event. To implement this, we additionally refactor the queued touch events map to contain lists of
<WebTouchEvent, Optional<CallbackID>> pairs; if a queued touch event has a corresponding CallbackID, then we
fire the callback corresponding to the ID, indicating whether the touch event was handled by the page.

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::dispatchAsynchronousTouchEvents):

LayoutTests:

  • fast/events/touch/ios/prevent-default-on-touch-start-with-slow-event-listener-expected.txt: Added.
  • fast/events/touch/ios/prevent-default-on-touch-start-with-slow-event-listener.html: Added.
  • fast/events/touch/ios/scroll-on-touch-start-with-slow-event-listener-expected.txt: Added.
  • fast/events/touch/ios/scroll-on-touch-start-with-slow-event-listener.html: Added.

Add new layout tests to cover behaviors when panning over active touchstart handlers that spin for an extended
length of time (in this case, 400 milliseconds) in overflow scrolling containers. A touchstart handler that
prevents default should still block scrolling, and a touchstart handler that does not should still allow the
user to scroll.

  • fast/events/touch/ios/show-modal-alert-during-touch-start.html:
  • http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt:
  • http/tests/security/anchor-download-block-crossorigin-expected.txt:

Rebaseline these tests by changing some line numbers.

  • resources/ui-helper.js:

(window.UIHelper.sendEventStream.return.new.Promise):
(window.UIHelper.sendEventStream):

Add a new UIHelper method to send a JSON object as an event stream.

(UIHelper.EventStreamBuilder.prototype._reset):
(UIHelper.EventStreamBuilder.prototype.begin):
(UIHelper.EventStreamBuilder.prototype.move):
(UIHelper.EventStreamBuilder.prototype.end):
(UIHelper.EventStreamBuilder.prototype.takeResult):

Add a new helper class to make it easier to construct event streams, for the purposes of sending to
UIScriptController::sendEventStream.

7:00 PM Changeset in webkit [253266] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC] Convert InlineLayoutUnit/Point/Rect to LayoutUnit/Point/Rect when crossing inline/block boundary
https://bugs.webkit.org/show_bug.cgi?id=204991
<rdar://problem/57730383>

Reviewed by Sam Weinig.

Float -> LayoutUnit requires explicit conversion due to precision loss. Use these functions when
feeding inline box geometry information back to block layout.

Implicit floor will do for now (might need to call round though).

This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.

  • layout/LayoutUnits.h:

(WebCore::Layout::toLayoutUnit):
(WebCore::Layout::toLayoutPoint):
(WebCore::Layout::toLayoutRect):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

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

  • layout/displaytree/DisplayInlineContent.cpp:

(WebCore::Display:: const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::constraintsForLine):
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::paint):

4:41 PM Changeset in webkit [253265] by rniwa@webkit.org
  • 13 edits
    9 adds in trunk

Unique origin's window must get its own event loop
https://bugs.webkit.org/show_bug.cgi?id=204978

Reviewed by Antti Koivisto.

Source/WebCore:

This patch fixes the bug that unique origin documents and documents of the same registrable domains
with different schemes / protocols were sharing the same event loop. Note that we continue to share
the event loop across file URI documents.

We now use the agent cluster key to looking up the event loop to better match the HTML5 spec:
https://html.spec.whatwg.org/multipage/webappapis.html#obtain-agent-cluster-key

Tests: fast/eventloop/data-uri-document-has-its-own-event-loop.html

fast/eventloop/queue-task-across-frames-in-file-uri.html
http/tests/eventloop/documents-with-different-protocols-do-not-share-event-loop.html

  • dom/Document.cpp:

(WebCore::Document::eventLoop):

  • dom/EventLoop.h:

(WebCore::EventLoopTaskGroup::hasSameEventLoopAs): Added for testing purposes.

  • dom/WindowEventLoop.cpp:

(WebCore::agentClusterKeyOrNullIfUnique): Added.
(WebCore::WindowEventLoop::eventLoopForSecurityOrigin): Replaced ensureForRegistrableDomain.
(WebCore::WindowEventLoop::create): Added.
(WebCore::WindowEventLoop::WindowEventLoop):
(WebCore::WindowEventLoop::~WindowEventLoop):

  • dom/WindowEventLoop.h:
  • testing/Internals.cpp:

(WebCore::Internals::hasSameEventLoopAs): Added for testing purposes.

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

LayoutTests:

Added tests to make sure data URI documents continue to use the same event loop but documents of
unique origin and of different schemes will use distinct event loops using newly added internals
method (hasSameEventLoopAs). Also added assertions to the existing tests using this new method.

  • fast/eventloop: Added.
  • fast/eventloop/data-uri-document-has-its-own-event-loop-expected.txt: Added.
  • fast/eventloop/data-uri-document-has-its-own-event-loop.html: Added.
  • fast/eventloop/queue-task-across-frames-in-file-uri-expected.txt: Added.
  • fast/eventloop/queue-task-across-frames-in-file-uri.html: Added.
  • fast/eventloop/resources: Added.
  • fast/eventloop/resources/eventloop-helper.html: Added.
  • http/tests/eventloop/documents-with-different-protocols-do-not-share-event-loop-expected.txt: Added.
  • http/tests/eventloop/documents-with-different-protocols-do-not-share-event-loop.html: Added.
  • http/tests/eventloop/queue-task-across-cross-site-frames-expected.txt:
  • http/tests/eventloop/queue-task-across-cross-site-frames.html:
  • http/tests/eventloop/queue-task-across-frames-expected.txt:
  • http/tests/eventloop/queue-task-across-frames.html:
2:57 PM Changeset in webkit [253264] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Object.prototype.isPrototypeOf() should check if the passed in value is a non-object first.
https://bugs.webkit.org/show_bug.cgi?id=204971
<rdar://problem/57730080>

Reviewed by Saam Barati.

JSTests:

  • stress/object-prototype-isPrototypeOf-should-check-for-non-object-first.js: Added.

Source/JavaScriptCore:

The spec says Object.prototype.isPrototypeOf() should do checks in the following
order:

  1. If Type(V) is not Object, return false.
  2. Let O be ? ToObject(this value).

...
We were previously checking (2) before (1). This patch fixes this order.

Ref: http://www.ecma-international.org/ecma-262/10.0/index.html#sec-object.prototype.isprototypeof

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncIsPrototypeOf):

2:25 PM Changeset in webkit [253263] by sbarati@apple.com
  • 13 edits
    1 add
    1 delete in trunk/Source/JavaScriptCore

Unreviewed. Roll out r253201. It was not a progression on any benchmarks, and was 8% slower on JetStream 2 ML.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/BytecodeList.rb:
  • bytecode/GetByValHistory.h: Added.

(JSC::GetByValHistory::observeNonUID):
(JSC::GetByValHistory::observe):
(JSC::GetByValHistory::count const):
(JSC::GetByValHistory::filter const):
(JSC::GetByValHistory::update):

  • bytecode/PointerHistory.h: Removed.
  • dfg/DFGByteCodeParser.cpp:

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

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

(JSC::DFG::SpeculativeJIT::compileGetById):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):

  • generator/DSL.rb:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/OptionsList.h:
2:20 PM Changeset in webkit [253262] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Display::LineBox should adopt to InlineLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=204990
<rdar://problem/57730105>

Reviewed by Sam Weinig.

This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.

  • layout/displaytree/DisplayLineBox.h:

(WebCore::Display::LineBox::logicalTopLeft const):
(WebCore::Display::LineBox::setLogicalTopLeft):

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::logicalTopLeft const):
(WebCore::Display::Run::logicalLeft const):
(WebCore::Display::Run::logicalRight const):
(WebCore::Display::Run::logicalTop const):
(WebCore::Display::Run::logicalBottom const):
(WebCore::Display::Run::logicalWidth const):
(WebCore::Display::Run::logicalHeight const):
(WebCore::Display::Run::setLogicalWidth):
(WebCore::Display::Run::setLogicalTop):
(WebCore::Display::Run::setLogicalLeft):
(WebCore::Display::Run::moveVertically):
(WebCore::Display::Run::moveHorizontally):
(WebCore::Display::Run::expandVertically):
(WebCore::Display::Run::expandHorizontally):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::constraintsForLine):

  • layout/inlineformatting/InlineFormattingContext.h:
12:34 PM Changeset in webkit [253261] by Andres Gonzalez
  • 22 edits in trunk

Implementation of additional attribute caching in the IsolatedTree.
https://bugs.webkit.org/show_bug.cgi?id=204918

Reviewed by Chris Fleizach.

Source/WebCore:

No new tests, no new functionality. Updated several tests to fixed
expected output.

  • Implementation of around 200 methods in the AXIsolatedObject class.
  • The pending method implementations have an ASSERT_NOT_REACHED.
  • Support for dispatching to the main thread some

WebAccessibilityObjectWrapper methods that cannot be run in the
secondary thread.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::createIsolatedTreeHierarchy):
(WebCore::AXObjectCache::generateIsolatedTree):

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

(WebCore::AccessibilityNodeObject::ariaLabeledByText const):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::actionVerb const):
(WebCore::AccessibilityObject::datetimeAttributeValue const):
(WebCore::AccessibilityObject::linkRelValue const):
(WebCore::AccessibilityObject::isInlineText const):
(WebCore::AccessibilityObject::identifierAttribute const):
(WebCore::AccessibilityObject::documentURI const):
(WebCore::AccessibilityObject::documentEncoding const):
(WebCore::AccessibilityObject::sessionID const):
(WebCore::AccessibilityObject::tagName const):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityText::AccessibilityText):
(WebCore::AccessibilityObject::actionVerb const):

  • accessibility/AccessibilityObjectInterface.h: Base implementation for

several isXXX methods that rely on the object roleValue.
(WebCore::AXCoreObject::isImageMap const):
(WebCore::AXCoreObject::isWebArea const):
(WebCore::AXCoreObject::isCheckbox const):
(WebCore::AXCoreObject::isRadioButton const):
(WebCore::AXCoreObject::isListBox const):
(WebCore::AXCoreObject::isSpinButton const):
(WebCore::AXCoreObject::isSwitch const):
(WebCore::AXCoreObject::isToggleButton const):
(WebCore::AXCoreObject::isTabList const):
(WebCore::AXCoreObject::isTabItem const):
(WebCore::AXCoreObject::isRadioGroup const):
(WebCore::AXCoreObject::isComboBox const):
(WebCore::AXCoreObject::isTree const):
(WebCore::AXCoreObject::isTreeGrid const):
(WebCore::AXCoreObject::isTreeItem const):
(WebCore::AXCoreObject::isScrollbar const):
(WebCore::AXCoreObject::isListItem const):
(WebCore::AXCoreObject::isCheckboxOrRadio const):
(WebCore::AXCoreObject::isScrollView const):
(WebCore::AXCoreObject::isCanvas const):
(WebCore::AXCoreObject::isPopUpButton const):
(WebCore::AXCoreObject::isColorWell const):
(WebCore::AXCoreObject::isSplitter const):
(WebCore::AXCoreObject::isToolbar const):
(WebCore::AXCoreObject::isSummary const):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::accessKey const):
(WebCore::AccessibilityRenderObject::actionVerb const):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/AccessibilitySpinButton.h:
  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::setRootNode):
(WebCore::AXIsolatedTree::setRoot): Renamed setRootNode.

  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp: Implementation of

around 200 methods in the AXIsolatedObject class. The methods that are
pending, have a stub implemetation with an ASSERT_NOT_REACHED.
(WebCore::AXIsolatedObject::AXIsolatedObject):
(WebCore::AXIsolatedObject::create):
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::setMathscripts):
(WebCore::AXIsolatedObject::setObjectVectorProperty):
(WebCore::AXIsolatedObject::isDetached const):
(WebCore::AXIsolatedObject::isDetachedFromParent):
(WebCore::AXIsolatedObject::accessibilityText const):
(WebCore::AXIsolatedObject::classList const):
(WebCore::AXIsolatedObject::sessionID const):
(WebCore::AXIsolatedObject::documentURI const):
(WebCore::AXIsolatedObject::preventKeyboardDOMEventDispatch const):
(WebCore::AXIsolatedObject::documentEncoding const):
(WebCore::AXIsolatedObject::insertMathPairs):
(WebCore::AXIsolatedObject::mathPrescripts):
(WebCore::AXIsolatedObject::mathPostscripts):
(WebCore::AXIsolatedObject::scrollBar):
(WebCore::AXIsolatedObject::colorValue const):
(WebCore::AXIsolatedObject::intPointAttributeValue const):
(WebCore::AXIsolatedObject::vectorAttributeValue const):
(WebCore::AXIsolatedObject::optionSetAttributeValue const):
(WebCore::AXIsolatedObject::uint64AttributeValue const):
(WebCore::AXIsolatedObject::urlAttributeValue const):
(WebCore::AXIsolatedObject::colorAttributeValue const):
(WebCore::AXIsolatedObject::floatAttributeValue const):
(WebCore::AXIsolatedObject::fillChildrenVectorForProperty const):
(WebCore::AXIsolatedObject::replaceTextInRange):
(WebCore::AXIsolatedObject::insertText):
(WebCore::AXIsolatedObject::press):
(WebCore::AXIsolatedObject::performDefaultAction):
(WebCore::AXIsolatedObject::isAccessibilityObject const):
(WebCore::AXIsolatedObject::isAccessibilityNodeObject const):
(WebCore::AXIsolatedObject::isAccessibilityRenderObject const):
(WebCore::AXIsolatedObject::isAccessibilityScrollbar const):
(WebCore::AXIsolatedObject::isAccessibilityScrollView const):
(WebCore::AXIsolatedObject::isAccessibilitySVGRoot const):
(WebCore::AXIsolatedObject::isAccessibilitySVGElement const):
(WebCore::AXIsolatedObject::containsText const):
(WebCore::AXIsolatedObject::isAttachmentElement const):
(WebCore::AXIsolatedObject::isNativeImage const):
(WebCore::AXIsolatedObject::isImageButton const):
(WebCore::AXIsolatedObject::isContainedByPasswordField const):
(WebCore::AXIsolatedObject::passwordFieldOrContainingPasswordField):
(WebCore::AXIsolatedObject::isNativeTextControl const):
(WebCore::AXIsolatedObject::isNativeListBox const):
(WebCore::AXIsolatedObject::isListBoxOption const):
(WebCore::AXIsolatedObject::isSliderThumb const):
(WebCore::AXIsolatedObject::isInputSlider const):
(WebCore::AXIsolatedObject::isLabel const):
(WebCore::AXIsolatedObject::isDataTable const):
(WebCore::AXIsolatedObject::isImageMapLink const):
(WebCore::AXIsolatedObject::isNativeSpinButton const):
(WebCore::AXIsolatedObject::isSpinButtonPart const):
(WebCore::AXIsolatedObject::isMockObject const):
(WebCore::AXIsolatedObject::isMediaObject const):
(WebCore::AXIsolatedObject::isARIATextControl const):
(WebCore::AXIsolatedObject::isNonNativeTextControl const):
(WebCore::AXIsolatedObject::isBlockquote const):
(WebCore::AXIsolatedObject::isLandmark const):
(WebCore::AXIsolatedObject::isFigureElement const):
(WebCore::AXIsolatedObject::isKeyboardFocusable const):
(WebCore::AXIsolatedObject::isHovered const):
(WebCore::AXIsolatedObject::isIndeterminate const):
(WebCore::AXIsolatedObject::isLoaded const):
(WebCore::AXIsolatedObject::isOnScreen const):
(WebCore::AXIsolatedObject::isOffScreen const):
(WebCore::AXIsolatedObject::isPressed const):
(WebCore::AXIsolatedObject::isUnvisited const):
(WebCore::AXIsolatedObject::isLinked const):
(WebCore::AXIsolatedObject::isVisible const):
(WebCore::AXIsolatedObject::isCollapsed const):
(WebCore::AXIsolatedObject::isSelectedOptionActive const):
(WebCore::AXIsolatedObject::hasBoldFont const):
(WebCore::AXIsolatedObject::hasItalicFont const):
(WebCore::AXIsolatedObject::hasMisspelling const):
(WebCore::AXIsolatedObject::hasPlainText const):
(WebCore::AXIsolatedObject::hasSameFont const):
(WebCore::AXIsolatedObject::hasSameFontColor const):
(WebCore::AXIsolatedObject::hasSameStyle const):
(WebCore::AXIsolatedObject::isStaticText const):
(WebCore::AXIsolatedObject::hasUnderline const):
(WebCore::AXIsolatedObject::hasHighlighting const):
(WebCore::AXIsolatedObject::element const):
(WebCore::AXIsolatedObject::node const):
(WebCore::AXIsolatedObject::renderer const):
(WebCore::AXIsolatedObject::defaultObjectInclusion const):
(WebCore::AXIsolatedObject::accessibilityIsIgnoredByDefault const):
(WebCore::AXIsolatedObject::stepValueForRange const):
(WebCore::AXIsolatedObject::selectedListItem):
(WebCore::AXIsolatedObject::ariaActiveDescendantReferencingElements const):
(WebCore::AXIsolatedObject::ariaControlsReferencingElements const):
(WebCore::AXIsolatedObject::ariaDescribedByElements const):
(WebCore::AXIsolatedObject::ariaDescribedByReferencingElements const):
(WebCore::AXIsolatedObject::ariaDetailsReferencingElements const):
(WebCore::AXIsolatedObject::ariaErrorMessageReferencingElements const):
(WebCore::AXIsolatedObject::ariaFlowToReferencingElements const):
(WebCore::AXIsolatedObject::ariaLabelledByElements const):
(WebCore::AXIsolatedObject::ariaLabelledByReferencingElements const):
(WebCore::AXIsolatedObject::ariaOwnsReferencingElements const):
(WebCore::AXIsolatedObject::hasDatalist const):
(WebCore::AXIsolatedObject::supportsHasPopup const):
(WebCore::AXIsolatedObject::supportsPressed const):
(WebCore::AXIsolatedObject::supportsChecked const):
(WebCore::AXIsolatedObject::ignoredFromModalPresence const):
(WebCore::AXIsolatedObject::isModalDescendant const):
(WebCore::AXIsolatedObject::isModalNode const):
(WebCore::AXIsolatedObject::elementAccessibilityHitTest const):
(WebCore::AXIsolatedObject::firstChild const):
(WebCore::AXIsolatedObject::lastChild const):
(WebCore::AXIsolatedObject::previousSibling const):
(WebCore::AXIsolatedObject::nextSibling const):
(WebCore::AXIsolatedObject::nextSiblingUnignored const):
(WebCore::AXIsolatedObject::previousSiblingUnignored const):
(WebCore::AXIsolatedObject::parentObjectIfExists const):
(WebCore::AXIsolatedObject::isDescendantOfBarrenParent const):
(WebCore::AXIsolatedObject::isDescendantOfRole const):
(WebCore::AXIsolatedObject::observableObject const):
(WebCore::AXIsolatedObject::correspondingLabelForControlElement const):
(WebCore::AXIsolatedObject::correspondingControlForLabelElement const):
(WebCore::AXIsolatedObject::isPresentationalChildOfAriaRole const):
(WebCore::AXIsolatedObject::ariaRoleHasPresentationalChildren const):
(WebCore::AXIsolatedObject::inheritsPresentationalRole const):
(WebCore::AXIsolatedObject::setAccessibleName):
(WebCore::AXIsolatedObject::hasAttributesRequiredForInclusion const):
(WebCore::AXIsolatedObject::accessibilityDescription const):
(WebCore::AXIsolatedObject::title const):
(WebCore::AXIsolatedObject::helpText const):
(WebCore::AXIsolatedObject::isARIAStaticText const):
(WebCore::AXIsolatedObject::stringValue const):
(WebCore::AXIsolatedObject::text const):
(WebCore::AXIsolatedObject::ariaLabeledByAttribute const):
(WebCore::AXIsolatedObject::ariaDescribedByAttribute const):
(WebCore::AXIsolatedObject::accessibleNameDerivesFromContent const):
(WebCore::AXIsolatedObject::elementsFromAttribute const):
(WebCore::AXIsolatedObject::axObjectCache const):
(WebCore::AXIsolatedObject::anchorElement const):
(WebCore::AXIsolatedObject::actionElement const):
(WebCore::AXIsolatedObject::elementPath const):
(WebCore::AXIsolatedObject::supportsPath const):
(WebCore::AXIsolatedObject::textIteratorBehaviorForTextRange const):
(WebCore::AXIsolatedObject::widget const):
(WebCore::AXIsolatedObject::widgetForAttachmentView const):
(WebCore::AXIsolatedObject::page const):
(WebCore::AXIsolatedObject::document const):
(WebCore::AXIsolatedObject::documentFrameView const):
(WebCore::AXIsolatedObject::frame const):
(WebCore::AXIsolatedObject::mainFrame const):
(WebCore::AXIsolatedObject::topDocument const):
(WebCore::AXIsolatedObject::scrollViewAncestor const):
(WebCore::AXIsolatedObject::childrenChanged):
(WebCore::AXIsolatedObject::textChanged):
(WebCore::AXIsolatedObject::updateAccessibilityRole):
(WebCore::AXIsolatedObject::addChildren):
(WebCore::AXIsolatedObject::addChild):
(WebCore::AXIsolatedObject::insertChild):
(WebCore::AXIsolatedObject::shouldIgnoreAttributeRole const):
(WebCore::AXIsolatedObject::canHaveChildren const):
(WebCore::AXIsolatedObject::hasChildren const):
(WebCore::AXIsolatedObject::setNeedsToUpdateChildren):
(WebCore::AXIsolatedObject::setNeedsToUpdateSubtree):
(WebCore::AXIsolatedObject::clearChildren):
(WebCore::AXIsolatedObject::needsToUpdateChildren const):
(WebCore::AXIsolatedObject::detachFromParent):
(WebCore::AXIsolatedObject::shouldFocusActiveDescendant const):
(WebCore::AXIsolatedObject::activeDescendant const):
(WebCore::AXIsolatedObject::handleActiveDescendantChanged):
(WebCore::AXIsolatedObject::handleAriaExpandedChanged):
(WebCore::AXIsolatedObject::isDescendantOfObject const):
(WebCore::AXIsolatedObject::isAncestorOfObject const):
(WebCore::AXIsolatedObject::firstAnonymousBlockChild const):
(WebCore::AXIsolatedObject::hasAttribute const):
(WebCore::AXIsolatedObject::getAttribute const):
(WebCore::AXIsolatedObject::hasTagName const):
(WebCore::AXIsolatedObject::stringValueForMSAA const):
(WebCore::AXIsolatedObject::stringRoleForMSAA const):
(WebCore::AXIsolatedObject::nameForMSAA const):
(WebCore::AXIsolatedObject::descriptionForMSAA const):
(WebCore::AXIsolatedObject::roleValueForMSAA const):
(WebCore::AXIsolatedObject::passwordFieldValue const):
(WebCore::AXIsolatedObject::liveRegionAncestor const):
(WebCore::AXIsolatedObject::hasContentEditableAttributeSet const):
(WebCore::AXIsolatedObject::supportsReadOnly const):
(WebCore::AXIsolatedObject::supportsAutoComplete const):
(WebCore::AXIsolatedObject::supportsARIAAttributes const):
(WebCore::AXIsolatedObject::scrollByPage const):
(WebCore::AXIsolatedObject::scrollPosition const):
(WebCore::AXIsolatedObject::scrollContentsSize const):
(WebCore::AXIsolatedObject::scrollVisibleContentRect const):
(WebCore::AXIsolatedObject::scrollToMakeVisible const):
(WebCore::AXIsolatedObject::lastKnownIsIgnoredValue):
(WebCore::AXIsolatedObject::setLastKnownIsIgnoredValue):
(WebCore::AXIsolatedObject::notifyIfIgnoredValueChanged):
(WebCore::AXIsolatedObject::isMathScriptObject const):
(WebCore::AXIsolatedObject::isMathMultiscriptObject const):
(WebCore::AXIsolatedObject::isAXHidden const):
(WebCore::AXIsolatedObject::isDOMHidden const):
(WebCore::AXIsolatedObject::isHidden const):
(WebCore::AXIsolatedObject::overrideAttachmentParent):
(WebCore::AXIsolatedObject::accessibilityIgnoreAttachment const):
(WebCore::AXIsolatedObject::accessibilityPlatformIncludesObject const):
(WebCore::AXIsolatedObject::hasApplePDFAnnotationAttribute const):
(WebCore::AXIsolatedObject::ancestorAccessibilityScrollView const):
(WebCore::AXIsolatedObject::setIsIgnoredFromParentData):
(WebCore::AXIsolatedObject::clearIsIgnoredFromParentData):
(WebCore::AXIsolatedObject::setIsIgnoredFromParentDataForChild):

  • accessibility/isolatedtree/AXIsolatedTreeNode.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Added

dispatching to the main thread some of the methods that cannot be run
in the secondary thread.
(performAccessibilityFunctionOnMainThread):
(retrieveAccessibilityValueFromMainThread):
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper screenToContents:]):
(-[WebAccessibilityObjectWrapper renderWidgetChildren]):
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
(-[WebAccessibilityObjectWrapper associatedPluginParent]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper scrollViewParent]):
(-[WebAccessibilityObjectWrapper windowElement:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper _accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):
(-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):

LayoutTests:

The AXStart/EndTextMarker attributes were being computed for
AccessibilityObjects that had a renderer object. With this change,
AXStart/EndTextMarker are computed for all AccessibilityObjects. Thus
the expected output for the following tests changed from null value for
these attributes to valid object values.

  • accessibility/image-map2-expected.txt:
  • accessibility/mac/document-links-expected.txt:
  • accessibility/table-attributes-expected.txt:
  • accessibility/table-sections-expected.txt:
12:16 PM Changeset in webkit [253260] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove invalid assertion in FTL's allocateJSArray().
https://bugs.webkit.org/show_bug.cgi?id=204987
<rdar://problem/57280725>

Reviewed by Saam Barati.

The assertion (in the compiler thread) does not take into account that the mutator
may be in the process of transiting to HavingABadTime. As a result, the assertion
may fail intermittently. This patch fixes this issue by removing this bad
assertion.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):

11:53 AM Changeset in webkit [253259] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] Initialize InlineLayoutUnit variables to 0
https://bugs.webkit.org/show_bug.cgi?id=204989

Reviewed by Antti Koivisto.

This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::wordBreakingBehavior const):

  • layout/inlineformatting/InlineLineBreaker.h:
  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::justifyRuns const):
(WebCore::Layout::LineBuilder::TrimmableContent::append):
(WebCore::Layout::LineBuilder::TrimmableContent::trim):
(WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):

  • layout/inlineformatting/InlineLineBuilder.h:
  • layout/inlineformatting/text/TextUtil.h:
11:04 AM Changeset in webkit [253258] by Alan Bujtas
  • 7 edits
    1 add in trunk/Source/WebCore

[LFC][IFC] Introduce InlineRect
https://bugs.webkit.org/show_bug.cgi?id=204988
<rdar://problem/57729049>

Reviewed by Antti Koivisto.

This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.

  • WebCore.xcodeproj/project.pbxproj:
  • layout/LayoutUnits.h:
  • layout/displaytree/DisplayInlineRect.h: Added.

(WebCore::Display::InlineRect::expandHorizontally):
(WebCore::Display::InlineRect::expandVertically):
(WebCore::Display::InlineRect::invalidateTop):
(WebCore::Display::InlineRect::invalidateLeft):
(WebCore::Display::InlineRect::invalidateWidth):
(WebCore::Display::InlineRect::invalidateHeight):
(WebCore::Display::InlineRect::hasValidPosition const):
(WebCore::Display::InlineRect::hasValidSize const):
(WebCore::Display::InlineRect::hasValidGeometry const):
(WebCore::Display::InlineRect::InlineRect):
(WebCore::Display::InlineRect::invalidatePosition):
(WebCore::Display::InlineRect::setHasValidPosition):
(WebCore::Display::InlineRect::setHasValidSize):
(WebCore::Display::InlineRect::top const):
(WebCore::Display::InlineRect::left const):
(WebCore::Display::InlineRect::bottom const):
(WebCore::Display::InlineRect::right const):
(WebCore::Display::InlineRect::topLeft const):
(WebCore::Display::InlineRect::size const):
(WebCore::Display::InlineRect::width const):
(WebCore::Display::InlineRect::height const):
(WebCore::Display::InlineRect::setTopLeft):
(WebCore::Display::InlineRect::setTop):
(WebCore::Display::InlineRect::setLeft):
(WebCore::Display::InlineRect::setWidth):
(WebCore::Display::InlineRect::setHeight):
(WebCore::Display::InlineRect::moveHorizontally):
(WebCore::Display::InlineRect::moveVertically):
(WebCore::Display::InlineRect::expand):
(WebCore::Display::InlineRect::operator InlineLayoutRect const):

  • layout/displaytree/DisplayLineBox.h:

(WebCore::Display::LineBox::LineBox):

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::logicalRect const):
(WebCore::Display::Run::setLogicalLeft):
(WebCore::Display::Run::Run):
(WebCore::Display::Run::setLogicalRight): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::ContinousContent::close):
(WebCore::Layout::LineBuilder::Run::Run):
(WebCore::Layout::LineBuilder::initialize):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::Run::logicalRect const):

10:56 AM Changeset in webkit [253257] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Build fix for: The compiler thread should not adjust Identifier refCounts.
https://bugs.webkit.org/show_bug.cgi?id=204919
<rdar://problem/57426861>

Not reviewed.

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeFor):

10:46 AM Changeset in webkit [253256] by david_quesada@apple.com
  • 6 edits in trunk/Source/WebKit

REGRESSION(r253231): Debug assertion failures under ~WebDeviceOrientationUpdateProvider(Proxy)
https://bugs.webkit.org/show_bug.cgi?id=204977
rdar://problem/57724251

Reviewed by Per Arne Vollan.

In the UI process, have the WebPageProxy swap out its WebDeviceOrientationUpdateProviderProxy whenever
it connects to a new process, instead of creating one on construction and holding onto it for the rest
of the WebPageProxy lifetime. The …UpdateProviderProxy assumes that its page will have the same ID
at the time of registering as a message receiver and later unregistering, but the page ID could change
if the WebPageProxy swaps web processes. Using a new instance per web page ID ensures that the
updater is always able to successfully remove itself as a message receiver when deallocating.

In the Web process, ~WebDeviceOrientationUpdateProvider() should remove itself as a message receiver
specifically for its page ID, rather than as a global message receiver.

No new tests -- existing tests (at least the ProcessSwap API tests) revealed the regression.

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_tryCloseTimeoutTimer):
(WebKit::WebPageProxy::didAttachToRunningProcess):
(WebKit::WebPageProxy::resetState):
(WebKit::m_webDeviceOrientationUpdateProviderProxy): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h:
  • WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp:

(WebKit::WebDeviceOrientationUpdateProvider::WebDeviceOrientationUpdateProvider):
(WebKit::WebDeviceOrientationUpdateProvider::~WebDeviceOrientationUpdateProvider):

  • WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.h:
10:18 AM Changeset in webkit [253255] by Alan Bujtas
  • 15 edits in trunk/Source/WebCore

[LFC][IFC] Introduce InlineLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=204986
<rdar://problem/57728333>

Reviewed by Antti Koivisto.

While IFC uses LayoutUnit type solely to compute inline geometry, complex line layout (CLL) has
adopted several different types over time (int, float and LayoutUnit). These types all have different precisions.
In order to match CLL's output (inline tree geometry) IFC needs to use a type that has
roughly the same precision as what CLL uses.
LayoutUnit currently does not have high enough precision (1/64) to produce matching results.
This patch introduces InlineLayoutUnit. It is going to be mapped to 'float' for now (in a subsequent patch).
It helps to keep one uniform type across the IFC codebase and we could also just re-map it to something
more appropriate in the future.

  • layout/LayoutUnits.h:
  • layout/displaytree/DisplayLineBox.h:

(WebCore::Display::LineBox::Baseline::height const):
(WebCore::Display::LineBox::logicalLeft const):
(WebCore::Display::LineBox::logicalRight const):
(WebCore::Display::LineBox::logicalTop const):
(WebCore::Display::LineBox::logicalBottom const):
(WebCore::Display::LineBox::logicalWidth const):
(WebCore::Display::LineBox::logicalHeight const):
(WebCore::Display::LineBox::setLogicalHeight):
(WebCore::Display::LineBox::setLogicalWidth):
(WebCore::Display::LineBox::moveHorizontally):
(WebCore::Display::LineBox::expandHorizontally):
(WebCore::Display::LineBox::shrinkHorizontally):
(WebCore::Display::LineBox::expandVertically):
(WebCore::Display::LineBox::shrinkVertically):
(WebCore::Display::LineBox::LineBox):
(WebCore::Display::LineBox::setLogicalHeightIfGreater):
(WebCore::Display::LineBox::setBaselineOffsetIfGreater):
(WebCore::Display::LineBox::setAscentIfGreater):
(WebCore::Display::LineBox::setDescentIfGreater):
(WebCore::Display::LineBox::baselineOffset const):
(WebCore::Display::LineBox::Baseline::Baseline):
(WebCore::Display::LineBox::Baseline::setAscent):
(WebCore::Display::LineBox::Baseline::setDescent):
(WebCore::Display::LineBox::Baseline::ascent const):
(WebCore::Display::LineBox::Baseline::descent const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
(WebCore::Layout::InlineFormattingContext::constraintsForLine):

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

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

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::shouldWrapFloatBox):
(WebCore::Layout::LineBreaker::wordBreakingBehavior const):
(WebCore::Layout::LineBreaker::tryBreakingTextRun const):
(WebCore::Layout::LineBreaker::Content::append):

  • layout/inlineformatting/InlineLineBreaker.h:

(WebCore::Layout::LineBreaker::Content::width const):
(WebCore::Layout::LineBreaker::Content::nonTrimmableWidth const):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::Run::setComputedHorizontalExpansion):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::justifyRuns const):
(WebCore::Layout::LineBuilder::alignContentHorizontally const):
(WebCore::Layout::LineBuilder::moveLogicalLeft):
(WebCore::Layout::LineBuilder::moveLogicalRight):
(WebCore::Layout::LineBuilder::append):
(WebCore::Layout::LineBuilder::appendNonBreakableSpace):
(WebCore::Layout::LineBuilder::appendInlineContainerStart):
(WebCore::Layout::LineBuilder::appendInlineContainerEnd):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
(WebCore::Layout::LineBuilder::appendReplacedInlineBox):
(WebCore::Layout::LineBuilder::runContentHeight const):
(WebCore::Layout::LineBuilder::halfLeadingMetrics):
(WebCore::Layout::LineBuilder::TrimmableContent::append):
(WebCore::Layout::LineBuilder::TrimmableContent::trim):
(WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):
(WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun):
(WebCore::Layout::LineBuilder::InlineItemRun::trailingLetterSpacing const):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::availableWidth const):
(WebCore::Layout::LineBuilder::trailingTrimmableWidth const):
(WebCore::Layout::LineBuilder::Run::adjustLogicalTop):
(WebCore::Layout::LineBuilder::Run::moveHorizontally):
(WebCore::Layout::LineBuilder::Run::moveVertically):
(WebCore::Layout::LineBuilder::Run::setLogicalHeight):
(WebCore::Layout::LineBuilder::logicalTop const):
(WebCore::Layout::LineBuilder::logicalBottom const):
(WebCore::Layout::LineBuilder::logicalLeft const):
(WebCore::Layout::LineBuilder::logicalRight const):
(WebCore::Layout::LineBuilder::logicalWidth const):
(WebCore::Layout::LineBuilder::logicalHeight const):
(WebCore::Layout::LineBuilder::contentLogicalWidth const):
(WebCore::Layout::LineBuilder::contentLogicalRight const):
(WebCore::Layout::LineBuilder::baselineOffset const):
(WebCore::Layout::LineBuilder::InlineItemRun::logicalLeft const):
(WebCore::Layout::LineBuilder::InlineItemRun::logicalWidth const):
(WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally):
(WebCore::Layout::LineBuilder::TrimmableContent::width const):

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):
(WebCore::Layout::InlineTextItem::createWhitespaceItem):
(WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
(WebCore::Layout::InlineTextItem::InlineTextItem):

  • layout/inlineformatting/InlineTextItem.h:

(WebCore::Layout::InlineTextItem::width const):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::inlineItemWidth):

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):
(WebCore::Layout::TextUtil::fixedPitchWidth):
(WebCore::Layout::TextUtil::split):

  • layout/inlineformatting/text/TextUtil.h:
7:21 AM Changeset in webkit [253254] by Antti Koivisto
  • 10 edits
    1 move
    1 add in trunk/Source/WebCore

[LFC][IFC] Move LineBox to Display namespace
https://bugs.webkit.org/show_bug.cgi?id=204984

Reviewed by Zalan Bujtas.

It is a display type, like Display::Run.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/displaytree/DisplayInlineContent.cpp: Added.

Also added a cpp for Display::InlineContent.

(WebCore::Display:: const):

  • layout/displaytree/DisplayInlineContent.h:

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

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

(WebCore::Display::LineBox::LineBox):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

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

  • layout/inlineformatting/InlineFormattingState.h:
  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::halfLeadingMetrics):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::lineBox const):

  • layout/inlineformatting/LineLayoutContext.h:
6:49 AM Changeset in webkit [253253] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add support for breaking at previous breaking opportunities when the overflown content is unbreakable
https://bugs.webkit.org/show_bug.cgi?id=204985
<rdar://problem/57727436>

Reviewed by Antti Koivisto.

<span>first</span><span style="word-break: break-all">second</span><span>third</span

In case of multiple runs in one commit content [firstsecondthrid], if the overflown run [thrid] does not have
a breaking opportunity, we need to backtrack the last breakable run [second] and break right there. ->

"firstsecond
third"

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::isContentWrappingAllowed):
(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::wordBreakingBehavior const):

6:02 AM Changeset in webkit [253252] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Fix css1/formatting_model/floating_elements.html
https://bugs.webkit.org/show_bug.cgi?id=204983
<rdar://problem/57727197>

Reviewed by Antti Koivisto.

Adjacent non-whitespace inline items are guaranteed to be on commit boundary when they both belong
to the same layout box (<div>text-content</div> [text-][content] vs <div>textcontent</div> [textcontent]).

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::Content::isAtContentBoundary):

5:56 AM Changeset in webkit [253251] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

[LFC][Integration] Layout test assert and crash fixes
https://bugs.webkit.org/show_bug.cgi?id=204982

Reviewed by Zalan Bujtas.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::textBoxesFor const):

Don't 0-initialize Optional.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):

Remember to add line break renderer to the renderer->layout box map.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):

Invalidate layout path with LFC.

(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):

Call LFC baseline functions.

5:46 AM Changeset in webkit [253250] by jh718.park@samsung.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Remove the build warning below since r250009.
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

This patch typecasts the "maybe signed" one as unsigned, which is the
same what the compilers would do, but making the typecast explicit
so that the warning go away.

  • b3/air/testair.cpp:
5:30 AM Changeset in webkit [253249] by timothy_horton@apple.com
  • 29 edits in trunk/Source

Implement encoding for DrawImage and DrawRoundedRect display list items
https://bugs.webkit.org/show_bug.cgi?id=204881

Reviewed by Simon Fraser.

Source/WebCore:

Make InterpolationQuality an enum class.
Make ImagePaintingOptions and all of its children encodable.
Make DrawImage and DrawRoundedRect encodable.
Add ImageHandle, which right now just wraps WebCore::Image, but
later could carry identifiers. This allows us to implement image encoding
in WebKit code, which can then use ShareableBitmap to A) decode the image
in the Web Content process and B) use shared memory to transmit the
decoded image data to the GPU process.

  • html/CanvasBase.cpp:
  • html/ImageBitmap.cpp:

(WebCore::interpolationQualityForResizeQuality):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::smoothingToInterpolationQuality):
(WebCore::CanvasRenderingContext2DBase::setImageSmoothingEnabled):

  • platform/graphics/DecodingOptions.h:
  • platform/graphics/GraphicsContext.h:

(WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):

  • platform/graphics/GraphicsTypes.h:
  • platform/graphics/ImageOrientation.h:
  • platform/graphics/ImagePaintingOptions.h:

(WebCore::ImagePaintingOptions::ImagePaintingOptions):
(WebCore::ImagePaintingOptions::encode const):
(WebCore::ImagePaintingOptions::decode):

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::MediaPlayerPrivateAVFoundationCF::paint):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::drawSurface):

  • platform/graphics/cg/GraphicsContext3DCG.cpp:

(WebCore::GraphicsContext3D::paintToCanvas):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::convertInterpolationQuality):
(WebCore::GraphicsContext::setPlatformImageInterpolationQuality):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::FillRoundedRect::FillRoundedRect):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::DrawImage::encode const):
(WebCore::DisplayList::DrawImage::decode):
(WebCore::DisplayList::FillRoundedRect::create):
(WebCore::DisplayList::FillRoundedRect::encode const):
(WebCore::DisplayList::FillRoundedRect::decode):
(WebCore::DisplayList::Item::encode const):
(WebCore::DisplayList::Item::decode):
(WebCore::DisplayList::FillRoundedRect::FillRoundedRect): Deleted.

  • platform/graphics/ios/IconIOS.mm:

(WebCore::Icon::paint):

  • platform/graphics/texmap/BitmapTexture.cpp:

(WebCore::BitmapTexture::updateContents):

  • platform/graphics/win/GraphicsContextDirect2D.cpp:

(WebCore::GraphicsContext::setPlatformImageInterpolationQuality):

  • platform/ios/wak/WAKView.mm:

(toCGInterpolationQuality):

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::imageBuffer const):

  • rendering/ImageQualityController.cpp:

(WebCore::ImageQualityController::interpolationQualityFromStyle):
(WebCore::ImageQualityController::chooseInterpolationQuality):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintIntoRect):

Source/WebKit:

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DisplayList::ImageHandle>::encode):
(IPC::ArgumentCoder<DisplayList::ImageHandle>::decode):

  • Shared/WebCoreArgumentCoders.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

3:22 AM Changeset in webkit [253248] by timothy_horton@apple.com
  • 9 edits in trunk/Source/WebCore

macCatalyst: REGRESSION (r251320): WebKit-native media controls do not respond to hover or click
https://bugs.webkit.org/show_bug.cgi?id=204543
<rdar://problem/57208621>

Reviewed by Antoine Quint.

Adopt pointer events for media controls, in order to make them input-device agnostic.

  • Modules/modern-media-controls/controls/auto-hide-controller.js:

(AutoHideController):
(AutoHideController.prototype.set fadesWhileIdle):
(AutoHideController.prototype.handleEvent):
(AutoHideController.prototype._autoHideTimerFired):
Instead of tracking state in a single bit (_disableAutoHiding), keep track
of sets of pointers that are active, for hover and for actual touch/click.

  • Modules/modern-media-controls/controls/slider.js:

(Slider.prototype.handleEvent):
(Slider.prototype._handlePointerdownEvent):
(Slider.prototype._handlePointerupEvent):
(Slider.prototype._handleMousedownEvent): Deleted.
(Slider.prototype._handleTouchstartEvent): Deleted.
(Slider.prototype._handleMouseupEvent): Deleted.
(Slider.prototype._handleTouchendEvent): Deleted.
Adopt pointer events.

  • Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js:

(GestureRecognizer):
(GestureRecognizer.prototype.get numberOfTouches):
(GestureRecognizer.prototype.locationInElement):
(GestureRecognizer.prototype.locationInClient):
(GestureRecognizer.prototype.touchesBegan):
(GestureRecognizer.prototype.handleEvent):
(GestureRecognizer.prototype._updateBaseListeners):
(GestureRecognizer.prototype._removeTrackingListeners):
(GestureRecognizer.prototype._updateTargetTouches):
(GestureRecognizer.prototype.locationOfTouchInElement): Deleted.
Instead of keeping track of Touches, keep track of the currently-active set of PointerEvents.
We just store events by pointerId, and update them when they change, so we can
later retrieve e.g. points.
Remove locationOfTouchInElement which seems to not be used.

  • html/RangeInputType.cpp:
  • html/RangeInputType.h:
  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::dragFrom):
(WebCore::SliderThumbElement::defaultEventHandler):

  • html/shadow/SliderThumbElement.h:

Allow range inputs to accept mouse events everywhere.

  • WebCore.xcodeproj/project.pbxproj:

Add some missing files to the project.

2:00 AM Changeset in webkit [253247] by ysuzuki@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

[JSC] Put JSWrapperObject derived classes in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204976

Reviewed by Mark Lam.

Put JSWrapperObject derived classes in IsoSubspace.

  1. StringObject
  2. NumberObject
  3. SymbolObject
  4. BigIntObject
  5. BooleanObject
  • runtime/BigIntObject.h:
  • runtime/BooleanObject.h:

(JSC::BooleanObject::subspaceFor):

  • runtime/BooleanPrototype.h:
  • runtime/JSWrapperObject.h:

(JSC::JSWrapperObject::subspaceFor):

  • runtime/NumberObject.h:

(JSC::NumberObject::subspaceFor):

  • runtime/NumberPrototype.h:
  • runtime/StringObject.h:

(JSC::StringObject::subspaceFor):

  • runtime/StringPrototype.h:
  • runtime/SymbolObject.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
1:28 AM Changeset in webkit [253246] by Devin Rousso
  • 8 edits in trunk/Source

Web Inspector: non-regex Local Overrides and Script Blackboxing shouldn't apply to scripts that just contain the URL
https://bugs.webkit.org/show_bug.cgi?id=204954

Reviewed by Joseph Pecoraro.

If isRegex is false, add ^ and $ to the beginning and end of the search string to
ensure that the search string is exactly matched, not just contained within the potentially
intercepted URL.

This doesn't actually change functionality because the Web Inspector frontend wouldn't
replace the network response for these containing matches, as the frontend JavaScript
already correctly performed this logic, and would therefore Network.interceptContinue.

Source/JavaScriptCore:

  • inspector/ContentSearchUtilities.h:
  • inspector/ContentSearchUtilities.cpp:

(Inspector::ContentSearchUtilities::escapeStringForRegularExpressionSource): Added.
(Inspector::ContentSearchUtilities::createRegularExpressionForSearchString): Added.
(Inspector::ContentSearchUtilities::searchInTextByLines):
(Inspector::ContentSearchUtilities::createSearchRegexSource): Deleted.
(Inspector::ContentSearchUtilities::createSearchRegex): Deleted.
Rename functions for clarity.

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::shouldBlackboxURL const):

Source/WebCore:

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::shouldIntercept):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::breakOnURLIfNeeded):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::searchInResources):
Use renamed ContentSearchUtilities function.

12:42 AM Changeset in webkit [253245] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/bmalloc

[bmalloc] Decommit unused region in chunk metadata.
https://bugs.webkit.org/show_bug.cgi?id=204810

Reviewed by Yusuke Suzuki.

There is an unused memory region from just after Chunk object to next page border.
We can decommit those memory to kernel at the initialization of Chunk.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::allocateSmallChunk):

Dec 6, 2019:

11:50 PM Changeset in webkit [253244] by zandobersek@gmail.com
  • 6 edits in trunk/Source

[GTK][WPE] Use bmalloc's memory footprint API for JSC heap growth management
https://bugs.webkit.org/show_bug.cgi?id=204576

Reviewed by Saam Barati.

Source/JavaScriptCore:

Use the new USE(BMALLOC_MEMORY_FOOTPRINT_API) build guard to enable
bmalloc-based JSC heap growth management on iOS family ports as well
as additionally the Linux-based ports, if the configuration allows it
(i.e. system malloc enforcement kept disabled).

  • heap/Heap.cpp:

(JSC::Heap::overCriticalMemoryThreshold):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::collectIfNecessaryOrDefer):

  • heap/Heap.h:

Initialize the two member variables and fix a typo in one of them.

  • runtime/Options.cpp:

(JSC::overrideDefaults):
Also guard two default overrides with the new flag.

Source/WTF:

Add the new USE_BMALLOC_MEMORY_FOOTPRINT_API, enabled for the iOS-family
ports and the Linux ports, as long as system malloc enforcement is
disabled and bmalloc is subsequently built and used. The flag is used in
JavaScriptCore to enable usage of bmalloc's memory footprint API for
JSC heap growth control.

  • wtf/Platform.h:
10:07 PM Changeset in webkit [253243] by mark.lam@apple.com
  • 14 edits
    1 add in trunk

The compiler thread should not adjust Identifier refCounts.
https://bugs.webkit.org/show_bug.cgi?id=204919
<rdar://problem/57426861>

Reviewed by Saam Barati.

JSTests:

  • stress/compiler-thread-should-not-ref-identifiers.js: Added.

Source/JavaScriptCore:

  1. Previously, in the compiler thread, we would get a Symbol uid via Symbol::privateName().uid(). Symbol::privateName() returns a copy of its PrivateName, which in turn results in ref'ing the underlying SymbolImpl. This results in a race between the mutator and compiler threads to adjust the SymbolImpl's refCount, which may result in corruption.

This patch fixes this by adding Symbol::uid() which return the underlying
SymbolImpl without ref'ing it.

  1. Previously, in the compiler thread, we also create Box<Identifier> via its copy constructor. The original Box<Identifier> is instantiated in the mutator. The Box<Identifier> refs its internal Data, which is ThreadSafeRefCounted and shared by all Box<Identifier> for the same underlying Identifier. This ensures that the compiler thread does not ref the underlying Identifier.

However, when the Box<Identifier> is destructed, it will also check if it holds
the last ref to its internal Data. If so, it will destruct its Data, and the
Identifier that it embeds. This results in the compiler thread trying to deref
the StringImpl referenced by the Identifier in a race against the mutator.

This patch fixes this by ensuring that for any Box<Identifier> instance used
by the compiler thread, we will register another instance in the DFG::Plan
m_identifiersKeptAliveForCleanUp list, and let the mutator destruct that
Box<Identifier> later in the mutator. This ensures that the compiler thread
will never see the last reference to a Box<Identifier>'s internal Data and
avoid the race.

  1. This patch also fixes the DFG::Worklist code to ensure that a DFG::Plan is always destructed in the mutator, even if the Plan was cancelled.

This, in turn, enables us to assert that the Plan is never destructed in the
compiler thread.

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeFor):
(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/GetByStatus.h:
  • debugger/Debugger.cpp:

(JSC::Debugger::detach):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::~Plan):
(JSC::DFG::Plan::computeCompileTimes const):
(JSC::DFG::Plan::cancel):

  • dfg/DFGPlan.h:

(JSC::DFG::Plan::unnukedVM const):
(JSC::DFG::Plan::keepAliveIdentifier):
(JSC::DFG::Plan::nuke):
(JSC::DFG::Plan::unnuke):

  • dfg/DFGSafepoint.cpp:

(JSC::DFG::Safepoint::cancel):

  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::deleteCancelledPlansForVM):
(JSC::DFG::Worklist::removeAllReadyPlansForVM):
(JSC::DFG::Worklist::removeDeadPlans):
(JSC::DFG::Worklist::removeNonCompilingPlansForVM):

  • dfg/DFGWorklist.h:
  • runtime/Symbol.h:
10:06 PM Changeset in webkit [253242] by Devin Rousso
  • 67 edits in trunk

Web Inspector: Uncaught Exception: Missing node for given nodeId
https://bugs.webkit.org/show_bug.cgi?id=204519

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

When a DOM node is removed from the main DOM tree, the InspectorDOMAgent invalidates the
DOM.NodeId that was previously assigned to that DOM node, meaning that any future commands
sent by the frontend with that DOM.NodeId will fail.

Add logic to mark WI.DOMNode as being destroyed when this happens so the frontend can
decide to not invoke any commands with that DOM.NodeId.

Many functions have also switched to expecting a WI.DOMNode instead of a DOM.NodeId or
have been moved to WI.DOMNode.prototype in order to also be able to use destroyed.

This issue will eventually be mitigated by <https://webkit.org/b/189687>.

  • UserInterface/Models/DOMNode.js:

(WI.DOMNode):
(WI.DOMNode.prototype.get destroyed): Added.
(WI.DOMNode.prototype.get attached):
(WI.DOMNode.prototype.markDestroyed): Added.
(WI.DOMNode.prototype.setNodeName):
(WI.DOMNode.prototype.setNodeValue):
(WI.DOMNode.prototype.setAttribute):
(WI.DOMNode.prototype.setAttributeValue):
(WI.DOMNode.prototype.querySelector): Added.
(WI.DOMNode.prototype.querySelectorAll): Added.
(WI.DOMNode.prototype.highlight): Added.
(WI.DOMNode.prototype.getOuterHTML):
(WI.DOMNode.prototype.setOuterHTML):
(WI.DOMNode.prototype.removeNode):
(WI.DOMNode.prototype.getEventListeners):

  • UserInterface/Base/DOMUtilities.js:

(WI.bindInteractionsForNodeToElement):

  • UserInterface/Controllers/DOMManager.js:

(WI.DOMManager.buildHighlightConfig):
(WI.DOMManager.wrapClientCallback):
(WI.DOMManager.prototype._loadNodeAttributes):
(WI.DOMManager.prototype._setDocument):
(WI.DOMManager.prototype._unbind):
(WI.DOMManager.prototype.highlightDOMNodeList):
(WI.DOMManager.prototype.highlightSelector):
(WI.DOMManager.prototype.hideDOMNodeHighlight):
(WI.DOMManager.prototype.highlightDOMNodeForTwoSeconds):
(WI.DOMManager.prototype.set inspectModeEnabled):
(WI.DOMManager.prototype.setInspectedNode):
(WI.DOMManager.prototype.setEventListenerDisabled):
(WI.DOMManager.prototype._wrapClientCallback): Deleted.
(WI.DOMManager.prototype.querySelector): Deleted.
(WI.DOMManager.prototype.querySelectorAll): Deleted.
(WI.DOMManager.prototype.highlightDOMNode): Deleted.
(WI.DOMManager.prototype._buildHighlightConfig): Deleted.

  • UserInterface/Models/AuditTestCaseResult.js:

(WI.AuditTestCaseResult.async fromPayload):

  • UserInterface/Models/MediaTimelineRecord.js:

(WI.MediaTimelineRecord.async fromJSON):

  • UserInterface/Protocol/RemoteObject.js:

(WI.RemoteObject.resolveNode):

  • UserInterface/Views/BoxModelDetailsSectionRow.js:

(WI.BoxModelDetailsSectionRow.prototype._highlightDOMNode):

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView.prototype._contentViewMouseEnter):

  • UserInterface/Views/CanvasTreeElement.js:

(WI.CanvasTreeElement.prototype._handleMouseOver):

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForDOMNode):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WI.DOMNodeDetailsSidebarPanel.prototype.layout):

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype._domTreeSelectionDidChange):

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype.get editable):
(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):

  • UserInterface/Views/DOMTreeElementPathComponent.js:

(WI.DOMTreeElementPathComponent.prototype.mouseOver):

  • UserInterface/Views/DOMTreeOutline.js:

(WI.DOMTreeOutline.prototype.get editable):
(WI.DOMTreeOutline.prototype.populateContextMenu):
(WI.DOMTreeOutline.prototype._onmousemove):
(WI.DOMTreeOutline.prototype._ondragstart):
(WI.DOMTreeOutline.prototype._ondragover):
(WI.DOMTreeOutline.prototype._ondragleave):
(WI.DOMTreeOutline.prototype._ondragend):
(WI.DOMTreeOutline.prototype._hideElements):

  • UserInterface/Views/FormattedValue.js:

(WI.FormattedValue.createElementForNodePreview):

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:

(WI.GeneralStyleDetailsSidebarPanel.prototype.layout):

  • UserInterface/Views/LayerDetailsSidebarPanel.js:

(WI.LayerDetailsSidebarPanel.prototype._dataGridMouseMove):

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WI.LayerTreeDetailsSidebarPanel.prototype.layout):
(WI.LayerTreeDetailsSidebarPanel.prototype._highlightSelectedNode):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype._highlightNodesWithSelector):

LayoutTests:

  • http/tests/inspector/dom/cross-domain-inspected-node-access.html:
  • http/tests/inspector/dom/didFireEvent.html:
  • http/tests/inspector/network/resource-initiatorNode.html:
  • inspector/console/command-line-api.html:
  • inspector/css/add-css-property.html:
  • inspector/css/css-property.html:
  • inspector/css/force-page-appearance.html:
  • inspector/css/generateCSSRuleString.html:
  • inspector/css/matched-style-properties.html:
  • inspector/css/modify-css-property-race.html:
  • inspector/css/modify-css-property.html:
  • inspector/css/modify-inline-style.html:
  • inspector/css/modify-rule-selector.html:
  • inspector/css/overridden-property.html:
  • inspector/css/pseudo-element-matches-for-pseudo-element-node.html:
  • inspector/css/pseudo-element-matches.html:
  • inspector/css/resolve-variable-value.html:
  • inspector/css/selector-dynamic-specificity.html:
  • inspector/css/selector-specificity.html:
  • inspector/css/shadow-scoped-style.html:
  • inspector/css/stylesheet-with-mutations.html:
  • inspector/dom-debugger/attribute-modified-style.html:
  • inspector/dom-debugger/dom-breakpoints.html:
  • inspector/dom/attributeModified.html:
  • inspector/dom/breakpoint-for-event-listener.html:
  • inspector/dom/csp-big5-hash.html:
  • inspector/dom/csp-hash.html:
  • inspector/dom/customElementState.html:
  • inspector/dom/domutilities-csspath.html:
  • inspector/dom/domutilities-path-dump.html:
  • inspector/dom/domutilities-xpath.html:
  • inspector/dom/event-listener-inspected-node.html:
  • inspector/dom/getEventListenersForNode.html:
  • inspector/dom/getOuterHTML.html:
  • inspector/dom/insertAdjacentHTML.html:
  • inspector/dom/pseudo-element-dynamic.html:
  • inspector/dom/pseudo-element-static.html:
  • inspector/dom/setAllowEditingUserAgentShadowTrees.html:
  • inspector/dom/setInspectedNode.html:
  • inspector/dom/setOuterHTML.html:
  • inspector/dom/shadow-and-non-shadow-children.html:
  • inspector/dom/shadowRootType.html:
  • inspector/dom/template-content.html:
  • inspector/model/dom-node.html:
  • inspector/page/hidpi-snapshot-size.html:
10:04 PM Changeset in webkit [253241] by Devin Rousso
  • 16 edits in trunk/Source/WebInspectorUI

Web Inspector: saving a file with the url "/" suggest the name "Untitled"
https://bugs.webkit.org/show_bug.cgi?id=204910

Reviewed by Timothy Hatcher.

  • UserInterface/Base/FileUtilities.js:

(WI.FileUtilities.save):
Allow callers to specify a suggestedName that is used if possible.

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForSourceCode):
(WI.appendContextMenuItemsForDOMNode):

  • UserInterface/Views/TextResourceContentView.js:

(WI.TextResourceContentView.prototype.get saveData):

  • UserInterface/Views/ResourceContentView.js:

(WI.ResourceContentView.prototype.get saveData):
If the path of the selected source code is just "/", set the suggestedName to "index" and
use an extension derived from the MIME type (if able).

  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.prototype.export):

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype._handleContextMenu):

  • UserInterface/Views/HeapSnapshotContentView.js:

(WI.HeapSnapshotContentView.prototype._exportSnapshot):

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.get saveData):
(WI.LogContentView.prototype._handleContextMenuEvent):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._exportHAR):

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView.prototype._exportRecording):
(WI.RecordingContentView.prototype._exportReduction):

  • UserInterface/Views/ScriptContentView.js:

(WI.ScriptContentView.prototype.get saveData):

  • UserInterface/Views/ShaderProgramContentView.js:

(WI.ShaderProgramContentView.prototype.get saveData):

  • UserInterface/Views/TextContentView.js:

(WI.TextContentView.prototype.get saveData):

  • UserInterface/Views/TimelineRecordingContentView.js:

(WI.TimelineRecordingContentView.prototype._exportTimelineRecording):

  • UserInterface/Debug/ProtocolTrace.js:

(WI.ProtocolTrace.prototype.get saveData):
Prefer suggestedName vs WI.FileUtilities.inspectorURLForFilename, which is now always
called inside WI.FileUtilities.save anyways.

9:48 PM Changeset in webkit [253240] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Put JSModuleNamespaceObject in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204973

Reviewed by Mark Lam.

We found that we do not need to embed AbstractModuleRecord vector inside JSModuleNamespaceObject: we can just put it
in ExportEntry. So we can make it non-variable-sized cell. Further, this patch puts it in IsoSubspace.

  • runtime/CellSize.h:

(JSC::isDynamicallySizedType):
(JSC::cellSize):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::finishCreation):
(JSC::JSModuleNamespaceObject::visitChildren):
(JSC::JSModuleNamespaceObject::getOwnPropertySlotCommon):

  • runtime/JSModuleNamespaceObject.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
9:16 PM Changeset in webkit [253239] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test http/tests/xmlhttprequest/sync-xhr-in-unload.html is failing
https://bugs.webkit.org/show_bug.cgi?id=204974

Unreviewed test gardening.

  • platform/win/TestExpectations:
8:35 PM Changeset in webkit [253238] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Rename ContentBreak to ContentWrappingRule and ContentBreak::wrap to ContentWrappingRule::push
https://bugs.webkit.org/show_bug.cgi?id=204966
<rdar://problem/57717049>

Reviewed by Sam Weinig.

Use the term "push" instead of "wrap" to move a run to the next line without breaking it.
This is mainly to avoid spec term confusion.
ContentWrappingRule::Keep -> keep the run (or continuous runs) on the current line.
ContentWrappingRule::Split -> keep the run (or continuous runs) partially on the current line (see BreakingContext::PartialTrailingContent).
ContentWrappingRule::Push -> move the run (or continuous runs) completely to the next line.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContextForInlineContent):

  • layout/inlineformatting/InlineLineBreaker.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::processUncommittedContent):

8:20 PM Changeset in webkit [253237] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] Put ModuleRecords in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204972

Reviewed by Mark Lam.

This patch is putting JSModuleRecord and WebAssemblyModuleRecord in IsoSubspace.

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::destroy): Deleted.

  • runtime/AbstractModuleRecord.h:

(JSC::AbstractModuleRecord::subspaceFor):

  • runtime/JSModuleRecord.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/js/WebAssemblyModuleRecord.h:
7:50 PM Changeset in webkit [253236] by pvollan@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed build fix. Initialize local variable.

  • API/tests/testapi.cpp:

(TestAPI::promiseUnhandledRejection):

6:49 PM Changeset in webkit [253235] by jh718.park@samsung.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Change the format string portable by using "%" PRIx64
instead of "%llx" for uint64_t argument.

This patch removes the build warning below since r252978.

warning: format ‘%llx’ expects argument of type ‘long long unsigned int’,
but argument 3 has type ‘JSC::SpeculatedType {aka long unsigned int}’ [-Wformat=]

  • runtime/PredictionFileCreatingFuzzerAgent.cpp:

(JSC::PredictionFileCreatingFuzzerAgent::getPredictionInternal):

5:14 PM Changeset in webkit [253234] by commit-queue@webkit.org
  • 4 edits
    4 adds in trunk/Source

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

Broke the build (Requested by ap on #webkit).

Reverted changeset:

"Remove various .order files."
https://bugs.webkit.org/show_bug.cgi?id=204959
https://trac.webkit.org/changeset/253218

4:33 PM Changeset in webkit [253233] by ysuzuki@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] JSCallee should be in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204961

Reviewed by Mark Lam.

We should put JSCallee in IsoSubspace. Currently, we are also putting JSToWasmICCallee in IsoSusbapce
since it is a derived class of JSCallee, but I think we can remove this class completely. We are tracking
it in [1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=204960

  • debugger/DebuggerScope.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):
(JSC::Interpreter::execute):

  • runtime/JSCallee.h:

(JSC::JSCallee::subspaceFor):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::globalCallee):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/js/JSToWasmICCallee.h:

(JSC::JSToWasmICCallee::function): Deleted.
(JSC::JSToWasmICCallee::JSToWasmICCallee): Deleted.

4:24 PM Changeset in webkit [253232] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

[IPC] MESSAGE_CHECK() parameters for AddPlugInAutoStartOriginHash / PlugInDidReceiveUserInteraction IPCs
https://bugs.webkit.org/show_bug.cgi?id=204962

Reviewed by Ryosuke Niwa.

MESSAGE_CHECK() parameters for AddPlugInAutoStartOriginHash / PlugInDidReceiveUserInteraction IPCs. Those parameters
are used as keys in HashMaps.

  • UIProcess/Plugins/PlugInAutoStartProvider.cpp:

(WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
(WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
(WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):

  • UIProcess/Plugins/PlugInAutoStartProvider.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::addPlugInAutoStartOriginHash):
(WebKit::WebProcessProxy::plugInDidReceiveUserInteraction):

4:19 PM Changeset in webkit [253231] by pvollan@apple.com
  • 19 edits
    1 copy
    7 adds in trunk/Source

[iOS] Calls to device orientation API should be done in the UI process
https://bugs.webkit.org/show_bug.cgi?id=204720

Reviewed by Alex Christensen.

Source/WebCore:

The device orientation API on iOS is communicating with locationd. Since mach lookup to this daemon
will be closed, the calls to this API should be moved from the WebContent process to the UI process.
This patch implements forwarding of the device orientation requests to the UI process through a new
class, DeviceOrientationUpdateProvider, which is subclassed by WebDeviceOrientationUpdateProvider in
modern WebKit. This class implements forwarding of the requests to the UI process, and receives
device orientation updates from the UI process. An instance of this class will be shared by all
device orientation clients on a page, and passed as part of the page configuration parameters. On
the UI process side, a new class WebDeviceOrientationUpdateProviderProxy attached to the Web page
proxy is taking care of calling the device orientation API through the existing WebCoreMotionManager
Objective-C class, and send device orientation updates back to the Web process. Also, use a weak
hash set of orientation clients in WebCoreMotionManager.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/DeviceOrientationClient.h:
  • dom/Document.cpp:
  • page/Page.cpp:

(WebCore::m_deviceOrientationUpdateProvider):
(WebCore::m_applicationManifest): Deleted.

  • page/Page.h:

(WebCore::Page::deviceOrientationUpdateProvider const):

  • page/PageConfiguration.h:
  • platform/ios/DeviceOrientationClientIOS.h:
  • platform/ios/DeviceOrientationClientIOS.mm:

(WebCore::DeviceOrientationClientIOS::DeviceOrientationClientIOS):
(WebCore::DeviceOrientationClientIOS::startUpdating):
(WebCore::DeviceOrientationClientIOS::stopUpdating):
(WebCore::DeviceOrientationClientIOS::deviceOrientationControllerDestroyed):

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

(-[WebCoreMotionManager addOrientationClient:]):
(-[WebCoreMotionManager removeOrientationClient:]):
(-[WebCoreMotionManager checkClientStatus]):
(-[WebCoreMotionManager sendMotionData:withHeading:]):

Source/WebKit:

Add a new class, WebDeviceOrientationUpdateProviderProxy, to handle messages to start and stop updating device orientation
in the UI process. Also, add a message to update the device orientation in the WebContent process. In the UI process, the
device orientation API is called through the already existing WebCoreMotionManager class.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • UIProcess/WebPageProxy.cpp:

(WebKit::m_webDeviceOrientationUpdateProviderProxy):
(WebKit::m_resetRecentCrashCountTimer): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_overriddenMediaType):

4:11 PM Changeset in webkit [253230] by Jonathan Bedard
  • 2 edits in trunk/Tools

Python 3: Add support in webkitpy.tool (Follow-up, part 2)
https://bugs.webkit.org/show_bug.cgi?id=204838

Unreviewed follow-up fix.

  • Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
4:04 PM Changeset in webkit [253229] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r252652): Local Overrides: creating a local override for a resource loaded before Web Inspector was opened shows NaN for the Status Code
https://bugs.webkit.org/show_bug.cgi?id=204965

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/LocalResourceOverridePopover.js:

(WI.LocalResourceOverridePopover.prototype.show):
Make sure to update the object that holds the resource's original data in addition to the
object that holds the current edited values.
Drive-by: update the popover once all of the CodeMirrors have updated to hide scrollbars.

3:56 PM Changeset in webkit [253228] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebCore

IndexedDB: pass along error of IDBBackingStore::renameIndex
https://bugs.webkit.org/show_bug.cgi?id=204900

Reviewed by Brady Eidson.

We ignored error of IDBBackingStore::renameIndex, so the operation may fail silently. This covered up two bugs
in our code as we were unaware of the failure.
One was in MemoryIDBBackingStore that we did not update objectStoreInfo properly when createIndex/deleteIndex;
another was in IDBObjectStoreInfo that we did not copy its members correctly.

Covered by existing test: storage/indexeddbmodern/index-rename-1-private.html

  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex):

  • Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: If some index is deleted from IDBObjectStoreInfo, then

m_maxIndexID could be bigger than maximum index ID in m_indexMap, because we don't decrease m_maxIndexID for
deletion. Therefore, the assertion here is incorrect.
(WebCore::IDBObjectStoreInfo::isolatedCopy const):

3:38 PM Changeset in webkit [253227] by don.olmstead@sony.com
  • 5 edits in trunk/Source/WebCore

[MathML] Should support conditional compilation
https://bugs.webkit.org/show_bug.cgi?id=204958

Reviewed by Ross Kirsling.

No new tests. No change in behavior.

Add missing checks for ENABLE_MATHML in the idl and cpp files.

  • bindings/js/JSElementCustom.cpp:

(WebCore::createNewElementWrapper):

  • bindings/js/JSNodeCustom.cpp:

(WebCore::createWrapperInline):

  • mathml/MathMLElement.idl:
  • mathml/MathMLMathElement.idl:
3:20 PM Changeset in webkit [253226] by Devin Rousso
  • 11 edits in trunk/Source

Web Inspector: add compiler UNLIKELY hints when checking if developer extras are enabled
https://bugs.webkit.org/show_bug.cgi?id=204875

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Move the check for whether developer extras are enabled from the agent to the client so that
when inspecting a webpage, we don't check for it twice, since InspectorInstrumentation
already checks for it too.

  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/InspectorConsoleAgent.cpp:

(Inspector::InspectorConsoleAgent::developerExtrasEnabled const): Added.
(Inspector::InspectorConsoleAgent::addMessageToConsole):
(Inspector::InspectorConsoleAgent::startTiming):
(Inspector::InspectorConsoleAgent::logTiming):
(Inspector::InspectorConsoleAgent::stopTiming):
(Inspector::InspectorConsoleAgent::takeHeapSnapshot):
(Inspector::InspectorConsoleAgent::count):
(Inspector::InspectorConsoleAgent::countReset):
(Inspector::InspectorConsoleAgent::addConsoleMessage):

  • inspector/JSGlobalObjectConsoleClient.cpp:

(Inspector::JSGlobalObjectConsoleClient::messageWithTypeAndLevel):
(Inspector::JSGlobalObjectConsoleClient::count):
(Inspector::JSGlobalObjectConsoleClient::countReset):
(Inspector::JSGlobalObjectConsoleClient::profile):
(Inspector::JSGlobalObjectConsoleClient::profileEnd):
(Inspector::JSGlobalObjectConsoleClient::takeHeapSnapshot):
(Inspector::JSGlobalObjectConsoleClient::time):
(Inspector::JSGlobalObjectConsoleClient::timeLog):
(Inspector::JSGlobalObjectConsoleClient::timeEnd):
(Inspector::JSGlobalObjectConsoleClient::timeStamp):
(Inspector::JSGlobalObjectConsoleClient::record):
(Inspector::JSGlobalObjectConsoleClient::recordEnd):
(Inspector::JSGlobalObjectConsoleClient::screenshot):

Source/WebCore:

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::consoleStartRecordingCanvas):
(WebCore::InspectorInstrumentation::consoleStopRecordingCanvas): Added.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::consoleCountResetImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::logConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleStopRecordingCanvasImpl): Added.

  • inspector/agents/WebConsoleAgent.cpp:

(WebCore::WebConsoleAgent::frameWindowDiscarded):
(WebCore::WebConsoleAgent::didReceiveResponse):
(WebCore::WebConsoleAgent::didFailLoading):
Remove the redundant check for whether developer extras are enabled since it's already
checked by InspectorInstrumentation.

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::record):
(WebCore::PageConsoleClient::recordEnd):

  • inspector/agents/InspectorCanvasAgent.h:
  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::consoleStopRecordingCanvas): Added.
Add checks for InspectorInstrumentation::hasFrontends() to avoid doing extra work when Web
Inspector isn't open.

3:17 PM Changeset in webkit [253225] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[LFC][IFC] Use explicit 0_lu value instead of LayoutUnit { }
https://bugs.webkit.org/show_bug.cgi?id=204964
<rdar://problem/57714095>

Reviewed by Antti Koivisto.

From geometry computation point of view, it is really the 0 value and not an empty value.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

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

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::resetDescent):
(WebCore::Layout::LineBox::resetBaseline):
(WebCore::Layout::LineBox::Baseline::reset):

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::wordBreakingBehavior const):
(WebCore::Layout::LineBreaker::Content::reset):
(WebCore::Layout::LineBreaker::Content::TrailingTrimmableContent::reset):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::ContinousContent::close):
(WebCore::Layout::LineBuilder::Run::Run):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::appendLineBreak):
(WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
(WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):
(WebCore::Layout::LineBuilder::InlineItemRun::trailingLetterSpacing const):
(WebCore::Layout::LineBuilder::InlineItemRun::setCollapsesToZeroAdvanceWidth):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::TrimmableContent::reset):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::inlineItemWidth):

  • layout/inlineformatting/text/TextUtil.h:

(WebCore::Layout::TextUtil::width): Deleted.

3:02 PM Changeset in webkit [253224] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Reduce timeout for page to handle beforeunload events when trying to close a page
https://bugs.webkit.org/show_bug.cgi?id=204950
<rdar://problem/57700419>

Reviewed by Ryosuke Niwa.

Reduce timeout for page to handle beforeunload events when trying to close a page. It would previously
take up to 3 seconds to actually close a tab after the user would click on the "X" to close it. This
is because we would wait for the page to fire and handle the beforeunload events and only give up after
3 seconds. This patch reduces this timeout to something more reasonable from a user standpoint (500ms).

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_tryCloseTimeoutTimer):
(WebKit::WebPageProxy::tryClose):
(WebKit::WebPageProxy::tryCloseTimedOut):
(WebKit::WebPageProxy::closePage):
(WebKit::m_resetRecentCrashCountTimer): Deleted.

  • UIProcess/WebPageProxy.h:
3:01 PM Changeset in webkit [253223] by Alan Coon
  • 7 edits in tags/Safari-609.1.11.1/Source

Versioning.

3:00 PM Changeset in webkit [253222] by Jonathan Bedard
  • 4 edits in trunk/Tools

Python 3: Add support in webkitpy.tool (Follow-up, part 1)
https://bugs.webkit.org/show_bug.cgi?id=204838

Reviewed by Stephanie Lewis.

As I've been using webkit-patch with Python 3, I've encountered a handful of other
compatibility bugs.

  • Scripts/webkit-patch:

(ForgivingUTF8Writer): Only apple the ForgivingUTF8Writer when our string type isn't unicode.
(ForgivingUTF8Writer.write): Use standardized decoding functions.

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

(Bugzilla.authenticate): Use byte regex.

  • Scripts/webkitpy/tool/steps/editchangelog.py:

(EditChangeLog.run): Convert map to list.

2:58 PM Changeset in webkit [253221] by Alan Coon
  • 1 copy in tags/Safari-609.1.11.1

New tag.

2:49 PM Changeset in webkit [253220] by Dewei Zhu
  • 2 edits in trunk/Websites/perf.webkit.org

Custom analysis task page should allow schedule any triggerable accepted tests.
https://bugs.webkit.org/show_bug.cgi?id=204925

Reviewed by Ryosuke Niwa.

Fix a bug that subtest will not show on custom analysis task page if both itself and parent test are
accepted by triggerable.
Order test list in alphabetical order.

  • public/v3/components/custom-analysis-task-configurator.js:

(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests):

2:45 PM Changeset in webkit [253219] by Jonathan Bedard
  • 19 edits in trunk

Python 3: Add support in webkitpy.test
https://bugs.webkit.org/show_bug.cgi?id=204952

Reviewed by Stephanie Lewis.

Source/WebKit:

Tested by test-webkitpy.

  • Scripts/webkit/messages_unittest.py: Use Python 2/3 compatible StringIO.

Tools:

  • Scripts/test-webkitpy-python3: Add webkitpy.tool.
  • Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py: Use Python 2/3

compatible StringIO objects.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: Ditto.
  • Scripts/webkitpy/performance_tests/perftest_unittest.py: Ditto.
  • Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: Ditto.
  • Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: Ditto.
  • Scripts/webkitpy/test/finder.py:

(Finder._exclude): Convert filter to list.

  • Scripts/webkitpy/test/main.py:

(Tester._log_exception): Use Python 2/3 compatible StringIO object.
(_Loader.getTestCaseNames): Convert filter to list.

  • Scripts/webkitpy/test/main_unittest.py:

(TesterTest.test_no_tests_found): Use Python 2/3 compatible StringIO.
(TesterTest.test_integration_tests_are_found): Sort serial tests before comparing.

  • Scripts/webkitpy/test/printer.py: Use Python 2/3 compatible StringIO.
  • Scripts/webkitpy/test/runner_unittest.py: Ditto.
  • Scripts/webkitpy/test/skip.py:

(_skipped_method._skip): Fix class inspection on instance method.

  • Scripts/webkitpy/test/skip_unittest.py: Use Python 2/3 compatible StringIO.
  • Scripts/webkitpy/w3c/test_converter.py: Use Python 2/3 compatible HTMLParser.
  • Scripts/webkitpy/w3c/wpt_runner.py:

(main): Fix Python 3 syntax errors.

  • lldb/dump_class_layout_unittest.py:

(TestDumpClassLayout.setUpClass): Fix Python 3 syntax errors.

2:43 PM Changeset in webkit [253218] by keith_miller@apple.com
  • 4 edits
    4 deletes in trunk/Source

Remove various .order files.
https://bugs.webkit.org/show_bug.cgi?id=204959

Reviewed by Yusuke Suzuki.

These files are all super out of date and likely don't do anything anymore.
The signatures of the functions have changed thus the mangled name has changed.

Source/JavaScriptCore:

Source/WebCore:

  • WebCore.order: Removed.

Source/WebKit:

  • mac/WebKit2.order: Removed.

Source/WebKitLegacy/mac:

  • WebKit.order: Removed.
2:22 PM Changeset in webkit [253217] by dino@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Restrict libANGLE to link only with WebCore
https://bugs.webkit.org/show_bug.cgi?id=204957
<rdar://problem/57708644>

Reviewed by Brian Burg.

Restrict to WebCore and WebCoreTestSupport.

  • Configurations/ANGLE.xcconfig:
2:07 PM Changeset in webkit [253216] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit

Address <https://bugs.webkit.org/show_bug.cgi?id=189222#c3>

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView valueForUndefinedKey:]): Added a newline.

1:45 PM Changeset in webkit [253215] by Jonathan Bedard
  • 13 edits in trunk

Unreviewed, rolling out r253148.

This caused fast/mediastream/stream-switch.html to timeout on
Mac.

Reverted changeset:

"WPT test MediaStream-MediaElement-srcObject.https.html times
out"
https://bugs.webkit.org/show_bug.cgi?id=204762
https://trac.webkit.org/changeset/253148

1:42 PM Changeset in webkit [253214] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][IFC] Paint partial trailing run with hyphen when needed
https://bugs.webkit.org/show_bug.cgi?id=204953
<rdar://problem/57705169>

Reviewed by Antti Koivisto.

When LineBreaker comes back with a partial content that needs hyphen, we need to make sure this information
ends up in the final Display::Run so that the rendered content includes the hyphen string. Note that this only needs to
be done when the content does _not_ have the hyphen already (opportunity vs. oppor-tunity).
(This patch also renames trailingPartial to partialTrailing because the fact that it is partial run is more important than that it is trailing run.)

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::TextContext::TextContext):
(WebCore::Display::Run::TextContext::needsHyphen const):
(WebCore::Display::Run::TextContext::setNeedsHyphen):
(WebCore::Display::Run::textContext):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::wordBreakingBehavior const):

  • layout/inlineformatting/InlineLineBreaker.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::close):
(WebCore::Layout::LineLayoutContext::processUncommittedContent):

  • layout/inlineformatting/LineLayoutContext.h:
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::paint):

1:05 PM Changeset in webkit [253213] by Chris Dumez
  • 8 edits
    7 adds in trunk

Prevent synchronous XHR in beforeunload / unload event handlers
https://bugs.webkit.org/show_bug.cgi?id=204912
<rdar://problem/57676394>

Reviewed by Darin Adler.

Source/WebCore:

Prevent synchronous XHR in beforeunload / unload event handlers. They are terrible for performance
and the Beacon API (or Fetch keepalive) are more efficient & supported alternatives.

In particular, this would cause hangs when trying to navigate away from a site or when closing
attempt, which would result in terrible user experience.

Chrome and Edge have expressed public support for this. Chrome has actually been testing this behavior
for a while now:
https://www.chromestatus.com/feature/4664843055398912

I added this new behavior behind an experimental feature flag, enabled by default.

Tests: http/tests/xmlhttprequest/sync-xhr-in-beforeunload.html

http/tests/xmlhttprequest/sync-xhr-in-unload.html

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • loader/FrameLoader.cpp:

(WebCore::PageLevelForbidScope::PageLevelForbidScope):
(WebCore::ForbidPromptsScope::ForbidPromptsScope):
(WebCore::ForbidPromptsScope::~ForbidPromptsScope):
(WebCore::ForbidSynchronousLoadsScope::ForbidSynchronousLoadsScope):
(WebCore::ForbidSynchronousLoadsScope::~ForbidSynchronousLoadsScope):
(WebCore::FrameLoader::dispatchUnloadEvents):
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):

  • page/Page.cpp:

(WebCore::Page::forbidSynchronousLoads):
(WebCore::Page::allowSynchronousLoads):
(WebCore::Page::areSynchronousLoadsAllowed):

  • page/Page.h:

LayoutTests:

Add layout test coverage.

  • http/tests/xmlhttprequest/resources/sync-xhr-in-beforeunload-window.html: Added.
  • http/tests/xmlhttprequest/resources/sync-xhr-in-unload-window.html: Added.
  • http/tests/xmlhttprequest/sync-xhr-in-beforeunload-expected.txt: Added.
  • http/tests/xmlhttprequest/sync-xhr-in-beforeunload.html: Added.
  • http/tests/xmlhttprequest/sync-xhr-in-unload-expected.txt: Added.
  • http/tests/xmlhttprequest/sync-xhr-in-unload.html: Added.
1:03 PM Changeset in webkit [253212] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Drop support for NSURLCache callbacks in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=203344

Patch by Benjamin Nham <Ben Nham> on 2019-12-06
Reviewed by Alex Christensen.

Remove the NSURLSession caching policy callback in NetworkProcess. It's no longer necessary since
we don't use NSURLCache in NetworkProcess (https://bugs.webkit.org/show_bug.cgi?id=185990).

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Deleted.

11:34 AM Changeset in webkit [253211] by BJ Burg
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: TabActivity diagnostic event should sample the active tab uniformly
https://bugs.webkit.org/show_bug.cgi?id=204531

Reviewed by Devin Rousso.

Rewrite this class to use a uniform sampling approach. Every n seconds, a timer fires and
samples what the current tab is. If the last user interaction happened up to n seconds ago,
report a TabActivity diagnostic event. Keeping with the previous implementation, samples
are taken every n=60 seconds.

To account for bias in the initial sample when Web Inspector is open, wait m seconds for
the first sample. This accounts for the time between opening Web Inspector and choosing the
desired tab. In my testing, m=10 is enough time to load Web Inspector and switch
immediately to a different tab. In that case, the initial tab would not be sampled as the
active tab even if the last user interaction (clicking tab bar) happened while the initial
tab was displayed. If the recorder's setup() method is called some time after Web Inspector is
opened, then the initial delay will shrink to ensure at least 10s has elapsed since the frontend
finished loading.

  • UserInterface/Base/Main.js:

(WI.contentLoaded): Keep a timestamp of when the frontend finished loading.

  • UserInterface/Controllers/TabActivityDiagnosticEventRecorder.js:

(WI.TabActivityDiagnosticEventRecorder):
(WI.TabActivityDiagnosticEventRecorder.prototype.setup):
(WI.TabActivityDiagnosticEventRecorder.prototype.teardown):
(WI.TabActivityDiagnosticEventRecorder.prototype._startInitialDelayBeforeSamplingTimer):
(WI.TabActivityDiagnosticEventRecorder.prototype._stopInitialDelayBeforeSamplingTimer):
(WI.TabActivityDiagnosticEventRecorder.prototype._startEventSamplingTimer):
(WI.TabActivityDiagnosticEventRecorder.prototype._stopEventSamplingTimer):
(WI.TabActivityDiagnosticEventRecorder.prototype._sampleCurrentTabActivity):
(WI.TabActivityDiagnosticEventRecorder.prototype._didObserveUserInteraction):
(WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowFocus):
(WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowBlur):
(WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowKeyDown):
(WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowMouseDown):
(WI.TabActivityDiagnosticEventRecorder.prototype._didInteractWithTabContent): Deleted.
(WI.TabActivityDiagnosticEventRecorder.prototype._clearTabActivityTimeout): Deleted.
(WI.TabActivityDiagnosticEventRecorder.prototype._beginTabActivityTimeout): Deleted.
(WI.TabActivityDiagnosticEventRecorder.prototype._stopTrackingTabActivity): Deleted.
(WI.TabActivityDiagnosticEventRecorder.prototype._handleTabBrowserSelectedTabContentViewDidChange): Deleted.

11:18 AM Changeset in webkit [253210] by Antti Koivisto
  • 13 edits
    2 adds in trunk

Support for resolving highlight pseudo element style
https://bugs.webkit.org/show_bug.cgi?id=204937

Reviewed by Simon Fraser.

Source/WebCore:

Test: highlight/highlight-pseudo-element-style.html

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

Returns always true when checked without pseudoId, so it gets added to the set of seen pseudo elements.
Match argument with the provided highlight name otherwise.

  • css/SelectorChecker.h:
  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo):

  • rendering/style/RenderStyle.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::ruleMatches):

  • style/ElementRuleCollector.h:

(WebCore::Style::PseudoElementRequest::PseudoElementRequest):

Add the requested highlight name.

  • style/StyleResolver.h:
  • style/StyleScope.h:
  • testing/Internals.cpp:

(WebCore::Internals::highlightPseudoElementColor):

Testing support.

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

LayoutTests:

  • highlight/highlight-pseudo-element-style-expected.txt: Added.
  • highlight/highlight-pseudo-element-style.html: Added.
10:08 AM Changeset in webkit [253209] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Fix DisplayRunPath offsets
https://bugs.webkit.org/show_bug.cgi?id=204949

Reviewed by Zalan Bujtas.

Fixes output of tests like fast/text/system-font-zero-size.html with LFC integration enabled.

  • rendering/line/LineLayoutTraversalDisplayRunPath.h:

(WebCore::LineLayoutTraversal::DisplayRunPath::DisplayRunPath):
(WebCore::LineLayoutTraversal::DisplayRunPath::localStartOffset const):
(WebCore::LineLayoutTraversal::DisplayRunPath::localEndOffset const):

Display::Run offsets are already local.

(WebCore::LineLayoutTraversal::DisplayRunPath::length const):
(WebCore::LineLayoutTraversal::DisplayRunPath::runs const):
(WebCore::LineLayoutTraversal::DisplayRunPath::firstRun const): Deleted.

9:15 AM Changeset in webkit [253208] by jh718.park@samsung.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Revert r253207 because it causes compile error in Mac and ios build.

  • runtime/PredictionFileCreatingFuzzerAgent.cpp:

(JSC::PredictionFileCreatingFuzzerAgent::getPredictionInternal):

9:08 AM Changeset in webkit [253207] by jh718.park@samsung.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Remove build warning below since r252978.

warning: format ‘%llx’ expects argument of type ‘long long unsigned int’,
but argument 3 has type ‘JSC::SpeculatedType {aka long unsigned int}’ [-Wformat=]

  • runtime/PredictionFileCreatingFuzzerAgent.cpp:

(JSC::PredictionFileCreatingFuzzerAgent::getPredictionInternal):

8:06 AM Changeset in webkit [253206] by Chris Dumez
  • 5 edits in trunk/Source

Stop using reserveCapacity() / reserveInitialCapacity() in IPC decoders
https://bugs.webkit.org/show_bug.cgi?id=204930
<rdar://problem/57682737>

Reviewed by Ryosuke Niwa.

This is IPC hardening since the size we use to reserve the capacity is encoded over IPC
and cannot be trusted in some cases.

Source/WebCore:

  • page/csp/ContentSecurityPolicyResponseHeaders.h:

(WebCore::ContentSecurityPolicyResponseHeaders::decode):

Source/WebKit:

  • Platform/IPC/ArgumentCoders.h:
  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Vector<RefPtr<SecurityOrigin>>>::decode):

6:37 AM Changeset in webkit [253205] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

[LFC][Integration] Wire line counting functions in RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=204943

Reviewed by Zalan Bujtas.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::lineCount const):

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/ComplexLineLayout.cpp:

(WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
(WebCore::ComplexLineLayout::lineCount const):
(WebCore::ComplexLineLayout::lineCountUntil const):

Move complex path specific code to ComplexLineLayout.

  • rendering/ComplexLineLayout.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::lineCount const):
(WebCore::RenderBlockFlow::hasLines const):

Support all paths.

  • rendering/RenderBlockFlow.h:
6:34 AM Changeset in webkit [253204] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Support isLineBreak() in iterator
https://bugs.webkit.org/show_bug.cgi?id=204941

Reviewed by Zalan Bujtas.

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::isLineBreak const):

  • rendering/line/LineLayoutTraversalDisplayRunPath.h:

(WebCore::LineLayoutTraversal::DisplayRunPath::isLineBreak const):
(WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInVisualOrder):

Also remove unneeded skipping of runs without text context. All runs generated from text nodes now have them.

1:25 AM Changeset in webkit [253203] by youenn@apple.com
  • 11 edits
    2 adds in trunk

Protect WebRTC network monitoring to wait forever in edge cases
https://bugs.webkit.org/show_bug.cgi?id=204846
Source/WebKit:

Reviewed by Eric Carlson.

We were limiting the number of IPC message sent to network process by only sending the start monitoring event for the first client.
The issue is that, if network process crashes for instance while having not yet given the list of networks, all clients will be hanging
waiting for the completion of network list.
We are now sending an IPC message for every client and the network process will ignore the ones that are not useful.
In addition, in case of network process crash, we send a signal that network list has changed to make sure clients will never hang.
They might still fail connecting, which is ok since network process crashed.

Test: webrtc/datachannel/gather-candidates-networkprocess-crash.html

  • NetworkProcess/webrtc/NetworkRTCMonitor.cpp:

(WebKit::NetworkRTCMonitor::startUpdatingIfNeeded):

  • NetworkProcess/webrtc/NetworkRTCMonitor.h:
  • NetworkProcess/webrtc/NetworkRTCMonitor.messages.in:
  • WebProcess/Network/webrtc/LibWebRTCNetwork.h:

(WebKit::LibWebRTCNetwork::networkProcessCrashed):

  • WebProcess/Network/webrtc/WebRTCMonitor.cpp:

(WebKit::WebRTCMonitor::StartUpdating):
(WebKit::WebRTCMonitor::StopUpdating):
(WebKit::WebRTCMonitor::networksChanged):
(WebKit::WebRTCMonitor::networkProcessCrashed):

  • WebProcess/Network/webrtc/WebRTCMonitor.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::networkProcessConnectionClosed):

LayoutTests:

<rdar://problem/57618773>

Reviewed by Eric Carlson.

  • webrtc/datachannel/gather-candidates-networkprocess-crash-expected.txt: Added.
  • webrtc/datachannel/gather-candidates-networkprocess-crash.html: Added.
1:24 AM Changeset in webkit [253202] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Output libwebrtc logging from Network Process as release logging
https://bugs.webkit.org/show_bug.cgi?id=204853

Reviewed by Eric Carlson.

This will help debugging WebRTC networking issues.
No observable change of behavior.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::doReleaseLogging):
(WebKit::NetworkRTCProvider::NetworkRTCProvider):

Dec 5, 2019:

11:33 PM Changeset in webkit [253201] by sbarati@apple.com
  • 13 edits
    1 move in trunk/Source/JavaScriptCore

get_by_id ICs should have a structure history used to indicate when we should skip generating an IC
https://bugs.webkit.org/show_bug.cgi?id=204904
<rdar://problem/57631437>

Reviewed by Yusuke Suzuki and Tadeu Zagallo.

I implemented a similar policy for get_by_val for the number of unique seen
identifiers. This allows us to create a heuristic to directly call the slow
path when profiling information tells us if inline caching might not be
profitable. This patch implements a similar policy for get_by_id where we
profile the seen base value structures. If the LLInt observes enough
unique structures, we omit emitting the inline cache in the upper
tiers.

The goal here was to try to speed up Speedometer2. Local testing showed
this patch to repeatedly be 0.5% faster, but all the P values I got were
insignificant. So it appears it's either neutral or slightly faster.

This patch also adjusts the policy of seeing a non-identifier inside
the PointerHistory data structure. Instead of increasing it to reach the
limit when we see a non-identifier, we just treat each execution with
a non-identifier to increment the count by 1.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/BytecodeList.rb:
  • bytecode/GetByValHistory.h: Removed.
  • bytecode/PointerHistory.h: Copied from Source/JavaScriptCore/bytecode/GetByValHistory.h.

(JSC::PointerHistory::observe):
(JSC::PointerHistory::observeNull):
(JSC::GetByValHistory::observeNonUID): Deleted.
(JSC::GetByValHistory::observe): Deleted.
(JSC::GetByValHistory::count const): Deleted.
(JSC::GetByValHistory::filter const): Deleted.
(JSC::GetByValHistory::update): Deleted.

  • dfg/DFGByteCodeParser.cpp:

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

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

(JSC::DFG::SpeculativeJIT::compileGetById):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):

  • generator/DSL.rb:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/OptionsList.h:
7:46 PM Changeset in webkit [253200] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Fix css1/basic/containment.html
https://bugs.webkit.org/show_bug.cgi?id=204931
<rdar://problem/57682871>

Reviewed by Simon Fraser.

moveToNextBreakablePosition jumped over all the positions that came back as the current position.
e.g --- <- first 2 breakable positions are at: 1 2 but we skipped over the first one.

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::moveToNextBreakablePosition):

6:14 PM Changeset in webkit [253199] by yousuke.kimoto@sony.com
  • 2 edits in trunk/Source/WebKit

[WinCairo] Improve Inspectable Target Page to adapt a long title and URL
https://bugs.webkit.org/show_bug.cgi?id=204874

Reviewed by Fujii Hironori.

Add some CSS atributes to make such long titles and URLs fit the width
of a window size. Then "Inspector" button is shown at the visible area.
No new tests, since there is no change in behavior.

  • UIProcess/socket/RemoteInspectorProtocolHandler.cpp:

(WebKit::RemoteInspectorProtocolHandler::platformStartTask):

6:11 PM Changeset in webkit [253198] by Alan Coon
  • 1 copy in tags/Safari-608.5.0.2.1

Tag Safari-608.5.0.2.1.

6:10 PM Changeset in webkit [253197] by Alan Coon
  • 2 edits in branches/safari-608.5.0.2-branch/Source/JavaScriptCore

Cherry-pick r252674. rdar://problem/57609333

[JSC] MetadataTable::sizeInBytes should not touch m_rawBuffer in UnlinkedMetadataTable unless MetadataTable is linked to that UnlinkedMetadataTable
https://bugs.webkit.org/show_bug.cgi?id=204390

Reviewed by Mark Lam.

We have a race issue here. When calling MetadataTable::sizeInBytes, we call UnlinkedMetadataTable::sizeInBytes since we change the result based on
whether this MetadataTable is linked to this UnlinkedMetadataTable or not. The problem is that we are calling UnlinkedMetadataTable::totalSize
unconditionally in UnlinkedMetadataTable::sizeInBytes, and this is touching m_rawBuffer unconditionally. This is not correct since it is possible
that this m_rawBuffer is realloced while we are calling MetadataTable::sizeInBytes in GC thread.

  1. The GC thread is calling MetadataTable::sizeInBytes for MetadataTable "A".
  2. The main thread is destroying MetadataTable "B".
  3. MetadataTable "B" is linked to UnlinkedMetadataTable "C".
  4. MetadataTable "A" is pointing to UnlinkedMetadataTable "C".
  5. "A" is touching UnlinkedMetadataTable::m_rawBuffer in "C", called from MetadataTable::sizeInBytes.
  6. (2) destroys MetadataTable "B", and realloc UnlinkedMetadataTable::m_rawBuffer in "C".
  7. (5) can touch already freed buffer.

This patch fixes UnlinkedMetadataTable::sizeInBytes: not touching m_rawBuffer unless it is owned by the caller's MetadataTable. We need to call
UnlinkedMetadataTable::sizeInBytes anyway since we need to adjust the result based on whether the caller MetadataTable is linked to this UnlinkedMetadataTable.

  • bytecode/UnlinkedMetadataTableInlines.h: (JSC::UnlinkedMetadataTable::sizeInBytes):

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

6:07 PM Changeset in webkit [253196] by Alan Coon
  • 7 edits in branches/safari-608.5.0.2-branch/Source

Versioning.

5:58 PM Changeset in webkit [253195] by Fujii Hironori
  • 10 edits in trunk/Source/WebKit

[WebKit] Fix compilation warnings for MSVC
https://bugs.webkit.org/show_bug.cgi?id=204661

Reviewed by Don Olmstead.

No behavior changes.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:

(WebKit::makeDescription):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::cleanup):

  • NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp:

(WebKit::NetworkCache::IOChannel::IOChannel):

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):
(WebKit::toDiagnosticLoggingResultType):

  • UIProcess/WebURLSchemeTask.cpp:

(WebKit::WebURLSchemeTask::didReceiveData):

  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:

(WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::registerAttachmentIdentifier):

5:54 PM Changeset in webkit [253194] by Alan Coon
  • 1 copy in branches/safari-608.5.0.2-branch

New branch.

5:53 PM Changeset in webkit [253193] by Alan Coon
  • 1 delete in branches/safari-608.5.0.2-branch

Delete tag.

5:33 PM Changeset in webkit [253192] by commit-queue@webkit.org
  • 179 edits
    1 move
    24 adds
    2 deletes in trunk/Source/ThirdParty/ANGLE

Finish ANGLE update
https://bugs.webkit.org/show_bug.cgi?id=204911

The last ANGLE update patch didn't include all the changed files.
This patch updates the rest of the files.

Patch by James Darpinian <James Darpinian> on 2019-12-05
Reviewed by Alex Christensen.

  • src/tests: Lots of changed files from upstream ANGLE.
  • src/third_party/compiler/README.chromium:
  • third_party/VK-GL-CTS/README.angle: Added.
  • third_party/deqp/README.angle: Removed.
  • third_party/googletest/README.angle: Removed.
  • third_party/libpng/BUILD.gn:
  • third_party/spirv-cross/README.angle: Added.
  • util/OSWindow.h:
  • util/egl_loader_autogen.cpp:

(angle::LoadEGL):

  • util/egl_loader_autogen.h:
  • util/fuchsia/ScenicWindow.cpp:

(ScenicWindow::resetNativeWindow):

  • util/fuchsia/ScenicWindow.h:
  • util/gles_loader_autogen.cpp:

(angle::LoadGLES):

  • util/gles_loader_autogen.h:
  • util/osx/OSXWindow.h:
  • util/osx/OSXWindow.mm:

(OSXWindow::initialize):

  • util/ozone/OzoneWindow.h:
  • util/posix/crash_handler_posix.cpp:

(angle::InitCrashHandler):

  • util/posix/test_utils_posix.cpp:

(angle::GetTempDir):
(angle::CreateTemporaryFileInDir):
(angle::DeleteFile):
(angle::LaunchProcess):
(angle::NumberOfProcessors):

  • util/shader_utils.cpp:

(CompileShaderFromFile):
(CompileProgramFromFiles):

  • util/test_utils.cpp: Added.

(angle::CreateTemporaryFile):
(angle::GetFileSize):
(angle::ReadEntireFileToString):
(angle::ProcessHandle::ProcessHandle):
(angle::ProcessHandle::~ProcessHandle):
(angle::ProcessHandle::operator=):
(angle::ProcessHandle::reset):

  • util/test_utils.h:
  • util/test_utils_unittest.cpp: Added.

(angle::NormalizeNewLines):
(angle::TEST):

  • util/test_utils_unittest_helper.cpp: Added.

(main):

  • util/test_utils_unittest_helper.h: Added.
  • util/util.gni:
  • util/windows/WGLWindow.cpp:
  • util/windows/test_utils_win.cpp:

(angle::InitCrashHandler):
(angle::TerminateCrashHandler):
(angle::LaunchProcess):
(angle::GetTempDir):
(angle::CreateTemporaryFileInDir):
(angle::DeleteFile):
(angle::NumberOfProcessors):

  • util/windows/win32/Win32Window.cpp:

(Win32Window::initialize):

  • util/windows/win32/test_utils_win32.cpp:

(angle::StabilizeCPUForBenchmarking):

  • util/x11/X11Window.h:
5:29 PM Changeset in webkit [253191] by Alan Coon
  • 1 copy in branches/safari-608.5.0.2-branch

New branch.

5:27 PM Changeset in webkit [253190] by Megan Gardner
  • 2 edits in trunk/Source/WebCore

Move member variable that should be private
https://bugs.webkit.org/show_bug.cgi?id=204913

Reviewed by Wenson Hsieh.

These member variables should be in the correct section.

No changing functionality, no tests needed.

  • page/EventHandler.h:
5:12 PM Changeset in webkit [253189] by BJ Burg
  • 3 edits in trunk/Source/WebKit

[Cocoa] _WKInspector uses wrong WKWebView in -setDiagnosticLoggingDelegate:
https://bugs.webkit.org/show_bug.cgi?id=204928

Reviewed by Timothy Hatcher.

I feel like I've made this mistake before. To make the right thing more obvious,
add a property named inspectorWebView that returns the Inspector WKWebView.

  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector inspectorWebView]):
(-[_WKInspector _setDiagnosticLoggingDelegate:]):

  • UIProcess/WebInspectorProxy.h:

(WebKit::WebInspectorProxy::inspectorPage const):

5:08 PM Changeset in webkit [253188] by Tadeu Zagallo
  • 8 edits in trunk/Source/JavaScriptCore

[WebAssembly] Fix LLIntCallee's ownership
https://bugs.webkit.org/show_bug.cgi?id=204929

Reviewed by Saam Barati.

Currently, after the LLIntPlan finished generating bytecode, the Module takes ownership of the Vector
of LLIntCallee's and passes a pointer to the Vector's storage to the CodeBlock. However, while we're
tiering up, the module might be destroyed and we'll try to access the LLIntCallee after we finish
compiling through the pointer held by the CodeBlock, which is now stale, since the Vector was owned
by the Module. In order to fix this, we move the Vector into a reference counted wrapper class, LLIntCallees,
and both the Module and the CodeBlock hold references to the wrapper.

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::work):

  • wasm/WasmCallee.h:

(JSC::Wasm::LLIntCallees::create):
(JSC::Wasm::LLIntCallees::at const):
(JSC::Wasm::LLIntCallees::data const):
(JSC::Wasm::LLIntCallees::LLIntCallees):

  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):

  • wasm/WasmModule.cpp:

(JSC::Wasm::Module::Module):
(JSC::Wasm::Module::getOrCreateCodeBlock):

  • wasm/WasmModule.h:
  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

4:35 PM Changeset in webkit [253187] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

Use sendWithAsyncReply() for WebPage::TryClose IPC
https://bugs.webkit.org/show_bug.cgi?id=204926

Reviewed by Alex Christensen.

Use sendWithAsyncReply() for WebPage::TryClose IPC, instead of 2 separate IPCs.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::closeBrowsingContext):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::tryClose):
(WebKit::WebPageProxy::closePage):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::tryClose):
(WebKit::WebPage::sendClose):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
4:34 PM Changeset in webkit [253186] by Chris Dumez
  • 2 edits in trunk/Source/WTF

[IPC] Fail ObjectIdentifier decoding if the decoded integer is not a valid ID
https://bugs.webkit.org/show_bug.cgi?id=204921
<rdar://problem/57677747>

Reviewed by Ryosuke Niwa.

  • wtf/ObjectIdentifier.h:

(WTF::ObjectIdentifier::decode):

4:26 PM Changeset in webkit [253185] by wilander@apple.com
  • 12 edits in trunk/Source

Resource Load Statistics (experimental): Add fast mode for non-cookie website data deletion
https://bugs.webkit.org/show_bug.cgi?id=204858
<rdar://problem/57639851>

Reviewed by Alex Christensen.

Source/WebCore:

This change adds two internal flags:

  • "Live-On Testing" with a one hour timeout instead of seven days.
  • "Repro Testing" with an instant timeout (bar ITP's regular delays) instead of seven days.

These internal flags should be removed once testing is complete: <rdar://problem/57673418>

No new tests. This change just adds new opt-in settings for manual testing.

  • page/Settings.yaml:
  • platform/network/NetworkStorageSession.h:

The FirstPartyWebsiteDataRemovalMode enum now has two new values:

  • AllButCookiesLiveOnTestingTimeout
  • AllButCookiesReproTestingTimeout

Source/WebKit:

The purpose of this change is to allow for dedicated testing of the change in
https://trac.webkit.org/changeset/253082/webkit. Waiting seven days just isn't a good
starting point.

This change adds two internal flags:

  • "Live-On Testing" with a one hour timeout instead of seven days.
  • "Repro Testing" with an instant timeout (bar ITP's regular delays) instead of seven days.

The change also makes sure that hasHadUnexpiredRecentUserInteraction() in
ResourceLoadStatisticsDatabaseStore and ResourceLoadStatisticsMemoryStore only
age out the user interaction timestamp if the OperatingDatesWindow is Long so
that we don't age out timestamps early with the shorter OperatingDatesWindows.

This change changes the default value of IsFirstPartyWebsiteDataRemovalEnabled to true.

These internal flags should be removed once testing is complete: <rdar://problem/57673418>

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::hasHadUnexpiredRecentUserInteraction const):
(WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveAllButCookiesFor const):

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::hasStatisticsExpired const):

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::setFirstPartyWebsiteDataRemovalMode):

  • NetworkProcess/NetworkProcess.messages.in:
  • Shared/WebPreferences.yaml:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

4:01 PM Changeset in webkit [253184] by Jonathan Bedard
  • 5 edits in trunk/Tools

Python 3: Add support to webkitpy.browserperfdash
https://bugs.webkit.org/show_bug.cgi?id=204887

Reviewed by Stephanie Lewis.

  • Scripts/test-webkitpy-python3: Add webkitpy.browserperfdash.
  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Remove urlparse dependency.
  • Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py: Use explicit import.
  • Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:

(WebServerBenchmarkRunner._run_one_test): Use Python 2/3 compatible urljoin.

3:56 PM Changeset in webkit [253183] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Optimize IPC::Connection::SyncMessageState methods
https://bugs.webkit.org/show_bug.cgi?id=204890

Reviewed by Alex Christensen.

Optimize IPC::Connection::SyncMessageState methods. We are seeing lock contention on some (app launch)
benchmarks, resulting in the main thread yielding for 10ms.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::SyncMessageState): Make constructor private since this is a singleton class.
(IPC::Connection::ConnectionAndIncomingMessage): Add convenience dispatch() method.

(IPC::Connection::SyncMessageState::processIncomingMessage):
Drop the lock as early as possible, *before* calling RunLoop::main().dispatch().

(IPC::Connection::SyncMessageState::dispatchMessages):
Drop allowedConnection parameter and simplify the code a lot as a result. Only dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection()
needed the pass an allowedConnection but having dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection() call dispatchMessages() was
inefficient since it would cause us to grab the lock in dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection() to update
m_didScheduleDispatchMessagesWorkSet, then release it, then grab the lock again in dispatchMessages() for m_messagesToDispatchWhileWaitingForSyncReply.

(IPC::Connection::SyncMessageState::dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection):
Grab the lock only once to update m_didScheduleDispatchMessagesWorkSet and m_messagesToDispatchWhileWaitingForSyncReply, instead of doing it in 2
separate steps, each one taking the lock.

(IPC::Connection::waitForMessage):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::dispatchSyncMessage):
stop passing a null allowedConnection when calling dispatchMessages().

3:55 PM Changeset in webkit [253182] by Chris Dumez
  • 21 edits in trunk/Source

PageConfiguration::dragClient should use a smart pointer
https://bugs.webkit.org/show_bug.cgi?id=204816

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/EmptyClients.cpp:

(WebCore::pageConfigurationWithEmptyClients):

  • page/DragClient.h:
  • page/DragController.cpp:

(WebCore::DragController::DragController):
(WebCore::DragController::~DragController):
(WebCore::DragController::dragEnded):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::delegateDragSourceAction):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::startDrag):
(WebCore::DragController::beginDrag):
(WebCore::DragController::doSystemDrag):

  • page/DragController.h:

(WebCore::DragController::client const):

  • page/Page.cpp:

(WebCore::Page::Page):

  • page/PageConfiguration.cpp:
  • page/PageConfiguration.h:
  • page/mac/DragControllerMac.mm:

(WebCore::DragController::declareAndWriteDragImage):

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_overriddenMediaType):

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::initWithFrame):

3:53 PM Changeset in webkit [253181] by Chris Dumez
  • 5 edits in trunk/Source

[IPC] Fail BackForwardItemIdentifier decoding if the decoded integer is not a valid ID
https://bugs.webkit.org/show_bug.cgi?id=204920
<rdar://problem/57677453>

Reviewed by Ryosuke Niwa.

Source/WebCore:

  • history/BackForwardItemIdentifier.h:

(WebCore::BackForwardItemIdentifier::decode):

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::updateBackForwardItem):

3:52 PM Changeset in webkit [253180] by Chris Dumez
  • 2 edits in trunk/Source/WebCore/PAL

[IPC] Fail PAL::SessionID decoding if the decoded integer is not a valid session ID
https://bugs.webkit.org/show_bug.cgi?id=204917
<rdar://problem/53418119>

Reviewed by Ryosuke Niwa.

Fail PAL::SessionID IPC decoding if the decoded integer is not a valid session ID.
This makes our IPC more robust to bad input and makes sure we don't try to lookup
an invalid sessionID from a HashMap as a result of a bad IPC.

  • pal/SessionID.h:

(PAL::SessionID::decode):

3:48 PM Changeset in webkit [253179] by yurys@chromium.org
  • 3 edits in trunk/LayoutTests

Web Inspector: http/tests/inspector/target/pause-on-inline-debugger-statement.html is crashing in debug
https://bugs.webkit.org/show_bug.cgi?id=204901

Reviewed by Devin Rousso.

Restructured the test to avoid inadvertent alert() when navigating to a new
process. New logs are printed after inspected page has navigated.

  • http/tests/inspector/target/pause-on-inline-debugger-statement-expected.txt:
  • http/tests/inspector/target/pause-on-inline-debugger-statement.html:
3:40 PM Changeset in webkit [253178] by sihui_liu@apple.com
  • 18 edits
    1 move
    1 add
    1 delete in trunk/Source

Move InProcessIDBServer to WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=204896

Reviewed by Brady Eidson.

Source/WebCore:

We only use InProcessIDBServer in WebKitLegacy now.

No behavior change.

  • Headers.cmake:
  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/shared/IDBRequestData.h:
  • Modules/indexeddb/shared/IDBTransactionInfo.h:
  • Modules/indexeddb/shared/InProcessIDBServer.h: Removed.
  • Modules/mediastream/MediaStreamTrack.cpp:
  • Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:
  • page/Page.cpp:

Source/WebKit:

  • WebProcess/Databases/WebDatabaseProvider.h:

Source/WebKitLegacy:

  • CMakeLists.txt:
  • Storage/InProcessIDBServer.cpp: Renamed from Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp.

(InProcessIDBServer::create):
(InProcessIDBServer::quotaManager):
(storageQuotaManagerSpaceRequester):
(InProcessIDBServer::InProcessIDBServer):
(InProcessIDBServer::identifier const):
(InProcessIDBServer::connectionToServer const):
(InProcessIDBServer::connectionToClient const):
(InProcessIDBServer::deleteDatabase):
(InProcessIDBServer::didDeleteDatabase):
(InProcessIDBServer::openDatabase):
(InProcessIDBServer::didOpenDatabase):
(InProcessIDBServer::didAbortTransaction):
(InProcessIDBServer::didCommitTransaction):
(InProcessIDBServer::didCreateObjectStore):
(InProcessIDBServer::didDeleteObjectStore):
(InProcessIDBServer::didRenameObjectStore):
(InProcessIDBServer::didClearObjectStore):
(InProcessIDBServer::didCreateIndex):
(InProcessIDBServer::didDeleteIndex):
(InProcessIDBServer::didRenameIndex):
(InProcessIDBServer::didPutOrAdd):
(InProcessIDBServer::didGetRecord):
(InProcessIDBServer::didGetAllRecords):
(InProcessIDBServer::didGetCount):
(InProcessIDBServer::didDeleteRecord):
(InProcessIDBServer::didOpenCursor):
(InProcessIDBServer::didIterateCursor):
(InProcessIDBServer::abortTransaction):
(InProcessIDBServer::commitTransaction):
(InProcessIDBServer::didFinishHandlingVersionChangeTransaction):
(InProcessIDBServer::createObjectStore):
(InProcessIDBServer::deleteObjectStore):
(InProcessIDBServer::renameObjectStore):
(InProcessIDBServer::clearObjectStore):
(InProcessIDBServer::createIndex):
(InProcessIDBServer::deleteIndex):
(InProcessIDBServer::renameIndex):
(InProcessIDBServer::putOrAdd):
(InProcessIDBServer::getRecord):
(InProcessIDBServer::getAllRecords):
(InProcessIDBServer::getCount):
(InProcessIDBServer::deleteRecord):
(InProcessIDBServer::openCursor):
(InProcessIDBServer::iterateCursor):
(InProcessIDBServer::establishTransaction):
(InProcessIDBServer::fireVersionChangeEvent):
(InProcessIDBServer::didStartTransaction):
(InProcessIDBServer::didCloseFromServer):
(InProcessIDBServer::notifyOpenDBRequestBlocked):
(InProcessIDBServer::databaseConnectionPendingClose):
(InProcessIDBServer::databaseConnectionClosed):
(InProcessIDBServer::abortOpenAndUpgradeNeeded):
(InProcessIDBServer::didFireVersionChangeEvent):
(InProcessIDBServer::openDBRequestCancelled):
(InProcessIDBServer::confirmDidCloseFromServer):
(InProcessIDBServer::getAllDatabaseNames):
(InProcessIDBServer::didGetAllDatabaseNames):

  • Storage/InProcessIDBServer.h: Added.
  • Storage/WebDatabaseProvider.cpp:

(WebDatabaseProvider::idbConnectionToServerForSession):
(WebDatabaseProvider::deleteAllDatabases):

  • Storage/WebDatabaseProvider.h:
  • WebKitLegacy.xcodeproj/project.pbxproj:
3:28 PM Changeset in webkit [253177] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

Add ThreadMessageReceiver to IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=204908

Reviewed by Brady Eidson.

ThreadMesageReceiver is similar to WorkQueueMessageReceiver, but it should handle messages (dispatched from IPC
thread) on a specific thread, while WorkQueueMessageReceiver may handle messages on different threads.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::addThreadMessageReceiver):
(IPC::Connection::removeThreadMessageReceiver):
(IPC::Connection::dispatchThreadMessageReceiverMessage):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::dispatchMessageToThreadReceiver):

  • Platform/IPC/Connection.h:

(IPC::Connection::ThreadMessageReceiver::dispatchToThread):

3:28 PM Changeset in webkit [253176] by Simon Fraser
  • 6 edits in trunk/Source

Fix inspector/css test assertions after r253158
https://bugs.webkit.org/show_bug.cgi?id=204924

Reviewed by Devin Rousso.
Source/JavaScriptCore:

Teach the inspector protocol about the ::highlight pseudoelement.

  • inspector/protocol/CSS.json:

Source/WebCore:

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::protocolValueForPseudoId):

Source/WebInspectorUI:

  • UserInterface/Controllers/CSSManager.js:

(WI.CSSManager.displayNameForPseudoId):

3:24 PM Changeset in webkit [253175] by Alan Coon
  • 1 copy in tags/Safari-608.5.4

Tag Safari-608.5.4.

3:06 PM Changeset in webkit [253174] by sihui_liu@apple.com
  • 6 edits in trunk/Source/WebCore

Rename IDBDatabaseIdentifier::debugString to IDBDatabaseIdentifier::loggingString
https://bugs.webkit.org/show_bug.cgi?id=204898

Reviewed by Brady Eidson.

We use loggingString everywhere in IDB code but IDBDatabaseIdentifier, so rename it for consistency.

No behavior change.

  • Modules/indexeddb/IDBDatabaseIdentifier.cpp:

(WebCore::IDBDatabaseIdentifier::loggingString const):
(WebCore::IDBDatabaseIdentifier::debugString const): Deleted.

  • Modules/indexeddb/IDBDatabaseIdentifier.h:
  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
(WebCore::IDBClient::IDBConnectionToServer::openDatabase):

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::deleteDatabase):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):

2:55 PM Changeset in webkit [253173] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r242604): Console: unread indicator overlaps selection background of previous scope bar item
https://bugs.webkit.org/show_bug.cgi?id=204630

Reviewed by Timothy Hatcher.

When a new message is added that is immediately filtered, such as from an existing filter or
previously selected scope bar items, rather than show a blinking circle next to the level of
the new message in the scope bar (which doesn't cover the case where there's a filter and
was often hard to notice), add a dismissable warning banner explaning that the message had
been filtered with a button to clear all filters.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView):
(WI.LogContentView.prototype.didAppendConsoleMessageView):
(WI.LogContentView.prototype._previousMessageRepeatCountUpdated):
(WI.LogContentView.prototype._logCleared):
(WI.LogContentView.prototype._messageSourceBarSelectionDidChange):
(WI.LogContentView.prototype._scopeBarSelectionDidChange):
(WI.LogContentView.prototype._filterMessageElements):
(WI.LogContentView.prototype._showHiddenMessagesBannerIfNeeded): Added.
(WI.LogContentView.prototype._markScopeBarItemUnread): Deleted.
(WI.LogContentView.prototype._markScopeBarItemForMessageLevelUnread): Deleted.

  • UserInterface/Views/LogContentView.css:

(.content-view.log):
(.content-view.log > .hidden-messages-banner): Added.
(.content-view.log > .hidden-messages-banner > button): Added.
(.content-view.log > .hidden-messages-banner > .dismiss): Added.
(body[dir=ltr] .content-view.log > .hidden-messages-banner > .dismiss): Added.
(body[dir=rtl] .content-view.log > .hidden-messages-banner > .dismiss): Added.
(.console-messages):
(.log-scope-bar > li:not(.unread) > .indicator): Deleted.
(.log-scope-bar > li.unread > .indicator): Deleted.
(.log-scope-bar > li.unread:hover > .indicator): Deleted.
(.log-scope-bar > li.unread.evaluations > .indicator): Deleted.
(.log-scope-bar > li.unread.errors > .indicator): Deleted.
(.log-scope-bar > li.unread.warnings > .indicator): Deleted.
(.log-scope-bar > li.unread.logs > .indicator): Deleted.
(@keyframes unread-background-pulse): Deleted.

  • UserInterface/Views/FindBanner.js:

(WI.FindBanner):
(WI.FindBanner.prototype.clearAndBlur): Added.
(WI.FindBanner.prototype._clearAndBlur): Deleted.
Expose a public way to clear the find banner.

  • Localizations/en.lproj/localizedStrings.js:
2:48 PM Changeset in webkit [253172] by Devin Rousso
  • 17 edits in trunk/Source/WebInspectorUI

Web Inspector: add WI.EngineeringSetting and WI.DebugSetting to avoid callsite checking
https://bugs.webkit.org/show_bug.cgi?id=204785

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Setting.js:

(WI.Setting.prototype.get defaultValue): Added.
(WI.EngineeringSetting.prototype.get value): Added.
(WI.EngineeringSetting.prototype.set value): Added.
(WI.DebugSetting.prototype.get value): Added.
(WI.DebugSetting.prototype.set value): Added.
(WI.Setting.prototype.get valueRespectingDebugUIAvailability): Deleted.
Only get/set the _value if the WI.isEngineeringBuild/WI.isDebugUIEnabled().

  • UserInterface/Base/Main.js:

(WI.resolvedLayoutDirection):

  • UserInterface/Protocol/RemoteObject.js:

(WI.RemoteObject.prototype.findFunctionSourceCodeLocation):

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype._updateOwnerStyleText):

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration.prototype.update):

  • UserInterface/Proxies/HeapSnapshotEdgeProxy.js:

(WI.HeapSnapshotEdgeProxy.prototype.isPrivateSymbol):

  • UserInterface/Controllers/DOMManager.js:

(WI.DOMManager.prototype.supportsEditingUserAgentShadowTrees):

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager.prototype.get knownNonResourceScripts):
(WI.DebuggerManager.prototype.debuggerDidPause):
(WI.DebuggerManager.prototype.scriptDidParse):

  • UserInterface/Controllers/DiagnosticController.js:

(WI.DiagnosticController):
(WI.DiagnosticController.prototype._debugAutoLogDiagnosticEventsSettingDidChange):
(WI.DiagnosticController.prototype._updateRecorderStates):

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype._appendLocationLink):

  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):

  • UserInterface/Views/OpenResourceDialog.js:

(WI.OpenResourceDialog.prototype._addScriptsForTarget):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor):

  • UserInterface/Views/StackTraceView.js:

(WI.StackTraceView):

  • UserInterface/Views/View.js:

(WI.View.prototype._layoutSubtree):

  • UserInterface/Debug/UncaughtExceptionReporter.js:

(handleUncaughtExceptionRecord):

2:32 PM Changeset in webkit [253171] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r253140): Wasm::FunctionParser needs to bounds check in SetLocal/TeeLocal
https://bugs.webkit.org/show_bug.cgi?id=204909

Reviewed by Keith Miller.

When moving the code from WasmValidate.cpp to WasmFunctionParser.h, I missed that SetLocal and
TeeLocal used to call Wasm::Validate::getLocal, which would perform the bounds check. I just
added back the checks to the parser before accessing the local's type from m_locals.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

1:22 PM Changeset in webkit [253170] by Alan Bujtas
  • 12 edits
    1 copy in trunk/Source/WebCore

[LFC][IFC] Introduce InlineSoftLineBreakItem
https://bugs.webkit.org/show_bug.cgi?id=204905
<rdar://problem/57672472>

Reviewed by Antti Koivisto.

Preserved line breaks apparently require text-line inline boxes with position information.
This patch provides this position information by introducing InlineSoftLineBreakItem.
InlineSoftLineBreakItem is a non-text like subclass of InlineItem which is created when
the text content has a preserved line break.

<pre>text content
</pre>
-> [InlineTextItem(text)][InlineTextItem( )][InlineTextItem(content)][InlineSoftLineBreakItem]

  • WebCore.xcodeproj/project.pbxproj:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

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

  • layout/inlineformatting/InlineItem.cpp:
  • layout/inlineformatting/InlineItem.h:

(WebCore::Layout::InlineItem::isLineBreak const):
(WebCore::Layout::InlineItem::isSoftLineBreak const):
(WebCore::Layout::InlineItem::isHardLineBreak const):
(WebCore::Layout::InlineItem::isForcedLineBreak const): Deleted.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::Content::isAtContentBoundary):
(WebCore::Layout::LineBreaker::Content::append):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::append):
(WebCore::Layout::LineBuilder::appendLineBreak):
(WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
(WebCore::Layout::LineBuilder::runContentHeight const):
(WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
(WebCore::Layout::LineBuilder::TrimmableContent::trim):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::Run::isLineBreak const):
(WebCore::Layout::LineBuilder::InlineItemRun::isLineBreak const):
(WebCore::Layout::LineBuilder::Run::isForcedLineBreak const): Deleted.
(WebCore::Layout::LineBuilder::InlineItemRun::isForcedLineBreak const): Deleted.

  • layout/inlineformatting/InlineSoftLineBreakItem.h: Copied from Source/WebCore/layout/inlineformatting/InlineItem.cpp.

(WebCore::Layout::InlineSoftLineBreakItem::position const):
(WebCore::Layout::InlineSoftLineBreakItem::createSoftLineBreakItem):
(WebCore::Layout::InlineSoftLineBreakItem::InlineSoftLineBreakItem):

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):
(WebCore::Layout::InlineTextItem::createSegmentBreakItem): Deleted.

  • layout/inlineformatting/InlineTextItem.h:

(WebCore::Layout::InlineTextItem::isWhitespace const):
(WebCore::Layout::InlineTextItem::isCollapsible const):
(WebCore::Layout::InlineTextItem::isSegmentBreak const): Deleted.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::inlineItemWidth):
(WebCore::Layout::LineLayoutContext::placeInlineItem):

1:18 PM Changeset in webkit [253169] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Console: copying an evaluation result shouldn't include the saved variable index
https://bugs.webkit.org/show_bug.cgi?id=204906

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype.toClipboardString):

1:05 PM Changeset in webkit [253168] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

[WebAssembly] Fix bad assertion in LLIntPlan
https://bugs.webkit.org/show_bug.cgi?id=204893

Reviewed by Mark Lam.

Before landing r253140 I introduced an assertion in Wasm::LLIntPlan that the pointer to previously
compiled callees must be non-null. However, it's perfectly valid for the pointer to be null when the
module has no functions.

  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::LLIntPlan):

1:03 PM Changeset in webkit [253167] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Elements: the Classes toggle is drawn on top of other content with no other way of scrolling to it
https://bugs.webkit.org/show_bug.cgi?id=204690

Reviewed by Timothy Hatcher.

Use a vertical flexbox for the contents of sidebar panels instead of absolute positioning so
that the variable height Classes "drawer" can have it's own scroll area and doesn't take up
any space from the rest of the panel's contents.

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:

(WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:

(.sidebar > .panel.details.css-style > .content):
(.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
(.sidebar > .panel.details.css-style > .content ~ .options-container):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
(.sidebar > .panel.details.css-style > .content.has-filter-bar): Deleted.

  • UserInterface/Views/Sidebar.css:

(.sidebar > .panel):
(.sidebar > .panel.selected): Deleted.

12:35 PM Changeset in webkit [253166] by yurys@chromium.org
  • 5 edits
    2 adds in trunk

Web Inspector: Avoid using Runtime.executionContextCreated to figure out the iframe's contentDocument node.
https://bugs.webkit.org/show_bug.cgi?id=122764
<rdar://problem/15222136>

Reviewed by Devin Rousso.

Source/WebCore:

Force execution context creation on frame navigation similar to what inspector already
does for all known contexts when Runtime.enable is called. This is a prerequisite for
the injected script to work.

Test: inspector/runtime/execution-context-in-scriptless-page.html

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didCommitLoadImpl):

  • inspector/agents/page/PageRuntimeAgent.cpp:

(WebCore::PageRuntimeAgent::frameNavigated):

  • inspector/agents/page/PageRuntimeAgent.h:

LayoutTests:

Test that execution context is created and reported for pages without JavaScript.

  • inspector/runtime/execution-context-in-scriptless-page-expected.txt: Added.
  • inspector/runtime/execution-context-in-scriptless-page.html: Added.
12:33 PM Changeset in webkit [253165] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Search: there should be some default content when there is no search string
https://bugs.webkit.org/show_bug.cgi?id=204631

Reviewed by Timothy Hatcher.

It's very odd to switch to the Search Tab and find it completely empty, especially if you've
never used it before.

Add basic "No Search String" and "No Search Results" text with a clickable help navigation
item that reveals and focuses the sidebar search input.

  • UserInterface/Views/SearchSidebarPanel.js:

(WI.SearchSidebarPanel.prototype.showDefaultContentView): Added.
(WI.SearchSidebarPanel.prototype.performSearch):
(WI.SearchSidebarPanel.prototype._handleDefaultContentViewSearchNavigationItemClicked): Added.

  • Localizations/en.lproj/localizedStrings.js:
12:23 PM Changeset in webkit [253164] by mark.lam@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

computeIfUsingFuzzerAgent() is called before parsing command line arguments.
https://bugs.webkit.org/show_bug.cgi?id=204886

Reviewed by Saam Barati.

Rolling out r253015 which introduced computeIfUsingFuzzerAgent().

  • runtime/Options.cpp:

(JSC::Options::initialize):
(JSC::computeIfUsingFuzzerAgent): Deleted.

  • runtime/Options.h:

(JSC::Options::isUsingFuzzerAgent): Deleted.

  • runtime/OptionsList.h:

(JSC::OptionRange::operator bool const): Deleted.

  • runtime/VM.cpp:

(JSC::VM::VM):

12:20 PM Changeset in webkit [253163] by Chris Dumez
  • 7 edits
    1 add in trunk/Source

MESSAGE_CHECK BackForwardItemIdentifier on incoming IPC from the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=204899

Reviewed by Ryosuke Niwa.

Source/WebCore:

  • Sources.txt:
  • history/BackForwardItemIdentifier.cpp: Added.

(WebCore::BackForwardItemIdentifier::isValid const):

  • history/BackForwardItemIdentifier.h:

(WebCore::operator!=):

Source/WebKit:

MESSAGE_CHECK BackForwardItemIdentifier on incoming IPC from the WebProcess. This is important since we use this identifier
to look up the WebBackForwardListItem in a HashMap, and looking up a bad ID could corrupt said HashMap.

  • Shared/WebBackForwardListItem.cpp:

Make sure the WebBackForwardListItem is always constructed and destroyed on the main thread, to avoid corrupting
the allItems() HashMap.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::updateBackForwardItem):

12:18 PM Changeset in webkit [253162] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: move the "Add Breakpoint" context menu to be next to the blackboxing context menu item
https://bugs.webkit.org/show_bug.cgi?id=204833

Reviewed by Timothy Hatcher.

Both items are related to JavaScript debugging, so they should be closer together.

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForSourceCode):

12:16 PM Changeset in webkit [253161] by Devin Rousso
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Support search on IndexedDB stores and indexes
https://bugs.webkit.org/show_bug.cgi?id=129208
<rdar://problem/16142046>

Reviewed by Timothy Hatcher.

Add filter bars to the navigation bars for IndexedDB, LocalStorage, and SessionStorage.

  • UserInterface/Views/StorageTabContentView.js:

(WI.StorageTabContentView.prototype.get canHandleFindEvent): Added.
(WI.StorageTabContentView.prototype.handleFindEvent): Added.

  • UserInterface/Views/DOMStorageContentView.js:

(WI.DOMStorageContentView):
(WI.DOMStorageContentView.prototype.get navigationItems): Added.
(WI.DOMStorageContentView.prototype.get canFocusFilterBar): Added.
(WI.DOMStorageContentView.prototype.focusFilterBar): Added.
(WI.DOMStorageContentView.prototype._handleFilterBarFilterDidChange): Added.

  • UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:

(WI.IndexedDatabaseObjectStoreContentView):
(WI.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems):
(WI.IndexedDatabaseObjectStoreContentView.prototype.get canFocusFilterBar): Added.
(WI.IndexedDatabaseObjectStoreContentView.prototype.focusFilterBar): Added.
(WI.IndexedDatabaseObjectStoreContentView.prototype.dataGridMatchNodeAgainstCustomFilters): Added.
(WI.IndexedDatabaseObjectStoreContentView.prototype._handleFilterBarFilterDidChange): Added.
Check against the textContent of each cell for a given WI.DataGridNode to see if it
matches the filter text as all of the pieces of data are WI.RemoteObjects.

  • UserInterface/Views/FilterBar.css:

(.filter-bar):

  • UserInterface/Views/NetworkTableContentView.css:

(.content-view.network .navigation-bar .filter-bar): Deleted.
Remove the background-color to let it match the background content.

11:55 AM Changeset in webkit [253160] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Network: pressing ⌘F when no network item is selected should focus the filter bar
https://bugs.webkit.org/show_bug.cgi?id=204862

Reviewed by Timothy Hatcher.

  • UserInterface/Views/NetworkTabContentView.js:

(WI.NetworkTabContentView.prototype.get canHandleFindEvent): Added.
(WI.NetworkTabContentView.prototype.handleFindEvent): Added.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.get canFocusFilterBar): Added.
(WI.NetworkTableContentView.prototype.focusFilterBar): Added.

11:53 AM Changeset in webkit [253159] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Quick Console: pressing ⌘F shows a second find banner
https://bugs.webkit.org/show_bug.cgi?id=204861

Reviewed by Timothy Hatcher.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.get supportsCustomFindBanner):

11:26 AM Changeset in webkit [253158] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Add CSS parser support for the highlight pseudoelement
https://bugs.webkit.org/show_bug.cgi?id=204902

Reviewed by Antti Koivisto.

Add basic CSS parsing support for ::highlight(), per
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::pseudoId):
(WebCore::CSSSelector::parsePseudoElementType):

  • css/CSSSelector.h:
  • css/SelectorPseudoElementTypeMap.in:
  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo):

  • rendering/style/RenderStyleConstants.h:
11:26 AM Changeset in webkit [253157] by Simon Fraser
  • 6 edits in trunk/Source/WebKit

Minor RemoteLayerTree logging cleanup
https://bugs.webkit.org/show_bug.cgi?id=204865

Reviewed by Tim Horton.

Have the ::description() methods return Strings like everything else does.
Use LOG_WITH_STREAM() so we don't call description() unless the log channel is on.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::dump const):
(WebKit::RemoteLayerTreeTransaction::description const):

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(WebKit::RemoteScrollingCoordinatorTransaction::description const):
(WebKit::RemoteScrollingCoordinatorTransaction::dump const):

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

10:56 AM Changeset in webkit [253156] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

Fix a Typo in IndexedDBInPageCache.html
https://bugs.webkit.org/show_bug.cgi?id=204897

Reviewed by Chris Dumez.

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBInPageCache.html:
10:29 AM Changeset in webkit [253155] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

[MSVC] WebResourceLoadStatisticsStore.h is reporting warning C4804: '/': unsafe use of type 'bool' in operation
https://bugs.webkit.org/show_bug.cgi?id=204870

Reviewed by Darin Adler.

This patch converts storageAccessGranted to a char since makeString()
does not explicitly accept bool types.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:

(WebKit::ThirdPartyDataForSpecificFirstParty::toString const):

10:10 AM Changeset in webkit [253154] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Trim trailing letter-spacing at inline container boundary
https://bugs.webkit.org/show_bug.cgi?id=204895
<rdar://problem/57666898>

Reviewed by Antti Koivisto.

According to https://www.w3.org/TR/css-text-3/#letter-spacing-property, "An inline box only
includes letter spacing between characters completely contained within that element".
This patch enables this behavior by trimming the trailing letter spacing at [container end].

<div>1<span style="letter-spacing: 100px;">2</span>3</div> ->
[1][container start][2][container end][3]
vs.
[1][container start][2<-----100px----->][container end][3]

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::appendInlineContainerEnd):
(WebCore::Layout::LineBuilder::TrimmableContent::trim):
(WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::TrimmableContent::isTrailingRunPartiallyTrimmable const):

9:44 AM Changeset in webkit [253153] by youenn@apple.com
  • 18 edits
    1 copy
    4 adds in trunk

maplike should define a set method
https://bugs.webkit.org/show_bug.cgi?id=204877

Reviewed by Chris Dumez.

Source/WebCore:

maplike implementation was defining an add method instead of a set method.
Update implementation to define and use a set method.
Add an InternalsMapLike to allow testing.

Test: js/dom/maplike.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/highlight/HighlightMap.cpp:

(WebCore::HighlightMap::addFromMapLike):

  • Modules/highlight/HighlightMap.h:
  • Modules/highlight/HighlightMap.idl:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMMapLike.h:

(WebCore::DOMMapLike::set):
(WebCore::forwardSetToMapLike):

  • bindings/scripts/IDLParser.pm:

(parseMapLikeProperties):

  • bindings/scripts/test/JS/JSMapLike.cpp:

(WebCore::jsMapLikePrototypeFunctionSetBody):
(WebCore::jsMapLikePrototypeFunctionSet):
(WebCore::jsMapLikePrototypeFunctionAddBody): Deleted.
(WebCore::jsMapLikePrototypeFunctionAdd): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::createInternalsMapLike):

  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/InternalsMapLike.cpp: Added.
  • testing/InternalsMapLike.h: Added.
  • testing/InternalsMapLike.idl: Added.

LayoutTests:

  • highlight/highlight-interfaces-expected.txt:
  • highlight/highlight-interfaces.html:
  • js/dom/maplike-expected.txt: Added.
  • js/dom/maplike.html: Added.
9:26 AM Changeset in webkit [253152] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Disable LFC when floats are present for now
https://bugs.webkit.org/show_bug.cgi?id=204892

Reviewed by Zalan Bujtas.

Diasable until we start synthesizing the required structures.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::canUseFor):

9:11 AM Changeset in webkit [253151] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Many render tree dump tests show 1px too narrow runs
https://bugs.webkit.org/show_bug.cgi?id=204885

Reviewed by Zalan Bujtas.

Width measurement is currently clamping the measured (float) text widths to layout units. Use rounding instead.

This doesn't solve the fundamental problem of loss of precision but it allows many more render tree dump
based layout tests to pass.

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):
(WebCore::Layout::TextUtil::fixedPitchWidth):

7:33 AM Changeset in webkit [253150] by Philippe Normand
  • 2 edits in trunk/Source/WebKit

[GLib] Display GStreamer version in about:gpu page

Rubber-stamped by Carlos Garcia Campos.

  • UIProcess/API/glib/WebKitProtocolHandler.cpp:

(WebKit::WebKitProtocolHandler::handleGPU):

7:24 AM Changeset in webkit [253149] by youenn@apple.com
  • 21 edits in trunk

inspector/page/overrideSetting-MockCaptureDevicesEnabled.html is failing after removal of internals.setMockMediaCaptureDevicesEnabled API
https://bugs.webkit.org/show_bug.cgi?id=204849

Reviewed by Eric Carlson.

Source/WebCore:

Add API and internals to check which center is used in WebProcess.
Covered by updated test.

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::mockRealtimeMediaSourceCenterEnabled):

  • platform/mock/MockRealtimeMediaSourceCenter.h:
  • testing/Internals.cpp:

(WebCore::Internals::isMockRealtimeMediaSourceCenterEnabled):

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

Source/WebKit:

Synchronize the center with the preferences when the value might be updated.
Add API to check which center is used in UIProcess.

  • UIProcess/API/C/WKPage.cpp:

(WKPageIsMockRealtimeMediaSourceCenterEnabled):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaPermissionRequestManagerProxy::setMockCaptureDevicesEnabledOverride):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:

(WebKit::UserMediaPermissionRequestManagerProxy::setMockCaptureDevicesEnabledOverride): Deleted.

Tools:

Add test runner API to check which center (mock or not) is used in UIProcess side.

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

(WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::isMockRealtimeMediaSourceCenterEnabled const):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Update test to use center state getters.

  • inspector/page/overrideSetting-MockCaptureDevicesEnabled-expected.txt:
  • inspector/page/overrideSetting-MockCaptureDevicesEnabled.html:
6:27 AM Changeset in webkit [253148] by eric.carlson@apple.com
  • 13 edits in trunk

WPT test MediaStream-MediaElement-srcObject.https.html times out
https://bugs.webkit.org/show_bug.cgi?id=204762
<rdar://problem/57567671>

Reviewed by youenn fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/mediacapture-streams/MediaStream-MediaElement-firstframe.https-expected.txt:
  • web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt:
  • web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html:

Source/WebCore:

No new tests, these changes fix existing tests.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::prepareForLoad): Check hasMediaStreamSrcObject() instead of
m_mediaStreamSrcObject so we behave correctly when a MediaStream is cleared by setting srcObject to null.
(WebCore::HTMLMediaElement::loadResource): Ditto.
(WebCore::HTMLMediaElement::seekWithTolerance): Return early if seeking isn't allowed.
(WebCore::HTMLMediaElement::defaultPlaybackRate const): Check hasMediaStreamSrcObject() instead
of m_mediaStreamSrcObject.
(WebCore::HTMLMediaElement::setDefaultPlaybackRate): Ditto.
(WebCore::HTMLMediaElement::playbackRate const): Ditto.
(WebCore::HTMLMediaElement::setPlaybackRate): Ditto.
(WebCore::HTMLMediaElement::ended const): Ditto.
(WebCore::HTMLMediaElement::preload const): Ditto.
(WebCore::HTMLMediaElement::setPreload): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Don't send an 'ended' event for a MediaStream.
(WebCore::HTMLMediaElement::clearMediaPlayer): Don't check m_settingMediaStreamSrcObject, it
is never set.

  • html/HTMLMediaElement.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Add m_lastReportedTime.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::durationMediaTime const): Return last reported
time after the stream ends.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime const): Ditto. Set m_lastReportedTime.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Don't return HaveNothing
for an inactive stream. Return HaveMetadata for an stream that has either ended or is waiting
for the first video frame.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Send duration changed when
a stream ends.

LayoutTests:

  • TestExpectations: Mark imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html

as expected to fail because the failure message logs media times as floats, so the values
logged are always different.

6:11 AM Changeset in webkit [253147] by Alan Bujtas
  • 8 edits in trunk

[LFC][IFC] Move trailing trimming logic to LineBuilder::TrimmableContent
https://bugs.webkit.org/show_bug.cgi?id=204872
<rdar://problem/57652365>

Reviewed by Antti Koivisto.

Source/WebCore:

Move trimming logic from LineBuilder::removeTrailingTrimmableContent to inside TrimmableContent.
This is also in preparation for adding partial trimming at inline container boundary.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContextForInlineContent):

  • layout/inlineformatting/InlineLineBreaker.h:
  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
(WebCore::Layout::LineBuilder::TrimmableContent::TrimmableContent):
(WebCore::Layout::LineBuilder::TrimmableContent::append):
(WebCore::Layout::LineBuilder::TrimmableContent::trim):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::isTrailingRunFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableContent::isTrailingRunFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableContent::reset):
(WebCore::Layout::LineBuilder::isTrailingContentFullyTrimmable const): Deleted.
(WebCore::Layout::LineBuilder::TrimmableContent::isTrailingContentFullyTrimmable const): Deleted.
(WebCore::Layout::LineBuilder::TrimmableContent::clear): Deleted.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::processUncommittedContent):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
4:56 AM Changeset in webkit [253146] by youenn@apple.com
  • 10 edits in trunk

getStats() promise never rejects nor resolves when peer connection state is closed.
https://bugs.webkit.org/show_bug.cgi?id=204842
<rdar://problem/57617107>

Reviewed by Eric Carlson.

Source/WebCore:

Instead of closing and nulling the backend when closing the peer connection,
we only close it. This allows calling getStats to retrieve the last gathered stats from the backend.
Covered by updated test.

  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::stop):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::close):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::close):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

LayoutTests:

  • webrtc/video-stats-expected.txt:
  • webrtc/video-stats.html:
Note: See TracTimeline for information about the timeline view.