WebKit-https.git
18 months agoDon't use mapped cache files in case of Class A/B protected app
antti@apple.com [Tue, 8 May 2018 16:15:19 +0000 (16:15 +0000)]
Don't use mapped cache files in case of Class A/B protected app
https://bugs.webkit.org/show_bug.cgi?id=185422
<rdar://problem/34001688>

Reviewed by Chris Dumez.

Currently we don't use shared memory maps in these cases. This still leaves us open for crashes
in the network process when the device is locked.

This patch disables use of blob storage (mapped cache files) in apps that use class A/B protection.
Normally we use blobs for resources > 16KB. Since use of shared memory is already disabled,
the only optimization lost for these apps is body data deduplication.

Any existing cache entries with blobs are ignored and deleted. New entries are created with
body data inlined with the metadata.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
* NetworkProcess/cache/NetworkCache.h:
(WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData const): Deleted.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const):

    Remove the code the prevented use of shared memory in these cases. Non-mapped Data objects
    are never shareable.

(WebKit::NetworkCache::Entry::setNeedsValidation):
* NetworkProcess/cache/NetworkCacheFileSystem.cpp:
(WebKit::NetworkCache::isSafeToUseMemoryMapForPath):
(WebKit::NetworkCache::canUseSharedMemoryForPath): Deleted.
* NetworkProcess/cache/NetworkCacheFileSystem.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::mayContainBlob const):
(WebKit::NetworkCache::Storage::shouldStoreBodyAsBlob):
(WebKit::NetworkCache::shouldStoreBodyAsBlob): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::canUseSharedMemoryForBodyData const): Deleted.

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

18 months agoUnreviewed, fix issue with running Speedometer PerfTest after r231450.
cdumez@apple.com [Tue, 8 May 2018 14:02:45 +0000 (14:02 +0000)]
Unreviewed, fix issue with running Speedometer PerfTest after r231450.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):

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

18 months agoUnreviewed. Add missing exit not included in r231298.
carlosgc@webkit.org [Tue, 8 May 2018 06:09:06 +0000 (06:09 +0000)]
Unreviewed. Add missing exit not included in r231298.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureWebToStorageProcessConnection):

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

18 months ago[JSCONLY] Enable ARMv7 DFG
utatane.tea@gmail.com [Tue, 8 May 2018 06:05:46 +0000 (06:05 +0000)]
[JSCONLY] Enable ARMv7 DFG
https://bugs.webkit.org/show_bug.cgi?id=185415

Reviewed by Mark Lam.

Enable ARMv7 DFG JIT by default on Linux and FreeBSD.

* wtf/Platform.h:

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

18 months ago[LFC] Add FormattingContext::layoutOutOfFlowDescendants implementation
zalan@apple.com [Tue, 8 May 2018 05:26:39 +0000 (05:26 +0000)]
[LFC] Add FormattingContext::layoutOutOfFlowDescendants implementation
https://bugs.webkit.org/show_bug.cgi?id=185377

Reviewed by Antti Koivisto.

Also, remove FormattingContext's m_layoutContext member and pass it in to ::layout() instead.
In theory LayoutContext is needed only during ::layout() call.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
* layout/FormattingContext.h:
(WebCore::Layout::FormattingContext::layoutContext const):
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::updateLayout):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layout const):
* layout/blockformatting/BlockFormattingContext.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout const):
* layout/inlineformatting/InlineFormattingContext.h:

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

18 months agoCheck X-Frame-Options and CSP frame-ancestors in network process
dbates@webkit.org [Tue, 8 May 2018 05:02:52 +0000 (05:02 +0000)]
Check X-Frame-Options and CSP frame-ancestors in network process
https://bugs.webkit.org/show_bug.cgi?id=185410
<rdar://problem/37733934>

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

Add enum traits for MessageSource and MessageLevel so that we can encode and decode them for IPC.

* runtime/ConsoleTypes.h:

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Make PingLoader.h a private header so that we can include it in WebKit.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): Only check CSP frame-ancestors and X-Frame-Options here if
we are not checking them in the NetworkProcess and HTTP response access is restricted. I code is otherwise kept
unchanged. There may be opportunities to clean this code up more and share more of it. We should look into this
in subsequent bugs.
* loader/DocumentLoader.h: Change visibility of stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() from
private to public and export it so that we can call it from the WebKit.
* loader/PingLoader.h:
* page/Settings.yaml: Add a new setting called networkProcessCSPFrameAncestorsCheckingEnabled (defaults: false)
and is hardcoded in WebPage.cpp to be enabled. This setting is used to determine if we will be using the NetworkProcess.
Ideally we wouldn't have this setting and just key off RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess().
However RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess() is always enabled in WebKit Legacy
at the time of writing (why?). And, strangely, RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess()
is conditionally enabled in WebKit. For now, we add a new setting, networkProcessCSPFrameAncestorsCheckingEnabled,
to determine if CSP checking should be performed in NetworkProcess. For checking to actually happen in NetworkProcess
and not in DocumentLoader::responseReceived() RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess()
will also need to be enabled.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowFrameAncestors const): Added a variant that takes a vector of ancestor origins.
* page/csp/ContentSecurityPolicy.h:
* page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::checkFrameAncestors): Ditto.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrameAncestorOrigins const): Ditto.
* page/csp/ContentSecurityPolicyDirectiveList.h: Export constructor so that we can invoke it from NetworkResourceLoader::shouldInterruptLoadForCSPFrameAncestorsOrXFrameOptions().
* page/csp/ContentSecurityPolicyResponseHeaders.h:
* platform/network/HTTPParsers.h: Export XFrameOptionsDisposition() so that we can use in WebKit.

Source/WebKit:

* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const): Always encode the frame ancestor origins.
(WebKit::NetworkResourceLoadParameters::decode): Always decode the frame ancestor origins.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::shouldInterruptLoadForXFrameOptions): Added.
(WebKit::NetworkResourceLoader::shouldInterruptLoadForCSPFrameAncestorsOrXFrameOptions): Added.
(WebKit::NetworkResourceLoader::didReceiveResponse): Check if the load needs to be interrupted due
to a violation of the CSP frame-ancestors directive or X-Frame-Options. If there is a violation
then stop the load.
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Ditto.
(NetworkResourceLoader::addConsoleMessage): Added.
(NetworkResourceLoader::sendCSPViolationReport): Added.
* NetworkProcess/NetworkResourceLoader.h:
* Scripts/webkit/messages.py: Teach the generator about data types MessageLevel and MessageSource
as they are both defined in file JavaScriptCore/ConsoleTypes.h as opposed to independent headers.
Also tell the generator that these types should not be forward declared so that we can use these
types without their JSC:: prefix in WebPage.messages.in.
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage): Route WebPage messages to the appropriate
web page.
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): Added message StopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied): Added.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::addConsoleMessage):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addConsoleMessage): Added.
(WebKit::WebPage::sendCSPViolationReport): Added.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add messages AddConsoleMessage and SendCSPViolationReport
for adding a console message to Web Inspector and sending a CSP report, respectively.

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

18 months ago[JSCOnly] Enable Intl.PluralRules
utatane.tea@gmail.com [Tue, 8 May 2018 04:19:22 +0000 (04:19 +0000)]
[JSCOnly] Enable Intl.PluralRules
https://bugs.webkit.org/show_bug.cgi?id=185359

Reviewed by Daniel Bates.

Enable Intl.PluralRules because JSCOnly port enables features aggressively.

* Source/cmake/OptionsJSCOnly.cmake:

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

18 months agoMake a compact version of VariableEnvironment that UnlinkedFunctionExecutable stores...
sbarati@apple.com [Tue, 8 May 2018 04:18:25 +0000 (04:18 +0000)]
Make a compact version of VariableEnvironment that UnlinkedFunctionExecutable stores and hash-cons these compact environments as we make them
https://bugs.webkit.org/show_bug.cgi?id=185329
<rdar://problem/39961536>

Reviewed by Michael Saboff.

I was made aware of a memory goof inside of JSC where we would inefficiently
use space to represent an UnlinkedFunctionExecutable's parent TDZ variables.

We did two things badly:
1. We used a HashMap instead of a Vector to represent the environment. Having
a HashMap is useful when looking things up when generating bytecode, but it's
space inefficient. Because UnlinkedFunctionExecutables live a long time because
of the code cache, we should have them store this information efficiently
inside of a Vector.

2. We didn't hash-cons these environments together. If you think about how
some programs are structured, hash-consing these together is hugely profitable.
Consider some code like this:
```
const/let V_1 = ...;
const/let V_2 = ...;
...
const/let V_n = ...;

function f_1() { ... };
function f_2() { ... };
...
function f_n() { ... };
```

Each f_i would store an identical hash map for its parent TDZ variables
consisting of {V_1, ..., V_n}. This was incredibly dumb. With hash-consing,
each f_i just holds onto a reference to the environment.

I benchmarked this change against an app that made heavy use of the
above code pattern and it reduced its peak memory footprint from ~220MB
to ~160MB.

* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedFunctionExecutable.h:
* parser/VariableEnvironment.cpp:
(JSC::CompactVariableEnvironment::CompactVariableEnvironment):
(JSC::CompactVariableEnvironment::operator== const):
(JSC::CompactVariableEnvironment::toVariableEnvironment const):
(JSC::CompactVariableMap::get):
(JSC::CompactVariableMap::Handle::~Handle):
* parser/VariableEnvironment.h:
(JSC::VariableEnvironmentEntry::bits const):
(JSC::VariableEnvironmentEntry::operator== const):
(JSC::VariableEnvironment::isEverythingCaptured const):
(JSC::CompactVariableEnvironment::hash const):
(JSC::CompactVariableMapKey::CompactVariableMapKey):
(JSC::CompactVariableMapKey::hash):
(JSC::CompactVariableMapKey::equal):
(JSC::CompactVariableMapKey::makeDeletedValue):
(JSC::CompactVariableMapKey::isHashTableDeletedValue const):
(JSC::CompactVariableMapKey::isHashTableEmptyValue const):
(JSC::CompactVariableMapKey::environment):
(WTF::HashTraits<JSC::CompactVariableMapKey>::emptyValue):
(WTF::HashTraits<JSC::CompactVariableMapKey>::isEmptyValue):
(WTF::HashTraits<JSC::CompactVariableMapKey>::constructDeletedValue):
(WTF::HashTraits<JSC::CompactVariableMapKey>::isDeletedValue):
(JSC::CompactVariableMap::Handle::Handle):
(JSC::CompactVariableMap::Handle::environment const):
(JSC::VariableEnvironment::VariableEnvironment): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

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

18 months agoAbstract logic to log console messages and send CSP violation reports into a client
dbates@webkit.org [Tue, 8 May 2018 03:51:10 +0000 (03:51 +0000)]
Abstract logic to log console messages and send CSP violation reports into a client
https://bugs.webkit.org/show_bug.cgi?id=185393
<rdar://problem/40036053>

Reviewed by Brent Fulgham.

Source/WebCore:

First pass at adding infrastructure to supporting CSP reporting from NetworkProcess and workers.
Replaces the existing ContentSecurityPolicy constructor that takes a Frame with one that
takes a ContentSecurityPolicyClient to delegate to for logging and sending reports. We will look
to remove ContentSecurityPolicy constructor that takes a ScriptExecutionContext in a follow up.

Standardize on instantiating a ContentSecurityPolicy with the full URL to resource that it protects
instead of taking only the SecurityOrigin of this URL. By taking the full URL the ContentSecurityPolicy
object is now capable of resolving a relative report URL without needing a Document/ScriptExecutionContext.

We are underutilizing the CSPInfo struct and ContentSecurityPolicyClient::willSendCSPViolationReport()
delegate callback in this patch. We will make use of this functionality in a subsequent patch to
support collecting script state (e.g. source line number) when reporting CSP violations in worker
threads. We also no longer go through the unnecessary motions to try to collect script state for a
frame-ancestors violation (since DocumentLoader extends ContentSecurityPolicyClient and does not
implement ContentSecurityPolicyClient::willSendCSPViolationReport()). The frame-ancestors directive
is checked before a document is parsed and executes script; => there will never be any script state
to collect; => it is not necessary to try to collect it as we currently do.

* Sources.txt: Add file ContentSecurityPolicyClient.cpp. See the remarks for ContentSecurityPolicyClient.cpp
below on why we have this file.
* WebCore.xcodeproj/project.pbxproj: Add files ContentSecurityPolicyClient.{h, cpp}.
* dom/Document.cpp:
(WebCore::Document::initSecurityContext): Pass the URL of the protected document.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): Ditto.
(WebCore::DocumentLoader::addConsoleMessage): Added.
(WebCore::DocumentLoader::sendCSPViolationReport): Added.
(WebCore::DocumentLoader::dispatchSecurityPolicyViolationEvent): Added.
* loader/DocumentLoader.h:
* loader/FrameLoaderClient.h: Fix typo in comment.
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Pass the URL of the worker script.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::ContentSecurityPolicy): Added overload that takes a URL&& and an optional
ContentSecurityPolicyClient*.
(WebCore::ContentSecurityPolicy::deprecatedURLForReporting const): Extracted and simplified stripURLForUseInReport()
into this member function.
(WebCore::ContentSecurityPolicy::reportViolation const): Modified to make use of the client, if we have
one and removed code for handling a ContentSecurityPolicy that was instantiated with a Frame.
(WebCore::ContentSecurityPolicy::logToConsole const): Ditto.
(WebCore::stripURLForUseInReport): Deleted; incorporated into ContentSecurityPolicy::deprecatedURLForReporting().
* page/csp/ContentSecurityPolicy.h:
* page/csp/ContentSecurityPolicyClient.cpp: Added. This file exists so that we can define the virtual
destructor out-of-line and export this abstract class so as to avoid the need for the vtable to be
defined in the translation unit of each derived class.
* page/csp/ContentSecurityPolicyClient.h: Added.
* page/csp/ContentSecurityPolicySource.cpp:
(WebCore::ContentSecurityPolicySource::operator SecurityOriginData const): Added.
* page/csp/ContentSecurityPolicySource.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope): Instantiate the ContentSecurityPolicy object with the
URL of the worker script.

Source/WebKit:

For now, build a URL from the source origin associated with the NetworkResourceLoader
and pass this to the ContentSecurityPolicy constructor.

Additionally, make NetworkLoadChecker::contentSecurityPolicy() non-const since it returns
a non-const pointer to a ContentSecurityPolicy object; => callers can mutate this object
right from under NetworkLoadChecker. Making this non-const makes this clear to a reader.
Also remove the mutable keyword from the definition of NetworkLoadChecker::m_contentSecurityPolicy.

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::contentSecurityPolicy):
(WebKit::NetworkLoadChecker::contentSecurityPolicy const): Deleted.
* NetworkProcess/NetworkLoadChecker.h:

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

18 months agoUnreviewed, add frame name in form-iframe-target-before-load-crash.html
cdumez@apple.com [Tue, 8 May 2018 02:16:00 +0000 (02:16 +0000)]
Unreviewed, add frame name in form-iframe-target-before-load-crash.html
https://bugs.webkit.org/show_bug.cgi?id=185408

The test started causing flakiness after r231456 because it would submit
the form in the main frame instead of the test frame.

* fast/events/form-iframe-target-before-load-crash.html:

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

18 months agoUnreviewed, fix issue with running Speedometer PerfTest after r231450.
cdumez@apple.com [Tue, 8 May 2018 01:54:10 +0000 (01:54 +0000)]
Unreviewed, fix issue with running Speedometer PerfTest after r231450.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):

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

18 months agoCSS filters which reference SVG filters fail to respect the "color-interpolation...
simon.fraser@apple.com [Tue, 8 May 2018 01:34:34 +0000 (01:34 +0000)]
CSS filters which reference SVG filters fail to respect the "color-interpolation-filters" of the filter
https://bugs.webkit.org/show_bug.cgi?id=185343

Reviewed by Dean Jackson.

Source/WebCore:

Test: css3/filters/color-interpolation-filters.html

When applying CSS reference filters, apply the value of "color-interpolation-filters" for the
referenced filter effect element, just as we do for SVG filters.

* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):

LayoutTests:

* css3/filters/color-interpolation-filters-expected.html: Added.
* css3/filters/color-interpolation-filters.html: Added.

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

18 months ago[DFG][MIPS] Simplify DFG code by increasing MIPS temporary registers
utatane.tea@gmail.com [Tue, 8 May 2018 01:13:03 +0000 (01:13 +0000)]
[DFG][MIPS] Simplify DFG code by increasing MIPS temporary registers
https://bugs.webkit.org/show_bug.cgi?id=185371

Reviewed by Mark Lam.

Since MIPS GPRInfo claims it has only 7 registers, some of DFG code exhausts registers.
As a result, we need to maintain separated code for MIPS. This increases DFG maintenance burden,
but actually MIPS have much more registers.

This patch adds $a0 - $a3 to temporary registers. This is OK since our temporary registers can be overlapped with
argument registers (see ARM, X86 implementations). These registers are caller-save ones, so we do not need to
have extra mechanism.

Then, we remove several unnecessary MIPS code in our JIT infrastructure.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/CCallHelpers.h:
* jit/GPRInfo.h:
(JSC::GPRInfo::toRegister):
(JSC::GPRInfo::toIndex):
* offlineasm/mips.rb:

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

18 months agoDFG AI should have O(1) clobbering
fpizlo@apple.com [Tue, 8 May 2018 01:05:21 +0000 (01:05 +0000)]
DFG AI should have O(1) clobbering
https://bugs.webkit.org/show_bug.cgi?id=185287

Reviewed by Saam Barati.
JSTests:

* stress/simple-ai-effect.js: Added.
(bar):
(foo):

Source/JavaScriptCore:

This fixes an old scalability probem in AI. Previously, if we did clobberWorld(), then we
would traverse all of the state available to the AI at that time and clobber it.

This changes clobberWorld() to be O(1). It just does some math to a clobber epoch.

This is a ~1% speed-up for compile times.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* dfg/DFGAbstractInterpreter.h:
(JSC::DFG::AbstractInterpreter::forNode):
(JSC::DFG::AbstractInterpreter::setForNode):
(JSC::DFG::AbstractInterpreter::clearForNode):
(JSC::DFG::AbstractInterpreter::variables): Deleted.
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::clobberWorld):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::forAllValues):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::clobberStructures):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeDoubleUnaryOpEffects):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::fastForwardToSlow):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::fastForwardTo):
(JSC::DFG::AbstractValue::clobberStructuresFor): Deleted.
(JSC::DFG::AbstractValue::observeInvalidationPoint): Deleted.
(JSC::DFG::AbstractValue::observeInvalidationPointFor): Deleted.
* dfg/DFGAbstractValueClobberEpoch.cpp: Added.
(JSC::DFG::AbstractValueClobberEpoch::dump const):
* dfg/DFGAbstractValueClobberEpoch.h: Added.
(JSC::DFG::AbstractValueClobberEpoch::AbstractValueClobberEpoch):
(JSC::DFG::AbstractValueClobberEpoch::first):
(JSC::DFG::AbstractValueClobberEpoch::clobber):
(JSC::DFG::AbstractValueClobberEpoch::observeInvalidationPoint):
(JSC::DFG::AbstractValueClobberEpoch::operator== const):
(JSC::DFG::AbstractValueClobberEpoch::operator!= const):
(JSC::DFG::AbstractValueClobberEpoch::structureClobberState const):
(JSC::DFG::AbstractValueClobberEpoch::clobberEpoch const):
* dfg/DFGAtTailAbstractState.h:
(JSC::DFG::AtTailAbstractState::setForNode):
(JSC::DFG::AtTailAbstractState::clearForNode):
(JSC::DFG::AtTailAbstractState::numberOfArguments const):
(JSC::DFG::AtTailAbstractState::numberOfLocals const):
(JSC::DFG::AtTailAbstractState::operand):
(JSC::DFG::AtTailAbstractState::local):
(JSC::DFG::AtTailAbstractState::argument):
(JSC::DFG::AtTailAbstractState::clobberStructures):
(JSC::DFG::AtTailAbstractState::observeInvalidationPoint):
(JSC::DFG::AtTailAbstractState::variables): Deleted.
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::performBlockCFA):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGFlowMap.h:
(JSC::DFG::FlowMap::at):
(JSC::DFG::FlowMap::atShadow):
(JSC::DFG::FlowMap::at const):
(JSC::DFG::FlowMap::atShadow const):
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::beginBasicBlock):
(JSC::DFG::InPlaceAbstractState::endBasicBlock):
* dfg/DFGInPlaceAbstractState.h:
(JSC::DFG::InPlaceAbstractState::forNode):
(JSC::DFG::InPlaceAbstractState::setForNode):
(JSC::DFG::InPlaceAbstractState::clearForNode):
(JSC::DFG::InPlaceAbstractState::variablesForDebugging):
(JSC::DFG::InPlaceAbstractState::numberOfArguments const):
(JSC::DFG::InPlaceAbstractState::numberOfLocals const):
(JSC::DFG::InPlaceAbstractState::operand):
(JSC::DFG::InPlaceAbstractState::local):
(JSC::DFG::InPlaceAbstractState::argument):
(JSC::DFG::InPlaceAbstractState::variableAt):
(JSC::DFG::InPlaceAbstractState::clobberStructures):
(JSC::DFG::InPlaceAbstractState::observeInvalidationPoint):
(JSC::DFG::InPlaceAbstractState::fastForward):
(JSC::DFG::InPlaceAbstractState::variables): Deleted.
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetStack):

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

18 months agoUpdate TestExpectations for imported/w3c/web-platform-tests/html/dom/interfaces.worke...
ryanhaddad@apple.com [Tue, 8 May 2018 00:28:12 +0000 (00:28 +0000)]
Update TestExpectations for imported/w3c/web-platform-tests/html/dom/interfaces.worker.html.
https://bugs.webkit.org/show_bug.cgi?id=185407

Unreviewed test gardening.

* TestExpectations:

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

18 months agoMark http/tests/security/contentTypeOptions/nosniff-importScript-blocked.html as...
ryanhaddad@apple.com [Tue, 8 May 2018 00:08:53 +0000 (00:08 +0000)]
Mark http/tests/security/contentTypeOptions/nosniff-importScript-blocked.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=184802

Unreviewed test gardening.

* TestExpectations:

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

18 months agoInPlaceAbstractState::beginBasicBlock shouldn't have to clear any abstract values
fpizlo@apple.com [Tue, 8 May 2018 00:07:20 +0000 (00:07 +0000)]
InPlaceAbstractState::beginBasicBlock shouldn't have to clear any abstract values
https://bugs.webkit.org/show_bug.cgi?id=185365

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch does three things to improve compile times:

- Fixes some inlining goofs.

- Adds the ability to measure compile times with run-jsc-benchmarks.

- Dramatically improves the performance of InPlaceAbstractState::beginBasicBlock by removing the
  code that clears abstract values. It turns out that on constant folding "needed" this, in the
  sense that this was the only thing protecting it from loading the abstract value of a no-result
  node and then concluding that because it had a non-empty m_value, it could be constant-folded.
  Any node that produces a result will explicitly set its abstract value, so this problem can
  also be guarded by just having constant folding check if the node it wants to fold returns any
  result.

Solid 0.96% compile time speed-up across SunSpider-CompileTime and V8Spider-CompileTime.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::set):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::merge):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::doToChildrenWithNode):
(JSC::DFG::Graph::doToChildren):
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::beginBasicBlock):
* jit/JIT.cpp:
(JSC::JIT::totalCompileTime):
* jit/JIT.h:
* jsc.cpp:
(GlobalObject::finishCreation):
(functionTotalCompileTime):

Source/WTF:

Fix some inlining goof-ups.

* wtf/TinyPtrSet.h:
(WTF::TinyPtrSet::add):
(WTF::TinyPtrSet::merge):
(WTF::TinyPtrSet::addOutOfLine):
(WTF::TinyPtrSet::mergeOtherOutOfLine):

Tools:

Make it possible to measure compile times.

* Scripts/run-jsc-benchmarks:

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

18 months agoDFG AI doesn't need to merge valuesAtTail - it can just assign them
fpizlo@apple.com [Tue, 8 May 2018 00:05:08 +0000 (00:05 +0000)]
DFG AI doesn't need to merge valuesAtTail - it can just assign them
https://bugs.webkit.org/show_bug.cgi?id=185355

Reviewed by Mark Lam.

This is a further attempt to improve compile times. Assigning AbstractValue ought to always
be faster than merging. There's no need to merge valuesAtTail. In most cases, assigning and
merging will get the same answer because the value computed this time will be either the same
as or more general than the value computed last time. If the value does change for some
reason, then valuesAtHead are already merged, which ensures monotonicity. Also, if the value
changes, then we have no reason to believe that this new value is less right than the last
one we computed. Finally, the one client of valuesAtTail (AtTailAbstractState) doesn't care
if it's getting the merged valuesAtTail or just some correct answer for valuesAtTail.

* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::endBasicBlock):

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

18 months agoMark http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-ifram...
ryanhaddad@apple.com [Mon, 7 May 2018 23:59:37 +0000 (23:59 +0000)]
Mark http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=185404

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

18 months agoWebResourceLoadStatisticsStore::requestStorageAccess should call its completion handl...
achristensen@apple.com [Mon, 7 May 2018 23:57:22 +0000 (23:57 +0000)]
WebResourceLoadStatisticsStore::requestStorageAccess should call its completion handler on the main thread
https://bugs.webkit.org/show_bug.cgi?id=185403

Reviewed by Brent Fulgham.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):

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

18 months agoCSP status-code incorrect for document blocked due to violation of its frame-ancestor...
dbates@webkit.org [Mon, 7 May 2018 23:37:46 +0000 (23:37 +0000)]
CSP status-code incorrect for document blocked due to violation of its frame-ancestors directive
https://bugs.webkit.org/show_bug.cgi?id=185366
<rdar://problem/40035116>

Reviewed by Brent Fulgham.

Source/WebCore:

Fixes an issue where the status-code in the sent CSP report for an HTTP document blocked because
its frame-ancestors directive was violated would be the status code of the previously loaded
document in the frame. If the previously loaded document was about:blank then this would be 0.

Currently whenever we send a CSP report we ask the document's loader (Document::loader()) for the
HTTP status code for the last response. Document::loader() returns the loader for the last committed
document its frame. For a frame-ancestors violation, a CSP report is sent before the document
that had the frame-ancestors directive has been committed and after it has been associate with a frame.
As a result we are in are in a transient transition state for the frame and hence the last response
for new document's loader (Document::loader()) is actually the last response of the previously loaded
document in the frame. Instead we need to take care to tell CSP about the HTTP status code for the
response associated with the document the CSP came from.

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
(WebCore::Document::initSecurityContext):
Pass the HTTP status code to CSP.

* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::copyStateFrom):
(WebCore::ContentSecurityPolicy::responseHeaders const):
(WebCore::ContentSecurityPolicy::didReceiveHeaders):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
(WebCore::ContentSecurityPolicy::reportViolation const):
* page/csp/ContentSecurityPolicy.h:
Modify existing functions to take the HTTP status code, store it in a instance variable,
and reference this variable when reporting a violation.

* page/csp/ContentSecurityPolicyResponseHeaders.cpp:
(WebCore::ContentSecurityPolicyResponseHeaders::ContentSecurityPolicyResponseHeaders):
(WebCore::ContentSecurityPolicyResponseHeaders::isolatedCopy const):
* page/csp/ContentSecurityPolicyResponseHeaders.h:
(WebCore::ContentSecurityPolicyResponseHeaders::encode const):
(WebCore::ContentSecurityPolicyResponseHeaders::decode):
Store the HTTP status code along with the response headers.

LayoutTests:

Update existing test results now that we send the HTTP status code for the correct document.

* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt:

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

18 months agoUpdate TestExpectations for inspector/sampling-profiler/named-function-expression...
ryanhaddad@apple.com [Mon, 7 May 2018 23:32:28 +0000 (23:32 +0000)]
Update TestExpectations for inspector/sampling-profiler/named-function-expression.html.
https://bugs.webkit.org/show_bug.cgi?id=170830

Unreviewed test gardening.

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

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

18 months agoMark platform/mac/media/audio-session-category-video-track-change.html as flaky.
ryanhaddad@apple.com [Mon, 7 May 2018 23:32:25 +0000 (23:32 +0000)]
Mark platform/mac/media/audio-session-category-video-track-change.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=184609

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

18 months agoCSP referrer incorrect for document blocked due to violation of its frame-ancestors...
dbates@webkit.org [Mon, 7 May 2018 23:21:10 +0000 (23:21 +0000)]
CSP referrer incorrect for document blocked due to violation of its frame-ancestors directive
https://bugs.webkit.org/show_bug.cgi?id=185380

Reviewed by Brent Fulgham.

Source/WebCore:

Similar to <https://bugs.webkit.org/show_bug.cgi?id=185366>, fixes an issue where the referrer
in the sent CSP report for an HTTP document blocked because its frame-ancestors directive was
violated would be the referrer of the previously loaded document in the frame.

Currently whenever we send a CSP report we ask the document's loader (Document::loader()) for
the referrer for the last request. Document::loader() returns the loader for the last committed
document in its frame. For a frame-ancestors violation, a CSP report is sent before the document
that had the frame-ancestors directive has been committed and after it has been associate with a
frame. As a result we are in a transient transition state for the frame and hence the last request
for the new document's loader (Document::loader()) is actually the last request of the previously
loaded document in the frame. Instead we need to take care to tell CSP about the referrer for the
request associated with the document the CSP came from.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):

LayoutTests:

Update existing test results now that we send the referrer for the correct document.

* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https-expected.txt:

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

18 months agoRemove defunct email address
commit-queue@webkit.org [Mon, 7 May 2018 22:44:28 +0000 (22:44 +0000)]
Remove defunct email address
https://bugs.webkit.org/show_bug.cgi?id=185396

Patch by Andy VanWagoner <andy@vanwagoner.family> on 2018-05-07
Reviewed by Mark Lam.

The email address thetalecrafter@gmail.com is no longer valid, as the
associated google account has been closed. This updates the email
address so questions about these Intl contributions go to the right
place.

* builtins/DatePrototype.js:
* builtins/NumberPrototype.js:
* builtins/StringPrototype.js:
* 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/IntlPluralRules.cpp:
* runtime/IntlPluralRules.h:
* runtime/IntlPluralRulesConstructor.cpp:
* runtime/IntlPluralRulesConstructor.h:
* runtime/IntlPluralRulesPrototype.cpp:
* runtime/IntlPluralRulesPrototype.h:

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

18 months agoActivate ARC for libwebrtc Objective C files
youenn@apple.com [Mon, 7 May 2018 21:58:01 +0000 (21:58 +0000)]
Activate ARC for libwebrtc Objective C files
https://bugs.webkit.org/show_bug.cgi?id=185324

Reviewed by David Kilzer.

Revert changes made to libwebrtc to accomodate from not using ARC.
Use ARC for all libwebrtc objective C files.

Remove no longer needed export symbols and stop compiling the related files.

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Configurations/libwebrtc.xcconfig:
* Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:
* Source/webrtc/sdk/objc/Framework/Classes/Video/RTCCVPixelBuffer.mm:
(-[RTCCVPixelBuffer dealloc]):
* Source/webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.mm:
(webrtc::ObjCFrameBuffer::~ObjCFrameBuffer):
* Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm:
(-[RTCVideoDecoderH264 dealloc]):
(-[RTCVideoDecoderH264 setCallback:]):
(-[RTCVideoDecoderH264 releaseDecoder]):
* Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:
(-[RTCVideoEncoderH264 dealloc]):
(-[RTCVideoEncoderH264 setCallback:]):
(-[RTCVideoEncoderH264 releaseEncoder]):
* libwebrtc.xcodeproj/project.pbxproj:

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

18 months ago[iOS] Release page load process assertion if the screen is locked
cdumez@apple.com [Mon, 7 May 2018 21:57:25 +0000 (21:57 +0000)]
[iOS] Release page load process assertion if the screen is locked
https://bugs.webkit.org/show_bug.cgi?id=185333

Reviewed by Geoffrey Garen.

