Timeline



Jul 25, 2017:

11:19 PM Changeset in webkit [219905] by Carlos Garcia Campos
  • 4 edits in trunk/Source

Icon loader error on startup
https://bugs.webkit.org/show_bug.cgi?id=174787

Reviewed by Brady Eidson.

Source/WebCore:

This is a regression of the new icon loading, it happens with pages that shouldn't have a favicon, like about
pages. IconController::startLoader() did several checks before starting the load that
DocumentLoader::startIconLoading() is not doing. It checked that the frame is the main one, the document can have
an icon (document url is not empty and not about:blank) and that favicon url is in HTTP family. We should do the
same checks now before starting to load icons.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startIconLoading):

Source/WebKit:

Ignore non HTTP favicons in glib API.

  • UIProcess/API/glib/WebKitIconLoadingClient.cpp:
10:44 PM Changeset in webkit [219904] by beidson@apple.com
  • 13 edits
    2 adds in trunk

ResourceLoadStatistics grandfathering happens much too often.
<rdar://problem/32655834> and https://bugs.webkit.org/show_bug.cgi?id=174825

Reviewed by Chris Dumez.

Source/WebKit:

The ResourceLoadStatistics grandfathering procedure happens too often.

  • With an empty memory store, even though an empty memory store is a perfectly valid state.
  • On each launch, even if grandfathering happened on the last launch - because grandfathering data would not automatically be saved to disk.
  • After clearing all website data, at which point no grandfathering can possibly be relevant because there is no data to grandfather.

This patch fixes those cases and adds API tests to verify they remain fixed.

  • Shared/WebsiteData/WebsiteDataType.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]): allWebsiteDataTypes, but even with the private ones.
(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]): If the types being cleared cover all of

the types that ResourceLoadStatistics care about, don't grandfather afterwards.

(-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]): Ditto.
(-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:

(WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk): Don't grandfather if the store read from

disk is empty (as being empty is perfectly fine), and also log the event of "populated without grandfathering".

  • UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes):
(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData): Schedule a write right away so we don't re-grandfather

on next launch, and also log the grandfathering event.

(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent): Takes a ShouldGrandfather flag

to tell whether or not data should be re-grandfathered after the store is cleared.

(WebKit::WebResourceLoadStatisticsStore::logTestingEvent): Log the event to the testing client.
(WebKit::dataTypesToRemove): Deleted.

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback): Handles enabling ResourceLoadStatistics both

with and without a testing callback.

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/EmptyGrandfatheredResourceLoadStatistics.plist: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/ResourceLoadStatistics.mm: Added.

(TEST):

9:42 PM Changeset in webkit [219903] by commit-queue@webkit.org
  • 4 edits
    9 moves
    3 adds
    1 delete in trunk/PerformanceTests

Speedometer 2.0: Document es2015-babel-webpack build process
https://bugs.webkit.org/show_bug.cgi?id=174252

