[webkit-changes] [221513] trunk/Tools

2017-09-01 Thread fpizlo
Title: [221513] trunk/Tools








Revision 221513
Author fpi...@apple.com
Date 2017-09-01 19:33:46 -0700 (Fri, 01 Sep 2017)


Log Message
WSL should check unreachable code and no returns
https://bugs.webkit.org/show_bug.cgi?id=176262

Reviewed by Myles Maxfield.

This adds phases to check whether non-void functions return and whether there is any code after
a return in any block. Added tests for simple versions of both of those things. We cannot add
more complex versions until we support control flow statements.

* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/CheckReturns.js: Added.
(checkReturns):
* WebGPUShadingLanguageRI/CheckUnreachableCode.js: Added.
(checkUnreachableCode):
* WebGPUShadingLanguageRI/Parse.js:
(parseReturn):
* WebGPUShadingLanguageRI/Prepare.js:
(prepare):
* WebGPUShadingLanguageRI/ReturnChecker.js: Added.
(ReturnChecker.prototype.visitFuncDef):
(ReturnChecker.prototype.visitBlock):
(ReturnChecker.prototype.visitReturn):
(ReturnChecker):
* WebGPUShadingLanguageRI/Test.js:
(TEST_simpleNoReturn):
* WebGPUShadingLanguageRI/UnreachableCodeChecker.js: Added.
(UnreachableCodeChecker.prototype.visitBlock):
(UnreachableCodeChecker):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/WebGPUShadingLanguageRI/All.js
trunk/Tools/WebGPUShadingLanguageRI/Parse.js
trunk/Tools/WebGPUShadingLanguageRI/Prepare.js
trunk/Tools/WebGPUShadingLanguageRI/Test.js


Added Paths

trunk/Tools/WebGPUShadingLanguageRI/CheckReturns.js
trunk/Tools/WebGPUShadingLanguageRI/CheckUnreachableCode.js
trunk/Tools/WebGPUShadingLanguageRI/ReturnChecker.js
trunk/Tools/WebGPUShadingLanguageRI/UnreachableCodeChecker.js




Diff

Modified: trunk/Tools/ChangeLog (221512 => 221513)

--- trunk/Tools/ChangeLog	2017-09-02 01:38:07 UTC (rev 221512)
+++ trunk/Tools/ChangeLog	2017-09-02 02:33:46 UTC (rev 221513)
@@ -1,5 +1,36 @@
 2017-09-01  Filip Pizlo  
 
+WSL should check unreachable code and no returns
+https://bugs.webkit.org/show_bug.cgi?id=176262
+
+Reviewed by Myles Maxfield.
+
+This adds phases to check whether non-void functions return and whether there is any code after
+a return in any block. Added tests for simple versions of both of those things. We cannot add
+more complex versions until we support control flow statements.
+
+* WebGPUShadingLanguageRI/All.js:
+* WebGPUShadingLanguageRI/CheckReturns.js: Added.
+(checkReturns):
+* WebGPUShadingLanguageRI/CheckUnreachableCode.js: Added.
+(checkUnreachableCode):
+* WebGPUShadingLanguageRI/Parse.js:
+(parseReturn):
+* WebGPUShadingLanguageRI/Prepare.js:
+(prepare):
+* WebGPUShadingLanguageRI/ReturnChecker.js: Added.
+(ReturnChecker.prototype.visitFuncDef):
+(ReturnChecker.prototype.visitBlock):
+(ReturnChecker.prototype.visitReturn):
+(ReturnChecker):
+* WebGPUShadingLanguageRI/Test.js:
+(TEST_simpleNoReturn):
+* WebGPUShadingLanguageRI/UnreachableCodeChecker.js: Added.
+(UnreachableCodeChecker.prototype.visitBlock):
+(UnreachableCodeChecker):
+
+2017-09-01  Filip Pizlo  
+
 WSL should use & for getting a ^ and @ for getting a []
 https://bugs.webkit.org/show_bug.cgi?id=176245
 


Modified: trunk/Tools/WebGPUShadingLanguageRI/All.js (221512 => 221513)

--- trunk/Tools/WebGPUShadingLanguageRI/All.js	2017-09-02 01:38:07 UTC (rev 221512)
+++ trunk/Tools/WebGPUShadingLanguageRI/All.js	2017-09-02 02:33:46 UTC (rev 221513)
@@ -41,6 +41,8 @@
 load("CallExpression.js");
 load("CallFunction.js");
 load("Check.js");
+load("CheckReturns.js");
+load("CheckUnreachableCode.js");
 load("Checker.js");
 load("CommaExpression.js");
 load("ConstexprTypeParameter.js");
@@ -84,6 +86,7 @@
 load("ResolveOverloadImpl.js");
 load("ResolveTypeDefs.js");
 load("Return.js");
+load("ReturnChecker.js");
 load("ReturnException.js");
 load("StandardLibrary.js");
 load("StructType.js");
@@ -97,6 +100,7 @@
 load("TypedValue.js");
 load("UintLiteral.js");
 load("UnificationContext.js");
+load("UnreachableCodeChecker.js");
 load("VariableDecl.js");
 load("VariableRef.js");
 load("VisitingSet.js");


Added: trunk/Tools/WebGPUShadingLanguageRI/CheckReturns.js (0 => 221513)

--- trunk/Tools/WebGPUShadingLanguageRI/CheckReturns.js	(rev 0)
+++ trunk/Tools/WebGPUShadingLanguageRI/CheckReturns.js	2017-09-02 02:33:46 UTC (rev 221513)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the 

[webkit-changes] [221511] trunk/Tools

2017-09-01 Thread fpizlo
Title: [221511] trunk/Tools








Revision 221511
Author fpi...@apple.com
Date 2017-09-01 17:57:27 -0700 (Fri, 01 Sep 2017)


Log Message
WSL should use & for getting a ^ and @ for getting a []
https://bugs.webkit.org/show_bug.cgi?id=176245

Reviewed by Myles Maxfield.

Using \ as an operator was a bad decision since that's an escape character in so many contexts.

Henceforth, & is for making pointers, for example:

thread int^ foo() { int x; return  }

And @ is for making array references, for example:

thread int[] foo() { int[42] x; return @x; }

Having separate operators makes it easy to have pointers to fixed-size arrays:

thread int[42]^ foo() { int[42] x; return  }

* WebGPUShadingLanguageRI/Intrinsics.js:
(Intrinsics):
* WebGPUShadingLanguageRI/Lexer.js:
(Lexer.prototype.next):
(Lexer):
* WebGPUShadingLanguageRI/MakePtrExpression.js:
(MakePtrExpression.prototype.toString):
(MakePtrExpression):
* WebGPUShadingLanguageRI/Parse.js:
(parsePossibleSuffix):
(parsePossiblePrefix):
(parseFuncName):
* WebGPUShadingLanguageRI/StandardLibrary.js:
* WebGPUShadingLanguageRI/Test.js:
(TEST_simpleMakePtr):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/WebGPUShadingLanguageRI/Intrinsics.js
trunk/Tools/WebGPUShadingLanguageRI/Lexer.js
trunk/Tools/WebGPUShadingLanguageRI/MakePtrExpression.js
trunk/Tools/WebGPUShadingLanguageRI/Parse.js
trunk/Tools/WebGPUShadingLanguageRI/StandardLibrary.js
trunk/Tools/WebGPUShadingLanguageRI/Test.js




Diff

Modified: trunk/Tools/ChangeLog (221510 => 221511)

--- trunk/Tools/ChangeLog	2017-09-02 00:19:55 UTC (rev 221510)
+++ trunk/Tools/ChangeLog	2017-09-02 00:57:27 UTC (rev 221511)
@@ -1,3 +1,40 @@
+2017-09-01  Filip Pizlo  
+
+WSL should use & for getting a ^ and @ for getting a []
+https://bugs.webkit.org/show_bug.cgi?id=176245
+
+Reviewed by Myles Maxfield.
+
+Using \ as an operator was a bad decision since that's an escape character in so many contexts.
+
+Henceforth, & is for making pointers, for example:
+
+thread int^ foo() { int x; return  }
+
+And @ is for making array references, for example:
+
+thread int[] foo() { int[42] x; return @x; }
+
+Having separate operators makes it easy to have pointers to fixed-size arrays:
+
+thread int[42]^ foo() { int[42] x; return  }
+
+* WebGPUShadingLanguageRI/Intrinsics.js:
+(Intrinsics):
+* WebGPUShadingLanguageRI/Lexer.js:
+(Lexer.prototype.next):
+(Lexer):
+* WebGPUShadingLanguageRI/MakePtrExpression.js:
+(MakePtrExpression.prototype.toString):
+(MakePtrExpression):
+* WebGPUShadingLanguageRI/Parse.js:
+(parsePossibleSuffix):
+(parsePossiblePrefix):
+(parseFuncName):
+* WebGPUShadingLanguageRI/StandardLibrary.js:
+* WebGPUShadingLanguageRI/Test.js:
+(TEST_simpleMakePtr):
+
 2017-09-01  Myles C. Maxfield  
 
 WSL's lexer will never emit keyword tokens


Modified: trunk/Tools/WebGPUShadingLanguageRI/Intrinsics.js (221510 => 221511)

--- trunk/Tools/WebGPUShadingLanguageRI/Intrinsics.js	2017-09-02 00:19:55 UTC (rev 221510)
+++ trunk/Tools/WebGPUShadingLanguageRI/Intrinsics.js	2017-09-02 00:57:27 UTC (rev 221511)
@@ -88,16 +88,16 @@
 };
 
 this._map.set(
-"native thread T^ operator\\[](thread T[],uint)",
+"native thread T^ operator&[](thread T[],uint)",
 arrayElementPtr);
 this._map.set(
-"native threadgroup T^ operator\\[](threadgroup T[],uint)",
+"native threadgroup T^ operator&[](threadgroup T[],uint)",
 arrayElementPtr);
 this._map.set(
-"native device T^ operator\\[](device T[],uint)",
+"native device T^ operator&[](device T[],uint)",
 arrayElementPtr);
 this._map.set(
-"native constant T^ operator\\[](constant T[],uint)",
+"native constant T^ operator&[](constant T[],uint)",
 arrayElementPtr);
 }
 


Modified: trunk/Tools/WebGPUShadingLanguageRI/Lexer.js (221510 => 221511)

--- trunk/Tools/WebGPUShadingLanguageRI/Lexer.js	2017-09-02 00:19:55 UTC (rev 221510)
+++ trunk/Tools/WebGPUShadingLanguageRI/Lexer.js	2017-09-02 00:57:27 UTC (rev 221511)
@@ -118,7 +118,7 @@
 if (/^([0-9]*\.[0-9]+)|([0-9]+\.[0-9]*)/.test(relevantText))
 return result("doubleLiteral");
 
-if (/^([{}()\[\]?:=+*\/,.%!~^&|<>\\;-]|->|=>|<=|==|!=|\+=|-=|\*=|\/=|%=|^=|\|=|&=)/.test(relevantText))
+if (/^([{}()\[\]?:=+*\/,.%!~^&|<>@;-]|->|=>|<=|==|!=|\+=|-=|\*=|\/=|%=|^=|\|=|&=)/.test(relevantText))
 return result("punctuation");
 
 let remaining = relevantText.substring(0, 20).split(/\s/)[0];


Modified: 

[webkit-changes] [221510] trunk

2017-09-01 Thread cdumez
Title: [221510] trunk








Revision 221510
Author cdu...@apple.com
Date 2017-09-01 17:19:55 -0700 (Fri, 01 Sep 2017)


Log Message
Implement FileSystemDirectoryEntry.getFile()
https://bugs.webkit.org/show_bug.cgi?id=176167


Reviewed by Andreas Kling.

Source/WebCore:

Implement FileSystemDirectoryEntry.getFile():
- https://wicg.github.io/entries-api/#dom-filesystemdirectoryentry-getfile

Test: editing/pasteboard/datatransfer-items-drop-getFile.html

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::isValidPathNameCharacter):
(WebCore::isValidPathSegment):
(WebCore::isValidRelativeVirtualPath):
(WebCore::isValidAbsoluteVirtualPath):
(WebCore::isValidVirtualPath):
Implement various path validation functions as per:
- https://wicg.github.io/entries-api/#names-paths

(WebCore::resolveRelativeVirtualPath):
- Use StringView for second parameter for efficiency. Had to keep
  a String for the first parameter because I need the split to
  return a Vector.
- If the input path is absolute, call recursively with '/' as
  base path so that the virtual path gets sanitized (i.e. '..'
  and '.' in the absolute URL get resolved).

(WebCore::DOMFileSystem::listDirectory):
Use String instead of auto. It is not much longer and is clearer.

(WebCore::validatePathIsDirectory):
(WebCore::DOMFileSystem::getParent):
Move logic to validate that the path is a directory from getParent() to a
separate function. This only makes sure the ScriptExecutionContext is only
ref'd / deref'd on the main thread.

(WebCore::validatePathIsFile):
Logic for validating that a path is a file, used by getFile().

(WebCore::DOMFileSystem::getFile):
Implement getFile() as per:
- https://wicg.github.io/entries-api/#dom-filesystemdirectoryentry-getfile

* Modules/entriesapi/DOMFileSystem.h:
* Modules/entriesapi/FileSystemDirectoryEntry.cpp:
(WebCore::FileSystemDirectoryEntry::getFile):
Add implementation of FileSystemDirectoryEntry::getFile() which merely calls
DOMFileSystem::getFile().

LayoutTests:

Add layout test coverage.

* editing/pasteboard/datatransfer-items-drop-getFile-expected.txt: Added.
* editing/pasteboard/datatransfer-items-drop-getFile.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp
trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.h
trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp


Added Paths

trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getFile-expected.txt
trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getFile.html




Diff

Modified: trunk/LayoutTests/ChangeLog (221509 => 221510)

--- trunk/LayoutTests/ChangeLog	2017-09-01 23:59:21 UTC (rev 221509)
+++ trunk/LayoutTests/ChangeLog	2017-09-02 00:19:55 UTC (rev 221510)
@@ -1,3 +1,16 @@
+2017-09-01  Chris Dumez  
+
+Implement FileSystemDirectoryEntry.getFile()
+https://bugs.webkit.org/show_bug.cgi?id=176167
+
+
+Reviewed by Andreas Kling.
+
+Add layout test coverage.
+
+* editing/pasteboard/datatransfer-items-drop-getFile-expected.txt: Added.
+* editing/pasteboard/datatransfer-items-drop-getFile.html: Added.
+
 2017-09-01  Matt Lewis  
 
 Skipped multiple webgl tests.


Added: trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getFile-expected.txt (0 => 221510)

--- trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getFile-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getFile-expected.txt	2017-09-02 00:19:55 UTC (rev 221510)
@@ -0,0 +1,48 @@
+Basic test coverage for fileSystemDirectoryEntry.getFile()
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dataTransfer.items.length is 1
+* Error case: create flag is set to true
+PASS ex.name is "SecurityError"
+* Regular case: getFile('file1.txt')
+PASS file1Entry.name is "file1.txt"
+PASS file1Entry.fullPath is "/testFiles/file1.txt"
+PASS file1Entry.isFile is true
+* Error case: calling getFile() with path to folder
+PASS ex.name is "TypeMismatchError"
+* Error case: calling getFile() with path containing backslash
+PASS ex.name is "TypeMismatchError"
+* Error case: calling getFile() with path which does not exist
+PASS ex.name is "NotFoundError"
+* Error case: calling getFile() with path containing a NUL character
+PASS ex.name is "TypeMismatchError"
+* Error case: calling getFile() with path to root
+PASS ex.name is "TypeMismatchError"
+* Regular case: calling getFile() with absolute path
+PASS file3Entry.name is "file3.txt"
+PASS file3Entry.fullPath is "/testFiles/subfolder1/file3.txt"
+PASS file3Entry.isFile is true
+* Edge case: calling getFile() with relative path containing '.' and '..'
+PASS file3Entry.name is "file3.txt"
+PASS file3Entry.fullPath is "/testFiles/subfolder1/file3.txt"
+PASS 

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

2017-09-01 Thread beidson
Title: [221509] trunk/Source/WebCore








Revision 221509
Author beid...@apple.com
Date 2017-09-01 16:59:21 -0700 (Fri, 01 Sep 2017)


Log Message
ASSERTION FAILED: taken.get() ==  in WebCore::ServiceWorkerContainer::jobDidFinish(WebCore::ServiceWorkerJob &).
https://bugs.webkit.org/show_bug.cgi?id=176234

Rubberstamped by Tim Horton, reluctantly.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobDidFinish): It's valid for the job to be missing after navigations, which is
  why this was hitting downstream tests.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (221508 => 221509)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 23:54:23 UTC (rev 221508)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 23:59:21 UTC (rev 221509)
@@ -1,3 +1,14 @@
+2017-09-01  Brady Eidson  
+
+ASSERTION FAILED: taken.get() ==  in WebCore::ServiceWorkerContainer::jobDidFinish(WebCore::ServiceWorkerJob &).
+https://bugs.webkit.org/show_bug.cgi?id=176234
+
+Rubberstamped by Tim Horton, reluctantly.
+
+* workers/service/ServiceWorkerContainer.cpp:
+(WebCore::ServiceWorkerContainer::jobDidFinish): It's valid for the job to be missing after navigations, which is
+  why this was hitting downstream tests.
+
 2017-09-01  Youenn Fablet  
 
 Do not Reject CacheStorage promises when updating the persistent filesystem data fails


Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (221508 => 221509)

--- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp	2017-09-01 23:54:23 UTC (rev 221508)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp	2017-09-01 23:59:21 UTC (rev 221509)
@@ -215,7 +215,7 @@
 void ServiceWorkerContainer::jobDidFinish(ServiceWorkerJob& job)
 {
 auto taken = m_jobMap.take(job.data().identifier());
-ASSERT_UNUSED(taken, taken.get() == );
+ASSERT_UNUSED(taken, !taken || taken.get() == );
 }
 
 uint64_t ServiceWorkerContainer::connectionIdentifier()






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


[webkit-changes] [221508] trunk/Tools

2017-09-01 Thread mmaxfield
Title: [221508] trunk/Tools








Revision 221508
Author mmaxfi...@apple.com
Date 2017-09-01 16:54:23 -0700 (Fri, 01 Sep 2017)


Log Message
WSL's lexer will never emit keyword tokens
https://bugs.webkit.org/show_bug.cgi?id=176248

Reviewed by Filip Pizlo.

Because all tokens are also identified as idents, we need to handle them together.

* WebGPUShadingLanguageRI/Lexer.js:
(Lexer.prototype.next):
(Lexer):
* WebGPUShadingLanguageRI/Test.js:
(doLex):
(checkLexerToken):
(TEST_lexerKeyword):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/WebGPUShadingLanguageRI/Lexer.js
trunk/Tools/WebGPUShadingLanguageRI/Test.js




Diff

Modified: trunk/Tools/ChangeLog (221507 => 221508)