We normally take a background process assertion during page loads to allow them to complete
even if the tab / app is backgrounded. We should however avoid doing so when the backgrounding
is caused by the screen locking. Keeping the process assertion in this case would prevent the
whole device from sleeping longer than it should, thus negatively impacting power.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationState):
(WebKit::NavigationState::releaseNetworkActivityToken):
(WebKit::NavigationState::didChangeIsLoading):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationDidEnterBackground):

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

18 months agoAdd experimental feature to prompt for Storage Access API use
achristensen@apple.com [Mon, 7 May 2018 21:56:53 +0000 (21:56 +0000)]
Add experimental feature to prompt for Storage Access API use
https://bugs.webkit.org/show_bug.cgi?id=185335
<rdar://problem/39994649>

Patch by Brent Fulgham <bfulgham@apple.com> on 2018-05-07
Reviewed by Alex Christensen and Youenn Fablet.

Create a new experimental feature that gates the ability of WebKit clients to prompt the user when
Storage Access API is invoked.

Currently this feature doesn't have any user-visible impact.

Source/WebCore:

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setStorageAccessPromptsEnabled):
(WebCore::RuntimeEnabledFeatures::storageAccessPromptsEnabled const):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setStorageAccessPromptsEnabled):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit:

* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* Shared/WebPreferences.yaml:
* UIProcess/API/APIUIClient.h:
(API::UIClient::requestStorageAccessConfirm):
* UIProcess/API/C/WKPage.cpp:
(WebKit::RequestStorageAccessConfirmResultListener::create):
(WebKit::RequestStorageAccessConfirmResultListener::~RequestStorageAccessConfirmResultListener):
(WebKit::RequestStorageAccessConfirmResultListener::call):
(WebKit::RequestStorageAccessConfirmResultListener::RequestStorageAccessConfirmResultListener):
(WKPageRequestStorageAccessConfirmResultListenerGetTypeID):
(WKPageRequestStorageAccessConfirmResultListenerCall):
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _storageAccessPromptsEnabled]):
(-[WKPreferences _setStorageAccessPromptsEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestStorageAccessConfirm):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::update):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::requestStorageAccess):

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

18 months agoStop using an iframe's id as fallback if its name attribute is not set
cdumez@apple.com [Mon, 7 May 2018 21:42:29 +0000 (21:42 +0000)]
Stop using an iframe's id as fallback if its name attribute is not set
https://bugs.webkit.org/show_bug.cgi?id=11388

Reviewed by Geoff Garen.

Source/WebCore:

WebKit had logic to use an iframe's id as fallback name when its name
content attribute is not set. This behavior was not standard and did not
match other browsers:
- https://html.spec.whatwg.org/#attr-iframe-name

Gecko / Trident never behaved this way. Blink was aligned with us until
they started to match the specification in:
- https://bugs.chromium.org/p/chromium/issues/detail?id=347169

This WebKit quirk was causing some Web-compatibility issues because it
would affect the behavior of Window's name property getter when trying
to look up an iframe by id. Because of Window's named property getter
behavior [1], we would return the frame's contentWindow instead of the
iframe element itself.

[1] https://html.spec.whatwg.org/multipage/window-object.html#named-access-on-the-window-object

Test: fast/dom/Window/named-getter-frame-id.html

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::openURL):
(WebCore::HTMLFrameElementBase::parseAttribute):
(WebCore::HTMLFrameElementBase::didFinishInsertingNode):
* html/HTMLFrameElementBase.h:

LayoutTests:

* fast/dom/Window/named-getter-frame-id-expected.txt: Added.
* fast/dom/Window/named-getter-frame-id.html: Added.
Add layout test coverage.

* fast/dom/Geolocation/srcdoc-getCurrentPosition-expected.txt:
* fast/dom/Geolocation/srcdoc-watchPosition-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-crash.html:
* fast/dom/Window/window-special-properties-expected.txt:
* fast/frames/iframe-no-name-expected.txt:
* fast/frames/iframe-no-name.html:
* fast/layers/prevent-hit-test-during-layout.html:
* fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt:
* http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html:
* http/tests/security/contentSecurityPolicy/iframe-blank-url-programmatically-add-external-script-expected.txt:
* http/tests/security/cross-origin-reified-window-property-access.html:
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-and-try-access-from-right-frame-expected.txt:
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-but-try-access-from-wrong-frame-expected.txt:
* http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html:
* http/wpt/beacon/keepalive-after-navigation-expected.txt:
* http/wpt/cache-storage/cache-remove-twice.html:
Update some layout tests that relied on our old (non-standard) behavior.

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

18 months agoTest262-Runner: Add base module to the local deps - unicore/Exact.pl
commit-queue@webkit.org [Mon, 7 May 2018 21:06:34 +0000 (21:06 +0000)]
Test262-Runner: Add base module to the local deps - unicore/Exact.pl
https://bugs.webkit.org/show_bug.cgi?id=185390

Patch by Leo Balter <leonardo.balter@gmail.com> on 2018-05-07
Reviewed by Michael Saboff.

* Scripts/test262/local/lib/perl5/unicore/Exact.pl: Added.

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

18 months agoUse a dark gray for system preview bbackground
dino@apple.com [Mon, 7 May 2018 21:00:17 +0000 (21:00 +0000)]
Use a dark gray for system preview bbackground
https://bugs.webkit.org/show_bug.cgi?id=185391
<rdar://problem/40035120>

Reviewed by Eric Carlson.

Throw some darker shade at this view.

* UIProcess/ios/WKSystemPreviewView.mm:
(-[WKSystemPreviewView web_initWithFrame:webView:]):

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

18 months agoLayout Test webrtc/addICECandidate-closed.html is a flaky failure
youenn@apple.com [Mon, 7 May 2018 20:48:36 +0000 (20:48 +0000)]
Layout Test webrtc/addICECandidate-closed.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=185384

Reviewed by Eric Carlson.

Given that we are calling addIceCandidate and close the peer connection,
addIceCandidate might throw an error sometimes.
Catch the exception to make the test output stable.

* webrtc/addICECandidate-closed.html:

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

18 months agoCheck for com.apple.datamigrator before declaring simulators booted
jbedard@apple.com [Mon, 7 May 2018 20:08:16 +0000 (20:08 +0000)]
Check for com.apple.datamigrator before declaring simulators booted
https://bugs.webkit.org/show_bug.cgi?id=185315
<rdar://problem/39986261>

Reviewed by David Kilzer.

* Scripts/webkitdirs.pm:
(waitUntilProcessNotRunning): Wait until a process is not found.
(relaunchIOSSimulator): Wait until com.apple.datamigrator stops running to declare
a simulator booted.
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive2.__init__): Define _running_pids.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager.initialize_devices): Call wait_until_data_migration_is_done before
declaring that devices have been booted, increase the timeout since data migration will frequently
take longer than 60 seconds, especially with multiple simulators booting.
(SimulatedDeviceManager.swap): Ditto.
(SimulatedDeviceManager):
(SimulatedDeviceManager.wait_until_data_migration_is_done): Wait until there are no com.apple.datamigrator
processes running.

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

18 months ago[Win] Add missing methods to WebChromeClient
don.olmstead@sony.com [Mon, 7 May 2018 19:42:54 +0000 (19:42 +0000)]
[Win] Add missing methods to WebChromeClient
https://bugs.webkit.org/show_bug.cgi?id=185325

Reviewed by Brent Fulgham.

* WebProcess/WebCoreSupport/WebChromeClient.h:

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

18 months agoASSERT(!childItemWithTarget(child->target())) is hit in HistoryItem::addChildItem()
cdumez@apple.com [Mon, 7 May 2018 18:55:15 +0000 (18:55 +0000)]
ASSERT(!childItemWithTarget(child->target())) is hit in HistoryItem::addChildItem()
https://bugs.webkit.org/show_bug.cgi?id=185322

Reviewed by Geoff Garen.

LayoutTests/imported/w3c:

Rebaseline layout tests due to frame name changes.

* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/001-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/003-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_data_url-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_same_origin-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/001-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/002-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/003-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/004-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/005-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/unload/003-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/unload/004-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/unload/007-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/unload/009-expected.txt:

Source/WebCore:

We generate unique names for Frame to be used in HistoryItem. Those names not only
need to be unique, they also need to be repeatable to avoid layout tests flakiness
and for things like restoring form state from a HistoryItem.

The previously generated frame names were relying on the Frame's index among a
parent Frame's children. The issue was that we could end up with duplicate names
because one could insert a Frame *before* an existing one. This is because the code
would not take care of updating existing Frames' unique name on frame tree mutation.

Updating frame tree names on mutation would be inefficient and is also not necessary.
The approach chosen in this patch is to stop using the Frame's index and instead rely
on an increasing counter stored on the top-frame's FrameTree. To make the names
repeatable, we reset the counter on page navigation.

* page/Frame.cpp:
(WebCore::Frame::setDocument):
* page/FrameTree.cpp:
(WebCore::FrameTree::uniqueChildName const):
(WebCore::FrameTree::generateUniqueName const):
* page/FrameTree.h:
(WebCore::FrameTree::resetFrameIdentifiers):

LayoutTests:

Rebaseline layout tests due to frame name changes.

