WebKit-https.git
13 months agofullscreen env() variables should have initial values
dino@apple.com [Mon, 23 Jul 2018 16:53:54 +0000 (16:53 +0000)]
fullscreen env() variables should have initial values
https://bugs.webkit.org/show_bug.cgi?id=187897
<rdar://problem/42485682>

Reviewed by Sam Weinig.

Source/WebCore:

The env() values for fullscreen properties need to be
initialized, rather than wait for values to be set from WebKit.
Without this, feature detection doesn't work, and properties
won't parse correctly.

Test: fullscreen/fullscreen-env-initial.html

* dom/ConstantPropertyMap.cpp:
(WebCore::ConstantPropertyMap::buildValues): Initialize the fullscreen values.
(WebCore::ConstantPropertyMap::updateConstantsForFullscreen): Renamed function, because it
also updates the duration value.
(WebCore::ConstantPropertyMap::didChangeFullscreenInsets): Call new name.
(WebCore::ConstantPropertyMap::updateConstantsForFullscreenInsets): Deleted.
* dom/ConstantPropertyMap.h:
* page/Page.cpp:
(WebCore::Page::setFullscreenAutoHideDuration): Don't change the value if it doesn't need it.
* page/Page.h: Add accessor for fullscreenAutoHideDuration. Also add a member variable.
(WebCore::Page::fullscreenAutoHideDuration const):

LayoutTests:

* fullscreen/fullscreen-env-initial-expected.html: Added.
* fullscreen/fullscreen-env-initial.html: Added.

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

13 months agoUnreviewed, fix no-JIT build.
fpizlo@apple.com [Mon, 23 Jul 2018 16:13:40 +0000 (16:13 +0000)]
Unreviewed, fix no-JIT build.

* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeUnconditionally):
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor):
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
* bytecode/InByIdStatus.cpp:
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeForStubInfo):

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

13 months agoUnreviewed, rolling out r233030.
commit-queue@webkit.org [Mon, 23 Jul 2018 14:12:37 +0000 (14:12 +0000)]
Unreviewed, rolling out r233030.
https://bugs.webkit.org/show_bug.cgi?id=187904

Broke tarball builds (Requested by mcatanzaro on #webkit).

Reverted changeset:

"run-gtk-tests (glib/common.py) cannot determine build
directory when webKitBranchBuild=true"
https://bugs.webkit.org/show_bug.cgi?id=185643
https://trac.webkit.org/changeset/233030

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

13 months agoWeb Inspector: Dark Mode: remove odd-looking top border
nvasilyev@apple.com [Mon, 23 Jul 2018 00:40:26 +0000 (00:40 +0000)]
Web Inspector: Dark Mode: remove odd-looking top border
https://bugs.webkit.org/show_bug.cgi?id=187885

Reviewed by Matt Baker.

This border doesn't exist in the light mode, and it shouldn't be in the dark mode either.

* UserInterface/Views/DarkMode.css:
(@media (prefers-dark-interface)):
(body .toolbar):

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

13 months ago[LFC][IFC] Add center/right/justify line alignment support.
zalan@apple.com [Sun, 22 Jul 2018 19:48:21 +0000 (19:48 +0000)]
[LFC][IFC] Add center/right/justify line alignment support.
https://bugs.webkit.org/show_bug.cgi?id=187890

Reviewed by Antti Koivisto.

Move over some more code from simple line layout.
(though text-align: justify is more preformant as now expansion opportunities are added as we process the text runs
-as opposed to iterting through the runs again when we reach the end of the line.)

* layout/inlineformatting/textlayout/Runs.h:
(WebCore::Layout::LayoutRun::setLeft):
(WebCore::Layout::LayoutRun::setExpansion):
* layout/inlineformatting/textlayout/simple/SimpleLineBreaker.cpp:
(WebCore::Layout::SimpleLineBreaker::Line::Line):
(WebCore::Layout::SimpleLineBreaker::Line::setTextAlign):
(WebCore::Layout::SimpleLineBreaker::Line::adjustedLeftForTextAlign const):
(WebCore::Layout::SimpleLineBreaker::Line::justifyRuns):
(WebCore::Layout::SimpleLineBreaker::Line::adjustRunsForTextAlign):
(WebCore::Layout::expansionOpportunity):
(WebCore::Layout::expansionBehavior):
(WebCore::Layout::SimpleLineBreaker::Line::collectExpansionOpportunities):
(WebCore::Layout::SimpleLineBreaker::Line::closeLastRun):
(WebCore::Layout::SimpleLineBreaker::Line::append):
(WebCore::Layout::SimpleLineBreaker::Line::collapseTrailingWhitespace):
(WebCore::Layout::SimpleLineBreaker::Line::reset):
(WebCore::Layout::SimpleLineBreaker::Style::Style):
(WebCore::Layout::SimpleLineBreaker::handleLineEnd):
(WebCore::Layout::SimpleLineBreaker::handleLineStart):
(WebCore::Layout::isTextAlignRight):
(WebCore::Layout::SimpleLineBreaker::createRunsForLine):
* layout/inlineformatting/textlayout/simple/SimpleLineBreaker.h:
(WebCore::Layout::SimpleLineBreaker::Line::setAvailableWidth):
(WebCore::Layout::SimpleLineBreaker::Line::setCollapseWhitespace):

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

13 months ago[JSC] GetByIdVariant and InByIdVariant do not need slot base if they are not "hit...
utatane.tea@gmail.com [Sun, 22 Jul 2018 19:24:34 +0000 (19:24 +0000)]
[JSC] GetByIdVariant and InByIdVariant do not need slot base if they are not "hit" variants
https://bugs.webkit.org/show_bug.cgi?id=187891

Reviewed by Saam Barati.

JSTests:

* stress/in-miss-variant-merge.js: Added.
(shouldBe):
(test):
* stress/miss-variant-merge.js: Added.
(shouldBe):
(test):

Source/JavaScriptCore:

When merging GetByIdVariant and InByIdVariant, we accidentally make merging failed if
two variants are mergeable but they have "Miss" status. We make merging failed if
the merged OPCSet says hasOneSlotBaseCondition() is false. But it is only reasonable
if the variant has "Hit" status. This bug is revealed when we introduce CreateThis in FTL,
which patch have more chances to merge variants.

This patch fixes this issue by checking `!isPropertyUnset()` / `isHit()`. PutByIdVariant
is not related since it does not use this check in Transition case.

* bytecode/GetByIdVariant.cpp:
(JSC::GetByIdVariant::attemptToMerge):
* bytecode/InByIdVariant.cpp:
(JSC::InByIdVariant::attemptToMerge):

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

13 months ago[DFG] Fold GetByVal if the indexed value is non configurable and non writable
utatane.tea@gmail.com [Sun, 22 Jul 2018 16:54:38 +0000 (16:54 +0000)]
[DFG] Fold GetByVal if the indexed value is non configurable and non writable
https://bugs.webkit.org/show_bug.cgi?id=186462

Reviewed by Saam Barati.

JSTests:

* stress/folding-get-by-val-with-read-only-dont-delete-object.js: Added.
(shouldBe):
(test1):
(test2):
(test3):
(test4):
(test5):
* stress/folding-get-by-val-with-read-only-dont-delete-runtime-array.js: Added.
(shouldBe):
(test1):
(test2):
(test5):
* stress/folding-get-by-val-with-read-only-dont-delete.js: Added.
(shouldBe):
(test1):
(test2):
(test3):
(test4):
(test5):

Source/JavaScriptCore:

Non-special DontDelete | ReadOnly properties mean that it won't be changed. If DFG AI can retrieve this
property, AI can fold it into a constant. This type of property can be seen when we use ES6 tagged templates.
Tagged templates' callsite includes indexed properties whose attributes are DontDelete | ReadOnly.

This patch attempts to fold such properties into constant in DFG AI. The challenge is that DFG AI runs
concurrently with the mutator thread. In this patch, we insert WTF::storeStoreFence between value setting
and attributes setting. The attributes must be set after the corresponding value is set. If the loaded
attributes (with WTF::loadLoadFence) include DontDelete | ReadOnly, it means the given value won't be
changed and we can safely use it. We arrange our existing code to use this protocol.

Since GetByVal folding requires the correct Structure & Butterfly pairs, it is only enabled in x86 architecture
since it is TSO. So, our WTF::storeStoreFence in SparseArrayValueMap is also emitted only in x86.

This patch improves SixSpeed/template_string_tag.es6.

                                  baseline                  patched

template_string_tag.es6      237.0301+-4.8374     ^      9.8779+-0.3628        ^ definitely 23.9960x faster

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* runtime/JSArray.cpp:
(JSC::JSArray::setLengthWithArrayStorage):
* runtime/JSObject.cpp:
(JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
(JSC::JSObject::deletePropertyByIndex):
(JSC::JSObject::getOwnPropertyNames):
(JSC::putIndexedDescriptor):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::putIndexedDescriptor): Deleted.
* runtime/JSObject.h:
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::SparseArrayValueMap):
(JSC::SparseArrayValueMap::add):
(JSC::SparseArrayValueMap::putDirect):
(JSC::SparseArrayValueMap::getConcurrently):
(JSC::SparseArrayEntry::get const):
(JSC::SparseArrayEntry::getConcurrently const):
(JSC::SparseArrayEntry::put):
(JSC::SparseArrayEntry::getNonSparseMode const):
(JSC::SparseArrayValueMap::visitChildren):
(JSC::SparseArrayValueMap::~SparseArrayValueMap): Deleted.
* runtime/SparseArrayValueMap.h:
(JSC::SparseArrayEntry::SparseArrayEntry):
(JSC::SparseArrayEntry::attributes const):
(JSC::SparseArrayEntry::forceSet):
(JSC::SparseArrayEntry::asValue):

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

13 months agoFix lldb summarizers for HashMaps and HashSets
simon.fraser@apple.com [Sun, 22 Jul 2018 04:56:33 +0000 (04:56 +0000)]
Fix lldb summarizers for HashMaps and HashSets
https://bugs.webkit.org/show_bug.cgi?id=187883

Reviewed by Dan Bates.

HashMap and HashSet summarizers were broken in various ways.

The 'type summary add -x' regexp needs to match at the start and end of the string
to avoid finding types nested inside other templates.

The HashTable synthetic child code incorrectly used the type of the key, rather than
the value when synthesizing children.

Add HashMap and HashSet summarizers.

I tried to get synthetic children working directly for HashMap and HashSet, but was unable.

* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit.py:
(__lldb_init_module):
(__lldb_init_module.lldb_webkit):
(WTFHashMap_SummaryProvider):
(WTFHashSet_SummaryProvider):
(WebCoreColorProvider._to_string_extended):
(WebCoreURLProvider.to_string):
(WTFHashMapProvider):
(WTFHashMapProvider.__init__):
(WTFHashMapProvider.tableSize):
(WTFHashMapProvider.keyCount):
(WTFHashSetProvider):
(WTFHashSetProvider.__init__):
(WTFHashSetProvider.tableSize):
(WTFHashSetProvider.keyCount):
(WTFHashTableProvider.tableSize):
(WTFHashTableProvider):
(WTFHashTableProvider.keyCount):
(WTFHashTableProvider.get_child_at_index):
(WTFHashTableProvider.update):
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector):
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WTFHashMap_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashMap_of_vectors_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):

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

13 months agoAdd lldb formatters for WebCore geometry types
simon.fraser@apple.com [Sun, 22 Jul 2018 04:09:44 +0000 (04:09 +0000)]
Add lldb formatters for WebCore geometry types
https://bugs.webkit.org/show_bug.cgi?id=187884

Reviewed by Daniel Bates.

Add lldb formatters for IntPoint, IntSize, IntRect, FloatPoint, FloatSize, FloatRect
and LayoutRect.

Testing is blocked by webkit.org/b/187872.

* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit.py:
(__lldb_init_module.lldb_webkit):
(__lldb_init_module):
(WebCoreLayoutRect_SummaryProvider):
(WebCoreIntSize_SummaryProvider):
(WebCoreIntPoint_SummaryProvider):
(WebCoreFloatSize_SummaryProvider):
(WebCoreFloatPoint_SummaryProvider):
(WebCoreIntRect_SummaryProvider):
(WebCoreFloatRect_SummaryProvider):
(WebCoreLayoutRectProvider):
(WebCoreLayoutRectProvider.__init__):
(WebCoreLayoutRectProvider.get_x):
(WebCoreLayoutRectProvider.get_y):
(WebCoreLayoutRectProvider.get_width):
(WebCoreLayoutRectProvider.get_height):
(WebCoreIntPointProvider):
(WebCoreIntPointProvider.__init__):
(WebCoreIntPointProvider.get_x):
(WebCoreIntPointProvider.get_y):
(WebCoreIntSizeProvider):
(WebCoreIntSizeProvider.__init__):
(WebCoreIntSizeProvider.get_width):
(WebCoreIntSizeProvider.get_height):
(WebCoreIntRectProvider):
(WebCoreIntRectProvider.__init__):
(WebCoreIntRectProvider.get_x):
(WebCoreIntRectProvider.get_y):
(WebCoreIntRectProvider.get_width):
(WebCoreIntRectProvider.get_height):
(WebCoreFloatPointProvider):
(WebCoreFloatPointProvider.__init__):
(WebCoreFloatPointProvider.get_x):
(WebCoreFloatPointProvider.get_y):
(WebCoreFloatSizeProvider):
(WebCoreFloatSizeProvider.__init__):
(WebCoreFloatSizeProvider.get_width):
(WebCoreFloatSizeProvider.get_height):
(WebCoreFloatRectProvider):
(WebCoreFloatRectProvider.__init__):
(WebCoreFloatRectProvider.get_x):
(WebCoreFloatRectProvider.get_y):
(WebCoreFloatRectProvider.get_width):
(WebCoreFloatRectProvider.get_height):

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

13 months agoWe should support CreateThis in the FTL
fpizlo@apple.com [Sun, 22 Jul 2018 02:48:16 +0000 (02:48 +0000)]
We should support CreateThis in the FTL
https://bugs.webkit.org/show_bug.cgi?id=164904

Reviewed by Yusuke Suzuki.
JSTests:

* microbenchmarks/polyvariant-get-by-id-shorter-tower.js: Added.
(polyvariant):
(Foo.prototype.func):
(Foo):
(foo):
(Bar.prototype.func):
(Bar):
(bar):
* microbenchmarks/polyvariant-get-by-id-tower.js: Added.
(polyvariant):
(Foo.prototype.func):
(Foo):
(foo):
(Bar.prototype.func):
(Bar):
(bar):
(Baz.prototype.func):
(Baz):
(baz):

Source/JavaScriptCore:

This started with Saam's patch to implement CreateThis in the FTL, but turned into a type
inference adventure.

CreateThis in the FTL was a massive regression in raytrace because it disturbed that
benchmark's extremely perverse way of winning at type inference:

- The benchmark wanted polyvariant devirtualization of an object construction helper. But,
  the polyvariant profiler wasn't powerful enough to reliably devirtualize that code. So, the
  benchmark was falling back to other mechanisms...

- The construction helper could not tier up into the FTL. When the DFG compiled it, it would
  see that the IC had 4 cases. That's too polymorphic for the DFG. So, the DFG would emit a
  GetById. Shortly after the DFG compile, that get_by_id would see many more cases, but now
  that the helper was compiled by the DFG, the baseline get_by_id would not see those cases.
  The DFG's GetById would "hide" those cases. The number of cases the DFG's GetById would see
  is larger than our polymorphic list limit (limit = 8, case count = 13, I think).

  Note that if the FTL compiles that construction helper, it sees the 4 cases, turns them
  into a MultiGetByOffset, then suffers from exits when the new cases hit, and then exits to
  baseline, which then sees those cases. Luckily, the FTL was not compiling the construction
  helper because it had a CreateThis.

- Compilations that inlined the construction helper would have gotten super lucky with
  parse-time constant folding, so they knew what structure the input to the get_by_id would
  have at parse time. This is only profitable if the get_by_id parsing computed a
  GetByIdStatus that had a finite number of cases. Because the 13 cases were being hidden by
  the DFG GetById and GetByIdStatus would only look at the baseline get_by_id, which had 4
  cases, we would indeed get a finite number of cases. The parser would then prune those
  cases to just one - based on its knowledge of the structure - and that would result in that
  get_by_id being folded at parse time to a constant.

- The subsequent op_call would inline based on parse-time knowledge of that constant.

This patch comprehensively fixes these issues, as well as other issues that come up along the
way. The short version is that raytrace was revealing sloppiness in our use of profiling for
type inference. This patch fixes the sloppiness by vastly expanding *polyvariant* profiling,
i.e. the profiling that considers call context. I was encouraged to do this by the fact that
even the old version of polyvariant profiling was a speed-up on JetStream, ARES-6, and
Speedometer 2 (it's easy to measure since it's a runtime flag). So, it seemed worthwhile to
attack raytrace's problem as a shortcoming of polyvariant profiling.

