[webkit-changes] [239153] trunk

2018-12-12 Thread yusukesuzuki
Title: [239153] trunk








Revision 239153
Author yusukesuz...@slowstart.org
Date 2018-12-12 23:13:38 -0800 (Wed, 12 Dec 2018)


Log Message
[JSC] Optimize Object.keys by caching own keys results in StructureRareData
https://bugs.webkit.org/show_bug.cgi?id=190047

Reviewed by Keith Miller.

JSTests:

* stress/object-keys-cached-zero.js: Added.
(shouldBe):
(test):
* stress/object-keys-changed-attribute.js: Added.
(shouldBe):
(test):
* stress/object-keys-changed-index.js: Added.
(shouldBe):
(test):
* stress/object-keys-changed.js: Added.
(shouldBe):
(test):
* stress/object-keys-indexed-non-cache.js: Added.
(shouldBe):
(test):
* stress/object-keys-overrides-get-property-names.js: Added.
(shouldBe):
(test):
(noInline):

Source/_javascript_Core:

Object.keys is one of the most frequently used function in web-tooling-benchmarks (WTB).
Object.keys is dominant in lebab of WTB, and frequently called in babel and others.
Since our Structure knows the shape of JSObject, we can cache the result of Object.keys
in Structure (StructureRareData) as we cache JSPropertyNameEnumerator in StructureRareData.

This patch caches the result of Object.keys in StructureRareData. The cached array is created
as JSImmutableButterfly. And Object.keys creates CoW from this data. Currently, the lifetime
strategy of this JSImmutableButterfly is the same to cached JSPropertyNameEnumerator. It is
referenced from Structure, and collected when Structure is collected.

This improves several benchmarks in SixSpeed.

baseline  patched

object-assign.es5  350.1710+-3.6303 ^226.0368+-4.7558^ definitely 1.5492x faster
for-of-object.es6  269.1941+-3.3430 ^127.9317+-2.3875^ definitely 2.1042x faster

And it improves WTB lebab by 11.8%.

Before: lebab:  6.10 runs/s
After:  lebab:  6.82 runs/s

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToNewArrayBuffer):
* dfg/DFGNode.h:
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectKeys):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectKeys):
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* runtime/JSImmutableButterfly.h:
(JSC::JSImmutableButterfly::createSentinel):
* runtime/ObjectConstructor.cpp:
(JSC::ownPropertyKeys):
* runtime/Structure.cpp:
(JSC::Structure::canCachePropertyNameEnumerator const):
* runtime/Structure.h:
* runtime/StructureInlines.h:
(JSC::Structure::setCachedOwnKeys):
(JSC::Structure::cachedOwnKeys const):
(JSC::Structure::canCacheOwnKeys const):
* runtime/StructureRareData.cpp:
(JSC::StructureRareData::visitChildren):
(JSC::StructureRareData::cachedPropertyNameEnumerator const): Deleted.
(JSC::StructureRareData::setCachedPropertyNameEnumerator): Deleted.
* runtime/StructureRareData.h:
* runtime/StructureRareDataInlines.h:
(JSC::StructureRareData::cachedPropertyNameEnumerator const):
(JSC::StructureRareData::setCachedPropertyNameEnumerator):
(JSC::StructureRareData::cachedOwnKeys const):
(JSC::StructureRareData::cachedOwnKeysConcurrently const):
(JSC::StructureRareData::setCachedOwnKeys):
(JSC::StructureRareData::previousID const): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Modified Paths

trunk/JSTests/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h
trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp
trunk/Source/_javascript_Core/dfg/DFGClobberize.h
trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp
trunk/Source/_javascript_Core/dfg/DFGDoesGC.cpp
trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp
trunk/Source/_javascript_Core/dfg/DFGNode.cpp
trunk/Source/_javascript_Core/dfg/DFGNode.h
trunk/Source/_javascript_Core/dfg/DFGNodeType.h
trunk/Source/_javascript_Core/dfg/DFGOperations.cpp
trunk/Source/_javascript_Core/dfg/DFGOperations.h
trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp
trunk/Source/_javascript_Core/dfg/DFGSafeToExecute.h
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h

[webkit-changes] [239152] trunk/Source/WebKitLegacy/win

2018-12-12 Thread Hironori . Fujii
Title: [239152] trunk/Source/WebKitLegacy/win








Revision 239152
Author hironori.fu...@sony.com
Date 2018-12-12 22:51:06 -0800 (Wed, 12 Dec 2018)


Log Message
[Win][Clang][WebKitLegacy] warning: expected a qualified name after 'typename' of COMEnumVariant and COMPropertyBag
https://bugs.webkit.org/show_bug.cgi?id=192617

Reviewed by Alex Christensen.

* COMEnumVariant.h:
(COMEnumVariant::adopt): Removed 'typename' from non dependent names.
(COMEnumVariant::createInstance): Ditto.
(COMEnumVariant::Next): Prepend 'typename' for dependent names.
* COMPropertyBag.h:
(HashType>::createInstance): Removed 'typename' from non dependent names.
(HashType>::adopt): Ditto.
(HashType>::Read): Replaced dependent name 'HashMapType::const_iterator' with 'auto'.
(HashType>::GetPropertyInfo): Ditto.

Modified Paths

trunk/Source/WebKitLegacy/win/COMEnumVariant.h
trunk/Source/WebKitLegacy/win/COMPropertyBag.h
trunk/Source/WebKitLegacy/win/ChangeLog




Diff

Modified: trunk/Source/WebKitLegacy/win/COMEnumVariant.h (239151 => 239152)

--- trunk/Source/WebKitLegacy/win/COMEnumVariant.h	2018-12-13 06:44:39 UTC (rev 239151)
+++ trunk/Source/WebKitLegacy/win/COMEnumVariant.h	2018-12-13 06:51:06 UTC (rev 239152)
@@ -69,7 +69,7 @@
 
 // COMEnumVariant --
 template
-COMEnumVariant* COMEnumVariant::adopt(ContainerType& container) 
+COMEnumVariant* COMEnumVariant::adopt(ContainerType& container) 
 {
 COMEnumVariant* instance = new COMEnumVariant;
 instance->m_container.swap(container);
@@ -79,7 +79,7 @@
 }
 
 template