* applicationmanifest/display-mode-subframe-expected.txt:
* contentfiltering/allow-after-add-data-expected.txt:
* contentfiltering/allow-after-finished-adding-data-expected.txt:
* contentfiltering/allow-after-response-expected.txt:
* contentfiltering/allow-after-will-send-request-expected.txt:
* contentfiltering/allow-never-expected.txt:
* contentfiltering/block-after-add-data-expected.txt:
* contentfiltering/block-after-add-data-then-allow-unblock-expected.txt:
* contentfiltering/block-after-add-data-then-deny-unblock-expected.txt:
* contentfiltering/block-after-finished-adding-data-expected.txt:
* contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.txt:
* contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.txt:
* contentfiltering/block-after-response-expected.txt:
* contentfiltering/block-after-response-then-allow-unblock-expected.txt:
* contentfiltering/block-after-response-then-deny-unblock-expected.txt:
* contentfiltering/block-after-will-send-request-expected.txt:
* contentfiltering/block-after-will-send-request-then-allow-unblock-expected.txt:
* contentfiltering/block-after-will-send-request-then-deny-unblock-expected.txt:
* contentfiltering/block-never-expected.txt:
* fast/dom/Geolocation/callback-to-deleted-context-expected.txt:
* fast/dom/Geolocation/disconnected-frame-expected.txt:
* fast/dom/Geolocation/disconnected-frame-permission-denied-expected.txt:
* fast/dom/Window/messageevent-source-postmessage-expected.txt:
* fast/dom/Window/messageevent-source-postmessage-reified-expected.txt:
* fast/dom/javascript-url-crash-function-expected.txt:
* fast/encoding/meta-overrules-auto-expected.txt:
* fast/events/before-unload-forbidden-navigation-expected.txt:
* fast/events/before-unload-in-subframe-expected.txt:
* fast/events/before-unload-with-subframes-expected.txt:
* fast/events/focusingUnloadedFrame-expected.txt:
* fast/events/onloadFrameCrash-expected.txt:
* fast/events/onunload-not-on-body-expected.txt:
* fast/events/pageshow-pagehide-expected.txt:
* fast/events/stop-load-in-unload-handler-using-document-write-expected.txt:
* fast/events/stop-load-in-unload-handler-using-window-stop-expected.txt:
* fast/forms/form-and-frame-interaction-retains-values-expected.txt:
* fast/frames/crash-when-child-iframe-forces-layout-during-unload-and-sibling-frame-has-mediaquery-expected.txt:
* fast/frames/frame-element-name-expected.txt:
* fast/frames/frame-src-attribute-expected.txt:
* fast/frames/frame-unload-crash-expected.txt:
* fast/frames/iframe-reparenting-unique-name-expected.txt:
* fast/frames/iframe-set-inner-html-expected.txt:
* fast/frames/layout-after-destruction-expected.txt:
* fast/frames/long-names-in-nested-subframes-expected.txt:
* fast/frames/page-unload-document-open-expected.txt:
* fast/frames/reparent-in-unload-contentdocument-expected.txt:
* fast/frames/sandboxed-iframe-noscript-expected.txt:
* fast/frames/sandboxed-iframe-storage-expected.txt:
* fast/frames/srcdoc/setting-src-does-nothing-expected.txt:
* fast/frames/srcdoc/srcdoc-can-navigate-expected.txt:
* fast/frames/srcdoc/srcdoc-loads-content-expected.txt:
* fast/history/back-from-page-with-focused-iframe-expected.txt:
* fast/history/history-back-initial-vs-final-url-expected.txt:
* fast/history/redirect-via-iframe-expected.txt:
* fast/loader/child-frame-add-after-back-forward-expected.txt:
* fast/loader/dynamic-iframe-extra-back-forward-item-expected.txt:
* fast/loader/fragment-navigation-base-blank-expected.txt:
* fast/loader/frame-location-change-not-added-to-history-expected.txt:
* fast/loader/frame-src-change-added-to-history-expected.txt:
* fast/loader/frame-src-change-not-added-to-history-expected.txt:
* fast/loader/frames-with-unload-handlers-in-page-cache-expected.txt:
* fast/loader/grandparent-completion-starts-redirect-expected.txt:
* fast/loader/iframe-meta-refresh-base-blank-expected.txt:
* fast/loader/iframe-set-location-base-blank-expected.txt:
* fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash-async-delegate-expected.txt:
* fast/loader/inner-iframe-loads-data-url-into-parent-on-unload-crash-expected.txt:
* fast/loader/page-dismissal-modal-dialogs-expected.txt:
* fast/loader/ping-error-expected.txt:
* fast/loader/plain-text-document-expected.txt:
* fast/loader/refresh-iframe-base-blank-expected.txt:
* fast/loader/stateobjects/pushstate-frequency-iframe-expected.txt:
* fast/loader/stateobjects/pushstate-in-iframe-expected.txt:
* fast/loader/stateobjects/replacestate-frequency-iframe-expected.txt:
* fast/loader/stateobjects/replacestate-in-iframe-expected.txt:
* fast/loader/stop-provisional-loads-expected.txt:
* fast/loader/subframe-removes-itself-expected.txt:
* fast/loader/subframe-self-close-expected.txt:
* fast/loader/unload-hyperlink-targeted-expected.txt:
* fast/parser/double-write-from-closed-iframe-expected.txt:
* fast/parser/iframe-sets-parent-to-javascript-url-expected.txt:
* fast/parser/javascript-url-compat-mode-expected.txt:
* fast/parser/move-during-parsing-expected.txt:
* fast/parser/noscript-with-javascript-disabled-expected.txt:
* fast/parser/pre-html5-parser-quirks-expected.txt:
* fast/preloader/iframe-srcdoc-expected.txt:
* fast/tokenizer/text-plain-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt:
* fast/xsl/xslt-text-expected.txt:
* http/tests/appcache/x-frame-options-prevents-framing-expected.txt:
* http/tests/contentdispositionattachmentsandbox/referer-header-stripped-expected.txt:
* http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-always-expected.txt:
* http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-default-expected.txt:
* http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-never-expected.txt:
* http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-no-referrer-expected.txt:
* http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-no-referrer-when-downgrade-expected.txt:
* http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-origin-expected.txt:
* http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-unsafe-url-expected.txt:
* http/tests/cookies/same-site/fetch-after-navigating-iframe-in-cross-origin-page-expected.txt:
* http/tests/cookies/same-site/fetch-in-cross-origin-iframe-expected.txt:
* http/tests/cookies/same-site/fetch-in-cross-origin-service-worker-expected.txt:
* http/tests/cookies/same-site/fetch-in-same-origin-service-worker-expected.txt:
* http/tests/from-origin/document-from-origin-same-accepted-expected.txt:
* http/tests/from-origin/document-from-origin-same-blocked-expected.txt:
* http/tests/from-origin/document-from-origin-same-site-accepted-expected.txt:
* http/tests/from-origin/document-from-origin-same-site-blocked-expected.txt:
* http/tests/from-origin/document-nested-from-origin-same-accepted-expected.txt:
* http/tests/from-origin/document-nested-from-origin-same-blocked-expected.txt:
* http/tests/from-origin/fetch-data-iframe-from-origin-same-blocked-expected.txt:
* http/tests/from-origin/fetch-iframe-from-origin-same-accepted-expected.txt:
* http/tests/from-origin/fetch-iframe-from-origin-same-blocked-expected.txt:
* http/tests/from-origin/redirect-document-from-origin-same-blocked-expected.txt:
* http/tests/from-origin/sandboxed-sub-frame-from-origin-same-blocked-expected.txt:
* http/tests/from-origin/sandboxed-sub-frame-nested-cross-origin-from-origin-same-blocked-expected.txt:
* http/tests/from-origin/sandboxed-sub-frame-nested-same-origin-from-origin-same-blocked-expected.txt:
* http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt:
* http/tests/loading/basic-auth-remove-credentials-expected.txt:
* http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
* http/tests/loading/basic-credentials-sent-automatically-expected.txt:
* http/tests/loading/pdf-commit-load-callbacks-expected.txt:
* http/tests/loading/redirect-with-no-location-crash-expected.txt:
* http/tests/loading/server-redirect-for-provisional-load-caching-expected.txt:
* http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt:
* http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt:
* http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt:
* http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt:
* http/tests/misc/last-modified-parsing-expected.txt:
* http/tests/misc/policy-delegate-called-twice-expected.txt:
* http/tests/misc/redirect-to-external-url-expected.txt:
* http/tests/misc/webtiming-origins-expected.txt: Removed.
* http/tests/navigation/back-to-slow-frame-expected.txt:
* http/tests/navigation/forward-and-cancel-expected.txt:
* http/tests/navigation/image-load-in-subframe-unload-handler-expected.txt:
* http/tests/navigation/lockedhistory-iframe-expected.txt:
* http/tests/navigation/post-frames-expected.txt:
* http/tests/navigation/reload-subframe-frame-expected.txt:
* http/tests/navigation/reload-subframe-iframe-expected.txt:
* http/tests/navigation/reload-subframe-object-expected.txt:
* http/tests/preload/download_resources_from_header_iframe-expected.txt:
* http/tests/preload/download_resources_from_invalid_headers-expected.txt:
* http/tests/quicklook/at-import-stylesheet-blocked-expected.txt:
* http/tests/quicklook/cross-origin-iframe-blocked-expected.txt:
* http/tests/quicklook/document-domain-is-empty-string-expected.txt:
* http/tests/quicklook/external-stylesheet-blocked-expected.txt:
* http/tests/quicklook/hide-referer-on-navigation-expected.txt:
* http/tests/quicklook/rtf-document-domain-is-empty-string-expected.txt:
* http/tests/quicklook/same-origin-xmlhttprequest-allowed-expected.txt:
* http/tests/quicklook/top-navigation-blocked-expected.txt:
* http/tests/resourceLoadStatistics/add-blocking-to-redirect-expected.txt:
* http/tests/resourceLoadStatistics/add-partitioning-to-redirect-expected.txt:
* http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt:
* http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion-expected.txt:
* http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt:
* http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt:
* http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt:
* http/tests/resourceLoadStatistics/remove-partitioning-in-redirect-expected.txt:
* http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-expected.txt:
* http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-expected.txt:
* http/tests/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-allowall-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-in-body-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-allow-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-invalid-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt:
* http/tests/security/appcache-in-private-browsing-expected.txt:
* http/tests/security/appcache-switching-private-browsing-expected.txt:
* http/tests/security/canvas-cors-with-two-hosts-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-in-meta-element-ignored-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-in-report-only-ignored-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-allow-same-origin-sandboxed-cross-url-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-self-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-star-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-url-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-url-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-self-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-star-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-url-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-url-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-self-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-star-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-url-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-url-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-self-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-star-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-url-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-url-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-none-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-protocolless-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-self-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-self-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-star-allow-crossorigin-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-star-allow-sameorigin-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-url-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-url-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-enforced-policy-and-not-in-report-only-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-invalidnonce-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-url-01-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-url-02-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-in-enforced-policy-and-not-in-report-only-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-in-enforced-policy-and-not-in-report-only-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https-expected.txt:
* http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/data-url-iframe-in-main-frame-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-enforced-and-report-policies-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-inherited-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-javascript-url-iframe-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-xslt-document-in-iframe-with-inherited-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-with-inherited-policy-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-redirect-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-01-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-02-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-03-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-04-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-05-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-multiple-headers-expected.txt:
* http/tests/security/contentSecurityPolicy/eval-blocked-in-subframe-expected.txt:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed-expected.txt:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https-expected.txt:
* http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
* http/tests/security/contentSecurityPolicy/script-loads-with-img-src-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-none-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-none-inline-event-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-parsing-implicit-and-explicit-port-number-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-redirect-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-01-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-02-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-03-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-self-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-01-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-02-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-03-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-04-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-05-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-06-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-07-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-08-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-09-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-10-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-deprecated-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-no-semicolon-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-nonascii-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-none-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-paths-01-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-paths-02-expected.txt:
* http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-nested-upgrades-expected.txt:
* http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe-expected.txt:
* http/tests/security/contentSecurityPolicy/xsl-redirect-allowed-expected.txt:
* http/tests/security/contentSecurityPolicy/xsl-redirect-allowed2-expected.txt:
* http/tests/security/cookies/first-party-cookie-allow-xslt-expected.txt:
* http/tests/security/cookies/third-party-cookie-blocking-redirect-expected.txt:
* http/tests/security/cookies/third-party-cookie-blocking-xslt-expected.txt:
* http/tests/security/cross-frame-access-callback-explicit-domain-DENY-expected.txt:
* http/tests/security/cross-frame-access-delete-expected.txt:
* http/tests/security/cross-frame-access-frameelement-expected.txt:
* http/tests/security/cross-frame-access-history-put-expected.txt: Removed.
* http/tests/security/cross-frame-access-location-put-expected.txt:
* http/tests/security/cross-frame-access-private-browsing-expected.txt:
* http/tests/security/cross-origin-appcache-allowed-expected.txt:
* http/tests/security/cross-origin-appcache-expected.txt:
* http/tests/security/cross-origin-css-primitive-expected.txt:
* http/tests/security/cross-origin-indexeddb-allowed-expected.txt:
* http/tests/security/cross-origin-indexeddb-expected.txt:
* http/tests/security/cross-origin-plugin-allowed-expected.txt:
* http/tests/security/cross-origin-plugin-expected.txt:
* http/tests/security/cross-origin-plugin-private-browsing-toggled-allowed-expected.txt:
* http/tests/security/cross-origin-plugin-private-browsing-toggled-expected.txt:
* http/tests/security/cross-origin-session-storage-allowed-expected.txt:
* http/tests/security/cross-origin-session-storage-third-party-blocked-expected.txt:
* http/tests/security/cross-origin-websql-allowed-expected.txt:
* http/tests/security/cross-origin-websql-expected.txt:
* http/tests/security/cross-origin-worker-indexeddb-allowed-expected.txt:
* http/tests/security/cross-origin-worker-indexeddb-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level-expected.txt:
* http/tests/security/frameNavigation/xss-ALLOWED-targeted-subframe-navigation-change-expected.txt:
* http/tests/security/frameNavigation/xss-DENIED-plugin-navigation-expected.txt:
* http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation-expected.txt:
* http/tests/security/history-pushState-replaceState-from-sandboxed-iframe-expected.txt:
* http/tests/security/http-0.9/default-port-plugin-blocked-expected.txt:
* http/tests/security/http-0.9/default-port-script-blocked-expected.txt:
* http/tests/security/http-0.9/iframe-blocked-expected.txt:
* http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed-expected.txt:
* http/tests/security/http-0.9/image-on-HTTP-0.9-page-blocked-expected.txt:
* http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation-expected.txt:
* http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-2-level-expected.txt:
* http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-to-javscript-url-expected.txt:
* http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-from-javscript-url-expected.txt:
* http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame-2-level-expected.txt:
* http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/mixedContent/about-blank-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/blob-url-in-iframe-expected.txt:
* http/tests/security/mixedContent/data-url-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/data-url-script-in-iframe-expected.txt:
* http/tests/security/mixedContent/empty-url-plugin-in-frame-expected.txt:
* http/tests/security/mixedContent/insecure-css-in-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-form-in-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-iframe-in-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/insecure-image-in-iframe-expected.txt:
* http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt:
* http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe-expected.txt:
* http/tests/security/private-browsing-http-auth-expected.txt:
* http/tests/security/referrer-policy-always-expected.txt:
* http/tests/security/referrer-policy-default-expected.txt:
* http/tests/security/referrer-policy-https-always-expected.txt:
* http/tests/security/referrer-policy-https-default-expected.txt:
* http/tests/security/referrer-policy-https-never-expected.txt:
* http/tests/security/referrer-policy-https-no-referrer-expected.txt:
* http/tests/security/referrer-policy-https-no-referrer-when-downgrade-expected.txt:
* http/tests/security/referrer-policy-https-origin-expected.txt:
* http/tests/security/referrer-policy-https-unsafe-url-expected.txt:
* http/tests/security/referrer-policy-invalid-expected.txt:
* http/tests/security/referrer-policy-never-expected.txt:
* http/tests/security/referrer-policy-no-referrer-expected.txt:
* http/tests/security/referrer-policy-no-referrer-when-downgrade-expected.txt:
* http/tests/security/referrer-policy-origin-expected.txt:
* http/tests/security/referrer-policy-redirect-expected.txt:
* http/tests/security/referrer-policy-rel-noreferrer-expected.txt:
* http/tests/security/same-origin-appcache-blocked-expected.txt:
* http/tests/security/same-origin-document-domain-storage-allowed-expected.txt:
* http/tests/security/same-origin-storage-blocked-expected.txt:
* http/tests/security/same-origin-websql-blocked-expected.txt:
* http/tests/security/sandboxed-iframe-document-cookie-expected.txt:
* http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition-expected.txt:
* http/tests/security/sandboxed-iframe-geolocation-watchPosition-expected.txt:
* http/tests/security/srcdoc-inherits-referrer-expected.txt:
* http/tests/security/srcdoc-inherits-referrer-for-forms-expected.txt:
* http/tests/security/storage-blocking-loosened-local-storage-expected.txt:
* http/tests/security/storage-blocking-loosened-plugin-expected.txt:
* http/tests/security/storage-blocking-loosened-private-browsing-plugin-expected.txt:
* http/tests/security/storage-blocking-loosened-websql-expected.txt:
* http/tests/security/storage-blocking-strengthened-local-storage-expected.txt:
* http/tests/security/storage-blocking-strengthened-plugin-expected.txt:
* http/tests/security/storage-blocking-strengthened-private-browsing-plugin-expected.txt:
* http/tests/security/storage-blocking-strengthened-websql-expected.txt:
* http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode-expected.txt:
* http/tests/security/strip-referrer-to-origin-for-third-party-requests-in-private-mode-expected.txt:
* http/tests/security/window-properties-clear-domain-expected.txt:
* http/tests/security/window-properties-clear-port-expected.txt:
* http/tests/security/window-properties-pass-expected.txt:
* http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt:
* http/tests/security/xss-DENIED-defineProperty-expected.txt:
* http/tests/security/xssAuditor/faux-script1-expected.txt:
* http/tests/security/xssAuditor/faux-script2-expected.txt:
* http/tests/security/xssAuditor/faux-script3-expected.txt:
* http/tests/security/xssAuditor/malformed-HTML-expected.txt:
* http/tests/security/xssAuditor/non-block-javascript-url-frame-expected.txt:
* http/tests/security/xssAuditor/reflection-in-path-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt:
* http/tests/security/xssAuditor/svg-animate-expected.txt:
* http/tests/ssl/media-stream/get-user-media-different-host-expected.txt:
* http/tests/ssl/media-stream/get-user-media-nested-expected.txt:
* http/tests/ssl/media-stream/get-user-media-secure-connection-expected.txt:
* http/tests/ssl/ping-with-unsafe-redirect-expected.txt:
* http/tests/storageAccess/deny-storage-access-under-opener-expected.txt:
* http/tests/storageAccess/grant-storage-access-under-opener-expected.txt:
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-and-try-access-from-right-frame-expected.txt:
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-but-try-access-from-wrong-frame-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-allow-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-allow-origin-null-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt:
* http/tests/xmlhttprequest/frame-load-cancelled-abort-expected.txt:
* http/tests/xmlhttprequest/frame-unload-abort-crash-expected.txt:
* http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
* http/tests/xmlhttprequest/uri-resolution-opera-open-004-expected.txt:
* http/tests/xmlhttprequest/uri-resolution-opera-open-005-expected.txt:
* http/tests/xmlhttprequest/uri-resolution-opera-open-006-expected.txt:
* http/tests/xmlhttprequest/uri-resolution-opera-open-007-expected.txt:
* http/tests/xmlhttprequest/uri-resolution-opera-open-008-expected.txt:
* http/tests/xmlhttprequest/uri-resolution-opera-open-009-expected.txt:
* http/tests/xmlhttprequest/uri-resolution-opera-open-010-expected.txt:
* http/tests/xsl/xslt-transform-with-javascript-disabled-expected.txt:
* imported/blink/fast/plugins/empty-url-object-expected.txt:
* loader/stateobjects/pushstate-size-iframe-expected.txt:
* loader/stateobjects/replacestate-size-iframe-expected.txt:
* media/auto-play-in-sandbox-with-allow-scripts-expected.txt:
* platform/ios-wk1/http/tests/quicklook/top-navigation-blocked-expected.txt:
* platform/ios-wk1/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/001-expected.txt:
* platform/ios/http/tests/quicklook/at-import-stylesheet-blocked-expected.txt:
* platform/ios/http/tests/quicklook/cross-origin-iframe-blocked-expected.txt:
* platform/ios/http/tests/quicklook/document-domain-is-empty-string-expected.txt:
* platform/ios/http/tests/quicklook/external-stylesheet-blocked-expected.txt:
* platform/ios/http/tests/quicklook/hide-referer-on-navigation-expected.txt:
* platform/ios/http/tests/quicklook/top-navigation-blocked-expected.txt:
* platform/ios/quicklook/excel-expected.txt:
* platform/ios/quicklook/excel-legacy-expected.txt:
* platform/ios/quicklook/excel-macro-enabled-expected.txt:
* platform/ios/quicklook/powerpoint-expected.txt:
* platform/ios/quicklook/powerpoint-legacy-expected.txt:
* platform/ios/quicklook/word-expected.txt:
* platform/ios/quicklook/word-legacy-expected.txt:
* platform/ios/webarchive/loading/cache-expired-subresource-expected.txt:
* platform/mac-wk2/http/tests/security/cross-origin-plugin-expected.txt:
* platform/mac-wk2/http/tests/security/cross-origin-plugin-private-browsing-toggled-expected.txt:
* platform/mac-wk2/http/tests/security/storage-blocking-strengthened-plugin-expected.txt:
* platform/mac-wk2/http/tests/security/storage-blocking-strengthened-private-browsing-plugin-expected.txt:
* platform/mac-wk2/plugins/resize-from-plugin-expected.txt:
* platform/mac/fast/loader/webarchive-encoding-respected-expected.txt:
* platform/mac/webarchive/adopt-attribute-styled-body-webarchive-expected.txt:
* platform/mac/webarchive/loading/cache-expired-subresource-expected.txt:
* platform/mac/webarchive/test-duplicate-resources-expected.txt:
* platform/win/plugins/resize-from-plugin-expected.txt:
* platform/win/webarchive/loading/cache-expired-subresource-expected.txt:
* platform/wk2/fast/loader/fragment-navigation-base-blank-expected.txt:
* platform/wk2/fast/loader/iframe-meta-refresh-base-blank-expected.txt:
* platform/wk2/fast/loader/iframe-set-location-base-blank-expected.txt:
* platform/wk2/fast/loader/refresh-iframe-base-blank-expected.txt:
* platform/wk2/fast/loader/subframe-removes-itself-expected.txt:
* platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt:
* platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
* platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt:
* platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt:
* platform/wk2/http/tests/loading/server-redirect-for-provisional-load-caching-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-allowall-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-in-body-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-allow-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-ignore-deny-meta-tag-parent-same-origin-deny-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-invalid-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow-expected.txt:
* platform/wk2/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/data-url-iframe-in-main-frame-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-enforced-and-report-policies-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-inherited-policy-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-javascript-url-iframe-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-xslt-document-in-iframe-with-inherited-policy-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-with-inherited-policy-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-redirect-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/proper-nested-upgrades-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-css-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-http-to-https-script-in-iframe-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-redirect-https-to-http-script-in-iframe-expected.txt:
* platform/wk2/http/tests/security/http-0.9/iframe-blocked-expected.txt:
* platform/wk2/http/tests/security/mixedContent/about-blank-iframe-in-main-frame-expected.txt:
* platform/wk2/http/tests/security/mixedContent/data-url-iframe-in-main-frame-expected.txt:
* platform/wk2/http/tests/security/mixedContent/data-url-script-in-iframe-expected.txt:
* platform/wk2/http/tests/security/mixedContent/empty-url-plugin-in-frame-expected.txt:
* platform/wk2/http/tests/security/mixedContent/insecure-css-in-iframe-expected.txt:
* platform/wk2/http/tests/security/mixedContent/insecure-form-in-iframe-expected.txt:
* platform/wk2/http/tests/security/mixedContent/insecure-iframe-in-iframe-expected.txt:
* platform/wk2/http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt:
* platform/wk2/http/tests/security/mixedContent/insecure-image-in-iframe-expected.txt:
* platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt:
* platform/wk2/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt:
* platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt:
* platform/wk2/http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe-expected.txt:
* platform/wk2/http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt:
* platform/wk2/webarchive/loading/javascript-url-iframe-crash-expected.txt:
* platform/wk2/webarchive/loading/mainresource-null-mimetype-crash-expected.txt:
* platform/wk2/webarchive/loading/missing-data-expected.txt:
* platform/wk2/webarchive/loading/object-expected.txt:
* platform/wk2/webarchive/loading/test-loading-archive-expected.txt:
* platform/wk2/webarchive/loading/test-loading-archive-subresource-null-mimetype-expected.txt:
* platform/wk2/webarchive/loading/video-in-webarchive-expected.txt:
* plugins/resize-from-plugin-expected.txt:
* quicklook/excel-expected.txt:
* quicklook/excel-legacy-expected.txt:
* quicklook/excel-macro-enabled-expected.txt:
* quicklook/keynote-09-expected.txt:
* quicklook/multi-sheet-numbers-09-expected.txt:
* quicklook/numbers-09-expected.txt:
* quicklook/pages-09-expected.txt:
* quicklook/powerpoint-expected.txt:
* quicklook/powerpoint-legacy-expected.txt:
* quicklook/word-expected.txt:
* quicklook/word-legacy-expected.txt:
* userscripts/user-script-all-frames-expected.txt:
* userscripts/user-script-top-frame-only-expected.txt:
* userscripts/user-style-all-frames-expected.txt:
* userscripts/user-style-top-frame-only-expected.txt:
* webarchive/loading/javascript-url-iframe-crash-expected.txt:
* webarchive/loading/mainresource-null-mimetype-crash-expected.txt:
* webarchive/loading/missing-data-expected.txt:
* webarchive/loading/object-expected.txt:
* webarchive/loading/test-loading-archive-expected.txt:
* webarchive/loading/test-loading-archive-subresource-null-mimetype-expected.txt:
* webarchive/loading/video-in-webarchive-expected.txt:

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