- Polyvariant profiling now consults every DFG or FTL code block that participated in any
  subset of the inline stack that includes the IC we're profiling. For example, if we have
  an inline stack like foo->bar->baz, with baz on top, then we will consult DFG or FTL
  compilations for foo, bar, and baz. In foo, we'll look up foo->bar->baz; in bar we'll look
  up bar->baz; etc. This fixes two problems encountered in raytrace. First, it ensures that
  a DFG GetById cannot hide anything from the profiling of that get_by_id, since the
  polyvariant profiling code will always consult it. Second, it enables raytrace to benefit
  from polyvariant profling. Previously, the polyvariant profiler would only look at the
  previous DFG compilation of foo and look up foo->bar->baz. But that only works if DFG-foo
  had inlined bar and then baz. It may not have done that, because those calls could have
  required polyvariant profiling that was only available in the FTL.

- A particularly interesting case is when some IC in foo-baseline is also available in
  foo-DFG. This case is encountered by the polyvariant profiler as it walks the inline stack.
  In the case of gathering profiling for foo-FTL, the polyvariant profiler finds foo-DFG via
  the trivial case of no inline stack. This also means that if foo ever gets inlined, we will
  find foo-DFG or foo-FTL in the final case of polyvariant profiling. In those cases, we now
  merge the IC of foo-baseline and foo-DFG. This avoids lots of unnecessary recompilations,
  because it warns us of historical polymorphism. Historical polymorphism usually means
  future polymorphism. IC status code already had some merging functionality, but I needed to
  beef it up a lot to make this work right.

- Inlining an inline cache now preserves as much information as profiling. One challenge of
  polyvariant profiling is that the FTL compile for bar (that includes bar->baz) could have
  inlined an inline cache based on polyvariant profiling. So, when the FTL compile for foo
  (that includes foo->bar->baz) asks bar what it knows about that IC inside bar->baz, it will
  say "I don't have such an IC". At this point the DFG compilation that included that IC that
  gave us the information that we used to inline the IC is no longer alive. To keep us from
  losing the information we learned about the IC, there is now a RecordedStatuses data
  structure that preserves the statuses we use for inlining ICs. We also filter those
  statuses according to things we learn from AI. This further reduces the risk of information
  about an IC being forgotten.

- Exit profiling now considers whether or not an exit happened from inline code. This
  protects us in the case where the not-inlined version of an IC exited a lot because of
  polymorphism that doesn't exist in the inlined version. So, when using polyvariant
  profiling data, we consider only inlined exits.

- CallLinkInfo now records when it's repatched to the virtual call thunk. Previously, this
  would clear the CallLinkInfo, so CallLinkStatus would fall back to the lastSeenCallee. It's
  surprising that we've had this bug.

Altogether this patch is performance-neutral in run-jsc-benchmarks, except for speed-ups in
microbenchmarks and a compile time regression. Octane/deltablue speeds up by ~5%.
Octane/raytrace is regressed by a minuscule amount, which we could make up by implementing
prototype access folding in the bytecode parser and constant folder. That would require some
significant new logic in GetByIdStatus. That would also require a new benchmark - we want to
have a test that captures raytrace's behavior in the case that the parser cannot fold the
get_by_id.

This change is a 1.2% regression on V8Spider-CompileTime. That's a smaller regression than
recent compile time progressions, so I think that's an OK trade-off. Also, I would expect a
compile time regression anytime we fill in FTL coverage.

This is neutral on JetStream, ARES-6, and Speedometer2. JetStream agrees that deltablue
speeds up and that raytrace slows down, but these changes balance out and don't affect the
overall score. In ARES-6, it looks like individual tests have some significant 1-2% speed-ups
or slow-downs. Air-steady is definitely ~1.5% faster. Basic-worst is probably 2% slower (p ~
0.1, so it's not very certain). The JetStream, ARES-6, and Speedometer2 overall scores don't
see a significant difference. In all three cases the difference is <0.5% with a high p value,
with JetStream and Speedometer2 being insignificant infinitesimal speed-ups and ARES-6 being
an insignificant infinitesimal slow-down.

Oh, and this change means that the FTL now has 100% coverage of JavaScript. You could do an
eval in a for-in loop in a for-of loop inside a with block that uses try/catch for control
flow in a polymorphic constructor while having a bad time, and we'll still compile it.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* bytecode/ByValInfo.h:
* bytecode/BytecodeDumper.cpp:
(JSC::BytecodeDumper<Block>::printGetByIdCacheStatus):
(JSC::BytecodeDumper<Block>::printPutByIdCacheStatus):
(JSC::BytecodeDumper<Block>::printInByIdCacheStatus):
(JSC::BytecodeDumper<Block>::dumpCallLinkStatus):
(JSC::BytecodeDumper<CodeBlock>::dumpCallLinkStatus):
(JSC::BytecodeDumper<Block>::printCallOp):
(JSC::BytecodeDumper<Block>::dumpBytecode):
(JSC::BytecodeDumper<Block>::dumpBlock):
* bytecode/BytecodeDumper.h:
* bytecode/CallLinkInfo.h:
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeExitSiteData):
(JSC::CallLinkStatus::computeFromCallLinkInfo):
(JSC::CallLinkStatus::accountForExits):
(JSC::CallLinkStatus::finalize):
(JSC::CallLinkStatus::filter):
(JSC::CallLinkStatus::computeDFGStatuses): Deleted.
* bytecode/CallLinkStatus.h:
(JSC::CallLinkStatus::operator bool const):
(JSC::CallLinkStatus::operator! const): Deleted.
* bytecode/CallVariant.cpp:
(JSC::CallVariant::finalize):
(JSC::CallVariant::filter):
* bytecode/CallVariant.h:
(JSC::CallVariant::operator bool const):
(JSC::CallVariant::operator! const): Deleted.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::getICStatusMap):
(JSC::CodeBlock::resetJITData):
(JSC::CodeBlock::getStubInfoMap): Deleted.
(JSC::CodeBlock::getCallLinkInfoMap): Deleted.
(JSC::CodeBlock::getByValInfoMap): Deleted.
* bytecode/CodeBlock.h:
* bytecode/CodeOrigin.cpp:
(JSC::CodeOrigin::isApproximatelyEqualTo const):
(JSC::CodeOrigin::approximateHash const):
* bytecode/CodeOrigin.h:
(JSC::CodeOrigin::exitingInlineKind const):
* bytecode/DFGExitProfile.cpp:
(JSC::DFG::FrequentExitSite::dump const):
(JSC::DFG::ExitProfile::add):
* bytecode/DFGExitProfile.h:
(JSC::DFG::FrequentExitSite::FrequentExitSite):
(JSC::DFG::FrequentExitSite::operator== const):
(JSC::DFG::FrequentExitSite::subsumes const):
(JSC::DFG::FrequentExitSite::hash const):
(JSC::DFG::FrequentExitSite::inlineKind const):
(JSC::DFG::FrequentExitSite::withInlineKind const):
(JSC::DFG::QueryableExitProfile::hasExitSite const):
(JSC::DFG::QueryableExitProfile::hasExitSiteWithSpecificJITType const):
(JSC::DFG::QueryableExitProfile::hasExitSiteWithSpecificInlineKind const):
* bytecode/ExitFlag.cpp: Added.
(JSC::ExitFlag::dump const):
* bytecode/ExitFlag.h: Added.
(JSC::ExitFlag::ExitFlag):
(JSC::ExitFlag::operator| const):
(JSC::ExitFlag::operator|=):
(JSC::ExitFlag::operator& const):
(JSC::ExitFlag::operator&=):
(JSC::ExitFlag::operator bool const):
(JSC::ExitFlag::isSet const):
* bytecode/ExitingInlineKind.cpp: Added.
(WTF::printInternal):
* bytecode/ExitingInlineKind.h: Added.
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor):
(JSC::GetByIdStatus::computeForStubInfo):
(JSC::GetByIdStatus::slowVersion const):
(JSC::GetByIdStatus::markIfCheap):
(JSC::GetByIdStatus::finalize):
(JSC::GetByIdStatus::hasExitSite): Deleted.
* bytecode/GetByIdStatus.h:
* bytecode/GetByIdVariant.cpp:
(JSC::GetByIdVariant::markIfCheap):
(JSC::GetByIdVariant::finalize):
* bytecode/GetByIdVariant.h:
* bytecode/ICStatusMap.cpp: Added.
(JSC::ICStatusContext::get const):
(JSC::ICStatusContext::isInlined const):
(JSC::ICStatusContext::inlineKind const):
* bytecode/ICStatusMap.h: Added.
* bytecode/ICStatusUtils.cpp: Added.
(JSC::hasBadCacheExitSite):
* bytecode/ICStatusUtils.h:
* bytecode/InstanceOfStatus.cpp:
(JSC::InstanceOfStatus::computeFor):
* bytecode/InstanceOfStatus.h:
* bytecode/PolyProtoAccessChain.h:
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::hasExitSite):
(JSC::PutByIdStatus::computeFor):
(JSC::PutByIdStatus::slowVersion const):
(JSC::PutByIdStatus::markIfCheap):
(JSC::PutByIdStatus::finalize):
(JSC::PutByIdStatus::filter):
* bytecode/PutByIdStatus.h:
* bytecode/PutByIdVariant.cpp:
(JSC::PutByIdVariant::markIfCheap):
(JSC::PutByIdVariant::finalize):
* bytecode/PutByIdVariant.h:
(JSC::PutByIdVariant::structureSet const):
* bytecode/RecordedStatuses.cpp: Added.
(JSC::RecordedStatuses::operator=):
(JSC::RecordedStatuses::RecordedStatuses):
(JSC::RecordedStatuses::addCallLinkStatus):
(JSC::RecordedStatuses::addGetByIdStatus):
(JSC::RecordedStatuses::addPutByIdStatus):
(JSC::RecordedStatuses::markIfCheap):
(JSC::RecordedStatuses::finalizeWithoutDeleting):
(JSC::RecordedStatuses::finalize):
(JSC::RecordedStatuses::shrinkToFit):
* bytecode/RecordedStatuses.h: Added.
(JSC::RecordedStatuses::RecordedStatuses):
(JSC::RecordedStatuses::forEachVector):
* bytecode/StructureSet.cpp:
(JSC::StructureSet::markIfCheap const):
(JSC::StructureSet::isStillAlive const):
* bytecode/StructureSet.h:
* bytecode/TerminatedCodeOrigin.h: Added.
(JSC::TerminatedCodeOrigin::TerminatedCodeOrigin):
(JSC::TerminatedCodeOriginHashTranslator::hash):
(JSC::TerminatedCodeOriginHashTranslator::equal):
* bytecode/Watchpoint.cpp:
(WTF::printInternal):
* bytecode/Watchpoint.h:
* dfg/DFGAbstractInterpreter.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::filterICStatus):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::handleDOMJITGetter):
(JSC::DFG::ByteCodeParser::handleModuleNamespaceLoad):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::InlineStackEntry::~InlineStackEntry):
(JSC::DFG::ByteCodeParser::parse):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
* dfg/DFGCommonData.h:
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDesiredWatchpoints.h:
(JSC::DFG::SetPointerAdaptor::hasBeenInvalidated):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGMayExit.cpp:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasCallLinkStatus):
(JSC::DFG::Node::callLinkStatus):
(JSC::DFG::Node::hasGetByIdStatus):
(JSC::DFG::Node::getByIdStatus):
(JSC::DFG::Node::hasPutByIdStatus):
(JSC::DFG::Node::putByIdStatus):
* dfg/DFGNodeType.h:
* dfg/DFGOSRExitBase.cpp:
(JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSiteSlow):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::reallyAdd):
(JSC::DFG::Plan::checkLivenessAndVisitChildren):
(JSC::DFG::Plan::finalizeInGC):
* dfg/DFGPlan.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::removeDeadPlans):
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateThis):
(JSC::FTL::DFG::LowerDFGToB3::compileFilterICStatus):
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallStubRoutine::hasEdges const):
(JSC::PolymorphicCallStubRoutine::edges const):
* jit/PolymorphicCallStubRoutine.h:
* profiler/ProfilerBytecodeSequence.cpp:
(JSC::Profiler::BytecodeSequence::BytecodeSequence):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::initializeObjectAllocationProfile):
* runtime/Options.h:

Source/WTF:

* wtf/TinyPtrSet.h:
(WTF::TinyPtrSet::operator!= const):

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

13 months ago[LFC][IFC] Add verification for inline text runs.
zalan@apple.com [Sat, 21 Jul 2018 18:49:23 +0000 (18:49 +0000)]
[LFC][IFC] Add verification for inline text runs.
https://bugs.webkit.org/show_bug.cgi?id=187879

Reviewed by Antti Koivisto.

* layout/Verification.cpp:
(WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
(WebCore::Layout::verifyAndOutputSubtree):
(WebCore::Layout::outputMismatchingBoxInformationIfNeeded): Deleted.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout const):
* layout/inlineformatting/InlineFormattingState.h:
(WebCore::Layout::InlineFormattingState::addLayoutRuns):
(WebCore::Layout::InlineFormattingState::layoutRuns const):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::outputLayoutBox):
(WebCore::Layout::outputLayoutTree):
(WebCore::Layout::TreeBuilder::showLayoutTree):

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

13 months ago[LFC] Do not use virtual methods to construct floating/formatting states.
zalan@apple.com [Sat, 21 Jul 2018 18:47:01 +0000 (18:47 +0000)]
[LFC] Do not use virtual methods to construct floating/formatting states.
https://bugs.webkit.org/show_bug.cgi?id=187875

Reviewed by Antti Koivisto.

LayoutContext::establishedFormattingState() does not require FormattingContext anymore only the root of the context.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
* layout/FormattingContext.h:
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
(WebCore::Layout::LayoutContext::formattingStateForBox const):
(WebCore::Layout::LayoutContext::establishedFormattingState):
* layout/LayoutContext.h:
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
(WebCore::Layout::BlockFormattingContext::createFormattingState const): Deleted.
(WebCore::Layout::BlockFormattingContext::createOrFindFloatingState const): Deleted.
* layout/blockformatting/BlockFormattingContext.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::createFormattingState const): Deleted.
(WebCore::Layout::InlineFormattingContext::createOrFindFloatingState const): Deleted.
* layout/inlineformatting/InlineFormattingContext.h:

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

13 months ago[LFC][BFC] Do not collapse top/bottom margin with first/last inflow child from a...
zalan@apple.com [Sat, 21 Jul 2018 15:00:30 +0000 (15:00 +0000)]
[LFC][BFC] Do not collapse top/bottom margin with first/last inflow child from a non-block formatting context.
https://bugs.webkit.org/show_bug.cgi?id=187867

Reviewed by Antti Koivisto.

The box's top/bottom margin never collapses with a non-block inflow child.

* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::isMarginTopCollapsedWithSibling):
(WebCore::Layout::isMarginBottomCollapsedWithSibling):
(WebCore::Layout::isMarginTopCollapsedWithParent):
(WebCore::Layout::isMarginBottomCollapsedThrough):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginTopFromFirstChild):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginTop):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginTop):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginBottom):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginTop):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBottom):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginBottomFromLastChild):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginBottom):
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesBlockFormattingContextOnly const): <div style="overflow: hidden">foobar</div> establishes both inline and block formatting context (inline wins though).
* layout/layouttree/LayoutBox.h: establishesBlockFormattingContext() does not need to be virtual since we can determine it by looking at the box's style. -while in case
of inline formatting context, it is about the content.

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

13 months ago[JSC] Use Function / ScopedLambda / RecursableLambda instead of std::function
utatane.tea@gmail.com [Sat, 21 Jul 2018 13:10:43 +0000 (13:10 +0000)]
[JSC] Use Function / ScopedLambda / RecursableLambda instead of std::function
https://bugs.webkit.org/show_bug.cgi?id=187472

Reviewed by Mark Lam.

Source/JavaScriptCore:

std::function allocates memory from standard malloc instead of bmalloc. Instead of
using that, we should use WTF::{Function,ScopedLambda,RecursableLambda}.

This patch attempts to replace std::function with the above WTF function types.
If the function's lifetime can be the same to the stack, we can use ScopedLambda, which
is really efficient. Otherwise, we should use WTF::Function.
For recurring use cases, we can use RecursableLambda.

