WebKit-https.git
3 months agoUnreviewed GTK gardening. Remove platform specific results for http/tests/appcache...
carlosgc@webkit.org [Thu, 9 Apr 2020 13:20:22 +0000 (13:20 +0000)]
Unreviewed GTK gardening. Remove platform specific results for http/tests/appcache/history-test.html

This was a progression, not a regression.

* platform/gtk/TestExpectations:
* platform/gtk/http/tests/appcache/history-test-expected.txt: Removed.

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

3 months ago[GTK] Gardening, flaky failures in EWS GTK-WK2
dpino@igalia.com [Thu, 9 Apr 2020 13:19:22 +0000 (13:19 +0000)]
[GTK] Gardening, flaky failures in EWS GTK-WK2
https://bugs.webkit.org/show_bug.cgi?id=210268

Unreviewed gardening.

Mark tests only failing in EWS GTK-WK2 as flaky.

* platform/gtk/TestExpectations:

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

3 months agoFix CLOOP build
commit-queue@webkit.org [Thu, 9 Apr 2020 13:16:29 +0000 (13:16 +0000)]
Fix CLOOP build
https://bugs.webkit.org/show_bug.cgi?id=207119

Patch by Angelos Oikonomopoulos <angelos@igalia.com> on 2020-04-09
Reviewed by Aakash Jain.

* CMakeLists.txt:

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

3 months ago[WebDriver] Gardening, update expectations of several WebDriver tests.
dpino@igalia.com [Thu, 9 Apr 2020 12:08:01 +0000 (12:08 +0000)]
[WebDriver] Gardening, update expectations of several WebDriver tests.
https://bugs.webkit.org/show_bug.cgi?id=210229

Reviewed by Carlos Garcia Campos.

Clean up tests expected to fail but passed.

* TestExpectations.json:

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

3 months ago[WPE] Gardening, update TestExpectations
dpino@igalia.com [Thu, 9 Apr 2020 11:59:09 +0000 (11:59 +0000)]
[WPE] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=210257

Unreviewed gardening.

* platform/wpe/TestExpectations:
* platform/wpe/accessibility/roles-exposed-expected.txt: Updated baseline after r259671.
* platform/wpe/fast/ruby/bopomofo-mixed-expected.txt: New baseline after r258990.
* platform/wpe/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-003-expected.txt: New baseline after r259059.
* platform/wpe/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt:  New baseline after r259194.
* platform/wpe/accessibility/menu-list-sends-change-notification-expected.txt: New baseline after r259438.

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

3 months agoUserData::decode should add bounds checks
ddkilzer@apple.com [Thu, 9 Apr 2020 11:01:58 +0000 (11:01 +0000)]
UserData::decode should add bounds checks
<https://webkit.org/b/210247>
<rdar://problem/61467748>

Reviewed by Alex Christensen.

* Shared/UserData.cpp:
(WebKit::UserData::decode):
- Add bounds checks using WTF::isInBounds<size_t>.
* Shared/UserData.h:
(WebKit::UserData::decode):
- Add WARN_UNUSED_RETURN.

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

3 months agoFollow-up: WTF::Persistence::VectorCoder and IPC::VectorArgumentCoder should do bound...
ddkilzer@apple.com [Thu, 9 Apr 2020 10:52:52 +0000 (10:52 +0000)]
Follow-up: WTF::Persistence::VectorCoder and IPC::VectorArgumentCoder should do bounds checking without crashing
<https://webkit.org/b/210227>
<rdar://problem/60832243>

Reviewed by Alex Christensen.

Source/WebKit:

* Platform/IPC/ArgumentCoders.h:
- Add missing call to decoder.markInvalid() if decoding of
  `decodedSize` fails.
- Replace safeCast<size_t> with isInBounds<size_t> so that we
  don't crash if `decodedSize` is too big.  Instead we fail
  decoding by marking the decoder invalid and returning early.
- Revert checked arithemtic for multiplication since
  bufferIsLargeEnoughToContain<T(size) already did this check
  for us.

Source/WTF:

* wtf/persistence/PersistentCoders.h:
(WTF::Persistence::VectorCoder::decode):
- Replace safeCast<size_t> with isInBounds<size_t> so that we
  don't crash if `decodedSize` is too big.  Instead we fail
  decoding by returning early.
- Revert checked arithemtic for multiplication since
  bufferIsLargeEnoughToContain<T(size) already did this check
  for us.

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

3 months ago[ews] rename CompileWebKitToT to CompileWebKitWithoutPatch
aakash_jain@apple.com [Thu, 9 Apr 2020 10:05:58 +0000 (10:05 +0000)]
[ews] rename CompileWebKitToT to CompileWebKitWithoutPatch
https://bugs.webkit.org/show_bug.cgi?id=210190

Reviewed by Alex Christensen.

* BuildSlaveSupport/ews-build/steps.py: Renamed CompileWebKitToT to CompileWebKitWithoutPatch.
(CompileWebKit.evaluateCommand):
(CompileWebKitWithoutPatch):
(AnalyzeCompileWebKitResults.start):
(ReRunWebKitTests.evaluateCommand):
(ReRunAPITests.evaluateCommand):
(CompileWebKitToT): Deleted.
(CompileWebKitToT.doStepIf): Deleted.
(CompileWebKitToT.hideStepIf): Deleted.
(CompileWebKitToT.evaluateCommand): Deleted.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests accordingly.

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

3 months agoImplement a more efficient tagCFunction() tool.
mark.lam@apple.com [Thu, 9 Apr 2020 09:27:40 +0000 (09:27 +0000)]
Implement a more efficient tagCFunction() tool.
https://bugs.webkit.org/show_bug.cgi?id=210254

Reviewed by Keith Miller.

Source/JavaScriptCore:

Putting tagCFunction() to use.

* b3/B3LowerMacros.cpp:
* b3/B3LowerMacrosAfterOptimizations.cpp:
* b3/B3MathExtras.cpp:
* b3/B3ReduceLoopStrength.cpp:
(JSC::B3::ReduceLoopStrength::reduceByteCopyLoopsToMemcpy):
* b3/B3ReduceStrength.cpp:
* b3/testb3_5.cpp:
(testCallSimple):
(testCallRare):
(testCallRareLive):
(testCallSimplePure):
(testCallFunctionWithHellaArguments):
(testCallFunctionWithHellaArguments2):
(testCallFunctionWithHellaArguments3):
(testCallSimpleDouble):
(testCallSimpleFloat):
(testCallFunctionWithHellaDoubleArguments):
(testCallFunctionWithHellaFloatArguments):
(testLinearScanWithCalleeOnStack):
* b3/testb3_6.cpp:
(testInterpreter):
* b3/testb3_7.cpp:
(testLICMPure):
(testLICMPureSideExits):
(testLICMPureWritesPinned):
(testLICMPureWrites):
(testLICMReadsLocalState):
(testLICMReadsPinned):
(testLICMReads):
(testLICMPureNotBackwardsDominant):
(testLICMPureFoiledByChild):
(testLICMPureNotBackwardsDominantFoiledByChild):
(testLICMExitsSideways):
(testLICMWritesLocalState):
(testLICMWrites):
(testLICMFence):
(testLICMWritesPinned):
(testLICMControlDependent):
(testLICMControlDependentNotBackwardsDominant):
(testLICMControlDependentSideExits):
(testLICMReadsPinnedWritesPinned):
(testLICMReadsWritesDifferentHeaps):
(testLICMReadsWritesOverlappingHeaps):
(testLICMDefaultCall):
(testShuffleDoesntTrashCalleeSaves):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::emitRestoreArguments):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::handleExitCounts):
(JSC::DFG::osrWriteBarrier):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::callExceptionFuzz):
* jit/CCallHelpers.cpp:
(JSC::CCallHelpers::ensureShadowChickenPacket):
* jit/JITOperations.cpp:
* jit/ThunkGenerators.cpp:
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::slowPathFor):
(JSC::nativeForGenerator):
(JSC::boundFunctionCallGenerator):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addRefFunc):
(JSC::Wasm::B3IRGenerator::addTableSize):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::addGrowMemory):
(JSC::Wasm::B3IRGenerator::setGlobal):
(JSC::Wasm::B3IRGenerator::emitWriteBarrierForJSWrapper):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Popcnt>):
* wasm/WasmThunks.cpp:
(JSC::Wasm::triggerOMGEntryTierUpThunkGenerator):

Source/WTF:

The current tagCFunctionPtr() tool does some extra work that is not needed if
we are tagging a known function and not a potentially arbitrary pointer.  For
example,
1. it doesn't need to do a null check.
2. it doesn't need to authenticate the function address.
3. The RELEASE_ASSERT used to enforce that authentication can also go away.

We should only use tagCFunction() (instead of tagCFunctionPtr()) if we know for
certain that we're operating on a C/C++ function, and not some arbitrary pointer.

* wtf/PtrTag.h:
(WTF::tagCFunction):

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

3 months agoRemove unnecessary explicit parsing for mo@maxsize value "infinity"
commit-queue@webkit.org [Thu, 9 Apr 2020 07:57:16 +0000 (07:57 +0000)]
Remove unnecessary explicit parsing for mo@maxsize value "infinity"
https://bugs.webkit.org/show_bug.cgi?id=202720

Patch by Delan Azabani <dazabani@igalia.com> on 2020-04-09
Reviewed by Frédéric Wang.

In MathML 2, the default mo@maxsize was infinity [1], unless some other
default was given by mstyle@maxsize [2]. The sole purpose of "infinity"
was to give authors a way to set mo@maxsize to infinity when some other
mstyle@maxsize was set.

MathML Core removes mstyle@maxsize [3][4], such that "infinity" has the
same semantics as any other missing or invalid mo@maxsize, so the spec
has been simplified to make infinity an anonymous value [5][6].

No functional change, because WebKit has never supported mstyle@maxsize
anyway. To verify that there's no functional change:

1.  Search for references to LengthType::Infinity, and observe that the
    mo@maxsize parser in MathMLOperatorElement::maxSize is the only
    place where a Length of ::type infinity is created
2.  Search for references to that method, and observe that the only
    caller (RenderMathMLOperator::maxSize) passes intMaxForLayoutUnit
    (infinity) to toUserUnits as the referenceValue
3.  Go to the definition of toUserUnits, and observe that the refer-
    enceValue is used as the ParsingFailed default
4.  Step 1 shows that no other attributes would be affected by removing
    LengthType::Infinity, and steps 2 and 3 show that mo@maxsize treats
    invalid values as infinity, therefore it's safe to remove both the
    "infinity" parsing code and the underlying LengthType variant

[1] https://www.w3.org/TR/MathML2/chapter3.html#id.3.2.5.2
[2] https://www.w3.org/TR/MathML2/chapter3.html#presm.mstyle
[3] https://mathml-refresh.github.io/mathml-core/#style-change-mstyle
[4] https://github.com/mathml-refresh/mathml/issues/1
[5] https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes
[6] https://github.com/mathml-refresh/mathml/issues/107

No new tests, because no functional change.

* mathml/MathMLElement.h: Remove LengthType::Infinity.
* mathml/MathMLOperatorElement.cpp:
(WebCore::MathMLOperatorElement::maxSize): Remove explicit branch on "infinity". Replace what remains with an equivalent cachedMathMLLength call.
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::toUserUnits): Remove explicit branch on LengthType::Infinity.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::maxSize): Update comment to refer to the default value in the same way as the spec.

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

3 months ago[GTK] Gardening, update TestExpectations
dpino@igalia.com [Thu, 9 Apr 2020 07:34:46 +0000 (07:34 +0000)]
[GTK] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=210248

Unreviewed gardening.

Add tests failing after r259705.

* platform/gtk/TestExpectations:

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

3 months ago[GTK] Gardening, update TestExpectations
dpino@igalia.com [Thu, 9 Apr 2020 06:14:29 +0000 (06:14 +0000)]
[GTK] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=210234

Unreviewed gardening.

Clean up tests expected to fail but passed.

* platform/gtk/TestExpectations:

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

3 months agoUnreviewed test gardening, remove expectations for tests that are now consistently...
ryanhaddad@apple.com [Thu, 9 Apr 2020 06:00:17 +0000 (06:00 +0000)]
Unreviewed test gardening, remove expectations for tests that are now consistently passing.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/ios/TestExpectations:
* platform/ipad/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