-COMEnumVariant* COMEnumVariant::createInstance(const ContainerType& container)
+COMEnumVariant* COMEnumVariant::createInstance(const ContainerType& container)
 {
 COMEnumVariant* instance = new COMEnumVariant(container);
 instance->AddRef();
@@ -135,7 +135,7 @@
 if (m_currentPos == m_container.end())
 return S_FALSE;
 
-COMVariantSetter::setVariant([i], *m_currentPos);
+COMVariantSetter::setVariant([i], *m_currentPos);
 ++m_currentPos;
 if (pCeltFetched)
 (*pCeltFetched)++;


Modified: trunk/Source/WebKitLegacy/win/COMPropertyBag.h (239151 => 239152)

--- trunk/Source/WebKitLegacy/win/COMPropertyBag.h	2018-12-13 06:44:39 UTC (rev 239151)
+++ trunk/Source/WebKitLegacy/win/COMPropertyBag.h	2018-12-13 06:51:06 UTC (rev 239152)
@@ -77,7 +77,7 @@
 
 // COMPropertyBag --
 template
-COMPropertyBag* COMPropertyBag::createInstance(const HashMapType& hashMap)
+COMPropertyBag* COMPropertyBag::createInstance(const HashMapType& hashMap)
 {
 COMPropertyBag* instance = new COMPropertyBag(hashMap);
 instance->AddRef();
@@ -85,7 +85,7 @@
 }
 
 template
-COMPropertyBag* COMPropertyBag::adopt(HashMapType& hashMap)
+COMPropertyBag* COMPropertyBag::adopt(HashMapType& hashMap)
 {
 COMPropertyBag* instance = new COMPropertyBag;
 instance->m_hashMap.swap(hashMap);
@@ -137,8 +137,8 @@
 if (!pszPropName)
 return E_POINTER;
 
-HashMapType::const_iterator it = m_hashMap.find(String(pszPropName));
-HashMapType::const_iterator end = m_hashMap.end();
+auto it = m_hashMap.find(String(pszPropName));
+auto end = m_hashMap.end();
 if (it == end)
 return E_INVALIDARG;
 
@@ -205,9 +205,8 @@
 return E_INVALIDARG;
 
 *pcProperties = 0;
-typedef HashMapType::const_iterator Iterator;
-Iterator current = m_hashMap.begin();
-Iterator end = m_hashMap.end();
+auto current = m_hashMap.begin();
+auto end = m_hashMap.end();
 for (ULONG i = 0; i < iProperty; ++i, ++current)
 ;
 for (ULONG j = 0; j < cProperties && current != end; ++j, ++current) {


Modified: trunk/Source/WebKitLegacy/win/ChangeLog (239151 => 239152)

--- trunk/Source/WebKitLegacy/win/ChangeLog	2018-12-13 06:44:39 UTC (rev 239151)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2018-12-13 06:51:06 UTC (rev 239152)
@@ -1,5 +1,22 @@
 2018-12-12  Fujii Hironori  
 
+[Win][Clang][WebKitLegacy] warning: expected a qualified name after 'typename' of COMEnumVariant and COMPropertyBag
+https://bugs.webkit.org/show_bug.cgi?id=192617
+
+Reviewed by Alex Christensen.
+
+* COMEnumVariant.h:
+(COMEnumVariant::adopt): Removed 'typename' from non dependent names.
+(COMEnumVariant::createInstance): Ditto.
+(COMEnumVariant::Next): Prepend 'typename' for dependent names.
+* COMPropertyBag.h:
+(HashType>::createInstance): Removed 'typename' from non dependent names.
+(HashType>::adopt): Ditto.
+(HashType>::Read): Replaced dependent name 'HashMapType::const_iterator' with 'auto'.
+(HashType>::GetPropertyInfo): Ditto.
+
+2018-12-12  Fujii Hironori  
+
 [Win][Clang][WebKitLegacy] WebFrame.cpp: warning: delete called on non-final 'WebFrame' that has virtual functions but non-virtual destructor 

[webkit-changes] [239151] trunk

2018-12-12 Thread Hironori . Fujii
Title: [239151] trunk








Revision 239151
Author hironori.fu...@sony.com
Date 2018-12-12 22:44:39 -0800 (Wed, 12 Dec 2018)


Log Message
[Win][Clang][WebKitLegacy] WebFrame.cpp: warning: delete called on non-final 'WebFrame' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
https://bugs.webkit.org/show_bug.cgi?id=192618

Reviewed by Alex Christensen.

Source/WebCore:

No new tests, no behavior changes.

* platform/win/PopupMenuWin.h:
* platform/win/WCDataObject.cpp:
* platform/win/WCDataObject.h:

Source/WebKitLegacy/win:

Classes which implement COM interface usually doesn't need the
virtual destructor because it has Release() virtual method to
destruct itself.

Marked 'final' such classes to suppress clang-cl's compilation
warnings.

* COMEnumVariant.h:
* COMPropertyBag.h:
* DefaultDownloadDelegate.h:
* DefaultPolicyDelegate.h:
* MemoryStream.h:
* WebActionPropertyBag.h:
* WebApplicationCache.h:
* WebArchive.h:
* WebBackForwardList.h:
* WebCache.h:
* WebCoreStatistics.h:
* WebCoreSupport/WebEditorClient.cpp:
* WebCoreSupport/WebInspectorDelegate.h:
* WebDataSource.h:
* WebDatabaseManager.cpp:
* WebDatabaseManager.h:
* WebDownload.h:
* WebDropSource.h:
* WebElementPropertyBag.h:
* WebError.h:
* WebFrame.cpp:
* WebFrame.h:
* WebFramePolicyListener.h:
* WebGeolocationPolicyListener.h:
* WebGeolocationPosition.h:
* WebHTMLRepresentation.h:
* WebHistory.h:
* WebHistoryItem.h:
* WebInspector.h:
* WebJavaScriptCollector.h:
* WebKitClassFactory.h:
* WebKitMessageLoop.h:
* WebKitStatistics.h:
* WebMutableURLRequest.h:
* WebNavigationData.h:
* WebNotification.h:
* WebNotificationCenter.h:
* WebPreferences.h:
* WebResource.h:
* WebScriptWorld.h:
* WebSecurityOrigin.h:
* WebSerializedJSValue.h:
* WebTextRenderer.h:
* WebURLAuthenticationChallenge.h:
* WebURLAuthenticationChallengeSender.h:
* WebURLCredential.h:
* WebURLProtectionSpace.h:
* WebURLResponse.h:
* WebUserContentURLPattern.h:
* WebView.cpp:
* WebView.h:
* WebWorkersPrivate.h:

Tools:

* DumpRenderTree/win/DRTDataObject.cpp:
* DumpRenderTree/win/DRTDataObject.h:
* DumpRenderTree/win/DRTDesktopNotificationPresenter.h:
* DumpRenderTree/win/DRTDropSource.h:
* DumpRenderTree/win/EditingDelegate.h:
* DumpRenderTree/win/PolicyDelegate.h:
* DumpRenderTree/win/UIDelegate.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/win/PopupMenuWin.h
trunk/Source/WebCore/platform/win/WCDataObject.cpp
trunk/Source/WebCore/platform/win/WCDataObject.h
trunk/Source/WebKitLegacy/win/COMEnumVariant.h
trunk/Source/WebKitLegacy/win/COMPropertyBag.h
trunk/Source/WebKitLegacy/win/ChangeLog
trunk/Source/WebKitLegacy/win/DefaultDownloadDelegate.h
trunk/Source/WebKitLegacy/win/DefaultPolicyDelegate.h
trunk/Source/WebKitLegacy/win/MemoryStream.h
trunk/Source/WebKitLegacy/win/WebActionPropertyBag.h
trunk/Source/WebKitLegacy/win/WebApplicationCache.h
trunk/Source/WebKitLegacy/win/WebArchive.h
trunk/Source/WebKitLegacy/win/WebBackForwardList.h
trunk/Source/WebKitLegacy/win/WebCache.h
trunk/Source/WebKitLegacy/win/WebCoreStatistics.h
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebEditorClient.cpp
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorDelegate.h
trunk/Source/WebKitLegacy/win/WebDataSource.h
trunk/Source/WebKitLegacy/win/WebDatabaseManager.cpp
trunk/Source/WebKitLegacy/win/WebDatabaseManager.h
trunk/Source/WebKitLegacy/win/WebDownload.h
trunk/Source/WebKitLegacy/win/WebDropSource.h
trunk/Source/WebKitLegacy/win/WebElementPropertyBag.h
trunk/Source/WebKitLegacy/win/WebError.h
trunk/Source/WebKitLegacy/win/WebFrame.cpp
trunk/Source/WebKitLegacy/win/WebFrame.h
trunk/Source/WebKitLegacy/win/WebFramePolicyListener.h
trunk/Source/WebKitLegacy/win/WebGeolocationPolicyListener.h
trunk/Source/WebKitLegacy/win/WebGeolocationPosition.h
trunk/Source/WebKitLegacy/win/WebHTMLRepresentation.h
trunk/Source/WebKitLegacy/win/WebHistory.h
trunk/Source/WebKitLegacy/win/WebHistoryItem.h
trunk/Source/WebKitLegacy/win/WebInspector.h
trunk/Source/WebKitLegacy/win/WebJavaScriptCollector.h
trunk/Source/WebKitLegacy/win/WebKitClassFactory.h
trunk/Source/WebKitLegacy/win/WebKitMessageLoop.h
trunk/Source/WebKitLegacy/win/WebKitStatistics.h
trunk/Source/WebKitLegacy/win/WebMutableURLRequest.h
trunk/Source/WebKitLegacy/win/WebNavigationData.h
trunk/Source/WebKitLegacy/win/WebNotification.h
trunk/Source/WebKitLegacy/win/WebNotificationCenter.h
trunk/Source/WebKitLegacy/win/WebPreferences.h
trunk/Source/WebKitLegacy/win/WebResource.h
trunk/Source/WebKitLegacy/win/WebScriptWorld.h
trunk/Source/WebKitLegacy/win/WebSecurityOrigin.h
trunk/Source/WebKitLegacy/win/WebSerializedJSValue.h
trunk/Source/WebKitLegacy/win/WebTextRenderer.h
trunk/Source/WebKitLegacy/win/WebURLAuthenticationChallenge.h
trunk/Source/WebKitLegacy/win/WebURLAuthenticationChallengeSender.h
trunk/Source/WebKitLegacy/win/WebURLCredential.h
trunk/Source/WebKitLegacy/win/WebURLProtectionSpace.h
trunk/Source/WebKitLegacy/win/WebURLResponse.h

[webkit-changes] [239150] trunk

2018-12-12 Thread simon . fraser
Title: [239150] trunk








Revision 239150
Author simon.fra...@apple.com
Date 2018-12-12 20:46:25 -0800 (Wed, 12 Dec 2018)


Log Message
REGRESSION (r238090): CAPCHA UI jumps to the wrong location
https://bugs.webkit.org/show_bug.cgi?id=192651
rdar://problem/46531919

Reviewed by Zalan Bujtas.

Source/WebCore:

When a RenderLayer becomes non-composited because of a style change, we need to set a dirty
bit to say that descendants need their geometry updated (because they now have to
compute their positions relative to a different ancestor). This wasn't happening
in the layerStyleChanged() code path.

In the code path that did do this correctly (in the computeCompositingRequirements() tree walk),
we can address a FIXME and only dirty direct children, not all descendants (that code was
written before the child-only dirty bit existed).

Test: compositing/geometry/update-child-geometry-on-compositing-change.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::layerStyleChanged):

LayoutTests:

Testcase that makes an intermediate layer non-composited (but still a RenderLayer).

* compositing/geometry/update-child-geometry-on-compositing-change-expected.html: Added.
* compositing/geometry/update-child-geometry-on-compositing-change.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp


Added Paths

trunk/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change-expected.html
trunk/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change.html




Diff

Modified: trunk/LayoutTests/ChangeLog (239149 => 239150)

--- trunk/LayoutTests/ChangeLog	2018-12-13 03:54:13 UTC (rev 239149)
+++ trunk/LayoutTests/ChangeLog	2018-12-13 04:46:25 UTC (rev 239150)
@@ -1,3 +1,16 @@
+2018-12-12  Simon Fraser  
+
+REGRESSION (r238090): CAPCHA UI jumps to the wrong location
+https://bugs.webkit.org/show_bug.cgi?id=192651
+rdar://problem/46531919
+
+Reviewed by Zalan Bujtas.
+
+Testcase that makes an intermediate layer non-composited (but still a RenderLayer).
+
+* compositing/geometry/update-child-geometry-on-compositing-change-expected.html: Added.
+* compositing/geometry/update-child-geometry-on-compositing-change.html: Added.
+
 2018-12-12  Ryosuke Niwa  
 
 Make TextInputController.legacyAttributedString take DOM nodes and offsets


Added: trunk/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change-expected.html (0 => 239150)

--- trunk/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change-expected.html	(rev 0)
+++ trunk/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change-expected.html	2018-12-13 04:46:25 UTC (rev 239150)
@@ -0,0 +1,40 @@
+
+
+
+
+.container {
+position: relative;
+margin: 20px;
+width: 300px;
+height: 300px;
+border: 1px solid black;
+}
+.box {
+position: absolute;
+left: 50px;
+top: 50px;
+z-index: 0;
+width: 200px;
+height: 200px;
+}
+.middle {
+background-color: red;
+}
+.child {
+background-color: green;
+top: 0;
+left: 0;
+}
+.composited {
+transform: translateZ(0);
+}
+
+
+
+
+
+
+
+
+
+


Added: trunk/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change.html (0 => 239150)

--- trunk/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change.html	(rev 0)
+++ trunk/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change.html	2018-12-13 04:46:25 UTC (rev 239150)
@@ -0,0 +1,52 @@
+
+
+
+
+.container {
+position: relative;
+margin: 20px;
+width: 300px;
+height: 300px;
+border: 1px solid black;
+}
+.box {
+position: absolute;
+left: 50px;
+top: 50px;
+z-index: 0;
+width: 200px;
+height: 200px;
+}
+.middle {
+background-color: red;
+}
+.child {
+background-color: green;
+top: 0;
+left: 0;
+}
+.composited {
+transform: translateZ(0);
+}
+
+
+if (window.testRunner)
+testRunner.waitUntilDone();
+
+window.addEventListener('load', () => {
+requestAnimationFrame(() => {
+document.getElementById('target').classList.remove('composited');
+if (window.testRunner)
+

[webkit-changes] [239149] trunk

2018-12-12 Thread rniwa
Title: [239149] trunk








Revision 239149
Author rn...@webkit.org
Date 2018-12-12 19:54:13 -0800 (Wed, 12 Dec 2018)


Log Message
Make TextInputController.legacyAttributedString take DOM nodes and offsets
https://bugs.webkit.org/show_bug.cgi?id=192653

Reviewed by Wenson Hsieh.

Source/WebCore:

No new tests since there should be no observable behavioral change other than
TextInputController API in DumpRenderTree.

* editing/cocoa/HTMLConverter.h:
* editing/cocoa/HTMLConverter.mm:
(WebCore::attributedStringFromSelection):
(WebCore::attributedStringBetweenStartAndEnd): Added.

Source/WebKitLegacy/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView _legacyAttributedStringFrom:offset:to:offset:]):

Tools:

Updated TextInputController.legacyAttributedString to take DOM nodes and offsets instead of
a DOM Range object in preparation to add layout tests for HTMLConverter which crosses
shadow boundaries.

* DumpRenderTree/mac/TextInputControllerMac.m:
(+[TextInputController isSelectorExcludedFromWebScript:]): Updated the selector signature.
(+[TextInputController webScriptNameForSelector:]): Ditto.
(-[TextInputController legacyAttributedString:offset:to:offset:]): Made this function take
start node and offset then end node and offset pairs.

LayoutTests:

Updated the tests per API change.

* editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html:
* editing/mac/attributed-string/resources/dump-attributed-string.js:
(dumpAttributedString):

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html
trunk/LayoutTests/editing/mac/attributed-string/resources/dump-attributed-string.js
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/cocoa/HTMLConverter.h
trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
trunk/Tools/ChangeLog
trunk/Tools/DumpRenderTree/mac/TextInputControllerMac.m




Diff

Modified: trunk/LayoutTests/ChangeLog (239148 => 239149)

--- trunk/LayoutTests/ChangeLog	2018-12-13 03:21:51 UTC (rev 239148)
+++ trunk/LayoutTests/ChangeLog	2018-12-13 03:54:13 UTC (rev 239149)
@@ -1,3 +1,16 @@
+2018-12-12  Ryosuke Niwa  
+
+Make TextInputController.legacyAttributedString take DOM nodes and offsets
+https://bugs.webkit.org/show_bug.cgi?id=192653
+
+Reviewed by Wenson Hsieh.
+
+Updated the tests per API change.
+
+* editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html:
+* editing/mac/attributed-string/resources/dump-attributed-string.js:
+(dumpAttributedString):
+
 2018-12-12  Simon Fraser  
 
 REGRESSION (r238357): Pins on Yelp map disappear


Modified: trunk/LayoutTests/editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html (239148 => 239149)

--- trunk/LayoutTests/editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html	2018-12-13 03:21:51 UTC (rev 239148)
+++ trunk/LayoutTests/editing/mac/attributed-string/attribute-string-for-copy-with-color-filter.html	2018-12-13 03:54:13 UTC (rev 239149)
@@ -20,11 +20,7 @@
 var target = document.getElementById("target");
 target.focus();
 
-const range = new Range;
-range.setStart(target.firstChild, 2);
-range.setEnd(target.firstChild, 4);
-
-var attributedString = textInputController.legacyAttributedString(range);
+var attributedString = textInputController.legacyAttributedString(target.firstChild, 2, target.firstChild, 4);
 var serializedString = serializeAttributedString(attributedString);
 log(serializedString);
 


Modified: trunk/LayoutTests/editing/mac/attributed-string/resources/dump-attributed-string.js (239148 => 239149)

--- trunk/LayoutTests/editing/mac/attributed-string/resources/dump-attributed-string.js	2018-12-13 03:21:51 UTC (rev 239148)
+++ trunk/LayoutTests/editing/mac/attributed-string/resources/dump-attributed-string.js	2018-12-13 03:54:13 UTC (rev 239149)
@@ -15,7 +15,8 @@
 range.selectNodeContents(container);
 
 var pre = document.createElement('pre');
-pre.textContent = 'Input:\n' + container.innerHTML.trim() + '\n\nOutput:\n' + serializeAttributedString(textInputController.legacyAttributedString(range));
+var result = serializeAttributedString(textInputController.legacyAttributedString(container, 0, container, container.childNodes.length));
+pre.textContent = 'Input:\n' + container.innerHTML.trim() + '\n\nOutput:\n' + result;
 
 body.innerHTML = '';
 body.appendChild(pre);


Modified: trunk/Source/WebCore/ChangeLog (239148 => 239149)

--- trunk/Source/WebCore/ChangeLog	2018-12-13 03:21:51 UTC (rev 239148)
+++ trunk/Source/WebCore/ChangeLog	2018-12-13 03:54:13 UTC (rev 239149)
@@ -1,3 +1,18 @@
+2018-12-13  Ryosuke Niwa  
+
+Make TextInputController.legacyAttributedString take 

[webkit-changes] [239148] trunk/Source/WebKit

2018-12-12 Thread cfleizach
Title: [239148] trunk/Source/WebKit








Revision 239148
Author cfleiz...@apple.com
Date 2018-12-12 19:21:51 -0800 (Wed, 12 Dec 2018)


Log Message
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449


Reviewed by Darin Adler.

Part 5: Files in WebProcess folder.

* WebProcess/Cache/WebCacheStorageConnection.cpp:
* WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp
trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm
trunk/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (239147 => 239148)

--- trunk/Source/WebKit/ChangeLog	2018-12-13 03:15:13 UTC (rev 239147)
+++ trunk/Source/WebKit/ChangeLog	2018-12-13 03:21:51 UTC (rev 239148)
@@ -1,3 +1,20 @@
+2018-12-12  Chris Fleizach  
+
+[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
+https://bugs.webkit.org/show_bug.cgi?id=192449
+
+
+Reviewed by Darin Adler.
+
+Part 5: Files in WebProcess folder.
+
+* WebProcess/Cache/WebCacheStorageConnection.cpp:
+* WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
+(mediaTimeToCurrentTime):
+(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):
+* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
+(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
+
 2018-12-12  Ross Kirsling  
 
 [MSVC] Unreviewed build fix for r239080.


Modified: trunk/Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp (239147 => 239148)

--- trunk/Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp	2018-12-13 03:15:13 UTC (rev 239147)
+++ trunk/Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp	2018-12-13 03:21:51 UTC (rev 239148)
@@ -35,11 +35,10 @@
 #include "WebProcess.h"
 #include 
 
+namespace WebKit {
 using namespace WebCore::DOMCacheEngine;
-using namespace WebKit::CacheStorage;
+using namespace CacheStorage;
 
-namespace WebKit {
-
 WebCacheStorageConnection::WebCacheStorageConnection(WebCacheStorageProvider& provider, PAL::SessionID sessionID)
 : m_provider(provider)
 , m_sessionID(sessionID)


Modified: trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm (239147 => 239148)

--- trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm	2018-12-13 03:15:13 UTC (rev 239147)
+++ trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm	2018-12-13 03:21:51 UTC (rev 239148)
@@ -40,12 +40,9 @@
 #import 
 #import 
 
-using namespace WTF;
-using namespace WebCore;
-
 static MonotonicTime mediaTimeToCurrentTime(CFTimeInterval t)
 {
-return MonotonicTime::now() + Seconds(t - CACurrentMediaTime());
+return WTF::MonotonicTime::now() + Seconds(t - CACurrentMediaTime());
 }
 
 static NSString * const WKExplicitBeginTimeFlag = @"WKPlatformCAAnimationExplicitBeginTimeFlag";
@@ -55,7 +52,7 @@
 
 @implementation WKAnimationDelegate
 
-- (instancetype)initWithLayerID:(GraphicsLayer::PlatformLayerID)layerID layerTreeHost:(WebKit::RemoteLayerTreeHost*)layerTreeHost
+- (instancetype)initWithLayerID:(WebCore::GraphicsLayer::PlatformLayerID)layerID layerTreeHost:(WebKit::RemoteLayerTreeHost*)layerTreeHost
 {
 if ((self = [super init])) {
 _layerID = layerID;
@@ -98,6 +95,7 @@
 @end
 
 namespace WebKit {
+using namespace WebCore;
 
 void PlatformCAAnimationRemote::KeyframeValue::encode(IPC::Encoder& encoder) const
 {


Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm (239147 => 239148)

--- trunk/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm	2018-12-13 03:15:13 UTC (rev 239147)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm	2018-12-13 03:21:51 UTC (rev 239148)
@@ -48,8 +48,6 @@
 #import 
 #import 
 
-using namespace WebCore;
-using namespace WebKit;
 
 @implementation WKAccessibilityWebPageObject
 
@@ -218,7 +216,7 @@
 
 // Some plugins may be able to figure out the scroll position and inset on their own.
 bool applyContentOffset = true;
-if (auto pluginView = WebPage::pluginViewForFrame(m_page->mainFrame()))
+if (auto pluginView = WebKit::WebPage::pluginViewForFrame(m_page->mainFrame()))
 applyContentOffset = !pluginView->plugin()->pluginHandlesContentOffsetForAccessibilityHitTest();
 
 if (applyContentOffset) {






___
webkit-changes mailing list

[webkit-changes] [239147] trunk/Source/WebCore

2018-12-12 Thread rniwa
Title: [239147] trunk/Source/WebCore








Revision 239147
Author rn...@webkit.org
Date 2018-12-12 19:15:13 -0800 (Wed, 12 Dec 2018)


Log Message
Fix macOS builds after r239145.

* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mediastream/mac/MockRealtimeVideoSourceMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (239146 => 239147)

--- trunk/Source/WebCore/ChangeLog	2018-12-13 02:35:10 UTC (rev 239146)
+++ trunk/Source/WebCore/ChangeLog	2018-12-13 03:15:13 UTC (rev 239147)
@@ -1,3 +1,9 @@
+2018-12-12  Ryosuke Niwa  
+
+Fix macOS builds after r239145.
+
+* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
+
 2018-12-12  Simon Fraser  
 
 REGRESSION (r238357): Pins on Yelp map disappear


Modified: trunk/Source/WebCore/platform/mediastream/mac/MockRealtimeVideoSourceMac.mm (239146 => 239147)

--- trunk/Source/WebCore/platform/mediastream/mac/MockRealtimeVideoSourceMac.mm	2018-12-13 02:35:10 UTC (rev 239146)
+++ trunk/Source/WebCore/platform/mediastream/mac/MockRealtimeVideoSourceMac.mm	2018-12-13 03:15:13 UTC (rev 239147)
@@ -37,6 +37,7 @@
 #import "ImageTransferSessionVT.h"
 #import "MediaConstraints.h"
 #import "MediaSampleAVFObjC.h"
+#import "MockRealtimeMediaSourceCenter.h"
 #import "NotImplemented.h"
 #import "PlatformLayer.h"
 #import "RealtimeMediaSourceSettings.h"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [239146] trunk

2018-12-12 Thread simon . fraser
Title: [239146] trunk








Revision 239146
Author simon.fra...@apple.com
Date 2018-12-12 18:35:10 -0800 (Wed, 12 Dec 2018)


Log Message
REGRESSION (r238357): Pins on Yelp map disappear
https://bugs.webkit.org/show_bug.cgi?id=192597
rdar://problem/46578285

Reviewed by Zalan Bujtas.
Source/WebCore:

RenderLayerCompositor::updateBackingAndHierarchy() had a bug where if a RenderLayer gained
a negative z-order child (triggering creation of a foreground layer), we'd fail to
call the "setChildren()" with the vector containing that foreground layer.

When updateBackingAndHierarchy() stops visiting descendants because none are composited,
it may still have to update the child list with the foreground layer, so make sure
the code handles this case.

Tests: compositing/z-order/add-negative-z-child.html
   compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html

* rendering/RenderLayer.cpp:
(WebCore::outputPaintOrderTreeRecursive):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

LayoutTests:

Add tests that toggle negative z-index on a child, with and without sibling compositing layers.

* compositing/z-order/add-negative-z-child-expected.html: Added.
* compositing/z-order/add-negative-z-child.html: Added.
* compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer-expected.html: Added.
* compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp


Added Paths

trunk/LayoutTests/compositing/z-order/add-negative-z-child-expected.html
trunk/LayoutTests/compositing/z-order/add-negative-z-child.html
trunk/LayoutTests/compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer-expected.html
trunk/LayoutTests/compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html




Diff

Modified: trunk/LayoutTests/ChangeLog (239145 => 239146)

--- trunk/LayoutTests/ChangeLog	2018-12-13 02:34:19 UTC (rev 239145)
+++ trunk/LayoutTests/ChangeLog	2018-12-13 02:35:10 UTC (rev 239146)
@@ -1,3 +1,18 @@
+2018-12-12  Simon Fraser  
+
+REGRESSION (r238357): Pins on Yelp map disappear
+https://bugs.webkit.org/show_bug.cgi?id=192597
+rdar://problem/46578285
+
+Reviewed by Zalan Bujtas.
+
+Add tests that toggle negative z-index on a child, with and without sibling compositing layers.
+
+* compositing/z-order/add-negative-z-child-expected.html: Added.
+* compositing/z-order/add-negative-z-child.html: Added.
+* compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer-expected.html: Added.
+* compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html: Added.
+
 2018-12-12  YUHAN WU  
 
 Implement non-timeslice mode encoding for MediaRecorder


Added: trunk/LayoutTests/compositing/z-order/add-negative-z-child-expected.html (0 => 239146)

--- trunk/LayoutTests/compositing/z-order/add-negative-z-child-expected.html	(rev 0)
+++ trunk/LayoutTests/compositing/z-order/add-negative-z-child-expected.html	2018-12-13 02:35:10 UTC (rev 239146)
@@ -0,0 +1,33 @@
+
+
+
+
+.box {
+position: absolute;
+width: 200px;
+height: 200px;
+background-color: red;
+}
+
+.composited {
+transform: translateZ(1px);
+}
+
+.negative {
+z-index: -1;
+}
+
+.positive {
+z-index: 1;
+background-color: green;
+}
+
+
+
+You should see a green box below.
+
+
+
+
+
+


Added: trunk/LayoutTests/compositing/z-order/add-negative-z-child.html (0 => 239146)

--- trunk/LayoutTests/compositing/z-order/add-negative-z-child.html	(rev 0)
+++ trunk/LayoutTests/compositing/z-order/add-negative-z-child.html	2018-12-13 02:35:10 UTC (rev 239146)
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+.box {
+position: absolute;
+width: 200px;
+height: 200px;
+background-color: red;
+}
+
+.composited {
+transform: translateZ(1px);
+}
+
+.negative {
+z-index: -1;
+}
+
+.positive {
+z-index: 1;
+background-color: green;
+}
+
+
+
+if (window.testRunner)
+testRunner.waitUntilDone();
+
+window.addEventListener('load', () => {
+requestAnimationFrame(() => {
+document.getElementById('target').classList.add('negative');
+if (window.testRunner)
+testRunner.notifyDone();
+});
+}, false);
+
+
+
+You should see a green box below.
+
+
+

[webkit-changes] [239145] trunk

2018-12-12 Thread commit-queue
Title: [239145] trunk








Revision 239145
Author commit-qu...@webkit.org
Date 2018-12-12 18:34:19 -0800 (Wed, 12 Dec 2018)


Log Message
Implement non-timeslice mode encoding for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=192069


Patch by YUHAN WU  on 2018-12-12
Reviewed by Eric Carlson.

Source/WebCore:

Implement the encoding for non-timeslice mode of MediaRecorder.
It only supports to record MP4 file through H264 and AAC encoding, we will need to support more MIME types and encoding methods.
Add a API in internals to allow testings to turn on the mock source.

Test: http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html

* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::setCustomPrivateRecorderCreator):
(WebCore::MediaRecorder::getPrivateImpl):
(WebCore::MediaRecorder::MediaRecorder):
(WebCore::MediaRecorder::stopRecording):
(WebCore::MediaRecorder::stopRecordingInternal):
(WebCore::MediaRecorder::createRecordingDataBlob):
(WebCore::MediaRecorder::scheduleDeferredTask):
* Modules/mediarecorder/MediaRecorder.h:
* Modules/mediarecorder/MediaRecorder.idl:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/mediarecorder/MediaRecorderPrivate.h:
(WebCore::MediaRecorderPrivate::stopRecording):
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: Added.
(WebCore::MediaRecorderPrivateAVFImpl::create):
(WebCore::MediaRecorderPrivateAVFImpl::MediaRecorderPrivateAVFImpl):
(WebCore::MediaRecorderPrivateAVFImpl::sampleBufferUpdated):
(WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):
(WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
(WebCore::MediaRecorderPrivateAVFImpl::fetchData):
(WebCore::MediaRecorderPrivateAVFImpl::mimeType):
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: Added.
* platform/mediarecorder/MediaRecorderPrivateMock.cpp:
(WebCore::MediaRecorderPrivateMock::fetchData):
(WebCore::MediaRecorderPrivateMock::mimeType):
* platform/mediarecorder/MediaRecorderPrivateMock.h:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: added.
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: Added.
(WebCore::MediaRecorderPrivateWriter::clear):
(WebCore::MediaRecorderPrivateWriter::setupWriter):
(WebCore::MediaRecorderPrivateWriter::setVideoInput):
(WebCore::MediaRecorderPrivateWriter::setAudioInput):
(WebCore::copySampleBufferWithCurrentTimeStamp):
(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::stopRecording):
* testing/Internals.cpp:
(WebCore::createRecorderMockSource):
(WebCore::Internals::setCustomPrivateRecorderCreator):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Create new tests for encoding of MediaRecorder. Check if the produced video and audio are correct.
Add code to turn on the mock source of MediaRecorder for the two old tests because the real source is enabled by default.

* http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-expected.txt: Added.
* http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html: Added.
* http/wpt/mediarecorder/MediaRecorder-dataavailable.html:
* http/wpt/mediarecorder/MediaRecorder-mock-dataavailable.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-dataavailable.html
trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-mock-dataavailable.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.h
trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl
trunk/Source/WebCore/SourcesCocoa.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivate.h
trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.cpp
trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl


Added Paths

trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-expected.txt
trunk/LayoutTests/http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html
trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp
trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h
trunk/Source/WebCore/platform/mediarecorder/cocoa/
trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h
trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (239144 => 239145)

--- trunk/LayoutTests/ChangeLog	2018-12-13 02:28:52 UTC (rev 239144)
+++ trunk/LayoutTests/ChangeLog	2018-12-13 02:34:19 UTC (rev 239145)
@@ -1,3 +1,19 @@
+2018-12-12  YUHAN WU  
+
+Implement 

[webkit-changes] [239144] trunk/Source/WebKit

2018-12-12 Thread ross . kirsling
Title: [239144] trunk/Source/WebKit








Revision 239144
Author ross.kirsl...@sony.com
Date 2018-12-12 18:28:52 -0800 (Wed, 12 Dec 2018)


Log Message
[MSVC] Unreviewed build fix for r239080.

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

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (239143 => 239144)

--- trunk/Source/WebKit/ChangeLog	2018-12-13 02:19:24 UTC (rev 239143)
+++ trunk/Source/WebKit/ChangeLog	2018-12-13 02:28:52 UTC (rev 239144)
@@ -1,3 +1,10 @@
+2018-12-12  Ross Kirsling  
+
+[MSVC] Unreviewed build fix for r239080.
+
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):
+
 2018-12-12  Chris Fleizach  
 
 [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds


Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (239143 => 239144)

--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-12-13 02:19:24 UTC (rev 239143)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-12-13 02:28:52 UTC (rev 239144)
@@ -2759,7 +2759,12 @@
 };
 }
 
-NO_RETURN_DUE_TO_ASSERT void WebPageProxy::didFailToSuspendAfterProcessSwap()
+// MSVC gives a redeclaration error if noreturn is used on the definition and not the declaration, while
+// Cocoa tests segfault if it is moved to the declaration site (even if we move the definition with it!).
+#if !COMPILER(MSVC)
+NO_RETURN_DUE_TO_ASSERT
+#endif
+void WebPageProxy::didFailToSuspendAfterProcessSwap()
 {
 // Only the SuspendedPageProxy should be getting this call.
 ASSERT_NOT_REACHED();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [239143] trunk/Source/WebKit

2018-12-12 Thread cfleizach
Title: [239143] trunk/Source/WebKit








Revision 239143
Author cfleiz...@apple.com
Date 2018-12-12 18:19:24 -0800 (Wed, 12 Dec 2018)


Log Message
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449


Reviewed by Darin Adler.

Part 4: Handling NetworkProcess folder.

* NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
* NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/RemoteNetworkingContext.mm:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm
trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp
trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp
trunk/Source/WebKit/NetworkProcess/ios/NetworkProcessIOS.mm
trunk/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm
trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (239142 => 239143)

--- trunk/Source/WebKit/ChangeLog	2018-12-13 02:09:28 UTC (rev 239142)
+++ trunk/Source/WebKit/ChangeLog	2018-12-13 02:19:24 UTC (rev 239143)
@@ -4,6 +4,24 @@
 https://bugs.webkit.org/show_bug.cgi?id=192449
 
 
+Reviewed by Darin Adler.
+
+Part 4: Handling NetworkProcess folder.
+
+* NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
+* NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
+* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
+* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
+* NetworkProcess/ios/NetworkProcessIOS.mm:
+* NetworkProcess/mac/NetworkProcessMac.mm:
+* NetworkProcess/mac/RemoteNetworkingContext.mm:
+
+2018-12-12  Chris Fleizach  
+
+[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
+https://bugs.webkit.org/show_bug.cgi?id=192449
+
+
 Reviewed by Tim Horton.
 
 Fix iosmac build.


Modified: trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm (239142 => 239143)

--- trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm	2018-12-13 02:09:28 UTC (rev 239142)
+++ trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm	2018-12-13 02:19:24 UTC (rev 239143)
@@ -31,10 +31,9 @@
 #import 
 #import 
 
+namespace WebKit {
 using namespace WebCore;
 
-namespace WebKit {
-
 void WebCookieManager::platformSetHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy policy)
 {
 ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));


Modified: trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp (239142 => 239143)

--- trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp	2018-12-13 02:09:28 UTC (rev 239142)
+++ trunk/Source/WebKit/NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp	2018-12-13 02:19:24 UTC (rev 239143)
@@ -41,10 +41,9 @@
 #include 
 #include 
 
+namespace WebKit {
 using namespace WebCore;
 
-namespace WebKit {
-
 Ref WebIDBConnectionToClient::create(NetworkConnectionToWebProcess& connection, uint64_t serverConnectionIdentifier, PAL::SessionID sessionID)
 {
 return adoptRef(*new WebIDBConnectionToClient(connection, serverConnectionIdentifier, sessionID));


Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp (239142 => 239143)

--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp	2018-12-13 02:09:28 UTC (rev 239142)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp	2018-12-13 02:19:24 UTC (rev 239143)
@@ -53,11 +53,10 @@
 #include 
 #include 
 
+namespace WebKit {
 using namespace PAL;
 using namespace WebCore;
 
-namespace WebKit {
-
 #define SWSERVERCONNECTION_RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_sessionID.isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - WebSWServerConnection::" fmt, this, ##__VA_ARGS__)
 #define SWSERVERCONNECTION_RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(m_sessionID.isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - WebSWServerConnection::" fmt, this, ##__VA_ARGS__)
 


Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp (239142 => 239143)

--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp	2018-12-13 02:09:28 UTC (rev 239142)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp	2018-12-13 02:19:24 UTC (rev 239143)
@@ -33,10 +33,9 @@
 #include "WebSWContextManagerConnectionMessages.h"
 #include 
 
+namespace 

[webkit-changes] [239142] trunk

2018-12-12 Thread yusukesuzuki
Title: [239142] trunk








Revision 239142
Author yusukesuz...@slowstart.org
Date 2018-12-12 18:09:28 -0800 (Wed, 12 Dec 2018)


Log Message
[DFG][FTL] Add NewSymbol
https://bugs.webkit.org/show_bug.cgi?id=192620

Reviewed by Saam Barati.

JSTests:

* microbenchmarks/symbol-creation.js: Added.
(test):
* stress/symbol-description-identity.js: Added.
(shouldBe):
(test):
* stress/symbol-identity.js: Added.
(shouldBe):
(test):
* stress/symbol-with-description-throw-error.js: Added.
(shouldBe):
(shouldThrow):
(test):
(object.toString):

Source/_javascript_Core:

This patch introduces NewSymbol DFG node into DFG and FTL tiers. The main goal of this patch is not optimize
NewSymbol code faster. Rather than that, this patch intends to offer SpecSymbol type information into DFG's
data flow to optimize generated code in FTL backend.

We add NewSymbol DFG node, which may take an argument. If an argument is not given, NewSymbol is for `Symbol()`.
If an argument is given, ToString is emitted to this argument before passing it to NewSymbol. So NewSymbol node
itself does not perform any type checks. ToString performs effects, but NewSymbol doesn't have any side observable
effects. So we can decouple Symbol(description) call into NewSymbol(ToString(description)).

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGMayExit.cpp:
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewSymbol):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewSymbol):

Modified Paths

trunk/JSTests/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h
trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp
trunk/Source/_javascript_Core/dfg/DFGClobberize.h
trunk/Source/_javascript_Core/dfg/DFGClobbersExitState.cpp
trunk/Source/_javascript_Core/dfg/DFGDoesGC.cpp
trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp
trunk/Source/_javascript_Core/dfg/DFGMayExit.cpp
trunk/Source/_javascript_Core/dfg/DFGNodeType.h
trunk/Source/_javascript_Core/dfg/DFGOperations.cpp
trunk/Source/_javascript_Core/dfg/DFGOperations.h
trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp
trunk/Source/_javascript_Core/dfg/DFGSafeToExecute.h
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp
trunk/Source/_javascript_Core/dfg/DFGStoreBarrierInsertionPhase.cpp
trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp
trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp


Added Paths

trunk/JSTests/microbenchmarks/symbol-creation.js
trunk/JSTests/stress/symbol-description-identity.js
trunk/JSTests/stress/symbol-identity.js
trunk/JSTests/stress/symbol-with-description-throw-error.js




Diff

Modified: trunk/JSTests/ChangeLog (239141 => 239142)

--- trunk/JSTests/ChangeLog	2018-12-13 02:01:37 UTC (rev 239141)
+++ trunk/JSTests/ChangeLog	2018-12-13 02:09:28 UTC (rev 239142)
@@ -1,5 +1,26 @@
 2018-12-12  Yusuke Suzuki  
 
+[DFG][FTL] Add NewSymbol
+https://bugs.webkit.org/show_bug.cgi?id=192620
+
+Reviewed by Saam Barati.
+
+* microbenchmarks/symbol-creation.js: Added.
+(test):
+* stress/symbol-description-identity.js: Added.
+(shouldBe):
+(test):
+* stress/symbol-identity.js: Added.
+(shouldBe):
+(test):
+* stress/symbol-with-description-throw-error.js: Added.
+(shouldBe):
+(shouldThrow):
+(test):
+(object.toString):
+
+2018-12-12  Yusuke Suzuki  
+
 [BigInt] Implement DFG/FTL typeof for BigInt
 https://bugs.webkit.org/show_bug.cgi?id=192619
 


Added: trunk/JSTests/microbenchmarks/symbol-creation.js (0 => 239142)

--- trunk/JSTests/microbenchmarks/symbol-creation.js	(rev 0)
+++ trunk/JSTests/microbenchmarks/symbol-creation.js	2018-12-13 02:09:28 UTC (rev 239142)
@@ -0,0 +1,8 @@
+function test()
+{
+return Symbol();
+}
+noInline(test);
+
+for (var i = 0; i < 4e5; ++i)
+test();


Added: 

[webkit-changes] [239141] trunk

2018-12-12 Thread yusukesuzuki
Title: [239141] trunk








Revision 239141
Author yusukesuz...@slowstart.org
Date 2018-12-12 18:01:37 -0800 (Wed, 12 Dec 2018)


Log Message
[BigInt] Implement DFG/FTL typeof for BigInt
https://bugs.webkit.org/show_bug.cgi?id=192619

Reviewed by Keith Miller.

JSTests:

* stress/big-int-boolean-proven-type.js: Added.
(assert):
(bool):
* stress/big-int-type-of-proven-type-non-constant-including-symbol.js: Added.
(assert):
(typeOf):
(i.switch):
* stress/big-int-type-of-proven-type-non-constant.js: Added.
(assert):
(typeOf):
* stress/big-int-type-of.js:
(typeOf):
(func):

Source/_javascript_Core:

This patch implements typeof for BigInt in DFG and FTL. Our DFG and FTL tiers now correctly consider about BigInt
in the code generated for typeof.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::boolify): We add (SpecCell - SpecString) type filter for proven type since isString
check is already performed here.
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf): We use (SpecCell - SpecObject - SpecString) type filter for proven type
since String and Object are already checked here. If we know the proven type does not include Symbol type here, we
can omit the code for Symbol type.
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitTypeOf):

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/stress/big-int-type-of.js
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp
trunk/Source/_javascript_Core/jit/AssemblyHelpers.h


Added Paths

trunk/JSTests/stress/big-int-boolean-proven-type.js
trunk/JSTests/stress/big-int-type-of-proven-type-non-constant-including-symbol.js
trunk/JSTests/stress/big-int-type-of-proven-type-non-constant.js




Diff

Modified: trunk/JSTests/ChangeLog (239140 => 239141)

--- trunk/JSTests/ChangeLog	2018-12-13 01:32:58 UTC (rev 239140)
+++ trunk/JSTests/ChangeLog	2018-12-13 02:01:37 UTC (rev 239141)
@@ -1,3 +1,24 @@
+2018-12-12  Yusuke Suzuki  
+
+[BigInt] Implement DFG/FTL typeof for BigInt
+https://bugs.webkit.org/show_bug.cgi?id=192619
+
+Reviewed by Keith Miller.
+
+* stress/big-int-boolean-proven-type.js: Added.
+(assert):
+(bool):
+* stress/big-int-type-of-proven-type-non-constant-including-symbol.js: Added.
+(assert):
+(typeOf):
+(i.switch):
+* stress/big-int-type-of-proven-type-non-constant.js: Added.
+(assert):
+(typeOf):
+* stress/big-int-type-of.js:
+(typeOf):
+(func):
+
 2018-12-10  Mark Lam  
 
 PropertyAttribute needs a CustomValue bit.


Added: trunk/JSTests/stress/big-int-boolean-proven-type.js (0 => 239141)

--- trunk/JSTests/stress/big-int-boolean-proven-type.js	(rev 0)
+++ trunk/JSTests/stress/big-int-boolean-proven-type.js	2018-12-13 02:01:37 UTC (rev 239141)
@@ -0,0 +1,21 @@
+//@ runBigIntEnabled
+
+function assert(a) {
+if (!a)
+throw new Error("Bad assertion");
+}
+
+function bool(n) {
+var value = "string";
+if (n & 0x1)
+value = 0n;
+return !!value;
+}
+noInline(bool);
+
+for (let i = 0; i < 1e6; i++) {
+if (i & 0x1)
+assert(bool(i) === false);
+else
+assert(bool(i) === true);
+}


Added: trunk/JSTests/stress/big-int-type-of-proven-type-non-constant-including-symbol.js (0 => 239141)

--- trunk/JSTests/stress/big-int-type-of-proven-type-non-constant-including-symbol.js	(rev 0)
+++ trunk/JSTests/stress/big-int-type-of-proven-type-non-constant-including-symbol.js	2018-12-13 02:01:37 UTC (rev 239141)
@@ -0,0 +1,33 @@
+//@ runBigIntEnabled
+
+function assert(a) {
+if (!a)
+throw new Error("Bad assertion");
+}
+
+function typeOf(n) {
+var value = "string";
+var dispatcher = n % 3;
+if (dispatcher === 0)
+value = 1n;
+else if (dispatcher === 1)
+value = "string";
+else
+value = Symbol("symbol");
+return typeof value;
+}
+noInline(typeOf);
+
+for (let i = 0; i < 1e6; i++) {
+switch (i % 3) {
+case 0:
+assert(typeOf(i) === "bigint");
+break;
+case 1:
+assert(typeOf(i) === "string");
+break;
+case 2:
+assert(typeOf(i) === "symbol");
+break;
+}
+}


Added: trunk/JSTests/stress/big-int-type-of-proven-type-non-constant.js (0 => 239141)

--- trunk/JSTests/stress/big-int-type-of-proven-type-non-constant.js	(rev 0)
+++ trunk/JSTests/stress/big-int-type-of-proven-type-non-constant.js	2018-12-13 02:01:37 UTC (rev 239141)
@@ -0,0 +1,21 @@
+//@ runBigIntEnabled
+
+function assert(a) {
+if (!a)
+throw new Error("Bad assertion");
+}
+
+function typeOf(n) {
+var value = "string";
+if (n & 0x1)
+value = 1n;
+return typeof value;
+}
+noInline(typeOf);
+
+for (let i = 0; i < 1e6; i++) {
+if (i & 0x1)
+assert(typeOf(i) === "bigint");
+else
+assert(typeOf(i) === "string");
+}


Modified: 

[webkit-changes] [239140] trunk/Source/WebKit

2018-12-12 Thread cfleizach
Title: [239140] trunk/Source/WebKit








Revision 239140
Author cfleiz...@apple.com
Date 2018-12-12 17:32:58 -0800 (Wed, 12 Dec 2018)


Log Message
[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449


Reviewed by Tim Horton.

Fix iosmac build.

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

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (239139 => 239140)

--- trunk/Source/WebKit/ChangeLog	2018-12-13 01:26:32 UTC (rev 239139)
+++ trunk/Source/WebKit/ChangeLog	2018-12-13 01:32:58 UTC (rev 239140)
@@ -1,3 +1,16 @@
+2018-12-12  Chris Fleizach  
+
+[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
+https://bugs.webkit.org/show_bug.cgi?id=192449
+
+
+Reviewed by Tim Horton.
+
+Fix iosmac build.
+
+* UIProcess/ios/WKContentViewInteraction.mm:
+(-[WKContentView _hoverGestureRecognizerChanged:]):
+
 2018-12-12  Alex Christensen  
 
 Implement safe browsing in WebKit on WatchOS


Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (239139 => 239140)

--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-12-13 01:26:32 UTC (rev 239139)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-12-13 01:32:58 UTC (rev 239140)
@@ -6201,7 +6201,7 @@
 }
 
 auto event = adoptNS([[::WebEvent alloc] initWithMouseEventType:WebEventMouseMoved timeStamp:timestamp location:point]);
-_page->handleMouseEvent(NativeWebMouseEvent(event.get()));
+_page->handleMouseEvent(WebKit::NativeWebMouseEvent(event.get()));
 }
 #endif
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [239139] trunk

2018-12-12 Thread justin_fan
Title: [239139] trunk








Revision 239139
Author justin_...@apple.com
Date 2018-12-12 17:26:32 -0800 (Wed, 12 Dec 2018)


Log Message
[WebGPU] Vertex buffers and WebGPUInputState
https://bugs.webkit.org/show_bug.cgi?id=192611

Reviewed by Dean Jackson.

Source/WebCore:

Test: webgpu/vertex-buffer-triangle-strip.html

Basic implementation of vertex buffers with Metal shading language in WebGPU. In
WebGPURenderPipelineDescriptor, refactor to match updated shader stage structure and add
WebGPUInputStateDescriptor. Also implement WebGPURenderPassEncoder::setVertexBuffers.

Add symbols and files for WebGPUIndexFormat, WebGPUInputStateDescriptor, WebGPUInputStepMode,
WebGPUVertexAttributeDescriptor, WebGPUVertexFormat, WebGPUVertexInputDescriptor:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Add and implement interfaces and dictionaries for WebGPUInputState:
* Modules/webgpu/WebGPUBuffer.cpp:
(WebCore::WebGPUBuffer::WebGPUBuffer):
* Modules/webgpu/WebGPUBuffer.h:
(WebCore::WebGPUBuffer::buffer const): Added getter for backing GPUBuffer.
* Modules/webgpu/WebGPUBufferDescriptor.h:
* Modules/webgpu/WebGPUBufferDescriptor.idl: Moving WebGPUBufferUsage out into its own IDL.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUIndexFormat.h: Added.
* Modules/webgpu/WebGPUIndexFormat.idl: Added.
* Modules/webgpu/WebGPUInputStateDescriptor.h: Added.
* Modules/webgpu/WebGPUInputStateDescriptor.idl: Added.
* Modules/webgpu/WebGPUInputStepMode.h: Added.
* Modules/webgpu/WebGPUInputStepMode.idl: Added.
* Modules/webgpu/WebGPUVertexAttributeDescriptor.h: Added.
* Modules/webgpu/WebGPUVertexAttributeDescriptor.idl: Added.
* Modules/webgpu/WebGPUVertexFormat.h: Added.
* Modules/webgpu/WebGPUVertexFormat.idl: Added.
* Modules/webgpu/WebGPUVertexInputDescriptor.h: Added.
* Modules/webgpu/WebGPUVertexInputDescriptor.idl: Added.
* platform/graphics/gpu/GPUInputStateDescriptor.h: Added.
* platform/graphics/gpu/GPURenderPassEncoder.h: Added.
* platform/graphics/gpu/GPURenderPipelineDescriptor.h: Added.
* platform/graphics/gpu/GPUVertexAttributeDescriptor.h: Added.
* platform/graphics/gpu/GPUVertexInputDescriptor.h: Added.

Refactor to support updated structure of pipeline descriptor in sketch IDL:
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::validateAndConvertPipelineStage):
(WebCore::WebGPUDevice::createRenderPipeline const):
* Modules/webgpu/WebGPUPipelineDescriptorBase.h:
* Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
* Modules/webgpu/WebGPUPipelineStageDescriptor.h:
* Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
* Modules/webgpu/WebGPURenderPipelineDescriptor.h:
* Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
* Modules/webgpu/WebGPUShaderStage.*: Removed.

Add and implement setVertexBuffers:
* Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::setVertexBuffers): Added.
* Modules/webgpu/WebGPURenderPassEncoder.h:
* Modules/webgpu/WebGPURenderPassEncoder.idl:
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::setVertexBuffers):
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::setInputStateForPipelineDescriptor):
(WebCore::GPURenderPipeline::create):

LayoutTests:

Added variation of simple-triangle-strip to use a vertex buffer. Refactored aforementioned
test to share code with new test.

* webgpu/js/basic-webgpu-functions.js:
(setUpPipelineDescriptor):
* webgpu/js/webgpu-functions.js: Added.
(async.getBasicDevice):
(createBasicContext):
(createBasicPipeline):
(beginBasicRenderPass):
* webgpu/render-pipelines-expected.txt:
* webgpu/render-pipelines.html:
* webgpu/simple-triangle-strip.html:
* webgpu/vertex-buffer-triangle-strip-expected.html: Added.
* webgpu/vertex-buffer-triangle-strip.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/js/basic-webgpu-functions.js
trunk/LayoutTests/webgpu/render-pipelines-expected.txt
trunk/LayoutTests/webgpu/render-pipelines.html
trunk/LayoutTests/webgpu/simple-triangle-strip.html
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Modules/webgpu/WebGPUBuffer.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUBuffer.h
trunk/Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineDescriptorBase.h
trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineDescriptorBase.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.idl
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.h
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.idl
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPipelineDescriptor.h

[webkit-changes] [239138] trunk/LayoutTests

2018-12-12 Thread commit-queue
Title: [239138] trunk/LayoutTests








Revision 239138
Author commit-qu...@webkit.org
Date 2018-12-12 17:23:04 -0800 (Wed, 12 Dec 2018)


Log Message
REGRESSION: [ MacOS iOS ] Layout Test http/wpt/resource-timing/rt-revalidate-requests.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=191207


Patch by Joseph Pecoraro  on 2018-12-12
Reviewed by Devin Rousso.

Splitting this test up into separate tests eliminated flakiness
and timeouts for my system that would occasionally encounter them.

* TestExpectations:
Remove expectation for the test now that splitting up eliminated flakiness so far.

* http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js
Common code for the split out tests.

* http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt: Added.
* http/wpt/resource-timing/rt-revalidate-requests-1.html: Added.
* http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt: Added.
* http/wpt/resource-timing/rt-revalidate-requests-2.html: Added.
* http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt: Added.
* http/wpt/resource-timing/rt-revalidate-requests-3.html: Added.
* http/wpt/resource-timing/rt-revalidate-requests.html: Removed.
* http/wpt/resource-timing/rt-revalidate-requests-expected.txt: Removed.
Split out into separate tests.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations


Added Paths

trunk/LayoutTests/http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js
trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt
trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-1.html
trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt
trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-2.html
trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt
trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-3.html


Removed Paths

trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-expected.txt
trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests.html




Diff

Modified: trunk/LayoutTests/ChangeLog (239137 => 239138)

--- trunk/LayoutTests/ChangeLog	2018-12-13 01:19:22 UTC (rev 239137)
+++ trunk/LayoutTests/ChangeLog	2018-12-13 01:23:04 UTC (rev 239138)
@@ -1,3 +1,30 @@
+2018-12-12  Joseph Pecoraro  
+
+REGRESSION: [ MacOS iOS ] Layout Test http/wpt/resource-timing/rt-revalidate-requests.html is flaky timeout
+https://bugs.webkit.org/show_bug.cgi?id=191207
+
+
+Reviewed by Devin Rousso.
+
+Splitting this test up into separate tests eliminated flakiness
+and timeouts for my system that would occasionally encounter them.
+
+* TestExpectations:
+Remove expectation for the test now that splitting up eliminated flakiness so far.
+
+* http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js
+Common code for the split out tests.
+
+* http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt: Added.
+* http/wpt/resource-timing/rt-revalidate-requests-1.html: Added.
+* http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt: Added.
+* http/wpt/resource-timing/rt-revalidate-requests-2.html: Added.
+* http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt: Added.
+* http/wpt/resource-timing/rt-revalidate-requests-3.html: Added.
+* http/wpt/resource-timing/rt-revalidate-requests.html: Removed.
+* http/wpt/resource-timing/rt-revalidate-requests-expected.txt: Removed.
+Split out into separate tests.
+
 2018-12-12  Chris Dumez  
 
 [Mojave Release Wk2] Layout Test http/tests/cache/disk-cache/disk-cache-validation-attachment.html is flaky


Modified: trunk/LayoutTests/TestExpectations (239137 => 239138)

--- trunk/LayoutTests/TestExpectations	2018-12-13 01:19:22 UTC (rev 239137)
+++ trunk/LayoutTests/TestExpectations	2018-12-13 01:23:04 UTC (rev 239138)
@@ -761,7 +761,6 @@
 webkit.org/b/168357 http/wpt/resource-timing/rt-initiatorType-media.html [ Failure ]
 webkit.org/b/168448 http/wpt/resource-timing/rt-shared-resource-in-frames.html [ Pass Failure ]
 webkit.org/b/168448 http/wpt/resource-timing/rt-shared-resource-in-workers.html [ Pass Failure ]
-webkit.org/b/171511 http/wpt/resource-timing/rt-revalidate-requests.html [ Pass Failure ]
 
 webkit.org/b/161312 imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context.html [ Failure Pass ]
 


Copied: trunk/LayoutTests/http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js (from rev 239137, trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests.html) (0 => 239138)

--- trunk/LayoutTests/http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js	(rev 0)
+++ trunk/LayoutTests/http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js	2018-12-13 

[webkit-changes] [239137] trunk/LayoutTests

2018-12-12 Thread cdumez
Title: [239137] trunk/LayoutTests








Revision 239137
Author cdu...@apple.com
Date 2018-12-12 17:19:22 -0800 (Wed, 12 Dec 2018)


Log Message
[Mojave Release Wk2] Layout Test http/tests/cache/disk-cache/disk-cache-validation-attachment.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=190323


Reviewed by Youenn Fablet.

* http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt:
* http/tests/cache/disk-cache/disk-cache-validation-attachment.html:
Simplify test a bit to only test the header combinations it cares about.

* http/tests/cache/disk-cache/resources/cache-test.js:
(runTestsNow):
(runTests):
The flakiness was due to logic in CachedResourceLoader::determineRevalidationPolicy() which more aggressively
reuses cached resources (bypassing freshness checks) until the load event has fired. This means that the
test would give different results depending on whether or not the load event had a chance to fire before
we do the checks. To address the issue, update runTests() to wait for the load event if it has not yet
fired. This will likely address flakiness in other disk-cache tests as well.

* platform/mac-wk2/TestExpectations:
Unskip test that is no longer flaky.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt
trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment.html
trunk/LayoutTests/http/tests/cache/disk-cache/resources/cache-test.js
trunk/LayoutTests/platform/mac-wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (239136 => 239137)

--- trunk/LayoutTests/ChangeLog	2018-12-13 01:13:29 UTC (rev 239136)
+++ trunk/LayoutTests/ChangeLog	2018-12-13 01:19:22 UTC (rev 239137)
@@ -1,3 +1,27 @@
+2018-12-12  Chris Dumez  
+
+[Mojave Release Wk2] Layout Test http/tests/cache/disk-cache/disk-cache-validation-attachment.html is flaky
+https://bugs.webkit.org/show_bug.cgi?id=190323
+
+
+Reviewed by Youenn Fablet.
+
+* http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt:
+* http/tests/cache/disk-cache/disk-cache-validation-attachment.html:
+Simplify test a bit to only test the header combinations it cares about.
+
+* http/tests/cache/disk-cache/resources/cache-test.js:
+(runTestsNow):
+(runTests):
+The flakiness was due to logic in CachedResourceLoader::determineRevalidationPolicy() which more aggressively
+reuses cached resources (bypassing freshness checks) until the load event has fired. This means that the
+test would give different results depending on whether or not the load event had a chance to fire before
+we do the checks. To address the issue, update runTests() to wait for the load event if it has not yet
+fired. This will likely address flakiness in other disk-cache tests as well.
+
+* platform/mac-wk2/TestExpectations:
+Unskip test that is no longer flaky.
+
 2018-12-12  Youenn Fablet  
 
 Recycling the m section should work if it was rejected remotely


Modified: trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt (239136 => 239137)

--- trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt	2018-12-13 01:13:29 UTC (rev 239136)
+++ trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-attachment-expected.txt	2018-12-13 01:19:22 UTC (rev 239137)
@@ -3,21 +3,9 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-running 6 tests
+running 2 tests
 
 Testing loads from disk cache
-response headers: undefined
-response source: Network
-
-response headers: {"Cache-control":"max-age=0"}
-response source: Network
-
-response headers: {"Cache-control":"max-age=100"}
-response source: Disk cache
-
-response headers: {"Content-Disposition":"attachment; filename=\"f.txt\""}
-response source: Network
-
 response headers: {"Cache-control":"max-age=0","Content-Disposition":"attachment; filename=\"f.txt\""}
 response source: Network
 
@@ -25,18 +13,6 @@
 response source: Disk cache
 
 Testing loads through memory cache (XHR behavior)
-response headers: undefined
-response source: Network
-
-response headers: {"Cache-control":"max-age=0"}
-response source: Network
-
-response headers: {"Cache-control":"max-age=100"}
-response source: Memory cache
-
-response headers: {"Content-Disposition":"attachment; filename=\"f.txt\""}
-response source: Network
-
 response headers: {"Cache-control":"max-age=0","Content-Disposition":"attachment; filename=\"f.txt\""}
 response source: Network
 
@@ -44,18 +20,6 @@
 response source: Memory cache
 
 Testing loads through memory cache (subresource behavior)
-response headers: undefined
-response source: Network
-
-response headers: {"Cache-control":"max-age=0"}
-response source: Network
-

[webkit-changes] [239136] trunk

2018-12-12 Thread youenn
Title: [239136] trunk








Revision 239136
Author you...@apple.com
Date 2018-12-12 17:13:29 -0800 (Wed, 12 Dec 2018)


Log Message
Recycling the m section should work if it was rejected remotely
https://bugs.webkit.org/show_bug.cgi?id=192636

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Changes merged from https://webrtc.googlesource.com/src.git/+/5c72e71e14cfa76a2d1b0979d6b918abe187c208

* Source/webrtc/pc/mediasession.cc:
* Source/webrtc/pc/mediasession.h:
* Source/webrtc/pc/mediasession_unittest.cc:
* Source/webrtc/pc/peerconnection.cc:
* Source/webrtc/pc/peerconnection_jsep_unittest.cc:

LayoutTests:

* webrtc/msection-recycling-expected.txt: Added.
* webrtc/msection-recycling.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/ThirdParty/libwebrtc/ChangeLog
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/pc/mediasession.cc
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/pc/mediasession.h
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/pc/mediasession_unittest.cc
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/pc/peerconnection.cc
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/pc/peerconnection_jsep_unittest.cc


Added Paths

trunk/LayoutTests/webrtc/msection-recycling-expected.txt
trunk/LayoutTests/webrtc/msection-recycling.html




Diff

Modified: trunk/LayoutTests/ChangeLog (239135 => 239136)

--- trunk/LayoutTests/ChangeLog	2018-12-13 00:48:56 UTC (rev 239135)
+++ trunk/LayoutTests/ChangeLog	2018-12-13 01:13:29 UTC (rev 239136)
@@ -1,3 +1,13 @@
+2018-12-12  Youenn Fablet  
+
+Recycling the m section should work if it was rejected remotely
+https://bugs.webkit.org/show_bug.cgi?id=192636
+
+Reviewed by Eric Carlson.
+
+* webrtc/msection-recycling-expected.txt: Added.
+* webrtc/msection-recycling.html: Added.
+
 2018-12-12  Tim Horton  
 
 REGRESSION (r237565): >20 Find in Page highlights in one tile results in a single giant highlight


Added: trunk/LayoutTests/webrtc/msection-recycling-expected.txt (0 => 239136)

--- trunk/LayoutTests/webrtc/msection-recycling-expected.txt	(rev 0)
+++ trunk/LayoutTests/webrtc/msection-recycling-expected.txt	2018-12-13 01:13:29 UTC (rev 239136)
@@ -0,0 +1,3 @@
+
+PASS Recycle m-section with different media type 
+


Added: trunk/LayoutTests/webrtc/msection-recycling.html (0 => 239136)

--- trunk/LayoutTests/webrtc/msection-recycling.html	(rev 0)
+++ trunk/LayoutTests/webrtc/msection-recycling.html	2018-12-13 01:13:29 UTC (rev 239136)
@@ -0,0 +1,68 @@
+
+
+
+
+Trying to recycle m sections
+
+
+