* assembler/MacroAssembler.cpp:
(JSC::stdFunctionCallback):
(JSC::MacroAssembler::probe):
* assembler/MacroAssembler.h:
* b3/air/AirDisassembler.cpp:
(JSC::B3::Air::Disassembler::dump):
* b3/air/AirDisassembler.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
(JSC::BytecodeGenerator::emitEnumeration):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::ForOfNode::emitBytecode):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::addSlowPathGeneratorLambda):
(JSC::DFG::SpeculativeJIT::compileMathIC):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* heap/HeapSnapshotBuilder.cpp:
(JSC::HeapSnapshotBuilder::json):
* heap/HeapSnapshotBuilder.h:
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::dump const):
* interpreter/StackVisitor.h:
* runtime/PromiseDeferredTimer.h:
* runtime/VM.cpp:
(JSC::VM::whenIdle):
(JSC::enableProfilerWithRespectToCount):
(JSC::disableProfilerWithRespectToCount):
* runtime/VM.h:
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::addDidPopListener):
* runtime/VMEntryScope.h:
* tools/HeapVerifier.cpp:
(JSC::HeapVerifier::verifyCellList):
(JSC::HeapVerifier::validateCell):
(JSC::HeapVerifier::validateJSCell):
* tools/HeapVerifier.h:

Source/WTF:

* wtf/ScopedLambda.h:
(WTF::ScopedLambda<ResultType):

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

13 months agoREGRESSION(r233925): Can't go into PiP twice
jer.noble@apple.com [Sat, 21 Jul 2018 03:50:46 +0000 (03:50 +0000)]
REGRESSION(r233925): Can't go into PiP twice
https://bugs.webkit.org/show_bug.cgi?id=187876
<rdar://problem/42444520>

Reviewed by Jon Lee.

We fail to enter PiP the second time because the video fullscreen interface no longer has a
model, and so gives a contentSize of 0x0. This happens because we disassociate the
interface from the model in didCleanupFullscreen. However, the interface and model can still
be re-used if they're kept alive by another client. We should delay disassociating the model
from the interface until just before the model is destroyed in removeClientForContext.

* UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenManagerProxy::removeClientForContext):
(WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen):

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

13 months agoResource Load Statistics: Enable basic functionality in experimental debug mode
wilander@apple.com [Sat, 21 Jul 2018 03:10:53 +0000 (03:10 +0000)]
Resource Load Statistics: Enable basic functionality in experimental debug mode
https://bugs.webkit.org/show_bug.cgi?id=187835
<rdar://problem/42408590>

Reviewed by Chris Dumez.

This patch makes the experimental ITP Debug Mode feature work, at least
Source/WebKit:

to a basic level. This means:
- Debug logging on the INFO level.
- Permanently treat 3rdpartytestwebkit.org as a prevalent resource.
- Support manual setting of a custom permanently prevalent resource through user
  defaults on Cocoa platforms.

* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler):
(WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
    Test infrastructure.
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
* UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm:
(WebKit::ResourceLoadStatisticsMemoryStore::registerUserDefaultsIfNeeded):
    Used to pick up custom set prevalent resource on Cocoa platforms (for debug mode).
* UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::isPrevalentDueToDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords):
    Now skips processing of debug mode prevalent resources so that they
    stay prevalent.
(WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
    Convenience function to make 3rdpartytestwebkit.org and any custom domain
    set through ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode()
    be prevalent resources.
(WebKit::ResourceLoadStatisticsMemoryStore::setResourceLoadStatisticsDebugMode):
(WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode):
    Sets a custom domain to always be treated as prevalent in debug mode.
(WebKit::ResourceLoadStatisticsMemoryStore::clear):
    Now makes sure 3rdpartytestwebkit.org and any custom domain set through
    ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode()
    are prevalent resources even after a clear of the store.
(WebKit::debugLogDomainsInBatches):
    We may have too many domain names to fit in a single log statement.
    This function logs them in batches of 50, if we have more than 50.
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookiePartitioning):
    Now makes use of debugLogDomainsInBatches() in debug mode.
* UIProcess/ResourceLoadStatisticsMemoryStore.h:
(WebKit::ResourceLoadStatisticsMemoryStore::isDebugModeEnabled const):
* UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
(WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk):
    Now accepts a non-empty memory store in debug mode. This is to support a
    pre-populated store with 3rdpartytestwebkit.org and any custom domain already
    set as prevalent.
(WebKit::ResourceLoadStatisticsPersistentStorage::setResourceLoadStatisticsDebugMode):
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

to a basic level. All of the changes to TestRunner are to support the
layout tests for the functionality.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsDebugMode):
(WTR::TestRunner::statisticsCallDidSetDebugModeCallback):
(WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode):
(WTR::TestRunner::statisticsCallDidSetPrevalentResourceForDebugModeCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsDebugMode):
(WTR::TestController::setStatisticsPrevalentResourceForDebugMode):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didSetStatisticsDebugMode):
(WTR::TestInvocation::didSetPrevalentResourceForDebugMode):
* WebKitTestRunner/TestInvocation.h:

LayoutTests:

to a basic level.

* http/tests/resourceLoadStatistics/enable-debug-mode-expected.txt: Added.
* http/tests/resourceLoadStatistics/enable-debug-mode.html: Added.
* http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-expected.txt: Added.
* http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode.html: Added.

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

13 months agoREGRESSION (r233974): Cannot close pip'd video; pops back into PiP.
jer.noble@apple.com [Sat, 21 Jul 2018 00:42:20 +0000 (00:42 +0000)]
REGRESSION (r233974): Cannot close pip'd video; pops back into PiP.
https://bugs.webkit.org/show_bug.cgi?id=187873

Reviewed by Jon Lee.

When the PIP machinery on Mac wants to close the PIP window (due to the close button being clicked), it does
not consult our -shouldClosePiP handler; it just tells us that we're going to close. So we never setup the
necessary state on the WebProcess side and still think that our "targetIsFullscreen". When we get the "stop"
action, just request exit fullscreen, but set up the _pipState to think we're already exiting (because we are).

* platform/mac/VideoFullscreenInterfaceMac.mm:
(-[WebVideoFullscreenInterfaceMacObjC pipActionStop:]):

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

13 months ago[ MacOS iOS ] Layout Test storage/indexeddb/modern/opendatabase-after-storage-crash...
sihui_liu@apple.com [Sat, 21 Jul 2018 00:41:44 +0000 (00:41 +0000)]
[ MacOS iOS ] Layout Test storage/indexeddb/modern/opendatabase-after-storage-crash.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187648
<rdar://problem/42405935>

Reviewed by Brady Eidson.

Make test wait until requests finish to get correct result, because indexedDB operations are asynchronous.

* storage/indexeddb/modern/opendatabase-after-storage-crash-expected.txt:
* storage/indexeddb/modern/opendatabase-after-storage-crash.html:

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

13 months agoWeb Inspector: Dark Mode: Layers tab background should be dark
nvasilyev@apple.com [Sat, 21 Jul 2018 00:30:09 +0000 (00:30 +0000)]
Web Inspector: Dark Mode: Layers tab background should be dark
https://bugs.webkit.org/show_bug.cgi?id=187660
<rdar://problem/42179616>

Reviewed by Brian Burg.

* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype.initialLayout):
* UserInterface/Views/Variables.css:
(:root):

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

13 months agoDFG AbstractInterpreter: CheckArray filters array modes for DirectArguments/ScopedArg...
msaboff@apple.com [Fri, 20 Jul 2018 23:48:16 +0000 (23:48 +0000)]
DFG AbstractInterpreter: CheckArray filters array modes for DirectArguments/ScopedArguments using only NonArray
https://bugs.webkit.org/show_bug.cgi?id=187827
rdar://problem/42146858

Reviewed by Saam Barati.

JSTests:

New regression tests.

* stress/direct-arguments-check-array.js: Added.
(setup.f2):
(setup):
(forOfArray):
(forOfArgs):
(callEveryOnArgs):
* stress/scoped-arguments-check-array.js: Added.
(setup.foo):
(setup.f2):
(setup):
(forOfArray):
(forOfArgs):
(callEveryOnArgs):

Source/JavaScriptCore:

When filtering array modes for DirectArguments or ScopedArguments, we need to allow for the possibility
that they can either be NonArray or NonArrayWithArrayStorage (aka ArrayStorageShape).
We can't end up with other shapes, Int32, Double, etc because GenericArguments sets
InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero which will cause us to go down a
putByIndex() path that doesn't change the shape.

* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::arrayModesThatPassFiltering const):

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

13 months agoSafari WebGL does not consistently provide correct GPU context on eGPU systems
commit-queue@webkit.org [Fri, 20 Jul 2018 23:43:01 +0000 (23:43 +0000)]
Safari WebGL does not consistently provide correct GPU context on eGPU systems
https://bugs.webkit.org/show_bug.cgi?id=187750
<rdar://problem/39531436>

Patch by Justin Fan <justin_fan@apple.com> on 2018-07-20
Reviewed by Dean Jackson.

Move GraphicsContext3DManager into its own class, and notify it when page/Chrome receives a
windowScreenDidChange message. Add a private data struct to track which hostWindow created each context.
Upon notification, Manager updates the contexts that match the hostWindow with the
provided displayID. Each context matches displayID to rendererID (set during process creation
if window server is blocked), which is matched to a virtual screen, and updates its GPU accordingly.

No new tests. This requires multiple GPUs or eGPUs, each with attached display(s), to test.

* WebCore.xcodeproj/project.pbxproj:
* page/Chrome.cpp:
(WebCore::Chrome::windowScreenDidChange): Now calls GraphicsContext3DManager::screenDidChange().
* platform/PlatformScreen.h:
* platform/ScreenProperties.h: Add rendererID to struct.
(WebCore::ScreenData::encode const):
(WebCore::ScreenData::decode):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsContext3DManager.cpp: Added (copied out of GraphicsContext3DCocoa.mm).
(WebCore::attachToAppleGraphicsControl):
(WebCore::hasMuxCapability):
(WebCore::hasMuxableGPU):
(WebCore::GraphicsContext3DManager::sharedManager):
(WebCore::displayWasReconfigured):
(WebCore::GraphicsContext3DManager::updateAllContexts):
(WebCore::GraphicsContext3DManager::screenDidChange):
(WebCore::GraphicsContext3DManager::addContext):
(WebCore::GraphicsContext3DManager::removeContext):
(WebCore::GraphicsContext3DManager::hostWindowForContext const):
(WebCore::GraphicsContext3DManager::addContextRequiringHighPerformance):
(WebCore::GraphicsContext3DManager::removeContextRequiringHighPerformance):
(WebCore::GraphicsContext3DManager::updateHighPerformanceState):
(WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):
(WebCore::GraphicsContext3DManager::recycleContextIfNecessary):
* platform/graphics/GraphicsContext3DManager.h: Added (copied out of GraphicsContext3DCocoa.mm).
(WebCore::GraphicsContext3DManager::hasTooManyContexts const):
(WebCore::GraphicsContext3DManager::GraphicsContext3DManager):
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::createShared):
(WebCore::identifyAndSetCurrentGPU): Now matches rendererIDs to determine virtual screen.
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::setContextVisibility):
(WebCore::GraphicsContext3D::simulateContextChanged):
(WebCore::GraphicsContext3D::screenDidChange):
(WebCore::attachToAppleGraphicsControl): Deleted.
(WebCore::hasMuxCapability): Deleted.
(WebCore::hasMuxableGPU): Deleted.
(WebCore::GraphicsContext3DManager::GraphicsContext3DManager): Deleted.
(WebCore::GraphicsContext3DManager::hasTooManyContexts const): Deleted.
(WebCore::manager): Deleted.
(WebCore::displayWasReconfigured): Deleted.
(WebCore::GraphicsContext3DManager::updateAllContexts): Deleted.
(WebCore::GraphicsContext3DManager::addContext): Deleted.
(WebCore::GraphicsContext3DManager::removeContext): Deleted.
(WebCore::GraphicsContext3DManager::addContextRequiringHighPerformance): Deleted.
(WebCore::GraphicsContext3DManager::removeContextRequiringHighPerformance): Deleted.
(WebCore::GraphicsContext3DManager::updateHighPerformanceState): Deleted.
(WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired): Deleted.
(WebCore::GraphicsContext3DManager::recycleContextIfNecessary): Deleted.
* platform/mac/PlatformScreenMac.mm: Provide a display's rendererID.
(WebCore::rendererIDForDisplayMask):
(WebCore::collectScreenProperties):
(WebCore::rendererIDForDisplay):
(WebCore::primaryRendererID):

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

13 months agoRemove completed animations from GraphicsLayer, thus avoiding excessive backing store...
simon.fraser@apple.com [Fri, 20 Jul 2018 23:33:39 +0000 (23:33 +0000)]
Remove completed animations from GraphicsLayer, thus avoiding excessive backing store allocation
https://bugs.webkit.org/show_bug.cgi?id=187844
rdar://problem/40387294

Reviewed by Dean Jackson.
Source/WebCore:

A keyframe animation which animates 3D transforms, and is fill-forwards, currently
leaves the GraphicsLayer in a state where it has a "running" animation. However, the
logic that computes animation extent in RenderLayerBacking::updateGeometry() only does
so for running or paused animations. GraphicsLayer then thinks that it has an active
transform animation with unknown extent, and refuses to detach its backing store.

This triggers excessive layer creation on some sites (e.g. https://www.kqed.org).

Fix by always removing animations from the GraphicsLayer when they finish, whether
or not they fill forwards. This is done by having KeyframeAnimation::onAnimationEnd()
always call endAnimation().

This change only fixes the non-Web Animation code path. webkit.org/b/187845 exists
to fix the other code path.

Also improve some logging that would have revealed this problem sooner.

Test: compositing/backing/backing-store-attachment-fill-forwards-animation.html

* page/animation/AnimationBase.h:
(WebCore::AnimationBase::endAnimation):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::endAnimation):
* page/animation/ImplicitAnimation.h:
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::endAnimation):
(WebCore::KeyframeAnimation::onAnimationEnd):
* page/animation/KeyframeAnimation.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::addAnimation):
(WebCore::GraphicsLayerCA::updateCoverage):

LayoutTests:

* compositing/backing/backing-store-attachment-fill-forwards-animation-expected.txt: Added.
* compositing/backing/backing-store-attachment-fill-forwards-animation.html: Added.

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

13 months agoOccasional crash under -[WKFormInputSession setSuggestions:]
timothy_horton@apple.com [Fri, 20 Jul 2018 21:28:02 +0000 (21:28 +0000)]
Occasional crash under -[WKFormInputSession setSuggestions:]
https://bugs.webkit.org/show_bug.cgi?id=187869
<rdar://problem/41357063>

Reviewed by Dean Jackson.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputDelegate]):
Make inputDelegate weak.

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

13 months ago[DFG] Fold GetByVal if Array is CoW
utatane.tea@gmail.com [Fri, 20 Jul 2018 21:25:19 +0000 (21:25 +0000)]
[DFG] Fold GetByVal if Array is CoW
https://bugs.webkit.org/show_bug.cgi?id=186459

Reviewed by Saam Barati.

JSTests:

* stress/folding-get-by-val-with-immutable-butterfly-out-of-bounds-foldable.js: Added.
(shouldBe):
(test0):
(test1):
(test2):
(test3):
(test4):
(test5):
* stress/folding-get-by-val-with-immutable-butterfly-out-of-bounds.js: Added.
(shouldBe):
(test0):
(test1):
(test2):
(test3):
(test4):
(test5):
* stress/folding-get-by-val-with-immutable-butterfly-with-types.js: Added.
(shouldBe):
(test0):
(test1):
(test2):
(test3):
(test4):
(test5):
* stress/folding-get-by-val-with-immutable-butterfly.js: Added.
(shouldBe):
(checking):
(test):

Source/JavaScriptCore:

CoW indexing type means that we now tracks the changes in CoW Array by structure. So DFG has a chance to
fold GetByVal if the given array is CoW. This patch folds GetByVal onto the CoW Array. If the structure
is watched and the butterfly is JSImmutableButterfly, we can load the value from this butterfly.

This can be useful since these CoW arrays are used for a storage for constants. Constant-indexed access
to these constant arrays can be folded into an actual constant by this patch.

                                   baseline                  patched

template_string.es6          4993.9853+-147.5308   ^    824.1685+-44.1839       ^ definitely 6.0594x faster
template_string_tag.es5        67.0822+-2.0100     ^      9.3540+-0.5376        ^ definitely 7.1715x faster

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

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

13 months ago[JSC] Remove cellLock in JSObject::convertContiguousToArrayStorage
utatane.tea@gmail.com [Fri, 20 Jul 2018 21:14:15 +0000 (21:14 +0000)]
[JSC] Remove cellLock in JSObject::convertContiguousToArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=186602

Reviewed by Saam Barati.

JSObject::convertContiguousToArrayStorage's cellLock() is not necessary since we do not
change the part of the butterfly, length etc. We prove that our procedure is safe, and
drop the cellLock() here.

* runtime/JSObject.cpp:
(JSC::JSObject::convertContiguousToArrayStorage):

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

13 months agoPicking a color from the color panel for typing attributes needs to inverse transform...
commit-queue@webkit.org [Fri, 20 Jul 2018 21:10:40 +0000 (21:10 +0000)]
Picking a color from the color panel for typing attributes needs to inverse transform through color-filter
https://bugs.webkit.org/show_bug.cgi?id=187846

