[webkit-changes] [225519] trunk/Source/JavaScriptCore

2017-12-04 Thread jfbastien
Title: [225519] trunk/Source/_javascript_Core








Revision 225519
Author jfbast...@apple.com
Date 2017-12-04 23:51:33 -0800 (Mon, 04 Dec 2017)


Log Message
Math: don't redundantly check for exceptions, just release scope
https://bugs.webkit.org/show_bug.cgi?id=180395

Rubber stamped by Mark Lam.

Two of the exceptions checks could just have been exception scope
releases before the return, which is ever-so-slightly more
efficient. The same technically applies where we have loops over
parameters, but doing the scope release there isn't really more
efficient and is way harder to read.

* runtime/MathObject.cpp:
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncPow):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/MathObject.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (225518 => 225519)

--- trunk/Source/_javascript_Core/ChangeLog	2017-12-05 06:25:56 UTC (rev 225518)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-12-05 07:51:33 UTC (rev 225519)
@@ -1,3 +1,20 @@
+2017-12-04  JF Bastien  
+
+Math: don't redundantly check for exceptions, just release scope
+https://bugs.webkit.org/show_bug.cgi?id=180395
+
+Rubber stamped by Mark Lam.
+
+Two of the exceptions checks could just have been exception scope
+releases before the return, which is ever-so-slightly more
+efficient. The same technically applies where we have loops over
+parameters, but doing the scope release there isn't really more
+efficient and is way harder to read.
+
+* runtime/MathObject.cpp:
+(JSC::mathProtoFuncATan2):
+(JSC::mathProtoFuncPow):
+
 2017-12-04  David Quesada  
 
 Add a class for parsing application manifests


Modified: trunk/Source/_javascript_Core/runtime/MathObject.cpp (225518 => 225519)

--- trunk/Source/_javascript_Core/runtime/MathObject.cpp	2017-12-05 06:25:56 UTC (rev 225518)
+++ trunk/Source/_javascript_Core/runtime/MathObject.cpp	2017-12-05 07:51:33 UTC (rev 225519)
@@ -153,8 +153,8 @@
 auto scope = DECLARE_THROW_SCOPE(vm);
 double arg0 = exec->argument(0).toNumber(exec);
 RETURN_IF_EXCEPTION(scope, encodedJSValue());
+scope.release();
 double arg1 = exec->argument(1).toNumber(exec);
-RETURN_IF_EXCEPTION(scope, encodedJSValue());
 return JSValue::encode(jsDoubleNumber(atan2(arg0, arg1)));
 }
 
@@ -265,8 +265,8 @@
 
 double arg = exec->argument(0).toNumber(exec);
 RETURN_IF_EXCEPTION(scope, encodedJSValue());
+scope.release();
 double arg2 = exec->argument(1).toNumber(exec);
-RETURN_IF_EXCEPTION(scope, encodedJSValue());
 
 return JSValue::encode(JSValue(operationMathPow(arg, arg2)));
 }






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


[webkit-changes] [225518] branches/safari-604-branch

2017-12-04 Thread jmarcell
Title: [225518] branches/safari-604-branch








Revision 225518
Author jmarc...@apple.com
Date 2017-12-04 22:25:56 -0800 (Mon, 04 Dec 2017)


Log Message
Cherry-pick r225273. rdar://problem/35838163

Modified Paths

branches/safari-604-branch/JSTests/ChangeLog
branches/safari-604-branch/Source/_javascript_Core/ChangeLog
branches/safari-604-branch/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h
branches/safari-604-branch/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp
branches/safari-604-branch/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp
branches/safari-604-branch/Source/_javascript_Core/runtime/FunctionConstructor.cpp
branches/safari-604-branch/Source/_javascript_Core/runtime/JSFunction.cpp
branches/safari-604-branch/Source/_javascript_Core/runtime/JSFunctionInlines.h
branches/safari-604-branch/Source/_javascript_Core/runtime/JSGlobalObject.cpp
branches/safari-604-branch/Source/_javascript_Core/runtime/JSGlobalObject.h


Added Paths

branches/safari-604-branch/JSTests/stress/get-by-id-strict-arguments.js
branches/safari-604-branch/JSTests/stress/get-by-id-strict-callee.js
branches/safari-604-branch/JSTests/stress/get-by-id-strict-caller.js
branches/safari-604-branch/JSTests/stress/get-by-id-strict-nested-arguments-2.js
branches/safari-604-branch/JSTests/stress/get-by-id-strict-nested-arguments.js
branches/safari-604-branch/JSTests/stress/strict-function-structure.js
branches/safari-604-branch/JSTests/stress/strict-nested-function-structure.js




Diff

Modified: branches/safari-604-branch/JSTests/ChangeLog (225517 => 225518)

--- branches/safari-604-branch/JSTests/ChangeLog	2017-12-05 06:25:50 UTC (rev 225517)
+++ branches/safari-604-branch/JSTests/ChangeLog	2017-12-05 06:25:56 UTC (rev 225518)
@@ -1,5 +1,58 @@
 2017-12-04  Jason Marcell  
 
+Cherry-pick r225273. rdar://problem/35838163
+
+2017-11-28  JF Bastien  
+
+Strict and sloppy functions shouldn't share structure
+https://bugs.webkit.org/show_bug.cgi?id=180103
+
+
+Reviewed by Saam Barati.
+
+* stress/get-by-id-strict-arguments.js: Added. Used to not throw
+because the IC was wrong.
+(foo):
+(bar):
+(baz):
+(catch):
+* stress/get-by-id-strict-callee.js: Added. Not strictly necessary
+in this patch, but may as well test odd strict mode corner cases.
+(bar):
+(baz):
+(catch):
+* stress/get-by-id-strict-caller.js: Added. Also IC'd wrong.
+(foo):
+(bar):
+(baz):
+(catch):
+* stress/get-by-id-strict-nested-arguments-2.js: Added. Same as
+next file, but with invalidation of the FunctionExecutable's
+singletonFunction() to hit SpeculativeJIT::compileNewFunction's
+slower path.
+(foo):
+(bar.const.x):
+(bar.const.y):
+(bar):
+(catch):
+* stress/get-by-id-strict-nested-arguments.js: Added. Make sure
+strict nesting works correctly.
+(foo):
+(bar.baz):
+(bar):
+* stress/strict-function-structure.js: Added. The test used to
+assert in objectProtoFuncHasOwnProperty.
+(foo):
+(bar):
+(baz):
+* stress/strict-nested-function-structure.js: Added. Nesting.
+(foo):
+(bar):
+(baz.boo):
+(baz):
+
+2017-12-04  Jason Marcell  
+
 Cherry-pick r225239. rdar://problem/35838157
 
 2017-11-27  JF Bastien  


Added: branches/safari-604-branch/JSTests/stress/get-by-id-strict-arguments.js (0 => 225518)

--- branches/safari-604-branch/JSTests/stress/get-by-id-strict-arguments.js	(rev 0)
+++ branches/safari-604-branch/JSTests/stress/get-by-id-strict-arguments.js	2017-12-05 06:25:56 UTC (rev 225518)
@@ -0,0 +1,28 @@
+let warm = 1000;
+
+function foo(f) {
+return f.arguments;
+}
+noInline(foo);
+
+function bar() {
+for (let i = 0; i < warm; ++i)
+foo(bar);
+}
+function baz() {
+"use strict";
+foo(baz);
+}
+
+bar();
+
+let caught = false;
+
+try {
+baz();
+} catch (e) {
+caught = true;
+}
+
+if (!caught)
+throw new Error(`bad!`);


Added: branches/safari-604-branch/JSTests/stress/get-by-id-strict-callee.js (0 => 225518)

--- branches/safari-604-branch/JSTests/stress/get-by-id-strict-callee.js	(rev 0)
+++ branches/safari-604-branch/JSTests/stress/get-by-id-strict-callee.js	2017-12-05 06:25:56 UTC (rev 225518)
@@ -0,0 +1,24 @@
+let warm = 1000;
+
+function bar() {
+for (let i = 0; i < warm; ++i)
+arguments.callee;
+}
+
+function baz() {
+"use strict";
+arguments.callee;
+}
+
+bar();
+
+let caught = false;
+
+try {
+baz();
+} catch (e) {
+caught = true;
+}
+
+if (!caught)
+throw new Error(`bad!`);


Added: bran

[webkit-changes] [225517] branches/safari-604-branch

2017-12-04 Thread jmarcell
Title: [225517] branches/safari-604-branch








Revision 225517
Author jmarc...@apple.com
Date 2017-12-04 22:25:50 -0800 (Mon, 04 Dec 2017)


Log Message
Cherry-pick r225239. rdar://problem/35838157

Modified Paths

branches/safari-604-branch/JSTests/ChangeLog
branches/safari-604-branch/Source/_javascript_Core/ChangeLog
branches/safari-604-branch/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h


Added Paths

branches/safari-604-branch/JSTests/stress/rest-parameter-negative.js




Diff

Modified: branches/safari-604-branch/JSTests/ChangeLog (225516 => 225517)

--- branches/safari-604-branch/JSTests/ChangeLog	2017-12-05 05:23:14 UTC (rev 225516)
+++ branches/safari-604-branch/JSTests/ChangeLog	2017-12-05 06:25:50 UTC (rev 225517)
@@ -1,3 +1,21 @@
+2017-12-04  Jason Marcell  
+
+Cherry-pick r225239. rdar://problem/35838157
+
+2017-11-27  JF Bastien  
+
+_javascript_ rest function parameter with negative index leads to bad DFG abstract interpretation
+https://bugs.webkit.org/show_bug.cgi?id=180051
+
+
+Reviewed by Saam Barati.
+
+* stress/rest-parameter-negative.js: Added.
+(__f_5484):
+(catch):
+(__f_5485):
+(__v_22598.catch):
+
 2017-11-28  Jason Marcell  
 
 Cherry-pick r224539. rdar://problem/35698788


Added: branches/safari-604-branch/JSTests/stress/rest-parameter-negative.js (0 => 225517)

--- branches/safari-604-branch/JSTests/stress/rest-parameter-negative.js	(rev 0)
+++ branches/safari-604-branch/JSTests/stress/rest-parameter-negative.js	2017-12-05 06:25:50 UTC (rev 225517)
@@ -0,0 +1,21 @@
+function __f_5484(__v_22596) {
+  if (!__v_22596) throw new Error();
+}
+
+try {
+  noInline(__f_5484);
+} catch (e) {}
+
+function __f_5485(...__v_22597) {
+  return __v_22597[-13];
+}
+
+try {
+  noInline(__f_5485);
+} catch (e) {}
+
+for (let __v_22598 = 0; __v_22598 < 1; __v_22598++) {
+  try {
+__f_5484(__f_5485(__v_22598) === __v_22598);
+  } catch (e) {}
+}


Modified: branches/safari-604-branch/Source/_javascript_Core/ChangeLog (225516 => 225517)

--- branches/safari-604-branch/Source/_javascript_Core/ChangeLog	2017-12-05 05:23:14 UTC (rev 225516)
+++ branches/safari-604-branch/Source/_javascript_Core/ChangeLog	2017-12-05 06:25:50 UTC (rev 225517)
@@ -1,3 +1,21 @@
+2017-12-04  Jason Marcell  
+
+Cherry-pick r225239. rdar://problem/35838157
+
+2017-11-27  JF Bastien  
+
+_javascript_ rest function parameter with negative index leads to bad DFG abstract interpretation
+https://bugs.webkit.org/show_bug.cgi?id=180051
+
+
+Reviewed by Saam Barati.
+
+Checking for int32 isn't sufficient when uint32 is expected
+afterwards. While we're here, also use Checked<>.
+
+* dfg/DFGAbstractInterpreterInlines.h:
+(JSC::DFG::AbstractInterpreter::executeEffects):
+
 2017-11-28  Jason Marcell  
 
 Cherry-pick r224539. rdar://problem/35698788


Modified: branches/safari-604-branch/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (225516 => 225517)

--- branches/safari-604-branch/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2017-12-05 05:23:14 UTC (rev 225516)
+++ branches/safari-604-branch/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2017-12-05 06:25:50 UTC (rev 225517)
@@ -40,6 +40,8 @@
 #include "PutByIdStatus.h"
 #include "StringObject.h"
 
+#include 
+
 namespace JSC { namespace DFG {
 
 template
@@ -1732,25 +1734,29 @@
 JSValue index = forNode(node->child2()).m_value;
 InlineCallFrame* inlineCallFrame = node->child1()->origin.semantic.inlineCallFrame;
 
-if (index && index.isInt32()) {
+if (index && index.isUInt32()) {
 // This pretends to return TOP for accesses that are actually proven out-of-bounds because
 // that's the conservative thing to do. Otherwise we'd need to write more code to mark such
 // paths as unreachable, or to return undefined. We could implement that eventually.
-
-unsigned argumentIndex = index.asUInt32() + node->numberOfArgumentsToSkip();
-if (inlineCallFrame) {
-if (argumentIndex < inlineCallFrame->arguments.size() - 1) {
-forNode(node) = m_state.variables().operand(
-virtualRegisterForArgument(argumentIndex + 1) + inlineCallFrame->stackOffset);
-m_state.setFoundConstants(true);
-break;
+
+Checked argumentIndexChecked = index.asUInt32();
+argumentIndexChecked += node->numberOfArgumentsToSkip();
+unsigned argumentIndex;
+if (argumentIndexChecked.safeGet(argumentIndex) != CheckedState::DidOverflow) {
+if (inlineCallFrame) {
+if (argumentIndex < inlineCallFrame->arguments.size() - 1) {
+   

[webkit-changes] [225516] releases/Apple

2017-12-04 Thread mitz
Title: [225516] releases/Apple








Revision 225516
Author m...@apple.com
Date 2017-12-04 21:23:14 -0800 (Mon, 04 Dec 2017)


Log Message
Added a tag for iOS 11.2.

Added Paths

releases/Apple/iOS 11.2/
releases/Apple/iOS 11.2/ANGLE/
releases/Apple/iOS 11.2/_javascript_Core/
releases/Apple/iOS 11.2/WTF/
releases/Apple/iOS 11.2/WebCore/
releases/Apple/iOS 11.2/WebKit/
releases/Apple/iOS 11.2/WebKitLegacy/
releases/Apple/iOS 11.2/bmalloc/
releases/Apple/iOS 11.2/libwebrtc/




Diff
Index: releases/Apple/iOS 11.2/ANGLE
===
--- tags/Safari-604.4.7.0.3/Source/ThirdParty/ANGLE	2017-12-05 05:20:27 UTC (rev 225515)
+++ releases/Apple/iOS 11.2/ANGLE	2017-12-05 05:23:14 UTC (rev 225516)

Property changes: releases/Apple/iOS 11.2/ANGLE



Added: allow-tabs
+true
\ No newline at end of property

Added: svn:mergeinfo
+/trunk/Source/ThirdParty/ANGLE:53455
\ No newline at end of property
Index: releases/Apple/iOS 11.2/_javascript_Core
===
--- tags/Safari-604.4.7.0.3/Source/_javascript_Core	2017-12-05 05:20:27 UTC (rev 225515)
+++ releases/Apple/iOS 11.2/_javascript_Core	2017-12-05 05:23:14 UTC (rev 225516)

Property changes: releases/Apple/iOS 11.2/_javascript_Core



Added: svn:mergeinfo
+/trunk/Source/_javascript_Core:53455
\ No newline at end of property
Index: releases/Apple/iOS 11.2/WTF
===
--- tags/Safari-604.4.7.0.3/Source/WTF	2017-12-05 05:20:27 UTC (rev 225515)
+++ releases/Apple/iOS 11.2/WTF	2017-12-05 05:23:14 UTC (rev 225516)

Property changes: releases/Apple/iOS 11.2/WTF



Added: svn:mergeinfo
+/trunk/Source/WTF:53455
\ No newline at end of property
Index: releases/Apple/iOS 11.2/bmalloc
===
--- tags/Safari-604.4.7.0.3/Source/bmalloc	2017-12-05 05:20:27 UTC (rev 225515)
+++ releases/Apple/iOS 11.2/bmalloc	2017-12-05 05:23:14 UTC (rev 225516)

Property changes: releases/Apple/iOS 11.2/bmalloc



Added: svn:mergeinfo
+/trunk/Source/bmalloc:53455
\ No newline at end of property
Index: releases/Apple/iOS 11.2/libwebrtc
===
--- tags/Safari-604.4.7.0.3/Source/ThirdParty/libwebrtc	2017-12-05 05:20:27 UTC (rev 225515)
+++ releases/Apple/iOS 11.2/libwebrtc	2017-12-05 05:23:14 UTC (rev 225516)

Property changes: releases/Apple/iOS 11.2/libwebrtc



Added: svn:mergeinfo
+/trunk/Source/ThirdParty/libwebrtc:53455
\ No newline at end of property




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


[webkit-changes] [225515] releases/Apple

2017-12-04 Thread mitz
Title: [225515] releases/Apple








Revision 225515
Author m...@apple.com
Date 2017-12-04 21:20:27 -0800 (Mon, 04 Dec 2017)


Log Message
Added a tag for Safari 11.0.1.

Added Paths

releases/Apple/Safari 11.0.1/
releases/Apple/Safari 11.0.1/ANGLE/
releases/Apple/Safari 11.0.1/_javascript_Core/
releases/Apple/Safari 11.0.1/WTF/
releases/Apple/Safari 11.0.1/WebCore/
releases/Apple/Safari 11.0.1/WebInspectorUI/
releases/Apple/Safari 11.0.1/WebKit/
releases/Apple/Safari 11.0.1/WebKitLegacy/
releases/Apple/Safari 11.0.1/bmalloc/
releases/Apple/Safari 11.0.1/libwebrtc/




Diff
Index: releases/Apple/Safari 11.0.1/ANGLE
===
--- tags/Safari-604.3.5/Source/ThirdParty/ANGLE	2017-12-05 05:18:50 UTC (rev 225514)
+++ releases/Apple/Safari 11.0.1/ANGLE	2017-12-05 05:20:27 UTC (rev 225515)

Property changes: releases/Apple/Safari 11.0.1/ANGLE



Added: allow-tabs
+true
\ No newline at end of property

Added: svn:mergeinfo
+/trunk/Source/ThirdParty/ANGLE:53455
\ No newline at end of property
Index: releases/Apple/Safari 11.0.1/_javascript_Core
===
--- tags/Safari-604.3.5/Source/_javascript_Core	2017-12-05 05:18:50 UTC (rev 225514)
+++ releases/Apple/Safari 11.0.1/_javascript_Core	2017-12-05 05:20:27 UTC (rev 225515)

Property changes: releases/Apple/Safari 11.0.1/_javascript_Core



Added: svn:mergeinfo
+/trunk/Source/_javascript_Core:53455
\ No newline at end of property
Index: releases/Apple/Safari 11.0.1/WTF
===
--- tags/Safari-604.3.5/Source/WTF	2017-12-05 05:18:50 UTC (rev 225514)
+++ releases/Apple/Safari 11.0.1/WTF	2017-12-05 05:20:27 UTC (rev 225515)

Property changes: releases/Apple/Safari 11.0.1/WTF



Added: svn:mergeinfo
+/trunk/Source/WTF:53455
\ No newline at end of property
Index: releases/Apple/Safari 11.0.1/WebInspectorUI
===
--- tags/Safari-604.3.5/Source/WebInspectorUI	2017-12-05 05:18:50 UTC (rev 225514)
+++ releases/Apple/Safari 11.0.1/WebInspectorUI	2017-12-05 05:20:27 UTC (rev 225515)

Property changes: releases/Apple/Safari 11.0.1/WebInspectorUI



Added: svn:mergeinfo
+/trunk/Source/WebInspectorUI:53455
\ No newline at end of property
Index: releases/Apple/Safari 11.0.1/bmalloc
===
--- tags/Safari-604.3.5/Source/bmalloc	2017-12-05 05:18:50 UTC (rev 225514)
+++ releases/Apple/Safari 11.0.1/bmalloc	2017-12-05 05:20:27 UTC (rev 225515)

Property changes: releases/Apple/Safari 11.0.1/bmalloc



Added: svn:mergeinfo
+/trunk/Source/bmalloc:53455
\ No newline at end of property
Index: releases/Apple/Safari 11.0.1/libwebrtc
===
--- tags/Safari-604.3.5/Source/ThirdParty/libwebrtc	2017-12-05 05:18:50 UTC (rev 225514)
+++ releases/Apple/Safari 11.0.1/libwebrtc	2017-12-05 05:20:27 UTC (rev 225515)

Property changes: releases/Apple/Safari 11.0.1/libwebrtc



Added: svn:mergeinfo
+/trunk/Source/ThirdParty/libwebrtc:53455
\ No newline at end of property




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


[webkit-changes] [225514] releases/Apple

2017-12-04 Thread mitz
Title: [225514] releases/Apple








Revision 225514
Author m...@apple.com
Date 2017-12-04 21:18:50 -0800 (Mon, 04 Dec 2017)


Log Message
Added a tag for iOS 11.1

Added Paths

releases/Apple/iOS 11.1/
releases/Apple/iOS 11.1/ANGLE/
releases/Apple/iOS 11.1/_javascript_Core/
releases/Apple/iOS 11.1/WTF/
releases/Apple/iOS 11.1/WebCore/
releases/Apple/iOS 11.1/WebKit/
releases/Apple/iOS 11.1/WebKitLegacy/
releases/Apple/iOS 11.1/bmalloc/
releases/Apple/iOS 11.1/libwebrtc/




Diff
Index: releases/Apple/iOS 11.1/ANGLE
===
--- tags/Safari-604.3.5.0.3/Source/ThirdParty/ANGLE	2017-12-05 02:06:26 UTC (rev 225513)
+++ releases/Apple/iOS 11.1/ANGLE	2017-12-05 05:18:50 UTC (rev 225514)

Property changes: releases/Apple/iOS 11.1/ANGLE



Added: allow-tabs
+true
\ No newline at end of property

Added: svn:mergeinfo
+/trunk/Source/ThirdParty/ANGLE:53455
\ No newline at end of property
Index: releases/Apple/iOS 11.1/_javascript_Core
===
--- tags/Safari-604.3.5.0.3/Source/_javascript_Core	2017-12-05 02:06:26 UTC (rev 225513)
+++ releases/Apple/iOS 11.1/_javascript_Core	2017-12-05 05:18:50 UTC (rev 225514)

Property changes: releases/Apple/iOS 11.1/_javascript_Core



Added: svn:mergeinfo
+/trunk/Source/_javascript_Core:53455
\ No newline at end of property
Index: releases/Apple/iOS 11.1/WTF
===
--- tags/Safari-604.3.5.0.3/Source/WTF	2017-12-05 02:06:26 UTC (rev 225513)
+++ releases/Apple/iOS 11.1/WTF	2017-12-05 05:18:50 UTC (rev 225514)

Property changes: releases/Apple/iOS 11.1/WTF



Added: svn:mergeinfo
+/trunk/Source/WTF:53455
\ No newline at end of property
Index: releases/Apple/iOS 11.1/bmalloc
===
--- tags/Safari-604.3.5.0.3/Source/bmalloc	2017-12-05 02:06:26 UTC (rev 225513)
+++ releases/Apple/iOS 11.1/bmalloc	2017-12-05 05:18:50 UTC (rev 225514)

Property changes: releases/Apple/iOS 11.1/bmalloc



Added: svn:mergeinfo
+/trunk/Source/bmalloc:53455
\ No newline at end of property
Index: releases/Apple/iOS 11.1/libwebrtc
===
--- tags/Safari-604.3.5.0.3/Source/ThirdParty/libwebrtc	2017-12-05 02:06:26 UTC (rev 225513)
+++ releases/Apple/iOS 11.1/libwebrtc	2017-12-05 05:18:50 UTC (rev 225514)

Property changes: releases/Apple/iOS 11.1/libwebrtc



Added: svn:mergeinfo
+/trunk/Source/ThirdParty/libwebrtc:53455
\ No newline at end of property




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


[webkit-changes] [225513] trunk

2017-12-04 Thread cdumez
Title: [225513] trunk








Revision 225513
Author cdu...@apple.com
Date 2017-12-04 18:06:26 -0800 (Mon, 04 Dec 2017)


Log Message
Support container.getRegistration() / getRegistrations() inside service workers
https://bugs.webkit.org/show_bug.cgi?id=180360

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/activation.https-expected.txt:
Rebaseline test with slightly different output.

* web-platform-tests/service-workers/service-worker/skip-waiting-without-using-registration.https-expected.txt:
* web-platform-tests/service-workers/service-worker/skip-waiting-without-using-registration.https.html:
With my change, this test started running and passing a check before timing out. When investigating the time
out, I found out that this is caused by the test unregistering the worker while the test is still running
in the service worker, which causes the worker to terminate early. To address the issue, we no longer add
a cleanup step to unregister. The test now passes all checks.

Source/WebCore:

Support container.getRegistration() / getRegistrations() inside service workers
by making sure we hop to the right thread when needed.

Test: http/tests/workers/service/ServiceWorkerGlobalScope_getRegistration.html

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::postTaskTo):
* dom/ScriptExecutionContext.h:
* workers/service/SWClientConnection.cpp:
(WebCore::SWClientConnection::jobRejectedInServer):
(WebCore::SWClientConnection::registrationJobResolvedInServer):
(WebCore::SWClientConnection::unregistrationJobResolvedInServer):
(WebCore::SWClientConnection::startScriptFetchForServer):
(WebCore::SWClientConnection::clearPendingJobs):
* workers/service/SWClientConnection.h:
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::didFinishGetRegistrationRequest):
(WebCore::ServiceWorkerContainer::getRegistrations):
(WebCore::ServiceWorkerContainer::didFinishGetRegistrationsRequest):
(WebCore::ServiceWorkerContainer::stop):
* workers/service/ServiceWorkerContainer.h:

Source/WebKit:

* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::didMatchRegistration):
(WebKit::WebSWClientConnection::didGetRegistrations):
(WebKit::WebSWClientConnection::matchRegistration):
(WebKit::WebSWClientConnection::getRegistrations):

LayoutTests:

Add layout test coverage.

* http/tests/workers/service/ServiceWorkerGlobalScope_getRegistration-expected.txt: Added.
* http/tests/workers/service/ServiceWorkerGlobalScope_getRegistration.html: Added.
* http/tests/workers/service/resources/ServiceWorkerGlobalScope_getRegistration-worker.js: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/activation.https-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-using-registration.https-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-using-registration.https.html
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-without-using-registration.https-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-without-using-registration.https.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/ScriptExecutionContext.cpp
trunk/Source/WebCore/dom/ScriptExecutionContext.h
trunk/Source/WebCore/workers/service/SWClientConnection.cpp
trunk/Source/WebCore/workers/service/SWClientConnection.h
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp


Added Paths

trunk/LayoutTests/http/tests/workers/service/ServiceWorkerGlobalScope_getRegistration-expected.txt
trunk/LayoutTests/http/tests/workers/service/ServiceWorkerGlobalScope_getRegistration.html
trunk/LayoutTests/http/tests/workers/service/resources/ServiceWorkerGlobalScope_getRegistration-worker.js




Diff

Modified: trunk/LayoutTests/ChangeLog (225512 => 225513)

--- trunk/LayoutTests/ChangeLog	2017-12-05 01:37:20 UTC (rev 225512)
+++ trunk/LayoutTests/ChangeLog	2017-12-05 02:06:26 UTC (rev 225513)
@@ -1,3 +1,16 @@
+2017-12-04  Chris Dumez  
+
+Support container.getRegistration() / getRegistrations() inside service workers
+https://bugs.webkit.org/show_bug.cgi?id=180360
+
+Reviewed by Youenn Fablet.
+
+Add layout test coverage.
+
+* http/tests/workers/service/ServiceWorkerGlobalScope_getRegistration-expected.txt: Added.
+* http/tests/workers/service/ServiceWorkerGlobalScope_getRegistration.html: Added.
+* http/tests/workers/service/resources/ServiceWorke

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

2017-12-04 Thread simon . fraser
Title: [225512] trunk/Source/WebCore








Revision 225512
Author simon.fra...@apple.com
Date 2017-12-04 17:37:20 -0800 (Mon, 04 Dec 2017)


Log Message
Cleanup code that computes iframe content offsets in FrameView
https://bugs.webkit.org/show_bug.cgi?id=180385

Reviewed by Zalan Bujtas.

The coordinate conversion functions in FrameView explicitly added borderLeft/paddingLeft
and borderTop/paddingTop to compute the offset from the contents of a frame to its parent renderer.

This is equivalent to the call to contextBoxRect() that RenderWidget::updateWidgetGeometry() does,
which also takes left-side scrollbars into account.

Coordinate offsets don't need height and width, so add RenderBox::contentBoxLocation() that just
computes the top left, and use it in FrameView.

* page/FrameView.cpp:
(WebCore::FrameView::invalidateRect):
(WebCore::FrameView::convertToContainingView const):
(WebCore::FrameView::convertFromContainingView const):
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::scaled const):
(WebCore::FloatPoint::scaled): Deleted.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::contentBoxLocation const):
* rendering/RenderBox.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/FrameView.cpp
trunk/Source/WebCore/platform/graphics/FloatPoint.h
trunk/Source/WebCore/rendering/RenderBox.cpp
trunk/Source/WebCore/rendering/RenderBox.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225511 => 225512)

--- trunk/Source/WebCore/ChangeLog	2017-12-05 01:24:19 UTC (rev 225511)
+++ trunk/Source/WebCore/ChangeLog	2017-12-05 01:37:20 UTC (rev 225512)
@@ -1,3 +1,30 @@
+2017-12-04  Simon Fraser  
+
+Cleanup code that computes iframe content offsets in FrameView
+https://bugs.webkit.org/show_bug.cgi?id=180385
+
+Reviewed by Zalan Bujtas.
+
+The coordinate conversion functions in FrameView explicitly added borderLeft/paddingLeft
+and borderTop/paddingTop to compute the offset from the contents of a frame to its parent renderer.
+
+This is equivalent to the call to contextBoxRect() that RenderWidget::updateWidgetGeometry() does,
+which also takes left-side scrollbars into account.
+
+Coordinate offsets don't need height and width, so add RenderBox::contentBoxLocation() that just
+computes the top left, and use it in FrameView.
+
+* page/FrameView.cpp:
+(WebCore::FrameView::invalidateRect):
+(WebCore::FrameView::convertToContainingView const):
+(WebCore::FrameView::convertFromContainingView const):
+* platform/graphics/FloatPoint.h:
+(WebCore::FloatPoint::scaled const):
+(WebCore::FloatPoint::scaled): Deleted.
+* rendering/RenderBox.cpp:
+(WebCore::RenderBox::contentBoxLocation const):
+* rendering/RenderBox.h:
+
 2017-12-04  Nan Wang  
 
 AX: AOM: Implement relation type properties


Modified: trunk/Source/WebCore/page/FrameView.cpp (225511 => 225512)

--- trunk/Source/WebCore/page/FrameView.cpp	2017-12-05 01:24:19 UTC (rev 225511)
+++ trunk/Source/WebCore/page/FrameView.cpp	2017-12-05 01:37:20 UTC (rev 225512)
@@ -430,7 +430,7 @@
 return;
 
 IntRect repaintRect = rect;
-repaintRect.move(renderer->borderLeft() + renderer->paddingLeft(), renderer->borderTop() + renderer->paddingTop());
+repaintRect.moveBy(roundedIntPoint(renderer->contentBoxLocation()));
 renderer->repaintRectangle(repaintRect);
 }
 
@@ -4384,10 +4384,8 @@
 if (!renderer)
 return localRect;
 
-IntRect rect(localRect);
-// Add borders and padding??
-rect.move(renderer->borderLeft() + renderer->paddingLeft(),
-  renderer->borderTop() + renderer->paddingTop());
+auto rect = localRect;
+rect.moveBy(roundedIntPoint(renderer->contentBoxLocation()));
 return parentView.convertFromRendererToContainingView(renderer, rect);
 }
 
@@ -4408,10 +4406,8 @@
 if (!renderer)
 return parentRect;
 
-IntRect rect = parentView.convertFromContainingViewToRenderer(renderer, parentRect);
-// Subtract borders and padding
-rect.move(-renderer->borderLeft() - renderer->paddingLeft(),
-  -renderer->borderTop() - renderer->paddingTop());
+auto rect = parentView.convertFromContainingViewToRenderer(renderer, parentRect);
+rect.moveBy(-roundedIntPoint(renderer->contentBoxLocation()));
 return rect;
 }
 
