Timeline



Mar 26, 2017:

9:17 PM Changeset in webkit [214410] by fpizlo@apple.com
  • 11 edits
    4 adds in trunk/Source

B3::fixSSA should do liveness pruning
https://bugs.webkit.org/show_bug.cgi?id=170111

Reviewed by Saam Barati.

Source/JavaScriptCore:

This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to
create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi
construction.

This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile
times.

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

(JSC::B3::BasicBlock::get):

  • b3/B3FixSSA.cpp:

(JSC::B3::fixSSA):

  • b3/B3VariableLiveness.cpp: Added.

(JSC::B3::VariableLiveness::VariableLiveness):
(JSC::B3::VariableLiveness::~VariableLiveness):

  • b3/B3VariableLiveness.h: Added.

(JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter):
(JSC::B3::VariableLivenessAdapter::numIndices):
(JSC::B3::VariableLivenessAdapter::valueToIndex):
(JSC::B3::VariableLivenessAdapter::indexToValue):
(JSC::B3::VariableLivenessAdapter::blockSize):
(JSC::B3::VariableLivenessAdapter::forEachEarlyUse):
(JSC::B3::VariableLivenessAdapter::forEachLateUse):
(JSC::B3::VariableLivenessAdapter::forEachEarlyDef):
(JSC::B3::VariableLivenessAdapter::forEachLateDef):

  • b3/air/AirCFG.h: Added.

(JSC::B3::Air::CFG::CFG):
(JSC::B3::Air::CFG::root):
(JSC::B3::Air::CFG::newMap):
(JSC::B3::Air::CFG::successors):
(JSC::B3::Air::CFG::predecessors):
(JSC::B3::Air::CFG::index):
(JSC::B3::Air::CFG::node):
(JSC::B3::Air::CFG::numNodes):
(JSC::B3::Air::CFG::dump):

  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::Code):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::cfg):

  • b3/air/AirLiveness.h:

(JSC::B3::Air::LivenessAdapter::LivenessAdapter):
(JSC::B3::Air::LivenessAdapter::blockSize):
(JSC::B3::Air::LivenessAdapter::forEachEarlyUse):
(JSC::B3::Air::LivenessAdapter::forEachLateUse):
(JSC::B3::Air::LivenessAdapter::forEachEarlyDef):
(JSC::B3::Air::LivenessAdapter::forEachLateDef):
(JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter):
(JSC::B3::Air::TmpLivenessAdapter::numIndices):
(JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter):
(JSC::B3::Air::StackSlotLivenessAdapter::numIndices):
(JSC::B3::Air::StackSlotLivenessAdapter::indexToValue):
(JSC::B3::Air::Liveness::Liveness):
(JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::live): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted.
(JSC::B3::Air::Liveness::LocalCalc::execute): Deleted.
(JSC::B3::Air::Liveness::rawLiveAtHead): Deleted.
(JSC::B3::Air::Liveness::Iterable::Iterable): Deleted.
(JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted.
(JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted.
(JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted.
(JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted.
(JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted.
(JSC::B3::Air::Liveness::Iterable::begin): Deleted.
(JSC::B3::Air::Liveness::Iterable::end): Deleted.
(JSC::B3::Air::Liveness::Iterable::contains): Deleted.
(JSC::B3::Air::Liveness::liveAtHead): Deleted.
(JSC::B3::Air::Liveness::liveAtTail): Deleted.
(JSC::B3::Air::Liveness::workset): Deleted.

Source/WTF:

Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was
already fairly generic. It leverages the CFG concept so that it can understand many
different kinds of basic blocks. It doesn't try to understand the contents of basic
blocks; it just asks the adaptor for the block size and asks for the early/late
uses/defs of each thing in the block.

This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for
pruning. One of the new features is the Liveness::LiveAtHead nested class, which you
instantiate if you want to perform liveAtHead queries, which SSA construction wants to
do.

This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12

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

(WTF::Liveness::Liveness):
(WTF::Liveness::LocalCalc::LocalCalc):
(WTF::Liveness::LocalCalc::Iterable::Iterable):
(WTF::Liveness::LocalCalc::Iterable::iterator::iterator):
(WTF::Liveness::LocalCalc::Iterable::iterator::operator++):
(WTF::Liveness::LocalCalc::Iterable::iterator::operator*):
(WTF::Liveness::LocalCalc::Iterable::iterator::operator==):
(WTF::Liveness::LocalCalc::Iterable::iterator::operator!=):
(WTF::Liveness::LocalCalc::Iterable::begin):
(WTF::Liveness::LocalCalc::Iterable::end):
(WTF::Liveness::LocalCalc::Iterable::contains):
(WTF::Liveness::LocalCalc::live):
(WTF::Liveness::LocalCalc::isLive):
(WTF::Liveness::LocalCalc::execute):
(WTF::Liveness::rawLiveAtHead):
(WTF::Liveness::Iterable::Iterable):
(WTF::Liveness::Iterable::iterator::iterator):
(WTF::Liveness::Iterable::iterator::operator*):
(WTF::Liveness::Iterable::iterator::operator++):
(WTF::Liveness::Iterable::iterator::operator==):
(WTF::Liveness::Iterable::iterator::operator!=):
(WTF::Liveness::Iterable::begin):
(WTF::Liveness::Iterable::end):
(WTF::Liveness::Iterable::contains):
(WTF::Liveness::liveAtHead):
(WTF::Liveness::liveAtTail):
(WTF::Liveness::workset):
(WTF::Liveness::LiveAtHead::LiveAtHead):
(WTF::Liveness::LiveAtHead::isLiveAtHead):

3:11 PM Changeset in webkit [214409] by fpizlo@apple.com
  • 11 edits in trunk/Source

Air::Liveness shouldn't need HashSets
https://bugs.webkit.org/show_bug.cgi?id=170102

Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:


This converts Air::Liveness<> to no longer use HashSets or BitVectors. This turns out to be
easy because it's cheap enough to do a sorted merge of the things being added to liveAtHead and
the things in the predecessors' liveAtTail. This turns out to be faster - it's a 2% overall
compile time progression on WasmBench.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower): Add a FIXME unrelated to this patch.

  • b3/air/AirLiveness.h:

(JSC::B3::Air::AbstractLiveness::AbstractLiveness):
(JSC::B3::Air::AbstractLiveness::LocalCalc::LocalCalc):
(JSC::B3::Air::AbstractLiveness::rawLiveAtHead):
(JSC::B3::Air::AbstractLiveness::liveAtHead):
(JSC::B3::Air::AbstractLiveness::liveAtTail):

  • b3/air/AirTmp.h:

(JSC::B3::Air::Tmp::bank):
(JSC::B3::Air::Tmp::tmpIndex):

  • dfg/DFGStoreBarrierClusteringPhase.cpp:

Source/WTF:

  • wtf/IndexSparseSet.h: Add some helpers for a HashSet-free liveness analysis.

(WTF::IndexSparseSet::values):
(WTF::IndexSparseSet<OverflowHandler>::sort):

  • wtf/StdLibExtras.h:

(WTF::mergeDeduplicatedSorted): Rapidly merge two sorted lists that don't have duplicates to produce a new sorted list that doesn't have duplicates.

  • wtf/Vector.h:

(WTF::minCapacity>::uncheckedAppend): Inline this!
(WTF::removeRepeatedElements): This is a version of std::unique() that works naturally for Vectors.

2:39 PM Changeset in webkit [214408] by fpizlo@apple.com
  • 14 edits
    2 adds in trunk/Source

Air should use RegisterSet for RegLiveness
https://bugs.webkit.org/show_bug.cgi?id=170108

Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:


The biggest change here is the introduction of the new RegLiveness class. This is a
drop-in replacement for the old RegLiveness, which was a specialization of
AbstractLiveness<>, but it's about 30% faster. It gets its speed boost from just using
sets everywhere, which is efficient for registers since RegisterSet is just two (on
x86-64) or three 32-bit (on ARM64) statically allocated words. This looks like a 1%
compile time progression on WasmBench.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/B3TimingScope.cpp: Records phase timing totals.

(JSC::B3::TimingScope::TimingScope):
(JSC::B3::TimingScope::~TimingScope):

  • b3/B3TimingScope.h:
  • b3/air/AirAllocateRegistersByGraphColoring.cpp:

(JSC::B3::Air::allocateRegistersByGraphColoring):

  • b3/air/AirLiveness.h: Move code around and rename a bit to make it more like RegLiveness; in particular we want the iterator to be called iterator not Iterator, and we want it to be internal to its iterable. Also rename this template to Liveness, to match the header filename.

(JSC::B3::Air::Liveness::Liveness):
(JSC::B3::Air::Liveness::LocalCalc::LocalCalc):
(JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable):
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator):
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++):
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*):
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==):
(JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=):
(JSC::B3::Air::Liveness::LocalCalc::Iterable::begin):
(JSC::B3::Air::Liveness::LocalCalc::Iterable::end):
(JSC::B3::Air::Liveness::Iterable::Iterable):
(JSC::B3::Air::Liveness::Iterable::iterator::iterator):
(JSC::B3::Air::RegLivenessAdapter::RegLivenessAdapter): Deleted.
(JSC::B3::Air::RegLivenessAdapter::numIndices): Deleted.
(JSC::B3::Air::RegLivenessAdapter::acceptsBank): Deleted.
(JSC::B3::Air::RegLivenessAdapter::acceptsRole): Deleted.
(JSC::B3::Air::RegLivenessAdapter::valueToIndex): Deleted.
(JSC::B3::Air::RegLivenessAdapter::indexToValue): Deleted.
(JSC::B3::Air::AbstractLiveness::AbstractLiveness): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::LocalCalc): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterator::Iterator): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterator::operator++): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterator::operator*): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterator::operator==): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterator::operator!=): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterable::Iterable): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterable::begin): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterable::end): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::Iterable::contains): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::live): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::isLive): Deleted.
(JSC::B3::Air::AbstractLiveness::LocalCalc::execute): Deleted.
(JSC::B3::Air::AbstractLiveness::rawLiveAtHead): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::Iterable): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::iterator): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::operator*): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::operator++): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::operator==): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::iterator::operator!=): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::begin): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::end): Deleted.
(JSC::B3::Air::AbstractLiveness::Iterable::contains): Deleted.
(JSC::B3::Air::AbstractLiveness::liveAtHead): Deleted.
(JSC::B3::Air::AbstractLiveness::liveAtTail): Deleted.
(JSC::B3::Air::AbstractLiveness::workset): Deleted.

  • b3/air/AirLogRegisterPressure.cpp:
  • b3/air/AirLowerAfterRegAlloc.cpp:
  • b3/air/AirRegLiveness.cpp: Added.

(JSC::B3::Air::RegLiveness::RegLiveness):
(JSC::B3::Air::RegLiveness::~RegLiveness):
(JSC::B3::Air::RegLiveness::LocalCalc::execute):

  • b3/air/AirRegLiveness.h: Added.

(JSC::B3::Air::RegLiveness::LocalCalc::LocalCalc):
(JSC::B3::Air::RegLiveness::LocalCalc::live):
(JSC::B3::Air::RegLiveness::LocalCalc::isLive):
(JSC::B3::Air::RegLiveness::liveAtHead):
(JSC::B3::Air::RegLiveness::liveAtTail):

  • b3/air/AirReportUsedRegisters.cpp:
  • jit/RegisterSet.h:

(JSC::RegisterSet::add):
(JSC::RegisterSet::remove):
(JSC::RegisterSet::contains):
(JSC::RegisterSet::subsumes):
(JSC::RegisterSet::iterator::iterator):
(JSC::RegisterSet::iterator::operator*):
(JSC::RegisterSet::iterator::operator++):
(JSC::RegisterSet::iterator::operator==):
(JSC::RegisterSet::iterator::operator!=):
(JSC::RegisterSet::begin):
(JSC::RegisterSet::end):

Source/WTF:

  • wtf/Atomics.h:

(WTF::ensurePointer): This is a useful replacement for std::once, which requires less fencing.

  • wtf/Bitmap.h: Add more utilities.

(WTF::Bitmap::iterator::iterator): An iterator for set bits.
(WTF::Bitmap::iterator::operator*):
(WTF::Bitmap::iterator::operator++):
(WTF::Bitmap::iterator::operator==):
(WTF::Bitmap::iterator::operator!=):
(WTF::Bitmap::begin):
(WTF::Bitmap::end):
(WTF::WordType>::subsumes): a.subsumes(b) if all of b's set bits are set in a.
(WTF::WordType>::findBit): find next set or clear bit.

Mar 25, 2017:

8:52 PM Changeset in webkit [214407] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

REGRESSION(r214195): zillow.com header video doesn't resume when switching to another tab and back
https://bugs.webkit.org/show_bug.cgi?id=170080
<rdar://problem/31252522>

Reviewed by Eric Carlson.

The video header on zillow.com would pause when switching to another tab after r214195. On
switching back to the zillow.com tab, we would resume the video but fail to take the poster
away, making it look like the video is still paused.

We normally take the poster away when HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable()
is called. However, mediaPlayerFirstVideoFrameAvailable() was only ever called once because of
the m_haveReportedFirstVideoFrame flag in MediaPlayerPrivateAVFoundation::updateStates().
We now reset m_haveReportedFirstVideoFrame to false in updateStates() if hasAvailableVideoFrame()
return false, so that we call mediaPlayerFirstVideoFrameAvailable() again when the return
value of asAvailableVideoFrame() becomes true again (e.g. after the media session interruption
has ended).

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::updateStates):

5:53 PM Changeset in webkit [214406] by aestes@apple.com
  • 4 edits in trunk/Source/WebKit2

[iOS] Use snapshotting instead of printing to draw single-page PDFs
https://bugs.webkit.org/show_bug.cgi?id=170103
<rdar://problem/30542960>

Reviewed by Tim Horton.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::paintSnapshotAtSize): Moved the painting logic from WebPage::snapshotAtSize() to here.
(WebKit::WebPage::snapshotAtSize): Changed to call paintSnapshotAtSize() with the
WebImage's graphics context.
(WebKit::WebPage::pdfSnapshotAtSize): Created a CGPDFGraphicsContext, passed it to
paintSnapshotAtSize(), and returned the context's data.

  • WebProcess/WebPage/WebPage.h: Made snapshotAtSize() and snapshotNode() private, changed

their return values from PassRefPtr to RefPtr, and declared pdfSnapshotAtSize().

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::computePagesForPrintingAndDrawToPDF): If snapshotting the first page,
returned a page count of 1 and created a PDF using pdfSnapshotAtSize().

4:08 PM Changeset in webkit [214405] by BJ Burg
  • 10 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: number scripts are used inconsistently throughout the UI
https://bugs.webkit.org/show_bug.cgi?id=168290

Reviewed by Joseph Pecoraro.

Original patch by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js: Add new string for FPS bars.
  • UserInterface/Base/Utilities.js:

(value.d):
(value):
Localize %d formatted values by default. If that's not desired, then you need to stringify
the number outside of String.format and Number.abbreviate and pass it as %s instead.
Also add a global variable for zwsp (zero-width space) and use it in DataGridNode.

  • UserInterface/Views/ConsoleMessageView.js:

(WebInspector.ConsoleMessageView.prototype._renderRepeatCount): Abbreviate the repeat count,
and cause it to be localized.

  • UserInterface/Views/DataGridNode.js:

(WebInspector.DataGridNode.prototype.createCellContent):
If we don't know anything about a cell's data other than that it's a number,
run the number through toLocaleString().

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

Don't localize @%d tags for snapshot objects since this is not done elsewhere in the UI.

  • UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js: Localize integer version number.

(WebInspector.IndexedDatabaseDetailsSidebarPanel.prototype.layout):

  • UserInterface/Views/MemoryTimelineView.js:

(WebInspector.MemoryTimelineView.prototype._updateMaxComparisonLegend): Use Number.percentageString().

  • UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:

(WebInspector.RenderingFrameTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition):
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype._updateDividers):
Localize "%d fps" markers.

  • UserInterface/Views/TimelineOverview.js:

(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Localize frame label numbers.

2:19 PM Changeset in webkit [214404] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit2

Re-enable the web process' keychain access to fix client certificate authentication
https://bugs.webkit.org/show_bug.cgi?id=170074
<rdar://problem/31095987>

Reviewed by Brent Fulgham.

This is a follow-up patch to
https://trac.webkit.org/changeset/214389/webkit
since according to Alexey Proskuryakov, resource
loading has always required identical sandbox
rules in WebContent and Networking processes.

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

Reverted remaining change from
https://trac.webkit.org/changeset/208702/webkit and
https://trac.webkit.org/changeset/208707/webkit.

1:24 PM Changeset in webkit [214403] by Wenson Hsieh
  • 29 edits
    1 copy
    1 move in trunk/Source

[WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
https://bugs.webkit.org/show_bug.cgi?id=169168
<rdar://problem/30688374>

Reviewed by Tim Horton.

Source/WebCore:

Refactor client hooks for the drag destination action in WebCore to ask for the drag destination action mask
upon initializing the DragData. In DragController, rather than setting m_dragDestinationAction to the result of
m_client.actionMaskForDrag, we instead set it to the DragData's destination action.

Tests to come in a future patch.

  • loader/EmptyClients.cpp:
  • page/DragClient.h:

Rather than pass in a DragData, pass in only the platform data that we need to hand to the delegate. This is
because we now ask for drag destination actions prior to creating the DragData.

  • page/DragController.cpp:

(WebCore::DragController::dragEnteredOrUpdated):

Update the available drag destination actions in WebCore using the destination actions stored in DragData rather
than calling out to the client delegate.

  • loader/EmptyClients.cpp:
  • platform/DragData.cpp:

(WebCore::DragData::DragData):

  • platform/DragData.h:

(WebCore::DragData::dragDestinationAction):
(WebCore::DragData::operator =):

  • platform/mac/DragDataMac.mm:

(WebCore::DragData::DragData):

Source/WebKit:

See WebKit ChangeLog for more details. Renames WebDefaultUIDelegate.m => WebDefaultUIDelegate.mm.

  • WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Refactors WebDragClient::actionMaskForDrag to take platform data only, rather than the entire DragData. See the
WebCore ChangeLog entry for more details. Also renames WebDefaultUIDelegate.m to WebDefaultUIDelegate.mm, since
we need to import a C++ header for linkedOnOrAfter().

The default delegate implementation of webView:dragDestinationActionMaskForDraggingInfo: now checks if the current
application is linking against 10.12 or earlier, and if so, will allow any drag destination action instead of
the new default value of everything but DragDestinationActionLoad.

  • DefaultDelegates/WebDefaultUIDelegate.mm: Renamed from Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m.

(-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):

  • Misc/WebKitVersionChecks.h:
  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::actionMaskForDrag): Deleted.

  • WebView/WebView.mm:

(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):

Source/WebKit/win:

Minor tweak to adjust for a changed interface. See WebKit and WebCore ChangeLogs for more information.

  • WebCoreSupport/WebDragClient.cpp:

(WebDragClient::actionMaskForDrag):

  • WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Support customizing the set of allowed actions on drop in WebKit2 by introducing a new method to WKUIDelegatePrivate
that returns a WKDragDestinationAction given platform dragging info. These flags are then used to initialize the
DragData sent over to the web process, where they update DragController's view of the allowed destination actions.

Moving forward, the default action mask for WKWebViews will include everything except WKDragDestinationActionLoad,
though for applciations linked on or before 10.12, we will still default to WKDragDestinationActionAny to mitigate
any compatibility risk.

  • Shared/API/Cocoa/WKDragDestinationAction.h:

Introduce WK2 client-facing versions of WebCore::DragDestinationAction flags.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):

Serialize DragData's destination actions when sending DragData over IPC.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _web_dragDestinationActionForDraggingInfo:]):

For WKWebView, allow all drag destination actions except for loading (i.e. drop-to-navigate).

  • UIProcess/API/mac/WKView.mm:

(-[WKView _web_dragDestinationActionForDraggingInfo:]):

For WKView, allow all types of drag destination actions.

  • UIProcess/Cocoa/VersionChecks.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::draggingEntered):
(WebKit::WebViewImpl::draggingUpdated):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::actionMaskForDrag):

  • WebProcess/WebCoreSupport/WebDragClient.h:
12:43 PM Changeset in webkit [214402] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix wasm by returning after we do TLS.

Rubber stamped by Keith Miller.

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::storeWasmContext):

11:25 AM Changeset in webkit [214401] by ddkilzer@apple.com
  • 2 edits in trunk/Websites/bugs.webkit.org

[Bugzilla] Add a checkbox to add self to the CC list when creating or editing an attachment
<https://webkit.org/b/124047>

Original patch by Csaba Osztrogonác.

Reviewed by Daniel Bates.

  • template/en/default/attachment/reviewform.html.tmpl:

Add template for "Add me to CC list" by default. This
adds the reviewer to the CC list whether the "Preview"
or "Publish" button is used. Only the "Preview" button
allows the checkbox to be unchecked, though.

10:45 AM Changeset in webkit [214400] by commit-queue@webkit.org
  • 31 edits in trunk

AX: Media controls are unlabeled
https://bugs.webkit.org/show_bug.cgi?id=169947
<rdar://problem/30153323>

Patch by Aaron Chu <aaron_chu@apple.com> on 2017-03-25
Reviewed by Antoine Quint.

Source/WebCore:

Added a "label" property for Icons, which are used to set
the aria-label for the controls in modern media controls.

Test: Addition to all existing modern media controls tests.

  • English.lproj/modern-media-controls-localized-strings.js:
  • Modules/modern-media-controls/controls/icon-button.js:

(IconButton.prototype.set iconName):
(IconButton.prototype.handleEvent):
(IconButton.prototype._loadImage):

  • Modules/modern-media-controls/controls/icon-service.js:
  • Modules/modern-media-controls/controls/start-button.js:

(StartButton):

  • Modules/modern-media-controls/js-files:

LayoutTests:

  • media/modern-media-controls/airplay-button/airplay-button-expected.txt:
  • media/modern-media-controls/airplay-button/airplay-button.html:
  • media/modern-media-controls/forward-button/forward-button-expected.txt:
  • media/modern-media-controls/forward-button/forward-button.html:
  • media/modern-media-controls/fullscreen-button/fullscreen-button-expected.txt:
  • media/modern-media-controls/fullscreen-button/fullscreen-button.html:
  • media/modern-media-controls/icon-button/icon-button-expected.txt:
  • media/modern-media-controls/icon-button/icon-button.html:
  • media/modern-media-controls/icon-service/icon-service-expected.txt:
  • media/modern-media-controls/icon-service/icon-service.html:
  • media/modern-media-controls/mute-button/mute-button-expected.txt:
  • media/modern-media-controls/mute-button/mute-button.html:
  • media/modern-media-controls/pip-button/pip-button-expected.txt:
  • media/modern-media-controls/pip-button/pip-button.html:
  • media/modern-media-controls/play-pause-button/play-pause-button-expected.txt:
  • media/modern-media-controls/play-pause-button/play-pause-button.html:
  • media/modern-media-controls/rewind-button/rewind-button-expected.txt:
  • media/modern-media-controls/rewind-button/rewind-button.html:
  • media/modern-media-controls/skip-back-button/skip-back-button-expected.txt:
  • media/modern-media-controls/skip-back-button/skip-back-button.html:
  • media/modern-media-controls/start-button/start-button-expected.txt:
  • media/modern-media-controls/start-button/start-button.html:
  • media/modern-media-controls/tracks-button/tracks-button-expected.txt:
  • media/modern-media-controls/tracks-button/tracks-button.html:
7:44 AM Changeset in webkit [214399] by Jonathan Bedard
  • 3 edits
    1 move in trunk/Tools

webkitpy: Use generalized device instead of platform specific one
https://bugs.webkit.org/show_bug.cgi?id=170078

Reviewed by Daniel Bates.

SimulatedDevice is re-created each time 'xcrun simctl list' is called. Device
should remain persistent. Changing Device to a more explicit interface.
SimulatedDevice no longer inherits from Device and IOSSimulator returns Devices
wrapping SimulatedDevices.

  • Scripts/webkitpy/port/device.py: Added.

(Device):
(Device.init): Construct with platform device.
(Device.install_app): Install app at app path on platform device.
(Device.launch_app): Launch app with bundle ID on platform device.
(Device.poll): Poll platform device.
(Device.udid): Access platform device UDID.
(Device.nonzero): Check if instantiated with a valid platform device.
(Device.eq): Compare by udid.
(Device.ne): Ditto.
(Device.repr): Print out platform_device representation.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.init): Initialize the _device_map to an empty dictionary.
(IOSSimulatorPort._device_for_worker_number_map): Return self._device_map.
(IOSSimulatorPort._create_simulators): Call Simulator.managed_devices directly.
(IOSSimulatorPort._create_devices): Place Simulator.managed_devices into the
device map.
(IOSSimulatorPort._quit_ios_simulator): Reset self._device_map.

  • Scripts/webkitpy/xcode/device.py: Removed.
  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDevice):
(SimulatedDevice.init): Move host, name and did to SimulatedDevice.
(SimulatedDevice.eq): Compare two simulated devices.
(SimulatedDevice.ne): Ditto.
(SimulatedDevice.repr): Print name and udid.

1:35 AM Changeset in webkit [214398] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] No value returned from PrintCustomWidgetTest::createWebKitPrintOperation() in TestPrinting.cpp
https://bugs.webkit.org/show_bug.cgi?id=170059

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-03-25
Reviewed by Carlos Garcia Campos.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp: Use "void" as return type in the declaration,

the only use of the method in this same file ignores the returned value anyway.

1:20 AM Changeset in webkit [214397] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[XDG] MIMETypeRegistry::getMIMETypeForExtension should return a null/empty string when mime type is unknown
https://bugs.webkit.org/show_bug.cgi?id=170050

Reviewed by Michael Catanzaro.

That's what the callers expect, but we alre always returning XDG_MIME_TYPE_UNKNOWN which is
application/octet-stream.

Fixes: plugins/no-mime-with-valid-extension.html

  • platform/xdg/MIMETypeRegistryXdg.cpp:

(WebCore::MIMETypeRegistry::getMIMETypeForExtension):

1:19 AM Changeset in webkit [214396] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of several tests.

  • platform/gtk/TestExpectations:
12:42 AM Changeset in webkit [214395] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

Post-commit test fix after r214394
https://bugs.webkit.org/show_bug.cgi?id=170083

Unreviewed.

  • fast/text/variations/optical-sizing.html:

Mar 24, 2017:

11:50 PM Changeset in webkit [214394] by mmaxfield@apple.com
  • 9 edits
    3 copies
    1 add in trunk

Add font-optical-sizing to CSSComputedStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=170083

Reviewed by Joseph Pecoraro.

Source/WebCore:

Covered by existing tests.

  • css/CSSComputedStyleDeclaration.cpp:

LayoutTests:

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:
  • fast/text/variations/optical-sizing-expected.txt:
  • fast/text/variations/optical-sizing.html:
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-expected.txt: Added.
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Added.
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Added.
10:34 PM Changeset in webkit [214393] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add some instrumentation in Heap::resumeThePeriphery() to help debug an issue.
https://bugs.webkit.org/show_bug.cgi?id=170086
<rdar://problem/31253673>

Reviewed by Saam Barati.

Adding some instrumentation in Heap::resumeThePeriphery() to dump some Heap state
just before we RELEASE_ASSERT_NOT_REACHED.

  • heap/Heap.cpp:

(JSC::Heap::resumeThePeriphery):

6:13 PM Changeset in webkit [214392] by dbates@webkit.org
  • 6 edits in trunk/Source/WebCore

media/restore-from-page-cache.html causes NoEventDispatchAssertion::isEventAllowedInMainThread() assertion failure
https://bugs.webkit.org/show_bug.cgi?id=170087
<rdar://problem/31254822>

Reviewed by Simon Fraser.

Reduce the scope of code that should never dispatch DOM events so as to allow updating contents size
after restoring a page from the page cache.

In r214014 we instantiate a NoEventDispatchAssertion in FrameLoader::commitProvisionalLoad()
around the call to CachedPage::restore() to assert when a DOM event is dispatched during
page restoration as such events can cause re-entrancy into the page cache. As it turns out
it is sufficient to ensure that no DOM events are dispatched after restoring all cached frames
as opposed to after CachedPage::restore() returns.

Also rename Document::enqueue{Pageshow, Popstate}Event() to dispatch{Pageshow, Popstate}Event(),
respectively, since they synchronously dispatch events :(. We hope in the future to make them
asynchronously dispatch events.

  • dom/Document.cpp:

(WebCore::Document::implicitClose): Update for renaming.
(WebCore::Document::statePopped): Ditto.
(WebCore::Document::dispatchPageshowEvent): Renamed; formerly named enqueuePageshowEvent().
(WebCore::Document::dispatchPopstateEvent): Renamed; formerly named enqueuePopstateEvent().
(WebCore::Document::enqueuePageshowEvent): Deleted.
(WebCore::Document::enqueuePopstateEvent): Deleted.

  • dom/Document.h:
  • history/CachedPage.cpp:

(WebCore::firePageShowAndPopStateEvents): Moved logic from FrameLoader::didRestoreFromCachedPage() to here.
(WebCore::CachedPage::restore): Modified to call firePageShowAndPopStateEvents().

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad): Removed use of NoEventDispatchAssertion RAII object. We
will instantiate it in CachedPage::restore() with a smaller scope.
(WebCore::FrameLoader::didRestoreFromCachedPage): Deleted; moved logic from here to WebCore::firePageShowAndPopStateEvents().

  • loader/FrameLoader.h:
6:04 PM Changeset in webkit [214391] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

[iOS WK2] Move from a pre-commit handler to dispatch_async for visible content rect updates
https://bugs.webkit.org/show_bug.cgi?id=170091
rdar://problem/30682584

Reviewed by Tim Horton.

[CATransaction addCommitHandler:forPhase:] is sometimes not called when running inside another
commit callback (rdar://problem/31253952), and we don't yet have a reliable way to detect this.

So dispatch_async() to postpone the call to [CATransaction addCommitHandler:forPhase:] to a known-
good time.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):

5:39 PM Changeset in webkit [214390] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Consolidate TestExpectations for media/restore-from-page-cache.html.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:12 PM Changeset in webkit [214389] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit2

Re-enable the network process' keychain access to fix client certificate authentication
https://bugs.webkit.org/show_bug.cgi?id=170074
<rdar://problem/31095987>

Reviewed by Brent Fulgham.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

Reverted remaining change from
https://trac.webkit.org/changeset/208702/webkit and
https://trac.webkit.org/changeset/208707/webkit.

5:10 PM Changeset in webkit [214388] by Ryan Haddad
  • 15 edits
    2 deletes in trunk

Unreviewed, rolling out r214361.

This change caused flakiness in http/tests/preload tests.

Reverted changeset:

"Add a warning for unused link preloads."
https://bugs.webkit.org/show_bug.cgi?id=165670
http://trac.webkit.org/changeset/214361

4:43 PM Changeset in webkit [214387] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Adding a WebSocket message may change the currently selected resource
https://bugs.webkit.org/show_bug.cgi?id=170036
<rdar://problem/31231463>

Reviewed by Joseph Pecoraro.

Calling increaseSize on a resource may cause a WebInspector.TimelineDataGrid#TimelineDataGrid#_refreshDirtyDataGridNodes call.
Make sure _refreshDirtyDataGridNodes preserves selection of a treeElement.

  • UserInterface/Views/TimelineDataGrid.js:

(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
Re-attaching treeElement causes it to lose selection. Select it again after re-attaching.

4:32 PM Changeset in webkit [214386] by graouts@webkit.org
  • 9 edits
    2 moves
    2 adds in trunk

[Modern Media Controls] Remove placard icon if height is compressed
https://bugs.webkit.org/show_bug.cgi?id=167935
<rdar://problem/30397128>

Reviewed by Dean Jackson.

Source/WebCore:

We make the addition of certain Placard children conditional on the placard's metrics. Whenever the
media controls metrics changes, the placard, if any, is set to have the same metrics and layout() is
called where we ensure that there is enough space, per designs, to have the icon, description and even
the title visible. We also make some CSS improvements to guarantee that the description is laid out on
two lines at most and that both text labels are trimmed elegantly with an ellipsis shold the width be
insufficient to display the whole text.

Since we would have needed to have more width/height setter overrides to trigger layout, we now make
LayoutNode trigger layout() directly and remove the need for subclasses to do this on a per-class basis.
We also make layout() a method that can be called safely anytime as it's now no longer part of the DOM
commit step, a new commit() method is used instead of that.

Tests: media/modern-media-controls/layout-node/node-made-dirty-during-commit.html

media/modern-media-controls/media-controls/media-controls-placard-compressed-metrics.html

  • Modules/modern-media-controls/controls/layout-node.js:

(LayoutNode.prototype.set width):
(LayoutNode.prototype.set height):
Trigger a call to layout() anytime "width" or "height" is set on any LayoutNode.

(LayoutNode.prototype.layout):
(LayoutNode.prototype.commit):
(performScheduledLayout):
Make layout() an empty method that subclasses can override easily outside of the DOM commit cycle,
its previous implementation is now called "commit()" which is a more accurate name.

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

(MediaControls.prototype.get placard):
(MediaControls.prototype.get showsPlacard):
(MediaControls.prototype.showPlacard):
(MediaControls.prototype.hidePlacard):
(MediaControls.prototype.layout):
(MediaControls.prototype.get width): Deleted.
(MediaControls.prototype.set width): Deleted.
Add a "placard" property to make it simpler to reference the placard instead of making assumptions in
several places in that class on the children order. Anytime we run a layout or show the placard, ensure
that the placard metrics are synced with the media controls metrics.

  • Modules/modern-media-controls/controls/placard.css:

(.placard .container):
(.placard .title,):
(.placard .description):
We now ensure that both the title and description are trimmed with an ellipsis when we run out of space
to display them fully.

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

(Placard.):
(Placard.prototype.layout):
We add new constraints to only show the icon, title and description if the placard is tall and wide enough.

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

(Slider.prototype.get width): Deleted.
(Slider.prototype.set width): Deleted.
Removed custom "width" getters and setters now we can just override layout() in case node metrics change.

  • Modules/modern-media-controls/controls/time-control.js:

(TimeControl.prototype.set useSixDigitsForTimeLabels):
(TimeControl.prototype.layout):
(TimeControl.prototype.get width): Deleted.
(TimeControl.prototype.set width): Deleted.
(TimeControl.prototype._availableWidthHasChanged): Deleted.
Removed custom "width" getters and setters now we can just override layout() in case node metrics change.

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

(MediaController):
Ensure we flush pending updates at construction time so that we match the size of the media controls right
at the first media layout.

LayoutTests:

We add a new test to check that the various designed constraints to toggle display of a placard's
icon, title and description are honored. Also, due to the old layout() method now being called
"commit()", we refactor a relevant test.

  • media/modern-media-controls/layout-node/node-made-dirty-during-commit-expected.txt: Added.
  • media/modern-media-controls/layout-node/node-made-dirty-during-commit.html: Added.
  • media/modern-media-controls/media-controls/media-controls-placard-compressed-metrics-expected.txt: Added.
  • media/modern-media-controls/media-controls/media-controls-placard-compressed-metrics.html: Added.
4:27 PM Changeset in webkit [214385] by eric.carlson@apple.com
  • 16 edits in trunk

[MediaStream] "ideal" constraints passed to getUserMedia should affect fitness score
https://bugs.webkit.org/show_bug.cgi?id=170056

Reviewed by Youenn Fablet.

Source/WebCore:

Include the fitness score calculated for ideal constraints in the calculation of a capture
overall device fitness score.

No new tests, existing tests updated.

  • platform/mediastream/MediaConstraints.cpp:

(WebCore::StringConstraint::fitnessDistance): Drive-by fix: return early if ideal is empty,
not exact.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::supportsSizeAndFrameRate): Return fitness distance.
(WebCore::RealtimeMediaSource::selectSettings): Include the fitness distance of supported
ideal constraints.
(WebCore::RealtimeMediaSource::supportsConstraint): New.
(WebCore::RealtimeMediaSource::applyConstraints):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Sort candidate sources
by their fitness score.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::initializeCapabilities): Each video source should support
one facing mode, not both.

Source/WebKit2:

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): When
short-circuiting the user prompt because the page is already authorized, return the first
audio and/or video device because so the page gets the one with the best fitness distance.

LayoutTests:

  • fast/mediastream/MediaStream-video-element-displays-buffer-expected.txt:
  • fast/mediastream/MediaStream-video-element-displays-buffer.html:
  • fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt:
  • fast/mediastream/apply-constraints-advanced-expected.txt:
  • fast/mediastream/apply-constraints-advanced.html:
  • fast/mediastream/apply-constraints-video-expected.txt:
  • fast/mediastream/apply-constraints-video.html:
4:25 PM Changeset in webkit [214384] by jfbastien@apple.com
  • 22 edits
    3 copies in trunk/Source

WebAssembly: store state in TLS instead of on VM
https://bugs.webkit.org/show_bug.cgi?id=169611

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Using thread-local storage instead of VM makes code more position
independent. We used to store the WebAssembly top Instance (the
latest one in the call stack) on VM, now we instead store it in
TLS. This top Instance is used to access a bunch of state such as
Memory location, size, table (for call_indirect), etc.

Instead of calling it "top", which is confusing, we now just call
it WasmContext.

Making the code PIC means future patches will be able to
postMessage and structured clone into IDB without having to
recompile the code. This wasn't possible before because we
hard-coded the address of VM at compilation time. That doesn't
work between workers, and doesn't work across reloads (which IDB
is intended to do).

It'll also potentially make code faster once we start tuning
what's in TLS, what's in which of the 4 free slots, and what's in
pinned registers. I'm leaving this tuning for later because
there's lower lying fruit for us to pick.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/AbstractMacroAssembler.h:
  • assembler/AllowMacroScratchRegisterUsageIf.h: Copied from assembler/AllowMacroScratchRegisterUsage.h.

(JSC::AllowMacroScratchRegisterUsageIf::AllowMacroScratchRegisterUsageIf):
(JSC::AllowMacroScratchRegisterUsageIf::~AllowMacroScratchRegisterUsageIf):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::storeToTLSPtr): we previously didn't have
the code required to store to TLS, only to load

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::loadFromTLSPtrNeedsMacroScratchRegister):
(JSC::MacroAssemblerARM64::storeToTLS32):
(JSC::MacroAssemblerARM64::storeToTLS64):
(JSC::MacroAssemblerARM64::storeToTLSPtrNeedsMacroScratchRegister):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::loadFromTLSPtrNeedsMacroScratchRegister):
(JSC::MacroAssemblerX86Common::storeToTLS32):
(JSC::MacroAssemblerX86Common::storeToTLSPtrNeedsMacroScratchRegister):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::loadFromTLS64): was loading 32-bit instead of 64-bit
(JSC::MacroAssemblerX86_64::storeToTLS64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::movl_rm):
(JSC::X86Assembler::movq_rm):

  • b3/testb3.cpp:

(JSC::B3::testFastTLSLoad):
(JSC::B3::testFastTLSStore):
(JSC::B3::run):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::loadWasmContext):
(JSC::AssemblyHelpers::storeWasmContext):
(JSC::AssemblyHelpers::loadWasmContextNeedsMacroScratchRegister):
(JSC::AssemblyHelpers::storeWasmContextNeedsMacroScratchRegister):

  • jit/Repatch.cpp:

(JSC::webAssemblyOwner):

  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromWasmThunkGenerator):

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

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::loadWasmContext):
(JSC::Wasm::storeWasmContext):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::getMemoryBaseAndSize):
(JSC::Wasm::restoreWebAssemblyGlobalState):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::materializeImportJSCell):
(JSC::Wasm::wasmToJs):
(JSC::Wasm::wasmToWasm):

  • wasm/WasmContext.cpp: Added.

(JSC::loadWasmContext):
(JSC::storeWasmContext):

  • wasm/WasmContext.h: Added. Replaces "top" JSWebAssemblyInstance.
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/js/WebAssemblyInstanceConstructor.h:

Source/WTF:

  • wtf/FastTLS.h: reserve one key for WebAssembly, delete a bunch

of dead code which clang couldn't compile (it's valid GCC assembly
which LLVM dislikes).

4:16 PM Changeset in webkit [214383] by dino@apple.com
  • 5 edits in trunk

Serialization of custom props in longhand should be "" not value of shorthand
https://bugs.webkit.org/show_bug.cgi?id=167699
<rdar://problem/30324200>

Reviewed by Sam Weinig.

Source/WebCore:

https://www.w3.org/TR/css-variables/#variables-in-shorthands says
"Pending-substitution values must be serialized as the empty string, if
an API allows them to be observed."

We were returning the cssText instead.

Test: fast/css/variables/rule-property-get.html has been updated.

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue): Return the empty string
if we're a pending substitution value.

LayoutTests:

  • fast/css/variables/rule-property-get-expected.html:
  • fast/css/variables/rule-property-get.html:
4:09 PM Changeset in webkit [214382] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the ToT build on the latest SDK.

Add deprecated declaration guards around two synchronous UIItemProvider methods in WebItemProviderPasteboard.
<rdar://problem/30451096> tracks adoption of the asynchronous versions of these methods.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard _tryToCreateAndAppendObjectOfClass:toArray:usingProvider:]):

3:10 PM Changeset in webkit [214381] by graouts@webkit.org
  • 11 edits
    2 adds in trunk

[Modern Media Controls] Captions don't move with the appearance of the inline controls
https://bugs.webkit.org/show_bug.cgi?id=170051
<rdar://problem/30754428>

Reviewed by Dean Jackson.

Source/WebCore:

We now size the captions container to account for the controls bar height when visible. To do this,
we use CSS variables to specify the height of the controls bar in default inline mode, compact inline
mode and fullscreen mode.

Test: media/modern-media-controls/tracks-support/tracks-support-captions-offset-with-controls-bar.html

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

(ControlsBar.prototype.set faded):
Notify the hosting MediaControls that the "faded" property changed.

  • Modules/modern-media-controls/controls/ios-inline-media-controls.css:

(.media-controls.ios.inline > .controls-bar):
Use the new --inline-controls-bar-height CSS variable to specify the inline bar height.

  • Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css:

(.media-controls.mac.inline.compact > .controls-bar):
Use the new --inline-compact-controls-bar-height CSS variable to specify the inline bar height.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen > .controls-bar):
Use the new --fullscreen-controls-bar-height CSS variable to specify the inline bar height.

  • Modules/modern-media-controls/controls/macos-inline-media-controls.css:

(.media-controls.mac.inline > .controls-bar):
Use the new --inline-controls-bar-height CSS variable to specify the inline bar height.

  • Modules/modern-media-controls/controls/media-controls.css:

(*):
Specify new CSS variables for the various controls bar heights.

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

(MediaControls.prototype.controlsBarFadedStateDidChange):
Notify the delegate of a controls bar "faded" property change.

  • Modules/modern-media-controls/controls/text-tracks.css:

(video::-webkit-media-text-track-container):
(video::-webkit-media-text-track-container.visible-controls-bar):
(video::-webkit-media-text-track-container.visible-controls-bar.compact-controls-bar):
(video::-webkit-media-text-track-display):
Shorten the height of the captions container when the controls bar is visible. We also
fix a couple of prefixed properties that didn't need to be.

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

(MediaController.prototype.controlsBarFadedStateDidChange):
(MediaController.prototype._updateControlsIfNeeded):
(MediaController.prototype._updateTextTracksClassList):
(MediaController):
Ensure we reflect the "faded" state of the controls bar on the captions container using
a CSS class, as well as whether the controls bar mode is compact.

LayoutTests:

Add a new test, which would have previously failed, where we check that we account for the controls bar height
when showing captions with the controls bar visible.

  • media/modern-media-controls/tracks-support/tracks-support-captions-offset-with-controls-bar-expected.txt: Added.
  • media/modern-media-controls/tracks-support/tracks-support-captions-offset-with-controls-bar.html: Added.
3:09 PM Changeset in webkit [214380] by jfbastien@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

WebAssembly: spec-tests/memory.wast.js fails in debug
https://bugs.webkit.org/show_bug.cgi?id=169794

Reviewed by Keith Miller.

The failure was due to empty memories (with maximum size 0). Those
only occur in tests and in code that's trying to trip us. This
patch adds memory mode "none" which represents no memory. It can
work with either bounds checked or signaling code because it never
contains loads and stores.

The spec tests which were failing did the following:

(module (memory (data)) (func (export "memsize") (result i32) (current_memory)))
(assert_return (invoke "memsize") (i32.const 0))
(module (memory (data "")) (func (export "memsize") (result i32) (current_memory)))
(assert_return (invoke "memsize") (i32.const 0))
(module (memory (data "x")) (func (export "memsize") (result i32) (current_memory)))
(assert_return (invoke "memsize") (i32.const 1))

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::memoryKind):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::tryGetFastMemory):
(JSC::Wasm::releaseFastMemory):
(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::createImpl):
(JSC::Wasm::Memory::create):
(JSC::Wasm::Memory::grow):
(JSC::Wasm::Memory::makeString):

  • wasm/WasmMemory.h:
  • wasm/WasmMemoryInformation.cpp:

(JSC::Wasm::MemoryInformation::MemoryInformation):

  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::isSafeToRun):

  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::codeBlock):
(JSC::JSWebAssemblyModule::finishCreation):

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::codeBlock):
(JSC::JSWebAssemblyModule::codeBlockFor):

2:57 PM Changeset in webkit [214379] by Simon Fraser
  • 4 edits in trunk/Source/WebKit2

Make UI-side compositing on macOS a bit more usable
https://bugs.webkit.org/show_bug.cgi?id=170073

Reviewed by Tim Horton.

Mach port as layer contents doesn't work on macOS, so don't use it there.

Also remove two assertions that hit with UI-side compositing in MiniBrowser.

  • UIProcess/DrawingAreaProxy.cpp:

(WebKit::DrawingAreaProxy::createFence):

  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/mac/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::updateLayerTree):

2:46 PM Changeset in webkit [214378] by Brent Fulgham
  • 9 edits
    11 copies in trunk

Handle recursive calls to ProcessingInstruction::checkStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=169982
<rdar://problem/31083051>

Reviewed by Antti Koivisto.

Source/WebCore:

See if we triggered a recursive load of the stylesheet during the 'beforeload'
event handler. If so, reset to a valid state before completing the load.

We should also check after 'beforeload' that we were not disconnected from (or
moved to a new) document.

I also looked for other cases of this pattern and fixed them, too.

Tests: fast/dom/beforeload/image-removed-during-before-load.html
fast/dom/beforeload/recursive-css-pi-before-load.html
fast/dom/beforeload/recursive-link-before-load.html
fast/dom/beforeload/recursive-xsl-pi-before-load.html

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::clearExistingCachedSheet): Added.
(WebCore::ProcessingInstruction::checkStyleSheet): Prevent recursive calls into
this function during 'beforeload' handling. Also, safely handle the case where
the element was disconnected in the 'beforeload' handler (similar to what
we do in HTMLLinkElement).
(WebCore::ProcessingInstruction::setCSSStyleSheet): Drive-by Fix: Protect the
current document to match what we do in setXSLStyleSheet.

  • dom/ProcessingInstruction.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process): Prevent recursive calls into
this function during 'beforeload' handling.

  • html/HTMLLinkElement.h:
  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): safely handle the case where
the element was disconnected in the 'beforeload' handler (similar to what
we do in HTMLLinkElement).

  • style/StyleScope.cpp:

(WebCore::Style::Scope::hasPendingSheet): Added.

  • style/StyleScope.h:

LayoutTests:

  • fast/dom/beforeload/image-removed-during-before-load-expected.txt: Copied from LayoutTests/fast/dom/beforeload/image-removed-during-before-load-expected.txt.
  • fast/dom/beforeload/image-removed-during-before-load.html: Copied from LayoutTests/fast/dom/beforeload/image-removed-during-before-load.html.
  • fast/dom/beforeload/recursive-css-pi-before-load-expected.txt: Copied from LayoutTests/fast/dom/beforeload/recursive-css-pi-before-load-expected.txt.
  • fast/dom/beforeload/recursive-css-pi-before-load.html: Copied from LayoutTests/fast/dom/beforeload/recursive-css-pi-before-load.html.
  • fast/dom/beforeload/recursive-link-before-load-expected.txt: Copied from LayoutTests/fast/dom/beforeload/recursive-link-before-load-expected.txt.
  • fast/dom/beforeload/recursive-link-before-load.html: Copied from LayoutTests/fast/dom/beforeload/recursive-link-before-load.html.
  • fast/dom/beforeload/recursive-xsl-pi-before-load-expected.txt: Copied from LayoutTests/fast/dom/beforeload/recursive-xsl-pi-before-load-expected.txt.
  • fast/dom/beforeload/recursive-xsl-pi-before-load.html: Copied from LayoutTests/fast/dom/beforeload/recursive-xsl-pi-before-load.html.
  • fast/dom/beforeload/resources/content.xhtml: Copied from LayoutTests/fast/dom/beforeload/resources/content.xhtml.
  • fast/dom/beforeload/resources/pass.css: Copied from LayoutTests/fast/dom/beforeload/resources/pass.css.
  • fast/dom/beforeload/resources/test.xsl: Copied from LayoutTests/fast/dom/beforeload/resources/test.xsl.
2:23 PM Changeset in webkit [214377] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

webkitpy should be able to run API tests
https://bugs.webkit.org/show_bug.cgi?id=170028

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-03-24
Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/config/ports.py:

(DeprecatedPort.run_api_tests_command): Added.

  • Scripts/webkitpy/port/base.py:

(Port.api_results_directory): Added.

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

(RunTests.run): Check if we should be running API tests.
(RunTests._run_api_tests): Generate script to run API tests with json output.

  • Scripts/webkitpy/tool/steps/steps_unittest.py: Unit tests.
2:14 PM Changeset in webkit [214376] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix assertions after r214358.
https://bugs.webkit.org/show_bug.cgi?id=169167

  • UIProcess/API/APIContentExtensionStore.cpp:

(API::ContentExtensionStore::compileContentExtension):
AtomicString::init must be called for the first time from the main thread.
We were calling it for the first time from a non-main thread sometimes.
Call it from the main thread before initiating compiling on another thread.

2:13 PM Changeset in webkit [214375] by beidson@apple.com
  • 7 edits
    5 adds in trunk

A null compound index value crashes the Databases process.
<rdar://problem/30499831> and https://bugs.webkit.org/show_bug.cgi?id=170000

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/single-entry-index-invalid-key-crash.html

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::createKeyPathArray): Fix the bug by rejecting arrays with any invalid keys in them.

Add some logging:

  • Modules/indexeddb/IDBKeyPath.cpp:

(WebCore::loggingString):

  • Modules/indexeddb/IDBKeyPath.h:
  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::createIndex):

  • Modules/indexeddb/shared/IDBIndexInfo.cpp:

(WebCore::IDBIndexInfo::loggingString):

LayoutTests:

  • storage/indexeddb/modern/resources/single-entry-index-invalid-key-crash.js: Added.
  • storage/indexeddb/modern/single-entry-index-invalid-key-crash-expected.txt: Added.
  • storage/indexeddb/modern/single-entry-index-invalid-key-crash-private-expected.txt: Added.
  • storage/indexeddb/modern/single-entry-index-invalid-key-crash-private.html: Added.
  • storage/indexeddb/modern/single-entry-index-invalid-key-crash.html: Added.
1:56 PM Changeset in webkit [214374] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Array memcpy'ing fast paths should check if we're having a bad time if they cannot handle it.
https://bugs.webkit.org/show_bug.cgi?id=170064
<rdar://problem/31246098>

Reviewed by Geoffrey Garen.

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoPrivateFuncConcatMemcpy):

  • runtime/JSArray.cpp:

(JSC::JSArray::fastSlice):

1:51 PM Changeset in webkit [214373] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip svg/animations/animations-paused-when-inserted-in-hidden-document* tests on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=170068

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
1:51 PM Changeset in webkit [214372] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add JSON results for API tests
https://bugs.webkit.org/show_bug.cgi?id=170021

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-03-24
Reviewed by Alexey Proskuryakov.

  • Scripts/run-api-tests:

(runTestsBySuite): Appends failures and timeouts to JSON data.
(writeJsonDataIfApplicable): Writes JSON data to a file.

1:46 PM Changeset in webkit [214371] by webkit@devinrousso.com
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: add context menu item to log content of WebSocket frame
https://bugs.webkit.org/show_bug.cgi?id=169945

Reviewed by Joseph Pecoraro.

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

(WebInspector.WebSocketContentView):
(WebInspector.WebSocketContentView.prototype.addFrame):
(WebInspector.WebSocketContentView.prototype._addRow):
Rework the way CSS classes are applied so the isOutgoing and isText flags can also be passed
to the WebSocketDataGridNode. This is necessary because a non-text frame shouldn't be able
to be logged to the console.

  • UserInterface/Views/WebSocketDataGridNode.js:

(WebInspector.WebSocketDataGridNode.prototype.appendContextMenuItems):

1:45 PM Changeset in webkit [214370] by Ryan Haddad
  • 3 edits in trunk/Source/WTF

Unreviewed, rolling out r214351.

This change caused API test
WebKit1.DidCreateJavaScriptContextBackForwardCacheTest to
fail.

Reverted changeset:

"Make inactive web processes behave as though under memory
pressure."
https://bugs.webkit.org/show_bug.cgi?id=170042
http://trac.webkit.org/changeset/214351

1:39 PM Changeset in webkit [214369] by Ryan Haddad
  • 10 edits
    11 deletes in trunk

Unreviewed, rolling out r214360.

This change caused 20+ LayoutTest failures.

Reverted changeset:

"Handle recursive calls to
ProcessingInstruction::checkStyleSheet"
https://bugs.webkit.org/show_bug.cgi?id=169982
http://trac.webkit.org/changeset/214360

12:43 PM Changeset in webkit [214368] by commit-queue@webkit.org
  • 4 edits in trunk

Add support for qpSum in WebRTC stats
https://bugs.webkit.org/show_bug.cgi?id=170060

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-24
Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::fillRTCRTPStreamStats): exposing libwebrtc qpSum value.

LayoutTests:

  • webrtc/video-stats.html:
12:41 PM Changeset in webkit [214367] by Lucas Forschler
  • 2 edits in trunk/Tools

update committer_auth.py to be python 2.7 compliant
https://bugs.webkit.org/show_bug.cgi?id=170063

Reviewed by Alexey Proskuryakov.

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

(CommitterAuth.authenticate):

convert e.message to e.args[0]

12:36 PM Changeset in webkit [214366] by webkit@devinrousso.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: allow users to click links in inline/user-agent styles
https://bugs.webkit.org/show_bug.cgi?id=170054

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor.prototype.set style):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateJumpToSymbolTrackingMode):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
Always enable the token tracking controller, but only act on hovered/clicked token if it is
a link or the owner style declaration has a source code location (for jumping to the Resource).

12:34 PM Changeset in webkit [214365] by dbates@webkit.org
  • 6 edits
    2 adds in trunk

Prevent new navigations during document unload
https://bugs.webkit.org/show_bug.cgi?id=169934
<rdar://problem/31247584>

Reviewed by Chris Dumez.

Source/WebCore:

Similar to our policy of preventing new navigations from onbeforeunload handlers
we should prevent new navigations that are initiated during the document unload
process.

The significant part of this change is the instantiation of the RAII object NavigationDisabler
in Document::prepareForDestruction(). The rest of this change just renames class
NavigationDisablerForBeforeUnload to NavigationDisabler now that this RAII class is
used to prevent navigation from both onbeforeunload event handlers and when unloading
a document.

Test: fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html

  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction): Disable new navigations when disconnecting
subframes. Also assert that the document is not in the page cache before we fall off
the end of the function.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::isNavigationAllowed): Update for renaming below.
(WebCore::FrameLoader::shouldClose): Ditto.

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::shouldScheduleNavigation): Ditto.

  • loader/NavigationScheduler.h:

(WebCore::NavigationDisabler::NavigationDisabler): Renamed class; formerly named NavigationDisablerForBeforeUnload.
(WebCore::NavigationDisabler::~NavigationDisabler): Ditto.
(WebCore::NavigationDisabler::isNavigationAllowed): Ditto.
(WebCore::NavigationDisablerForBeforeUnload::NavigationDisablerForBeforeUnload): Deleted.
(WebCore::NavigationDisablerForBeforeUnload::~NavigationDisablerForBeforeUnload): Deleted.
(WebCore::NavigationDisablerForBeforeUnload::isNavigationAllowed): Deleted.

LayoutTests:

Add a test to ensure that we do not cause an assertion fail when calling setTimeout
after starting a navigation from an onunload event handler.

  • fast/frames/frame-unload-navigate-and-setTimeout-assert-fail-expected.txt: Added.
  • fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html: Added.
12:01 PM Changeset in webkit [214364] by mmaxfield@apple.com
  • 12 edits
    2 adds in trunk

Implement font-optical-sizing
https://bugs.webkit.org/show_bug.cgi?id=168895

Reviewed by Dean Jackson.

Source/WebCore:

Upon advice from Microsoft, the only input to optical sizing is just the
font-size computed value. It is implemented by setting the 'opsz' font
variation axis. Because the propery has such a simple grammar, the
implementation is quite straightforward.

Test: fast/text/variations/optical-sizing.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator FontOpticalSizing):

  • css/CSSProperties.json:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • platform/graphics/FontCache.h:

(WebCore::FontDescriptionKey::makeFlagsKey):

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::opticalSizing):
(WebCore::FontDescription::setOpticalSizing):
(WebCore::FontDescription::operator==):
(WebCore::FontCascadeDescription::initialOpticalSizing):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):
(WebCore::fontWithFamily):
(WebCore::FontCache::createFontPlatformData):
(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

  • platform/text/TextFlags.h:

LayoutTests:

  • fast/text/variations/optical-sizing-expected.txt: Added.
  • fast/text/variations/optical-sizing.html: Added.
12:01 PM Changeset in webkit [214363] by commit-queue@webkit.org
  • 1 edit
    3 adds in trunk/Tools

webkitpy: Parse JSON results from run-api-tests
https://bugs.webkit.org/show_bug.cgi?id=170062

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-03-24
Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/net/apitestresults.py: Added.

(APITestResults): Structure to represent API test results.
(APITestResults.init):
(APITestResults.intersection): Return the failures common to both sets of results.
(APITestResults.results_from_string): Create an APITestResults object from a JSON results string.
(APITestResults.equals): Return True if both results were the same.
(APITestResults.is_subset): Return True if failing tests are a subset of the other failing tests.
(APITestResults.all_passed): Return True if everything passed.
(APITestResults.failing_tests): List of tests that didn't pass.
(APITestResults.did_exceed_test_failure_limit): Always False.

  • Scripts/webkitpy/common/net/apitestresults_unittest.py: Added.

(APITestResultsTest): Unit tests.

  • Scripts/webkitpy/tool/bot/apitestresultsreader.py: Added.

(APITestResultsReader): Read contents of JSON results file.

11:56 AM Changeset in webkit [214362] by Chris Dumez
  • 7 edits
    1 copy in trunk/Source

Unreviewed, rolling out r214329.

Significantly regressed Speedometer

Reverted changeset:

"window.crypto.getRandomValues() uses the insecure RC4 RNG"
https://bugs.webkit.org/show_bug.cgi?id=169623
http://trac.webkit.org/changeset/214329

11:41 AM Changeset in webkit [214361] by yoav@yoav.ws
  • 15 edits
    2 adds in trunk

Add a warning for unused link preloads.
https://bugs.webkit.org/show_bug.cgi?id=165670

Reviewed by Youenn Fablet.

Source/WebCore:

This patch adds a warning message, to warn developers that are using
link preloads in cases where the downloaded resource is likely to
remain unused.

Test: http/tests/preload/unused_preload_warning.html

  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction): Stop the timer once the document is destructed.

  • loader/LinkPreloadResourceClients.h: Add shouldMarkAsReferenced overides for the LinkPreloadResourceClient classes.
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::addClientToSet): Make sure LinkPreloadResourceClients don't set resource to be referenced.

  • loader/cache/CachedResourceClient.h:

(WebCore::CachedResourceClient::shouldMarkAsReferenced): Make sure that ResourceClients mark preloads as referenced by default.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::CachedResourceLoader): Initialize timer.
(WebCore::CachedResourceLoader::~CachedResourceLoader): Stop timer.
(WebCore::CachedResourceLoader::warnUnusedPreloads): Iterate over m_preloads and issue a warning for non-referenced preloads.
(WebCore::CachedResourceLoader::documentDidFinishLoadEvent): Trigger a timer if preloads weren't cleared at load time.
(WebCore::CachedResourceLoader::warnUnusedPreloads): Triggered by the timer, and called CachedResourceLoader::warnUnusedPreloads.
(WebCore::CachedResourceLoader::stopUnusedPreloadsTimer): Stop the timer.

LayoutTests:

This adds a test for the unused preload warning, and adapts some of the other preload tests,
to avoid warnings.

  • http/tests/preload/download_resources-expected.txt: Changed.
  • http/tests/preload/download_resources.html: Added references to preloaded resources.
  • http/tests/preload/onerrer_event-expected.txt: Changed.
  • http/tests/preload/onerror_event.html: Added references to preloaded resources.
  • http/tests/preload/onload_event.html: Added references to preloaded resources.
  • http/tests/preload/resources/single_download_preload.html: Deflaked.
  • http/tests/preload/unused_preload_warning-expected.txt: Added.
  • http/tests/preload/unused_preload_warning.html: Added.
11:39 AM Changeset in webkit [214360] by Brent Fulgham
  • 10 edits
    11 adds in trunk

Handle recursive calls to ProcessingInstruction::checkStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=169982
<rdar://problem/31083051>

Reviewed by Antti Koivisto.

Source/WebCore:

See if we triggered a recursive load of the stylesheet during the 'beforeload'
event handler. If so, reset to a valid state before completing the load.

We should also check after 'beforeload' that we were not disconnected from (or
moved to a new) document.

I also looked for other cases of this pattern and fixed them.

Tests: fast/dom/beforeload/image-removed-during-before-load.html

fast/dom/beforeload/recursive-css-pi-before-load.html
fast/dom/beforeload/recursive-link-before-load.html
fast/dom/beforeload/recursive-xsl-pi-before-load.html

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::clearExistingCachedSheet): Added.
(WebCore::ProcessingInstruction::checkStyleSheet): Reset to valid state
if necessary after the 'beforeload' handler. Also, safely handle the case where
the element was disconnected in the 'beforeload' handler (similar to what
we do in HTMLLinkElement).
(WebCore::ProcessingInstruction::setCSSStyleSheet): Drive-by Fix: Protect the
current document to match what we do in setXSLStyleSheet.

  • dom/ProcessingInstruction.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::selectMediaResource): Safely handle the case where
the element was disconnected in the 'beforeload' handler.
(WebCore::HTMLMediaElement::selectNextSourceChild): Ditto.

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): Ditto.

LayoutTests:

  • fast/dom/beforeload/image-removed-during-before-load-expected.txt: Added.
  • fast/dom/beforeload/image-removed-during-before-load.html: Added.
  • fast/dom/beforeload/recursive-css-pi-before-load-expected.txt: Added.
  • fast/dom/beforeload/recursive-css-pi-before-load.html: Added.
  • fast/dom/beforeload/recursive-link-before-load-expected.txt: Added.
  • fast/dom/beforeload/recursive-link-before-load.html: Added.
  • fast/dom/beforeload/recursive-xsl-pi-before-load-expected.txt: Added.
  • fast/dom/beforeload/recursive-xsl-pi-before-load.html: Added.
  • fast/dom/beforeload/resources/content.xhtml: Added.
  • fast/dom/beforeload/resources/pass.css: Added.
  • fast/dom/beforeload/resources/test.xsl: Added.
11:23 AM Changeset in webkit [214359] by mmaxfield@apple.com
  • 25 edits
    4 adds in trunk

font-style needs a new CSSValue to make CSSRule.cssText work correctly
https://bugs.webkit.org/show_bug.cgi?id=169258

Reviewed by David Hyatt.

Source/WebCore:

With variation fonts, font-style's value can't be captured in a CSSPrimitiveValue (nor any other subclass
off CSSValue) any more. Instead, we need to create two new CSSValues which represent the grammar that font-
style and it's associated @font-face descriptor accept.

The grammar of the font-style property is "normal | italic | oblique [ <<angle>> ]?"
The grammar of the font-style descriptor is "normal | italic | oblique [ <<angle>> | <<angle>> <<angle>> ]?"

We currently still support numbers in place of the <<angle>> value (contrary to the spec). We will remove
this support in https://bugs.webkit.org/show_bug.cgi?id=169357.

Tests: fast/text/font-selection-font-face-parse.html:

fast/text/font-style-parse.html:

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSAllInOne.cpp:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::fontStyleFromStyle):
(WebCore::fontShorthandValueForSelectionProperties):

  • css/CSSFontFace.cpp:

(WebCore::calculateWeightRange):
(WebCore::calculateStretchRange):
(WebCore::calculateItalicRange):

  • css/CSSFontFaceSet.cpp:

(WebCore::computeFontSelectionRequest):
(WebCore::CSSFontFaceSet::matchingFaces):
(WebCore::calculateWeightValue): Deleted.
(WebCore::calculateStretchValue): Deleted.
(WebCore::calculateStyleValue): Deleted.

  • css/CSSFontFaceSet.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/CSSFontStyleRangeValue.cpp: Added.

(WebCore::CSSFontStyleRangeValue::customCSSText):
(WebCore::CSSFontStyleRangeValue::equals):

  • css/CSSFontStyleRangeValue.h: Added.
  • css/CSSFontStyleValue.cpp: Added.

(WebCore::CSSFontStyleValue::customCSSText):
(WebCore::CSSFontStyleValue::equals):

  • css/CSSFontStyleValue.h: Added.
  • css/CSSFontValue.cpp:

(WebCore::CSSFontValue::customCSSText):

  • css/CSSFontValue.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isFontStyleValue):
(WebCore::CSSValue::isFontStyleRangeValue):

  • css/FontFace.cpp:

(WebCore::FontFace::style):
(WebCore::FontFace::weight):
(WebCore::FontFace::stretch):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertFontWeightFromValue):
(WebCore::StyleBuilderConverter::convertFontStretchFromValue):
(WebCore::StyleBuilderConverter::convertFontStyleFromValue):
(WebCore::StyleBuilderConverter::convertFontWeight):
(WebCore::StyleBuilderConverter::convertFontStretch):
(WebCore::StyleBuilderConverter::convertFontStyle):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontStyle):
(WebCore::consumeFontStyleRange):
(WebCore::CSSPropertyParser::consumeSystemFont):
(WebCore::CSSPropertyParser::consumeFont):

  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::parseAttribute):

LayoutTests:

Update tests' expected results.

  • fast/text/font-selection-font-face-parse-expected.txt:
  • fast/text/font-selection-font-face-parse.html:
  • fast/text/font-style-parse-expected.txt:
  • fast/text/font-style-parse.html:
  • platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
11:17 AM Changeset in webkit [214358] by achristensen@apple.com
  • 5 edits in trunk

REGRESSION: Content Blocker: Blocking "a[href*=randomString]" doesn't work
https://bugs.webkit.org/show_bug.cgi?id=169167

Reviewed by Simon Fraser.