18 months agoREGRESSION (r229955): run-webkit-tests runs tests in skipped directories and subdirec...
dbates@webkit.org [Mon, 7 May 2018 18:32:46 +0000 (18:32 +0000)]
REGRESSION (r229955): run-webkit-tests runs tests in skipped directories and subdirectories of directory given on command line
https://bugs.webkit.org/show_bug.cgi?id=185054
<rdar://problem/39773209>

Reviewed by Ryosuke Niwa.

Fallback to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not have Apple Additions.

Darwin-based ports have OS version-specific test expectations and are certified to support running tests using
the currently shipping OS by way of a hardcoded class variable CURRENT_VERSION. The run-webkit-tests script
depends on the OS version to find the applicable TestExpectations files to parse to compute the list of skipped
tests for the port.

* Scripts/webkitpy/port/mac.py:
(MacPort.__init__): Fall back to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not
have Apple Additions.
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_factory_with_future_version): Added.
(MacTest.test_factory_with_future_version_and_apple_additions): Renamed from MacTest.test_factory_with_future_version()
and added code to use the mock Apple Additions so that running this code with- and without- the real Apple Additions
produces consistent results now that the Mac port's OS version falls back to MacPort.CURRENT_VERSION when Apple Additions
is absent.

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

18 months ago[EME][GStreamer] Fix wrong subsample parsing on r227067
commit-queue@webkit.org [Mon, 7 May 2018 18:27:25 +0000 (18:27 +0000)]
[EME][GStreamer] Fix wrong subsample parsing on r227067
https://bugs.webkit.org/show_bug.cgi?id=185382

Patch by Yacine Bandou <yacine.bandou_ext@softathome.com> on 2018-05-07
Reviewed by Philippe Normand.

The initialization of sampleIndex should be moved outside of the loop.
Without this patch we will have a bad log and the check of the subsample
count will be useless.

* platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
(webKitMediaClearKeyDecryptorDecrypt):

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

18 months agoAllow Web Touch events to timeout
megan_gardner@apple.com [Mon, 7 May 2018 18:16:15 +0000 (18:16 +0000)]
Allow Web Touch events to timeout
https://bugs.webkit.org/show_bug.cgi?id=185282

Reviewed by Tim Horton.

This is backwards, fixing.

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

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

18 months ago[Win] LoggingWin is missing includes
don.olmstead@sony.com [Mon, 7 May 2018 18:07:28 +0000 (18:07 +0000)]
[Win] LoggingWin is missing includes
https://bugs.webkit.org/show_bug.cgi?id=185326

Reviewed by Per Arne Vollan.

* Platform/win/LoggingWin.cpp:

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

18 months agoCSP should be passed the referrer
dbates@webkit.org [Mon, 7 May 2018 17:52:34 +0000 (17:52 +0000)]
CSP should be passed the referrer
https://bugs.webkit.org/show_bug.cgi?id=185367

Reviewed by Per Arne Vollan.

Source/WebCore:

As a step towards formalizing a CSP delegate object and removing the dependencies
on ScriptExecutionContext and Frame, we should pass the document's referrer directly
instead of indirectly obtaining it from the ScriptExecutionContext or Frame used
to instantiate the ContentSecurityPolicy object.

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv): Pass the document's referrer.
(WebCore::Document::initSecurityContext): Ditto.
(WebCore::Document::applyQuickLookSandbox): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument): Ditto.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::copyStateFrom): We pass a null string for the referrer
to didReceiveHeader() as a placeholder since it requires the referrer be given to it. We
fix up the referrer (m_referrer) after copying all the policy headers.
(WebCore::ContentSecurityPolicy::didReceiveHeaders): Ditto.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Modified to take a referrer and WTFMove()s
it into an instance variable (m_referrer).
(WebCore::ContentSecurityPolicy::reportViolation const): Modified to use the stored referrer.
* page/csp/ContentSecurityPolicy.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::applyContentSecurityPolicyResponseHeaders): Pass a null string
for the referrer as a worker does not have a referrer.

Source/WebKit:

Pass the referrer through NetworkLoadChecker so that it can pass it to the ContentSecurityPolicy
object it instantiates.

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::contentSecurityPolicy const):
* NetworkProcess/NetworkLoadChecker.h:
(WebKit::NetworkLoadChecker::create):
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):

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

18 months agoAdd tests to ensure Same-Site cookies are included when performing a top-level redirect
dbates@webkit.org [Mon, 7 May 2018 17:47:52 +0000 (17:47 +0000)]
Add tests to ensure Same-Site cookies are included when performing a top-level redirect
https://bugs.webkit.org/show_bug.cgi?id=185235

Reviewed by Alex Christensen.

* http/tests/cookies/same-site/fetch-after-top-level-cross-origin-redirect-expected.txt: Added.
* http/tests/cookies/same-site/fetch-after-top-level-cross-origin-redirect.html: Added.
* http/tests/cookies/same-site/fetch-after-top-level-same-origin-redirect-expected.txt: Added.
* http/tests/cookies/same-site/fetch-after-top-level-same-origin-redirect.html: Added.
* http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.php: Added.
* http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.php: Added.

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

18 months agoCSP should only notify Inspector to pause the debugger on the first policy to violate...
dbates@webkit.org [Mon, 7 May 2018 17:41:50 +0000 (17:41 +0000)]
CSP should only notify Inspector to pause the debugger on the first policy to violate a directive
https://bugs.webkit.org/show_bug.cgi?id=185364

Reviewed by Brent Fulgham.

Notify Web Inspector that a script was blocked on the first enforced CSP policy that it
violates.

A page can have more than one enforced Content Security Policy. Currently for inline
scripts, inline event handlers, JavaScript URLs, and eval() that are blocked by CSP
we notify Web Inspector that it was blocked for each CSP policy that blocked it. When
Web Inspector is notified it pauses script execution. It does not seem very meaningful
to pause script execution on the same script for each CSP policy that blocked it.
Therefore, only tell Web Inspector that a script was blocked for the first enforced CSP
policy that blocked it.

* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowJavaScriptURLs const):
(WebCore::ContentSecurityPolicy::allowInlineEventHandlers const):
(WebCore::ContentSecurityPolicy::allowInlineScript const):
(WebCore::ContentSecurityPolicy::allowEval const):

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

18 months agoSubstitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCac...
dbates@webkit.org [Mon, 7 May 2018 17:38:25 +0000 (17:38 +0000)]
Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
https://bugs.webkit.org/show_bug.cgi?id=185170

Reviewed by Per Arne Vollan.

Source/WebCore:

Rename CrossOriginPreflightResultCache::empty() to CrossOriginPreflightResultCache::clear() make
it consistent with the terminology we use in WebKit to signify a function that clears a collection.
A member function named "empty" is expected to return an instance of a class in its "empty state".
For example, StringImpl::empty() returns a StringImpl instance that represents the empty string.
However CrossOriginPreflightResultCache::empty() clears out the cache in-place. We should rename
this function to better describe its purpose.

* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCache::clear):
(WebCore::CrossOriginPreflightResultCache::empty): Deleted.
* loader/CrossOriginPreflightResultCache.h:

Source/WebKit:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearResourceCaches):
(WebKit::WebProcess::deleteWebsiteData):

Source/WebKitLegacy/mac:

* Misc/WebCache.mm:
(+[WebCache empty]):

Source/WebKitLegacy/win:

* WebCache.cpp:
(WebCache::empty):

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

18 months agoWebGL: Reset simulated values after validation fails
dino@apple.com [Mon, 7 May 2018 17:36:15 +0000 (17:36 +0000)]
WebGL: Reset simulated values after validation fails
https://bugs.webkit.org/show_bug.cgi?id=185363
<rdar://problem/39733417>

Reviewed by Anders Carlsson.

Source/WebCore:

While fixing a previous bug, I forgot to reset some values
when validation fails. This caused a bug where a subsequent
invalid call might use those values and escape detection.

Test: fast/canvas/webgl/index-validation-with-subsequent-draws.html

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Reset the
sizes when validation fails.
* html/canvas/WebGLRenderingContextBase.h:

LayoutTests:

* fast/canvas/webgl/index-validation-with-subsequent-draws-expected.txt: Added.
* fast/canvas/webgl/index-validation-with-subsequent-draws.html: Added.

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

18 months agoSupport negative sw/sh values in createImageBitmap().
Ms2ger@igalia.com [Mon, 7 May 2018 17:20:41 +0000 (17:20 +0000)]
Support negative sw/sh values in createImageBitmap().
https://bugs.webkit.org/show_bug.cgi?id=184449

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update expectations.

* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:

Source/WebCore:

Tests: LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
       LayoutTests/http/wpt/2dcontext/imagebitmap/createImageBitmap.html

* html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createPromise): handle negative values per spec.

LayoutTests:

* http/wpt/2dcontext/imagebitmap/createImageBitmap-expected.txt: update test name
* http/wpt/2dcontext/imagebitmap/createImageBitmap.html: update expected result

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

18 months agoWeb Inspector: opt out of process swap on navigation if a Web Inspector frontend...
bburg@apple.com [Mon, 7 May 2018 17:10:34 +0000 (17:10 +0000)]
Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected
https://bugs.webkit.org/show_bug.cgi?id=184861
<rdar://problem/39153768>

Reviewed by Timothy Hatcher.

Source/WebCore:

Notify the client of the current connection count whenever a frontend connects or disconnects.

Covered by new API test.

* inspector/InspectorClient.h:
(WebCore::InspectorClient::frontendCountChanged):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::disconnectAllFrontends):
* inspector/InspectorController.h:

Source/WebKit:

We need to track how many frontends are attached to the web page (both local and remote).
InspectorController propagates this out to WebKit via InspectorClient. This is then
kept in UIProcess as a member of WebPageProxy. When making a decision whether to use a
new process for a navigation, return early with "no" if any frontends are open for the
page being navigated.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didChangeInspectorFrontendCount):
(WebKit::WebPageProxy::inspectorFrontendCount const):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::frontendCountChanged):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::inspectorFrontendCountChanged):
* WebProcess/WebPage/WebPage.h:

Tools:

Add a new test that checks whether a new process is used for navigation when
an Inspector is shown. Also check that the behavior reverts to normal after
the Inspector has been closed.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

18 months agoText track cue logging should include cue text
eric.carlson@apple.com [Mon, 7 May 2018 15:54:56 +0000 (15:54 +0000)]
Text track cue logging should include cue text
https://bugs.webkit.org/show_bug.cgi?id=185353
<rdar://problem/40003565>

Reviewed by Youenn Fablet.

No new tests, tested manually.

* html/track/VTTCue.cpp:
(WebCore::VTTCue::toJSONString const): Use toJSON.
(WebCore::VTTCue::toJSON const): New.
* html/track/VTTCue.h:

* platform/graphics/InbandTextTrackPrivateClient.h:
(WebCore::GenericCueData::toJSONString const): Log m_content.

* platform/graphics/iso/ISOVTTCue.cpp:
(WebCore::ISOWebVTTCue::toJSONString const): Log m_cueText.

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

18 months ago[WinCairo] Disable plugin api when building modern WebKit
don.olmstead@sony.com [Mon, 7 May 2018 13:36:14 +0000 (13:36 +0000)]
[WinCairo] Disable plugin api when building modern WebKit
https://bugs.webkit.org/show_bug.cgi?id=185312

Reviewed by Michael Catanzaro.

* Source/cmake/OptionsWin.cmake:

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

18 months ago[WTF] Embed default atomic string table in Thread
utatane.tea@gmail.com [Mon, 7 May 2018 05:24:59 +0000 (05:24 +0000)]
[WTF] Embed default atomic string table in Thread
https://bugs.webkit.org/show_bug.cgi?id=185349

Reviewed by Darin Adler.

Do not need to allocate AtomicStringTable separate from Thread
since the table's lifetime is completely the same as Thread.

This patch just embeds it as a data member of Thread.

* wtf/Threading.cpp:
(WTF::Thread::initializeInThread):
(WTF::Thread::didExit):
* wtf/Threading.h:
* wtf/text/AtomicStringTable.cpp:
(WTF::AtomicStringTable::create): Deleted.
(WTF::AtomicStringTable::destroy): Deleted.
* wtf/text/AtomicStringTable.h:

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

18 months ago[JSC] Remove "using namespace std;" from JSC, bmalloc, WTF
utatane.tea@gmail.com [Mon, 7 May 2018 02:46:40 +0000 (02:46 +0000)]
[JSC] Remove "using namespace std;" from JSC, bmalloc, WTF
https://bugs.webkit.org/show_bug.cgi?id=185362

Reviewed by Sam Weinig.

Source/bmalloc:

* bmalloc/Allocator.cpp:
* bmalloc/Deallocator.cpp:

Source/JavaScriptCore:

"namespace std" may include many names. It can conflict with names defined by our code,
and the other platform provided headers. For example, std::byte conflicts with Windows'
::byte.
This patch removes "using namespace std;" from JSC and bmalloc.

* API/JSClassRef.cpp:
(OpaqueJSClass::create):
* bytecode/Opcode.cpp:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::newRegister):
* heap/Heap.cpp:
(JSC::Heap::updateAllocationLimits):
* interpreter/Interpreter.cpp:
* jit/JIT.cpp:
* parser/Parser.cpp:
* runtime/JSArray.cpp:
* runtime/JSLexicalEnvironment.cpp:
* runtime/JSModuleEnvironment.cpp:
* runtime/Structure.cpp:
* shell/DLLLauncherMain.cpp:
(getStringValue):
(applePathFromRegistry):
(appleApplicationSupportDirectory):
(copyEnvironmentVariable):
(prependPath):
(fatalError):
(directoryExists):
(modifyPath):
(getLastErrorString):
(wWinMain):

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

18 months ago[WTF] Use static initializers for WTF::Mutex and WTF::ThreadCondition
utatane.tea@gmail.com [Mon, 7 May 2018 02:46:36 +0000 (02:46 +0000)]
[WTF] Use static initializers for WTF::Mutex and WTF::ThreadCondition
https://bugs.webkit.org/show_bug.cgi?id=185361

Reviewed by Sam Weinig.

Use static initializers for WTF::Mutex and WTF::ThreadCondition to make
constructors of them simple and constexpr.

* wtf/ThreadingPrimitives.h:
* wtf/ThreadingPthreads.cpp:
(WTF::Mutex::Mutex): Deleted.
(WTF::ThreadCondition::ThreadCondition): Deleted.
* wtf/ThreadingWin.cpp:
(WTF::Mutex::Mutex): Deleted.
(WTF::ThreadCondition::ThreadCondition): Deleted.

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

18 months ago[LFC] Add assertions for stale Display::Box geometry
zalan@apple.com [Mon, 7 May 2018 02:09:16 +0000 (02:09 +0000)]
[LFC] Add assertions for stale Display::Box geometry
https://bugs.webkit.org/show_bug.cgi?id=185357

Reviewed by Antti Koivisto.

Ensure that we don't access stale geometry of other boxes during layout.
For example, in order to layout a block child we need the containing block's content box top/left and width (but not the height)

* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::invalidateTop):
(WebCore::Display::Box::invalidateLeft):
(WebCore::Display::Box::invalidateWidth):
(WebCore::Display::Box::invalidateHeight):
(WebCore::Display::Box::hasValidPosition const):
(WebCore::Display::Box::hasValidSize const):
(WebCore::Display::Box::hasValidGeometry const):
(WebCore::Display::Box::invalidatePosition):
(WebCore::Display::Box::invalidateSize):
(WebCore::Display::Box::setHasValidPosition):
(WebCore::Display::Box::setHasValidSize):
(WebCore::Display::Box::setHasValidGeometry):
(WebCore::Display::Box::rect const):
(WebCore::Display::Box::top const):
(WebCore::Display::Box::left const):
(WebCore::Display::Box::bottom const):
(WebCore::Display::Box::right const):
(WebCore::Display::Box::topLeft const):
(WebCore::Display::Box::bottomRight const):
(WebCore::Display::Box::size const):
(WebCore::Display::Box::width const):
(WebCore::Display::Box::height const):
(WebCore::Display::Box::setRect):
(WebCore::Display::Box::setTopLeft):
(WebCore::Display::Box::setTop):
(WebCore::Display::Box::setLeft):
(WebCore::Display::Box::setSize):
(WebCore::Display::Box::setWidth):
(WebCore::Display::Box::setHeight):

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

18 months ago[LFC] Add BlockFormattingContext::computeStaticPosition
zalan@apple.com [Sun, 6 May 2018 20:00:31 +0000 (20:00 +0000)]
[LFC] Add BlockFormattingContext::computeStaticPosition
https://bugs.webkit.org/show_bug.cgi?id=185352

Reviewed by Antti Koivisto.

This is the core logic for positioning inflow boxes in a block formatting context (very naive though).

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
* layout/displaytree/DisplayBox.h:

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

18 months agoDFG CFA phase should only do clobber asserts in debug
fpizlo@apple.com [Sun, 6 May 2018 01:06:09 +0000 (01:06 +0000)]
DFG CFA phase should only do clobber asserts in debug
https://bugs.webkit.org/show_bug.cgi?id=185354

Reviewed by Saam Barati.

Clobber asserts are responsible for 1% of compile time. That's too much. This disables them
unless asserts are enabled.

* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::performBlockCFA):

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

18 months agoCleanup XMLHttpRequestUpload a little
commit-queue@webkit.org [Sat, 5 May 2018 23:45:15 +0000 (23:45 +0000)]
Cleanup XMLHttpRequestUpload a little
https://bugs.webkit.org/show_bug.cgi?id=185344

Patch by Sam Weinig <sam@webkit.org> on 2018-05-05
Reviewed by Yusuke Suzuki.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitAdditionalChildren):
Use auto to reduce redundancy.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::upload):
* xml/XMLHttpRequest.h:
Switch upload() to return a reference.

* xml/XMLHttpRequestUpload.cpp:
(WebCore::XMLHttpRequestUpload::XMLHttpRequestUpload):
(WebCore::XMLHttpRequestUpload::dispatchProgressEvent):
* xml/XMLHttpRequestUpload.h:
Cleanup formatting, modernize and switch XMLHttpRequest member from a pointer
to a reference.

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

18 months agoDraw a drop-shadow behind the system preview badge
dino@apple.com [Sat, 5 May 2018 22:42:35 +0000 (22:42 +0000)]
Draw a drop-shadow behind the system preview badge
https://bugs.webkit.org/show_bug.cgi?id=185356
<rdar://problem/40004936>

Reviewed by Wenson Hsieh.

Draw a very subtle drop-shadow under the system
preview badge so that it is more visible on a pure
white background.

I also moved some code around to make it more clear
and improved comments.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintSystemPreviewBadge):

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

18 months ago[iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell...
wenson_hsieh@apple.com [Sat, 5 May 2018 04:39:52 +0000 (04:39 +0000)]
[iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell apart
https://bugs.webkit.org/show_bug.cgi?id=185289
<rdar://problem/35756912>

Reviewed by Tim Horton and Darin Adler.

Source/WebCore:

When inserting multiple URLs as individual items in a single drop, we currently separate each item with a space
(see r217284). However, it still seems difficult to tell dropped links apart. This patch makes some slight
tweaks to WebContentReader::readURL so that it inserts line breaks before dropped URLs, if the dropped URL isn't
the first item to be inserted in the resulting document fragment.

Augments existing API tests in DataInteractionTests.

* editing/ios/WebContentReaderIOS.mm:

Additionally remove some extraneous header imports from this implementation file.

(WebCore::WebContentReader::readURL):

Tools:

Augment and rebaseline some iOS drag-and-drop API tests that handle dropping URLs as a part of multi-item drop
sessions.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):

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

18 months agowebrtc/addICECandidate-closed.html is timing out
youenn@apple.com [Sat, 5 May 2018 02:11:53 +0000 (02:11 +0000)]
webrtc/addICECandidate-closed.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=185336

Reviewed by Eric Carlson.

* webrtc/addICECandidate-closed.html:

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

18 months agoUse IOSurfaces for CoreImage operations where possible
dino@apple.com [Sat, 5 May 2018 00:26:56 +0000 (00:26 +0000)]
Use IOSurfaces for CoreImage operations where possible
https://bugs.webkit.org/show_bug.cgi?id=185230
<rdar://problem/39926929>

Reviewed by Jon Lee.

On iOS hardware, we can use IOSurfaces as a rendering destination
for CoreImage, which means we're keeping data on the GPU
for rendering.

As a drive-by fix, I used a convenience method for Gaussian blurs.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintSystemPreviewBadge):

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

18 months agoShift to a lower-level framework for simplifying URLs
timothy_horton@apple.com [Sat, 5 May 2018 00:16:17 +0000 (00:16 +0000)]
Shift to a lower-level framework for simplifying URLs
https://bugs.webkit.org/show_bug.cgi?id=185334

Reviewed by Dan Bernstein.

Source/WebCore:

* Configurations/WebCore.xcconfig:
* platform/mac/DragImageMac.mm:
(WebCore::LinkImageLayout::LinkImageLayout):

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/PlatformMac.cmake:
* pal/spi/cocoa/URLFormattingSPI.h: Renamed from Source/WebCore/PAL/pal/spi/cocoa/LinkPresentationSPI.h.

Source/WebKit:

* Configurations/WebKit.xcconfig:
* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController _updateLocationInfo]):

Source/WTF:

* wtf/Platform.h:

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

18 months agoRelease assert in ScriptController::canExecuteScripts via HTMLMediaElement::~HTMLMedi...
rniwa@webkit.org [Fri, 4 May 2018 23:58:04 +0000 (23:58 +0000)]
Release assert in ScriptController::canExecuteScripts via HTMLMediaElement::~HTMLMediaElement()
https://bugs.webkit.org/show_bug.cgi?id=185288

Reviewed by Jer Noble.

The crash is caused by HTMLMediaElement::~HTMLMediaElement canceling the resource load via CachedResource
which ends up calling FrameLoader::checkCompleted() and fire load event on the document synchronously.
Speculatively fix the crash by scheduling the check instead.

In long term, ResourceLoader::cancel should never fire load event synchronously: webkit.org/b/185284.

Unfortunately, no new tests since I can't get MediaResource to get destructed at the right time.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::isRunningDestructor): Added to detect this specific case.
(WebCore::HTMLMediaElementDestructorScope): Added.
(WebCore::HTMLMediaElementDestructorScope::HTMLMediaElementDestructorScope): Added.
(WebCore::HTMLMediaElementDestructorScope::~HTMLMediaElementDestructorScope): Added.
(WebCore::HTMLMediaElement::~HTMLMediaElement): Instantiate HTMLMediaElement.
* html/HTMLMediaElement.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkCompleted): Call scheduleCheckCompleted instead of synchronously calling
checkCompleted if we're in the middle of destructing a HTMLMediaElement.

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

18 months agoWeb Inspector: simplify the WI.Collection interface
webkit@devinrousso.com [Fri, 4 May 2018 23:56:10 +0000 (23:56 +0000)]
Web Inspector: simplify the WI.Collection interface
https://bugs.webkit.org/show_bug.cgi?id=185187

Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Models/Collection.js:
(WI.Collection.prototype.get size): Added.
(WI.Collection.prototype.has): Added.
(WI.Collection.prototype.toJSON):
(WI.Collection.prototype.[Symbol.iterator]): Added.
(WI.Collection.prototype.get items): Deleted.
(WI.Collection.prototype.toArray): Deleted.

* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype._removeCanvas):
* UserInterface/Controllers/DOMDebuggerManager.js:
(WebInspector.DOMDebuggerManager.prototype.get domBreakpoints):
* UserInterface/Models/Frame.js:
(WI.Frame.prototype.removeAllChildFrames):
(WI.Frame.prototype.resourceForURL):
(WI.Frame.prototype.removeAllResources):
* UserInterface/Models/Script.js:
(WI.Script):
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.initialLayout):
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._updateNavigationItems):
* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype._recordingRemoved):
(WI.CanvasSidebarPanel.prototype._canvasChanged):
(WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView.prototype.attached):
(WI.CanvasTabContentView.prototype._addCanvas):
(WI.CanvasTabContentView.prototype._removeCanvas):
* UserInterface/Views/CanvasTreeElement.js:
(WI.CanvasTreeElement.prototype.onpopulate):
* UserInterface/Views/CollectionContentView.js:
(WI.CollectionContentView.prototype.initialLayout):
(WI.CollectionContentView.prototype.attached):
* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView.prototype._filterCookies):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame):
* UserInterface/Views/FolderizedTreeElement.js:
(WI.FolderizedTreeElement.prototype.updateParentStatus):
(WI.FolderizedTreeElement.prototype._shouldGroupIntoFolders):
* UserInterface/Views/FrameTreeElement.js:
(WI.FrameTreeElement.prototype.onpopulate):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.get contentTreeOutlines):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype._addResourcesForFrame):
(WI.OpenResourceDialog.prototype._addResourcesForTarget):
* UserInterface/Views/TreeOutlineGroup.js:
(WI.TreeOutlineGroup.prototype.get selectedTreeElement):
(WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
* UserInterface/Views/WorkerTreeElement.js:
(WI.WorkerTreeElement.prototype.onpopulate):

LayoutTests:

* http/tests/inspector/dom/cross-domain-inspected-node-access.html:
* http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html:
* http/tests/inspector/network/har/har-page.html:
* http/tests/inspector/network/har/har-page-expected.txt:
* http/tests/inspector/network/resource-response-source-memory-cache-revalidate-expired-only.html:
* http/tests/inspector/network/resource-response-source-memory-cache.html:
* http/tests/inspector/network/resource-sizes-memory-cache.html:
* http/tests/inspector/network/set-resource-caching-disabled-memory-cache.html:
* http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts.html:
* http/tests/websocket/tests/hybi/inspector/before-load.html:
* inspector/canvas/resources/recording-utilities.js:
* inspector/css/manager-preferredInspectorStyleSheetForFrame.html:
* inspector/debugger/resources/log-pause-location.js:
(TestPage.registerInitializer.window.findScript):
* inspector/dom/highlightFrame.html:
* inspector/dom/highlightNode.html:
* inspector/dom/highlightNodeList.html:
* inspector/dom/highlightSelector.html:
* inspector/model/frame-extra-scripts.html:
* inspector/page/empty-or-missing-resources.html:
* inspector/unit-tests/resource-collection.html:
* inspector/worker/resources-in-worker.html:

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

18 months agoRename DocumentOrderedMap to TreeScopeOrderedMap
rniwa@webkit.org [Fri, 4 May 2018 23:52:43 +0000 (23:52 +0000)]
Rename DocumentOrderedMap to TreeScopeOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=185290

Reviewed by Zalan Bujtas.

Renamed the class since it's almost always a mistake to use this class as a member variable of Document.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/MouseRelatedEvent.cpp: Include the forgotten DOMWindow.h. Unified build files bit us here.
* dom/TreeScope.cpp:
(WebCore::TreeScope::addElementById):
(WebCore::TreeScope::addElementByName):
(WebCore::TreeScope::addImageMap):
(WebCore::TreeScope::addImageElementByUsemap):
(WebCore::TreeScope::labelElementForId):
* dom/TreeScope.h:
* dom/TreeScopeOrderedMap.cpp: Renamed from DocumentOrderedMap.cpp
* dom/TreeScopeOrderedMap.h: Renamed from DocumentOrderedMap.h
* html/HTMLDocument.h:

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

18 months agoShutdown WindowServer connections after checking in with launch services
pvollan@apple.com [Fri, 4 May 2018 23:42:44 +0000 (23:42 +0000)]
Shutdown WindowServer connections after checking in with launch services
https://bugs.webkit.org/show_bug.cgi?id=185082
<rdar://problem/39613173>

Reviewed by Brent Fulgham.

When WindowServer access is blocked in the WebContent process, we should shutdown all connections
after checking in with launch services.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeProcess):

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

18 months agoREGRESSION (r230326?): Layout Test http/tests/contentextensions/make-https.html is...
youenn@apple.com [Fri, 4 May 2018 23:41:55 +0000 (23:41 +0000)]
REGRESSION (r230326?): Layout Test http/tests/contentextensions/make-https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184476
<rdar://problem/39384226>

Reviewed by Ryosuke Niwa.

Removed flakiness expectation.
Updated test to no longer log load callbacks.
Instead, we rely on the fact that the four content extension upgrades
are also logged as console log messages.

* http/tests/contentextensions/make-https-expected.txt:
* http/tests/contentextensions/make-https.html:
* platform/mac-sierra-wk2/http/tests/contentextensions/make-https-expected.txt: Removed.
* platform/mac-wk2/TestExpectations:

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

18 months ago[Win][WebKit] Fix forwarding headers for Windows build
don.olmstead@sony.com [Fri, 4 May 2018 23:29:03 +0000 (23:29 +0000)]
[Win][WebKit] Fix forwarding headers for Windows build
https://bugs.webkit.org/show_bug.cgi?id=184412