3 months agoWeb Inspector: Debugger: treat comma sub-expressions as separate statements
drousso@apple.com [Thu, 9 Apr 2020 05:10:27 +0000 (05:10 +0000)]
Web Inspector: Debugger: treat comma sub-expressions as separate statements
https://bugs.webkit.org/show_bug.cgi?id=209998

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Minifiers sometimes use `,` instead of `;` as a way of compressing multiple statements into
a single statement (e.g. inside an `if` conditional). This makes stepping through minified
code much less useful, as our current stepping logic is based on expressions (not including
step in or step out). In most cases, we do actually want to treat each sub-expression in a
comma expression as a statement so as to emulate the behaviour as if there were `;` instead.

* bytecompiler/NodesCodegen.cpp:
(JSC::CommaNode::emitBytecode):

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVariableDeclarationList):
(Parser<LexerType>::parseExpression):
Shift the location of subsequent sub-expressions to be after the comma. Add breakpoint pause
locations for each subsequent sub-expression.

Source/WebInspectorUI:

Minifiers sometimes use `,` instead of `;` as a way of compressing multiple statements into
a single statement (e.g. inside an `if` conditional). This makes stepping through minified
code much less useful, as our current stepping logic is based on expressions (not including
step in or step out). In most cases, we do actually want to treat each sub-expression in a
comma expression as a statement so as to emulate the behaviour as if there were `;` instead.

* UserInterface/Workers/Formatter/JSFormatter.js:
(JSFormatter.prototype._isLikelyToHaveNewline):
(JSFormatter.prototype._handleTokenAtNode):
Put each sub-expression in a comma expression on it's own line.

LayoutTests:

* inspector/debugger/breakpoints/resources/dump-functions.js:
* inspector/debugger/breakpoints/resources/dump-general.js:
* inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
* inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
* inspector/debugger/stepping/stepOver.html:
* inspector/debugger/stepping/stepOver-expected.txt:
* inspector/debugger/stepping/stepping-function-calls.html:
* inspector/debugger/stepping/stepping-function-calls-expected.txt:
* inspector/debugger/stepping/stepping-loops.html:
* inspector/debugger/stepping/stepping-loops-expected.txt:
* inspector/debugger/stepping/stepping-misc.html:
* inspector/debugger/stepping/stepping-misc-expected.txt:
* inspector/formatting/resources/javascript-tests/for-statements.js:
* inspector/formatting/resources/javascript-tests/for-statements-expected.js:
* inspector/formatting/resources/javascript-tests/if-statements.js:
* inspector/formatting/resources/javascript-tests/if-statements-expected.js:
* inspector/formatting/resources/javascript-tests/sample-jquery-expected.js:
* inspector/formatting/resources/javascript-tests/sample-jquery-expected.js:

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

3 months agoWTF::Persistence::VectorCoder and IPC::VectorArgumentCoder should use checked arithmetic
ddkilzer@apple.com [Thu, 9 Apr 2020 04:33:27 +0000 (04:33 +0000)]
WTF::Persistence::VectorCoder and IPC::VectorArgumentCoder should use checked arithmetic
<https://webkit.org/b/210227>
<rdar://problem/60832243>

Reviewed by Alex Christensen.

Source/WebKit:

* Platform/IPC/ArgumentCoders.h:
(IPC::VectorArgumentCoder::decode):
- Use safeCast<> to cast from uint64_t to size_t.
- Use checked arithemtic for multiplication.

Source/WTF:

* wtf/persistence/PersistentCoders.h:
(WTF::Persistence::VectorCoder::decode):
- Use checked arithemtic for multiplication.

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

3 months agoFix WebContent process launching after r259758.
ap@apple.com [Thu, 9 Apr 2020 04:01:54 +0000 (04:01 +0000)]
Fix WebContent process launching after r259758.

* WebProcess/com.apple.WebProcess.sb.in:

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

3 months agoEnable incremental PDF loading.
beidson@apple.com [Thu, 9 Apr 2020 03:32:21 +0000 (03:32 +0000)]
Enable incremental PDF loading.
<rdar://problem/60396263> and https://bugs.webkit.org/show_bug.cgi?id=210241

Reviewed by Tim Horton.

* FeatureFlags/WebKit.plist:

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

3 months ago[WPE] Gardening, update baselines after r259296
dpino@igalia.com [Thu, 9 Apr 2020 03:17:31 +0000 (03:17 +0000)]
[WPE] Gardening, update baselines after r259296
https://bugs.webkit.org/show_bug.cgi?id=210242

Unreviewed gardening.

* platform/wpe/css2.1/20110323/margin-applies-to-006-expected.txt:
* platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-012-expected.txt:
* platform/wpe/tables/mozilla_expected_failures/dom/appendCol1-expected.txt:

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

3 months ago[WPE] Gardening, update TestExpectations
dpino@igalia.com [Thu, 9 Apr 2020 02:40:56 +0000 (02:40 +0000)]
[WPE] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=210240

Unreviewed gardening.

* platform/wpe/TestExpectations:

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

3 months agoUserMediaCaptureManagerProxy::clone should validate its parameters
ddkilzer@apple.com [Thu, 9 Apr 2020 01:37:30 +0000 (01:37 +0000)]
UserMediaCaptureManagerProxy::clone should validate its parameters
<https://webkit.org/b/210221>
<rdar://problem/61063019>

Reviewed by Alex Christensen.

* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(MESSAGE_CHECK): Define (and undef) new macro for assertion.
(WebKit::UserMediaCaptureManagerProxy::clone): Change ASSERT()
to MESSAGE_CHECK().

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

3 months agoWebKit::ShareableBitmap::Handle::decode() should validate m_size instance variables
ddkilzer@apple.com [Thu, 9 Apr 2020 01:10:13 +0000 (01:10 +0000)]
WebKit::ShareableBitmap::Handle::decode() should validate m_size instance variables
<https://webkit.org/b/210211>
<rdar://problem/60543986>

Reviewed by Alex Christensen.

* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::Handle::decode): Return early if
either m_size instance variable is less than zero.

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

3 months agoquerySelector("#\u0000") should match an element with ID U+FFFD
cdumez@apple.com [Thu, 9 Apr 2020 00:43:49 +0000 (00:43 +0000)]
querySelector("#\u0000") should match an element with ID U+FFFD
https://bugs.webkit.org/show_bug.cgi?id=210119

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import test coverage from upstream WPT.

* web-platform-tests/dom/nodes/ParentNode-querySelector-escapes-expected.txt: Added.
* web-platform-tests/dom/nodes/ParentNode-querySelector-escapes.html: Added.

Source/WebCore:

As per the specification [1][2], we should preprocess the input string before performing
CSS tokenization. The preprocessing step replaces certain characters in the input string.

However, our code did not have this preprocessing step and instead was trying to deal
with those characters during tokenization. This is however not working as expected for
the '\0' character (which is supposed to be replaced with U+FFFD REPLACEMENT CHARACTER)
because our code deals with StringViews of the input String and just converts part of
the input stream to Strings / AtomStrings.

To address the issue, this patch adds a preprocessing step that replaces the '\0'
character with the U+FFFD REPLACEMENT CHARACTER). I opted not to replace '\r' or '\f'
characters since our tokenizer seems to be dealing fine with those.

[1] https://drafts.csswg.org/css-syntax/#input-preprocessing
[2] https://drafts.csswg.org/css-syntax/#parser-entry-points

Test: imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-escapes.html

* css/parser/CSSTokenizer.cpp:
(WebCore::preprocessString):
(WebCore::CSSTokenizer::CSSTokenizer):
(WebCore::CSSTokenizer::lessThan):
(WebCore::CSSTokenizer::hyphenMinus):
(WebCore::CSSTokenizer::hash):
(WebCore::CSSTokenizer::reverseSolidus):
(WebCore::CSSTokenizer::letterU):
(WebCore::CSSTokenizer::consumeNumber):
(WebCore::CSSTokenizer::consumeIdentLikeToken):
(WebCore::CSSTokenizer::consumeStringTokenUntil):
(WebCore::CSSTokenizer::consumeUnicodeRange):
(WebCore::CSSTokenizer::consumeUrlToken):
(WebCore::CSSTokenizer::consumeBadUrlRemnants):
(WebCore::CSSTokenizer::consumeSingleWhitespaceIfNext):
(WebCore::CSSTokenizer::consumeIfNext):
(WebCore::CSSTokenizer::consumeName):
(WebCore::CSSTokenizer::consumeEscape):
(WebCore::CSSTokenizer::nextTwoCharsAreValidEscape):
(WebCore::CSSTokenizer::nextCharsAreNumber):
(WebCore::CSSTokenizer::nextCharsAreIdentifier):
* css/parser/CSSTokenizer.h:
* css/parser/CSSTokenizerInputStream.h:
(WebCore::CSSTokenizerInputStream::nextInputChar const):
(WebCore::CSSTokenizerInputStream::peek const):
(WebCore::CSSTokenizerInputStream::peekWithoutReplacement const): Deleted.

Source/WTF:

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
Slightly optimize the 16-bit code path of StringImpl::replace(). Since we know
there is no character match from indexes 0 to i, we can simply use memcpy for
this range.

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

3 months ago_corsDisablingPatterns should allow security policy access to those patterns
commit-queue@webkit.org [Thu, 9 Apr 2020 00:42:25 +0000 (00:42 +0000)]
_corsDisablingPatterns should allow security policy access to those patterns
https://bugs.webkit.org/show_bug.cgi?id=210218
<rdar://problem/61395166>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-08
Reviewed by Timothy Hatcher.

Source/WebCore:

This gives WKWebViewConfiguration._corsDisablingPatterns power similar to WKBundleAddOriginAccessWhitelistEntry
but its API is per-WKWebView (even if its implementation is unfortunately currently process global in the web process).
Functionality covered by a new API test.

* page/Page.cpp:
(WebCore::m_loadsFromNetwork):
* page/PageConfiguration.h:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canRequest const):
(WebCore::SecurityOrigin::canDisplay const):
* page/SecurityPolicy.cpp:
(WebCore::originAccessPatterns):
(WebCore::SecurityPolicy::isAccessWhiteListed):
(WebCore::SecurityPolicy::allowAccessTo):
(WebCore::SecurityPolicy::isAccessToURLWhiteListed): Deleted.
* page/SecurityPolicy.h:

Source/WebKit:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_processDisplayName):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

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

3 months agoREGRESSION(r257758): Launch time performance regression
bfulgham@apple.com [Thu, 9 Apr 2020 00:41:18 +0000 (00:41 +0000)]
REGRESSION(r257758): Launch time performance regression
https://bugs.webkit.org/show_bug.cgi?id=210157
<rdar://problem/61119881>

Reviewed by Alex Christensen.

Address a launch time performance regression in the WebProcessPool constructor
by starting a potentially slow server call in the constructor, and only waiting
for its result if it has not been received when the value is needed.

* UIProcess/WebProcessPool.cpp:
(WebProcessPool::WebProcessPool): Start initialization function in constructor,
rather than blocking for the

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

3 months agoWKWebViews should behave as if they had loaded something after restoring session...
commit-queue@webkit.org [Thu, 9 Apr 2020 00:38:51 +0000 (00:38 +0000)]
WKWebViews should behave as if they had loaded something after restoring session state
https://bugs.webkit.org/show_bug.cgi?id=210097
<rdar://problem/58778490>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-08
Reviewed by Chris Dumez.

Source/WebKit:

Specifically, we don't want to close a WKWebView after restoring the session state into another
WKWebView into it then navigating to a phishing page.  We want to be at the previous page after
the user clicks "Go back".

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(TEST):

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

3 months agoAdd curly braces after one line if statement for the case when we aren't using the...
katherine_cheney@apple.com [Thu, 9 Apr 2020 00:20:13 +0000 (00:20 +0000)]
Add curly braces after one line if statement for the case when we aren't using the internal SDK
https://bugs.webkit.org/show_bug.cgi?id=210225
<rdar://problem/61485209>

Reviewed by David Kilzer.

* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::initializeAppBoundDomains):

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

3 months agoRemove ENABLE_INTL define
ross.kirsling@sony.com [Thu, 9 Apr 2020 00:06:00 +0000 (00:06 +0000)]
Remove ENABLE_INTL define
https://bugs.webkit.org/show_bug.cgi?id=210164

Reviewed by Darin Adler.

.:

* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Scripts/generateIntlCanonicalizeLanguage.py:
* builtins/DatePrototype.js:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToLocaleString):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::finishCreation):
* runtime/IntlCollator.cpp:
* runtime/IntlCollator.h:
* runtime/IntlCollatorConstructor.cpp:
* runtime/IntlCollatorConstructor.h:
* runtime/IntlCollatorPrototype.cpp:
* runtime/IntlCollatorPrototype.h:
* runtime/IntlDateTimeFormat.cpp:
* runtime/IntlDateTimeFormat.h:
* runtime/IntlDateTimeFormatConstructor.cpp:
* runtime/IntlDateTimeFormatConstructor.h:
* runtime/IntlDateTimeFormatPrototype.cpp:
* runtime/IntlDateTimeFormatPrototype.h:
* runtime/IntlNumberFormat.cpp:
* runtime/IntlNumberFormat.h:
* runtime/IntlNumberFormatConstructor.cpp:
* runtime/IntlNumberFormatConstructor.h:
* runtime/IntlNumberFormatPrototype.cpp:
* runtime/IntlNumberFormatPrototype.h:
* runtime/IntlObject.cpp:
* runtime/IntlObject.h:
* runtime/IntlObjectInlines.h:
* runtime/IntlPluralRules.cpp:
* runtime/IntlPluralRules.h:
* runtime/IntlPluralRulesConstructor.cpp:
* runtime/IntlPluralRulesConstructor.h:
* runtime/IntlPluralRulesPrototype.cpp:
* runtime/IntlPluralRulesPrototype.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::defaultCollator const):
(JSC::JSGlobalObject::pluralRulesStructure):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncDateTimeFormat):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToLocaleString):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncToLocaleUpperCase):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WTF:

AppleWin (and, following suit, FTW) was the only upstream platform turning ENABLE_INTL off;
now that their headers have been upgraded to ICU 62, this define can be removed entirely.

Going forward, we thus assume JSC has an Intl object and can simply runtime-guard any new features added to it.

* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

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

3 months agoREGRESSION (r258525): Occasional crashes under TextManipulationController::observePar...
wenson_hsieh@apple.com [Wed, 8 Apr 2020 23:59:31 +0000 (23:59 +0000)]
REGRESSION (r258525): Occasional crashes under TextManipulationController::observeParagraphs
https://bugs.webkit.org/show_bug.cgi?id=210215
<rdar://problem/61362512>

Reviewed by Darin Adler.

In the case where `startOfParagraph` or `endOfParagraph` return a null `Position`, we end up crashing under
TextManipulationController::observeParagraphs while creating `ParagraphContentIterator`, which expects non-null
`Position`s because it dereferences the result of `makeBoundaryPoint`.

Avoid this crash for now by bailing if either the start or end positions are null. Tests to be added in a
followup patch.

* editing/TextManipulationController.cpp:
(WebCore::TextManipulationController::observeParagraphs):

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

3 months agoHandle [PDFDocument initWithProvider:] returning nil
beidson@apple.com [Wed, 8 Apr 2020 23:50:38 +0000 (23:50 +0000)]
Handle [PDFDocument initWithProvider:] returning nil
<rdar://problem/61482395> and https://bugs.webkit.org/show_bug.cgi?id=210224

Reviewed by Geoff Garen.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::threadEntry): Treat a nil PDFDocument as "non-linearized, fallback to normal loading"

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

3 months agoRelease WebGLLayer earlier in ~GraphicsContextGLOpenGL
commit-queue@webkit.org [Wed, 8 Apr 2020 22:57:51 +0000 (22:57 +0000)]
Release WebGLLayer earlier in ~GraphicsContextGLOpenGL
https://bugs.webkit.org/show_bug.cgi?id=210213

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-08
Reviewed by Dean Jackson.

Release WebGLLayer earlier and remove public context property,
which is no longer called.

* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
* platform/graphics/cocoa/WebGLLayer.h:
* platform/graphics/cocoa/WebGLLayer.mm:

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

3 months agoREGRESSION: [ Mojave wk1 Debug and iOS wk2 Debug ] http/tests/IndexedDB/collect-IDB...
lawrence.j@apple.com [Wed, 8 Apr 2020 22:55:41 +0000 (22:55 +0000)]
REGRESSION: [ Mojave wk1 Debug and iOS wk2 Debug ] http/tests/IndexedDB/collect-IDB-objects.https.html is flaky timing out and crashing.
https://bugs.webkit.org/show_bug.cgi?id=210219

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/mac-wk1/TestExpectations:

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

3 months agoTrack editable elements on screen
dbates@webkit.org [Wed, 8 Apr 2020 22:41:44 +0000 (22:41 +0000)]
Track editable elements on screen
https://bugs.webkit.org/show_bug.cgi?id=209888
<rdar://problem/61196886>

Reviewed by Simon Fraser.

Source/JavaScriptCore:

Add feature define to track editable elements on screen (enabled by default on iOS and iOS Simulator).

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Amend EventRegion to store a region of all the hit test visible rects of editable elements
on the page. This data will be sent over to the UI process so that it can quickly determine
if a search rect would intersect any editable elements.

An element is considered editable if it has CSS -webkit-user-modify value that isn't read-only.
Note that the value of the HTML content attribute contenteditable is internally converted to
its -webkit-user-modify equivalent (e.g. contenteditable="true" <=> "-webkit-user-modify: read-write").

Tests: editing/editable-region/fixed-and-absolute-contenteditable-scrolled.html
       editing/editable-region/float-contenteditable.html
       editing/editable-region/hit-test-basic.html
       editing/editable-region/hit-test-fixed.html
       editing/editable-region/hit-test-overlap.html
       editing/editable-region/iframe.html
       editing/editable-region/input-basic.html
       editing/editable-region/out-hanging-child-of-contenteditable.html
       editing/editable-region/overflow-scroll-text-field-and-contenteditable.html
       editing/editable-region/relative-inside-fixed-contenteditable-scrolled.html
       editing/editable-region/relative-inside-transformed-contenteditable.html
       editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables.html

* Configurations/FeatureDefines.xcconfig: Add feature define to track editable elements on
screen (enabled by default on iOS and iOS Simulator).
* dom/Document.h:
(WebCore::Document::mayHaveEditableElements const):
(WebCore::Document::setMayHaveEditableElements):
Add some state to each document to track whether it may have an editable element or not. This
value represents a "maybe" because it is only set and never unset. It is set if the style resolver
saw an element with an editable style. This flag is used as a performance optimization to avoid
creating an event region if there are no editable elements on the page.

* page/Frame.cpp:
(WebCore::Frame::invalidateContentEventRegionsIfNeeded): Check if there are any editable elements.
If so, invalidate the event region.
* rendering/EventRegion.cpp:
(WebCore::EventRegion::operator== const): Update for editable region.
(WebCore::EventRegion::unite): If the specified style has a writable CSS user-modify value then
unite the region with the editable region.
(WebCore::EventRegion::translate): Update for editable region.
(WebCore::EventRegion::containsEditableElementsInRect const): Added. Check if the specified rect
intersects the editable region. If it does then that means there are one or more editable elements
whose bounds intersect that rect. Otherwise, there are none.
(WebCore::EventRegion::dump const): Update for editable region.
* rendering/EventRegion.h:
(WebCore::EventRegion::intersects const): Added.
(WebCore::EventRegion::rectsForEditableElements const): Return the rects in the editable region.
(WebCore::EventRegion::encode const): Encode the editable region.
(WebCore::EventRegion::decode): Decode the editable region.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject): Traverse descendants if the page has any editable elements
so that we find all of them.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange): Amend the event region invalidation criterion to look
for a change in writability. If there was a change (e.g. read-only to read-write) then invalidate
the event region to force a re-computation of it.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::invalidateEventRegion): If the document has editable elements then we need
to create an event region.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateEventRegion): Update the region if there are editable elements.
(WebCore::RenderLayerBacking::paintDebugOverlays): Paint the editable elements in the debug overlay.
For now, I piggybacked (like was done for touch-action regions) on the non-fast scrollable region
flag (not shown in the patch). I will look to add a dedicated debug overlay flag in a follow up patch.
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement): Mark the document as having an editable element if
the style for the element being resolved is writable.

Source/WebCore/PAL:

Add feature define to track editable elements on screen (enabled by default on iOS and iOS Simulator).

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Speed up -_requestTextInputContextsInRect when the rect does not intersect any editable
elements by over 4450 times on reddit.com! Another way of saying this is that it reduces
the time from an average of 303.252ms to 0.0680625ms in a Production build.

This speed up is accomplished by having the web process track the rects of the editable
elements on the page and send this information as a region data structure over to the UI
process as part of the EventRegion object. This region is used to determine if there
*may* be an editable element inside the rectangele. It never reports a false negative,
but it can report a false positive: a rectangle is over an editable element when it
actually isn't, (e.g. there is a non-composited element with a higher z-order than the
editable element that intersects the search rect).

* Configurations/FeatureDefines.xcconfig: Add feature define to track editable elements on
screen (enabled by default on iOS and iOS Simulator).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayContainEditableElementsInRect:]): Added.
(-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Checks if the search
rects hits an editable element in a RemoteLayerTree node's editable region. If it does
not hit any then we know there are no editable elements and return immediately. If it
does hit something then we still need to ask the web process to perform a hit test to
find the actual elements, respecting z-ordering (which is lost when these elements' rects
are united to form the editable region).
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(WebKit::collectDescendantViewsInRect): Added.
(WebKit::mayContainEditableElementsInRect): Added.

Source/WebKitLegacy/mac:

Add feature define to track editable elements on screen (enabled by default on iOS and iOS Simulator).

* Configurations/FeatureDefines.xcconfig:

Tools:

Add more unit tests for -_requestTextInputContextsInRect. Also add test infrastructure to
be able to verify that WebKit::mayContainEditableElementsInRect() works.

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::mayContainEditableElementsInRect):
Expose an internal function to test WebKit::mayContainEditableElementsInRect().

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Add feature define.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:
(webViewLoadHTMLStringAndWaitForAllFramesToPaint): Renamed; formerly webViewLoadHTMLStringAndWaitForDOMLoadEvent.
Also make it wait for the next presentation update after we paint.
(TEST):
(squareCenteredAtPoint): Added.
(webViewLoadHTMLStringAndWaitForDOMLoadEvent): Deleted; renamed webViewLoadHTMLStringAndWaitForAllFramesToPaint().
* TestWebKitAPI/Tests/WebKitCocoa/editable-region-composited-and-non-composited-overlap.html: Added.
* TestWebKitAPI/ios/editable-region-composited-and-non-composited-overlap.html: Added.
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::mayContainEditableElementsInRect): Added.

LayoutTests:

Add some tests. Some of these tests were derived from a torture test page written by Simon Fraser.

* TestExpectations: Skip directory editing/editable-region everywhere. I will unskip this in the iOS TestExpectations file.
* editing/editable-region/fixed-and-absolute-contenteditable-scrolled-expected.txt: Added.
* editing/editable-region/fixed-and-absolute-contenteditable-scrolled.html: Added.
* editing/editable-region/float-contenteditable-expected.txt: Added.
* editing/editable-region/float-contenteditable.html: Added.
* editing/editable-region/hit-test-basic-expected.txt: Added.
* editing/editable-region/hit-test-basic.html: Added.
* editing/editable-region/hit-test-fixed-expected.txt: Added.
* editing/editable-region/hit-test-fixed.html: Added.
* editing/editable-region/hit-test-overlap-expected.txt: Added.
* editing/editable-region/hit-test-overlap.html: Added.
* editing/editable-region/iframe-expected.txt: Added.
* editing/editable-region/iframe.html: Added.
* editing/editable-region/input-basic-expected.txt: Added.
* editing/editable-region/input-basic.html: Added.
* editing/editable-region/out-hanging-child-of-contenteditable-expected.txt: Added.
* editing/editable-region/out-hanging-child-of-contenteditable.html: Added.
* editing/editable-region/overflow-scroll-text-field-and-contenteditable-expected.txt: Added.
* editing/editable-region/overflow-scroll-text-field-and-contenteditable.html: Added.
* editing/editable-region/relative-inside-fixed-contenteditable-scrolled-expected.txt: Added.
* editing/editable-region/relative-inside-fixed-contenteditable-scrolled.html: Added.
* editing/editable-region/relative-inside-transformed-contenteditable-expected.txt: Added.
* editing/editable-region/relative-inside-transformed-contenteditable.html: Added.
* editing/editable-region/resources/hit-test-utilities.js: Added.
(async shouldHaveEditableElementsInRect):
(async shouldNotHaveEditableElementsInRect):
(shouldNotHaveEditableElementsInRectForElement):
* editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables-expected.txt: Added.
* editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables.html: Added.
* platform/ios/TestExpectations: Unskip editing/editable-region.
* resources/ui-helper.js:
(window.UIHelper.mayContainEditableElementsInRect): Added. Convenience function that turns around
and calls the UIScriptController function of the same name and returns a boolean instead of a string.

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