Source/WebCore:

When testing content extensions, we have always called an API function that internally
has called AtomicString::init somewhere before we start compiling the content extension.
On iOS, though, we call [_WKUserContentExtensionStore compileContentExtensionForIdentifier:...]
without having already called anything that calls AtomicString::init. The new CSS parser is now
failing to parse some selectors because CSSSelectorParser::defaultNamespace is returning starAtom,
which is a null atomic string before AtomicString::init is called.

Covered by a new API test.

  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::isValidCSSSelector):
(WebCore::ContentExtensions::loadAction):
(WebCore::ContentExtensions::isValidSelector): Deleted.

  • contentextensions/ContentExtensionParser.h:

Call AtomicString::init before checking if a css selector is valid.

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::TEST_F):
Test an example of a selector that was incorrectly determined to be invalid.

11:01 AM Changeset in webkit [214357] by commit-queue@webkit.org
  • 14 edits
    6 adds in trunk

Add libwebrtc backend support for RTCRtpSender::replaceTrack
https://bugs.webkit.org/show_bug.cgi?id=169841

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-24
Reviewed by Alex Christensen.

Source/WebCore:

Tests: webrtc/audio-replace-track.html

webrtc/video-replace-track.html

Adding support for replaceTrack for audio and video sources.
Replacing tracks will always succeed for audio sources.
For video tracks, it will only succeed if the video resolution is not greater.
LibWebRTCPeerConnectionBackend will delegate the track replacing by replacing the source of the outgoing sources with the source wrapped in the replacing track.

Video test is not fully passing as size constraints for mock video sources are not providing the right video stream resolution.

  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::replaceTrack):

  • Modules/mediastream/RTCRtpSender.h:
  • Modules/mediastream/RTCRtpSender.idl:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::replaceTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
  • platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:

(WebCore::RealtimeOutgoingAudioSource::setSource):

  • platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
  • platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::setSource):

  • platform/mediastream/mac/RealtimeOutgoingVideoSource.h:
  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::drawText):
(WebCore::MockRealtimeVideoSource::generateFrame):

LayoutTests:

  • webrtc/audio-replace-track-expected.txt: Added.
  • webrtc/audio-replace-track.html: Added.
  • webrtc/video-replace-track-expected.txt: Added.
  • webrtc/video-replace-track.html: Added.
  • webrtc/video-replace-track-to-null-expected.txt: Added.
  • webrtc/video-replace-track-to-null.html: Added.
10:46 AM Changeset in webkit [214356] by jonlee@apple.com
  • 2 edits in trunk/Source/WebCore

Remove comment from RTCStatsReport.idl to convert ssrc to DOMString.
Unreviewed.

Latest available Editor's Draft of WebRTC Statistics API is from 14 December 2016,
but since then, in https://github.com/w3c/webrtc-stats/pull/157, it was changed to become
unsigned long.

  • Modules/mediastream/RTCStatsReport.idl:
10:20 AM Changeset in webkit [214355] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Update TestExpectations for media/restore-from-page-cache.html.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
10:18 AM Changeset in webkit [214354] by webkit@devinrousso.com
  • 12 edits
    1 copy
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Indicate whether a WebSocket connection is open or close
https://bugs.webkit.org/show_bug.cgi?id=168948

Reviewed by Joseph Pecoraro.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:

Added WebSocketResourceTreeElement.js and SpanningDataGridNode.js.

  • UserInterface/Views/WebSocketContentView.js:

(WebInspector.WebSocketContentView):
(WebInspector.WebSocketContentView.prototype.shown):
(WebInspector.WebSocketContentView.prototype.hidden):
(WebInspector.WebSocketContentView.prototype._updateState):
Listen to changes in the readyState and add a SpanningDataGridNode when the current state
becomes Closed.

  • UserInterface/Views/WebSocketResourceTreeElement.js: Added.

(WebInspector.WebSocketResourceTreeElement.prototype.onattach):
(WebInspector.WebSocketResourceTreeElement.prototype.ondetach):
(WebInspector.WebSocketResourceTreeElement.prototype._updateConnectionStatus):
Listen to changes in the readyState and add/remove the status element depending on the
current state:

  • Closed: show no status indicator
  • Connecting: show a small circle with a yellow color
  • Open: show a small circle with a green color
  • UserInterface/Views/ResourceTreeElement.css:

(.item.resource.resource-type-websocket .status > div):
(.item.resource.resource-type-websocket:not(.selected) .status .open):
(.tree-outline:not(:focus, .force-focus) .item.resource.resource-type-websocket.selected .status .open):
(body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .open):
(.item.resource.resource-type-websocket:not(.selected) .status .connecting):
(.tree-outline:not(:focus, .force-focus) .item.resource.resource-type-websocket.selected .status .connecting):
(body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .connecting):

  • UserInterface/Views/FrameTreeElement.js:

(WebInspector.FrameTreeElement):
Use WebSocketResourceTreeElement as the constructor for WebSocket resources.

  • UserInterface/Views/SpanningDataGridNode.js: Added.

(WebInspector.SpanningDataGridNode.prototype.createCells):
Creates a single cell that spans all the columns (via CSS colspan) of the parent DataGrid.

  • UserInterface/Views/DataGrid.css:

(.data-grid td.spanning):
Center content of spanning nodes and prevent user interaction.

  • UserInterface/Views/DataGridNode.js:

(WebInspector.DataGridNode.prototype.createCell):
Add additional checks so that a DataGridNode can be created with a column identifier that is
not in the DataGrid. This is used by SpanningGridDataNode, as it shouldn't match one single
column in the DataGrid since it spans them all.

  • UserInterface/Views/GeneralTreeElement.js:

(WebInspector.GeneralTreeElement.prototype.ondetach):

  • UserInterface/Views/BreakpointTreeElement.js:

(WebInspector.BreakpointTreeElement.prototype.ondetach):

  • UserInterface/Views/DOMBreakpointTreeElement.js:

(WebInspector.DOMBreakpointTreeElement.prototype.ondetach):

  • UserInterface/Views/XHRBreakpointTreeElement.js:

(WebInspector.XHRBreakpointTreeElement.prototype.ondetach):
Add ondetach function (with super calls) for future use.

10:11 AM Changeset in webkit [214353] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Mark webrtc/video-stats.html as failing.

  • platform/gtk/TestExpectations:
10:03 AM Changeset in webkit [214352] by Jonathan Bedard
  • 2 edits in trunk/Tools

Increase timeout for booting simulators.
<rdar://problem/31080009>

Unreviewed infrastructure fix.

  • Scripts/webkitpy/xcode/simulator.py:

(Simulator.wait_until_device_is_booted): Increase timeout.
(Simulator.wait_until_device_is_in_state): Increase timeout.

9:45 AM Changeset in webkit [214351] by akling@apple.com
  • 3 edits in trunk/Source/WTF

Make inactive web processes behave as though under memory pressure.
<https://webkit.org/b/170042>

Reviewed by Antti Koivisto.

Once a web process becomes inactive, let's try to reduce its impact
on memory usage by treating it as if it's under memory pressure until
it becomes active.

  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::setProcessState):
(WTF::MemoryPressureHandler::isUnderMemoryPressure):

  • wtf/MemoryPressureHandler.h:

(WTF::MemoryPressureHandler::isUnderMemoryPressure): Deleted.

9:32 AM Changeset in webkit [214350] by commit-queue@webkit.org
  • 5 edits
    4 adds in trunk

Add support for DataChannel and MediaStreamTrack stats
https://bugs.webkit.org/show_bug.cgi?id=170031

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-24
Reviewed by Eric Carlson.

Source/WebCore:

Tests: webrtc/datachannel/datachannel-stats.html

webrtc/video-mediastreamtrack-stats.html

Exposing libwebrtc stats through WebRTC stats API, gathered for data channel and media stream tracks.

  • Modules/mediastream/RTCStatsReport.h:

(WebCore::RTCStatsReport::MediaStreamTrackStats::MediaStreamTrackStats):
(WebCore::RTCStatsReport::DataChannelStats::DataChannelStats):

  • Modules/mediastream/RTCStatsReport.idl:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::fillRTCMediaStreamTrackStats):
(WebCore::fillRTCDataChannelStats):
(WebCore::LibWebRTCMediaEndpoint::StatsCollector::OnStatsDelivered):

LayoutTests:

  • webrtc/datachannel/datachannel-stats-expected.txt: Added.
  • webrtc/datachannel/datachannel-stats.html: Added.
  • webrtc/video-mediastreamtrack-stats-expected.txt: Added.
  • webrtc/video-mediastreamtrack-stats.html: Added.
9:27 AM Changeset in webkit [214349] by Chris Dumez
  • 3 edits in trunk/LayoutTests

Extend svg/animations/animations-paused-disconnected-iframe.html
https://bugs.webkit.org/show_bug.cgi?id=170035

Reviewed by Andreas Kling.

Extend svg/animations/animations-paused-disconnected-iframe.html to cover more things.

  • svg/animations/animations-paused-disconnected-iframe-expected.txt:
  • svg/animations/animations-paused-disconnected-iframe.html:
9:25 AM Changeset in webkit [214348] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Fix framesEncoded/framesDecoded RTC stats
https://bugs.webkit.org/show_bug.cgi?id=170024

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-24
Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/video-stats.html

Adding access to these fields now that they are available.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::fillInboundRTPStreamStats):
(WebCore::fillOutboundRTPStreamStats):

LayoutTests:

  • webrtc/video-stats-expected.txt: Added.
  • webrtc/video-stats.html: Added.
7:55 AM Changeset in webkit [214347] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/javascript-dialogs after r214277.

Since r214277 beforeunload events are not fired unless there's some user interaction, so we need to simulate it
in our unit tests to work.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:

(testWebViewJavaScriptDialogs):

7:33 AM Changeset in webkit [214346] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/default-menu after r214244.

Fix mnemonic string of contextMenuItemTagOpenAudioInNewWindow() that I copy pasted from
contextMenuItemTagOpenVideoInNewWindow().

  • platform/LocalizedStrings.cpp:

(WebCore::contextMenuItemTagOpenAudioInNewWindow):

7:30 AM Changeset in webkit [214345] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[JSC] Use jsNontrivialString agressively for ToString(Int52)
https://bugs.webkit.org/show_bug.cgi?id=170002

Reviewed by Sam Weinig.

JSTests:

  • stress/to-string-int52.js: Added.

(shouldBe):
(toString10):
(expected):

Source/JavaScriptCore:

We use the same logic used for Int32 to use jsNontvirialString.
After single character check, produced string is always longer than 1.
Thus, we can use jsNontrivialString.

  • runtime/NumberPrototype.cpp:

(JSC::int52ToString):

6:59 AM Changeset in webkit [214344] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Mark media/video-load-require-user-gesture.html as failing after r214338.

  • platform/gtk/TestExpectations:
6:30 AM Changeset in webkit [214343] by Carlos Garcia Campos
  • 2 edits
    3 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline http/tests/inspector/network/fetch-response-body.html/xhr-response-body.html after r214338.

We are now getting the right application/json for a file data.json. The soup network backend tries to gess the
mime type from the extension when sniffing is not allowed and the mime type is not known. See bug
webkit.org/b/168299, that was added actually to fix these tests, but at that time we also failed to guess the
mime type and returned application/octet-stream.

  • platform/gtk/TestExpectations:
  • platform/gtk/http/tests/inspector/network/fetch-response-body-expected.txt: Added.
  • platform/gtk/http/tests/inspector/network/xhr-response-body-expected.txt: Added.
6:22 AM WebKitGTK/2.16.x edited by Michael Catanzaro
(diff)
6:19 AM Changeset in webkit [214342] by Carlos Garcia Campos
  • 1 edit
    1 add in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html after r214338.

We are now getting a MIME type for otf files.

  • platform/gtk/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt: Added.
5:50 AM Changeset in webkit [214341] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GStreamer] MediaPlayerPrivateGStreamerOwr shouldn't be the default engine
https://bugs.webkit.org/show_bug.cgi?id=170049

Reviewed by Žan Doberšek.

This is causing several media tests to fail after r214338. When trying to load something like this:

http://127.0.0.1:8000/media/resources/serve-video.php?name=../../../../media/content/silence.wav&type=audio/wav&content-length=no&icy-data=yes

since r214338, the content type is known and inferred from the extension in this case, what ends up calling
nextMediaEngine() in MediaPlayer::loadWithNextMediaEngine. That returns the first registered media engine, that
is Owr that doesn't know how to load that and fails.

Fixes: http/tests/media/media-play-stream-chunked-icy.html

http/tests/media/media-seeking-no-ranges-server.html
http/tests/media/video-auth.html
http/tests/media/video-play-stall-before-meta-data.html
http/tests/security/contentSecurityPolicy/audio-redirect-allowed.html
http/tests/security/contentSecurityPolicy/audio-redirect-allowed2.html
http/tests/security/contentSecurityPolicy/audio-redirect-blocked.html
http/tests/security/contentSecurityPolicy/video-redirect-allowed.html
http/tests/security/contentSecurityPolicy/video-redirect-allowed2.html
http/tests/security/contentSecurityPolicy/video-redirect-blocked.html

  • platform/graphics/MediaPlayer.cpp:

(WebCore::buildMediaEnginesVector):

5:01 AM Changeset in webkit [214340] by pvollan@apple.com
  • 6 edits in trunk

Text stroke is sometimes clipped on video captions.
https://bugs.webkit.org/show_bug.cgi?id=170006

Reviewed by Eric Carlson.

Source/WebCore:

Set 'overflow' property to 'visible' on cue element to avoid clipping of text stroke.

Updated test media/track/track-css-stroke-cues.html.

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):

  • html/track/VTTCue.cpp:

(WebCore::VTTCueBox::applyCSSProperties):

LayoutTests:

  • media/track/track-css-stroke-cues-expected.txt:
  • media/track/track-css-stroke-cues.html:
1:26 AM Changeset in webkit [214339] by Carlos Garcia Campos
  • 1 edit
    3 adds in trunk/Source/ThirdParty

Unreviewed. Fix the build after r214338.

Add missing files I forgot to git add again.

  • xdgmime/CMakeLists.txt: Added.
  • xdgmime/README: Added.
  • xdgmime/README.webkit: Added.
1:21 AM Changeset in webkit [214338] by Carlos Garcia Campos
  • 27 edits
    1 move
    1 add in trunk

[GTK] Add MIMETypeRegistry implementation using xdgmime and remove the GTK+ one
https://bugs.webkit.org/show_bug.cgi?id=170001

Reviewed by Michael Catanzaro.

.:

  • Source/CMakeLists.txt: Compile xdgmime if USE_XDGMIME is ON.
  • Source/cmake/OptionsGTK.cmake: Set USE_XDGMIME to ON.

Source/ThirdParty:

Add xdgmime to ThirdParty.

  • xdgmime/CMakeLists.txt: Added.
  • xdgmime/README: Added.
  • xdgmime/README.webkit: Added.
  • xdgmime/src/xdgmime.c: Added.
  • xdgmime/src/xdgmime.h: Added.
  • xdgmime/src/xdgmimealias.c: Added.
  • xdgmime/src/xdgmimealias.h: Added.
  • xdgmime/src/xdgmimecache.c: Added.
  • xdgmime/src/xdgmimecache.h: Added.
  • xdgmime/src/xdgmimeglob.c: Added.
  • xdgmime/src/xdgmimeglob.h: Added.
  • xdgmime/src/xdgmimeicon.c: Added.
  • xdgmime/src/xdgmimeicon.h: Added.
  • xdgmime/src/xdgmimeint.c: Added.
  • xdgmime/src/xdgmimeint.h: Added.
  • xdgmime/src/xdgmimemagic.c: Added.
  • xdgmime/src/xdgmimemagic.h: Added.
  • xdgmime/src/xdgmimeparent.c: Added.
  • xdgmime/src/xdgmimeparent.h: Added.

Source/WebCore:

The XDG implementation could be used by any port where shared-mime-info is expected to be available. It also
improves the current GTK+ implementation that is based on a very small map of mime types and extensions.

  • CMakeLists.txt:
  • PlatformGTK.cmake:
  • platform/xdg/MIMETypeRegistryXdg.cpp: Renamed from Source/WebCore/platform/gtk/MIMETypeRegistryGtk.cpp.

(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):

Tools:

Ignore style of xdgmime sources.

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

LayoutTests:

Remove platform specific expectations of two test because now we do the same as other wk2 ports.

  • platform/gtk/TestExpectations:
1:07 AM Changeset in webkit [214337] by Carlos Garcia Campos
  • 1 edit
    18 adds in trunk/Source/ThirdParty

Unreviewed. Add stubs for xdgmime sources to ThirdParty.

This is in preparation for bug #170001, to try to bypass the SVN hook that doesn't allow to commit source files
containing tabs. I'm committing empty files, so that once those files are known by SVN I can set the
allow-tabs property and then commit the actual contents.

  • xdgmime/src/xdgmime.c: Added.
  • xdgmime/src/xdgmime.h: Added.
  • xdgmime/src/xdgmimealias.c: Added.
  • xdgmime/src/xdgmimealias.h: Added.
  • xdgmime/src/xdgmimecache.c: Added.
  • xdgmime/src/xdgmimecache.h: Added.
  • xdgmime/src/xdgmimeglob.c: Added.
  • xdgmime/src/xdgmimeglob.h: Added.
  • xdgmime/src/xdgmimeicon.c: Added.
  • xdgmime/src/xdgmimeicon.h: Added.
  • xdgmime/src/xdgmimeint.c: Added.
  • xdgmime/src/xdgmimeint.h: Added.
  • xdgmime/src/xdgmimemagic.c: Added.
  • xdgmime/src/xdgmimemagic.h: Added.
  • xdgmime/src/xdgmimeparent.c: Added.
  • xdgmime/src/xdgmimeparent.h: Added.

Mar 23, 2017:

10:31 PM Changeset in webkit [214336] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Use WeakRandom for SamplingProfiler interval fluctuation
https://bugs.webkit.org/show_bug.cgi?id=170045

Reviewed by Mark Lam.

It is unnecessary to use cryptographicallyRandomNumber for SamplingProfiler
interval fluctuation. Use WeakRandom instead.

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::SamplingProfiler):
(JSC::SamplingProfiler::timerLoop):

  • runtime/SamplingProfiler.h:
10:14 PM Changeset in webkit [214335] by jonlee@apple.com
  • 2 edits in trunk/Source/WebCore

Update createDataChannel on RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=170044

Reviewed by Youenn Fablet.

  • Modules/mediastream/RTCPeerConnection.idl: Change label to USVString.
9:53 PM Changeset in webkit [214334] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Array.prototype.splice behaves incorrectly when the VM is "having a bad time".
https://bugs.webkit.org/show_bug.cgi?id=170025
<rdar://problem/31228679>

Reviewed by Saam Barati.

  • runtime/ArrayPrototype.cpp:

(JSC::copySplicedArrayElements):
(JSC::arrayProtoFuncSplice):

8:20 PM Changeset in webkit [214333] by Antti Koivisto
  • 15 edits
    2 deletes in trunk

Revert r213712, caused iPad PLT regression
https://bugs.webkit.org/show_bug.cgi?id=170040

Unreviewed.

Source/WebCore:

A few subtests have big regressions.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::pseudoStyleRulesForElement):

  • dom/Document.cpp:

(WebCore::Document::resolveStyle):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::shouldScheduleLayout):
(WebCore::Document::didRemoveAllPendingStylesheet):

  • dom/Document.h:

(WebCore::Document::didLayoutWithPendingStylesheets):
(WebCore::Document::hasNodesWithPlaceholderStyle):
(WebCore::Document::setHasNodesWithPlaceholderStyle):
(WebCore::Document::hasNodesWithNonFinalStyle): Deleted.
(WebCore::Document::setHasNodesWithNonFinalStyle): Deleted.

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::rendererIsNeeded):

  • page/FrameView.cpp:

(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintContents):

  • rendering/RenderLayer.cpp:

(WebCore::shouldSuppressPaintingLayer):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresRepaint):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isPlaceholderStyle):
(WebCore::RenderStyle::setIsPlaceholderStyle):
(WebCore::RenderStyle::isNotFinal): Deleted.
(WebCore::RenderStyle::setIsNotFinal): Deleted.

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::analyzeStyleSheetChange):
(WebCore::Style::Scope::updateActiveStyleSheets):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::makePlaceholderStyle):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::TreeResolver::resolveElement):

LayoutTests:

  • http/tests/incremental/stylesheet-body-incremental-rendering-expected.html: Removed.
  • http/tests/incremental/stylesheet-body-incremental-rendering.html: Removed.
7:28 PM Changeset in webkit [214332] by ddkilzer@apple.com
  • 2 edits in trunk/Websites/bugs.webkit.org

Fix Apache::SizeLimit unshared size limit in mod_perl.pl for bugs.webkit.org
<https://webkit.org/b/169926>

Reviewed by Brent Fulgham.

  • mod_perl.pl: Update syntax for setting unshared size

limit, and bump it up another 100 Mb so children don't
respawn as quickly.

6:43 PM Changeset in webkit [214331] by Wenson Hsieh
  • 6 edits
    1 add in trunk

Dragging on a large image should not revert to a file icon if data interaction is enabled
https://bugs.webkit.org/show_bug.cgi?id=170018
<rdar://problem/31184508>

Reviewed by Tim Horton.

Source/WebCore:

If data interaction is enabled, don't fall back to showing a file icon when initiating a drag on an image element.

New API tests: DataInteractionTests.LargeImageToTargetDiv

DataInteractionTests.AttachmentElementItemProviders

  • page/DragController.cpp:

(WebCore::DragController::doImageDrag):
(WebCore::DragController::shouldUseCachedImageForDragImage):

  • page/DragController.h:

Tools:

Add new tests for data interaction. LargeImageToTargetDiv verifies the change made in this patch, while
AttachmentElementItemProviders was a test that was previously removed due to <rdar://problem/31038797>.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/large-red-square.png: Added.
  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

6:40 PM Changeset in webkit [214330] by commit-queue@webkit.org
  • 9 edits
    3 adds in trunk/Source/WebCore

Rename RTCIceCandidateEvent to RTCPeerConnectionIceEvent
https://bugs.webkit.org/show_bug.cgi?id=169981

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-23
Reviewed by Eric Carlson.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/mediastream/MediaEndpointPeerConnection.cpp:
  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::fireICECandidateEvent):
(WebCore::PeerConnectionBackend::doneGatheringCandidates):

  • Modules/mediastream/RTCPeerConnection.cpp:
  • Modules/mediastream/RTCPeerConnectionIceEvent.cpp: Renamed from Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.cpp.