Reviewed by Alex Christensen.

Source/WebCore:

No new tests. No change in behavior.

* PlatformWin.cmake:

Source/WebKit:

* PlatformWin.cmake:
* UIProcess/API/APIAttachment.h:
* UIProcess/API/APIContextMenuClient.h:
* UIProcess/API/C/WKProcessTerminationReason.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:

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

18 months agoMark animations/duplicate-keys.html as flaky on iOS.
ryanhaddad@apple.com [Fri, 4 May 2018 23:07:07 +0000 (23:07 +0000)]
Mark animations/duplicate-keys.html as flaky on iOS.
https://bugs.webkit.org/show_bug.cgi?id=185332

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

18 months agoRebaseline tests for iOS after r231359.
ryanhaddad@apple.com [Fri, 4 May 2018 22:34:31 +0000 (22:34 +0000)]
Rebaseline tests for iOS after r231359.

Unreviewed test gardening.

* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

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

18 months ago[Simple line layout] Add support for line layout box generation with multiple text...
zalan@apple.com [Fri, 4 May 2018 22:23:47 +0000 (22:23 +0000)]
[Simple line layout] Add support for line layout box generation with multiple text renderers.
https://bugs.webkit.org/show_bug.cgi?id=185276

Reviewed by Antti Koivisto.

Covered by existing tests.

* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::canUseForLineBoxTree):
(WebCore::SimpleLineLayout::generateLineBoxTree):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::renderer const):
(WebCore::SimpleLineLayout::RunResolver::Run::localStart const):
(WebCore::SimpleLineLayout::RunResolver::Run::localEnd const):
* rendering/SimpleLineLayoutResolver.h:

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

18 months agoDeprecate legacy WebView and friends
timothy@apple.com [Fri, 4 May 2018 21:43:21 +0000 (21:43 +0000)]
Deprecate legacy WebView and friends
https://bugs.webkit.org/show_bug.cgi?id=185279
rdar://problem/33268700

Reviewed by Tim Horton.

Source/WebCore:

* Configurations/WebCore.xcconfig:
Added BUILDING_WEBKIT define to disable the deprecation macros.
* bridge/objc/WebScriptObject.h:
Added deprecation macros to WebScriptObject and WebUndefined.
* platform/cocoa/WebKitAvailability.h:
Added more macros and a way to disable deprecation warnings for
WebKit build and in clients like Safari.

Source/WebKitLegacy/mac:

Added deprecation macros to all the classes, extern strings, and enums.

* Configurations/WebKitLegacy.xcconfig:
Added BUILDING_WEBKIT define to disable the deprecation macros.
* DOM/DOMAbstractView.h:
* DOM/DOMAttr.h:
* DOM/DOMBlob.h:
* DOM/DOMCDATASection.h:
* DOM/DOMCSSCharsetRule.h:
* DOM/DOMCSSFontFaceRule.h:
* DOM/DOMCSSImportRule.h:
* DOM/DOMCSSMediaRule.h:
* DOM/DOMCSSPageRule.h:
* DOM/DOMCSSPrimitiveValue.h:
* DOM/DOMCSSRule.h:
* DOM/DOMCSSRuleList.h:
* DOM/DOMCSSStyleDeclaration.h:
* DOM/DOMCSSStyleRule.h:
* DOM/DOMCSSStyleSheet.h:
* DOM/DOMCSSUnknownRule.h:
* DOM/DOMCSSValue.h:
* DOM/DOMCSSValueList.h:
* DOM/DOMCharacterData.h:
* DOM/DOMComment.h:
* DOM/DOMCounter.h:
* DOM/DOMDocument.h:
* DOM/DOMDocumentFragment.h:
* DOM/DOMDocumentType.h:
* DOM/DOMElement.h:
* DOM/DOMEntity.h:
* DOM/DOMEntityReference.h:
* DOM/DOMEvent.h:
* DOM/DOMEventException.h:
* DOM/DOMEventListener.h:
* DOM/DOMEventTarget.h:
* DOM/DOMException.h:
* DOM/DOMFile.h:
* DOM/DOMFileList.h:
* DOM/DOMHTMLAnchorElement.h:
* DOM/DOMHTMLAppletElement.h:
* DOM/DOMHTMLAreaElement.h:
* DOM/DOMHTMLBRElement.h:
* DOM/DOMHTMLBaseElement.h:
* DOM/DOMHTMLBaseFontElement.h:
* DOM/DOMHTMLBodyElement.h:
* DOM/DOMHTMLButtonElement.h:
* DOM/DOMHTMLCanvasElement.h:
* DOM/DOMHTMLCollection.h:
* DOM/DOMHTMLDListElement.h:
* DOM/DOMHTMLDirectoryElement.h:
* DOM/DOMHTMLDivElement.h:
* DOM/DOMHTMLDocument.h:
* DOM/DOMHTMLElement.h:
* DOM/DOMHTMLEmbedElement.h:
* DOM/DOMHTMLFieldSetElement.h:
* DOM/DOMHTMLFontElement.h:
* DOM/DOMHTMLFormElement.h:
* DOM/DOMHTMLFrameElement.h:
* DOM/DOMHTMLFrameSetElement.h:
* DOM/DOMHTMLHRElement.h:
* DOM/DOMHTMLHeadElement.h:
* DOM/DOMHTMLHeadingElement.h:
* DOM/DOMHTMLHtmlElement.h:
* DOM/DOMHTMLIFrameElement.h:
* DOM/DOMHTMLImageElement.h:
* DOM/DOMHTMLInputElement.h:
* DOM/DOMHTMLLIElement.h:
* DOM/DOMHTMLLabelElement.h:
* DOM/DOMHTMLLegendElement.h:
* DOM/DOMHTMLLinkElement.h:
* DOM/DOMHTMLMapElement.h:
* DOM/DOMHTMLMarqueeElement.h:
* DOM/DOMHTMLMediaElement.h:
* DOM/DOMHTMLMenuElement.h:
* DOM/DOMHTMLMetaElement.h:
* DOM/DOMHTMLModElement.h:
* DOM/DOMHTMLOListElement.h:
* DOM/DOMHTMLObjectElement.h:
* DOM/DOMHTMLOptGroupElement.h:
* DOM/DOMHTMLOptionElement.h:
* DOM/DOMHTMLOptionsCollection.h:
* DOM/DOMHTMLParagraphElement.h:
* DOM/DOMHTMLParamElement.h:
* DOM/DOMHTMLPreElement.h:
* DOM/DOMHTMLQuoteElement.h:
* DOM/DOMHTMLScriptElement.h:
* DOM/DOMHTMLSelectElement.h:
* DOM/DOMHTMLStyleElement.h:
* DOM/DOMHTMLTableCaptionElement.h:
* DOM/DOMHTMLTableCellElement.h:
* DOM/DOMHTMLTableColElement.h:
* DOM/DOMHTMLTableElement.h:
* DOM/DOMHTMLTableRowElement.h:
* DOM/DOMHTMLTableSectionElement.h:
* DOM/DOMHTMLTextAreaElement.h:
* DOM/DOMHTMLTitleElement.h:
* DOM/DOMHTMLUListElement.h:
* DOM/DOMHTMLVideoElement.h:
* DOM/DOMImplementation.h:
* DOM/DOMKeyboardEvent.h:
* DOM/DOMMediaError.h:
* DOM/DOMMediaList.h:
* DOM/DOMMouseEvent.h:
* DOM/DOMMutationEvent.h:
* DOM/DOMNamedNodeMap.h:
* DOM/DOMNode.h:
* DOM/DOMNodeFilter.h:
* DOM/DOMNodeIterator.h:
* DOM/DOMNodeList.h:
* DOM/DOMObject.h:
* DOM/DOMOverflowEvent.h:
* DOM/DOMProcessingInstruction.h:
* DOM/DOMProgressEvent.h:
* DOM/DOMRGBColor.h:
* DOM/DOMRange.h:
* DOM/DOMRangeException.h:
* DOM/DOMRect.h:
* DOM/DOMStyleSheet.h:
* DOM/DOMStyleSheetList.h:
* DOM/DOMText.h:
* DOM/DOMTextEvent.h:
* DOM/DOMTimeRanges.h:
* DOM/DOMTokenList.h:
* DOM/DOMTreeWalker.h:
* DOM/DOMUIEvent.h:
* DOM/DOMWheelEvent.h:
* DOM/DOMXPathException.h:
* DOM/DOMXPathExpression.h:
* DOM/DOMXPathNSResolver.h:
* DOM/DOMXPathResult.h:
* History/WebBackForwardList.h:
* History/WebHistory.h:
* History/WebHistoryItem.h:
* Misc/WebDownload.h:
* Misc/WebKitErrors.h:
* Plugins/WebPluginViewFactory.h:
* WebView/WebArchive.h:
* WebView/WebDataSource.h:
* WebView/WebDocument.h:
* WebView/WebEditingDelegate.h:
* WebView/WebFormDelegate.h:
* WebView/WebFrame.h:
* WebView/WebFrameLoadDelegate.h:
* WebView/WebFrameView.h:
* WebView/WebPolicyDelegate.h:
* WebView/WebPreferences.h:
* WebView/WebPreferencesPrivate.h:
* WebView/WebResourceLoadDelegate.h:
* WebView/WebUIDelegate.h:
* WebView/WebUIDelegatePrivate.h:
* WebView/WebView.h:
* WebView/WebViewPrivate.h:
* postprocess-headers.sh:
Remove step that converts WEBKIT macros to NS macros.
Change it to just remove the macros on iOS builds.

Tools:

* MiniBrowser/Configurations/Base.xcconfig: Added GCC_PREPROCESSOR_DEFINITIONS
to define DISABLE_LEGACY_WEBKIT_DEPRECATIONS.

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

18 months agoLog media time range as JSON
eric.carlson@apple.com [Fri, 4 May 2018 21:39:24 +0000 (21:39 +0000)]
Log media time range as JSON
https://bugs.webkit.org/show_bug.cgi?id=185321
<rdar://problem/39986746>

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, tested manually.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::addPlayedRange): Log as time range.
(WebCore::HTMLMediaElement::visibilityStateChanged): Cleanup.

* platform/graphics/MediaPlayer.h:
(WTF::LogArgument<MediaTime>::toString):
(WTF::LogArgument<MediaTimeRange>::toString):

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Log error as time range.

Source/WTF:

* wtf/MediaTime.cpp:
(WTF::toJSONStringInternal): Extract guts of MediaTime::toJSONString to this static function
so it can be used by MediaTimeRange::toJSONString as well.
(WTF::MediaTime::toJSONString const):
(WTF::MediaTimeRange::toJSONString const):
* wtf/MediaTime.h:

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

18 months agoRebaseline tests after r231359.
ryanhaddad@apple.com [Fri, 4 May 2018 21:26:09 +0000 (21:26 +0000)]
Rebaseline tests after r231359.

Unreviewed test gardening.

* platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

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

18 months agoUpdate TestExpectations for media/video-aspect-ratio.html.
ryanhaddad@apple.com [Fri, 4 May 2018 21:26:06 +0000 (21:26 +0000)]
Update TestExpectations for media/video-aspect-ratio.html.
https://bugs.webkit.org/show_bug.cgi?id=184457

Unreviewed test gardening.

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

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

18 months agoUse the containing block to compute the pagination gap when the container is inline.
zalan@apple.com [Fri, 4 May 2018 21:15:09 +0000 (21:15 +0000)]
Use the containing block to compute the pagination gap when the container is inline.
https://bugs.webkit.org/show_bug.cgi?id=184724
<rdar://problem/39521800>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/overflow/page-overflow-with-inline-body-crash.html

* page/FrameView.cpp:
(WebCore::FrameView::applyPaginationToViewport):

LayoutTests:

* fast/overflow/page-overflow-with-inline-body-crash-expected.txt: Added.
* fast/overflow/page-overflow-with-inline-body-crash.html: Added.

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

18 months agoDon't use GSFont* in minimal simulator mode
timothy_horton@apple.com [Fri, 4 May 2018 20:54:46 +0000 (20:54 +0000)]
Don't use GSFont* in minimal simulator mode
https://bugs.webkit.org/show_bug.cgi?id=185320
<rdar://problem/39734478>

Reviewed by Beth Dakin.

* page/cocoa/MemoryReleaseCocoa.mm:
(WebCore::platformReleaseMemory):

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

18 months agoWeb Inspector: Styles: Newly added unsupported properties sometimes don't have warnings
nvasilyev@apple.com [Fri, 4 May 2018 20:51:47 +0000 (20:51 +0000)]
Web Inspector: Styles: Newly added unsupported properties sometimes don't have warnings
https://bugs.webkit.org/show_bug.cgi?id=183097
<rdar://problem/37843816>

Reviewed by Matt Baker.

Update status of properties warnings every time focus moves.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updatePropertiesStatus):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):

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

18 months ago[iOS] Apps that are not visible may not get suspended if they trigger page loads...
cdumez@apple.com [Fri, 4 May 2018 20:48:23 +0000 (20:48 +0000)]
[iOS] Apps that are not visible may not get suspended if they trigger page loads while in the background
https://bugs.webkit.org/show_bug.cgi?id=185318

Reviewed by Geoffrey Garen.

Whenever there is a page load going on, we take a background process assertion to delay process
suspension until this load completes. However, there is also a 3 seconds grace period after
a load is complete to allow the app to trigger a new load shortly after. This grace period was
introduced to support use cases where a visible app does loads in an offscreen view. However,
it can be abused by apps running in the background as they could trigger new page loads while
in the background to delay process suspension. This patch tightens the policy so that only
apps that are currently visible get to use this grace period. Apps that are in the background
get to finish their current load and will then get suspended.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::didChangeIsLoading):

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

18 months agoisCacheableArrayLength should return true for undecided arrays
keith_miller@apple.com [Fri, 4 May 2018 20:47:57 +0000 (20:47 +0000)]
isCacheableArrayLength should return true for undecided arrays
https://bugs.webkit.org/show_bug.cgi?id=185309

Reviewed by Michael Saboff.

JSTests:

* stress/get-array-length-undecided.js: Added.
(test):

Source/JavaScriptCore:

Undecided arrays have butterflies so there is no reason why we
should not be able to cache their length.

* bytecode/InlineAccess.cpp:
(JSC::InlineAccess::isCacheableArrayLength):

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

18 months agoAdjust sandbox profile for simulator.
pvollan@apple.com [Fri, 4 May 2018 20:44:36 +0000 (20:44 +0000)]
Adjust sandbox profile for simulator.
https://bugs.webkit.org/show_bug.cgi?id=185319

Reviewed by Brent Fulgham.

Disable Kerberos rules, as well as rules related to NSApplication initialization.

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

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

18 months agoTest262-Runner: Add base module to the local deps - unicore/PVA.pl
commit-queue@webkit.org [Fri, 4 May 2018 20:40:24 +0000 (20:40 +0000)]
Test262-Runner: Add base module to the local deps - unicore/PVA.pl
https://bugs.webkit.org/show_bug.cgi?id=185314

Patch by Leo Balter <leonardo.balter@gmail.com> on 2018-05-04
Reviewed by Michael Saboff.

* Scripts/test262/local/lib/perl5/unicore/PVA.pl: Added.

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

18 months agoWeb Inspector: Styles Redesign: ensure that tabbing through the last section wraps...
webkit@devinrousso.com [Fri, 4 May 2018 20:29:24 +0000 (20:29 +0000)]
Web Inspector: Styles Redesign: ensure that tabbing through the last section wraps back to the first
https://bugs.webkit.org/show_bug.cgi?id=181973

Reviewed by Matt Baker.

Unified delegate functions to start editing previous/next rules into a single function for
simplicity.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorStartEditingAdjacentRule):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationEditorStartEditingAdjacentRule): Deleted.

* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.focusFirstSection):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.focusLastSection):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionStartEditingAdjacentRule):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingNextRule): Deleted.
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingPreviousRule): Deleted.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.styleDetailsPanelFocusLastPseudoClassCheckbox):
(WI.GeneralStyleDetailsSidebarPanel.prototype.styleDetailsPanelFocusFilterBar):
(WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleForcedPseudoClassCheckboxKeydown):
(WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleFilterBarInputFieldKeyDown):

Drive-by fix: provide tabbing support for the Computed styles panel.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WI.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey.switchRule):
(WI.CSSStyleDeclarationTextEditor.prototype._handleTabKey.switchRule):

* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.focusFirstSection):
(WI.ComputedStyleDetailsPanel.prototype.focusLastSection):
(WI.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorStartEditingAdjacentRule):

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

18 months agoWasted time dlopening Lookup when tearing down a WKWebView
timothy_horton@apple.com [Fri, 4 May 2018 19:42:40 +0000 (19:42 +0000)]
Wasted time dlopening Lookup when tearing down a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=185310
<rdar://problem/39934085>

Reviewed by Wenson Hsieh.

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKWindowVisibilityObserver dealloc]):
(-[WKWindowVisibilityObserver startObservingLookupDismissalIfNeeded]):
(WebKit::WebViewImpl::prepareForDictionaryLookup):
(-[WKWindowVisibilityObserver startObservingLookupDismissal]): Deleted.
Avoid un-registering as a Lookup dismissal observer if we never
registered in the first place, because that involves dlopening Lookup.

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

18 months agoAllow Web Touch events to timeout
megan_gardner@apple.com [Fri, 4 May 2018 19:16:40 +0000 (19:16 +0000)]
Allow Web Touch events to timeout
https://bugs.webkit.org/show_bug.cgi?id=185282
<rdar://problem/38728319>

Reviewed by Tim Horton.

Web Touch events currently never time out, which blocks the user from interacting with the UI Process at all.
We should allow these events to time out so that the user can interact with the rest of the UI.

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

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

18 months agoREGRESSION: [ios-simulator] 3 WKWebViewAutofillTests API test failures seen with...
commit-queue@webkit.org [Fri, 4 May 2018 18:52:47 +0000 (18:52 +0000)]
REGRESSION: [ios-simulator] 3 WKWebViewAutofillTests API test failures seen with 11.3 SDK
https://bugs.webkit.org/show_bug.cgi?id=184196
<rdar://problem/39054481>

Patch by Wenson Hsieh <whsieh@berkeley.edu> on 2018-05-04
Reviewed by Tim Horton.

Source/WebKit:

Remove an unnecessary call to NSClassFromString, now that trunk WebKit only supports iOS 11.3+.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertTextSuggestion:]):

Tools:

Removes some unnecessary workarounds to enable running app autofill tests against iOS versions
earlier than 11.3. Also re-enables these tests.

* TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
(TestWebKitAPI::TEST):
(-[UITextAutofillSuggestion initWithUsername:password:]): Deleted.
(+[UITextAutofillSuggestion autofillSuggestionWithUsername:password:]): Deleted.

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

18 months agoWeb Inspector: Canvas tab: Determine isFunction by looking at the prototype
webkit@devinrousso.com [Fri, 4 May 2018 18:50:30 +0000 (18:50 +0000)]
Web Inspector: Canvas tab: Determine isFunction by looking at the prototype
https://bugs.webkit.org/show_bug.cgi?id=184990

Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Models/RecordingAction.js:
(WI.RecordingAction.isFunctionForType):
(WI.RecordingAction._prototypeForType):
(WI.RecordingAction.prototype.async.swizzle):

LayoutTests:

* inspector/canvas/recording-2d-expected.txt:

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

18 months agoUnreviewed, rolling out r231331.
cdumez@apple.com [Fri, 4 May 2018 18:44:47 +0000 (18:44 +0000)]
Unreviewed, rolling out r231331.

Caused a few tests to assert

Reverted changeset:

"Stop using an iframe's id as fallback if its name attribute
is not set"
https://bugs.webkit.org/show_bug.cgi?id=11388
https://trac.webkit.org/changeset/231331

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

18 months agoUse more references in updateTracksOfType
youenn@apple.com [Fri, 4 May 2018 18:37:19 +0000 (18:37 +0000)]
Use more references in updateTracksOfType
https://bugs.webkit.org/show_bug.cgi?id=185305

Reviewed by Eric Carlson.

No change of behavior.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::updateTracksOfType):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

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

18 months agoNetworkProcessProxy::didReceiveAuthenticationChallenge should take an AuthenticationC...
youenn@apple.com [Fri, 4 May 2018 18:35:59 +0000 (18:35 +0000)]
NetworkProcessProxy::didReceiveAuthenticationChallenge should take an AuthenticationChallenge r-value
https://bugs.webkit.org/show_bug.cgi?id=185302

Reviewed by Geoffrey Garen.

Pass AuthenticationChallenge as an r-value since it comes from IPC.
No change of behavior.

* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
* UIProcess/Authentication/AuthenticationChallengeProxy.h:
(WebKit::AuthenticationChallengeProxy::create):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
* UIProcess/Network/NetworkProcessProxy.h:

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

18 months agoMark http/tests/contentextensions/make-https.html as flaky.
ryanhaddad@apple.com [Fri, 4 May 2018 18:01:21 +0000 (18:01 +0000)]
Mark http/tests/contentextensions/make-https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=184476

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

18 months agoMark media/navigate-with-pip-should-not-crash.html as flaky.
ryanhaddad@apple.com [Fri, 4 May 2018 18:01:18 +0000 (18:01 +0000)]
Mark media/navigate-with-pip-should-not-crash.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173119

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

18 months agoDisable tests on systems with limited memory
commit-queue@webkit.org [Fri, 4 May 2018 17:46:47 +0000 (17:46 +0000)]
Disable tests on systems with limited memory
https://bugs.webkit.org/show_bug.cgi?id=185296

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-05-04
Reviewed by Saam Barati.

Test doesn't work with a limited amount of memory. I tried to reduce memory usage
but then it was hard to reproduce the failure the test was originally made to test.

* stress/array-reverse-doesnt-clobber.js:

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

18 months agoText shaping in the simple path is flipped in the y direction
mmaxfield@apple.com [Fri, 4 May 2018 17:38:54 +0000 (17:38 +0000)]
Text shaping in the simple path is flipped in the y direction
https://bugs.webkit.org/show_bug.cgi?id=185062
<rdar://problem/39778678>

Reviewed by Simon Fraser.

Source/WebCore:

Shaping in our simple codepath occurs in an "increasing-y-goes-up" coordinate system, but our painting
code uses an "increasing-y-goes-down" coordinate system. We weren't fixing up the coordinate systems
because we never noticed. This is because the simple codepath is only designed for kerning and ligatures,
neither of which move glyphs vertically in the common case.

Test: fast/text/vertical-displacement-simple-codepath.html

* platform/graphics/Font.cpp:
(WebCore::Font::applyTransforms const):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyFontTransforms):

Tools:

Huge thanks to Ulrike Rausch of LiebeFonts for contributing the test fonts!!!

* Scripts/webkitpy/common/config/contributors.json:

LayoutTests:

This test renders a font which uses our fast text codepath but also includes vertical
displacements inside its liga feature. The test makes sure that the vertical displacement
occurs in the correct direction.

The test fonts were created by Ulrike Rausch of LiebeFonts specifically for the purpose
of testing. Huge thanks to her!! Figuring out this bug would not have been possible if
not for her huge help!

* fast/text/resources/LiebeTest-calt.woff: Added.
* fast/text/resources/LiebeTest-dlig.woff: Added.
* fast/text/resources/LiebeTest-liga.woff: Added.
* fast/text/resources/LiebeTest-swsh.woff: Added.
* fast/text/vertical-displacement-simple-codepath-expected.html: Added.
* fast/text/vertical-displacement-simple-codepath.html: Added.

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

18 months agoTest262-Runner: place the processCLI inside the main call
commit-queue@webkit.org [Fri, 4 May 2018 17:36:34 +0000 (17:36 +0000)]
Test262-Runner: place the processCLI inside the main call
https://bugs.webkit.org/show_bug.cgi?id=185304

Patch by Leo Balter <leonardo.balter@gmail.com> on 2018-05-04
Reviewed by Michael Saboff.

* Scripts/test262/Runner.pm:
(main):

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

18 months agoSerialize all URLs with double-quotes per CSSOM spec
commit-queue@webkit.org [Fri, 4 May 2018 17:32:48 +0000 (17:32 +0000)]
Serialize all URLs with double-quotes per CSSOM spec
https://bugs.webkit.org/show_bug.cgi?id=184935

Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-04
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Update expectations for using double quotes when serializing URLs.

* web-platform-tests/cssom/serialize-values-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

Source/WebCore:

According to https://drafts.csswg.org/cssom/#serialize-a-url, all URLs should be serialized as strings,
which means they should have double quotes around the text of the URL. Update our implementation to match
this (and Firefox/Chrome). Also remove isCSSTokenizerURL() as this method is no longer needed.

Tests: Many LayoutTests updated to use double quotes.

* css/CSSMarkup.cpp:
(WebCore::serializeString): Remove FIXME as this was already fixed in a previous patch.
(WebCore::serializeURL): Remove FIXME and update implementation.

LayoutTests:

Update tests to use double quotes when serializing URLs, and fixes for using double quotes in the test.

* css3/calc/cross-fade-calc.html:
* css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt:
* css3/filters/backdrop/backdropfilter-property-computed-style.html:
* css3/filters/backdrop/backdropfilter-property-parsing-expected.txt:
* css3/filters/backdrop/backdropfilter-property-parsing.html:
* css3/filters/filter-property-computed-style-expected.txt:
* css3/filters/filter-property-computed-style.html:
* css3/filters/filter-property-expected.txt:
* css3/filters/filter-property-parsing-expected.txt:
* css3/filters/filter-property-parsing.html:
* css3/filters/filter-property.html:
* css3/filters/unprefixed-expected.txt:
* css3/filters/unprefixed.html:
* fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt:
* fast/backgrounds/background-shorthand-after-set-backgroundSize.html:
* fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt:
* fast/backgrounds/background-shorthand-with-backgroundSize-style.html:
* fast/backgrounds/multiple-backgrounds-computed-style-expected.txt:
* fast/backgrounds/multiple-backgrounds-computed-style.html:
* fast/css/background-position-serialize-expected.txt:
* fast/css/cursor-parsing-expected.txt:
* fast/css/cursor-parsing-image-set-expected.txt:
* fast/css/cursor-parsing-image-set.html:
* fast/css/cursor-parsing.html:
* fast/css/getComputedStyle/computed-style-border-image-expected.txt:
* fast/css/getComputedStyle/computed-style-border-image.html:
* fast/css/getComputedStyle/computed-style-cross-fade-expected.txt:
* fast/css/getComputedStyle/computed-style-cross-fade.html:
* fast/css/getComputedStyle/computed-style-properties-expected.txt:
* fast/css/getComputedStyle/computed-style-properties.html:
* fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-background-shorthand.html:
* fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html:
* fast/css/image-set-parsing.html:
* fast/css/image-set-setting-expected.txt:
* fast/css/image-set-setting.html:
* fast/css/image-set-unprefixed-expected.txt:
* fast/css/image-set-unprefixed.html:
* fast/css/invalid-cursor-property-crash.html:
* fast/css/parse-border-image-repeat-null-crash-expected.txt:
* fast/css/uri-token-parsing-expected.txt:
* fast/css/uri-token-parsing.html:
* fast/css/url-with-multi-byte-unicode-escape-expected.txt:
* fast/css/url-with-multi-byte-unicode-escape.html:
* fast/filter-image/parse-filter-image-expected.txt:
* fast/filter-image/parse-filter-image.html:
* fast/innerHTML/innerHTML-uri-resolution.html:
* fast/inspector-support/cssURLQuotes-expected.txt:
* fast/inspector-support/cssURLQuotes.html:
* fast/masking/parsing-clip-path-iri-expected.txt:
* fast/masking/parsing-clip-path-iri.html:
* fast/masking/parsing-mask-expected.txt:
* fast/masking/parsing-mask.html:
* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-shape-outside.html:
* fast/shapes/parsing/parsing-test-utils.js:
(removeBaseURL):
* platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
* platform/ios/fast/css/image-set-unprefixed-expected.txt: Removed.
* platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
* platform/win/fast/css/parse-border-image-repeat-null-crash-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
* resources/image-preload-helper.js:
(preloadImagesFromStyle):
* svg/css/svg-attribute-parser-mode-expected.txt:
* svg/css/svg-attribute-parser-mode.html:
* svg/custom/marker-getPropertyValue-expected.txt:
* svg/custom/marker-getPropertyValue.svg:

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

18 months agoLayoutTests/fast/mediastream/change-tracks-media-stream-being-played.html is crashing...
youenn@apple.com [Fri, 4 May 2018 17:24:08 +0000 (17:24 +0000)]
LayoutTests/fast/mediastream/change-tracks-media-stream-being-played.html is crashing after r231304
https://bugs.webkit.org/show_bug.cgi?id=185303

Reviewed by Eric Carlson.

We need to stop observing the audio track like we do for video track once we are no longer interested in it.
Covered by test no longer crashing.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

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

18 months agoImprove test at media/modern-media-controls/airplay-button/airplay-button-on.html...
commit-queue@webkit.org [Fri, 4 May 2018 17:21:21 +0000 (17:21 +0000)]
Improve test at media/modern-media-controls/airplay-button/airplay-button-on.html to not hardcode the -apple-wireless-playback-target-active color
https://bugs.webkit.org/show_bug.cgi?id=185297
<rdar://problem/39737716>

Patch by Antoine Quint <graouts@apple.com> on 2018-05-04
Reviewed by Dean Jackson.

Create an element and set its "color" property to "-apple-wireless-playback-target-active" so we can use
getComputedStyle() to query the applied value instead of hard-coding the expected color.

* media/modern-media-controls/airplay-button/airplay-button-on.html:

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

18 months agoAssertion failure in NetworkStorageSession::setCookie: privilege of UI process is...
commit-queue@webkit.org [Fri, 4 May 2018 16:51:16 +0000 (16:51 +0000)]
Assertion failure in NetworkStorageSession::setCookie: privilege of UI process is not set
https://bugs.webkit.org/show_bug.cgi?id=185262

Patch by Sihui Liu <sihui_liu@apple.com> on 2018-05-04
Reviewed by Chris Dumez.

Fix an assertion failure by setting UI process privileges in constructor of WebsiteDataStore
because UI process may use the cookie API before creating a WebView.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):

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

18 months ago[LFC] Set the invalidation root as the result of style change.
zalan@apple.com [Fri, 4 May 2018 16:30:27 +0000 (16:30 +0000)]
[LFC] Set the invalidation root as the result of style change.
https://bugs.webkit.org/show_bug.cgi?id=185301

Reviewed by Antti Koivisto.

Compute/propagate the update type on the ancestor chain and return the invalidation root
so that LayoutContext could use it as the entry point for the next layout frame.

* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::updateLayout):
(WebCore::Layout::LayoutContext::styleChanged):
* layout/LayoutContext.h: order is not important.
* layout/blockformatting/BlockInvalidation.cpp:
(WebCore::Layout::invalidationStopsAtFormattingContextBoundary):
(WebCore::Layout::computeUpdateType):
(WebCore::Layout::computeUpdateTypeForAncestor):
(WebCore::Layout::BlockInvalidation::invalidate):
* layout/blockformatting/BlockInvalidation.h:
* layout/inlineformatting/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::invalidate):
* layout/inlineformatting/InlineInvalidation.h:

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

18 months agoAdjust sandbox rules for simulator.
pvollan@apple.com [Fri, 4 May 2018 16:15:12 +0000 (16:15 +0000)]
Adjust sandbox rules for simulator.
https://bugs.webkit.org/show_bug.cgi?id=185275

Reviewed by Brent Fulgham.

Enable rules related to CoreMedia for minimal simulator.

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

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

18 months agoOptionsSet initializer list constructor should be constexpr
antti@apple.com [Fri, 4 May 2018 15:35:29 +0000 (15:35 +0000)]
OptionsSet initializer list constructor should be constexpr
https://bugs.webkit.org/show_bug.cgi?id=185298

Reviewed by Anders Carlsson.

* wtf/OptionSet.h:
(WTF::OptionSet::OptionSet):

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