3 months agoShould find touch-action elements inside non-composited iframes
dbates@webkit.org [Wed, 8 Apr 2020 22:38:33 +0000 (22:38 +0000)]
Should find touch-action elements inside non-composited iframes
https://bugs.webkit.org/show_bug.cgi?id=210041
<rdar://problem/61323558>

Reviewed by Simon Fraser.

Source/WebCore:

Fix up event region code to traverse non-composited iframes that have elements with a non-auto
touch-action. The event region is computed for each composited layer during a compositing layer
update and was retricted to being updated if the layer's associated document may have an element
with a non-auto touch-action. To make this work for non-composited iframes I find its enclosing
compositing layer, set a special bit that it needs an event region update because of the non-
composited child iframe and schedule a compositing layer update. When the update happens, it
checks to see if the special bit is set and if so overrides any restrictions that would have
prevented the event region from being updated. The painting code for widgets is also fixed up to
pass through an EventRegionContext to update during EventRegion painting.

This strategy works well for updating the event region. However debug paint overlays are not
updated (i.e. RenderLayerBacking::paintDebugOverlays() is not called) until the embedding client's
view is repainted. For now, to fix this up I added another a hack, a special bit (RenderView::needsRepaintHackAfterCompositingLayerUpdateForDebugOverlaysOnly())
that is only set if debug overlays are to be shown, to have the compositor repaint the view after
updating compositing layers.

Tests: pointerevents/ios/programmatic-touch-action-none-inside-iframe.html
       pointerevents/ios/touch-action-none-inside-iframe.html
       pointerevents/ios/touch-action-none-inside-nested-iframe.html

* dom/Document.cpp:
(WebCore::Document::invalidateEventRegionsForFrame): Added. Try to invalidate the event region.
This may fail if the document does not have an enclosing compositing layer for repaint (e.g. nested
composited iframes - see test pointerevents/ios/touch-action-none-inside-nested-iframe.html). If
this happens then recursive on our owner element's document. Recursion is used instead of a loop
to future proof this code for out-of-process (OOP) frames, which will likely introduce document proxy objects.
* dom/Document.h:
* page/Frame.cpp:
(WebCore::Frame::invalidateContentEventRegionsIfNeeded): Added. Check if our document has any elements with
a non-auto touch-action. If it does then ask the compositor if the enclosing compositing layer for
repaint's event region must be invalidated - it will only reply true if this is a non-composited iframe.
If it does then forward this invalidation request to the document. The reason I delegate to the document
instead of handling the logic here is to future proof this code for OOP iframes.
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::didLayout): Call Frame::invalidateContentEventRegionsIfNeeded(). Also while
I am here take out a ref on the document to ensure it lives through the end of this function, including
through the accessibility's postNotification() code that calls out to the embedding client.

(WebCore::FrameView::paintContents):
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::paint):
* platform/ScrollView.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::paint):
* platform/Scrollbar.h:
* platform/Widget.cpp:
(WebCore::Widget::paint):
* platform/Widget.h:
* platform/gtk/WidgetGtk.cpp:
(WebCore::Widget::paint):
* platform/ios/WidgetIOS.mm:
(WebCore::Widget::paint):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
* platform/win/WidgetWin.cpp:
(WebCore::Widget::paint):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
Pass an EventRegionContext through.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange): Update code now that RendeLayer::invalidateEventRegion()
takes a reason.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint): Pass the EventRegionContext through. If are passed one then update
paint flags to collect event region.
(WebCore::RenderLayer::invalidateEventRegion): Changed return value from void to bool so as to indicate
to the caller whether the event region was actually invalidated. Also made it take an argument as
to the reason for the invalidation. If invalidation is due to a non-composited iframe then sets some
state and schedule a compositing layer update.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateEventRegion):
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
Pass an EventRegionContext through

(WebCore::RenderLayerCompositor::viewNeedsToInvalidateEventRegionOfEnclosingCompositingLayerForRepaint const): Added.

* rendering/RenderLayerCompositor.h:
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::paint):
* rendering/RenderScrollbar.h:
* rendering/RenderView.h:
Pass an EventRegionContext through.

* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paintContents): Translate the event region by our content paint offset.
(WebCore::RenderWidget::paint): Update for EventRegion. If painting the event region and the view
needs layout then do what we do now and bail out. Otherwise, proceed to paint the widget's content.
The changes to FrameView::didLayout() above means that for non-composited frames that need an event
region update they already performed a layout. So, these paints will be allowed to descend into
painting of the widget's content.

Source/WebKit:

Pass EventRegionContext through. It is unused as it's not applicable for plugin painting.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::paint):
* WebProcess/Plugins/PluginView.h:

Source/WebKitLegacy/win:

Pass EventRegionContext through. It is unused as it's not applicable for plugin painting.

* Plugins/PluginView.h:
* Plugins/PluginViewWin.cpp:
(WebCore::PluginView::paint):

LayoutTests:

Add more tests.

* pointerevents/ios/programmatic-touch-action-none-inside-iframe-expected.txt: Added.
* pointerevents/ios/programmatic-touch-action-none-inside-iframe.html: Added.
* pointerevents/ios/resources/touch-action-none-inside-iframe.html: Added.
* pointerevents/ios/touch-action-none-inside-iframe-expected.txt: Added.
* pointerevents/ios/touch-action-none-inside-iframe.html: Added.
* pointerevents/ios/touch-action-none-inside-nested-iframe-expected.txt: Added.
* pointerevents/ios/touch-action-none-inside-nested-iframe.html: Added.

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

3 months agoFix handling non-linearized PDFs when incremental PDF loading is enabled.
beidson@apple.com [Wed, 8 Apr 2020 22:15:16 +0000 (22:15 +0000)]
Fix handling non-linearized PDFs when incremental PDF loading is enabled.
<rdar://problem/60619506> and https://bugs.webkit.org/show_bug.cgi?id=210208

Reviewed by Tim Horton (and I think Geoff Garen, probably. It's confusing.)

When we try to load a non-linearized PDF with PDFKit, it makes an outlandishly large range request
to try to verify the PDF file size.

That's covered by <rdar://problem/61473378>

Meanwhile we need to detect that and fallback to non-incremental PDF loading.

* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::receivedInvalidRangeRequest):
(WebKit::dataProviderGetBytesAtPositionCallback):
(WebKit::PDFPlugin::threadEntry):
(WebKit::PDFPlugin::installPDFDocument):

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

3 months agoUnreviewed, unskip http/tests/notifications/event-listener-crash.html
cdumez@apple.com [Wed, 8 Apr 2020 22:06:15 +0000 (22:06 +0000)]
Unreviewed, unskip http/tests/notifications/event-listener-crash.html

This test should no longer be crashing after r258613.

* platform/mac-wk1/TestExpectations:

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

3 months agoAllow use of syscall from the WebContent sandbox
pvollan@apple.com [Wed, 8 Apr 2020 21:50:26 +0000 (21:50 +0000)]
Allow use of syscall from the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=209920

Reviewed by Geoffrey Garen.

Add syscall to the WebContent sandbox on macOS.

* WebProcess/com.apple.WebProcess.sb.in:

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

3 months ago[PlayStation] Update import of libdl stubs for new Angle dladdr use
stephan.szabo@sony.com [Wed, 8 Apr 2020 21:06:36 +0000 (21:06 +0000)]
[PlayStation] Update import of libdl stubs for new Angle dladdr use
https://bugs.webkit.org/show_bug.cgi?id=210200

Reviewed by Don Olmstead.

* Source/cmake/OptionsPlayStation.cmake:
Use find_package to get libdl wrappers on playstation, include
them in both executables and shared libraries.

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

3 months ago[GTK4] Make PAL::systemBeep() work
aperez@igalia.com [Wed, 8 Apr 2020 20:54:14 +0000 (20:54 +0000)]
[GTK4] Make PAL::systemBeep() work
https://bugs.webkit.org/show_bug.cgi?id=210158

Reviewed by Carlos Garcia Campos.

Source/WebCore/PAL:

* pal/system/gtk/SoundGtk.cpp:
(PAL::systemBeep): Use gdk_display_beep(), which works both with GTK3 and GTK4.

Source/WTF:

* wtf/Platform.h: Define a value for GDK_VERSION_MIN_REQUIRED suitable for GTK4.

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

3 months ago[macOS] Crash under WebKit::SandboxExtension::consume
pvollan@apple.com [Wed, 8 Apr 2020 20:15:58 +0000 (20:15 +0000)]
[macOS] Crash under WebKit::SandboxExtension::consume
https://bugs.webkit.org/show_bug.cgi?id=210188

Reviewed by Geoffrey Garen.

Source/WebKit:

When issuing a mach lookup extension to the database mapping service in the UI process fails, the WebContent
process will crash when trying to consume the extension.

No new tests, since I am not able to reproduce the issue.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:

* fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
* fast/sandbox/mac/sandbox-mach-lookup.html:

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

3 months agoMake more use of FrameLoader pageID/frameID getters
commit-queue@webkit.org [Wed, 8 Apr 2020 20:14:50 +0000 (20:14 +0000)]
Make more use of FrameLoader pageID/frameID getters
https://bugs.webkit.org/show_bug.cgi?id=210182

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-08
Reviewed by Chris Dumez.

Make more use of FrameLoader pageID/frameID getters, before
this change they were only used internally in FrameLoader.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::pageID const):
(WebCore::Document::frameID const):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* loader/CookieJar.cpp:
(WebCore::CookieJar::cookies const):
(WebCore::CookieJar::cookieRequestHeaderFieldProxy):
(WebCore::CookieJar::setCookies):
(WebCore::CookieJar::cookieRequestHeaderFieldValue const):
(WebCore::CookieJar::getRawCookies const):
* loader/NavigationAction.cpp:
(WebCore::createGlobalFrameIdentifier):
* loader/PolicyChecker.cpp:
* testing/Internals.cpp:
(WebCore::Internals::frameIdentifier const):

Source/WebKit:

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::addParametersShared):

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

3 months agoAdditional cleanup from "Hit test with clipPath referencing parent element causes...
dougk@apple.com [Wed, 8 Apr 2020 20:06:53 +0000 (20:06 +0000)]
Additional cleanup from "Hit test with clipPath referencing parent element causes infinite recursion"
https://bugs.webkit.org/show_bug.cgi?id=210203
<rdar://problem/60002347>

Reviewed by Geoffrey Garen.

As suggested from the review in bug #209773, this incorporates some additional cleanup, including making the
SVGHitTestCycleDetectionScope constructor explicit, and clarifying the add/remove with the WeakHashSet, since
WeakPtr's operator* returns a reference to the template type (which is what we need).

No new tests as this is covered by existing tests and there are no functional changes.

* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope):
(WebCore::SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope):
* rendering/svg/SVGRenderSupport.h:

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

3 months agoFollow-up: [iOS] WebPageProxy::didCommitLoadForFrame should not crash with null or...
ddkilzer@apple.com [Wed, 8 Apr 2020 20:05:06 +0000 (20:05 +0000)]
Follow-up: [iOS] WebPageProxy::didCommitLoadForFrame should not crash with null or empty `mimeType` parameter
<https://webkit.org/b/209994>
<rdar://problem/60068700>

* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
- Remove UNUSED_PARAM() in lieu of deleting parameter names.

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

3 months ago[macOS debug] Layout Test imported/w3c/web-platform-tests/media-source/SourceBuffer...
jacob_uphoff@apple.com [Wed, 8 Apr 2020 20:05:05 +0000 (20:05 +0000)]
[macOS debug] Layout Test imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-readyState.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=187911

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 months agoWeb Inspector: Search: populate the search field with the current selection when...
drousso@apple.com [Wed, 8 Apr 2020 20:02:17 +0000 (20:02 +0000)]
Web Inspector: Search: populate the search field with the current selection when using the global search shortcut
https://bugs.webkit.org/show_bug.cgi?id=210207

Reviewed by Timothy Hatcher.

Add a setting to control whether the global search (⇧⌘F) should be populated by the current
selection (if it exists), allowing for a quicker flow for "show me everywhere this exists".

* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):

* UserInterface/Base/Main.js:
(WI._focusSearchField)

* Localizations/en.lproj/localizedStrings.js:

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

3 months ago[JSC] Threading JSGlobalObject in RegExp::match properly
ysuzuki@apple.com [Wed, 8 Apr 2020 20:01:39 +0000 (20:01 +0000)]
[JSC] Threading JSGlobalObject in RegExp::match properly
https://bugs.webkit.org/show_bug.cgi?id=210174

Reviewed by Saam Barati.

We thread JSGlobalObject* properly in RegExp::match instead of accessing VM::topCallFrame, which is too hacky.