--- trunk/Tools/ChangeLog	2017-09-01 23:43:42 UTC (rev 221507)
+++ trunk/Tools/ChangeLog	2017-09-01 23:54:23 UTC (rev 221508)
@@ -1,3 +1,20 @@
+2017-09-01  Myles C. Maxfield  
+
+WSL's lexer will never emit keyword tokens
+https://bugs.webkit.org/show_bug.cgi?id=176248
+
+Reviewed by Filip Pizlo.
+
+Because all tokens are also identified as idents, we need to handle them together.
+
+* WebGPUShadingLanguageRI/Lexer.js:
+(Lexer.prototype.next):
+(Lexer):
+* WebGPUShadingLanguageRI/Test.js:
+(doLex):
+(checkLexerToken):
+(TEST_lexerKeyword):
+
 2017-09-01  Alex Christensen  
 
 Rename WebKit2 API tests after directory rename


Modified: trunk/Tools/WebGPUShadingLanguageRI/Lexer.js (221507 => 221508)

--- trunk/Tools/WebGPUShadingLanguageRI/Lexer.js	2017-09-01 23:43:42 UTC (rev 221507)
+++ trunk/Tools/WebGPUShadingLanguageRI/Lexer.js	2017-09-01 23:54:23 UTC (rev 221508)
@@ -102,8 +102,11 @@
 return null;
 
 // FIXME: Make this do Unicode.
-if (/^[^\d\W]\w*/.test(relevantText))
+if (/^[^\d\W]\w*/.test(relevantText)) {
+if (["struct", "protocol", "typedef", "if", "else", "enum", "continue", "break", "switch", "case", "default", "for", "while", "do", "return", "sizeof", "constant", "device", "threadgroup", "thread", "operator", "null"].includes(RegExp.lastMatch))
+return result("keyword");
 return result("identifier");
+}
 
 if (/^[0-9]+u/.test(relevantText))
 return result("uintLiteral");
@@ -115,9 +118,6 @@
 if (/^([0-9]*\.[0-9]+)|([0-9]+\.[0-9]*)/.test(relevantText))
 return result("doubleLiteral");
 
-if (/^(struct|protocol|typedef|if|else|enum|continue|break|switch|case|default|for|while|do|return|sizeof|constant|device|threadgroup|thread|operator|null)/.test(relevantText))
-return result("keyword");
-
 if (/^([{}()\[\]?:=+*\/,.%!~^&|<>\\;-]|->|=>|<=|==|!=|\+=|-=|\*=|\/=|%=|^=|\|=|&=)/.test(relevantText))
 return result("punctuation");
 


Modified: trunk/Tools/WebGPUShadingLanguageRI/Test.js (221507 => 221508)

--- trunk/Tools/WebGPUShadingLanguageRI/Test.js	2017-09-01 23:43:42 UTC (rev 221507)
+++ trunk/Tools/WebGPUShadingLanguageRI/Test.js	2017-09-01 23:54:23 UTC (rev 221508)
@@ -31,6 +31,19 @@
 return prepare("", 0, code);
 }
 
+function doLex(code)
+{
+let lexer = new Lexer("", 0, code);
+var result = [];
+for (;;) {
+let next = lexer.next();
+if (!next)
+return result;
+result.push(next);
+}
+return result;
+}
+
 function makeInt(program, value)
 {
 return TypedValue.box(program.intrinsics.int32, value);
@@ -43,6 +56,15 @@
 if (result.value != expected)
 throw new Error("Wrong result: " + result + " (expected " + expected + ")");
 }
+function checkLexerToken(result, expectedIndex, expectedKind, expectedText)
+{
+if (result._index != expectedIndex)
+throw new Error("Wrong lexer index; result: " + result._index + " (expected " + expectedIndex + ")");
+if (result._kind != expectedKind)
+throw new Error("Wrong lexer kind; result: " + result._kind + " (expected " + expectedKind + ")");
+if (result._text != expectedText)
+throw new Error("Wrong lexer text; result: " + result._text + " (expected " + expectedText + ")");
+}
 
 function checkFail(callback, predicate)
 {
@@ -314,6 +336,26 @@
 (e) => e instanceof WTypeError && e.message.indexOf("native int32 operator+<>(int32,int32)") != -1);
 }
 
+function TEST_lexerKeyword()
+{
+let result = doLex("ident for while 123 123u { } {asd asd{ 1a3");
+if (result.length != 13)
+throw new Error("Lexer emitted an incorrect number of tokens (expected 12): " + result.length);
+checkLexerToken(result[0],  0,  "identifier", "ident");
+checkLexerToken(result[1],  6,  "keyword", "for");
+checkLexerToken(result[2],  10, "keyword", "while");
+checkLexerToken(result[3],  16, "intLiteral",  "123");
+checkLexerToken(result[4],  20, "uintLiteral", "123u");
+checkLexerToken(result[5],  25, "punctuation", "{");
+ 

[webkit-changes] [221507] trunk/LayoutTests

2017-09-01 Thread jlewis3
Title: [221507] trunk/LayoutTests








Revision 221507
Author jlew...@apple.com
Date 2017-09-01 16:43:42 -0700 (Fri, 01 Sep 2017)


Log Message
Skipped multiple webgl tests.


Unreviewed test gardening.

* platform/ios-11/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-11/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (221506 => 221507)

--- trunk/LayoutTests/ChangeLog	2017-09-01 23:28:09 UTC (rev 221506)
+++ trunk/LayoutTests/ChangeLog	2017-09-01 23:43:42 UTC (rev 221507)
@@ -1,3 +1,12 @@
+2017-09-01  Matt Lewis  
+
+Skipped multiple webgl tests.
+
+
+Unreviewed test gardening.
+
+* platform/ios-11/TestExpectations:
+
 2017-09-01  Youenn Fablet  
 
 [Fetch API] Add support for consuming a Request ReadableStream body


Modified: trunk/LayoutTests/platform/ios-11/TestExpectations (221506 => 221507)

--- trunk/LayoutTests/platform/ios-11/TestExpectations	2017-09-01 23:28:09 UTC (rev 221506)
+++ trunk/LayoutTests/platform/ios-11/TestExpectations	2017-09-01 23:43:42 UTC (rev 221507)
@@ -153,3 +153,7 @@
 webrtc/video-replace-track.html [ Failure ]
 webrtc/video-rotation.html [ Failure ]
 
+# 
+webgl/1.0.2/conformance/ogles/GL/log/log_001_to_008.html [ Skip ]
+webgl/1.0.2/conformance/ogles/GL/log2/log2_001_to_008.html [ Skip ]
+






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


[webkit-changes] [221506] trunk/Source

2017-09-01 Thread commit-queue
Title: [221506] trunk/Source








Revision 221506
Author commit-qu...@webkit.org
Date 2017-09-01 16:28:09 -0700 (Fri, 01 Sep 2017)


Log Message
Do not Reject CacheStorage promises when updating the persistent filesystem data fails
https://bugs.webkit.org/show_bug.cgi?id=176241

Patch by Youenn Fablet  on 2017-09-01
Reviewed by Alex Christensen.

Source/WebCore:

Open/Remove caches may succeed in updating the memory representation but the write-to-disk operation may fail.
In that case, the corresponding promise is now resolved since the web page can still proceeed.

There is no way to test that currently as this would require a write disk failure to be triggered.

* Modules/cache/CacheStorage.cpp:
(WebCore::logConsolePersistencyError):
(WebCore::CacheStorage::open):
(WebCore::CacheStorage::remove):
* Modules/cache/DOMCacheEngine.h:
(WebCore::DOMCacheEngine::CacheIdentifierOperationResult::encode const):
(WebCore::DOMCacheEngine::CacheIdentifierOperationResult::decode):

Source/WebKit:

Open/Remove caches may succeed in the memory representation but the write-to-disk operation may fail.
In that case, the callback does not return an error but a value containing the cache identifier.
The value will also contain a boolean flag set to true to notify the client that persistent storage failed this time.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::open):
(WebKit::CacheStorage::Engine::remove):
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::open):
(WebKit::CacheStorage::Caches::remove):
* NetworkProcess/cache/CacheStorageEngineCaches.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/cache/CacheStorage.cpp
trunk/Source/WebCore/Modules/cache/DOMCacheEngine.h
trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (221505 => 221506)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 22:56:15 UTC (rev 221505)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 23:28:09 UTC (rev 221506)
@@ -1,5 +1,25 @@
 2017-09-01  Youenn Fablet  
 
+Do not Reject CacheStorage promises when updating the persistent filesystem data fails
+https://bugs.webkit.org/show_bug.cgi?id=176241
+
+Reviewed by Alex Christensen.
+
+Open/Remove caches may succeed in updating the memory representation but the write-to-disk operation may fail.
+In that case, the corresponding promise is now resolved since the web page can still proceeed.
+
+There is no way to test that currently as this would require a write disk failure to be triggered.
+
+* Modules/cache/CacheStorage.cpp:
+(WebCore::logConsolePersistencyError):
+(WebCore::CacheStorage::open):
+(WebCore::CacheStorage::remove):
+* Modules/cache/DOMCacheEngine.h:
+(WebCore::DOMCacheEngine::CacheIdentifierOperationResult::encode const):
+(WebCore::DOMCacheEngine::CacheIdentifierOperationResult::decode):
+
+2017-09-01  Youenn Fablet  
+
 [Fetch API] Add support for consuming a Request ReadableStream body
 https://bugs.webkit.org/show_bug.cgi?id=176182
 


Modified: trunk/Source/WebCore/Modules/cache/CacheStorage.cpp (221505 => 221506)

--- trunk/Source/WebCore/Modules/cache/CacheStorage.cpp	2017-09-01 22:56:15 UTC (rev 221505)
+++ trunk/Source/WebCore/Modules/cache/CacheStorage.cpp	2017-09-01 23:28:09 UTC (rev 221506)
@@ -165,6 +165,14 @@
 });
 }
 
+static void logConsolePersistencyError(ScriptExecutionContext* context, const String& cacheName)
+{
+if (!context)
+return;
+
+context->addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("There was an error making ", cacheName, " persistent on the filesystem"));
+}
+
 void CacheStorage::open(const String& name, DOMPromiseDeferred&& promise)
 {
 retrieveCaches([this, name, promise = WTFMove(promise)](std::optional&& exception) mutable {
@@ -189,7 +197,10 @@
 if (!result.hasValue())
 promise.reject(DOMCacheEngine::errorToException(result.error()));
 else {
-auto cache = DOMCache::create(*scriptExecutionContext(), String { name }, result.value(), m_connection.copyRef());
+if (result.value().hadStorageError)
+logConsolePersistencyError(scriptExecutionContext(), name);
+
+auto cache = DOMCache::create(*scriptExecutionContext(), String { name }, result.value().identifier, m_connection.copyRef());
 promise.resolve(cache);
 m_caches.append(WTFMove(cache));
 }
@@ -221,8 

[webkit-changes] [221504] trunk

2017-09-01 Thread commit-queue
Title: [221504] trunk








Revision 221504
Author commit-qu...@webkit.org
Date 2017-09-01 15:53:23 -0700 (Fri, 01 Sep 2017)


Log Message
[Fetch API] Add support for consuming a Request ReadableStream body
https://bugs.webkit.org/show_bug.cgi?id=176182

Patch by Youenn Fablet  on 2017-09-01
Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/wpt/fetch/request-stream-empty.html
   http/wpt/fetch/request-stream-error.html

Adding a ReadableStreamSink which allows to pipe all ReadableStream data back to C++ code.
This sink only takes BufferSource as the only user is Fetch which has this restriction.
This sink is tied to the readableStreamPipeTo builtin internal function that reads all data from the ReadableStream
and send it to the sink.

Adding a ReadableStreamToSharedBufferSink specialization to get the data as a SharedBuffer.

Use that class in FetchBodyConsumer to get the data back from the ReadableStream and transform it according
the desired body type (text, JSON, ArrayBuffer).

* CMakeLists.txt:
* DerivedSources.make:
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::consume):
(WebCore::FetchBody::loadingSucceeded):
* Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::resolveWithTypeAndData):
(WebCore::FetchBodyConsumer::clean):
(WebCore::FetchBodyConsumer::resolveWithData):
(WebCore::FetchBodyConsumer::resolve):
* Modules/fetch/FetchBodyConsumer.h:
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::finishConsumingStream):
* Modules/streams/ReadableStreamInternals.js:
(readableStreamPipeTo):
* Modules/streams/ReadableStreamSink.cpp: Added.
(WebCore::ReadableStreamToSharedBufferSink::ReadableStreamToSharedBufferSink):
(WebCore::ReadableStreamToSharedBufferSink::pipeFrom):
(WebCore::ReadableStreamToSharedBufferSink::enqueue):
(WebCore::ReadableStreamToSharedBufferSink::close):
(WebCore::ReadableStreamToSharedBufferSink::error):
* Modules/streams/ReadableStreamSink.h: Added.
* Modules/streams/ReadableStreamSink.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ReadableStream.cpp:
(WebCore::ReadableStream::pipeTo):
* bindings/js/ReadableStream.h:

LayoutTests:

* http/wpt/fetch/request-stream-disturbed-1-expected.txt:
* http/wpt/fetch/request-stream-disturbed-2-expected.txt:
* http/wpt/fetch/request-stream-disturbed-3-expected.txt:
* http/wpt/fetch/request-stream-empty-expected.txt: Added.
* http/wpt/fetch/request-stream-empty.html: Added.
* http/wpt/fetch/request-stream-error-expected.txt: Added.
* http/wpt/fetch/request-stream-error.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/wpt/fetch/request-stream-disturbed-1-expected.txt
trunk/LayoutTests/http/wpt/fetch/request-stream-disturbed-2-expected.txt
trunk/LayoutTests/http/wpt/fetch/request-stream-disturbed-3-expected.txt
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Modules/fetch/FetchBody.cpp
trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp
trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.h
trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp
trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/bindings/js/ReadableStream.cpp
trunk/Source/WebCore/bindings/js/ReadableStream.h


Added Paths

trunk/LayoutTests/http/wpt/fetch/request-stream-empty-expected.txt
trunk/LayoutTests/http/wpt/fetch/request-stream-empty.html
trunk/LayoutTests/http/wpt/fetch/request-stream-error-expected.txt
trunk/LayoutTests/http/wpt/fetch/request-stream-error.html
trunk/Source/WebCore/Modules/streams/ReadableStreamSink.cpp
trunk/Source/WebCore/Modules/streams/ReadableStreamSink.h
trunk/Source/WebCore/Modules/streams/ReadableStreamSink.idl




Diff

Modified: trunk/LayoutTests/ChangeLog (221503 => 221504)

--- trunk/LayoutTests/ChangeLog	2017-09-01 22:25:20 UTC (rev 221503)
+++ trunk/LayoutTests/ChangeLog	2017-09-01 22:53:23 UTC (rev 221504)
@@ -1,3 +1,18 @@
+2017-09-01  Youenn Fablet  
+
+[Fetch API] Add support for consuming a Request ReadableStream body
+https://bugs.webkit.org/show_bug.cgi?id=176182
+
+Reviewed by Alex Christensen.
+
+* http/wpt/fetch/request-stream-disturbed-1-expected.txt:
+* http/wpt/fetch/request-stream-disturbed-2-expected.txt:
+* http/wpt/fetch/request-stream-disturbed-3-expected.txt:
+* http/wpt/fetch/request-stream-empty-expected.txt: Added.
+* http/wpt/fetch/request-stream-empty.html: Added.
+* http/wpt/fetch/request-stream-error-expected.txt: Added.
+* http/wpt/fetch/request-stream-error.html: Added.
+
 2017-09-01  Per Arne Vollan  
 
 http/tests/misc/slow-loading-animated-image.html is flaky on iOS simulator and Windows.


Modified: trunk/LayoutTests/http/wpt/fetch/request-stream-disturbed-1-expected.txt (221503 => 221504)

--- 

[webkit-changes] [221503] trunk

2017-09-01 Thread achristensen
Title: [221503] trunk








Revision 221503
Author achristen...@apple.com
Date 2017-09-01 15:25:20 -0700 (Fri, 01 Sep 2017)


Log Message
Add WKUIDelegatePrivate equivalent of WKPageUIClient's toolbarsAreVisible
https://bugs.webkit.org/show_bug.cgi?id=176246


Reviewed by Tim Horton.

Source/WebKit:

* UIProcess/API/APIUIClient.h:
(API::UIClient::toolbarsAreVisible):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::toolbarsAreVisible):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getToolbarsAreVisible):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[ToolbarDelegate _webView:getToolbarsAreVisibleWithCompletionHandler:]):
(-[ToolbarDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/API/APIUIClient.h
trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp
trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
trunk/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit/UIProcess/WebPageProxy.h
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (221502 => 221503)

--- trunk/Source/WebKit/ChangeLog	2017-09-01 22:19:26 UTC (rev 221502)
+++ trunk/Source/WebKit/ChangeLog	2017-09-01 22:25:20 UTC (rev 221503)
@@ -1,5 +1,27 @@
 2017-09-01  Alex Christensen  
 
+Add WKUIDelegatePrivate equivalent of WKPageUIClient's toolbarsAreVisible
+https://bugs.webkit.org/show_bug.cgi?id=176246
+
+
+Reviewed by Tim Horton.
+
+* UIProcess/API/APIUIClient.h:
+(API::UIClient::toolbarsAreVisible):
+* UIProcess/API/C/WKPage.cpp:
+(WKPageSetPageUIClient):
+* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+* UIProcess/Cocoa/UIDelegate.h:
+* UIProcess/Cocoa/UIDelegate.mm:
+(WebKit::UIDelegate::setDelegate):
+(WebKit::UIDelegate::UIClient::toolbarsAreVisible):
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::getToolbarsAreVisible):
+* UIProcess/WebPageProxy.h:
+* UIProcess/WebPageProxy.messages.in:
+
+2017-09-01  Alex Christensen  
+
 Make PageClientImplCocoa a proper superclass of PageClientImpls for Mac and iOS
 https://bugs.webkit.org/show_bug.cgi?id=176239
 


Modified: trunk/Source/WebKit/UIProcess/API/APIUIClient.h (221502 => 221503)

--- trunk/Source/WebKit/UIProcess/API/APIUIClient.h	2017-09-01 22:19:26 UTC (rev 221502)
+++ trunk/Source/WebKit/UIProcess/API/APIUIClient.h	2017-09-01 22:25:20 UTC (rev 221503)
@@ -99,7 +99,7 @@
 virtual void didNotHandleKeyEvent(WebKit::WebPageProxy*, const WebKit::NativeWebKeyboardEvent&) { }
 virtual void didNotHandleWheelEvent(WebKit::WebPageProxy*, const WebKit::NativeWebWheelEvent&) { }
 
-virtual bool toolbarsAreVisible(WebKit::WebPageProxy*) { return true; }
+virtual void toolbarsAreVisible(WebKit::WebPageProxy&, Function&& completionHandler) { completionHandler(true); }
 virtual void setToolbarsAreVisible(WebKit::WebPageProxy*, bool) { }
 virtual bool menuBarIsVisible(WebKit::WebPageProxy*) { return true; }
 virtual void setMenuBarIsVisible(WebKit::WebPageProxy*, bool) { }


Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (221502 => 221503)

--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp	2017-09-01 22:19:26 UTC (rev 221502)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp	2017-09-01 22:25:20 UTC (rev 221503)
@@ -1832,11 +1832,11 @@
 m_client.didNotHandleWheelEvent(toAPI(page), event.nativeEvent(), m_client.base.clientInfo);
 }
 