(WebCore::RTCPeerConnectionIceEvent::create):
(WebCore::RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent):
(WebCore::RTCPeerConnectionIceEvent::~RTCPeerConnectionIceEvent):
(WebCore::RTCPeerConnectionIceEvent::candidate):
(WebCore::RTCPeerConnectionIceEvent::eventInterface):

  • Modules/mediastream/RTCPeerConnectionIceEvent.h: Renamed from Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.h.
  • Modules/mediastream/RTCPeerConnectionIceEvent.idl: Renamed from Source/WebCore/Modules/mediastream/RTCIceCandidateEvent.idl.
  • WebCore.xcodeproj/project.pbxproj:
  • dom/EventNames.in:
6:36 PM Changeset in webkit [214329] by Michael Catanzaro
  • 7 edits
    1 delete in trunk/Source

window.crypto.getRandomValues() uses the insecure RC4 RNG
https://bugs.webkit.org/show_bug.cgi?id=169623

Reviewed by Alex Christensen.

Source/WebCore:

  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • crypto/CryptoKey.cpp:

(WebCore::CryptoKey::randomData): Use this on Mac now.

  • crypto/mac/CryptoKeyMac.cpp: Removed.
  • page/Crypto.cpp:

(WebCore::Crypto::getRandomValues): Rollout r214188.

Source/WTF:

Remove the RC4 random generator in favor of using OS randomness for now. This is basically
a merge of https://codereview.chromium.org/1431233002 from Blink, original author "eroman".

  • wtf/CryptographicallyRandomNumber.cpp:

(WTF::cryptographicallyRandomNumber):
(WTF::cryptographicallyRandomValues):
(): Deleted.

5:07 PM Changeset in webkit [214328] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Update WinCairoRequirements.zip
https://bugs.webkit.org/show_bug.cgi?id=169950

Patch by Fujii Hironori <Fujii Hironori> on 2017-03-23
Reviewed by Alex Christensen.

  • Scripts/update-webkit-wincairo-libs: Replace $winCairoLibsURL.
4:51 PM Changeset in webkit [214327] by Chris Dumez
  • 3 edits
    2 adds in trunk

SVG animations are not paused when their <svg> element is removed from the document
https://bugs.webkit.org/show_bug.cgi?id=170030
<rdar://problem/31230252>

Reviewed by Dean Jackson.

Source/WebCore:

SVG animations were not paused when their <svg> element was removed from the document.
This patch fixes the issue.

Test: svg/animations/animations-paused-when-removed-from-document.html

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::insertedInto):
(WebCore::SVGSVGElement::removedFrom):

LayoutTests:

Add layout test coverage.

  • svg/animations/animations-paused-when-removed-from-document-expected.txt: Added.
  • svg/animations/animations-paused-when-removed-from-document.html: Added.
4:42 PM Changeset in webkit [214326] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Cache type is not styled correctly in Timelines tab
https://bugs.webkit.org/show_bug.cgi?id=170032

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-03-23
Reviewed by Matt Baker.

  • UserInterface/Views/NetworkGridContentView.css:

(.content-view:matches(.network, .network-grid) > .data-grid .cache-type):
(.content-view:matches(.network, .network-grid) > .data-grid:matches(:focus, .force-focus) tr.selected .cache-type):
(.content-view.network-grid > .data-grid .cache-type): Deleted.
(.content-view.network-grid > .data-grid:matches(:focus, .force-focus) tr.selected .cache-type): Deleted.
The different network grids have different class names. Handle both.

4:30 PM Changeset in webkit [214325] by jmarcell@apple.com
  • 2 edits in tags/Safari-604.1.14/Source/WebCore

Merge r214310. rdar://problem/31225378

4:14 PM Changeset in webkit [214324] by mmaxfield@apple.com
  • 9 edits in trunk

font shorthand should accept variation values
https://bugs.webkit.org/show_bug.cgi?id=168998

Reviewed by Simon Fraser.

Source/WebCore:

The CSS Fonts 4 spec has stabilized as to which variation values are allowed in
the font shorthand property. Weights are allowed because a 0 weight is considered
as a parse error, so there is no conflict with a unitless font-size of 0.
font-style accepts angles, so there is no conflict there. However, font-stretch
accepts percentages, which are also accepted by font-size, which means the newly
extended grammar for font-stretch can't be accepted in the shorthand.

Tests: fast/text/font-style-parse.html

fast/text/font-weight-parse.html

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontWeight):
(WebCore::consumeFontStyle):
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::consumeFontWeightCSS21): Deleted.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):

  • css/parser/CSSPropertyParserHelpers.h:

LayoutTests:

  • fast/text/font-style-parse-expected.txt:
  • fast/text/font-style-parse.html:
  • fast/text/font-weight-parse-expected.txt:
  • fast/text/font-weight-parse.html:
3:53 PM Changeset in webkit [214323] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[JSC][DFG] Make addShouldSpeculateAnyInt more conservative to avoid regression caused by Double <-> Int52 conversions
https://bugs.webkit.org/show_bug.cgi?id=169998

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/int52-back-and-forth.js: Added.

(shouldBe):
(num):

Source/JavaScriptCore:

Double <-> Int52 and JSValue <-> Int52 conversions are not so cheap. Thus, Int52Rep is super carefully emitted.
We make addShouldSpeculateAnyInt more conservative to avoid regressions caused by the above conversions.
We select ArithAdd(Int52, Int52) only when this calculation is beneficial compared to added Int52Rep conversions.

This patch tighten the conditions of addShouldSpeculateAnyInt.

  1. Honor DoubleConstant.

When executing imaging-darkroom, we have a thing like that,

132:< 2:loc36> DoubleConstant(Double|UseAsOther, AnyIntAsDouble, Double: 4607182418800017408, 1.000000, bc#114)
1320:< 1:loc38> Int52Rep(Check:Int32:@82, Int52|PureInt, Int32, Exits, bc#114)
1321:< 1:loc39> Int52Constant(Int52|PureInt, Boolint32Nonboolint32Int52, Double: 4607182418800017408, 1.000000, bc#114)
133:<!3:loc39> ArithSub(Int52Rep:@1320<Int52>, Int52Rep:@1321<Int52>, Int52|MustGen, Int52, CheckOverflow, Exits, bc#114)

The LHS of ArithSub says predicting Boolint32, and the rhs says AnyIntAsDouble. Thus we select ArithSub(Int52, Int52) instead
of ArithSub(Double, Double). However, it soon causes OSR exits. In imaging-darkroom, LHS's Int32 prediction will be broken.
While speculating Int32 in the above situation is reasonable approach since the given LHS says predicting Int32, this causes
severe performance regression.

Previously, we always select ArithSub(Double, Double). So accidentally, we do not encounter this misprediction issue.

One thing can be found that we have DoubleConstant in the RHS. It means that we have 1.0 instead of 1 in the code.
We can see the code like lhs - 1.0 instead of lhs - 1 in imaging-darkroom. It offers good information that lhs and
the resulting value would be double. Handling the above ArithSub in double seems more appropriate rather than handling
it in Int52.

So, in this patch, we honor DoubleConstant. If we find DoubleConstant on one operand, we give up selecting
Arith[Sub,Add](Int52, Int52). This change removes OSR exits occurr in imaging-darkroom right now.

  1. Two Int52Rep(Double) conversions are not desirable.

We allow AnyInt ArithAdd only when the one operand of the binary operation should be speculated AnyInt. It is a bit conservative
decision. This is because Double to Int52 conversion is not so cheap. Frequent back-and-forth conversions between Double and Int52
rather hurt the performance. If the one operand of the operation is already Int52, the cost for constructing ArithAdd becomes
cheap since only one Double to Int52 conversion could be required.
This recovers some regression in assorted tests while keeping kraken crypto improvements.

  1. Avoid frequent Int52 to JSValue conversions.

Int52 to JSValue conversion is not so cheap. Thus, we would like to avoid such situations. So, in this patch, we allow
Arith(Int52, Int52) with AnyIntAsDouble operand only when the node is used as number. By doing so, we avoid the case like,
converting Int52, performing ArithAdd, and soon converting back to JSValue.

The above 3 changes recover the regression measured in microbenchmarks/int52-back-and-forth.js and assorted benchmarks.
And still it keeps kraken crypto improvements.

baseline patched

imaging-darkroom 201.112+-3.192 189.532+-2.883 definitely 1.0611x faster
stanford-crypto-pbkdf2 103.953+-2.325 100.926+-2.396 might be 1.0300x faster
stanford-crypto-sha256-iterative 35.103+-1.071 ? 36.049+-1.143 ? might be 1.0270x slower

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::addShouldSpeculateAnyInt):

3:40 PM Changeset in webkit [214322] by Chris Dumez
  • 8 edits
    4 adds in trunk

SVG animations are not paused when inserted into a hidden page
https://bugs.webkit.org/show_bug.cgi?id=170026
<rdar://problem/31228704>

Reviewed by Andreas Kling.

Source/WebCore:

SVG animations were not paused when inserted into a hidden page. We would pause
animations in a page when the page becomes hidden. However, new animations
inserted in the page after this point would start, despite the page being
hidden.

Tests:

  • svg/animations/animations-paused-when-inserted-in-hidden-document.html
  • svg/animations/animations-paused-when-inserted-in-hidden-document2.html
  • dom/Document.cpp:

(WebCore::Document::accessSVGExtensions):

  • svg/SVGDocumentExtensions.cpp:

(WebCore::SVGDocumentExtensions::SVGDocumentExtensions):
(WebCore::SVGDocumentExtensions::addTimeContainer):
(WebCore::reportMessage):

  • svg/SVGDocumentExtensions.h:
  • testing/Internals.cpp:

(WebCore::Internals::areSVGAnimationsPaused):

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

LayoutTests:

Add layout test coverage.

  • svg/animations/animations-paused-when-inserted-in-hidden-document-expected.txt: Added.
  • svg/animations/animations-paused-when-inserted-in-hidden-document.html: Added.
  • svg/animations/animations-paused-when-inserted-in-hidden-document2-expected.txt: Added.
  • svg/animations/animations-paused-when-inserted-in-hidden-document2.html: Added.
3:39 PM Changeset in webkit [214321] by Michael Catanzaro
  • 5 edits
    5 copies in trunk

Rolled over to ChangeLog-2017-03-23

3:21 PM Changeset in webkit [214320] by akling@apple.com
  • 10 edits in trunk/Source

Let the UI process do memory kills and replace crashes with diagnostic logging.
<https://webkit.org/b/170016>
<rdar://problem/31091292>

Reviewed by Chris Dumez.

Source/WebCore:

Remove the memory kill code from WebCore that just crashes in favor of controlled
teardown from UI process side in WebKit2.

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::simulatedProcessCrashKey):
(WebCore::DiagnosticLoggingKeys::exceededActiveMemoryLimitKey):
(WebCore::DiagnosticLoggingKeys::exceededInactiveMemoryLimitKey):
(WebCore::DiagnosticLoggingKeys::exceededBackgroundCPULimitKey):

  • page/DiagnosticLoggingKeys.h:
  • page/MemoryRelease.cpp:

(WebCore::didExceedMemoryLimitAndFailedToRecover): Deleted.

  • page/MemoryRelease.h:

Source/WebKit2:

Have the WebProcess memory kill callback send a notification to the UI process
instead of outright crashing. The UI process then sends a diagnostic logging message
before carefully taking down the web process.

Also add drive-by diagnostic logging for background CPU limit kills.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::simulateProcessCrash):
(WebKit::WebProcessProxy::didExceedActiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimit):
(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

2:54 PM Changeset in webkit [214319] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] MachineThreads does not consider situation that one thread has multiple VMs
https://bugs.webkit.org/show_bug.cgi?id=169819

Reviewed by Mark Lam.

The Linux port of PlatformThread suspend/resume mechanism relies on having a thread
specific singleton thread data, and was relying on MachineThreads::Thread to be this
thread specific singleton. But because MachineThreads::Thread is not a thread specific
singleton, we can get a deadlock in the GTK port's DatabaseProcess.

This patch fixes this issue by moving per thread data from MachineThreads::Thread to
MachineThreads::ThreadData, where there will only be one instance of
MachineThreads::ThreadData per thread. Each MachineThreads::Thread will now point to
the same MachineThreads::ThreadData for any given thread.

  • heap/MachineStackMarker.cpp:

(pthreadSignalHandlerSuspendResume):
(JSC::threadData):
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::Thread::operator==):
(JSC::MachineThreads::ThreadData::ThreadData):
(JSC::MachineThreads::ThreadData::~ThreadData):
(JSC::MachineThreads::ThreadData::suspend):
(JSC::MachineThreads::ThreadData::resume):
(JSC::MachineThreads::ThreadData::getRegisters):
(JSC::MachineThreads::ThreadData::Registers::stackPointer):
(JSC::MachineThreads::ThreadData::Registers::framePointer):
(JSC::MachineThreads::ThreadData::Registers::instructionPointer):
(JSC::MachineThreads::ThreadData::Registers::llintPC):
(JSC::MachineThreads::ThreadData::freeRegisters):
(JSC::MachineThreads::ThreadData::captureStack):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
(JSC::MachineThreads::Thread::~Thread): Deleted.
(JSC::MachineThreads::Thread::suspend): Deleted.
(JSC::MachineThreads::Thread::resume): Deleted.
(JSC::MachineThreads::Thread::getRegisters): Deleted.
(JSC::MachineThreads::Thread::Registers::stackPointer): Deleted.
(JSC::MachineThreads::Thread::Registers::framePointer): Deleted.
(JSC::MachineThreads::Thread::Registers::instructionPointer): Deleted.
(JSC::MachineThreads::Thread::Registers::llintPC): Deleted.
(JSC::MachineThreads::Thread::freeRegisters): Deleted.
(JSC::MachineThreads::Thread::captureStack): Deleted.

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::Thread::operator!=):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):
(JSC::MachineThreads::Thread::freeRegisters):
(JSC::MachineThreads::Thread::captureStack):
(JSC::MachineThreads::Thread::platformThread):
(JSC::MachineThreads::Thread::stackBase):
(JSC::MachineThreads::Thread::stackEnd):

  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::isValidFramePointer):

  • runtime/VMTraps.cpp:

(JSC::findActiveVMAndStackBounds):

2:45 PM Changeset in webkit [214318] by clopez@igalia.com
  • 2 edits in trunk/Tools

buildbot: Fix mixing of tabs and spaces after r214172
https://bugs.webkit.org/show_bug.cgi?id=169793

Unreviewed.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunWebKitTests.evaluateCommand):

2:07 PM Changeset in webkit [214317] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Clean RTCPeerConnection.idl after bug 169978
https://bugs.webkit.org/show_bug.cgi?id=169989

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-23
Reviewed by Eric Carlson.

No change of behavior.
Moving addTransceiver to overloaded method to union type to match spec.
Refactoring RTCRtpSender to take a String&&.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTransceiver):
(WebCore::RTCPeerConnection::completeAddTransceiver):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl: Cosmetic changes except for addTransceiver.
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::create):
(WebCore::RTCRtpSender::RTCRtpSender):

  • Modules/mediastream/RTCRtpSender.h:
1:57 PM Changeset in webkit [214316] by Chris Dumez
  • 1 edit
    4 adds in trunk/LayoutTests

Add a test to make sure SVG animations are paused in detached iframes
https://bugs.webkit.org/show_bug.cgi?id=170020

Reviewed by Antti Koivisto.

  • svg/animations/animations-paused-disconnected-iframe-expected.txt: Added.
  • svg/animations/animations-paused-disconnected-iframe.html: Added.
  • svg/animations/resources/frame-with-svg-animation.html: Added.
  • svg/animations/resources/grandchild-frame-with-svg-animation.html: Added.
1:56 PM Changeset in webkit [214315] by rniwa@webkit.org
  • 3 edits in trunk/Websites/perf.webkit.org

Share more code between ManifestGenerator and /api/triggerables
https://bugs.webkit.org/show_bug.cgi?id=169993

Reviewed by Chris Dumez.

Shared the code to fetch the list of triggerables from the database between ManifestGenerator
and /api/triggerables.

  • public/api/triggerables.php:

(main):

  • public/include/manifest-generator.php:

(ManifestGenerator::fetch_triggerables): Extracted as a static function. Also include the ID
in the triggerable data.

1:54 PM Changeset in webkit [214314] by rniwa@webkit.org
  • 5 edits in trunk/Websites/perf.webkit.org

create-test-group should allow a different set of repositories to be used in each configuration
https://bugs.webkit.org/show_bug.cgi?id=169992

Rubber-stamped by Antti Koivisto.

Added the support for new POST parameter, revisionSets, to /privileged-api/create-test-group.
This new parameter now specifies an array of repository id to revision dictionaries, and allows
different set of repositories' revisions to be specified in each dictionary.

We keep the old API for v2 UI and detect-changes.js compatibility for now.

  • public/privileged-api/create-test-group.php:

(main):
(commit_sets_from_revision_sets): Added.
(ensure_commit_sets): Only fetch the top-level repository per r213788 and r213976.

  • public/v3/models/test-group.js:

(TestGroup.createAndRefetchTestGroups): Use the newly added revisionSets parameter instead of
the now depreacted commitSets parameter.

  • public/v3/pages/analysis-task-page.js:

(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingCommitSetList): Simplified this code
by simply verifying the consistency of commit sets now that createAndRefetchTestGroups takes
an array of commit sets instead of a dictionary of repository name to a list of revisions.

  • server-tests/privileged-api-create-test-group-tests.js: Added test cases for new parameter.
1:31 PM Changeset in webkit [214313] by mark.lam@apple.com
  • 10 edits
    1 add in trunk

Clients of JSArray::tryCreateForInitializationPrivate() should do their own null checks.
https://bugs.webkit.org/show_bug.cgi?id=169783

Reviewed by Saam Barati.

JSTests:

  • stress/regress-169783.js: Added.

Source/JavaScriptCore:

Fixed clients of tryCreateForInitializationPrivate() to do a null check and throw
an OutOfMemoryError if allocation fails, or RELEASE_ASSERT that the allocation
succeeds.

  • dfg/DFGOperations.cpp:
  • ftl/FTLOperations.cpp:

(JSC::FTL::operationMaterializeObjectInOSR):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncSplice):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSArray.cpp:

(JSC::JSArray::tryCreateForInitializationPrivate):
(JSC::JSArray::fastSlice):

  • runtime/JSArray.h:

(JSC::constructArray):
(JSC::constructArrayNegativeIndexed):

  • runtime/RegExpMatchesArray.cpp:

(JSC::createEmptyRegExpMatchesArray):

  • runtime/RegExpMatchesArray.h:

(JSC::createRegExpMatchesArray):

1:20 PM Changeset in webkit [214312] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Add logging in case libwebrtc.dylib cannot be opened
https://bugs.webkit.org/show_bug.cgi?id=170017

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-23
Reviewed by Geoffrey Garen.

No change of behavior.

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::webRTCAvailable):

12:56 PM Changeset in webkit [214311] by dbates@webkit.org
  • 3 edits in trunk/LayoutTests

REGRESSION (r214047): LayoutTest fast/events/pageshow-pagehide-on-back-cached-with-frames.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=169834

Reviewed by Alexey Proskuryakov.

Ensure that the subframes are loaded in a consistent order between test runs.

Currently the test fast/events/pageshow-pagehide-on-back-cached-with-frames.html assumes
that subframes will load in tree order. This assumption is incorrect. Therefore, we need
to explicitly manage the loading of the subframes to ensure this invariant.

  • fast/events/pageshow-pagehide-on-back-cached-with-frames-expected.txt:
  • fast/events/pageshow-pagehide-on-back-cached-with-frames.html:
12:53 PM Changeset in webkit [214310] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, a speculative build fix
<rdar://problem/31225378>

  • crypto/CommonCryptoUtilities.h:
12:06 PM Changeset in webkit [214309] by beidson@apple.com
  • 4 edits
    2 adds in trunk

WebSQL databases should not openable in private browsing.
<rdar://problem/30383335> and https://bugs.webkit.org/show_bug.cgi?id=170013

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/websql/private-browsing-open-disabled.html

  • Modules/webdatabase/DatabaseManager.cpp:

(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::tryToOpenDatabaseBackend): Throw an exception if in private browsing.

  • Modules/webdatabase/DatabaseManager.h:

LayoutTests:

  • storage/websql/private-browsing-open-disabled-expected.txt: Added.
  • storage/websql/private-browsing-open-disabled.html: Added.
11:47 AM Changeset in webkit [214308] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Editing local storage keys/values starts with truncated strings
https://bugs.webkit.org/show_bug.cgi?id=169896

Reviewed by Brian Burg.

  • UserInterface/Views/DataGrid.css:

(.data-grid td.editing > div):

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype._editingCancelled):
div.cell-content is removed because the <td> itself is contenteditable (using -webkit-user-modify:read-write-plaintext-only),
not the inner div.cell-content. Re-create div.cell-content after commiting (by pressing Enter) or canceling (by pressing Esc)
since it may get removed while editing.

11:45 AM Changeset in webkit [214307] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Remove pass expectation for fast/forms/range/range-remove-on-drag.html as it relies on touch events.

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
11:22 AM Changeset in webkit [214306] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Mark compositing and css3/blending tests asserting on debug builds.

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
11:15 AM Changeset in webkit [214305] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

NeverDestroyed<MediaQueryEvaluator> must explicitly construct with a String
https://bugs.webkit.org/show_bug.cgi?id=169987
<rdar://problem/31211087>

Reviewed by Alex Christensen.

CSSDefaultStyleSheets creates a static MediaQueryEvaluator, but thanks
to the template magic of NeverDestroyed, it was converting the char*
argument into a bool, and calling the wrong constructor.

Unfortunately this is difficult to test because it only affects
the default UA style sheets, and they currently don't have
and @media rules (which would always evaluate to true given
the bug). I don't want to put in a useless rule just to check
if the bug is fixed. When one is added for bug 168447, this change
will be exercised.

  • css/CSSDefaultStyleSheets.cpp: Explicitly construct with a String

rather than a char*.
(WebCore::screenEval):
(WebCore::printEval):

9:13 AM Changeset in webkit [214304] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

9:03 AM Changeset in webkit [214303] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.14

Tag Safari-604.1.14.

8:54 AM Changeset in webkit [214302] by eric.carlson@apple.com
  • 7 edits in trunk/Source/WebCore

[MediaStream] Make mock video source work on iOS
https://bugs.webkit.org/show_bug.cgi?id=169923

Reviewed by Youenn Fablet.

Generate IOSurface-backed CVPixelBuffers. Allocate them from a
CVPixelBufferPool for efficiency.