* runtime/RegExp.cpp:
(JSC::RegExp::match):
(JSC::RegExp::matchConcurrently):
* runtime/RegExp.h:
* runtime/RegExpGlobalData.h:
* runtime/RegExpGlobalDataInlines.h:
(JSC::RegExpGlobalData::performMatch):
* runtime/RegExpInlines.h:
(JSC::RegExp::matchInline):
* runtime/RegExpMatchesArray.h:
(JSC::createRegExpMatchesArray):
* runtime/RegExpObjectInlines.h:
(JSC::RegExpObject::matchInline):
(JSC::collectMatches):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncSearchFast):
(JSC::genericSplit):
(JSC::regExpProtoFuncSplitFast):
* runtime/StringPrototype.cpp:
(JSC::removeUsingRegExpSearch):
(JSC::replaceUsingRegExpSearch):
* testRegExp.cpp:
(testOneRegExp):
(runFromFiles):

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

3 months agoRemove a workaround that allows many API tests to pass on iOS 13.2
wenson_hsieh@apple.com [Wed, 8 Apr 2020 19:59:17 +0000 (19:59 +0000)]
Remove a workaround that allows many API tests to pass on iOS 13.2
https://bugs.webkit.org/show_bug.cgi?id=209709

Reviewed by Megan Gardner.

Removes a workaround added in r256297 to get API tests passing on iOS 13.2. This workaround swizzled
`-[NSBundle bundleIdentifier]` to return a non-null string, in order to avoid a crash introduced by
<rdar://problem/56301207>. This was subsequently fixed in <rdar://problem/56790195>, which has made its way
into iOS 13.4.

* TestWebKitAPI/cocoa/TestWKWebView.mm:
(+[WKWebView initialize]): Deleted.
* TestWebKitAPI/ios/UIKitSPI.h:

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

3 months ago[macOS] TestWebKitAPI.WKHTTPCookieStore.WithoutProcessPoolDuplicates is failing
sihui_liu@apple.com [Wed, 8 Apr 2020 19:25:31 +0000 (19:25 +0000)]
[macOS] TestWebKitAPI.WKHTTPCookieStore.WithoutProcessPoolDuplicates is failing
https://bugs.webkit.org/show_bug.cgi?id=209992

Reviewed by Geoffrey Garen.

Make sure existing cookies are cleared before test. Otherwise, they will affect test result.

* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(clearCookies):
(TEST):

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

3 months agoWeb Inspector: Storage: cannot clear out multiple or all local storage entries
drousso@apple.com [Wed, 8 Apr 2020 19:16:34 +0000 (19:16 +0000)]
Web Inspector: Storage: cannot clear out multiple or all local storage entries
https://bugs.webkit.org/show_bug.cgi?id=209867

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/DOMStorage.json:
Add a `clearDOMStorageItems` command instead of calling `removeDOMStorageItem` for each key.

Source/WebCore:

Tests: inspector/storage/clearDOMStorageItems.html
       inspector/storage/getDOMStorageItems.html
       inspector/storage/removeDOMStorageItem.html
       inspector/storage/setDOMStorageItem.html

* inspector/agents/InspectorDOMStorageAgent.h:
* inspector/agents/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::clearDOMStorageItems): Added.
Add a `clearDOMStorageItems` command instead of calling `removeDOMStorageItem` for each key.

Source/WebInspectorUI:

* UserInterface/Models/DOMStorageObject.js:
(WI.DOMStorageObject.prototype.removeItem):
(WI.DOMStorageObject.prototype.setItem):
(WI.DOMStorageObject.prototype.clear): Added.
(WI.DOMStorageObject.prototype.itemsCleared):
(WI.DOMStorageObject.prototype.itemRemoved):
(WI.DOMStorageObject.prototype.itemAdded):
(WI.DOMStorageObject.prototype.itemUpdated):
Add some assertions.

* UserInterface/Views/DOMStorageContentView.js:
(WI.DOMStorageContentView):
(WI.DOMStorageContentView.prototype.get navigationItems):
(WI.DOMStorageContentView.prototype._handleClearNavigationItemClicked): Added.
Add a "Clear" navigation item that calls the new `DOMStorage.clearDOMStorageItems`.

* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.removeChild):
If the removed item was selected, select the next (or previous if there is no next) item.

* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView):
(WI.CookieStorageContentView.prototype.get navigationItems):
(WI.CookieStorageContentView.prototype._handleClearNavigationItemClicked): Added.
Drive-by: also add a "Clear" navigation item that calls `Page.deleteCookie` for each row.
* UserInterface/Protocol/DOMStorageObserver.js:
(WI.DOMStorageObserver.prototype.domStorageItemUpdated):
* UserInterface/Controllers/DOMStorageManager.js:
(WI.DOMStorageManager.prototype.itemUpdated):
Drive-by: rename `value` to `newValue` to match the protocol.
* Localizations/en.lproj/localizedStrings.js:

LayoutTests:

* inspector/storage/clearDOMStorageItems.html: Added.
* inspector/storage/clearDOMStorageItems-expected.txt: Added.
* inspector/storage/domStorage-events.html:
* inspector/storage/domStorage-events-expected.txt:
* inspector/storage/getDOMStorageItems.html: Added.
* inspector/storage/getDOMStorageItems-expected.txt: Added.
* inspector/storage/removeDOMStorageItem.html: Added.
* inspector/storage/removeDOMStorageItem-expected.txt: Added.
* inspector/storage/setDOMStorageItem.html: Added.
* inspector/storage/setDOMStorageItem-expected.txt: Added.
* inspector/storage/resources/storage-utilities.js: Added.
(clearStorages):
(TestPage.registerInitializer.InspectorTest.Storage.async logEntries):

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

3 months agoRemove unused WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary and WebPro...
commit-queue@webkit.org [Wed, 8 Apr 2020 19:12:10 +0000 (19:12 +0000)]
Remove unused WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary and WebProcessPool::sendToOneProcess
https://bugs.webkit.org/show_bug.cgi?id=210199

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2020-04-08
Reviewed by Alex Christensen.

Remove unused functions.

* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary): Deleted.
(WebKit::WebProcessPool::sendToOneProcess): Deleted.

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

3 months ago[JSC] MultiDeleteByOffset should tell correct result AbstractValue in AI
ysuzuki@apple.com [Wed, 8 Apr 2020 19:06:39 +0000 (19:06 +0000)]
[JSC] MultiDeleteByOffset should tell correct result AbstractValue in AI
https://bugs.webkit.org/show_bug.cgi?id=210175
<rdar://problem/61433817>

Reviewed by Saam Barati.

JSTests:

* stress/multi-delete-by-offset-ai-result.js: Added.
(foo):

Source/JavaScriptCore:

Since the result value of MultiDeleteByOffset should be used, AI should set boolean AbstractValue as a result of MultiDeleteByOffset.
We also add MultiDeleteByOffset to DFGStoreBarrierInsertionPhase since it can write StructureID: this means that write-barrier is necessary.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGStoreBarrierInsertionPhase.cpp:

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

3 months agoWeb Inspector: Uncaught Exception: undefined is not an object (evaluating 'this._targ...
drousso@apple.com [Wed, 8 Apr 2020 19:02:28 +0000 (19:02 +0000)]
Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'this._target.NetworkAgent.getResponseBody')
https://bugs.webkit.org/show_bug.cgi?id=210168

Reviewed by Timothy Hatcher.

If a script is loaded by the main page and a `Worker`, the `WI.Script` from the `Worker`
will be associated with the `WI.Resource` from the main page, the call stack in the Sources
Tab will use the `WI.Resource` over the `WI.Script`, but the `WI.Target` for a `Worker` does
not have a `NetworkAgent` or `PageAgent`. As such, inside `WI.Resource`, if the `_target` is
a `WI.TargetType.Worker`, use the `DebuggerAgent`.

* UserInterface/Models/Resource.js:
(WI.Resource.prototype.requestContentFromBackend):

* UserInterface/Main.html:
Drive-by: remove unnecessary `<script>`.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259741 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 months agoWeb Inspector: don't reveal the prototype methods when using the "Expand All" context...
drousso@apple.com [Wed, 8 Apr 2020 19:00:02 +0000 (19:00 +0000)]
Web Inspector: don't reveal the prototype methods when using the "Expand All" context menu item for property-only object trees
https://bugs.webkit.org/show_bug.cgi?id=210123

Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only.json-only .object-tree-property.prototype-property, .object-tree.properties-only.json-only .object-tree-property.prototype-property + .children): Added.
(.object-tree.properties-only.json-only .object-tree-property.prototype-property): Deleted.

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

3 months agoWeb Inspector: only broadcast the console message to main frames
drousso@apple.com [Wed, 8 Apr 2020 18:57:53 +0000 (18:57 +0000)]
Web Inspector: only broadcast the console message to main frames
https://bugs.webkit.org/show_bug.cgi?id=210122

Reviewed by Timothy Hatcher.

* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::broadcastConsoleMessage):

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

3 months agoWeb Inspector: Sources: support copying selected call frame(s) in the Call Stack
drousso@apple.com [Wed, 8 Apr 2020 18:53:10 +0000 (18:53 +0000)]
Web Inspector: Sources: support copying selected call frame(s) in the Call Stack
https://bugs.webkit.org/show_bug.cgi?id=210172

Reviewed by Timothy Hatcher.

* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.prototype.handleCopyEvent): Added.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.handleCopyEvent): Added.
Copy the function name and source location for each selected call frame. If the selected
call frames span an async boundary, include the async boundary in the form `--- <name> ---`
where name is the reason for the async behavior (e.g. `addEventListener`). If the selected
call frames span multiple threads (e.g. `Worker`), include the thread name and indent all
of the call frames for that thread.

* UserInterface/Views/CallFrameTreeElement.js:
(WI.CallFrameTreeElement):
(WI.CallFrameTreeElement.prototype.get isAsyncBoundaryCallFrame): Added.

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

3 months agoWebContent process crashes in com.apple.WebCore: rx::IOSurfaceSurfaceCGL::releaseTexImage
commit-queue@webkit.org [Wed, 8 Apr 2020 18:50:43 +0000 (18:50 +0000)]
WebContent process crashes in com.apple.WebCore: rx::IOSurfaceSurfaceCGL::releaseTexImage
https://bugs.webkit.org/show_bug.cgi?id=210151

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-08
Reviewed by Dean Jackson.

Explicitly check for context teardown when displaying a
WebGLLayer.

* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer display]):

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

3 months ago[GTK] Gardening, update TestExpectations after r259712
dpino@igalia.com [Wed, 8 Apr 2020 18:50:04 +0000 (18:50 +0000)]
[GTK] Gardening, update TestExpectations after r259712
https://bugs.webkit.org/show_bug.cgi?id=210204

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

3 months agoREGRESSION: [ iOS wk2 Debug ] WTFCrash + 14 (Assertions.cpp:309) - WebCore::Page...
lawrence.j@apple.com [Wed, 8 Apr 2020 18:47:58 +0000 (18:47 +0000)]
REGRESSION: [ iOS wk2 Debug ] WTFCrash + 14 (Assertions.cpp:309) - WebCore::Page::recomputeTextAutoSizingInAllFrames()
https://bugs.webkit.org/show_bug.cgi?id=210205

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

3 months agoEnable offlineasm debug annotations for GCC
commit-queue@webkit.org [Wed, 8 Apr 2020 18:23:51 +0000 (18:23 +0000)]
Enable offlineasm debug annotations for GCC
https://bugs.webkit.org/show_bug.cgi?id=207119

Patch by Angelos Oikonomopoulos <angelos@igalia.com> on 2020-04-08
Reviewed by Darin Adler.

This simply reuses the existing code that generates debug
annotations, adding two workarounds for limitations in GCC and
GDB.

First, the .file directives that offlineasm inserts in inline asm
use file slots that conflict with those in the compilation unit
that includes LLIntAssembly.h (specifically,
LowLevelInterpreter.cpp). Clang's built-in assembler will
transparently fix that for us, but for GCC we need to
post-process the generated assembler.

Unfortunately, cmake doesn't allow us to introduce a compiler wrapper for a
single source file, so we need to create a separate target for it.  This
wrapping only happens when building with GCC and the user has explicitly
requested debug information, either by selecting a Debug/RelWithDebInfo build
or setting GCC_OFFLINEASM_SOURCE_MAP.

Second, GDB will only look at the line table for a compilation unit if
it can first resolve the address to one of the known symbols in the
file. Introduce marker symbols to work around this bug.

* CMakeLists.txt:

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