@@ -4432,11 +4428,8 @@
 if (!renderer)
 return localPoint;
 
-IntPoint point(localPoint);
-
-// Add borders and padding
-point.move(renderer->borderLeft() + renderer->paddingLeft(),
-   renderer->borderTop() + renderer->paddingTop());
+auto point = localPoint;
+   

[webkit-changes] [225511] trunk

2017-12-04 Thread n_wang
Title: [225511] trunk








Revision 225511
Author n_w...@apple.com
Date 2017-12-04 17:24:19 -0800 (Mon, 04 Dec 2017)


Log Message
AX: AOM: Implement relation type properties
https://bugs.webkit.org/show_bug.cgi?id=179500

Reviewed by Ryosuke Niwa.

Source/WebCore:

Accessibility Object Model
Explainer: https://wicg.github.io/aom/explainer.html
Spec: https://wicg.github.io/aom/spec/

Implemented the AOM support for activeDescendant, details and errorMessage.
The corresponding ARIA attributes all take IDREFs, and the AOM properties
take references to AccessibleNodes instead.

Test: accessibility/mac/AOM-relation-property.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::getAttribute const):
(WebCore::AccessibilityObject::hasProperty const):
(WebCore::AccessibilityObject::stringValueForProperty const):
(WebCore::AccessibilityObject::boolValueForProperty const):
(WebCore::AccessibilityObject::intValueForProperty const):
(WebCore::AccessibilityObject::unsignedValueForProperty const):
(WebCore::AccessibilityObject::doubleValueForProperty const):
(WebCore::AccessibilityObject::elementValueForProperty const):
(WebCore::AccessibilityObject::supportsARIAAttributes const):
(WebCore::AccessibilityObject::elementsFromProperty const):
(WebCore::AccessibilityObject::elementsReferencedByProperty const):
(WebCore::AccessibilityObject::ariaActiveDescendantReferencingElements const):
(WebCore::AccessibilityObject::ariaDetailsElements const):
(WebCore::AccessibilityObject::ariaDetailsReferencingElements const):
(WebCore::AccessibilityObject::ariaErrorMessageElements const):
(WebCore::AccessibilityObject::ariaErrorMessageReferencingElements const):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::activeDescendant const):
* accessibility/AccessibleNode.cpp:
(WebCore::ariaAttributeMap):
(WebCore::isPropertyValueRelation):
(WebCore::AccessibleNode::attributeFromAXPropertyName):
(WebCore::AccessibleNode::setRelationProperty):
(WebCore::AccessibleNode::singleRelationValueForProperty):
(WebCore::AccessibleNode::activeDescendant const):
(WebCore::AccessibleNode::setActiveDescendant):
(WebCore::AccessibleNode::details const):
(WebCore::AccessibleNode::setDetails):
(WebCore::AccessibleNode::errorMessage const):
(WebCore::AccessibleNode::setErrorMessage):
* accessibility/AccessibleNode.h:
* accessibility/AccessibleNode.idl:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools:

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(WTR::AccessibilityUIElement::ariaDetailsElementAtIndex):
(WTR::AccessibilityUIElement::ariaErrorMessageElementAtIndex):
(WTR::AccessibilityUIElement::ariaDescribedByReferencingElementAtIndex):
(WTR::AccessibilityUIElement::ariaDetailsReferencingElementAtIndex):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::ariaDetailsElementAtIndex):
(WTR::AccessibilityUIElement::ariaErrorMessageElementAtIndex):

LayoutTests:

Only enable this test on WK2.

* accessibility/mac/AOM-relation-property-expected.txt: Added.
* accessibility/mac/AOM-relation-property.html: Added.
* platform/mac-wk1/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac-wk1/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
trunk/Source/WebCore/accessibility/AccessibilityObject.h
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
trunk/Source/WebCore/accessibility/AccessibleNode.cpp
trunk/Source/WebCore/accessibility/AccessibleNode.h
trunk/Source/WebCore/accessibility/AccessibleNode.idl
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
trunk/Tools/ChangeLog
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm


Added Paths

trunk/LayoutTests/accessibility/mac/AOM-relation-property-expected.txt
trunk/LayoutTests/accessibility/mac/AOM-relation-property.html




Diff

Modified: trunk/LayoutTests/ChangeLog (225510 => 225511)

--- trunk/LayoutTests/ChangeLog	2017-12-05 01:19:25 UTC (rev 225510)
+++ trunk/LayoutTests/ChangeLog	2017-12-05 01:24:19 UTC (rev 225511)
@@ -1,3 +1,16 @@
+2017-12-04  Nan Wang  
+
+AX: AOM: Implement relation type properties
+https://bugs.webkit.org/show_bug.cgi?id=179500
+
+Reviewed by Ryosuke Niwa.
+
+Only enable this test on WK2.
+
+* accessibility/mac/AOM-relation-property-expected.txt: Added.
+* accessibility/mac/AOM-relation-property.html: Added.
+* platform/mac-wk1/TestExpectations:
+
 2017-12-04  Zalan Bujtas  
 
 REGRESSION (r211531): Text flow changes and overlaps other text after double-click selecting paragraph


Added: trunk/LayoutTests/accessibility/mac/AOM-relation-property-expected.txt (0 => 225

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

2017-12-04 Thread beidson
Title: [225510] trunk/Source/WebKit








Revision 225510
Author beid...@apple.com
Date 2017-12-04 17:19:25 -0800 (Mon, 04 Dec 2017)


Log Message
Followup to:
Get a directory path to SWServers for storing ServiceWorker registrations
https://bugs.webkit.org/show_bug.cgi?id=180362

Unreviewed.


* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::swServerForSession): Change this ASSERT which is invalid in private browsing sessions.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/StorageProcess/StorageProcess.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (225509 => 225510)

--- trunk/Source/WebKit/ChangeLog	2017-12-05 01:13:27 UTC (rev 225509)
+++ trunk/Source/WebKit/ChangeLog	2017-12-05 01:19:25 UTC (rev 225510)
@@ -1,3 +1,14 @@
+2017-12-04  Brady Eidson  
+
+Followup to:
+Get a directory path to SWServers for storing ServiceWorker registrations
+https://bugs.webkit.org/show_bug.cgi?id=180362
+
+Unreviewed.
+
+* StorageProcess/StorageProcess.cpp:
+(WebKit::StorageProcess::swServerForSession): Change this ASSERT which is invalid in private browsing sessions.
+
 2017-12-04  Simon Fraser  
 
 Minor DisplayRefreshMonitor-related cleanup


Modified: trunk/Source/WebKit/StorageProcess/StorageProcess.cpp (225509 => 225510)

--- trunk/Source/WebKit/StorageProcess/StorageProcess.cpp	2017-12-05 01:13:27 UTC (rev 225509)
+++ trunk/Source/WebKit/StorageProcess/StorageProcess.cpp	2017-12-05 01:19:25 UTC (rev 225510)
@@ -387,7 +387,7 @@
 auto path = m_swDatabasePaths.get(sessionID);
 // There should already be a registered path for this PAL::SessionID.
 // If there's not, then where did this PAL::SessionID come from?
-ASSERT(!path.isEmpty());
+ASSERT(sessionID.isEphemeral() || !path.isEmpty());
 
 result.iterator->value = std::make_unique(makeUniqueRef(), path);
 return *result.iterator->value;






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


[webkit-changes] [225509] trunk

2017-12-04 Thread simon . fraser
Title: [225509] trunk








Revision 225509
Author simon.fra...@apple.com
Date 2017-12-04 17:13:27 -0800 (Mon, 04 Dec 2017)


Log Message
Minor DisplayRefreshMonitor-related cleanup
https://bugs.webkit.org/show_bug.cgi?id=179802

Reviewed by Sam Weinig.

Source/WebCore:

New trace point for when the CVDisplayLink fires on its own thread.

Some #pragma once, and put all the WellKnownRunLoopOrders in one place.

* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart):
* platform/cf/RunLoopObserver.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::displayDidRefresh):
* platform/graphics/ca/LayerFlushScheduler.h:
* platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
(WebCore::LayerFlushScheduler::LayerFlushScheduler):

Source/WebKit:

Use RunLoopObserver::WellKnownRunLoopOrders. We want to fire before layer flushing.

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

Source/WTF:

New trace point for when the CVDisplayLink fires on its own thread.

* wtf/SystemTracing.h:

Tools:

New trace point for when the CVDisplayLink fires on its own thread.

* Tracing/SystemTracePoints.plist:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/SystemTracing.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp
trunk/Source/WebCore/platform/cf/RunLoopObserver.h
trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp
trunk/Source/WebCore/platform/graphics/ca/LayerFlushScheduler.h
trunk/Source/WebCore/platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Tools/ChangeLog
trunk/Tools/Tracing/SystemTracePoints.plist




Diff

Modified: trunk/Source/WTF/ChangeLog (225508 => 225509)

--- trunk/Source/WTF/ChangeLog	2017-12-05 01:11:52 UTC (rev 225508)
+++ trunk/Source/WTF/ChangeLog	2017-12-05 01:13:27 UTC (rev 225509)
@@ -1,3 +1,14 @@
+2017-12-04  Simon Fraser  
+
+Minor DisplayRefreshMonitor-related cleanup
+https://bugs.webkit.org/show_bug.cgi?id=179802
+
+Reviewed by Sam Weinig.
+
+New trace point for when the CVDisplayLink fires on its own thread.
+
+* wtf/SystemTracing.h:
+
 2017-12-04  JF Bastien  
 
 Update std::expected to match libc++ coding style


Modified: trunk/Source/WTF/wtf/SystemTracing.h (225508 => 225509)

--- trunk/Source/WTF/wtf/SystemTracing.h	2017-12-05 01:11:52 UTC (rev 225508)
+++ trunk/Source/WTF/wtf/SystemTracing.h	2017-12-05 01:13:27 UTC (rev 225509)
@@ -73,6 +73,7 @@
 UpdateTouchRegionsEnd,
 DisplayListRecordStart,
 DisplayListRecordEnd,
+DisplayRefreshDispatchingToMainThread,
 
 WebKitRange = 1,
 WebHTMLViewPaintStart,


Modified: trunk/Source/WebCore/ChangeLog (225508 => 225509)

--- trunk/Source/WebCore/ChangeLog	2017-12-05 01:11:52 UTC (rev 225508)
+++ trunk/Source/WebCore/ChangeLog	2017-12-05 01:13:27 UTC (rev 225509)
@@ -1,3 +1,23 @@
+2017-12-04  Simon Fraser  
+
+Minor DisplayRefreshMonitor-related cleanup
+https://bugs.webkit.org/show_bug.cgi?id=179802
+
+Reviewed by Sam Weinig.
+
+New trace point for when the CVDisplayLink fires on its own thread.
+
+Some #pragma once, and put all the WellKnownRunLoopOrders in one place.
+
+* inspector/agents/InspectorTimelineAgent.cpp:
+(WebCore::InspectorTimelineAgent::internalStart):
+* platform/cf/RunLoopObserver.h:
+* platform/graphics/DisplayRefreshMonitor.cpp:
+(WebCore::DisplayRefreshMonitor::displayDidRefresh):
+* platform/graphics/ca/LayerFlushScheduler.h:
+* platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
+(WebCore::LayerFlushScheduler::LayerFlushScheduler):
+
 2017-12-04  David Quesada  
 
 Add a class for parsing application manifests


Modified: trunk/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp (225508 => 225509)

--- trunk/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp	2017-12-05 01:11:52 UTC (rev 225508)
+++ trunk/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp	2017-12-05 01:13:27 UTC (rev 225509)
@@ -67,8 +67,6 @@
 using namespace Inspector;
 
 #if PLATFORM(COCOA)