Patch by Ryosuke Niwa <rniwa@apple.com> on 2018-07-20
Reviewed by Simon Fraser.

Source/WebCore:

This patch refines the color inversion for editing introduced in r234005 so that font panels and WebKit embedders
can get and set inverted colors using attributed strings for a selected text in an editable region.

More specifically, when font panels or WebKit embedders set a font color or a background color via WebView's
_applyStyleToSelection and _applyEditingStyleToSelection, WebKit would automatically invert the color before inserting
into DOM so that the color visible to the user matches that's given to WebKit. Conversely,
[WebView attributedSubstringFromRange:nsRange] now return the color visible to the user, i.e. the color after
the color filter had been applied, so that some WebKit embedders can present the visually identical color to the user.

Because DOM never sees the color filter's effect in the computed style, etc... this patch reverts the change made to
StyleChange in r234005 to avoid inverting the color passed to execCommand. This makes editing apps which is unaware
of the dark mode or -apple-color-filter continue to function (because the color picker implemented in DOM will be
applied of the same color filter before being presented to the user).

Finally, this patch introduces a testing hook in applyCommandToFrame so that executing foreColor or backColor with
the soruce of CommandFromMenuOrKeyBinding would trigger the same code path as the one taken by Objective-C

Tests: editing/execCommand/set-backColor-with-color-filter-from-scripts.html
       editing/execCommand/set-foreColor-with-color-filter-from-scripts.html
       editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html
       editing/style/set-backColor-with-color-filter.html
       editing/style/set-foreColor-with-color-filter.html

* editing/EditingStyle.cpp:
(WebCore::EditingStyle::inverseTransformColorIfNeeded): Added.
(WebCore::StyleChange::StyleChange): Revert the change made in r234005 since this code is also used by execCommand
which is not desirable, and won't work for background color.
(WebCore::StyleChange::extractTextStyles): Ditto.
* editing/EditingStyle.h:
* editing/Editor.cpp:
(WebCore::Editor::applyStyle):
(WebCore::Editor::applyStyleToSelection): Call EditingStyle::inverseTransformColorIfNeeded when ColorFilterMode is
set to InvertColor.
* editing/Editor.h:
* editing/EditorCommand.cpp:
(WebCore::applyCommandToFrame): Added the aforementioned testing hook.
* editing/cocoa/HTMLConverter.mm:
(WebCore::editingAttributedStringFromRange): Take the color filtr into account. Some WebKit embedders use this
function to compute the font color in the selected text. Note that this function is mostly used for input methods
so the color doesn't really matter, and its implementation is distinct from that of HTMLConverter.

Source/WebKitLegacy/mac:

Invert the filtered font and background colors when using font panels, font pasteboard, and other Objective-C APIs.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _applyStyleToSelection:withUndoAction:]): Share code with _applyEditingStyleToSelection.
(-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]):

Tools:

Fixed the bug that testRunner.execCommand was using the second argument as the value.

The second argument, aShowDefaultUI, should always be ignored in testRunner.execCommand,
and the third argument should be used as the value. DumpRenderTree's implementation does this already.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::execCommand):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

Added tests to make sure foreground or background colors specified in execCommand don't get inverted.

Fixed the test which was asserting that textInputController.attributedSubstringFromRange doesn't invert the color
since that's exactly what WebKit embedders uses to compute the style for color pickers.

Added new tests for copy & paste case using textInputController.legacyAttributedString.

* editing/execCommand/set-backColor-with-color-filter-from-scripts-expected.txt: Added.
* editing/execCommand/set-backColor-with-color-filter-from-scripts.html: Added.
* editing/execCommand/set-foreColor-with-color-filter-from-scripts-expected.txt: Added.
* editing/execCommand/set-foreColor-with-color-filter-from-scripts.html: Added.
* editing/mac/attributed-string/attrib-string-range-with-color-filter-expected.txt:
* editing/mac/attributed-string/attrib-string-range-with-color-filter.html: This test uses attributedSubstringFromRange,
which implemented using editingAttributedStringFromRange in WebCore. Since this is exactly what WebKit embedders uses
to compute the current style of the selected text, we need to invert the color here. This API's main clinet is input methods
so this shouldn't affect other editing operations, in particular, copy and paste, which uses HTMLConverter.
* editing/mac/attributed-string/attribute-string-for-copy-with-color-filter-expected.txt: Added.
* editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html: Added. Make sure the attributed string
generated for copy & paste does not invert foreground or background colors via textInputController.legacyAttributedString.
This is testing HTMLConverter, not editingAttributedStringFromRange, used by WebKit embedders and input methods.
* editing/mac/attributed-string/attributed-string-for-typing-with-color-filter-expected.txt:
* editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html: Added background color in the test.
* editing/style/set-backColor-with-color-filter-expected.txt: Added.
* editing/style/set-backColor-with-color-filter.html: Added.
* editing/style/set-foreColor-with-color-filter-expected.txt: Renamed from exec-command-foreColor-with-color-filter-expected.txt.
* editing/style/set-foreColor-with-color-filter.html: Renamed from exec-command-foreColor-with-color-filter.html.
Updated the test to use testRunner.execCommand which uses CommandFromMenuOrKeyBinding in applyCommandToFrame since we're
trying to test the code path taken by WebKit embedders and font panel here.

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

13 months agoAccidentally checked in the wrong version of these files.
dino@apple.com [Fri, 20 Jul 2018 21:03:37 +0000 (21:03 +0000)]
Accidentally checked in the wrong version of these files.

* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color): Deleted.
(TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color): Deleted.
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color): Deleted.
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color): Deleted.
(TestSummaryProviders.serial_test_WebCoreColorProvider_semantic_color): Deleted.

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

13 months agoProvide an lldb type summary for WebCore::Color
dino@apple.com [Fri, 20 Jul 2018 19:57:37 +0000 (19:57 +0000)]
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Reviewed by Dan Bates.

* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit
    to get to WebCore.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders): Create some Color objects for testing.

* lldb/lldb_webkit.py: Add a Color summary provider.
(__lldb_init_module):
(WebCoreColor_SummaryProvider):
(WebCoreColorProvider):
(WebCoreColorProvider.__init__):
(WebCoreColorProvider._is_extended):
(WebCoreColorProvider._is_valid):
(WebCoreColorProvider._is_semantic):
(WebCoreColorProvider._to_string_extended):
(WebCoreColorProvider.to_string):

* lldb/lldb_webkit_unittest.py: Tests.
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color):

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

13 months agoREGRESSION(PSON?): [ WK2 ] http/tests/workers/service/client-*-page-cache.html Layout...
cdumez@apple.com [Fri, 20 Jul 2018 19:34:09 +0000 (19:34 +0000)]
REGRESSION(PSON?): [ WK2 ] http/tests/workers/service/client-*-page-cache.html LayoutTests are flaky
https://bugs.webkit.org/show_bug.cgi?id=183705

Reviewed by Youenn Fablet.

At the beginning of the tests, wait for the client count to reach the expected value instead of
expecting it to be the right value right away. Clients unregister themselves asynchronously so
it is flaky otherwise.

* http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html:
* http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html:
* http/tests/workers/service/serviceworkerclients-matchAll-worker.js:
(async.doTestAfterMessage):

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

13 months agoCompareEq should be using KnownOtherUse instead of OtherUse
sbarati@apple.com [Fri, 20 Jul 2018 19:16:29 +0000 (19:16 +0000)]
CompareEq should be using KnownOtherUse instead of OtherUse
https://bugs.webkit.org/show_bug.cgi?id=186814
<rdar://problem/39720030>

Reviewed by Filip Pizlo.

JSTests:

* stress/compare-eq-should-use-known-other-use.js: Added.
(bar):
(i.func):

Source/JavaScriptCore:

CompareEq in fixup phase was doing this:
insertCheck(child, OtherUse)
setUseKind(child, OtherUse)
And in the DFG/FTL backend, it would not emit a check for OtherUse. This could
lead to edge verification crashing because a phase may optimize the check out
by removing the node. However, AI may not be privy to that optimization, and
AI may think the incoming value may not be Other. AI is expecting the DFG/FTL
backend to actually emit a check here, but it does not.

This exact pattern is why we have KnownXYZ use kinds. This patch introduces
KnownOtherUse and changes the above pattern to be:
insertCheck(child, OtherUse)
setUseKind(child, KnownOtherUse)

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
(JSC::DFG::shouldNotHaveTypeCheck):
(JSC::DFG::checkMayCrashIfInputIsEmpty):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::handle):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareEq):
(JSC::FTL::DFG::LowerDFGToB3::speculate):

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

13 months agoREGRESSION (234006) ERROR: Blocked access to external URL http://code.jquery.com...
david_fenton@apple.com [Fri, 20 Jul 2018 18:39:40 +0000 (18:39 +0000)]
REGRESSION (234006) ERROR: Blocked access to external URL code.jquery.com/jquery-1.9.1.min.js
https://bugs.webkit.org/show_bug.cgi?id=187858

Unreviewed test gardening, skipped test.

* Skipped: LaunchTime

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

13 months ago[JSC] A bit performance improvement for Object.assign by cleaning up code
utatane.tea@gmail.com [Fri, 20 Jul 2018 18:28:28 +0000 (18:28 +0000)]
[JSC] A bit performance improvement for Object.assign by cleaning up code
https://bugs.webkit.org/show_bug.cgi?id=187852

Reviewed by Saam Barati.

We clean up Object.assign code a bit.

1. Vector and MarkedArgumentBuffer are extracted out from the loop since repeatedly creating MarkedArgumentBuffer is costly.
2. canDoFastPath is not necessary. Restructuring the code to clean up things.

It improves the performance a bit.

                            baseline                  patched

object-assign.es6      237.7719+-5.5175          231.2856+-4.6907          might be 1.0280x faster

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorAssign):

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

13 months agostress/spread-forward-varargs-stack-overflow.js is timing out in 32 bit JSC tests.
david_fenton@apple.com [Fri, 20 Jul 2018 18:05:12 +0000 (18:05 +0000)]
stress/spread-forward-varargs-stack-overflow.js is timing out in 32 bit JSC tests.
https://bugs.webkit.org/show_bug.cgi?id=187698

Unreviewed test gardening, skipped test in 32 Bit JSC.

* stress/spread-forward-varargs-stack-overflow.js:

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

13 months ago[Curl] Test gardening
Basuke.Suzuki@sony.com [Fri, 20 Jul 2018 18:03:22 +0000 (18:03 +0000)]
[Curl] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=187863

Unreviewed test gardening.

Enable WebSocket tests.

* platform/wincairo/TestExpectations:

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

13 months agoHLS resources with remote subresources will not taint canvasses.
jer.noble@apple.com [Fri, 20 Jul 2018 17:59:47 +0000 (17:59 +0000)]
HLS resources with remote subresources will not taint canvasses.
https://bugs.webkit.org/show_bug.cgi?id=187731
<rdar://problem/42290703>

Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/security/canvas-remote-read-remote-video-hls.html

Most media sources are single-resource; they are accessed from a single origin. HLS manifests can contain many
subresources from arbitrary origins, and canvases should be tainted when painted from media elements whose
subresources were retrieved from tainting origins.

Add a new method to HTMLMediaElement, wouldTaintOrigin(), taking a SecurityOrigin, and returning whether the
media element would taint that origin. This gets piped all the way down to MediaPlayerPrivateAVFoundationObjC
which uses WebCoreNSURLSession to track all the origins of all the responses which resulted from the media
element's load.

Drive-by fix: also fix this issue for media elements which render to an AudioContext.

Drive-by fix #2: CanvasRenderingContext2DBase::createPattern() needs to check the return value of
ImageBuffer::create() before using it.

* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didAttachRenderers):
(WebCore::HTMLMediaElement::didDetachRenderers):
(WebCore::HTMLMediaElement::scheduleUpdateShouldAutoplay):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::wouldTaintOrigin const):
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::wouldTaintOrigin):
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::createPattern):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::wouldTaintOrigin const):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::hasSingleSecurityOrigin const):
(WebCore::MediaPlayerPrivateInterface::wouldTaintOrigin const):
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::update):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::wouldTaintOrigin const):
* platform/network/cocoa/WebCoreNSURLSession.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession task:didReceiveResponseFromOrigin:]):
(-[WebCoreNSURLSession wouldTaintOrigin:]):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):

LayoutTests:

* http/tests/media/resources/hls/test-vod-localhost.m3u8: Added.
* http/tests/security/canvas-remote-read-remote-video-hls-expected.txt: Added.
* http/tests/security/canvas-remote-read-remote-video-hls.html: Added.

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

13 months ago[macOS] Relax WebKit sandbox to permit proper App Store behavior
bfulgham@apple.com [Fri, 20 Jul 2018 17:45:38 +0000 (17:45 +0000)]
[macOS] Relax WebKit sandbox to permit proper App Store behavior
https://bugs.webkit.org/show_bug.cgi?id=187831
<rdar://problem/42047455>

Reviewed by Alexey Proskuryakov.

The Mac App Store is unable to perform some gift card redemption tasks on macOS due to missing sandbox permissions.
This patch adds those permissions.

* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

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

13 months agoUpdate FrameView::paintContents to use release logging.
zalan@apple.com [Fri, 20 Jul 2018 17:36:57 +0000 (17:36 +0000)]
Update FrameView::paintContents to use release logging.
https://bugs.webkit.org/show_bug.cgi?id=187854
<rdar://problem/42432371>

Reviewed by Simon Fraser.

Adding release logging helps identifying blank content cases.

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

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

13 months agoAdd WKNavigation/WKNavigationAction related SPI.
beidson@apple.com [Fri, 20 Jul 2018 17:33:28 +0000 (17:33 +0000)]
Add WKNavigation/WKNavigationAction related SPI.
https://bugs.webkit.org/show_bug.cgi?id=187826

Reviewed by Chris Dumez.

Source/WebKit:

* UIProcess/API/APINavigationAction.h:

* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageLoadURLRequestReturningNavigation):

* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _mainFrameNavigation]):
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h:

* UIProcess/API/glib/WebKitUIClient.cpp:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(-[NavigationActionHasNavigationDelegate webView:didFinishNavigation:]):
(-[NavigationActionHasNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):

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

13 months agoFirst Auto-PiP from Fullscreen too small & animation blocks
jer.noble@apple.com [Fri, 20 Jul 2018 17:29:40 +0000 (17:29 +0000)]
First Auto-PiP from Fullscreen too small & animation blocks
https://bugs.webkit.org/show_bug.cgi?id=187745
<rdar://problem/42316583>

Reviewed by Jon Lee.

1) When Auto-PiPing, we don't have the luxury of setting up the fullscreen state
ahead of time; we get notified that PiP has already started. The area of the code
which does this just-in-time setup needs to set the video layer's frame so that the
transform within the PiP window is correct.

2) We generate a placeholder image when going into fullscreen, but we need to do
so synchronously. Create the AVPlayerItemVideoOutput up front at AVPlayerItem creation
time wherever AVPIVO is available.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::doSetup):

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

13 months agoDeclarativeAnimation should suspend, resume, & stop m_eventQueue
graouts@webkit.org [Fri, 20 Jul 2018 17:08:44 +0000 (17:08 +0000)]
DeclarativeAnimation should suspend, resume, & stop m_eventQueue
https://bugs.webkit.org/show_bug.cgi?id=187216
<rdar://problem/41669739>

Reviewed by Ryosuke Niwa.

Suspend, resume and close the GenericEventQueue for DeclarativeAnimation as instructed through the DOMActiveObject protocol.

* animation/DeclarativeAnimation.cpp:
(WebCore::DeclarativeAnimation::stop):
(WebCore::DeclarativeAnimation::suspend):
(WebCore::DeclarativeAnimation::resume):
* animation/DeclarativeAnimation.h:
* animation/WebAnimation.h:

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

13 months ago[LFC][Inline formatting context] Add basic text content handling.
zalan@apple.com [Fri, 20 Jul 2018 17:05:16 +0000 (17:05 +0000)]
[LFC][Inline formatting context] Add basic text content handling.
https://bugs.webkit.org/show_bug.cgi?id=187860

Reviewed by Antti Koivisto.

InlineFormattingContext::layout() walks through the formatting root's descendant list in a post-order fashion and
feeds the TextContentProvider.
Eventually this would turn into a more generic loop where we stop and process the text content when finding a non-text content box (float, inline-box etc), but right now
this is about text content only.

* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::contentBoxBottom const):
(WebCore::Display::Box::contentBoxRight const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout const):
* layout/inlineformatting/textlayout/TextContentProvider.cpp:
(WebCore::Layout::TextContentProvider::textRuns): Add a helper function to support the case when all we need is just the run list in one go.
* layout/inlineformatting/textlayout/TextContentProvider.h:
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isDescendantOf const):
* layout/layouttree/LayoutBox.h:
* layout/layouttree/LayoutInlineBox.h:
(WebCore::Layout::InlineBox::textContent const):

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