No new tests, no functional change.

  • platform/cocoa/CoreVideoSoftLink.cpp:
  • platform/cocoa/CoreVideoSoftLink.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoTransformationMatrix):

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::pixelBufferFromCGImage):
(WebCore::MockRealtimeVideoSourceMac::applySize):

  • platform/mock/MockRealtimeVideoSource.h:
4:37 AM WebKitGTK/2.16.x edited by sergio@webkit.org
(diff)
4:33 AM Changeset in webkit [214301] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

Test DataDetectors supported schemes in lowercase
https://bugs.webkit.org/show_bug.cgi?id=169994
<rdar://problem/30788920>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _actionForLongPress]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
Lower-case the scheme before looking in tapAndHoldSchemes, which is
guaranteed to be in lower-case. WebCore already does this in places
that it confers with tapAndHoldSchemes.

4:30 AM WebKitGTK/2.16.x edited by sergio@webkit.org
(diff)
2:25 AM Changeset in webkit [214300] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[jsc] Add MacroAssemblerMIPS::storeFence()
https://bugs.webkit.org/show_bug.cgi?id=169705

Patch by Guillaume Emont <guijemont@igalia.com> on 2017-03-23
Reviewed by Yusuke Suzuki.

There doesn't seem to be anything more fine grained than "sync" that
guarantees that all memory operations following it are going to happen
after all stores before it, so we just use sync.

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::sync): Added a FIXME about SYNC_MB.

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::storeFence): Added.

2:10 AM Changeset in webkit [214299] by tpopela@redhat.com
  • 7 edits in trunk/Source/WTF

Fix uninitialized public members in WTF
https://bugs.webkit.org/show_bug.cgi?id=169676

Reviewed by Michael Catanzaro.

Found by Coverity scan.

  • wtf/Bag.h:
  • wtf/HashTable.h:
  • wtf/HashTraits.h:
  • wtf/Insertion.h:
  • wtf/OrderMaker.h:
  • wtf/ParallelJobsGeneric.h:
12:38 AM Changeset in webkit [214298] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Mark webrtc/connection-state.html as failing.

  • platform/gtk/TestExpectations:

Mar 22, 2017:

11:21 PM Changeset in webkit [214297] by aestes@apple.com
  • 8 edits
    1 copy
    3 adds in trunk

[Cocoa] Add an option to exclude overflow when snapshotting a WKWebProcessPlugInNodeHandle
https://bugs.webkit.org/show_bug.cgi?id=169991
<rdar://problem/30141083>

Reviewed by Tim Horton.

Source/WebKit2:

When snapshotting an element using -[WKWebProcessPlugInNodeHandle renderedImageWithOptions:],
the image is sized to encompass all descendants, even if the element is styled with
overflow:hidden. This patch adds a WKSnapshotOption to exclude overflow, resulting in an
image that's always sized to the node's bounding box.

  • Shared/API/c/WKImage.h: Defined kWKSnapshotOptionsExcludeOverflow.
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:

(-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]): Converted the
WKSnapshotOptions argument to a SnapshotOptions using toSnapshotOptions(), and called
InjectedBundleNodeHandle::renderedImage() with shouldExcludeOverflow set to true if the
WKSnapshotOptions included kWKSnapshotOptionsExcludeOverflow.

  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:

(WKBundleNodeHandleCopySnapshotWithOptions): Ditto.

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::InjectedBundleNodeHandle::renderedImage): If shouldExcludeOverflow is true, use
RenderObject::absoluteBoundingBoxRectIgnoringTransforms() as the paintingRect for
imageForRect().

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptions.mm: Added.

(-[RenderedImageWithOptionsObject didRenderImageWithSize:]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptionsPlugIn.mm: Added.

(-[RenderedImageWithOptionsPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[RenderedImageWithOptionsPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RenderedImageWithOptionsProtocol.h: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/rendered-image-excluding-overflow.html: Added.
11:01 PM Changeset in webkit [214296] by Yusuke Suzuki
  • 6 edits
    2 adds in trunk

[JSC][DFG] Propagate AnyIntAsDouble information carefully to utilize it in fixup
https://bugs.webkit.org/show_bug.cgi?id=169914

Reviewed by Saam Barati.

JSTests:

  • stress/any-int-as-double-add.js: Added.

(shouldBe):
(test):

  • stress/to-this-numbers.js: Added.

(shouldBe):
(Number.prototype.toThis):

Source/JavaScriptCore:

In DFG prediction propagation phase, we pollute the prediction of GetByVal for Array::Double
as SpecDoubleReal even if the heap prediction says the proper prediction is SpecAnyIntAsDouble.
Thus, the following nodes just see the result of GetByVal(Array::Double) as double value,
and select suboptimal edge filters in fixup phase. For example, if the result of GetByVal is
SpecAnyIntAsDouble, we can see the node like ArithAdd(SpecAnyIntAsDouble, Int52) and we should
have a chance to make it ArithAdd(Check:Int52, Int52) instead of ArithAdd(Double, Double).

This patch propagates SpecAnyIntAsDouble in GetByVal(Array::Double) properly. And ValueAdd,
ArithAdd and ArithSub select AnyInt edge filters for SpecAnyIntAsDouble values. It finally
produces a Int52 specialized DFG node. And subsequent nodes using the produced one also
become Int52 specialized.

One considerable problem is that the heap prediction misses the non any int doubles. In that case,
if Int52 edge filter is used, BadType exit will occur. It updates the prediction of the value profile
of GetByVal. So, in the next time, GetByVal(Array::Double) produces more conservative predictions
and avoids exit-and-recompile loop correctly.

This change is very sensitive to the correct AI and appropriate predictions. Thus, this patch finds
and fixes some related issues. One is incorrect prediction of ToThis and another is incorrect
AI logic for Int52Rep.

This change dramatically improves kraken benchmarks' crypto-pbkdf2 and crypto-sha256-iterative
by 42.0% and 30.7%, respectively.

baseline patched

Kraken:
ai-astar 158.851+-4.132 ? 159.433+-5.176 ?
audio-beat-detection 53.193+-1.621 ? 53.391+-2.072 ?
audio-dft 103.589+-2.277 ? 104.902+-1.924 ? might be 1.0127x slower
audio-fft 40.491+-1.102 39.854+-0.755 might be 1.0160x faster
audio-oscillator 68.504+-1.721 ? 68.957+-1.725 ?
imaging-darkroom 118.367+-2.171 ? 119.581+-2.310 ? might be 1.0103x slower
imaging-desaturate 71.443+-1.461 ? 72.398+-1.918 ? might be 1.0134x slower
imaging-gaussian-blur 110.648+-4.035 109.184+-3.373 might be 1.0134x faster
json-parse-financial 60.363+-1.628 ? 61.936+-1.585 ? might be 1.0261x slower
json-stringify-tinderbox 37.903+-0.869 ? 39.559+-1.607 ? might be 1.0437x slower
stanford-crypto-aes 56.313+-1.512 ? 56.675+-1.715 ?
stanford-crypto-ccm 51.564+-1.900 ? 53.456+-2.548 ? might be 1.0367x slower
stanford-crypto-pbkdf2 129.546+-2.738 91.214+-2.027 definitely 1.4202x faster
stanford-crypto-sha256-iterative 43.515+-0.730 33.292+-0.653 definitely 1.3071x faster

<arithmetic> 78.878+-0.528 75.988+-0.621 definitely 1.0380x faster

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::addShouldSpeculateAnyInt):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArithNegate):

9:51 PM Changeset in webkit [214295] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

WKScrollView should not require data interaction gestures to fail before panning
https://bugs.webkit.org/show_bug.cgi?id=169986

Reviewed by Tim Horton.

This workaround is no longer needed.

  • UIProcess/ios/WKScrollView.mm:
9:14 PM Changeset in webkit [214294] by akling@apple.com
  • 13 edits in trunk/Source

Let MemoryPressureHandler track whether the process is active or inactive.
<https://webkit.org/b/169990>

Reviewed by Antti Koivisto.

Source/WebCore:

Have PerformanceMonitor inform MemoryPressureHandler about relevant
changes to the page activity states.

Also change the "1 hour after last page load" policy to "1 hour after
last being visible in an active window."

  • page/MainFrame.cpp:

(WebCore::MainFrame::didCompleteLoad):

  • page/MainFrame.h:
  • page/MemoryRelease.cpp:

(WebCore::processIsEligibleForMemoryKill): Deleted.

  • page/MemoryRelease.h:
  • page/Page.h:

(WebCore::Page::performanceMonitor):

  • page/PerformanceMonitor.cpp:

(WebCore::PerformanceMonitor::PerformanceMonitor):
(WebCore::PerformanceMonitor::activityStateChanged):
(WebCore::PerformanceMonitor::processMayBecomeInactiveTimerFired):
(WebCore::PerformanceMonitor::updateProcessStateForMemoryPressure):

  • page/PerformanceMonitor.h:

Source/WebKit2:

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Source/WTF:

An active process is a process that meets any of these criteria:

  • Has had a visible Page in an active window in the last hour
  • Is playing audio

This replaces the old mechanism where MemoryPressureHandler would invoke
a callback to know whether the process was eligible for a memory kill.
Instead we now plumb the relevant information down from WebCore and kill
based on this activity state.

  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::measurementTimerFired):
(WTF::MemoryPressureHandler::setProcessState):

  • wtf/MemoryPressureHandler.h:

(WTF::MemoryPressureHandler::setMemoryKillCallback):
(WTF::MemoryPressureHandler::processState):
(WTF::MemoryPressureHandler::setProcessIsEligibleForMemoryKillCallback): Deleted.

7:44 PM Changeset in webkit [214293] by commit-queue@webkit.org
  • 14 edits
    4 adds in trunk

Support RTCPeerConnectionState
https://bugs.webkit.org/show_bug.cgi?id=169978

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-22
Reviewed by Jon Lee.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:

Source/WebCore:

Test: webrtc/connection-state.html

Implementing https://www.w3.org/TR/webrtc/#rtcpeerconnectionstate-enum.
Its state and event is based on changes made to ice gathering state and ice connection state.

  • CMakeLists.txt: Adding RTCPeerConnectionState idl.
  • DerivedSources.make: Ditto.
  • Modules/mediastream/RTCPeerConnection.cpp: Splitting close in doClose/doStop so that we can send closed event

in case close is called, but not if stopped.
(WebCore::RTCPeerConnection::doClose):
(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::stop):
(WebCore::RTCPeerConnection::doStop):
(WebCore::RTCPeerConnection::updateIceGatheringState):
(WebCore::RTCPeerConnection::updateIceConnectionState):
(WebCore::RTCPeerConnection::updateConnectionState):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl: Fixing IDL and minor cosmetic changes
  • Modules/mediastream/RTCPeerConnection.js:

(setLocalDescription): Cosmetic change.
(setRemoteDescription):

  • Modules/mediastream/RTCPeerConnectionState.idl: Added.
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::OnIceGatheringChange): Adding 'gathering' state

  • WebCore.xcodeproj/project.pbxproj:
  • dom/EventNames.h:
  • platform/mediastream/RTCPeerConnectionState.h: Added.

LayoutTests:

  • webrtc/connection-state-expected.txt: Added.
  • webrtc/connection-state.html: Added.
  • webrtc/rtcpeerconnection-error-messages-expected.txt:
7:37 PM Changeset in webkit [214292] by clopez@igalia.com
  • 2 edits
    52 adds in trunk/LayoutTests

[GTK] Enable CSS filters related tests.
https://bugs.webkit.org/show_bug.cgi?id=99026

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/css3/filters/composited-during-transition-layertree-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-blur-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-blur-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-blur-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-blur-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-combined-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-combined-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-combined-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-combined-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-contrast-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-contrast-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-contrast-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-contrast-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-grayscale-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-grayscale-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-grayscale-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-grayscale-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-hue-rotate-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-hue-rotate-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-hue-rotate-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-hue-rotate-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-invert-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-invert-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-invert-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-invert-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-opacity-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-opacity-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-opacity-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-opacity-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-composite-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-composite-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-composite-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-composite-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-ordering-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-ordering-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-ordering-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-reference-ordering-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-saturate-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-saturate-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-saturate-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-saturate-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-sepia-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-sepia-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-sepia-hw-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/effect-sepia-hw-expected.txt: Added. Rebaselined.
  • platform/gtk/css3/filters/regions-expanding-expected.png: Added. Rebaselined.
  • platform/gtk/css3/filters/regions-expanding-expected.txt: Added. Rebaselined.
7:21 PM Changeset in webkit [214291] by jiewen_tan@apple.com
  • 5 edits
    2 adds in trunk

ASSERT_WITH_SECURITY_IMPLICATION hit when removing an <input type="range"> while dragging on iOS
https://bugs.webkit.org/show_bug.cgi?id=165535
<rdar://problem/29559749>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Utimately we should prevent SliderThumbElement::unregisterForTouchEvents() being called while
updating render tree. A quick fix for this is to move dispatchFormControlChangeEvent for input
from stopDragging up to the callers which really needs to dispatch this event, i.e., finishing
dragging the slider. It is clear that not every caller of stopDragging wants to
dispatchFormControlChangeEvent.

Test: fast/forms/range/range-remove-on-drag.html

  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::stopDragging):
(WebCore::SliderThumbElement::defaultEventHandler):
(WebCore::SliderThumbElement::handleTouchEndAndCancel):

LayoutTests:

This test case is only enabled in iOS simulator WK2.

  • TestExpectations:
  • fast/forms/range/range-remove-on-drag-expected.txt: Added.
  • fast/forms/range/range-remove-on-drag.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
6:16 PM Changeset in webkit [214290] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Dynamically applied :empty pseudo class with display:none does not get unapplied
https://bugs.webkit.org/show_bug.cgi?id=169907

Reviewed by Ryosuke Niwa.

Source/WebCore:

We improperly reset the styleAffectedByEmpty bit when removing the renderer when :empty starts
applying. We then fail to invalidate the style when the element becomes non-empty again.

Fix by resetting the style relation bits only when computing the style.

Test: fast/css/empty-display-none-invalidation.html

  • dom/Element.cpp:

(WebCore::Element::resetStyleRelations):

Expose this separately.

(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):

Don't reset style relation bits when removing renderers.

  • dom/Element.h:
  • dom/ElementRareData.h:

(WebCore::ElementRareData::resetComputedStyle):
(WebCore::ElementRareData::resetStyleRelations):

Reset all these bits in one function.

(WebCore::ElementRareData::resetDynamicRestyleObservations): Deleted.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::resetStyleForNonRenderedDescendants):
(WebCore::Style::TreeResolver::resolveComposedTree):

Call the explicit style relation reset function when recomputing style.

LayoutTests:

  • fast/css/empty-display-none-invalidation-expected.html: Added.
  • fast/css/empty-display-none-invalidation.html: Added.
6:14 PM Changeset in webkit [214289] by mark.lam@apple.com
  • 13 edits
    1 add in trunk

Add support for Error.stackTraceLimit.
https://bugs.webkit.org/show_bug.cgi?id=169904

Reviewed by Saam Barati.

JSTests:

  • stress/error-stack-trace-limit.js: Added.

Source/JavaScriptCore:

Since there's no standard for this yet, we'll implement Error.stackTraceLimit
based on how Chrome does it. This includes some idiosyncrasies like:

  1. If we set Error.stackTraceLimit = 0, then new Error().stack yields an empty stack trace (Chrome has a title with no stack frame entries).
  2. If we set Error.stackTraceLimit = {] (i.e. to a non-number value), then new Error().stack is undefined.

Chrome and IE defaults their Error.stackTraceLimit to 10. We'll default ours to
100 because 10 may be a bit too skimpy and it is not that costly to allow up to
100 frames instead of 10.

The default value for Error.stackTraceLimit is specified by
Options::defaultErrorStackTraceLimit().

Also, the Exception object now limits the number of stack trace frames it captures
to the limit specified by Options::exceptionStackTraceLimit().

Note: the Exception object captures a stack trace that is not necessarily the
same as the one in an Error object being thrown:

  • The Error object captures the stack trace at the point of object creation.
  • The Exception object captures the stack trace at the point that the exception is thrown. This stack trace is captured even when throwing a value that is not an Error object e.g. a primitive value. The Exception object stack trace is only used by WebInspector to identify where a value is thrown from. Hence, it does not necessary make sense the Exception object stack trace limited by Error.stackTraceLimit. Instead, we have it use own Options::exceptionStackTraceLimit().
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::unwind):

  • jsc.cpp:

(dumpException):

  • runtime/CommonIdentifiers.h:
  • runtime/Error.cpp:

(JSC::addErrorInfoAndGetBytecodeOffset):

  • runtime/ErrorConstructor.cpp:

(JSC::ErrorConstructor::finishCreation):
(JSC::ErrorConstructor::put):
(JSC::ErrorConstructor::deleteProperty):

  • runtime/ErrorConstructor.h:

(JSC::ErrorConstructor::stackTraceLimit):

  • runtime/Exception.cpp:

(JSC::Exception::finishCreation):

  • runtime/Options.h:

LayoutTests:

Rebased test.

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
5:57 PM Changeset in webkit [214288] by achristensen@apple.com
  • 16 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

Fix warnings in libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=169973

Reviewed by Geoffrey Garen.

  • Configurations/boringssl.xcconfig:
  • Configurations/libsrtp.xcconfig:
  • Configurations/libwebrtc.xcconfig:
  • Configurations/libwebrtcpcrtc.xcconfig:
  • Configurations/libyuv.xcconfig:
  • Configurations/opus.xcconfig:
  • Configurations/usrsctp.xcconfig:

Build with more warnings.
opus still needs some incompatible pointer warnings disabled because it converts
const opus_int16 * to const opus_val16 * and opus_int32 * to opus_val32 *
and that's ok because its a codec and that's what codecs do.

  • Source/webrtc/base/logging.cc:
  • Source/webrtc/base/logging.h:
  • Source/webrtc/base/neverdestroyed.h: Added.

(webrtc::NeverDestroyed::NeverDestroyed):
(webrtc::NeverDestroyed::operator T&):
(webrtc::NeverDestroyed::get):
(webrtc::NeverDestroyed::operator&):
(webrtc::NeverDestroyed::asPtr):
Added webrtc::NeverDestroyed which may or may not be based on WTF::NeverDestroyed.
This allows us to avoid exit time destructors, which would slow down program termination for no reason.

  • Source/webrtc/base/virtualsocketserver.cc:
  • Source/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc:

Adopt NeverDestroyed in function scope so we don't have global constructors or destructors.

  • Source/webrtc/modules/audio_processing/beamformer/array_util.h:

(webrtc::DegreesToRadians):
(webrtc::RadiansToDegrees):
Add constexpr so we can calculate values at compile time instead of launch time.

  • Source/webrtc/modules/rtp_rtcp/source/rtp_utility.cc:
  • Source/webrtc/system_wrappers/source/clock.cc:
  • libwebrtc.xcodeproj/project.pbxproj:

Don't compile ssl_test.cc. We don't need it.

5:27 PM Changeset in webkit [214287] by rniwa@webkit.org
  • 2 edits
    2 moves in trunk/Websites/perf.webkit.org

/api/uploaded-file should return createdAt as a POSIX timestamp
https://bugs.webkit.org/show_bug.cgi?id=169980

Rubber-stamped by Antti Koivisto.

Call Database::to_js_time on createdAt to return it as a POSIX timestamp.

  • public/include/uploaded-file-helpers.php:

(format_uploaded_file): Fixed the bug.

  • server-tests/api-manifest-tests.js: Renamed from api-manifest.js.
  • server-tests/api-uploaded-file-tests.js: Renamed from api-uploaded-file.js. Added a test case.
5:16 PM Changeset in webkit [214286] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Update layout test expectations file.

Unreviewed test gardening.

  • platform/gtk/TestExpectations: Update the list of expected failures.
4:43 PM Changeset in webkit [214285] by rniwa@webkit.org
  • 7 edits in trunk/Websites/perf.webkit.org

UploadedFile should support a callback for upload progress
https://bugs.webkit.org/show_bug.cgi?id=169977

Reviewed by Andreas Kling.

Added a new option dictionary to CommonRemoteAPI.sendHttpRequest with uploadProgressCallback

Moved request headers and responseHandler callback in NodeRemoteAPI to this dictionary,
and updated the tests which relied on this code.

  • public/shared/common-remote.js:

(CommonRemoteAPI.prototype.postJSON):
(CommonRemoteAPI.prototype.postJSONWithStatus):
(CommonRemoteAPI.prototype.postFormData):
(CommonRemoteAPI.prototype.postFormDataWithStatus):

  • public/v3/privileged-api.js:

(PrivilegedAPI.prototype.sendRequest):

  • public/v3/remote.js:

(BrowserRemoteAPI.prototype.sendHttpRequest):
(BrowserRemoteAPI.prototype.sendHttpRequestWithFormData):
(BrowserRemoteAPI):

  • server-tests/api-uploaded-file.js:
  • tools/js/remote.js:

(NodeRemoteAPI.prototype.sendHttpRequest):
(NodeRemoteAPI.prototype.sendHttpRequestWithFormData):
(NodeRemoteAPI):

4:21 PM Changeset in webkit [214284] by Wenson Hsieh
  • 14 edits in trunk/Source

Add support for showing the platform data interaction caret
https://bugs.webkit.org/show_bug.cgi?id=169898
<rdar://problem/31146295>

Reviewed by Beth Dakin.

Source/WebKit/mac:

Plumb the dataInteractionCaretRect through WebView SPI to WebKit1 clients.

  • WebView/WebView.mm:

(-[WebView _dataInteractionCaretRect]):

  • WebView/WebViewPrivate.h:

Source/WebKit2:

Add support for showing the caret rect when data interacting over an editable target. To do this, we add
boilerplate plumbing to inform the WKContentView whenever the WebPageProxy's current caret rect changes.

  • Platform/spi/ios/UIKitSPI.h:

Define IPI to retrieve the default insertion caret color.

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

(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::dragEnded):
(WebKit::WebPageProxy::didEndDragging):
(WebKit::WebPageProxy::resetCurrentDragInformation):
(WebKit::WebPageProxy::setDragCaretRect):

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

(WebKit::PageClientImpl::didChangeDataInteractionCaretRect):

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

(-[WKContentView cleanupInteraction]):
(-[WKContentView insertionPointColor]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::dragEnded):

4:18 PM Changeset in webkit [214283] by Michael Catanzaro
  • 8 edits in trunk/Source/WebCore

[GTK] Honor GTK+ font settings
https://bugs.webkit.org/show_bug.cgi?id=82889

Reviewed by Carlos Garcia Campos.