-bool toolbarsAreVisible(WebPageProxy* page) final
+void toolbarsAreVisible(WebPageProxy& page, Function&& completionHandler) final
 {
 if (!m_client.toolbarsAreVisible)
-return true;
-return m_client.toolbarsAreVisible(toAPI(page), m_client.base.clientInfo);
+return completionHandler(true);
+completionHandler(m_client.toolbarsAreVisible(toAPI(), m_client.base.clientInfo));
 }
 
 void setToolbarsAreVisible(WebPageProxy* page, bool visible) final


Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (221502 => 221503)

--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h	2017-09-01 22:19:26 UTC (rev 221502)
+++ 

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

2017-09-01 Thread achristensen
Title: [221502] trunk/Source/WebKit








Revision 221502
Author achristen...@apple.com
Date 2017-09-01 15:19:26 -0700 (Fri, 01 Sep 2017)


Log Message
Make PageClientImplCocoa a proper superclass of PageClientImpls for Mac and iOS
https://bugs.webkit.org/show_bug.cgi?id=176239

Reviewed by Tim Horton.

* UIProcess/Cocoa/PageClientImplCocoa.h: Added.
(WebKit::PageClientImplCocoa::PageClientImplCocoa):
* UIProcess/Cocoa/PageClientImplCocoa.mm:
(WebKit::PageClientImplCocoa::isPlayingAudioWillChange):
(WebKit::PageClientImplCocoa::isPlayingAudioDidChange):
(WebKit::PageClientImpl::isPlayingAudioWillChange): Deleted.
(WebKit::PageClientImpl::isPlayingAudioDidChange): Deleted.
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl):
* UIProcess/mac/PageClientImpl.h: Removed.
* UIProcess/mac/PageClientImpl.mm: Removed.
* UIProcess/mac/PageClientImplMac.h: Copied from Source/WebKit/UIProcess/mac/PageClientImpl.h.
* UIProcess/mac/PageClientImplMac.mm: Copied from Source/WebKit/UIProcess/mac/PageClientImpl.mm.
(WebKit::PageClientImpl::PageClientImpl):
* UIProcess/mac/WebContextMenuProxyMac.mm:
* UIProcess/mac/WebPageProxyMac.mm:
* UIProcess/mac/WebPopupMenuProxyMac.mm:
* WebKit.xcodeproj/project.pbxproj:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
trunk/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h
trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h
trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm


Removed Paths

trunk/Source/WebKit/UIProcess/mac/PageClientImpl.h
trunk/Source/WebKit/UIProcess/mac/PageClientImpl.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (221501 => 221502)

--- trunk/Source/WebKit/ChangeLog	2017-09-01 22:16:01 UTC (rev 221501)
+++ trunk/Source/WebKit/ChangeLog	2017-09-01 22:19:26 UTC (rev 221502)
@@ -1,5 +1,33 @@
 2017-09-01  Alex Christensen  
 
+Make PageClientImplCocoa a proper superclass of PageClientImpls for Mac and iOS
+https://bugs.webkit.org/show_bug.cgi?id=176239
+
+Reviewed by Tim Horton.
+
+* UIProcess/Cocoa/PageClientImplCocoa.h: Added.
+(WebKit::PageClientImplCocoa::PageClientImplCocoa):
+* UIProcess/Cocoa/PageClientImplCocoa.mm:
+(WebKit::PageClientImplCocoa::isPlayingAudioWillChange):
+(WebKit::PageClientImplCocoa::isPlayingAudioDidChange):
+(WebKit::PageClientImpl::isPlayingAudioWillChange): Deleted.
+(WebKit::PageClientImpl::isPlayingAudioDidChange): Deleted.
+* UIProcess/Cocoa/WebViewImpl.mm:
+* UIProcess/ios/PageClientImplIOS.h:
+* UIProcess/ios/PageClientImplIOS.mm:
+(WebKit::PageClientImpl::PageClientImpl):
+* UIProcess/mac/PageClientImpl.h: Removed.
+* UIProcess/mac/PageClientImpl.mm: Removed.
+* UIProcess/mac/PageClientImplMac.h: Copied from Source/WebKit/UIProcess/mac/PageClientImpl.h.
+* UIProcess/mac/PageClientImplMac.mm: Copied from Source/WebKit/UIProcess/mac/PageClientImpl.mm.
+(WebKit::PageClientImpl::PageClientImpl):
+* UIProcess/mac/WebContextMenuProxyMac.mm:
+* UIProcess/mac/WebPageProxyMac.mm:
+* UIProcess/mac/WebPopupMenuProxyMac.mm:
+* WebKit.xcodeproj/project.pbxproj:
+
+2017-09-01  Alex Christensen  
+
 Replace WKUIDelegatePrivate's isPlayingMediaDidChange with KVO _isPlayingAudio on WKWebView
 https://bugs.webkit.org/show_bug.cgi?id=176212
 


Added: trunk/Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h (0 => 221502)

--- trunk/Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h	(rev 0)
+++ trunk/Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h	2017-09-01 22:19:26 UTC (rev 221502)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 

[webkit-changes] [221501] trunk

2017-09-01 Thread commit-queue
Title: [221501] trunk








Revision 221501
Author commit-qu...@webkit.org
Date 2017-09-01 15:16:01 -0700 (Fri, 01 Sep 2017)


Log Message
Wrong getComputedStyle behavior for pseudo-elements for layout-dependent properties.
https://bugs.webkit.org/show_bug.cgi?id=175936

Patch by Emilio Cobos Álvarez  on 2017-09-01
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

* web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt:
* web-platform-tests/cssom/getComputedStyle-pseudo.html: Sync test with upstream.

Source/WebCore:

Before this patch we may wrongly end up using the wrong renderer to resolve
this.

Tests: imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::styledElement const):
(WebCore::ComputedStyleExtractor::styledRenderer const):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSComputedStyleDeclaration.h:

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (221500 => 221501)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2017-09-01 22:14:55 UTC (rev 221500)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2017-09-01 22:16:01 UTC (rev 221501)
@@ -1,3 +1,13 @@
+2017-09-01  Emilio Cobos Álvarez  
+
+Wrong getComputedStyle behavior for pseudo-elements for layout-dependent properties.
+https://bugs.webkit.org/show_bug.cgi?id=175936
+
+Reviewed by Antti Koivisto.
+
+* web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt:
+* web-platform-tests/cssom/getComputedStyle-pseudo.html: Sync test with upstream.
+
 2017-08-31  Sam Weinig  
 
 Implement DOMMatrix2DInit for setTransform()/addPath()


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt (221500 => 221501)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt	2017-09-01 22:14:55 UTC (rev 221500)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt	2017-09-01 22:16:01 UTC (rev 221501)
@@ -1,4 +1,6 @@
 
 PASS Resolution of width is correct for ::before and ::after pseudo-elements 
 FAIL Resolution of width is correct for ::before and ::after pseudo-elements of display: contents elements assert_equals: expected "50px" but got "auto"
+FAIL Resolution of nonexistent pseudo-element styles assert_equals: Nonexistent :before pseudo-element shouldn't claim to have the same style as the originating element expected "static" but got "relative"
+FAIL Resolution of pseudo-element styles in display: none elements assert_equals: Pseudo-styles of display: none elements should be correct expected "\"Foo\"" but got ""
 


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html (221500 => 221501)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html	2017-09-01 22:14:55 UTC (rev 221500)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html	2017-09-01 22:16:01 UTC (rev 221501)
@@ -23,9 +23,17 @@
   height: 10px;
   display: block;
 }
+#none {
+  display: none;
+}
+#none::before,
+#none::after {
+  content: "Foo";
+}
 
 
   
+  
 
 
 test(function() {
@@ -40,4 +48,23 @@
 assert_equals(getComputedStyle(contents, pseudo).width, "50px");
   });
 }, "Resolution of width is correct for ::before and ::after pseudo-elements of display: contents elements");
+test(function() {
+  var has_no_pseudos = document.body;
+  has_no_pseudos.style.position = "relative";
+  [":before", ":after"].forEach(function(pseudo) {
+assert_equals(getComputedStyle(has_no_pseudos, pseudo).position, "static",
+  "Nonexistent " + pseudo + " pseudo-element shouldn't claim to have " +
+  "the same style as the originating element");
+assert_equals(getComputedStyle(has_no_pseudos, pseudo).width, "auto",
+  "Nonexistent " + pseudo + " pseudo-element shouldn't claim to have " +
+  "definite size");
+  });
+}, "Resolution of nonexistent pseudo-element styles");
+test(function() {
+  var none = document.getElementById('none');
+  [":before", ":after"].forEach(function(pseudo) {
+assert_equals(getComputedStyle(none, pseudo).content, "\"Foo\"",
+  "Pseudo-styles of display: none elements should be correct");
+  });
+}, "Resolution of pseudo-element 

[webkit-changes] [221500] trunk/Tools

2017-09-01 Thread eric . carlson
Title: [221500] trunk/Tools








Revision 221500
Author eric.carl...@apple.com
Date 2017-09-01 15:14:55 -0700 (Fri, 01 Sep 2017)


Log Message
Switch HTMLMediaElement to release logging
https://bugs.webkit.org/show_bug.cgi?id=176065

Unreviewed build fix.

* TestWebKitAPI/Tests/WebCore/Logging.cpp:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp




Diff

Modified: trunk/Tools/ChangeLog (221499 => 221500)

--- trunk/Tools/ChangeLog	2017-09-01 22:09:24 UTC (rev 221499)
+++ trunk/Tools/ChangeLog	2017-09-01 22:14:55 UTC (rev 221500)
@@ -1,3 +1,12 @@
+2017-09-01  Eric Carlson  
+
+Switch HTMLMediaElement to release logging
+https://bugs.webkit.org/show_bug.cgi?id=176065
+
+Unreviewed build fix.
+
+* TestWebKitAPI/Tests/WebCore/Logging.cpp:
+
 2017-09-01  Filip Pizlo  
 
 WSL should have more tests of type checking failures


Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp (221499 => 221500)

--- trunk/Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp	2017-09-01 22:09:24 UTC (rev 221499)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp	2017-09-01 22:14:55 UTC (rev 221500)
@@ -52,7 +52,7 @@
 
 // Define the following to enable all tests. Disabled by default because replacing stderr with a
 // non-blocking pipe fails on some of the bots.
-#define TEST_OUTPUT 1
+#define TEST_OUTPUT 0
 
 namespace TestWebKitAPI {
 






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


[webkit-changes] [221499] trunk/LayoutTests

2017-09-01 Thread pvollan
Title: [221499] trunk/LayoutTests








Revision 221499
Author pvol...@apple.com
Date 2017-09-01 15:09:24 -0700 (Fri, 01 Sep 2017)


Log Message
http/tests/misc/slow-loading-animated-image.html is flaky on iOS simulator and Windows.
https://bugs.webkit.org/show_bug.cgi?id=157916

Unreviewed test gardening.

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (221498 => 221499)

--- trunk/LayoutTests/ChangeLog	2017-09-01 21:47:57 UTC (rev 221498)
+++ trunk/LayoutTests/ChangeLog	2017-09-01 22:09:24 UTC (rev 221499)
@@ -1,3 +1,12 @@
+2017-09-01  Per Arne Vollan  
+
+http/tests/misc/slow-loading-animated-image.html is flaky on iOS simulator and Windows.
+https://bugs.webkit.org/show_bug.cgi?id=157916
+
+Unreviewed test gardening.
+
+* platform/win/TestExpectations:
+
 2017-09-01  Simon Fraser  
 
 transformCanLikelyUseFastPath() can read off the end of a string


Modified: trunk/LayoutTests/platform/win/TestExpectations (221498 => 221499)

--- trunk/LayoutTests/platform/win/TestExpectations	2017-09-01 21:47:57 UTC (rev 221498)
+++ trunk/LayoutTests/platform/win/TestExpectations	2017-09-01 22:09:24 UTC (rev 221499)
@@ -4055,3 +4055,6 @@
 # No service worker implementation for WK1
 http/tests/workers/service [ Skip ]
 imported/w3c/web-platform-tests/service-workers [ Skip ]
+
+# This test is flaky on Windows.
+webkit.org/b/157916 http/tests/misc/slow-loading-animated-image.html [ Pass ImageOnlyFailure ]






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


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

2017-09-01 Thread pvollan
Title: [221498] trunk/Source/WebCore








Revision 221498
Author pvol...@apple.com
Date 2017-09-01 14:47:57 -0700 (Fri, 01 Sep 2017)


Log Message
[Win] Compile error, 'Cache' is not declared.
https://bugs.webkit.org/show_bug.cgi?id=176062

Reviewed by Youenn Fablet.

Rename Cache to DOMCache.

No new tests, covered by existing tests.

* DerivedSources.make:
* Modules/cache/Cache.cpp: Removed.
* Modules/cache/Cache.h: Removed.
* Modules/cache/Cache.idl: Removed.
* Modules/cache/CacheStorage.cpp:
(WebCore::doSequentialMatch):
(WebCore::startSequentialMatch):
(WebCore::copyCaches):
(WebCore::CacheStorage::match):
(WebCore::CacheStorage::retrieveCaches):
(WebCore::CacheStorage::open):
* Modules/cache/CacheStorage.h:
* Modules/cache/DOMCache.cpp: Copied from Source/WebCore/Modules/cache/Cache.cpp.
(WebCore::DOMCache::DOMCache):
(WebCore::DOMCache::~DOMCache):
(WebCore::DOMCache::match):
(WebCore::DOMCache::doMatch):
(WebCore::DOMCache::matchAll):
(WebCore::DOMCache::add):
(WebCore::DOMCache::requestFromInfo):
(WebCore::DOMCache::addAll):
(WebCore::DOMCache::put):
(WebCore::DOMCache::remove):
(WebCore::DOMCache::keys):
(WebCore::DOMCache::retrieveRecords):
(WebCore::DOMCache::queryCache):
(WebCore::DOMCache::queryCacheWithTargetStorage):
(WebCore::DOMCache::batchDeleteOperation):
(WebCore::DOMCache::batchPutOperation):
(WebCore::DOMCache::updateRecords):
(WebCore::DOMCache::stop):
(WebCore::DOMCache::activeDOMObjectName const):
(WebCore::DOMCache::canSuspendForDocumentSuspension const):
(WebCore::Cache::Cache): Deleted.
(WebCore::Cache::~Cache): Deleted.
(WebCore::Cache::match): Deleted.
(WebCore::Cache::doMatch): Deleted.
(WebCore::Cache::matchAll): Deleted.
(WebCore::Cache::add): Deleted.
(WebCore::Cache::requestFromInfo): Deleted.
(WebCore::Cache::addAll): Deleted.
(WebCore::Cache::put): Deleted.
(WebCore::Cache::remove): Deleted.
(WebCore::Cache::keys): Deleted.
(WebCore::Cache::retrieveRecords): Deleted.
(WebCore::Cache::queryCache): Deleted.
(WebCore::Cache::queryCacheWithTargetStorage): Deleted.
(WebCore::Cache::batchDeleteOperation): Deleted.
(WebCore::Cache::batchPutOperation): Deleted.
(WebCore::Cache::updateRecords): Deleted.
(WebCore::Cache::stop): Deleted.
(WebCore::Cache::activeDOMObjectName const): Deleted.
(WebCore::Cache::canSuspendForDocumentSuspension const): Deleted.
* Modules/cache/DOMCache.h: Copied from Source/WebCore/Modules/cache/Cache.h.
* Modules/cache/DOMCache.idl: Copied from Source/WebCore/Modules/cache/Cache.idl.
* WebCore.xcodeproj/project.pbxproj:

Modified Paths

trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Modules/cache/CacheStorage.cpp
trunk/Source/WebCore/Modules/cache/CacheStorage.h
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebCore/Modules/cache/DOMCache.cpp
trunk/Source/WebCore/Modules/cache/DOMCache.h
trunk/Source/WebCore/Modules/cache/DOMCache.idl


Removed Paths

trunk/Source/WebCore/Modules/cache/Cache.cpp
trunk/Source/WebCore/Modules/cache/Cache.h
trunk/Source/WebCore/Modules/cache/Cache.idl




Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (221497 => 221498)

--- trunk/Source/WebCore/CMakeLists.txt	2017-09-01 21:45:30 UTC (rev 221497)
+++ trunk/Source/WebCore/CMakeLists.txt	2017-09-01 21:47:57 UTC (rev 221498)
@@ -184,7 +184,7 @@
 
 Modules/beacon/NavigatorBeacon.idl
 
-Modules/cache/Cache.idl
+Modules/cache/DOMCache.idl
 Modules/cache/CacheQueryOptions.idl
 Modules/cache/CacheStorage.idl
 Modules/cache/DOMWindowCaches.idl
@@ -911,7 +911,7 @@
 
 Modules/beacon/NavigatorBeacon.cpp
 
-Modules/cache/Cache.cpp
+Modules/cache/DOMCache.cpp
 Modules/cache/CacheStorage.cpp
 Modules/cache/CacheStorageConnection.cpp
 Modules/cache/DOMCacheEngine.cpp


Modified: trunk/Source/WebCore/ChangeLog (221497 => 221498)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 21:45:30 UTC (rev 221497)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 21:47:57 UTC (rev 221498)
@@ -1,3 +1,71 @@
+2017-09-01  Per Arne Vollan  
+
+[Win] Compile error, 'Cache' is not declared.
+https://bugs.webkit.org/show_bug.cgi?id=176062
+
+Reviewed by Youenn Fablet.
+
+Rename Cache to DOMCache.
+
+No new tests, covered by existing tests. 
+
+* DerivedSources.make:
+* Modules/cache/Cache.cpp: Removed.
+* Modules/cache/Cache.h: Removed.
+* Modules/cache/Cache.idl: Removed.
+* Modules/cache/CacheStorage.cpp:
+(WebCore::doSequentialMatch):
+(WebCore::startSequentialMatch):
+(WebCore::copyCaches):
+(WebCore::CacheStorage::match):
+(WebCore::CacheStorage::retrieveCaches):
+(WebCore::CacheStorage::open):
+* Modules/cache/CacheStorage.h:
+* Modules/cache/DOMCache.cpp: Copied from Source/WebCore/Modules/cache/Cache.cpp.
+(WebCore::DOMCache::DOMCache):
+

[webkit-changes] [221497] trunk/Tools

2017-09-01 Thread fpizlo
Title: [221497] trunk/Tools








Revision 221497
Author fpi...@apple.com
Date 2017-09-01 14:45:30 -0700 (Fri, 01 Sep 2017)


Log Message
WSL should have more tests of type checking failures
https://bugs.webkit.org/show_bug.cgi?id=176244

Reviewed by Myles Maxfield.

* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitProtocolDecl.set throw):
* WebGPUShadingLanguageRI/Test.js:
(TEST_typeMismatchReturn):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/WebGPUShadingLanguageRI/Checker.js
trunk/Tools/WebGPUShadingLanguageRI/Test.js




Diff

Modified: trunk/Tools/ChangeLog (221496 => 221497)

--- trunk/Tools/ChangeLog	2017-09-01 21:35:30 UTC (rev 221496)
+++ trunk/Tools/ChangeLog	2017-09-01 21:45:30 UTC (rev 221497)
@@ -1,5 +1,17 @@
 2017-09-01  Filip Pizlo  
 
+WSL should have more tests of type checking failures
+https://bugs.webkit.org/show_bug.cgi?id=176244
+
+Reviewed by Myles Maxfield.
+
+* WebGPUShadingLanguageRI/Checker.js:
+(Checker.prototype.visitProtocolDecl.set throw):
+* WebGPUShadingLanguageRI/Test.js:
+(TEST_typeMismatchReturn):
+
+2017-09-01  Filip Pizlo  
+
 WSL should be be able to call a function declared in a protocol from a generic function
 https://bugs.webkit.org/show_bug.cgi?id=176242
 


Modified: trunk/Tools/WebGPUShadingLanguageRI/Checker.js (221496 => 221497)

--- trunk/Tools/WebGPUShadingLanguageRI/Checker.js	2017-09-01 21:35:30 UTC (rev 221496)
+++ trunk/Tools/WebGPUShadingLanguageRI/Checker.js	2017-09-01 21:45:30 UTC (rev 221497)
@@ -165,11 +165,11 @@
 if (!resultType)
 throw new Error("Null result type from " + node.value);
 if (!node.func.returnType.equals(resultType))
-throw new WTypeError(node.origin.originString, "Trying to return " + resultType + " in a function that returns " + func.returnType);
+throw new WTypeError(node.origin.originString, "Trying to return " + resultType + " in a function that returns " + node.func.returnType);
 return;
 }
 