3 months ago[ iOS wk2 Debug ] WTFCrash + 14 (Assertions.cpp:309) - WebKit::EditorState::postLayou...
lawrence.j@apple.com [Wed, 8 Apr 2020 18:18:47 +0000 (18:18 +0000)]
[ iOS wk2 Debug ] WTFCrash + 14 (Assertions.cpp:309) - WebKit::EditorState::postLayoutData()
https://bugs.webkit.org/show_bug.cgi?id=210201

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

3 months ago[macOS] Make PlatformPasteboard robust against types that cannot be encoded with...
wenson_hsieh@apple.com [Wed, 8 Apr 2020 18:15:49 +0000 (18:15 +0000)]
[macOS] Make PlatformPasteboard robust against types that cannot be encoded with +defaultCStringEncoding
https://bugs.webkit.org/show_bug.cgi?id=210195
<rdar://problem/61084208>

Reviewed by Tim Horton.

When setting pasteboard data using the three PlatformPasteboard methods below, avoid calling into NSPasteboard
in the case where the pasteboard type fails to be encoded using +[NSString defaultCStringEncoding]. This is
because AppKit pasteboard logic will attempt to convert the given string into a C string using [NSString
defaultCStringEncoding], and then assume that the result is non-null, if the type is neither declared nor
dynamic.

* platform/mac/PlatformPasteboardMac.mm:
(WebCore::canWritePasteboardType):
(WebCore::PlatformPasteboard::setTypes):
(WebCore::PlatformPasteboard::setBufferForType):
(WebCore::PlatformPasteboard::setStringForType):

Add early returns if canWritePasteboardType returns false.

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

3 months agoReturn app-bound sessions for instances where WKAppBoundDomains is
katherine_cheney@apple.com [Wed, 8 Apr 2020 18:07:52 +0000 (18:07 +0000)]
Return app-bound sessions for instances where WKAppBoundDomains is
empty
https://bugs.webkit.org/show_bug.cgi?id=210124
<rdar://problem/61276630>

Reviewed by Brent Fulgham.

Source/WebKit:

No new tests. Behavior confirmed by existing In-App Browser Privacy
tests.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
Remove the flag checking if In-App Browser Privacy is enabled. We
should return an app-bound session if WKAppBoundDomains is empty so
we no longer need to check the flag here.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.h:
As described above, we no longer need to check the flag in this
instance as we are determining behavior based on the WKAppBoundDomains
list. Also moved the logic for checking an empty list to setIsNavigatingToAppBoundDomain,
so it should take an Optional (WTF::nullopt indicates an empty list).

* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::initializeAppBoundDomains):
Use the flag to enable internal debugging for testing purposes.

* UIProcess/API/APIHTTPCookieStore.cpp:
(API::HTTPCookieStore::filterAppBoundCookies):
Flag no longer needed. This should be gated by whether the domains
list is empty or not.

Tools:

Clean up test settings between tests.

* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(cleanUpInAppBrowserPrivacyTestSettings):

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

3 months ago[Win] Gardening, update baselines
zalan@apple.com [Wed, 8 Apr 2020 17:58:17 +0000 (17:58 +0000)]
[Win] Gardening, update baselines

Unreviewed gardening.

Rebaseline after r259296.

* platform/win/css2.1/20110323/margin-applies-to-006-expected.txt:
* platform/win/fast/forms/form-hides-table-expected.txt:
* platform/win/fast/table/table-insert-before-non-anonymous-block-expected.txt:
* platform/win/tables/mozilla_expected_failures/dom/appendCol1-expected.txt:

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