13 months agoFetchResponse should close its stream when loading finishes
youenn@apple.com [Fri, 20 Jul 2018 16:58:54 +0000 (16:58 +0000)]
FetchResponse should close its stream when loading finishes
https://bugs.webkit.org/show_bug.cgi?id=187790

Reviewed by Chris Dumez.

It simplifies for a FetchResponse to push all its data into its stream if already created at end of load time.
Did some refactoring in FetchBodyOwner to have a cleaner relationship with the stream source.
Did a minor refactoring to expose the error description when loading fails as part of the rejected promise.
This is consistent to errors sent back through callbacks.

Covered by existing tests.

* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::~FetchBodyOwner):
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchBodySource.cpp:
(WebCore::FetchBodySource::FetchBodySource):
(WebCore::FetchBodySource::setActive):
(WebCore::FetchBodySource::setInactive):
(WebCore::FetchBodySource::doStart):
(WebCore::FetchBodySource::doPull):
(WebCore::FetchBodySource::doCancel):
(WebCore::FetchBodySource::cleanBodyOwner):
* Modules/fetch/FetchBodySource.h:
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::didFail):

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

13 months agoREGRESSION(r233969): ASSERT in -[WebAVPlayerLayer setVideoGravity:]
jer.noble@apple.com [Fri, 20 Jul 2018 16:51:06 +0000 (16:51 +0000)]
REGRESSION(r233969): ASSERT in -[WebAVPlayerLayer setVideoGravity:]
https://bugs.webkit.org/show_bug.cgi?id=187814
<rdar://problem/42391869>

Reviewed by Eric Carlson.

After r233969 caused models to disassociate themselves from interfaces, it is now possible that an
VideoFullscreenInterfaceAVKit can have a nil model. We should null-check, not ASSERT, now that the
assertion no longer holds true.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerLayer layoutSublayers]):
(-[WebAVPlayerLayer resolveBounds]):
(-[WebAVPlayerLayer setVideoGravity:]):

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

13 months agoRebaseline editing/mac/attributed-string/attributed-string-for-typing-with-color...
ryanhaddad@apple.com [Fri, 20 Jul 2018 16:24:57 +0000 (16:24 +0000)]
Rebaseline editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html for Sierra.

Unreviewed test gardening.

* platform/mac-sierra/editing/mac/attributed-string/attributed-string-for-typing-with-color-filter-expected.txt: Added.

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

13 months agoUnreviewed, rolling out r233943, r233988, r234004, and
commit-queue@webkit.org [Fri, 20 Jul 2018 15:44:44 +0000 (15:44 +0000)]
Unreviewed, rolling out r233943, r233988, r234004, and
r234012.
https://bugs.webkit.org/show_bug.cgi?id=187856

webkitpy tests are failing to build lldbWebKitTester
(Requested by ryanhaddad on #webkit).

Reverted changesets:

"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/233943

"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/233988

"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/234004

"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/234012

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

13 months agoImport new WPT tests for custom elements
commit-queue@webkit.org [Fri, 20 Jul 2018 10:47:55 +0000 (10:47 +0000)]
Import new WPT tests for custom elements
https://bugs.webkit.org/show_bug.cgi?id=187806

Patch by Frederic Wang <fwang@igalia.com> on 2018-07-20
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

* web-platform-tests/custom-elements/Document-createElement-expected.txt:
* web-platform-tests/custom-elements/Document-createElement-svg.svg: Added.
* web-platform-tests/custom-elements/Document-createElement.html:
* web-platform-tests/custom-elements/Document-createElementNS-expected.txt: Added.
* web-platform-tests/custom-elements/Document-createElementNS.html: Added.
* web-platform-tests/custom-elements/HTMLElement-constructor-expected.txt:
* web-platform-tests/custom-elements/HTMLElement-constructor.html:
* web-platform-tests/custom-elements/META.yml: Added.
* web-platform-tests/custom-elements/OWNERS: Removed.
* web-platform-tests/custom-elements/builtin-coverage-expected.txt: Added.
* web-platform-tests/custom-elements/builtin-coverage.html: Added.
* web-platform-tests/custom-elements/connected-callbacks-html-fragment-parsing-expected.txt: Added.
* web-platform-tests/custom-elements/connected-callbacks-html-fragment-parsing.html: Added.
* web-platform-tests/custom-elements/custom-element-registry/upgrade-expected.txt: Added.
* web-platform-tests/custom-elements/custom-element-registry/upgrade.html: Added.
* web-platform-tests/custom-elements/custom-element-registry/w3c-import.log:
* web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt:
* web-platform-tests/custom-elements/htmlconstructor/newtarget.html:
* web-platform-tests/custom-elements/htmlconstructor/w3c-import.log:
* web-platform-tests/custom-elements/parser/parser-constructs-custom-elements-with-is-expected.txt: Added.
* web-platform-tests/custom-elements/parser/parser-constructs-custom-elements-with-is.html: Added.
* web-platform-tests/custom-elements/parser/parser-uses-create-an-element-for-a-token-svg.svg: Added.
* web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt:
* web-platform-tests/custom-elements/parser/serializing-html-fragments-expected.txt: Added.
* web-platform-tests/custom-elements/parser/serializing-html-fragments.html: Added.
* web-platform-tests/custom-elements/parser/w3c-import.log:
* web-platform-tests/custom-elements/pseudo-class-defined-expected.txt: Added.
* web-platform-tests/custom-elements/pseudo-class-defined.html: Added.
* web-platform-tests/custom-elements/reactions/HTMLInputElement-expected.txt: Added.
* web-platform-tests/custom-elements/reactions/HTMLInputElement.html: Added.
* web-platform-tests/custom-elements/reactions/resources/w3c-import.log:
* web-platform-tests/custom-elements/reactions/w3c-import.log:
* web-platform-tests/custom-elements/reactions/with-exceptions.html: Added.
* web-platform-tests/custom-elements/resources/my-custom-element-html-document.html: Added.
* web-platform-tests/custom-elements/resources/w3c-import.log:
* web-platform-tests/custom-elements/upgrading/Document-importNode-expected.txt: Added.
* web-platform-tests/custom-elements/upgrading/Document-importNode.html: Added.
* web-platform-tests/custom-elements/upgrading/w3c-import.log:
* web-platform-tests/custom-elements/w3c-import.log:

LayoutTests:

Some tests crashing or timing out are skipped. Also, one test depending on the availability
of the @capture attribute of the HTMLInputElement element has a specific expectation on iOS.

* TestExpectations: Skip some tests crashing or timing out.
* platform/ios/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement-expected.txt: Added.

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

13 months ago[GTK][WPE] enable-media-capabilities websetting
philn@webkit.org [Fri, 20 Jul 2018 09:00:15 +0000 (09:00 +0000)]
[GTK][WPE] enable-media-capabilities websetting
https://bugs.webkit.org/show_bug.cgi?id=187847

Reviewed by Carlos Garcia Campos.

Source/WebKit:

Add a new WebKitSetting for the MediaCapabilities spec defined in:
https://wicg.github.io/media-capabilities/

* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_enable_media_capabilities):
(webkit_settings_set_enable_media_capabilities):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/wpe/WebKitSettings.h:

Tools:

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings): Unit test for the new enable-media-capabilities setting.

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

13 months agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.21.5 release.
carlosgc@webkit.org [Fri, 20 Jul 2018 07:47:57 +0000 (07:47 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.5 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

* gtk/NEWS: Add release notes for 2.21.5.
* webkitglib-symbols.map: Remove symbols.

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

13 months ago[GLIB] jsc_context_evaluate_in_object() should receive an instance when a JSCClass...
carlosgc@webkit.org [Fri, 20 Jul 2018 06:11:41 +0000 (06:11 +0000)]
[GLIB] jsc_context_evaluate_in_object() should receive an instance when a JSCClass is given
https://bugs.webkit.org/show_bug.cgi?id=187798

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Because a JSCClass is pretty much useless without an instance in this case. It should be similar to
jsc_value_new_object() because indeed we are creating a new object. This makes destroy function and vtable
functions to work. We can't use JSAPIWrapperObject to wrap this object, because it's a global object, so this
patch adds JSAPIWrapperGlobalObject or that.

* API/glib/JSAPIWrapperGlobalObject.cpp: Added.
(jsAPIWrapperGlobalObjectHandleOwner):
(JSAPIWrapperGlobalObjectHandleOwner::finalize):
(JSC::JSCallbackObject<JSAPIWrapperGlobalObject>::createStructure):
(JSC::JSCallbackObject<JSAPIWrapperGlobalObject>::create):
(JSC::JSAPIWrapperGlobalObject::JSAPIWrapperGlobalObject):
(JSC::JSAPIWrapperGlobalObject::finishCreation):
(JSC::JSAPIWrapperGlobalObject::visitChildren):
* API/glib/JSAPIWrapperGlobalObject.h: Added.
(JSC::JSAPIWrapperGlobalObject::wrappedObject const):
(JSC::JSAPIWrapperGlobalObject::setWrappedObject):
* API/glib/JSCClass.cpp:
(isWrappedObject): Helper to check if the given object is a JSAPIWrapperObject or JSAPIWrapperGlobalObject.
(wrappedObjectClass): Return the class of a wrapped object.
(jscContextForObject): Get the execution context of an object. If the object is a JSAPIWrapperGlobalObject, the
scope extension global object is used instead.
(getProperty): Use isWrappedObject, wrappedObjectClass and jscContextForObject.
(setProperty): Ditto.
(hasProperty): Ditto.
(deleteProperty): Ditto.
(getPropertyNames): Ditto.
(jscClassCreateContextWithJSWrapper): Call jscContextCreateContextWithJSWrapper().
* API/glib/JSCClassPrivate.h:
* API/glib/JSCContext.cpp:
(jscContextCreateContextWithJSWrapper): Call WrapperMap::createContextWithJSWrappper().
(jsc_context_evaluate_in_object): Use jscClassCreateContextWithJSWrapper() when a JSCClass is given.
* API/glib/JSCContext.h:
* API/glib/JSCContextPrivate.h:
* API/glib/JSCWrapperMap.cpp:
(JSC::WrapperMap::createContextWithJSWrappper): Create the new context for jsc_context_evaluate_in_object() here
when a JSCClass is used to create the JSAPIWrapperGlobalObject.
(JSC::WrapperMap::wrappedObject const): Return the wrapped object also in case of JSAPIWrapperGlobalObject.
* API/glib/JSCWrapperMap.h:
* GLib.cmake:

Tools:

Update test cases to the new API and use a destroy function and vtable in the test case of calling
jsc_context_evaluate_in_object() with a JSCClass.

* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCEvaluateInObject):

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

13 months agoTestWTF.WTF.StringConcatenate_Unsigned fails for unsigned short on Windows
ross.kirsling@sony.com [Fri, 20 Jul 2018 06:10:34 +0000 (06:10 +0000)]
TestWTF.WTF.StringConcatenate_Unsigned fails for unsigned short on Windows
https://bugs.webkit.org/show_bug.cgi?id=187712

Reviewed by Fujii Hironori.

* TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:
Mark result of unsigned short test case as platform-specific,
since Windows' behavior is actually *less* surprising here.

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

13 months agoNull pointer dereference under WebPage::autofillLoginCredentials()
cdumez@apple.com [Fri, 20 Jul 2018 04:53:59 +0000 (04:53 +0000)]
Null pointer dereference under WebPage::autofillLoginCredentials()
https://bugs.webkit.org/show_bug.cgi?id=187823
<rdar://problem/37152195>

Reviewed by David Kilzer.

Deal with m_assistedNode being null under WebPage::autofillLoginCredentials().

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::autofillLoginCredentials):

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

13 months agoConservatively make Object.assign's fast path do a two phase protocol of loading...
sbarati@apple.com [Fri, 20 Jul 2018 04:47:51 +0000 (04:47 +0000)]
Conservatively make Object.assign's fast path do a two phase protocol of loading everything then storing everything to try to prevent a crash
https://bugs.webkit.org/show_bug.cgi?id=187836
<rdar://problem/42409527>

Reviewed by Mark Lam.

We have crash reports that we're crashing on source->getDirect in Object.assign's
fast path. Mark investigated this and determined we end up with a nullptr for
butterfly. This is curious, because source's Structure indicated that it has
out of line properties. My leading hypothesis for this at the moment is a bit
handwavy, but it's essentially:
- We end up firing a watchpoint when assigning to the target (this can happen
if a watchpoint was set up for storing to that particular field)
- When we fire that watchpoint, we end up doing some kind work on the source,
perhaps causing it to flattenDictionaryStructure. Therefore, we end up
mutating source.

I'm not super convinced this is what we're running into, but just by reading
the code, I think it needs to be something similar to this. Seeing if this change
fixes the crasher will give us good data to determine if something like this is
happening or if the bug is something else entirely.

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorAssign):

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

13 months agoWeb Inspector: Layers visualization shouldn't select on mousedown
ross.kirsling@sony.com [Fri, 20 Jul 2018 04:29:21 +0000 (04:29 +0000)]
Web Inspector: Layers visualization shouldn't select on mousedown
https://bugs.webkit.org/show_bug.cgi?id=187488

Reviewed by Matt Baker.

* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView):
(WI.Layers3DContentView.prototype.initialLayout):
(WI.Layers3DContentView.prototype._canvasMouseDown):
(WI.Layers3DContentView.prototype._canvasMouseUp):
Don't update selection on mousedown, update on mouseup!
Specifically, only update when mousedown & mouseup targets are the same and mousemove hasn't been triggered.

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

13 months ago[ITP] Crash under ResourceLoadStatisticsMemoryStore::removeDataRecords()
cdumez@apple.com [Fri, 20 Jul 2018 03:44:58 +0000 (03:44 +0000)]
[ITP] Crash under ResourceLoadStatisticsMemoryStore::removeDataRecords()
https://bugs.webkit.org/show_bug.cgi?id=187821
<rdar://problem/42112693>

Reviewed by David Kilzer.

In two cases, ResourceLoadStatisticsMemoryStore (which lives on a background queue) needs to call WebPageProxy
operations on the main thread and then dispatch back on the background queue when the operation completes.
However, it is possible for the ResourceLoadStatisticsMemoryStore to get destroyed on the background queue
during this time and we would then crash when trying to use m_workQueue to re-dispatch. To address the issue,
I now ref the work queue in the lambda so that we're guaranteed to be able to re-dispatch to the background
queue. When we're back on the background queue, we'll realize that weakThis in gone and we'll call the callback
and return early.

Note that I am not checking weakThis on the main thread as this would not be safe. weakThis should only be
used on the background queue.

* UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords):
(WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData):

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

14 months agoMove WebFrameListenerProxy to WebFramePolicyListenerProxy, its only subclass
Hironori.Fujii@sony.com [Fri, 20 Jul 2018 02:24:20 +0000 (02:24 +0000)]
Move WebFrameListenerProxy to WebFramePolicyListenerProxy, its only subclass
https://bugs.webkit.org/show_bug.cgi?id=187825
<rdar://problem/42405081>

Unreviewed build fix for Windows port.

RefPtr.h(45): error C2027: use of undefined type 'API::Navigation'

* UIProcess/win/WebInspectorProxyWin.cpp: Include "APINavigation.h".

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

14 months agoFlaky crash in AnimationTimeline::cancelOrRemoveDeclarativeAnimation
graouts@webkit.org [Fri, 20 Jul 2018 00:06:10 +0000 (00:06 +0000)]
Flaky crash in AnimationTimeline::cancelOrRemoveDeclarativeAnimation
https://bugs.webkit.org/show_bug.cgi?id=187530
<rdar://problem/42095186>

Reviewed by Dean Jackson.

LayoutTests/imported/mozilla:

Mark a WPT progression now that we correctly ignore animation names that have no matching @keyframes rule.

* css-animations/test_element-get-animations-expected.txt:

Source/WebCore:

We would crash in cancelOrRemoveDeclarativeAnimation() because updateCSSAnimationsForElement() would pass
nullptr values due to the return value of cssAnimationsByName.take(nameOfAnimationToRemove). This is because
we would create animations for animation names that may be empty or not match an existing @keyframes rule.
Not only was that wasteful, but it was also non-compliant, and as a result of fixing this we're actually
seeing a progression in the CSS Animations WPT tests.

* animation/AnimationTimeline.cpp:
(WebCore::shouldConsiderAnimation): New function that performs all required steps to see if a provided animation
is valid and has a name that is not "none", not the empty string and matches the name of a @keyframes rule.
(WebCore::AnimationTimeline::updateCSSAnimationsForElement):
* animation/KeyframeEffectReadOnly.cpp:
(WebCore::KeyframeEffectReadOnly::computeCSSAnimationBlendingKeyframes): We no longer need to check whether we have
an empty animation name since we're no longer creating CSSAnimation objects in that circumstance.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::isAnimationNameValid): Add a new method that checks whether the provided animation name
a known @keyframes rule.
* css/StyleResolver.h:

LayoutTests:

Adjust an existing test which assumes an animation might be running when it's not really, so we test the animation is
not running using an alternate method.

* animations/keyframes-dynamic-expected.txt:
* animations/keyframes-dynamic.html:

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

14 months agoTeach the AWS Lambda to use the [minified]-platforms database
lforschler@apple.com [Thu, 19 Jul 2018 23:37:49 +0000 (23:37 +0000)]
Teach the AWS Lambda to use the [minified]-platforms database

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

14 months agoMark storage/indexeddb/modern/opendatabase-after-storage-crash.html as flaky.
ryanhaddad@apple.com [Thu, 19 Jul 2018 23:30:11 +0000 (23:30 +0000)]
Mark storage/indexeddb/modern/opendatabase-after-storage-crash.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=187648

Unreviewed test gardening.

* platform/wk2/TestExpectations:

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

14 months agoFix the test.
simon.fraser@apple.com [Thu, 19 Jul 2018 23:20:49 +0000 (23:20 +0000)]
Fix the test.

* editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html:

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

14 months agoCrash under WebCore::DocumentWriter::addData()
cdumez@apple.com [Thu, 19 Jul 2018 23:19:31 +0000 (23:19 +0000)]
Crash under WebCore::DocumentWriter::addData()
https://bugs.webkit.org/show_bug.cgi?id=187819
<rdar://problem/41328743>

Reviewed by Brady Eidson.

When AppCache is used a DocumentLoader may start a NetworkLoad even though it has substitute data.
In DocumentLoader::continueAfterContentPolicy(), if we have substitute data we commit this data
and call finishLoad(). However, if the case where there was a NetworkLoad started, we'll send the
ContinueDidReceiveResponse IPC back to the network process and it will start sending us data for
the load. This could lead to crashes such as <rdar://problem/41328743> since the DocumentLoader
has already committed data and finished loading when it gets the data from the network process.

To address the issue, we now call clearMainResource() in continueAfterContentPolicy(), after we've
decided to commit the substitute data. This effectively removes the DocumentLoader as a client of
the CachedResource so that its will not be notified of following load progress. We do not cancel
the load as other CachedResourceClients may be interested in the load (ApplicationCacheResourceLoader
in particular, in order to update its cached data).

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

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

14 months agoProvide an lldb type summary for WebCore::Color
dino@apple.com [Thu, 19 Jul 2018 23:17:45 +0000 (23:17 +0000)]
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Dan Bates helped me with this attempted fix. Fingers crossed!

* Scripts/build-lldbwebkittester:

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

14 months agoCrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: std::optio...
dino@apple.com [Thu, 19 Jul 2018 23:17:41 +0000 (23:17 +0000)]
CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: std::optional<WTF::Vector<WebCore::PluginInfo, 0ul, WTF::CrashOnOverflow, 16ul> >::operator* & + 73
https://bugs.webkit.org/show_bug.cgi?id=187820
<rdar://problem/42017759>

Reviewed by Antoine Quint.

Speculative fix for this crash, which is accessing an optional without checking
if it exists. The crash logs didn't point to a reproducible test case.

* plugins/PluginData.cpp:
(WebCore::PluginData::supportsWebVisibleMimeTypeForURL const): Return false if
the optional doesn't exist.

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

14 months ago[WinCairo] Support DEVELOPER_MODE for allowing inspection of web inspector
stephan.szabo@sony.com [Thu, 19 Jul 2018 23:11:24 +0000 (23:11 +0000)]
[WinCairo] Support DEVELOPER_MODE for allowing inspection of web inspector
https://bugs.webkit.org/show_bug.cgi?id=187786

Reviewed by Fujii Hironori.

.:

* Source/cmake/OptionsWinCairo.cmake: Add ENABLE_DEVELOPER_MODE
to build when DEVELOPER_MODE is turned on at cmake time.

Tools:

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject): Turn on DEVELOPER_MODE
for WinCairo builds.

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

14 months agoMove WebFrameListenerProxy to WebFramePolicyListenerProxy, its only subclass
achristensen@apple.com [Thu, 19 Jul 2018 23:11:11 +0000 (23:11 +0000)]
Move WebFrameListenerProxy to WebFramePolicyListenerProxy, its only subclass
https://bugs.webkit.org/show_bug.cgi?id=187825

Reviewed by Brady Eidson.

* CMakeLists.txt:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
* UIProcess/Automation/WebAutomationSession.cpp:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/RemoteWebInspectorProxy.cpp:
* UIProcess/WebFormSubmissionListenerProxy.h:
(WebKit::WebFormSubmissionListenerProxy::create):
(WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy):
* UIProcess/WebFrameListenerProxy.cpp: Removed.
* UIProcess/WebFrameListenerProxy.h: Removed.
* UIProcess/WebFramePolicyListenerProxy.cpp:
(WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
(WebKit::WebFramePolicyListenerProxy::receivedPolicyDecision):
(WebKit::WebFramePolicyListenerProxy::changeWebsiteDataStore):
(WebKit::WebFramePolicyListenerProxy::invalidate):
(WebKit::WebFramePolicyListenerProxy::isMainFrame const):
(WebKit::WebFramePolicyListenerProxy::setNavigation):
* UIProcess/WebFramePolicyListenerProxy.h:
(WebKit::WebFramePolicyListenerProxy::listenerID const):
(WebKit::WebFramePolicyListenerProxy::operator new): Deleted.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::activePolicyListenerProxy):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebProcessPool.cpp:
* UIProcess/ios/ViewGestureControllerIOS.mm:
* UIProcess/mac/ViewGestureControllerMac.mm:
* UIProcess/mac/WKInspectorViewController.mm:
* WebKit.xcodeproj/project.pbxproj:

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

14 months agoPlatformThread::Run does not need to log the fact that it is running
cdumez@apple.com [Thu, 19 Jul 2018 22:56:39 +0000 (22:56 +0000)]
PlatformThread::Run does not need to log the fact that it is running
https://bugs.webkit.org/show_bug.cgi?id=187801i
<rdar://problem/40331421>

Patch by Youenn Fablet <youenn@apple.com> on 2018-07-19
Reviewed by Chris Dumez.

* Source/webrtc/rtc_base/platform_thread.cc:

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

14 months agoEnsure DocumentTimeline is kept alive until the VM::whenIdle callback is called
graouts@webkit.org [Thu, 19 Jul 2018 21:55:41 +0000 (21:55 +0000)]
Ensure DocumentTimeline is kept alive until the VM::whenIdle callback is called
https://bugs.webkit.org/show_bug.cgi?id=187692

Reviewed by Ryosuke Niwa.

Ensure we keep the DocumentTimeline alive until the VM::whenIdle callback is called.

* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime):

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

14 months agoAdd benchmark for WebKit process launch times
commit-queue@webkit.org [Thu, 19 Jul 2018 21:54:48 +0000 (21:54 +0000)]
Add benchmark for WebKit process launch times
https://bugs.webkit.org/show_bug.cgi?id=186414

Patch by Ben Richards <benton_richards@apple.com> on 2018-07-19
Reviewed by Ryosuke Niwa.

Added two benchmarks, one for measuring browser new tab launch time and one for browser startup time.

* LaunchTime/.gitignore: Added.
* LaunchTime/feedback_client.html: Added.
Displays benchmark progress in browser
* LaunchTime/feedback_server.py: Added.
(FeedbackServer): Sends data to feedback_client via websocket
(FeedbackServer.__init__):
(FeedbackServer._create_app):
(FeedbackServer._start_server):
(FeedbackServer._send_all_messages):
(FeedbackServer.start):
(FeedbackServer.stop):
(FeedbackServer.send_message): Send a message to the feedback_client
(FeedbackServer.wait_until_client_has_loaded): Wait until the feedback_client has opened a websocket connection to the feedback_server
(FeedbackServer.MainHandler): Handler factory to create handler that serves feedback_client.html
(FeedbackServer.MainHandler.Handler):
(FeedbackServer.MainHandler.Handler.get):
(FeedbackServer.WSHandler): Handler factory to create handler that sends data to feedback client
(FeedbackServer.WSHandler.Handler):
(FeedbackServer.WSHandler.Handler.open): On websocket connection opened
(FeedbackServer.WSHandler.Handler.on_close): On websocket connection closed
* LaunchTime/launch_time.py: Added.
(DefaultLaunchTimeHandler): Abstract HTTP request handler for launch time benchmarks
(DefaultLaunchTimeHandler.get_test_page): Default test page to be overridden by benchmarks
(DefaultLaunchTimeHandler.get_blank_page):
(DefaultLaunchTimeHandler.on_receive_stop_time):
(DefaultLaunchTimeHandler.do_HEAD):
(DefaultLaunchTimeHandler.do_GET):
(DefaultLaunchTimeHandler.do_POST):
(DefaultLaunchTimeHandler.log_message): Suppresses HTTP logs from SimpleHTTPRequestHandler
(LaunchTimeBenchmark): Abstract class which launch time benchmarks inherit from and override methods desired to customize
(LaunchTimeBenchmark.__init__):
(LaunchTimeBenchmark._parse_browser_bundle_path): Parser for bundle path option
(LaunchTimeBenchmark._parse_args):
(LaunchTimeBenchmark._run_server): Target function for main server thread
(LaunchTimeBenchmark._setup_servers):
(LaunchTimeBenchmark._clean_up):
(LaunchTimeBenchmark._exit_due_to_exception):
(LaunchTimeBenchmark._geometric_mean):
(LaunchTimeBenchmark._standard_deviation):
(LaunchTimeBenchmark._compute_results): Returns mean and std dev of list of results and pretty prints if should_print=True is specified
(LaunchTimeBenchmark._wait_times): Mimic numpy.linspace
(LaunchTimeBenchmark.open_tab): Open a browser tab with the html given by self.response_handler.get_test_page
(LaunchTimeBenchmark.launch_browser): Open a broser to either the feedback client (if option is set) or a blank page
(LaunchTimeBenchmark.quit_browser):
(LaunchTimeBenchmark.quit_browser.quit_app):
(LaunchTimeBenchmark.quit_browser.is_app_closed):
(LaunchTimeBenchmark.close_tab):
(LaunchTimeBenchmark.wait):
(LaunchTimeBenchmark.log): Print to console and send to feedback client if --feedback-in-browser flag is used
(LaunchTimeBenchmark.log_verbose): Only logs if --verbose flag is used
(LaunchTimeBenchmark.run):
(LaunchTimeBenchmark.group_init): Initialization done before each round of iterations
(LaunchTimeBenchmark.run_iteration):
(LaunchTimeBenchmark.initialize): Convenience method to be overriden by subclasses which is called at the end of __init__
(LaunchTimeBenchmark.will_parse_arguments): Called before argparse.parse_args to let subclasses add new command line arguments
(LaunchTimeBenchmark.did_parse_arguments): Called after argparse.parse_args to let subclass initialize based on command line arguments
* LaunchTime/new_tab.py: Added
(NewTabBenchmark):
(NewTabBenchmark._parse_wait_time): Parser for wait time option
(NewTabBenchmark.initialize):
(NewTabBenchmark.run_iteration):
(NewTabBenchmark.group_init):
(NewTabBenchmark.will_parse_arguments):
(NewTabBenchmark.did_parse_arguments):
(NewTabBenchmark.ResponseHandler):
(NewTabBenchmark.ResponseHandler.Handler):
(NewTabBenchmark.ResponseHandler.Handler.get_test_page):
* LaunchTime/startup.py: Added
(StartupBenchmark): This benchmark measures browser startup time and initial page load time
(StartupBenchmark.initialize):
(StartupBenchmark.run_iteration):
(StartupBenchmark.ResponseHandler):
(StartupBenchmark.ResponseHandler.Handler):
(StartupBenchmark.ResponseHandler.Handler.get_test_page):
* LaunchTime/thirdparty/__init__.py: Added.
(AutoinstallImportHook): Auto installs tornado package for feedback server
(AutoinstallImportHook.__init__):
(AutoinstallImportHook._ensure_autoinstalled_dir_is_in_sys_path):
(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_tornado):
(AutoinstallImportHook.greater_than_equal_to_version):
(AutoinstallImportHook._install):
(AutoinstallImportHook.get_latest_pypi_url):
(AutoinstallImportHook.install_binary):
(autoinstall_everything):
(get_os_info):

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

14 months agoSetting foreground color when editing should take color-filter into account, and...
simon.fraser@apple.com [Thu, 19 Jul 2018 21:18:27 +0000 (21:18 +0000)]
Setting foreground color when editing should take color-filter into account, and report the correct foreground color for collapsed selections
https://bugs.webkit.org/show_bug.cgi?id=187778

Reviewed by Ryosuke Niwa.
Source/WebCore:

Fix two aspects of editing with color-filter:

1. When setting foreground color, inverse-transform the color through -apple-color-filter so that the user gets the color
   they chose when in Dark Mode. Tested by editing/style/exec-command-foreColor-with-color-filter.html.

2. When retrieving the style of the collapsed selection, take color filter into account so that color picker
   reflects the color the users sees, instead of the content color. Tested by editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html

Add two additional tests that ensure that -apple-color-filter does not impact the NSAttributedString code
path, since -apple-color-filter should not affect the behavior of Copy.

Tests: editing/mac/attributed-string/attrib-string-colors-with-color-filter.html
       editing/mac/attributed-string/attrib-string-range-with-color-filter.html
       editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html
       editing/style/exec-command-foreColor-with-color-filter.html

* editing/EditingStyle.cpp:
(WebCore::StyleChange::StyleChange):
(WebCore::StyleChange::extractTextStyles):
* editing/EditingStyle.h:
* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::fontAttributesForSelectionStart const):
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::InvertLightnessFilterOperation::inverseTransformColor const):
* platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::inverseTransformColor const):
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::transformColor const):
(WebCore::FilterOperations::inverseTransformColor const):
* platform/graphics/filters/FilterOperations.h:

LayoutTests:

* editing/mac/attributed-string/attrib-string-colors-with-color-filter-expected.txt: Added.
* editing/mac/attributed-string/attrib-string-colors-with-color-filter.html: Added.
* editing/mac/attributed-string/attrib-string-range-with-color-filter-expected.txt: Added.
* editing/mac/attributed-string/attrib-string-range-with-color-filter.html: Added.
* editing/mac/attributed-string/attributed-string-for-typing-with-color-filter-expected.txt: Added.
* editing/mac/attributed-string/attributed-string-for-typing-with-color-filter.html: Added.
* editing/style/exec-command-foreColor-with-color-filter-expected.txt: Added.
* editing/style/exec-command-foreColor-with-color-filter.html: Added.

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

14 months agoProvide an lldb type summary for WebCore::Color
dino@apple.com [Thu, 19 Jul 2018 21:05:19 +0000 (21:05 +0000)]
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Another attempted build fix for Debug.

* lldb/lldbWebKitTester/Configurations/Base.xcconfig:
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:

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

14 months agoUnreviewed, rolling out r233994.
david_fenton@apple.com [Thu, 19 Jul 2018 20:51:48 +0000 (20:51 +0000)]
Unreviewed, rolling out r233994.

Caused EWS and bot failures due to assertions added

Reverted changeset:

"FetchResponse should close its stream when loading finishes"
https://bugs.webkit.org/show_bug.cgi?id=187790
https://trac.webkit.org/changeset/233994

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

14 months agoREGRESSION(r233926): media/modern-media-controls/media-controller/media-controller...
jer.noble@apple.com [Thu, 19 Jul 2018 20:48:43 +0000 (20:48 +0000)]
REGRESSION(r233926): media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html is a TIMEOUT failure
https://bugs.webkit.org/show_bug.cgi?id=187813

Reviewed by Jon Lee.

In r233926, we changed the behavior of entering PiP to exit fullscreen only after entering PiP completes. The
test in question will immediately request "inline" presentation mode once the PiP animation begins, and thus
it's asking to "exit fullscreen" when both in standard fullscreen and also in PiP. The fix is not to bail out
early if we're in standard (element) fullscreen, but to allow the remaining steps to complete and exit PiP as
well.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::exitFullscreen):

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

14 months ago[WHLSL] The interpreter doesn't support boolean short-circuiting
commit-queue@webkit.org [Thu, 19 Jul 2018 20:42:20 +0000 (20:42 +0000)]
[WHLSL] The interpreter doesn't support boolean short-circuiting
https://bugs.webkit.org/show_bug.cgi?id=187779

Patch by Thomas Denney <tdenney@apple.com> on 2018-07-19
Reviewed by Alex Christensen.

* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype.visitLogicalExpression): RHS is only evaluated when necessary
* WebGPUShadingLanguageRI/Test.js:
(tests.booleanShortcircuiting): Adds 4 tests for the evaluation of logical expresions

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

14 months ago[LFC] Introduce simple line breaker.
zalan@apple.com [Thu, 19 Jul 2018 20:36:13 +0000 (20:36 +0000)]
[LFC] Introduce simple line breaker.
https://bugs.webkit.org/show_bug.cgi?id=187688