-if (!func.returnType.equals(this._program.intrinsics.void))
+if (!node.func.returnType.equals(this._program.intrinsics.void))
 throw new WTypeError(node.origin.originString, "Non-void function must return a value");
 }
 


Modified: trunk/Tools/WebGPUShadingLanguageRI/Test.js (221496 => 221497)

--- trunk/Tools/WebGPUShadingLanguageRI/Test.js	2017-09-01 21:35:30 UTC (rev 221496)
+++ trunk/Tools/WebGPUShadingLanguageRI/Test.js	2017-09-01 21:45:30 UTC (rev 221497)
@@ -252,6 +252,68 @@
 checkInt(program, callFunction(program, "foo", [], [makeInt(program, 45)]), 45 + 73);
 }
 
+function TEST_typeMismatchReturn()
+{
+checkFail(
+() => doPrep(`
+int foo()
+{
+return 0u;
+}
+`),
+(e) => e instanceof WTypeError);
+}
+
+function TEST_typeMismatchVariableDecl()
+{
+checkFail(
+() => doPrep(`
+void foo(uint x)
+{
+int y = x;
+}
+`),
+(e) => e instanceof WTypeError);
+}
+
+function TEST_typeMismatchAssignment()
+{
+checkFail(
+() => doPrep(`
+void foo(uint x)
+{
+int y;
+y = x;
+}
+`),
+(e) => e instanceof WTypeError);
+}
+
+function TEST_typeMismatchReturnParam()
+{
+checkFail(
+() => doPrep(`
+int foo(uint x)
+{
+return x;
+}
+`),
+(e) => e instanceof WTypeError);
+}
+
+function TEST_badAdd()
+{
+checkFail(
+() => doPrep(`
+void bar(T) { }
+void foo(int x, uint y)
+{
+bar(x + y);
+}
+`),
+(e) => e instanceof WTypeError && e.message.indexOf("native int32 operator+<>(int32,int32)") != -1);
+}
+
 let before = preciseTime();
 
 let filter = /.*/; // run everything by default






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


[webkit-changes] [221496] trunk/Tools

2017-09-01 Thread fpizlo
Title: [221496] trunk/Tools








Revision 221496
Author fpi...@apple.com
Date 2017-09-01 14:35:30 -0700 (Fri, 01 Sep 2017)


Log Message
WSL should be be able to call a function declared in a protocol from a generic function
https://bugs.webkit.org/show_bug.cgi?id=176242

Reviewed by Myles Maxfield.

It turns out that we need to know when a function is resolved to a protocol signature, so we
need to have a type for this. This introduces ProtocolFuncDecl.

Also, this introduces parsing of protocol decls.

When instantiating a function, we need to rewrite its CallExpressions if they were previously
resolved to a PrtococolFuncDecl instead of a FuncDef or NativeFunc. In that case, we need to
rerun the resolution on the program. That resolution is guaranteed to succeed if the type
system works correctly.

* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/CallExpression.js:
(CallExpression.prototype.resolve):
* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitProtocolDecl.set throw):
* WebGPUShadingLanguageRI/EBufferBuilder.js:
(EBufferBuilder.prototype._createEPtr):
* WebGPUShadingLanguageRI/Func.js:
(Func):
(Func.prototype.get origin):
* WebGPUShadingLanguageRI/FuncDef.js:
(FuncDef):
(FuncDef.prototype.get origin): Deleted.
* WebGPUShadingLanguageRI/FuncInstantiator.js:
(FuncInstantiator):
(FuncInstantiator.prototype.getUnique.InstantiationSubstitution.prototype.visitCallExpression):
(FuncInstantiator.prototype.getUnique.InstantiationSubstitution):
* WebGPUShadingLanguageRI/NativeFunc.js:
(NativeFunc):
(NativeFunc.prototype.get origin): Deleted.
* WebGPUShadingLanguageRI/NativeFuncInstance.js:
(NativeFuncInstance):
* WebGPUShadingLanguageRI/Node.js:
(Node.prototype.substitute):
* WebGPUShadingLanguageRI/Parse.js:
(parseProtocolFuncDecl):
(parseProtocolDecl):
(parse):
* WebGPUShadingLanguageRI/Program.js:
(Program):
(Program.prototype.get protocols):
(Program.prototype.add):
* WebGPUShadingLanguageRI/ProtocolDecl.js:
(ProtocolDecl.prototype.add):
(ProtocolDecl.prototype.hasHeir):
(ProtocolDecl.prototype.addSignature): Deleted.
* WebGPUShadingLanguageRI/ProtocolFuncDecl.js: Added.
(ProtocolFuncDecl):
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitStructType):
(Rewriter.prototype.visitTypeVariable):
(Rewriter.prototype.visitProtocolFuncDecl):
(Rewriter.prototype.visitCallExpression):
* WebGPUShadingLanguageRI/StructType.js:
(StructType.prototype.instantiate):
* WebGPUShadingLanguageRI/Substitution.js:
(Substitution):
(Substitution.mapping): Deleted.
* WebGPUShadingLanguageRI/Test.js:
(TEST_simpleGeneric):
(TEST_simpleAssignment):
(TEST_simpleDefault):
(TEST_simpleDereference):
(TEST_dereferenceStore):
(TEST_simpleMakePtr):
(TEST_threadArrayLoad):
(TEST_deviceArrayLoad):
(TEST_threadArrayStore):
(TEST_deviceArrayStore):
(TEST_simpleProtocol):
* WebGPUShadingLanguageRI/Visitor.js:
(Visitor.prototype.visitProtocolFuncDecl):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/WebGPUShadingLanguageRI/All.js
trunk/Tools/WebGPUShadingLanguageRI/CallExpression.js
trunk/Tools/WebGPUShadingLanguageRI/Checker.js
trunk/Tools/WebGPUShadingLanguageRI/EBufferBuilder.js
trunk/Tools/WebGPUShadingLanguageRI/Func.js
trunk/Tools/WebGPUShadingLanguageRI/FuncDef.js
trunk/Tools/WebGPUShadingLanguageRI/FuncInstantiator.js
trunk/Tools/WebGPUShadingLanguageRI/NativeFunc.js
trunk/Tools/WebGPUShadingLanguageRI/NativeFuncInstance.js
trunk/Tools/WebGPUShadingLanguageRI/Node.js
trunk/Tools/WebGPUShadingLanguageRI/Parse.js
trunk/Tools/WebGPUShadingLanguageRI/Program.js
trunk/Tools/WebGPUShadingLanguageRI/ProtocolDecl.js
trunk/Tools/WebGPUShadingLanguageRI/Rewriter.js
trunk/Tools/WebGPUShadingLanguageRI/StructType.js
trunk/Tools/WebGPUShadingLanguageRI/Substitution.js
trunk/Tools/WebGPUShadingLanguageRI/Test.js
trunk/Tools/WebGPUShadingLanguageRI/Visitor.js


Added Paths

trunk/Tools/WebGPUShadingLanguageRI/ProtocolFuncDecl.js




Diff

Modified: trunk/Tools/ChangeLog (221495 => 221496)

--- trunk/Tools/ChangeLog	2017-09-01 21:33:02 UTC (rev 221495)
+++ trunk/Tools/ChangeLog	2017-09-01 21:35:30 UTC (rev 221496)
@@ -1,3 +1,83 @@
+2017-09-01  Filip Pizlo  
+
+WSL should be be able to call a function declared in a protocol from a generic function
+https://bugs.webkit.org/show_bug.cgi?id=176242
+
+Reviewed by Myles Maxfield.
+
+It turns out that we need to know when a function is resolved to a protocol signature, so we
+need to have a type for this. This introduces ProtocolFuncDecl.
+
+Also, this introduces parsing of protocol decls.
+
+When instantiating a function, we need to rewrite its CallExpressions if they were previously
+resolved to a PrtococolFuncDecl instead of a FuncDef or NativeFunc. In that case, we need to
+rerun the resolution on the program. That resolution is guaranteed to succeed if the type
+system works correctly.
+
+* 

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

2017-09-01 Thread beidson
Title: [221495] trunk/Source/WebCore








Revision 221495
Author beid...@apple.com
Date 2017-09-01 14:33:02 -0700 (Fri, 01 Sep 2017)


Log Message
Move ServiceWorkerJob from FetchLoader to ThreadableLoader.
https://bugs.webkit.org/show_bug.cgi?id=176231

Reviewed by Youenn Fablet.

No new tests (No behavior change).

* WebCore.xcodeproj/project.pbxproj:

Re-indent these headers. Yuck!
* loader/ThreadableLoader.h:
(WebCore::ThreadableLoader::ref):
(WebCore::ThreadableLoader::deref):
(WebCore::ThreadableLoader::ThreadableLoader):
(WebCore::ThreadableLoader::~ThreadableLoader):
* loader/ThreadableLoaderClient.h:
(WebCore::ThreadableLoaderClient::didSendData):
(WebCore::ThreadableLoaderClient::didReceiveResponse):
(WebCore::ThreadableLoaderClient::didReceiveData):
(WebCore::ThreadableLoaderClient::didFinishLoading):
(WebCore::ThreadableLoaderClient::didFail):
(WebCore::ThreadableLoaderClient::didFinishTiming):
(WebCore::ThreadableLoaderClient::ThreadableLoaderClient):
(WebCore::ThreadableLoaderClient::~ThreadableLoaderClient):

Move from FetchLoaderClient to ThreadableLoaderClient:
* workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::fetchScriptWithContext):
(WebCore::ServiceWorkerJob::didReceiveResponse):
(WebCore::ServiceWorkerJob::didReceiveData):
(WebCore::ServiceWorkerJob::didFinishLoading):
(WebCore::ServiceWorkerJob::didFail):
(WebCore::ServiceWorkerJob::didSucceed): Deleted.
* workers/service/ServiceWorkerJob.h:

* workers/service/server/SWClientConnection.cpp: Add a now-required include.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/loader/ThreadableLoader.h
trunk/Source/WebCore/loader/ThreadableLoaderClient.h
trunk/Source/WebCore/workers/service/ServiceWorkerJob.cpp
trunk/Source/WebCore/workers/service/ServiceWorkerJob.h
trunk/Source/WebCore/workers/service/server/SWClientConnection.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (221494 => 221495)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 20:40:11 UTC (rev 221494)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 21:33:02 UTC (rev 221495)
@@ -1,3 +1,42 @@
+2017-09-01  Brady Eidson  
+
+Move ServiceWorkerJob from FetchLoader to ThreadableLoader.
+https://bugs.webkit.org/show_bug.cgi?id=176231
+
+Reviewed by Youenn Fablet.
+
+No new tests (No behavior change).
+
+* WebCore.xcodeproj/project.pbxproj:
+
+Re-indent these headers. Yuck!
+* loader/ThreadableLoader.h:
+(WebCore::ThreadableLoader::ref):
+(WebCore::ThreadableLoader::deref):
+(WebCore::ThreadableLoader::ThreadableLoader):
+(WebCore::ThreadableLoader::~ThreadableLoader):
+* loader/ThreadableLoaderClient.h:
+(WebCore::ThreadableLoaderClient::didSendData):
+(WebCore::ThreadableLoaderClient::didReceiveResponse):
+(WebCore::ThreadableLoaderClient::didReceiveData):
+(WebCore::ThreadableLoaderClient::didFinishLoading):
+(WebCore::ThreadableLoaderClient::didFail):
+(WebCore::ThreadableLoaderClient::didFinishTiming):
+(WebCore::ThreadableLoaderClient::ThreadableLoaderClient):
+(WebCore::ThreadableLoaderClient::~ThreadableLoaderClient):
+
+Move from FetchLoaderClient to ThreadableLoaderClient:
+* workers/service/ServiceWorkerJob.cpp:
+(WebCore::ServiceWorkerJob::fetchScriptWithContext):
+(WebCore::ServiceWorkerJob::didReceiveResponse):
+(WebCore::ServiceWorkerJob::didReceiveData):
+(WebCore::ServiceWorkerJob::didFinishLoading):
+(WebCore::ServiceWorkerJob::didFail):
+(WebCore::ServiceWorkerJob::didSucceed): Deleted.
+* workers/service/ServiceWorkerJob.h:
+
+* workers/service/server/SWClientConnection.cpp: Add a now-required include.
+
 2017-09-01  Eric Carlson  
 
 Switch HTMLMediaElement to release logging


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (221494 => 221495)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-09-01 20:40:11 UTC (rev 221494)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-09-01 21:33:02 UTC (rev 221495)
@@ -2305,8 +2305,8 @@
 		517A53461F50C17F00DCDC0A /* SWServerWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A53421F50C16100DCDC0A /* SWServerWorker.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		517A534E1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A534B1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.cpp */; };
 		517A534F1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A534C1F549D4A00DCDC0A /* ServiceWorkerRegistrationData.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		517A53581F5889E800DCDC0A /* FetchLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4147E2B61C89912600A7E715 /* 

[webkit-changes] [221494] trunk

2017-09-01 Thread eric . carlson
Title: [221494] trunk








Revision 221494
Author eric.carl...@apple.com
Date 2017-09-01 13:40:11 -0700 (Fri, 01 Sep 2017)


Log Message
Switch HTMLMediaElement to release logging
https://bugs.webkit.org/show_bug.cgi?id=176065

Reviewed by Jer Noble.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::privateBrowsingStateDidChange): Disable the logger when private browsing
mode is enabled.
(WebCore::Document::logger const):
* dom/Document.h:

Convert debug-only logging to configurable release logging.
* html/HTMLMediaElement.cpp:
(PAL::LogArgument::toString): Logger template for URL that returns the url as a
String when only when the LOG_DISABLED build flag is not defined. Returns "[url]" when it is.
* html/HTMLMediaElement.h:

Source/WTF:

* wtf/MediaTime.cpp:
(WTF::MediaTime::dump const): Use toString.
(WTF::MediaTime::toString const): New.
* wtf/MediaTime.h:
(PAL::LogArgument::toString): Logger template.

Tools:

* TestWebKitAPI/Tests/WebCore/Logging.cpp:
(TestWebKitAPI::LogObserver::level const):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/MediaTime.cpp
trunk/Source/WTF/wtf/MediaTime.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
trunk/Source/WebCore/PAL/pal/Logger.h
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/dom/Document.h
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp


Added Paths

trunk/Source/WebCore/PAL/pal/LoggerHelper.h




Diff

Modified: trunk/Source/WTF/ChangeLog (221493 => 221494)

--- trunk/Source/WTF/ChangeLog	2017-09-01 19:47:53 UTC (rev 221493)
+++ trunk/Source/WTF/ChangeLog	2017-09-01 20:40:11 UTC (rev 221494)
@@ -1,3 +1,16 @@
+2017-09-01  Eric Carlson  
+
+Switch HTMLMediaElement to release logging
+https://bugs.webkit.org/show_bug.cgi?id=176065
+
+Reviewed by Jer Noble.
+
+* wtf/MediaTime.cpp:
+(WTF::MediaTime::dump const): Use toString.
+(WTF::MediaTime::toString const): New.
+* wtf/MediaTime.h:
+(PAL::LogArgument::toString): Logger template.
+
 2017-08-31  Don Olmstead  
 
 [CMake] Make USE_CF conditional within Windows


Modified: trunk/Source/WTF/wtf/MediaTime.cpp (221493 => 221494)

--- trunk/Source/WTF/wtf/MediaTime.cpp	2017-09-01 19:47:53 UTC (rev 221493)
+++ trunk/Source/WTF/wtf/MediaTime.cpp	2017-09-01 20:40:11 UTC (rev 221494)
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace WTF {
 
@@ -551,6 +552,22 @@
 out.print(toDouble(), "}");
 }
 
+String MediaTime::toString() const
+{
+StringBuilder builder;
+
+builder.append("{");
+if (!hasDoubleValue()) {
+builder.append(String::number(m_timeValue));
+builder.append("/");
+builder.append(String::number(m_timeScale));
+builder.append(" = ");
+}
+builder.append(String::number(toDouble()));
+builder.append("}");
+return builder.toString();
+}
+
 MediaTime abs(const MediaTime& rhs)
 {
 if (rhs.isInvalid())


Modified: trunk/Source/WTF/wtf/MediaTime.h (221493 => 221494)

--- trunk/Source/WTF/wtf/MediaTime.h	2017-09-01 19:47:53 UTC (rev 221493)
+++ trunk/Source/WTF/wtf/MediaTime.h	2017-09-01 20:40:11 UTC (rev 221494)
@@ -30,6 +30,7 @@
 #define WTF_MediaTime_h
 
 #include 
+#include 
 
 #include 
 #include 
@@ -108,6 +109,7 @@
 const uint32_t& timeScale() const { return m_timeScale; }
 
 void dump(PrintStream& out) const;
+String toString() const;
 
 // Make the following casts errors:
 operator double() const = delete;
@@ -167,4 +169,18 @@
 using WTF::MediaTime;
 using WTF::abs;
 
+namespace PAL {
+
+template
+struct LogArgument;
+
+template <>
+struct LogArgument {
+static String toString(const WTF::MediaTime& time)
+{
+return time.toString();
+}
+};
+}
+
 #endif


Modified: trunk/Source/WebCore/ChangeLog (221493 => 221494)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 19:47:53 UTC (rev 221493)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 20:40:11 UTC (rev 221494)
@@ -1,3 +1,22 @@
+2017-09-01  Eric Carlson  
+
+Switch HTMLMediaElement to release logging
+https://bugs.webkit.org/show_bug.cgi?id=176065
+
+Reviewed by Jer Noble.
+
+* dom/Document.cpp:
+(WebCore::Document::privateBrowsingStateDidChange): Disable the logger when private browsing
+mode is enabled.
+(WebCore::Document::logger const):
+* dom/Document.h:
+
+Convert debug-only logging to configurable release logging.
+* html/HTMLMediaElement.cpp:
+(PAL::LogArgument::toString): Logger template for URL that returns the url as a
+String when only when the LOG_DISABLED build flag is not defined. Returns "[url]" when it is.
+* html/HTMLMediaElement.h:
+
 2017-09-01  Simon Fraser  
 

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

2017-09-01 Thread aestes
Title: [221493] trunk/Source/WebCore/PAL








Revision 221493
Author aes...@apple.com
Date 2017-09-01 12:47:53 -0700 (Fri, 01 Sep 2017)


Log Message
Try again to fix the Internal iOS Simulator build after r221485.

* pal/spi/cg/CoreGraphicsSPI.h:

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (221492 => 221493)

--- trunk/Source/WebCore/PAL/ChangeLog	2017-09-01 19:31:55 UTC (rev 221492)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-09-01 19:47:53 UTC (rev 221493)
@@ -1,5 +1,11 @@
 2017-09-01  Andy Estes  
 
+Try again to fix the Internal iOS Simulator build after r221485.
+
+* pal/spi/cg/CoreGraphicsSPI.h:
+
+2017-09-01  Andy Estes  
+
 Try to fix the Internal iOS Simulator build after r221485.
 
 * pal/spi/cg/CoreGraphicsSPI.h:


Modified: trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h (221492 => 221493)

--- trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h	2017-09-01 19:31:55 UTC (rev 221492)
+++ trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h	2017-09-01 19:47:53 UTC (rev 221493)
@@ -44,10 +44,6 @@
 #include 
 #include 
 
-#if PLATFORM(COCOA)
-#include 
-#endif
-
 #else
 
 struct CGFontHMetrics {
@@ -178,6 +174,10 @@
 };
 typedef struct CGFocusRingStyle CGFocusRingStyle;
 
+#endif // PLATFORM(COCOA)
+
+#if PLATFORM(MAC)
+
 typedef CF_ENUM(uint32_t, CGSNotificationType) {
 kCGSFirstConnectionNotification = 900,
 kCGSFirstSessionNotification = 1500,
@@ -188,7 +188,7 @@
 static const CGSNotificationType kCGSessionConsoleConnect = kCGSFirstSessionNotification;
 static const CGSNotificationType kCGSessionConsoleDisconnect = (CGSNotificationType)(kCGSessionConsoleConnect + 1);
 
-#endif // PLATFORM(COCOA)
+#endif // PLATFORM(MAC)
 
 #endif // USE(APPLE_INTERNAL_SDK)
 
@@ -204,7 +204,9 @@
 
 typedef void* CGSNotificationArg;
 typedef void* CGSNotificationData;
+#endif
 
+#if PLATFORM(MAC)
 typedef void (*CGSNotifyConnectionProcPtr)(CGSNotificationType, void* data, uint32_t data_length, void* arg, CGSConnectionID);
 typedef void (*CGSNotifyProcPtr)(CGSNotificationType, void* data, uint32_t data_length, void* arg);
 #endif
@@ -266,8 +268,6 @@
 CGError CGSNewRegionWithRect(const CGRect*, CGRegionRef*);
 CGError CGSPackagesEnableConnectionOcclusionNotifications(CGSConnectionID, bool flag, bool* outCurrentVisibilityState);
 CGError CGSPackagesEnableConnectionWindowModificationNotifications(CGSConnectionID, bool flag, bool* outConnectionIsCurrentlyIdle);
-CGError CGSRegisterConnectionNotifyProc(CGSConnectionID, CGSNotifyConnectionProcPtr, CGSNotificationType, void* arg);
-CGError CGSRegisterNotifyProc(CGSNotifyProcPtr, CGSNotificationType, void* arg);
 CGError CGSReleaseRegion(const CGRegionRef CF_RELEASES_ARGUMENT);
 CGError CGSReleaseRegionEnumerator(const CGSRegionEnumeratorObj);
 CGError CGSSetWindowAlpha(CGSConnectionID, CGSWindowID, float alpha);
@@ -291,7 +291,8 @@
 CGError CGSSetConnectionProperty(CGSConnectionID, CGSConnectionID ownerCid, CFStringRef key, CFTypeRef value);
 CGError CGSCopyConnectionProperty(CGSConnectionID, CGSConnectionID ownerCid, CFStringRef key, CFTypeRef *value);
 CGError CGSGetScreenRectForWindow(CGSConnectionID, CGSWindowID, CGRect *);
-
+CGError CGSRegisterConnectionNotifyProc(CGSConnectionID, CGSNotifyConnectionProcPtr, CGSNotificationType, void* arg);
+CGError CGSRegisterNotifyProc(CGSNotifyProcPtr, CGSNotificationType, void* arg);
 bool ColorSyncProfileIsWideGamut(ColorSyncProfileRef);
 #endif
 






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


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

2017-09-01 Thread aestes
Title: [221492] trunk/Source/WebCore/PAL








Revision 221492
Author aes...@apple.com
Date 2017-09-01 12:31:55 -0700 (Fri, 01 Sep 2017)


Log Message
Try to fix the Internal iOS Simulator build after r221485.

* pal/spi/cg/CoreGraphicsSPI.h:

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (221491 => 221492)

--- trunk/Source/WebCore/PAL/ChangeLog	2017-09-01 19:13:53 UTC (rev 221491)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-09-01 19:31:55 UTC (rev 221492)
@@ -1,5 +1,11 @@
 2017-09-01  Andy Estes  
 
+Try to fix the Internal iOS Simulator build after r221485.
+
+* pal/spi/cg/CoreGraphicsSPI.h:
+
+2017-09-01  Andy Estes  
+
 [CG] Upstream CoreGraphics-related WebKitSystemInterface functions
 https://bugs.webkit.org/show_bug.cgi?id=176200
 


Modified: trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h (221491 => 221492)

--- trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h	2017-09-01 19:13:53 UTC (rev 221491)
+++ trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h	2017-09-01 19:31:55 UTC (rev 221492)
@@ -44,6 +44,10 @@
 #include 
 #include 
 
+#if PLATFORM(COCOA)
+#include 
+#endif
+
 #else
 
 struct CGFontHMetrics {






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


[webkit-changes] [221491] trunk/Tools

2017-09-01 Thread commit-queue
Title: [221491] trunk/Tools








Revision 221491
Author commit-qu...@webkit.org
Date 2017-09-01 12:13:53 -0700 (Fri, 01 Sep 2017)


Log Message
download-latest-github-release.py should have friendlier output for non-404 errors
https://bugs.webkit.org/show_bug.cgi?id=176201

Patch by Ross Kirsling  on 2017-09-01
Reviewed by Brent Fulgham.

* Scripts/download-latest-github-release.py:

Modified Paths

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




Diff

Modified: trunk/Tools/ChangeLog (221490 => 221491)

--- trunk/Tools/ChangeLog	2017-09-01 18:57:15 UTC (rev 221490)
+++ trunk/Tools/ChangeLog	2017-09-01 19:13:53 UTC (rev 221491)
@@ -1,3 +1,12 @@
+2017-09-01  Ross Kirsling  
+
+download-latest-github-release.py should have friendlier output for non-404 errors
+https://bugs.webkit.org/show_bug.cgi?id=176201
+
+Reviewed by Brent Fulgham.
+
+* Scripts/download-latest-github-release.py:
+
 2017-09-01  Filip Pizlo  
 
 [WSL] Add tests for storing to arrays


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

--- trunk/Tools/Scripts/download-latest-github-release.py	2017-09-01 18:57:15 UTC (rev 221490)
+++ trunk/Tools/Scripts/download-latest-github-release.py	2017-09-01 19:13:53 UTC (rev 221491)
@@ -69,8 +69,9 @@
 try:
 response = urllib2.urlopen(request)
 except urllib2.HTTPError, error:
-if error.code == 404:
-return None, None
+if error.code != 404:
+print error.code, error.reason
+return None, None
 
 data = ""
 for asset in data['assets']:






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


[webkit-changes] [221490] trunk/Tools

2017-09-01 Thread fpizlo
Title: [221490] trunk/Tools








Revision 221490
Author fpi...@apple.com
Date 2017-09-01 11:57:15 -0700 (Fri, 01 Sep 2017)


Log Message
[WSL] Add tests for storing to arrays
https://bugs.webkit.org/show_bug.cgi?id=176237

Reviewed by Myles Maxfield.

Storing to arrays works now.

* WebGPUShadingLanguageRI/ArrayType.js:
(ArrayType):
* WebGPUShadingLanguageRI/Test.js:
(TEST_threadArrayStore):
(TEST_deviceArrayStore):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/WebGPUShadingLanguageRI/ArrayType.js
trunk/Tools/WebGPUShadingLanguageRI/Test.js




Diff

Modified: trunk/Tools/ChangeLog (221489 => 221490)

--- trunk/Tools/ChangeLog	2017-09-01 18:54:50 UTC (rev 221489)
+++ trunk/Tools/ChangeLog	2017-09-01 18:57:15 UTC (rev 221490)
@@ -1,3 +1,18 @@
+2017-09-01  Filip Pizlo  
+
+[WSL] Add tests for storing to arrays
+https://bugs.webkit.org/show_bug.cgi?id=176237
+
+Reviewed by Myles Maxfield.
+
+Storing to arrays works now.
+
+* WebGPUShadingLanguageRI/ArrayType.js:
+(ArrayType):
+* WebGPUShadingLanguageRI/Test.js:
+(TEST_threadArrayStore):
+(TEST_deviceArrayStore):
+
 2017-09-01  Alex Christensen  
 
 Replace WKUIDelegatePrivate's isPlayingMediaDidChange with KVO _isPlayingAudio on WKWebView


Modified: trunk/Tools/WebGPUShadingLanguageRI/ArrayType.js (221489 => 221490)

--- trunk/Tools/WebGPUShadingLanguageRI/ArrayType.js	2017-09-01 18:54:50 UTC (rev 221489)
+++ trunk/Tools/WebGPUShadingLanguageRI/ArrayType.js	2017-09-01 18:57:15 UTC (rev 221490)
@@ -27,6 +27,7 @@
 class ArrayType extends Type {
 constructor(origin, elementType, numElements)
 {
+super();
 this._origin = origin;
 this._elementType = elementType;
 this._numElements = numElements;


Modified: trunk/Tools/WebGPUShadingLanguageRI/Test.js (221489 => 221490)

--- trunk/Tools/WebGPUShadingLanguageRI/Test.js	2017-09-01 18:54:50 UTC (rev 221489)
+++ trunk/Tools/WebGPUShadingLanguageRI/Test.js	2017-09-01 18:57:15 UTC (rev 221490)
@@ -183,6 +183,46 @@
 checkInt(program, result, 89);
 }
 
+function TEST_threadArrayStore()
+{
+let program = doPrep(`
+void foo(thread int[] array, int value)
+{
+array[0u] = value;
+}`);
+let buffer = new EBuffer(1);
+buffer.set(0, 15);
+let arrayRef = TypedValue.box(
+new ArrayRefType(null, "thread", program.intrinsics.int32),
+new EArrayRef(new EPtr(buffer, 0), 1));
+callFunction(program, "foo", [], [arrayRef, makeInt(program, 65)]);
+if (buffer.get(0) != 65)
+throw new Error("Bad value stored into buffer (expected 65): " + buffer.get(0));
+callFunction(program, "foo", [], [arrayRef, makeInt(program, -111)]);
+if (buffer.get(0) != -111)
+throw new Error("Bad value stored into buffer (expected -111): " + buffer.get(0));
+}
+
+function TEST_deviceArrayStore()
+{
+let program = doPrep(`
+void foo(device int[] array, int value)
+{
+array[0u] = value;
+}`);
+let buffer = new EBuffer(1);
+buffer.set(0, 15);
+let arrayRef = TypedValue.box(
+new ArrayRefType(null, "device", program.intrinsics.int32),
+new EArrayRef(new EPtr(buffer, 0), 1));
+callFunction(program, "foo", [], [arrayRef, makeInt(program, 65)]);
+if (buffer.get(0) != 65)
+throw new Error("Bad value stored into buffer (expected 65): " + buffer.get(0));
+callFunction(program, "foo", [], [arrayRef, makeInt(program, -111)]);
+if (buffer.get(0) != -111)
+throw new Error("Bad value stored into buffer (expected -111): " + buffer.get(0));
+}
+
 let before = preciseTime();
 
 let filter = /.*/; // run everything by default






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


[webkit-changes] [221489] trunk

2017-09-01 Thread achristensen
Title: [221489] trunk








Revision 221489
Author achristen...@apple.com
Date 2017-09-01 11:54:50 -0700 (Fri, 01 Sep 2017)


Log Message
Replace WKUIDelegatePrivate's isPlayingMediaDidChange with KVO _isPlayingAudio on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=176212

Reviewed by Tim Horton.

Source/WebKit:

Dan suggested this in bug 176203, I think it's a good idea,
and I'll need to add more KVO properties soon anyways so I'd better learn how.
Determining if audio playing changed is important for Safari, so WKPageUIClient's
isPlayingAudioDidChange was correctly named but incorrectly fired if either audio
or video playing changed and had you check if audio was playing, possibly too often.

* UIProcess/API/APIUIClient.h:
(API::UIClient::isPlayingMediaDidChange):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isPlayingAudio]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/glib/WebKitUIClient.cpp:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::isPlayingMediaDidChange): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::isPlayingAudioWillChange):
(WebKit::WebViewImpl::isPlayingAudioDidChange):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isPlayingAudioDidChange):
(WebKit::PageClientImpl::isPlayingAudioWillChange):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[AudioObserver observeValueForKeyPath:ofObject:change:context:]):
(TEST):
(-[MediaDelegate _webView:isPlayingMediaDidChange:]): Deleted.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/PlatformMac.cmake
trunk/Source/WebKit/UIProcess/API/APIUIClient.h
trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp
trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
trunk/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
trunk/Source/WebKit/UIProcess/API/wpe/PageClientImpl.h
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
trunk/Source/WebKit/UIProcess/PageClient.h
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h
trunk/Source/WebKit/UIProcess/mac/PageClientImpl.h
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm


Added Paths

trunk/Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (221488 => 221489)

--- trunk/Source/WebKit/ChangeLog	2017-09-01 18:49:00 UTC (rev 221488)
+++ trunk/Source/WebKit/ChangeLog	2017-09-01 18:54:50 UTC (rev 221489)
@@ -1,5 +1,43 @@
 2017-09-01  Alex Christensen  
 
+Replace WKUIDelegatePrivate's isPlayingMediaDidChange with KVO _isPlayingAudio on WKWebView
+https://bugs.webkit.org/show_bug.cgi?id=176212
+
+Reviewed by Tim Horton.
+
+Dan suggested this in bug 176203, I think it's a good idea,
+and I'll need to add more KVO properties soon anyways so I'd better learn how.
+Determining if audio playing changed is important for Safari, so WKPageUIClient's
+isPlayingAudioDidChange was correctly named but incorrectly fired if either audio
+or video playing changed and had you check if audio was playing, possibly too often.
+
+* UIProcess/API/APIUIClient.h:
+(API::UIClient::isPlayingMediaDidChange):
+* UIProcess/API/C/WKPage.cpp:
+(WKPageSetPageUIClient):
+* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+* UIProcess/API/Cocoa/WKWebView.mm:
+(-[WKWebView _isPlayingAudio]):
+* UIProcess/API/Cocoa/WKWebViewPrivate.h:
+* UIProcess/API/glib/WebKitUIClient.cpp:
+* UIProcess/Cocoa/UIDelegate.h:
+* UIProcess/Cocoa/UIDelegate.mm:
+(WebKit::UIDelegate::setDelegate):
+(WebKit::UIDelegate::UIClient::isPlayingMediaDidChange): Deleted.
+* UIProcess/Cocoa/WebViewImpl.h:
+* UIProcess/Cocoa/WebViewImpl.mm:
+(WebKit::WebViewImpl::isPlayingAudioWillChange):
+(WebKit::WebViewImpl::isPlayingAudioDidChange):
+* UIProcess/PageClient.h:
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::isPlayingMediaDidChange):
+* UIProcess/mac/PageClientImpl.h:
+* UIProcess/mac/PageClientImpl.mm:
+(WebKit::PageClientImpl::isPlayingAudioDidChange):
+(WebKit::PageClientImpl::isPlayingAudioWillChange):
+
+2017-09-01  Alex Christensen  
+
 

[webkit-changes] [221488] trunk

2017-09-01 Thread simon . fraser
Title: [221488] trunk








Revision 221488
Author simon.fra...@apple.com
Date 2017-09-01 11:49:00 -0700 (Fri, 01 Sep 2017)


Log Message
transformCanLikelyUseFastPath() can read off the end of a string
https://bugs.webkit.org/show_bug.cgi?id=176232
rdar://problem/33851237

Reviewed by Tim Horton.
Source/WebCore:

Code added in r220382 could read one byte past the end of the string when looking for the 'z'
of a rotateZ() function. The code was actually incorrect, testing for the 'z at i+6 after
already incrementing i by 6. This patch makes the code correctly detect rotateZ().

Also, rotate functions at the end of a string could be ignored because kShortestValidTransformStringLength
was too long, so set it to the length of "rotate(0)", the shortest transform function that we currently
fast-parse.

There's an implicit assumption in this code that chars is not indexed past i+kShortestValidTransformStringLength.
If the 'translate' path is taken, i is incremented by 9 (==kShortestValidTransformStringLength), but that's
OK because WTF::find() doesn't index into chars if i >= length.

Test: fast/css/transform-fast-paths.html

* css/parser/CSSParserFastPaths.cpp:
(WebCore::transformCanLikelyUseFastPath):

LayoutTests:

* fast/css/transform-fast-paths-expected.txt: Added.
* fast/css/transform-fast-paths.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp


Added Paths

trunk/LayoutTests/fast/css/transform-fast-paths-expected.txt
trunk/LayoutTests/fast/css/transform-fast-paths.html




Diff

Modified: trunk/LayoutTests/ChangeLog (221487 => 221488)

--- trunk/LayoutTests/ChangeLog	2017-09-01 18:48:27 UTC (rev 221487)
+++ trunk/LayoutTests/ChangeLog	2017-09-01 18:49:00 UTC (rev 221488)
@@ -1,3 +1,14 @@
+2017-09-01  Simon Fraser  
+
+transformCanLikelyUseFastPath() can read off the end of a string
+https://bugs.webkit.org/show_bug.cgi?id=176232
+rdar://problem/33851237
+
+Reviewed by Tim Horton.
+
+* fast/css/transform-fast-paths-expected.txt: Added.
+* fast/css/transform-fast-paths.html: Added.
+
 2017-09-01  Matt Lewis  
 
 Marked webrtc/datachannel/bufferedAmountLowThreshold.html as flaky on Mac WK1.