Patch by Mathias Bynens <mathias@qiwi.be> on 2017-07-25
Reviewed by Ryosuke Niwa.

  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/README.md: Added build docs.
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/*: Update generated build files.
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/package.json: Remove unused items.
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/package-lock.json: Added lockfile.
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/index.html: Make title consistent.
9:31 PM Changeset in webkit [219902] by weinig@apple.com
  • 7 edits
    1 delete in trunk/Source/WebCore

[WebIDL] Remove custom bindings for HTMLCanvasElement
https://bugs.webkit.org/show_bug.cgi?id=174847

Reviewed by Darin Adler.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSHTMLCanvasElementCustom.cpp: Removed.

Remove JSHTMLCanvasElementCustom.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::getContext2d):
(WebCore::HTMLCanvasElement::getContextWebGL):
(WebCore::HTMLCanvasElement::getContextWebGPU):

  • html/HTMLCanvasElement.h:
  • html/HTMLCanvasElement.idl:

Move context picking code to HTMLCanvasElement. Give more
exact types to remaining context getters.

7:34 PM Changeset in webkit [219901] by Chris Dumez
  • 20 edits in trunk/Source

Clean up ExceptionCode enumeration
https://bugs.webkit.org/show_bug.cgi?id=174812

Reviewed by Darin Adler.

Clean up ExceptionCode enumeration:

  • Updated comments to reflect the latest WebIDL specification
  • Drop special values given to some exception codes. Those legacy codes are already in the table inside DOMException.cpp. This also allows us to drop empty rows in the DOMException table
  • Drop NoException value in the enumeration and use std::optional<ExceptionCode> when needed instead.
  • Modules/indexeddb/shared/IDBError.cpp:

(WebCore::IDBError::IDBError):
(WebCore::IDBError::name):
(WebCore::IDBError::message):

  • Modules/indexeddb/shared/IDBError.h:

(WebCore::IDBError::code):
(WebCore::IDBError::encode):
(WebCore::IDBError::decode):

  • dom/DOMException.cpp:
  • dom/ExceptionCode.h:
  • fileapi/FileReaderSync.cpp:

(WebCore::errorCodeToException):
(WebCore::FileReaderSync::startLoading):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createRequest):

  • xml/XMLHttpRequest.h:
7:27 PM Changeset in webkit [219900] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Don't output "No message" for multi-value logs like console.log(x, y)
https://bugs.webkit.org/show_bug.cgi?id=174842

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-07-25
Reviewed by Matt Baker.

  • Localizations/en.lproj/localizedStrings.js:

Removed "No message".

  • UserInterface/Views/ConsoleMessageView.js:

(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
Track whether or not outputting the next parameter will need a divider
in front of it or not.

7:23 PM Changeset in webkit [219899] by jfbastien@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

WebAssembly: generate smaller binaries
https://bugs.webkit.org/show_bug.cgi?id=174818

Reviewed by Filip Pizlo.

This patch reduces generated code size for WebAssembly in 2 ways:

  1. Use the ZR register when storing zero on ARM64.
  2. Synthesize wasm context lazily.

This leads to a modest size reduction on both x86-64 and ARM64 for
large WebAssembly games, without any performance loss on WasmBench
and TitzerBench.

The reason this works is that these games, using Emscripten,
generate 100k+ tiny functions, and our JIT allocation granule
rounds all allocations up to 32 bytes. There are plenty of other
simple gains to be had, I've filed a follow-up bug at
webkit.org/b/174819

We should further avoid the per-function cost of tiering, which
represents the bulk of code generated for small functions.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::storeZero64):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::storeZero64):

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::createStore): this doesn't make sense
for x86 because it constrains register reuse and codegen in a way
that doesn't affect ARM64 because it has a dedicated zero
register.

  • b3/air/AirOpcode.opcodes: add the storeZero64 opcode.
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::instanceValue):
(JSC::Wasm::B3IRGenerator::restoreWasmContext):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::materializeWasmContext): Deleted.

6:58 PM Changeset in webkit [219898] by fpizlo@apple.com
  • 17 edits
    8 adds
    1 delete in trunk/Source

B3 should do LICM
https://bugs.webkit.org/show_bug.cgi?id=174750

Reviewed by Keith Miller and Saam Barati.

Source/JavaScriptCore:

Added a LICM phase to B3. This phase is called hoistLoopInvariantValues, to conform to the B3 naming
convention for phases (it has to be an imperative). The phase uses NaturalLoops and BackwardsDominators,
so this adds those analyses to B3. BackwardsDominators was already available in templatized form. This
change templatizes DFG::NaturalLoops so that we can just use it.

The LICM phase itself is really simple. We are decently precise with our handling of everything except
the relationship between control dependence and side exits.

Also added a bunch of tests.

This isn't super important. It's perf-neutral on JS benchmarks. FTL already does LICM on DFG SSA IR, and
probably all current WebAssembly content has had LICM done to it. That being said, this is a cheap phase
so it doesn't hurt to have it.

I wrote it because I thought I needed it for bug 174727. It turns out that there's a better way to
handle the problem I had, so I ended up not needed it - but by then I had already written it. I think
it's good to have it because LICM is one of those core compiler phases; every compiler has it
eventually.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/B3BackwardsCFG.h: Added.

(JSC::B3::BackwardsCFG::BackwardsCFG):

  • b3/B3BackwardsDominators.h: Added.

(JSC::B3::BackwardsDominators::BackwardsDominators):

  • b3/B3BasicBlock.cpp:

(JSC::B3::BasicBlock::appendNonTerminal):

  • b3/B3Effects.h:
  • b3/B3EnsureLoopPreHeaders.cpp: Added.

(JSC::B3::ensureLoopPreHeaders):

  • b3/B3EnsureLoopPreHeaders.h: Added.
  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3HoistLoopInvariantValues.cpp: Added.

(JSC::B3::hoistLoopInvariantValues):

  • b3/B3HoistLoopInvariantValues.h: Added.
  • b3/B3NaturalLoops.h: Added.

(JSC::B3::NaturalLoops::NaturalLoops):

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::invalidateCFG):
(JSC::B3::Procedure::naturalLoops):
(JSC::B3::Procedure::backwardsCFG):
(JSC::B3::Procedure::backwardsDominators):

  • b3/B3Procedure.h:
  • b3/testb3.cpp:

(JSC::B3::generateLoop):
(JSC::B3::makeArrayForLoops):
(JSC::B3::generateLoopNotBackwardsDominant):
(JSC::B3::oneFunction):
(JSC::B3::noOpFunction):
(JSC::B3::testLICMPure):
(JSC::B3::testLICMPureSideExits):
(JSC::B3::testLICMPureWritesPinned):
(JSC::B3::testLICMPureWrites):
(JSC::B3::testLICMReadsLocalState):
(JSC::B3::testLICMReadsPinned):
(JSC::B3::testLICMReads):
(JSC::B3::testLICMPureNotBackwardsDominant):
(JSC::B3::testLICMPureFoiledByChild):
(JSC::B3::testLICMPureNotBackwardsDominantFoiledByChild):
(JSC::B3::testLICMExitsSideways):
(JSC::B3::testLICMWritesLocalState):
(JSC::B3::testLICMWrites):
(JSC::B3::testLICMFence):
(JSC::B3::testLICMWritesPinned):
(JSC::B3::testLICMControlDependent):
(JSC::B3::testLICMControlDependentNotBackwardsDominant):
(JSC::B3::testLICMControlDependentSideExits):
(JSC::B3::testLICMReadsPinnedWritesPinned):
(JSC::B3::testLICMReadsWritesDifferentHeaps):
(JSC::B3::testLICMReadsWritesOverlappingHeaps):
(JSC::B3::testLICMDefaultCall):
(JSC::B3::run):

  • dfg/DFGBasicBlock.h:
  • dfg/DFGCFG.h:
  • dfg/DFGNaturalLoops.cpp: Removed.
  • dfg/DFGNaturalLoops.h:

(JSC::DFG::NaturalLoops::NaturalLoops):
(JSC::DFG::NaturalLoop::NaturalLoop): Deleted.
(JSC::DFG::NaturalLoop::header): Deleted.
(JSC::DFG::NaturalLoop::size): Deleted.
(JSC::DFG::NaturalLoop::at): Deleted.
(JSC::DFG::NaturalLoop::operator[]): Deleted.
(JSC::DFG::NaturalLoop::contains): Deleted.
(JSC::DFG::NaturalLoop::index): Deleted.
(JSC::DFG::NaturalLoop::isOuterMostLoop): Deleted.
(JSC::DFG::NaturalLoop::addBlock): Deleted.
(JSC::DFG::NaturalLoops::numLoops): Deleted.
(JSC::DFG::NaturalLoops::loop): Deleted.
(JSC::DFG::NaturalLoops::headerOf): Deleted.
(JSC::DFG::NaturalLoops::innerMostLoopOf): Deleted.
(JSC::DFG::NaturalLoops::innerMostOuterLoop): Deleted.
(JSC::DFG::NaturalLoops::belongsTo): Deleted.
(JSC::DFG::NaturalLoops::loopDepth): Deleted.

Source/WTF:

Moved DFG::NaturalLoops to WTF. The new templatized NaturalLoops<> uses the same Graph abstraction as
Dominators<>. This allows us to add a B3::NaturalLoops for free.

Also made small tweaks to RangeSet, which the LICM uses.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Dominators.h:
  • wtf/NaturalLoops.h: Added.

(WTF::NaturalLoop::NaturalLoop):
(WTF::NaturalLoop::graph):
(WTF::NaturalLoop::header):
(WTF::NaturalLoop::size):
(WTF::NaturalLoop::at):
(WTF::NaturalLoop::operator[]):
(WTF::NaturalLoop::contains):
(WTF::NaturalLoop::index):
(WTF::NaturalLoop::isOuterMostLoop):
(WTF::NaturalLoop::dump):
(WTF::NaturalLoop::addBlock):
(WTF::NaturalLoops::NaturalLoops):
(WTF::NaturalLoops::graph):
(WTF::NaturalLoops::numLoops):
(WTF::NaturalLoops::loop):
(WTF::NaturalLoops::headerOf):
(WTF::NaturalLoops::innerMostLoopOf):
(WTF::NaturalLoops::innerMostOuterLoop):
(WTF::NaturalLoops::belongsTo):
(WTF::NaturalLoops::loopDepth):
(WTF::NaturalLoops::loopsOf):
(WTF::NaturalLoops::dump):

  • wtf/RangeSet.h:

(WTF::RangeSet::begin):
(WTF::RangeSet::end):
(WTF::RangeSet::addAll):

6:19 PM Changeset in webkit [219897] by fpizlo@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

GC should be fine with trading blocks between destructor and non-destructor blocks
https://bugs.webkit.org/show_bug.cgi?id=174811

Reviewed by Mark Lam.

Our GC has the ability to trade blocks between MarkedAllocators. A MarkedAllocator is a
size-class-within-a-Subspace. The ability to trade helps reduce memory wastage due to
fragmentation. Prior to this change, this only worked between blocks that did not have destructors.
This was partly a policy decision. But mostly, it was fallout from the way we use the empty block
set.

Here's how empty used to work. If a block is empty, we don't run destructors. We say that a block
is empty if:

A) It has no live objects and its a non-destructor block, or
B) We just allocated it (so it has no destructors even if it's a destructor block), or
C) We just stole it from another allocator (so it also has no destructors), or
D) We just swept the block and ran all destructors.

Case (A) is for trading blocks. That's how a different MarkedAllocator would know that this is a
block that could be stolen.

Cases (B) and (C) need to be detected for correctness, since otherwise we might try to run
destructors in blocks that have garbage bits. In that case, the isZapped check won't detect that
cells don't need destruction, so without having the empty bit we would try to destruct garbage
and crash. Currently, we know that we have cases (B) and (C) when the block is empty.

Case (D) is necessary for detecting which blocks can be removed when we shrink the heap.

If we tried to enable trading of blocks between allocators without making any changes to how
empty works, then it just would not work. We have to set the empty bits of blocks that have no
live objects in order for those bits to be candidates for trading. But if we do that, then our
logic for cases (B-D) will think that the block has no destructible objects. That's bad, since then
our destructors won't run and we'll leak memory.

This change fixes this issue by decoupling the "do I have destructors" question from the "do I have
live objects" question by introducing a new destructible bitvector. The GC flags all live blocks
as being destructible at the end. We clear the destructible bit in cases (B-D). Cases (B-C) are
handled entirely by the new destrictible bit, while case (D) is detected by looking for blocks that
are (empty & ~destructible).

Then we can simply remove all destructor-oriented special-casing of the empty bit. And we can
remove destructor-oriented special-casing of block trading.

This is a perf-neutral change. We expect most free memory to be in non-destructor blocks anyway,
so this change is more about clean-up than perf. But, this could reduce memory usage in some
pathological cases.

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::findEmptyBlockToSteal):
(JSC::MarkedAllocator::tryAllocateWithoutCollecting):
(JSC::MarkedAllocator::endMarking):
(JSC::MarkedAllocator::shrink):
(JSC::MarkedAllocator::shouldStealEmptyBlocksFromOtherAllocators): Deleted.

  • heap/MarkedAllocator.h:
  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::lastChanceToFinalize):
(JSC::MarkedBlock::Handle::sweep):

  • heap/MarkedBlockInlines.h:

(JSC::MarkedBlock::Handle::specializedSweep):
(JSC::MarkedBlock::Handle::finishSweepKnowingSubspace):
(JSC::MarkedBlock::Handle::emptyMode):

6:03 PM Changeset in webkit [219896] by aestes@apple.com
  • 8 edits in trunk

[Apple Pay] Add "carteBancaire" as a supported payment network
https://bugs.webkit.org/show_bug.cgi?id=174841
<rdar://problem/31935596>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/ssl/applepay/ApplePaySession.html

http/tests/ssl/applepay/ApplePaySessionV3.html

  • Modules/applepay/PaymentRequest.cpp:

(WebCore::PaymentRequest::isValidSupportedNetwork):

Source/WebKit:

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::toSupportedNetwork):

LayoutTests:

  • http/tests/ssl/applepay/ApplePaySession-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession.html:
  • http/tests/ssl/applepay/ApplePaySessionV3.html:
5:45 PM Changeset in webkit [219895] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove Broken CompareEq constant folding phase.
https://bugs.webkit.org/show_bug.cgi?id=174846
<rdar://problem/32978808>

Reviewed by Saam Barati.

This bug happened when we would get code like the following:

a: JSConst(Undefined)
b: GetLocal(SomeObjectOrUndefined)
...
c: CompareEq(Check:ObjectOrOther:b, Check:ObjectOrOther:a)

constant folding will turn this into:

a: JSConst(Undefined)
b: GetLocal(SomeObjectOrUndefined)
...
c: CompareEq(Check:ObjectOrOther:b, Other:a)

But the SpeculativeJIT/FTL lowering will fail to check b
properly which leads to an assertion failure in the AI.

I'll follow up with a more robust fix later. For now, I'll remove the
case that generates the code. Removing the code appears to be perf
neutral.

  • dfg/DFGConstantFoldingPhase.cpp:

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

5:45 PM Changeset in webkit [219894] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Fix warnings about console.assert lines without semicolons
https://bugs.webkit.org/show_bug.cgi?id=174840

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-07-25
Reviewed by Brian Burg.

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.set selectedSettingsView):
(WebInspector.SettingsTabContentView.prototype.setSettingsViewVisible):
Add semicolon to assert lines so they can be stripped in optimized builds.

4:31 PM Changeset in webkit [219893] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Inline multiple console log values if they are simple
https://bugs.webkit.org/show_bug.cgi?id=174746
<rdar://problem/33469376>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-07-25
Reviewed by Matt Baker.

  • UserInterface/Models/IssueMessage.js:
  • UserInterface/Protocol/RemoteObject.js:

(WebInspector.RemoteObject.type): Deleted.
Remove this as it isn't as useful as directly checking the type.

  • UserInterface/Views/ConsoleMessageView.js:

(WebInspector.ConsoleMessageView.prototype._appendExtraParameters):
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
(WebInspector.ConsoleMessageView.prototype._hasSimpleDisplay):
(WebInspector.ConsoleMessageView.prototype._isStackTrace):
For leading primitive/simple values, display them inline on the console message.

  • UserInterface/Views/FormattedValue.js:

(WebInspector.FormattedValue.hasSimpleDisplay):
Provide a helper to determine if a formatted value will be simple.

4:06 PM Changeset in webkit [219892] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Make StyleResolver::isValid{Cue, Region}StyleProperty() static, inline, non-member functions
https://bugs.webkit.org/show_bug.cgi?id=174827

Reviewed by Simon Fraser.

StyleResolver::isValid{Cue, Region}StyleProperty() access neither instance nor
class data. Moreover, they are private member functions and hence cannot be
used outside of StyleResolver's implementation. So, make these static, inline,
non-member functions.

  • css/StyleResolver.cpp:

(WebCore::isValidRegionStyleProperty):
(WebCore::isValidCueStyleProperty):
(WebCore::StyleResolver::CascadedProperties::addMatch):
(WebCore::StyleResolver::isValidRegionStyleProperty): Deleted.
(WebCore::StyleResolver::isValidCueStyleProperty): Deleted.

  • css/StyleResolver.h:
3:48 PM Changeset in webkit [219891] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Dragged links are blurry on 1x displays.
https://bugs.webkit.org/show_bug.cgi?id=174831
<rdar://problem/33519698>

Reviewed by Simon Fraser.

When the width and height of the drag image is a multiple of 2, the drag image is not blurry
on a 1x display. This is a workaround which should be removed when <rdar://problem/33059739>
is fixed.

No new tests, since this is not straightforward to test with a layout test.

  • platform/mac/DragImageMac.mm:

(WebCore::LinkImageLayout::LinkImageLayout):

2:49 PM Changeset in webkit [219890] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked multiple fast/ tests as crashing on High Sierra WK1.
<rdar://problem/33522420>

Unreviewed test gardening.

  • platform/mac-highsierra-wk1/TestExpectations:
2:46 PM Changeset in webkit [219889] by Matt Baker
  • 9 edits in trunk/Source

Web Inspector: Refactoring: extract async stack trace logic from InspectorInstrumentation
https://bugs.webkit.org/show_bug.cgi?id=174738

Reviewed by Brian Burg.

Source/JavaScriptCore:

Move AsyncCallType enum to InspectorDebuggerAgent, which manages async
stack traces. This preserves the call type in JSC, makes the range of
possible call types explicit, and is safer than passing ints.

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::asyncCallIdentifier):
(Inspector::InspectorDebuggerAgent::didScheduleAsyncCall):
(Inspector::InspectorDebuggerAgent::didCancelAsyncCall):
(Inspector::InspectorDebuggerAgent::willDispatchAsyncCall):

  • inspector/agents/InspectorDebuggerAgent.h:

Source/WebCore:

Relocate AsyncCallType from InspectorInstrumentation to the debugger
agent. Plumbing for requestAnimationFrame notifications has been added
to PageDebuggerAgent, which is responsible for managing async stack traces.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::registerCallback):
(WebCore::ScriptedAnimationController::cancelCallback):
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didInstallTimerImpl):
(WebCore::InspectorInstrumentation::didRemoveTimerImpl):
(WebCore::InspectorInstrumentation::willFireTimerImpl):
(WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
(WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
(WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
(): Deleted.
(WebCore::didScheduleAsyncCall): Deleted.

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didRequestAnimationFrame):
(WebCore::InspectorInstrumentation::didCancelAnimationFrame):
(WebCore::InspectorInstrumentation::willFireAnimationFrame):
Replaced Frame and Document pointers with references and moved
pointer validation upstream.

  • inspector/PageDebuggerAgent.cpp:

(WebCore::PageDebuggerAgent::didRequestAnimationFrame):
(WebCore::PageDebuggerAgent::willFireAnimationFrame):
(WebCore::PageDebuggerAgent::didCancelAnimationFrame):

  • inspector/PageDebuggerAgent.h:
2:43 PM Changeset in webkit [219888] by Nikita Vasilyev
  • 7 edits
    1 copy in trunk/Source/WebInspectorUI

Web Inspector: Styles: Add a switch for Spreadsheet model style editor to experimental settings
https://bugs.webkit.org/show_bug.cgi?id=174741
<rdar://problem/33467954>

Reviewed by Brian Burg.

Show a blank panel when Spreadsheet Style Editor is enabled.

  • UserInterface/Base/Setting.js:
  • UserInterface/Main.html:
  • UserInterface/Views/CSSStyleDetailsSidebarPanel.js:

(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):

  • UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.js: Added.

(WebInspector.RulesStyleSpreadsheetDetailsPanel):
(WebInspector.RulesStyleSpreadsheetDetailsPanel.prototype.filterDidChange):
(WebInspector.RulesStyleSpreadsheetDetailsPanel.prototype.scrollToSectionAndHighlightProperty):

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings > .settings-view > .container.hidden):
(.content-view.settings > .settings-view > .container-centered):
(.content-view.settings > .settings-view > .container button):

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype._createDebugSettingsView):

  • UserInterface/Views/SettingsView.js:

(WebInspector.SettingsView.prototype.addCenteredContainer):
(WebInspector.SettingsView):
Show "Reload Web Inspector" button when Spreadsheet Style Editor setting is modified.

2:22 PM Changeset in webkit [219887] by BJ Burg
  • 5 edits in trunk/Source/WebKit

Use SandboxExtension::HandleArray when sending extensions for file uploads to the web process
https://bugs.webkit.org/show_bug.cgi?id=174828

Reviewed by Tim Horton.

Send all of the sandbox extension handles in a single message, rather than
one message per extension. Update message name and parameter types to match.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
(WebKit::WebPageProxy::didChooseFilesForOpenPanel):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::extendSandboxForFilesFromOpenPanel):
(WebKit::WebPage::extendSandboxForFileFromOpenPanel): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
2:12 PM Changeset in webkit [219886] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked imported/w3c/web-platform-tests/XMLHttpRequest/send-blob-with-no-mime-type.html as failing.
<rdar://problem/33251388>

Unreviewed test gardening.

  • platform/mac-highsierra/TestExpectations:
1:56 PM Changeset in webkit [219885] by mark.lam@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Fix bugs in probe code to change sp on x86, x86_64 and 32-bit ARM.
https://bugs.webkit.org/show_bug.cgi?id=174809
<rdar://problem/33504759>

Reviewed by Filip Pizlo.

  1. When the probe handler function changes the sp register to point to the region of stack in the middle of the ProbeContext on the stack, there is a bug where the ProbeContext's register values to be restored can be over-written before they can be restored. This is now fixed.
  1. Added more robust probe tests for changing the sp register.
  1. Made existing probe tests to ensure that probe handlers were actually called.
  1. Added some verification to testProbePreservesGPRS().
  1. Change all the probe tests to fail early on discovering an error instead of batching till the end of the test. This helps point a finger to the failing issue earlier.

This patch was tested on x86, x86_64, and ARMv7. ARM64 probe code will be fixed
next in https://bugs.webkit.org/show_bug.cgi?id=174697.

  • assembler/MacroAssemblerARM.cpp:
  • assembler/MacroAssemblerARMv7.cpp:
  • assembler/MacroAssemblerX86Common.cpp:
  • assembler/testmasm.cpp:

(JSC::testProbeReadsArgumentRegisters):
(JSC::testProbeWritesArgumentRegisters):
(JSC::testProbePreservesGPRS):
(JSC::testProbeModifiesStackPointer):
(JSC::testProbeModifiesStackPointerToInsideProbeContextOnStack):
(JSC::testProbeModifiesStackPointerToNBytesBelowSP):
(JSC::testProbeModifiesProgramCounter):
(JSC::run):

1:55 PM Changeset in webkit [219884] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Rebaselinged the test http/tests/quicklook/top-navigation-blocked.html
https://bugs.webkit.org/show_bug.cgi?id=174755

Unreviewed test gardening.

  • http/tests/quicklook/top-navigation-blocked-expected.txt:
1:54 PM Changeset in webkit [219883] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

1:50 PM Changeset in webkit [219882] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Fix autoinstaller failing on autoinstall_everything
https://bugs.webkit.org/show_bug.cgi?id=174830

Patch by Matthew Stewart <matthew_r_stewart@apple.com> on 2017-07-25
Reviewed by Joseph Pecoraro.

  • Scripts/webkitpy/thirdparty/init.py:

(AutoinstallImportHook.find_module):
(AutoinstallImportHook.install_chromedriver):
(AutoinstallImportHook.install_geckodriver):
(AutoinstallImportHook._install_chromedriver): Deleted.
(AutoinstallImportHook._install_geckodriver): Deleted.

1:47 PM Changeset in webkit [219881] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix API tests after r219871.
https://bugs.webkit.org/show_bug.cgi?id=174807

WebKit2.OpenAndCloseWindowAsync and WebKit2.OpenAsyncWithNil API tests are fixed.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::createNewPage):
createNewPageAsync or createNewPage should be called, not both.

1:45 PM Changeset in webkit [219880] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.33

Tag Safari-604.1.33.

1:20 PM Changeset in webkit [219879] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

1:16 PM Changeset in webkit [219878] by jmarcell@apple.com
  • 1 delete in tags/Safari-604.1.33

Delete Tag.

11:56 AM Changeset in webkit [219877] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Rebaselined missed test.
https://bugs.webkit.org/show_bug.cgi?id=174734

Unreviewed test gardening.

  • fast/events/touch/ios/touches-client-coords-after-zoom-expected.txt:
11:53 AM Changeset in webkit [219876] by commit-queue@webkit.org
  • 60 edits
    9 adds in trunk

Async image decoding for large images should be disabled after the first time a tile is painted
https://bugs.webkit.org/show_bug.cgi?id=174451
<rdar://problem/31246421>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-07-25
Reviewed by Simon Fraser.

Source/WebCore:

Flashing because of DOM mutation can be fixed by disabling the asynchronous
image decoding after the first time a tile was painted.

We can detect this by consulting the tile repaintCount. If it is zero, then
it is safe to use asynchronous image decoded. If the tile repaintCount is
greater than zero, we are not sure if the renderer rectangle has an image
drawn in it already or not. In this case we have to use the synchronous
image decoding to avoid causing a flash.

Tests: fast/images/async-image-background-change.html

fast/images/async-image-src-change.html
http/tests/multipart/multipart-async-image.html

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):

  • page/FrameView.cpp:

(WebCore::FrameView::willPaintContents):
(WebCore::FrameView::paintContentsForSnapshot):

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::paintContents):

  • page/PageOverlayController.h:
  • page/linux/ResourceUsageOverlayLinux.cpp:
  • page/mac/ServicesOverlayController.h:
  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::Highlight::paintContents):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::draw):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::paintGraphicsLayerContents):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/GraphicsLayerClient.h:

(WebCore::GraphicsLayerClient::paintContents):

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

(WebCore::LayerClient::platformCALayerPaintContents):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::platformCALayerPaintContents):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/PlatformCALayerClient.h:

(WebCore::PlatformCALayerClient::platformCALayerRepaintCount):

  • platform/graphics/ca/TileCoverageMap.cpp:

(WebCore::TileCoverageMap::platformCALayerPaintContents):

  • platform/graphics/ca/TileCoverageMap.h:
  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::platformCALayerPaintContents):
(WebCore::TileGrid::platformCALayerRepaintCount):

  • platform/graphics/ca/TileGrid.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(PlatformCALayer::drawLayerContents):

  • platform/graphics/ca/win/PlatformCALayerWin.cpp:

(PlatformCALayer::drawLayerContents):

  • platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:

(PlatformCALayerWinInternal::displayCallback):

  • platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:

(WebTiledBackingLayerWin::displayCallback):

  • platform/graphics/mac/WebLayer.mm:

(-[WebLayer drawInContext:]):
(-[WebSimpleLayer drawInContext:]):

  • rendering/PaintPhase.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::decodingModeForImageDraw):

  • rendering/RenderElement.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintForegroundForFragments):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintContents):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::paintContents):

  • rendering/RenderLayerCompositor.h:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paintContents):

  • testing/Internals.cpp:

(WebCore::imageFromImageElement):
(WebCore::bitmapImageFromImageElement):
(WebCore::Internals::imageFrameIndex):
(WebCore::Internals::setImageFrameDecodingDuration):
(WebCore::Internals::resetImageAnimation):
(WebCore::Internals::isImageAnimating):
(WebCore::Internals::setClearDecoderAfterAsyncFrameRequestForTesting):
(WebCore::Internals::imageDecodeCount):
(WebCore::Internals::setLargeImageAsyncDecodingEnabledForTesting):

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

Source/WebKit:

  • Shared/mac/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::drawInContext):

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::imageForRect):

  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:

(WebKit::InjectedBundleRangeHandle::renderedImage):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::paintContents):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:

Source/WebKitLegacy/mac:

  • WebView/WebFrame.mm:

(-[WebFrame _paintBehaviorForDestinationContext:]):
(-[WebFrame _drawRect:contentsOnly:]):

  • WebView/WebHTMLView.mm:

(imageFromRect):

Source/WebKitLegacy/win:

  • FullscreenVideoController.cpp:

(FullscreenVideoController::LayerClient::platformCALayerPaintContents):

  • WebCoreSupport/AcceleratedCompositingContext.cpp:

(AcceleratedCompositingContext::paintContents):

  • WebCoreSupport/AcceleratedCompositingContext.h:

LayoutTests:

To test async image decoding for large images, we have to create the <img>
element dynamically so we can listen to the load and webkitImageFrameReady
events and know reliably when to end the test. But with this patch the async
image decoding for large images will be disabled after the first paint.
That means async image decoding for large images will be disabled always
unless we force the async image decoding till the image is painted for the
first time. We use Internals::setLargeImageAsyncDecodingEnabledForTesting()
to force the async image decoding. So painting an image in this case will
require multiple paints; in all of them the async image decoding will be
enabled. But this is okay because it resembles the case where the <img> is
created from a static <img> tag in the HTML file.

For new tests, where we want to make sure that mutating the DOM will not
cause a flash, async image decoding will be forced till the image is drawn
for the first time. After that the async image decoding is enabled but not
forced.

Disable new tests for WK1 because the async image decoding is always enabled
because tiling does not necessarily exist in WK1 . But eventually the async
image decoding for large images will be always disabled for WK1.

  • fast/images/async-image-background-change-expected.html: Added.
  • fast/images/async-image-background-change.html: Added.
  • fast/images/async-image-background-image-repeated.html:
  • fast/images/async-image-background-image.html:
  • fast/images/async-image-body-background-image.html:
  • fast/images/async-image-multiple-clients-repaint.html:
  • fast/images/async-image-src-change-expected.html: Added.
  • fast/images/async-image-src-change.html: Added.
  • fast/images/resources/green-400x400.png: Added.
  • fast/images/resources/red-100x100.png: Added.
  • fast/images/resources/red-400x400.png: Added.
  • fast/images/sprite-sheet-image-draw.html:
  • http/tests/multipart/multipart-async-image-expected.txt: Added.
  • http/tests/multipart/multipart-async-image.html: Added.
  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
11:28 AM Changeset in webkit [219875] by Jonathan Bedard
  • 7 edits in trunk/Tools

Replace --runtime with something for both ios-simulator and ios-device
https://bugs.webkit.org/show_bug.cgi?id=173775
<rdar://problem/32952164>

Reviewed by Aakash Jain.

Add --version flag for both iOS simulator and iOS device.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args): Add --version flag and move --no-install.

  • Scripts/webkitpy/port/factory.py:

(platform_options): Move --no-intall to run_webkit_tests.py.

  • Scripts/webkitpy/port/ios.py:

(IOSPort):
(IOSPort._is_valid_ios_version): Check that the provided version string is legal.
(IOSPort.get_option): If accessing the iOS version, check that it is a valid version string.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort.ios_version): Consult --version flag before checking connected
devices for iOS version.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.make_port): Set --version option so that we can generate test
expectation paths without devices connected.
(IOSDeviceTest.test_additional_platform_directory): Deleted.
(IOSDeviceTest.test_baseline_searchpath): Deleted.
(IOSDeviceTest.test_expectations_ordering): Deleted.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.simulator_runtime): If no runtime is specified, use the --version
flag to specify a runtime.
(IOSSimulatorPort.ios_version): First check the --version flag, then the --runtime
flag and then use the default runtime.

11:03 AM Changeset in webkit [219874] by BJ Burg
  • 31 edits in trunk/Source

Web Automation: add support for uploading files
https://bugs.webkit.org/show_bug.cgi?id=174797
<rdar://problem/28485063>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/scripts/generate-inspector-protocol-bindings.py:

(generate_from_specification):
Start generating frontend dispatcher code if the target framework is 'WebKit'.

  • inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py:

(CppFrontendDispatcherImplementationGenerator.generate_output):
Use a framework include for InspectorFrontendRouter.h since this generated code
will be compiled outside of WebCore.framework.

  • inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/generic/expected/domain-availability.json-result:
  • inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/generic/expected/enum-values.json-result:
  • inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
  • inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
  • inspector/scripts/tests/generic/expected/worker-supported-domains.json-result:
  • inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
  • inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:

Rebaseline code generator tests.

Source/WebKit:

The general strategy is to have automation clients set the list of files they want
to select ahead of time. Then, the client simulates a click on the <input type="file"> element.
When that causes WebPageProxy to ask the UI delegate to runOpenPanel, it instead
gives WebAutomationSession a chance to select files if the page is under control of
automation. WebAutomationSession validates its file list and selects the files if valid.

  • CMakeLists.txt: Add frontend dispatcher files.
  • DerivedSources.make:

Add frontend dispatcher code generator scripts as dependencies of the generated code.
Add generated frontend dispatcher files to the list of output files.

  • UIProcess/Automation/Automation.json:

Add a command to set the canned list of files that should be selected when prompted.
If no files are selected, then the effect is as if the user had clicked "cancel" in
the file chooser dialog.

Add an event to signal to the WebDriver service that the file selection request has
been either fulfilled or cancelled. This event is necessary because otherwise remotes
cannot distinguish whether selecting the files failed for some reason, or if the
UIProcess has not yet selected the files and sent them to the web content process.
In either case, the input element's "files" attribute would return an empty FileList.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::WebAutomationSession):
Add the frontend dispatcher for Automation domain. This is named m_domainNotifier since
m_domainDispatcher is already being used for the backend command dispatcher.

(WebKit::WebAutomationSession::handleRunOpenPanel):
Validate that the files-to-select list has valid entries and select the files if so.
If anything goes wrong, pretend to cancel out of the file chooser. Either way, notify the
frontend with an event that the file chooser was dismissed due to selecting files or cancelling.
Automation protocol clients may implement additional strategies to further restrict
the conditions upon which local files can be uploaded.

(WebKit::WebAutomationSession::setFilesToSelectForFileUpload): Added.
Store the list of files as a vector of strings. The file list is always replaced.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runOpenPanel):
If the page is under automation, delegating the runOpenPanel is likely to hang
because WebDriver cannot interact directly with the file chooser dialog. Instead,
give WebAutomationSession a chance to select files and don't tell the delegate.

  • WebKit.xcodeproj/project.pbxproj:

Add frontend dispatcher files to "Derived Sources" group.

11:02 AM Changeset in webkit [219873] by weinig@apple.com
  • 20 edits
    1 add in trunk/Source/WebCore

[WebIDL] Add support for generating timer bindings
https://bugs.webkit.org/show_bug.cgi?id=174766

Reviewed by Darin Adler.

Adds a new non-standard type, ScheduledAction, which stands in for the
standard (DOMString or Function). It would be good to move to that in
future, but for now, this allows for forward momentum on removing custom
bindings.

  • WebCore.xcodeproj/project.pbxproj:

Add JSDOMConvertScheduledAction.h.

  • bindings/IDLTypes.h:

Add IDLScheduledAction.

  • bindings/js/JSDOMConvertScheduledAction.h: Added.

(WebCore::Converter<IDLScheduledAction>::convert):
Add conversion from JSValue -> ScheduledAction. This is moved from the old ScheduledAction
create function.

  • bindings/js/JSDOMConvertVariadic.h:

(WebCore::convertVariadicArguments):
(WebCore::Detail::VariadicConverterBase::convert): Deleted.
(WebCore::Detail::VariadicConverterBase<IDLInterface<T>>::convert): Deleted.

  • bindings/js/JSDOMConvertBase.h:
  • bindings/js/JSDOMConvertAny.h:

(WebCore::VariadicConverter<IDLAny>::convert):

  • bindings/js/JSDOMConvertInterface.h:

(WebCore::VariadicConverter<IDLInterface<T>>::convert):
Rename VariadicConverter to VariadicConverterDetails, and remove base class. Rename
VariadicConverterBase to VariadicConverter, and move specializations to the file
containing the base converter for that IDL type

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::setTimeout): Deleted.
(WebCore::JSDOMWindow::setInterval): Deleted.

  • bindings/js/JSWorkerGlobalScopeCustom.cpp:

(WebCore::JSWorkerGlobalScope::setTimeout): Deleted.
(WebCore::JSWorkerGlobalScope::setInterval): Deleted.
Remove custom implementations of setTimeout and setInterval.

  • bindings/js/ScheduledAction.cpp:

(WebCore::ScheduledAction::create):
(WebCore::ScheduledAction::ScheduledAction):
(WebCore::ScheduledAction::~ScheduledAction):
(WebCore::ScheduledAction::addArguments):
(WebCore::ScheduledAction::executeFunctionInContext):

  • bindings/js/ScheduledAction.h:

(WebCore::ScheduledAction::ScheduledAction): Deleted.
Rework ScheduledAction. Now has two create functions, one for the function
form, one for the string form. These are now called by the Converter. Also,
rather than extracting the arguments directly from the ExecState, allow the
bindings to work as designed, and have the arguments come in as variadic
arguments to setTimeout/setInterval and get added to the ScheduledAction if
needed. Also, move ContentSecurityPolicy check out of construction, and into
setTimeout/setInterval.

  • bindings/scripts/CodeGenerator.pm:

(IsBuiltinType):
Add ScheduledAction to the builtin list.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):
Add the correct include when ScheduledAction is used.

(GenerateParametersCheck):
Remove rule disallowing optional arguments before variadic arguments. That works
just fine.

(GetBaseIDLType):
Add mapping of ScheduledAction -> IDLScheduledAction.

(JSValueToNativeDOMConvertNeedsGlobalObject):
Add ScheduledAction to the list of types that need a global object
for conversion.

  • page/WindowOrWorkerGlobalScope.idl:

Update interface to match spec and add FIXMEs for moving to TimerHandler.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):

  • page/DOMWindow.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):

  • workers/WorkerGlobalScope.h:

Update for new signatures. WorkerGlobalScope now has to return ExceptionOr<int>
even though it never throws, due to having one IDL file defining these. This is
unfortunate and something we should look at addressing the future.

10:42 AM Changeset in webkit [219872] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=174820

Unreviewed gardening.

Patch by Charlie Turner <cturner@igalia.com> on 2017-07-25

  • platform/gtk/TestExpectations:
10:17 AM Changeset in webkit [219871] by achristensen@apple.com
  • 22 edits in trunk/Source/WebKit

Modernize NavigationAction code
https://bugs.webkit.org/show_bug.cgi?id=174807

Reviewed by Darin Adler.

Mostly just use more move semantics.

  • Platform/IPC/HandleMessage.h:

(IPC::callMemberFunctionImpl):

  • Shared/API/APIURLRequest.h:
  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigation.cpp:

(API::Navigation::Navigation):

  • UIProcess/API/APINavigation.h:

(API::Navigation::create):

  • UIProcess/API/APINavigationAction.h:
  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::decidePolicyForNavigationAction):

  • UIProcess/API/APIPolicyClient.h:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::createNewPage):
(API::UIClient::createNewPageAsync):
(API::UIClient::canCreateNewPageAsync):

  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadURLRequest):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPageUIClient):
(WKPageSetPageNavigationClient):

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

(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

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

(WebKit::UIDelegate::UIClient::createNewPageCommon):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::canCreateNewPageAsync):
(WebKit::UIDelegate::UIClient::createNewPageAsync):

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::decidePolicyForNavigationAction):

  • UIProcess/WebNavigationState.cpp:

(WebKit::WebNavigationState::createLoadRequestNavigation):

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

(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::createNewPage):

  • UIProcess/WebPageProxy.h:
10:07 AM Changeset in webkit [219870] by Devin Rousso
  • 11 edits in trunk

Web Inspector: add context menu item for taking a screenshot of a node
https://bugs.webkit.org/show_bug.cgi?id=174754

Reviewed by Brian Burg.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/ContextMenuUtilities.js:

(WebInspector.appendContextMenuItemsForDOMNode):
Add "Capture Element Screenshot " context menu item that opens a save dialog with a picture of the node.

  • UserInterface/Base/Main.js:

(WebInspector.saveDataToFile):
Allow the saveData to specify whether the contained content is base64Encoded, instead of
having to go through a Blob to save base64 data.

  • UserInterface/Base/Utilities.js:

Add Number.pad to add leading zeros up to a certain width.

Drive-by: fix failing test for Number.constrain.

  • UserInterface/Models/DOMNode.js:

(WebInspector.DOMNode.prototype.scrollIntoView.resolvedNode.scrollIntoView): Added.
(WebInspector.DOMNode.prototype.scrollIntoView.resolvedNode): Added.
(WebInspector.DOMNode.prototype.scrollIntoView): Added.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
(WebInspector.DOMTreeElement.prototype._scrollIntoView.resolvedNode.scrollIntoView): Deleted.
(WebInspector.DOMTreeElement.prototype._scrollIntoView.resolvedNode): Deleted.
(WebInspector.DOMTreeElement.prototype._scrollIntoView): Deleted.

  • UserInterface/Views/DOMTreeOutline.js:

(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
Drive-by: move "Scroll Into View" context menu command to WebInspector.appendContextMenuItemsForDOMNode
so that it can be triggered from more places than just the DOM tree.

LayoutTests:

  • inspector/unit-tests/number-utilities-expected.txt:
  • inspector/unit-tests/number-utilities.html:

Add test for Number.zeroPad.

Drive-by: Change tests to use expectEqual for better output on failure.

9:49 AM Changeset in webkit [219869] by commit-queue@webkit.org
  • 16 edits in trunk/Source/WebCore

[WinCairo] Fix build with AllInOnes disabled
https://bugs.webkit.org/show_bug.cgi?id=174784
<rdar://problem/33488914>

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-07-25
Reviewed by Alex Christensen.

  • PlatformWin.cmake:

Add RenderThemeWin.cpp to WebCore_SOURCES

  • rendering/RenderingAllInOne.cpp:

Remove #include "RenderThemeWin.cpp"

  • testing/MemoryInfo.h:

Remove #include "JSDomWindow.h"

  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/JSDOMPromiseDeferred.cpp:
  • bindings/js/JSDOMWrapper.cpp:
  • bindings/js/JSImageDataCustom.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallWith):

  • dom/ScriptExecutionContext.cpp:
  • inspector/InspectorController.cpp:
  • inspector/InspectorTimelineAgent.cpp:
  • rendering/RenderMediaControls.cpp:
  • rendering/RenderMediaControls.h:
  • rendering/RenderThemeWin.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:

Update test results.

6:22 AM Changeset in webkit [219868] by Claudio Saavedra
  • 2 edits
    1 add in trunk/LayoutTests

REGRESSION (r143068): fast/events/clientXY-in-zoom-and-scroll.html failing on GTK, Qt
https://bugs.webkit.org/show_bug.cgi?id=110090

Unreviewed gardening.

This test only needed the expectation to be updated.

  • platform/gtk/TestExpectations: Remove test below.
  • platform/gtk/fast/events/clientXY-in-zoom-and-scroll-expected.txt: Added.
4:43 AM Changeset in webkit [219867] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix Mac CMake build after r219567

  • PlatformMac.cmake:
4:38 AM Changeset in webkit [219866] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

REGRESSION(r218629): [GTK] ASSERTION FAILED: m_eglDisplay == EGL_NO_DISPLAY in WebCore::PlatformDisplay::~PlatformDisplay
https://bugs.webkit.org/show_bug.cgi?id=174789

Reviewed by Žan Doberšek.

Before r218629, the wayland nested compositor display was a singleton created on demand by
AcceleratedSurfaceWayland, but now it's created unconditionally on web process creation when a valid display
name is received from the UI process. The side effect of this is that now the shared display is created after
the nested compositor display that is not a singleton anymore. The atexit used by PlatformDisplay to shutdown
egl display assumes that it will be registered by the shared display. Since we switched to on demand AC mode,
the shared display is only used in the web process when entering AC mode, that's why it only crashes when we
have entered AC at least once. We just need to ensure that the shared display is created before the nested
compositor display.

  • WebProcess/gtk/WaylandCompositorDisplay.cpp:

(WebKit::WaylandCompositorDisplay::create): Check we are under wayland before creating the WaylandCompositorDisplay.

4:36 AM Changeset in webkit [219865] by Carlos Garcia Campos
  • 4 edits in trunk/Tools

[GTK] TestWebKitAPI tests are no longer built since the WebKit2 rename
https://bugs.webkit.org/show_bug.cgi?id=174815

Reviewed by Carlos Alberto Lopez Perez.

Only WebKitGTK specific tests are built, but not WebKit2, WTF nor WebCore ones. We are still checking
ENABLE_WEBKIT2 in the makefile, that was renamed to ENABLE_WEBKIT. Also, all WebKit2 test paths were updated to
use WebKit dir, while the tests are still in WebKit2 directory. This patch also removes
TestWebKitAPIInjectedBundle_PATH that is unused and now makes the configure to fail (it used to be a warning, I
think), probably because of a newer CMake version.

  • CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformGTK.cmake:
4:29 AM WebKitGTK/KeepingTheTreeGreen edited by clopez@igalia.com
(diff)
4:28 AM WebKitGTK/KeepingTheTreeGreen edited by clopez@igalia.com
(diff)
4:25 AM WebKitGTK/KeepingTheTreeGreen edited by clopez@igalia.com
(diff)
3:22 AM Changeset in webkit [219864] by Carlos Garcia Campos
  • 2 edits in trunk

Unreviewed. Fix GTK+ WebKit2 library soname after r219488.

The WebKit2 -> WebKit rename shouldn't affect the GTK+ library that is still called libwebkit2gtk, so keep using
WEBKIT2 as the library name in CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE, since that's also what the WebKit
makefile passes to WEBKIT_POPULATE_LIBRARY_VERSION.

  • Source/cmake/OptionsGTK.cmake:

Jul 24, 2017:

11:49 PM Changeset in webkit [219863] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[GTK] ASSERTION FAILED: client in WebKit::IconDatabase::setClient
https://bugs.webkit.org/show_bug.cgi?id=174788

Patch by Michael Catanzaro <Michael Catanzaro> on 2017-07-24
Reviewed by Carlos Garcia Campos.

IconDatabase ensures that setClient is never called with nullptr, but WebKitFaviconDatabase
does exactly that. First, ensure it's safe to unset the client. Next, we can either remove
the assertions from setClient or else automatically unset the client in IconDatabase::close.
I opted to do both.

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::close):
(WebKit::IconDatabase::setIconDataForIconURL):
(WebKit::IconDatabase::setIconURLForPageURL):

  • UIProcess/API/glib/WebKitFaviconDatabase.cpp:

(_WebKitFaviconDatabasePrivate::~_WebKitFaviconDatabasePrivate): Deleted.
(webkitFaviconDatabaseDispose): Deleted.

11:45 PM Changeset in webkit [219862] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Remove useless conditional in IconDatabase::setIconDataForIconURL
https://bugs.webkit.org/show_bug.cgi?id=174792

Patch by Michael Catanzaro <Michael Catanzaro> on 2017-07-24
Reviewed by Carlos Garcia Campos.

We have in IconDatabase::setIconDataForIconURL some code in a conditional to check if it's
not being executed on the icon sync thread. But at the top of the function is an assertion
to ensure the code is never executed on the icon sync thread. The condition is therefore
useless and the code should be executed unconditionally.

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::setIconDataForIconURL):

11:39 PM Changeset in webkit [219861] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK] Icon database error and crash
https://bugs.webkit.org/show_bug.cgi?id=174760

Reviewed by Michael Catanzaro.

The crash is a debug ASSERT that happens when the IconRecord image is created in one thread and destroyed in
another one. IconDatabase creates and destroys IconRecord objects in both database and main thread. The
IconRecord is destroyed when the icon is no longer retained, and we only release icons when we fail to get the
image data (including pages that don't have a favicon). We can prevent this crash from happening if we ensure we
never create an Image for an IconRecord when the given image data is nullptr.

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::IconRecord::setImageData):

9:36 PM Changeset in webkit [219860] by commit-queue@webkit.org
  • 7 edits in trunk/Tools

Fix BenchmarkRunner to only import selenium when needed
https://bugs.webkit.org/show_bug.cgi?id=174808

Patch by Matthew Stewart <matthew_r_stewart@apple.com> on 2017-07-24
Reviewed by Stephanie Lewis.

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_chrome_driver.py:

(LinuxChromeDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_firefox_driver.py:

(LinuxFirefoxDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:

(OSXChromeDriver.launch_driver):
(OSXChromeCanaryDriver.launch_driver):
(create_chrome_options):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:

(OSXFirefoxDriver.launch_driver):
(OSXFirefoxNightlyDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:

(OSXSafariDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py:

(WebDriverBenchmarkRunner._run_one_test):

9:35 PM Changeset in webkit [219859] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebKit

Cherry-pick r219852. rdar://problem/33503476

9:29 PM Changeset in webkit [219858] by Darin Adler
  • 51 edits in trunk

More NeverDestroyed and related cleanup
https://bugs.webkit.org/show_bug.cgi?id=174745

Reviewed by Alex Christensen.

Source/WebCore:

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::JSCustomElementInterface::constructElementWithFallback):
Use isNull() rather than comparing against nullAtom() since it's
slightly more efficient.

  • css/MediaQueryEvaluator.cpp:

(WebCore::prefersReducedMotionEvaluate): Use a switch statement for the
three states of forcedPrefersReducedMotionAccessibilityValue. Also update
to use Theme::singleton() instead of platformTheme().

  • dom/QualifiedName.h: Removed some unneeded includes, minor style tweaks,

and use isNull() rather than comparing against nullAtom() since it's
slightly more efficient.

  • html/Autofill.cpp:

(WebCore::AutofillData::createFromHTMLFormControlElement): Use isNull()
rather than comparing against nullAtom() since it's slightly more efficient.

  • html/HTMLDocument.cpp:

(WebCore::addLocalNameToSet): Deleted.
(WebCore::createHtmlCaseInsensitiveAttributesSet): Deleted.
(WebCore::HTMLDocument::isCaseSensitiveAttribute): Moved the case-sensitive
attribute set in here and made it use makeNeverDestroyed.

  • html/HTMLNameCollection.cpp:

(WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
Formatted vertically and sorted so it's easier to see what it does.
(WebCore::WindowNameCollection::elementMatches): Use boolean logic instead
of multiple return statements to make this a little more straightforward.
(WebCore::isObjectElementForDocumentNameCollection): Added. Calls the new
isExposed function. The old code called this isDocNamedItem.
(WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
Use isObjectElementForDocumentNameCollection to clean up logic. Also
sorted classes.
(WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
Use isObjectElementForDocumentNameCollection to clean up logic. Also
sorted classes and formatted vertically.
(WebCore::DocumentNameCollection::elementMatches): Write in terms of
above functions for clarity. Efficiency is roughly the same.

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::HTMLObjectElement): Initialize data members
in class definition instead of here.
(WebCore::HTMLObjectElement::childrenChanged): Update for name change;
function is now called updateExposedState rather than updateDocNamedItem.
Also use m_useFallbackContent directly instead of through a function.
(WebCore::HTMLObjectElement::renderFallbackContent): Ditto.
(WebCore::preventsParentObjectFromExposure): Added. Replaces the old
isRecognizedTagName function, and does almost the same thing, but the
argument type is different and the param tag is now one of the tags
exempted here. Also broke up into two overloads so we can handle the
Element, Text, and other Node cases.
(WebCore::shouldBeExposed): Added. Helper for the updateExposedState
function that handles the logic of when the element should be exposed,
separating it from what to do when the state changes.
(WebCore::HTMLObjectElement::updateExposedState): Renamed from
updateDocNamedItem.

  • html/HTMLObjectElement.h: Renamed isDocNamedItem -> isExposed,

m_docNamedItem -> m_isExposed, updateDocNamedItem -> updateExposedState,
stopped using bit fields for the two boolean data members, and
initialized those data members here in the class definition.

  • platform/Theme.cpp:

(WebCore::Theme::baselinePositionAdjustment): Moved here from header.
(WebCore::Theme::controlFont): Ditto.
(WebCore::Theme::controlSize): Ditto.
(WebCore::Theme::minimumControlSize): Ditto.
(WebCore::Theme::controlRequiresPreWhiteSpace): Ditto.
(WebCore::Theme::paint): Ditto.
(WebCore::Theme::inflateControlPaintRect): Ditto.
(WebCore::Theme::userPrefersReducedMotion): Ditto.
(WebCore::Theme::controlBorder): Fixed switch statement indentation.
(WebCore::Theme::controlPadding): Ditto.

  • platform/Theme.h: Removed the many unnecessary includes. The one

I was really after here was FontCascade.h. Replaced the platformTheme
function with a singleton function, following our normal style. Also
changed the return type to a reference rather than a pointer.
Removed many unused function and data members.

  • platform/cocoa/ThemeCocoa.h: Tightened up implementation, removing

unnecessary members and making overrides private.

  • platform/cocoa/ThemeCocoa.mm: Moved include in here.
  • platform/gamepad/glib/GamepadsGlib.cpp:

(WebCore::sampleGamepads): Use NeverDestroyed instead of
DEPRECATED_DEFINE_STATIC_LOCAL.

  • platform/graphics/FontCascade.cpp:

(WebCore::useBackslashAsYenSignForFamily): Build the set in a cleaner
way and use a NeverDestroyed set instead of a heap-allocated one.
(WebCore::FontCascade::FontCascade): Moved initialization of data members
to the class definition.

  • platform/graphics/FontCascade.h: Initialize GlyphOverflow and

FonstCascade data members in the class definition. Remove the constructor
for GlyphOverflow entirely. Added FIXME about the peculiar != operator we
defined for GlyphOverflow.

  • platform/graphics/NamedImageGeneratedImage.cpp:

(WebCore::NamedImageGeneratedImage::draw): Use Theme::singleton() instead
of platformTheme().
(WebCore::NamedImageGeneratedImage::drawPattern): Ditto.

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

(WebCore::CMTimeRangeStartKey): Use CFSTR directly instead of using
DEPRECATED_DEFINE_STATIC_LOCAL.
(WebCore::CMTimeRangeDurationKey): Ditto.
(WebCore::CACFContextNeedsFlushNotification): Ditto.

  • platform/graphics/ca/win/LayerChangesFlusher.cpp:

(WebCore::LayerChangesFlusher::singleton): Use NeverDestroyed instead of
DEPRECATED_DEFINE_STATIC_LOCAL.

  • platform/graphics/ca/win/LayerChangesFlusher.h: Ditto.
  • platform/graphics/cg/ImageSourceCGWin.cpp:

(WebCore::preferredExtensionForImageSourceType): Use HashMap constructor
instead of writing out a lot of add calls.

  • platform/graphics/harfbuzz/HarfBuzzFace.cpp:

(WebCore::harfBuzzFaceCache): Use NeverDestroyed instead of
DEPRECATED_DEFINE_STATIC_LOCAL.

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::FontCache::lastResortFallbackFont): Ditto.

  • platform/ios/ThemeIOS.h: Tightened up implementation, removing

unnecessary members and making overrides private.

  • platform/ios/ThemeIOS.mm:

(WebCore::Theme::singleton): Renamed from platformTheme.

  • platform/mac/ThemeMac.h: Tightened up implementation, removing

unnecessary members and making overrides private. Removed unneeded
WTF_MAKE_FAST_ALLOCATED since this is never allocated on the heap.
Removed unused -[NSFont webCoreFamilyName] method.

  • platform/mac/ThemeMac.mm:

(-[NSFont webCoreFamilyName]): Deleted.
(WebCore::Theme::singleton): Renamed from platformTheme.

  • platform/mediastream/mac/MockRealtimeAudioSourceMac.h:

Removed unneeded include of FontCascade.h.

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.h:

Ditto.

  • platform/mock/MockRealtimeAudioSource.h: Ditto.
  • platform/network/win/DownloadBundleWin.cpp:

(WebCore::DownloadBundle::fileExtension): Use NeverDestroyed
instead of DEPRECATED_DEFINE_STATIC_LOCAL.

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::replaceNewlinesWithWindowsStyleNewlines): Use
appendLiteral instead of DEPRECATED_DEFINE_STATIC_LOCAL.

  • platform/win/FileSystemWin.cpp:

(WebCore::bundleName): Use NeverDestroyed instead of
DEPRECATED_DEFINE_STATIC_LOCAL, and used a lambda to initialize
rather than a boolean to control one-time code.
(WebCore::storageDirectory): Removed unneeded use of
DEPRECATED_DEFINE_STATIC_LOCAL for a prefix we are appending to
a String. The + operator can handle a literal just as efficiently
without first storing it in a String.

  • platform/wpe/ThemeWPE.cpp:

(WebCore::Theme::singleton): Renamed from platformTheme.

  • platform/wpe/ThemeWPE.h: Tightened up implementation, removing

unnecessary members and making overrides private.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::RenderTheme): No need to initialize m_theme.
(WebCore::RenderTheme::adjustStyle): Use Theme::singleton() instead
of accessing it through m_theme.
(WebCore::RenderTheme::paint): Ditto.
(WebCore::RenderTheme::baselinePosition): Ditto.
(WebCore::RenderTheme::adjustRepaintRect): Ditto.
(WebCore::RenderTheme::setCustomFocusRingColor): Ditto.
(WebCore::RenderTheme::platformTapHighlightColor): Ditto.

  • rendering/RenderTheme.h: Removed unneded m_theme and unneeded

inclusion of Theme.h.

  • rendering/line/LineBreaker.h: Removed unneeded include of

FontCascade.h.

Source/WebKitLegacy/mac:

  • DOM/DOMUIKitExtensions.mm: Removed a lot of unneeded "using"

for names that aren't even used in this file.
(-[DOMNode boundingBoxes]): Use @[] syntax instead of
-[NSArray arrayWithObject:].
(-[DOMNode absoluteQuads]): Ditto.
(-[DOMNode findExplodedTextNodeAtPoint:]): Use auto* instead
of writing out various types.
(-[DOMHTMLAreaElement boundingBoxesWithOwner:]): Use @[]
syntax instea of -[NSArray arrayWithObject:].
(-[DOMHTMLAreaElement absoluteQuadsWithOwner:]): Ditto.
(-[DOMHTMLImageElement dataRepresentation:]): Use auto* instead
of writing out various types.
(-[DOMHTMLImageElement mimeType]): Ditto.

Source/WebKitLegacy/win:

  • Plugins/PluginDatabase.cpp:

(WebCore::persistentPluginMetadataCachePath): Use NeverDestroyed
instead of DEPRECATED_DEFINE_STATIC_LOCAL.

  • Plugins/PluginMainThreadScheduler.cpp:

(WebCore::PluginMainThreadScheduler::scheduler): Ditto.

  • Plugins/PluginMainThreadScheduler.h: Ditto.
  • WebCoreSupport/WebPlatformStrategies.cpp:

(WebPlatformStrategies::initialize): Ditto.

  • WebCoreSupport/WebPlatformStrategies.h: Ditto.
  • WebHistory.cpp:

(sharedHistoryStorage): Ditto.

  • WebLocalizableStrings.cpp:

(mainBundleLocStrings): Ditto.
(frameworkLocStringsMutex): Ditto.
(frameworkLocStrings): Ditto.

  • WebView.cpp:

(WebView::standardUserAgentWithApplicationName): Ditto.
Also changed to keep one global string with the prefix of the user agent string
instead of keeping two globals with pieces of that prefix.

Tools:

  • DumpRenderTree/JavaScriptThreading.cpp:

(javaScriptThreadsMutex): Use NeverDestroyed instead of
DEPRECATED_DEFINE_STATIC_LOCAL.
(javaScriptThreads): Ditto.

9:10 PM Changeset in webkit [219857] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk/Tools

Subclass Benchmark Runner script for WebDriver support
https://bugs.webkit.org/show_bug.cgi?id=174390

Patch by Matthew Stewart <matthew_r_stewart@apple.com> on 2017-07-24
Reviewed by Dewei Zhu, Stephanie Lewis.

Add WebServerBenchmarkRunner and WebDriverBenchmarkRunner subclasses.

  • Scripts/webkitpy/benchmark_runner/benchmark_builder.py:

(BenchmarkBuilder.init):

  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py:

(BenchmarkRunner.init):
(BenchmarkRunner._find_plan_file):
(BenchmarkRunner._run_one_test.and):
(BenchmarkRunner.execute):
(BenchmarkRunner._get_result): Deleted.

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py:

(parse_args):
(start):

  • Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py: Added.

(WebDriverBenchmarkRunner):
(WebDriverBenchmarkRunner._get_result):
(WebDriverBenchmarkRunner._run_one_test):

  • Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Added.

(WebServerBenchmarkRunner):
(WebServerBenchmarkRunner.init):
(WebServerBenchmarkRunner._get_result):
(WebServerBenchmarkRunner._run_one_test):

8:59 PM Changeset in webkit [219856] by Chris Dumez
  • 184 edits in trunk/Source

ExceptionCode enumeration should use modern exception names
https://bugs.webkit.org/show_bug.cgi?id=174794

Reviewed by Geoffrey Garen.

Source/WebCore:

ExceptionCode enumeration should use modern exception names consistently.
This makes the code nicer and closer to the text of the specification.

Source/WebKitLegacy/mac:

  • DOM/ExceptionHandlers.mm:

(raiseNotSupportedErrorException):

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

[WK2][Cocoa] Allow overriding the ITP data removal internal using a default
https://bugs.webkit.org/show_bug.cgi?id=174802
<rdar://problem/33497898>

Reviewed by Sam Weinig.

Allow overriding the ITP data removal internal using a default to facilitate testing.
Can be used like so:
defaults write -g ResourceLoadStatisticsMinimumTimeBetweenDataRecordsRemoval 60

Will cause us to write every 60 seconds instead of 3600.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:

(WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):

6:58 PM Changeset in webkit [219854] by commit-queue@webkit.org
  • 14 edits
    10 copies
    11 moves
    2 adds in trunk/Tools

Add BenchmarkRunner patches with WebDriver support for each testing plan
https://bugs.webkit.org/show_bug.cgi?id=174443

Patch by Matthew Stewart <matthew_r_stewart@apple.com> on 2017-07-24
Reviewed by Dewei Zhu, Stephanie Lewis.

  • Scripts/webkitpy/benchmark_runner/benchmark_builder.py:

(BenchmarkBuilder.enter):

  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/ARES-6.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/ContentAnimation.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/Dromaeo.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/JSBench.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/JetStream.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/Kraken.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/MotionMark.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/Octane.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/Speedometer.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webdriver/SunSpider.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/Animometer.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/ContentAnimation.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/Dromaeo.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/JSBench.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/JetStream.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/Kraken.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/MotionMark.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/Octane.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/Speedometer.patch:
  • Scripts/webkitpy/benchmark_runner/data/patches/webserver/SunSpider.patch:
  • Scripts/webkitpy/benchmark_runner/data/plans/ares6.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/content-animation.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/jsbench.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/kraken.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/octane.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/speedometer.plan:
  • Scripts/webkitpy/benchmark_runner/data/plans/sunspider.plan:
6:42 PM Changeset in webkit [219853] by commit-queue@webkit.org
  • 10 edits in trunk/Tools

Add functions to autoinstaller needed for Benchmark Runner script
https://bugs.webkit.org/show_bug.cgi?id=174331

Patch by Matthew Stewart <matthew_r_stewart@apple.com> on 2017-07-24
Reviewed by Dean Johnson, Dewei Zhu, Stephanie Lewis.

Adds autoinstaller functions to install selenium and webdriver binaries
which will be used by the browser driver part of Benchmark Runner.

  • Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:

(BrowserDriver.restore_env):
(BrowserDriver):
(BrowserDriver.get_webdriver_binary_path):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_chrome_driver.py:

(LinuxChromeDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_firefox_driver.py:

(LinuxFirefoxDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:

(OSXChromeDriver.launch_driver):
(OSXChromeCanaryDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:

(OSXFirefoxDriver.launch_driver):
(OSXFirefoxNightlyDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
  • Scripts/webkitpy/benchmark_runner/utils.py:

(get_driver_binary_path):

  • Scripts/webkitpy/common/system/autoinstall.py:

(AutoInstaller._unzip):

  • Scripts/webkitpy/thirdparty/init.py:

(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_selenium):
(AutoinstallImportHook):
(AutoinstallImportHook._install_chromedriver):
(AutoinstallImportHook._install_geckodriver):
(AutoinstallImportHook.get_latest_pypi_url):
(AutoinstallImportHook.install_binary):
(autoinstall_everything):
(get_driver_filename):
(get_os_info):

6:17 PM Changeset in webkit [219852] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

[iOS WK2] Crash under PageOverlayController::uninstallPageOverlay when doing multiple finds
https://bugs.webkit.org/show_bug.cgi?id=174806
rdar://problem/33501664

Reviewed by Tim Horton.

Calling TextIndicator::createWithSelectionInFrame can trigger layout via VisibleSelection code,
which can re-enter FindController::updateFindIndicator which has by now removed m_findIndicatorOverlay
from pageOverlayController's map, but not deleted it. The second call to uninstallPageOverlay()
thus crashes at m_overlayGraphicsLayers.take(&overlay)->removeFromParent().

Fix by nulling out m_findIndicatorOverlay as soon as we uninstall it.

  • WebProcess/WebPage/ios/FindControllerIOS.mm:

(WebKit::FindController::updateFindIndicator):

5:51 PM Changeset in webkit [219851] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Settings: Some controls overlay settings header
https://bugs.webkit.org/show_bug.cgi?id=174804

Patch by Nikita Vasilyev <me@elv1s.ru> on 2017-07-24
Reviewed by Matt Baker.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings .navigation-bar):

5:40 PM Changeset in webkit [219850] by commit-queue@webkit.org
  • 11 edits in trunk/Tools

Add WebDriver support in browser driver part of BenchmarkRunner
https://bugs.webkit.org/show_bug.cgi?id=174445

Patch by Matthew Stewart <matthew_r_stewart@apple.com> on 2017-07-24
Reviewed by Stephanie Lewis.

Adds a launch_driver function to each BrowserDriver subclass. This
function sets up the arguments for the webdriver and launches the
webdriver specific to that browser.

  • Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:

(BrowserDriver.launch_webdriver):
(BrowserDriver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py:

(LinuxBrowserDriver.launch_webdriver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_chrome_driver.py:

(LinuxChromeDriver.launch_url):
(LinuxChromeDriver):
(LinuxChromeDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_epiphany_driver.py:

(EpiphanyBrowserDriver.launch_url):
(EpiphanyBrowserDriver):
(EpiphanyBrowserDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_firefox_driver.py:

(LinuxFirefoxDriver):
(LinuxFirefoxDriver.launch_url):
(LinuxFirefoxDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_minibrowsergtk_driver.py:

(GTKMiniBrowserDriver.launch_url):
(GTKMiniBrowserDriver):
(GTKMiniBrowserDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:

(OSXBrowserDriver._launch_webdriver):
(OSXBrowserDriver):
(OSXBrowserDriver._screen_size):
(OSXBrowserDriver._insert_url):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:

(OSXChromeDriver):
(OSXChromeDriver.launch_url):
(OSXChromeDriver.launch_driver):
(OSXChromeCanaryDriver):
(OSXChromeCanaryDriver.launch_url):
(OSXChromeCanaryDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:

(OSXFirefoxDriver):
(OSXFirefoxDriver.launch_url):
(OSXFirefoxDriver.launch_driver):
(OSXFirefoxNightlyDriver):
(OSXFirefoxNightlyDriver.launch_url):
(OSXFirefoxNightlyDriver.launch_driver):

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:

(OSXSafariDriver.launch_driver):

4:54 PM Changeset in webkit [219849] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

[Win] The tests fast/text/line-height-minimumFontSize*.html are failing.
https://bugs.webkit.org/show_bug.cgi?id=174801

Unreviewed test gardening, update test expectations for failing tests.

  • platform/win/TestExpectations:
4:52 PM Changeset in webkit [219848] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Consider implementing W3C Payment Request API
https://bugs.webkit.org/show_bug.cgi?id=174796

Reviewed by Daniel Bates.

Add Payment Request to features.json as "Under Consideration".

  • features.json:
4:41 PM Changeset in webkit [219847] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked tests as failures.
<rdar://problem/33437597>

Unreviewed test gardening.

  • platform/mac-highsierra/TestExpectations:
4:12 PM Changeset in webkit [219846] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Fixed typo in test expectations.
https://bugs.webkit.org/show_bug.cgi?id=173010

Unreviewed gardening.

  • platform/ios-simulator-wk2/TestExpectations:
3:50 PM Changeset in webkit [219845] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()
https://bugs.webkit.org/show_bug.cgi?id=174790

Reviewed by Brady Eidson.

Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore().
WorkQueue::dispatchAfter() keeps the WorkQueue alive because its implementation keeps a strong ref to
|this|. As a result, the lambda passed to dispatchAfter(), which calls writeMemoryStoreToDisk(), can
get executed after the store is gone.

To address the issue, we now use a RunLoop::Timer to schedule the write, instead of a
WorkQueue::dispatchAfter() call. This way, we are guaranteed that the callback will not get called
after the store has been destroyed.

  • UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:

(WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
(WebKit::ResourceLoadStatisticsPersistentStorage::asyncWriteTimerFired):
(WebKit::ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore):
(WebKit::ResourceLoadStatisticsPersistentStorage::finishAllPendingWorkSynchronously):
(WebKit::ResourceLoadStatisticsPersistentStorage::ref):
(WebKit::ResourceLoadStatisticsPersistentStorage::deref):

  • UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:
3:42 PM Changeset in webkit [219844] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

[Win] Async image tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=174653

Unreviewed test gardening, update test expectations for async image tests.

  • platform/win/TestExpectations:
3:29 PM Changeset in webkit [219843] by Simon Fraser
  • 2 edits in trunk/LayoutTests

Rebaseline this test. The previous result was generated using an older iOS SDK.

  • fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt:
3:26 PM Changeset in webkit [219842] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark Skia font test as image only failure on Windows.

Unreviewed test gardening.

  • platform/win/TestExpectations:
2:57 PM Changeset in webkit [219841] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest userscripts/user-script-audio-document.html failing on High Sierra
https://bugs.webkit.org/show_bug.cgi?id=174726
rdar://problem/30059973

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-24
Reviewed by Alexey Proskuryakov.

Underlying issue has been resolved.
Re-enable test: userscripts/user-script-audio-document.html

  • platform/mac-highsierra/TestExpectations:
2:57 PM Changeset in webkit [219840] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix Mac cmake build

  • PlatformMac.cmake:
2:53 PM Changeset in webkit [219839] by Simon Fraser
  • 2 edits in trunk/LayoutTests

Fix typo (Timout -> Timeout).

  • platform/mac-wk2/TestExpectations:
2:42 PM Changeset in webkit [219838] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Unreviewed, rolling out r219828.

Causes debug assertions to be hit on iOS

Reverted changeset:

"Fix lifetime management issue in
ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()"
https://bugs.webkit.org/show_bug.cgi?id=174790
http://trac.webkit.org/changeset/219828

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

5 wav media layoutTest timeouts on High Sierra
https://bugs.webkit.org/show_bug.cgi?id=174725
rdar://problem/30182218

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-24
Reviewed by Andreas Kling.

Underlying issue is fixed. Re-enable tests on High Sierra.

media/audio-controls-timeline-in-media-document.html
media/audio-data-url.html
media/media-document-audio-controls-visible.html
media/media-document-audio-repaint.html
media/media-document-audio-size.html

  • platform/mac-highsierra/TestExpectations:
1:58 PM Changeset in webkit [219836] by Wenson Hsieh
  • 3 edits
    1 copy in trunk/Tools

[Mac WK2] Add an API test to cover r219765 (null dereference in [WKWebView dealloc])
https://bugs.webkit.org/show_bug.cgi?id=174793

Reviewed by Tim Horton.

Adds a new unit test that invokes some asynchronous NSTextInputClient SPI methods as the web view is tearing
down. Without r219765, this test will dereference null and crash.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/TestWebKitAPI/mac/NSTextInputClientSPI.h: Added.
  • TestWebKitAPI/Tests/mac/WKWebViewSelectionTests.mm:

(TEST):

1:20 PM Changeset in webkit [219835] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

1:15 PM Changeset in webkit [219834] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.33

Tag Safari-604.1.33.

12:16 PM Changeset in webkit [219833] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebDriver

WebDriver: rename m_browsingContext as m_currentBrowsingContext in Session
https://bugs.webkit.org/show_bug.cgi?id=174783

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-07-24
Reviewed by Brian Burg.

We have m_toplevelBrowsingContext and m_browsingContext, which is confusing. m_browsingContext is actually the
current browsing context, and the spec also refers to it as the current browsing context, so better use
m_currentBrowsingContext.

  • Session.cpp:

(WebDriver::Session::switchToTopLevelBrowsingContext):
(WebDriver::Session::switchToBrowsingContext):
(WebDriver::Session::switchToFrame):
(WebDriver::Session::switchToParentFrame):
(WebDriver::Session::computeElementLayout):
(WebDriver::Session::findElements):
(WebDriver::Session::isElementSelected):
(WebDriver::Session::getElementText):
(WebDriver::Session::getElementTagName):
(WebDriver::Session::isElementEnabled):
(WebDriver::Session::isElementDisplayed):
(WebDriver::Session::getElementAttribute):
(WebDriver::Session::waitForNavigationToComplete):
(WebDriver::Session::elementClear):
(WebDriver::Session::elementSendKeys):
(WebDriver::Session::elementSubmit):
(WebDriver::Session::executeScript):

  • Session.h:
11:55 AM Changeset in webkit [219832] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Stop using AutodrainedPool in IconDatabase
https://bugs.webkit.org/show_bug.cgi?id=174791

Reviewed by Alex Christensen.

AutodrainedPool seems to be some NS garbage collection thing that has no implementation on
other platforms. Now that IconDatabase is used only by GTK and WPE, we can stop using it.

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::setIconDataForIconURL):
(WebKit::IconDatabase::setIconURLForPageURL):
(WebKit::IconDatabase::iconDatabaseSyncThread):
(WebKit::IconDatabase::performURLImport):
(WebKit::IconDatabase::readFromDatabase):

11:42 AM Changeset in webkit [219831] by Chris Dumez
  • 200 edits in trunk/Source

Make ExceptionCode a proper enumeration
https://bugs.webkit.org/show_bug.cgi?id=174771

Reviewed by Sam Weinig.

Make ExceptionCode a proper enumeration instead of a typedef to uint8_t.

Source/WebCore:

  • Modules/fetch/FetchBody.h:

(WebCore::FetchBody::formData):

  • Modules/indexeddb/shared/IDBError.h:

(WebCore::IDBError::encode):
(WebCore::IDBError::decode):

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::rejectWithException):

  • dom/Exception.h:
  • dom/ExceptionCode.h:
  • fileapi/FileReaderSync.cpp:

(WebCore::errorCodeToExceptionCode):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::texImage2D):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createRequest):

  • xml/XMLHttpRequest.h:

Source/WebKitLegacy/win:

  • DOMCoreClasses.cpp:

(DOMDocument::createEvent):

  • WebView.cpp:

(WebView::prepareCandidateWindow):

11:34 AM Changeset in webkit [219830] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

[Win] Implement Authentication dialog in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=174662

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-07-24
Reviewed by Alex Christensen.

  • MiniBrowser/win/Common.cpp:

(CustomUserAgent):
(DisplayAuthDialog):
(AuthDialogProc):

  • MiniBrowser/win/MiniBrowserLib.rc:
  • MiniBrowser/win/MiniBrowserLibResource.h:
  • MiniBrowser/win/ResourceLoadDelegate.cpp:

(ResourceLoadDelegate::didReceiveAuthenticationChallenge):

11:07 AM Changeset in webkit [219829] by Simon Fraser
  • 12 edits
    2 adds in trunk

Change "client" coordinates back to match scrolling coordinates
https://bugs.webkit.org/show_bug.cgi?id=174734
rdar://problem/33336930

Reviewed by Tim Horton.

Baidu.com (which uses jQuery), and various iOS apps make the assumption that getBoundingClientRect() returns a rectangle
that can be used to set or compare with the scroll position. With visual viewports, that assumption is no longer valid
when the page is zoomed, or when the keyboard has caused the visual viewport to detach from the layout viewport.

At this point the compatibility cost of shipping layout viewport-based client rects seems higher than the gain, so revert
to the shipping behavior. This reverts r216803, and will re-introduce bugs that occurred on zoomed pages on macOS,
many of which are noted in webkit.org/b/170981.

  • page/FrameView.cpp:

(WebCore::FrameView::documentToClientOffset):

LayoutTests:
Revert "client" coordinates to be in scrolling coordinates
https://bugs.webkit.org/show_bug.cgi?id=174734
rdar://problem/33336930

Reviewed by Tim Horton.

Rebaseline.

  • fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt:
  • fast/visual-viewport/client-coordinates-relative-to-layout-viewport-expected.txt:
  • fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt:
  • fast/visual-viewport/zoomed-fixed-expected.txt:
  • fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
  • fast/zooming/client-rect-in-fixed-zoomed-expected.txt:
  • platform/ios-wk2/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/cssom-view/elementFromPoint-expected.txt: Added.
  • platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt:
  • platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
10:43 AM Changeset in webkit [219828] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()
https://bugs.webkit.org/show_bug.cgi?id=174790

Reviewed by Brady Eidson.

Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore().
WorkQueue::dispatchAfter() keeps the WorkQueue alive because its implementation keeps a strong ref to
|this|. As a result, the lambda passed to dispatchAfter(), which calls writeMemoryStoreToDisk(), can
get executed after the store is gone.

  • UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:

(WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
(WebKit::ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore):

  • UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:

(WebKit::ResourceLoadStatisticsPersistentStorage::createWeakPtr):

10:31 AM Changeset in webkit [219827] by Jonathan Bedard
  • 3 edits in trunk/Tools

Handle case where line_numbers is None instead of an array of line numbers
https://bugs.webkit.org/show_bug.cgi?id=174775

Reviewed by Aakash Jain.

Added files set line_numbers to None in process_file.

  • Scripts/webkitpy/style/filereader.py:

(TextFileReader.process_file): Handle case where line_number is set to None.

  • Scripts/webkitpy/style/main_unittest.py:

(ExpectationLinterInStyleCheckerTest.test_linter_added_file_with_error): Test case of an added file.

10:13 AM Changeset in webkit [219826] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: should only show Canvases in resource type filter if debug setting enabled
https://bugs.webkit.org/show_bug.cgi?id=174765
<rdar://problem/33479009>

Reviewed by Devin Rousso.

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel):

9:41 AM Changeset in webkit [219825] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html as failure.
https://bugs.webkit.org/show_bug.cgi?id=172148

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:06 AM Changeset in webkit [219824] by Darin Adler
  • 2 edits in trunk/LayoutTests

Remove race from one plug-in test
https://bugs.webkit.org/show_bug.cgi?id=130653

Reviewed by Antti Koivisto.

  • plugins/plugin-remove-readystatechange.html: Updated test to use waitUntilDone/notifyDone

rather than racing. Added a computation of offsetLeft to trigger layout and adding a long
comment explaining why this is both needed and potentially insufficient in the long run.

9:01 AM Changeset in webkit [219823] by clopez@igalia.com
  • 3 edits in trunk/Source/WebCore/PAL

[CMake] libtasn1 should not be required when not enabling subtle_crypto
https://bugs.webkit.org/show_bug.cgi?id=174785

Reviewed by Žan Doberšek.

  • pal/PlatformGTK.cmake:
  • pal/PlatformWPE.cmake:
8:43 AM Changeset in webkit [219822] by jmarcell@apple.com
  • 4 edits
    10 adds in branches/safari-604-branch

Cherry-pick r219665.

7:46 AM Changeset in webkit [219821] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Gardening: fixed C Loop build after r219790.
https://bugs.webkit.org/show_bug.cgi?id=174696

Not reviewed.

  • assembler/testmasm.cpp:
7:27 AM Changeset in webkit [219820] by zandobersek@gmail.com
  • 5 edits in trunk

[WPE] Add libepoxy to the Jhbuild moduleset
https://bugs.webkit.org/show_bug.cgi?id=174711

Reviewed by Carlos Alberto Lopez Perez.

.:

libepoxy 1.3.1 that's widely available in current stable distributions (Debian stable,
Ubuntu LTS) does suffice our needs, but also contains a bug that incorrectly determines
the current EGL context and the API version of OpenGL that's bound to that context.
Focusing on experiences on Debian systems, while the current stable Debian release has
this bug patched, the package for the testing distribution of Debian removed that same
patch for whatever reason, despite using the 1.3.1 version as the package basis.

To avoid this, libepoxy 1.4.3 is now added to WPE's Jhbuild moduleset. The WPE port
also now demands at least the 1.4.0 version to be available when configuring.

We should revisit the minimum version for libepoxy in the future if the 1.3 release
branch gets updated with the proper fix.

  • Source/cmake/FindLibEpoxy.cmake:
  • Source/cmake/OptionsWPE.cmake:

Tools:

  • wpe/jhbuild.modules: Add libepoxy 1.4.3 to WPE's Jhbuild moduleset.
7:24 AM Changeset in webkit [219819] by zandobersek@gmail.com
  • 11 edits
    3 adds
    1 delete in trunk

[WPE] libepoxy headers can use EGL_CAST, which might not be defined by eglplatform.h
https://bugs.webkit.org/show_bug.cgi?id=174780

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Newer versions of libepoxy provide EGL definitions that already use the EGL_CAST macro.
We'd like to compile on systems where the eglplatform.h header doesn't yet provide
that macro that was added only recently (e.g. it's available in Mesa 17.1, but not
before).

To address that, the EpoxyEGL.h header is added that first includes the libepoxy's EGL
header and then provides the EGL_CAST definition in case the eglplatform.h header doesn't.
This header should be included in place of <epoxy/egl.h> (which is included in this new
header).

The EpoxyEGL.h and EpoxyShims.h headers are also moved under the platform/graphics/epoxy/
directory, with the new directory added to the list of inclusion paths for WPE.

  • PlatformWPE.cmake:
  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/cairo/CairoUtilities.cpp:
  • platform/graphics/cairo/ImageBufferCairo.cpp:
  • platform/graphics/egl/GLContextEGL.cpp:
  • platform/graphics/egl/GLContextEGLWPE.cpp:
  • platform/graphics/epoxy/EpoxyEGL.h: Added.
  • platform/graphics/epoxy/EpoxyShims.h: Renamed from Source/WebCore/platform/graphics/EpoxyShims.h.
  • platform/graphics/opengl/Extensions3DOpenGLES.cpp:
  • platform/graphics/wpe/PlatformDisplayWPE.cpp:

Tools:

  • WebKitTestRunner/wpe/HeadlessViewBackend.cpp:

Manually define the EGL_CAST macro to the C++ version that uses static_cast<>
in case the eglplatform.h header doesn't provide that macro. This replicates
the work in WebCore's EpoxyEGL.h header, but we can't include that header here.

6:50 AM Changeset in webkit [219818] by zandobersek@gmail.com
  • 1 edit
    1 delete in trunk/Source/WebCore

[CoordinatedGraphics] Remove unused GLDefs.h header
https://bugs.webkit.org/show_bug.cgi?id=174712

Reviewed by Michael Catanzaro.

  • platform/graphics/opengl/GLDefs.h: Remove this unused header.

As far as my recollection goes it was used in the IPC-based
CoordinatedGraphics subsystem, which has been removed already.

5:46 AM Changeset in webkit [219817] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.16.6

WebKitGTK+ 2.16.6

5:45 AM Changeset in webkit [219816] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.16.6 release.

.:

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.16.6.
4:57 AM WebKitGTK/2.16.x edited by Carlos Garcia Campos
(diff)
4:15 AM WebKitGTK/2.16.x edited by Carlos Garcia Campos
(diff)
4:13 AM Changeset in webkit [219815] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Unreviewed. Fix the build with GCC 4.9 after merge r217438.

  • bytecompiler/BytecodeGenerator.h:

(JSC::StructureForInContext::addGetInst):

4:09 AM Changeset in webkit [219814] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/ThirdParty/ANGLE

Merge r219446 - eglplatform.h does not support Wayland
https://bugs.webkit.org/show_bug.cgi?id=163482

This makes it possible to build WebKitGTK+ when the target system has only Wayland support,
but no X11 (and therefore the X11 headers are not present).

Reviewed by Alex Christensen.

  • include/EGL/eglplatform.h: Add Wayland typedefs when WL_EGL_PLATFORM is defined (for example

by including wayland-egl.h before including EGL/egl.h). Also, include the X11 headers only
when ANGLE_USE_X11 is defined and, for consistency with Mesa's version of the header, when
MESA_EGL_NO_X11_HEADERS is not defined.

4:07 AM Changeset in webkit [219813] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r219332, r219447 - [GTK] Spin buttons on input type number appear over the value itself for small widths
https://bugs.webkit.org/show_bug.cgi?id=173572

Reviewed by Carlos Garcia Campos.

Source/WebCore:

When drawing the spin buttons, override the width of the input
element to increment it with the width of the spin button.
This ensures that we don't end up covering the input values with
the spin buttons.

Do this also for user controlled styles, because most web authors
won't test how their site renders on WebKitGTK+, and they will
assume spin buttons in the order of 13 pixels wide (that is what
most browsers use), but the GTK+ spin button is much wider (66 pixels).

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):

  • rendering/RenderThemeGtk.cpp:

(WebCore::RenderThemeGtk::adjustTextFieldStyle): Call the theme's adjustTextFieldStyle() also for user controlled styles.
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):

REGRESSION(r219332): [GTK] 9 new failures on fast/forms spinbutton related tests
https://bugs.webkit.org/show_bug.cgi?id=174395

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Before r219332 the height of the spin button widget was
calculated as the maximum value between the individual button
( the [+] or [-] ) width (33 pixels) and height (16 pixels).
And r219332 caused the height of the widget to be calculated as
the height of the button (16 pixels), which was incorrect as
each button should be first expanded vertically to fit the
preferred size of the widget.

Fix this by making the calculations about the spin button widget
on a new function spinButtonSize() that takes this into account,
and use this values both for adjusting the style of the input
field and the spin button widget itself.

  • rendering/RenderThemeGtk.cpp:

(WebCore::spinButtonSize):
(WebCore::RenderThemeGtk::adjustTextFieldStyle):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):

3:57 AM Changeset in webkit [219812] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r218819 - Crash in JSC::Lexer<unsigned char>::setCode
https://bugs.webkit.org/show_bug.cgi?id=172754

Reviewed by Mark Lam.

JSTests:

  • stress/dont-reserve-huge-capacity-lexer.js: Added.

(catch):

Source/JavaScriptCore:

The lexer was asking one of its buffers to reserve initial space that
was O(text size in bytes). For large sources, this would end up causing
the vector to overflow and crash. This patch changes this code be like
the Lexer's other buffers and to only reserve a small starting buffer.

  • parser/Lexer.cpp:

(JSC::Lexer<T>::setCode):

3:53 AM Changeset in webkit [219811] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216813 - Elements should be inserted into a template element as its content's last child
https://bugs.webkit.org/show_bug.cgi?id=171373
<rdar://problem/31862949>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Before this change, our HTML parser obeys the following premises:
1) A fostering child whose parent is a table should be inserted before its parent and under its grandparent.
2) When inserting into a template element, an element should be inserted into its content.

Let's walk through the example:
a) Before eventhandler takes place
template
table

svg <- parser

b) After eventhandler takes place
template

table

svg <- parser

c) after parsing svg
template

content

svg
(table)

table

Finally, in the example, the svg element will be inserted into the content of the template element while
having its next sibling point to the table element. However, the table element is actually under the
template element not its content.

This messy tree is constructed because the second premise is incompleted. It should be: When inserting into
a template element, an element should be inserted into its content as its last child.
Quoted from Step 3 of https://html.spec.whatwg.org/multipage/syntax.html#appropriate-place-for-inserting-a-node
A correct tree will then looks like:
template

content

svg

table

Tests: fast/dom/HTMLTemplateElement/insert-fostering-child-crash.html

fast/dom/HTMLTemplateElement/insert-fostering-child.html

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::insert):
By nullifying task.nextChild, it will force the parser to append the element as task.parent's last child.

LayoutTests:

  • fast/dom/HTMLTemplateElement/insert-fostering-child-expected.txt: Added.
  • fast/dom/HTMLTemplateElement/insert-fostering-child.html: Added.
3:51 AM Changeset in webkit [219810] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r215351 - Should use flushDirect() when flushing the scopeRegister due to needsScopeRegister().
https://bugs.webkit.org/show_bug.cgi?id=170661
<rdar://problem/31579046>

Reviewed by Filip Pizlo.

JSTests:

  • stress/regress-170661.js: Added.

Source/JavaScriptCore:

Previously, we were using flush() to flush the outermost frame's scopeRegister.
This is incorrect because flush() expects the VirtualRegister value passed to
it to be that of the top most inlined frame. In the event that we reach a
terminal condition while inside an inlined frame, flush() will end up flushing
the wrong register. The fix is simply to use flushDirect() instead.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::flush):

3:49 AM Changeset in webkit [219809] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r215596 - virtualThunkFor() needs to materialize its of tagMaskRegister for tail calls.
https://bugs.webkit.org/show_bug.cgi?id=171079
<rdar://problem/31684756>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-171079.js: Added.

Source/JavaScriptCore:

This is needed because tail calls would restore callee saved registers (and
therefore, potentially clobber the tag registers) before jumping to the thunk.

  • jit/ThunkGenerators.cpp:

(JSC::virtualThunkFor):

3:48 AM Changeset in webkit [219808] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r216309 - Put does not properly consult the prototype chain
https://bugs.webkit.org/show_bug.cgi?id=171754

Reviewed by Saam Barati.

We should do a follow up that cleans up the rest of put. See:
https://bugs.webkit.org/show_bug.cgi?id=171759

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):

3:31 AM Changeset in webkit [219807] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Unreviewed. Fix merge r217438.

See bug #174781.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::StructureForInContext::finalize): Use operand instead of unsignedValue.

3:28 AM Changeset in webkit [219806] by Carlos Garcia Campos
  • 13 edits
    3 adds in releases/WebKitGTK/webkit-2.16

Merge r216279 - putDirectIndex does not properly do defineOwnProperty
https://bugs.webkit.org/show_bug.cgi?id=171591
<rdar://problem/31735695>

Reviewed by Geoffrey Garen.

JSTests:

  • stress/array-prototype-splice-making-typed-array.js:

(test):

  • stress/array-species-config-array-constructor.js:

(shouldThrow):
(test):

  • stress/put-direct-index-broken-2.js: Added.

(assert):
(test):
(makeLengthWritable):
(set get restoreOldDesc):

  • stress/put-direct-index-broken.js: Added.

(whatToTest):
(tryRunning):
(tryItOut):

  • stress/put-indexed-getter-setter.js: Added.

(foo.X.prototype.set 7):
(foo.X.prototype.get 7):
(foo.X):
(foo):

Source/JavaScriptCore:

This patch fixes putDirectIndex and its JIT implementations to be
compatible with the ES6 spec. I think our code became out of date
when we implemented ArraySpeciesCreate since ArraySpeciesCreate may
return arbitrary objects. We perform putDirectIndex on that arbitrary
object. The behavior we want is as if we performed defineProperty({configurable:true, enumerable:true, writable:true}).
However, we weren't doing this. putDirectIndex assumed it could just splat
data into any descendent of JSObject's butterfly. For example, this means
we'd just splat into the butterfly of a typed array, even though a typed
array doesn't use its butterfly to store its indexed properties in the usual
way. Also, typed array properties are non-configurable, so this operation
should throw. This also means if we saw a ProxyObject, we'd just splat
into its butterfly, but this is obviously wrong because ProxyObject should
intercept the defineProperty operation.

This patch fixes this issue by adding a whitelist of cell types that can
go down putDirectIndex's fast path. Anything not in that whitelist will
simply call into defineOwnProperty.

  • bytecode/ByValInfo.h:

(JSC::jitArrayModePermitsPutDirect):

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine):

  • jit/JITOperations.cpp:
  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncSplice):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createStructure):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):

  • runtime/JSObject.cpp:

(JSC::canDoFastPutDirectIndex):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
(JSC::JSObject::putDirectIndexBeyondVectorLength): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::putDirectIndex):
(JSC::JSObject::canSetIndexQuicklyForPutDirect): Deleted.

  • runtime/JSType.h:
2:54 AM Changeset in webkit [219805] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216992 - Replace CryptoOperationData with BufferSource for WebKitSubtleCrypto
https://bugs.webkit.org/show_bug.cgi?id=172146
<rdar://problem/32122256>

Reviewed by Brent Fulgham.

Source/WebCore:

In this patch, we replaces CryptoOperationData with BufferSource for WebKitSubtleCrypto in
the custom binding codes.

Test: crypto/webkitSubtle/import-export-raw-key-leak.html

  • bindings/js/JSWebKitSubtleCryptoCustom.cpp:

(WebCore::JSWebKitSubtleCrypto::encrypt):
(WebCore::JSWebKitSubtleCrypto::decrypt):
(WebCore::JSWebKitSubtleCrypto::sign):
(WebCore::JSWebKitSubtleCrypto::verify):
(WebCore::JSWebKitSubtleCrypto::digest):
(WebCore::JSWebKitSubtleCrypto::importKey):
(WebCore::JSWebKitSubtleCrypto::unwrapKey):

  • crypto/WebKitSubtleCrypto.idl:

LayoutTests:

  • crypto/webkitSubtle/argument-conversion-expected.txt:
  • crypto/webkitSubtle/import-export-raw-key-leak-expected.txt: Added.
  • crypto/webkitSubtle/import-export-raw-key-leak.html: Added.
2:51 AM Changeset in webkit [219804] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/JSTests

Merge r217018 - Unreviewed, address mlam's review feedback.

  • stress/arguments-elimination-varargs-too-many-args-arg-count.js:
2:50 AM Changeset in webkit [219803] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r217016 - JSC: Incorrect LoadVarargs handling in ArgumentsEliminationPhase::transform
https://bugs.webkit.org/show_bug.cgi?id=172208

Reviewed by Saam Barati.

JSTests:

  • stress/arguments-elimination-varargs-too-many-args-arg-count.js: Added.

(foo):
(bar):
(baz):

Source/JavaScriptCore:

  • dfg/DFGArgumentsEliminationPhase.cpp:
2:45 AM Changeset in webkit [219802] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r215451 - JSArray::appendMemcpy() needs to handle copying from Undecided indexing type too.
https://bugs.webkit.org/show_bug.cgi?id=170896
<rdar://problem/31651319>

Reviewed by JF Bastien and Keith Miller.

JSTests:

  • stress/regress-170896.js: Added.

Source/JavaScriptCore:

  • runtime/JSArray.cpp:

(JSC::JSArray::appendMemcpy):

2:41 AM Changeset in webkit [219801] by Carlos Garcia Campos
  • 13 edits
    1 add in releases/WebKitGTK/webkit-2.16

Merge r217438 - Our for-in optimization in the bytecode generator does its static analysis incorrectly
https://bugs.webkit.org/show_bug.cgi?id=172532
<rdar://problem/32369452>

Reviewed by Mark Lam.

JSTests:

  • stress/for-in-invalidation-for-any-write.js: Added.

(assert):
(test):
(test.i):

Source/JavaScriptCore:

Our static analysis for when a for-in induction variable
is written to tried to its analysis as we generate
bytecode. This has issues, since it does not account for
the dynamic execution path of the program. Let's consider
a program where our old analysis worked:

`
for (let p in o) {

o[p]; We can transform this into a fast get_direct_pname
p = 20;
o[p];
We cannot transform this since p has been changed.

}
`

However, our static analysis did not account for loops, which exist
in JavaScript. e.g, it would incorrectly compile this program as:
`
for (let p in o) {

for (let i = 0; i < 20; ++i) {

o[p]; It transforms this to use get_direct_pname even though p will be over-written if we get here from the inner loop back edge!
p = 20;
o[p];
We correctly do not transform this.

}

}
`

Because of this flaw, I've made the optimization more conservative.
We now optimistically emit code for the optimized access. However,
if a for-in context is *ever* invalidated, before we pop it off
the stack, we rewrite the program's optimized accesses to no longer
be optimized. To do this, each context keeps track of its optimized
accesses.

This patch also adds a new bytecode, op_nop, which is just a no-op.
It was helpful to add this because reverting get_direct_pname to get_by_val
will leave us with an extra instruction word because get_direct_pname is
has a length of 7 where get_by_val has a length of 6. This leaves us with
an extra slot that we fill with an op_nop.

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBytecode):

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::popIndexedForInScope):
(JSC::BytecodeGenerator::popStructureForInScope):
(JSC::BytecodeGenerator::invalidateForInContextForLocal):
(JSC::StructureForInContext::pop):
(JSC::IndexedForInContext::pop):

  • bytecompiler/BytecodeGenerator.h:

(JSC::StructureForInContext::addGetInst):
(JSC::IndexedForInContext::addGetInst):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_nop):

  • llint/LowLevelInterpreter.asm:
2:40 AM Changeset in webkit [219800] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r216825 - AccessibilityRenderObject::textUnderElement needs to assert on unclean tree.
https://bugs.webkit.org/show_bug.cgi?id=172065

Reviewed by Simon Fraser.

r192103 changed the assert logic incorrectly. If the tree is dirty, regardless of the renderer's type,
TextIterator will end up forcing style update/layout on the render tree.
The original assert would have hit with bug 171546 prior to r216726.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::textUnderElement):

2:40 AM Changeset in webkit [219799] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216726 - AX: Defer text changes until after the tree is clean if needed.
https://bugs.webkit.org/show_bug.cgi?id=171546
<rdar://problem/31934942>

Reviewed by Simon Fraser.

Source/WebCore:

While updating an accessibility object state, we might
trigger unintentional style updates. This style update could
end up destroying renderes that are still referenced by functions
on the callstack.
To avoid that, defer such changes and let AXObjectCache operate on a clean tree.

Test: accessibility/crash-when-render-tree-is-not-clean.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::labelChanged):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::deferRecomputeIsIgnored):
(WebCore::AXObjectCache::deferTextChangedIfNeeded):
(WebCore::AXObjectCache::recomputeDeferredIsIgnored): Deleted.
(WebCore::AXObjectCache::deferTextChanged): Deleted.

  • accessibility/AXObjectCache.h: Decouple different type of changes.

(WebCore::AXObjectCache::deferRecomputeIsIgnored):
(WebCore::AXObjectCache::deferTextChangedIfNeeded):
(WebCore::AXObjectCache::recomputeDeferredIsIgnored): Deleted.
(WebCore::AXObjectCache::deferTextChanged): Deleted.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::deleteLines):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::createAndAppendRootInlineBox):

  • rendering/RenderText.cpp:

(WebCore::RenderText::setText):

LayoutTests:

  • accessibility/crash-when-render-tree-is-not-clean-expected.txt: Added.
  • accessibility/crash-when-render-tree-is-not-clean.html: Added.
1:58 AM Changeset in webkit [219798] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r216096 - Defer AX cache update when text content changes until after layout is finished.
https://bugs.webkit.org/show_bug.cgi?id=171429
<rdar://problem/31885984>

Reviewed by Simon Fraser.

Source/WebCore:

When the content of the RenderText changes (even as the result of a text-transform change)
instead of updating the AX cache eagerly (and trigger layout on a half-backed render tree)
we should just defer it until after the subsequent layout is done.

Test: accessibility/crash-while-adding-text-child-with-transform.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::recomputeDeferredIsIgnored):
(WebCore::AXObjectCache::deferTextChanged):
(WebCore::AXObjectCache::performDeferredIsIgnoredChange): Deleted.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::deferTextChanged):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::performDeferredIsIgnoredChange): Deleted.

  • page/FrameView.cpp:

(WebCore::FrameView::performPostLayoutTasks):

  • rendering/RenderText.cpp:

(WebCore::RenderText::setText):

LayoutTests:

  • accessibility/crash-while-adding-text-child-with-transform-expected.txt: Added.
  • accessibility/crash-while-adding-text-child-with-transform.html: Added.
1:33 AM Changeset in webkit [219797] by fred.wang@free.fr
  • 8 edits
    7 adds in trunk

Add attribute allow-top-navigation-by-user-activation to iframe sandbox
https://bugs.webkit.org/show_bug.cgi?id=171327

Patch by Frederic Wang <fwang@igalia.com> on 2017-07-11
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

This commit updates the expectation for the test verifying that a sandboxed iframe without
the allow-top-navigation-by-user-activation flag set can not perform top navigation if it is
not triggered by a user gesture. The navigation is still prohibited but the parsing of the
allow-top-navigation-by-user-activation flag should not raised any error message.
A similar update is done for the test verifying that the combination of the flags
allow-top-navigation-by-user-activation and allow-top-navigation.

  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture-expected.txt: Remove the error message.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt: Ditto.

Source/WebCore:

Tests: http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-1.html

http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-2.html
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture-expected.txt
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt

  • dom/Document.cpp:

(WebCore::Document::canNavigate): Case 2 of conformance verification is refined to match the
current specification: Top navigation is allowed when it is triggered by user activation and
when allow-top-navigation-by-user-activation is set. Because we have additional "security
origin" rules with respect to the specification we also add some early return to ensure that
navigation is really allowed for this new case.

  • dom/SecurityContext.cpp:

(WebCore::SecurityContext::isSupportedSandboxPolicy): Add allow-top-navigation-by-user-activation flag.
(WebCore::SecurityContext::parseSandboxPolicy): Parse the new flag to allow top user
navigation by user activation. Also, make sure that allow-top-navigation allows such
navigation as defined by the specification.

  • dom/SecurityContext.h: Declare new sandboxing flag.

LayoutTests:

This patch adds tests to verify that a sandboxed iframe with the flag
'allow-top-navigation-by-user-activation' or 'allow-top-navigation' can navigate the top
level page, if navigation is triggered by a user gesture. This is based on a test from the
Chromium repository.
It also verifies that navigation fails when 'allow-top-navigation-by-user-activation' is
absent, even when it is triggered by a user gesture.

  • http/tests/security/frameNavigation/resources/iframe-that-performs-parent-navigation-with-user-activation.html: Added. This is similar to iframe-that-performs-parent-navigation.html but it

performs navigation of its parent using user activation.

  • http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-1.html: Added.

Test top navigation for a sandboxed frame with 'allow-top-navigation-by-user-activation'

  • http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-1-expected.txt: Added.

Add PASS expectation.

  • http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-2.html: Added.

Test top navigation for a sandboxed frame with 'allow-top-navigation'.

  • http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-2-expected.txt: Added.

Add PASS expectation.

  • http/tests/security/frameNavigation/sandbox-DENIED-top-navigation-with-user-gesture.html: Added.

Test user-triggered navigation for a sandboxed frame without 'allow-top-navigation-by-user-activation'.

  • http/tests/security/frameNavigation/sandbox-DENIED-top-navigation-with-user-gesture-expected.txt: Added.

Add reference with navigation failure.

Jul 23, 2017:

11:47 PM Changeset in webkit [219796] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Unreviewed. REGRESSION(r219713): [GTK][WPE] Fix default favicon database patch.

When nullptr is passed to webkit_web_context_set_favicon_database_directory() the default database directory was
taken from WebProcessPool::platformDefaultIconDatabasePath(), that has been removed in r219713 without properly
replacing it, now it uses an empty string. This causes that the current directory is used to create the favicon
database.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_set_favicon_database_directory): Use the default icon database directory instead of an empty
string when nullptr is passed.

11:05 PM Changeset in webkit [219795] by Wenson Hsieh
  • 4 edits in trunk/Source

[iOS WK2] 5 DataInteractionTests are failing: observed selection rects after dropping don't match expected values
https://bugs.webkit.org/show_bug.cgi?id=174769
<rdar://problem/33478864>

Reviewed by Tim Horton.

Source/WebCore:

These tests began failing after r219541, due to a change in behavior of whether or not we call
setIgnoreSelectionChanges(false, RevealSelection::No) or setIgnoreSelectionChanges(false, RevealSelection::Yes)
when performing a text editing drop.

Before r219541, we would not reveal the selection when performing an edit drag operation. This is because in
WebPage::performDragControllerAction, we would begin ignoring selection changes by calling
setIgnoreSelectionChanges(true). However, while taking a text indicator snapshot, we would stop ignoring
selection in TextIndicator::createWithRange due to us calling setIgnoreSelectionChanges(false,
RevealSelection::No) at the end of the function. Then, when we return to the scope of
WebPage::performDragControllerAction and try to setIgnoreSelectionChanges(false), this is a no-op because we've
already stopped ignoring selection changes.

After r219541, switching to using TemporarySelectionChange means that TextIndicator::createWithRange now means
we respect whether or not we were already ignoring selection before taking the snapshot, so we won't always
setIgnoreSelectionChanges(false) at the end. This means that selection changes will now be correctly ignored
when performing a drag operation, but this also means that we'll try to reveal the selection, since
WebPage::performDragControllerAction calls setIgnoreSelectionChanges(false), for which RevealSelection::Yes
is used by default.

Revealing the selection in WebPage::performDragControllerAction was unintended in the first place, so we should
revert to calling setIgnoreSelectionChanges(false, RevealSelection::No). To ensure this, we adopt
TemporarySelectionChange here and pass only TemporarySelectionOptionIgnoreSelectionChanges, so that we won't
additionally try to reveal selection after the drop. This is consistent with behavior prior to macOS 10.13 and
iOS 11. Additionally, this patch also moves the call to ignore selection change from WebKit into WebCore, so
that whether we ignore selection is consistent across both WebKit1 and WebKit2.

  • page/DragController.cpp:

(WebCore::DragController::performDragOperation):

Source/WebKit:

Fixes several API tests in the DataInteractionTests suite. See Source/WebCore/ChangeLog for more details.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

10:58 PM Changeset in webkit [219794] by Carlos Garcia Campos
  • 9 edits in trunk/Source

WebDriver: implement page load timeout
https://bugs.webkit.org/show_bug.cgi?id=174672

Reviewed by Brian Burg.

Source/WebDriver:

Handle timeout errors and pass the page load timeout to waitForNavigationToComplete and all other navigation
commands. Also fix the setTimeouts command that was still using the legacy name of the page load timeout,
instead of the one in the spec.

  1. Sessions

https://www.w3.org/TR/webdriver/#dfn-session-page-load-timeout

  • CommandResult.cpp:

(WebDriver::CommandResult::CommandResult):
(WebDriver::CommandResult::httpStatusCode):
(WebDriver::CommandResult::errorString):

  • CommandResult.h:
  • Session.cpp:

(WebDriver::Session::go):
(WebDriver::Session::back):
(WebDriver::Session::forward):
(WebDriver::Session::refresh):
(WebDriver::Session::waitForNavigationToComplete):

  • WebDriverService.cpp:

(WebDriver::WebDriverService::setTimeouts):

Source/WebKit:

Always start a timer when waiting for a navigation to complete. When the timer fires, pending callbacks for
navigations are removed and invoked with a timeout error. If navigation completes before the timer is fired,
then the timer is stopped. All navigation commands now receive the page load strategy and timeout as optional
parameters, when not provided the default timeout (300 seconds) is used.

  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::WebAutomationSession):
(WebKit::WebAutomationSession::waitForNavigationToComplete):
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame):
(WebKit::WebAutomationSession::loadTimerFired):
(WebKit::WebAutomationSession::navigateBrowsingContext):
(WebKit::WebAutomationSession::goBackInBrowsingContext):
(WebKit::WebAutomationSession::goForwardInBrowsingContext):
(WebKit::WebAutomationSession::reloadBrowsingContext):
(WebKit::WebAutomationSession::navigationOccurredForFrame):

  • UIProcess/Automation/WebAutomationSession.h:
8:20 PM Changeset in webkit [219793] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] Correct a typo in the reference manual of WebKitWebInspector
https://bugs.webkit.org/show_bug.cgi?id=174767

Patch by Takuro Ashie <ashie@clear-code.com> on 2017-07-23
Reviewed by Michael Catanzaro.

  • UIProcess/API/gtk/WebKitWebInspector.cpp:
7:10 PM Changeset in webkit [219792] by Chris Dumez
  • 117 edits
    2 deletes in trunk/Source

Drop ExceptionCodeDescription class
https://bugs.webkit.org/show_bug.cgi?id=174757

Reviewed by Darin Adler.

Source/WebCore:

Drop ExceptionCodeDescription class now that there is only one exception
type: DOMException. Instead, we now have static methods on DOMException
to get the name / message for a given exception code.

  • CMakeLists.txt:
  • Modules/indexeddb/shared/IDBError.cpp:

(WebCore::IDBError::name):
(WebCore::IDBError::message):

  • Modules/quota/StorageErrorCallback.cpp:

(WebCore::StorageErrorCallback::CallbackTask::CallbackTask):

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::createDOMException):

  • dom/DOMAllInOne.cpp:
  • dom/DOMException.cpp:

(WebCore::errorCodeFromName):
(WebCore::DOMException::create):
(WebCore::DOMException::DOMException):
(WebCore::DOMException::name):
(WebCore::DOMException::message):

  • dom/DOMException.h:
  • dom/ExceptionCodeDescription.cpp: Removed.
  • dom/ExceptionCodeDescription.h: Removed.
  • inspector/DOMEditor.cpp:

(WebCore::populateErrorString):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::toErrorString):

  • inspector/InspectorDOMStorageAgent.cpp:

(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):

Source/WebKit:

Update GTK bindings to use new API on DOMException instead of
ExceptionCodeDescription.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:

(webkit_dom_attr_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:

(webkit_dom_cdata_section_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:

(webkit_dom_css_rule_set_css_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:

(webkit_dom_css_style_declaration_set_property):
(webkit_dom_css_style_declaration_set_css_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:

(webkit_dom_css_style_sheet_insert_rule):
(webkit_dom_css_style_sheet_delete_rule):
(webkit_dom_css_style_sheet_add_rule):
(webkit_dom_css_style_sheet_remove_rule):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:

(webkit_dom_css_value_set_css_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:

(webkit_dom_character_data_dispatch_event):
(webkit_dom_character_data_insert_data):
(webkit_dom_character_data_delete_data):
(webkit_dom_character_data_replace_data):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:

(webkit_dom_comment_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:

(webkit_dom_dom_implementation_create_document_type):
(webkit_dom_dom_implementation_create_document):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:

(webkit_dom_dom_selection_collapse_to_end):
(webkit_dom_dom_selection_collapse_to_start):
(webkit_dom_dom_selection_extend):
(webkit_dom_dom_selection_get_range_at):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:

(webkit_dom_dom_token_list_add):
(webkit_dom_dom_token_list_remove):
(webkit_dom_dom_token_list_toggle):
(webkit_dom_dom_token_list_replace):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:

(webkit_dom_dom_window_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:

(webkit_dom_node_set_prefix):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:

(webkit_dom_document_dispatch_event):
(webkit_dom_document_create_element):
(webkit_dom_document_create_cdata_section):
(webkit_dom_document_create_processing_instruction):
(webkit_dom_document_create_attribute):
(webkit_dom_document_import_node):
(webkit_dom_document_create_element_ns):
(webkit_dom_document_create_attribute_ns):
(webkit_dom_document_adopt_node):
(webkit_dom_document_create_event):
(webkit_dom_document_create_expression):
(webkit_dom_document_evaluate):
(webkit_dom_document_query_selector):
(webkit_dom_document_query_selector_all):
(webkit_dom_document_set_xml_version):
(webkit_dom_document_set_cookie):
(webkit_dom_document_set_body):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:

(webkit_dom_document_fragment_dispatch_event):
(webkit_dom_document_fragment_query_selector):
(webkit_dom_document_fragment_query_selector_all):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:

(webkit_dom_document_type_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:

(webkit_dom_element_dispatch_event):
(webkit_dom_element_set_attribute):
(webkit_dom_element_set_attribute_node):
(webkit_dom_element_remove_attribute_node):
(webkit_dom_element_set_attribute_ns):
(webkit_dom_element_set_attribute_node_ns):
(webkit_dom_element_matches):
(webkit_dom_element_closest):
(webkit_dom_element_insert_adjacent_element):
(webkit_dom_element_insert_adjacent_html):
(webkit_dom_element_insert_adjacent_text):
(webkit_dom_element_remove):
(webkit_dom_element_query_selector):
(webkit_dom_element_query_selector_all):
(webkit_dom_element_set_inner_html):
(webkit_dom_element_set_outer_html):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:

(webkit_dom_html_anchor_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:

(webkit_dom_html_applet_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:

(webkit_dom_html_area_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:

(webkit_dom_html_br_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:

(webkit_dom_html_base_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:

(webkit_dom_html_body_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:

(webkit_dom_html_button_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:

(webkit_dom_html_canvas_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:

(webkit_dom_html_d_list_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:

(webkit_dom_html_directory_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:

(webkit_dom_html_div_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:

(webkit_dom_html_document_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:

(webkit_dom_html_element_dispatch_event):
(webkit_dom_html_element_set_inner_text):
(webkit_dom_html_element_set_outer_text):
(webkit_dom_html_element_set_content_editable):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:

(webkit_dom_html_embed_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:

(webkit_dom_html_field_set_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:

(webkit_dom_html_font_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:

(webkit_dom_html_form_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:

(webkit_dom_html_frame_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:

(webkit_dom_html_frame_set_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:

(webkit_dom_html_hr_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:

(webkit_dom_html_head_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:

(webkit_dom_html_heading_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:

(webkit_dom_html_html_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:

(webkit_dom_html_iframe_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:

(webkit_dom_html_image_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:

(webkit_dom_html_input_element_dispatch_event):
(webkit_dom_html_input_element_set_max_length):
(webkit_dom_html_input_element_set_size):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:

(webkit_dom_html_li_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:

(webkit_dom_html_label_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:

(webkit_dom_html_legend_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:

(webkit_dom_html_link_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:

(webkit_dom_html_map_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:

(webkit_dom_html_marquee_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:

(webkit_dom_html_menu_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:

(webkit_dom_html_meta_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:

(webkit_dom_html_mod_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:

(webkit_dom_html_o_list_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:

(webkit_dom_html_object_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:

(webkit_dom_html_opt_group_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:

(webkit_dom_html_option_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:

(webkit_dom_html_paragraph_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:

(webkit_dom_html_param_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:

(webkit_dom_html_pre_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:

(webkit_dom_html_quote_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:

(webkit_dom_html_script_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:

(webkit_dom_html_select_element_dispatch_event):
(webkit_dom_html_select_element_add):
(webkit_dom_html_select_element_set_length):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:

(webkit_dom_html_style_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:

(webkit_dom_html_table_caption_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:

(webkit_dom_html_table_cell_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:

(webkit_dom_html_table_col_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:

(webkit_dom_html_table_element_dispatch_event):
(webkit_dom_html_table_element_insert_row):
(webkit_dom_html_table_element_delete_row):
(webkit_dom_html_table_element_set_caption):
(webkit_dom_html_table_element_set_t_head):
(webkit_dom_html_table_element_set_t_foot):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:

(webkit_dom_html_table_row_element_dispatch_event):
(webkit_dom_html_table_row_element_insert_cell):
(webkit_dom_html_table_row_element_delete_cell):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:

(webkit_dom_html_table_section_element_dispatch_event):
(webkit_dom_html_table_section_element_insert_row):
(webkit_dom_html_table_section_element_delete_row):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:

(webkit_dom_html_text_area_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:

(webkit_dom_html_title_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:

(webkit_dom_html_u_list_element_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:

(webkit_dom_media_list_delete_medium):
(webkit_dom_media_list_append_medium):
(webkit_dom_media_list_set_media_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:

(webkit_dom_named_node_map_set_named_item):
(webkit_dom_named_node_map_remove_named_item):
(webkit_dom_named_node_map_remove_named_item_ns):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:

(webkit_dom_node_dispatch_event):
(webkit_dom_node_insert_before):
(webkit_dom_node_replace_child):
(webkit_dom_node_remove_child):
(webkit_dom_node_append_child):
(webkit_dom_node_clone_node_with_error):
(webkit_dom_node_set_node_value):
(webkit_dom_node_set_text_content):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:

(webkit_dom_processing_instruction_dispatch_event):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:

(webkit_dom_range_set_start):
(webkit_dom_range_set_end):
(webkit_dom_range_set_start_before):
(webkit_dom_range_set_start_after):
(webkit_dom_range_set_end_before):
(webkit_dom_range_set_end_after):
(webkit_dom_range_select_node):
(webkit_dom_range_select_node_contents):
(webkit_dom_range_compare_boundary_points):
(webkit_dom_range_delete_contents):
(webkit_dom_range_extract_contents):
(webkit_dom_range_clone_contents):
(webkit_dom_range_insert_node):
(webkit_dom_range_surround_contents):
(webkit_dom_range_create_contextual_fragment):
(webkit_dom_range_compare_node):
(webkit_dom_range_intersects_node):
(webkit_dom_range_compare_point):
(webkit_dom_range_is_point_in_range):
(webkit_dom_range_expand):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:

(webkit_dom_text_dispatch_event):
(webkit_dom_text_split_text):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:

(webkit_dom_xpath_expression_evaluate):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:

(webkit_dom_xpath_result_iterate_next):
(webkit_dom_xpath_result_snapshot_item):
(webkit_dom_xpath_result_get_number_value):
(webkit_dom_xpath_result_get_boolean_value):
(webkit_dom_xpath_result_get_single_node_value):
(webkit_dom_xpath_result_get_snapshot_length):

Source/WebKitLegacy/mac:

Stop using ExceptionCodeDescription.

  • DOM/ExceptionHandlers.mm:

(raiseDOMErrorException):

2:01 PM Changeset in webkit [219791] by Michael Catanzaro
  • 2 edits in trunk/Source/WTF

Implement FALLTHROUGH attribute for C with GCC
https://bugs.webkit.org/show_bug.cgi?id=174555

Reviewed by Darin Adler.

My previous attempt to silence the JSC -Wimplicit-fallthrough warnings failed because they
are coming from a C file, and our FALLTHROUGH macro is only implemented for C++. So
implement it for C as well, using C attribute syntax.

Note this is only possible to do for GCC, because Clang only supports this attribute using
the C++ attribute syntax?.

  • wtf/Compiler.h:
1:35 PM Changeset in webkit [219790] by mark.lam@apple.com
  • 8 edits
    1 add in trunk/Source/JavaScriptCore

Create regression tests for the JIT probe.
https://bugs.webkit.org/show_bug.cgi?id=174696
<rdar://problem/33436922>

Reviewed by Saam Barati.

The new testmasm will test the following:

  1. the probe is able to read the value of CPU registers.
  2. the probe is able to write the value of CPU registers.
  3. the probe is able to preserve all CPU registers.
  4. special case of (2): the probe is able to change the value of the stack pointer.
  5. special case of (2): the probe is able to change the value of the program counter i.e. the probe can change where the code continues executing upon returning from the probe.

Currently, the x86, x86_64, and ARMv7 ports passes the test. ARM64 does not
because it does not support changing the sp and pc yet. The ARM64 probe
implementation will be fixed in https://bugs.webkit.org/show_bug.cgi?id=174697
later.

  • Configurations/ToolExecutable.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::CPUState::pc):
(JSC::MacroAssembler::CPUState::fp):
(JSC::MacroAssembler::CPUState::sp):
(JSC::ProbeContext::pc):
(JSC::ProbeContext::fp):
(JSC::ProbeContext::sp):

  • assembler/MacroAssemblerARM64.cpp:

(JSC::arm64ProbeTrampoline):

  • assembler/MacroAssemblerPrinter.cpp:

(JSC::Printer::printPCRegister):

  • assembler/testmasm.cpp: Added.

(hiddenTruthBecauseNoReturnIsStupid):
(usage):
(JSC::nextID):
(JSC::isPC):
(JSC::isSP):
(JSC::isFP):
(JSC::compile):
(JSC::invoke):
(JSC::compileAndRun):
(JSC::testSimple):
(JSC::testProbeReadsArgumentRegisters):
(JSC::testProbeWritesArgumentRegisters):
(JSC::testFunctionToTrashRegisters):
(JSC::testProbePreservesGPRS):
(JSC::testProbeModifiesStackPointer):
(JSC::testProbeModifiesProgramCounter):
(JSC::run):
(run):
(main):

  • b3/air/testair.cpp:

(usage):

  • shell/CMakeLists.txt:
12:02 PM Changeset in webkit [219789] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r219571. rdar://problem/33464710

10:00 AM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)

Jul 22, 2017:

11:52 PM Changeset in webkit [219788] by jmarcell@apple.com
  • 10 edits in branches/safari-604-branch

Cherry-pick r219662. rdar://problem/33464110

11:52 PM Changeset in webkit [219787] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219711. rdar://problem/33465715

11:52 PM Changeset in webkit [219786] by jmarcell@apple.com
  • 17 edits in branches/safari-604-branch

Cherry-pick r219709. rdar://problem/33462692

11:51 PM Changeset in webkit [219785] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source

Cherry-pick r219703. rdar://problem/33462696

11:51 PM Changeset in webkit [219784] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source

Cherry-pick r219701. rdar://problem/33465715

11:51 PM Changeset in webkit [219783] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219683. rdar://problem/33464463

11:51 PM Changeset in webkit [219782] by jmarcell@apple.com
  • 28 edits
    1 copy in branches/safari-604-branch

Cherry-pick r219668. rdar://problem/33462676

11:51 PM Changeset in webkit [219781] by jmarcell@apple.com
  • 5 edits in branches/safari-604-branch

Cherry-pick r219666. rdar://problem/33464328

11:51 PM Changeset in webkit [219780] by jmarcell@apple.com
  • 10 edits in branches/safari-604-branch

Cherry-pick r219664. rdar://problem/33464115

11:51 PM Changeset in webkit [219779] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-604-branch

Cherry-pick r219661. rdar://problem/33465132

11:51 PM Changeset in webkit [219778] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219645. rdar://problem/33464440

11:51 PM Changeset in webkit [219777] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219641. rdar://problem/33464325

11:51 PM Changeset in webkit [219776] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/JavaScriptCore

Cherry-pick r219633. rdar://problem/33465535

11:50 PM Changeset in webkit [219775] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebKitLegacy/mac

Cherry-pick r219626. rdar://problem/33465685

11:50 PM Changeset in webkit [219774] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r219625. rdar://problem/33465689

11:50 PM Changeset in webkit [219773] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219621. rdar://problem/33465059

11:50 PM Changeset in webkit [219772] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219591. rdar://problem/33464112

11:50 PM Changeset in webkit [219771] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Tools

Cherry-pick r219590. rdar://problem/33465177

11:50 PM Changeset in webkit [219770] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/WebKit

Cherry-pick r219588. rdar://problem/33464447

11:50 PM Changeset in webkit [219769] by jmarcell@apple.com
  • 14 edits
    1 add in branches/safari-604-branch

Cherry-pick r219585. rdar://problem/33465177

10:28 PM Changeset in webkit [219768] by Wenson Hsieh
  • 10 edits
    4 deletes in trunk

[iOS WK2] Remove _WKDraggableElementInfo and fold PositionInformationTests into WKRequestActivatedElementInfo
https://bugs.webkit.org/show_bug.cgi?id=174758

Reviewed by Dan Bernstein.

Source/WebKit:

_WKDraggableElementInfo is no longer used in WebKit, so it should be removed. However, some of the scenarios
in PositionInformationTests that depend on _WKDraggableElementInfo are still useful to exercise: namely,
performing both synchronous and asynchronous position information updates while an async position information
update is in flight. This patch refactors these unit tests into 2 new unit tests in the existing
WKRequestActivatedElementInfo test suite.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _draggableElementAtPosition:]): Deleted.
(-[WKWebView _requestDraggableElementAtPosition:completionBlock:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKDraggableElementInfo.h: Removed.
  • UIProcess/API/Cocoa/_WKDraggableElementInfo.mm: Removed.
  • UIProcess/API/Cocoa/_WKDraggableElementInfoInternal.h: Removed.
  • UIProcess/ios/WKContentViewInteraction.mm:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Migrate position-information-related unit tests from the PositionInformationTests suite to
WKRequestActivatedElementInfo as 2 new unit tests. See WebKit2 ChangeLog for more details.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKRequestActivatedElementInfo.mm:

(TestWebKitAPI::checkElementTypeAndBoundingRect):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/PositionInformationTests.mm: Removed.
  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView activatedElementAtPosition:]):

3:31 PM Changeset in webkit [219767] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Fixed building for macOS 10.12 with the macOS 10.13 SDK after r219644.

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

(WebCore::CDMSessionAVStreamSession::update): Suppress the objc-literal-conversion warning

in one place where we are calling a class method on a Class and the compiler can’t tell
which class it is, so it chooses wrong and emits a warning.

2:20 PM Changeset in webkit [219766] by Chris Dumez
  • 71 edits
    2 deletes in trunk

Merge ExceptionBase into DOMException and drop custom toString
https://bugs.webkit.org/show_bug.cgi?id=174755

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline some tests now that DOMException's custom toString has been dropped
and we rely on Error's toString. This causes the exception message to be
slightly different.

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.https-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.https-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_multi-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_null-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_origin-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_space-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_zero-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-expected.txt:

Source/WebCore:

Merge ExceptionBase into DOMException and drop custom toString, now that DOMException
is the only remaining exception type.

  • CMakeLists.txt:
  • Modules/mediastream/MediaStream.h:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::retrieveErrorMessage):

  • dom/DOMAllInOne.cpp:
  • dom/DOMException.cpp:

(WebCore::DOMException::DOMException):
(WebCore::DOMException::initializeDescription):

  • dom/DOMException.h:

(WebCore::DOMException::code):
(WebCore::DOMException::name):
(WebCore::DOMException::message):

  • dom/ExceptionBase.cpp: Removed.
  • dom/ExceptionBase.h: Removed.

LayoutTests:

Rebaseline some tests now that DOMException's custom toString has been dropped
and we rely on Error's toString. This causes the exception message to be
slightly different.

  • fast/canvas/canvas-getImageData-invalid-result-buffer-crash-expected.txt:
  • fast/frames/sandboxed-iframe-history-denied-expected.txt:
  • fast/frames/sandboxed-iframe-navigation-top-denied-expected.txt:
  • fast/inspector-support/uncaught-dom1-exception-expected.txt:
  • fast/inspector-support/uncaught-dom3-exception-expected.txt:
  • fast/inspector-support/uncaught-dom8-exception-expected.txt:
  • fast/regions/selection/crash-deselect-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
  • http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
  • http/tests/security/sandboxed-iframe-blocks-access-from-parent-expected.txt:
  • http/tests/security/sandboxed-iframe-modify-self-expected.txt:
  • http/tests/security/srcdoc-in-sandbox-cannot-access-parent-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-hash-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-host-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-hostname-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-nonstandardProperty-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-pathname-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-protocol-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-reload-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-search-expected.txt:
  • http/tests/security/xss-DENIED-frame-name-expected.txt:
  • http/tests/security/xss-DENIED-sandboxed-iframe-expected.txt:
  • http/tests/security/xss-DENIED-window-name-navigator-expected.txt:
  • inspector/debugger/command-line-api-exception-expected.txt:
  • inspector/debugger/regress-133182-expected.txt:
  • inspector/debugger/setPauseOnExceptions-all-expected.txt:
  • inspector/debugger/setPauseOnExceptions-none-expected.txt:
  • inspector/debugger/setPauseOnExceptions-uncaught-expected.txt:
  • platform/mac/fast/dynamic/015-expected.txt:
12:57 PM Changeset in webkit [219765] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[Mac WK2] Fix null dereference in asynchronous NSTextInputClient methods when deallocating a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=174751
<rdar://problem/33132405>

Reviewed by Darin Adler.

Tweaks -[WKWebView dealloc] to close the WebPageProxy at an earlier time, prior to destroying the WebViewImpl.
This fixes a NSTextInputClient crash in WKWebView when exercising the following scenario:

(1) Suppose that NSTextInputContext invokes an asynchronous text input query on WKWebView immediately before
WKWebView is deallocated, such that WebPageProxy's CallbackMap contains an NSTextInputContext callback at the
time that -[WKWebView dealloc] is called. Additionally, suppose that this callback from NSTextInputContext
invokes additional NSTextInputClient methods on the WKWebView that involve plumbing through to the WebViewImpl
(which is stored as _impl on the WKWebView).

(2) Observe that when calling [super dealloc] in [WKWebView dealloc], we will destroy the WebViewImpl as a
result of setting our unique pointer to _impl to be null. In ~WebViewImpl, we invoke WebPageProxy::close, which
in turn invokes WebPageProxy::resetState.

(3) WebPageProxy::resetState then calls m_callbacks.invalidate(error), which triggers all pending callbacks.
This invokes the block described in (1), which causes us to try and call back into WKWebView, invoking
NSTextInputClient methods. Without the fix in this patch, these methods currently assume that _impl is nonnull,
even though we've already cleared out the pointer in (2), so we segfault with a null dereference.

After this patch, we close the _page at an earlier time, such that the state is reset before the WebViewImpl
(and corresponding _impl unique_ptr in WKWebView) is torn down. This ensures that _impl will not be null for
callbacks invoked after beginning to deallocate the WKWebView.

Forcing this scenario in a custom AppKit root that triggers async NSTextInputClient methods immediately when a
WKWebView is being deallocated produces a crash with the same stack trace as what we observe in the radar, but
there are no known steps to actually reproduce this crash in shipping software.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView dealloc]):

10:31 AM Changeset in webkit [219764] by Chris Dumez
  • 6 edits in trunk

REGRESSION(r204565): WKObject is broken
https://bugs.webkit.org/show_bug.cgi?id=174736
<rdar://problem/33246169>

Reviewed by Dan Bernstein.

Source/WebKit:

Revert r204565 as making WKObject a root class caused unexpected crashes.
Instead, we now have WKObject inherit from NSProxy (instead of previously
NSObject) and we forward calls to the target.

We also need to provide an implementation for private methods such as
isNSString to address the issue with NSStrings that r204565 was trying
to fix.

  • Shared/Cocoa/APIObject.mm:

(API::Object::unwrap):

  • Shared/Cocoa/WKObject.h:
  • Shared/Cocoa/WKObject.mm:

(-[WKObject dealloc]):
(-[WKObject hash]):
(-[WKObject isKindOfClass:]):
(-[WKObject isMemberOfClass:]):
(-[WKObject respondsToSelector:]):
(-[WKObject conformsToProtocol:]):
(-[WKObject forwardingTargetForSelector:]):
(-[WKObject description]):
(-[WKObject debugDescription]):
(-[WKObject classForCoder]):
(-[WKObject classForKeyedArchiver]):
(-[WKObject _web_createTarget]):
(-[WKObject forwardInvocation:]):
(-[WKObject methodSignatureForSelector:]):
(-[WKObject isNSObject]):
(-[WKObject isNSArray
]):
(-[WKObject isNSCFConstantString]):
(-[WKObject isNSData
]):
(-[WKObject isNSDate]):
(-[WKObject isNSDictionary
]):
(-[WKObject isNSNumber]):
(-[WKObject isNSOrderedSet
]):
(-[WKObject isNSSet]):
(-[WKObject isNSString
]):
(-[WKObject isNSTimeZone]):
(-[WKObject isNSValue
]):

Tools:

Add API test that used to crash.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKObject.mm:

(TestWebKitAPI::TEST):

7:36 AM Changeset in webkit [219763] by fpizlo@apple.com
  • 31 edits
    1 add in trunk/Source

It should be easy to decide how WebKit yields
https://bugs.webkit.org/show_bug.cgi?id=174298

Reviewed by Saam Barati.
Source/bmalloc:


Use sched_yield() explicitly.

  • bmalloc/StaticMutex.cpp:

(bmalloc::StaticMutex::lockSlowCase):

Source/JavaScriptCore:


Use the new WTF::Thread::yield() function for yielding instead of the C++ function.

  • heap/Heap.cpp:

(JSC::Heap::resumeThePeriphery):

  • heap/VisitingTimeout.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::lockSlow):
(JSC::JSCell::unlockSlow):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::lock):
(JSC::JSCell::unlock):

  • runtime/JSLock.cpp:

(JSC::JSLock::grabAllLocks):

  • runtime/SamplingProfiler.cpp:

Source/WebCore:

No new tests because the WebCore change is just a change to how we #include things.

  • inspector/InspectorPageAgent.h:
  • inspector/TimelineRecordFactory.h:
  • workers/Worker.h:
  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.h:

Source/WebKitLegacy:

  • Storage/StorageTracker.h:

Source/WTF:


Created a Thread::yield() abstraction for sched_yield(), and made WTF use it everywhere that it
had previously used std::this_thread::yield().

To make it less annoying to experiment with changes to the lock algorithm in the future, this also
moves the meat of the algorithm into LockAlgorithmInlines.h. Only two files include that header.
Since LockAlgorithm.h no longer includes ParkingLot.h, a bunch of files in WK now need to include
timing headers (Seconds, MonotonicTime, etc) manually.

  • WTF.xcodeproj/project.pbxproj:
  • benchmarks/ToyLocks.h:
  • wtf/CMakeLists.txt:
  • wtf/Lock.cpp:
  • wtf/LockAlgorithm.h:

(WTF::LockAlgorithm::lockSlow): Deleted.
(WTF::LockAlgorithm::unlockSlow): Deleted.

  • wtf/LockAlgorithmInlines.h: Added.

(WTF::hasParkedBit>::lockSlow):
(WTF::hasParkedBit>::unlockSlow):

  • wtf/MainThread.cpp:
  • wtf/RunLoopTimer.h:
  • wtf/Threading.cpp:
  • wtf/Threading.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::yield):

  • wtf/ThreadingWin.cpp:

(WTF::Thread::yield):

  • wtf/WordLock.cpp:

(WTF::WordLockBase::lockSlow):
(WTF::WordLockBase::unlockSlow):

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

REGRESSION(r219045): A partially loaded image may not be repainted when its complete frame finishes decoding
https://bugs.webkit.org/show_bug.cgi?id=174230

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-07-22
Reviewed by Simon Fraser.

Because of r219045, we now only repaint the CachedImageClinets which tried
to draw the image but they could not because they have to wait for the image
decoding to finish. This was done by keeping a HashSet of these clients
and make CachedImage own it. This HashSet is cleared once the image frame
finishes decoding and all the waited clients are repainted.

But Multiple asynchronous image decoding requests are allowed for the same
frame if new data is added to the image source. If we tried to draw the
same image twice before it finishes decoding the first request, we will
not be to record this second request since the HashSet will not add the
same client twice. When he second request finishes decoding, CachedImage
will not repaint any client since its HashSet is empty.

To fix this problem we can do the following. When an image frame finishes
decoding, CachedImage will keep its HashSet of pending drawing clients as
long as the image frame is a partially loaded frame.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImageObserver::imageFrameAvailable):
(WebCore::CachedImage::imageFrameAvailable):

  • loader/cache/CachedImage.h:
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::dataChanged):
(WebCore::BitmapImage::setCurrentFrameDecodingStatusIfNecessary):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::internalStartAnimation):
(WebCore::BitmapImage::internalAdvanceAnimation):
(WebCore::BitmapImage::imageFrameAvailableAtIndex):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/ImageFrame.cpp:

(WebCore::ImageFrame::decodingStatus):

  • platform/graphics/ImageFrame.h: Move DecodingStatus out of this class

to ImageTypes.h to avoid adding other header files to ImageObvsever.h

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::setNativeImage):
(WebCore::ImageFrameCache::cacheMetadataAtIndex):
(WebCore::ImageFrameCache::cacheNativeImageAtIndex):
(WebCore::ImageFrameCache::cacheNativeImageAtIndexAsync):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageFrameCache::frameDecodingStatusAtIndex):

  • platform/graphics/ImageFrameCache.h:
  • platform/graphics/ImageObserver.h:
  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::frameDecodingStatusAtIndex):

  • platform/graphics/ImageTypes.h:
  • platform/image-decoders/bmp/BMPImageReader.cpp:

(WebCore::BMPImageReader::decodeBMP):

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::frameComplete):
(WebCore::GIFImageDecoder::initFrameBuffer):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::outputScanlines):
(WebCore::JPEGImageDecoder::jpegComplete):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::pngComplete):
(WebCore::PNGImageDecoder::frameComplete):

  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::decode):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::decodingModeForImageDraw):

1:12 AM Changeset in webkit [219761] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

Drag and Drop preview image for Twitter link is the wrong shape
https://bugs.webkit.org/show_bug.cgi?id=174731
<rdar://problem/33335616>

  • dom/Range.cpp:

(WebCore::Range::absoluteRectsForRangeInText):

  • page/TextIndicator.cpp:

(WebCore::initializeIndicator):
Apply some post-landing review feedback for r219756.

12:27 AM Changeset in webkit [219760] by Yusuke Suzuki
  • 8 edits in trunk

[WTF] Extend ThreadGroup::add results from bool to ThreadGroupAddResult
https://bugs.webkit.org/show_bug.cgi?id=174705

Reviewed by Mark Lam.

Source/WTF:

After starting using ThreadGroup to bookkeep active threads for Signals,
we would like to know tristate of ThreadGroup::add result, NewlyAdded, AlreadyAdded, NotAdded.
This patch extends the result of ThreadGroup::add from bool to ThreadGroupAddResult tristate.
Note that NotAdded is returned if the target thread is dying.

  • wtf/ThreadGroup.cpp:

(WTF::ThreadGroup::add):
(WTF::ThreadGroup::addCurrentThread):

  • wtf/ThreadGroup.h:
  • wtf/Threading.cpp:

(WTF::Thread::addToThreadGroup):

  • wtf/Threading.h:
  • wtf/threads/Signals.cpp:

(WTF::registerThreadForMachExceptionHandling):

Tools:

  • TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:

(TestWebKitAPI::testThreadGroup):
(TestWebKitAPI::TEST):

Jul 21, 2017:

10:14 PM Changeset in webkit [219759] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WTF

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

static is not threadsafe in WebKit tree (Requested by
yusukesuzuki on #webkit).

Reverted changeset:

"[WTF] Drop initializeDate"
https://bugs.webkit.org/show_bug.cgi?id=174714
http://trac.webkit.org/changeset/219732

9:43 PM Changeset in webkit [219758] by Chris Dumez
  • 46 edits
    3 deletes in trunk

Drop IDBDatabaseException class
https://bugs.webkit.org/show_bug.cgi?id=174743

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline test as the exception message is slightly different.

  • web-platform-tests/IndexedDB/keypath-special-identifiers-expected.txt:

Source/WebCore:

Drop IDBDatabaseException class and use DOMException directly. IDBDatabaseException was
only an internal concept and was already exposed to the Web as a DOMException. This
simplifies the code a bit and will allow for further simplification in a follow-up patch.

No new tests, no Web-facing behavior change, except for some exception messages
being slightly different.

  • CMakeLists.txt:
  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::update):
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::continuePrimaryKey):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::transaction):
(WebCore::IDBDatabase::deleteObjectStore):

  • Modules/indexeddb/IDBDatabaseError.h: Removed.
  • Modules/indexeddb/IDBDatabaseException.cpp: Removed.
  • Modules/indexeddb/IDBDatabaseException.h: Removed.
  • Modules/indexeddb/IDBFactory.cpp:

(WebCore::IDBFactory::cmp):

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::setName):
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::doCount):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::doGet):
(WebCore::IDBIndex::getKey):
(WebCore::IDBIndex::doGetKey):
(WebCore::IDBIndex::getAll):
(WebCore::IDBIndex::getAllKeys):

  • Modules/indexeddb/IDBKeyRange.cpp:

(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
(WebCore::IDBKeyRange::includes):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::setName):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::openKeyCursor):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::getKey):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::doDelete):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::deleteIndex):
(WebCore::IDBObjectStore::count):
(WebCore::IDBObjectStore::doCount):
(WebCore::IDBObjectStore::getAll):
(WebCore::IDBObjectStore::getAllKeys):

  • Modules/indexeddb/IDBOpenDBRequest.cpp:

(WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::result):
(WebCore::IDBRequest::error):
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::abort):
(WebCore::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBTransaction::didCreateIndexOnServer):
(WebCore::IDBTransaction::putOrAddOnServer):

  • Modules/indexeddb/server/IndexValueStore.cpp:

(WebCore::IDBServer::IndexValueStore::addRecord):

  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::renameIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords):
(WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getCount):
(WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
(WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
(WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/MemoryIndex.cpp:

(WebCore::IDBServer::MemoryIndex::putIndexKey):

  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/SQLiteIDBTransaction.cpp:

(WebCore::IDBServer::SQLiteIDBTransaction::begin):
(WebCore::IDBServer::SQLiteIDBTransaction::commit):
(WebCore::IDBServer::SQLiteIDBTransaction::abort):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):

  • Modules/indexeddb/shared/IDBError.cpp:

(WebCore::IDBError::name):
(WebCore::IDBError::message):
(WebCore::IDBError::toDOMError):

  • Modules/indexeddb/shared/IDBError.h:

(WebCore::IDBError::userDeleteError):
(WebCore::IDBError::isNull):

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::createDOMException):

  • dom/DOMException.cpp:

(WebCore::DOMException::initializeDescription):
Initialize description->code from using the actual error codes in the
coreExceptions table, instead of initializing it using |ec|. |ec| is
the index in the ExceptionCode enumeration and it matches the error
code only for legacy exceptions. New exceptions such as DataError
should have a code of 0. Without this change, w3c for IDB would start
failing.

  • dom/ExceptionCodeDescription.cpp:

(WebCore::ExceptionCodeDescription::ExceptionCodeDescription):

  • dom/ExceptionCodeDescription.h:

Source/WebKit:

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::connectionToServerLost):

LayoutTests:

Rebaseline test as the exception messages are slightly different.

  • storage/indexeddb/createIndex-after-failure-expected.txt:
  • storage/indexeddb/createIndex-after-failure-private-expected.txt:
  • storage/indexeddb/get-keyrange-expected.txt:
  • storage/indexeddb/get-keyrange-private-expected.txt:
  • storage/indexeddb/keypath-edges-expected.txt:
  • storage/indexeddb/keypath-edges-private-expected.txt:
  • storage/indexeddb/keyrange-expected.txt:
  • storage/indexeddb/keyrange-private-expected.txt:
  • storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
  • storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-private-expected.txt:
  • storage/indexeddb/transaction-active-flag-expected.txt:
  • storage/indexeddb/transaction-active-flag-private-expected.txt:
8:54 PM Changeset in webkit [219757] by commit-queue@webkit.org
  • 5 edits
    1 delete in trunk/Source/WebCore

[WebIDL] Simplify XMLHttpRequest bindings by removing built-ins
https://bugs.webkit.org/show_bug.cgi?id=174740

Patch by Sam Weinig <sam@webkit.org> on 2017-07-21
Reviewed by Chris Dumez.

The behavior we were getting from XMLHttpRequest.js can be implemented
with the [CachedAttribute] extended attribute. This reduces the number
of JS -> C++ jumps required and makes the code more similar to other
bindings that need caching of an IDL any value.

  • CMakeLists.txt:
  • DerivedSources.make:
  • xml/XMLHttpRequest.js: Removed.

Remove XMLHttpRequest.js.

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::response):
(WebCore::JSXMLHttpRequest::retrieveResponse): Deleted.

  • xml/XMLHttpRequest.idl:

Replace builtin with a [CachedAttribute] and [CustomGetter]
for the response property.

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

Drag and Drop preview image for Twitter link is the wrong shape
https://bugs.webkit.org/show_bug.cgi?id=174731
<rdar://problem/33335616>

Reviewed by Zalan Bujtas.

TextIndicator uses Range::borderAndTextQuads and ::absoluteTextRects
in order to get the rects of the indicated text. Currently, these
functions do not respect clipping, so clipped-out text (e.g. as seen
inside links on Twitter) generates lots of meaningless indicated rects.

  • page/TextIndicator.cpp:

(WebCore::estimatedBackgroundColorForRange):
(WebCore::hasAnyIllegibleColors):
Change adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary
to instead be hasAnyIllegibleColors, and referred to in the same place
as hasNonInlineOrReplacedElements, so that it follows the same
upgrade path (leaving textRects empty, so that it is later filled in
with the absoluteBoundingRect). This was a mistake in r219033, which
instead would end up painting all content, but filling in textRects
with the actual individual text rects.

This alone changes the behavior on Twitter from lots of jagged misplaced
rects to a too-large bounding rect. Combined with the following changes,
the bounding rect is reduced to the right size:

(WebCore::initializeIndicator):
Adopt the new Range::borderAndTextQuads and ::absoluteTextRects parameter
and opt-in to respecting clipping for text rects.

  • dom/DOMRectList.cpp:

(WebCore::DOMRectList::DOMRectList):

  • dom/DOMRectList.h:

(WebCore::DOMRectList::create):
Add a DOMRectList constructor and create() that take FloatRects, similar
to the one that takes FloatQuads, but without the boundingRect() calls.

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

(WebCore::Document::convertAbsoluteToClientRects):
Add convertAbsoluteToClientRects, similar to covertAbsoluteToClientQuads,
except acting on rects instead of quads.

  • dom/Range.cpp:

(WebCore::Range::absoluteRectsForRangeInText):
(WebCore::Range::absoluteTextRects):
(WebCore::Range::getClientRects):
(WebCore::Range::borderAndTextRects):
(WebCore::Range::boundingRect):
(WebCore::Range::absoluteBoundingRect):
(WebCore::Range::borderAndTextQuads): Deleted.

  • dom/Range.h:

Replace borderAndTextQuads with borderAndTextRects, because all callers
just ended up calling boundingBox() on the quads.

Factor absoluteRectsForRangeInText out of absoluteTextRects and
borderAndTextQuads, and teach it to optionally intersect the text rects
with their renderer's absoluteClippedOverflowRect.

5:41 PM Changeset in webkit [219755] by pvollan@apple.com
  • 5 edits
    2 adds in trunk

Round-tripping stroke-width styles through getComputedStyle cause the text to gain a stroke.
https://bugs.webkit.org/show_bug.cgi?id=174701
Source/WebCore:

<rdar://problem/32903679>

Reviewed by Simon Fraser.

The initial value of stroke-color should be transparent, see https://www.w3.org/TR/fill-stroke-3/#stroke-color.
Also, there is no need to set the graphics context in text stroke mode, if the stroke color is not visible.

Test: fast/css/round-trip-stroke-width-using-computed-style.html

  • rendering/TextPaintStyle.cpp:

(WebCore::updateGraphicsContext):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialStrokeWidth):
(WebCore::RenderStyle::initialStrokeColor):

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):

LayoutTests:

Reviewed by Simon Fraser.

  • fast/css/round-trip-stroke-width-using-computed-style-expected.html: Added.
  • fast/css/round-trip-stroke-width-using-computed-style.html: Added.
5:15 PM Changeset in webkit [219754] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

Crash in many WebKit apps marking a connection invalid under Messages::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace.
<rdar://problem/28822272> and https://bugs.webkit.org/show_bug.cgi?id=174729

Reviewed by Tim Horton.

Previously, when a NetworkLoad generated a "CanAuthenticateAgainstProtectionSpace" event, the message went from
Network process -> Web process -> UI process.

In that case, MESSAGE_CHECKing the validity of the frame in WebPageProxy made sense.

In r202511 we cut the WebProcess out of this and had Networking go straight to UI process.

As a result, the message check became invalid. The Networking process cannot possible know the validity of
particular WebPage or WebFrame identifiers.

We simply need to validate the input in NetworkProcessProxy.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace): Validate both the page and frame ids before

passing the call along to the WebPageProxy. Also, if either of those validations fail, respond to the network process.

5:13 PM Changeset in webkit [219753] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Remove an inaccurate comment from RenderTextLineBoxes

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::absoluteRectsForRange):
This comment has been wrong for at least 4 years.

4:34 PM Changeset in webkit [219752] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

TextIndicator::estimatedTextColorsForRange asserts inside HashSet code (inserting reserved value)
https://bugs.webkit.org/show_bug.cgi?id=174733

Reviewed by Wenson Hsieh.

  • page/TextIndicator.cpp:

(WebCore::estimatedTextColorsForRange):
(WebCore::adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary):
RGBA32 isn't a valid hash key, because we have no traits that define the
empty or deleted values, nor do we have any bits we could feasibly
use -- the full range of RGBA32 is easy to reach with various colors.

Instead, hash Color directly.

4:25 PM Changeset in webkit [219751] by n_wang@apple.com
  • 7 edits
    2 adds in trunk

AX: Expose form validation on iOS as hint
https://bugs.webkit.org/show_bug.cgi?id=174722
<rdar://problem/33459761>

Reviewed by Chris Fleizach.

Source/WebCore:

Adding the validation message to the hint of the form control element.

Test: accessibility/ios-simulator/form-control-validation-message.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isShowingValidationMessage):
(WebCore::AccessibilityObject::validationMessage):

  • accessibility/AccessibilityObject.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityHint]):
(-[WebAccessibilityObjectWrapper accessibilityIsShowingValidationMessage]):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::isShowingValidationMessage):

  • html/HTMLFormControlElement.h:

LayoutTests:

  • accessibility/ios-simulator/form-control-validation-message-expected.txt: Added.
  • accessibility/ios-simulator/form-control-validation-message.html: Added.
3:44 PM Changeset in webkit [219750] by aestes@apple.com
  • 3 edits
    1 delete in trunk/Source/WebKit

[iOS] Adopt UIImagePickerControllerImageURL for photo uploads
https://bugs.webkit.org/show_bug.cgi?id=174723
<rdar://problem/33223962>

Reviewed by Joseph Pecoraro.

In iOS 11, use the URL provided by UIImagePickerControllerImageURL, if available, as the
file URL for photo uploads. Since we use the UIImagePickerController imageExportPreset of
UIImagePickerControllerImageURLExportPresetCompatible, UIKit will take care of converting
HEIF images to JPEG for us. For other types (GIF, JPEG, and PNG), it will preserve the
original format.

Since UIImagePickerController now provides GIF and PNG representations, we no longer need to
use PHImageManager to access the original assets. This patch removes the
PHAsset/PHImageManager code added in r185241.

  • Platform/spi/ios/PhotosSPI.h: Removed.
  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
(-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
3:41 PM Changeset in webkit [219749] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Web Inspector: inspect(aFunction) should jump to function definition
https://bugs.webkit.org/show_bug.cgi?id=149344
<rdar://problem/11563607>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-07-21
Reviewed by Matt Baker.

Source/WebInspectorUI:

  • UserInterface/Protocol/InspectorObserver.js:

(WebInspector.InspectorObserver.prototype.inspect):
If we receive a function remote object jump to its location if available.

LayoutTests:

  • inspector/runtime/CommandLineAPI-inspect-expected.txt: Added.
  • inspector/runtime/CommandLineAPI-inspect.html: Added.

Add tests for the CommandLineAPI's inspect() and how it triggers the
Inspector.inspect event with a RemoteObject and hints.

3:22 PM Changeset in webkit [219748] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Adjusted test expectations.
https://bugs.webkit.org/show_bug.cgi?id=173861

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:20 PM Changeset in webkit [219747] by Jonathan Bedard
  • 2 edits in trunk/Tools

Fail gracefully when xcrun fails in IOSSimulatorPort constructor
https://bugs.webkit.org/show_bug.cgi?id=174724

Reviewed by Aakash Jain.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.init): Ignore any errors when attempting to find a running
simulator. Errors here should be treated the same as no simulators found.

3:04 PM Changeset in webkit [219746] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKitLegacy

Unreviewed, fix Mac cmake build after r219733

  • PlatformMac.cmake:
2:26 PM Changeset in webkit [219745] by Konstantin Tokarev
  • 6 edits in trunk/Source

[cmake][Mac] Unreviewed, fix linking WebKitSystemInterface

After r219560 link_directories() in PlatformXXX.cmake files does not
affect corresponding targets.

  • PlatformMac.cmake:
2:20 PM Changeset in webkit [219744] by commit-queue@webkit.org
  • 27 edits in trunk/Source/WebCore

[WebIDL] Remove the need for the side map of DeprecatedCSSOMValue roots
https://bugs.webkit.org/show_bug.cgi?id=174713

Patch by Sam Weinig <sam@webkit.org> on 2017-07-21
Reviewed by Andreas Kling.

We used to not want to bloat the size of CSSValues with a pointer to the
owner CSSStyleDeclaration, so, for GC purposes we need kept a mapping of
them on DOMWrapperWorld that only got set if a wrapper was made. Now that
we have DeprecatedCSSOMValue, a wrapper for CSSValue that only gets created
for the bindings, we no longer need the side table, and simply have the
DeprecatedCSSOMValue maintain a reference to the CSSStyleDeclaration.

  • bindings/js/DOMWrapperWorld.h:

(WebCore::DOMWrapperWorld::wrappers):
Remove m_deprecatedCSSOMValueRoots and make m_wrappers private with a getter.

  • bindings/js/JSCSSStyleDeclarationCustom.cpp:

(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Deleted.
Remove custom implementation of getPropertyCSSValue, now that it no longer
needs to update m_deprecatedCSSOMValueRoots.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):

  • bindings/js/JSDOMWrapperCache.h:

(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):

  • bindings/js/JSNodeCustom.cpp:

(WebCore::getOutOfLineCachedWrapper):
Use wrappers getter rather than direct member variable.

  • bindings/js/JSDeprecatedCSSOMValueCustom.cpp:

(WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
Rather than checking the side table for roots, now get the root
via the reference CSSStyleDeclaration.

(WebCore::JSDeprecatedCSSOMValueOwner::finalize): Deleted.
Remove custom finalize now that we don't have to remove ourself
from m_deprecatedCSSOMValueRoots.

  • css/CSSStyleDeclaration.idl:

Remove [Custom] from getPropertyCSSValue.

  • css/DeprecatedCSSOMValue.idl:

Remove [JSCustomFinalize].

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

  • css/CSSImageValue.cpp:

(WebCore::CSSImageValue::createDeprecatedCSSOMWrapper):

  • css/CSSImageValue.h:
  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::createDeprecatedCSSOMPrimitiveWrapper):

  • css/CSSPrimitiveValue.h:
  • css/CSSStyleDeclaration.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::createDeprecatedCSSOMWrapper):

  • css/CSSValue.h:
  • css/DeprecatedCSSOMCounter.h:
  • css/DeprecatedCSSOMPrimitiveValue.cpp:

(WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue):

  • css/DeprecatedCSSOMPrimitiveValue.h:

(WebCore::DeprecatedCSSOMPrimitiveValue::create):
(WebCore::DeprecatedCSSOMPrimitiveValue::DeprecatedCSSOMPrimitiveValue):

  • css/DeprecatedCSSOMRGBColor.h:
  • css/DeprecatedCSSOMRect.h:
  • css/DeprecatedCSSOMValue.h:

(WebCore::DeprecatedCSSOMValue::owner):
(WebCore::DeprecatedCSSOMValue::DeprecatedCSSOMValue):
(WebCore::DeprecatedCSSOMComplexValue::create):
(WebCore::DeprecatedCSSOMComplexValue::DeprecatedCSSOMComplexValue):

  • css/DeprecatedCSSOMValueList.h:

(WebCore::DeprecatedCSSOMValueList::create):
(WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList):

  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM):

  • css/PropertySetCSSStyleDeclaration.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::getPresentationAttribute):
Pass owning CSSStyleDeclaration to DeprecatedCSSOMValue and derived classes.

2:16 PM Changeset in webkit [219743] by akling@apple.com
  • 43 edits in trunk/Source

Use more references in event dispatch code
https://bugs.webkit.org/show_bug.cgi?id=174681

Reviewed by Geoffrey Garen.

Source/WebCore:

Make EventListener::handleEvent() take a ScriptExecutionContext&, Event&.
Then make everything build again. Various null checks and assertions
disappear in the process.

  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

  • bindings/js/JSErrorHandler.h:
  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::initializeJSFunction):
(WebCore::JSEventListener::handleEvent):
(WebCore::eventHandlerAttribute):

  • bindings/js/JSEventListener.h:

(WebCore::JSEventListener::jsFunction):

  • bindings/js/JSLazyEventListener.cpp:

(WebCore::JSLazyEventListener::initializeJSFunction):

  • bindings/js/JSLazyEventListener.h:
  • dom/EventListener.h:
  • dom/EventTarget.cpp:

(WebCore::EventTarget::fireEventListeners):

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::defaultEventHandler):

  • html/ImageDocument.cpp:

(WebCore::ImageEventListener::handleEvent):

  • inspector/CommandLineAPIHost.cpp:

(WebCore::listenerEntriesFromListenerInfo):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForEventListener):

  • inspector/InspectorIndexedDBAgent.cpp:
  • platform/Widget.h:

(WebCore::Widget::handleEvent):

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::handleEvent):

  • platform/cocoa/WebVideoFullscreenModelVideoElement.h:
  • platform/cocoa/WebVideoFullscreenModelVideoElement.mm:

(WebVideoFullscreenModelVideoElement::handleEvent):

  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefTargetEventListener::handleEvent):

  • svg/animation/SVGSMILElement.cpp:

(WebCore::ConditionEventListener::handleEvent):
(WebCore::SVGSMILElement::handleConditionEvent):

  • svg/animation/SVGSMILElement.h:

Source/WebKit:

  • WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:

(WebKit::PDFPluginAnnotation::handleEvent):
(WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent):

  • WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
  • WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:

(WebKit::PDFPluginPasswordField::handleEvent):

  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:

(WebKit::PDFPluginTextAnnotation::handleEvent):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::createWebEvent):
(WebKit::PluginView::handleEvent):

  • WebProcess/Plugins/PluginView.h:

Source/WebKitLegacy/mac:

  • DOM/ObjCEventListener.h:
  • DOM/ObjCEventListener.mm:

(WebCore::ObjCEventListener::handleEvent):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(NetscapePluginWidget::handleEvent):

Source/WebKitLegacy/win:

  • DOMEventsClasses.cpp:

(WebEventListener::handleEvent):

  • DOMEventsClasses.h:
  • Plugins/PluginView.cpp:

(WebCore::PluginView::handleEvent):

  • Plugins/PluginView.h:
2:04 PM Changeset in webkit [219742] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

iBooks: Overlapping/missing content at beginning/end of paragraph.
https://bugs.webkit.org/show_bug.cgi?id=174717
<rdar://problem/33117912>

Reviewed by Simon Fraser.

By definiton simple and normal line layout should always produce the exact same lineboxes. It enables us not
to force repaint while swapping between these 2 line layouts.
However in certain cases (font size pixel rounding as an example) they don't agree on how much content fits the line and
that could result in missing/overlapping content due to the lack of repaint.

Unable to test.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::ensureLineBoxes):

1:53 PM Changeset in webkit [219741] by Chris Dumez
  • 9 edits
    2 adds
    2 deletes in trunk/Source/WebCore

Drop make_dom_exceptions.pl script that we only have DOMException
https://bugs.webkit.org/show_bug.cgi?id=174699

Reviewed by Darin Adler.

Drop make_dom_exceptions.pl script that we only have DOMException.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreMacros.cmake:
  • bindings/js/JSDOMExceptionHandling.cpp:
  • css/FontFaceSet.cpp:
  • dom/DOMAllInOne.cpp:
  • dom/DOMExceptions.in: Removed.
  • dom/ExceptionCodeDescription.cpp: Added.

(WebCore::ExceptionCodeDescription::ExceptionCodeDescription):

  • dom/ExceptionCodeDescription.h: Added.
  • dom/make_dom_exceptions.pl: Removed.
  • inspector/WebInjectedScriptHost.cpp:

(WebCore::WebInjectedScriptHost::subtype):

1:44 PM Changeset in webkit [219740] by mark.lam@apple.com
  • 16 edits in trunk/Source/JavaScriptCore

Refactor MASM probe CPUState to use arrays for register storage.
https://bugs.webkit.org/show_bug.cgi?id=174694

Reviewed by Keith Miller.

Using arrays for register storage in CPUState allows us to do away with the
huge switch statements to decode each register id. We can now simply index into
the arrays.

With this patch, we now:

  1. Remove the need for macros for defining the list of CPU registers. We can go back to simple enums. This makes the code easier to read.
  1. Make the assembler the authority on register names. Most of this code is moved into the assembler from GPRInfo and FPRInfo. GPRInfo and FPRInfo now forwards to the assembler.
  1. Make the assembler the authority on the number of registers of each type.
  1. Fix a "bug" in ARMv7's lastRegister(). It was previously omitting lr and pc. This is inconsistent with how every other CPU architecture implements lastRegister(). This patch fixes it to return the true last GPR i.e. pc, but updates RegisterSet::reservedHardwareRegisters() to exclude those registers.
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::numberOfRegisters):
(JSC::ARM64Assembler::firstSPRegister):
(JSC::ARM64Assembler::lastSPRegister):
(JSC::ARM64Assembler::numberOfSPRegisters):
(JSC::ARM64Assembler::numberOfFPRegisters):
(JSC::ARM64Assembler::gprName):
(JSC::ARM64Assembler::sprName):
(JSC::ARM64Assembler::fprName):

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::numberOfRegisters):
(JSC::ARMAssembler::firstSPRegister):
(JSC::ARMAssembler::lastSPRegister):
(JSC::ARMAssembler::numberOfSPRegisters):
(JSC::ARMAssembler::numberOfFPRegisters):
(JSC::ARMAssembler::gprName):
(JSC::ARMAssembler::sprName):
(JSC::ARMAssembler::fprName):

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::lastRegister):
(JSC::ARMv7Assembler::numberOfRegisters):
(JSC::ARMv7Assembler::firstSPRegister):
(JSC::ARMv7Assembler::lastSPRegister):
(JSC::ARMv7Assembler::numberOfSPRegisters):
(JSC::ARMv7Assembler::numberOfFPRegisters):
(JSC::ARMv7Assembler::gprName):
(JSC::ARMv7Assembler::sprName):
(JSC::ARMv7Assembler::fprName):

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::numberOfRegisters):
(JSC::AbstractMacroAssembler::gprName):
(JSC::AbstractMacroAssembler::firstSPRegister):
(JSC::AbstractMacroAssembler::lastSPRegister):
(JSC::AbstractMacroAssembler::numberOfSPRegisters):
(JSC::AbstractMacroAssembler::sprName):
(JSC::AbstractMacroAssembler::numberOfFPRegisters):
(JSC::AbstractMacroAssembler::fprName):

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::numberOfRegisters):
(JSC::MIPSAssembler::firstSPRegister):
(JSC::MIPSAssembler::lastSPRegister):
(JSC::MIPSAssembler::numberOfSPRegisters):
(JSC::MIPSAssembler::numberOfFPRegisters):
(JSC::MIPSAssembler::gprName):
(JSC::MIPSAssembler::sprName):
(JSC::MIPSAssembler::fprName):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::CPUState::gprName):
(JSC::MacroAssembler::CPUState::sprName):
(JSC::MacroAssembler::CPUState::fprName):
(JSC::MacroAssembler::CPUState::gpr):
(JSC::MacroAssembler::CPUState::spr):
(JSC::MacroAssembler::CPUState::fpr):
(JSC::MacroAssembler::CPUState::pc):
(JSC::MacroAssembler::CPUState::fp):
(JSC::MacroAssembler::CPUState::sp):
(JSC::ProbeContext::gpr):
(JSC::ProbeContext::spr):
(JSC::ProbeContext::fpr):
(JSC::ProbeContext::gprName):
(JSC::ProbeContext::sprName):
(JSC::ProbeContext::fprName):
(JSC::MacroAssembler::numberOfRegisters): Deleted.
(JSC::MacroAssembler::numberOfFPRegisters): Deleted.

  • assembler/MacroAssemblerARM.cpp:
  • assembler/MacroAssemblerARM64.cpp:

(JSC::arm64ProbeTrampoline):

  • assembler/MacroAssemblerARMv7.cpp:
  • assembler/MacroAssemblerPrinter.cpp:

(JSC::Printer::nextID):
(JSC::Printer::printAllRegisters):
(JSC::Printer::printPCRegister):
(JSC::Printer::printRegisterID):
(JSC::Printer::printAddress):

  • assembler/MacroAssemblerX86Common.cpp:
  • assembler/X86Assembler.h:

(JSC::X86Assembler::numberOfRegisters):
(JSC::X86Assembler::firstSPRegister):
(JSC::X86Assembler::lastSPRegister):
(JSC::X86Assembler::numberOfSPRegisters):
(JSC::X86Assembler::numberOfFPRegisters):
(JSC::X86Assembler::gprName):
(JSC::X86Assembler::sprName):
(JSC::X86Assembler::fprName):

  • jit/FPRInfo.h:

(JSC::FPRInfo::debugName):

  • jit/GPRInfo.h:

(JSC::GPRInfo::debugName):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::reservedHardwareRegisters):

1:40 PM Changeset in webkit [219739] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

WebResourceLoadStatisticsStore::m_operatingDates is unsafely modified from several threads
https://bugs.webkit.org/show_bug.cgi?id=174721
<rdar://problem/33400343>

Reviewed by Brent Fulgham.

WebResourceLoadStatisticsStore::m_operatingDates is supposed to only be modified on
the background thread. However, WebResourceLoadStatisticsStore::performDailyTasks()
was mistakenly calling includeTodayAsOperatingDateIfNecessary() on the main thread,
which would modify m_operatingDates. This could lead to crashes such as the
one in <rdar://problem/33400343>, as the main thread may modify m_operatingDates
while we are interating over it on the background thread to save it to disk.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::performDailyTasks):
(WebKit::WebResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary):

1:38 PM Changeset in webkit [219738] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[CG] An image should not invoke many system calls before confirming its format is supported
https://bugs.webkit.org/show_bug.cgi?id=174692

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-07-21
Reviewed by Tim Horton.

We should be careful when invoking system calls before confirming that the
image type is available and it is one of the whitelist formats. Otherwise
we will be calling the parsers of the unsupported formats.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::setImageDataBuffer): The check isAllowedImageUTI()
is now done in ImageDecoder::encodedDataStatus() which will return Error
if there is an error in the data or "isAllowedImageUTI() returns false."

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::dataChanged): Avoid calling canUseAsyncDecodingForLargeImages()
before confirming the image type is available and it's supported by WebKit.
canUseAsyncDecodingForLargeImages() tries to cache the first frame of the
image to know its size. Asking the ImageFrameCache to destroy its decoded
frames is not needed unless ImageFrameCache::decodedSize() is not zero.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::encodedDataStatus): Avoid calling CGImageSourceGetStatus()
before knowing the UTI of the image. When knowing it, we call CGImageSourceGetStatus()
and if it returns kCGImageStatusIncomplete or kCGImageStatusComplete, we
check whether isAllowedImageUTI() or not. If isAllowedImageUTI() returns
false, return Error which will make the CachedImage cancel loading the
rest of the image.

12:55 PM Changeset in webkit [219737] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

AudioTrackPrivateMediaStreamCocoa shouldn't set AudioSession::setPreferredBufferSize
https://bugs.webkit.org/show_bug.cgi?id=174707
rdar://problem/33446809

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-21
Reviewed by Eric Carlson.

Manually tested for audio side effects.

AudioChannel::copyFrom fails when AudioChannel lengths don't match.

This happens because PlatformMediaSessionManager::updateSessionState() owns and sets
AudioSession::setPreferredBufferSize().

However, AudioTrackPrivateMediaStreamCocoa::createAudioUnit, when it creates an input
audio unit is setting AudioSession::setPreferredBufferSize() directly to its own arbitrary value.

AudioSession::setPreferredBufferSize() should be managed by the higher level
PlatformMediaSessionManager, and not modified by audio unit creation, in order to keep harmony
within the audio pipeline.

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:

(WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit):

12:48 PM Changeset in webkit [219736] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Noise when AudioChannel lengths don't match.
https://bugs.webkit.org/show_bug.cgi?id=174706
rdar://problem/33389856

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-21
Reviewed by Eric Carlson.

When AudioChannel lengths don't match, copyFrom() returns early leaving uninitialized data in the audio buffer.
This change zeros out the data, so there isn't objectionable noise sent to the speaker.

  • platform/audio/AudioChannel.cpp:

(WebCore::AudioChannel::copyFrom):

12:39 PM Changeset in webkit [219735] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebCore

[WebIDL] Make a few parameters non-nullable in inspector IDL files
https://bugs.webkit.org/show_bug.cgi?id=174719

Patch by Sam Weinig <sam@webkit.org> on 2017-07-21
Reviewed by Joseph Pecoraro.

  • inspector/CommandLineAPIHost.cpp:

(WebCore::CommandLineAPIHost::databaseId):
(WebCore::CommandLineAPIHost::storageId):

  • inspector/CommandLineAPIHost.h:
  • inspector/CommandLineAPIHost.idl:
  • inspector/InspectorDOMStorageAgent.cpp:

(WebCore::InspectorDOMStorageAgent::storageId):

  • inspector/InspectorDOMStorageAgent.h:
  • inspector/InspectorDatabaseAgent.cpp:

(WebCore::InspectorDatabaseAgent::databaseId):

  • inspector/InspectorDatabaseAgent.h:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::showContextMenu):
(WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):

  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.idl:

Remove nullability from arguments that should never be null.

12:36 PM Changeset in webkit [219734] by commit-queue@webkit.org
  • 65 edits in trunk/Source/WebInspectorUI

Web Inspector: Avoid subclassing WebInspector.Object if we do not need to
https://bugs.webkit.org/show_bug.cgi?id=174703

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-07-21
Reviewed by Brian Burg.

  • UserInterface/Models/LogObject.js:

(WebInspector.LogObject):
(WebInspector.LogObject.prototype.get startDate): Deleted.
Remove unused startDate property as well.

  • UserInterface/Base/YieldableTask.js:
  • UserInterface/Debug/ProtocolTrace.js:
  • UserInterface/Models/AnalyzerMessage.js:
  • UserInterface/Models/ApplicationCacheFrame.js:
  • UserInterface/Models/ApplicationCacheManifest.js:
  • UserInterface/Models/BackForwardEntry.js:
  • UserInterface/Models/Branch.js:
  • UserInterface/Models/BreakpointAction.js:
  • UserInterface/Models/CSSMedia.js:
  • UserInterface/Models/CSSSelector.js:
  • UserInterface/Models/CallFrame.js:
  • UserInterface/Models/CallingContextTree.js:
  • UserInterface/Models/CallingContextTreeNode.js:
  • UserInterface/Models/CollectionEntry.js:
  • UserInterface/Models/CollectionEntryPreview.js:
  • UserInterface/Models/ConsoleMessage.js:
  • UserInterface/Models/DOMSearchMatchObject.js:
  • UserInterface/Models/DatabaseObject.js:
  • UserInterface/Models/DatabaseTableObject.js:
  • UserInterface/Models/DebuggerDashboard.js:
  • UserInterface/Models/DebuggerData.js:
  • UserInterface/Models/ExecutionContext.js:
  • UserInterface/Models/ExecutionContextList.js:
  • UserInterface/Models/GarbageCollection.js:
  • UserInterface/Models/HeapSnapshotRootPath.js:
  • UserInterface/Models/IndexedDatabase.js:
  • UserInterface/Models/IndexedDatabaseObjectStore.js:
  • UserInterface/Models/IndexedDatabaseObjectStoreIndex.js:
  • UserInterface/Models/Instrument.js:
  • UserInterface/Models/KeyboardShortcut.js:
  • UserInterface/Models/LineWidget.js:
  • UserInterface/Models/MemoryCategory.js:
  • UserInterface/Models/MemoryPressureEvent.js:
  • UserInterface/Models/ObjectPreview.js:
  • UserInterface/Models/Probe.js:
  • UserInterface/Models/ProbeSetDataFrame.js:
  • UserInterface/Models/Profile.js:
  • UserInterface/Models/ProfileNode.js:
  • UserInterface/Models/ProfileNodeCall.js:
  • UserInterface/Models/PropertyDescriptor.js:
  • UserInterface/Models/PropertyPath.js:
  • UserInterface/Models/PropertyPreview.js:
  • UserInterface/Models/ResourceQueryMatch.js:
  • UserInterface/Models/ResourceQueryResult.js:
  • UserInterface/Models/ResourceTimingData.js:
  • UserInterface/Models/Revision.js:
  • UserInterface/Models/ScopeChainNode.js:
  • UserInterface/Models/ScriptSyntaxTree.js:
  • UserInterface/Models/SourceCodePosition.js:
  • UserInterface/Models/SourceCodeSearchMatchObject.js:
  • UserInterface/Models/SourceMap.js:
  • UserInterface/Models/StackTrace.js:
  • UserInterface/Models/StructureDescription.js:
  • UserInterface/Models/TextMarker.js:
  • UserInterface/Models/TextRange.js:
  • UserInterface/Models/TimelineRange.js:
  • UserInterface/Models/TypeDescription.js:
  • UserInterface/Models/TypeSet.js:
  • UserInterface/Protocol/ProtocolTracer.js:
  • UserInterface/Proxies/FormatterWorkerProxy.js:
  • UserInterface/Proxies/HeapSnapshotDiffProxy.js:
  • UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
  • UserInterface/Test/TestSuite.js:
11:48 AM Changeset in webkit [219733] by beidson@apple.com
  • 29 edits
    13 deletes in trunk

Get rid of WebCore IconDatabase code.
https://bugs.webkit.org/show_bug.cgi?id=174700

Reviewed by Tim Horton.

Source/WebCore:

No new tests (No behavior change).

Tons of red.
Very little green.
No further explanation.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::implicitClose):

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::HistoryItem):
(WebCore::HistoryItem::~HistoryItem):
(WebCore::HistoryItem::reset):
(WebCore::HistoryItem::setURLString):

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::willSendRequest):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::startIconLoading):
(WebCore::DocumentLoader::iconLoadDecisionAvailable): Deleted.
(WebCore::iconLoadDecisionCallback): Deleted.
(WebCore::DocumentLoader::getIconLoadDecisionForIconURL): Deleted.
(WebCore::DocumentLoader::continueIconLoadWithDecision): Deleted.
(WebCore::iconDataCallback): Deleted.
(WebCore::DocumentLoader::getIconDataForIconURL): Deleted.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::linkIcons):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::stop):

  • loader/FrameLoader.h:

(WebCore::FrameLoader::subframeLoader):
(WebCore::FrameLoader::icon): Deleted.

  • loader/FrameLoaderClient.h:
  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::create):

  • loader/icon/IconController.cpp: Removed.
  • loader/icon/IconController.h: Removed.
  • loader/icon/IconDatabase.cpp: Removed.
  • loader/icon/IconDatabase.h: Removed.
  • loader/icon/IconDatabaseBase.cpp: Removed.
  • loader/icon/IconDatabaseBase.h: Removed.
  • loader/icon/IconDatabaseClient.h: Removed.
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::IconLoader):
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):

  • loader/icon/IconLoader.h:
  • loader/icon/IconRecord.cpp: Removed.
  • loader/icon/IconRecord.h: Removed.
  • loader/icon/PageURLRecord.cpp: Removed.
  • loader/icon/PageURLRecord.h: Removed.
  • testing/Internals.cpp:

(WebCore::Internals::shortcutIconURLs):

Source/WebKit:

  • UIProcess/API/glib/WebKitWebContext.cpp:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • Misc/WebCoreStatistics.mm:

(+[WebCoreStatistics iconPageURLMappingCount]):
(+[WebCoreStatistics iconRetainedPageURLCount]):
(+[WebCoreStatistics iconRecordCount]):
(+[WebCoreStatistics iconsWithDataCount]):

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:
  • WebCoreSupport/WebIconDatabaseClient.h: Removed.
  • WebCoreSupport/WebIconDatabaseClient.mm: Removed.
  • WebView/WebView.mm:

(-[WebView mainFrameIconURL]):

LayoutTests:

  • fast/dom/icon-url-list-expected.txt:
  • fast/dom/icon-url-list.html:
9:59 AM Changeset in webkit [219732] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

[WTF] Drop initializeDate
https://bugs.webkit.org/show_bug.cgi?id=174714

Reviewed by Darin Adler.

minYear static variable will be initialized in an exclusive manner, which is ensured by C++ "static" semantics.
Thus, we do not need to call initializeDate() explicitly.

  • wtf/DateMath.cpp:

(WTF::equivalentYearForDST):
(WTF::initializeDates): Deleted.

  • wtf/Threading.cpp:

(WTF::initializeThreading):

9:41 AM Changeset in webkit [219731] by Yusuke Suzuki
  • 12 edits
    1 add in trunk/Source

[JSC] Introduce static symbols
https://bugs.webkit.org/show_bug.cgi?id=158863

Reviewed by Darin Adler.

Source/JavaScriptCore:

We use StaticSymbolImpl to initialize PrivateNames and builtin Symbols.
As a result, we can share the same Symbol values between VMs and threads.
And we do not need to allocate Ref<SymbolImpl> for these symbols at runtime.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.cpp: Added.

Suppress warning C4307, integral constant overflow. It is intentional in constexpr hash value calculation.

  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinUtils.h:

Source/WTF:

We add a new class StaticSymbolImpl. StaticSymbolImpl can offer
the way to create static SymbolImpl. It can be shared between
multiple VMs and multiple threads.

  • wtf/text/SymbolImpl.h:

(WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl):
(WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&):
For StaticSymbolImpl's hashForSymbol, we use usual string hash value.
Since all the SymbolImpls are unique, basically, any value is OK here.
Non-confilicting to the other SymbolImpls is ideal.

9:35 AM Changeset in webkit [219730] by Chris Dumez
  • 15 edits
    3 moves in trunk/Source/WebCore

Rename DOMCoreException class to DOMException
https://bugs.webkit.org/show_bug.cgi?id=174698

Reviewed by Darin Adler.

Rename DOMCoreException class to DOMException to match its Web-exposed name.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • Modules/quota/StorageErrorCallback.cpp:

(WebCore::StorageErrorCallback::CallbackTask::CallbackTask):

  • Modules/quota/StorageErrorCallback.h:
  • Modules/quota/StorageErrorCallback.idl:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::retrieveErrorMessage):
(WebCore::createDOMException):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateOverloadDispatcher):

  • css/FontFaceSet.cpp:
  • css/FontFaceSet.h:
  • dom/DOMAllInOne.cpp:
  • dom/DOMException.cpp: Renamed from Source/WebCore/dom/DOMCoreException.cpp.

(WebCore::DOMException::create):
(WebCore::DOMException::DOMException):
(WebCore::DOMException::initializeDescription):

  • dom/DOMException.h: Renamed from Source/WebCore/dom/DOMCoreException.h.

(WebCore::DOMException::create):
(WebCore::DOMException::DOMException):

  • dom/DOMException.idl: Renamed from Source/WebCore/dom/DOMCoreException.idl.
  • dom/DOMExceptions.in:
  • dom/make_dom_exceptions.pl:

(generateImplementation):

9:34 AM Changeset in webkit [219729] by Chris Dumez
  • 10 edits in trunk/LayoutTests

Unreviewed, rebaseline test after r219708.

  • js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-highsierra-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-highsierra/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
9:02 AM Changeset in webkit [219728] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[CMake] Add an option to stop build after generating project files
https://bugs.webkit.org/show_bug.cgi?id=174664

Patch by Yousuke Kimoto <Yousuke.Kimoto@sony.com> on 2017-07-21
Reviewed by Konstantin Tokarev.

Add "--generate-project-only" to stop build after generating project files.

  • Scripts/build-webkit: Add '--generate-project-only' option and a checker to stop build.
  • Scripts/webkitdirs.pm: Add a function to check '--generate-project-only' option and the same checker as the above

(buildCMakeProjectOrExit): Add a cheker to stop build stop build after generating project files.
(determineIsGenerateProjectOnly): Check if '--generate-project-only' option is specified
(isGenerateProjectOnly): ditto

9:01 AM Changeset in webkit [219727] by Yusuke Suzuki
  • 5 edits
    2 adds in trunk

[FTL] Arguments elimination is suppressed by unreachable blocks
https://bugs.webkit.org/show_bug.cgi?id=174352

Reviewed by Filip Pizlo.

JSTests:

  • stress/arguments-elimination-force-exit.js: Added.

(shouldBe):
(strict):
(sloppy):

  • stress/arguments-elimination-throw.js: Added.

(shouldBe):
(shouldThrow):
(sloppy):
(isArguments):

Source/JavaScriptCore:

If we do not execute op_get_by_id, our value profiling tells us unpredictable and DFG emits ForceOSRExit.
The problem is that arguments elimination phase checks escaping even when ForceOSRExit preceeds.
Since GetById without information can escape arguments if it is specified, non-executed code including
op_get_by_id with arguments can escape arguments.

For example,

function test(flag)
{

if (flag) {

This is not executed, but emits GetById with arguments.
It prevents us from eliminating materialization.
return arguments.length;

}
return arguments.length;

}
noInline(test);
while (true)

test(false);

We do not perform CFA and dead-node clipping yet when performing arguments elimination phase.
So this GetById exists and escapes arguments.

To solve this problem, our arguments elimination phase checks preceding pseudo-terminal nodes.
If it is shown, following GetById does not escape arguments. Compared to performing AI, it is
lightweight. But it catches much of typical cases we failed to perform arguments elimination.

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::isPseudoTerminal):

  • dfg/DFGValidate.cpp:
8:50 AM Changeset in webkit [219726] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Follow up to https://bugs.webkit.org/show_bug.cgi?id=174659.

  • inspector/InspectorFrontendHost.idl:

Remove unnecessary JSGenerateToJSObject noticed in review.

8:37 AM Changeset in webkit [219725] by Yusuke Suzuki
  • 5 edits in trunk

[WTF] Newly added AtomicStringImpl should use BufferInternal static string if StringImpl is static
https://bugs.webkit.org/show_bug.cgi?id=174501

Reviewed by Darin Adler.

Source/WTF:

When creating AtomicStringImpl from static StringImpl, we can just use createWithoutCopying
to create a BufferInternal AtomicStringImpl which m_data{8,16} is static string's one.

  • wtf/text/AtomicStringImpl.cpp:

(WTF::CStringTranslator::hash):
(WTF::CStringTranslator::equal):
(WTF::CStringTranslator::translate):
(WTF::AtomicStringImpl::add):
(WTF::HashTranslatorCharBuffer::HashTranslatorCharBuffer):
(WTF::UCharBufferTranslator::hash):
(WTF::UCharBufferTranslator::equal):
(WTF::UCharBufferTranslator::translate):
(WTF::LCharBufferTranslator::hash):
(WTF::LCharBufferTranslator::equal):
(WTF::LCharBufferTranslator::translate):
(WTF::BufferFromStaticDataTranslator::hash):
(WTF::BufferFromStaticDataTranslator::equal):
(WTF::BufferFromStaticDataTranslator::translate):
(WTF::AtomicStringImpl::addLiteral):
(WTF::addSymbol):
(WTF::addStatic):
(WTF::AtomicStringImpl::addSlowCase):
(WTF::AtomicStringImpl::lookUp):
(WTF::CharBufferFromLiteralDataTranslator::hash): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::equal): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::translate): Deleted.
(WTF::addSubstring): Deleted.

  • wtf/text/StringImpl.h:

Tools:

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::TEST):

6:46 AM Changeset in webkit [219724] by Konstantin Tokarev
  • 5 edits in trunk

[cmake] Unreviewed, add definitions necessary to use ICU shipped with macOS

macOS system ICU libraries are built with U_DISABLE_RENAMING=1 and
U_SHOW_CPLUSPLUS_API=0. After r219155 we have to pass this definitons
explicitly, because ICU headers in the tree are not modified anymore.

.:

  • Source/cmake/OptionsJSCOnly.cmake:
  • Source/cmake/OptionsMac.cmake:

Source/WTF:

  • wtf/PlatformMac.cmake: Rely on ICU_LIBRARIES instead of passing ICU

library name explicitly in WTF_LIBRARIES.

3:22 AM Changeset in webkit [219723] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Web Automation: implicit navigations don't cause browsing context switch
https://bugs.webkit.org/show_bug.cgi?id=174633
<rdar://problem/33387797>

Reviewed by Brian Burg.

When a new page load replaces the current frameset, for example when a link in the current browser context has a
_top target, there's no explicit context switch, so the web driver doesn't know that the current browsing
context is no longer valid. Following commands will still be using the previous frame as the current browsing
context, but they don't fail with no such frame because the frame is still alive in the page cache and
referenced in the internal maps used in both UI and web processes. This causes test
testShouldFocusOnTheReplacementWhenAFrameFollowsALinkToA_TopTargetedPage to fail, since it expects a no such
frame exception. When a new page navigation happens we can simply remove references to frames from
m_handleWebFrameMap in WebAutomationSession, because any existing frame reference in the map should be for a
previous page. With this, before the next command is executed, waitForNavigationToComplete will be called and it
will fail with no such frame, condition that is handled to switch to the top level browser context. The test
still fails, because the find element command is called with the top level browsing context, returning no such
element, instead of no such frame. This is consistent with Chrome.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::navigationOccurredForFrame): Clear the m_handleWebFrameMap when a new page load
finished.

2:50 AM Changeset in webkit [219722] by Carlos Garcia Campos
  • 9 edits in trunk/Source

WebDriver: wait until navigation is complete before running new commands and after a click
https://bugs.webkit.org/show_bug.cgi?id=174670

Reviewed by Brian Burg.

Source/WebDriver:

We are already waiting for navigation to complete after navigation commands (go, back, forward, refresh), but
the spec says we should always wait before executing a new command and also after a click. This is causing test
testShouldBeAbleToNavigateBackInTheBrowserHistoryInPresenceOfIframes to sometimes fail, because it does .click()
+ .title and expects the title to tbe the one of the page loaded by the click. Since the load happens very fast,
the test usually passes, but in a real case with a slower load, the title of the previous page will be returned
most of the times.

6.3 Processing Model. Step 7. Wait for navigation to complete. If this returns an error return its value and
jump to step 1 in this overall algorithm, otherwise continue.
https://www.w3.org/TR/webdriver/#processing-model

14.1 Element Click. Step 10. If the click causes navigation: 1. Run the post-navigation checks and return its
value if it is an error. 2. Try to wait for navigation to complete.
https://www.w3.org/TR/webdriver/#element-click

  • Session.cpp:

(WebDriver::Session::waitForNavigationToComplete): Send waitForNavigationToComplete message to the browser to
wait for any pending navigation of current browsing context to complete.
(WebDriver::Session::elementClick): Call waitForNavigationToComplete() after the click.

  • Session.h:
  • WebDriverService.cpp:

(WebDriver::WebDriverService::go): Wait for navigations to complete before running the command.
(WebDriver::WebDriverService::getCurrentURL): Ditto.
(WebDriver::WebDriverService::back): Ditto.
(WebDriver::WebDriverService::forward): Ditto.
(WebDriver::WebDriverService::refresh): Ditto.
(WebDriver::WebDriverService::getTitle): Ditto.
(WebDriver::WebDriverService::switchToFrame): Ditto.
(WebDriver::WebDriverService::switchToParentFrame): Ditto.
(WebDriver::WebDriverService::findElement): Ditto.
(WebDriver::WebDriverService::findElements): Ditto.
(WebDriver::WebDriverService::executeScript): Ditto.
(WebDriver::WebDriverService::executeAsyncScript): Ditto.

Source/WebKit:

Add waitForNavigationToComplete method to Automation to allow WebDriver to wait for pending navigations to
complete. The new method already receives page load strategy and timeout, but they are not implemented yet.

  • UIProcess/Automation/Automation.json: Add waitForNavigationToComplete method and PageLoadStrategy new type.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::waitForNavigationToComplete): Call waitForNavigationToCompleteOnPage or
waitForNavigationToCompleteOnFrame depending on whether the current borwsing context is the main frame or not.
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage): Check if there's an ongoing load for the page,
and wait for it to complete if needed.
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame): Check if there's an ongoing load for the frame,
and wait for it to complete if needed.
(WebKit::WebAutomationSession::navigateBrowsingContext): Use waitForNavigationToCompleteOnPage() now.
(WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
(WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
(WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
(WebKit::WebAutomationSession::navigationOccurredForFrame): Renamed since it now receives the notification for
all the frames. Complete page operations if it's a main frame, or frame operations otherwise.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFinishLoadForFrame): Notify about all frames, not only the main one.
(WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.

2:43 AM Changeset in webkit [219721] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebDriver

WebDriver: correctly handle main frame handles
https://bugs.webkit.org/show_bug.cgi?id=174668

Reviewed by Brian Burg.

When I switched to use std::optional instead of empty strings for the browsing contexts in WebDriver, I forgot
that automation uses empty string for frames to refer to the main frame. We should handle that case, because we
are currently considering empty strings as valid browsing context. It's not a big deal because Automation
converts back the empty string received to the main frame, though. We should also ensure we close the current
browsing context when switching to a new top level browsing context. This patch adds to helper private methods
to switch browsing contexts that deal with the special cases.

  • Session.cpp:

(WebDriver::Session::close):
(WebDriver::Session::switchToTopLevelBrowsingContext):
(WebDriver::Session::switchToBrowsingContext):
(WebDriver::Session::createTopLevelBrowsingContext):
(WebDriver::Session::go):
(WebDriver::Session::back):
(WebDriver::Session::forward):
(WebDriver::Session::refresh):
(WebDriver::Session::switchToWindow):
(WebDriver::Session::switchToFrame):
(WebDriver::Session::switchToParentFrame):

  • Session.h:
1:22 AM Changeset in webkit [219720] by Claudio Saavedra
  • 11 edits in trunk/LayoutTests

[GTK] Update test expectations after r219663

Unreviewed gardening

DOMException got its toString() removed so the output changes.

  • platform/gtk/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/aes-export-key-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/aes-import-key-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt:
  • platform/gtk/fast/mediastream/RTCPeerConnection-closed-state-expected.txt:
  • platform/gtk/fast/text/font-selection-font-loading-api-parse-expected.txt:
  • platform/gtk/http/tests/dom/document-attributes-null-handling-expected.txt:
12:40 AM Changeset in webkit [219719] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Update expectation file

Unreviewed gardening.

Drop XPathException after r219708.

  • platform/wpe/js/dom/global-constructors-attributes-expected.txt:
Note: See TracTimeline for information about the timeline view.