Reviewed by Antti Koivisto.

This patch takes the simple line layout implementation and refactors it in a way it is no longer requires a RenderBlockFlow object to run on.
Also this patch decouples text run generation and line breaking (and this implementation is going to replace the current simple line layout codebase)

TextContentProvider: Acts both as the container for all the text content (including hard line breaks) and as an iterator for the generated text runs.
SimpleTextRunGenerator: TextContentProvider uses it as the text run generator for simple content (in the future we'll have a ComplexTextRunGenerator).
SimpleLineBreaker: Input -> text runs + line constraints; Output -> layout runs after line breaking.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/inlineformatting/textlayout/ContentProvider.cpp: Added.
(WebCore::Layout::TextContentProvider::TextItem::Style::Style):
(WebCore::Layout::TextContentProvider::ContentProvider):
(WebCore::Layout::TextContentProvider::~ContentProvider):
(WebCore::Layout::TextContentProvider::appendText):
(WebCore::Layout::TextContentProvider::appendLineBreak):
(WebCore::Layout::TextContentProvider::width const):
(WebCore::Layout::TextContentProvider::textWidth const):
(WebCore::Layout::TextContentProvider::fixedPitchWidth const):
(WebCore::Layout::TextContentProvider::toTextItemIndex const):
(WebCore::Layout::TextContentProvider::length const):
(WebCore::Layout::TextContentProvider::iterator):
(WebCore::Layout::TextContentProvider::findNextRun):
(WebCore::Layout::TextContentProvider::current const):
* layout/inlineformatting/textlayout/ContentProvider.h: Added.
(WebCore::Layout::TextContentProvider::textContent const):
(WebCore::Layout::TextContentProvider::hardLineBreaks const):
(WebCore::Layout::TextContentProvider::Iterator::current const):
(WebCore::Layout::TextContentProvider::contains const):
(WebCore::Layout::TextContentProvider::Iterator::Iterator):
(WebCore::Layout::TextContentProvider::Iterator::operator++):
* layout/inlineformatting/textlayout/Runs.h: Added.
(WebCore::Layout::TextRun::isWhitespace const):
(WebCore::Layout::TextRun::isNonWhitespace const):
(WebCore::Layout::TextRun::isLineBreak const):
(WebCore::Layout::TextRun::isSoftLineBreak const):
(WebCore::Layout::TextRun::isHardLineBreak const):
(WebCore::Layout::TextRun::isValid const):
(WebCore::Layout::TextRun::isCollapsed const):
(WebCore::Layout::TextRun::type const):
(WebCore::Layout::TextRun::setIsCollapsed):
(WebCore::Layout::TextRun::setWidth):
(WebCore::Layout::LayoutRun::start const):
(WebCore::Layout::LayoutRun::end const):
(WebCore::Layout::LayoutRun::length const):
(WebCore::Layout::LayoutRun::left const):
(WebCore::Layout::LayoutRun::right const):
(WebCore::Layout::LayoutRun::width const):
(WebCore::Layout::LayoutRun::isEndOfLine const):
(WebCore::Layout::LayoutRun::setEnd):
(WebCore::Layout::LayoutRun::setRight):
(WebCore::Layout::LayoutRun::setIsEndOfLine):
(WebCore::Layout::LayoutRun::LayoutRun):
(WebCore::Layout::TextRun::createWhitespaceRun):
(WebCore::Layout::TextRun::createNonWhitespaceRun):
(WebCore::Layout::TextRun::createSoftLineBreakRun):
(WebCore::Layout::TextRun::createHardLineBreakRun):
(WebCore::Layout::TextRun::TextRun):
(WebCore::Layout::TextRun::start const):
(WebCore::Layout::TextRun::end const):
(WebCore::Layout::TextRun::length const):
(WebCore::Layout::TextRun::width const):
* layout/inlineformatting/textlayout/simple/SimpleContentProvider.cpp: Added.
(WebCore::Layout::SimpleContentProvider::SimpleContentProvider):
(WebCore::Layout::SimpleContentProvider::current const):
(WebCore::Layout::SimpleContentProvider::reset):
(WebCore::Layout::SimpleContentProvider::findNextRun):
(WebCore::Layout::SimpleContentProvider::moveToNextBreakablePosition):
(WebCore::Layout::SimpleContentProvider::moveToNextNonWhitespacePosition):
(WebCore::Layout::SimpleContentProvider::isAtLineBreak const):
(WebCore::Layout::SimpleContentProvider::isAtSoftLineBreak const):
* layout/inlineformatting/textlayout/simple/SimpleContentProvider.h: Added.
(WebCore::Layout::SimpleContentProvider::Iterator::reset):
(WebCore::Layout::SimpleContentProvider::Position::operator== const):
(WebCore::Layout::SimpleContentProvider::Position::operator< const):
(WebCore::Layout::SimpleContentProvider::Position::operator ContentPosition const):
(WebCore::Layout::SimpleContentProvider::Position::resetItemPosition):
(WebCore::Layout::SimpleContentProvider::Position::contentPosition const):
(WebCore::Layout::SimpleContentProvider::Position::itemPosition const):
(WebCore::Layout::SimpleContentProvider::Iterator<T>::Iterator):
(WebCore::Layout::SimpleContentProvider::Iterator<T>::current const):
(WebCore::Layout::SimpleContentProvider::Iterator<T>::operator):
(WebCore::Layout::SimpleContentProvider::Position::operator++):
(WebCore::Layout::SimpleContentProvider::Position::operator+=):
* layout/inlineformatting/textlayout/simple/SimpleLineBreaker.cpp: Added.
(WebCore::Layout::SimpleLineBreaker::TextRunList::TextRunList):
(WebCore::Layout::SimpleLineBreaker::Line::Line):
(WebCore::Layout::adjustedEndPosition):
(WebCore::Layout::SimpleLineBreaker::Line::append):
(WebCore::Layout::SimpleLineBreaker::Line::collapseTrailingWhitespace):
(WebCore::Layout::SimpleLineBreaker::Line::reset):
(WebCore::Layout::SimpleLineBreaker::Style::Style):
(WebCore::Layout::SimpleLineBreaker::SimpleLineBreaker):
(WebCore::Layout::SimpleLineBreaker::runs):
(WebCore::Layout::SimpleLineBreaker::createRunsForLine):
(WebCore::Layout::SimpleLineBreaker::handleOverflownRun):
(WebCore::Layout::SimpleLineBreaker::collapseLeadingWhitespace):
(WebCore::Layout::SimpleLineBreaker::collapseTrailingWhitespace):
(WebCore::Layout::SimpleLineBreaker::splitTextRun):
(WebCore::Layout::SimpleLineBreaker::split const):
(WebCore::Layout::SimpleLineBreaker::availableWidth const):
(WebCore::Layout::SimpleLineBreaker::verticalPosition const):
* layout/inlineformatting/textlayout/simple/SimpleLineBreaker.h: Added.
(WebCore::Layout::SimpleLineBreaker::TextRunList::overrideCurrent):
(WebCore::Layout::SimpleLineBreaker::TextRunList::isCurrentOverridden const):
(WebCore::Layout::SimpleLineBreaker::Line::availableWidth const):
(WebCore::Layout::SimpleLineBreaker::Line::hasContent const):
(WebCore::Layout::SimpleLineBreaker::Line::setAvailableWidth):
(WebCore::Layout::SimpleLineBreaker::Line::hasTrailingWhitespace const):
(WebCore::Layout::SimpleLineBreaker::Line::isWhitespaceOnly const):
(WebCore::Layout::SimpleLineBreaker::wrapContentOnOverflow const):
(WebCore::Layout::SimpleLineBreaker::TextRunList::current const):
(WebCore::Layout::SimpleLineBreaker::TextRunList::operator++):

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

14 months agoUnreviewed, rolling out r233998.
commit-queue@webkit.org [Thu, 19 Jul 2018 19:43:00 +0000 (19:43 +0000)]
Unreviewed, rolling out r233998.
https://bugs.webkit.org/show_bug.cgi?id=187815

Not needed. (Requested by mlam|a on #webkit).

Reverted changeset:

"Temporarily mitigate a bug where a source provider is null
when it shouldn't be."
https://bugs.webkit.org/show_bug.cgi?id=187812
https://trac.webkit.org/changeset/233998

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

14 months agoTemporarily mitigate a bug where a source provider is null when it shouldn't be.
mark.lam@apple.com [Thu, 19 Jul 2018 19:28:08 +0000 (19:28 +0000)]
Temporarily mitigate a bug where a source provider is null when it shouldn't be.
https://bugs.webkit.org/show_bug.cgi?id=187812
<rdar://problem/41192691>

Reviewed by Michael Saboff.

Adding a null check to temporarily mitigate https://bugs.webkit.org/show_bug.cgi?id=187811.

* runtime/Error.cpp:
(JSC::addErrorInfo):

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

14 months agoRemove duplicate compilation of WebKitNSImageExtras.mm
krollin@apple.com [Thu, 19 Jul 2018 19:06:36 +0000 (19:06 +0000)]
Remove duplicate compilation of WebKitNSImageExtras.mm
https://bugs.webkit.org/show_bug.cgi?id=187782

Reviewed by Alex Christensen.

WebKitNSImageExtras.mm gets compiled twice, once because it's in
WebCore.xcodeproj/project.pbxproj and once because it's in
Webcore/SourcesCocoa.txt. This can lead to duplicate definition
errors, particularly when building with LTO enabled. Fix this by
removing the entry from the Xcode project.

No new tests -- no change in WebKit functionality.

* WebCore.xcodeproj/project.pbxproj:

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

14 months agoFetchResponse should close its stream when loading finishes
youenn@apple.com [Thu, 19 Jul 2018 18:32:53 +0000 (18:32 +0000)]
FetchResponse should close its stream when loading finishes
https://bugs.webkit.org/show_bug.cgi?id=187790

Reviewed by Chris Dumez.

It simplifies for a FetchResponse to push all its data into its stream if already created at end of load time.
Did some refactoring in FetchBodyOwner to have a cleaner relationship with the stream source.
Did a minor refactoring to expose the error description when loading fails as part of the rejected promise.
This is consistent to errors sent back through callbacks.

Covered by existing tests.

* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::~FetchBodyOwner):
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchBodySource.cpp:
(WebCore::FetchBodySource::FetchBodySource):
(WebCore::FetchBodySource::setActive):
(WebCore::FetchBodySource::setInactive):
(WebCore::FetchBodySource::doStart):
(WebCore::FetchBodySource::doPull):
(WebCore::FetchBodySource::doCancel):
(WebCore::FetchBodySource::cleanBodyOwner):
* Modules/fetch/FetchBodySource.h:
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::didFail):

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

14 months ago[ win-ews ] http/tests/preload/onload_event.html is flakey crash on win-ews
tsavell@apple.com [Thu, 19 Jul 2018 18:07:47 +0000 (18:07 +0000)]
[ win-ews ] http/tests/preload/onload_event.html is flakey crash on win-ews
https://bugs.webkit.org/show_bug.cgi?id=187809

Unreviewed test gardening.

* platform/win/TestExpectations:

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

14 months agoUpdate iOS fullscreen alert text again
jonlee@apple.com [Thu, 19 Jul 2018 17:45:14 +0000 (17:45 +0000)]
Update iOS fullscreen alert text again
https://bugs.webkit.org/show_bug.cgi?id=187797
rdar://problem/42373783

Reviewed by Jer Noble.

Source/WebCore:

* English.lproj/Localizable.strings:

Source/WebKit:

* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(-[WKFullScreenViewController _showPhishingAlert]):

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

14 months agoAdjust WEBCORE_EXPORT annotations for LTO
krollin@apple.com [Thu, 19 Jul 2018 17:43:35 +0000 (17:43 +0000)]
Adjust WEBCORE_EXPORT annotations for LTO
https://bugs.webkit.org/show_bug.cgi?id=187781
<rdar://problem/42351124>

Reviewed by Alex Christensen.

Continuation of Bug 186944. This bug addresses issues not caught
during the first pass of adjustments. The initial work focussed on
macOS; this one addresses issues found when building for iOS. From
186944:

Adjust a number of places that result in WebKit's
'check-for-weak-vtables-and-externals' script reporting weak external
symbols:

    ERROR: WebCore has a weak external symbol in it (/Volumes/Data/dev/webkit/OpenSource/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore)
    ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library.
    ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file.
    ...

These cases are caused by inline methods being marked with WTF_EXPORT
(or related macro) or with an inline function being in a class marked
as such, and when enabling LTO builds.

For the most part, address these by removing the WEBCORE_EXPORT
annotation from inline methods. In some cases, move the implementation
out-of-line because it's the class that has the WEBCORE_EXPORT on it
and removing the annotation from the class would be too disruptive.
Finally, in other cases, move the implementation out-of-line because
check-for-weak-vtables-and-externals still complains when keeping the
implementation inline and removing the annotation; this seems to
typically (but not always) happen with destructors.

Source/JavaScriptCore:

* inspector/remote/RemoteAutomationTarget.cpp:
(Inspector::RemoteAutomationTarget::~RemoteAutomationTarget):
* inspector/remote/RemoteAutomationTarget.h:
* inspector/remote/RemoteInspector.cpp:
(Inspector::RemoteInspector::Client::~Client):
* inspector/remote/RemoteInspector.h:

Source/WebCore:

No new tests. There is no changed functionality. Only the annotation
and treatment of inline methods are altered.

* platform/graphics/FourCC.h:
(WebCore::FourCC::FourCC):
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::IntPoint):
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::Observer::~Observer):
(WebCore::RealtimeMediaSource::AudioCaptureFactory::~AudioCaptureFactory):
(WebCore::RealtimeMediaSource::VideoCaptureFactory::~VideoCaptureFactory):
* platform/mediastream/RealtimeMediaSource.h:
* workers/service/ServiceWorkerProvider.cpp:
(WebCore::ServiceWorkerProvider::~ServiceWorkerProvider):
* workers/service/ServiceWorkerProvider.h:

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

14 months agoWeb Inspector: Dark Mode: poor contrast for Search Tab's "the page's content has...
nvasilyev@apple.com [Thu, 19 Jul 2018 17:37:17 +0000 (17:37 +0000)]
Web Inspector: Dark Mode: poor contrast for Search Tab's "the page's content has changed" message
https://bugs.webkit.org/show_bug.cgi?id=187792

Reviewed by Brian Burg.

* UserInterface/Views/DarkMode.css:
(@media (prefers-dark-interface)):
(:root):
Make the background color slightly more yellow and less red. This slightly dicreases the contrast
but makes the text look less like an error.

* UserInterface/Views/SearchSidebarPanel.css:
(@media (prefers-dark-interface)):
(.sidebar > .panel.navigation.search.changed > .banner):

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

14 months agoProvide an lldb type summary for WebCore::Color
dino@apple.com [Thu, 19 Jul 2018 17:07:57 +0000 (17:07 +0000)]
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Attempted build fix.

* lldb/lldbWebKitTester/Configurations/Base.xcconfig:

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

14 months agoUnreviewed, check scope after performing getPropertySlot in JSON.stringify
utatane.tea@gmail.com [Thu, 19 Jul 2018 17:06:38 +0000 (17:06 +0000)]
Unreviewed, check scope after performing getPropertySlot in JSON.stringify
https://bugs.webkit.org/show_bug.cgi?id=187807

Properly putting EXCEPTION_ASSERT to tell our exception checker mechanism
that we know that exception occurrence and handle it well.

* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):

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

14 months agoAdd an SPI policy action to allow clients to explicitly ask for a new process on...
beidson@apple.com [Thu, 19 Jul 2018 16:56:58 +0000 (16:56 +0000)]
Add an SPI policy action to allow clients to explicitly ask for a new process on a navigation.
https://bugs.webkit.org/show_bug.cgi?id=187789

Reviewed by Andy Estes.

Source/WebKit:

At navigation policy time, when a client says "use/allow", they can now say "use/allow in a new process if possible"

* UIProcess/API/C/WKFramePolicyListener.cpp:
(WKFramePolicyListenerUseInNewProcess):
(WKFramePolicyListenerUseInNewProcessWithPolicies):
* UIProcess/API/C/WKFramePolicyListener.h:

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

* UIProcess/WebFrameListenerProxy.h:
(WebKit::WebFrameListenerProxy::setApplyPolicyInNewProcessIfPossible):
(WebKit::WebFrameListenerProxy::applyPolicyInNewProcessIfPossible const):

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

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):
* UIProcess/WebProcessPool.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate init]):
(-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):

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

14 months ago[GStreamer] Return a valid time values in unprerolled states
cturner@igalia.com [Thu, 19 Jul 2018 14:51:15 +0000 (14:51 +0000)]
[GStreamer] Return a valid time values in unprerolled states
https://bugs.webkit.org/show_bug.cgi?id=187111