3 months ago[iOS] WebPageProxy::didCommitLoadForFrame should not crash with null or empty `mimeTy...
ddkilzer@apple.com [Wed, 8 Apr 2020 17:51:12 +0000 (17:51 +0000)]
[iOS] WebPageProxy::didCommitLoadForFrame should not crash with null or empty `mimeType` parameter
<https://webkit.org/b/209994>
<rdar://problem/60068700>

Reviewed by Chris Dumez.

* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
- Extract logic for `representationClass` since
  -[WKWebViewContentProviderRegistry providerForMIMEType:] may
  return nil.
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry providerForMIMEType:]):
- Add early return if `mimeType` is null or empty as those are
  not valid keys for `_contentProviderForMIMEType`.
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
- Add UNUSED_PARAM() for when -Wno-unused-parameter is removed
  in place of GCC_WARN_UNUSED_VARIABLE=YES.

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

3 months ago[ Mac wk1 Debug ] two webgl/2.0.0/conformance2/attribs/gl tests are flaky timing...
lawrence.j@apple.com [Wed, 8 Apr 2020 17:41:34 +0000 (17:41 +0000)]
[ Mac wk1 Debug ] two webgl/2.0.0/conformance2/attribs/gl tests are flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=210198

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 months agoREGRESSION(r253346): some Automation commands targeted at an iframe do not return
bburg@apple.com [Wed, 8 Apr 2020 17:30:21 +0000 (17:30 +0000)]
REGRESSION(r253346): some Automation commands targeted at an iframe do not return
https://bugs.webkit.org/show_bug.cgi?id=210139
<rdar://problem/60561009>

Reviewed by Devin Rousso.

WebAutomationSession / WebAutomationSessionProxy are singletons, and only one
exists at a time in the UIProcess / WebProcess respectively. A recent change was
made to call Connection::sendWithAsyncReply from the WebPageProxy object rather
than WebProcess. The effect of this is that the WebPage's destinationID is
used for the response message rather than the WebProcess.

Because WebAutomationSessionProxy registers itself as a global IPC message receiver,
the page-targeted destinationID cannot find any receivers for the message at the
destinationID, which causes an ASSERT in debug builds and a hang in non-debug builds.

The fix is to continue sending messages via the WebProcess object, whose messages
are tagged with a destinationID of 0 (eg, global message receiver). This could alternatively
be accomplished by passing a destinationID of 0 to every sendWithAsyncReply, but
as is this change is a straightforward partial revert of r253346.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::switchToBrowsingContext):
(WebKit::WebAutomationSession::evaluateJavaScriptFunction):
(WebKit::WebAutomationSession::resolveChildFrameHandle):
(WebKit::WebAutomationSession::resolveParentFrameHandle):
(WebKit::WebAutomationSession::computeElementLayout):
(WebKit::WebAutomationSession::selectOptionElement):
(WebKit::WebAutomationSession::setFilesForInputFileUpload):
(WebKit::WebAutomationSession::getAllCookies):
(WebKit::WebAutomationSession::deleteSingleCookie):
(WebKit::WebAutomationSession::takeScreenshot):

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

3 months agoUnreviewed, reverting r259708.
tsavell@apple.com [Wed, 8 Apr 2020 17:25:25 +0000 (17:25 +0000)]
Unreviewed, reverting r259708.

Broke the iOS device Build

Reverted changeset:

"Enable the use of XCBuild by default in Apple builds"
https://bugs.webkit.org/show_bug.cgi?id=209890
https://trac.webkit.org/changeset/259708

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

3 months agoImport fetch/origin/assorted.window.js
commit-queue@webkit.org [Wed, 8 Apr 2020 17:21:09 +0000 (17:21 +0000)]
Import fetch/origin/assorted.window.js
https://bugs.webkit.org/show_bug.cgi?id=210128

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

LayoutTests/imported/w3c:

Import fetch/origin/assorted.window.js after
https://github.com/web-platform-tests/wpt/pull/22567.

* web-platform-tests/fetch/origin/assorted.window-expected.txt:
* web-platform-tests/fetch/origin/assorted.window.js:
(async const):
(fetchReferrerPolicy):
(referrerPolicyTestString):

Source/WebCore:

Import fetch/origin/assorted.window.js and remove
the hack to make the previous (incorrect) version work.

* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::updateReferrerAndOriginHeaders):

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

3 months agoRef WebProcessProxy in NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses()
cdumez@apple.com [Wed, 8 Apr 2020 17:14:09 +0000 (17:14 +0000)]
Ref WebProcessProxy in NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses()
https://bugs.webkit.org/show_bug.cgi?id=210196

Reviewed by Youenn Fablet.

Ref WebProcessProxy in NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses()
since the call to WebProcessProxy::disableServiceWorkers() may cause it to get destroyed
otherwise.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::terminateUnresponsiveServiceWorkerProcesses):

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

3 months agoFlaky Test: media/modern-media-controls/tracks-support/tracks-support-show-panel...
jacob_uphoff@apple.com [Wed, 8 Apr 2020 17:07:14 +0000 (17:07 +0000)]
Flaky Test: media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html
https://bugs.webkit.org/show_bug.cgi?id=182571

Updated expectations to include wk2

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 months agoHit test with clipPath referencing parent element causes infinite recursion
dougk@apple.com [Wed, 8 Apr 2020 17:00:34 +0000 (17:00 +0000)]
Hit test with clipPath referencing parent element causes infinite recursion
https://bugs.webkit.org/show_bug.cgi?id=209773
<rdar://problem/60002347>

Reviewed by Geoffrey Garen.

Source/WebCore:

Upon further investigation, the original fix for the hit test in RenderSVGResourceClipper to prevent
infinite recursion was incomplete, as something such as a use element could easily cause another cycle which
would not be detected by the initial fix.  Instead, by maintaining a set of visited elements, we can prevent
visiting the same element twice, and thus breaking any cycles which might occur in the SVG document.  We
track these elements within the SVGHitTestCycleDetectionScope class, where the set of visited elements are
maintained statically, and instances of the class will manage the scope, as an RAII-style object.

This is covered by an existing test, but includes additional test cases which illustrate the more complex
document structure.

Tests: svg/hittest/svg-clip-path-child-element-with-use-root.html
       svg/hittest/svg-clip-path-child-element-with-use.html

* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::nodeAtFloatPoint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::nodeAtFloatPoint):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::nodeAtFloatPoint):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::nodeAtFloatPoint):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::pointInClippingArea):
(WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope):
(WebCore::SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope):
(WebCore::SVGHitTestCycleDetectionScope::visitedElements):
(WebCore::SVGHitTestCycleDetectionScope::isEmpty):
(WebCore::SVGHitTestCycleDetectionScope::isVisiting):
* rendering/svg/SVGRenderSupport.h:

LayoutTests:

* svg/hittest/svg-clip-path-child-element-with-use-expected.txt: Added.
* svg/hittest/svg-clip-path-child-element-with-use-root-expected.txt: Added.
* svg/hittest/svg-clip-path-child-element-with-use-root.html: Added.
* svg/hittest/svg-clip-path-child-element-with-use.html: Added.

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

3 months ago[lldb-webkit] Pretty-print NSEventModifierFlags
dbates@webkit.org [Wed, 8 Apr 2020 17:00:19 +0000 (17:00 +0000)]
[lldb-webkit] Pretty-print NSEventModifierFlags
https://bugs.webkit.org/show_bug.cgi?id=210193

Reviewed by Jer Noble.

Enumerations such as NSEventModifierFlags describe disjoint sets of flags. In the case of
NSEventModifierFlags it describes both device independent and dependent flags. When pretty
printing such types one or more sets of flags may not be publically available. So, add
support masking off such inaccessible sets of flags before pretty printing the rest of
the set.

* lldb/lldb_webkit.py:
(addSummaryAndSyntheticFormattersForRawBitmaskType):
(addSummaryAndSyntheticFormattersForRawBitmaskType.GeneratedRawBitmaskProvider):
(__lldb_init_module):
(RawBitmaskProviderBase):
(RawBitmaskProviderBase._bitmask):

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

3 months agotransition-property is not computed correctly when transition-duration is set to...
graouts@webkit.org [Wed, 8 Apr 2020 16:31:18 +0000 (16:31 +0000)]
transition-property is not computed correctly when transition-duration is set to "inherit"
https://bugs.webkit.org/show_bug.cgi?id=204554
<rdar://problem/57458091>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Somehow this test progressed slightly, it now fails in the second assertion rather than the first, although it fails still overall.

* web-platform-tests/css/css-transitions/events-004-expected.txt:

Source/WebCore:

Test: transitions/transition-property-for-element-with-transition-duration-inherit.html

The "transition-property" would behave as if "inherit" was set when the "transition-duration" property itself was set explicitly to "inherit".
We fix this by storing all the information contained in the "transition-property" into the single Animation::m_property member instead of splitting
it across Animation::m_mode as well. We now use a TransitionProperty struct which holds both the transition "mode" (none, all, single property,
unknown property) and and the CSS property targeted itself.

This requires modifying call sites of both Animation::property() and Animation::animationMode() throughout WebCore.

* animation/AnimationTimeline.cpp:
(WebCore::transitionMatchesProperty):
(WebCore::compileTransitionPropertiesInStyle):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createTransitionPropertyValue):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationProperty):
* css/makeprop.pl:
(generateAnimationPropertyInitialValueSetter):
(generateAnimationPropertyInheritValueSetter):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::ImplicitAnimation):
* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::didAddTransition):
* platform/animation/Animation.cpp:
(WebCore::Animation::Animation):
(WebCore::Animation::operator=):
(WebCore::Animation::animationsMatch const):
(WebCore::operator<<):
* platform/animation/Animation.h:
(WebCore::Animation::property const):
(WebCore::Animation::timingFunction const):
(WebCore::Animation::setProperty):
(WebCore::Animation::setTimingFunction):
(WebCore::Animation::initialProperty):
(WebCore::Animation::animationMode const): Deleted.
(WebCore::Animation::setAnimationMode): Deleted.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::adjustTransitions):
(WebCore::RenderStyle::transitionForProperty const):

LayoutTests:

Add a new test that checks that setting "transition-duration" to "inherit" does not cause "transition-property" to behaves
as if "inherit" was implictly set as well.

* transitions/transition-property-for-element-with-transition-duration-inherit-expected.txt: Added.
* transitions/transition-property-for-element-with-transition-duration-inherit.html: Added.

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

3 months ago[ews] Improve summary for CheckPatchRelevance build step (follow-up fix)
aakash_jain@apple.com [Wed, 8 Apr 2020 16:17:55 +0000 (16:17 +0000)]
[ews] Improve summary for CheckPatchRelevance build step (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=210146

Unreviewed follow-up fix.

Revert the failure message for CheckPatchRelevance to old one since it needs to match with status-bubble code.
* BuildSlaveSupport/ews-build/steps.py:
* BuildSlaveSupport/ews-build/steps_unittest.py:
(TestCheckPatchRelevance.test_non_relevant_patch):

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

3 months agoEWS should skip mac-wk1 and mac-debug-wk1 tests for patches that only change WebKit2...
aakash_jain@apple.com [Wed, 8 Apr 2020 15:41:59 +0000 (15:41 +0000)]
EWS should skip mac-wk1 and mac-debug-wk1 tests for patches that only change WebKit2 sources
https://bugs.webkit.org/show_bug.cgi?id=210115

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/factories.py:
(macOSWK1Factory.__init__): Set checkRelevance to True for mac wk1 queue.
* BuildSlaveSupport/ews-build/steps.py:
(CheckPatchRelevance): Added relevance info for wk1 queues.
* BuildSlaveSupport/ews-build/factories_unittest.py: Updated unit-tests.
(TestLayoutTestsFactory.test_macos_wk1_release_factory):
(TestLayoutTestsFactory.test_macos_wk1_debug_factory):
* BuildSlaveSupport/ews-build/steps_unittest.py:
(TestCheckPatchRelevance.test_relevant_jsc_patch):
(TestCheckPatchRelevance.test_relevant_wk1_patch):
(TestCheckPatchRelevance.test_queues_without_relevance_info):
(TestCheckPatchRelevance.test_non_relevant_patch):

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

3 months agoRegression(r259610) [RBSTarget targetWithPid:] may throw a 'must specify a valid...
cdumez@apple.com [Wed, 8 Apr 2020 15:37:53 +0000 (15:37 +0000)]
Regression(r259610) [RBSTarget targetWithPid:] may throw a 'must specify a valid pid' exception
https://bugs.webkit.org/show_bug.cgi?id=210159

Reviewed by Alex Christensen.

[RBSTarget targetWithPid:] may throw a 'must specify a valid pid' exception since r259610. There
are apparently cases where the PID we are passing the ProcessAssertion is 0 (likely process crash
on startup). BKSAssertion used to deal with this silently but RBSAssertion actually throws an
exception in this case. To maintain the old behavior, we should do an explicit check to make sure
the PID is valid before passing it to RunningBoard.

* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::ProcessAssertion::ProcessAssertion):

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

3 months agoHandle errors when grabbing grabbing microphone audio samples from the AudioUnit
youenn@apple.com [Wed, 8 Apr 2020 15:03:09 +0000 (15:03 +0000)]
Handle errors when grabbing grabbing microphone audio samples from the AudioUnit
https://bugs.webkit.org/show_bug.cgi?id=210185

Reviewed by Eric Carlson.

We compute the buffer size to copy microphone samples when setting up the Audio Unit.
This is based on the preferred buffer size and sample rate.
But these values might change over time by the web page durig the capture.
If the preferred buffer size increases (for instance if the page stops using WebAudio), our buffer might be too small.
Capture will fail but we will not notify the web application.

Update the code to reconfigure the AudioUnit if AudioUnitRender returns an error of type kAudio_ParamError.
Update the code to only increment the number of microphoneProcsCalled if AudioUnitRender succeeds.
This will ensure that, should AudioUnitRender fails for some time, the timer will kick in and fail the capture.
Page will be notified and can call getUserMedia again to restart capture.

* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioSharedUnit::processMicrophoneSamples):

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

3 months ago[JSC][32-bits] Build failure after r259676 (Not using strict mode within ClassDeclara...
guijemont@igalia.com [Wed, 8 Apr 2020 14:32:12 +0000 (14:32 +0000)]
[JSC][32-bits] Build failure after r259676 (Not using strict mode within ClassDeclaration statement)
https://bugs.webkit.org/show_bug.cgi?id=210176

Reviewed by Aakash Jain.

Fixed 32-bit paths to match changes in r259676.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileDeleteById):
(JSC::DFG::SpeculativeJIT::compileDeleteByVal):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileCallEval):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_put_by_id):

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

3 months ago[GTK] Gardening, flaky failures in EWS GTK-WK2
dpino@igalia.com [Wed, 8 Apr 2020 14:20:05 +0000 (14:20 +0000)]
[GTK] Gardening, flaky failures in EWS GTK-WK2
https://bugs.webkit.org/show_bug.cgi?id=210187

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

3 months ago[GTK] Drop usage of deprecated GdkDeviceManager
csaavedra@igalia.com [Wed, 8 Apr 2020 12:25:08 +0000 (12:25 +0000)]
[GTK] Drop usage of deprecated GdkDeviceManager
https://bugs.webkit.org/show_bug.cgi?id=210179

Reviewed by Adrian Perez de Castro.

Replace GdkDeviceManager usage for GdkSeat.
For GTK4 further changes will be needed but this is a
start.

Source/WebKit:

* UIProcess/gtk/ViewGestureControllerGtk.cpp:
(WebKit::createScrollEvent):

Tools:

* TestWebKitAPI/glib/WebKitGLib/gtk/WebViewTestGtk.cpp:
(WebViewTest::mouseMoveTo):
(WebViewTest::keyStroke):
(WebViewTest::doMouseButtonEvent):
* TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:
(TestWebKitAPI::doKeyStroke):
(TestWebKitAPI::doMouseButtonEvent):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::createMouseButtonEvent):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::continuousMouseScrollBy):
(WTR::EventSenderProxy::createTouchEvent):

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

3 months agoEnsure base cache path exists before calculating disk cache capacity
carlosgc@webkit.org [Wed, 8 Apr 2020 10:29:49 +0000 (10:29 +0000)]
Ensure base cache path exists before calculating disk cache capacity
https://bugs.webkit.org/show_bug.cgi?id=209338

Reviewed by Adrian Perez de Castro.

The base cache path might not exist yet in Cache::open() since it's Storage::open() the one calling
FileSystem::makeAllDirectories() with the final cache directory. In such case, computeCapacity() fails because
FileSystem::getVolumeFreeSpace() needs an existing file.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::open):

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

3 months agoRearrange and simplify some JSC feature flags
timothy_horton@apple.com [Wed, 8 Apr 2020 09:38:51 +0000 (09:38 +0000)]
Rearrange and simplify some JSC feature flags
https://bugs.webkit.org/show_bug.cgi?id=210152

Reviewed by Saam Barati.

Source/JavaScriptCore:

* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
(Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):
* jit/ExecutableAllocator.cpp:
(JSC::isJITEnabled):
(JSC::ExecutableAllocator::setJITEnabled):
* runtime/Options.cpp:
(JSC::overrideDefaults):

Source/WTF:

* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:
* wtf/PlatformUse.h:

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

3 months agoUnreviewed GTK gardening. Update expectations after r259705
carlosgc@webkit.org [Wed, 8 Apr 2020 09:28:49 +0000 (09:28 +0000)]
Unreviewed GTK gardening. Update expectations after r259705

Remove expectations of tests that are passing after r259705.

* platform/gtk/TestExpectations:

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

3 months agoUnreviewed GTK gardening. Update expectations after r259705
carlosgc@webkit.org [Wed, 8 Apr 2020 09:24:47 +0000 (09:24 +0000)]
Unreviewed GTK gardening. Update expectations after r259705

Remove expectations of tests that are passing after r259705.

* platform/gtk/TestExpectations:

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

3 months agoEnable the use of XCBuild by default in Apple builds
krollin@apple.com [Wed, 8 Apr 2020 09:12:07 +0000 (09:12 +0000)]
Enable the use of XCBuild by default in Apple builds
https://bugs.webkit.org/show_bug.cgi?id=209890
<rdar://problem/44182078>

Reviewed by Darin Adler.

Switch from the "legacy" Xcode build system to the "new" build system
(also known as "XCBuild"). Switching to the new system speeds up
builds by a small percentage, better validates projects for
build-related issues (such as dependency cycles), lets WebKit benefit
from future improvements in XCBuild such as those coming from the
underlying llbuild open source project, and prepares us for any other
tools built for this new ecosystem.

Specific changes:

- Remove Xcode project and workspace settings that selected the Build
  system, allowing the default to take hold (which is currently the
  New build system).
- Updated webkitdirs.pm with a terser check for Xcode version.
- Update build-webkit and Makefile.shared to be explicit when using
  the old build system (no longer treat it as a default or fall-back
  configuration).
- Update various xcconfig files similarly to treat the default as
  using the new build system.
- Update various post-processing build steps to check for Xcode 11.4
  and to no longer treat the default as using the old build system.

.:

* Makefile.shared:
* WebKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:

Source/JavaScriptCore:

* Configurations/JavaScriptCore.xcconfig:
* JavaScriptCore.xcodeproj/project.pbxproj:

Source/ThirdParty/ANGLE:

* ANGLE.xcodeproj/project.pbxproj:
* Configurations/ANGLE.xcconfig:

Source/ThirdParty/libwebrtc:

* libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

No new tests -- no changed functionality.

* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

* Configurations/WebKit.xcconfig:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig:

Tools:

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* Scripts/build-webkit:
* Scripts/webkitdirs.pm:
(canUseXCBuild):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

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

3 months ago[GTK][WPE] Release logs are unconditionally filling the journal
philn@webkit.org [Wed, 8 Apr 2020 08:40:19 +0000 (08:40 +0000)]
[GTK][WPE] Release logs are unconditionally filling the journal
https://bugs.webkit.org/show_bug.cgi?id=209421

Reviewed by Carlos Alberto Lopez Perez.

.:

Re-enable Systemd logging and make it opt-in via the WEBKIT_DEBUG environment variable.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

* platform/unix/LoggingUnix.cpp:
(WebCore::logLevelString): Disable all logging when the
WEBKIT_DEBUG environment variable is empty.

Source/WTF:

* wtf/Assertions.h: Don't send logs to systemd for disabled log channels.
* wtf/Logger.h:
(WTF::Logger::willLog const): Ditto.

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

3 months ago[iPadOS] Unable to toggle subpages on sites.google.com
graouts@webkit.org [Wed, 8 Apr 2020 07:46:26 +0000 (07:46 +0000)]
[iPadOS] Unable to toggle subpages on sites.google.com
https://bugs.webkit.org/show_bug.cgi?id=210143
<rdar://problem/58653069>

Reviewed by Brent Fulgham.

If a site built with sites.google.com has some sub-pages, tapping on the right-pointing arrow will not disclose the sub-pages due to preventDefault() being called
on the touchend event handler. We work around this issue by adding a new quirk that will prevent a given touch event type from being dispatched on a given element.
This quirk is only true for sites.google.com and the right-pointing arrow for the sub-pages disclosure.

* page/Quirks.cpp:
(WebCore::Quirks::shouldPreventDispatchOfTouchEvent const):
* page/Quirks.h:

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

3 months ago[GTK][WPE] WTR: fix handling of WebsiteDataStore
carlosgc@webkit.org [Wed, 8 Apr 2020 06:19:23 +0000 (06:19 +0000)]
[GTK][WPE] WTR: fix handling of WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=210106

Reviewed by Adrian Perez de Castro.

Source/WebKit:

Add WKContextSetPrimaryWebsiteDataStore() to expose WebProcessPool::setPrimaryDataStore().

* UIProcess/API/C/WKContext.cpp:
(WKContextSetPrimaryWebsiteDataStore):
* UIProcess/API/C/WKContextPrivate.h:

Tools:

The TestController::defaultWebsiteDataStore() is created and used but never really assigned to the
context. Since we are not assigning a WebsiteDataStore to the context, and we don't use the default
WebsiteDataStore, when a new page is created, we end up creating the default one (with the default config,
instead of the one created by WTR).

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::platformAdjustContext): Set defaultWebsiteDataStore() as the primary data store of the
context like the GLib API does.

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

3 months ago[Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in TestWebKitAPI
Hironori.Fujii@sony.com [Wed, 8 Apr 2020 05:46:25 +0000 (05:46 +0000)]
[Clang 10] Fix -Wimplicit-int-float-conversion compilation warnings in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=210067

Reviewed by Darin Adler.

There are test cases for overflow, non-overflow, underflow and
non-underflow edge cases in WTF.clampToIntegerFloat test.
maxPlusOne<int> can be used for overflow edge case, INT_MIN for
non-underflow. This change added code to calculate values for
non-overflow and underflow cases.

* TestWebKitAPI/Tests/WTF/MathExtras.cpp:
(TestWebKitAPI::TEST(WTF.clampToIntegerFloat)):
* TestWebKitAPI/Tests/WebCore/FloatRect.cpp:
(TestWebKitAPI::TEST(FloatRect.EnclosingIntRect)): Replaced
shiftMaxXEdgeTo(INT_MAX) with shiftMaxXEdgeTo(0) because it also
causes overflow for enclosingIntRect.

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

3 months ago[css-values-4] Support font-relative lh and rlh unit
commit-queue@webkit.org [Wed, 8 Apr 2020 04:45:45 +0000 (04:45 +0000)]
[css-values-4] Support font-relative lh and rlh unit
https://bugs.webkit.org/show_bug.cgi?id=195180

Patch by Tyler Wilcock <twilco.o@protonmail.com> on 2020-04-07
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Pass all 'lh' and 'rlh' tests, minus the '2rlh in font-size on root' test which may be a bug in the test itself: https://github.com/web-platform-tests/wpt/issues/22055

* web-platform-tests/css/css-values/lh-rlh-on-root-001-expected.txt:

Source/WebCore:

Implement support for 'lh' and 'rlh' units.
https://www.w3.org/TR/css-values-4/#font-relative-lengths

* css/CSSCalculationValue.cpp:
(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::hasDoubleValue):
* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
(WebCore::CSSConicGradientValue::createGradient):
* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::unitTypeString):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
(WebCore::CSSPrimitiveValue::equals const):
(WebCore::CSSPrimitiveValue::collectDirectComputationalDependencies const):
(WebCore::CSSPrimitiveValue::collectDirectRootComputationalDependencies const):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isLength):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const):
* css/CSSToLengthConversionData.cpp:
(WebCore::CSSToLengthConversionData::viewportWidthFactor const):
(WebCore::CSSToLengthConversionData::viewportHeightFactor const):
(WebCore::CSSToLengthConversionData::viewportMinFactor const):
(WebCore::CSSToLengthConversionData::viewportMaxFactor const):
* css/CSSToLengthConversionData.h: Replace bool 'm_computingFontSize' with Optional<CSSPropertyID> that indicates the property being computed, where none means the property being computed is unknown or unimportant to know.
(WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add 'parentStyle' parameter, necessary for calculating lh/rlh unit values.
(WebCore::CSSToLengthConversionData::parentStyle const):
(WebCore::CSSToLengthConversionData::computingFontSize const):
(WebCore::CSSToLengthConversionData::computingLineHeight const):
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoom const):
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoomAndPropertyToCompute const):
* css/CSSUnits.cpp:
(WebCore::operator<<):
* css/CSSUnits.h:
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::evaluate const):
* css/parser/CSSParserToken.cpp:
(WebCore::cssPrimitiveValueUnitFromTrie):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeLength):
* css/parser/SizesAttributeParser.cpp:
(WebCore::SizesAttributeParser::computeLength):
(WebCore::SizesAttributeParser::effectiveSizeDefaultValue):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::resolveCustomStyle):
* rendering/RenderElement.h:
(WebCore::RenderElement::parentStyle const):
* rendering/RenderThemeIOS.mm:
(WebCore::applyCommonButtonPaddingToStyle):
(WebCore::RenderThemeIOS::adjustButtonStyle const):
* rendering/style/RenderStyle.cpp: Extract 'computedLineHeight' behavior into separate 'computeLineHeight' function so logic can be reused elsewhere.
(WebCore::RenderStyle::computedLineHeight const):
(WebCore::RenderStyle::computeLineHeight const):
* rendering/style/RenderStyle.h:
* style/StyleBuilderConverter.h: Extract zoom calculation logic out of 'csstoLengthConversionDataWithTextZoomFactor' into separate 'zoomWithTextZoomFactor' function so logic can be reused elsewhere.
(WebCore::Style::zoomWithTextZoomFactor):
(WebCore::Style::BuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::Style::BuilderConverter::convertLineHeight):
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueFontSize):
* style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::BuilderState):

LayoutTests:

Implement support for the font-relative 'lh' and 'rlh' units.
https://www.w3.org/TR/css-values-4/#font-relative-lengths

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

3 months ago[iOS] webrtc/h265.html is consistently timing out
ryanhaddad@apple.com [Wed, 8 Apr 2020 03:59:00 +0000 (03:59 +0000)]
[iOS] webrtc/h265.html is consistently timing out
https://bugs.webkit.org/show_bug.cgi?id=210173

Unreviewed test gardening.

* platform/ios/TestExpectations: Skip the test on iOS.

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

3 months agofastclick.com: A Gradient banner is missing
zalan@apple.com [Wed, 8 Apr 2020 03:36:05 +0000 (03:36 +0000)]
fastclick.com: A Gradient banner is missing
https://bugs.webkit.org/show_bug.cgi?id=210169
<rdar://problem/60680979>

Reviewed by Simon Fraser.

Source/WebCore:

This patch ensures that if the non-fixed specified size for the background content computes to be a close-to-zero value, we produce at least one device pixel size content.
(and this is similar to what we do for FillSizeType::Contain/Cover.)

Test: fast/backgrounds/generated-bck-image-with-small-relative-size.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateFillTileSize const):

LayoutTests:

* fast/backgrounds/generated-bck-image-with-small-relative-size-expected.html: Added.
* fast/backgrounds/generated-bck-image-with-small-relative-size.html: Added.

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

3 months ago[iOS] Deny mach lookup access to the runningboard service in the WebContent process
pvollan@apple.com [Wed, 8 Apr 2020 02:38:42 +0000 (02:38 +0000)]
[iOS] Deny mach lookup access to the runningboard service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209933

Reviewed by Chris Dumez.

Source/WebKit:

Creating the dependency process assertion in the WebContent process requires access to runningboard, but since
this is only done on process startup, we can issue a temporary extension to the runningboard service, which
will be immediately revoked after the process assertion has been created.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

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

3 months ago[ews] Add unit tests for layout tests factories
aakash_jain@apple.com [Wed, 8 Apr 2020 01:38:41 +0000 (01:38 +0000)]
[ews] Add unit tests for layout tests factories
https://bugs.webkit.org/show_bug.cgi?id=210150

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/factories_unittest.py:
(TestLayoutTestsFactory):
(TestLayoutTestsFactory.test_macos_wk1_release_factory): Added unit-test.
(TestLayoutTestsFactory.test_macos_wk1_debug_factory): Ditto.
(TestLayoutTestsFactory.test_macos_wk2_factory): Ditto.
(TestLayoutTestsFactory.test_ios_wk2_factory): Ditto.
(TestGTKFactory): Renamed.

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

3 months agoUnreviewed. remove the build warning below since r243033.
jh718.park@samsung.com [Wed, 8 Apr 2020 00:59:37 +0000 (00:59 +0000)]
Unreviewed. remove the build warning below since r243033.
warning: unused parameter ‘pageMuted’ [-Wunused-parameter]

No new tests, no new behaviors.

* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::setInterrupted):

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

3 months ago[ews] Improve summary for CheckPatchRelevance build step
aakash_jain@apple.com [Wed, 8 Apr 2020 00:38:33 +0000 (00:38 +0000)]
[ews] Improve summary for CheckPatchRelevance build step
https://bugs.webkit.org/show_bug.cgi?id=210146

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(CheckPatchRelevance): Improved success message.
(CheckPatchRelevance.start):
(CheckPatchRelevance.getResultSummary): Improved failure message.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
* BuildSlaveSupport/ews-app/ews/views/statusbubble.py: Updated accordingly.

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

3 months agoITP Debug Mode logs should be more generic now that it blocks all third-party cookies...
wilander@apple.com [Wed, 8 Apr 2020 00:34:20 +0000 (00:34 +0000)]
ITP Debug Mode logs should be more generic now that it blocks all third-party cookies by default
https://bugs.webkit.org/show_bug.cgi?id=210133
<rdar://problem/61399686>

Reviewed by Brent Fulgham.

No new tests. Just a change of logging.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
    Now logs if either vector has entries and uses more generic language.
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):
    Now logs if either vector has entries and uses more generic language.
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):
    Removed hard-coded references to third-party cookie blocking and parameterized it instead.

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

3 months agoMove the misplaced statement to the proper place where in
jh718.park@samsung.com [Wed, 8 Apr 2020 00:32:13 +0000 (00:32 +0000)]
Move the misplaced statement to the proper place where in
RESOURCE_LOAD_STATISTICS macro.

This patch removes the build warning below since r259275.
warning: unused variable ‘sameSiteStrictEnforcementEnabled’ [-Wunused-variable]

No new tests, no new behavior changes.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):

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

3 months agoAX: VoiceOver can't activate combobox when textfield is inside it
cfleizach@apple.com [Tue, 7 Apr 2020 23:43:29 +0000 (23:43 +0000)]
AX: VoiceOver can't activate combobox when textfield is inside it
https://bugs.webkit.org/show_bug.cgi?id=210081

Reviewed by Joanmarie Diggs.

Source/WebCore:

Change accessKeyAction to return whether a simulated click event was dispatched.
Accessibility uses that information to decide whether it should sent an event afterwards, because
some objects accessKeyAction is only to focus(). AX is expected here to press on the object (and possibly focus).

Test: accessibility/activation-of-input-field-inside-other-element.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* dom/Element.h:
(WebCore::Element::accessKeyAction):
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::accessKeyAction):
* html/BaseCheckableInputType.h:
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::accessKeyAction):
* html/BaseChooserOnlyDateAndTimeInputType.h:
* html/BaseClickableWithKeyInputType.cpp:
(WebCore::BaseClickableWithKeyInputType::accessKeyAction):
* html/BaseClickableWithKeyInputType.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::accessKeyAction):
* html/HTMLAnchorElement.h:
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::accessKeyAction):
* html/HTMLButtonElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::accessKeyAction):
* html/HTMLElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::accessKeyAction):
* html/HTMLInputElement.h:
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::accessKeyAction):
* html/HTMLLabelElement.h:
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::accessKeyAction):
* html/HTMLLegendElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::accessKeyAction):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::accessKeyAction):
* html/HTMLOptionElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::accessKeyAction):
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::accessKeyAction):
* html/HTMLTextAreaElement.h:
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::accessKeyAction):
* html/HiddenInputType.h:
* html/InputType.cpp:
(WebCore::InputType::accessKeyAction):
* html/InputType.h:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::accessKeyAction):
* html/RangeInputType.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::accessKeyAction):
* svg/SVGElement.h:

LayoutTests:

* accessibility/activation-of-input-field-inside-other-element-expected.txt: Added.
* accessibility/activation-of-input-field-inside-other-element.html: Added.

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

3 months ago[ iOS ] http/tests/security/appcache-in-private-browsing.html is flaky timing out
lawrence.j@apple.com [Tue, 7 Apr 2020 23:42:34 +0000 (23:42 +0000)]
[ iOS ] http/tests/security/appcache-in-private-browsing.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=206750

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

3 months ago[ Catalina wk2 ] webrtc/peer-connection-audio-mute2.html is flaky timing out.
lawrence.j@apple.com [Tue, 7 Apr 2020 23:25:33 +0000 (23:25 +0000)]
[ Catalina wk2 ] webrtc/peer-connection-audio-mute2.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=210165

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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