Added: trunk/LayoutTests/fast/css/transform-fast-paths-expected.txt (0 => 221488)

--- trunk/LayoutTests/fast/css/transform-fast-paths-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/css/transform-fast-paths-expected.txt	2017-09-01 18:49:00 UTC (rev 221488)
@@ -0,0 +1 @@
+Test test should not trigger any invalid memory accesses when running under ASan.


Added: trunk/LayoutTests/fast/css/transform-fast-paths.html (0 => 221488)

--- trunk/LayoutTests/fast/css/transform-fast-paths.html	(rev 0)
+++ trunk/LayoutTests/fast/css/transform-fast-paths.html	2017-09-01 18:49:00 UTC (rev 221488)
@@ -0,0 +1,19 @@
+
+
+
+Test test should not trigger any invalid memory accesses when running under ASan.
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+var heading = document.createElement("div");
+heading.style.setProperty("transform", "rotateZ(8deg)");
+heading.style.setProperty("transform", "rotate(0)");
+heading.style.setProperty("transform", "translate");
+heading.style.setProperty("transform", "translate(0px, 1px) rotate(0deg) translate(0px, 0px) rotate(0deg)");
+heading.style.setProperty("transform", "translate(0px, 1px) rotate(0deg) translate(0px, 0px) rotate(0)");
+heading.style.setProperty("transform", "translate(0px, 1px) rotate(0deg) translate(0px, 0px) rotate");
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (221487 => 221488)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 18:48:27 UTC (rev 221487)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 18:49:00 UTC (rev 221488)
@@ -1,3 +1,28 @@
+2017-09-01  Simon Fraser  
+
+transformCanLikelyUseFastPath() can read off the end of a string
+https://bugs.webkit.org/show_bug.cgi?id=176232
+rdar://problem/33851237
+
+Reviewed by Tim Horton.
+
+Code added in r220382 could read one byte past the end of the string when looking for the 'z'
+of a rotateZ() function. The code was actually incorrect, testing for the 'z at i+6 after
+already incrementing i by 6. This patch makes the code correctly detect rotateZ().
+
+Also, rotate functions at the end of a string could be ignored because kShortestValidTransformStringLength
+was too long, so set it to the length of "rotate(0)", the shortest transform function that we currently
+fast-parse.
+
+There's an implicit assumption in this code that chars is not indexed past i+kShortestValidTransformStringLength.
+If the 'translate' path is taken, i is incremented by 9 (==kShortestValidTransformStringLength), but that's
+

[webkit-changes] [221487] trunk/Tools

2017-09-01 Thread fpizlo
Title: [221487] trunk/Tools








Revision 221487
Author fpi...@apple.com
Date 2017-09-01 11:48:27 -0700 (Fri, 01 Sep 2017)


Log Message
WSL Rewriter should be an identity on things that aren't inside function bodies
https://bugs.webkit.org/show_bug.cgi?id=176208

Reviewed by Myles Maxfield.

Previously, if the Rewriter encountered a FunctionDef, StructType, NativeType, etc., then it
would either crash or try to rewrite them. That's unfortunate because we use the Rewriter to
rewrite struct and function bodies. If a function calls another function, then rewriting the
caller should not mean also rewriting the callee. Previously we "fixed" this by religiously
wrapping references to types with TypeDef and doing other such hacks. But that's subtly wrong.
It only worked because Rewriter wasn't rewriting TypeRef.type. I think that Rewriter has to
rewrite that in the long run because it may refer to another TypeRef, and it may be an
instantiation that is using types that themselves need to be rewritten.

* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitProtocolDecl.set throw):
* WebGPUShadingLanguageRI/NullType.js:
(NullType):
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitFuncDef):
(Rewriter.prototype.visitNativeFunc):
(Rewriter.prototype.visitNativeFuncInstance):
(Rewriter.prototype.visitNativeType):
(Rewriter.prototype.visitTypeDef):
(Rewriter.prototype.visitStructType):
(Rewriter.prototype.visitTypeVariable):
(Rewriter.prototype.visitConstexprTypeParameter):
(Rewriter.prototype.visitNativeTypeInstance):
(Rewriter.prototype.visitTypeRef):
* WebGPUShadingLanguageRI/Visitor.js:
(Visitor.prototype.visitNativeTypeInstance):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/WebGPUShadingLanguageRI/Checker.js
trunk/Tools/WebGPUShadingLanguageRI/NullType.js
trunk/Tools/WebGPUShadingLanguageRI/Rewriter.js
trunk/Tools/WebGPUShadingLanguageRI/Visitor.js




Diff

Modified: trunk/Tools/ChangeLog (221486 => 221487)

--- trunk/Tools/ChangeLog	2017-09-01 18:47:41 UTC (rev 221486)
+++ trunk/Tools/ChangeLog	2017-09-01 18:48:27 UTC (rev 221487)
@@ -1,3 +1,37 @@
+2017-09-01  Filip Pizlo  
+
+WSL Rewriter should be an identity on things that aren't inside function bodies
+https://bugs.webkit.org/show_bug.cgi?id=176208
+
+Reviewed by Myles Maxfield.
+
+Previously, if the Rewriter encountered a FunctionDef, StructType, NativeType, etc., then it
+would either crash or try to rewrite them. That's unfortunate because we use the Rewriter to
+rewrite struct and function bodies. If a function calls another function, then rewriting the
+caller should not mean also rewriting the callee. Previously we "fixed" this by religiously
+wrapping references to types with TypeDef and doing other such hacks. But that's subtly wrong.
+It only worked because Rewriter wasn't rewriting TypeRef.type. I think that Rewriter has to
+rewrite that in the long run because it may refer to another TypeRef, and it may be an
+instantiation that is using types that themselves need to be rewritten.
+
+* WebGPUShadingLanguageRI/Checker.js:
+(Checker.prototype.visitProtocolDecl.set throw):
+* WebGPUShadingLanguageRI/NullType.js:
+(NullType):
+* WebGPUShadingLanguageRI/Rewriter.js:
+(Rewriter.prototype.visitFuncDef):
+(Rewriter.prototype.visitNativeFunc):
+(Rewriter.prototype.visitNativeFuncInstance):
+(Rewriter.prototype.visitNativeType):
+(Rewriter.prototype.visitTypeDef):
+(Rewriter.prototype.visitStructType):
+(Rewriter.prototype.visitTypeVariable):
+(Rewriter.prototype.visitConstexprTypeParameter):
+(Rewriter.prototype.visitNativeTypeInstance):
+(Rewriter.prototype.visitTypeRef):
+* WebGPUShadingLanguageRI/Visitor.js:
+(Visitor.prototype.visitNativeTypeInstance):
+
 2017-09-01  Alex Christensen  
 
 Disable ObjC WebGL policy SPI on iOS


Modified: trunk/Tools/WebGPUShadingLanguageRI/Checker.js (221486 => 221487)

--- trunk/Tools/WebGPUShadingLanguageRI/Checker.js	2017-09-01 18:47:41 UTC (rev 221486)
+++ trunk/Tools/WebGPUShadingLanguageRI/Checker.js	2017-09-01 18:48:27 UTC (rev 221487)
@@ -129,7 +129,7 @@
 let rhsType = node.rhs.visit(this);
 if (!lhsType.equals(rhsType))
 throw new WTypeError(node.origin.originString, "Type mismatch in assignment: " + lhsType + " versus " + rhsType);
-node.type = TypeRef.wrap(lhsType);
+node.type = lhsType;
 return lhsType;
 }
 
@@ -138,7 +138,7 @@
 let type = node.ptr.visit(this).unifyNode;
 if (!type.isPtr)
 throw new WTypeError(node.origin.originString, "Type passed to dereference is not a pointer: " + type);
-node.type = TypeRef.wrap(type.elementType);
+node.type = type.elementType;
 

[webkit-changes] [221486] trunk

2017-09-01 Thread achristensen
Title: [221486] trunk








Revision 221486
Author achristen...@apple.com
Date 2017-09-01 11:47:41 -0700 (Fri, 01 Sep 2017)


Log Message
Disable ObjC WebGL policy SPI on iOS
https://bugs.webkit.org/show_bug.cgi?id=176233

Reviewed by Tim Horton.
Source/WebKit:


In r221465 I uploaded new SPI that is only needed on Mac with a beautiful test that only works on Mac.
Since it fails on iOS and is not needed on iOS, let's just disable it on iOS.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):

Tools:


* TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h
trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (221485 => 221486)

--- trunk/Source/WebKit/ChangeLog	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Source/WebKit/ChangeLog	2017-09-01 18:47:41 UTC (rev 221486)
@@ -1,3 +1,18 @@
+2017-09-01  Alex Christensen  
+
+Disable ObjC WebGL policy SPI on iOS
+https://bugs.webkit.org/show_bug.cgi?id=176233
+
+Reviewed by Tim Horton.
+
+In r221465 I uploaded new SPI that is only needed on Mac with a beautiful test that only works on Mac.
+Since it fails on iOS and is not needed on iOS, let's just disable it on iOS.
+
+* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
+* UIProcess/Cocoa/NavigationState.h:
+* UIProcess/Cocoa/NavigationState.mm:
+(WebKit::NavigationState::setNavigationDelegate):
+
 2017-09-01  Andy Estes  
 
 [CG] Upstream CoreGraphics-related WebKitSystemInterface functions


Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h (221485 => 221486)

--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h	2017-09-01 18:47:41 UTC (rev 221486)
@@ -33,11 +33,13 @@
 
 @class _WKWebsitePolicies;
 
+#if !TARGET_OS_IPHONE
 typedef NS_ENUM(NSInteger, _WKWebGLLoadPolicy) {
 _WKWebGLLoadPolicyBlockCreation,
 _WKWebGLLoadPolicyAllowCreation,
 _WKWebGLLoadPolicyPendingCreation,
-} WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+} WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+#endif
 
 static const WKNavigationActionPolicy _WKNavigationActionPolicyDownload = (WKNavigationActionPolicy)(WKNavigationActionPolicyAllow + 1);
 static const WKNavigationActionPolicy WK_API_AVAILABLE(macosx(10.11), ios(9.0)) _WKNavigationActionPolicyAllowWithoutTryingAppLink = (WKNavigationActionPolicy)(WKNavigationActionPolicyAllow + 2);
@@ -80,11 +82,11 @@
 - (void)_webView:(WKWebView *)webView didStartLoadForQuickLookDocumentInMainFrameWithFileName:(NSString *)fileName uti:(NSString *)uti;
 - (void)_webView:(WKWebView *)webView didFinishLoadForQuickLookDocumentInMainFrame:(NSData *)documentData;
 - (void)_webViewDidRequestPasswordForQuickLookDocument:(WKWebView *)webView WK_API_AVAILABLE(ios(WK_IOS_TBA));
+#else
+- (void)_webView:(WKWebView *)webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+- (void)_webView:(WKWebView *)webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA));
 #endif
 
-- (void)_webView:(WKWebView *)webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
-- (void)_webView:(WKWebView *)webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
-
 @end
 
 #endif


Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h (221485 => 221486)

--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h	2017-09-01 18:47:41 UTC (rev 221486)
@@ -116,7 +116,7 @@
 void didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData&) override;
 #endif
 
-#if ENABLE(WEBGL)
+#if ENABLE(WEBGL) && PLATFORM(MAC)
 void webGLLoadPolicy(WebPageProxy&, const WebCore::URL&, WTF::Function&& completionHandler) const final;
 void resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL&, WTF::Function&& completionHandler) const final;
 #endif
@@ -207,7 +207,7 @@
 bool webViewDidRequestPasswordForQuickLookDocument : 1;
 

[webkit-changes] [221485] trunk/Source

2017-09-01 Thread aestes
Title: [221485] trunk/Source








Revision 221485
Author aes...@apple.com
Date 2017-09-01 11:37:28 -0700 (Fri, 01 Sep 2017)


Log Message
[CG] Upstream CoreGraphics-related WebKitSystemInterface functions
https://bugs.webkit.org/show_bug.cgi?id=176200

Reviewed by Tim Horton.

Source/WebCore:

* platform/graphics/GraphicsContext.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::subsamplingLevelForScaleFactor):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::clipOut):
(WebCore::applyShadowOffsetWorkaroundIfNeeded):
* platform/graphics/cg/PatternCG.cpp:
(WebCore::Pattern::createPlatformPattern const):
* platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::GraphicsContext::focusRingColor):
(WebCore::drawFocusRingAtTime):
(WebCore::drawFocusRing):
(WebCore::drawFocusRingToContext):
(WebCore::drawFocusRingToContextAtTime):
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/PasteboardMac.mm:
(WebCore::flipImageSpec):
(WebCore::setDragImageImpl):
(WebCore::Pasteboard::setDragImage):
* platform/mac/PlatformEventFactoryMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::linenBackgroundColor):
* platform/mac/ThemeMac.mm:
(WebCore::drawCellFocusRingWithFrameAtTime):
(WebCore::drawCellFocusRing):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/mac/WebWindowAnimation.mm:
(flipRect):
(mainWindowServerConnectionID):
(setScaledFrameForWindow):
(-[WebWindowScaleAnimation setCurrentProgress:]):
(-[WebWindowFadeAnimation setCurrentProgress:]):

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/spi/cg/CoreGraphicsSPI.h:
* pal/spi/mac/HIServicesSPI.h:
* pal/spi/mac/NSGraphicsSPI.h: Copied from Source/WebCore/PAL/pal/spi/mac/HIServicesSPI.h.

Source/WebKit:

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess):
* UIProcess/mac/WindowServerConnection.h:
* UIProcess/mac/WindowServerConnection.mm:
(WebKit::registerOcclusionNotificationHandler):
(WebKit::WindowServerConnection::WindowServerConnection):
(WebKit::WindowServerConnection::applicationWindowModificationsStarted): Deleted.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKitLegacy/mac:

* Carbon/HIWebView.mm:
(-[NSWindowGraphicsContext _web_setGraphicsPort:]):
(overrideCGContext):
(restoreCGContext):
(Draw):
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(+[WebHostedNetscapePluginView initialize]):
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:
(WebKit::sendUserChangeNotifications):
* Plugins/WebNetscapePluginView.mm:
(+[WebNetscapePluginView initialize]):
(-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebView/WebFrame.mm:
(-[WebFrame _paintBehaviorForDestinationContext:]):
* WebView/WebFullScreenController.mm:
(setClipRectForWindow):
(-[WebFullScreenController finishedEnterFullScreenAnimation:]):
(-[WebFullScreenController finishedExitFullScreenAnimation:]):
(-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]):
(-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h
trunk/Source/WebCore/PAL/pal/spi/mac/HIServicesSPI.h
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/ImageSource.cpp
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
trunk/Source/WebCore/platform/graphics/cg/PatternCG.cpp
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm
trunk/Source/WebCore/platform/mac/PasteboardMac.mm
trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
trunk/Source/WebCore/platform/mac/ThemeMac.mm
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm
trunk/Source/WebCore/platform/mac/WebWindowAnimation.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm
trunk/Source/WebKit/UIProcess/mac/WindowServerConnection.h
trunk/Source/WebKit/UIProcess/mac/WindowServerConnection.mm
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
trunk/Source/WebKitLegacy/mac/Carbon/HIWebView.mm
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.h
trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm
trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebSystemInterface.mm
trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm

[webkit-changes] [221484] trunk/LayoutTests

2017-09-01 Thread jlewis3
Title: [221484] trunk/LayoutTests








Revision 221484
Author jlew...@apple.com
Date 2017-09-01 11:33:09 -0700 (Fri, 01 Sep 2017)


Log Message
Marked webrtc/datachannel/bufferedAmountLowThreshold.html as flaky on Mac WK1.
https://bugs.webkit.org/show_bug.cgi?id=172334

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac-wk1/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (221483 => 221484)

--- trunk/LayoutTests/ChangeLog	2017-09-01 18:16:16 UTC (rev 221483)
+++ trunk/LayoutTests/ChangeLog	2017-09-01 18:33:09 UTC (rev 221484)
@@ -1,3 +1,12 @@
+2017-09-01  Matt Lewis  
+
+Marked webrtc/datachannel/bufferedAmountLowThreshold.html as flaky on Mac WK1.
+https://bugs.webkit.org/show_bug.cgi?id=172334
+
+Unreviewed test gardening.
+
+* platform/mac-wk1/TestExpectations:
+
 2017-09-01  Chris Dumez  
 
 Implement FileSystemEntry.getParent()


Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (221483 => 221484)

--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2017-09-01 18:16:16 UTC (rev 221483)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2017-09-01 18:33:09 UTC (rev 221484)
@@ -398,3 +398,5 @@
 
 webkit.org/b/174218 svg/animations/smil-leak-list-property-instances.svg [ Pass Failure ]
 
+webkit.org/b/172334 webrtc/datachannel/bufferedAmountLowThreshold.html [ Pass Failure ]
+






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


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

2017-09-01 Thread commit-queue
Title: [221483] trunk/Source/WebCore








Revision 221483
Author commit-qu...@webkit.org
Date 2017-09-01 11:16:16 -0700 (Fri, 01 Sep 2017)


Log Message
Reject promises in case of internal CacheStorage engine errors.
https://bugs.webkit.org/show_bug.cgi?id=176194

Patch by Youenn Fablet  on 2017-09-01
Reviewed by Alex Christensen.

No new tests as this covers error cases that should not happen in regular cases.
Replacing lambdas that take no parameters to lambdas taking an optional error.
Reject promise if an error is found.

* Modules/cache/Cache.cpp:
(WebCore::Cache::doMatch):
(WebCore::Cache::matchAll):
(WebCore::Cache::keys):
(WebCore::Cache::retrieveRecords):
(WebCore::Cache::queryCache):
* Modules/cache/Cache.h:
* Modules/cache/CacheStorage.cpp:
(WebCore::CacheStorage::match):
(WebCore::CacheStorage::has):
(WebCore::CacheStorage::retrieveCaches):
(WebCore::CacheStorage::open):
(WebCore::CacheStorage::remove):
(WebCore::CacheStorage::keys):
* Modules/cache/CacheStorage.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/cache/Cache.cpp
trunk/Source/WebCore/Modules/cache/Cache.h
trunk/Source/WebCore/Modules/cache/CacheStorage.cpp
trunk/Source/WebCore/Modules/cache/CacheStorage.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (221482 => 221483)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 17:53:40 UTC (rev 221482)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 18:16:16 UTC (rev 221483)
@@ -1,3 +1,30 @@
+2017-09-01  Youenn Fablet  
+
+Reject promises in case of internal CacheStorage engine errors.
+https://bugs.webkit.org/show_bug.cgi?id=176194
+
+Reviewed by Alex Christensen.
+
+No new tests as this covers error cases that should not happen in regular cases.
+Replacing lambdas that take no parameters to lambdas taking an optional error.
+Reject promise if an error is found.
+
+* Modules/cache/Cache.cpp:
+(WebCore::Cache::doMatch):
+(WebCore::Cache::matchAll):
+(WebCore::Cache::keys):
+(WebCore::Cache::retrieveRecords):
+(WebCore::Cache::queryCache):
+* Modules/cache/Cache.h:
+* Modules/cache/CacheStorage.cpp:
+(WebCore::CacheStorage::match):
+(WebCore::CacheStorage::has):
+(WebCore::CacheStorage::retrieveCaches):
+(WebCore::CacheStorage::open):
+(WebCore::CacheStorage::remove):
+(WebCore::CacheStorage::keys):
+* Modules/cache/CacheStorage.h:
+
 2017-09-01  Zan Dobersek  
 
 Unreviewed WPE build fix after r221439.


Modified: trunk/Source/WebCore/Modules/cache/Cache.cpp (221482 => 221483)

--- trunk/Source/WebCore/Modules/cache/Cache.cpp	2017-09-01 17:53:40 UTC (rev 221482)
+++ trunk/Source/WebCore/Modules/cache/Cache.cpp	2017-09-01 18:16:16 UTC (rev 221483)
@@ -55,12 +55,16 @@
 
 void Cache::match(RequestInfo&& info, CacheQueryOptions&& options, Ref&& promise)
 {
-doMatch(WTFMove(info), WTFMove(options), [promise = WTFMove(promise)](FetchResponse* result) mutable {
-if (!result) {
+doMatch(WTFMove(info), WTFMove(options), [promise = WTFMove(promise)](ExceptionOr&& result) mutable {
+if (result.hasException()) {
+promise->reject(result.releaseException());
+return;
+}
+if (!result.returnValue()) {
 promise->resolve();
 return;
 }
-promise->resolve(*result);
+promise->resolve(*result.returnValue());
 });
 }
 
@@ -76,12 +80,16 @@
 }
 auto request = requestOrException.releaseReturnValue();
 
-queryCache(request.get(), WTFMove(options), [callback = WTFMove(callback)](const Vector& records) mutable {
-if (records.isEmpty()) {
+queryCache(request.get(), WTFMove(options), [callback = WTFMove(callback)](ExceptionOr&& result) mutable {
+if (result.hasException()) {
+callback(result.releaseException());
+return;
+}
+if (result.returnValue().isEmpty()) {
 callback(nullptr);
 return;
 }
-callback(records[0].response->cloneForJS().ptr());
+callback(result.returnValue()[0].response->cloneForJS().ptr());
 });
 }
 
@@ -101,7 +109,11 @@
 }
 
 if (!request) {
-retrieveRecords([this, promise = WTFMove(promise)]() mutable {
+retrieveRecords([this, promise = WTFMove(promise)](std::optional&& exception) mutable {
+if (exception) {
+promise.reject(WTFMove(exception.value()));
+return;
+}
 Vector responses;
 responses.reserveInitialCapacity(m_records.size());
 for (auto& record : m_records)
@@ -110,7 +122,12 @@
 });
 return;
 }
-queryCache(request.releaseNonNull(), WTFMove(options), [promise = WTFMove(promise)](const Vector& records) 

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

2017-09-01 Thread zandobersek
Title: [221482] trunk/Source/WebCore








Revision 221482
Author zandober...@gmail.com
Date 2017-09-01 10:53:40 -0700 (Fri, 01 Sep 2017)


Log Message
Unreviewed WPE build fix after r221439.

* html/canvas/WebGL2RenderingContext.cpp: Add the HeapInlines.h
header include in order to properly inline a Heap::vm() call.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (221481 => 221482)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 17:37:00 UTC (rev 221481)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 17:53:40 UTC (rev 221482)
@@ -1,3 +1,10 @@
+2017-09-01  Zan Dobersek  
+
+Unreviewed WPE build fix after r221439.
+
+* html/canvas/WebGL2RenderingContext.cpp: Add the HeapInlines.h
+header include in order to properly inline a Heap::vm() call.
+
 2017-09-01  Chris Dumez  
 
 Implement FileSystemEntry.getParent()


Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (221481 => 221482)

--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2017-09-01 17:37:00 UTC (rev 221481)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2017-09-01 17:53:40 UTC (rev 221482)
@@ -54,6 +54,7 @@
 #include "WebGLTransformFeedback.h"
 #include "WebGLVertexArrayObject.h"
 #include <_javascript_Core/GenericTypedArrayViewInlines.h>
+#include <_javascript_Core/HeapInlines.h>
 #include <_javascript_Core/JSGenericTypedArrayViewInlines.h>
 
 namespace WebCore {






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


[webkit-changes] [221481] trunk

2017-09-01 Thread cdumez
Title: [221481] trunk








Revision 221481
Author cdu...@apple.com
Date 2017-09-01 10:37:00 -0700 (Fri, 01 Sep 2017)


Log Message
Implement FileSystemEntry.getParent()
https://bugs.webkit.org/show_bug.cgi?id=176165


Reviewed by Andreas Kling.

Source/WebCore:

Implement FileSystemEntry.getParent():
- https://wicg.github.io/entries-api/#dom-filesystementry-getparent

Tests: editing/pasteboard/datatransfer-items-drop-getParent-root.html
   editing/pasteboard/datatransfer-items-drop-getParent.html
   editing/pasteboard/datatransfer-items-drop-getParent2.html

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::toFileSystemEntries):
Take a ScriptExecutionContext now that FileSystemEntry is an ActiveDOMObject.

(WebCore::isAbsoluteVirtualPath):
Add utility function to determine if a virtual path is absolute:
- https://wicg.github.io/entries-api/#absolute-path

(WebCore::DOMFileSystem::root):
Take a ScriptExecutionContext now that FileSystemEntry is an ActiveDOMObject.

(WebCore::DOMFileSystem::fileAsEntry):
Take a ScriptExecutionContext now that FileSystemEntry is an ActiveDOMObject.

(WebCore::resolveRelativePath):
Add implementation for:
- https://wicg.github.io/entries-api/#resolve-a-relative-path

(WebCore::DOMFileSystem::listDirectory):
Take a ScriptExecutionContext now that FileSystemEntry is an ActiveDOMObject.

(WebCore::DOMFileSystem::getParent):
Add implementation of getParent() as per:
- https://wicg.github.io/entries-api/#dom-filesystementry-getparent

* Modules/entriesapi/DOMFileSystem.h:
(WebCore::DOMFileSystem::createEntryForFile):
* Modules/entriesapi/DOMFileSystem.idl:
* Modules/entriesapi/FileSystemDirectoryEntry.cpp:
(WebCore::FileSystemDirectoryEntry::FileSystemDirectoryEntry):
* Modules/entriesapi/FileSystemDirectoryEntry.h:
* Modules/entriesapi/FileSystemDirectoryReader.cpp:
(WebCore::FileSystemDirectoryReader::readEntries):
Take a ScriptExecutionContext now that FileSystemEntry is an ActiveDOMObject.

* Modules/entriesapi/FileSystemEntry.cpp:
(WebCore::FileSystemEntry::FileSystemEntry):
(WebCore::FileSystemEntry::activeDOMObjectName const):
(WebCore::FileSystemEntry::canSuspendForDocumentSuspension const):
(WebCore::FileSystemEntry::getParent):
* Modules/entriesapi/FileSystemEntry.h:
* Modules/entriesapi/FileSystemEntry.idl:
- Add implementation of FileSystemEntry.getParent() which relies on
  DOMFileSystem::getParent()
- Make FileSystemEntry an ActiveDOMObject as getParent() is an asynchronous
  operation which causes delayed JS execution.

* Modules/entriesapi/FileSystemFileEntry.cpp:
(WebCore::FileSystemFileEntry::FileSystemFileEntry):
* Modules/entriesapi/FileSystemFileEntry.h:
* dom/DataTransferItem.cpp:
(WebCore::DataTransferItem::getAsEntry const):
* dom/DataTransferItem.h:
* dom/DataTransferItem.idl:
Take a ScriptExecutionContext now that FileSystemEntry is an ActiveDOMObject.

LayoutTests:

* editing/pasteboard/datatransfer-items-drop-getParent-expected.txt: Added.
* editing/pasteboard/datatransfer-items-drop-getParent-root-expected.txt: Added.
* editing/pasteboard/datatransfer-items-drop-getParent-root.html: Added.
* editing/pasteboard/datatransfer-items-drop-getParent.html: Added.
* editing/pasteboard/datatransfer-items-drop-getParent2-expected.txt: Added.
* editing/pasteboard/datatransfer-items-drop-getParent2.html: Added.
Add layout test coverage for FileSystemEntry.getParent().

* http/wpt/entries-api/interfaces-expected.txt:
Rebaseline test now that one more check is passing.

* platform/wk2/TestExpectations:
Skip new tests on WK2 since they rely on beginDragWithFiles.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/wpt/entries-api/interfaces-expected.txt
trunk/LayoutTests/platform/wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp
trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.h
trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.idl
trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp
trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.h
trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp
trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.cpp
trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.h
trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.idl
trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.cpp
trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.h
trunk/Source/WebCore/dom/DataTransferItem.cpp
trunk/Source/WebCore/dom/DataTransferItem.h
trunk/Source/WebCore/dom/DataTransferItem.idl


Added Paths

trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getParent-expected.txt
trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getParent-root-expected.txt
trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getParent-root.html
trunk/LayoutTests/editing/pasteboard/datatransfer-items-drop-getParent.html

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

2017-09-01 Thread commit-queue
Title: [221480] trunk/Source/WebCore








Revision 221480
Author commit-qu...@webkit.org
Date 2017-09-01 10:17:33 -0700 (Fri, 01 Sep 2017)


Log Message
Ensure RenderStyle and SameSizeAsRenderStyle have the same size
https://bugs.webkit.org/show_bug.cgi?id=176210

Patch by Yoshiaki Jitsukawa  on 2017-09-01
Reviewed by Daniel Bates.

SameSizeAsRenderStyle::m_nonInheritedFlags requires a 64 bit alignment,
which currently produces an extra 32 bit padding with 32 bit build.

* rendering/style/RenderStyle.cpp:
Make m_nonInheritedFlags 32 bit aligned and restore the size check.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/style/RenderStyle.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (221479 => 221480)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 16:05:42 UTC (rev 221479)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 17:17:33 UTC (rev 221480)
@@ -1,3 +1,16 @@
+2017-09-01  Yoshiaki Jitsukawa  
+
+Ensure RenderStyle and SameSizeAsRenderStyle have the same size
+https://bugs.webkit.org/show_bug.cgi?id=176210
+
+Reviewed by Daniel Bates.
+
+SameSizeAsRenderStyle::m_nonInheritedFlags requires a 64 bit alignment,
+which currently produces an extra 32 bit padding with 32 bit build.
+
+* rendering/style/RenderStyle.cpp:
+Make m_nonInheritedFlags 32 bit aligned and restore the size check.
+
 2017-09-01  Per Arne Vollan  
 
 [Win] Compile error, 'Cache' is not declared.


Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (221479 => 221480)

--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2017-09-01 16:05:42 UTC (rev 221479)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2017-09-01 17:17:33 UTC (rev 221480)
@@ -74,7 +74,7 @@
 } m_inheritedFlags;
 
 struct NonInheritedFlags {
-uint64_t m_bitfields;
+unsigned m_bitfields[2];
 } m_nonInheritedFlags;
 #if !ASSERT_DISABLED || ENABLE(SECURITY_ASSERTIONS)
 bool deletionCheck;
@@ -81,7 +81,7 @@
 #endif
 };
 
-static_assert(sizeof(RenderStyle) <= sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
+static_assert(sizeof(RenderStyle) == sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
 
 RenderStyle& RenderStyle::defaultStyle()
 {






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


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

2017-09-01 Thread utatane . tea
Title: [221479] trunk/Source/_javascript_Core








Revision 221479
Author utatane@gmail.com
Date 2017-09-01 09:05:42 -0700 (Fri, 01 Sep 2017)


Log Message
[FTL] FTL allocation for async Function is incorrect
https://bugs.webkit.org/show_bug.cgi?id=176214

Reviewed by Saam Barati.

In FTL, allocating async function / async generator function was incorrectly using
JSFunction logic. While it is not observable right now since sizeof(JSFunction) == sizeof(JSAsyncFunction),
but it is a bug.

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

Modified Paths

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




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (221478 => 221479)

--- trunk/Source/_javascript_Core/ChangeLog	2017-09-01 15:08:01 UTC (rev 221478)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-09-01 16:05:42 UTC (rev 221479)
@@ -1,3 +1,17 @@
+2017-09-01  Yusuke Suzuki  
+
+[FTL] FTL allocation for async Function is incorrect
+https://bugs.webkit.org/show_bug.cgi?id=176214
+
+Reviewed by Saam Barati.
+
+In FTL, allocating async function / async generator function was incorrectly using
+JSFunction logic. While it is not observable right now since sizeof(JSFunction) == sizeof(JSAsyncFunction),
+but it is a bug.
+
+* ftl/FTLLowerDFGToB3.cpp:
+(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
+
 2017-08-31  Yusuke Suzuki  
 
 [JSC] Fix "name" and "length" of Proxy revoke function


Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (221478 => 221479)

--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2017-09-01 15:08:01 UTC (rev 221478)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2017-09-01 16:05:42 UTC (rev 221479)
@@ -70,6 +70,8 @@
 #include "JITMulGenerator.h"
 #include "JITRightShiftGenerator.h"
 #include "JITSubGenerator.h"
+#include "JSAsyncFunction.h"
+#include "JSAsyncGeneratorFunction.h"
 #include "JSCInlines.h"
 #include "JSGeneratorFunction.h"
 #include "JSLexicalEnvironment.h"
@@ -4356,7 +4358,7 @@
 ASSERT(m_node->op() == NewFunction || m_node->op() == NewGeneratorFunction || m_node->op() == NewAsyncGeneratorFunction || m_node->op() == NewAsyncFunction);
 bool isGeneratorFunction = m_node->op() == NewGeneratorFunction;
 bool isAsyncFunction = m_node->op() == NewAsyncFunction;
-bool isAsynGeneratorFunction =  m_node->op() == NewAsyncGeneratorFunction;
+bool isAsyncGeneratorFunction =  m_node->op() == NewAsyncGeneratorFunction;
 
 LValue scope = lowCell(m_node->child1());
 
@@ -4365,7 +4367,7 @@
 LValue callResult =
 isGeneratorFunction ? vmCall(Int64, m_out.operation(operationNewGeneratorFunction), m_callFrame, scope, weakPointer(executable)) :
 isAsyncFunction ? vmCall(Int64, m_out.operation(operationNewAsyncFunction), m_callFrame, scope, weakPointer(executable)) :
-isAsynGeneratorFunction ? vmCall(Int64, m_out.operation(operationNewAsyncGeneratorFunction), m_callFrame, scope, weakPointer(executable)) :
+isAsyncGeneratorFunction ? vmCall(Int64, m_out.operation(operationNewAsyncGeneratorFunction), m_callFrame, scope, weakPointer(executable)) :
 vmCall(Int64, m_out.operation(operationNewFunction), m_callFrame, scope, weakPointer(executable));
 setJSValue(callResult);
 return;
@@ -4374,7 +4376,7 @@
 RegisteredStructure structure = m_graph.registerStructure(
 isGeneratorFunction ? m_graph.globalObjectFor(m_node->origin.semantic)->generatorFunctionStructure() :
 isAsyncFunction ? m_graph.globalObjectFor(m_node->origin.semantic)->asyncFunctionStructure() :
-isAsynGeneratorFunction ? m_graph.globalObjectFor(m_node->origin.semantic)->asyncGeneratorFunctionStructure() :
+isAsyncGeneratorFunction ? m_graph.globalObjectFor(m_node->origin.semantic)->asyncGeneratorFunctionStructure() :
 m_graph.globalObjectFor(m_node->origin.semantic)->functionStructure());
 
 LBasicBlock slowPath = m_out.newBlock();
@@ -4384,6 +4386,8 @@
 
 LValue fastObject =
 isGeneratorFunction ? allocateObject(structure, m_out.intPtrZero, slowPath) :
+isAsyncFunction ? allocateObject(structure, m_out.intPtrZero, slowPath) :
+isAsyncGeneratorFunction ? allocateObject(structure, m_out.intPtrZero, slowPath) :
 allocateObject(structure, m_out.intPtrZero, slowPath);
 
 
@@ -4405,20 +4409,15 @@
 VM& vm = this->vm();
 LValue callResult = lazySlowPath(
 [=, ] (const Vector& locations) -> RefPtr {
-if (isGeneratorFunction) {
-return createLazyCallGenerator(vm,
-

[webkit-changes] [221478] trunk/Source

2017-09-01 Thread pvollan
Title: [221478] trunk/Source








Revision 221478
Author pvol...@apple.com
Date 2017-09-01 08:08:01 -0700 (Fri, 01 Sep 2017)


Log Message
[Win] Compile error, 'Cache' is not declared.
https://bugs.webkit.org/show_bug.cgi?id=176062

Reviewed by Youenn Fablet.

Rename DOMCache to DOMCacheEngine.

Source/WebCore:

No new tests, covered by existing tests.

* Modules/cache/Cache.cpp:
(WebCore::Cache::addAll):
(WebCore::Cache::put):
(WebCore::queryCacheMatch):
(WebCore::Cache::batchDeleteOperation):
(WebCore::toConnectionRecord):
(WebCore::Cache::batchPutOperation):
* Modules/cache/Cache.h:
* Modules/cache/CacheStorage.cpp:
(WebCore::CacheStorage::open):
(WebCore::CacheStorage::remove):
* Modules/cache/CacheStorageConnection.cpp:
* Modules/cache/CacheStorageConnection.h:
(WebCore::CacheStorageConnection::clearMemoryRepresentation):
(WebCore::CacheStorageConnection::openCompleted):
(WebCore::CacheStorageConnection::removeCompleted):
(WebCore::CacheStorageConnection::doOpen):
(WebCore::CacheStorageConnection::doRemove):
(WebCore::CacheStorageConnection::doBatchDeleteOperation):
(WebCore::CacheStorageConnection::doBatchPutOperation):
* Modules/cache/DOMCache.cpp: Removed.
* Modules/cache/DOMCache.h: Removed.
* Modules/cache/DOMCacheEngine.cpp: Copied from Source/WebCore/Modules/cache/DOMCache.cpp.
(WebCore::DOMCacheEngine::isolatedResponseBody):
(WebCore::DOMCacheEngine::copyResponseBody):
(WebCore::DOMCache::errorToException): Deleted.
(WebCore::DOMCache::queryCacheMatch): Deleted.
(WebCore::DOMCache::isolatedResponseBody): Deleted.
(WebCore::DOMCache::copyResponseBody): Deleted.
(WebCore::DOMCache::Record::copy const): Deleted.
* Modules/cache/DOMCacheEngine.h: Copied from Source/WebCore/Modules/cache/DOMCache.h.
* Modules/cache/WorkerCacheStorageConnection.cpp:
* Modules/cache/WorkerCacheStorageConnection.h:
* WebCore.xcodeproj/project.pbxproj:
* testing/Internals.cpp:
(WebCore::Internals::clearCacheStorageMemoryRepresentation):

Source/WebKit:

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::queryCache):
(WebKit::CacheStorage::Engine::writeFile):
* NetworkProcess/cache/CacheStorageEngine.h:
* NetworkProcess/cache/CacheStorageEngineCache.h:
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::initialize):
* NetworkProcess/cache/CacheStorageEngineCaches.h:
* NetworkProcess/cache/CacheStorageEngineConnection.cpp:
* NetworkProcess/cache/CacheStorageEngineConnection.h:
* NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder::decode): Deleted.
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
* WebProcess/Cache/WebCacheStorageConnection.cpp:
* WebProcess/Cache/WebCacheStorageConnection.h:
* WebProcess/Cache/WebCacheStorageConnection.messages.in:

Modified Paths

trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/cache/Cache.cpp
trunk/Source/WebCore/Modules/cache/Cache.h
trunk/Source/WebCore/Modules/cache/CacheStorage.cpp
trunk/Source/WebCore/Modules/cache/CacheStorageConnection.cpp
trunk/Source/WebCore/Modules/cache/CacheStorageConnection.h
trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp
trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.h
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.h
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.h
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.h
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.cpp
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.h
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.messages.in
trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h
trunk/Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp
trunk/Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.h
trunk/Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.messages.in


Added Paths

trunk/Source/WebCore/Modules/cache/DOMCacheEngine.cpp
trunk/Source/WebCore/Modules/cache/DOMCacheEngine.h


Removed Paths

trunk/Source/WebCore/Modules/cache/DOMCache.cpp
trunk/Source/WebCore/Modules/cache/DOMCache.h




Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (221477 => 221478)

--- trunk/Source/WebCore/CMakeLists.txt	2017-09-01 12:44:06 UTC (rev 221477)
+++ 

[webkit-changes] [221477] trunk/LayoutTests

2017-09-01 Thread commit-queue
Title: [221477] trunk/LayoutTests








Revision 221477
Author commit-qu...@webkit.org
Date 2017-09-01 05:44:06 -0700 (Fri, 01 Sep 2017)


Log Message
[GTK] Mark audio-mpeg-supported.html as passing.
https://bugs.webkit.org/show_bug.cgi?id=131535

Unreviewed test gardening.

The last time it intermittently timed out was on r194436.
(It also timed out between r200951 and r201016, but that was consistent
and unrelated.)

Patch by Ms2ger  on 2017-09-01

* platform/gtk/TestExpectations:

Modified Paths

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




Diff

Modified: trunk/LayoutTests/ChangeLog (221476 => 221477)

--- trunk/LayoutTests/ChangeLog	2017-09-01 11:47:45 UTC (rev 221476)
+++ trunk/LayoutTests/ChangeLog	2017-09-01 12:44:06 UTC (rev 221477)
@@ -1,5 +1,18 @@
 2017-09-01  Ms2ger  
 
+[GTK] Mark audio-mpeg-supported.html as passing.
+https://bugs.webkit.org/show_bug.cgi?id=131535
+
+Unreviewed test gardening.
+
+The last time it intermittently timed out was on r194436.
+(It also timed out between r200951 and r201016, but that was consistent
+and unrelated.)
+
+* platform/gtk/TestExpectations:
+
+2017-09-01  Ms2ger  
+
 Mark media-ended.html as passing.
 https://bugs.webkit.org/show_bug.cgi?id=131534
 


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (221476 => 221477)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-09-01 11:47:45 UTC (rev 221476)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-09-01 12:44:06 UTC (rev 221477)
@@ -1538,7 +1538,6 @@
 Bug(GTK) fast/writing-mode/japanese-ruby-vertical-rl.html [ Failure Pass ]
 Bug(GTK) credentials/idlharness.html [ Failure Pass ]
 webkit.org/b/131533 media/track/track-remove-active-cue-crash.html [ Timeout Pass ]
-webkit.org/b/131535 media/audio-mpeg-supported.html [ Timeout Pass ]
 
 webkit.org/b/131934 fast/dom/Window/mozilla-focus-blur.html [ Failure Timeout Pass ]
 






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


[webkit-changes] [221476] trunk/LayoutTests

2017-09-01 Thread commit-queue
Title: [221476] trunk/LayoutTests








Revision 221476
Author commit-qu...@webkit.org
Date 2017-09-01 04:47:45 -0700 (Fri, 01 Sep 2017)


Log Message
Mark media-ended.html as passing.
https://bugs.webkit.org/show_bug.cgi?id=131534

Unreviewed test gardening.

The test needs to run through the entire audio file twice, so it will
take several seconds by design. GTK used to have a shorter timeout,
which was extended in r218270. The test hasn't timed out since.

Patch by Ms2ger  on 2017-09-01

* platform/gtk/TestExpectations:

Modified Paths

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




Diff

Modified: trunk/LayoutTests/ChangeLog (221475 => 221476)

--- trunk/LayoutTests/ChangeLog	2017-09-01 06:40:55 UTC (rev 221475)
+++ trunk/LayoutTests/ChangeLog	2017-09-01 11:47:45 UTC (rev 221476)
@@ -1,3 +1,16 @@
+2017-09-01  Ms2ger  
+
+Mark media-ended.html as passing.
+https://bugs.webkit.org/show_bug.cgi?id=131534
+
+Unreviewed test gardening.
+
+The test needs to run through the entire audio file twice, so it will
+take several seconds by design. GTK used to have a shorter timeout,
+which was extended in r218270. The test hasn't timed out since.
+
+* platform/gtk/TestExpectations:
+
 2017-08-31  Sam Weinig  
 
 Implement DOMMatrix2DInit for setTransform()/addPath()


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (221475 => 221476)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-09-01 06:40:55 UTC (rev 221475)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-09-01 11:47:45 UTC (rev 221476)
@@ -1538,7 +1538,6 @@
 Bug(GTK) fast/writing-mode/japanese-ruby-vertical-rl.html [ Failure Pass ]
 Bug(GTK) credentials/idlharness.html [ Failure Pass ]
 webkit.org/b/131533 media/track/track-remove-active-cue-crash.html [ Timeout Pass ]
-webkit.org/b/131534 media/media-ended.html [ Timeout Pass ]
 webkit.org/b/131535 media/audio-mpeg-supported.html [ Timeout Pass ]
 
 webkit.org/b/131934 fast/dom/Window/mozilla-focus-blur.html [ Failure Timeout Pass ]






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


[webkit-changes] [221475] trunk

2017-09-01 Thread utatane . tea
Title: [221475] trunk








Revision 221475
Author utatane@gmail.com
Date 2017-08-31 23:40:55 -0700 (Thu, 31 Aug 2017)


Log Message
[JSC] Fix "name" and "length" of Proxy revoke function
https://bugs.webkit.org/show_bug.cgi?id=176155

Reviewed by Mark Lam.

JSTests:

* test262.yaml:

Source/_javascript_Core:

ProxyRevoke's length should be configurable. And it does not have
its own name. We add NameVisibility enum to InternalFunction to
control visibility of the name.

* runtime/InternalFunction.cpp:
(JSC::InternalFunction::finishCreation):
* runtime/InternalFunction.h:
* runtime/ProxyRevoke.cpp:
(JSC::ProxyRevoke::finishCreation):

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/test262.yaml
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/InternalFunction.cpp
trunk/Source/_javascript_Core/runtime/InternalFunction.h
trunk/Source/_javascript_Core/runtime/ProxyRevoke.cpp




Diff

Modified: trunk/JSTests/ChangeLog (221474 => 221475)

--- trunk/JSTests/ChangeLog	2017-09-01 06:36:32 UTC (rev 221474)
+++ trunk/JSTests/ChangeLog	2017-09-01 06:40:55 UTC (rev 221475)
@@ -1,3 +1,12 @@
+2017-08-31  Yusuke Suzuki  
+
+[JSC] Fix "name" and "length" of Proxy revoke function
+https://bugs.webkit.org/show_bug.cgi?id=176155
+
+Reviewed by Mark Lam.
+
+* test262.yaml:
+
 2017-08-31  Saam Barati  
 
 Graph::methodOfGettingAValueProfileFor compares NodeOrigin instead of the semantic CodeOrigin


Modified: trunk/JSTests/test262.yaml (221474 => 221475)

--- trunk/JSTests/test262.yaml	2017-09-01 06:36:32 UTC (rev 221474)
+++ trunk/JSTests/test262.yaml	2017-09-01 06:40:55 UTC (rev 221475)
@@ -36468,13 +36468,13 @@
 - path: test262/test/built-ins/Proxy/revocable/revocation-function-extensible.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Proxy/revocable/revocation-function-length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/Proxy/revocable/revocation-function-length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/Proxy/revocable/revocation-function-name.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Proxy/revocable/revocation-function-name.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Proxy/revocable/revocation-function-nonconstructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Proxy/revocable/revocation-function-nonconstructor.js


Modified: trunk/Source/_javascript_Core/ChangeLog (221474 => 221475)

--- trunk/Source/_javascript_Core/ChangeLog	2017-09-01 06:36:32 UTC (rev 221474)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-09-01 06:40:55 UTC (rev 221475)
@@ -1,3 +1,20 @@
+2017-08-31  Yusuke Suzuki  
+
+[JSC] Fix "name" and "length" of Proxy revoke function
+https://bugs.webkit.org/show_bug.cgi?id=176155
+
+Reviewed by Mark Lam.
+
+ProxyRevoke's length should be configurable. And it does not have
+its own name. We add NameVisibility enum to InternalFunction to
+control visibility of the name.
+
+* runtime/InternalFunction.cpp:
+(JSC::InternalFunction::finishCreation):
+* runtime/InternalFunction.h:
+* runtime/ProxyRevoke.cpp:
+(JSC::ProxyRevoke::finishCreation):
+
 2017-08-31  Saam Barati  
 
 Throwing an exception in the DFG/FTL should not cause a jettison


Modified: trunk/Source/_javascript_Core/runtime/InternalFunction.cpp (221474 => 221475)

--- trunk/Source/_javascript_Core/runtime/InternalFunction.cpp	2017-09-01 06:36:32 UTC (rev 221474)
+++ trunk/Source/_javascript_Core/runtime/InternalFunction.cpp	2017-09-01 06:40:55 UTC (rev 221475)
@@ -41,7 +41,7 @@
 RELEASE_ASSERT(!isLargeAllocation());
 }
 
-void InternalFunction::finishCreation(VM& vm, 

[webkit-changes] [221474] trunk/Tools

2017-09-01 Thread carlosgc
Title: [221474] trunk/Tools








Revision 221474
Author carlo...@webkit.org
Date 2017-08-31 23:36:32 -0700 (Thu, 31 Aug 2017)


Log Message
[GTK] Improve the way unit test are run and the results reported
https://bugs.webkit.org/show_bug.cgi?id=176104

Reviewed by Carlos Alberto Lopez Perez.

There are several issues with the way unit tests are run by run-gtk-tests and also with the way results are
reported:

 - The results summary only mentions the test binaries, not the actual test cases, so you always have to scroll
   up to find the actual test cases failing.
 - The number of reported failures is the number of test binaries that failed, so if a new test case fails for
   the same binary in a new revision, we won't notice it just looking at the number of failures.
 - We show detailed information about skipped test in the results summary, which is just noise.
 - In the case of glib tests, when a test case times out, we finish the test suite, instead of continuing with the
   rest of the test cases like we do for normal failures or crashes. If a new test case fails after a test case that
   timed out we will not notice it until we fix or skip the test cases timing out.
 - In the case of glib tests, the timeout is applied to the whole suite, instead of per test case, we have a hack
   to make it longer only for that. It has worked so far, but it doesn't scale, and it's an ugly hack.
 - It's not currently possible to detect flaky tests, because again, we know the binaries/suites that failed but
   not the actual test cases.

This patch fixes all these issues and makes it possible to add support for flaky tests in a follow up patch.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunGtkAPITests.commandComplete): Update the RunGtkAPITests step to parse the new output.
* Scripts/run-gtk-tests:
(TestRunner._start_timeout): Helper to start the timeout if needed.
(TestRunner._start_timeout._alarm_handler): Raise timeout exception.
(TestRunner._stop_timeout): Helper to stop the timeout if needed.
(TestRunner._waitpid): Merged waitpid and return_code_from_exit_status.
(TestRunner._run_test_glib): Do not double the timeout anymore, we now start/stop the timeout for every test
case. Return a dictionary where keys are test cases and values the results only in case of failures.
(TestRunner._run_test_glib.parse_line): Update the parser to also detect test cases and the results.
(TestRunner._run_test_glib.parse_line.set_test_result): Helper to set the result of a test case.
(TestRunner._run_google_test): Return a dictionary where key is the test case and value is the result only in
case of failure.
(TestRunner._run_google_test_suite): Updated now that _run_google_test returns a dictionary.
(TestRunner.run_tests): Handle the results dictionary and show the results with information about test cases
failing and grouped by test binaries.

Modified Paths

trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
trunk/Tools/ChangeLog
trunk/Tools/Scripts/run-gtk-tests




Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg (221473 => 221474)

--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg	2017-09-01 06:00:33 UTC (rev 221473)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg	2017-09-01 06:36:32 UTC (rev 221474)
@@ -658,28 +658,23 @@
 self.skippedTests = 0
 self.statusLine = []
 
-foundItems = re.findall("Tests failed \((\d+)\):", logText)
+foundItems = re.findall("Unexpected failures \((\d+)\):", logText)
 if (foundItems):
 self.incorrectTests = int(foundItems[0])
 
-foundItems = re.findall("Tests that crashed \((\d+)\):", logText)
+foundItems = re.findall("Unexpected crashes \((\d+)\):", logText)
 if (foundItems):
 self.crashedTests = int(foundItems[0])
 
-foundItems = re.findall("Tests that timed out \((\d+)\):", logText)
+foundItems = re.findall("Unexpected timeouts \((\d+)\):", logText)
 if (foundItems):
 self.timedOutTests = int(foundItems[0])
 
-foundItems = re.findall("Tests skipped \((\d+)\):", logText)
-if (foundItems):
-self.skippedTests = int(foundItems[0])
-
 self.totalFailedTests = self.incorrectTests + self.crashedTests + self.timedOutTests
 
 if self.totalFailedTests > 0:
 self.statusLine = [
-"%d API tests failed, %d crashed, %d timed out, %d skipped" %
-(self.incorrectTests, self.crashedTests, self.timedOutTests, self.skippedTests)
+"%d API tests failed, %d crashed, %d timed out" % (self.incorrectTests, self.crashedTests, self.timedOutTests)
 ]
 
 def evaluateCommand(self, cmd):


Modified: trunk/Tools/ChangeLog (221473 => 221474)

--- trunk/Tools/ChangeLog	2017-09-01 06:00:33 UTC (rev 221473)
+++ trunk/Tools/ChangeLog	2017-09-01 06:36:32 UTC (rev 221474)
@@ -1,3 +1,45 @@

[webkit-changes] [221473] trunk/Source

2017-09-01 Thread aestes
Title: [221473] trunk/Source








Revision 221473
Author aes...@apple.com
Date 2017-08-31 23:00:33 -0700 (Thu, 31 Aug 2017)


Log Message
[Mac] Upstream AppKit-related WebKitSystemInterface functions
https://bugs.webkit.org/show_bug.cgi?id=176175

Reviewed by Brady Eidson.

Source/WebCore:

* Configurations/WebCore.xcconfig: Added -ObjC to OTHER_LDFLAGS so that Objective-C classes
in PAL are exported by WebCore even if WebCore doesn't use them.
* platform/mac/PlatformEventFactoryMac.h:
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::getWheelEventDeltas):
(WebCore::keyCharForEvent):
(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/spi/mac/HIToolboxSPI.h:
* pal/spi/mac/NSResponderSPI.h: Copied from Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h.
* pal/spi/mac/NSWindowSPI.h:
* pal/system/mac/WebPanel.h: Copied from Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h.
* pal/system/mac/WebPanel.mm: Copied from Source/WebCore/PAL/pal/spi/mac/HIToolboxSPI.h.
(-[WebPanel init]):

Source/WebKit:

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::initializeCocoaOverrides):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):
* UIProcess/mac/WKTextInputWindowController.mm:
(-[WKTextInputPanel init]):
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKitLegacy/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::keyEvent):
* Plugins/Hosted/WebTextInputWindowController.m:
(-[WebTextInputPanel init]):
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebView/WebDynamicScrollBarsView.mm:
(-[WebDynamicScrollBarsView scrollWheel:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _removeWindowObservers]):
(-[WebHTMLView addWindowObservers]):
* WebView/WebView.mm:
(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView viewWillMoveToWindow:]):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/WebCore.xcconfig
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
trunk/Source/WebCore/PAL/pal/spi/mac/HIToolboxSPI.h
trunk/Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h
trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.h
trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm
trunk/Source/WebKit/Shared/mac/WebEventFactory.mm
trunk/Source/WebKit/UIProcess/mac/WKTextInputWindowController.mm
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
trunk/Source/WebKitLegacy/mac/Plugins/Hosted/WebTextInputWindowController.m
trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebSystemInterface.mm
trunk/Source/WebKitLegacy/mac/WebView/WebDynamicScrollBarsView.mm
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm


Added Paths

trunk/Source/WebCore/PAL/pal/spi/mac/NSResponderSPI.h
trunk/Source/WebCore/PAL/pal/system/mac/WebPanel.h
trunk/Source/WebCore/PAL/pal/system/mac/WebPanel.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (221472 => 221473)

--- trunk/Source/WebCore/ChangeLog	2017-09-01 05:41:08 UTC (rev 221472)
+++ trunk/Source/WebCore/ChangeLog	2017-09-01 06:00:33 UTC (rev 221473)
@@ -1,3 +1,20 @@
+2017-08-31  Andy Estes  
+
+[Mac] Upstream AppKit-related WebKitSystemInterface functions
+https://bugs.webkit.org/show_bug.cgi?id=176175
+
+Reviewed by Brady Eidson.
+
+* Configurations/WebCore.xcconfig: Added -ObjC to OTHER_LDFLAGS so that Objective-C classes
+in PAL are exported by WebCore even if WebCore doesn't use them.
+* platform/mac/PlatformEventFactoryMac.h:
+* platform/mac/PlatformEventFactoryMac.mm:
+(WebCore::getWheelEventDeltas):
+(WebCore::keyCharForEvent):
+(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
+* platform/mac/WebCoreSystemInterface.h:
+* platform/mac/WebCoreSystemInterface.mm:
+
 2017-08-31  Alex Christensen  
 
 Fix Windows build after r221422


Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (221472 => 221473)

--- trunk/Source/WebCore/Configurations/WebCore.xcconfig	2017-09-01 05:41:08 UTC (rev 221472)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig	2017-09-01 06:00:33 UTC (rev 221473)
@@ -77,7 +77,7 @@