-static const CFIndex frameStopRunLoopOrder = (CFIndex)RunLoopObserver::WellKnownRunLoopOrders::CoreAnimationCommit + 1;
-
 static CFRunLoopRef currentRunLoop()
 {
 #if PLATFORM(IOS)
@@ -174,7 +172,7 @@
 // FIXME: Abstract away platform-specific code once https://bugs.webkit.org/show_bug.cgi?id=142748 is fixed.
 
 #if PLATFORM(COCOA)
-m_frameStartObserver = std::make_unique(0, [this]() {
+m_frameStartObserver = std::make_unique(static_cast(RunLoopObserver::WellKnownRunLoopOrders::InspectorFrameBegin), [this]() {
 if (!m_enabled || m_environment.scriptDebugServer().isPaused())
 return;
 
@@ -183,7 +181,7 @@
 m_runLoopNestingLevel++;
 });
 
-m_frameStopObserver = s

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

2017-12-04 Thread bfulgham
Title: [225508] trunk/Source/WebKit








Revision 225508
Author bfulg...@apple.com
Date 2017-12-04 17:11:52 -0800 (Mon, 04 Dec 2017)


Log Message
Don't force creation of process pool when enabling resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=180374


Reviewed by Alex Christensen.

Pass appropriate arguments to the 'processPool' accessor so that we only get the
set of existing process pools. We don't want to pay the cost of launching new
process pools just to set this flag. The flag will be properly set when the pools
are created as soon as a WebView is instantiated.

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

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (225507 => 225508)

--- trunk/Source/WebKit/ChangeLog	2017-12-05 00:57:33 UTC (rev 225507)
+++ trunk/Source/WebKit/ChangeLog	2017-12-05 01:11:52 UTC (rev 225508)
@@ -1,3 +1,19 @@
+2017-12-04  Brent Fulgham  
+
+Don't force creation of process pool when enabling resource load statistics
+https://bugs.webkit.org/show_bug.cgi?id=180374
+
+
+Reviewed by Alex Christensen.
+
+Pass appropriate arguments to the 'processPool' accessor so that we only get the
+set of existing process pools. We don't want to pay the cost of launching new
+process pools just to set this flag. The flag will be properly set when the pools
+are created as soon as a WebView is instantiated.
+
+* UIProcess/WebsiteData/WebsiteDataStore.cpp:
+(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
+
 2017-12-04  David Quesada  
 
 Add a class for parsing application manifests


Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (225507 => 225508)

--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2017-12-05 00:57:33 UTC (rev 225507)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2017-12-05 01:11:52 UTC (rev 225508)
@@ -1326,7 +1326,9 @@
 }
 
 m_resourceLoadStatistics = nullptr;
-for (auto& processPool : processPools())
+
+auto existingProcessPools = processPools(std::numeric_limits::max(), false);
+for (auto& processPool : existingProcessPools)
 processPool->setResourceLoadStatisticsEnabled(false);
 }
 






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


[webkit-changes] [225507] trunk

2017-12-04 Thread commit-queue
Title: [225507] trunk








Revision 225507
Author commit-qu...@webkit.org
Date 2017-12-04 16:57:33 -0800 (Mon, 04 Dec 2017)


Log Message
Add a class for parsing application manifests
https://bugs.webkit.org/show_bug.cgi?id=177973
rdar://problem/34747949

Patch by David Quesada  on 2017-12-04
Reviewed by Geoffrey Garen.

Source/_javascript_Core:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.

Source/WebCore:

Add a new struct ApplicationManifest, along with ApplicationManifestParser to initialize
ApplicationManifests from JSON data, according to the App Manifest spec. Just a basic subset
of the manifests's properties are implemented to start with.

ApplicationManifestParser is tested by new unit tests in TestWebKitAPI.

* Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.
* Modules/applicationmanifest/ApplicationManifest.h: Added.
* Modules/applicationmanifest/ApplicationManifestParser.cpp: Added.
(WebCore::ApplicationManifestParser::parse):
The main entry point for eventual clients (and currently the unit tests) to invoke
ApplicationManifestParser. There is a variant that accepts a ScriptExecutionContext that
uses the context exclusively for logging console warnings while parsing the manifest, and
not for actually executing any scripts.
(WebCore::ApplicationManifestParser::ApplicationManifestParser):
(WebCore::ApplicationManifestParser::parseManifest):
(WebCore::ApplicationManifestParser::logManifestPropertyNotAString):
(WebCore::ApplicationManifestParser::logManifestPropertyInvalidURL):
(WebCore::ApplicationManifestParser::logDeveloperWarning):
(WebCore::ApplicationManifestParser::parseStartURL):
(WebCore::ApplicationManifestParser::parseName):
(WebCore::ApplicationManifestParser::parseDescription):
(WebCore::ApplicationManifestParser::parseShortName):
(WebCore::isInScope):
(WebCore::ApplicationManifestParser::parseScope):
(WebCore::ApplicationManifestParser::parseGenericString):
* Modules/applicationmanifest/ApplicationManifestParser.h: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* features.json: Change the Web App Manifest feature status to "In Development"

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.

Source/WebKit:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.

Tools:

Add basic unit tests for ApplicationManifestParser. For each of the implemented top-level properties,
attempt to parse manifests with varying types of valid and invalid data to ensure the resulting
ApplicationManifest is configured with the appropriate values per the spec.

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: Added.
(ApplicationManifestParserTest::SetUp):
(ApplicationManifestParserTest::parseString):
(ApplicationManifestParserTest::parseTopLevelProperty):
(ApplicationManifestParserTest::testStartURL):
(ApplicationManifestParserTest::testName):
(ApplicationManifestParserTest::testDescription):
(ApplicationManifestParserTest::testShortName):
(ApplicationManifestParserTest::testScope):
(assertManifestHasDefaultValues):
(TEST_F):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/features.json
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebCore/Modules/applicationmanifest/
trunk/Source/WebCore/Modules/applicationmanifest/ApplicationManifest.h
trunk/Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.cpp
trunk/Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.h
trunk/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (225506 => 225507)

--- trunk/Source/_javascript_Core/ChangeLog	2017-12-05 00:51:01 UTC (rev 225506)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-12-05 00:57:33 UTC (rev 225507)
@@ -1,3 +1,13 @@
+2017-12-04  David Quesada  
+
+Add a class for parsing application manifests
+https://bugs.webkit.org/show_bug.cgi?id=1

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

2017-12-04 Thread zalan
Title: [225506] trunk/Source/WebCore








Revision 225506
Author za...@apple.com
Date 2017-12-04 16:51:01 -0800 (Mon, 04 Dec 2017)


Log Message
RenderMultiColumnFlow::fragmentedFlowDescendantInserted should not destroy incoming newDescendant
https://bugs.webkit.org/show_bug.cgi?id=180181

Reviewed by Antti Koivisto.

This is in preparation for having all multicolumn related tree mutation in RenderTreeUpdaterMultiColumn.

Covered by fast/multicol/column-span-range-crash.html

* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
* rendering/RenderMultiColumnFlow.h:
* style/RenderTreeUpdaterMultiColumn.cpp:
(WebCore::RenderTreeUpdater::MultiColumn::destroyFragmentedFlow):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderMultiColumnFlow.cpp
trunk/Source/WebCore/rendering/RenderMultiColumnFlow.h
trunk/Source/WebCore/style/RenderTreeUpdaterMultiColumn.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (225505 => 225506)

--- trunk/Source/WebCore/ChangeLog	2017-12-05 00:13:09 UTC (rev 225505)
+++ trunk/Source/WebCore/ChangeLog	2017-12-05 00:51:01 UTC (rev 225506)
@@ -1,3 +1,20 @@
+2017-12-04  Zalan Bujtas  
+
+RenderMultiColumnFlow::fragmentedFlowDescendantInserted should not destroy incoming newDescendant
+https://bugs.webkit.org/show_bug.cgi?id=180181
+
+Reviewed by Antti Koivisto.
+
+This is in preparation for having all multicolumn related tree mutation in RenderTreeUpdaterMultiColumn.
+
+Covered by fast/multicol/column-span-range-crash.html
+
+* rendering/RenderMultiColumnFlow.cpp:
+(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
+* rendering/RenderMultiColumnFlow.h:
+* style/RenderTreeUpdaterMultiColumn.cpp:
+(WebCore::RenderTreeUpdater::MultiColumn::destroyFragmentedFlow):
+
 2017-12-04  JF Bastien  
 
 Update std::expected to match libc++ coding style


Modified: trunk/Source/WebCore/rendering/RenderMultiColumnFlow.cpp (225505 => 225506)

--- trunk/Source/WebCore/rendering/RenderMultiColumnFlow.cpp	2017-12-05 00:13:09 UTC (rev 225505)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnFlow.cpp	2017-12-05 00:51:01 UTC (rev 225506)
@@ -350,46 +350,26 @@
 if (gShiftingSpanner || newDescendant.isInFlowRenderFragmentedFlow())
 return;
 
-Vector> spannersToDelete;
-
-RenderObject* subtreeRoot = &newDescendant;
-for (auto* descendant = &newDescendant; descendant; descendant = (descendant ? descendant->nextInPreOrder(subtreeRoot) : nullptr)) {
+auto* subtreeRoot = &newDescendant;
+auto* descendant = subtreeRoot;
+while (descendant) {
+// Skip nested multicolumn flows.
+if (is(*descendant)) {
+descendant = descendant->nextSibling();
+continue;
+}
 if (is(*descendant)) {
 // A spanner's placeholder has been inserted. The actual spanner renderer is moved from
 // where it would otherwise occur (if it weren't a spanner) to becoming a sibling of the
 // column sets.
 RenderMultiColumnSpannerPlaceholder& placeholder = downcast(*descendant);
-if (placeholder.fragmentedFlow() != this) {
-// This isn't our spanner! It shifted here from an ancestor multicolumn block. It's going to end up
-// becoming our spanner instead, but for it to do that we first have to nuke the original spanner,
-// and get the spanner content back into this flow thread.
-RenderBox* spanner = placeholder.spanner();
-
-// Insert after the placeholder, but don't let a notification happen.
-gShiftingSpanner = true;
-RenderBlockFlow& ancestorBlock = downcast(*spanner->parent());
-ancestorBlock.moveChildTo(placeholder.parentBox(), spanner, placeholder.nextSibling(), RenderBoxModelObject::NormalizeAfterInsertion::Yes);
-gShiftingSpanner = false;
-
-// We have to nuke the placeholder, since the ancestor already lost the mapping to it when
-// we shifted the placeholder down into this flow thread.
-placeholder.fragmentedFlow()->spannerMap().remove(spanner);
-
-spannersToDelete.append(placeholder.parent()->takeChild(placeholder));
-
-if (subtreeRoot == descendant)
-subtreeRoot = spanner;
-// Now we process the spanner.
-descendant = processPossibleSpannerDescendant(subtreeRoot, *spanner);
-continue;
-}
-
 ASSERT(!spannerMap().get(placeholder.spanner()));
-spannerMap().add(placeholder.spanner(), makeWeakPtr(placeholder));
+spannerMap().add(placeholder.spanner(), makeWeakPtr(downcast(descendant)));
 ASSERT(!placeholder.

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

2017-12-04 Thread wenson_hsieh
Title: [225505] trunk/Source/WebKit








Revision 225505
Author wenson_hs...@apple.com
Date 2017-12-04 16:13:09 -0800 (Mon, 04 Dec 2017)


Log Message
Rename a static helper in TouchBarMenuItemData.cpp to match style guidelines.
https://bugs.webkit.org/show_bug.cgi?id=180305

Reviewed by Andy Estes.

Style guidelines state that we should use bare words for getters, so getItemType should just be
itemType. Since this collides with the itemType member variable, this patch also renames that
member variable to the more concise "type".

No change in behavior.

* Shared/TouchBarMenuItemData.cpp:
(WebKit::itemType):
(WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
(WebKit::TouchBarMenuItemData::encode const):
(WebKit::TouchBarMenuItemData::decode):
(WebKit::getItemType): Deleted.
* Shared/TouchBarMenuItemData.h:
(WebKit::operator==):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/TouchBarMenuItemData.cpp
trunk/Source/WebKit/Shared/TouchBarMenuItemData.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (225504 => 225505)

--- trunk/Source/WebKit/ChangeLog	2017-12-05 00:11:05 UTC (rev 225504)
+++ trunk/Source/WebKit/ChangeLog	2017-12-05 00:13:09 UTC (rev 225505)
@@ -1,3 +1,25 @@
+2017-12-04  Wenson Hsieh  
+
+Rename a static helper in TouchBarMenuItemData.cpp to match style guidelines.
+https://bugs.webkit.org/show_bug.cgi?id=180305
+
+Reviewed by Andy Estes.
+
+Style guidelines state that we should use bare words for getters, so getItemType should just be
+itemType. Since this collides with the itemType member variable, this patch also renames that
+member variable to the more concise "type".
+
+No change in behavior.
+
+* Shared/TouchBarMenuItemData.cpp:
+(WebKit::itemType):
+(WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
+(WebKit::TouchBarMenuItemData::encode const):
+(WebKit::TouchBarMenuItemData::decode):
+(WebKit::getItemType): Deleted.
+* Shared/TouchBarMenuItemData.h:
+(WebKit::operator==):
+
 2017-12-04  Brian Burg  
 
 Web Automation: add flag to preserve legacy page screenshot behavior


Modified: trunk/Source/WebKit/Shared/TouchBarMenuItemData.cpp (225504 => 225505)

--- trunk/Source/WebKit/Shared/TouchBarMenuItemData.cpp	2017-12-05 00:11:05 UTC (rev 225504)
+++ trunk/Source/WebKit/Shared/TouchBarMenuItemData.cpp	2017-12-05 00:13:09 UTC (rev 225505)
@@ -33,7 +33,7 @@
 
 namespace WebKit {
 
-static ItemType getItemType(const String&)
+static ItemType itemType(const String&)
 {
 return ItemType::Button;
 }
@@ -40,7 +40,7 @@
 
 TouchBarMenuItemData::TouchBarMenuItemData(const WebCore::HTMLMenuItemElement& element)
 {
-itemType = getItemType(element.attributeWithoutSynchronization(WebCore::HTMLNames::typeAttr));
+type = itemType(element.attributeWithoutSynchronization(WebCore::HTMLNames::typeAttr));
 identifier = element.attributeWithoutSynchronization(WebCore::HTMLNames::idAttr);
 priority = element.attributeWithoutSynchronization(WebCore::HTMLNames::valueAttr).toFloat();
 }
@@ -47,7 +47,7 @@
 
 void TouchBarMenuItemData::encode(IPC::Encoder& encoder) const
 {
-encoder.encodeEnum(itemType);
+encoder.encodeEnum(type);
 
 encoder << identifier;
 encoder << priority;
@@ -56,7 +56,7 @@
 std::optional TouchBarMenuItemData::decode(IPC::Decoder& decoder)
 {
 TouchBarMenuItemData result;
-if (!decoder.decodeEnum(result.itemType))
+if (!decoder.decodeEnum(result.type))
 return std::nullopt;
 
 if (!decoder.decode(result.identifier))


Modified: trunk/Source/WebKit/Shared/TouchBarMenuItemData.h (225504 => 225505)

--- trunk/Source/WebKit/Shared/TouchBarMenuItemData.h	2017-12-05 00:11:05 UTC (rev 225504)
+++ trunk/Source/WebKit/Shared/TouchBarMenuItemData.h	2017-12-05 00:13:09 UTC (rev 225505)
@@ -51,7 +51,7 @@
 void encode(IPC::Encoder&) const;
 static std::optional decode(IPC::Decoder&);
 
-ItemType itemType { ItemType::Button };
+ItemType type { ItemType::Button };
 String identifier;
 float priority { 0.0 };
 bool validTouchBarDisplay { true };
@@ -80,9 +80,9 @@
 
 inline bool operator==(const TouchBarMenuItemData& lhs, const TouchBarMenuItemData& rhs)
 {
-return lhs.itemType == rhs.itemType
-&& lhs.identifier == rhs.identifier
-&& lhs.priority == rhs.priority;
+return lhs.type == rhs.type
+&& lhs.identifier == rhs.identifier
+&& lhs.priority == rhs.priority;
 }
 
 inline bool operator!=(const TouchBarMenuItemData& lhs, const TouchBarMenuItemData& rhs)






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


[webkit-changes] [225504] tags/Safari-605.1.15.2

2017-12-04 Thread jmarcell
Title: [225504] tags/Safari-605.1.15.2








Revision 225504
Author jmarc...@apple.com
Date 2017-12-04 16:11:05 -0800 (Mon, 04 Dec 2017)


Log Message
Cherry-pick r225383. rdar://problem/35709469

Modified Paths

tags/Safari-605.1.15.2/Source/WebKit/ChangeLog
tags/Safari-605.1.15.2/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm
tags/Safari-605.1.15.2/Tools/ChangeLog
tags/Safari-605.1.15.2/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

tags/Safari-605.1.15.2/Tools/TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm




Diff

Modified: tags/Safari-605.1.15.2/Source/WebKit/ChangeLog (225503 => 225504)

--- tags/Safari-605.1.15.2/Source/WebKit/ChangeLog	2017-12-05 00:09:10 UTC (rev 225503)
+++ tags/Safari-605.1.15.2/Source/WebKit/ChangeLog	2017-12-05 00:11:05 UTC (rev 225504)
@@ -1,3 +1,22 @@
+2017-12-04  Jason Marcell  
+
+Cherry-pick r225383. rdar://problem/35709469
+
+2017-11-30  Alex Christensen  
+
+REGRESSION (r224791): cookies are shared between ephemeral sessions in the same process pool
+https://bugs.webkit.org/show_bug.cgi?id=180235
+
+Reviewed by Joseph Pecoraro.
+
+In r224791 I assumed that uiProcessCookieStorageIdentifier would be empty in the ephemeral session initialization message.
+This is not the case.  We did not catch this because almost all of our ephemeral session testing uses the legacyPrivateSessionID.
+I add checks for if the SessionID is ephemeral like we already have in WebFrameNetworkingContext::ensureWebsiteDataStoreSession.
+I also add an API test that makes sure cookies are not shared between ephemeral sessions the way they are made through the API.
+
+* NetworkProcess/mac/RemoteNetworkingContext.mm:
+(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
+
 2017-11-29  Zan Dobersek  
 
 [CoordGraphics] Rename CoordinatedBuffer to Nicosia::Buffer


Modified: tags/Safari-605.1.15.2/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm (225503 => 225504)

--- tags/Safari-605.1.15.2/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm	2017-12-05 00:09:10 UTC (rev 225503)
+++ tags/Safari-605.1.15.2/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm	2017-12-05 00:11:05 UTC (rev 225504)
@@ -97,7 +97,7 @@
 SandboxExtension::consumePermanently(parameters.cookieStoragePathExtensionHandle);
 
 RetainPtr uiProcessCookieStorage;
-if (!parameters.uiProcessCookieStorageIdentifier.isEmpty())
+if (!sessionID.isEphemeral() && !parameters.uiProcessCookieStorageIdentifier.isEmpty())
 uiProcessCookieStorage = cookieStorageFromIdentifyingData(parameters.uiProcessCookieStorageIdentifier);
 
 NetworkStorageSession::ensureSession(sessionID, base + '.' + String::number(sessionID.sessionID()), WTFMove(uiProcessCookieStorage));
@@ -106,7 +106,7 @@
 for (const auto& cookie : parameters.pendingCookies)
 session->setCookie(cookie);
 
-if (!parameters.cacheStorageDirectory.isNull()) {
+if (!sessionID.isEphemeral() && !parameters.cacheStorageDirectory.isNull()) {
 SandboxExtension::consumePermanently(parameters.cacheStorageDirectoryExtensionHandle);
 session->setCacheStorageDirectory(WTFMove(parameters.cacheStorageDirectory));
 session->setCacheStoragePerOriginQuota(parameters.cacheStoragePerOriginQuota);


Modified: tags/Safari-605.1.15.2/Tools/ChangeLog (225503 => 225504)

--- tags/Safari-605.1.15.2/Tools/ChangeLog	2017-12-05 00:09:10 UTC (rev 225503)
+++ tags/Safari-605.1.15.2/Tools/ChangeLog	2017-12-05 00:11:05 UTC (rev 225504)
@@ -1,3 +1,19 @@
+2017-12-04  Jason Marcell  
+
+Cherry-pick r225383. rdar://problem/35709469
+
+2017-11-30  Alex Christensen  
+
+REGRESSION (r224791): cookies are shared between ephemeral sessions in the same process pool
+https://bugs.webkit.org/show_bug.cgi?id=180235
+
+Reviewed by Joseph Pecoraro.
+
+* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+* TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm: Added.
+(-[CookiePrivateBrowsingDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
+(TEST):
+
 2017-11-28  Carlos Garcia Campos  
 
 WebDriver: add an option to dump test results to a json file


Modified: tags/Safari-605.1.15.2/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (225503 => 225504)

--- tags/Safari-605.1.15.2/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2017-12-05 00:09:10 UTC (rev 225503)
+++ tags/Safari-605.1.15.2/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2017-12-05 00:11:05 UTC (rev 225504)
@@ -228,6 +228,7 @@
 		5C0BF8931DD599BD00B00328 /* IsNavigationActionTrusted.mm in Sources */ = {isa = PBXBuildFile; fileRef = 57F10D921C7E7B3800ECDF30 /* IsNavigationActionTrusted.mm */; };
 		5C0BF

[webkit-changes] [225503] tags/Safari-605.1.15.2/Source

2017-12-04 Thread jmarcell
Title: [225503] tags/Safari-605.1.15.2/Source








Revision 225503
Author jmarc...@apple.com
Date 2017-12-04 16:09:10 -0800 (Mon, 04 Dec 2017)


Log Message
Versioning.

Modified Paths

tags/Safari-605.1.15.2/Source/_javascript_Core/Configurations/Version.xcconfig
tags/Safari-605.1.15.2/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig
tags/Safari-605.1.15.2/Source/WebCore/Configurations/Version.xcconfig
tags/Safari-605.1.15.2/Source/WebCore/PAL/Configurations/Version.xcconfig
tags/Safari-605.1.15.2/Source/WebInspectorUI/Configurations/Version.xcconfig
tags/Safari-605.1.15.2/Source/WebKit/Configurations/Version.xcconfig
tags/Safari-605.1.15.2/Source/WebKitLegacy/mac/Configurations/Version.xcconfig




Diff

Modified: tags/Safari-605.1.15.2/Source/_javascript_Core/Configurations/Version.xcconfig (225502 => 225503)

--- tags/Safari-605.1.15.2/Source/_javascript_Core/Configurations/Version.xcconfig	2017-12-05 00:07:29 UTC (rev 225502)
+++ tags/Safari-605.1.15.2/Source/_javascript_Core/Configurations/Version.xcconfig	2017-12-05 00:09:10 UTC (rev 225503)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 605;
 MINOR_VERSION = 1;
 TINY_VERSION = 15;
-MICRO_VERSION = 1;
+MICRO_VERSION = 2;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: tags/Safari-605.1.15.2/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig (225502 => 225503)

--- tags/Safari-605.1.15.2/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig	2017-12-05 00:07:29 UTC (rev 225502)
+++ tags/Safari-605.1.15.2/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig	2017-12-05 00:09:10 UTC (rev 225503)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 605;
 MINOR_VERSION = 1;
 TINY_VERSION = 15;
-MICRO_VERSION = 1;
+MICRO_VERSION = 2;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: tags/Safari-605.1.15.2/Source/WebCore/Configurations/Version.xcconfig (225502 => 225503)

--- tags/Safari-605.1.15.2/Source/WebCore/Configurations/Version.xcconfig	2017-12-05 00:07:29 UTC (rev 225502)
+++ tags/Safari-605.1.15.2/Source/WebCore/Configurations/Version.xcconfig	2017-12-05 00:09:10 UTC (rev 225503)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 605;
 MINOR_VERSION = 1;
 TINY_VERSION = 15;
-MICRO_VERSION = 1;
+MICRO_VERSION = 2;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: tags/Safari-605.1.15.2/Source/WebCore/PAL/Configurations/Version.xcconfig (225502 => 225503)

--- tags/Safari-605.1.15.2/Source/WebCore/PAL/Configurations/Version.xcconfig	2017-12-05 00:07:29 UTC (rev 225502)
+++ tags/Safari-605.1.15.2/Source/WebCore/PAL/Configurations/Version.xcconfig	2017-12-05 00:09:10 UTC (rev 225503)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 605;
 MINOR_VERSION = 1;
 TINY_VERSION = 15;
-MICRO_VERSION = 1;
+MICRO_VERSION = 2;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: tags/Safari-605.1.15.2/Source/WebInspectorUI/Configurations/Version.xcconfig (225502 => 225503)

--- tags/Safari-605.1.15.2/Source/WebInspectorUI/Configurations/Version.xcconfig	2017-12-05 00:07:29 UTC (rev 225502)
+++ tags/Safari-605.1.15.2/Source/WebInspectorUI/Configurations/Version.xcconfig	2017-12-05 00:09:10 UTC (rev 225503)
@@ -1,7 +1,7 @@
 MAJOR_VERSION = 605;
 MINOR_VERSION = 1;
 TINY_VERSION = 15;
-MICRO_VERSION = 1;
+MICRO_VERSION = 2;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: tags/Safari-605.1.15.2/Source/WebKit/Configurations/Version.xcconfig (225502 => 225503)

--- tags/Safari-605.1.15.2/Source/WebKit/Configurations/Version.xcconfig	2017-12-05 00:07:29 UTC (rev 225502)
+++ tags/Safari-605.1.15.2/Source/WebKit/Configurations/Version.xcconfig	2017-12-05 00:09:10 UTC (rev 225503)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 605;
 MINOR_VERSION = 1;
 TINY_VERSION = 15;
-MICRO_VERSION = 1;
+MICRO_VERSION = 2;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: tags/Safari-605.1.15.2/Source/WebKitLegacy/mac/Configurations/Version.xcconfig (225502 => 225503)

--- tags/Safari-605.1.15.2/Source/WebKitLegacy/mac/Configurations/Version.xcconfig	2017-12-05 00:07:29 UTC (rev 225502)
+++ tags/Safari-605.1.15.2/Source/WebKitLegacy/mac/Configurations/Version.xcconfig	2017-12-05 00:09:10 UTC (rev 225503)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 605;
 MINOR_VERSION = 1;
 TINY_VERSION = 15;
-MICRO_VERSION = 1;
+MICRO_VERSION = 2;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 






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


[webkit-changes] [225502] tags/Safari-605.1.15.2/

2017-12-04 Thread jmarcell
Title: [225502] tags/Safari-605.1.15.2/








Revision 225502
Author jmarc...@apple.com
Date 2017-12-04 16:07:29 -0800 (Mon, 04 Dec 2017)


Log Message
New tag.

Added Paths

tags/Safari-605.1.15.2/




Diff




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


[webkit-changes] [225501] trunk/Source

2017-12-04 Thread bburg
Title: [225501] trunk/Source








Revision 225501
Author bb...@apple.com
Date 2017-12-04 16:06:25 -0800 (Mon, 04 Dec 2017)


Log Message
Web Automation: add flag to preserve legacy page screenshot behavior
https://bugs.webkit.org/show_bug.cgi?id=180313


Reviewed by Joseph Pecoraro.

Source/WebDriver:

Set the clipToViewport flag to true when sending Automation.takeScreenshot.
This preserves the current behavior for this driver implementation.

* Session.cpp:
(WebDriver::Session::takeScreenshot):

Source/WebKit:

For compatibility with JSON Wire Protocol implemented by Safari,
we need to retain the ability to perform whole page contents
snapshots using Automation.takeScreenshot. Add an extra flag,
clipToViewport, which can be used by W3C-conforming drivers.

* UIProcess/Automation/Automation.json: Add new flag.
* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::takeScreenshot):
* WebProcess/Automation/WebAutomationSessionProxy.h:
* WebProcess/Automation/WebAutomationSessionProxy.messages.in:
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::snapshotRectForScreenshot):
(WebKit::WebAutomationSessionProxy::takeScreenshot):
If the flag is false, take a screenshot of the whole page contents.

Modified Paths

trunk/Source/WebDriver/ChangeLog
trunk/Source/WebDriver/Session.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Automation/Automation.json
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.h
trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp
trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h
trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in




Diff

Modified: trunk/Source/WebDriver/ChangeLog (225500 => 225501)

--- trunk/Source/WebDriver/ChangeLog	2017-12-05 00:03:38 UTC (rev 225500)
+++ trunk/Source/WebDriver/ChangeLog	2017-12-05 00:06:25 UTC (rev 225501)
@@ -1,3 +1,17 @@
+2017-12-04  Brian Burg  
+
+Web Automation: add flag to preserve legacy page screenshot behavior
+https://bugs.webkit.org/show_bug.cgi?id=180313
+
+
+Reviewed by Joseph Pecoraro.
+
+Set the clipToViewport flag to true when sending Automation.takeScreenshot.
+This preserves the current behavior for this driver implementation.
+
+* Session.cpp:
+(WebDriver::Session::takeScreenshot):
+
 2017-12-04  Carlos Garcia Campos  
 
 WebDriver: implement element property command


Modified: trunk/Source/WebDriver/Session.cpp (225500 => 225501)

--- trunk/Source/WebDriver/Session.cpp	2017-12-05 00:03:38 UTC (rev 225500)
+++ trunk/Source/WebDriver/Session.cpp	2017-12-05 00:06:25 UTC (rev 225501)
@@ -2123,6 +2123,8 @@
 parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value());
 if (elementID)
 parameters->setString(ASCIILiteral("nodeHandle"), elementID.value());
+else
+parameters->setBoolean(ASCIILiteral("clipToViewport"), true);
 if (scrollIntoView.value_or(false))
 parameters->setBoolean(ASCIILiteral("scrollIntoViewIfNeeded"), true);
 m_host->sendCommandToBackend(ASCIILiteral("takeScreenshot"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable {


Modified: trunk/Source/WebKit/ChangeLog (225500 => 225501)

--- trunk/Source/WebKit/ChangeLog	2017-12-05 00:03:38 UTC (rev 225500)
+++ trunk/Source/WebKit/ChangeLog	2017-12-05 00:06:25 UTC (rev 225501)
@@ -1,3 +1,27 @@
+2017-12-04  Brian Burg  
+
+Web Automation: add flag to preserve legacy page screenshot behavior
+https://bugs.webkit.org/show_bug.cgi?id=180313
+
+
+Reviewed by Joseph Pecoraro.
+
+For compatibility with JSON Wire Protocol implemented by Safari,
+we need to retain the ability to perform whole page contents
+snapshots using Automation.takeScreenshot. Add an extra flag,
+clipToViewport, which can be used by W3C-conforming drivers.
+
+* UIProcess/Automation/Automation.json: Add new flag.
+* UIProcess/Automation/WebAutomationSession.h:
+* UIProcess/Automation/WebAutomationSession.cpp:
+(WebKit::WebAutomationSession::takeScreenshot):
+* WebProcess/Automation/WebAutomationSessionProxy.h:
+* WebProcess/Automation/WebAutomationSessionProxy.messages.in:
+* WebProcess/Automation/WebAutomationSessionProxy.cpp:
+(WebKit::snapshotRectForScreenshot):
+(WebKit::WebAutomationSessionProxy::takeScreenshot):
+If the flag is false, take a screenshot of the whole page contents.
+
 2017-12-04  JF Bastien  
 
 Update std::expected to match libc++ coding style


Modified: trunk/Source/WebKit/UIProcess/Automation/Automation.json (225

[webkit-changes] [225500] trunk/Tools

2017-12-04 Thread aakash_jain
Title: [225500] trunk/Tools








Revision 225500
Author aakash_j...@apple.com
Date 2017-12-04 16:03:38 -0800 (Mon, 04 Dec 2017)


Log Message
Add docstring in EarlyWarningSystemTask to explain return values
https://bugs.webkit.org/show_bug.cgi?id=180303

Reviewed by Daniel Bates.

* Scripts/webkitpy/tool/bot/earlywarningsystemtask.py:
(EarlyWarningSystemTask.run): Added docstring to explain return values.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.review_patch): Added comment to explain the result of unlocking a patch.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py
trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py




Diff

Modified: trunk/Tools/ChangeLog (225499 => 225500)

--- trunk/Tools/ChangeLog	2017-12-04 23:34:57 UTC (rev 225499)
+++ trunk/Tools/ChangeLog	2017-12-05 00:03:38 UTC (rev 225500)
@@ -1,3 +1,15 @@
+2017-12-04  Aakash Jain  
+
+Add docstring in EarlyWarningSystemTask to explain return values
+https://bugs.webkit.org/show_bug.cgi?id=180303
+
+Reviewed by Daniel Bates.
+
+* Scripts/webkitpy/tool/bot/earlywarningsystemtask.py:
+(EarlyWarningSystemTask.run): Added docstring to explain return values.
+* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+(AbstractEarlyWarningSystem.review_patch): Added comment to explain the result of unlocking a patch.
+
 2017-12-04  JF Bastien  
 
 Update std::expected to match libc++ coding style


Modified: trunk/Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py (225499 => 225500)

--- trunk/Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py	2017-12-04 23:34:57 UTC (rev 225499)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/earlywarningsystemtask.py	2017-12-05 00:03:38 UTC (rev 225500)
@@ -54,6 +54,12 @@
 return True
 
 def run(self):
+"""
+Returns True if the patch passes EWS.
+Raises an exception if the patch fails EWS.
+Returns False if the patch status can not be ascertained. AbstractEarlyWarningSystem.review_patch()
+will unlock the patch so that it would be retried.
+"""
 if not self._clean():
 return False
 if not self._update():


Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py (225499 => 225500)

--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py	2017-12-04 23:34:57 UTC (rev 225499)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py	2017-12-05 00:03:38 UTC (rev 225500)
@@ -102,6 +102,7 @@
 succeeded = task.run()
 if not succeeded:
 # Caller unlocks when review_patch returns True, so we only need to unlock on transient failure.
+# Unlocking the patch would result in patch being re-tried.
 self._unlock_patch(patch)
 return succeeded
 except PatchIsNotValid as error:






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


[webkit-changes] [225498] trunk/Tools

2017-12-04 Thread ross . kirsling
Title: [225498] trunk/Tools








Revision 225498
Author ross.kirsl...@sony.com
Date 2017-12-04 15:05:00 -0800 (Mon, 04 Dec 2017)


Log Message
download-latest-github-release.py should use existing release ANY time latest is not found
https://bugs.webkit.org/show_bug.cgi?id=180293

Reviewed by Per Arne Vollan.

* Scripts/download-latest-github-release.py:
(find_latest_release):
Handle all URLErrors, not just HTTPErrors. Stop special-casing 404s.

(main):
Rearrange logic so any failure to detect a latest release falls back to an existing release. Improve logging.

(Status):
(download_release):
(load_version_info): Renamed from existing_version info.
(has_latest_release): Deleted.
Cleanup.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/download-latest-github-release.py




Diff

Modified: trunk/Tools/ChangeLog (225497 => 225498)

--- trunk/Tools/ChangeLog	2017-12-04 22:52:26 UTC (rev 225497)
+++ trunk/Tools/ChangeLog	2017-12-04 23:05:00 UTC (rev 225498)
@@ -1,3 +1,23 @@
+2017-12-04  Ross Kirsling  
+
+download-latest-github-release.py should use existing release ANY time latest is not found
+https://bugs.webkit.org/show_bug.cgi?id=180293
+
+Reviewed by Per Arne Vollan.
+
+* Scripts/download-latest-github-release.py:
+(find_latest_release):
+Handle all URLErrors, not just HTTPErrors. Stop special-casing 404s.
+
+(main):
+Rearrange logic so any failure to detect a latest release falls back to an existing release. Improve logging.
+
+(Status):
+(download_release):
+(load_version_info): Renamed from existing_version info.
+(has_latest_release): Deleted.
+Cleanup.
+
 2017-12-04  Joseph Pecoraro  
 
 Exclude some more leak callstacks


Modified: trunk/Tools/Scripts/download-latest-github-release.py (225497 => 225498)

--- trunk/Tools/Scripts/download-latest-github-release.py	2017-12-04 22:52:26 UTC (rev 225497)
+++ trunk/Tools/Scripts/download-latest-github-release.py	2017-12-04 23:05:00 UTC (rev 225498)
@@ -46,7 +46,7 @@
 DOWNLOADED = 0
 UP_TO_DATE = 1
 COULD_NOT_FIND = 2
-USE_EXISTING_VERSION = 3
+USING_EXISTING = 3
 
 
 def parse_args(argv):
@@ -69,9 +69,8 @@
 
 try:
 response = urllib2.urlopen(request)
-except urllib2.HTTPError, error:
-if error.code != 404:
-print error.code, error.reason
+except urllib2.URLError as error:
+print error
 return None, None
 
 data = ""
@@ -82,7 +81,12 @@
 return None, None
 
 
-def existing_version_info(version_info_path):
+def download_release(source_url, target_path):
+with open(target_path, 'wb') as file:
+file.write(urllib2.urlopen(source_url).read())
+
+
+def load_version_info(version_info_path):
 if not os.path.exists(version_info_path):
 return None
 
@@ -90,15 +94,6 @@
 return json.load(file)
 
 
-def has_latest_release(version_info_path, version_info):
-return existing_version_info(version_info_path) == version_info
-
-
-def download_release(source_url, target_path):
-with open(target_path, 'wb') as file:
-file.write(urllib2.urlopen(source_url).read())
-
-
 def save_version_info(version_info_path, version_info):
 with open(version_info_path, 'w') as file:
 json.dump(version_info, file)
@@ -110,35 +105,37 @@
 binary_path = os.path.join(args.output_dir, args.filename)
 version_info_path = binary_path + '.version'
 
-print 'Seeking latest release of {} from {}...'.format(args.filename, args.repo)
+print 'Updating {}...'.format(args.filename)
 
-try:
-release_url, version_info = find_latest_release(args)
+existing_version_info = load_version_info(version_info_path)
+if existing_version_info:
+print 'Found existing release:', existing_version_info['tag_name']
+else:
+print 'No existing release found.'
 
-if not release_url:
-print 'No release found!'
-return Status.COULD_NOT_FIND
+print 'Seeking latest release from {}...'.format(args.repo)
+release_url, latest_version_info = find_latest_release(args)
 
-if has_latest_release(version_info_path, version_info):
-print 'Already up-to-date:', existing_version_info(version_info_path)
-return Status.UP_TO_DATE
+if not latest_version_info:
+if existing_version_info:
+print 'Falling back to existing release!'
+return Status.USING_EXISTING
 
-except urllib2.URLError, error:
-print error
+print 'No release found!'
+return Status.COULD_NOT_FIND
 
-version_info = existing_version_info(version_info_path)
-if version_info:
-print 'Use existing version:', version_info
-return Status.USE_EXISTING_VERSION
-else:
-return Status.COULD_NOT_FIND
+print 'Found latest release:', latest_version_info['tag_name']
 
+if latest_vers

[webkit-changes] [225497] trunk

2017-12-04 Thread zalan
Title: [225497] trunk








Revision 225497
Author za...@apple.com
Date 2017-12-04 14:52:26 -0800 (Mon, 04 Dec 2017)


Log Message
REGRESSION (r211531): Text flow changes and overlaps other text after double-click selecting paragraph
https://bugs.webkit.org/show_bug.cgi?id=180377


Reviewed by Antti Koivisto.

Source/WebCore:

Take floats into account when computing the available width for a certain vertical position.

Test: fast/block/float/simple-line-layout-float-shrink-line.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::updateLineConstrains):

LayoutTests:

* fast/block/float/simple-line-layout-float-shrink-line-expected.html: Added.
* fast/block/float/simple-line-layout-float-shrink-line.html: Added.

Modified Paths

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


Added Paths

trunk/LayoutTests/fast/block/float/simple-line-layout-float-shrink-line-expected.html
trunk/LayoutTests/fast/block/float/simple-line-layout-float-shrink-line.html




Diff

Modified: trunk/LayoutTests/ChangeLog (225496 => 225497)

--- trunk/LayoutTests/ChangeLog	2017-12-04 22:51:13 UTC (rev 225496)
+++ trunk/LayoutTests/ChangeLog	2017-12-04 22:52:26 UTC (rev 225497)
@@ -1,3 +1,14 @@
+2017-12-04  Zalan Bujtas  
+
+REGRESSION (r211531): Text flow changes and overlaps other text after double-click selecting paragraph
+https://bugs.webkit.org/show_bug.cgi?id=180377
+
+
+Reviewed by Antti Koivisto.
+
+* fast/block/float/simple-line-layout-float-shrink-line-expected.html: Added.
+* fast/block/float/simple-line-layout-float-shrink-line.html: Added.
+
 2017-12-04  Antoine Quint  
 
  and scale() transforms yield shrunk small or clipped controls


Added: trunk/LayoutTests/fast/block/float/simple-line-layout-float-shrink-line-expected.html (0 => 225497)

--- trunk/LayoutTests/fast/block/float/simple-line-layout-float-shrink-line-expected.html	(rev 0)
+++ trunk/LayoutTests/fast/block/float/simple-line-layout-float-shrink-line-expected.html	2017-12-04 22:52:26 UTC (rev 225497)
@@ -0,0 +1,27 @@
+
+
+
+
+.floating {
+width: 40px;
+height: 10px;
+border: 1px solid blue;
+}
+
+.container { 
+width: 150px;
+}
+
+
+if (window.internals)
+internals.settings.setSimpleLineLayoutEnabled(false);
+
+
+
+
+  
+  
+  Pass if "this" wraps to the second line.
+
+
+


Added: trunk/LayoutTests/fast/block/float/simple-line-layout-float-shrink-line.html (0 => 225497)

--- trunk/LayoutTests/fast/block/float/simple-line-layout-float-shrink-line.html	(rev 0)
+++ trunk/LayoutTests/fast/block/float/simple-line-layout-float-shrink-line.html	2017-12-04 22:52:26 UTC (rev 225497)
@@ -0,0 +1,23 @@
+
+
+
+
+.floating {
+width: 40px;
+height: 10px;
+border: 1px solid blue;
+}
+
+.container { 
+width: 150px;
+}
+
+
+
+
+  
+  
+  Pass if "this" wraps to the second line.
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (225496 => 225497)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 22:51:13 UTC (rev 225496)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 22:52:26 UTC (rev 225497)
@@ -1,3 +1,18 @@
+2017-12-04  Zalan Bujtas  
+
+REGRESSION (r211531): Text flow changes and overlaps other text after double-click selecting paragraph
+https://bugs.webkit.org/show_bug.cgi?id=180377
+
+
+Reviewed by Antti Koivisto.
+
+Take floats into account when computing the available width for a certain vertical position.
+
+Test: fast/block/float/simple-line-layout-float-shrink-line.html
+
+* rendering/SimpleLineLayout.cpp:
+(WebCore::SimpleLineLayout::updateLineConstrains):
+
 2017-12-04  Antoine Quint  
 
  and scale() transforms yield shrunk small or clipped controls


Modified: trunk/Source/WebCore/rendering/SimpleLineLayout.cpp (225496 => 225497)

--- trunk/Source/WebCore/rendering/SimpleLineLayout.cpp	2017-12-04 22:51:13 UTC (rev 225496)
+++ trunk/Source/WebCore/rendering/SimpleLineLayout.cpp	2017-12-04 22:52:26 UTC (rev 225497)
@@ -601,8 +601,9 @@
 {
 bool shouldApplyTextIndent = !flow.isAnonymous() || flow.parent()->firstChild() == &flow;
 LayoutUnit height = flow.logicalHeight();
-line.setLogicalLeftOffset(flow.logicalLeftOffsetForLine(height, DoNotIndentText) + (shouldApplyTextIndent && isFirstLine ? flow.textIndentOffset() : LayoutUnit(0)));
-float logicalRightOffset = flow.logicalRightOffsetForLine(height, DoNotIndentText);
+LayoutUnit logicalHeight = flow.minLineHeightForReplacedRenderer(false, 0);
+line.setLogicalLeftOffset(flow.logicalLeftOffsetForLine(height, DoNotIndentText, logicalHeight) + (shouldApplyTextIndent && isFirstLine ? flow.textIndentOffset() : LayoutUnit(0)));
+float logicalRightOffset = flow.logicalRightOffsetForLine(height, DoNotIndentText, logicalHeight);
 line.setAvailableWidth(std::max(0, logicalRightOffset - line.logicalLeftOffset()

[webkit-changes] [225496] trunk/Tools

2017-12-04 Thread commit-queue
Title: [225496] trunk/Tools








Revision 225496
Author commit-qu...@webkit.org
Date 2017-12-04 14:51:13 -0800 (Mon, 04 Dec 2017)


Log Message
Exclude some more leak callstacks
https://bugs.webkit.org/show_bug.cgi?id=180379

Patch by Joseph Pecoraro  on 2017-12-04
Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/port/leakdetector.py:
(LeakDetector._types_to_exclude_from_leaks):
(LeakDetector._callstacks_to_exclude_from_leaks):
(LeakDetector._leaks_args):
(LeakDetector._types_to_exlude_from_leaks): Deleted.
* Scripts/webkitpy/port/leakdetector_unittest.py:
(LeakDetectorTest.test_leaks_args):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/port/leakdetector.py
trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (225495 => 225496)

--- trunk/Tools/ChangeLog	2017-12-04 22:49:25 UTC (rev 225495)
+++ trunk/Tools/ChangeLog	2017-12-04 22:51:13 UTC (rev 225496)
@@ -1,3 +1,18 @@
+2017-12-04  Joseph Pecoraro  
+
+Exclude some more leak callstacks
+https://bugs.webkit.org/show_bug.cgi?id=180379
+
+Reviewed by Alexey Proskuryakov.
+
+* Scripts/webkitpy/port/leakdetector.py:
+(LeakDetector._types_to_exclude_from_leaks):
+(LeakDetector._callstacks_to_exclude_from_leaks):
+(LeakDetector._leaks_args):
+(LeakDetector._types_to_exlude_from_leaks): Deleted.
+* Scripts/webkitpy/port/leakdetector_unittest.py:
+(LeakDetectorTest.test_leaks_args):
+
 2017-12-03  Yusuke Suzuki  
 
 WTF shouldn't have both Thread and ThreadIdentifier


Modified: trunk/Tools/Scripts/webkitpy/port/leakdetector.py (225495 => 225496)

--- trunk/Tools/Scripts/webkitpy/port/leakdetector.py	2017-12-04 22:49:25 UTC (rev 225495)
+++ trunk/Tools/Scripts/webkitpy/port/leakdetector.py	2017-12-04 22:51:13 UTC (rev 225496)
@@ -48,7 +48,7 @@
 # This allows us ignore known leaks and only be alerted when new leaks occur. Some leaks are in the old
 # versions of the system frameworks that are being used by the leaks bots. Even though a leak has been
 # fixed, it will be listed here until the bot has been updated with the newer frameworks.
-def _types_to_exlude_from_leaks(self):
+def _types_to_exclude_from_leaks(self):
 # Currently we don't have any type excludes from OS leaks, but we will likely again in the future.
 return []
 
@@ -55,6 +55,9 @@
 def _callstacks_to_exclude_from_leaks(self):
 callstacks = [
 'WTF::BitVector::OutOfLineBits::create', # https://bugs.webkit.org/show_bug.cgi?id=121662
+'WebCore::createPrivateStorageSession', # 
+'CIDeviceManagerStartMonitoring', # 
+'NSSpellChecker init', # 
 ]
 return callstacks
 
@@ -62,7 +65,7 @@
 leaks_args = []
 for callstack in self._callstacks_to_exclude_from_leaks():
 leaks_args += ['--exclude-callstack=%s' % callstack]
-for excluded_type in self._types_to_exlude_from_leaks():
+for excluded_type in self._types_to_exclude_from_leaks():
 leaks_args += ['--exclude-type=%s' % excluded_type]
 leaks_args.append(pid)
 return leaks_args


Modified: trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py (225495 => 225496)

--- trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py	2017-12-04 22:49:25 UTC (rev 225495)
+++ trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py	2017-12-04 22:51:13 UTC (rev 225496)
@@ -49,7 +49,7 @@
 def test_leaks_args(self):
 detector = self._make_detector()
 detector._callstacks_to_exclude_from_leaks = lambda: ['foo bar', 'BAZ']
-detector._types_to_exlude_from_leaks = lambda: ['abcdefg', 'hi jklmno']
+detector._types_to_exclude_from_leaks = lambda: ['abcdefg', 'hi jklmno']
 expected_args = ['--exclude-callstack=foo bar', '--exclude-callstack=BAZ', '--exclude-type=abcdefg', '--exclude-type=hi jklmno', 1234]
 self.assertEqual(detector._leaks_args(1234), expected_args)
 






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


[webkit-changes] [225495] trunk

2017-12-04 Thread commit-queue
Title: [225495] trunk








Revision 225495
Author commit-qu...@webkit.org
Date 2017-12-04 14:49:25 -0800 (Mon, 04 Dec 2017)


Log Message
 and scale() transforms yield shrunk small or clipped controls
https://bugs.webkit.org/show_bug.cgi?id=180358


Patch by Antoine Quint  on 2017-12-04
Reviewed by Dean Jackson.

Source/WebCore:

To compute the bounds of the media controls, we would call getBoundingClientRect()
on the root-most element in the shadow root, which is styled to have width and height
set to 100%, which allows to match the metrics of the host media element, without
the borders.

However, if the host media element has CSS transforms applied, these would be factored
into calls to getBoundingClientRect() and the controls would be too large and clipped,
in case the scale was more than 1, or shrunk, in case the scale was less than 1.

To obtain correct metrics, we computed the complete transformation matrix applied to
the host media element, and apply its inverted matrix to each corner point of the
bounds returned for the root-most container element in the shadow root.

Then we compute the width and height of this transformed rectangle and set those to
be our media controls' metrics.

Test: media/modern-media-controls/css/transformed-media.html

* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype._updateControlsSize):
(MediaController.prototype._controlsWidth): Deleted.

LayoutTests:

Write a new test that ensures that we reflect the width and height, not accounting
for borders, of the host media element when sizing media controls.

* media/modern-media-controls/css/transformed-media-expected.txt: Added.
* media/modern-media-controls/css/transformed-media.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js


Added Paths

trunk/LayoutTests/media/modern-media-controls/css/transformed-media-expected.txt
trunk/LayoutTests/media/modern-media-controls/css/transformed-media.html




Diff

Modified: trunk/LayoutTests/ChangeLog (225494 => 225495)

--- trunk/LayoutTests/ChangeLog	2017-12-04 22:47:04 UTC (rev 225494)
+++ trunk/LayoutTests/ChangeLog	2017-12-04 22:49:25 UTC (rev 225495)
@@ -1,5 +1,19 @@
 2017-12-04  Antoine Quint  
 
+ and scale() transforms yield shrunk small or clipped controls
+https://bugs.webkit.org/show_bug.cgi?id=180358
+
+
+Reviewed by Dean Jackson.
+
+Write a new test that ensures that we reflect the width and height, not accounting
+for borders, of the host media element when sizing media controls.
+
+* media/modern-media-controls/css/transformed-media-expected.txt: Added.
+* media/modern-media-controls/css/transformed-media.html: Added.
+
+2017-12-04  Antoine Quint  
+
 Cursor is not visible after exiting full screen video
 https://bugs.webkit.org/show_bug.cgi?id=180247
 


Added: trunk/LayoutTests/media/modern-media-controls/css/transformed-media-expected.txt (0 => 225495)

--- trunk/LayoutTests/media/modern-media-controls/css/transformed-media-expected.txt	(rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/css/transformed-media-expected.txt	2017-12-04 22:49:25 UTC (rev 225495)
@@ -0,0 +1,6 @@
+PASS mediaControls.style.width is "560px"
+PASS mediaControls.style.height is "260px"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/media/modern-media-controls/css/transformed-media.html (0 => 225495)

--- trunk/LayoutTests/media/modern-media-controls/css/transformed-media.html	(rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/css/transformed-media.html	2017-12-04 22:49:25 UTC (rev 225495)
@@ -0,0 +1,39 @@
+
+
+
+
+* {
+transform-origin: top left;
+}
+
+div {
+transform: scale(0.75);
+}
+
+video {
+width: 600px;
+height: 300px;
+border: 20px solid blue;
+box-sizing: border-box;
+background-color: red;
+transform: scale(0.5);
+}
+
+
+
+
+
+
+
+
+
+const media = document.querySelector("video");
+const shadowRoot = window.internals.shadowRoot(media);
+const mediaControls = shadowRoot.querySelector(".media-controls");
+shouldBeEqualToString("mediaControls.style.width", "560px"); // width - (2 * border)
+shouldBeEqualToString("mediaControls.style.height", "260px"); // height - (2 * border)
+
+
+

[webkit-changes] [225494] trunk

2017-12-04 Thread commit-queue
Title: [225494] trunk








Revision 225494
Author commit-qu...@webkit.org
Date 2017-12-04 14:47:04 -0800 (Mon, 04 Dec 2017)


Log Message
Cursor is not visible after exiting full screen video
https://bugs.webkit.org/show_bug.cgi?id=180247


Patch by Antoine Quint  on 2017-12-04
Reviewed by Dean Jackson.

Source/WebCore:

There is a dedicated NSCursor method to temporarily hide the mouse cursor while the mouse is idle,
so we use this platform functionality, already exposed through the page chrome, instead which
implements the expected behavior. Now, the mouse cursor is hidden while the mouse is stationary
when a  is fullscreen, as before, but as soon as the user exits fullscreen, the mouse cursor
reappears.

No test provided as I don't believe this platform behavior can be tested, there is no API to query
whether the cursor is visible.

* page/EventHandler.cpp:
(WebCore::EventHandler::cancelAutoHideCursorTimer):
(WebCore::EventHandler::autoHideCursorTimerFired):

LayoutTests:

Remove the existing test which would query a cursor state that is no longer relevant.

* fullscreen/video-cursor-auto-hide-expected.txt: Removed.
* fullscreen/video-cursor-auto-hide.html: Removed.
* platform/gtk/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/EventHandler.cpp


Removed Paths

trunk/LayoutTests/fullscreen/video-cursor-auto-hide-expected.txt
trunk/LayoutTests/fullscreen/video-cursor-auto-hide.html




Diff

Modified: trunk/LayoutTests/ChangeLog (225493 => 225494)

--- trunk/LayoutTests/ChangeLog	2017-12-04 22:06:50 UTC (rev 225493)
+++ trunk/LayoutTests/ChangeLog	2017-12-04 22:47:04 UTC (rev 225494)
@@ -1,3 +1,17 @@
+2017-12-04  Antoine Quint  
+
+Cursor is not visible after exiting full screen video
+https://bugs.webkit.org/show_bug.cgi?id=180247
+
+
+Reviewed by Dean Jackson.
+
+Remove the existing test which would query a cursor state that is no longer relevant.
+
+* fullscreen/video-cursor-auto-hide-expected.txt: Removed.
+* fullscreen/video-cursor-auto-hide.html: Removed.
+* platform/gtk/TestExpectations:
+
 2017-12-04  Michael Catanzaro  
 
 [GTK] Unreviewed layout test gardening


Deleted: trunk/LayoutTests/fullscreen/video-cursor-auto-hide-expected.txt (225493 => 225494)

--- trunk/LayoutTests/fullscreen/video-cursor-auto-hide-expected.txt	2017-12-04 22:06:50 UTC (rev 225493)
+++ trunk/LayoutTests/fullscreen/video-cursor-auto-hide-expected.txt	2017-12-04 22:47:04 UTC (rev 225494)
@@ -1,8 +0,0 @@
-This tests that the cursor hides after hovering over a video element in full screen mode.
-
-
-EVENT(webkitfullscreenchange)
-EXPECTED (window.internals.getCurrentCursorInfo() == 'type=Pointer hotSpot=0,0') OK
-EXPECTED (window.internals.getCurrentCursorInfo() == 'type=None hotSpot=0,0') OK
-END OF TEST
-


Deleted: trunk/LayoutTests/fullscreen/video-cursor-auto-hide.html (225493 => 225494)

--- trunk/LayoutTests/fullscreen/video-cursor-auto-hide.html	2017-12-04 22:06:50 UTC (rev 225493)
+++ trunk/LayoutTests/fullscreen/video-cursor-auto-hide.html	2017-12-04 22:47:04 UTC (rev 225494)
@@ -1,31 +0,0 @@
-
-This tests that the cursor hides after hovering over a video element in full screen mode.
-
-
-
-
-var wrapper = document.getElementById('wrapper');
-
-function checkForHiddenMouse()
-{
-testExpected('window.internals.getCurrentCursorInfo()', 'type=None hotSpot=0,0');
-endTest();
-}
-
-function fullscreenChanged(event)
-{
-if (window.internals) {
-internals.settings.setTimeWithoutMouseMovementBeforeHidingControls(0);
-wrapperBox = internals.boundingBox(wrapper);
-eventSender.mouseMoveTo(wrapperBox.left + wrapperBox.width / 2, wrapperBox.top + wrapperBox.height / 2);
-testExpected('window.internals.getCurrentCursorInfo()', 'type=Pointer hotSpot=0,0');
-setTimeout(checkForHiddenMouse, 0);
-}
-else
-logResult(false, "window.internals == undefined");
-}
-waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
-runWithKeyDown(function(){wrapper.webkitRequestFullScreen()});
-
-


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (225493 => 225494)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-12-04 22:06:50 UTC (rev 225493)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-12-04 22:47:04 UTC (rev 225494)
@@ -903,9 +903,6 @@
 # Requires ENABLE(MEDIA_CAPTURE)
 webkit.org/b/85958 fast/forms/file/file-input-capture.html [ Failure ]
 
-# CURSOR_VISIBILITY is not enabled in gtk
-webkit.org/b/107601 fullscreen/video-cursor-auto-hide.html [ Failure ]
-
 webkit.org/b/146718 accessibility/aria-hidden-false-works-in-subtrees.html [ Failure ]
 
 webkit.org/

[webkit-changes] [225493] trunk/JSTests

2017-12-04 Thread jfbastien
Title: [225493] trunk/JSTests








Revision 225493
Author jfbast...@apple.com
Date 2017-12-04 14:06:50 -0800 (Mon, 04 Dec 2017)


Log Message
Proxy all functions, except the $ objects
https://bugs.webkit.org/show_bug.cgi?id=180375

Reviewed by Saam Barati.

It looks like this test may have broken some executions because I
call some internal objects. Explicitly ignore objects whose name
starts with "$" because it's a bad idea anyways.

* stress/proxy-all-the-parameters.js:
(generateObjects):
(get throw):

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/stress/proxy-all-the-parameters.js




Diff

Modified: trunk/JSTests/ChangeLog (225492 => 225493)

--- trunk/JSTests/ChangeLog	2017-12-04 22:00:24 UTC (rev 225492)
+++ trunk/JSTests/ChangeLog	2017-12-04 22:06:50 UTC (rev 225493)
@@ -1,3 +1,18 @@
+2017-12-04  JF Bastien  
+
+Proxy all functions, except the $ objects
+https://bugs.webkit.org/show_bug.cgi?id=180375
+
+Reviewed by Saam Barati.
+
+It looks like this test may have broken some executions because I
+call some internal objects. Explicitly ignore objects whose name
+starts with "$" because it's a bad idea anyways.
+
+* stress/proxy-all-the-parameters.js:
+(generateObjects):
+(get throw):
+
 2017-12-04  Saam Barati  
 
 We need to leave room on the top of the stack for the FTL TailCall slow path so it doesn't overwrite things we want to retrieve when doing a stack walk when throwing an exception


Modified: trunk/JSTests/stress/proxy-all-the-parameters.js (225492 => 225493)

--- trunk/JSTests/stress/proxy-all-the-parameters.js	2017-12-04 22:00:24 UTC (rev 225492)
+++ trunk/JSTests/stress/proxy-all-the-parameters.js	2017-12-04 22:06:50 UTC (rev 225493)
@@ -1,7 +1,5 @@
 const verbose = false;
 
-const ignore = ['quit', 'readline', 'waitForReport', 'flashHeapAccess', 'leaving', 'getReport'];
-
 function isPropertyOfType(obj, name, type) {
 let desc;
 desc = Object.getOwnPropertyDescriptor(obj, name)
@@ -22,6 +20,8 @@
 return;
 let obj_names = getProperties(root, 'object');
 for (let obj_name of obj_names) {
+if (obj_name.startsWith('$'))
+continue; // Ignore internal objects.
 let obj = root[obj_name];
 yield obj;
 yield* generateObjects(obj, level + 1);
@@ -44,8 +44,6 @@
 
 for (let o of getObjects()) {
 for (let f of getFunctions(o)) {
-if (ignore.includes(f))
-continue;
 const arityPlusOne = o[f].length + 1;
 if (verbose)
 print(`Calling ${o}['${f}'](${Array(arityPlusOne).fill("thrower")})`);






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


[webkit-changes] [225492] trunk

2017-12-04 Thread sbarati
Title: [225492] trunk








Revision 225492
Author sbar...@apple.com
Date 2017-12-04 14:00:24 -0800 (Mon, 04 Dec 2017)


Log Message
We need to leave room on the top of the stack for the FTL TailCall slow path so it doesn't overwrite things we want to retrieve when doing a stack walk when throwing an exception
https://bugs.webkit.org/show_bug.cgi?id=180366


Reviewed by Michael Saboff.

JSTests:

* stress/ftl-tail-call-throw-exception-from-slow-path-recover-stack-values.js: Added.
(theParent):
(test1.base.getParentStaticValue):
(test1.base):
(test1.__v_24888.prototype.set prop):
(test1.__v_24888):
(test2.base.getParentStaticValue):
(test2.base):
(test2.__v_24888.prototype.set prop):
(test2.__v_24888):
(test2):

Source/_javascript_Core:

On the TailCall slow path, the CallFrameShuffler will build the frame with
respect to SP instead of FP. However, this may overwrite slots on the stack
that are needed if the slow path C call does a stack walk. The slow path
C call does a stack walk when it throws an exception. This patch fixes
this bug by ensuring that the top of the stack in the FTL always has enough
space to allow CallFrameShuffler to build a frame without overwriting any
items on the stack that are needed when doing a stack walk.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):

Modified Paths

trunk/JSTests/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp


Added Paths

trunk/JSTests/stress/ftl-tail-call-throw-exception-from-slow-path-recover-stack-values.js




Diff

Modified: trunk/JSTests/ChangeLog (225491 => 225492)

--- trunk/JSTests/ChangeLog	2017-12-04 21:56:25 UTC (rev 225491)
+++ trunk/JSTests/ChangeLog	2017-12-04 22:00:24 UTC (rev 225492)
@@ -1,3 +1,23 @@
+2017-12-04  Saam Barati  
+
+We need to leave room on the top of the stack for the FTL TailCall slow path so it doesn't overwrite things we want to retrieve when doing a stack walk when throwing an exception
+https://bugs.webkit.org/show_bug.cgi?id=180366
+
+
+Reviewed by Michael Saboff.
+
+* stress/ftl-tail-call-throw-exception-from-slow-path-recover-stack-values.js: Added.
+(theParent):
+(test1.base.getParentStaticValue):
+(test1.base):
+(test1.__v_24888.prototype.set prop):
+(test1.__v_24888):
+(test2.base.getParentStaticValue):
+(test2.base):
+(test2.__v_24888.prototype.set prop):
+(test2.__v_24888):
+(test2):
+
 2017-12-01  JF Bastien  
 
 Try proxying all function arguments


Added: trunk/JSTests/stress/ftl-tail-call-throw-exception-from-slow-path-recover-stack-values.js (0 => 225492)

--- trunk/JSTests/stress/ftl-tail-call-throw-exception-from-slow-path-recover-stack-values.js	(rev 0)
+++ trunk/JSTests/stress/ftl-tail-call-throw-exception-from-slow-path-recover-stack-values.js	2017-12-04 22:00:24 UTC (rev 225492)
@@ -0,0 +1,31 @@
+var theParent = function () { };
+
+function test1() {
+var base = class C extends theParent {
+static getParentStaticValue() {
+let arrow = (a,b,c) => super.getStaticValue(a,b,c);
+return arrow(1,1,1);
+}
+};
+
+for (let i = 0; i < 1; i++) {
+try { base.getParentStaticValue()  } catch (e) {}
+try { base.getParentStaticValue()  } catch (e) {}
+}
+}
+test1();
+
+function test2() {
+var base = class C extends theParent {
+static getParentStaticValue() {
+let arrow = () => super.getStaticValue();
+return arrow();
+}
+};
+
+for (let i = 0; i < 1; i++) {
+try { base.getParentStaticValue()  } catch (e) {}
+try { base.getParentStaticValue()  } catch (e) {}
+}
+}
+test2();


Modified: trunk/Source/_javascript_Core/ChangeLog (225491 => 225492)

--- trunk/Source/_javascript_Core/ChangeLog	2017-12-04 21:56:25 UTC (rev 225491)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-12-04 22:00:24 UTC (rev 225492)
@@ -1,3 +1,22 @@
+2017-12-04  Saam Barati  
+
+We need to leave room on the top of the stack for the FTL TailCall slow path so it doesn't overwrite things we want to retrieve when doing a stack walk when throwing an exception
+https://bugs.webkit.org/show_bug.cgi?id=180366
+
+
+Reviewed by Michael Saboff.
+
+On the TailCall slow path, the CallFrameShuffler will build the frame with
+respect to SP instead of FP. However, this may overwrite slots on the stack
+that are needed if the slow path C call does a stack walk. The slow path
+C call does a stack walk when it throws an exception. This patch fixes
+this bug by ensuring that the top of the stack in the FTL always has enough
+space to allow CallFrameShuffler to build a frame without overwriting any
+items on the stack that are needed when doing a stack walk.
+
+* ftl/FTLLowerDFGToB3.cpp:
+   

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

2017-12-04 Thread cdumez
Title: [225491] trunk/Source/WebCore








Revision 225491
Author cdu...@apple.com
Date 2017-12-04 13:56:25 -0800 (Mon, 04 Dec 2017)


Log Message
ServiceWorkerGlobalScope::skipWaiting(Ref&&) is unsafe
https://bugs.webkit.org/show_bug.cgi?id=180372

Reviewed by Youenn Fablet.

Ref the WorkerThread and capture it in the lambda. Keep the pending promises in
a HashMap on the ServiceWorkerGlobalScope so that they stay on the worker thread.

* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::skipWaiting):
* workers/service/ServiceWorkerGlobalScope.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp
trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225490 => 225491)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 21:50:31 UTC (rev 225490)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 21:56:25 UTC (rev 225491)
@@ -1,3 +1,17 @@
+2017-12-04  Chris Dumez  
+
+ServiceWorkerGlobalScope::skipWaiting(Ref&&) is unsafe
+https://bugs.webkit.org/show_bug.cgi?id=180372
+
+Reviewed by Youenn Fablet.
+
+Ref the WorkerThread and capture it in the lambda. Keep the pending promises in
+a HashMap on the ServiceWorkerGlobalScope so that they stay on the worker thread.
+
+* workers/service/ServiceWorkerGlobalScope.cpp:
+(WebCore::ServiceWorkerGlobalScope::skipWaiting):
+* workers/service/ServiceWorkerGlobalScope.h:
+
 2017-12-04  Brady Eidson  
 
 Get a directory path to SWServers for storing ServiceWorker registrations.


Modified: trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp (225490 => 225491)

--- trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp	2017-12-04 21:50:31 UTC (rev 225490)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp	2017-12-04 21:56:25 UTC (rev 225491)
@@ -50,11 +50,16 @@
 
 void ServiceWorkerGlobalScope::skipWaiting(Ref&& promise)
 {
-callOnMainThread([this, protectedThis = makeRef(*this), threadIdentifier = thread().identifier(), promise = WTFMove(promise)]() mutable {
+uint64_t requestIdentifier = ++m_lastRequestIdentifier;
+m_pendingSkipWaitingPromises.add(requestIdentifier, WTFMove(promise));
+
+callOnMainThread([workerThread = makeRef(thread()), requestIdentifier]() mutable {
 if (auto* connection = SWContextManager::singleton().connection()) {
-connection->skipWaiting(threadIdentifier, [this, protectedThis = WTFMove(protectedThis), promise = WTFMove(promise)]() mutable {
-thread().runLoop().postTask([promise = WTFMove(promise), protectedThis = WTFMove(protectedThis)](auto&) {
-promise->resolve();
+connection->skipWaiting(workerThread->identifier(), [workerThread = WTFMove(workerThread), requestIdentifier] {
+workerThread->runLoop().postTask([requestIdentifier](auto& context) {
+auto& scope = downcast(context);
+if (auto promise = scope.m_pendingSkipWaitingPromises.take(requestIdentifier))
+promise->resolve();
 });
 });
 }


Modified: trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.h (225490 => 225491)

--- trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.h	2017-12-04 21:50:31 UTC (rev 225490)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.h	2017-12-04 21:56:25 UTC (rev 225491)
@@ -77,6 +77,9 @@
 Ref m_clients;
 HashMap m_clientMap;
 Vector> m_extendedEvents;
+
+uint64_t m_lastRequestIdentifier { 0 };
+HashMap> m_pendingSkipWaitingPromises;
 };
 
 } // namespace WebCore






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


[webkit-changes] [225490] trunk/Source

2017-12-04 Thread beidson
Title: [225490] trunk/Source








Revision 225490
Author beid...@apple.com
Date 2017-12-04 13:50:31 -0800 (Mon, 04 Dec 2017)


Log Message
Get a directory path to SWServers for storing ServiceWorker registrations.
https://bugs.webkit.org/show_bug.cgi?id=180362

Reviewed by Chris Dumez.

Source/WebCore:

No new tests (No observable behavior change yet).

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::SWServer):
* workers/service/server/SWServer.h:

Source/WebKit:

This gets all of the plumbing in place for specifying a ServiceWorker registration storage path
in a particular WebsiteDataStore.

* Shared/Storage/StorageProcessCreationParameters.cpp:
(WebKit::StorageProcessCreationParameters::encode const):
(WebKit::StorageProcessCreationParameters::decode):
* Shared/Storage/StorageProcessCreationParameters.h:

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::initializeWebsiteDataStore):
(WebKit::StorageProcess::swServerForSession):
* StorageProcess/StorageProcess.h:

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
* UIProcess/API/APIProcessPoolConfiguration.h:

* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
* UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
* UIProcess/WebProcessPool.h:

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
(WebKit::WebsiteDataStore::storageProcessParameters):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const):

* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):

* UIProcess/wpe/WebProcessPoolWPE.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/workers/service/server/SWServer.cpp
trunk/Source/WebCore/workers/service/server/SWServer.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/Storage/StorageProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/Storage/StorageProcessCreationParameters.h
trunk/Source/WebKit/StorageProcess/StorageProcess.cpp
trunk/Source/WebKit/StorageProcess/StorageProcess.h
trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.h
trunk/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
trunk/Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
trunk/Source/WebKit/UIProcess/WebProcessPool.h
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
trunk/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp
trunk/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (225489 => 225490)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 21:43:36 UTC (rev 225489)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 21:50:31 UTC (rev 225490)
@@ -1,3 +1,16 @@
+2017-12-04  Brady Eidson  
+
+Get a directory path to SWServers for storing ServiceWorker registrations.
+https://bugs.webkit.org/show_bug.cgi?id=180362
+
+Reviewed by Chris Dumez.
+
+No new tests (No observable behavior change yet).
+
+* workers/service/server/SWServer.cpp:
+(WebCore::SWServer::SWServer):
+* workers/service/server/SWServer.h:
+
 2017-12-04  Devin Rousso  
 
 Web Inspector: provide method for recording CanvasRenderingContext2D from _javascript_


Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (225489 => 225490)

--- trunk/Source/WebCore/workers/service/server/SWServer.cpp	2017-12-04 21:43:36 UTC (rev 225489)
+++ trunk/Source/WebCore/workers/service/server/SWServer.cpp	2017-12-04 21:50:31 UTC (rev 225490)
@@ -204,9 +204,10 @@
 m_server.syncTerminateWorker(*worker);
 }
 
-SWServer::SWServer(UniqueRef&& originStore)
+SWServer::SWServer(UniqueRef&& originStore, const String& registrationDatabaseDirectory)
 : m_originStore(WTFMove(originStore))
 {
+UNUSED_PARAM(registrationDatabaseDirectory);
 allServers().add(this);
 m_taskThread = Thread::create(ASCI

[webkit-changes] [225489] trunk/LayoutTests

2017-12-04 Thread mcatanzaro
Title: [225489] trunk/LayoutTests








Revision 225489
Author mcatanz...@igalia.com
Date 2017-12-04 13:43:36 -0800 (Mon, 04 Dec 2017)


Log Message
[GTK] Unreviewed layout test gardening

* platform/gtk/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (225488 => 225489)

--- trunk/LayoutTests/ChangeLog	2017-12-04 21:40:55 UTC (rev 225488)
+++ trunk/LayoutTests/ChangeLog	2017-12-04 21:43:36 UTC (rev 225489)
@@ -1,3 +1,9 @@
+2017-12-04  Michael Catanzaro  
+
+[GTK] Unreviewed layout test gardening
+
+* platform/gtk/TestExpectations:
+
 2017-12-04  Devin Rousso  
 
 Web Inspector: provide method for recording CanvasRenderingContext2D from _javascript_


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (225488 => 225489)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-12-04 21:40:55 UTC (rev 225488)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-12-04 21:43:36 UTC (rev 225489)
@@ -847,7 +847,6 @@
 webkit.org/b/141698 editing/pasteboard/5761530-1.html [ Failure ]
 webkit.org/b/141699 fast/attachment/attachment-disabled-rendering.html [ Failure ]
 webkit.org/b/141699 fast/attachment/attachment-rendering.html [ Failure ]
-webkit.org/b/141699 fast/attachment/attachment-without-appearance.html [ Failure ]
 
 webkit.org/b/141831 svg/animations/animate-text-nested-transforms.html [ Failure ]
 webkit.org/b/98653  svg/text/lengthAdjust-text-metrics.html [ Failure ]
@@ -1176,10 +1175,10 @@
 webkit.org/b/175419 imported/w3c/web-platform-tests/streams/readable-byte-streams/detached-buffers.serviceworker.https.html [ Failure ]
 
 # Loading MP4 as an image is not supported by GTK
-fast/images/animated-image-mp4.html [ Skip ]
+webkit.org/b/180370 fast/images/animated-image-mp4.html [ Skip ]
+webkit.org/b/180370 http/tests/images/image-supports-video.html [ Skip ]
 
-webkit.org/b/177632 fast/text/flag-codepoint.html [ ImageOnlyFailure ]
-
+# GTK ought to support the new modern pasteboard API
 webkit.org/b/177633 editing/pasteboard/data-transfer-get-data-on-paste-rich-text.html [ Failure ]
 webkit.org/b/177633 editing/pasteboard/data-transfer-get-data-on-paste-plain-text.html [ Failure ]
 webkit.org/b/177633 editing/pasteboard/data-transfer-get-data-on-paste-custom.html [ Failure ]
@@ -1187,26 +1186,28 @@
 webkit.org/b/177633 http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html [ Skip ]
 webkit.org/b/177633 http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-in-same-origin.html [ Skip ]
 
-webkit.org/b/179052 compositing/contents-format/subpixel-antialiased-nested-layer.html [ Failure ]
-
-webkit.org/b/179989 http/tests/misc/prefetch-purpose.html [ Timeout ]
-webkit.org/b/179989 http/tests/misc/link-rel-prefetch-and-subresource.html [ Timeout ]
-webkit.org/b/179989 fast/dom/HTMLLinkElement/subresource.html [ Timeout ]
-webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch-onload.html [ Timeout ]
-webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch-onerror.html [ Timeout ]
-webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch.html [ Timeout ]
-webkit.org/b/179989 fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html [ Timeout ]
-webkit.org/b/179989 fast/dom/HTMLLinkElement/link-and-subresource-test.html [ Timeout ]
+# We should consider enabling ENABLE_LINK_PREFETCH and ENABLE_CSS3_TEXT
+webkit.org/b/179989 http/tests/misc/prefetch-purpose.html [ Skip ]
+webkit.org/b/179989 http/tests/misc/link-rel-prefetch-and-subresource.html [ Skip ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/subresource.html [ Skip ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch-onload.html [ Skip ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch-onerror.html [ Skip ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch.html [ Skip ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html [ Skip ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/link-and-subresource-test.html [ Skip ]
 webkit.org/b/179989 fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html [ Failure ]
 webkit.org/b/179989 fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html [ Failure ]
 webkit.org/b/179989 fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html [ Failure ]
 webkit.org/b/179989 fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html [ Failure ]
 
-webkit.org/b/180148 accessibility/alternative-presentation-button-input-type.html [ Failure ]
-webkit.org/b/180148 accessibility/alternative-presentation-button.html [ Failure ]
+# These tests rely on an iOS feature.
+webkit.org/b/180148 accessibility/alternative-presentation-button-input-type.html [ Skip ]
+webkit.org/b/180148 accessibility/alternative-presentation-button.html [ Skip ]
 
 #//

[webkit-changes] [225487] trunk/Source/WebInspectorUI

2017-12-04 Thread mattbaker
Title: [225487] trunk/Source/WebInspectorUI








Revision 225487
Author mattba...@apple.com
Date 2017-12-04 12:40:27 -0800 (Mon, 04 Dec 2017)


Log Message
Web Inspector: Canvas Tab initial user interface needs some polish
https://bugs.webkit.org/show_bug.cgi?id=179330


Reviewed by Joseph Pecoraro.

Update the Canvas overview placeholder text and prevent appearance of
the vertical scrollbar when no canvases exist. This patch also includes
a bunch of cleanup of code that creates content placeholder text throughout
the UI, and makes sure all text is styled consistently.

* Localizations/en.lproj/localizedStrings.js:
Updated Canvas overview message text.

* UserInterface/Base/Main.js:
Make the "message text view" a container with child message element, instead
of a simple element with text content. This makes it simpler to customize
the message (by adding buttons, more text, etc).

* UserInterface/Views/CanvasDetailsSidebarPanel.css:
(.sidebar > .panel.details.canvas .details-section.canvas-extensions .content > ul):
(.sidebar > .panel.details.canvas > .content > .empty-content-placeholder): Deleted.
(.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message): Deleted.
* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WI.CanvasDetailsSidebarPanel.prototype.initialLayout):

* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView):
Customize the content placeholder to include a description beneath
the "No Canvas Contexts" message.

* UserInterface/Views/CollectionContentView.css:
(.content-view.collection):
Change overflow-y to auto, to prevent scrollbar from appearing when
"Show scroll bars" system preference is enabled on macOS.

* UserInterface/Views/CollectionContentView.js:
Add support for custom content placeholders.
(WI.CollectionContentView):
(WI.CollectionContentView.prototype._showContentPlaceholder):
(WI.CollectionContentView.prototype._hideContentPlaceholder):

* UserInterface/Views/ContentView.css:
(.content-view > .message-text-view):
(.content-view > .message-text-view > .message):

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger > .content):
(.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)): Deleted.

* UserInterface/Views/DetailsSection.css:
(.details-section > .content > .group > .row > .message-text-view):

* UserInterface/Views/Main.css:
(.message-text-view):
(.message-text-view > .message):
(.message-text-view.error):

* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .overflow-shadow):
(.sidebar > .panel.navigation > .content .empty-content-placeholder): Deleted.
(.sidebar > .panel.navigation > .content > .empty-content-placeholder): Deleted.
(.sidebar > .panel.navigation > .content .empty-content-placeholder > .message): Deleted.

* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
(WI.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded):

* UserInterface/Views/NetworkTableContentView.css:
(.content-view.network .message-text-view):
(.content-view.network .message-text-view > .message):
Workaround to prevent "No Filter Results" message from being styled like
"full width" messages displayed in ContentViews (large, bold font).
This is needed because the placeholder message element is a immediate child
of the network content view, rather than the network table.

(.content-view.network .empty-content-placeholder): Deleted.
(body[dir=ltr] .content-view.network .empty-content-placeholder): Deleted.
(body[dir=rtl] .content-view.network .empty-content-placeholder): Deleted.
(.content-view.network .empty-content-placeholder > .message): Deleted.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._showEmptyFilterResultsMessage):

* UserInterface/Views/RecordingNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.recording > .content):
(.sidebar > .panel.navigation.recording > :matches(.content, .empty-content-placeholder)): Deleted.

* UserInterface/Views/ResourceSidebarPanel.css:
(.sidebar > .panel.navigation.resource > .content):
(.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)): Deleted.

* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content > .rules > .message-text-view):
(.sidebar > .panel.details.css-style > .content > .rules:not(.filter-non-matching) > .message-text-view):
(.sidebar > .panel.details.css-style > .content > .rules:not(.filter-non-matching) > .no-filter-results): Deleted.
(.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results): Deleted.
(.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results > .no-filter-results-message): Deleted.

* UserInterface/Views/RulesStyleDetailsPanel.js:
(WI.R

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

2017-12-04 Thread commit-queue
Title: [225486] trunk/Source/WebCore








Revision 225486
Author commit-qu...@webkit.org
Date 2017-12-04 12:35:05 -0800 (Mon, 04 Dec 2017)


Log Message
Call "Terminate Service Worker" on all workers when all their clients are gone
https://bugs.webkit.org/show_bug.cgi?id=179552

Patch by Youenn Fablet  on 2017-12-04
Reviewed by Chris Dumez.

Tested manually.

When SWServer detects that there is no longer any client for a given client origin,
it iterates through the running workers to terminate them if they have the given client origin.
A timer of 60 seconds is used in case a user closes a tab or a window, and reopens one with the same origin shortly after.

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::findClientByIdentifier):
(WebCore::SWServer::matchAll):
(WebCore::SWServer::registerServiceWorkerClient):
(WebCore::SWServer::unregisterServiceWorkerClient):
* workers/service/server/SWServer.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/workers/service/server/SWServer.cpp
trunk/Source/WebCore/workers/service/server/SWServer.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225485 => 225486)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 20:31:35 UTC (rev 225485)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 20:35:05 UTC (rev 225486)
@@ -1,3 +1,23 @@
+2017-12-04  Youenn Fablet  
+
+Call "Terminate Service Worker" on all workers when all their clients are gone
+https://bugs.webkit.org/show_bug.cgi?id=179552
+
+Reviewed by Chris Dumez.
+
+Tested manually.
+
+When SWServer detects that there is no longer any client for a given client origin,
+it iterates through the running workers to terminate them if they have the given client origin.
+A timer of 60 seconds is used in case a user closes a tab or a window, and reopens one with the same origin shortly after.
+
+* workers/service/server/SWServer.cpp:
+(WebCore::SWServer::findClientByIdentifier):
+(WebCore::SWServer::matchAll):
+(WebCore::SWServer::registerServiceWorkerClient):
+(WebCore::SWServer::unregisterServiceWorkerClient):
+* workers/service/server/SWServer.h:
+
 2017-12-04  Antti Koivisto  
 
 Enable selector filtering for ::before and ::after pseudo element resolution


Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (225485 => 225486)

--- trunk/Source/WebCore/workers/service/server/SWServer.cpp	2017-12-04 20:31:35 UTC (rev 225485)
+++ trunk/Source/WebCore/workers/service/server/SWServer.cpp	2017-12-04 20:35:05 UTC (rev 225486)
@@ -52,6 +52,8 @@
 return generateObjectIdentifier();
 }
 
+static Seconds terminationDelay { 60_s };
+
 SWServer::Connection::Connection(SWServer& server)
 : m_server(server)
 , m_identifier(generateObjectIdentifier())
@@ -322,7 +324,7 @@
 if (iterator == m_clients.end())
 return std::nullopt;
 
-auto& clients = iterator->value;
+auto& clients = iterator->value.clients;
 auto position = clients.findMatching([&] (const auto& client) {
 return clientIdentifier == client.identifier;
 });
@@ -336,7 +338,7 @@
 // FIXME: Support reserved client filtering.
 // FIXME: Support WindowClient additional properties.
 
-auto clients = m_clients.get(worker.origin());
+auto clients = m_clients.find(worker.origin())->value.clients;
 
 if (!options.includeUncontrolled) {
 clients.removeAllMatching([&] (const auto& client) {
@@ -615,9 +617,13 @@
 
 void SWServer::registerServiceWorkerClient(ClientOrigin&& clientOrigin, ServiceWorkerClientIdentifier identifier, ServiceWorkerClientData&& data)
 {
-m_clients.ensure(WTFMove(clientOrigin), [] {
-return Vector { };
-}).iterator->value.append(ServiceWorkerClientInformation { identifier, WTFMove(data) });
+auto& clientsData = m_clients.ensure(WTFMove(clientOrigin), [] {
+return Clients { };
+}).iterator->value;
+
+clientsData.clients.append(ServiceWorkerClientInformation { identifier, WTFMove(data) });
+if (clientsData.terminateServiceWorkersTimer)
+clientsData.terminateServiceWorkersTimer = nullptr;
 }
 
 void SWServer::unregisterServiceWorkerClient(const ClientOrigin& clientOrigin, ServiceWorkerClientIdentifier identifier)
@@ -625,14 +631,23 @@
 auto iterator = m_clients.find(clientOrigin);
 ASSERT(iterator != m_clients.end());
 
-auto& clients = iterator->value;
+auto& clients = iterator->value.clients;
 clients.removeFirstMatching([&] (const auto& item) {
 return identifier == item.identifier;
 });
-if (clients.isEmpty()) {
-// FIXME: We might want to terminate any clientOrigin related service worker.
-m_clients.remove(iterator);
-}
+
+if (!clients.isEmpty() || m_runningOrTerminatingWorkers.isEmpty())
+return;
+
+ASSERT(!iterator->value.terminateServiceWorkersTimer);
+iterator->value.terminateServiceWorkersTimer = std::make_unique(

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

2017-12-04 Thread antti
Title: [225485] trunk/Source/WebCore








Revision 225485
Author an...@apple.com
Date 2017-12-04 12:31:35 -0800 (Mon, 04 Dec 2017)


Log Message
Enable selector filtering for ::before and ::after pseudo element resolution
https://bugs.webkit.org/show_bug.cgi?id=180364

Reviewed by Ryosuke Niwa.

Since these pseudo elements are now resolved by TreeResolver we can use selector filter for them.

This is 10%+ progression in StyleBench pseudo element subtest.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::pseudoStyleForElement):
* css/StyleResolver.h:
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolvePseudoStyle):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/StyleResolver.cpp
trunk/Source/WebCore/css/StyleResolver.h
trunk/Source/WebCore/style/StyleTreeResolver.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (225484 => 225485)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 19:37:00 UTC (rev 225484)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 20:31:35 UTC (rev 225485)
@@ -1,3 +1,20 @@
+2017-12-04  Antti Koivisto  
+
+Enable selector filtering for ::before and ::after pseudo element resolution
+https://bugs.webkit.org/show_bug.cgi?id=180364
+
+Reviewed by Ryosuke Niwa.
+
+Since these pseudo elements are now resolved by TreeResolver we can use selector filter for them.
+
+This is 10%+ progression in StyleBench pseudo element subtest.
+
+* css/StyleResolver.cpp:
+(WebCore::StyleResolver::pseudoStyleForElement):
+* css/StyleResolver.h:
+* style/StyleTreeResolver.cpp:
+(WebCore::Style::TreeResolver::resolvePseudoStyle):
+
 2017-12-04  Youenn Fablet  
 
 Add support https://w3c.github.io/ServiceWorker/#on-client-unload-algorithm


Modified: trunk/Source/WebCore/css/StyleResolver.cpp (225484 => 225485)

--- trunk/Source/WebCore/css/StyleResolver.cpp	2017-12-04 19:37:00 UTC (rev 225484)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2017-12-04 20:31:35 UTC (rev 225485)
@@ -552,9 +552,9 @@
 }
 }
 
-std::unique_ptr StyleResolver::pseudoStyleForElement(const Element& element, const PseudoStyleRequest& pseudoStyleRequest, const RenderStyle& parentStyle)
+std::unique_ptr StyleResolver::pseudoStyleForElement(const Element& element, const PseudoStyleRequest& pseudoStyleRequest, const RenderStyle& parentStyle, const SelectorFilter* selectorFilter)
 {
-m_state = State(element, &parentStyle);
+m_state = State(element, &parentStyle, m_overrideDocumentElementStyle, selectorFilter);
 
 State& state = m_state;
 


Modified: trunk/Source/WebCore/css/StyleResolver.h (225484 => 225485)

--- trunk/Source/WebCore/css/StyleResolver.h	2017-12-04 19:37:00 UTC (rev 225484)
+++ trunk/Source/WebCore/css/StyleResolver.h	2017-12-04 20:31:35 UTC (rev 225485)
@@ -133,7 +133,7 @@
 
 void keyframeStylesForAnimation(const Element&, const RenderStyle*, KeyframeList&);
 
-std::unique_ptr pseudoStyleForElement(const Element&, const PseudoStyleRequest&, const RenderStyle& parentStyle);
+std::unique_ptr pseudoStyleForElement(const Element&, const PseudoStyleRequest&, const RenderStyle& parentStyle, const SelectorFilter* = nullptr);
 
 std::unique_ptr styleForPage(int pageIndex);
 std::unique_ptr defaultStyleForElement();


Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (225484 => 225485)

--- trunk/Source/WebCore/style/StyleTreeResolver.cpp	2017-12-04 19:37:00 UTC (rev 225484)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp	2017-12-04 20:31:35 UTC (rev 225485)
@@ -233,7 +233,7 @@
 if (!elementUpdate.style->hasPseudoStyle(pseudoId))
 return { };
 
-auto pseudoStyle = scope().styleResolver.pseudoStyleForElement(element, { pseudoId }, *elementUpdate.style);
+auto pseudoStyle = scope().styleResolver.pseudoStyleForElement(element, { pseudoId }, *elementUpdate.style, &scope().selectorFilter);
 if (!pseudoStyle)
 return { };
 






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


[webkit-changes] [225484] trunk/Source/WebCore/PAL

2017-12-04 Thread zandobersek
Title: [225484] trunk/Source/WebCore/PAL








Revision 225484
Author zandober...@gmail.com
Date 2017-12-04 11:37:00 -0800 (Mon, 04 Dec 2017)


Log Message
Unreviewed WPE build fix.

* pal/PlatformWPE.cmake: Use GLIB_INCLUDE_DIRS for building the PAL library.

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/PlatformWPE.cmake




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (225483 => 225484)

--- trunk/Source/WebCore/PAL/ChangeLog	2017-12-04 18:55:07 UTC (rev 225483)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-12-04 19:37:00 UTC (rev 225484)
@@ -1,3 +1,9 @@
+2017-12-04  Zan Dobersek  
+
+Unreviewed WPE build fix.
+
+* pal/PlatformWPE.cmake: Use GLIB_INCLUDE_DIRS for building the PAL library.
+
 2017-12-04  Michael Catanzaro  
 
 [WPE][GTK] Implement PAL::SleepDisabler


Modified: trunk/Source/WebCore/PAL/pal/PlatformWPE.cmake (225483 => 225484)

--- trunk/Source/WebCore/PAL/pal/PlatformWPE.cmake	2017-12-04 18:55:07 UTC (rev 225483)
+++ trunk/Source/WebCore/PAL/pal/PlatformWPE.cmake	2017-12-04 19:37:00 UTC (rev 225484)
@@ -16,3 +16,7 @@
 crypto/tasn1/Utilities.cpp
 )
 endif ()
+
+list(APPEND PAL_SYSTEM_INCLUDE_DIRECTORIES
+${GLIB_INCLUDE_DIRS}
+)






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


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

2017-12-04 Thread commit-queue
Title: [225483] trunk/Source/WebCore








Revision 225483
Author commit-qu...@webkit.org
Date 2017-12-04 10:55:07 -0800 (Mon, 04 Dec 2017)


Log Message
Add support https://w3c.github.io/ServiceWorker/#on-client-unload-algorithm
https://bugs.webkit.org/show_bug.cgi?id=180359

Patch by Youenn Fablet  on 2017-12-04
Reviewed by Chris Dumez.

This algorithm is needed for implementation of claim.
As per specification, it is run for every client unload, hence why this is put in removeClientUsingRegistration.

* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::removeClientUsingRegistration):
(WebCore::SWServerRegistration::handleClientUnload):
* workers/service/server/SWServerRegistration.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp
trunk/Source/WebCore/workers/service/server/SWServerRegistration.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225482 => 225483)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 18:37:00 UTC (rev 225482)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 18:55:07 UTC (rev 225483)
@@ -1,3 +1,18 @@
+2017-12-04  Youenn Fablet  
+
+Add support https://w3c.github.io/ServiceWorker/#on-client-unload-algorithm
+https://bugs.webkit.org/show_bug.cgi?id=180359
+
+Reviewed by Chris Dumez.
+
+This algorithm is needed for implementation of claim.
+As per specification, it is run for every client unload, hence why this is put in removeClientUsingRegistration.
+
+* workers/service/server/SWServerRegistration.cpp:
+(WebCore::SWServerRegistration::removeClientUsingRegistration):
+(WebCore::SWServerRegistration::handleClientUnload):
+* workers/service/server/SWServerRegistration.h:
+
 2017-12-04  Antti Koivisto  
 
 Remove duplicates from selector filter hashes


Modified: trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp (225482 => 225483)

--- trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp	2017-12-04 18:37:00 UTC (rev 225482)
+++ trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp	2017-12-04 18:55:07 UTC (rev 225483)
@@ -161,6 +161,8 @@
 
 if (iterator->value.isEmpty())
 m_clientsUsingRegistration.remove(iterator);
+
+handleClientUnload();
 }
 
 // https://w3c.github.io/ServiceWorker/#notify-controller-change
@@ -281,6 +283,16 @@
 updateWorkerState(*activeWorker(), ServiceWorkerState::Activated);
 }
 
+// https://w3c.github.io/ServiceWorker/#on-client-unload-algorithm
+void SWServerRegistration::handleClientUnload()
+{
+if (hasClientsUsingRegistration())
+return;
+if (isUninstalling() && tryClear())
+return;
+tryActivate();
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(SERVICE_WORKER)


Modified: trunk/Source/WebCore/workers/service/server/SWServerRegistration.h (225482 => 225483)

--- trunk/Source/WebCore/workers/service/server/SWServerRegistration.h	2017-12-04 18:37:00 UTC (rev 225482)
+++ trunk/Source/WebCore/workers/service/server/SWServerRegistration.h	2017-12-04 18:55:07 UTC (rev 225483)
@@ -90,6 +90,7 @@
 void forEachConnection(const WTF::Function&);
 
 void activate();
+void handleClientUnload();
 
 ServiceWorkerRegistrationIdentifier m_identifier;
 ServiceWorkerRegistrationKey m_registrationKey;






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


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

2017-12-04 Thread antti
Title: [225482] trunk/Source/WebCore








Revision 225482
Author an...@apple.com
Date 2017-12-04 10:37:00 -0800 (Mon, 04 Dec 2017)


Log Message
Remove duplicates from selector filter hashes
https://bugs.webkit.org/show_bug.cgi?id=180354

Reviewed by Simon Fraser.

We have only four slots for hashes in RuleSet and adding more regresses performance. To use the limited slots
better we should eliminate duplicates.

This patch also switches to using std::array instead of a C array for the hashes.

The patch reduces the number of selectors passing through the selector filter in StyleBench by ~0.4%.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/RuleSet.cpp:
(WebCore::RuleData::RuleData):
* css/RuleSet.h:
(WebCore::RuleData::descendantSelectorIdentifierHashes const):
* css/SelectorFilter.cpp:
(WebCore::collectDescendantSelectorIdentifierHashes):
(WebCore::SelectorFilter::collectIdentifierHashes):
* css/SelectorFilter.h:
(WebCore::SelectorFilter::fastRejectSelector const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/ElementRuleCollector.cpp
trunk/Source/WebCore/css/RuleSet.cpp
trunk/Source/WebCore/css/RuleSet.h
trunk/Source/WebCore/css/SelectorFilter.cpp
trunk/Source/WebCore/css/SelectorFilter.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225481 => 225482)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 18:13:45 UTC (rev 225481)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 18:37:00 UTC (rev 225482)
@@ -1,3 +1,29 @@
+2017-12-04  Antti Koivisto  
+
+Remove duplicates from selector filter hashes
+https://bugs.webkit.org/show_bug.cgi?id=180354
+
+Reviewed by Simon Fraser.
+
+We have only four slots for hashes in RuleSet and adding more regresses performance. To use the limited slots
+better we should eliminate duplicates.
+
+This patch also switches to using std::array instead of a C array for the hashes.
+
+The patch reduces the number of selectors passing through the selector filter in StyleBench by ~0.4%.
+
+* css/ElementRuleCollector.cpp:
+(WebCore::ElementRuleCollector::collectMatchingRulesForList):
+* css/RuleSet.cpp:
+(WebCore::RuleData::RuleData):
+* css/RuleSet.h:
+(WebCore::RuleData::descendantSelectorIdentifierHashes const):
+* css/SelectorFilter.cpp:
+(WebCore::collectDescendantSelectorIdentifierHashes):
+(WebCore::SelectorFilter::collectIdentifierHashes):
+* css/SelectorFilter.h:
+(WebCore::SelectorFilter::fastRejectSelector const):
+
 2017-12-04  Youenn Fablet  
 
 WorkerCacheStorageConnection should handle the case of terminated workers


Modified: trunk/Source/WebCore/css/ElementRuleCollector.cpp (225481 => 225482)

--- trunk/Source/WebCore/css/ElementRuleCollector.cpp	2017-12-04 18:13:45 UTC (rev 225481)
+++ trunk/Source/WebCore/css/ElementRuleCollector.cpp	2017-12-04 18:37:00 UTC (rev 225482)
@@ -464,7 +464,7 @@
 if (!ruleData.canMatchPseudoElement() && m_pseudoStyleRequest.pseudoId != NOPSEUDO)
 continue;
 
-if (m_selectorFilter && m_selectorFilter->fastRejectSelector(ruleData.descendantSelectorIdentifierHashes()))
+if (m_selectorFilter && m_selectorFilter->fastRejectSelector(ruleData.descendantSelectorIdentifierHashes()))
 continue;
 
 StyleRule* rule = ruleData.rule();


Modified: trunk/Source/WebCore/css/RuleSet.cpp (225481 => 225482)

--- trunk/Source/WebCore/css/RuleSet.cpp	2017-12-04 18:13:45 UTC (rev 225481)
+++ trunk/Source/WebCore/css/RuleSet.cpp	2017-12-04 18:37:00 UTC (rev 225482)
@@ -164,7 +164,7 @@
 {
 ASSERT(m_position == position);
 ASSERT(m_selectorIndex == selectorIndex);
-SelectorFilter::collectIdentifierHashes(selector(), m_descendantSelectorIdentifierHashes, maximumIdentifierCount);
+SelectorFilter::collectIdentifierHashes(*selector(), m_descendantSelectorIdentifierHashes);
 }
 
 RuleSet::RuleSet() = default;


Modified: trunk/Source/WebCore/css/RuleSet.h (225481 => 225482)

--- trunk/Source/WebCore/css/RuleSet.h	2017-12-04 18:13:45 UTC (rev 225481)
+++ trunk/Source/WebCore/css/RuleSet.h	2017-12-04 18:37:00 UTC (rev 225482)
@@ -23,6 +23,7 @@
 
 #include "RuleFeature.h"
 #include "SelectorCompiler.h"
+#include "SelectorFilter.h"
 #include "StyleRule.h"
 #include 
 #include 
@@ -76,9 +77,7 @@
 unsigned linkMatchType() const { return m_linkMatchType; }
 bool hasDocumentSecurityOrigin() const { return m_hasDocumentSecurityOrigin; }
 PropertyWhitelistType propertyWhitelistType() const { return static_cast(m_propertyWhitelistType); }
-// Try to balance between memory usage (there can be lots of RuleData objects) and good filtering performance.
-static const unsigned maximumIdentifierCount = 4;
-const unsigned* descendantSelectorIdentifierHashes() const { return m_descendantSelectorIdentifierHashes; }
+const SelectorFilter::Hashes& descendantSele

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

2017-12-04 Thread cdumez
Title: [225481] trunk/Source/WebCore








Revision 225481
Author cdu...@apple.com
Date 2017-12-04 10:13:45 -0800 (Mon, 04 Dec 2017)


Log Message
WorkerCacheStorageConnection should handle the case of terminated workers
https://bugs.webkit.org/show_bug.cgi?id=180304

Patch by Youenn Fablet  on 2017-12-04
Reviewed by Chris Dumez.

No web page observable change of behavior.

Reworked WorkerCacheStorageConnection hopping.
Instead of refing/unrefing itself, it refs the worker thread and the main thread connection.
This worker thread is then used on the way back from the main thread.

* Modules/cache/WorkerCacheStorageConnection.cpp:
(WebCore::WorkerCacheStorageConnection::create):
(WebCore::WorkerCacheStorageConnection::WorkerCacheStorageConnection):
(WebCore::WorkerCacheStorageConnection::doOpen):
(WebCore::WorkerCacheStorageConnection::doRemove):
(WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
(WebCore::WorkerCacheStorageConnection::reference):
(WebCore::WorkerCacheStorageConnection::dereference):
(WebCore::WorkerCacheStorageConnection::doRetrieveRecords):
(WebCore::WorkerCacheStorageConnection::doBatchDeleteOperation):
(WebCore::WorkerCacheStorageConnection::doBatchPutOperation):
* Modules/cache/WorkerCacheStorageConnection.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::cacheStorageConnection):
* workers/WorkerGlobalScope.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp
trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.h
trunk/Source/WebCore/workers/WorkerGlobalScope.cpp
trunk/Source/WebCore/workers/WorkerGlobalScope.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225480 => 225481)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 16:45:51 UTC (rev 225480)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 18:13:45 UTC (rev 225481)
@@ -1,3 +1,32 @@
+2017-12-04  Youenn Fablet  
+
+WorkerCacheStorageConnection should handle the case of terminated workers
+https://bugs.webkit.org/show_bug.cgi?id=180304
+
+Reviewed by Chris Dumez.
+
+No web page observable change of behavior.
+
+Reworked WorkerCacheStorageConnection hopping.
+Instead of refing/unrefing itself, it refs the worker thread and the main thread connection.
+This worker thread is then used on the way back from the main thread.
+
+* Modules/cache/WorkerCacheStorageConnection.cpp:
+(WebCore::WorkerCacheStorageConnection::create):
+(WebCore::WorkerCacheStorageConnection::WorkerCacheStorageConnection):
+(WebCore::WorkerCacheStorageConnection::doOpen):
+(WebCore::WorkerCacheStorageConnection::doRemove):
+(WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
+(WebCore::WorkerCacheStorageConnection::reference):
+(WebCore::WorkerCacheStorageConnection::dereference):
+(WebCore::WorkerCacheStorageConnection::doRetrieveRecords):
+(WebCore::WorkerCacheStorageConnection::doBatchDeleteOperation):
+(WebCore::WorkerCacheStorageConnection::doBatchPutOperation):
+* Modules/cache/WorkerCacheStorageConnection.h:
+* workers/WorkerGlobalScope.cpp:
+(WebCore::WorkerGlobalScope::cacheStorageConnection):
+* workers/WorkerGlobalScope.h:
+
 2017-12-04  Frederic Wang  
 
 Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes


Modified: trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp (225480 => 225481)

--- trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp	2017-12-04 16:45:51 UTC (rev 225480)
+++ trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp	2017-12-04 18:13:45 UTC (rev 225481)
@@ -91,17 +91,15 @@
 Ref WorkerCacheStorageConnection::create(WorkerGlobalScope& scope)
 {
 auto connection = adoptRef(*new WorkerCacheStorageConnection(scope));
-callOnMainThread([protectedConnection = connection.copyRef()]() mutable {
-ASSERT(isMainThread());
-protectedConnection->m_mainThreadConnection = protectedConnection->m_proxy.createCacheStorageConnection();
+callOnMainThreadAndWait([workerThread = makeRef(scope.thread()), connection = connection.ptr()]() mutable {
+connection->m_mainThreadConnection = workerThread->workerLoaderProxy().createCacheStorageConnection();
 });
+ASSERT(connection->m_mainThreadConnection);
 return connection;
 }
 
 WorkerCacheStorageConnection::WorkerCacheStorageConnection(WorkerGlobalScope& scope)
 : m_scope(scope)
-, m_proxy(m_scope.thread().workerLoaderProxy())
-, m_taskMode(WorkerRunLoop::defaultMode().isolatedCopy())
 {
 }
 
@@ -113,15 +111,11 @@
 
 void WorkerCacheStorageConnection::doOpen(uint64_t requestIdentifier, const String& origin, const String& cacheName)
 {
-callOnMainThread([this, protectedThis = makeRef(*this), requestIdentifier, origin = origin.isolatedCopy(), cacheName = cacheName.isolatedCopy()]() mutabl

[webkit-changes] [225480] trunk/Source

2017-12-04 Thread fred . wang
Title: [225480] trunk/Source








Revision 225480
Author fred.w...@free.fr
Date 2017-12-04 08:45:51 -0800 (Mon, 04 Dec 2017)


Log Message
Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
https://bugs.webkit.org/show_bug.cgi?id=180353

Patch by Frederic Wang  on 2017-12-04
Reviewed by Antonio Gomes.

This function was introduced in bug 175135 to solve a rendering bug with fixed positioned
nodes in overflow nodes. For a frame node, the reference frame to use for fixed nodes is
actually the frame node itself or otherwise we will get the same rendering bug. This patch
makes enclosingFrameNode return the node itself when it is a frame node and renames it to
clarify this behavior. Currently, enclosingFrameNode is not used for frame nodes so the
behavior is unchanged.

Source/WebCore:

No new tests, behavior is unchanged.

* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::enclosingFrameNodeIncludingSelf): Start the search from a frame
scrolling node from the node itself. Renamed to make explicit that this function may include
the node itself.
* page/scrolling/ScrollingTreeNode.h: Renamed.

Source/WebKit:

* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll): Use auto* and
the new function name.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (225479 => 225480)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 16:45:51 UTC (rev 225480)
@@ -1,3 +1,25 @@
+2017-12-04  Frederic Wang  
+
+Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
+https://bugs.webkit.org/show_bug.cgi?id=180353
+
+Reviewed by Antonio Gomes.
+
+This function was introduced in bug 175135 to solve a rendering bug with fixed positioned
+nodes in overflow nodes. For a frame node, the reference frame to use for fixed nodes is
+actually the frame node itself or otherwise we will get the same rendering bug. This patch
+makes enclosingFrameNode return the node itself when it is a frame node and renames it to
+clarify this behavior. Currently, enclosingFrameNode is not used for frame nodes so the
+behavior is unchanged.
+
+No new tests, behavior is unchanged.
+
+* page/scrolling/ScrollingTreeNode.cpp:
+(WebCore::ScrollingTreeNode::enclosingFrameNodeIncludingSelf): Start the search from a frame
+scrolling node from the node itself. Renamed to make explicit that this function may include
+the node itself.
+* page/scrolling/ScrollingTreeNode.h: Renamed.
+
 2017-12-04  Michael Catanzaro  
 
 [WPE][GTK] Implement PAL::SleepDisabler


Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp (225479 => 225480)

--- trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp	2017-12-04 16:45:51 UTC (rev 225480)
@@ -77,9 +77,9 @@
 ts.dumpProperty("nodeID", scrollingNodeID());
 }
 
-ScrollingTreeFrameScrollingNode* ScrollingTreeNode::enclosingFrameNode() const
+ScrollingTreeFrameScrollingNode* ScrollingTreeNode::enclosingFrameNodeIncludingSelf()
 {
-auto* node = parent();
+auto* node = this;
 while (node && !node->isFrameScrollingNode())
 node = node->parent();
 


Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h (225479 => 225480)

--- trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h	2017-12-04 16:45:51 UTC (rev 225480)
@@ -66,7 +66,7 @@
 void appendChild(Ref&&);
 void removeChild(ScrollingTreeNode&);
 
-WEBCORE_EXPORT ScrollingTreeFrameScrollingNode* enclosingFrameNode() const;
+WEBCORE_EXPORT ScrollingTreeFrameScrollingNode* enclosingFrameNodeIncludingSelf();
 
 WEBCORE_EXPORT void dump(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const;
 


Modified: trunk/Source/WebKit/ChangeLog (225479 => 225480)

--- trunk/Source/WebKit/ChangeLog	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebKit/ChangeLog	2017-12-04 16:45:51 UTC (rev 225480)
@@ -1,3 +1,21 @@
+2017-12-04  Frederic Wang  
+
+Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
+https://bugs.webkit.org/show_bug.cgi?id=180353
+
+Reviewed by Antonio Gomes.
+
+This function was introduced in bug 175135 to solve a rendering bug with fixed positioned
+nodes in overflow nodes. For a frame node, the refer

[webkit-changes] [225479] trunk/LayoutTests

2017-12-04 Thread Ms2ger
Title: [225479] trunk/LayoutTests








Revision 225479
Author ms2...@igalia.com
Date 2017-12-04 08:41:49 -0800 (Mon, 04 Dec 2017)


Log Message
[GTK] Rebaseline imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
https://bugs.webkit.org/show_bug.cgi?id=180357

Unreviewed test gardening.

The difference with the platform-neutral expectation is whitespace-only.


* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/TestExpectations


Added Paths

trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (225478 => 225479)

--- trunk/LayoutTests/ChangeLog	2017-12-04 15:32:41 UTC (rev 225478)
+++ trunk/LayoutTests/ChangeLog	2017-12-04 16:41:49 UTC (rev 225479)
@@ -1,3 +1,15 @@
+2017-12-04  Ms2ger  
+
+[GTK] Rebaseline imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
+https://bugs.webkit.org/show_bug.cgi?id=180357
+
+Unreviewed test gardening.
+
+The difference with the platform-neutral expectation is whitespace-only.
+
+* platform/gtk/TestExpectations:
+* platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt: Added.
+
 2017-12-04  Jer Noble  
 
 Include 'video/*' in image request Accept header if browser supports video media in image contexts.


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (225478 => 225479)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-12-04 15:32:41 UTC (rev 225478)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-12-04 16:41:49 UTC (rev 225479)
@@ -2924,7 +2924,6 @@
 webkit.org/b/148936 imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html [ Failure ]
 webkit.org/b/148936 imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-autocomplete.html [ Failure ]
 webkit.org/b/148936 imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/telephone.html [ Failure ]
-webkit.org/b/148936 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html [ Failure ]
 
 webkit.org/b/149128 fast/text/control-characters [ ImageOnlyFailure ]
 


Added: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt (0 => 225479)

--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt	(rev 0)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt	2017-12-04 16:41:49 UTC (rev 225479)
@@ -0,0 +1,32 @@
+
+FAIL dialog element: showModal() assert_false: expected false got undefined
+FAIL showModal() on a  that already has an open attribute throws an InvalidStateError exception assert_throws: function "function () {
+  d2.showModal();
+  this.add_cleanup(function() { d2.close(); });
+}" threw object "TypeError: d2.showModal is not a function. (In 'd2.showModal()', 'd2.showModal' is undefined)" that is not a DOMException INVALID_STATE_ERR: property "code" is equal to undefined, expected 11
+FAIL showModal() on a  after initial showModal() and removing the open attribute d9.showModal is not a function. (In 'd9.showModal()', 'd9.showModal' is undefined)
+FAIL showModal() on a  not in a Document throws an InvalidStateError exception assert_throws: function "function () {
+  d.showModal();
+  this.add_cleanup(function() { d.close(); });
+}" threw object "TypeError: d.showModal is not a function. (In 'd.showModal()', 'd.showModal' is undefined)" that is not a DOMException INVALID_STATE_ERR: property "code" is equal to undefined, expected 11
+FAIL when opening multiple dialogs, only the newest one is non-inert assert_false: expected false got undefined
+FAIL opening dialog without focusable children assert_false: expected false got undefined
+FAIL opening dialog with multiple focusable children assert_false: expected false got undefined
+FAIL opening dialog with multiple focusable children, one having the autofocus attribute assert_false: expected false got undefined
+FAIL when opening multiple dialogs, the most recently opened is rendered on 

[webkit-changes] [225478] trunk/PerformanceTests

2017-12-04 Thread antti
Title: [225478] trunk/PerformanceTests








Revision 225478
Author an...@apple.com
Date 2017-12-04 07:32:41 -0800 (Mon, 04 Dec 2017)


Log Message
Fix StyleBench/InteractiveRunner.html
https://bugs.webkit.org/show_bug.cgi?id=180355

* StyleBench/InteractiveRunner.html:

Modified Paths

trunk/PerformanceTests/ChangeLog
trunk/PerformanceTests/StyleBench/InteractiveRunner.html




Diff

Modified: trunk/PerformanceTests/ChangeLog (225477 => 225478)

--- trunk/PerformanceTests/ChangeLog	2017-12-04 15:15:43 UTC (rev 225477)
+++ trunk/PerformanceTests/ChangeLog	2017-12-04 15:32:41 UTC (rev 225478)
@@ -1,3 +1,10 @@
+2017-12-04  Antti Koivisto  
+
+Fix StyleBench/InteractiveRunner.html
+https://bugs.webkit.org/show_bug.cgi?id=180355
+
+* StyleBench/InteractiveRunner.html:
+
 2017-12-01  Antti Koivisto  
 
 Add StyleBench


Modified: trunk/PerformanceTests/StyleBench/InteractiveRunner.html (225477 => 225478)

--- trunk/PerformanceTests/StyleBench/InteractiveRunner.html	2017-12-04 15:15:43 UTC (rev 225477)
+++ trunk/PerformanceTests/StyleBench/InteractiveRunner.html	2017-12-04 15:32:41 UTC (rev 225478)
@@ -3,8 +3,8 @@
 
 Speedometer 2.0 Interactive Runner
 
-
-
+
+
 

[webkit-changes] [225477] trunk/Source

2017-12-04 Thread mcatanzaro
Title: [225477] trunk/Source








Revision 225477
Author mcatanz...@igalia.com
Date 2017-12-04 07:15:43 -0800 (Mon, 04 Dec 2017)


Log Message
Source/WebCore:
[WPE][GTK] Implement PAL::SleepDisabler
https://bugs.webkit.org/show_bug.cgi?id=178485

Reviewed by Carlos Garcia Campos.

Add a comment to warn about some odd use of SleepDisabler in HTMLMediaElement.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::shouldDisableSleep const):

Source/WebCore/PAL:
[WPE][GTK] Implement PAL::SleepDisabler
https://bugs.webkit.org/show_bug.cgi?id=178485

Reviewed by Carlos Garcia Campos.

* pal/PlatformGTK.cmake:
* pal/PlatformWPE.cmake:
* pal/system/SleepDisabler.cpp:
* pal/system/glib/SleepDisablerGLib.cpp: Added.
(PAL::SleepDisabler::create):
(PAL::SleepDisablerGLib::SleepDisablerGLib):
(PAL::SleepDisablerGLib::~SleepDisablerGLib):
(PAL::SleepDisablerGLib::acquireInhibitor):
(PAL::SleepDisablerGLib::releaseInhibitor):
* pal/system/glib/SleepDisablerGLib.h: Added.

Source/WebKit:
[GTK] Implement PAL::SleepDisabler
https://bugs.webkit.org/show_bug.cgi?id=178485

Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDispose):
(webkitWebViewBaseEnterFullScreen):
(webkitWebViewBaseExitFullScreen):
(screenSaverInhibitedCallback): Deleted.
(webkitWebViewBaseSendInhibitMessageToScreenSaver): Deleted.
(screenSaverProxyCreatedCallback): Deleted.
(webkitWebViewBaseInhibitScreenSaver): Deleted.
(webkitWebViewBaseUninhibitScreenSaver): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/PlatformGTK.cmake
trunk/Source/WebCore/PAL/pal/PlatformWPE.cmake
trunk/Source/WebCore/PAL/pal/system/SleepDisabler.cpp
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp


Added Paths

trunk/Source/WebCore/PAL/pal/system/glib/
trunk/Source/WebCore/PAL/pal/system/glib/SleepDisablerGLib.cpp
trunk/Source/WebCore/PAL/pal/system/glib/SleepDisablerGLib.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225476 => 225477)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 11:34:41 UTC (rev 225476)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 15:15:43 UTC (rev 225477)
@@ -1,3 +1,15 @@
+2017-12-04  Michael Catanzaro  
+
+[WPE][GTK] Implement PAL::SleepDisabler
+https://bugs.webkit.org/show_bug.cgi?id=178485
+
+Reviewed by Carlos Garcia Campos.
+
+Add a comment to warn about some odd use of SleepDisabler in HTMLMediaElement.
+
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::shouldDisableSleep const):
+
 2017-12-04  Frederic Wang  
 
 Bug 161300 - Move RenderMathMLRoot:RootType and RenderMathMLScripts:ScriptsType to element classes


Modified: trunk/Source/WebCore/PAL/ChangeLog (225476 => 225477)

--- trunk/Source/WebCore/PAL/ChangeLog	2017-12-04 11:34:41 UTC (rev 225476)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-12-04 15:15:43 UTC (rev 225477)
@@ -1,3 +1,21 @@
+2017-12-04  Michael Catanzaro  
+
+[WPE][GTK] Implement PAL::SleepDisabler
+https://bugs.webkit.org/show_bug.cgi?id=178485
+
+Reviewed by Carlos Garcia Campos.
+
+* pal/PlatformGTK.cmake:
+* pal/PlatformWPE.cmake:
+* pal/system/SleepDisabler.cpp:
+* pal/system/glib/SleepDisablerGLib.cpp: Added.
+(PAL::SleepDisabler::create):
+(PAL::SleepDisablerGLib::SleepDisablerGLib):
+(PAL::SleepDisablerGLib::~SleepDisablerGLib):
+(PAL::SleepDisablerGLib::acquireInhibitor):
+(PAL::SleepDisablerGLib::releaseInhibitor):
+* pal/system/glib/SleepDisablerGLib.h: Added.
+
 2017-11-30  Stephan Szabo  
 
 Make LegacyCustomProtocolManager optional for network process


Modified: trunk/Source/WebCore/PAL/pal/PlatformGTK.cmake (225476 => 225477)

--- trunk/Source/WebCore/PAL/pal/PlatformGTK.cmake	2017-12-04 11:34:41 UTC (rev 225476)
+++ trunk/Source/WebCore/PAL/pal/PlatformGTK.cmake	2017-12-04 15:15:43 UTC (rev 225477)
@@ -3,6 +3,8 @@
 
 system/ClockGeneric.cpp
 
+system/glib/SleepDisablerGLib.cpp
+
 system/gtk/SoundGtk.cpp
 
 text/KillRing.cpp


Modified: trunk/Source/WebCore/PAL/pal/PlatformWPE.cmake (225476 => 225477)

--- trunk/Source/WebCore/PAL/pal/PlatformWPE.cmake	2017-12-04 11:34:41 UTC (rev 225476)
+++ trunk/Source/WebCore/PAL/pal/PlatformWPE.cmake	2017-12-04 15:15:43 UTC (rev 225477)
@@ -4,6 +4,8 @@
 system/ClockGeneric.cpp
 system/Sound.cpp
 
+system/glib/SleepDisablerGLib.cpp
+
 text/KillRing.cpp
 
 unix/LoggingUnix.cpp


Modified: trunk/Source/WebCore/PAL/pal/system/SleepDisabler.cpp (225476 => 225477)

--- trunk/Source/WebCore/PAL/pal/system/SleepDisabler.cpp	2017-12-04 11:34:41 UTC (rev 225476)
+++ trunk/Source/WebCore/PAL/pal/system/SleepDisabler.cpp	2017-12-04 15:15:43 UTC (rev 225477)
@@ -28,12 +28,12 @@
 
 namespace PAL {
 
-#if !PLATFORM(COCOA)
+#if !PLATFORM(COCOA) && !USE(GLIB)
 std::un

[webkit-changes] [225476] trunk/WebDriverTests

2017-12-04 Thread carlosgc
Title: [225476] trunk/WebDriverTests








Revision 225476
Author carlo...@webkit.org
Date 2017-12-04 03:34:41 -0800 (Mon, 04 Dec 2017)


Log Message
Unreviewed. Update W3C WebDriver imported tests.

* imported/w3c/importer.json:
* imported/w3c/tools/webdriver/webdriver/client.py:
* imported/w3c/tools/webdriver/webdriver/error.py:
* imported/w3c/webdriver/tests/element_retrieval/get_active_element.py:
* imported/w3c/webdriver/tests/interaction/element_clear.py:
* imported/w3c/webdriver/tests/sessions/status.py:
* imported/w3c/webdriver/tests/support/wait.py:

Modified Paths

trunk/WebDriverTests/ChangeLog
trunk/WebDriverTests/imported/w3c/importer.json
trunk/WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py
trunk/WebDriverTests/imported/w3c/tools/webdriver/webdriver/error.py
trunk/WebDriverTests/imported/w3c/webdriver/tests/element_retrieval/get_active_element.py
trunk/WebDriverTests/imported/w3c/webdriver/tests/interaction/element_clear.py
trunk/WebDriverTests/imported/w3c/webdriver/tests/sessions/status.py
trunk/WebDriverTests/imported/w3c/webdriver/tests/support/wait.py




Diff

Modified: trunk/WebDriverTests/ChangeLog (225475 => 225476)

--- trunk/WebDriverTests/ChangeLog	2017-12-04 11:30:10 UTC (rev 225475)
+++ trunk/WebDriverTests/ChangeLog	2017-12-04 11:34:41 UTC (rev 225476)
@@ -1,3 +1,15 @@
+2017-12-04  Carlos Garcia Campos  
+
+Unreviewed. Update W3C WebDriver imported tests.
+
+* imported/w3c/importer.json:
+* imported/w3c/tools/webdriver/webdriver/client.py:
+* imported/w3c/tools/webdriver/webdriver/error.py:
+* imported/w3c/webdriver/tests/element_retrieval/get_active_element.py:
+* imported/w3c/webdriver/tests/interaction/element_clear.py:
+* imported/w3c/webdriver/tests/sessions/status.py:
+* imported/w3c/webdriver/tests/support/wait.py:
+
 2017-12-01  Carlos Garcia Campos  
 
 WebDriver: auto-install pytest instead of importing it from wpt tools directory


Modified: trunk/WebDriverTests/imported/w3c/importer.json (225475 => 225476)

--- trunk/WebDriverTests/imported/w3c/importer.json	2017-12-04 11:30:10 UTC (rev 225475)
+++ trunk/WebDriverTests/imported/w3c/importer.json	2017-12-04 11:34:41 UTC (rev 225476)
@@ -1,6 +1,6 @@
 {
 "repository": "https://github.com/w3c/web-platform-tests.git",
-"revision": "2b50389ee72d89dd0be12bc6ca54a6e95c98d163",
+"revision": "267d6b27ffd416577702653c0987b30239daae3f",
 "paths_to_import": [
 "tools/webdriver",
 "tools/wptrunner",


Modified: trunk/WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py (225475 => 225476)

--- trunk/WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py	2017-12-04 11:30:10 UTC (rev 225475)
+++ trunk/WebDriverTests/imported/w3c/tools/webdriver/webdriver/client.py	2017-12-04 11:34:41 UTC (rev 225476)
@@ -42,7 +42,7 @@
 def _set(self, key, secs):
 body = {key: secs * 1000}
 timeouts = self.session.send_session_command("POST", "timeouts", body)
-return timeouts[key]
+return None
 
 @property
 def script(self):


Modified: trunk/WebDriverTests/imported/w3c/tools/webdriver/webdriver/error.py (225475 => 225476)

--- trunk/WebDriverTests/imported/w3c/tools/webdriver/webdriver/error.py	2017-12-04 11:30:10 UTC (rev 225475)
+++ trunk/WebDriverTests/imported/w3c/tools/webdriver/webdriver/error.py	2017-12-04 11:34:41 UTC (rev 225476)
@@ -8,6 +8,7 @@
 
 def __init__(self, message, stacktrace=None):
 super(WebDriverException, self)
+self.message = message
 self.stacktrace = stacktrace
 
 def __repr__(self):
@@ -14,11 +15,13 @@
 return "<%s http_status=%s>" % (self.__class__.__name__, self.http_status)
 
 def __str__(self):
-return ("%s (%s)\n"
-"\n"
+message = "%s (%s): %s\n" % (self.status_code, self.http_status, self.message)
+if self.stacktrace:
+message += ("\n"
 "Remote-end stacktrace:\n"
 "\n"
-"%s" % (self.status_code, self.http_status, self.stacktrace))
+"%s" % self.stacktrace)
+return message
 
 
 class ElementClickInterceptedException(WebDriverException):


Modified: trunk/WebDriverTests/imported/w3c/webdriver/tests/element_retrieval/get_active_element.py (225475 => 225476)

--- trunk/WebDriverTests/imported/w3c/webdriver/tests/element_retrieval/get_active_element.py	2017-12-04 11:30:10 UTC (rev 225475)
+++ trunk/WebDriverTests/imported/w3c/webdriver/tests/element_retrieval/get_active_element.py	2017-12-04 11:34:41 UTC (rev 225476)
@@ -69,7 +69,7 @@
 response = get_active_element(session)
 assert_is_active_element(session, response)
 assert_dialog_handled(session, "dismiss #2")
-assert read_global(session, "dismiss2") is None
+assert read_global(session, "dismiss2") is False
 
 create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
 


Modified: trunk/WebDriverTes

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

2017-12-04 Thread fred . wang
Title: [225475] trunk/Source/WebCore








Revision 225475
Author fred.w...@free.fr
Date 2017-12-04 03:30:10 -0800 (Mon, 04 Dec 2017)


Log Message
Bug 161300 - Move RenderMathMLRoot:RootType and RenderMathMLScripts:ScriptsType to element classes
https://bugs.webkit.org/show_bug.cgi?id=161300

Patch by Frederic Wang  on 2017-12-04
Reviewed by Darin Adler.

RenderMathMLRoot::m_kind and RenderMathMLScripts::m_scriptType are initialized in the
constructors of the renderer classes from the tag name of the corresponding elements.
This patch moves them into the corresponding element classes and makes them const members
parsed in the constructors. It also introduces a MathMLRootElement class deriving from
MathMLRowElement to store the new member. Finally, the types are redefined as enum classes.

No new tests, behavior unchanged and already covered by existing tests.

* Sources.txt: Add MathMLRootElement files.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* mathml/MathMLAllInOne.cpp: Ditto.
* mathml/MathMLRootElement.cpp:
(WebCore::element): Override this function to downcast to MathMLRootElement.
(WebCore::rootTypeOf): Helper function to parse the root type, moved from RenderMathMLRoot.
(WebCore::MathMLRootElement::MathMLRootElement): Initialize the root type.
(WebCore::MathMLRootElement::create):
(WebCore::MathMLRootElement::createElementRenderer): Moved from MathMLRowElement.
* mathml/MathMLRootElement.h: New class deriving from MathMLRowElement, with a RootType
member exposed to the renderer class.
* mathml/MathMLRowElement.cpp: Remove header for RenderMathMLRoot.h.
(WebCore::MathMLRowElement::createElementRenderer): Moved to MathMLRootElement.
* mathml/MathMLScriptsElement.cpp: Introduce a script type.
(WebCore::scriptTypeOf): Helper function to parse the script type, moved from
RenerMathMLScripts.
(WebCore::MathMLScriptsElement::MathMLScriptsElement): Initialize the script type.
* mathml/MathMLScriptsElement.h: Add new script type member.
(WebCore::MathMLScriptsElement::scriptType const): Expose the script type to the renderer
class.
* mathml/mathtags.in: Map  and  to MathMLRootElement.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::RenderMathMLRoot): Use MathMLRootElement and remove parsing of
the root type.
(WebCore::RenderMathMLRoot::rootType const): Helper function to access the root type from
the element class.
(WebCore::RenderMathMLRoot::isValid const): Use rootType() and add prefix for enum class
values.
(WebCore::RenderMathMLRoot::getBase const): Ditto.
(WebCore::RenderMathMLRoot::getIndex const): Ditto.
(WebCore::RenderMathMLRoot::horizontalParameters): Ditto.
(WebCore::RenderMathMLRoot::verticalParameters): Ditto.
(WebCore::RenderMathMLRoot::computePreferredLogicalWidths): Ditto.
(WebCore::RenderMathMLRoot::layoutBlock): Ditto.
(WebCore::RenderMathMLRoot::paint): Ditto.
* rendering/mathml/RenderMathMLRoot.h: Define root type as an enum class, replace
MathMLRowElement with MathMLRootElement, declare and use new rootType() function and remove
the m_kind member.
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::RenderMathMLScripts): Remove parsing of script type.
(WebCore::RenderMathMLScripts::scriptType const): Helper function to access the script type
from the element class.
(WebCore::RenderMathMLScripts::validateAndGetReferenceChildren): Use scriptType() and add
prefix for enum class values.
(WebCore::RenderMathMLScripts::computePreferredLogicalWidths): Ditto.
(WebCore::RenderMathMLScripts::verticalMetrics): Ditto.
(WebCore::RenderMathMLScripts::layoutBlock): Ditto.
* rendering/mathml/RenderMathMLScripts.h: Define root type as an enum class, declare the
scriptType() function and remove the m_scriptType member.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::isValid const): Use scriptType() and add prefix for enum
class values.
(WebCore::RenderMathMLUnderOver::under const): Ditto.
(WebCore::RenderMathMLUnderOver::over const): Ditto.
(WebCore::RenderMathMLUnderOver::computePreferredLogicalWidths): Ditto.
(WebCore::RenderMathMLUnderOver::hasAccent const): Ditto.
(WebCore::RenderMathMLUnderOver::layoutBlock): Ditto.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/mathml/MathMLAllInOne.cpp
trunk/Source/WebCore/mathml/MathMLRowElement.cpp
trunk/Source/WebCore/mathml/MathMLScriptsElement.cpp
trunk/Source/WebCore/mathml/MathMLScriptsElement.h
trunk/Source/WebCore/mathml/mathtags.in
trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h
trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp
trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp


Added Paths

trunk/Source/WebCore/mathml/MathMLRootElement.cpp
trunk/Source/WebCore/mathml/MathMLRootElement.h




Diff

Modified: trunk/Source

[webkit-changes] [225474] trunk/Source/WebDriver

2017-12-04 Thread carlosgc
Title: [225474] trunk/Source/WebDriver








Revision 225474
Author carlo...@webkit.org
Date 2017-12-04 03:29:29 -0800 (Mon, 04 Dec 2017)


Log Message
WebDriver: implement element property command
https://bugs.webkit.org/show_bug.cgi?id=180244

Reviewed by Brian Burg.

13.3 Get Element Property
https://w3c.github.io/webdriver/webdriver-spec.html#get-element-property

Fixes: imported/w3c/webdriver/tests/state/get_element_property.py::test_no_browsing_context
   imported/w3c/webdriver/tests/state/get_element_property.py::test_handle_prompt_dismiss
   imported/w3c/webdriver/tests/state/get_element_property.py::test_handle_prompt_accept
   imported/w3c/webdriver/tests/state/get_element_property.py::test_handle_prompt_missing_value
   imported/w3c/webdriver/tests/state/get_element_property.py::test_element_stale

* Session.cpp:
(WebDriver::Session::getElementAttribute):
(WebDriver::Session::getElementProperty):
* Session.h:
* WebDriverService.cpp:
(WebDriver::WebDriverService::getElementProperty):
* WebDriverService.h:

Modified Paths

trunk/Source/WebDriver/ChangeLog
trunk/Source/WebDriver/Session.cpp
trunk/Source/WebDriver/Session.h
trunk/Source/WebDriver/WebDriverService.cpp
trunk/Source/WebDriver/WebDriverService.h




Diff

Modified: trunk/Source/WebDriver/ChangeLog (225473 => 225474)

--- trunk/Source/WebDriver/ChangeLog	2017-12-04 08:52:21 UTC (rev 225473)
+++ trunk/Source/WebDriver/ChangeLog	2017-12-04 11:29:29 UTC (rev 225474)
@@ -1,3 +1,27 @@
+2017-12-04  Carlos Garcia Campos  
+
+WebDriver: implement element property command
+https://bugs.webkit.org/show_bug.cgi?id=180244
+
+Reviewed by Brian Burg.
+
+13.3 Get Element Property
+https://w3c.github.io/webdriver/webdriver-spec.html#get-element-property
+
+Fixes: imported/w3c/webdriver/tests/state/get_element_property.py::test_no_browsing_context
+   imported/w3c/webdriver/tests/state/get_element_property.py::test_handle_prompt_dismiss
+   imported/w3c/webdriver/tests/state/get_element_property.py::test_handle_prompt_accept
+   imported/w3c/webdriver/tests/state/get_element_property.py::test_handle_prompt_missing_value
+   imported/w3c/webdriver/tests/state/get_element_property.py::test_element_stale
+
+* Session.cpp:
+(WebDriver::Session::getElementAttribute):
+(WebDriver::Session::getElementProperty):
+* Session.h:
+* WebDriverService.cpp:
+(WebDriver::WebDriverService::getElementProperty):
+* WebDriverService.h:
+
 2017-12-02  Carlos Garcia Campos  
 
 WebDriver: handle user prompts shown while executing scripts


Modified: trunk/Source/WebDriver/Session.cpp (225473 => 225474)

--- trunk/Source/WebDriver/Session.cpp	2017-12-04 08:52:21 UTC (rev 225473)
+++ trunk/Source/WebDriver/Session.cpp	2017-12-04 11:29:29 UTC (rev 225474)
@@ -1289,6 +1289,47 @@
 });
 }
 
+void Session::getElementProperty(const String& elementID, const String& property, Function&& completionHandler)
+{
+if (!m_toplevelBrowsingContext) {
+completionHandler(CommandResult::fail(CommandResult::ErrorCode::NoSuchWindow));
+return;
+}
+
+handleUserPrompts([this, elementID, property, completionHandler = WTFMove(completionHandler)](CommandResult&& result) mutable {
+if (result.isError()) {
+completionHandler(WTFMove(result));
+return;
+}
+RefPtr arguments = JSON::Array::create();
+arguments->pushString(createElement(elementID)->toJSONString());
+
+RefPtr parameters = JSON::Object::create();
+parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value());
+if (m_currentBrowsingContext)
+parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value());
+parameters->setString(ASCIILiteral("function"), makeString("function(element) { return element.", property, "; }"));
+parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments));
+m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
+if (response.isError || !response.responseObject) {
+completionHandler(CommandResult::fail(WTFMove(response.responseObject)));
+return;
+}
+String valueString;
+if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) {
+completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError));
+return;
+}
+RefPtr resultValue;
+if (!JSON::Value::parseJSON(valueString, resultValue)) {
+completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError));
+  

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

2017-12-04 Thread carlosgc
Title: [225473] trunk/Source/WebCore








Revision 225473
Author carlo...@webkit.org
Date 2017-12-04 00:52:21 -0800 (Mon, 04 Dec 2017)


Log Message
[GStreamer] More leaks in TextCombinerGStreamer
https://bugs.webkit.org/show_bug.cgi?id=180331

Reviewed by Michael Catanzaro.

I've noticed more leaks reading the code, but I couldn't check them with valgrind, because I don't know how to
trigger that code path. This patch cleans up the file using smart pointer everywhere.

* platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
(webkit_text_combiner_pad_init):
(webkitTextCombinerPadEvent):
(webkitTextCombinerReleasePad):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (225472 => 225473)

--- trunk/Source/WebCore/ChangeLog	2017-12-04 08:49:26 UTC (rev 225472)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 08:52:21 UTC (rev 225473)
@@ -1,3 +1,18 @@
+2017-12-04  Carlos Garcia Campos  
+
+[GStreamer] More leaks in TextCombinerGStreamer
+https://bugs.webkit.org/show_bug.cgi?id=180331
+
+Reviewed by Michael Catanzaro.
+
+I've noticed more leaks reading the code, but I couldn't check them with valgrind, because I don't know how to
+trigger that code path. This patch cleans up the file using smart pointer everywhere.
+
+* platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
+(webkit_text_combiner_pad_init):
+(webkitTextCombinerPadEvent):
+(webkitTextCombinerReleasePad):
+
 2017-12-04  Jer Noble  
 
 Include 'video/*' in image request Accept header if browser supports video media in image contexts.


Modified: trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp (225472 => 225473)

--- trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp	2017-12-04 08:49:26 UTC (rev 225472)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp	2017-12-04 08:52:21 UTC (rev 225473)
@@ -94,8 +94,6 @@
 
 static void webkit_text_combiner_pad_init(WebKitTextCombinerPad* pad)
 {
-pad->tags = 0;
-
 gst_pad_set_event_function(GST_PAD(pad), webkitTextCombinerPadEvent);
 }
 
@@ -137,17 +135,17 @@
 gst_event_parse_caps(event, &caps);
 ASSERT(caps);
 
-GstPad* target = gst_ghost_pad_get_target(GST_GHOST_PAD(pad));
+GRefPtr target = adoptGRef(gst_ghost_pad_get_target(GST_GHOST_PAD(pad)));
 ASSERT(target);
 
-GstElement* targetParent = gst_pad_get_parent_element(target);
+GRefPtr targetParent = adoptGRef(gst_pad_get_parent_element(target.get()));
 ASSERT(targetParent);
 
-GstCaps* textCaps = gst_caps_new_empty_simple("text/x-raw");
-if (gst_caps_can_intersect(textCaps, caps)) {
+GRefPtr textCaps = adoptGRef(gst_caps_new_empty_simple("text/x-raw"));
+if (gst_caps_can_intersect(textCaps.get(), caps)) {
 /* Caps are plain text, put a WebVTT encoder between the ghostpad and
  * the funnel */
-if (targetParent == combiner->funnel) {
+if (targetParent.get() == combiner->funnel) {
 /* Setup a WebVTT encoder */
 GstElement* encoder = gst_element_factory_make("webvttenc", nullptr);
 ASSERT(encoder);
@@ -159,45 +157,38 @@
 ASSERT(ret);
 
 /* Switch the ghostpad to target the WebVTT encoder */
-GstPad* sinkPad = gst_element_get_static_pad(encoder, "sink");
+GRefPtr sinkPad = adoptGRef(gst_element_get_static_pad(encoder, "sink"));
 ASSERT(sinkPad);
 
-ret = gst_ghost_pad_set_target(GST_GHOST_PAD(pad), sinkPad);
+ret = gst_ghost_pad_set_target(GST_GHOST_PAD(pad), sinkPad.get());
 ASSERT(ret);
-gst_object_unref(sinkPad);
 
 /* Connect the WebVTT encoder to the funnel */
-GstPad* srcPad = gst_element_get_static_pad(encoder, "src");
+GRefPtr srcPad = adoptGRef(gst_element_get_static_pad(encoder, "src"));
 ASSERT(srcPad);
 
-ret = GST_PAD_LINK_SUCCESSFUL(gst_pad_link(srcPad, target));
+ret = GST_PAD_LINK_SUCCESSFUL(gst_pad_link(srcPad.get(), target.get()));
 ASSERT(ret);
-gst_object_unref(srcPad);
 } /* else: pipeline is already correct */
 } else {
 /* Caps are not plain text, remove the WebVTT encoder */
-if (targetParent != combiner->funnel) {
+if (targetParent.get() != combiner->funnel) {
 /* Get the funnel sink pad */
-GstPad* srcPad = gst_element_get_static_pad(targetParent, "src");
+GRefPtr srcPad = adoptGRef(gst_element_get_static_pad(targetParent.get(), "src"));
 ASSERT(srcPad);
 
-GstP

[webkit-changes] [225472] trunk

2017-12-04 Thread jer . noble
Title: [225472] trunk








Revision 225472
Author jer.no...@apple.com
Date 2017-12-04 00:49:26 -0800 (Mon, 04 Dec 2017)


Log Message
Include 'video/*' in image request Accept header if browser supports video media in image contexts.
https://bugs.webkit.org/show_bug.cgi?id=179178

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/images/image-supports-video.html

Ensure that 'video/*' is included in the Accept header by asking the ImageDecoder whether "Video"
media is supported. The ImageDecoder will ask all it's constituent decoders, which aside from
ImageDecoderAVFObjC will say only support the "Image" media type.

Drive-by fix: Make sure the MIMETypeRegistry includes all the types supported by AVFoundation when
ImageDecoderAVFObjC is enabled. Also, now that Image reports it can support video mime types, check
whether MediaDocument can support a given mime type before asking ImageDocument.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::isSupportedType):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::acceptHeaderValueFromType):
* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType):
(WebCore::MIMETypeRegistry::isSupportedImageOrSVGMIMEType): Deleted.
* platform/MIMETypeRegistry.h:
* platform/graphics/ImageDecoder.cpp:
(WebCore::ImageDecoder::supportsMediaType):
* platform/graphics/ImageDecoder.h:
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
(WebCore::ImageDecoderAVFObjC::supportsMediaType):
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::supportsContentType):
* platform/graphics/cg/ImageDecoderCG.h:
* platform/graphics/win/ImageDecoderDirect2D.h:
* platform/image-decoders/ScalableImageDecoder.h:
(WebCore::ScalableImageDecoder::supportsMediaType):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

LayoutTests:

* http/tests/images/image-supports-video-expected.txt: Added.
* http/tests/images/image-supports-video.html: Added.
* http/tests/misc/resources/image-checks-for-accept.php:
* http/tests/resources/redirect-to-video-if-accepted.php: Added.
* platform/ios/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/html/semantics/the-img-element/update-the-source-set-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/misc/resources/image-checks-for-accept.php
trunk/LayoutTests/platform/ios/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLImageElement.cpp
trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
trunk/Source/WebCore/platform/MIMETypeRegistry.h
trunk/Source/WebCore/platform/graphics/ImageDecoder.cpp
trunk/Source/WebCore/platform/graphics/ImageDecoder.h
trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h
trunk/Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm
trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.h
trunk/Source/WebCore/platform/graphics/win/ImageDecoderDirect2D.h
trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.h


Added Paths

trunk/LayoutTests/http/tests/images/image-supports-video-expected.txt
trunk/LayoutTests/http/tests/images/image-supports-video.html
trunk/LayoutTests/http/tests/resources/redirect-to-video-if-accepted.php
trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/
trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/embedded-content/
trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/
trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-source-set-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (225471 => 225472)

--- trunk/LayoutTests/ChangeLog	2017-12-04 06:26:13 UTC (rev 225471)
+++ trunk/LayoutTests/ChangeLog	2017-12-04 08:49:26 UTC (rev 225472)
@@ -1,3 +1,17 @@
+2017-12-04  Jer Noble  
+
+Include 'video/*' in image request Accept header if browser supports video media in image contexts.
+https://bugs.webkit.org/show_bug.cgi?id=179178
+
+Reviewed by Alex Christensen.
+
+* http/tests/images/image-supports-video-expected.txt: Added.
+* http/tests/images/image-supports-video.html: Added.
+* http/tests/misc/resources/image-checks-for-accept.php:
+* http/tests/resources/redirect-to-video-if-accepted.php: Added.
+* platform/ios/TestExpectations:
+* platform/mac/imported/w3c/web-platform-tests/html/semantics/the-img-element/update-the-source-set-expected.txt: Added.
+
 2017-12-03  Chris Dumez  
 
 Re-sync Service Workers web-plat