After much discussion with Behdad and Martin (who is still not completely convinced I think
:) I want to merge cairo font options into the Fontconfig pattern used for rendering using
cairo_ft_font_options_substitute(). This is how the API was designed to be used anyway.
Fontconfig will still have final say over whether to actually respect the desktop settings
or not, so it can still choose to ignore the desktop's settings, but I don't think it makes
sense to have desktop-wide font settings and not tell Fontconfig about them, especially when
the whole point of WebKitGTK+ is desktop integration. This should also reduce complaints
that we're not following desktop settings and that we're drawing fonts differently than
Firefox.

  • PlatformGTK.cmake:
  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::getDefaultCairoFontOptions):

  • platform/graphics/cairo/CairoUtilities.h:
  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::createFontConfigPatternForCharacters):
(WebCore::strongAliasesForFamily):
(WebCore::FontCache::createFontPlatformData):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::getDefaultFontconfigOptions):
(WebCore::getDefaultCairoFontOptions): Deleted.

  • platform/graphics/gtk/GdkCairoUtilities.cpp:

(getDefaultCairoFontOptions):

3:51 PM Changeset in webkit [214282] by commit-queue@webkit.org
  • 14 edits in trunk

[Modern Media Controls] Controls size lags behind media size
https://bugs.webkit.org/show_bug.cgi?id=169962
<rdar://problem/30340293>

Patch by Antoine Quint <Antoine Quint> on 2017-03-22
Reviewed by Dean Jackson.

Source/WebCore:

We used to dispatch the "resize" event to the shadow root on a timer and commit changes to the DOM
when handling it inside of a requestAnimationFrame() callback. We now dispatch the "resize" event
as a post-layout task and commit to the DOM right away which ensures immediate size changes of the
controls.

  • Modules/modern-media-controls/controls/ios-inline-media-controls.js:

(IOSInlineMediaControls.prototype.layout):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype.layout):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:

(MacOSInlineMediaControls.prototype.layout):
Making some layout() safer by returning early in case they're called during the object construction
phase, due to the LayoutNode "width" setter now calling that method.

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

(MediaControls.prototype.get width):
(MediaControls.prototype.set width):
Calling layout() in the "width" setter to ensure that the inline controls layout is invalidated as
soon as the controls width changes instead of waiting on the next rAF to update the layout.

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

(const.scheduler.new.prototype.flushScheduledLayoutCallbacks):
Add a new method to immediately call queued layouts.

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

(MediaController.prototype.handleEvent):
Flush all queued layouts when handling a "resize" event.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::layoutSizeChanged):
Queue the "resize" event as a post-layout task.

(WebCore::HTMLMediaElement::contextDestroyed):

  • html/HTMLMediaElement.h:

Remove the queue we no longer use.

LayoutTests:

Updating an existing test to use a "resize" event handler to check that a size change
on the element is reflected on the shadow root. This would have failed prior to this
patch. Also rebaselining a test which now reports correct values.

  • media/modern-media-controls/media-controller/media-controller-resize-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-resize.html:
  • media/modern-media-controls/media-controller/media-controller-scale-factor-audio-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-scale-factor-audio.html:
3:51 PM Changeset in webkit [214281] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Activate remaining webrtc tests
https://bugs.webkit.org/show_bug.cgi?id=169957

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-22

  • platform/mac-wk2/TestExpectations:
3:50 PM Changeset in webkit [214280] by rniwa@webkit.org
  • 10 edits in trunk/Websites/perf.webkit.org

ComponentBase should enqueue itself to render when it becomes connected
https://bugs.webkit.org/show_bug.cgi?id=169905

Reviewed by Antti Koivisto.

When a component becomes connected to a document, enqueue itself to render automatically.
Also added the support for boolean attribute to ComponentBase.createElement.

  • ReadMe.md: Added an instruction to raise the upload limit per r214065.
  • browser-tests/component-base-tests.js: Added tests for the new behavior and createElement. Also moved

the tests related to enqueueToRenderOnResize out of defineElement tests.

  • browser-tests/index.html:

(BrowsingContext.prototype.constructor): Override requestAnimationFrame so that the callback would be
involved immediately durign testing.

  • public/v3/components/base.js:

(ComponentBase): Enqueue itself to render during construction if custom elements is not available.
(ComponentBase.defineElement):
(ComponentBase.defineElement.elementClass.prototype.connectedCallback): Enqueue itself to render when
the component's element became connected.
(ComponentBase.createElement): Use Array.isArray instead of instanceof to make it work with arrays made
in other realms (global objects) during testing. Added the support for boolean attributes. Setting an
attribute value to true would set the attribute, and setting it to false would not set the attribute.
(ComponentBase.useNativeCustomElements): Added. True iff window.customElements is defined.

  • public/v3/components/chart-pane-base.js:

(ChartPaneBase.prototype.render): No longer need to call enqueueToRender on the commit log viewer.

  • public/v3/components/commit-log-viewer.js:

(CommitLogViewer.prototype.render): No longer need to call enqueueToRender on the spinner icon.

  • public/v3/models/time-series.js:

(TimeSeries): Made this a proper class declaration now that we don't include data.js after r213300.

  • public/v3/pages/chart-pane.js:

(ChartPane.prototype._renderActionToolbar): No longer need to call enqueueToRender on the close icon.

  • public/v3/pages/summary-page.js:

(SummaryPage.prototype._renderCell): No longer need to call enqueueToRender on the spinner icon.

3:25 PM Changeset in webkit [214279] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the Mac CMake build after r214266.

  • PlatformMac.cmake:
3:22 PM Changeset in webkit [214278] by mrajca@apple.com
  • 2 edits in trunk/Tools

Only run volume-related autoplay policy tests on Mac.
https://bugs.webkit.org/show_bug.cgi?id=169969

Reviewed by Alex Christensen.

iOS does not support volume changes to media elements so these tests are timing out.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:

(TEST):

2:14 PM Changeset in webkit [214277] by Chris Dumez
  • 13 edits
    6 adds in trunk

WebKit should disallow beforeunload alerts from web pages users have never interacted with
https://bugs.webkit.org/show_bug.cgi?id=169936
<rdar://problem/23798897>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects-expected.txt:

Rebaseline now that the CONFIRM MESSAGE lines are now longer shown. This is because there is no user interaction
with the page.

Source/WebCore:

WebKit should disallow beforeunload alerts from web pages users have never interacted with.
This reduces the risk of annoyance to the user and is allowed by the specification:

which says:
"""
The user agent is encouraged to avoid asking the user for confirmation if it judges that doing
so would be annoying, deceptive, or pointless. A simple heuristic might be that if the user
has not interacted with the document, the user agent would not ask for confirmation before
unloading it.
"""

Firefox already implements this, Chrome does not.

Tests: fast/events/beforeunload-alert-no-user-interaction.html

fast/events/beforeunload-alert-user-interaction.html
fast/events/beforeunload-alert-user-interaction2.html

  • loader/FrameLoader.cpp:

(WebCore::shouldAskForNavigationConfirmation):
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):

LayoutTests:

  • fast/events/before-unload-return-string-conversion-expected.txt:
  • fast/events/before-unload-returnValue-expected.txt:

Rebaseline now that the CONFIRM MESSAGE is no longer shown. This is because there is
no user interaction with the page.

  • fast/events/beforeunload-alert-no-user-interaction-expected.txt: Added.
  • fast/events/beforeunload-alert-no-user-interaction.html: Added.
  • fast/events/beforeunload-alert-user-interaction-expected.txt: Added.
  • fast/events/beforeunload-alert-user-interaction.html: Added.
  • fast/events/beforeunload-alert-user-interaction2-expected.txt: Added.
  • fast/events/beforeunload-alert-user-interaction2.html: Added.

Add layout test coverage.

  • fast/loader/form-submission-after-beforeunload-cancel.html:
  • fast/loader/show-only-one-beforeunload-dialog.html:
  • http/tests/misc/iframe-beforeunload-dialog-matching-ancestor-securityorigin.html:
  • http/tests/misc/iframe-beforeunload-dialog-not-matching-ancestor-securityorigin.html:

Simulate user interaction with the page so that the CONFIRM MESSAGE log lines are still
shown.

1:46 PM Changeset in webkit [214276] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

ASan violation in IconLoader::stopLoading
https://bugs.webkit.org/show_bug.cgi?id=169960
<rdar://problem/30577691>

Reviewed by David Kilzer.

DocumentLoader::finishLoadingIcon handles the life cycle of the IconLoader. Once this method is called,
we should return immediately rather than attempt to make further modifications to the IconLoader.

No new tests due to lack of test features (see https://bugs.webkit.org/show_bug.cgi?id=164895). Easily
tested in MiniBrowser under ASan visiting websites with icons.

  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::notifyFinished):

1:33 PM Changeset in webkit [214275] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 26

Added a tag for Safari Technology Preview release 26.

1:30 PM Changeset in webkit [214274] by n_wang@apple.com
  • 5 edits in trunk

AX: WebKit is returning the wrong rangeForLine
https://bugs.webkit.org/show_bug.cgi?id=169940

Reviewed by Chris Fleizach.

Source/WebCore:

The AXRangeForLine is being calculated using VisiblePostition, so
when we try to use the index we should validate it using VisiblePosition.

Changes are covered in the modified test.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::traverseToOffsetInRange):
(WebCore::AXObjectCache::characterOffsetForIndex):

LayoutTests:

  • accessibility/mac/range-for-contenteditable-newline-expected.txt:
  • accessibility/mac/range-for-contenteditable-newline.html:
1:30 PM Changeset in webkit [214273] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit/mac

[iOS] downloadableBinaryFontsEnabled is set to false in -initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:
https://bugs.webkit.org/show_bug.cgi?id=169967
<rdar://problem/30406898>

Reviewed by Anders Carlsson.

  • WebView/WebView.mm:

(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): Removed call to

Settings::downloadableBinaryFontsEnabled. The default is true.

1:07 PM Changeset in webkit [214272] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[JSC] Use jsNontrivialString for Number toString operations
https://bugs.webkit.org/show_bug.cgi?id=169965

Reviewed by Mark Lam.

JSTests:

  • stress/to-string-int32.js: Added.

(shouldBe):
(toString10):
(expected):

Source/JavaScriptCore:

After single character check, produced string is always longer than 1.
Thus, we can use jsNontrivialString.

  • runtime/NumberPrototype.cpp:

(JSC::int32ToStringInternal):

12:50 PM Changeset in webkit [214271] by jmarcell@apple.com
  • 7 edits in branches/safari-603-branch/Source

Merge r214125. rdar://problem/30921831

12:43 PM Changeset in webkit [214270] by wilander@apple.com
  • 10 edits in trunk

Resource Load Statistics: Fix partitioning bug for client-side cookie access
https://bugs.webkit.org/show_bug.cgi?id=169906
<rdar://problem/31164456>

Reviewed by Alex Christensen.

Source/WebCore:

The existing test case was expanded to cover this change.

  • platform/network/NetworkStorageSession.h:

Moved the two cookieStoragePartition() functions into the class.
Also declared them const.

  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::cookieStoragePartition):

Now checks whether it should partition or not.

(WebCore::getPartitioningDomain):

Inline convenience function.

(WebCore::NetworkStorageSession::shouldPartitionCookies):

Renamed since it now receives a top privately controlled domain
instead of a host.

(WebCore::cookieStoragePartition): Deleted.

This moved into NetworkStorageSession.

(WebCore::hostIsInDomain): Deleted.

No longer needed since we generate the top privately controlled
domain for both the resource and the partition.

(WebCore::NetworkStorageSession::shouldPartitionCookiesForHost): Deleted.

Renamed WebCore::NetworkStorageSession::shouldPartitionCookies().

  • platform/network/mac/CookieJarMac.mm:

(WebCore::cookiesInPartitionForURL):

Now calls WebCore::NetworkStorageSession::cookieStoragePartition().

(WebCore::setCookiesFromDOM):

Now calls WebCore::NetworkStorageSession::cookieStoragePartition().

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):

Now calls WebCore::NetworkStorageSession::cookieStoragePartition().

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

This function no longer asks the NetworkStorageSession
whether it should partition or not. That decision is
now made as part of
WebCore::NetworkStorageSession::cookieStoragePartition().
The empty partition signals no partitioning.

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction-expected.txt:
  • http/tests/loading/resourceLoadStatistics/resources/get-cookies.php:

Now also outputs document.cookie client-side.

12:32 PM Changeset in webkit [214269] by jer.noble@apple.com
  • 5 edits
    2 adds in trunk

Media files served without an extension will not load in <video> tag.
https://bugs.webkit.org/show_bug.cgi?id=169895

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/video-served-as-text-with-type.html

Media files served without an extension will commonly have no MIME type (or incorrect MIME type) information
delivered in the HTTP header. In situations like these, if media referenced by a <source> tag with a type=
attribute containing MIME type (and optionally, codec) information, that type should be used preferentially.

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayer::contentMIMEType):
(WebCore::MediaPlayer::contentTypeCodecs):
(WebCore::MediaPlayer::contentMIMETypeWasInferredFromExtension):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):

LayoutTests:

  • http/tests/media/video-served-as-text-with-type-expected.txt: Added.
  • http/tests/media/video-served-as-text-with-type.html: Added.
  • platform/mac/TestExpectations:
12:23 PM Changeset in webkit [214268] by aestes@apple.com
  • 2 edits
    2 moves in trunk/Source/WebCore

[QuickLook] Move QuickLook.{h,mm} to platform/ios/
https://bugs.webkit.org/show_bug.cgi?id=169963

Reviewed by Andreas Kling.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/ios/QuickLook.h: Renamed from Source/WebCore/loader/ios/QuickLook.h.
  • platform/ios/QuickLook.mm: Renamed from Source/WebCore/loader/ios/QuickLook.mm.
11:20 AM Changeset in webkit [214267] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Remove duplicate TestExpectations entry.

Unreviewed test gardening.

11:11 AM Changeset in webkit [214266] by aestes@apple.com
  • 20 edits
    1 copy
    5 moves
    1 add in trunk/Source

[QuickLook] Rename QuickLookHandle to PreviewLoader
https://bugs.webkit.org/show_bug.cgi?id=169961

Reviewed by Andreas Kling.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:
  • loader/FrameLoaderClient.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::isQuickLookResource):

  • loader/ResourceLoader.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::shouldCreatePreviewLoaderForResponse):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didReceiveData):
(WebCore::SubresourceLoader::didReceiveBuffer):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::shouldCreateQuickLookHandleForResponse): Deleted.

  • loader/SubresourceLoader.h:
  • loader/ios/PreviewLoader.h: Copied from Source/WebCore/loader/ios/QuickLook.h.
  • loader/ios/PreviewLoader.mm: Added.

(testingClient):
(emptyClient):
(-[WebPreviewLoader initWithResourceLoader:resourceResponse:]):
(-[WebPreviewLoader appendDataArray:]):
(-[WebPreviewLoader finishedAppending]):
(-[WebPreviewLoader failed]):
(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):
(-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
(-[WebPreviewLoader connectionDidFinishLoading:]):
(isQuickLookPasswordError):
(-[WebPreviewLoader connection:didFailWithError:]):
(WebCore::PreviewLoader::PreviewLoader):
(WebCore::PreviewLoader::~PreviewLoader):
(WebCore::PreviewLoader::shouldCreateForMIMEType):
(WebCore::PreviewLoader::create):
(WebCore::PreviewLoader::didReceiveData):
(WebCore::PreviewLoader::didReceiveBuffer):
(WebCore::PreviewLoader::didFinishLoading):
(WebCore::PreviewLoader::didFail):
(WebCore::PreviewLoader::setClientForTesting):

  • loader/ios/QuickLook.h:

(): Deleted.

  • loader/ios/QuickLook.mm:

(WebCore::QLPreviewGetSupportedMIMETypesSet):
(WebCore::removeQLPreviewConverterForURL):
(WebCore::registerQLPreviewConverterIfNeeded):
(WebCore::QLPreviewProtocol):
(WebCore::isQuickLookPreviewURL):
(qlPreviewConverterDictionaryMutex): Deleted.
(QLPreviewConverterDictionary): Deleted.
(QLContentDictionary): Deleted.
(addQLPreviewConverterWithFileForURL): Deleted.
(createQLPreviewProtocol): Deleted.
(testingClient): Deleted.
(emptyClient): Deleted.
(-[WebPreviewLoader initWithResourceLoader:resourceResponse:quickLookHandle:]): Deleted.
(-[WebPreviewLoader appendDataArray:]): Deleted.
(-[WebPreviewLoader finishedAppending]): Deleted.
(-[WebPreviewLoader failed]): Deleted.
(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]): Deleted.
(-[WebPreviewLoader connection:didReceiveData:lengthReceived:]): Deleted.
(-[WebPreviewLoader connectionDidFinishLoading:]): Deleted.
(isQuickLookPasswordError): Deleted.
(-[WebPreviewLoader connection:didFailWithError:]): Deleted.
(WebCore::QuickLookHandle::QuickLookHandle): Deleted.
(WebCore::QuickLookHandle::~QuickLookHandle): Deleted.
(WebCore::QuickLookHandle::shouldCreateForMIMEType): Deleted.
(WebCore::QuickLookHandle::create): Deleted.
(WebCore::QuickLookHandle::didReceiveData): Deleted.
(WebCore::QuickLookHandle::didReceiveBuffer): Deleted.
(WebCore::QuickLookHandle::didFinishLoading): Deleted.
(WebCore::QuickLookHandle::didFail): Deleted.
(WebCore::QuickLookHandle::setClientForTesting): Deleted.

  • platform/network/ResourceHandle.h:
  • platform/network/ios/PreviewLoaderClient.h: Renamed from Source/WebCore/platform/network/ios/QuickLookHandleClient.h.

(WebCore::PreviewLoaderClient::~PreviewLoaderClient):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setQuickLookPassword):

  • testing/MockPreviewLoaderClient.cpp: Renamed from Source/WebCore/testing/MockQuickLookHandleClient.cpp.

(WebCore::MockPreviewLoaderClient::singleton):
(WebCore::MockPreviewLoaderClient::didRequestPassword):

  • testing/MockPreviewLoaderClient.h: Renamed from Source/WebCore/testing/MockQuickLookHandleClient.h.

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::createPreviewLoaderClient):
(WebFrameLoaderClient::createQuickLookHandleClient): Deleted.

Source/WebKit2:

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:

(WebKit::WebFrameLoaderClient::createPreviewLoaderClient):
(WebKit::WebFrameLoaderClient::createQuickLookHandleClient): Deleted.

  • WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp.

(WebKit::WebPreviewLoaderClient::WebPreviewLoaderClient):
(WebKit::WebPreviewLoaderClient::~WebPreviewLoaderClient):
(WebKit::WebPreviewLoaderClient::didReceiveDataArray):
(WebKit::WebPreviewLoaderClient::didFinishLoading):
(WebKit::WebPreviewLoaderClient::didFail):
(WebKit::WebPreviewLoaderClient::didRequestPassword):
(WebKit::WebPreviewLoaderClient::didReceivePassword):

  • WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h.
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::didReceivePasswordForQuickLookDocument):

11:07 AM Changeset in webkit [214265] by commit-queue@webkit.org
  • 8 edits in trunk

[Readable Streams API] Implement ReadableStreamBYOBRequest respond() (readable stream state)
https://bugs.webkit.org/show_bug.cgi?id=169759

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-03-22
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Updated test expectations.

  • web-platform-tests/streams/readable-byte-streams/general-expected.txt:
  • web-platform-tests/streams/readable-byte-streams/general.dedicatedworker-expected.txt:

Source/WebCore:

Implemented readable state part of respond() function. Parts of code cannot
currently be reached as they require ReadableStreamBYOBReader to be implemented.

Added new tests and updated expectations.

  • Modules/streams/ReadableByteStreamInternals.js:

(readableByteStreamControllerEnqueue): Name shortened.
(readableByteStreamControllerRespondInternal): Updated with readable state case.
(cloneArrayBuffer): Added.
(readableByteStreamControllerRespondInReadableState): Added.
(readableByteStreamControllerRespondInClosedState): Updated.
(readableByteStreamControllerProcessPullDescriptors): Added.
(readableByteStreamControllerFillDescriptorFromQueue): Added.
(readableByteStreamControllerShiftPendingDescriptor): Name shortened.
(readableByteStreamControllerCommitDescriptor): Name shortened.
(readableByteStreamControllerConvertDescriptor): Name shortened.

LayoutTests:

Added new tests to check code that can currently be reached.

  • streams/readable-stream-byob-request-expected.txt: Updated.
  • streams/readable-stream-byob-request.js: Updated.
11:04 AM Changeset in webkit [214264] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

[WK2] Add SPI to notify clients when data interaction is beginning or ending
https://bugs.webkit.org/show_bug.cgi?id=169952
<rdar://problem/31187804>

Reviewed by Beth Dakin.

Adds two new UI delegate SPI hooks.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
11:02 AM Changeset in webkit [214263] by commit-queue@webkit.org
  • 2 edits
    2 adds
    2 deletes in trunk/LayoutTests

Move LayoutTests/webrtc/rtcconfiguration-icecandidatepoolsize.html to web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=169958

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-22
Reviewed by Jon Lee.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/rtcpeerconnection/rtcconfiguration-icecandidatepoolsize-expected.txt: Added.
  • web-platform-tests/webrtc/rtcpeerconnection/rtcconfiguration-icecandidatepoolsize.html: Added.

LayoutTests:

  • webrtc/rtcconfiguration-icecandidatepoolsize-expected.txt: Removed.
  • webrtc/rtcconfiguration-icecandidatepoolsize.html: Removed.
11:00 AM Changeset in webkit [214262] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

RTCPeerConnection is crashing if no backend is created
https://bugs.webkit.org/show_bug.cgi?id=169938

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-22
Reviewed by Geoffrey Garen.

RTCPeerConnection should not be visible if it is not able to create a backend.
In case when this happens anyway, it should be able to be stopped and destroyed without crashing.
To do so, we need to set its state to closed.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::close): Cosmetic change, just in case stop becomes reentrant at some point.

10:56 AM Changeset in webkit [214261] by jfbastien@apple.com
  • 13 edits in trunk/Source/JavaScriptCore

WebAssembly: name ExecState consistently
https://bugs.webkit.org/show_bug.cgi?id=169954

Reviewed by Saam Barati.

No functional change.

  • wasm/js/JSWebAssemblyCompileError.cpp:

(JSC::JSWebAssemblyCompileError::create):
(JSC::createJSWebAssemblyCompileError):

  • wasm/js/JSWebAssemblyCompileError.h:

(JSC::JSWebAssemblyCompileError::create):

  • wasm/js/JSWebAssemblyLinkError.cpp:

(JSC::JSWebAssemblyLinkError::create):
(JSC::createJSWebAssemblyLinkError):

  • wasm/js/JSWebAssemblyLinkError.h:

(JSC::JSWebAssemblyLinkError::create):

  • wasm/js/JSWebAssemblyRuntimeError.cpp:

(JSC::JSWebAssemblyRuntimeError::create):

  • wasm/js/JSWebAssemblyRuntimeError.h:

(JSC::JSWebAssemblyRuntimeError::create):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::callJSWebAssemblyInstance):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::callJSWebAssemblyMemory):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::callJSWebAssemblyModule):
(JSC::WebAssemblyModuleConstructor::createModule):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::dataSegmentFail):
(JSC::WebAssemblyModuleRecord::evaluate):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyFunctionValidate):
(JSC::webAssemblyFunctionCompile):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::callJSWebAssemblyTable):

10:54 AM Changeset in webkit [214260] by jfbastien@apple.com
  • 2 edits in trunk/JSTests

WebAssembly: test module namespace object for WebAssembly.Instance
https://bugs.webkit.org/show_bug.cgi?id=169951

Reviewed by Saam Barati.

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

10:52 AM Changeset in webkit [214259] by jfbastien@apple.com
  • 6 edits in trunk

WebAssembly: constructors without new don't throw
https://bugs.webkit.org/show_bug.cgi?id=165995

Reviewed by Saam Barati.

JSTests:

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

Source/JavaScriptCore:

  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:

(JSC::constructJSWebAssemblyCompileError):
(JSC::callJSWebAssemblyCompileError):

  • wasm/js/WebAssemblyLinkErrorConstructor.cpp:

(JSC::constructJSWebAssemblyLinkError):
(JSC::callJSWebAssemblyLinkError):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::constructJSWebAssemblyRuntimeError):
(JSC::callJSWebAssemblyRuntimeError):

10:51 AM Changeset in webkit [214258] by graouts@webkit.org
  • 5 edits in trunk

[Modern Media Controls] Rendering glitches for fullscreen controls while dragging
https://bugs.webkit.org/show_bug.cgi?id=169949
<rdar://problem/30687803>

Reviewed by Eric Carlson.

Source/WebCore:

Clipping the controls bar has some unwelcome side effects and isn't necessary, so
we simply remove it. An existing test was amended to check that there is no clipping
applied to the controls bar.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen > .controls-bar):

LayoutTests:

Add an assertion that checks that the controls bar is not clipped.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles.html:
10:48 AM Changeset in webkit [214257] by wilander@apple.com
  • 2 edits in trunk/Source/WebCore

Add back the null check in TextureCacheCV::textureFromImage()
https://bugs.webkit.org/show_bug.cgi?id=169931
<rdar://problem/27139820>

Reviewed by Alex Christensen.

No new tests. Just adding back a check that was previously there.

  • platform/graphics/cv/TextureCacheCV.mm:

(WebCore::TextureCacheCV::textureFromImage):

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

Web Inspector: Clicking DOM breakpoint marker should enable/disable breakpoints
https://bugs.webkit.org/show_bug.cgi?id=169856
<rdar://problem/31133090>

Reviewed by Joseph Pecoraro.

Clicking DOM breakpoint marker should enable/disable breakpoints,
matching the behavior of the marker's context menu:

  • If one or more breakpoints are disabled, click enables all
  • If all breakpoints are enabled, click disables all
  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype._updateBreakpointStatus):
(WebInspector.DOMTreeElement.prototype._statusImageClicked):

10:19 AM Changeset in webkit [214255] by Antti Koivisto
  • 12 edits in trunk/Source/WebCore

Use AtomicString in RuleSet and RuleFeature
https://bugs.webkit.org/show_bug.cgi?id=119310
<rdar://problem/28214658>

Reviewed by Andreas Kling.

..instead of the plain AtomicStringImpl*. This introduces some ref churn but not too much.

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::ancestorClassRules):
(WebCore::DocumentRuleSets::ancestorAttributeRulesForHTML):

  • css/DocumentRuleSets.h:
  • css/ElementRuleCollector.cpp:

(WebCore::ElementRuleCollector::collectMatchingRules):
(WebCore::ElementRuleCollector::collectMatchingShadowPseudoElementRules):

  • css/RuleFeature.cpp:

(WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
(WebCore::makeAttributeSelectorKey):
(WebCore::RuleFeatureSet::collectFeatures):

  • css/RuleFeature.h:
  • css/RuleSet.cpp:

(WebCore::RuleSet::addToRuleSet):
(WebCore::rulesCountForName):
(WebCore::RuleSet::addRule):

  • css/RuleSet.h:

(WebCore::RuleSet::idRules):
(WebCore::RuleSet::classRules):
(WebCore::RuleSet::shadowPseudoElementRules):
(WebCore::RuleSet::tagRules):

  • css/StyleResolver.h:

(WebCore::StyleResolver::hasSelectorForAttribute):
(WebCore::StyleResolver::hasSelectorForClass):
(WebCore::StyleResolver::hasSelectorForId):

  • style/AttributeChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByAttributeChange):
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):

  • style/IdChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByHostRules):
(WebCore::Style::mayBeAffectedBySlottedRules):
(WebCore::Style::IdChangeInvalidation::invalidateStyle):

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::resolve):
(WebCore::Style::SharingResolver::canShareStyleWithElement):
(WebCore::Style::SharingResolver::classNamesAffectedByRules):

10:18 AM Changeset in webkit [214254] by commit-queue@webkit.org
  • 6 edits in trunk

Safari sends empty "Access-Control-Request-Headers" in preflight request
https://bugs.webkit.org/show_bug.cgi?id=169851

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-22
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/cors/cors-preflight-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight.js:

Source/WebCore:

Covered by updated test.

  • loader/CrossOriginAccessControl.cpp:

(WebCore::createAccessControlPreflightRequest): Not adding "Access-Control-Request-Headers" to
request header if value is empty.

10:15 AM Changeset in webkit [214253] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[DFG] Don't use ArraySlice intrinsic on MIPS
https://bugs.webkit.org/show_bug.cgi?id=169721

Patch by Guillaume Emont <guijemont@igalia.com> on 2017-03-22
Reviewed by Yusuke Suzuki.

Like on x86, we don't have enough registers available for this.

  • assembler/CPU.h:

(JSC::isMIPS): Added.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
Don't use the ArraySlice intrinsic on MIPS.

10:14 AM Changeset in webkit [214252] by commit-queue@webkit.org
  • 6 edits in trunk

XMLHttpRequest: getAllResponseHeaders() should lowercase header names before sorting
https://bugs.webkit.org/show_bug.cgi?id=169286

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-22
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/XMLHttpRequest/getallresponseheaders-cl-expected.txt:
  • web-platform-tests/XMLHttpRequest/getallresponseheaders-expected.txt:

Source/WebCore:

Covered by rebased tests.

https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method now mandates to lowercase the header names and
sort them before appending them. This ensures that differences in the way headers are processed by browsers are
not visible to web pages. This also moves towards lowercased/case-insensitive header processing which should be
the norm.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::getAllResponseHeaders): Lower-casing, then sorting, then serializing headers.

  • xml/XMLHttpRequest.h: Storing getAllResponseHeaders result if case needed again.
9:15 AM Changeset in webkit [214251] by Chris Dumez
  • 8 edits
    1 copy
    17 adds in trunk

Implement the "noopener" feature for window.open()
https://bugs.webkit.org/show_bug.cgi?id=163960
<rdar://problem/28941679>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Import test coverage from WPT upstream.

  • resources/import-expectations.json:
  • web-platform-tests/common/PrefixedLocalStorage.js: Added.

(PrefixedLocalStorage):
(PrefixedLocalStorage.prototype.clear):
(PrefixedLocalStorage.prototype.url):
(PrefixedLocalStorage.prototype.prefixedKey):
(PrefixedLocalStorage.prototype.setItem):
(PrefixedLocalStorage.prototype.onSet):
(PrefixedLocalStorageTest):
(PrefixedLocalStorageTest.prototype.cleanup):
(PrefixedLocalStorageResource):

  • web-platform-tests/common/w3c-import.log:
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-closed-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-closed.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-multiple-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-multiple.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noreferrer-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noreferrer.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/resources/close-opener.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/resources/message-window-opener.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/resources/multiple-opener.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/resources/no-opener.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/resources/open-closer.html: Added.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/w3c-import.log.
  • web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/w3c-import.log:

Source/WebCore:

Implement the "noopener" feature for window.open(). If 'noopener' is passed to window.open()
then the new Window's opener property will be null.

Tests: imported/w3c/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-closed.html

imported/w3c/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-multiple.html
imported/w3c/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html
imported/w3c/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noreferrer.html
imported/w3c/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener.html

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

  • page/WindowFeatures.cpp:

(WebCore::parseWindowFeatures):
(WebCore::setWindowFeature):

  • page/WindowFeatures.h:
7:36 AM Changeset in webkit [214250] by clopez@igalia.com
  • 2 edits in trunk/Tools

[Linux] determineArchitecture is not cross-compile aware
https://bugs.webkit.org/show_bug.cgi?id=169886

Reviewed by Michael Catanzaro.

Try to detect the target architecture name from the GCC triplet
when cross-building.

The aarch64 architecture is renamed to arm64 (this is coherent with
the rest of the perl tooling that consults the architecture determined
in determineArchitecture(), the check for this arch is always done
with the arm64 name).

  • Scripts/webkitdirs.pm: Remove the isARM() function: its dead code

and not cross-build aware.
(determineArchitecture): When crossbuilding, try to detect the target
architecture name from the GCC triplet.
Remove also the fallback option to run the arch command, because this
command doesn't print the expected on Mac/BSD, and on Linux is the
same than uname -m. See https://bugs.webkit.org/show_bug.cgi?id=152958#c6
(isCrossCompilation): Some cross-compilers (buildroot one for example)
don't define the --host option. Add another option to detect that
we are cross-building by building a dummy program and checking if
we can run it.

4:59 AM Changeset in webkit [214249] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline fast/text/hyphenate-limit-lines.html.

  • platform/gtk/fast/text/hyphenate-limit-lines-expected.txt:
4:55 AM Changeset in webkit [214248] by Carlos Garcia Campos
  • 1 edit
    1 delete in trunk/LayoutTests

Unreviewed GTK+ gardening. Remove platform expectation after r214246.

  • platform/gtk/http/tests/loading/server-redirect-for-provisional-load-caching-expected.txt: Removed.
4:50 AM Changeset in webkit [214247] by Carlos Garcia Campos
  • 15 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline several tests after r214244.

  • platform/gtk/accessibility/file-upload-button-stringvalue-expected.txt:
  • platform/gtk/fast/forms/box-shadow-override-expected.png:
  • platform/gtk/fast/forms/box-shadow-override-expected.txt:
  • platform/gtk/fast/forms/file/file-input-direction-expected.png:
  • platform/gtk/fast/forms/file/file-input-direction-expected.txt:
  • platform/gtk/fast/forms/file/file-input-disabled-expected.png:
  • platform/gtk/fast/forms/file/file-input-disabled-expected.txt:
  • platform/gtk/fast/forms/form-element-geometry-expected.png:
  • platform/gtk/fast/forms/form-element-geometry-expected.txt:
  • platform/gtk/fast/forms/input-appearance-height-expected.png:
  • platform/gtk/fast/forms/input-appearance-height-expected.txt:
  • platform/gtk/fast/forms/input-value-expected.txt:
  • platform/gtk/media/video-controls-captions-trackmenu-localized-expected.txt:
  • platform/gtk/media/video-controls-captions-trackmenu-sorted-expected.txt:
3:09 AM Changeset in webkit [214246] by svillar@igalia.com
  • 5 edits
    2 adds in trunk

[Soup] "Only from websites I visit" cookie policy is broken
https://bugs.webkit.org/show_bug.cgi?id=168912

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Do not reset the first party for cookies on redirects. That's properly done for the main
resource in DocumentLoader::willSendRequest and, in the case of subresources, is absolutely
wrong (which is what we were doing since r143931).

The most notable effect was that subresources loaded via redirects were effectively
bypassing the "no third party" policy for cookies.

Test: http/tests/security/cookies/third-party-cookie-blocking-redirect.html

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::doRedirect):

Source/WebKit2:

Do not reset the first party for cookies on redirects. That's properly done for the main
resource in DocumentLoader::willSendRequest and, in the case of subresources, is absolutely
wrong (which is what we were doing since r143931).

The most notable effect was that subresources loaded via redirects were effectively
bypassing the "no third party" policy for cookies.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):

LayoutTests:

  • http/tests/security/cookies/third-party-cookie-blocking-redirect-expected.txt: Added.
  • http/tests/security/cookies/third-party-cookie-blocking-redirect.html: Added.
3:07 AM Changeset in webkit [214245] by svillar@igalia.com
  • 2 edits in trunk/LayoutTests

All http/ tests with PHP fail in Debian unstable with php7
https://bugs.webkit.org/show_bug.cgi?id=169913

Reviewed by Michael Catanzaro.

The problem is that the configuration file was still checking for php5 instead of php7.

  • http/conf/debian-httpd-2.4-php7.conf:
2:55 AM Changeset in webkit [214244] by Carlos Garcia Campos
  • 12 edits in trunk/Source/WebCore

Make it possible to use WEB_UI_STRING macros to mark translatable strings in glib based ports
https://bugs.webkit.org/show_bug.cgi?id=169672

Reviewed by Michael Catanzaro.

Source/WebCore:

WEB_UI_STRING macros are currently used by Cocoa based ports and Windows port. For other ports it simply returns
the given string, but it's not translated. In the GTK+ port we have all translatable strings from
LocalizedStrings.cpp copied in LocalizedStringsGtk.cpp to use the glib macros to mark them as translatable. In
most of the cases the strings are exactly in the same, in some others (the context menu ones) the string only
differs in the mnemonics used by GTK, and only in a few cases the strings are different. We could remove most of
that duplication if strings used by WEB_UI_STRING were marked as translatable in glib based ports too.

This patch makes that possible with the following changes:

  • Add WEB_UI_STRING_WITH_MNEMONIC() to handle the cases where the strings only differ in the mnemonics. It receives the string with mnemonics that is ignored in all ports except GTK+.
  • All platform specific strings have been moved to the platform files, to ensure scanners don't include strings from other ports.
  • For the same reason a new macro WEB_UI_CFSTRING has been also added, just to make sure that CF strings are only used by CF based ports. The implementation is the same as WEB_UI_STRING, it only changes the name to not confuse the scanners.
  • And again for the same reason, for non-CF and non-Glib cases WEB_UI_STRING is not used, since in those cases strings are not really translated and String::fromUTF8() is actually used. So, now we use String::fromUTF8() directly instead of WEB_UI_STRING to not confuse the scanners.
  • CMakeLists.txt: Add LocalizedStrings.cpp to the compilation.
  • PlatformGTK.cmake: Move LocalizedStringsGtk.cpp to the list of sources not depending on GTK+, since it no

longer uses GTK+.

  • extract-localizable-strings.pl: Update it to handle the new macros.
  • platform/LocalizedStrings.cpp:

(WebCore::formatLocalizedString):
(WebCore::contextMenuItemTagOpenLinkInNewWindow):
(WebCore::contextMenuItemTagDownloadLinkToDisk):
(WebCore::contextMenuItemTagOpenImageInNewWindow):
(WebCore::contextMenuItemTagCopyImageToClipboard):
(WebCore::contextMenuItemTagOpenFrameInNewWindow):
(WebCore::contextMenuItemTagCopy):
(WebCore::contextMenuItemTagGoBack):
(WebCore::contextMenuItemTagGoForward):
(WebCore::contextMenuItemTagStop):
(WebCore::contextMenuItemTagReload):
(WebCore::contextMenuItemTagCut):
(WebCore::contextMenuItemTagPaste):
(WebCore::contextMenuItemTagIgnoreSpelling):
(WebCore::contextMenuItemTagLearnSpelling):
(WebCore::contextMenuItemTagLookUpInDictionary):
(WebCore::contextMenuItemTagOpenLink):
(WebCore::contextMenuItemTagIgnoreGrammar):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckSpelling):
(WebCore::contextMenuItemTagCheckSpellingWhileTyping):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagFontMenu):
(WebCore::contextMenuItemTagBold):
(WebCore::contextMenuItemTagItalic):
(WebCore::contextMenuItemTagUnderline):
(WebCore::contextMenuItemTagOutline):
(WebCore::contextMenuItemTagOpenVideoInNewWindow):
(WebCore::contextMenuItemTagOpenAudioInNewWindow):
(WebCore::contextMenuItemTagDownloadVideoToDisk):
(WebCore::contextMenuItemTagDownloadAudioToDisk):
(WebCore::contextMenuItemTagExitVideoFullscreen):
(WebCore::contextMenuItemTagMediaPlay):
(WebCore::contextMenuItemTagMediaPause):
(WebCore::contextMenuItemTagMediaMute):
(WebCore::contextMenuItemTagInspectElement):
(WebCore::AXAutoFillContactsLabel):
(WebCore::imageTitle):
(WebCore::validationMessageRangeUnderflowText):
(WebCore::validationMessageRangeOverflowText):
(WebCore::textTrackCountryAndLanguageMenuItemText):
(WebCore::textTrackLanguageMenuItemText):
(WebCore::closedCaptionTrackMenuItemText):
(WebCore::sdhTrackMenuItemText):
(WebCore::easyReaderTrackMenuItemText):
(WebCore::forcedTrackMenuItemText):
(WebCore::audioDescriptionTrackSuffixText):
(WebCore::webCryptoMasterKeyKeychainLabel):

  • platform/LocalizedStrings.h:
  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::copyImageUnknownFileLabel):
(WebCore::contextMenuItemTagSearchInSpotlight):
(WebCore::contextMenuItemTagSearchWeb):
(WebCore::contextMenuItemTagShowFonts):
(WebCore::contextMenuItemTagStyles):
(WebCore::contextMenuItemTagShowColors):
(WebCore::contextMenuItemTagSpeechMenu):
(WebCore::contextMenuItemTagStartSpeaking):
(WebCore::contextMenuItemTagStopSpeaking):
(WebCore::contextMenuItemTagCorrectSpellingAutomatically):
(WebCore::contextMenuItemTagSubstitutionsMenu):
(WebCore::contextMenuItemTagShowSubstitutions):
(WebCore::contextMenuItemTagSmartCopyPaste):
(WebCore::contextMenuItemTagSmartQuotes):
(WebCore::contextMenuItemTagSmartDashes):
(WebCore::contextMenuItemTagSmartLinks):
(WebCore::contextMenuItemTagTextReplacement):
(WebCore::contextMenuItemTagTransformationsMenu):
(WebCore::contextMenuItemTagMakeUpperCase):
(WebCore::contextMenuItemTagMakeLowerCase):
(WebCore::contextMenuItemTagCapitalize):
(WebCore::contextMenuItemTagChangeBack):
(WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen):
(WebCore::contextMenuItemTagExitVideoEnhancedFullscreen):
(WebCore::AXARIAContentGroupText):
(WebCore::AXHorizontalRuleDescriptionText):
(WebCore::AXMarkText):
(WebCore::AXMeterGaugeRegionOptimumText):
(WebCore::AXMeterGaugeRegionSuboptimalText):
(WebCore::AXMeterGaugeRegionLessGoodText):
(WebCore::builtInPDFPluginName):
(WebCore::pdfDocumentTypeDescription):
(WebCore::postScriptDocumentTypeDescription):
(WebCore::keygenMenuItem2048):
(WebCore::keygenKeychainItemName):
(WebCore::htmlSelectMultipleItems):
(WebCore::fileButtonChooseMediaFileLabel):
(WebCore::fileButtonChooseMultipleMediaFilesLabel):
(WebCore::fileButtonNoMediaFileSelectedLabel):
(WebCore::fileButtonNoMediaFilesSelectedLabel):
(WebCore::insertListTypeNone):
(WebCore::insertListTypeBulleted):
(WebCore::insertListTypeBulletedAccessibilityTitle):
(WebCore::insertListTypeNumbered):
(WebCore::insertListTypeNumberedAccessibilityTitle):
(WebCore::exitFullScreenButtonAccessibilityTitle):

  • platform/gtk/LocalizedStringsGtk.cpp:

(WebCore::contextMenuItemTagDelete):
(WebCore::contextMenuItemTagSelectAll):

  • platform/win/LocalizedStringsWin.cpp:

(WebCore::contextMenuItemTagSearchWeb):
(WebCore::uploadFileText):
(WebCore::allFilesText):

Source/WebCore/platform/gtk/po:

  • CMakeLists.txt: Add keyword parameters for WEB_UI_STRING macros.
  • POTFILES.in: Add LocalizedStrings.cpp to the list.
1:41 AM Changeset in webkit [214243] by Carlos Garcia Campos
  • 3 edits
    3 adds in trunk

[GTK] Several WPT tests are failing since they were added in the last update in r213882
https://bugs.webkit.org/show_bug.cgi?id=169915

Reviewed by Michael Catanzaro.

Tools:

Add libsoup patch to not fail loads when there's no empty line after the headers in responses with no body.

  • gtk/jhbuild.modules:
  • gtk/patches/libsoup-soup-message-io-Do-not-fail-when-there-s-no-empty-li.patch: Added.

LayoutTests:

They fail because libsoup fails to load the requests because the response doesn't include the empty line after the
headers while other browsers allow that. Even with libsoup patched we still need platform specific expectations
for imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders.htm, because libsoup caches all header
names, so the first time foo-test header is cached and then always used no matter what case is used. The results
are still valid in any case.

  • platform/gtk/imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-expected.txt: Added.
12:15 AM Changeset in webkit [214242] by mmaxfield@apple.com
  • 5 edits in trunk

[iOS] Migrate off of CTFontCreateForCSS
https://bugs.webkit.org/show_bug.cgi?id=168894

Reviewed by Antti Koivisto.

Source/WebCore:

Use the new font selection algorithm introduced in r213163 on iOS.

Test: fast/text/font-weights.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:
  • platform/graphics/cocoa/FontCocoa.mm: On iOS only, CTFontCreateForCSS()

will return a 0-sized font if the passed size parameter is 0. However, all
other CT APIs will create a 12-px-sized font if the passed size parameter is

  1. Most of our code knows and understands this (because this is how it works

on the Mac). However, this one place needs to be updated to understand this.

LayoutTests:

  • platform/ios-simulator/fast/text/font-weights-expected.txt:
Note: See TracTimeline for information about the timeline view.