Reviewed by Xabier Rodriguez-Calvar.

After r230584 in bug 180253, asserts were added in
PlatformTimeRanges::add to check that both ends of the range were
valid times. In the non-MSE GStreamer player, this assert was
firing on https://www.w3.org/2010/05/video/mediaevents.html due to
seekable being called in nonprerolled states. In this case
MediaPlayerPrivateInterface::seekable was calling GStreamer's
maxTimeSeekable, which calls in durationMediaTime. The guard
against calling gst_element_query_duration when not prerolled was
returning a different time value than when the duration query
itself failed. Hence the assert firing.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):

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

14 months agoEnsure experimentalPlugInSandboxProfilesEnabled is set on PluginProcess
youenn@apple.com [Thu, 19 Jul 2018 14:39:50 +0000 (14:39 +0000)]
Ensure experimentalPlugInSandboxProfilesEnabled is set on PluginProcess
https://bugs.webkit.org/show_bug.cgi?id=187729

Reviewed by Ryosuke Niwa.

experimentalPlugInSandboxProfilesEnabled flag is used at initialization of the plugin process sandbox.
This flag value should be set according to the value of this flag in the UIProcess.
We set this value in the plugin process manager.
At launch of the plugin process, this flag will also be passed to it so that it is set properly.

* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPluginSandboxProfilesEnabledForAllPlugins):
(WKPreferencesGetPluginSandboxProfilesEnabledForAllPlugins):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setExperimentalPlugInSandboxProfilesEnabled:]):
(-[WKPreferences _experimentalPlugInSandboxProfilesEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/Plugins/PluginProcessManager.h:
(WebKit::PluginProcessManager::experimentalPlugInSandboxProfilesEnabled const):
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
(WebKit::PluginProcessManager::setExperimentalPlugInSandboxProfilesEnabled):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptions):

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

14 months agoHitting RELEASE_ASSERT(!m_activeDOMObjectAdditionForbidden) under HTMLMediaElement...
commit-queue@webkit.org [Thu, 19 Jul 2018 13:38:16 +0000 (13:38 +0000)]
Hitting RELEASE_ASSERT(!m_activeDOMObjectAdditionForbidden) under HTMLMediaElement::resume()
https://bugs.webkit.org/show_bug.cgi?id=187793
<rdar://problem/42308469>

Patch by Antoine Quint <graouts@apple.com> on 2018-07-19
Reviewed by Chris Dumez.

Ensure we do not call JS under resume(), which would happen as a result of calling configureMediaControls() in prepareForLoad().

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::contextDestroyed):
(WebCore::HTMLMediaElement::stop):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
* html/HTMLMediaElement.h:

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

14 months ago[GStreamer][MSE] imported/w3c/web-platform-tests/media-source/mediasource-is-type...
philn@webkit.org [Thu, 19 Jul 2018 12:53:29 +0000 (12:53 +0000)]
[GStreamer][MSE] imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html crashes
https://bugs.webkit.org/show_bug.cgi?id=187469

Reviewed by Žan Doberšek.

* platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcFreeStream): Fix critical warning. The appsrc
element is created only when a valid sourcebuffer is in use.

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

14 months agoFix message of NotSupportedError exception thrown during custom element creation
commit-queue@webkit.org [Thu, 19 Jul 2018 10:19:29 +0000 (10:19 +0000)]
Fix message of NotSupportedError exception thrown during custom element creation
https://bugs.webkit.org/show_bug.cgi?id=187757

Patch by Frederic Wang <fwang@igalia.com> on 2018-07-19
Reviewed by Yusuke Suzuki.

Source/WebCore:

In bug 161528, some new exceptions were introduced for custom element creation [1] but the
actual text has some issues. This patch fixes one typo and one wrong message.

[1] https://dom.spec.whatwg.org/#concept-create-element

Test: fast/custom-elements/exceptions-for-synchronous-custom-element-creation.html

* bindings/js/JSCustomElementInterface.cpp:
(WebCore::constructCustomElementSynchronously):

LayoutTests:

* fast/custom-elements/exceptions-for-synchronous-custom-element-creation-expected.txt: Added.
* fast/custom-elements/exceptions-for-synchronous-custom-element-creation.html: Added.

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

14 months ago[Flatpak] Let flatpak process handle SIGINT
commit-queue@webkit.org [Thu, 19 Jul 2018 08:24:27 +0000 (08:24 +0000)]
[Flatpak] Let flatpak process handle SIGINT
https://bugs.webkit.org/show_bug.cgi?id=187521

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-19
Reviewed by Philippe Normand.

Ensuring that flatpak process ends properly and that the sandbox is teard down.
It also avoids showing usless backtrace to the end user and makes gdb
much more usable.

Also make flatpakutils not verbose by default

* flatpak/flatpakutils.py:
(disable_signals):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.run_gdb):

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

14 months agoLet clients override _WKThumbnailView's background color
rmondello@apple.com [Thu, 19 Jul 2018 01:19:40 +0000 (01:19 +0000)]
Let clients override _WKThumbnailView's background color

https://bugs.webkit.org/show_bug.cgi?id=187788

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/_WKThumbnailView.h: Declare a property.
* UIProcess/API/Cocoa/_WKThumbnailView.mm: Define an ivar.
(-[_WKThumbnailView updateLayer]): Consult the background color.
(-[_WKThumbnailView setOverrideBackgroundColor:]): Notably, call -updateLayer.
(-[_WKThumbnailView overrideBackgroundColor]): Added.

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

14 months agoUnreviewed. Fix contributors entry.
stephan.szabo@sony.com [Thu, 19 Jul 2018 01:01:25 +0000 (01:01 +0000)]
Unreviewed. Fix contributors entry.

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

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

14 months agoProvide an lldb type summary for WebCore::Color
dino@apple.com [Thu, 19 Jul 2018 00:47:57 +0000 (00:47 +0000)]
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776

Reviewed by Dan Bates.

* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit
    to get to WebCore.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders): Create some Color objects for testing.

* lldb/lldb_webkit.py: Add a Color summary provider.
(__lldb_init_module):
(WebCoreColor_SummaryProvider):
(WebCoreColorProvider):
(WebCoreColorProvider.__init__):
(WebCoreColorProvider._is_extended):
(WebCoreColorProvider._is_valid):
(WebCoreColorProvider._is_semantic):
(WebCoreColorProvider._to_string_extended):
(WebCoreColorProvider.to_string):

* lldb/lldb_webkit_unittest.py: Tests.
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color):

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

14 months agoUnreviewed, rolling out r233934.
tsavell@apple.com [Thu, 19 Jul 2018 00:38:27 +0000 (00:38 +0000)]
Unreviewed, rolling out r233934.

Revision caused 5 webkitpy failures on Mac and broke webkitpy
testing on iOS simulator

Reverted changeset:

"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/233934

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

14 months agoREGRESSION (r233897): CrashTracer: com.apple.WebKit.WebContent.Development at com...
cdumez@apple.com [Wed, 18 Jul 2018 23:33:22 +0000 (23:33 +0000)]
REGRESSION (r233897): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebKit: WKBooleanGetValue + 9
https://bugs.webkit.org/show_bug.cgi?id=187784
<rdar://problem/42329230>

Reviewed by Brady Eidson.

When process swapping on navigation, WebPageProxy::reattachToWebProcess() unregisters the page as a MessageReceiver
from the old WebProcessProxy and registers itself as a MessageReceiver for the new WebProcessProxy instead. This
means that after this point, IPC sent by the previous WebProcess to its WebPageProxy will fail.

When we process swap, we also navigate the page in the old WebProcess to about:blank, when the navigation to
about:blank would complete, the WebKitTestRunner's injected bundle would try and send IPC to the WebPageProxy
which would fail and would cause WKBundlePagePostSynchronousMessageForTesting() to return a null result. WKTR
would crash when dereferencing this null result. This patch addresses this by dealing with the potential null
result.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::shouldProcessWorkQueue const):

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

14 months agoCRASH at WebKit: WebKit::WebFullScreenManagerProxy::saveScrollPosition
jer.noble@apple.com [Wed, 18 Jul 2018 23:29:57 +0000 (23:29 +0000)]
CRASH at WebKit: WebKit::WebFullScreenManagerProxy::saveScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=187769
<rdar://problem/42160666>

Reviewed by Tim Horton.

Null-check all uses of _page and _manager in WKFullScreenWindowControllerIOS.

* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(WebKit::WKWebViewState::applyTo):
(WebKit::WKWebViewState::store):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):

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

14 months agoWebContent crash in WebProcess::ensureNetworkProcessConnection
cdumez@apple.com [Wed, 18 Jul 2018 23:13:36 +0000 (23:13 +0000)]
WebContent crash in WebProcess::ensureNetworkProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=187791
<rdar://problem/41995022>

Reviewed by Ryosuke Niwa.

If the WebProcessProxy::GetNetworkProcessConnection synchronous IPC between the WebProcess
and the UIProcess succeeded but we received an invalid connection identifier, then try
once more. This may indicate the network process has crashed, in which case it will be
relaunched.

* WebProcess/WebProcess.cpp:
(WebKit::getNetworkProcessConnection):
(WebKit::WebProcess::ensureNetworkProcessConnection):

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

14 months agoRebaseline fast/css/apple-system-colors.html.
ryanhaddad@apple.com [Wed, 18 Jul 2018 22:41:48 +0000 (22:41 +0000)]
Rebaseline fast/css/apple-system-colors.html.

Unreviewed test gardening.

* platform/mac/fast/css/apple-system-colors-expected.txt:

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

14 months ago[JSC] Reduce size of AST nodes
utatane.tea@gmail.com [Wed, 18 Jul 2018 22:36:34 +0000 (22:36 +0000)]
[JSC] Reduce size of AST nodes
https://bugs.webkit.org/show_bug.cgi?id=187689

Reviewed by Mark Lam.

We clean up AST nodes to reduce size. By doing so, we can reduce the memory consumption
of ParserArena at peak state.

1. Annotate `final` to AST nodes to make them solid. And it allows the compiler to
devirtualize a call to the function which are implemented in a final class.

2. Use default member initializers more.

3. And use `nullptr` instead of `0`.

4. Arrange the layout of AST nodes to reduce the size. It includes changing the order
of classes in multiple inheritance. In particular, StatementNode is decreased from 48
to 40. This decreases the sizes of all the derived Statement nodes.

* parser/NodeConstructors.h:
(JSC::Node::Node):
(JSC::StatementNode::StatementNode):
(JSC::ElementNode::ElementNode):
(JSC::ArrayNode::ArrayNode):
(JSC::PropertyListNode::PropertyListNode):
(JSC::ObjectLiteralNode::ObjectLiteralNode):
(JSC::ArgumentListNode::ArgumentListNode):
(JSC::ArgumentsNode::ArgumentsNode):
(JSC::NewExprNode::NewExprNode):
(JSC::BytecodeIntrinsicNode::BytecodeIntrinsicNode):
(JSC::BinaryOpNode::BinaryOpNode):
(JSC::LogicalOpNode::LogicalOpNode):
(JSC::CommaNode::CommaNode):
(JSC::SourceElements::SourceElements):
(JSC::ClauseListNode::ClauseListNode):
* parser/Nodes.cpp:
(JSC::FunctionMetadataNode::FunctionMetadataNode):
(JSC::FunctionMetadataNode::operator== const):
(JSC::FunctionMetadataNode::dump const):
* parser/Nodes.h:
(JSC::BooleanNode::value): Deleted.
(JSC::StringNode::value): Deleted.
(JSC::TemplateExpressionListNode::value): Deleted.
(JSC::TemplateExpressionListNode::next): Deleted.
(JSC::TemplateStringNode::cooked): Deleted.
(JSC::TemplateStringNode::raw): Deleted.
(JSC::TemplateStringListNode::value): Deleted.
(JSC::TemplateStringListNode::next): Deleted.
(JSC::TemplateLiteralNode::templateStrings const): Deleted.
(JSC::TemplateLiteralNode::templateExpressions const): Deleted.
(JSC::TaggedTemplateNode::templateLiteral const): Deleted.
(JSC::ResolveNode::identifier const): Deleted.
(JSC::ElementNode::elision const): Deleted.
(JSC::ElementNode::value): Deleted.
(JSC::ElementNode::next): Deleted.
(JSC::ArrayNode::elements const): Deleted.
(JSC::PropertyNode::expressionName const): Deleted.
(JSC::PropertyNode::name const): Deleted.
(JSC::PropertyNode::type const): Deleted.
(JSC::PropertyNode::needsSuperBinding const): Deleted.
(JSC::PropertyNode::isClassProperty const): Deleted.
(JSC::PropertyNode::isStaticClassProperty const): Deleted.
(JSC::PropertyNode::isInstanceClassProperty const): Deleted.
(JSC::PropertyNode::isOverriddenByDuplicate const): Deleted.
(JSC::PropertyNode::setIsOverriddenByDuplicate): Deleted.
(JSC::PropertyNode::putType const): Deleted.
(JSC::BracketAccessorNode::base const): Deleted.
(JSC::BracketAccessorNode::subscript const): Deleted.
(JSC::BracketAccessorNode::subscriptHasAssignments const): Deleted.
(JSC::DotAccessorNode::base const): Deleted.
(JSC::DotAccessorNode::identifier const): Deleted.
(JSC::SpreadExpressionNode::expression const): Deleted.
(JSC::ObjectSpreadExpressionNode::expression const): Deleted.
(JSC::BytecodeIntrinsicNode::type const): Deleted.
(JSC::BytecodeIntrinsicNode::emitter const): Deleted.
(JSC::BytecodeIntrinsicNode::identifier const): Deleted.
(JSC::TypeOfResolveNode::identifier const): Deleted.
(JSC::BitwiseNotNode::expr): Deleted.
(JSC::BitwiseNotNode::expr const): Deleted.
(JSC::AssignResolveNode::identifier const): Deleted.
(JSC::ExprStatementNode::expr const): Deleted.
(JSC::ForOfNode::isForAwait const): Deleted.
(JSC::ReturnNode::value): Deleted.
(JSC::ProgramNode::startColumn const): Deleted.
(JSC::ProgramNode::endColumn const): Deleted.
(JSC::EvalNode::startColumn const): Deleted.
(JSC::EvalNode::endColumn const): Deleted.
(JSC::ModuleProgramNode::startColumn const): Deleted.
(JSC::ModuleProgramNode::endColumn const): Deleted.
(JSC::ModuleProgramNode::moduleScopeData): Deleted.
(JSC::ModuleNameNode::moduleName): Deleted.
(JSC::ImportSpecifierNode::importedName): Deleted.
(JSC::ImportSpecifierNode::localName): Deleted.
(JSC::ImportSpecifierListNode::specifiers const): Deleted.
(JSC::ImportSpecifierListNode::append): Deleted.
(JSC::ImportDeclarationNode::specifierList const): Deleted.
(JSC::ImportDeclarationNode::moduleName const): Deleted.
(JSC::ExportAllDeclarationNode::moduleName const): Deleted.
(JSC::ExportDefaultDeclarationNode::declaration const): Deleted.
(JSC::ExportDefaultDeclarationNode::localName const): Deleted.
(JSC::ExportLocalDeclarationNode::declaration const): Deleted.
(JSC::ExportSpecifierNode::exportedName): Deleted.
(JSC::ExportSpecifierNode::localName): Deleted.
(JSC::ExportSpecifierListNode::specifiers const): Deleted.
(JSC::ExportSpecifierListNode::append): Deleted.
(JSC::ExportNamedDeclarationNode::specifierList const): Deleted.
(JSC::ExportNamedDeclarationNode::moduleName const): Deleted.
(JSC::ArrayPatternNode::appendIndex): Deleted.
(JSC::ObjectPatternNode::appendEntry): Deleted.
(JSC::ObjectPatternNode::setContainsRestElement): Deleted.
(JSC::ObjectPatternNode::setContainsComputedProperty): Deleted.
(JSC::DestructuringAssignmentNode::bindings): Deleted.
(JSC::FunctionParameters::size const): Deleted.
(JSC::FunctionParameters::append): Deleted.
(JSC::FunctionParameters::isSimpleParameterList const): Deleted.
(JSC::FuncDeclNode::metadata): Deleted.
(JSC::CaseClauseNode::expr const): Deleted.
(JSC::CaseClauseNode::setStartOffset): Deleted.
(JSC::ClauseListNode::getClause const): Deleted.
(JSC::ClauseListNode::getNext const): Deleted.
* runtime/ExceptionHelpers.cpp:
* runtime/JSObject.cpp:

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

14 months agoUnreviewed API Test fix; restored a line inadventantly removed in r233926.
jer.noble@apple.com [Wed, 18 Jul 2018 22:29:04 +0000 (22:29 +0000)]
Unreviewed API Test fix; restored a line inadventantly removed in r233926.

* platform/mac/VideoFullscreenInterfaceMac.mm:
(-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):

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