[webkit-changes] [293821] trunk/Source

2022-05-04 Thread cdumez
Title: [293821] trunk/Source








Revision 293821
Author cdu...@apple.com
Date 2022-05-04 22:48:33 -0700 (Wed, 04 May 2022)


Log Message
Optimize some convertToASCIIUppercase() call sites
https://bugs.webkit.org/show_bug.cgi?id=240095

Reviewed by Darin Adler.

Optimize some convertToASCIIUppercase() call sites. Also rename lowercase(StringView)
/ uppercase(StringView) to asASCIILowercase(StringView) / asASCIIUppercase(StringView)
for clarity, given that they only work with ASCII case.

* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::handleForWebPageProxy):
(WebKit::WebAutomationSession::handleForWebFrameID):
* Source/WTF/wtf/text/StringConcatenate.h:
(WTF::asASCIILowercase):
(WTF::asASCIIUppercase):
(WTF::lowercase): Deleted.
(WTF::uppercase): Deleted.
* Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:
(WebCore::hostName):
* Source/WebCore/css/ContainerQueryParser.cpp:
(WebCore::consumeFeatureName):
* Source/WebCore/css/MediaQueryExpression.cpp:
(WebCore::MediaQueryExpression::serialize const):
* Source/WebCore/css/parser/CSSParserSelector.cpp:
(WebCore::CSSParserSelector::parsePseudoElementSelector):
(WebCore::CSSParserSelector::parsePseudoClassSelector):
* Source/WebCore/dom/TextDecoder.cpp:
(WebCore::TextDecoder::encoding const):
* Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::languageIdentifier):
* Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::extractLocaleFromDictionaryFileName):
(WebCore::canHyphenate):
(WebCore::lastHyphenLocation):
* Source/WebCore/xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::getAllResponseHeaders const):

Canonical link: https://commits.webkit.org/250294@main

Modified Paths

trunk/Source/WTF/wtf/text/StringConcatenate.h
trunk/Source/WTF/wtf/text/StringView.cpp
trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
trunk/Source/WebCore/css/ContainerQueryParser.cpp
trunk/Source/WebCore/css/MediaQueryExpression.cpp
trunk/Source/WebCore/css/parser/CSSParserSelector.cpp
trunk/Source/WebCore/dom/TextDecoder.cpp
trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
trunk/Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp




Diff

Modified: trunk/Source/WTF/wtf/text/StringConcatenate.h (293820 => 293821)

--- trunk/Source/WTF/wtf/text/StringConcatenate.h	2022-05-05 04:56:56 UTC (rev 293820)
+++ trunk/Source/WTF/wtf/text/StringConcatenate.h	2022-05-05 05:48:33 UTC (rev 293821)
@@ -377,12 +377,12 @@
 StringView string;
 };
 
-inline ASCIICaseConverter lowercase(StringView stringView)
+inline ASCIICaseConverter asASCIILowercase(StringView stringView)
 {
 return { StringView::CaseConvertType::Lower, stringView };
 }
 
-inline ASCIICaseConverter uppercase(StringView stringView)
+inline ASCIICaseConverter asASCIIUppercase(StringView stringView)
 {
 return { StringView::CaseConvertType::Upper, stringView };
 }
@@ -544,9 +544,9 @@
 using WTF::makeString;
 using WTF::makeStringByInserting;
 using WTF::pad;
-using WTF::lowercase;
+using WTF::asASCIILowercase;
+using WTF::asASCIIUppercase;
 using WTF::tryMakeString;
 using WTF::tryMakeAtomString;
-using WTF::uppercase;
 
 #include 


Modified: trunk/Source/WTF/wtf/text/StringView.cpp (293820 => 293821)

--- trunk/Source/WTF/wtf/text/StringView.cpp	2022-05-05 04:56:56 UTC (rev 293820)
+++ trunk/Source/WTF/wtf/text/StringView.cpp	2022-05-05 05:48:33 UTC (rev 293821)
@@ -254,7 +254,7 @@
 {
 for (unsigned i = 0; i < length; ++i) {
 if (UNLIKELY(isASCIIUpper(input[i])))
-return makeAtomString(lowercase(StringView { input, length }));
+return makeAtomString(asASCIILowercase(StringView { input, length }));
 }
 // Fast path when the StringView is already all lowercase.
 return AtomString(input, length);


Modified: trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp (293820 => 293821)

--- trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp	2022-05-05 04:56:56 UTC (rev 293820)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp	2022-05-05 05:48:33 UTC (rev 293821)
@@ -77,10 +77,9 @@
 static String hostName(const URL& url, bool secure)
 {
 ASSERT(url.protocolIs("wss") == secure);
-String host = url.host().convertToASCIILowercase();
 if (url.port() && ((!secure && url.port().value() != 80) || (secure && url.port().value() != 443)))
-return makeString(host, ':', url.port().value());
-return host;
+return makeString(asASCIILowercase(url.host()), ':', url.port().value());
+return url.host().convertToASCIILowercase();
 }
 
 static constexpr size_t maxInputSampleSize = 128;


Modified: trunk/Source/WebCore/css/ContainerQueryParser.cpp (293820 => 293821)

--- trunk/Source/WebCore/css/ContainerQueryParser.cpp	2022-05-05 04:56:56 UTC (rev 293820)
+++ 

[webkit-changes] [293820] trunk

2022-05-04 Thread drousso
Title: [293820] trunk








Revision 293820
Author drou...@apple.com
Date 2022-05-04 21:56:56 -0700 (Wed, 04 May 2022)


Log Message
[Apple Pay] REGRESSION(r291588): `appearance: -apple-pay-button` doesn't work with `border-width: 0`
https://bugs.webkit.org/show_bug.cgi?id=240087


Reviewed by Kate Cheney.

Source/WebCore:

As of r291588, all `appearance` values now correspond to a specific element (or form control)
with the exception of `-apple-pay-button`, which can be applied to any element. Add logic to
specifically allow for this behavior.

Test: fast/css/appearance-apple-pay-button-border-width.html

* rendering/RenderTheme.cpp:
(WebCore::isAppearanceAllowedForAllElements): Added.
(WebCore::RenderTheme::adjustStyle):

LayoutTests:

* fast/css/appearance-apple-pay-button-border-width.html: Added.
* fast/css/appearance-apple-pay-button-border-width-expected-mismatch.html: Added.

* TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/ios/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTheme.cpp


Added Paths

trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-width-expected-mismatch.html
trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-width.html




Diff

Modified: trunk/LayoutTests/ChangeLog (293819 => 293820)

--- trunk/LayoutTests/ChangeLog	2022-05-05 04:45:27 UTC (rev 293819)
+++ trunk/LayoutTests/ChangeLog	2022-05-05 04:56:56 UTC (rev 293820)
@@ -1,3 +1,18 @@
+2022-05-04  Devin Rousso  
+
+[Apple Pay] REGRESSION(r291588): `appearance: -apple-pay-button` doesn't work with `border-width: 0`
+https://bugs.webkit.org/show_bug.cgi?id=240087
+
+
+Reviewed by Kate Cheney.
+
+* fast/css/appearance-apple-pay-button-border-width.html: Added.
+* fast/css/appearance-apple-pay-button-border-width-expected-mismatch.html: Added.
+
+* TestExpectations:
+* platform/ios/TestExpectations:
+* platform/mac/TestExpectations:
+
 2022-05-04  Alex Christensen  
 
 Crash in WindowProxy::setDOMWindow


Modified: trunk/LayoutTests/TestExpectations (293819 => 293820)

--- trunk/LayoutTests/TestExpectations	2022-05-05 04:45:27 UTC (rev 293819)
+++ trunk/LayoutTests/TestExpectations	2022-05-05 04:56:56 UTC (rev 293820)
@@ -280,6 +280,7 @@
 fast/css/appearance-apple-pay-button.html [ Skip ]
 fast/css/appearance-apple-pay-button-border-radius.html [ Skip ]
 fast/css/appearance-apple-pay-button-border-radius-longhands.html [ Skip ]
+fast/css/appearance-apple-pay-button-border-width.html [ Skip ]
 fast/css/appearance-apple-pay-button-default-corners.html [ Skip ]
 fast/css/getComputedStyle/computed-style-apple-pay-button.html [ Skip ]
 fast/css/webkit-named-image/apple-pay-logo-black [ Skip ]


Added: trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-width-expected-mismatch.html (0 => 293820)

--- trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-width-expected-mismatch.html	(rev 0)
+++ trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-width-expected-mismatch.html	2022-05-05 04:56:56 UTC (rev 293820)
@@ -0,0 +1 @@
+


Added: trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-width.html (0 => 293820)

--- trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-width.html	(rev 0)
+++ trunk/LayoutTests/fast/css/appearance-apple-pay-button-border-width.html	2022-05-05 04:56:56 UTC (rev 293820)
@@ -0,0 +1,9 @@
+
+div {
+width: 100px;
+height: 50px;
+appearance: -apple-pay-button;
+border-width: 0;
+}
+
+


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293819 => 293820)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-05 04:45:27 UTC (rev 293819)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-05 04:56:56 UTC (rev 293820)
@@ -39,6 +39,7 @@
 fast/css/appearance-apple-pay-button.html [ Pass ]
 fast/css/appearance-apple-pay-button-border-radius.html [ Pass ]
 fast/css/appearance-apple-pay-button-border-radius-longhands.html [ Pass ]
+fast/css/appearance-apple-pay-button-border-width.html [ Pass ]
 fast/css/appearance-apple-pay-button-default-corners.html [ Pass ]
 fast/css/webkit-named-image/apple-pay-logo-black [ Pass ]
 fast/css/webkit-named-image/apple-pay-logo-white [ Pass ]


Modified: trunk/LayoutTests/platform/mac/TestExpectations (293819 => 293820)

--- trunk/LayoutTests/platform/mac/TestExpectations	2022-05-05 04:45:27 UTC (rev 293819)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2022-05-05 04:56:56 UTC (rev 293820)
@@ -1042,6 +1042,7 @@
 fast/css/appearance-apple-pay-button.html [ Pass ]
 fast/css/appearance-apple-pay-button-border-radius.html [ Pass ]
 fast/css/appearance-apple-pay-button-border-radius-longhands.html [ Pass ]

[webkit-changes] [293819] trunk

2022-05-04 Thread commit-queue
Title: [293819] trunk








Revision 293819
Author commit-qu...@webkit.org
Date 2022-05-04 21:45:27 -0700 (Wed, 04 May 2022)


Log Message
Crash in WindowProxy::setDOMWindow
https://bugs.webkit.org/show_bug.cgi?id=232763

Patch by Alex Christensen  on 2022-05-04
Reviewed by Chris Dumez.

Source/WebCore:

Add a few null checks here and there.

Test: fast/dom/set-dom-window-without-page.html

* bindings/js/WindowProxy.cpp:
(WebCore::WindowProxy::setDOMWindow):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::findFrameForNavigation):

LayoutTests:

* fast/dom/set-dom-window-without-page-expected.txt: Added.
* fast/dom/set-dom-window-without-page.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/js/WindowProxy.cpp
trunk/Source/WebCore/loader/FrameLoader.cpp


Added Paths

trunk/LayoutTests/fast/dom/set-dom-window-without-page-expected.txt
trunk/LayoutTests/fast/dom/set-dom-window-without-page.html




Diff

Modified: trunk/LayoutTests/ChangeLog (293818 => 293819)

--- trunk/LayoutTests/ChangeLog	2022-05-05 04:23:39 UTC (rev 293818)
+++ trunk/LayoutTests/ChangeLog	2022-05-05 04:45:27 UTC (rev 293819)
@@ -1,3 +1,13 @@
+2022-05-04  Alex Christensen  
+
+Crash in WindowProxy::setDOMWindow
+https://bugs.webkit.org/show_bug.cgi?id=232763
+
+Reviewed by Chris Dumez.
+
+* fast/dom/set-dom-window-without-page-expected.txt: Added.
+* fast/dom/set-dom-window-without-page.html: Added.
+
 2022-05-04  Simon Fraser  
 
 Improve logging of display list items in IPC messages


Added: trunk/LayoutTests/fast/dom/set-dom-window-without-page-expected.txt (0 => 293819)

--- trunk/LayoutTests/fast/dom/set-dom-window-without-page-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/set-dom-window-without-page-expected.txt	2022-05-05 04:45:27 UTC (rev 293819)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: this test passes if it does not crash
+


Added: trunk/LayoutTests/fast/dom/set-dom-window-without-page.html (0 => 293819)

--- trunk/LayoutTests/fast/dom/set-dom-window-without-page.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/set-dom-window-without-page.html	2022-05-05 04:45:27 UTC (rev 293819)
@@ -0,0 +1,13 @@
+
+if (window.testRunner) { testRunner.dumpAsText(); console.log("this test passes if it does not crash") }
+function start() {
+  window.firstFrame = document.createElement('iframe');
+  document.body.appendChild(window.firstFrame);
+  window.secondFrame = document.createElement('iframe');
+  window.firstFrame.contentDocument.documentElement.appendChild(window.secondFrame);
+  window.secondFrame.contentWindow._onunload_ = function() {
+document.documentElement.removeChild(window.bodyEl);
+  };
+  window.firstFrame.src = '';
+}
+


Modified: trunk/Source/WebCore/ChangeLog (293818 => 293819)

--- trunk/Source/WebCore/ChangeLog	2022-05-05 04:23:39 UTC (rev 293818)
+++ trunk/Source/WebCore/ChangeLog	2022-05-05 04:45:27 UTC (rev 293819)
@@ -1,3 +1,19 @@
+2022-05-04  Alex Christensen  
+
+Crash in WindowProxy::setDOMWindow
+https://bugs.webkit.org/show_bug.cgi?id=232763
+
+Reviewed by Chris Dumez.
+
+Add a few null checks here and there.
+
+Test: fast/dom/set-dom-window-without-page.html
+
+* bindings/js/WindowProxy.cpp:
+(WebCore::WindowProxy::setDOMWindow):
+* loader/FrameLoader.cpp:
+(WebCore::FrameLoader::findFrameForNavigation):
+
 2022-05-04  Simon Fraser  
 
 Improve logging of display list items in IPC messages


Modified: trunk/Source/WebCore/bindings/js/WindowProxy.cpp (293818 => 293819)

--- trunk/Source/WebCore/bindings/js/WindowProxy.cpp	2022-05-05 04:23:39 UTC (rev 293818)
+++ trunk/Source/WebCore/bindings/js/WindowProxy.cpp	2022-05-05 04:45:27 UTC (rev 293819)
@@ -186,9 +186,10 @@
 cacheableBindingRootObject->updateGlobalObject(windowProxy->window());
 
 windowProxy->attachDebugger(page ? page->debugger() : nullptr);
-if (page)
+if (page) {
 windowProxy->window()->setProfileGroup(page->group().identifier());
-windowProxy->window()->setConsoleClient(page->console());
+windowProxy->window()->setConsoleClient(page->console());
+}
 }
 }
 


Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (293818 => 293819)

--- trunk/Source/WebCore/loader/FrameLoader.cpp	2022-05-05 04:23:39 UTC (rev 293818)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2022-05-05 04:45:27 UTC (rev 293819)
@@ -3744,6 +3744,9 @@
 if (!activeDocument)
 activeDocument = m_frame.document();
 
+if (!activeDocument)
+return nullptr;
+
 auto* frame = m_frame.tree().find(name, activeDocument->frame() ? *activeDocument->frame() : m_frame);
 
 if (!activeDocument->canNavigate(frame))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org

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

2022-05-04 Thread timothy_horton
Title: [293818] trunk/Source/WebKit








Revision 293818
Author timothy_hor...@apple.com
Date 2022-05-04 21:23:39 -0700 (Wed, 04 May 2022)


Log Message
REGRESSION (r293716): macCatalyst WebKit build fails; overlapping content at /System/Library/FeatureFlags/Domain/WebKit.plist
https://bugs.webkit.org/show_bug.cgi?id=240099


Reviewed by Chris Dumez.

* WebKit.xcodeproj/project.pbxproj:
Avoid copying the feature flags plist for macCatalyst, since it installs into the same place as macOS.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj




Diff

Modified: trunk/Source/WebKit/ChangeLog (293817 => 293818)

--- trunk/Source/WebKit/ChangeLog	2022-05-05 03:42:33 UTC (rev 293817)
+++ trunk/Source/WebKit/ChangeLog	2022-05-05 04:23:39 UTC (rev 293818)
@@ -1,3 +1,14 @@
+2022-05-04  Tim Horton  
+
+REGRESSION (r293716): macCatalyst WebKit build fails; overlapping content at /System/Library/FeatureFlags/Domain/WebKit.plist
+https://bugs.webkit.org/show_bug.cgi?id=240099
+
+
+Reviewed by Chris Dumez.
+
+* WebKit.xcodeproj/project.pbxproj:
+Avoid copying the feature flags plist for macCatalyst, since it installs into the same place as macOS.
+
 2022-05-04  Simon Fraser  
 
 Fix crash in RemoteRenderingBackendProxy::prepareBuffersForDisplay()


Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (293817 => 293818)

--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-05-05 03:42:33 UTC (rev 293817)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-05-05 04:23:39 UTC (rev 293818)
@@ -638,7 +638,6 @@
 		2D6CD119189058A500E5A4A0 /* ViewSnapshotStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D6CD117189058A500E5A4A0 /* ViewSnapshotStore.h */; };
 		2D72A1FA212BF46E00517A20 /* RemoteLayerTreeDrawingArea.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB16ADB1648598400290D62 /* RemoteLayerTreeDrawingArea.mm */; };
 		2D7303791A7C2B7500F8F487 /* WKPageNavigationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D7303781A7C2B7500F8F487 /* WKPageNavigationClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		2D77BF202820BA0D00C9A961 /* WebKit.plist in Copy Feature Flags Plist */ = {isa = PBXBuildFile; fileRef = 1D0530D2259162C900E436F7 /* WebKit.plist */; };
 		2D790A9D1AD7050D00AB90B3 /* _WKLayoutMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D790A9C1AD7050D00AB90B3 /* _WKLayoutMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		2D790A9F1AD7164900AB90B3 /* WKLayoutMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D790A9E1AD7164900AB90B3 /* WKLayoutMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		2D7AAFD318C8640600A7ACD4 /* WKWebViewContentProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D7AAFD218C8640600A7ACD4 /* WKWebViewContentProvider.h */; };
@@ -2730,17 +2729,6 @@
 			name = "Copy Message Generation Scripts";
 			runOnlyForDeploymentPostprocessing = 0;
 		};
-		2D77BF1F2820B9F500C9A961 /* Copy Feature Flags Plist */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 8;
-			dstPath = "$(WK_INSTALL_PATH_PREFIX)/$(SYSTEM_LIBRARY_DIR)/FeatureFlags/Domain";
-			dstSubfolderSpec = 0;
-			files = (
-2D77BF202820BA0D00C9A961 /* WebKit.plist in Copy Feature Flags Plist */,
-			);
-			name = "Copy Feature Flags Plist";
-			runOnlyForDeploymentPostprocessing = 1;
-		};
 		372589431C1E496800C92CA9 /* Copy Shims */ = {
 			isa = PBXCopyFilesBuildPhase;
 			buildActionMask = 2147483647;
@@ -15782,7 +15770,7 @@
 5DF408D1131DDBEC00130071 /* Check For Inappropriate Files In Framework */,
 A55DEAA61670402E003DB841 /* Check For Inappropriate Macros in External Headers */,
 1A2180161B5454620046AEC4 /* Add Symlink in /System/Library/PrivateFrameworks */,
-2D77BF1F2820B9F500C9A961 /* Copy Feature Flags Plist */,
+2DE7751928233C75004336C1 /* Copy Feature Flags Plist */,
 5379C7AC21E5288500E4A8F6 /* Check .xcfilelists */,
 933170072234674500B32554 /* Create symlinks to XPC services for engineering builds */,
 512B81CA273CAFBE00D87D49 /* Create symlinks to Daemons for engineering builds */,
@@ -16130,6 +16118,25 @@
 			shellPath = /bin/sh;
 			shellScript = "Scripts/process-entitlements.sh\n";
 		};
+		2DE7751928233C75004336C1 /* Copy Feature Flags Plist */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 8;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+"$(SRCROOT)/FeatureFlags/WebKit.plist",
+			);
+			name = "Copy Feature Flags Plist";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 1;
+			shellPath = /bin/sh;
+			shellScript = "if [[ \"${WK_PLATFORM_NAME}\" == maccatalyst || \"${WK_PLATFORM_NAME}\" == iosmac ]]; then\nexit 0\nfi\n\nFEATURE_FLAGS_PLIST_SOURCE=\"${SRCROOT}/FeatureFlags/WebKit.plist\"\nFEATURE_FLAGS_PLIST_DESTINATION=\"${DSTROOT}/System/Library/FeatureFlags/Domain/WebKit.plist\"\necho 

[webkit-changes] [293817] trunk/Source

2022-05-04 Thread cdumez
Title: [293817] trunk/Source








Revision 293817
Author cdu...@apple.com
Date 2022-05-04 20:42:33 -0700 (Wed, 04 May 2022)


Log Message
Annotate more String member functions with WARN_UNUSED_RETURN
https://bugs.webkit.org/show_bug.cgi?id=240078

Reviewed by Darin Adler.

* Source/WTF/wtf/text/WTFString.h:

Canonical link: https://commits.webkit.org/250290@main

Modified Paths

trunk/Source/WTF/wtf/text/WTFString.h
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm




Diff

Modified: trunk/Source/WTF/wtf/text/WTFString.h (293816 => 293817)

--- trunk/Source/WTF/wtf/text/WTFString.h	2022-05-05 03:22:40 UTC (rev 293816)
+++ trunk/Source/WTF/wtf/text/WTFString.h	2022-05-05 03:42:33 UTC (rev 293817)
@@ -192,29 +192,29 @@
 bool endsWith(char character) const { return endsWith(static_cast(character)); }
 bool hasInfixEndingAt(StringView suffix, unsigned end) const;
 
-WTF_EXPORT_PRIVATE String substring(unsigned position, unsigned length = MaxLength) const;
-WTF_EXPORT_PRIVATE String substringSharingImpl(unsigned position, unsigned length = MaxLength) const;
-String left(unsigned length) const { return substring(0, length); }
-String right(unsigned length) const { return substring(this->length() - length, length); }
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN substring(unsigned position, unsigned length = MaxLength) const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN substringSharingImpl(unsigned position, unsigned length = MaxLength) const;
+String WARN_UNUSED_RETURN left(unsigned length) const { return substring(0, length); }
+String WARN_UNUSED_RETURN right(unsigned length) const { return substring(this->length() - length, length); }
 
-WTF_EXPORT_PRIVATE String convertToASCIILowercase() const;
-WTF_EXPORT_PRIVATE String convertToASCIIUppercase() const;
-WTF_EXPORT_PRIVATE String convertToLowercaseWithoutLocale() const;
-WTF_EXPORT_PRIVATE String convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit(unsigned) const;
-WTF_EXPORT_PRIVATE String convertToUppercaseWithoutLocale() const;
-WTF_EXPORT_PRIVATE String convertToLowercaseWithLocale(const AtomString& localeIdentifier) const;
-WTF_EXPORT_PRIVATE String convertToUppercaseWithLocale(const AtomString& localeIdentifier) const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN convertToASCIILowercase() const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN convertToASCIIUppercase() const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN convertToLowercaseWithoutLocale() const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit(unsigned) const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN convertToUppercaseWithoutLocale() const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN convertToLowercaseWithLocale(const AtomString& localeIdentifier) const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN convertToUppercaseWithLocale(const AtomString& localeIdentifier) const;
 
-WTF_EXPORT_PRIVATE String stripWhiteSpace() const;
-WTF_EXPORT_PRIVATE String simplifyWhiteSpace() const;
-WTF_EXPORT_PRIVATE String simplifyWhiteSpace(CodeUnitMatchFunction) const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN stripWhiteSpace() const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN simplifyWhiteSpace() const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN simplifyWhiteSpace(CodeUnitMatchFunction) const;
 
-WTF_EXPORT_PRIVATE String stripLeadingAndTrailingCharacters(CodeUnitMatchFunction) const;
-template String removeCharacters(const Predicate&) const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN stripLeadingAndTrailingCharacters(CodeUnitMatchFunction) const;
+template String WARN_UNUSED_RETURN removeCharacters(const Predicate&) const;
 
 // Returns the string with case folded for case insensitive comparison.
 // Use convertToASCIILowercase instead if ASCII case insensitive comparison is desired.
-WTF_EXPORT_PRIVATE String foldCase() const;
+WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN foldCase() const;
 
 // Returns an uninitialized string. The characters needs to be written
 // into the buffer returned in data before the returned string is used.
@@ -224,18 +224,18 @@
 using SplitFunctor = WTF::Function;
 
 WTF_EXPORT_PRIVATE void split(UChar separator, const SplitFunctor&) const;
-WTF_EXPORT_PRIVATE Vector split(UChar separator) const;
-WTF_EXPORT_PRIVATE Vector split(StringView separator) const;
+WTF_EXPORT_PRIVATE Vector WARN_UNUSED_RETURN split(UChar separator) const;
+WTF_EXPORT_PRIVATE Vector WARN_UNUSED_RETURN split(StringView separator) const;
 
 WTF_EXPORT_PRIVATE void splitAllowingEmptyEntries(UChar separator, const SplitFunctor&) const;
-WTF_EXPORT_PRIVATE Vector splitAllowingEmptyEntries(UChar separator) const;
-WTF_EXPORT_PRIVATE Vector splitAllowingEmptyEntries(StringView separator) const;
+

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

2022-05-04 Thread simon . fraser
Title: [293815] trunk/Source/WebKit








Revision 293815
Author simon.fra...@apple.com
Date 2022-05-04 19:47:29 -0700 (Wed, 04 May 2022)


Log Message
Fix crash in RemoteRenderingBackendProxy::prepareBuffersForDisplay()
https://bugs.webkit.org/show_bug.cgi?id=240089


Reviewed by Tim Horton.

We keep WebContent processes alive after a GPU Process crash, so having a RELEASE_ASSERT
when IPC with the GPU Process fails is the wrong approach. Instead, just behave as if all
the returned buffers are null, and need full display.

In testing, I saw a single instance of a crash in RemoteLayerBackingStore::drawInContext(),
probably because m_backBuffer.imageBuffer was null.
SwapBuffersDisplayRequirement::NeedsFullDisplay should mean that we don't hit this, but
null-check the back buffer just in case.

* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::prepareBuffersForDisplay):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (293814 => 293815)

--- trunk/Source/WebKit/ChangeLog	2022-05-05 02:37:47 UTC (rev 293814)
+++ trunk/Source/WebKit/ChangeLog	2022-05-05 02:47:29 UTC (rev 293815)
@@ -1,3 +1,25 @@
+2022-05-04  Simon Fraser  
+
+Fix crash in RemoteRenderingBackendProxy::prepareBuffersForDisplay()
+https://bugs.webkit.org/show_bug.cgi?id=240089
+
+
+Reviewed by Tim Horton.
+
+We keep WebContent processes alive after a GPU Process crash, so having a RELEASE_ASSERT
+when IPC with the GPU Process fails is the wrong approach. Instead, just behave as if all
+the returned buffers are null, and need full display.
+
+In testing, I saw a single instance of a crash in RemoteLayerBackingStore::drawInContext(),
+probably because m_backBuffer.imageBuffer was null.
+SwapBuffersDisplayRequirement::NeedsFullDisplay should mean that we don't hit this, but
+null-check the back buffer just in case.
+
+* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
+(WebKit::RemoteLayerBackingStore::drawInContext):
+* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
+(WebKit::RemoteRenderingBackendProxy::prepareBuffersForDisplay):
+
 2022-05-04  Per Arne Vollan  
 
 [iOS][GPUP] Grant read access to font directory


Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm (293814 => 293815)

--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2022-05-05 02:37:47 UTC (rev 293814)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2022-05-05 02:47:29 UTC (rev 293815)
@@ -489,10 +489,8 @@
 }
 
 IntRect layerBounds(IntPoint(), expandedIntSize(m_size));
-if (!m_dirtyRegion.contains(layerBounds)) {
-ASSERT(m_backBuffer.imageBuffer);
+if (!m_dirtyRegion.contains(layerBounds) && m_backBuffer.imageBuffer)
 context.drawImageBuffer(*m_backBuffer.imageBuffer, { 0, 0 }, { CompositeOperator::Copy });
-}
 
 if (m_paintingRects.size() == 1)
 context.clip(m_paintingRects[0]);


Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp (293814 => 293815)

--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp	2022-05-05 02:37:47 UTC (rev 293814)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp	2022-05-05 02:47:29 UTC (rev 293815)
@@ -313,7 +313,13 @@
 
 Vector outputData;
 auto sendResult = sendSyncToStream(Messages::RemoteRenderingBackend::PrepareBuffersForDisplay(inputData), Messages::RemoteRenderingBackend::PrepareBuffersForDisplay::Reply(outputData));
-RELEASE_ASSERT_WITH_MESSAGE(sendResult, "PrepareBuffersForDisplay: IPC failed, probably because of a GPU Process crash");
+if (!sendResult) {
+// GPU Process crashed. Set the output data to all null buffers, requiring a full display.
+outputData.resize(inputData.size());
+for (auto& perLayerOutputData : outputData)
+perLayerOutputData.displayRequirement = SwapBuffersDisplayRequirement::NeedsFullDisplay;
+}
+
 RELEASE_ASSERT_WITH_MESSAGE(inputData.size() == outputData.size(), "PrepareBuffersForDisplay: mismatched buffer vector sizes");
 
 auto fetchBufferWithIdentifier = [&](std::optional identifier, std::optional&& handle = std::nullopt, bool isFrontBuffer = false) -> RefPtr {






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


[webkit-changes] [293814] trunk

2022-05-04 Thread simon . fraser
Title: [293814] trunk








Revision 293814
Author simon.fra...@apple.com
Date 2022-05-04 19:37:47 -0700 (Wed, 04 May 2022)


Log Message
Improve logging of display list items in IPC messages
https://bugs.webkit.org/show_bug.cgi?id=240053

Reviewed by Cameron McCormack.

Source/WebCore:

In order for IPC arguments to show up in IPCMessages logging, the stream operators
for display list items have to be visible to WebKit2 code. So export them all from
WebCore, but only if !LOG_DISABLED, to avoid code bloat.

* platform/graphics/Font.cpp:
(WebCore::operator<<):
* platform/graphics/Font.h:
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::FillPath::apply const):
(WebCore::DisplayList::operator<<):
* platform/graphics/displaylists/DisplayListItems.h:

LayoutTests:

Now that display list logging is debug only, these tests will only work in debug builds.

* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/Font.cpp
trunk/Source/WebCore/platform/graphics/Font.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h




Diff

Modified: trunk/LayoutTests/ChangeLog (293813 => 293814)

--- trunk/LayoutTests/ChangeLog	2022-05-05 02:21:35 UTC (rev 293813)
+++ trunk/LayoutTests/ChangeLog	2022-05-05 02:37:47 UTC (rev 293814)
@@ -1,3 +1,14 @@
+2022-05-04  Simon Fraser  
+
+Improve logging of display list items in IPC messages
+https://bugs.webkit.org/show_bug.cgi?id=240053
+
+Reviewed by Cameron McCormack.
+
+Now that display list logging is debug only, these tests will only work in debug builds.
+
+* platform/mac/TestExpectations:
+
 2022-05-04  Aditya Keerthi  
 
 Indeterminate, checked checkboxes do not render correctly on iOS, GTK, and Windows


Modified: trunk/LayoutTests/platform/mac/TestExpectations (293813 => 293814)

--- trunk/LayoutTests/platform/mac/TestExpectations	2022-05-05 02:21:35 UTC (rev 293813)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2022-05-05 02:37:47 UTC (rev 293814)
@@ -8,7 +8,6 @@
 
 accessibility/mac [ Pass ]
 compositing/scrolling/async-overflow-scrolling/mac [ Pass ]
-displaylists [ Pass ]
 editing/execCommand/mac [ Pass ]
 editing/input/cocoa [ Pass ]
 editing/mac [ Pass ]
@@ -18,6 +17,9 @@
 model-element [ Pass ]
 fast/images/mac [ Pass ]
 
+# Display list logging is only available in debug
+[ Debug ] displaylists [ Pass ]
+
 # Disable plug-in tests on Apple Silicon
 [ arm64 ] compositing/plugins [ Skip ]
 [ arm64 ] http/tests/plugins [ Skip ]


Modified: trunk/Source/WebCore/ChangeLog (293813 => 293814)

--- trunk/Source/WebCore/ChangeLog	2022-05-05 02:21:35 UTC (rev 293813)
+++ trunk/Source/WebCore/ChangeLog	2022-05-05 02:37:47 UTC (rev 293814)
@@ -1,3 +1,22 @@
+2022-05-04  Simon Fraser  
+
+Improve logging of display list items in IPC messages
+https://bugs.webkit.org/show_bug.cgi?id=240053
+
+Reviewed by Cameron McCormack.
+
+In order for IPC arguments to show up in IPCMessages logging, the stream operators
+for display list items have to be visible to WebKit2 code. So export them all from
+WebCore, but only if !LOG_DISABLED, to avoid code bloat.
+
+* platform/graphics/Font.cpp:
+(WebCore::operator<<):
+* platform/graphics/Font.h:
+* platform/graphics/displaylists/DisplayListItems.cpp:
+(WebCore::DisplayList::FillPath::apply const):
+(WebCore::DisplayList::operator<<):
+* platform/graphics/displaylists/DisplayListItems.h:
+
 2022-05-04  Aditya Keerthi  
 
 Indeterminate, checked checkboxes do not render correctly on iOS, GTK, and Windows


Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (293813 => 293814)

--- trunk/Source/WebCore/platform/graphics/Font.cpp	2022-05-05 02:21:35 UTC (rev 293813)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp	2022-05-05 02:37:47 UTC (rev 293814)
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #if ENABLE(OPENTYPE_VERTICAL)
 #include "OpenTypeVerticalData.h"
@@ -710,4 +711,12 @@
 return *m_glyphPathMap.existingMetricsForGlyph(glyph);
 }
 
+#if !LOG_DISABLED
+TextStream& operator<<(TextStream& ts, const Font& font)
+{
+ts << font.description();
+return ts;
+}
+#endif
+
 } // namespace WebCore


Modified: trunk/Source/WebCore/platform/graphics/Font.h (293813 => 293814)

--- trunk/Source/WebCore/platform/graphics/Font.h	2022-05-05 02:21:35 UTC (rev 293813)
+++ trunk/Source/WebCore/platform/graphics/Font.h	2022-05-05 02:37:47 UTC (rev 293814)
@@ -49,6 +49,10 @@
 #include 
 #endif
 
+namespace WTF {
+class TextStream;
+}
+
 namespace WebCore {
 
 class FontCache;
@@ -393,6 +397,10 @@
 return width + (SyntheticBoldInclusion == SyntheticBoldInclusion::Incorporate ? syntheticBoldOffset() : 0);
 

[webkit-changes] [293813] trunk

2022-05-04 Thread ysuzuki
Title: [293813] trunk








Revision 293813
Author ysuz...@apple.com
Date 2022-05-04 19:21:35 -0700 (Wed, 04 May 2022)


Log Message
[JSC] Intl.NumberFormat lacks some validation for rounding-increment
https://bugs.webkit.org/show_bug.cgi?id=240102

Reviewed by Ross Kirsling.

This patch adds some validations added in Intl.NumberFormat v3[1].
Important thing is one is TypeError and one is RangeError.
Both are tested in test262.

[1]: https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/proposed.html#sec-initializenumberformat

* JSTests/test262/expectations.yaml:
* Source/_javascript_Core/runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::initializeNumberFormat):

Canonical link: https://commits.webkit.org/250286@main

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/test262/expectations.yaml
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/IntlNumberFormat.cpp




Diff

Modified: trunk/JSTests/ChangeLog (293812 => 293813)

--- trunk/JSTests/ChangeLog	2022-05-05 01:53:23 UTC (rev 293812)
+++ trunk/JSTests/ChangeLog	2022-05-05 02:21:35 UTC (rev 293813)
@@ -1,3 +1,12 @@
+2022-05-04  Yusuke Suzuki  
+
+[JSC] Intl.NumberFormat lacks some validation for rounding-increment
+https://bugs.webkit.org/show_bug.cgi?id=240102
+
+Reviewed by Ross Kirsling.
+
+* test262/expectations.yaml:
+
 2022-05-04  Ross Kirsling  
 
 Temporal.Duration constructor should throw on non-integers


Modified: trunk/JSTests/test262/expectations.yaml (293812 => 293813)

--- trunk/JSTests/test262/expectations.yaml	2022-05-05 01:53:23 UTC (rev 293812)
+++ trunk/JSTests/test262/expectations.yaml	2022-05-05 02:21:35 UTC (rev 293813)
@@ -1350,9 +1350,6 @@
 test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js:
   default: 'Test262Error: "und".minimize() should be "en" Expected SameValue(«en-u-va-posix», «en») to be true'
   strict mode: 'Test262Error: "und".minimize() should be "en" Expected SameValue(«en-u-va-posix», «en») to be true'
-test/intl402/NumberFormat/constructor-roundingIncrement-invalid.js:
-  default: 'Test262Error: 2, roundingType is "morePrecision" Expected a TypeError but got a RangeError'
-  strict mode: 'Test262Error: 2, roundingType is "morePrecision" Expected a TypeError but got a RangeError'
 test/intl402/NumberFormat/prototype/format/format-rounding-priority-less-precision.js:
   default: 'Test262Error: Formatted value for 1, en-US-u-nu-arab and options {"useGrouping":false,"roundingPriority":"lessPrecision","minimumSignificantDigits":3,"minimumFractionDigits":1} is ١٫٠٠; expected ١٫٠.'
   strict mode: 'Test262Error: Formatted value for 1, en-US-u-nu-arab and options {"useGrouping":false,"roundingPriority":"lessPrecision","minimumSignificantDigits":3,"minimumFractionDigits":1} is ١٫٠٠; expected ١٫٠.'


Modified: trunk/Source/_javascript_Core/ChangeLog (293812 => 293813)

--- trunk/Source/_javascript_Core/ChangeLog	2022-05-05 01:53:23 UTC (rev 293812)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-05-05 02:21:35 UTC (rev 293813)
@@ -1,3 +1,19 @@
+2022-05-04  Yusuke Suzuki  
+
+[JSC] Intl.NumberFormat lacks some validation for rounding-increment
+https://bugs.webkit.org/show_bug.cgi?id=240102
+
+Reviewed by Ross Kirsling.
+
+This patch adds some validations added in Intl.NumberFormat v3[1].
+Important thing is one is TypeError and one is RangeError.
+Both are tested in test262.
+
+[1]: https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/proposed.html#sec-initializenumberformat
+
+* runtime/IntlNumberFormat.cpp:
+(JSC::IntlNumberFormat::initializeNumberFormat):
+
 2022-05-04  Ross Kirsling  
 
 Temporal.Duration constructor should throw on non-integers


Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormat.cpp (293812 => 293813)

--- trunk/Source/_javascript_Core/runtime/IntlNumberFormat.cpp	2022-05-05 01:53:23 UTC (rev 293812)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormat.cpp	2022-05-05 02:21:35 UTC (rev 293813)
@@ -394,9 +394,15 @@
 throwRangeError(globalObject, scope, "roundingIncrement must be one of 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000"_s);
 return;
 }
-if (m_roundingIncrement != 1 && m_roundingType != IntlRoundingType::FractionDigits) {
-throwRangeError(globalObject, scope, "rounding type is not fraction-digits while roundingIncrement is specified"_s);
-return;
+if (m_roundingIncrement != 1) {
+if (m_roundingType != IntlRoundingType::FractionDigits) {
+throwTypeError(globalObject, scope, "rounding type is not fraction-digits while roundingIncrement is specified"_s);
+return;
+}
+if (m_maximumFractionDigits != m_minimumFractionDigits) {
+throwRangeError(globalObject, scope, "maximum and minimum fraction-digits are not equal while 

[webkit-changes] [293812] trunk

2022-05-04 Thread akeerthi
Title: [293812] trunk








Revision 293812
Author akeer...@apple.com
Date 2022-05-04 18:53:23 -0700 (Wed, 04 May 2022)


Log Message
Indeterminate, checked checkboxes do not render correctly on iOS, GTK, and Windows
https://bugs.webkit.org/show_bug.cgi?id=240015
rdar://92645056

Reviewed by Cameron McCormack.

Source/WebCore:

Checkboxes can have the indeterminate and checked attributes set to
true at the same time. In this scenario, an indeterminate appearance
should be rendered. Reorder logic to ensure that the indeterminate
attribute has precedence when deciding what to draw. This approach
aligns with the macOS logic in ThemeMac.

Test: fast/forms/checkbox-checked-indeterminate.html

* platform/adwaita/ThemeAdwaita.cpp:
(WebCore::ThemeAdwaita::paintCheckbox):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintCheckbox):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::determineState):

LayoutTests:

Added a reference test to to verify that indeterminate, checked
checkboxes have the same appearance as indeterminate checkboxes.

* fast/forms/checkbox-checked-indeterminate-expected.html: Added.
* fast/forms/checkbox-checked-indeterminate.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/adwaita/ThemeAdwaita.cpp
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
trunk/Source/WebCore/rendering/RenderThemeWin.cpp


Added Paths

trunk/LayoutTests/fast/forms/checkbox-checked-indeterminate-expected.html
trunk/LayoutTests/fast/forms/checkbox-checked-indeterminate.html




Diff

Modified: trunk/LayoutTests/ChangeLog (293811 => 293812)

--- trunk/LayoutTests/ChangeLog	2022-05-05 01:34:14 UTC (rev 293811)
+++ trunk/LayoutTests/ChangeLog	2022-05-05 01:53:23 UTC (rev 293812)
@@ -1,3 +1,17 @@
+2022-05-04  Aditya Keerthi  
+
+Indeterminate, checked checkboxes do not render correctly on iOS, GTK, and Windows
+https://bugs.webkit.org/show_bug.cgi?id=240015
+rdar://92645056
+
+Reviewed by Cameron McCormack.
+
+Added a reference test to to verify that indeterminate, checked
+checkboxes have the same appearance as indeterminate checkboxes.
+
+* fast/forms/checkbox-checked-indeterminate-expected.html: Added.
+* fast/forms/checkbox-checked-indeterminate.html: Added.
+
 2022-05-04  Karl Rackler  
 
 [ iOS ] fast/text/international/system-language/navigator-language/navigator-language-fr.html is a flaky failure


Added: trunk/LayoutTests/fast/forms/checkbox-checked-indeterminate-expected.html (0 => 293812)

--- trunk/LayoutTests/fast/forms/checkbox-checked-indeterminate-expected.html	(rev 0)
+++ trunk/LayoutTests/fast/forms/checkbox-checked-indeterminate-expected.html	2022-05-05 01:53:23 UTC (rev 293812)
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+function runTest() {
+checkbox.indeterminate = true;
+}
+
+
+
+
+


Added: trunk/LayoutTests/fast/forms/checkbox-checked-indeterminate.html (0 => 293812)

--- trunk/LayoutTests/fast/forms/checkbox-checked-indeterminate.html	(rev 0)
+++ trunk/LayoutTests/fast/forms/checkbox-checked-indeterminate.html	2022-05-05 01:53:23 UTC (rev 293812)
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+function runTest() {
+checkbox.indeterminate = true;
+}
+
+
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (293811 => 293812)

--- trunk/Source/WebCore/ChangeLog	2022-05-05 01:34:14 UTC (rev 293811)
+++ trunk/Source/WebCore/ChangeLog	2022-05-05 01:53:23 UTC (rev 293812)
@@ -1,3 +1,26 @@
+2022-05-04  Aditya Keerthi  
+
+Indeterminate, checked checkboxes do not render correctly on iOS, GTK, and Windows
+https://bugs.webkit.org/show_bug.cgi?id=240015
+rdar://92645056
+
+Reviewed by Cameron McCormack.
+
+Checkboxes can have the indeterminate and checked attributes set to
+true at the same time. In this scenario, an indeterminate appearance
+should be rendered. Reorder logic to ensure that the indeterminate
+attribute has precedence when deciding what to draw. This approach
+aligns with the macOS logic in ThemeMac.
+
+Test: fast/forms/checkbox-checked-indeterminate.html
+
+* platform/adwaita/ThemeAdwaita.cpp:
+(WebCore::ThemeAdwaita::paintCheckbox):
+* rendering/RenderThemeIOS.mm:
+(WebCore::RenderThemeIOS::paintCheckbox):
+* rendering/RenderThemeWin.cpp:
+(WebCore::RenderThemeWin::determineState):
+
 2022-05-04  Eric Carlson  
 
 [macOS] ScreenCaptureKitCaptureSource should stop content sharing session when capture ends


Modified: trunk/Source/WebCore/platform/adwaita/ThemeAdwaita.cpp (293811 => 293812)

--- trunk/Source/WebCore/platform/adwaita/ThemeAdwaita.cpp	2022-05-05 01:34:14 UTC (rev 293811)
+++ trunk/Source/WebCore/platform/adwaita/ThemeAdwaita.cpp	2022-05-05 01:53:23 UTC (rev 293812)
@@ -272,7 +272,9 @@
 GraphicsContextStateSaver checkedStateSaver(graphicsContext);
 

[webkit-changes] [293811] trunk

2022-05-04 Thread ross . kirsling
Title: [293811] trunk








Revision 293811
Author ross.kirsl...@sony.com
Date 2022-05-04 18:34:14 -0700 (Wed, 04 May 2022)


Log Message
Temporal.Duration constructor should throw on non-integers
https://bugs.webkit.org/show_bug.cgi?id=240094

Reviewed by Yusuke Suzuki.

Belated implementation for https://github.com/tc39/proposal-temporal/pull/1872 --
this patch makes `new Temporal.Duration(1.1)` throw just as `Temporal.Duration.from({ years: 1.1 })` does.

* test262/expectations.yaml:
Mark two test cases as passing.

* runtime/TemporalDurationConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/250284@main

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/test262/expectations.yaml
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/TemporalDurationConstructor.cpp




Diff

Modified: trunk/JSTests/ChangeLog (293810 => 293811)

--- trunk/JSTests/ChangeLog	2022-05-05 01:14:59 UTC (rev 293810)
+++ trunk/JSTests/ChangeLog	2022-05-05 01:34:14 UTC (rev 293811)
@@ -1,3 +1,13 @@
+2022-05-04  Ross Kirsling  
+
+Temporal.Duration constructor should throw on non-integers
+https://bugs.webkit.org/show_bug.cgi?id=240094
+
+Reviewed by Yusuke Suzuki.
+
+* test262/expectations.yaml:
+Mark two test cases as passing.
+
 2022-05-04  Yusuke Suzuki  
 
 [JSC] Temporal.Instant since/until should not accept year / month / day / week units


Modified: trunk/JSTests/test262/expectations.yaml (293810 => 293811)

--- trunk/JSTests/test262/expectations.yaml	2022-05-05 01:14:59 UTC (rev 293810)
+++ trunk/JSTests/test262/expectations.yaml	2022-05-05 01:34:14 UTC (rev 293811)
@@ -876,9 +876,6 @@
 test/built-ins/Temporal/Duration/compare/twenty-five-hour-day.js:
   default: 'TypeError: Right side of assignment cannot be destructured'
   strict mode: 'TypeError: Right side of assignment cannot be destructured'
-test/built-ins/Temporal/Duration/fractional-throws-rangeerror.js:
-  default: 'Test262Error: Duration constructor throws RangeError with fractional value in the years position Expected a RangeError to be thrown but no exception was thrown at all'
-  strict mode: 'Test262Error: Duration constructor throws RangeError with fractional value in the years position Expected a RangeError to be thrown but no exception was thrown at all'
 test/built-ins/Temporal/Duration/prototype/add/argument-string-fractional-units-rounding-mode.js:
   default: 'Test262Error: negative fractional units rounded with correct rounding mode microseconds result Expected SameValue(«-0», «0») to be true'
   strict mode: 'Test262Error: negative fractional units rounded with correct rounding mode microseconds result Expected SameValue(«-0», «0») to be true'


Modified: trunk/Source/_javascript_Core/ChangeLog (293810 => 293811)

--- trunk/Source/_javascript_Core/ChangeLog	2022-05-05 01:14:59 UTC (rev 293810)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-05-05 01:34:14 UTC (rev 293811)
@@ -1,3 +1,16 @@
+2022-05-04  Ross Kirsling  
+
+Temporal.Duration constructor should throw on non-integers
+https://bugs.webkit.org/show_bug.cgi?id=240094
+
+Reviewed by Yusuke Suzuki.
+
+Belated implementation for https://github.com/tc39/proposal-temporal/pull/1872 --
+this patch makes `new Temporal.Duration(1.1)` throw just as `Temporal.Duration.from({ years: 1.1 })` does.
+
+* runtime/TemporalDurationConstructor.cpp:
+(JSC::JSC_DEFINE_HOST_FUNCTION):
+
 2022-05-04  Yusuke Suzuki  
 
 [JSC] Temporal.Instant since/until should not accept year / month / day / week units


Modified: trunk/Source/_javascript_Core/runtime/TemporalDurationConstructor.cpp (293810 => 293811)

--- trunk/Source/_javascript_Core/runtime/TemporalDurationConstructor.cpp	2022-05-05 01:14:59 UTC (rev 293810)
+++ trunk/Source/_javascript_Core/runtime/TemporalDurationConstructor.cpp	2022-05-05 01:34:14 UTC (rev 293811)
@@ -92,11 +92,15 @@
 ISO8601::Duration result;
 auto count = std::min(callFrame->argumentCount(), numberOfTemporalUnits);
 for (size_t i = 0; i < count; i++) {
-result[i] = callFrame->uncheckedArgument(i).toIntegerOrInfinity(globalObject);
+JSValue value = callFrame->uncheckedArgument(i);
+if (value.isUndefined())
+continue;
+
+result[i] = value.toNumber(globalObject);
 RETURN_IF_EXCEPTION(scope, { });
 
-if (!std::isfinite(result[i]))
-return throwVMRangeError(globalObject, scope, "Temporal.Duration properties must be finite"_s);
+if (!isInteger(result[i]))
+return throwVMRangeError(globalObject, scope, "Temporal.Duration properties must be integers"_s);
 }
 
 RELEASE_AND_RETURN(scope, JSValue::encode(TemporalDuration::tryCreateIfValid(globalObject, WTFMove(result), structure)));






___
webkit-changes mailing list
webkit-changes@lists.webkit.org

[webkit-changes] [293810] trunk/LayoutTests

2022-05-04 Thread rackler
Title: [293810] trunk/LayoutTests








Revision 293810
Author rack...@apple.com
Date 2022-05-04 18:14:59 -0700 (Wed, 04 May 2022)


Log Message
[ iOS ] fast/text/international/system-language/navigator-language/navigator-language-fr.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=240104

Unreviewed test gardening.

Canonical link: https://commits.webkit.org/250283@main

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (293809 => 293810)

--- trunk/LayoutTests/ChangeLog	2022-05-05 01:01:15 UTC (rev 293809)
+++ trunk/LayoutTests/ChangeLog	2022-05-05 01:14:59 UTC (rev 293810)
@@ -1,5 +1,14 @@
 2022-05-04  Karl Rackler  
 
+[ iOS ] fast/text/international/system-language/navigator-language/navigator-language-fr.html is a flaky failure
+https://bugs.webkit.org/show_bug.cgi?id=240104
+
+Unreviewed test gardening. 
+
+* platform/ios/TestExpectations:
+
+2022-05-04  Karl Rackler  
+
 [Gardening]REGRESSION(r293038):[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
 https://bugs.webkit.org/show_bug.cgi?id=240065
 


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293809 => 293810)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-05 01:01:15 UTC (rev 293809)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-05 01:14:59 UTC (rev 293810)
@@ -3602,3 +3602,5 @@
 webkit.org/b/237552 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/same-hash.html [ Pass Failure ]
 
 webkit.org/b/240081 webaudio/AudioBuffer/huge-buffer.html [ Pass Timeout ]
+
+webkit.org/b/240104 fast/text/international/system-language/navigator-language/navigator-language-fr.html [ Pass Failure ]






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


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

2022-05-04 Thread eric . carlson
Title: [293809] trunk/Source/WebCore








Revision 293809
Author eric.carl...@apple.com
Date 2022-05-04 18:01:15 -0700 (Wed, 04 May 2022)


Log Message
[macOS] ScreenCaptureKitCaptureSource should stop content sharing session when capture ends
https://bugs.webkit.org/show_bug.cgi?id=240086
rdar://91008087

Reviewed by Jer Noble.

Tested manually.

* platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:
(WebCore::ScreenCaptureKitCaptureSource::~ScreenCaptureKitCaptureSource): Call
-[SCContentSharingSession end].
(WebCore::ScreenCaptureKitCaptureSource::sessionDidEnd): Ditto.

Modified Paths

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




Diff

Modified: trunk/Source/WebCore/ChangeLog (293808 => 293809)

--- trunk/Source/WebCore/ChangeLog	2022-05-05 00:51:07 UTC (rev 293808)
+++ trunk/Source/WebCore/ChangeLog	2022-05-05 01:01:15 UTC (rev 293809)
@@ -1,3 +1,18 @@
+2022-05-04  Eric Carlson  
+
+[macOS] ScreenCaptureKitCaptureSource should stop content sharing session when capture ends
+https://bugs.webkit.org/show_bug.cgi?id=240086
+rdar://91008087
+
+Reviewed by Jer Noble.
+
+Tested manually.
+
+* platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:
+(WebCore::ScreenCaptureKitCaptureSource::~ScreenCaptureKitCaptureSource): Call
+-[SCContentSharingSession end].
+(WebCore::ScreenCaptureKitCaptureSource::sessionDidEnd): Ditto.
+
 2022-05-04  Michael Saboff  
 
 [Mac] WebCore should search system content path for nested Frameworks


Modified: trunk/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm (293808 => 293809)

--- trunk/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm	2022-05-05 00:51:07 UTC (rev 293808)
+++ trunk/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm	2022-05-05 01:01:15 UTC (rev 293809)
@@ -210,6 +210,10 @@
 
 ScreenCaptureKitCaptureSource::~ScreenCaptureKitCaptureSource()
 {
+if (m_contentSharingSession) {
+[m_contentSharingSession end];
+m_contentSharingSession = nullptr;
+}
 }
 
 bool ScreenCaptureKitCaptureSource::start()
@@ -302,6 +306,11 @@
 
 void ScreenCaptureKitCaptureSource::sessionDidEnd(RetainPtr)
 {
+if (m_contentSharingSession) {
+[m_contentSharingSession end];
+m_contentSharingSession = nullptr;
+}
+
 streamFailedWithError(nil, "sessionDidEnd"_s);
 }
 






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


[webkit-changes] [293808] trunk

2022-05-04 Thread ysuzuki
Title: [293808] trunk








Revision 293808
Author ysuz...@apple.com
Date 2022-05-04 17:51:07 -0700 (Wed, 04 May 2022)


Log Message
[JSC] Temporal.Instant since/until should not accept year / month / day / week units
https://bugs.webkit.org/show_bug.cgi?id=240097

Reviewed by Ross Kirsling.

Temporal.Instant.{since,until} should not accept year / month / day / week units as smallestUnit / largestUnit
according to the spec [1,2]. But we missed that and crashing with the attached test. This patch fixes it.

[1]: https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.until
[2]: https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.since

* JSTests/stress/temporal-instant-since-and-until-with-year-month-week-day.js: Added.
(shouldThrow):
(let.smallestUnit.of.units.shouldThrow):
(let.largestUnit.of.units.shouldThrow):
* Source/_javascript_Core/runtime/TemporalInstant.cpp:

Canonical link: https://commits.webkit.org/250281@main

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/test262/expectations.yaml
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/TemporalInstant.cpp


Added Paths

trunk/JSTests/stress/temporal-instant-since-and-until-with-year-month-week-day.js




Diff

Modified: trunk/JSTests/ChangeLog (293807 => 293808)

--- trunk/JSTests/ChangeLog	2022-05-05 00:44:40 UTC (rev 293807)
+++ trunk/JSTests/ChangeLog	2022-05-05 00:51:07 UTC (rev 293808)
@@ -1,3 +1,15 @@
+2022-05-04  Yusuke Suzuki  
+
+[JSC] Temporal.Instant since/until should not accept year / month / day / week units
+https://bugs.webkit.org/show_bug.cgi?id=240097
+
+Reviewed by Ross Kirsling.
+
+* stress/temporal-instant-since-and-until-with-year-month-week-day.js: Added.
+(shouldThrow):
+(let.smallestUnit.of.units.shouldThrow):
+(let.largestUnit.of.units.shouldThrow):
+
 2022-05-04  Keith Miller  
 
 May 2022 test262 update


Added: trunk/JSTests/stress/temporal-instant-since-and-until-with-year-month-week-day.js (0 => 293808)

--- trunk/JSTests/stress/temporal-instant-since-and-until-with-year-month-week-day.js	(rev 0)
+++ trunk/JSTests/stress/temporal-instant-since-and-until-with-year-month-week-day.js	2022-05-05 00:51:07 UTC (rev 293808)
@@ -0,0 +1,39 @@
+//@ requireOptions("--useTemporal=1")
+function shouldThrow(func, errorMessage) {
+var errorThrown = false;
+var error = null;
+try {
+func();
+} catch (e) {
+errorThrown = true;
+error = e;
+}
+if (!errorThrown)
+throw new Error('not thrown');
+if (String(error) !== errorMessage)
+throw new Error(`bad error: ${String(error)}`);
+}
+
+let earlier = new Temporal.Instant(1_000_000_000_000_000_000n);
+let later = new Temporal.Instant(1_000_090_061_987_654_321n);
+let units = [ "year", "month", "week", "day", ];
+for (let smallestUnit of units) {
+shouldThrow(() => {
+later.since(earlier, { smallestUnit });
+}, `RangeError: smallestUnit is a disallowed unit`);
+}
+for (let largestUnit of units) {
+shouldThrow(() => {
+later.since(earlier, { largestUnit });
+}, `RangeError: largestUnit is a disallowed unit`);
+}
+for (let smallestUnit of units) {
+shouldThrow(() => {
+earlier.until(later, { smallestUnit });
+}, `RangeError: smallestUnit is a disallowed unit`);
+}
+for (let largestUnit of units) {
+shouldThrow(() => {
+earlier.until(later, { largestUnit });
+}, `RangeError: largestUnit is a disallowed unit`);
+}


Modified: trunk/JSTests/test262/expectations.yaml (293807 => 293808)

--- trunk/JSTests/test262/expectations.yaml	2022-05-05 00:44:40 UTC (rev 293807)
+++ trunk/JSTests/test262/expectations.yaml	2022-05-05 00:51:07 UTC (rev 293808)
@@ -1110,15 +1110,9 @@
 test/built-ins/Temporal/Instant/prototype/round/smallestunit-string-shorthand.js:
   default: 'TypeError: options argument is not an object or undefined'
   strict mode: 'TypeError: options argument is not an object or undefined'
-test/built-ins/Temporal/Instant/prototype/since/largestunit-invalid-string.js:
-  default: 'Test262Error: "year" is not a valid value for largestUnit Expected a RangeError to be thrown but no exception was thrown at all'
-  strict mode: 'Test262Error: "year" is not a valid value for largestUnit Expected a RangeError to be thrown but no exception was thrown at all'
 test/built-ins/Temporal/Instant/prototype/since/largestunit.js:
   default: 'Test262Error: does not include higher units than necessary (largest unit unspecified) nanoseconds result Expected SameValue(«40», «101») to be true'
   strict mode: 'Test262Error: does not include higher units than necessary (largest unit unspecified) nanoseconds result Expected SameValue(«40», «101») to be true'
-test/built-ins/Temporal/Instant/prototype/since/smallestunit-invalid-string.js:
-  default: 'Test262Error: "year" is not a valid value for smallest unit Expected a RangeError to be 

[webkit-changes] [293807] trunk/Source/WTF/wtf/text/StringView.cpp

2022-05-04 Thread cdumez
Title: [293807] trunk/Source/WTF/wtf/text/StringView.cpp








Revision 293807
Author cdu...@apple.com
Date 2022-05-04 17:44:40 -0700 (Wed, 04 May 2022)


Log Message
Optimize / simplify slow case in StringView::convertASCIILowercaseAtom() https://bugs.webkit.org/show_bug.cgi?id=240082

Reviewed by Darin Adler.

Optimize / simplify slow case in StringView::convertASCIILowercaseAtom() where the input string
is not already lowercase. We now call `makeAtomString(lowercase(input))` which simplifies the
code a lot and is actually more efficient because makeAtomString() has an optimization that
avoids a StringImpl allocation when the string is relatively small (< 64 characters) and is
already part of the AtomStringTable already.

I validated the implementation by running it in a loop with the String "BODY" and got a
~35% speedup.

* Source/WTF/wtf/text/StringView.cpp:
(WTF::convertASCIILowercaseAtom):

Canonical link: https://commits.webkit.org/250280@main

Modified Paths

trunk/Source/WTF/wtf/text/StringView.cpp




Diff

Modified: trunk/Source/WTF/wtf/text/StringView.cpp (293806 => 293807)

--- trunk/Source/WTF/wtf/text/StringView.cpp	2022-05-05 00:20:52 UTC (rev 293806)
+++ trunk/Source/WTF/wtf/text/StringView.cpp	2022-05-05 00:44:40 UTC (rev 293807)
@@ -253,16 +253,8 @@
 static AtomString convertASCIILowercaseAtom(const CharacterType* input, unsigned length)
 {
 for (unsigned i = 0; i < length; ++i) {
-if (UNLIKELY(isASCIIUpper(input[i]))) {
-CharacterType* characters;
-auto result = String::createUninitialized(length, characters);
-StringImpl::copyCharacters(characters, input, i);
-for (; i < length; ++i)
-characters[i] = toASCIILower(input[i]);
-// FIXME: This is inefficient. Ideally, we wouldn't have to allocate a String/StringImpl if the
-// string is already in the AtomStringTable.
-return AtomString(result);
-}
+if (UNLIKELY(isASCIIUpper(input[i])))
+return makeAtomString(lowercase(StringView { input, length }));
 }
 // Fast path when the StringView is already all lowercase.
 return AtomString(input, length);






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


[webkit-changes] [293806] trunk/metadata/contributors.json

2022-05-04 Thread jbedard
Title: [293806] trunk/metadata/contributors.json








Revision 293806
Author jbed...@apple.com
Date 2022-05-04 17:20:52 -0700 (Wed, 04 May 2022)


Log Message
Add myself (Youssef Soliman) to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=240084

Reviewed by Jer Noble.

* metadata/contributors.json:

Canonical link: https://commits.webkit.org/250279@main

Modified Paths

trunk/metadata/contributors.json




Diff

Modified: trunk/metadata/contributors.json (293805 => 293806)

--- trunk/metadata/contributors.json	2022-05-05 00:11:30 UTC (rev 293805)
+++ trunk/metadata/contributors.json	2022-05-05 00:20:52 UTC (rev 293806)
@@ -7008,6 +7008,18 @@
},
{
   "emails" : [
+ "y_soli...@apple.com",
+ "youssefdevel...@gmail.com"
+  ],
+  "github" : "youssefsoli",
+  "name" : "Youssef Soliman",
+  "nicks" : [
+ "ys",
+ "youssefsoli"
+  ]
+   },
+   {
+  "emails" : [
  "yousuke.kim...@sony.com"
   ],
   "github" : "ykimot",






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


[webkit-changes] [293805] branches/safari-613-branch/Source/WebCore/layout/ formattingContexts/inline/InlineLineBuilder.cpp

2022-05-04 Thread alancoon
Title: [293805] branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp








Revision 293805
Author alanc...@apple.com
Date 2022-05-04 17:11:30 -0700 (Wed, 04 May 2022)


Log Message
Unreviewed build fix. rdar://problem/91446377

./layout/formattingContexts/inline/InlineLineBuilder.cpp:933:33: error: use of undeclared identifier 'isFirstLine'

Modified Paths

branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp




Diff

Modified: branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp (293804 => 293805)

--- branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp	2022-05-05 00:02:38 UTC (rev 293804)
+++ branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp	2022-05-05 00:11:30 UTC (rev 293805)
@@ -930,7 +930,7 @@
 auto& layoutBoxParent = trailingInlineItem.layoutBox().parent();
 
 // Need to ensure we use the correct style here, so the content breaker and line builder remain in sync.
-auto& parentStyle = isFirstLine() ? layoutBoxParent.firstLineStyle() : layoutBoxParent.style();
+auto& parentStyle = m_isFirstLine ? layoutBoxParent.firstLineStyle() : layoutBoxParent.style();
 
 auto isWrapOpportunity = TextUtil::isWrappingAllowed(parentStyle);
 if (!isWrapOpportunity && (trailingInlineItem.isInlineBoxStart() || trailingInlineItem.isInlineBoxEnd()))






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


[webkit-changes] [293804] trunk/Source

2022-05-04 Thread cdumez
Title: [293804] trunk/Source








Revision 293804
Author cdu...@apple.com
Date 2022-05-04 17:02:38 -0700 (Wed, 04 May 2022)


Log Message
Crash under WebCore: WebCore::CachedResourceClientWalker::next()
https://bugs.webkit.org/show_bug.cgi?id=240072


Reviewed by Geoff Garen.

Have CachedResource and CachedResourceClientWalker hold the clients via WeakPtrs instead of
raw pointers and null check them before usage. This is a lot safer.

* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/WeakHashCountedSet.h: Added.
(WTF::WeakHashCountedSet::begin):
(WTF::WeakHashCountedSet::end):
(WTF::WeakHashCountedSet::begin const):
(WTF::WeakHashCountedSet::end const):
(WTF::WeakHashCountedSet::find):
(WTF::WeakHashCountedSet::find const):
(WTF::WeakHashCountedSet::contains const):
(WTF::WeakHashCountedSet::computeSize const):
(WTF::WeakHashCountedSet::clear):
(WTF::Counter>::add):
(WTF::Counter>::remove):
* Source/WebCore/html/HTMLLinkElement.h:
* Source/WebCore/loader/DocumentThreadableLoader.h:
* Source/WebCore/loader/ImageLoader.h:
* Source/WebCore/loader/LinkLoader.h:
* Source/WebCore/loader/cache/CachedImage.cpp:
(WebCore::CachedImage::addClientWaitingForAsyncDecoding):
* Source/WebCore/loader/cache/CachedResource.cpp:
(WebCore::CachedResource::didAddClient):
(WebCore::CachedResource::addClientToSet):
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::switchClientsToRevalidatedResource):
* Source/WebCore/loader/cache/CachedResource.h:
(WebCore::CachedResource::hasClients const):
(WebCore::CachedResource::hasClient):
(WebCore::CachedResource::numberOfClients const):
* Source/WebCore/loader/cache/CachedResourceClient.h:
* Source/WebCore/loader/cache/CachedResourceClientWalker.h:
(WebCore::CachedResourceClientWalker::CachedResourceClientWalker):
(WebCore::CachedResourceClientWalker::next):
* Source/WebCore/rendering/RenderObject.h:

Canonical link: https://commits.webkit.org/250278@main

Modified Paths

trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
trunk/Source/WTF/wtf/CMakeLists.txt
trunk/Source/WebCore/html/HTMLLinkElement.h
trunk/Source/WebCore/loader/DocumentThreadableLoader.h
trunk/Source/WebCore/loader/ImageLoader.h
trunk/Source/WebCore/loader/LinkLoader.h
trunk/Source/WebCore/loader/cache/CachedImage.cpp
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResource.h
trunk/Source/WebCore/loader/cache/CachedResourceClient.h
trunk/Source/WebCore/loader/cache/CachedResourceClientWalker.h
trunk/Source/WebCore/rendering/RenderObject.h


Added Paths

trunk/Source/WTF/wtf/WeakHashCountedSet.h




Diff

Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (293803 => 293804)

--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2022-05-04 23:51:59 UTC (rev 293803)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2022-05-05 00:02:38 UTC (rev 293804)
@@ -59,6 +59,7 @@
 		337B2D6A26546EB300DDFD3D /* LikelyDenseUnsignedIntegerSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 337B2D6826546EAA00DDFD3D /* LikelyDenseUnsignedIntegerSet.cpp */; };
 		339B7B1127C45EF50072BF9A /* FixedWidthDouble.h in Headers */ = {isa = PBXBuildFile; fileRef = 33479C1C27236F2000B2E1B7 /* FixedWidthDouble.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4427C5AA21F6D6C300A612A4 /* ASCIICType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4427C5A921F6D6C300A612A4 /* ASCIICType.cpp */; };
+		46449E8B2822E5680005A8BC /* WeakHashCountedSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 46449E8A2822E5670005A8BC /* WeakHashCountedSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4655743627F5FC4A002D5522 /* ASCIILiteralCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4655743527F5FC4A002D5522 /* ASCIILiteralCocoa.mm */; };
 		46BEB6EB22FFE24900269867 /* RefCounted.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46BEB6E922FFDDD500269867 /* RefCounted.cpp */; };
 		46E93049271F1205005BA6E5 /* SafeStrerror.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46E43647271F10AA00C88C90 /* SafeStrerror.cpp */; };
@@ -1076,6 +1077,7 @@
 		4468567225094FE8008CCA05 /* ThreadSanitizerSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSanitizerSupport.h; sourceTree = ""; };
 		44CDE4D226EE6CDA009F6ACB /* TypeCastsCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeCastsCocoa.h; sourceTree = ""; };
 		46209A27266D543A007F8F4A /* CancellableTask.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CancellableTask.h; sourceTree = ""; };
+		46449E8A2822E5670005A8BC /* WeakHashCountedSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakHashCountedSet.h; sourceTree = ""; };
 		4655743527F5FC4A002D5522 /* ASCIILiteralCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASCIILiteralCocoa.mm; sourceTree = ""; };
 		46BA9EAB1F4CD61E009A2BBC /* 

[webkit-changes] [293803] trunk

2022-05-04 Thread cdumez
Title: [293803] trunk








Revision 293803
Author cdu...@apple.com
Date 2022-05-04 16:51:59 -0700 (Wed, 04 May 2022)


Log Message
WebKit should only reload WebViews automatically on crash if the view is visible
https://bugs.webkit.org/show_bug.cgi?id=240079


Reviewed by Geoffrey Garen and Darin Adler.

If the client app doesn't override WKNavigationDelegate.webViewWebContentProcessDidTerminate,
WebKit would previously reload the web view automatically. However, for some apps with a lot
of non-visible WebViews, this could cause a lot of churn when coming back to the foreground,
after many of these WebContent processes were jetsammed in the background.

To address this, WebKit now delays the automatic web view reload until the view becomes
visible (still reloads right away when the view is visible when the crash occurs).

* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
(TEST):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::launchProcess):
(WebKit::WebPageProxy::activityStateDidChange):
(WebKit::WebPageProxy::viewIsBecomingVisible):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):
* Source/WebKit/UIProcess/WebPageProxy.h:

Canonical link: https://commits.webkit.org/250277@main

Modified Paths

trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit/UIProcess/WebPageProxy.h
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm




Diff

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (293802 => 293803)

--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2022-05-04 23:27:43 UTC (rev 293802)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2022-05-04 23:51:59 UTC (rev 293803)
@@ -884,6 +884,7 @@
 m_process = processPool.processForRegistrableDomain(m_websiteDataStore.get(), registrableDomain, shouldEnableCaptivePortalMode() ? WebProcessProxy::CaptivePortalMode::Enabled : WebProcessProxy::CaptivePortalMode::Disabled);
 
 m_hasRunningProcess = true;
+m_shouldReloadDueToCrashWhenVisible = false;
 m_isCaptivePortalModeExplicitlySet = m_configuration->isCaptivePortalModeExplicitlySet();
 
 m_process->addExistingWebPage(*this, WebProcessProxy::BeginsUsingDataStore::Yes);
@@ -2165,6 +2166,17 @@
 m_potentiallyChangedActivityStateFlags.add(mayHaveChanged);
 m_activityStateChangeWantsSynchronousReply = m_activityStateChangeWantsSynchronousReply || replyMode == ActivityStateChangeReplyMode::Synchronous;
 
+// We need to do this here instead of inside dispatchActivityStateChange() or viewIsBecomingVisible() because these don't run when the view doesn't
+// have a running WebProcess. For the same reason, we need to rely on PageClient::isViewVisible() instead of WebPageProxy::isViewVisible().
+if (m_potentiallyChangedActivityStateFlags & ActivityState::IsVisible && m_shouldReloadDueToCrashWhenVisible && pageClient().isViewVisible()) {
+RunLoop::main().dispatch([this, weakThis = WeakPtr { *this }] {
+if (weakThis && std::exchange(m_shouldReloadDueToCrashWhenVisible, false)) {
+WEBPAGEPROXY_RELEASE_LOG(ViewState, "activityStateDidChange: view is becoming visible after a crash, attempt a reload");
+tryReloadAfterProcessTermination();
+}
+});
+}
+
 if (m_suppressVisibilityUpdates && dispatchMode != ActivityStateChangeDispatchMode::Immediate)
 return;
 
@@ -5303,6 +5315,7 @@
 
 void WebPageProxy::viewIsBecomingVisible()
 {
+WEBPAGEPROXY_RELEASE_LOG(ViewState, "viewIsBecomingVisible:");
 m_process->markProcessAsRecentlyUsed();
 #if ENABLE(MEDIA_STREAM)
 if (m_userMediaPermissionRequestManager)
@@ -7969,8 +7982,15 @@
 else
 handledByClient = m_navigationClient->processDidTerminate(*this, reason);
 
-if (!handledByClient && shouldReloadAfterProcessTermination(reason))
-tryReloadAfterProcessTermination();
+if (!handledByClient && shouldReloadAfterProcessTermination(reason)) {
+// We delay the view reload until it becomes visible.
+if (isViewVisible())
+tryReloadAfterProcessTermination();
+else {
+WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: Not eagerly reloading the view because it is not currently visible");
+m_shouldReloadDueToCrashWhenVisible = true;
+}
+}
 }
 
 void WebPageProxy::tryReloadAfterProcessTermination()


Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (293802 => 293803)

--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2022-05-04 23:27:43 UTC (rev 293802)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2022-05-04 23:51:59 UTC (rev 293803)
@@ -3014,6 +3014,7 @@
 bool m_isShowingNavigationGestureSnapshot { false };
 
 bool m_mainFramePluginHandlesPageScaleGesture { false };
+bool m_shouldReloadDueToCrashWhenVisible { false };
 
 unsigned m_pageCount { 0 };
 


Modified: 

[webkit-changes] [293802] trunk/Tools

2022-05-04 Thread cdumez
Title: [293802] trunk/Tools








Revision 293802
Author cdu...@apple.com
Date 2022-05-04 16:27:43 -0700 (Wed, 04 May 2022)


Log Message
REGRESSION(r293703):[ BigSur+ iOS ] TestWTF.WTF_URLExtras.URLExtras_ParsingError (API-Test) is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=240049


Unreviewed follow-up to r293761 because I dropped an item the std::array but failed to update its size.


* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm




Diff

Modified: trunk/Tools/ChangeLog (293801 => 293802)

--- trunk/Tools/ChangeLog	2022-05-04 23:25:59 UTC (rev 293801)
+++ trunk/Tools/ChangeLog	2022-05-04 23:27:43 UTC (rev 293802)
@@ -1,3 +1,14 @@
+2022-05-04  Chris Dumez  
+
+REGRESSION(r293703):[ BigSur+ iOS ] TestWTF.WTF_URLExtras.URLExtras_ParsingError (API-Test) is a constant failure
+https://bugs.webkit.org/show_bug.cgi?id=240049
+
+
+Unreviewed follow-up to r293761 because I dropped an item the std::array but failed to update its size.
+
+* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
+(TestWebKitAPI::TEST):
+
 2022-05-04  Robert Jenner  
 
 [ Gardening ] REGRESSION(r293671): [ iOS ] 2 TestWebKitAPI.MediaLoading.RangeRequestSynthesis (API-Tests) are constant failures


Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm (293801 => 293802)

--- trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm	2022-05-04 23:25:59 UTC (rev 293801)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm	2022-05-04 23:27:43 UTC (rev 293802)
@@ -233,7 +233,7 @@
 WTF::URL url2 { utf16String(u"http://\u2267\u222E\uFE63\u0661\u06F1") };
 EXPECT_STREQ([[url2 absoluteString] UTF8String], "http://%E2%89%A7%E2%88%AE%EF%B9%A3%D9%A1%DB%B1");
 
-std::array utf16 { 0xC2, 0xB6 };
+std::array utf16 { 0xC2, 0xB6 };
 WTF::URL url3 { String(utf16.data(), utf16.size()) };
 EXPECT_FALSE(url3.string().is8Bit());
 EXPECT_FALSE(url3.isValid());






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


[webkit-changes] [293801] trunk/LayoutTests/ChangeLog

2022-05-04 Thread rackler
Title: [293801] trunk/LayoutTests/ChangeLog








Revision 293801
Author rack...@apple.com
Date 2022-05-04 16:25:59 -0700 (Wed, 04 May 2022)


Log Message
[Gardening]REGRESSION(r293038):[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
https://bugs.webkit.org/show_bug.cgi?id=240065

Unreviewed test gardening.

Canonical link: https://commits.webkit.org/250275@main

Modified Paths

trunk/LayoutTests/ChangeLog




Diff

Modified: trunk/LayoutTests/ChangeLog (293800 => 293801)

--- trunk/LayoutTests/ChangeLog	2022-05-04 23:17:14 UTC (rev 293800)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 23:25:59 UTC (rev 293801)
@@ -1,5 +1,14 @@
 2022-05-04  Karl Rackler  
 
+[Gardening]REGRESSION(r293038):[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
+https://bugs.webkit.org/show_bug.cgi?id=240065
+
+Unreviewed test gardening. 
+
+* platform/ios/TestExpectations:
+
+2022-05-04  Karl Rackler  
+
 Unreviewed revert
 This reverts commit 250254@main because rebaseline resolved failure
 https://bugs.webkit.org/show_bug.cgi?id=240065






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


[webkit-changes] [293800] trunk/LayoutTests

2022-05-04 Thread commit-queue
Title: [293800] trunk/LayoutTests








Revision 293800
Author commit-qu...@webkit.org
Date 2022-05-04 16:17:14 -0700 (Wed, 04 May 2022)


Log Message
Unreviewed revert
This reverts commit 250254@main because test is no longer failing after rebaseline
https://bugs.webkit.org/show_bug.cgi?id=240065

Canonical link: https://commits.webkit.org/250273@main

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (293799 => 293800)

--- trunk/LayoutTests/ChangeLog	2022-05-04 23:17:13 UTC (rev 293799)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 23:17:14 UTC (rev 293800)
@@ -1,5 +1,13 @@
 2022-05-04  Karl Rackler  
 
+Unreviewed revert
+This reverts commit 250254@main because rebaseline resolved failure
+https://bugs.webkit.org/show_bug.cgi?id=240065
+
+* platform/ios/TestExpectations:
+
+2022-05-04  Karl Rackler  
+
 [ iOS ][ macOS Debug wk1 ] webaudio/AudioBuffer/huge-buffer.html is a flaky timeout
 https://bugs.webkit.org/show_bug.cgi?id=240081
 
@@ -56,15 +64,6 @@
 
 * platform/ios/TestExpectations:
 
-2022-05-04  Karl Rackler  
-
-[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
-https://bugs.webkit.org/show_bug.cgi?id=240065
-
-Unreviewed test gardening. 
-
-* platform/ios/TestExpectations:
-
 2022-05-04  Ziran Sun  
 
 [InputElement] Selection after type change needs to follow HTML specification


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293799 => 293800)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 23:17:13 UTC (rev 293799)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 23:17:14 UTC (rev 293800)
@@ -3595,8 +3595,6 @@
 
 webkit.org/b/240037 css3/background/background-repeat-space-content.html [ Pass ImageOnlyFailure ]
 
-webkit.org/b/240065 fast/forms/auto-fill-button/input-auto-fill-button.html [ Pass Failure ]
-
 webkit.org/b/240069 fast/css/continuationCrash.html [ Pass Failure ]
 
 webkit.org/b/240074 imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ]






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


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

2022-05-04 Thread ysuzuki
Title: [293799] trunk/Source/_javascript_Core








Revision 293799
Author ysuz...@apple.com
Date 2022-05-04 16:17:13 -0700 (Wed, 04 May 2022)


Log Message
[JSC] Use decontaminate in StructureID::decode
https://bugs.webkit.org/show_bug.cgi?id=240088

Reviewed by Saam Barati and Mark Lam.

We have a bug that ENABLE(STRUCTURE_ID_WITH_SHIFT) and CPU(ADDRESS32) version of StructureID::decode
does not have decontaminate() call. It is wrong since these ID can be decoded concurrently. This patch fixes it.

* Source/_javascript_Core/runtime/StructureID.h:
(JSC::StructureID::decode const):

Canonical link: https://commits.webkit.org/250273@main

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/StructureID.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (293798 => 293799)

--- trunk/Source/_javascript_Core/ChangeLog	2022-05-04 23:14:45 UTC (rev 293798)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-05-04 23:17:13 UTC (rev 293799)
@@ -1,3 +1,16 @@
+2022-05-04  Yusuke Suzuki  
+
+[JSC] Use decontaminate in StructureID::decode
+https://bugs.webkit.org/show_bug.cgi?id=240088
+
+Reviewed by Saam Barati and Mark Lam.
+
+We have a bug that ENABLE(STRUCTURE_ID_WITH_SHIFT) and CPU(ADDRESS32) version of StructureID::decode
+does not have decontaminate() call. It is wrong since these ID can be decoded concurrently. This patch fixes it.
+
+* runtime/StructureID.h:
+(JSC::StructureID::decode const):
+
 2022-05-04  Mark Lam  
 
 Use IterationStatus in more places.


Modified: trunk/Source/_javascript_Core/runtime/StructureID.h (293798 => 293799)

--- trunk/Source/_javascript_Core/runtime/StructureID.h	2022-05-04 23:14:45 UTC (rev 293798)
+++ trunk/Source/_javascript_Core/runtime/StructureID.h	2022-05-04 23:17:13 UTC (rev 293799)
@@ -88,7 +88,7 @@
 ALWAYS_INLINE Structure* StructureID::decode() const
 {
 ASSERT(decontaminate());
-return reinterpret_cast(static_cast(m_bits) << encodeShiftAmount);
+return reinterpret_cast(static_cast(decontaminate().m_bits) << encodeShiftAmount);
 }
 
 ALWAYS_INLINE Structure* StructureID::tryDecode() const
@@ -140,7 +140,7 @@
 ALWAYS_INLINE Structure* StructureID::decode() const
 {
 ASSERT(decontaminate());
-return reinterpret_cast(m_bits);
+return reinterpret_cast(decontaminate().m_bits);
 }
 
 ALWAYS_INLINE Structure* StructureID::tryDecode() const






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


[webkit-changes] [293798] trunk/Tools

2022-05-04 Thread jenner
Title: [293798] trunk/Tools








Revision 293798
Author jen...@apple.com
Date 2022-05-04 16:14:45 -0700 (Wed, 04 May 2022)


Log Message
[ Gardening ] REGRESSION(r293671): [ iOS ] 2 TestWebKitAPI.MediaLoading.RangeRequestSynthesis (API-Tests) are constant failures
https://bugs.webkit.org/show_bug.cgi?id=240033

Unreviewed test gardening. Disabling API-tests on iOS.

* TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/250272@main

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm




Diff

Modified: trunk/Tools/ChangeLog (293797 => 293798)

--- trunk/Tools/ChangeLog	2022-05-04 23:10:37 UTC (rev 293797)
+++ trunk/Tools/ChangeLog	2022-05-04 23:14:45 UTC (rev 293798)
@@ -1,3 +1,13 @@
+2022-05-04  Robert Jenner  
+
+[ Gardening ] REGRESSION(r293671): [ iOS ] 2 TestWebKitAPI.MediaLoading.RangeRequestSynthesis (API-Tests) are constant failures
+https://bugs.webkit.org/show_bug.cgi?id=240033
+
+Unreviewed test gardening. Disabling API-tests on iOS.
+
+* TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:
+(TestWebKitAPI::TEST):
+
 2022-05-04  Brent Fulgham  
 
 Remove deprecated 'JavaEnabled' feature flag and related code


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm (293797 => 293798)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm	2022-05-04 23:10:37 UTC (rev 293797)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm	2022-05-04 23:14:45 UTC (rev 293798)
@@ -147,7 +147,12 @@
 EXPECT_WK_STREQ([webView _test_waitForAlert], expectedMessage);
 }
 
+// FIXME Re-enable when https://bugs.webkit.org/show_bug.cgi?id=240033 is resovled 
+#if PLATFORM(IOS)
+TEST(MediaLoading, DISABLED_RangeRequestSynthesisWithContentLength)
+#else
 TEST(MediaLoading, RangeRequestSynthesisWithContentLength)
+#endif
 {
 HTTPServer server({
 {"/"_s, { videoPlayTestHTML }},
@@ -157,7 +162,12 @@
 EXPECT_EQ(server.totalRequests(), 2u);
 }
 
+// FIXME Re-enable when https://bugs.webkit.org/show_bug.cgi?id=240033 is resovled 
+#if PLATFORM(IOS)
+TEST(MediaLoading, DISABLED_RangeRequestSynthesisWithoutContentLength)
+#else
 TEST(MediaLoading, RangeRequestSynthesisWithoutContentLength)
+#endif
 {
 size_t totalRequests { 0 };
 Function respondToRequests;






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


[webkit-changes] [293796] trunk/LayoutTests

2022-05-04 Thread rackler
Title: [293796] trunk/LayoutTests








Revision 293796
Author rack...@apple.com
Date 2022-05-04 15:47:25 -0700 (Wed, 04 May 2022)


Log Message
[ iOS ][ macOS Debug wk1 ] webaudio/AudioBuffer/huge-buffer.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=240081

Unreviewed test gardening.

Canonical link: https://commits.webkit.org/250270@main

Modified Paths

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




Diff

Modified: trunk/LayoutTests/ChangeLog (293795 => 293796)

--- trunk/LayoutTests/ChangeLog	2022-05-04 22:03:39 UTC (rev 293795)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 22:47:25 UTC (rev 293796)
@@ -1,3 +1,13 @@
+2022-05-04  Karl Rackler  
+
+[ iOS ][ macOS Debug wk1 ] webaudio/AudioBuffer/huge-buffer.html is a flaky timeout
+https://bugs.webkit.org/show_bug.cgi?id=240081
+
+Unreviewed test gardening. 
+
+* platform/ios/TestExpectations:
+* platform/mac-wk1/TestExpectations:
+
 2022-05-04  Kate Cheney  
 
 REGRESSION (r293427): [ iOS ] http/tests/quicklook/same-origin-xmlhttprequest-allowed.html is a constant crash and failure (240024)


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293795 => 293796)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 22:03:39 UTC (rev 293795)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 22:47:25 UTC (rev 293796)
@@ -3602,3 +3602,5 @@
 webkit.org/b/240074 imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ]
 
 webkit.org/b/237552 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/same-hash.html [ Pass Failure ]
+
+webkit.org/b/240081 webaudio/AudioBuffer/huge-buffer.html [ Pass Timeout ]


Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (293795 => 293796)

--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2022-05-04 22:03:39 UTC (rev 293795)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2022-05-04 22:47:25 UTC (rev 293796)
@@ -1883,3 +1883,4 @@
 
 webkit.org/b/237552 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/same-hash.html [ Pass Failure ]
 
+webkit.org/b/240081 [ Debug ]  webaudio/AudioBuffer/huge-buffer.html [ Pass Timeout ]






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


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

2022-05-04 Thread pvollan
Title: [293795] trunk/Source/WebKit








Revision 293795
Author pvol...@apple.com
Date 2022-05-04 15:03:39 -0700 (Wed, 04 May 2022)


Log Message
[iOS][GPUP] Grant read access to font directory
https://bugs.webkit.org/show_bug.cgi?id=240080

Reviewed by Brent Fulgham.

* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (293794 => 293795)

--- trunk/Source/WebKit/ChangeLog	2022-05-04 21:55:48 UTC (rev 293794)
+++ trunk/Source/WebKit/ChangeLog	2022-05-04 22:03:39 UTC (rev 293795)
@@ -1,3 +1,12 @@
+2022-05-04  Per Arne Vollan  
+
+[iOS][GPUP] Grant read access to font directory
+https://bugs.webkit.org/show_bug.cgi?id=240080
+
+Reviewed by Brent Fulgham.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in:
+
 2022-05-04  J Pascoe  
 
 [WebAuthn] Remove user gesture requirement for mediation=conditional assertions


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in (293794 => 293795)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in	2022-05-04 21:55:48 UTC (rev 293794)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in	2022-05-04 22:03:39 UTC (rev 293795)
@@ -495,6 +495,9 @@
 (home-literal "/Library/Preferences/com.apple.mobilemail.plist")
 (with no-log))
 
+(allow file-read*
+(home-subpath "/Library/Fonts"))
+
 (allow-preferences-common)
 
 ;; Home Button






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


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

2022-05-04 Thread msaboff
Title: [293794] trunk/Source/WebCore








Revision 293794
Author msab...@apple.com
Date 2022-05-04 14:55:48 -0700 (Wed, 04 May 2022)


Log Message
[Mac] WebCore should search system content path for nested Frameworks
https://bugs.webkit.org/show_bug.cgi?id=240063

Reviewed by Alexey Proskuryakov.

Changed nested frameworks directory to be below where WebCore will be installed
when building with the system content path.

* Configurations/WebCore.xcconfig:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/WebCore.xcconfig




Diff

Modified: trunk/Source/WebCore/ChangeLog (293793 => 293794)

--- trunk/Source/WebCore/ChangeLog	2022-05-04 21:23:48 UTC (rev 293793)
+++ trunk/Source/WebCore/ChangeLog	2022-05-04 21:55:48 UTC (rev 293794)
@@ -1,3 +1,15 @@
+2022-05-04  Michael Saboff  
+
+[Mac] WebCore should search system content path for nested Frameworks
+https://bugs.webkit.org/show_bug.cgi?id=240063
+
+Reviewed by Alexey Proskuryakov.
+
+Changed nested frameworks directory to be below where WebCore will be installed
+when building with the system content path.
+
+* Configurations/WebCore.xcconfig:
+
 2022-05-04  Kate Cheney  
 
 REGRESSION (r293427): [ iOS ] http/tests/quicklook/same-origin-xmlhttprequest-allowed.html is a constant crash and failure (240024)


Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (293793 => 293794)

--- trunk/Source/WebCore/Configurations/WebCore.xcconfig	2022-05-04 21:23:48 UTC (rev 293793)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig	2022-05-04 21:55:48 UTC (rev 293794)
@@ -61,9 +61,9 @@
 WK_FRAMEWORKS_LIBRARY_DIR = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks
 WK_FRAMEWORKS_LIBRARY_DIR[sdk=macosx*] = $(WK_FRAMEWORKS_LIBRARY_DIR_USE_ALTERNATE_FRAMEWORKS_DIR_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR))
 WK_FRAMEWORKS_LIBRARY_DIR_USE_ALTERNATE_FRAMEWORKS_DIR_NO = $(WK_FRAMEWORKS_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
-WK_FRAMEWORKS_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
+WK_FRAMEWORKS_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(INSTALL_PATH_PREFIX)$(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
 WK_FRAMEWORKS_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
-WK_FRAMEWORKS_LIBRARY_DIR_USE_ALTERNATE_FRAMEWORKS_DIR_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR)/$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/WebCore.framework/Versions/A/Frameworks;
+WK_FRAMEWORKS_LIBRARY_DIR_USE_ALTERNATE_FRAMEWORKS_DIR_YES = $(INSTALL_PATH_PREFIX)$(WK_ALTERNATE_FRAMEWORKS_DIR)/$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/WebCore.framework/Versions/A/Frameworks;
 
 LIBRARY_SEARCH_PATHS = $(inherited) "$(WK_FRAMEWORKS_LIBRARY_DIR)";
 






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


[webkit-changes] [293793] branches/safari-613-branch/Source/WebKit

2022-05-04 Thread alancoon
Title: [293793] branches/safari-613-branch/Source/WebKit








Revision 293793
Author alanc...@apple.com
Date 2022-05-04 14:23:48 -0700 (Wed, 04 May 2022)


Log Message
Apply patch. rdar://problem/88904160

Modified Paths

branches/safari-613-branch/Source/WebKit/ChangeLog
branches/safari-613-branch/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
branches/safari-613-branch/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h
branches/safari-613-branch/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp
branches/safari-613-branch/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h
branches/safari-613-branch/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm




Diff

Modified: branches/safari-613-branch/Source/WebKit/ChangeLog (293792 => 293793)

--- branches/safari-613-branch/Source/WebKit/ChangeLog	2022-05-04 21:23:43 UTC (rev 293792)
+++ branches/safari-613-branch/Source/WebKit/ChangeLog	2022-05-04 21:23:48 UTC (rev 293793)
@@ -1,3 +1,60 @@
+2022-05-04  Alan Coon  
+
+Apply patch. rdar://problem/88904160
+
+2022-05-04  Kimmo Kinnunen  
+
+Multiple concurrency violations in LibWebRTCCodecsProxy
+https://bugs.webkit.org/show_bug.cgi?id=236767
+
+
+Reviewed by Antti Koivisto.
+
+- ThreadMessageReceivers should not add IPC listeners in constructors,
+as the delivery starts right away and uses the unconstructed virtual pointer.
+- The work queue functions should not use GPUConnectionToWebProcess, as that is
+main thread object.
+- Locked m_encoders, m_decoders are sometimes accessed without lock.
+
+Instead:
+- Add the IPC listeners in initialize function.
+- Remove the IPC listeners when GPUConnectionToWebProcess disconnects.
+- Store the thread-safe conection, video frame object heap, process identity
+objects as member variables.
+- Do not lock m_encoders, m_decoders. If they are work queue instances,
+just access them in the work queue functions. Add thread requirements
+to the variables so that the compiler checks the access.
+- Use IPC testing assertions when skipping incorrect messages.
+- Use separate atomic counter (bool) to check if allowsExitUnderMemoryPressure.
+
+No new tests, tested with existing tests and ASAN.
+
+* GPUProcess/GPUConnectionToWebProcess.cpp:
+(WebKit::GPUConnectionToWebProcess::~GPUConnectionToWebProcess):
+(WebKit::GPUConnectionToWebProcess::didClose):
+* GPUProcess/GPUConnectionToWebProcess.h:
+* GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
+* GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
+(WebKit::LibWebRTCCodecsProxy::create):
+(WebKit::LibWebRTCCodecsProxy::LibWebRTCCodecsProxy):
+(WebKit::LibWebRTCCodecsProxy::stopListeningForIPC):
+(WebKit::LibWebRTCCodecsProxy::initialize):
+(WebKit::LibWebRTCCodecsProxy::dispatchToThread):
+(WebKit::LibWebRTCCodecsProxy::createDecoderCallback):
+(WebKit::LibWebRTCCodecsProxy::createH264Decoder):
+(WebKit::LibWebRTCCodecsProxy::createH265Decoder):
+(WebKit::LibWebRTCCodecsProxy::createVP9Decoder):
+(WebKit::LibWebRTCCodecsProxy::releaseDecoder):
+(WebKit::LibWebRTCCodecsProxy::createEncoder):
+(WebKit::LibWebRTCCodecsProxy::releaseEncoder):
+(WebKit::LibWebRTCCodecsProxy::initializeEncoder):
+(WebKit::LibWebRTCCodecsProxy::findEncoder):
+(WebKit::LibWebRTCCodecsProxy::encodeFrame):
+(WebKit::LibWebRTCCodecsProxy::setEncodeRates):
+(WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameSemaphore):
+(WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameMemory):
+(WebKit::LibWebRTCCodecsProxy::allowsExitUnderMemoryPressure const):
+
 2022-05-02  Alan Coon  
 
 Apply patch. rdar://problem/92617943


Modified: branches/safari-613-branch/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp (293792 => 293793)

--- branches/safari-613-branch/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp	2022-05-04 21:23:43 UTC (rev 293792)
+++ branches/safari-613-branch/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp	2022-05-04 21:23:48 UTC (rev 293793)
@@ -274,9 +274,6 @@
 #if PLATFORM(COCOA) && ENABLE(MEDIA_STREAM)
 m_sampleBufferDisplayLayerManager->close();
 #endif
-#if PLATFORM(COCOA) && USE(LIBWEBRTC)
-m_libWebRTCCodecsProxy->close();
-#endif
 
 --gObjectCountForTesting;
 }
@@ -309,7 +306,9 @@
 WCContentBufferManager::singleton().removeAllContentBuffersForProcess(webProcessIdentifier);
 });
 #endif
-
+#if PLATFORM(COCOA) && USE(LIBWEBRTC)
+m_libWebRTCCodecsProxy = nullptr;
+#endif
 gpuProcess().connectionToWebProcessClosed(connection);
 

[webkit-changes] [293792] branches/safari-613-branch/Source/WebCore

2022-05-04 Thread alancoon
Title: [293792] branches/safari-613-branch/Source/WebCore








Revision 293792
Author alanc...@apple.com
Date 2022-05-04 14:23:43 -0700 (Wed, 04 May 2022)


Log Message
Apply patch. rdar://problem/75450208

Modified Paths

branches/safari-613-branch/Source/WebCore/ChangeLog
branches/safari-613-branch/Source/WebCore/dom/ElementData.h
branches/safari-613-branch/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGAnimateMotionElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGClipPathElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGElement.h
branches/safari-613-branch/Source/WebCore/svg/SVGElementInlines.h
branches/safari-613-branch/Source/WebCore/svg/SVGFEBlendElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEColorMatrixElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFECompositeElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEDropShadowElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEImageElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFELightElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEMergeNodeElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEMorphologyElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFEOffsetElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFESpecularLightingElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFETileElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFilterElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
branches/safari-613-branch/Source/WebCore/svg/SVGForeignObjectElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGGeometryElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGGradientElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGGraphicsElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGImageElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGLineElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGLinearGradientElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGMarkerElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGMaskElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGPathElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGPatternElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGPolyElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGRadialGradientElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGSVGElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGStopElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGTRefElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGTextContentElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGTextPathElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGTextPositioningElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGUseElement.cpp
branches/safari-613-branch/Source/WebCore/svg/SVGViewElement.cpp




Diff

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (293791 => 293792)

--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-05-04 21:23:32 UTC (rev 293791)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-05-04 21:23:43 UTC (rev 293792)
@@ -1,5 +1,135 @@
 2022-05-04  Alan Coon  
 
+Apply patch. rdar://problem/75450208
+
+2022-03-23  Rob Buis  
+
+setNeedsLayout() should not be called when changing the SVG properties
+https://bugs.webkit.org/show_bug.cgi?id=230296
+
+Reviewed by Said Abou-Hallawa.
+
+Make SVG not call setNeedsLayout() from outside RenderTreeUpdater::updateRenderTree() when an attribute changes.
+This ensures there will not be a dirty rendering tree immediately after updating it.
+
+The patch also tries to avoid invalidate wording since this is quite generic.
+
+Based on the initial patch by Said Abou-Hallawa.
+
+* dom/ElementData.h:
+(WebCore::ElementData::svgResourcesInAncestorChainAreDirty const):
+(WebCore::ElementData::setSVGResourcesInAncestorChainAreDirty const):
+* rendering/updating/RenderTreeUpdater.cpp:
+(WebCore::RenderTreeUpdater::updateRenderTree):
+* svg/SVGAnimateMotionElement.cpp:
+

[webkit-changes] [293791] branches/safari-613-branch/Source/WebCore

2022-05-04 Thread alancoon
Title: [293791] branches/safari-613-branch/Source/WebCore








Revision 293791
Author alanc...@apple.com
Date 2022-05-04 14:23:32 -0700 (Wed, 04 May 2022)


Log Message
Cherry-pick r291299. rdar://problem/91446377

Line Builder and Content Breaker out of sync
https://bugs.webkit.org/show_bug.cgi?id=237903

Reviewed by Simon Fraser.

Line builder and content breaker could become out of sync in the case where
the first line style was different than following styles. This could result
in issues with wrapping later on.

* layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::handleInlineContent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291299 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

branches/safari-613-branch/Source/WebCore/ChangeLog
branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp




Diff

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (293790 => 293791)

--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-05-04 21:18:42 UTC (rev 293790)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-05-04 21:23:32 UTC (rev 293791)
@@ -1,3 +1,35 @@
+2022-05-04  Alan Coon  
+
+Cherry-pick r291299. rdar://problem/91446377
+
+Line Builder and Content Breaker out of sync
+https://bugs.webkit.org/show_bug.cgi?id=237903
+
+Reviewed by Simon Fraser.
+
+Line builder and content breaker could become out of sync in the case where
+the first line style was different than following styles. This could result
+in issues with wrapping later on.
+
+* layout/formattingContexts/inline/InlineLineBuilder.cpp:
+(WebCore::Layout::LineBuilder::handleInlineContent):
+
+git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+2022-03-15  Brandon Stewart  
+
+Line Builder and Content Breaker out of sync
+https://bugs.webkit.org/show_bug.cgi?id=237903
+
+Reviewed by Simon Fraser.
+
+Line builder and content breaker could become out of sync in the case where
+the first line style was different than following styles. This could result
+in issues with wrapping later on.
+
+* layout/formattingContexts/inline/InlineLineBuilder.cpp:
+(WebCore::Layout::LineBuilder::handleInlineContent):
+
 2022-04-29  Alan Coon  
 
 Cherry-pick r287877. rdar://problem/92357915


Modified: branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp (293790 => 293791)

--- branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp	2022-05-04 21:18:42 UTC (rev 293790)
+++ branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp	2022-05-04 21:23:32 UTC (rev 293791)
@@ -924,9 +924,14 @@
 if (lineCandidate.inlineContent.hasTrailingSoftWrapOpportunity() && m_line.hasContent()) {
 auto& trailingRun = candidateRuns.last();
 auto& trailingInlineItem = trailingRun.inlineItem;
+
 // Note that wrapping here could be driven both by the style of the parent and the inline item itself.
 // e.g inline boxes set the wrapping rules for their content and not for themselves.
-auto& parentStyle = trailingInlineItem.layoutBox().parent().style();
+auto& layoutBoxParent = trailingInlineItem.layoutBox().parent();
+
+// Need to ensure we use the correct style here, so the content breaker and line builder remain in sync.
+auto& parentStyle = isFirstLine() ? layoutBoxParent.firstLineStyle() : layoutBoxParent.style();
+
 auto isWrapOpportunity = TextUtil::isWrappingAllowed(parentStyle);
 if (!isWrapOpportunity && (trailingInlineItem.isInlineBoxStart() || trailingInlineItem.isInlineBoxEnd()))
 isWrapOpportunity = TextUtil::isWrappingAllowed(trailingRun.style);






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


[webkit-changes] [293790] trunk

2022-05-04 Thread katherine_cheney
Title: [293790] trunk








Revision 293790
Author katherine_che...@apple.com
Date 2022-05-04 14:18:42 -0700 (Wed, 04 May 2022)


Log Message
REGRESSION (r293427): [ iOS ] http/tests/quicklook/same-origin-xmlhttprequest-allowed.html is a constant crash and failure (240024)
https://bugs.webkit.org/show_bug.cgi?id=240024
rdar://92678727

Reviewed by Wenson Hsieh.

Source/WebCore:

No new tests, this will fix a failing test.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::isLoadingRemoteArchive):
(WebCore::DocumentLoader::commitData):
(WebCore::DocumentLoader::scheduleArchiveLoad):
* loader/DocumentLoader.h:

LayoutTests:

* platform/ios/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/DocumentLoader.cpp
trunk/Source/WebCore/loader/DocumentLoader.h




Diff

Modified: trunk/LayoutTests/ChangeLog (293789 => 293790)

--- trunk/LayoutTests/ChangeLog	2022-05-04 20:59:37 UTC (rev 293789)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 21:18:42 UTC (rev 293790)
@@ -1,3 +1,13 @@
+2022-05-04  Kate Cheney  
+
+REGRESSION (r293427): [ iOS ] http/tests/quicklook/same-origin-xmlhttprequest-allowed.html is a constant crash and failure (240024)
+https://bugs.webkit.org/show_bug.cgi?id=240024
+rdar://92678727
+
+Reviewed by Wenson Hsieh.
+
+* platform/ios/TestExpectations:
+
 2022-05-04  Karl Rackler  
 
 [Gardening][iOS Mac ] imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/same-hash.html  is a flaky text failure


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293789 => 293790)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 20:59:37 UTC (rev 293789)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 21:18:42 UTC (rev 293790)
@@ -3593,8 +3593,6 @@
 # iOS has a WebGPU implementation.
 http/tests/webgpu [ Pass ]
 
-webkit.org/b/240024 http/tests/quicklook/same-origin-xmlhttprequest-allowed.html [ Pass Failure Crash ]
-
 webkit.org/b/240037 css3/background/background-repeat-space-content.html [ Pass ImageOnlyFailure ]
 
 webkit.org/b/240065 fast/forms/auto-fill-button/input-auto-fill-button.html [ Pass Failure ]


Modified: trunk/Source/WebCore/ChangeLog (293789 => 293790)

--- trunk/Source/WebCore/ChangeLog	2022-05-04 20:59:37 UTC (rev 293789)
+++ trunk/Source/WebCore/ChangeLog	2022-05-04 21:18:42 UTC (rev 293790)
@@ -1,3 +1,19 @@
+2022-05-04  Kate Cheney  
+
+REGRESSION (r293427): [ iOS ] http/tests/quicklook/same-origin-xmlhttprequest-allowed.html is a constant crash and failure (240024)
+https://bugs.webkit.org/show_bug.cgi?id=240024
+rdar://92678727
+
+Reviewed by Wenson Hsieh.
+
+No new tests, this will fix a failing test.
+
+* loader/DocumentLoader.cpp:
+(WebCore::DocumentLoader::isLoadingRemoteArchive):
+(WebCore::DocumentLoader::commitData):
+(WebCore::DocumentLoader::scheduleArchiveLoad):
+* loader/DocumentLoader.h:
+
 2022-05-04  Brent Fulgham  
 
 Remove deprecated 'JavaEnabled' feature flag and related code


Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (293789 => 293790)

--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2022-05-04 20:59:37 UTC (rev 293789)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2022-05-04 21:18:42 UTC (rev 293790)
@@ -1213,10 +1213,21 @@
 }
 #endif
 
+#if ENABLE(WEB_ARCHIVE)
+bool DocumentLoader::isLoadingRemoteArchive() const
+{
+bool isQuickLookPreview = false;
+#if USE(QUICK_LOOK)
+isQuickLookPreview = isQuickLookPreviewURL(m_response.url());
+#endif
+return m_archive && !m_frame->settings().webArchiveTestingModeEnabled() && !isQuickLookPreview;
+}
+#endif
+
 void DocumentLoader::commitData(const SharedBuffer& data)
 {
 #if ENABLE(WEB_ARCHIVE)
-URL documentOrEmptyURL = m_archive && !m_frame->settings().webArchiveTestingModeEnabled() ? URL() : documentURL();
+URL documentOrEmptyURL = isLoadingRemoteArchive() ? URL() : documentURL();
 #else
 URL documentOrEmptyURL = documentURL();
 #endif
@@ -1245,7 +1256,7 @@
 return;
 
 #if ENABLE(WEB_ARCHIVE)
-if (m_archive && !m_frame->settings().webArchiveTestingModeEnabled()) {
+if (isLoadingRemoteArchive()) {
 document.setBaseURLOverride(m_archive->mainResource()->url());
 if (LegacySchemeRegistry::shouldTreatURLSchemeAsLocal(documentURL().protocol().toStringWithoutCopying()))
 document.securityOrigin().grantLoadLocalResources();
@@ -1801,7 +1812,7 @@
 return false;
 
 #if ENABLE(WEB_ARCHIVE)
-if (!m_frame->settings().webArchiveTestingModeEnabled()) {
+if (isLoadingRemoteArchive()) {
 DOCUMENTLOADER_RELEASE_LOG("scheduleArchiveLoad: Failed to unarchive subresource");
 loader.didFail(ResourceError(errorDomainWebKitInternal, 0, request.url(), "Failed to unarchive subresource"_s));
   

[webkit-changes] [293789] tags/WebKit-7614.1.11.6/

2022-05-04 Thread repstein
Title: [293789] tags/WebKit-7614.1.11.6/








Revision 293789
Author repst...@apple.com
Date 2022-05-04 13:59:37 -0700 (Wed, 04 May 2022)


Log Message
Tag WebKit-7614.1.11.6.

Added Paths

tags/WebKit-7614.1.11.6/




Diff




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


[webkit-changes] [293788] branches/safari-614.1.11-branch/Source

2022-05-04 Thread repstein
Title: [293788] branches/safari-614.1.11-branch/Source








Revision 293788
Author repst...@apple.com
Date 2022-05-04 13:41:20 -0700 (Wed, 04 May 2022)


Log Message
Versioning.

WebKit-7614.1.11.6

Modified Paths

branches/safari-614.1.11-branch/Source/_javascript_Core/Configurations/Version.xcconfig
branches/safari-614.1.11-branch/Source/ThirdParty/ANGLE/Configurations/Version.xcconfig
branches/safari-614.1.11-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig
branches/safari-614.1.11-branch/Source/WebCore/Configurations/Version.xcconfig
branches/safari-614.1.11-branch/Source/WebCore/PAL/Configurations/Version.xcconfig
branches/safari-614.1.11-branch/Source/WebGPU/Configurations/Version.xcconfig
branches/safari-614.1.11-branch/Source/WebInspectorUI/Configurations/Version.xcconfig
branches/safari-614.1.11-branch/Source/WebKit/Configurations/Version.xcconfig
branches/safari-614.1.11-branch/Source/WebKitLegacy/mac/Configurations/Version.xcconfig




Diff

Modified: branches/safari-614.1.11-branch/Source/_javascript_Core/Configurations/Version.xcconfig (293787 => 293788)

--- branches/safari-614.1.11-branch/Source/_javascript_Core/Configurations/Version.xcconfig	2022-05-04 20:36:52 UTC (rev 293787)
+++ branches/safari-614.1.11-branch/Source/_javascript_Core/Configurations/Version.xcconfig	2022-05-04 20:41:20 UTC (rev 293788)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 614;
 MINOR_VERSION = 1;
 TINY_VERSION = 11;
-MICRO_VERSION = 5;
+MICRO_VERSION = 6;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: branches/safari-614.1.11-branch/Source/ThirdParty/ANGLE/Configurations/Version.xcconfig (293787 => 293788)

--- branches/safari-614.1.11-branch/Source/ThirdParty/ANGLE/Configurations/Version.xcconfig	2022-05-04 20:36:52 UTC (rev 293787)
+++ branches/safari-614.1.11-branch/Source/ThirdParty/ANGLE/Configurations/Version.xcconfig	2022-05-04 20:41:20 UTC (rev 293788)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 614;
 MINOR_VERSION = 1;
 TINY_VERSION = 11;
-MICRO_VERSION = 5;
+MICRO_VERSION = 6;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: branches/safari-614.1.11-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig (293787 => 293788)

--- branches/safari-614.1.11-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig	2022-05-04 20:36:52 UTC (rev 293787)
+++ branches/safari-614.1.11-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig	2022-05-04 20:41:20 UTC (rev 293788)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 614;
 MINOR_VERSION = 1;
 TINY_VERSION = 11;
-MICRO_VERSION = 5;
+MICRO_VERSION = 6;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: branches/safari-614.1.11-branch/Source/WebCore/Configurations/Version.xcconfig (293787 => 293788)

--- branches/safari-614.1.11-branch/Source/WebCore/Configurations/Version.xcconfig	2022-05-04 20:36:52 UTC (rev 293787)
+++ branches/safari-614.1.11-branch/Source/WebCore/Configurations/Version.xcconfig	2022-05-04 20:41:20 UTC (rev 293788)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 614;
 MINOR_VERSION = 1;
 TINY_VERSION = 11;
-MICRO_VERSION = 5;
+MICRO_VERSION = 6;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: branches/safari-614.1.11-branch/Source/WebCore/PAL/Configurations/Version.xcconfig (293787 => 293788)

--- branches/safari-614.1.11-branch/Source/WebCore/PAL/Configurations/Version.xcconfig	2022-05-04 20:36:52 UTC (rev 293787)
+++ branches/safari-614.1.11-branch/Source/WebCore/PAL/Configurations/Version.xcconfig	2022-05-04 20:41:20 UTC (rev 293788)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 614;
 MINOR_VERSION = 1;
 TINY_VERSION = 11;
-MICRO_VERSION = 5;
+MICRO_VERSION = 6;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: branches/safari-614.1.11-branch/Source/WebGPU/Configurations/Version.xcconfig (293787 => 293788)

--- branches/safari-614.1.11-branch/Source/WebGPU/Configurations/Version.xcconfig	2022-05-04 20:36:52 UTC (rev 293787)
+++ branches/safari-614.1.11-branch/Source/WebGPU/Configurations/Version.xcconfig	2022-05-04 20:41:20 UTC (rev 293788)
@@ -24,7 +24,7 @@
 MAJOR_VERSION = 614;
 MINOR_VERSION = 1;
 TINY_VERSION = 11;
-MICRO_VERSION = 5;
+MICRO_VERSION = 6;
 NANO_VERSION = 0;
 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION);
 


Modified: branches/safari-614.1.11-branch/Source/WebInspectorUI/Configurations/Version.xcconfig (293787 => 293788)

--- branches/safari-614.1.11-branch/Source/WebInspectorUI/Configurations/Version.xcconfig	2022-05-04 20:36:52 UTC (rev 293787)
+++ branches/safari-614.1.11-branch/Source/WebInspectorUI/Configurations/Version.xcconfig	2022-05-04 20:41:20 UTC (rev 293788)
@@ -1,7 +1,7 @@
 MAJOR_VERSION = 614;
 MINOR_VERSION = 1;
 TINY_VERSION = 11;

[webkit-changes] [293787] trunk/LayoutTests

2022-05-04 Thread rackler
Title: [293787] trunk/LayoutTests








Revision 293787
Author rack...@apple.com
Date 2022-05-04 13:36:52 -0700 (Wed, 04 May 2022)


Log Message
[Gardening][iOS Mac ] imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/same-hash.html  is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=237552

Unreviewed test gardening.

Canonical link: https://commits.webkit.org/250266@main

Modified Paths

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




Diff

Modified: trunk/LayoutTests/ChangeLog (293786 => 293787)

--- trunk/LayoutTests/ChangeLog	2022-05-04 20:28:40 UTC (rev 293786)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 20:36:52 UTC (rev 293787)
@@ -1,5 +1,15 @@
 2022-05-04  Karl Rackler  
 
+[Gardening][iOS Mac ] imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/same-hash.html  is a flaky text failure
+https://bugs.webkit.org/show_bug.cgi?id=237552
+
+Unreviewed test gardening. 
+
+* platform/ios/TestExpectations:
+* platform/mac-wk1/TestExpectations:
+
+2022-05-04  Karl Rackler  
+
 REGRESSION (r293506): [ iOS ][ macOS ] imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html is a flaky failure
 https://bugs.webkit.org/show_bug.cgi?id=240074
 


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293786 => 293787)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 20:28:40 UTC (rev 293786)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 20:36:52 UTC (rev 293787)
@@ -3603,3 +3603,4 @@
 
 webkit.org/b/240074 imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ]
 
+webkit.org/b/237552 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/same-hash.html [ Pass Failure ]


Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (293786 => 293787)

--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2022-05-04 20:28:40 UTC (rev 293786)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2022-05-04 20:36:52 UTC (rev 293787)
@@ -1880,3 +1880,6 @@
 webkit.org/b/239835 webgl/2.0.0/conformance2/textures/video/tex-3d-rg16f-rg-half_float.html [ Pass Timeout ]
 webkit.org/b/239835 webgl/2.0.0/conformance2/textures/video/tex-3d-rgb5_a1-rgba-unsigned_byte.html [ Pass Timeout ]
 webkit.org/b/239835 webgl/2.0.0/conformance2/textures/video/tex-3d-rgba4-rgba-unsigned_byte.html [ Pass Timeout ]
+
+webkit.org/b/237552 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/same-hash.html [ Pass Failure ]
+






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


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

2022-05-04 Thread j_pascoe
Title: [293786] trunk/Source/WebKit








Revision 293786
Author j_pas...@apple.com
Date 2022-05-04 13:28:40 -0700 (Wed, 04 May 2022)


Log Message
[WebAuthn] Remove user gesture requirement for mediation=conditional assertions
https://bugs.webkit.org/show_bug.cgi?id=240038
rdar://92137603

Reviewed by Brent Fulgham.

Conditional assertions are non-modal and already require a gesture to complete via
a different mechanism.

Tested manually on device.

* UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
(WebKit::configurationAssertionRequestContext):
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm
trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (293785 => 293786)

--- trunk/Source/WebKit/ChangeLog	2022-05-04 20:22:05 UTC (rev 293785)
+++ trunk/Source/WebKit/ChangeLog	2022-05-04 20:28:40 UTC (rev 293786)
@@ -1,3 +1,21 @@
+2022-05-04  J Pascoe  
+
+[WebAuthn] Remove user gesture requirement for mediation=conditional assertions
+https://bugs.webkit.org/show_bug.cgi?id=240038
+rdar://92137603
+
+Reviewed by Brent Fulgham.
+
+Conditional assertions are non-modal and already require a gesture to complete via
+a different mechanism.
+
+Tested manually on device.
+
+* UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
+(WebKit::configurationAssertionRequestContext):
+* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
+(WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):
+
 2022-05-04  Brent Fulgham  
 
 Remove deprecated 'JavaEnabled' feature flag and related code


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm (293785 => 293786)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm	2022-05-04 20:22:05 UTC (rev 293785)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm	2022-05-04 20:28:40 UTC (rev 293786)
@@ -321,8 +321,11 @@
 
 auto requestContext = adoptNS([allocASCCredentialRequestContextInstance() initWithRequestTypes:requestTypes]);
 [requestContext setRelyingPartyIdentifier:options.rpId];
-if (mediation == MediationRequirement::Conditional && [requestContext respondsToSelector:@selector(setRequestStyle:)])
+if (mediation == MediationRequirement::Conditional) {
+if (![requestContext respondsToSelector:@selector(setRequestStyle:)])
+return nil;
 requestContext.get().requestStyle = ASCredentialRequestStyleAutoFill;
+}
 setGlobalFrameIDForContext(requestContext, globalFrameID);
 
 if (requestTypes & ASCCredentialRequestTypePlatformPublicKeyAssertion) {


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp (293785 => 293786)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp	2022-05-04 20:22:05 UTC (rev 293785)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp	2022-05-04 20:28:40 UTC (rev 293786)
@@ -107,7 +107,7 @@
 handler({ }, (AuthenticatorAttachment)0, ExceptionData { NotAllowedError, "This request has been cancelled by the user."_s });
 };
 
-if (!data.processingUserGesture && !m_webPageProxy.websiteDataStore().authenticatorManager().isVirtual())
+if (!data.processingUserGesture && data.mediation != MediationRequirement::Conditional && !m_webPageProxy.websiteDataStore().authenticatorManager().isVirtual())
 m_webPageProxy.uiClient().requestWebAuthenticationNoGesture(origin, WTFMove(afterConsent));
 else
 afterConsent(true);






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


[webkit-changes] [293785] trunk

2022-05-04 Thread bfulgham
Title: [293785] trunk








Revision 293785
Author bfulg...@apple.com
Date 2022-05-04 13:22:05 -0700 (Wed, 04 May 2022)


Log Message
Remove deprecated 'JavaEnabled' feature flag and related code
https://bugs.webkit.org/show_bug.cgi?id=240044

Reviewed by Darin Adler.

We removed support for Java Plug-Ins in macOS 10.15, but never removed the preference. To reduce code complexity
and build times we should remove this unused preference, leaving non-functional stubs to avoid breaking binaries
that expect to call their accessor methods.

Source/WebCore:

* loader/ResourceLoadStatistics.cpp:
(WebCore::navigatorAPIEnumToString):
* loader/ResourceLoadStatistics.h:
* loader/SubframeLoader.cpp:
(WebCore::FrameLoader::SubframeLoader::pluginIsLoadable):
* page/Navigator.cpp:
(WebCore::Navigator::javaEnabled const): Deleted.
* page/Navigator.h:

Source/WebKit:

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaEnabled):
(WKPreferencesGetJavaEnabled):
(WKPreferencesSetJavaEnabledForLocalFiles):
(WKPreferencesGetJavaEnabledForLocalFiles):
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences encodeWithCoder:]):
(-[WKPreferences initWithCoder:]):
(-[WKPreferences javaEnabled]):
(-[WKPreferences setJavaEnabled:]):
(-[WKPreferences _setJavaEnabledForLocalFiles:]):
(-[WKPreferences _javaEnabledForLocalFiles]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/glib/WebKitSettings.cpp:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::createWithLegacyDefaults):

Source/WebKitLegacy/mac:

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController init]):
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.h:
* WebView/WebPreferences.mm:
(-[WebPreferences isJavaEnabled]):
(-[WebPreferences setJavaEnabled:]):

Source/WebKitLegacy/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::openLocalFrontend):
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::isJavaEnabled):
(WebPreferences::setJavaEnabled):
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WTF:

* Scripts/Preferences/WebPreferences.yaml:

Tools:

* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/Coding.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/Copying.mm:
(TEST):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp
trunk/Source/WebCore/loader/ResourceLoadStatistics.h
trunk/Source/WebCore/loader/SubframeLoader.cpp
trunk/Source/WebCore/loader/SubframeLoader.h
trunk/Source/WebCore/page/Navigator.cpp
trunk/Source/WebCore/page/Navigator.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp
trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h
trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
trunk/Source/WebKit/UIProcess/WebPreferences.cpp
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.h
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
trunk/Source/WebKitLegacy/win/ChangeLog
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.cpp
trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h
trunk/Source/WebKitLegacy/win/WebPreferences.cpp
trunk/Source/WebKitLegacy/win/WebView.cpp
trunk/Tools/ChangeLog
trunk/Tools/DumpRenderTree/TestOptions.cpp
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
trunk/Tools/TestWebKitAPI/Tests/WebKit/WKPreferences.cpp
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Coding.mm
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Copying.mm




Diff

Modified: trunk/Source/WTF/ChangeLog (293784 => 293785)

--- trunk/Source/WTF/ChangeLog	2022-05-04 20:20:24 UTC (rev 293784)
+++ trunk/Source/WTF/ChangeLog	2022-05-04 20:22:05 UTC (rev 293785)
@@ -1,3 +1,16 @@
+2022-05-04  Brent Fulgham  
+
+Remove deprecated 'JavaEnabled' feature flag and related code
+https://bugs.webkit.org/show_bug.cgi?id=240044
+
+Reviewed by Darin Adler.
+
+We removed support for Java Plug-Ins in macOS 10.15, but never removed the preference. To reduce code complexity
+and build times we should remove this unused preference, leaving non-functional stubs to avoid breaking binaries
+that expect to call their accessor methods.
+
+* Scripts/Preferences/WebPreferences.yaml:
+
 

[webkit-changes] [293784] trunk/Tools

2022-05-04 Thread jbedard
Title: [293784] trunk/Tools








Revision 293784
Author jbed...@apple.com
Date 2022-05-04 13:20:24 -0700 (Wed, 04 May 2022)


Log Message
[git-webkit] Populate commit message with bug details
https://bugs.webkit.org/show_bug.cgi?id=240022


Reviewed by Dewei Zhu.

* Tools/Scripts/hooks/prepare-commit-msg: Pull title and bugs from environment variables.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/popen.py:
(PopenBase.__init__): Support environment variables.
(PopenBase.poll): Ditto.
(Popen.__init__): Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/subprocess.py:
(Subprocess.CommandRoute.__init__): Support environment variables.
(Subprocess.CommandRoute.matches): Ditto
(Subprocess.CommandRoute.__call__): Ditto.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py: Pull title and bugs from
environment variables.
(Branch.main): Pass bug title and URLs to caller via args.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_commit): Pass title and bug urls to `git commit`.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

Canonical link: https://commits.webkit.org/250263@main

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/hooks/prepare-commit-msg
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/popen.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/subprocess.py
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (293783 => 293784)

--- trunk/Tools/ChangeLog	2022-05-04 19:20:58 UTC (rev 293783)
+++ trunk/Tools/ChangeLog	2022-05-04 20:20:24 UTC (rev 293784)
@@ -1,3 +1,32 @@
+2022-05-04  Jonathan Bedard  
+
+[git-webkit] Populate commit message with bug details
+https://bugs.webkit.org/show_bug.cgi?id=240022
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/hooks/prepare-commit-msg: Pull title and bugs from environment variables.
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/popen.py:
+(PopenBase.__init__): Support environment variables.
+(PopenBase.poll): Ditto.
+(Popen.__init__): Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/subprocess.py:
+(Subprocess.CommandRoute.__init__): Support environment variables.
+(Subprocess.CommandRoute.matches): Ditto
+(Subprocess.CommandRoute.__call__): Ditto.
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py: Pull title and bugs from
+environment variables.
+(Branch.main): Pass bug title and URLs to caller via args.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
+(PullRequest.create_commit): Pass title and bug urls to `git commit`.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
+
 2022-05-03  Robert Jenner  
 
 REGRESSION(r287574-r287580): [ iOS ] 3 TestWebKitAPI.WebKitLegacy.* tests are constantly crashing (ScrollingDoesNotPauseMedia, PreemptVideoFullscreen, AudioSessionCategoryIOS)


Modified: trunk/Tools/Scripts/hooks/prepare-commit-msg (293783 => 293784)

--- trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-05-04 19:20:58 UTC (rev 293783)
+++ trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-05-04 20:20:24 UTC (rev 293784)
@@ -58,13 +58,17 @@
 dirname = line.split(':')[0]
 continue
 
-return '''Need a short description (OOPS!).
-Need the bug URL (OOPS!).
+return '''{title}
+{bugs}
 
 Reviewed by NOBODY (OOPS!).
 
-{}
-'''.format('\n'.join(commit_message))
+{content}
+'''.format(
+title=os.environ.get('COMMIT_MESSAGE_TITLE', '') or 'Need a short description (OOPS!).',
+bugs=os.environ.get('COMMIT_MESSAGE_BUG', '') or 

[webkit-changes] [293783] trunk/Tools

2022-05-04 Thread jenner
Title: [293783] trunk/Tools








Revision 293783
Author jen...@apple.com
Date 2022-05-04 12:20:58 -0700 (Wed, 04 May 2022)


Log Message
REGRESSION(r287574-r287580): [ iOS ] 3 TestWebKitAPI.WebKitLegacy.* tests are constantly crashing (ScrollingDoesNotPauseMedia, PreemptVideoFullscreen, AudioSessionCategoryIOS)
https://bugs.webkit.org/show_bug.cgi?id=237125>

Unreviewed test gardening. Disabling API-tests for iOS.

* TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/250262@main

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm
trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm
trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm




Diff

Modified: trunk/Tools/ChangeLog (293782 => 293783)

--- trunk/Tools/ChangeLog	2022-05-04 19:03:42 UTC (rev 293782)
+++ trunk/Tools/ChangeLog	2022-05-04 19:20:58 UTC (rev 293783)
@@ -1,3 +1,17 @@
+2022-05-03  Robert Jenner  
+
+REGRESSION(r287574-r287580): [ iOS ] 3 TestWebKitAPI.WebKitLegacy.* tests are constantly crashing (ScrollingDoesNotPauseMedia, PreemptVideoFullscreen, AudioSessionCategoryIOS)
+https://bugs.webkit.org/show_bug.cgi?id=237125>
+
+Unreviewed test gardening. Disabling API-tests for iOS.
+
+* TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
+(TestWebKitAPI::TEST):
+* TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm:
+(TestWebKitAPI::TEST):
+* TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:
+(TestWebKitAPI::TEST):
+
 2022-05-03  Jonathan Bedard  
 
 [ews.webkit.org] Hide sensitive content for alternate remotes


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm (293782 => 293783)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm	2022-05-04 19:03:42 UTC (rev 293782)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm	2022-05-04 19:20:58 UTC (rev 293783)
@@ -80,7 +80,12 @@
 #endif
 }
 
+// FIXME Re-enable when https://bugs.webkit.org/show_bug.cgi?id=237125 is resovled 
+#if PLATFORM(IOS)
+TEST(WebKitLegacy, DISABLED_AudioSessionCategoryIOS)
+#else
 TEST(WebKitLegacy, AudioSessionCategoryIOS)
+#endif
 {
 WebCore::DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(true);
 RetainPtr uiWindow = adoptNS([[UIWindow alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm (293782 => 293783)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm	2022-05-04 19:03:42 UTC (rev 293782)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm	2022-05-04 19:20:58 UTC (rev 293783)
@@ -82,7 +82,12 @@
 
 namespace TestWebKitAPI {
 
+// FIXME Re-enable when https://bugs.webkit.org/show_bug.cgi?id=237125 is resovled 
+#if PLATFORM(IOS)
+TEST(WebKitLegacy, DISABLED_PreemptVideoFullscreen)
+#else
 TEST(WebKitLegacy, PreemptVideoFullscreen)
+#endif
 {
 RetainPtr preferences = [WebPreferences standardPreferences];
 preferences.get().mediaDataLoadsAutomatically = YES;


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm (293782 => 293783)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm	2022-05-04 19:03:42 UTC (rev 293782)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm	2022-05-04 19:20:58 UTC (rev 293783)
@@ -74,7 +74,12 @@
 
 namespace TestWebKitAPI {
 
+// FIXME Re-enable when https://bugs.webkit.org/show_bug.cgi?id=237125 is resovled 
+#if PLATFORM(IOS)
+TEST(WebKitLegacy, DISABLED_ScrollingDoesNotPauseMedia)
+#else
 TEST(WebKitLegacy, ScrollingDoesNotPauseMedia)
+#endif
 {
 RetainPtr preferences = [WebPreferences standardPreferences];
 preferences.get().mediaDataLoadsAutomatically = YES;






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


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

2022-05-04 Thread nham
Title: [293782] trunk/Source/WebKit








Revision 293782
Author n...@apple.com
Date 2022-05-04 12:03:42 -0700 (Wed, 04 May 2022)


Log Message
Add push service result logging
https://bugs.webkit.org/show_bug.cgi?id=240035

Reviewed by Geoffrey Garen.

This adds logging to make it easier to debug certain errors we have seen internally (e.g.
unexpectedly missing subscriptions and service workers that aren't spawning to service push
events):

1. In some cases, it appears that a push event is coming in, but the service worker to
   handle the event never spawns. This can happen if we think an origin doesn't have
   permission to show a notification in UIProcess and we bail out early. Currently we don't
   have logging for this case.

   To fix this, I removed the early bail-out in NetworkProcessProxy::processPushMessage
   entirely. Instead, we always IPC the message to NetworkProcess::processPushMessage.

   This will trigger existing logging around whether a service worker spawns to handle the
   push event on the NetworkProcess side. The optimization to not spawn NetworkProcess in
   the permission-denied case will not be used in the long run, because we plan to move the
   subscription to the ignore list in this case (see the FIXME in
   NetworkProcess::processPushMessage), which requires spawning NetworkProcess to message
   webpushd anyway.

2. For push service requests that produce a result, we additionally log whether or not the
   result exists (e.g. to know if a push subscription exists or not).

3. Add logging for the cases where WebKit explicitly asks webpushd to bulk-remove
   subscriptions.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::processPushMessage):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::processPushMessage):
* webpushd/PushService.mm:
(WebPushD::PushServiceRequestImpl::fulfill):
(WebPushD::PushService::removeRecordsForBundleIdentifier):
(WebPushD::PushService::removeRecordsForBundleIdentifierAndOrigin):

Canonical link: https://commits.webkit.org/250261@main

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
trunk/Source/WebKit/webpushd/PushService.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (293781 => 293782)

--- trunk/Source/WebKit/ChangeLog	2022-05-04 18:14:22 UTC (rev 293781)
+++ trunk/Source/WebKit/ChangeLog	2022-05-04 19:03:42 UTC (rev 293782)
@@ -1,3 +1,44 @@
+2022-05-03  Ben Nham  
+
+Add push service result logging
+https://bugs.webkit.org/show_bug.cgi?id=240035
+
+Reviewed by Geoffrey Garen.
+
+This adds logging to make it easier to debug certain errors we have seen internally (e.g.
+unexpectedly missing subscriptions and service workers that aren't spawning to service push
+events):
+
+1. In some cases, it appears that a push event is coming in, but the service worker to
+   handle the event never spawns. This can happen if we think an origin doesn't have
+   permission to show a notification in UIProcess and we bail out early. Currently we don't
+   have logging for this case.
+
+   To fix this, I removed the early bail-out in NetworkProcessProxy::processPushMessage
+   entirely. Instead, we always IPC the message to NetworkProcess::processPushMessage.
+
+   This will trigger existing logging around whether a service worker spawns to handle the
+   push event on the NetworkProcess side. The optimization to not spawn NetworkProcess in
+   the permission-denied case will not be used in the long run, because we plan to move the
+   subscription to the ignore list in this case (see the FIXME in
+   NetworkProcess::processPushMessage), which requires spawning NetworkProcess to message
+   webpushd anyway.
+
+2. For push service requests that produce a result, we additionally log whether or not the
+   result exists (e.g. to know if a push subscription exists or not).
+
+3. Add logging for the cases where WebKit explicitly asks webpushd to bulk-remove
+   subscriptions.
+
+* NetworkProcess/NetworkProcess.cpp:
+(WebKit::NetworkProcess::processPushMessage):
+* UIProcess/Network/NetworkProcessProxy.cpp:
+(WebKit::NetworkProcessProxy::processPushMessage):
+* webpushd/PushService.mm:
+(WebPushD::PushServiceRequestImpl::fulfill):
+(WebPushD::PushService::removeRecordsForBundleIdentifier):
+(WebPushD::PushService::removeRecordsForBundleIdentifierAndOrigin):
+
 2022-05-04  Kimmo Kinnunen  
 
 DisplayList::Recorder has redundant, unused flushContext


Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (293781 => 293782)

--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2022-05-04 18:14:22 UTC (rev 293781)
+++ 

[webkit-changes] [293781] trunk/LayoutTests

2022-05-04 Thread rackler
Title: [293781] trunk/LayoutTests








Revision 293781
Author rack...@apple.com
Date 2022-05-04 11:14:22 -0700 (Wed, 04 May 2022)


Log Message
REGRESSION (r293506): [ iOS ][ macOS ] imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=240074

Unreviewed test gardening.

* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:

Canonical link: https://commits.webkit.org/250260@main

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (293780 => 293781)

--- trunk/LayoutTests/ChangeLog	2022-05-04 17:47:23 UTC (rev 293780)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 18:14:22 UTC (rev 293781)
@@ -1,5 +1,15 @@
 2022-05-04  Karl Rackler  
 
+REGRESSION (r293506): [ iOS ][ macOS ] imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html is a flaky failure
+https://bugs.webkit.org/show_bug.cgi?id=240074
+
+Unreviewed test gardening. 
+
+* platform/ios/TestExpectations:
+* platform/mac/TestExpectations:
+
+2022-05-04  Karl Rackler  
+
 [Rebaseline] REGRESSION (r293038):[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
 https://bugs.webkit.org/show_bug.cgi?id=240065
 


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293780 => 293781)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 17:47:23 UTC (rev 293780)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 18:14:22 UTC (rev 293781)
@@ -3600,3 +3600,6 @@
 webkit.org/b/240065 fast/forms/auto-fill-button/input-auto-fill-button.html [ Pass Failure ]
 
 webkit.org/b/240069 fast/css/continuationCrash.html [ Pass Failure ]
+
+webkit.org/b/240074 imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ]
+


Modified: trunk/LayoutTests/platform/mac/TestExpectations (293780 => 293781)

--- trunk/LayoutTests/platform/mac/TestExpectations	2022-05-04 17:47:23 UTC (rev 293780)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2022-05-04 18:14:22 UTC (rev 293781)
@@ -2297,3 +2297,6 @@
 webkit.org/b/239794 webanimations/accelerated-animation-after-forward-filling-animation.html [ Pass ImageOnlyFailure ]
 
 webkit.org/b/239990 css3/calc/transitions-dependent.html [ Pass Failure ]
+
+webkit.org/b/240074 imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ]
+






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


[webkit-changes] [293780] trunk/Tools

2022-05-04 Thread jbedard
Title: [293780] trunk/Tools








Revision 293780
Author jbed...@apple.com
Date 2022-05-04 10:47:23 -0700 (Wed, 04 May 2022)


Log Message
[ews.webkit.org] Hide sensitive content for alternate remotes
https://bugs.webkit.org/show_bug.cgi?id=239988


Reviewed by Aakash Jain.

* CISupport/ews-build/steps.py:
(ConfigureBuild.add_pr_details): PRs targeting alternate hosts are sensitive.
(DetermineLandedIdentifier.start): Hide step for sensitive PRs.
(AddReviewerToChangeLog.hideStepIf): Ditto.
(ValidateCommitMessage): Implement with steps.ShellSequence
(ValidateCommitMessage.__init__):
(ValidateCommitMessage.run): Use grep to search for appropriate commit message string and hide
the content of the commit message itself.
(ValidateCommitMessage.start): Logic moved to ValidateCommitMessage.run.
(ValidateCommitMessage.evaluateCommand): Ditto.
* CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/250259@main

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/steps.py (293779 => 293780)

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-04 17:44:44 UTC (rev 293779)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-04 17:47:23 UTC (rev 293780)
@@ -549,6 +549,9 @@
 owners = self.getProperty('owners', [])
 revision = self.getProperty('github.head.sha')
 
+if self.getProperty('project') != 'WebKit/WebKit':
+self.setProperty('sensitive', True)
+
 self.setProperty('change_id', revision[:HASH_LENGTH_TO_DISPLAY], 'ConfigureBuild')
 
 title = f': {title}' if title else ''
@@ -4688,7 +4691,10 @@
 comment += f'\n\nReviewed commits have been landed. Closing PR #{pr_number} and removing active labels.'
 return comment
 
+def hideStepIf(self, results, step):
+return self.getProperty('sensitive', False)
 
+
 class CheckPatchStatusOnEWSQueues(buildstep.BuildStep, BugzillaMixin):
 name = 'check-status-on-other-ewses'
 descriptionDone = ['Checked patch status on other queues']
@@ -4965,14 +4971,14 @@
 return self.getProperty('github.number') and self.getProperty('reviewers_full_names')
 
 def hideStepIf(self, results, step):
-return not self.doStepIf(step)
+return not self.doStepIf(step) or self.getProperty('sensitive', False)
 
 
-class ValidateCommitMessage(shell.ShellCommand):
+class ValidateCommitMessage(steps.ShellSequence, ShellMixin):
 name = 'validate-commit-message'
 haltOnFailure = False
 flunkOnFailure = True
-OOPS_RE = re.compile(r'\(OO*PP*S!\)')
+OOPS_RE = 'OO*PP*S!'
 REVIEWED_STRINGS = (
 'Reviewed by',
 'Unreviewed',
@@ -4982,38 +4988,38 @@
 
 def __init__(self, **kwargs):
 super(ValidateCommitMessage, self).__init__(logEnviron=False, timeout=60, **kwargs)
-self.summary = 'Patches have no commit message'
 
-def start(self, BufferLogObserverClass=logobserver.BufferLogObserver):
+@defer.inlineCallbacks
+def run(self, BufferLogObserverClass=logobserver.BufferLogObserver):
 base_ref = self.getProperty('github.base.ref', DEFAULT_BRANCH)
 head_ref = self.getProperty('github.head.ref', DEFAULT_BRANCH)
-self.command = ['git', 'log', head_ref, f'^{base_ref}']
 
+self.commands = []
+commands = [
+f"git log {head_ref} ^{base_ref} | grep -q '{self.OOPS_RE}' && echo 'Commit message contains (OOPS!)' || test $? -eq 1",
+"git log {} ^{} | grep -q '\\({}\\)' || echo 'No reviewer information in commit message'".format(
+head_ref, base_ref,
+'\\|'.join(self.REVIEWED_STRINGS),
+),
+]
+for command in commands:
+self.commands.append(util.ShellArg(command=self.shell_command(command), logname='stdio', haltOnFailure=True))
+
 self.log_observer = BufferLogObserverClass(wantStderr=True)
 self.addLogObserver('stdio', self.log_observer)
 
-return super(ValidateCommitMessage, self).start()
+rc = yield super(ValidateCommitMessage, self).run()
 
-def getResultSummary(self):
-if self.results in (SUCCESS, FAILURE):
-return {'step': self.summary}
-return super(ValidateCommitMessage, self).getResultSummary()
-
-def evaluateCommand(self, cmd):
-rc = super(ValidateCommitMessage, self).evaluateCommand(cmd)
 if rc == SKIPPED:
+self.summary = 'Patches have no commit message'
 return rc
 
-if rc == SUCCESS:
+log_text = self.log_observer.getStdout().rstrip()
+if log_text:
+self.summary = log_text
+rc = FAILURE
+elif rc == SUCCESS:
 self.summary = 'Validated commit message'
-log_text = self.log_observer.getStdout()
-if self.OOPS_RE.search(log_text):
-

[webkit-changes] [293779] trunk/Source

2022-05-04 Thread mark . lam
Title: [293779] trunk/Source








Revision 293779
Author mark@apple.com
Date 2022-05-04 10:44:44 -0700 (Wed, 04 May 2022)


Log Message
Use IterationStatus in more places.
https://bugs.webkit.org/show_bug.cgi?id=239864

Reviewed by Saam Barati.

Source/_javascript_Core:

There's no need for a StackVisitor::Status and a VMInspector::FunctorStatus which
represent the same idea.

* API/JSContextRef.cpp:
(BacktraceFunctor::operator() const):
* bytecode/CodeBlock.cpp:
(JSC::RecursionCheckFunctor::operator() const):
* debugger/DebuggerCallFrame.cpp:
(JSC::LineAndColumnFunctor::operator() const):
* inspector/ScriptCallStackFactory.cpp:
(Inspector::CreateScriptCallStackFunctor::operator() const):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::callerSourceOrigin):
(JSC::CallFrame::globalObjectOfClosestCodeBlock):
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::GetStackTraceFunctor::operator() const):
(JSC::Interpreter::getStackTrace):
(JSC::GetCatchHandlerFunctor::operator() const):
(JSC::UnwindFunctor::operator() const):
* interpreter/ShadowChicken.cpp:
(JSC::ShadowChicken::update):
* interpreter/StackVisitor.h:
(JSC::StackVisitor::visit):
(JSC::CallerFunctor::operator() const):
* jsc.cpp:
(FunctionJSCStackFunctor::operator() const):
(startTimeoutTimer):
* runtime/Error.cpp:
(JSC::FindFirstCallerFrameWithCodeblockFunctor::operator() const):
* runtime/FunctionPrototype.cpp:
(JSC::RetrieveArgumentsFunctor::operator() const):
(JSC::RetrieveCallerFunctionFunctor::operator() const):
* runtime/JSGlobalObject.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/NullSetterFunction.cpp:
(JSC::GetCallerStrictnessFunctor::operator() const):
* tools/HeapVerifier.cpp:
(JSC::HeapVerifier::checkIfRecorded):
* tools/JSDollarVM.cpp:
(JSC::CallerFrameJITTypeFunctor::operator() const):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* tools/VMInspector.cpp:
(JSC::VMInspector::forEachVM):
(JSC::VMInspector::isValidExecutableMemory):
(JSC::VMInspector::codeBlockForMachinePC):
(JSC::VMInspector::codeBlockForFrame):
(JSC::DumpFrameFunctor::operator() const):
(JSC::VMInspector::dumpRegisters):
* tools/VMInspector.h:
(JSC::VMInspector::WTF_REQUIRES_LOCK):

Source/WebCore:

* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::callerGlobalObject):
* testing/Internals.cpp:
(WebCore::GetCallerCodeBlockFunctor::operator() const):

Modified Paths

trunk/Source/_javascript_Core/API/JSContextRef.cpp
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp
trunk/Source/_javascript_Core/debugger/DebuggerCallFrame.cpp
trunk/Source/_javascript_Core/inspector/ScriptCallStackFactory.cpp
trunk/Source/_javascript_Core/interpreter/CallFrame.cpp
trunk/Source/_javascript_Core/interpreter/CallFrame.h
trunk/Source/_javascript_Core/interpreter/Interpreter.cpp
trunk/Source/_javascript_Core/interpreter/ShadowChicken.cpp
trunk/Source/_javascript_Core/interpreter/StackVisitor.h
trunk/Source/_javascript_Core/jsc.cpp
trunk/Source/_javascript_Core/runtime/Error.cpp
trunk/Source/_javascript_Core/runtime/FunctionPrototype.cpp
trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp
trunk/Source/_javascript_Core/runtime/NullSetterFunction.cpp
trunk/Source/_javascript_Core/tools/HeapVerifier.cpp
trunk/Source/_javascript_Core/tools/JSDollarVM.cpp
trunk/Source/_javascript_Core/tools/VMInspector.cpp
trunk/Source/_javascript_Core/tools/VMInspector.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
trunk/Source/WebCore/testing/Internals.cpp




Diff

Modified: trunk/Source/_javascript_Core/API/JSContextRef.cpp (293778 => 293779)

--- trunk/Source/_javascript_Core/API/JSContextRef.cpp	2022-05-04 17:21:04 UTC (rev 293778)
+++ trunk/Source/_javascript_Core/API/JSContextRef.cpp	2022-05-04 17:44:44 UTC (rev 293779)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -290,7 +290,7 @@
 {
 }
 
-StackVisitor::Status operator()(StackVisitor& visitor) const
+IterationStatus operator()(StackVisitor& visitor) const
 {
 if (m_remainingCapacityForFrameCapture) {
 // If callee is unknown, but we've not added any frame yet, we should
@@ -298,7 +298,7 @@
 if (visitor->callee().isCell()) {
 JSCell* callee = visitor->callee().asCell();
 if (!callee && visitor->index())
-return StackVisitor::Done;
+return IterationStatus::Done;
 }
 
 StringBuilder& builder = m_builder;
@@ -313,12 +313,12 @@
 }
 
 if (!visitor->callee().rawPtr())
-return StackVisitor::Done;
+return IterationStatus::Done;
 
 m_remainingCapacityForFrameCapture--;
-return StackVisitor::Continue;
+

[webkit-changes] [293778] trunk/metadata/contributors.json

2022-05-04 Thread nham
Title: [293778] trunk/metadata/contributors.json








Revision 293778
Author n...@apple.com
Date 2022-05-04 10:21:04 -0700 (Wed, 04 May 2022)


Log Message
Unreviewed, add my GitHub account name to contributors.json

* metadata/contributors.json:

Modified Paths

trunk/metadata/contributors.json




Diff

Modified: trunk/metadata/contributors.json (293777 => 293778)

--- trunk/metadata/contributors.json	2022-05-04 17:11:00 UTC (rev 293777)
+++ trunk/metadata/contributors.json	2022-05-04 17:21:04 UTC (rev 293778)
@@ -1038,6 +1038,7 @@
   "emails" : [
  "n...@apple.com"
   ],
+  "github" : "bnham",
   "name" : "Ben Nham",
   "nicks" : [
  "nham"






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


[webkit-changes] [293777] trunk/LayoutTests

2022-05-04 Thread rackler
Title: [293777] trunk/LayoutTests








Revision 293777
Author rack...@apple.com
Date 2022-05-04 10:11:00 -0700 (Wed, 04 May 2022)


Log Message
 [Rebaseline] REGRESSION (r293038):[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
 https://bugs.webkit.org/show_bug.cgi?id=240065

 Unreviewed test gardening.

* LayoutTests/platform/ios/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt:

Canonical link: https://commits.webkit.org/250256@main

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (293776 => 293777)

--- trunk/LayoutTests/ChangeLog	2022-05-04 16:24:24 UTC (rev 293776)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 17:11:00 UTC (rev 293777)
@@ -1,5 +1,14 @@
 2022-05-04  Karl Rackler  
 
+[Rebaseline] REGRESSION (r293038):[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
+https://bugs.webkit.org/show_bug.cgi?id=240065
+
+Unreviewed test gardening. 
+
+* platform/ios/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt:
+
+2022-05-04  Karl Rackler  
+
 [ iOS ] fast/css/continuationCrash.html is a consistent failure
 https://bugs.webkit.org/show_bug.cgi?id=240069
 


Modified: trunk/LayoutTests/platform/ios/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt (293776 => 293777)

--- trunk/LayoutTests/platform/ios/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt	2022-05-04 16:24:24 UTC (rev 293776)
+++ trunk/LayoutTests/platform/ios/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt	2022-05-04 17:11:00 UTC (rev 293777)
@@ -1,6 +1,6 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
+layer at (0,0) size 800x600 isolatesBlending
   RenderBlock {HTML} at (0,0) size 800x600
 RenderBody {BODY} at (8,8) size 784x584
   RenderBlock {P} at (0,0) size 784x20
@@ -8,21 +8,21 @@
   text run at (0,0) width 503: "This tests that the AutoFill button renders. It can only be tested in the test tool."
   RenderBlock {DIV} at (0,36) size 784x25
 RenderTextControl {INPUT} at (2,2) size 155x22 [bgcolor=#FF] [border: (1px solid #3C3C4399)]
-  RenderFlexibleBox {DIV} at (6,3) size 143x15
-RenderBlock {DIV} at (0,0) size 115x14
-RenderText {#text} at (158,1) size 5x19
-  text run at (158,1) width 5: " "
+  RenderFlexibleBox {DIV} at (6,-1) size 143x22
+RenderBlock {DIV} at (0,3) size 115x15
+RenderText {#text} at (158,0) size 5x19
+  text run at (158,0) width 5: " "
 RenderTextControl {INPUT} at (164,2) size 156x22 [bgcolor=#FF] [border: (1px solid #3C3C4399)]
-  RenderFlexibleBox {DIV} at (6,3) size 143x15
-RenderBlock {DIV} at (0,0) size 115x14
-RenderText {#text} at (321,1) size 5x19
-  text run at (321,1) width 5: " "
+  RenderFlexibleBox {DIV} at (6,-1) size 143x22
+RenderBlock {DIV} at (0,3) size 115x15
+RenderText {#text} at (321,0) size 5x19
+  text run at (321,0) width 5: " "
 RenderTextControl {INPUT} at (327,2) size 156x22 [bgcolor=#FF] [border: (1px solid #3C3C4399)]
-  RenderFlexibleBox {DIV} at (6,3) size 143x15
-RenderBlock {DIV} at (0,0) size 115x14
+  RenderFlexibleBox {DIV} at (6,-1) size 143x22
+RenderBlock {DIV} at (0,3) size 115x15
 RenderTextControl {INPUT} at (486,2) size 156x22 [bgcolor=#FF] [border: (1px solid #3C3C4399)]
-  RenderFlexibleBox {DIV} at (6,3) size 143x15
-RenderBlock {DIV} at (0,0) size 115x14
+  RenderFlexibleBox {DIV} at (6,-1) size 143x22
+RenderBlock {DIV} at (0,3) size 115x15
 layer at (17,49) size 115x14 backgroundClip at (17,49) size 114x14 clip at (17,49) size 114x14
   RenderBlock {DIV} at (0,0) size 115x14
 layer at (179,49) size 115x14
@@ -31,11 +31,11 @@
   RenderBlock {DIV} at (0,0) size 115x14
 layer at (501,49) size 115x14
   RenderBlock {DIV} at (0,0) size 115x14
-layer at (134,50) size 22x12
-  RenderBlock {DIV} at (117,1) size 23x12 [bgcolor=#00]
-layer at (297,50) size 22x12
-  RenderBlock {DIV} at (117,1) size 23x12 [bgcolor=#00]
-layer at (460,50) size 22x12
-  RenderBlock {DIV} at (117,1) size 23x12 [bgcolor=#00]
-layer at (619,50) size 22x12
-  RenderBlock {DIV} at (117,1) size 23x12 [bgcolor=#00]
+layer at (133,44) size 24x24 blendMode: luminosity
+  RenderBlock {DIV} at (116,-2) size 25x25
+layer at (296,44) size 24x24 blendMode: luminosity
+  RenderBlock {DIV} at (116,-2) size 25x25
+layer at (459,44) size 24x24 blendMode: luminosity
+  RenderBlock {DIV} at (116,-2) size 25x25
+layer at (618,44) size 24x24 blendMode: luminosity
+  RenderBlock {DIV} at (116,-2) size 25x25







[webkit-changes] [293776] trunk/LayoutTests

2022-05-04 Thread rackler
Title: [293776] trunk/LayoutTests








Revision 293776
Author rack...@apple.com
Date 2022-05-04 09:24:24 -0700 (Wed, 04 May 2022)


Log Message
[ iOS ] fast/css/continuationCrash.html is a consistent failure
https://bugs.webkit.org/show_bug.cgi?id=240069

Unreviewed test gardening.
* LayoutTests/platform/ios/TestExpectations:

Canonical link: https://commits.webkit.org/250255@main

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (293775 => 293776)

--- trunk/LayoutTests/ChangeLog	2022-05-04 15:35:37 UTC (rev 293775)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 16:24:24 UTC (rev 293776)
@@ -1,5 +1,14 @@
 2022-05-04  Karl Rackler  
 
+[ iOS ] fast/css/continuationCrash.html is a consistent failure
+https://bugs.webkit.org/show_bug.cgi?id=240069
+
+Unreviewed test gardening. 
+
+* platform/ios/TestExpectations:
+
+2022-05-04  Karl Rackler  
+
 [ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
 https://bugs.webkit.org/show_bug.cgi?id=240065
 


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293775 => 293776)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 15:35:37 UTC (rev 293775)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 16:24:24 UTC (rev 293776)
@@ -3598,3 +3598,5 @@
 webkit.org/b/240037 css3/background/background-repeat-space-content.html [ Pass ImageOnlyFailure ]
 
 webkit.org/b/240065 fast/forms/auto-fill-button/input-auto-fill-button.html [ Pass Failure ]
+
+webkit.org/b/240069 fast/css/continuationCrash.html [ Pass Failure ]






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


[webkit-changes] [293775] trunk/LayoutTests

2022-05-04 Thread rackler
Title: [293775] trunk/LayoutTests








Revision 293775
Author rack...@apple.com
Date 2022-05-04 08:35:37 -0700 (Wed, 04 May 2022)


Log Message
[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
https://bugs.webkit.org/show_bug.cgi?id=240065

Unreviewed test gardening.

* LayoutTests/platform/ios/TestExpectations:

Canonical link: https://commits.webkit.org/250254@main

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (293774 => 293775)

--- trunk/LayoutTests/ChangeLog	2022-05-04 15:25:22 UTC (rev 293774)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 15:35:37 UTC (rev 293775)
@@ -1,3 +1,12 @@
+2022-05-04  Karl Rackler  
+
+[ iOS ] fast/forms/auto-fill-button/input-auto-fill-button.html is a consistent failure
+https://bugs.webkit.org/show_bug.cgi?id=240065
+
+Unreviewed test gardening. 
+
+* platform/ios/TestExpectations:
+
 2022-05-04  Ziran Sun  
 
 [InputElement] Selection after type change needs to follow HTML specification


Modified: trunk/LayoutTests/platform/ios/TestExpectations (293774 => 293775)

--- trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 15:25:22 UTC (rev 293774)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-05-04 15:35:37 UTC (rev 293775)
@@ -3595,4 +3595,6 @@
 
 webkit.org/b/240024 http/tests/quicklook/same-origin-xmlhttprequest-allowed.html [ Pass Failure Crash ]
 
-webkit.org/b/240037 css3/background/background-repeat-space-content.html [ Pass ImageOnlyFailure ]
\ No newline at end of file
+webkit.org/b/240037 css3/background/background-repeat-space-content.html [ Pass ImageOnlyFailure ]
+
+webkit.org/b/240065 fast/forms/auto-fill-button/input-auto-fill-button.html [ Pass Failure ]






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


[webkit-changes] [293774] trunk/Tools

2022-05-04 Thread jbedard
Title: [293774] trunk/Tools








Revision 293774
Author jbed...@apple.com
Date 2022-05-04 08:25:22 -0700 (Wed, 04 May 2022)


Log Message
[ews-build.webkit.org] Cache contributors by default
https://bugs.webkit.org/show_bug.cgi?id=240040


Reviewed by Aakash Jain.

On-disk contributor record can get stale quickly. Rely on the network by default.

* Tools/CISupport/ews-build/steps.py:
(GitHub.email_for_owners): Rely on the network contributors.json by default.
(Contributors.load): Force reload contributors every 4 hours. Use disk or remote if specifically
requested, otherwise default to remote. Use cache if not expired.
(ValidateCommitterAndReviewer.start): Rely on the network contributors.json by default.
(AddReviewerMixin.gitCommitEnvironment): Ditto.
(AddAuthorToCommitMessage.author): Ditto.

Canonical link: https://commits.webkit.org/250253@main

Modified Paths

trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/steps.py (293773 => 293774)

--- trunk/Tools/CISupport/ews-build/steps.py	2022-05-04 14:48:29 UTC (rev 293773)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-05-04 15:25:22 UTC (rev 293774)
@@ -132,7 +132,7 @@
 def email_for_owners(cls, owners):
 if not owners:
 return None, 'No owners defined, so email cannot be extracted'
-contributors, errors = Contributors.load(use_network=False)
+contributors, errors = Contributors.load()
 return contributors.get(owners[0].lower(), {}).get('email'), errors
 
 
@@ -415,6 +415,8 @@
 class Contributors(object):
 url = ''
 contributors = {}
+last_update = 0
+REFRESH = 4 * 60 * 60
 
 @classmethod
 def load_from_disk(cls):
@@ -438,15 +440,32 @@
 return {}, 'Failed to access {url}\n'.format(url=""
 
 @classmethod
-def load(cls, use_network=True):
+def load(cls, use_network=None):
 errors = []
 
+now = int(time.time())
+if cls.last_update < now - cls.REFRESH:
+cls.contributors = {}
+
 if use_network:
+cls.contributors = {}
 contributors_json, error = cls.load_from_github()
 if error:
 errors.append(error)
+else:
+cls.last_update = now
+elif use_network is False:
+contributors_json, error = cls.load_from_disk()
+if error:
+errors.append(error)
+elif cls.contributors:
+return cls.contributors, errors
 else:
-contributors_json = []
+contributors_json, error = cls.load_from_github()
+if error:
+errors.append(error)
+else:
+cls.last_update = now
 
 if not contributors_json:
 contributors_json, error = cls.load_from_disk()
@@ -453,7 +472,6 @@
 if error:
 errors.append(error)
 
-contributors = {}
 for value in contributors_json:
 name = value.get('name')
 emails = value.get('emails')
@@ -460,14 +478,14 @@
 github_username = value.get('github')
 if name and emails:
 bugzilla_email = emails[0].lower()  # We're requiring that the first email is the primary bugzilla email
-contributors[bugzilla_email] = {'name': name, 'status': value.get('status')}
+cls.contributors[bugzilla_email] = {'name': name, 'status': value.get('status')}
 if github_username and name and emails:
-contributors[github_username.lower()] = dict(
+cls.contributors[github_username.lower()] = dict(
 name=name,
 status=value.get('status'),
 email=emails[0].lower(),
 )
-return contributors, errors
+return cls.contributors, errors
 
 
 class ConfigureBuild(buildstep.BuildStep, AddToLogMixin):
@@ -1553,7 +1571,7 @@
 return contributor.get('name')
 
 def start(self):
-self.contributors, errors = Contributors.load()
+self.contributors, errors = Contributors.load(use_network=True)
 for error in errors:
 print(error)
 self._addToLog('stdio', error)
@@ -4783,7 +4801,7 @@
 FILTER_BRANCH_SQUELCH_WARNING='1',
 )
 
-contributors, _ = Contributors.load(use_network=False)
+contributors, _ = Contributors.load()
 return dict(
 GIT_COMMITTER_NAME=contributors.get(owners[0].lower(), {}).get('name', 'EWS'),
 GIT_COMMITTER_EMAIL=contributors.get(owners[0].lower(), {}).get('email', FROM_EMAIL),
@@ -4846,15 +4864,16 @@
 super(AddAuthorToCommitMessage, self).__init__(logEnviron=False, timeout=60, **kwargs)
 
 def author(self):
-contributors, _ = Contributors.load(use_network=False)
+

[webkit-changes] [293773] trunk

2022-05-04 Thread zsun
Title: [293773] trunk








Revision 293773
Author z...@igalia.com
Date 2022-05-04 07:48:29 -0700 (Wed, 04 May 2022)


Log Message
[InputElement] Selection after type change needs to follow HTML specification
https://bugs.webkit.org/show_bug.cgi?id=237361

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt:

Source/WebCore:

As per spec at https://html.spec.whatwg.org/multipage/input.html#input-type-change,
following step 7-9, if the previous type doesn't support Selection API and the new type
does, selectionStart and selectionEnd should be 0, selectionDirection should be set to "none".

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::initializeInputType):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):

LayoutTests:

* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt.
* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLInputElement.cpp
trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp


Added Paths

trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (293772 => 293773)

--- trunk/LayoutTests/ChangeLog	2022-05-04 14:23:18 UTC (rev 293772)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 14:48:29 UTC (rev 293773)
@@ -1,3 +1,16 @@
+2022-05-04  Ziran Sun  
+
+[InputElement] Selection after type change needs to follow HTML specification
+https://bugs.webkit.org/show_bug.cgi?id=237361
+
+Reviewed by Chris Dumez.
+
+* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt.
+* platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+
 2022-04-30  Philippe Normand  
 
 [GStreamer] Mediastream mock audio interruption fixes after r290985


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (293772 => 293773)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-04 14:23:18 UTC (rev 293772)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-05-04 14:48:29 UTC (rev 293773)
@@ -1,3 +1,12 @@
+2022-05-04  Ziran Sun  
+
+[InputElement] Selection after type change needs to follow HTML specification
+https://bugs.webkit.org/show_bug.cgi?id=237361
+
+Reviewed by Chris Dumez.
+
+* web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt:
+
 2022-05-03  Youenn Fablet  
 
 ServiceWorkerRegistration update should fail if called from an installing service worker context


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt (293772 

[webkit-changes] [293772] trunk/Source/WTF

2022-05-04 Thread jh718 . park
Title: [293772] trunk/Source/WTF








Revision 293772
Author jh718.p...@samsung.com
Date 2022-05-04 07:23:18 -0700 (Wed, 04 May 2022)


Log Message
Unreviewed. Remove the build warning below since r293729.
warning: redundant move in return statement [-Wredundant-move]

* wtf/DateMath.cpp:
(WTF::validateTimeZone):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/DateMath.cpp




Diff

Modified: trunk/Source/WTF/ChangeLog (293771 => 293772)

--- trunk/Source/WTF/ChangeLog	2022-05-04 10:43:28 UTC (rev 293771)
+++ trunk/Source/WTF/ChangeLog	2022-05-04 14:23:18 UTC (rev 293772)
@@ -1,3 +1,11 @@
+2022-05-04  Joonghun Park  
+
+Unreviewed. Remove the build warning below since r293729.
+warning: redundant move in return statement [-Wredundant-move]
+
+* wtf/DateMath.cpp:
+(WTF::validateTimeZone):
+
 2022-05-03  Yusuke Suzuki  
 
 [WTF] Initialize emptyString and nullString data at compile time


Modified: trunk/Source/WTF/wtf/DateMath.cpp (293771 => 293772)

--- trunk/Source/WTF/wtf/DateMath.cpp	2022-05-04 10:43:28 UTC (rev 293771)
+++ trunk/Source/WTF/wtf/DateMath.cpp	2022-05-04 14:23:18 UTC (rev 293772)
@@ -1038,7 +1038,7 @@
 auto status = callBufferProducingFunction(ucal_getCanonicalTimeZoneID, buffer.data(), buffer.size(), canonicalBuffer, nullptr);
 if (!U_SUCCESS(status))
 return std::nullopt;
-return WTFMove(canonicalBuffer);
+return canonicalBuffer;
 }
 
 bool isTimeZoneValid(StringView timeZone)






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


[webkit-changes] [293771] trunk

2022-05-04 Thread commit-queue
Title: [293771] trunk








Revision 293771
Author commit-qu...@webkit.org
Date 2022-05-04 03:43:28 -0700 (Wed, 04 May 2022)


Log Message
[GStreamer] Mediastream mock audio interruption fixes after r290985
https://bugs.webkit.org/show_bug.cgi?id=239926

Patch by Philippe Normand  on 2022-05-04
Reviewed by Chris Dumez.

Similarly to mock video sources, the GStreamer mock audio sources are now cached in a
hashset, which is used to dispatch interruption requests.

* platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
(WebCore::GStreamerAudioCaptureSource::interrupted const): Avoid runtime critical GObject
warnings that would happen if this method is called before the pipeline has been created.
* platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp: Cache mock sources in a hashset.
(WebCore::MockRealtimeAudioSourceGStreamer::~MockRealtimeAudioSourceGStreamer):
* platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h:
* platform/mock/MockRealtimeAudioSource.cpp: Dispatch interruption requests to currently
cached GStreamer mock audio sources.
(WebCore::MockRealtimeAudioSource::setIsInterrupted):
* platform/mock/MockRealtimeVideoSource.cpp: Switch to MainThreadNeverDestroyed for caching sources.
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::~MockRealtimeVideoSource):

LayoutTests:

* platform/glib/TestExpectations: Unflag mediastream tests now passing.

Canonical link: https://commits.webkit.org/250250@main

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/glib/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp
trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp
trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h
trunk/Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp
trunk/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (293770 => 293771)

--- trunk/LayoutTests/ChangeLog	2022-05-04 10:31:55 UTC (rev 293770)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 10:43:28 UTC (rev 293771)
@@ -1,3 +1,12 @@
+2022-04-30  Philippe Normand  
+
+[GStreamer] Mediastream mock audio interruption fixes after r290985
+https://bugs.webkit.org/show_bug.cgi?id=239926
+
+Reviewed by Chris Dumez.
+
+* platform/glib/TestExpectations: Unflag mediastream tests now passing.
+
 2022-05-04  Philippe Normand  
 
 Web Inspector: Update jsmin to 3.0.1


Modified: trunk/LayoutTests/platform/glib/TestExpectations (293770 => 293771)

--- trunk/LayoutTests/platform/glib/TestExpectations	2022-05-04 10:31:55 UTC (rev 293770)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2022-05-04 10:43:28 UTC (rev 293771)
@@ -781,9 +781,6 @@
 webkit.org/b/230415 fast/mediastream/RTCPeerConnection-iceconnectionstatechange-event.html [ Timeout ]
 webkit.org/b/79203 fast/mediastream/RTCRtpSender-replaceTrack.html [ Failure ]
 webkit.org/b/187603 fast/mediastream/media-stream-track-source-failure.html [ Timeout Failure Pass ]
-fast/mediastream/media-stream-video-track-interrupted-from-audio.html [ Failure ]
-fast/mediastream/media-stream-track-interrupted.html [ Failure ]
-fast/mediastream/track-ended-while-muted.html [ Failure ]
 
 webkit.org/b/223508 imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html [ Failure Pass ]
 


Modified: trunk/Source/WebCore/ChangeLog (293770 => 293771)

--- trunk/Source/WebCore/ChangeLog	2022-05-04 10:31:55 UTC (rev 293770)
+++ trunk/Source/WebCore/ChangeLog	2022-05-04 10:43:28 UTC (rev 293771)
@@ -1,3 +1,26 @@
+2022-05-03  Philippe Normand  
+
+[GStreamer] Mediastream mock audio interruption fixes after r290985
+https://bugs.webkit.org/show_bug.cgi?id=239926
+
+Reviewed by Chris Dumez.
+
+Similarly to mock video sources, the GStreamer mock audio sources are now cached in a
+hashset, which is used to dispatch interruption requests.
+
+* platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
+(WebCore::GStreamerAudioCaptureSource::interrupted const): Avoid runtime critical GObject
+warnings that would happen if this method is called before the pipeline has been created.
+* platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp: Cache mock sources in a hashset.
+(WebCore::MockRealtimeAudioSourceGStreamer::~MockRealtimeAudioSourceGStreamer):
+* platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h:
+* platform/mock/MockRealtimeAudioSource.cpp: Dispatch interruption requests to currently
+cached GStreamer mock audio sources.
+(WebCore::MockRealtimeAudioSource::setIsInterrupted):
+* platform/mock/MockRealtimeVideoSource.cpp: Switch to MainThreadNeverDestroyed for caching sources.
+  

[webkit-changes] [293770] trunk

2022-05-04 Thread commit-queue
Title: [293770] trunk








Revision 293770
Author commit-qu...@webkit.org
Date 2022-05-04 03:31:55 -0700 (Wed, 04 May 2022)


Log Message
DisplayList::Recorder has redundant, unused flushContext
https://bugs.webkit.org/show_bug.cgi?id=23

Patch by Kimmo Kinnunen  on 2022-05-04
Reviewed by Simon Fraser.

Remove DisplayList::Recorder::flushContext(GraphicsContextFlushIdentifier)
It was unused.
Source/WebCore:

"Flush context" is not a display list item. It is a command for the graphics
context, issued a underlying resource is being used outside the graphics context
abstraction. As display list is working inside the abstraction, there's nothing
that could possibly use the underlying resources between flush and the next
item.

GraphicsContextFlushIdentifier cannot possibly be constructed in sensible way
at WebCore level.

* platform/graphics/displaylists/DisplayListItems.h:
* platform/graphics/displaylists/DisplayListRecorder.h:
* platform/graphics/displaylists/DisplayListRecorderImpl.h:

Source/WebKit:

It has wrong signature for proper operation for the concrete classes.

* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
trunk/Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (293769 => 293770)

--- trunk/Source/WebCore/ChangeLog	2022-05-04 10:12:32 UTC (rev 293769)
+++ trunk/Source/WebCore/ChangeLog	2022-05-04 10:31:55 UTC (rev 293770)
@@ -1,3 +1,27 @@
+2022-05-04  Kimmo Kinnunen  
+
+DisplayList::Recorder has redundant, unused flushContext
+https://bugs.webkit.org/show_bug.cgi?id=23
+
+Reviewed by Simon Fraser.
+
+Remove DisplayList::Recorder::flushContext(GraphicsContextFlushIdentifier)
+It was unused.
+
+"Flush context" is not a display list item. It is a command for the graphics
+context, issued a underlying resource is being used outside the graphics context
+abstraction. As display list is working inside the abstraction, there's nothing
+that could possibly use the underlying resources between flush and the next
+item.
+
+GraphicsContextFlushIdentifier cannot possibly be constructed in sensible way
+at WebCore level.
+
+
+* platform/graphics/displaylists/DisplayListItems.h:
+* platform/graphics/displaylists/DisplayListRecorder.h:
+* platform/graphics/displaylists/DisplayListRecorderImpl.h:
+
 2022-05-04  Megan Gardner  
 
 Enable TextCheckingType::Correction on MacCatalyst.


Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp (293769 => 293770)

--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp	2022-05-04 10:12:32 UTC (rev 293769)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp	2022-05-04 10:31:55 UTC (rev 293770)
@@ -20,7 +20,7 @@
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #include "config.h"
@@ -291,8 +291,6 @@
 return append(item.get());
 case ItemType::FillEllipse:
 return append(item.get());
-case ItemType::FlushContext:
-return append(item.get());
 #if ENABLE(VIDEO)
 case ItemType::PaintFrameForMedia:
 return append(item.get());


Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp (293769 => 293770)

--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp	2022-05-04 10:12:32 UTC (rev 293769)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp	2022-05-04 10:31:55 UTC (rev 293770)
@@ -189,9 +189,6 @@
 case ItemType::FillEllipse:
 get().apply(context);
 return;
-case ItemType::FlushContext:
-get().apply(context);
-return;
 #if ENABLE(VIDEO)
 case ItemType::PaintFrameForMedia:
 get().apply(context);
@@ -376,9 +373,6 @@
 case ItemType::FillRect:
 

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

2022-05-04 Thread youenn
Title: [293769] trunk/Source/WebKit








Revision 293769
Author you...@apple.com
Date 2022-05-04 03:12:32 -0700 (Wed, 04 May 2022)


Log Message
LibWebRTCCodecs does no longer need a pixel conformer
https://bugs.webkit.org/show_bug.cgi?id=240004

Reviewed by Eric Carlson.

Removing no longer used code.
No change of behavior.
Unified build fix.

* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
* WebProcess/GPU/webrtc/LibWebRTCCodecs.mm: Removed.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/SourcesCocoa.txt
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h
trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm


Removed Paths

trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (293768 => 293769)

--- trunk/Source/WebKit/ChangeLog	2022-05-04 09:30:16 UTC (rev 293768)
+++ trunk/Source/WebKit/ChangeLog	2022-05-04 10:12:32 UTC (rev 293769)
@@ -1,3 +1,20 @@
+2022-05-04  Youenn Fablet  
+
+LibWebRTCCodecs does no longer need a pixel conformer
+https://bugs.webkit.org/show_bug.cgi?id=240004
+
+Reviewed by Eric Carlson.
+
+Removing no longer used code.
+No change of behavior.
+Unified build fix.
+
+* SourcesCocoa.txt:
+* WebKit.xcodeproj/project.pbxproj:
+* WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
+* WebProcess/GPU/webrtc/LibWebRTCCodecs.mm: Removed.
+* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
+
 2022-05-04  Megan Gardner  
 
 Enable TextCheckingType::Correction on MacCatalyst.


Modified: trunk/Source/WebKit/SourcesCocoa.txt (293768 => 293769)

--- trunk/Source/WebKit/SourcesCocoa.txt	2022-05-04 09:30:16 UTC (rev 293768)
+++ trunk/Source/WebKit/SourcesCocoa.txt	2022-05-04 10:12:32 UTC (rev 293769)
@@ -639,7 +639,6 @@
 WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm
 WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp
 WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.cpp
-WebProcess/GPU/webrtc/LibWebRTCCodecs.mm
 
 WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp
 


Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (293768 => 293769)

--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-05-04 09:30:16 UTC (rev 293768)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-05-04 10:12:32 UTC (rev 293769)
@@ -4476,7 +4476,6 @@
 		4135FBCF1F4FB7F20074C47B /* CacheStorageEngineCaches.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CacheStorageEngineCaches.cpp; sourceTree = ""; };
 		4135FBD01F4FB7F20074C47B /* CacheStorageEngineCaches.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CacheStorageEngineCaches.h; sourceTree = ""; };
 		413C542227C90F4C002FCDA8 /* RemoteVideoFrameObjectHeap.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = RemoteVideoFrameObjectHeap.messages.in; sourceTree = ""; };
-		413C8B1325516BFA00E65055 /* LibWebRTCCodecs.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LibWebRTCCodecs.mm; sourceTree = ""; };
 		4150A5A023E06C910051264A /* GPUProcessSessionParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUProcessSessionParameters.h; sourceTree = ""; };
 		41518535222704F5005430C6 /* ServiceWorkerFetchTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerFetchTask.h; sourceTree = ""; };
 		41518536222704F6005430C6 /* ServiceWorkerFetchTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerFetchTask.cpp; sourceTree = ""; };
@@ -10012,7 +10011,6 @@
 4172198A23B6128200AE5686 /* LibWebRTCCodecs.cpp */,
 4172198923B6128200AE5686 /* LibWebRTCCodecs.h */,
 4172198D23B62C7C00AE5686 /* LibWebRTCCodecs.messages.in */,
-413C8B1325516BFA00E65055 /* LibWebRTCCodecs.mm */,
 4176E89723C361BD003E83FE /* MediaRecorderIdentifier.h */,
 4176E89423C34E26003E83FE /* MediaRecorderPrivate.cpp */,
 4176E89523C34E27003E83FE /* MediaRecorderPrivate.h */,


Modified: trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h (293768 => 293769)

--- trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h	2022-05-04 09:30:16 UTC (rev 293768)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h	2022-05-04 10:12:32 UTC (rev 293769)
@@ -37,7 +37,6 @@
 #include "RemoteVideoFrameIdentifier.h"
 #include "RemoteVideoFrameProxy.h"
 #include "SharedVideoFrame.h"
-#include 
 #include 
 #include 
 #include 
@@ -160,7 +159,6 @@
 Vector> m_tasksToDispatchAfterEstablishingConnection;
 
 

[webkit-changes] [293768] trunk/Source/WTF

2022-05-04 Thread ysuzuki
Title: [293768] trunk/Source/WTF








Revision 293768
Author ysuz...@apple.com
Date 2022-05-04 02:30:16 -0700 (Wed, 04 May 2022)


Log Message
[WTF] Initialize emptyString and nullString data at compile time
https://bugs.webkit.org/show_bug.cgi?id=240054

Reviewed by Mark Lam.

As we did for AtomString in r293757, we can initialize emptyString() and nullString()
data at compile time. This patch does that for WTF::String.

* Source/WTF/wtf/text/WTFString.cpp:
(WTF::emptyString): Deleted.
(WTF::nullString): Deleted.
* Source/WTF/wtf/text/WTFString.h:
(WTF::StaticString::StaticString):
(WTF::nullString):
(WTF::emptyString):

Canonical link: https://commits.webkit.org/250247@main

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/text/WTFString.cpp
trunk/Source/WTF/wtf/text/WTFString.h




Diff

Modified: trunk/Source/WTF/ChangeLog (293767 => 293768)

--- trunk/Source/WTF/ChangeLog	2022-05-04 09:12:15 UTC (rev 293767)
+++ trunk/Source/WTF/ChangeLog	2022-05-04 09:30:16 UTC (rev 293768)
@@ -1,5 +1,23 @@
 2022-05-03  Yusuke Suzuki  
 
+[WTF] Initialize emptyString and nullString data at compile time
+https://bugs.webkit.org/show_bug.cgi?id=240054
+
+Reviewed by Mark Lam.
+
+As we did for AtomString in r293757, we can initialize emptyString() and nullString()
+data at compile time. This patch does that for WTF::String.
+
+* wtf/text/WTFString.cpp:
+(WTF::emptyString): Deleted.
+(WTF::nullString): Deleted.
+* wtf/text/WTFString.h:
+(WTF::StaticString::StaticString):
+(WTF::nullString):
+(WTF::emptyString):
+
+2022-05-03  Yusuke Suzuki  
+
 [JSC] Initialize empty and null AtomString at compile time
 https://bugs.webkit.org/show_bug.cgi?id=240031
 


Modified: trunk/Source/WTF/wtf/text/WTFString.cpp (293767 => 293768)

--- trunk/Source/WTF/wtf/text/WTFString.cpp	2022-05-04 09:12:15 UTC (rev 293767)
+++ trunk/Source/WTF/wtf/text/WTFString.cpp	2022-05-04 09:30:16 UTC (rev 293768)
@@ -635,18 +635,9 @@
 return static_cast(toDoubleType(data, length, nullptr, parsedLength));
 }
 
-const String& emptyString()
-{
-static NeverDestroyed emptyString(StringImpl::empty());
-return emptyString;
-}
+WTF_EXPORT_PRIVATE const StaticString nullStringData { nullptr };
+WTF_EXPORT_PRIVATE const StaticString emptyStringData { ::s_emptyAtomString };
 
-const String& nullString()
-{
-static NeverDestroyed nullString;
-return nullString;
-}
-
 } // namespace WTF
 
 #ifndef NDEBUG


Modified: trunk/Source/WTF/wtf/text/WTFString.h (293767 => 293768)

--- trunk/Source/WTF/wtf/text/WTFString.h	2022-05-04 09:12:15 UTC (rev 293767)
+++ trunk/Source/WTF/wtf/text/WTFString.h	2022-05-04 09:30:16 UTC (rev 293768)
@@ -380,9 +380,21 @@
 template void appendNumber(Vector&, unsigned char number);
 
 // Shared global empty and null string.
-WTF_EXPORT_PRIVATE const String& emptyString();
-WTF_EXPORT_PRIVATE const String& nullString();
+struct StaticString {
+constexpr StaticString(StringImpl::StaticStringImpl* pointer)
+: m_pointer(pointer)
+{
+}
 
+StringImpl::StaticStringImpl* m_pointer;
+};
+static_assert(sizeof(String) == sizeof(StaticString), "String and StaticString must be the same size!");
+extern WTF_EXPORT_PRIVATE const StaticString nullStringData;
+extern WTF_EXPORT_PRIVATE const StaticString emptyStringData;
+
+inline const String& nullString() { return *reinterpret_cast(); }
+inline const String& emptyString() { return *reinterpret_cast(); }
+
 template struct DefaultHash;
 template<> struct DefaultHash;
 template<> struct VectorTraits : VectorTraitsBase {






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


[webkit-changes] [293767] trunk

2022-05-04 Thread commit-queue
Title: [293767] trunk








Revision 293767
Author commit-qu...@webkit.org
Date 2022-05-04 02:12:15 -0700 (Wed, 04 May 2022)


Log Message
Web Inspector: Update jsmin to 3.0.1
https://bugs.webkit.org/show_bug.cgi?id=239924

Patch by Philippe Normand  on 2022-05-04
Reviewed by Yusuke Suzuki.

Updated jsmin from upstream version, applying a few style changes suggested by
check-webkit-style. This new version is Python3-only and also much faster. Old:

time python /app/webkit/Source/_javascript_Core/Scripts/jsmin.py < /app/webkit/WebKitBuild/Release/WebInspectorUI/DerivedSources/Main.js > foo.js

real 1m21.234s
user 0m59.580s
sys  0m21.253s

New:

time python /app/webkit/Source/_javascript_Core/Scripts/jsmin.py < /app/webkit/WebKitBuild/Release/WebInspectorUI/DerivedSources/Main.js > foo.js

real 0m3.933s
user 0m3.899s
sys  0m0.018s

* Scripts/jsmin.py:
(jsmin):
(_javascript_Minify.__init__):
(_javascript_Minify.minify.write):
(_javascript_Minify.minify):
(_javascript_Minify):
(_javascript_Minify.regex_literal):
(_javascript_Minify.regex_literal.cannot):
(_javascript_Minify.line_comment):
(_javascript_Minify.block_comment):
(_javascript_Minify.newline):
(_javascript_Minify.minify.read): Deleted.

LayoutTests:
* platform/gtk/inspector/timeline/line-column-expected.txt:

Canonical link: https://commits.webkit.org/250246@main

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/inspector/timeline/line-column-expected.txt
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Scripts/jsmin.py




Diff

Modified: trunk/LayoutTests/ChangeLog (293766 => 293767)

--- trunk/LayoutTests/ChangeLog	2022-05-04 08:33:48 UTC (rev 293766)
+++ trunk/LayoutTests/ChangeLog	2022-05-04 09:12:15 UTC (rev 293767)
@@ -1,3 +1,12 @@
+2022-05-04  Philippe Normand  
+
+Web Inspector: Update jsmin to 3.0.1
+https://bugs.webkit.org/show_bug.cgi?id=239924
+
+Reviewed by Yusuke Suzuki.
+
+* platform/gtk/inspector/timeline/line-column-expected.txt:
+
 2022-05-03  Dan Glastonbury  
 
 webgl/1.0.3/conformance/state/gl-object-get-calls.html times out after turning WebGL in GPUP on by default


Modified: trunk/LayoutTests/platform/gtk/inspector/timeline/line-column-expected.txt (293766 => 293767)

--- trunk/LayoutTests/platform/gtk/inspector/timeline/line-column-expected.txt	2022-05-04 08:33:48 UTC (rev 293766)
+++ trunk/LayoutTests/platform/gtk/inspector/timeline/line-column-expected.txt	2022-05-04 09:12:15 UTC (rev 293767)
@@ -60,7 +60,7 @@
   "functionName": "",
   "url": "",
   "scriptId": "",
-  "lineNumber": 142,
+  "lineNumber": 141,
   "columnNumber": 97
 }
   ],
@@ -113,7 +113,7 @@
   "functionName": "",
   "url": "",
   "scriptId": "",
-  "lineNumber": 142,
+  "lineNumber": 141,
   "columnNumber": 97
 }
   ],
@@ -165,7 +165,7 @@
   "functionName": "",
   "url": "",
   "scriptId": "",
-  "lineNumber": 142,
+  "lineNumber": 141,
   "columnNumber": 97
 }
   ],


Modified: trunk/Source/_javascript_Core/ChangeLog (293766 => 293767)

--- trunk/Source/_javascript_Core/ChangeLog	2022-05-04 08:33:48 UTC (rev 293766)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-05-04 09:12:15 UTC (rev 293767)
@@ -1,3 +1,40 @@
+2022-04-30  Philippe Normand  
+
+Web Inspector: Update jsmin to 3.0.1
+https://bugs.webkit.org/show_bug.cgi?id=239924
+
+Reviewed by Yusuke Suzuki.
+
+Updated jsmin from upstream version, applying a few style changes suggested by
+check-webkit-style. This new version is Python3-only and also much faster. Old:
+
+time python3 /app/webkit/Source/_javascript_Core/Scripts/jsmin.py < /app/webkit/WebKitBuild/Release/WebInspectorUI/DerivedSources/Main.js > foo.js
+
+real 1m21.234s
+user 0m59.580s
+sys  0m21.253s
+
+New:
+
+time python3 /app/webkit/Source/_javascript_Core/Scripts/jsmin.py < /app/webkit/WebKitBuild/Release/WebInspectorUI/DerivedSources/Main.js > foo.js
+
+real 0m3.933s
+user 0m3.899s
+sys  0m0.018s
+
+* Scripts/jsmin.py:
+(jsmin):
+(_javascript_Minify.__init__):
+(_javascript_Minify.minify.write):
+(_javascript_Minify.minify):
+(_javascript_Minify):
+(_javascript_Minify.regex_literal):
+(_javascript_Minify.regex_literal.cannot):
+(_javascript_Minify.line_comment):
+(_javascript_Minify.block_comment):
+(_javascript_Minify.newline):
+(_javascript_Minify.minify.read): Deleted.
+
 2022-05-03  Zan Dobersek  
 
 [RISCV64] Implement MacroAssemblerRISCV64 move-conditionally methods


Modified: trunk/Source/_javascript_Core/Scripts/jsmin.py (293766 => 293767)

--- trunk/Source/_javascript_Core/Scripts/jsmin.py	2022-05-04 08:33:48 UTC (rev 293766)
+++ trunk/Source/_javascript_Core/Scripts/jsmin.py	2022-05-04 09:12:15 UTC (rev 

[webkit-changes] [293766] trunk/Source

2022-05-04 Thread megan_gardner
Title: [293766] trunk/Source








Revision 293766
Author megan_gard...@apple.com
Date 2022-05-04 01:33:48 -0700 (Wed, 04 May 2022)


Log Message
Enable TextCheckingType::Correction on MacCatalyst.
https://bugs.webkit.org/show_bug.cgi?id=240036

Reviewed by Wenson Hsieh.

Add TextCheckingType::Correction to Catalyst to bring consistency to macOS.

Source/WebCore:

* editing/Editor.cpp:
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::resolveTextCheckingTypeMask):

Source/WebKit:

* UIProcess/ios/TextCheckerIOS.mm:
(WebKit::TextChecker::checkTextOfParagraph):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/Editor.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/ios/TextCheckerIOS.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (293765 => 293766)

--- trunk/Source/WebCore/ChangeLog	2022-05-04 08:31:55 UTC (rev 293765)
+++ trunk/Source/WebCore/ChangeLog	2022-05-04 08:33:48 UTC (rev 293766)
@@ -1,3 +1,17 @@
+2022-05-04  Megan Gardner  
+
+Enable TextCheckingType::Correction on MacCatalyst.
+https://bugs.webkit.org/show_bug.cgi?id=240036
+
+Reviewed by Wenson Hsieh.
+
+Add TextCheckingType::Correction to Catalyst to bring consistency to macOS.
+
+* editing/Editor.cpp:
+(WebCore::Editor::markMisspellingsAfterTypingToWord):
+(WebCore::Editor::markAndReplaceFor):
+(WebCore::Editor::resolveTextCheckingTypeMask):
+
 2022-05-04  Fujii Hironori  
 
 [WinCairo] Crash during MediaPlayerPrivateMediaFoundation::removeListener in the async callback thread


Modified: trunk/Source/WebCore/editing/Editor.cpp (293765 => 293766)

--- trunk/Source/WebCore/editing/Editor.cpp	2022-05-04 08:31:55 UTC (rev 293765)
+++ trunk/Source/WebCore/editing/Editor.cpp	2022-05-04 08:33:48 UTC (rev 293766)
@@ -2546,6 +2546,7 @@
 #if ENABLE(MAC_CATALYST_GRAMMAR_CHECKING)
 if (isGrammarCheckingEnabled()) {
 textCheckingOptions.add(TextCheckingType::Grammar);
+textCheckingOptions.add(TextCheckingType::Correction);
 auto sentenceStart = startOfSentence(wordStart);
 auto sentenceEnd = endOfSentence(wordStart);
 VisibleSelection fullSentence(sentenceStart, sentenceEnd);
@@ -2860,6 +2861,7 @@
 }
 
 int offsetDueToReplacement = 0;
+Vector previousGrammarRanges;
 
 for (unsigned i = 0; i < results.size(); i++) {
 auto spellingRangeEndOffset = paragraph.checkingEnd() + offsetDueToReplacement;
@@ -2872,6 +2874,16 @@
 const String& replacement = results[i].replacement;
 bool resultEndsAtAmbiguousBoundary = useAmbiguousBoundaryOffset && selectionOffset - 1 <= resultEndLocation;
 
+bool resultRangeIsAcceptableForReplacement = automaticReplacementStartLocation <= resultEndLocation && resultEndLocation <= automaticReplacementEndLocation;
+// In this case the result range just has to touch the automatic replacement range, so we can handle replacing non-word text such as punctuation.
+#if ENABLE(MAC_CATALYST_GRAMMAR_CHECKING)
+if (!resultRangeIsAcceptableForReplacement && shouldMarkGrammar && shouldCheckForCorrection && resultType == TextCheckingType::Correction) {
+resultRangeIsAcceptableForReplacement = previousGrammarRanges.containsIf([&](auto& range) {
+return range.location == resultLocation && range.length == resultLength;
+});
+}
+#endif
+
 // Only mark misspelling if:
 // 1. Current text checking isn't done for autocorrection, in which case shouldMarkSpelling is false.
 // 2. Result falls within spellingRange.
@@ -2891,11 +2903,10 @@
 if (paragraph.checkingRangeCovers({ resultLocation + detail.range.location, detail.range.length })) {
 auto badGrammarRange = paragraph.subrange({ resultLocation + detail.range.location, detail.range.length });
 addMarker(badGrammarRange, DocumentMarker::Grammar, detail.userDescription);
+previousGrammarRanges.append(CharacterRange(resultLocation + detail.range.location, detail.range.length));
 }
 }
-} else if (automaticReplacementStartLocation <= resultEndLocation && resultEndLocation <= automaticReplacementEndLocation
-&& isAutomaticTextReplacementType(resultType)) {
-// In this case the result range just has to touch the automatic replacement range, so we can handle replacing non-word text such as punctuation.
+} else if (resultRangeIsAcceptableForReplacement && isAutomaticTextReplacementType(resultType)) {
 ASSERT(resultLength > 0);
 
 if (shouldShowCorrectionPanel && (resultEndLocation < automaticReplacementEndLocation
@@ -3924,6 +3935,8 @@
 #if !PLATFORM(IOS_FAMILY)
 bool shouldShowCorrectionPanel = textCheckingOptions.contains(TextCheckingType::ShowCorrectionPanel);
 bool 

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

2022-05-04 Thread Hironori . Fujii
Title: [293765] trunk/Source/WebCore








Revision 293765
Author hironori.fu...@sony.com
Date 2022-05-04 01:31:55 -0700 (Wed, 04 May 2022)


Log Message
[WinCairo] Crash during MediaPlayerPrivateMediaFoundation::removeListener in the async callback thread
https://bugs.webkit.org/show_bug.cgi?id=239485

Reviewed by Don Olmstead.

WinCairo debug layout tests were observing a random crash while
MediaPlayerPrivateMediaFoundation::AsyncCallback was destructing.

m_mediaPlayer was being accessed without locking m_mutex in
~AsyncCallback.

m_mediaPlayer can be replaced with using a WeakPtr.

There is one more multi-threading problem. IMFAsyncCallback should
use InterlockedIncrement and InterlockedDecrement for
ref-counting.
Implementing the Asynchronous Callback - Win32 apps | Microsoft Docs


This change re-implemented AsyncCallback with a WeakPtr, Function,
QISearch and Interlocked{In,De}crement.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
(WebCore::beginGetEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::createSession):
(WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
(WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource):
(WebCore::MediaPlayerPrivateMediaFoundation::onNetworkStateChanged):
(WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::QueryInterface): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AddRef): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Release): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::GetParameters): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted): Deleted.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (293764 => 293765)

--- trunk/Source/WebCore/ChangeLog	2022-05-04 07:14:50 UTC (rev 293764)
+++ trunk/Source/WebCore/ChangeLog	2022-05-04 08:31:55 UTC (rev 293765)
@@ -1,3 +1,45 @@
+2022-05-04  Fujii Hironori  
+
+[WinCairo] Crash during MediaPlayerPrivateMediaFoundation::removeListener in the async callback thread
+https://bugs.webkit.org/show_bug.cgi?id=239485
+
+Reviewed by Don Olmstead.
+
+WinCairo debug layout tests were observing a random crash while
+MediaPlayerPrivateMediaFoundation::AsyncCallback was destructing.
+
+m_mediaPlayer was being accessed without locking m_mutex in
+~AsyncCallback.
+
+m_mediaPlayer can be replaced with using a WeakPtr.
+
+There is one more multi-threading problem. IMFAsyncCallback should
+use InterlockedIncrement and InterlockedDecrement for
+ref-counting.
+Implementing the Asynchronous Callback - Win32 apps | Microsoft Docs
+
+
+This change re-implemented AsyncCallback with a WeakPtr, Function,
+QISearch and Interlocked{In,De}crement.
+
+* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
+(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
+(WebCore::beginGetEvent):
+(WebCore::MediaPlayerPrivateMediaFoundation::createSession):
+(WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
+(WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource):
+(WebCore::MediaPlayerPrivateMediaFoundation::onNetworkStateChanged):
+(WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource): Deleted.
+(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent): Deleted.
+(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback): Deleted.
+(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::QueryInterface): Deleted.
+(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AddRef): Deleted.
+(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Release): Deleted.
+(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::GetParameters): Deleted.
+(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke): Deleted.
+(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted): Deleted.
+* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
+
 2022-05-03  Yusuke Suzuki  
 
 [JSC] Initialize empty and null AtomString at compile time


Modified: 

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

2022-05-04 Thread commit-queue
Title: [293764] trunk/Source/WebKit








Revision 293764
Author commit-qu...@webkit.org
Date 2022-05-04 00:14:50 -0700 (Wed, 04 May 2022)


Log Message
RemoteImageBuffer ThreadSafeImageBufferFlusher hangs if GPU process crashes
https://bugs.webkit.org/show_bug.cgi?id=240007

Patch by Kimmo Kinnunen  on 2022-05-04
Reviewed by Geoffrey Garen.

RemoteResourceCacheProxy clears the RemoteImageBuffer backend when the
GPUP is lost. Mark the flush as completed in this case, so that any pending
off-thread flush waits can proceed.

Make sure RemoteResourceCacheProxy clears the backends on destruction too,
so that any pending flushes proceed in this case too.

* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::~RemoteResourceCacheProxy):
(WebKit::RemoteResourceCacheProxy::clearImageBufferBackends):
(WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed):
* WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (293763 => 293764)

--- trunk/Source/WebKit/ChangeLog	2022-05-04 07:02:57 UTC (rev 293763)
+++ trunk/Source/WebKit/ChangeLog	2022-05-04 07:14:50 UTC (rev 293764)
@@ -1,3 +1,24 @@
+2022-05-04  Kimmo Kinnunen  
+
+RemoteImageBuffer ThreadSafeImageBufferFlusher hangs if GPU process crashes
+https://bugs.webkit.org/show_bug.cgi?id=240007
+
+Reviewed by Geoffrey Garen.
+
+RemoteResourceCacheProxy clears the RemoteImageBuffer backend when the
+GPUP is lost. Mark the flush as completed in this case, so that any pending
+off-thread flush waits can proceed.
+
+Make sure RemoteResourceCacheProxy clears the backends on destruction too,
+so that any pending flushes proceed in this case too.
+
+* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
+* WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
+(WebKit::RemoteResourceCacheProxy::~RemoteResourceCacheProxy):
+(WebKit::RemoteResourceCacheProxy::clearImageBufferBackends):
+(WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed):
+* WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:
+
 2022-05-03  Per Arne Vollan  
 
 Add logging related to Launch Services database


Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h (293763 => 293764)

--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h	2022-05-04 07:02:57 UTC (rev 293763)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h	2022-05-04 07:14:50 UTC (rev 293764)
@@ -238,6 +238,7 @@
 void clearBackend() final
 {
 m_remoteDisplayList.resetNeedsFlush();
+didFlush(m_sentFlushIdentifier);
 BaseConcreteImageBuffer::clearBackend();
 }
 


Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp (293763 => 293764)

--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp	2022-05-04 07:02:57 UTC (rev 293763)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp	2022-05-04 07:14:50 UTC (rev 293764)
@@ -42,6 +42,7 @@
 RemoteResourceCacheProxy::~RemoteResourceCacheProxy()
 {
 clearNativeImageMap();
+clearImageBufferBackends();
 }
 
 void RemoteResourceCacheProxy::cacheImageBuffer(WebCore::ImageBuffer& imageBuffer)
@@ -166,6 +167,17 @@
 m_numberOfFontsUsedInCurrentRenderingUpdate = 0;
 }
 
+void RemoteResourceCacheProxy::clearImageBufferBackends()
+{
+// Get a copy of m_imageBuffers.values() because clearBackend()
+// may release some of the cached ImageBuffers.
+for (auto& imageBuffer : copyToVector(m_imageBuffers.values())) {
+if (!imageBuffer)
+continue;
+imageBuffer->clearBackend();
+}
+}
+
 void RemoteResourceCacheProxy::finalizeRenderingUpdateForFonts()
 {
 static constexpr unsigned minimumRenderingUpdateCountToKeepFontAlive = 4;
@@ -199,15 +211,8 @@
 {
 clearNativeImageMap();
 clearFontMap();
+clearImageBufferBackends();
 
-// Get a copy of m_imageBuffers.values() because clearBackend()
-// may release some of the cached ImageBuffers.
-for (auto& imageBuffer : copyToVector(m_imageBuffers.values())) {
-if (!imageBuffer)
-continue;
-imageBuffer->clearBackend();
-}
-
 for (auto& imageBuffer : m_imageBuffers.values()) {
 if (!imageBuffer)
 continue;


Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h (293763 => 293764)

--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h	2022-05-04 07:02:57 UTC (rev 293763)
+++ 

[webkit-changes] [293763] trunk

2022-05-04 Thread cdumez
Title: [293763] trunk








Revision 293763
Author cdu...@apple.com
Date 2022-05-04 00:02:57 -0700 (Wed, 04 May 2022)


Log Message
Drop StringImpl::createFromLiteral()
https://bugs.webkit.org/show_bug.cgi?id=239792

Reviewed by Darin Adler.

Drop StringImpl::createFromLiteral().

Call sites that have an ASCIILiteral can now simply call StringImpl::create(ASCIILiteral).
Call sites that have raw characters can call the existing StringImpl::createWithoutCopying().

This simplifies our API a bit.

Also inline part of the createWithoutCopying() functions so that the 0-length check is
inline. This allows the compiler to optimize the check out when the length is known at
compile time (which is often the case with literals).

* Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
* Source/_javascript_Core/API/JSScriptRef.cpp:
* Source/_javascript_Core/Scripts/wkbuiltins/builtins_templates.py:
* Source/_javascript_Core/builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::BuiltinExecutables):
* Source/_javascript_Core/runtime/IntlObject.cpp:
(JSC::availableUnits):
* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::createWithoutCopyingNonEmpty):
(WTF::StringImpl::createFromLiteral): Deleted.
(WTF::StringImpl::createWithoutCopying): Deleted.
* Source/WTF/wtf/text/StringImpl.h:
(WTF::StringImpl::create):
(WTF::StringImpl::createWithoutCopying):
(WTF::StringImpl::createFromLiteral): Deleted.
* Source/WTF/wtf/text/WTFString.h:
(WTF::String::String):
* Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::updateFromElement):

Canonical link: https://commits.webkit.org/250242@main

Modified Paths

trunk/Source/_javascript_Core/API/JSScriptRef.cpp
trunk/Source/_javascript_Core/Scripts/wkbuiltins/builtins_templates.py
trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp
trunk/Source/_javascript_Core/runtime/IntlObject.cpp
trunk/Source/WTF/wtf/text/StringImpl.cpp
trunk/Source/WTF/wtf/text/StringImpl.h
trunk/Source/WTF/wtf/text/WTFString.h
trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp
trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp
trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp




Diff

Modified: trunk/Source/_javascript_Core/API/JSScriptRef.cpp (293762 => 293763)

--- trunk/Source/_javascript_Core/API/JSScriptRef.cpp	2022-05-04 06:25:05 UTC (rev 293762)
+++ trunk/Source/_javascript_Core/API/JSScriptRef.cpp	2022-05-04 07:02:57 UTC (rev 293763)
@@ -92,7 +92,7 @@
 startingLineNumber = std::max(1, startingLineNumber);
 
 auto sourceURL = urlString ? URL({ }, urlString->string()) : URL();
-auto result = OpaqueJSScript::create(vm, SourceOrigin { sourceURL }, sourceURL.string(), startingLineNumber, String(StringImpl::createFromLiteral(source, length)));
+auto result = OpaqueJSScript::create(vm, SourceOrigin { sourceURL }, sourceURL.string(), startingLineNumber, String(StringImpl::createWithoutCopying(source, length)));
 
 ParserError error;
 if (!parseScript(vm, SourceCode(result.copyRef()), error)) {


Modified: trunk/Source/_javascript_Core/Scripts/wkbuiltins/builtins_templates.py (293762 => 293763)

--- trunk/Source/_javascript_Core/Scripts/wkbuiltins/builtins_templates.py	2022-05-04 06:25:05 UTC (rev 293762)
+++ trunk/Source/_javascript_Core/Scripts/wkbuiltins/builtins_templates.py	2022-05-04 07:02:57 UTC (rev 293763)
@@ -132,7 +132,7 @@
 explicit ${objectName}BuiltinsWrapper(JSC::VM& vm)
 : m_vm(vm)
 ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(s_##name, length), { }))
 ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
 #undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
 {


Modified: trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp (293762 => 293763)

--- trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp	2022-05-04 06:25:05 UTC (rev 293762)
+++ trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp	2022-05-04 07:02:57 UTC (rev 293763)
@@ -36,7 +36,7 @@
 
 BuiltinExecutables::BuiltinExecutables(VM& vm)
 : m_vm(vm)
-, m_combinedSourceProvider(StringSourceProvider::create(StringImpl::createFromLiteral(s_JSCCombinedCode, s_JSCCombinedCodeLength), { }, String()))
+, m_combinedSourceProvider(StringSourceProvider::create(StringImpl::createWithoutCopying(s_JSCCombinedCode, s_JSCCombinedCodeLength), { }, String()))
 {
 }
 


Modified: trunk/Source/_javascript_Core/runtime/IntlObject.cpp (293762 => 293763)

--- trunk/Source/_javascript_Core/runtime/IntlObject.cpp	2022-05-04 06:25:05 UTC (rev 293762)
+++ 

[webkit-changes] [293762] trunk/Tools/TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp

2022-05-04 Thread cdumez
Title: [293762] trunk/Tools/TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp








Revision 293762
Author cdu...@apple.com
Date 2022-05-03 23:25:05 -0700 (Tue, 03 May 2022)


Log Message
REGRESSION(r293285): ASSERTION FAILED: m_isConstructed /Volumes/Data/worker/Apple-Monterey-Debug-Build/build/WebKitBuild/Debug/usr/local/include/wtf/NeverDestroyed.h(152) : . [T = const WTF::AtomString, AccessTraits = WTF::MainThreadAccessTraits]
https://bugs.webkit.org/show_bug.cgi?id=240051

Reviewed by Yusuke Suzuki.

Make sure the tests initialize CommonAtomStrings since the implementation being tested seems
to rely on them.

* Tools/TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp:
(TestWebKitAPI::createDocument):

Canonical link: https://commits.webkit.org/250241@main

Modified Paths

trunk/Tools/TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp




Diff

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp (293761 => 293762)

--- trunk/Tools/TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp	2022-05-04 06:19:19 UTC (rev 293761)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp	2022-05-04 06:25:05 UTC (rev 293762)
@@ -25,6 +25,7 @@
 
 #include "config.h"
 
+#include 
 #include 
 #include 
 #include 
@@ -53,6 +54,8 @@
 {
 HTMLNames::init();
 WebKitFontFamilyNames::init();
+initializeCommonAtomStrings();
+
 auto settings = Settings::create(nullptr);
 auto document = Document::create(settings.get(), aboutBlankURL());
 auto documentElement = HTMLHtmlElement::create(document);






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


[webkit-changes] [293761] trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm

2022-05-04 Thread cdumez
Title: [293761] trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm








Revision 293761
Author cdu...@apple.com
Date 2022-05-03 23:19:19 -0700 (Tue, 03 May 2022)


Log Message
REGRESSION(r293703):[ BigSur+ iOS ] TestWTF.WTF_URLExtras.URLExtras_ParsingError (API-Test) is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=240049

Reviewed by Yusuke Suzuki.

We need to pass the length of the string, which is the number of characters without the null terminator.
However, we were passing utf16.size(), which was one too many since the utf16 array contains the null
terminator at the end.

* Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/250239@main

Modified Paths

trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm




Diff

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm (293760 => 293761)

--- trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm	2022-05-04 06:18:46 UTC (rev 293760)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm	2022-05-04 06:19:19 UTC (rev 293761)
@@ -233,7 +233,7 @@
 WTF::URL url2 { utf16String(u"http://\u2267\u222E\uFE63\u0661\u06F1") };
 EXPECT_STREQ([[url2 absoluteString] UTF8String], "http://%E2%89%A7%E2%88%AE%EF%B9%A3%D9%A1%DB%B1");
 
-std::array utf16 { 0xC2, 0xB6, 0x00 };
+std::array utf16 { 0xC2, 0xB6 };
 WTF::URL url3 { String(utf16.data(), utf16.size()) };
 EXPECT_FALSE(url3.string().is8Bit());
 EXPECT_FALSE(url3.isValid());






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


[webkit-changes] [293760] trunk/Source

2022-05-04 Thread cdumez
Title: [293760] trunk/Source








Revision 293760
Author cdu...@apple.com
Date 2022-05-03 23:18:46 -0700 (Tue, 03 May 2022)


Log Message
Replace String::remove() by a makeStringByRemoving() free function
https://bugs.webkit.org/show_bug.cgi?id=239995

Reviewed by Yusuke Suzuki.

Replace String::remove() by a makeStringByRemoving() free function. This is a
step towards making String immutable.

* Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::lastCNAMEDomain):
* Source/WebKit/UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.cpp:
(WebKit::InspectorResourceURLSchemeHandler::platformStartTask):
* Source/WTF/wtf/URL.cpp:
(WTF::URL::remove):
* Source/WTF/wtf/text/WTFString.cpp:
(WTF::makeStringByRemoving):
(WTF::String::removeInternal): Deleted.
(WTF::String::remove): Deleted.
* Source/WTF/wtf/text/WTFString.h:
* Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::playNextTone):
* Source/WebCore/dom/CharacterData.cpp:
(WebCore::CharacterData::deleteData):
* Source/WebCore/dom/FragmentDirectiveParser.cpp:
(WebCore::FragmentDirectiveParser::parseFragmentDirective):
* Source/WebCore/dom/Range.cpp:
(WebCore::processContentsBetweenOffsets):
* Source/WebCore/editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::deleteInsignificantText):
* Source/WebCore/inspector/InspectorOverlayLabel.cpp:
(WebCore::InspectorOverlayLabel::draw):
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::deleteRule):
* Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp:
(WebCore::GStreamerMediaDescription::extractCodecName):
* Source/WebCore/platform/network/curl/CookieJarDB.cpp:
(WebCore::CookieJarDB::deleteCookie):
* Source/WebCore/platform/text/win/LocaleWin.cpp:
(WebCore::LocaleWin::shortTimeFormat):

Canonical link: https://commits.webkit.org/250239@main

Modified Paths

trunk/Source/WTF/wtf/URL.cpp
trunk/Source/WTF/wtf/text/WTFString.cpp
trunk/Source/WTF/wtf/text/WTFString.h
trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp
trunk/Source/WebCore/dom/CharacterData.cpp
trunk/Source/WebCore/dom/FragmentDirectiveParser.cpp
trunk/Source/WebCore/dom/Range.cpp
trunk/Source/WebCore/editing/CompositeEditCommand.cpp
trunk/Source/WebCore/inspector/InspectorOverlayLabel.cpp
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp
trunk/Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp
trunk/Source/WebCore/platform/network/curl/CookieJarDB.cpp
trunk/Source/WebCore/platform/text/win/LocaleWin.cpp
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
trunk/Source/WebKit/UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.cpp




Diff

Modified: trunk/Source/WTF/wtf/URL.cpp (293759 => 293760)

--- trunk/Source/WTF/wtf/URL.cpp	2022-05-04 06:14:20 UTC (rev 293759)
+++ trunk/Source/WTF/wtf/URL.cpp	2022-05-04 06:18:46 UTC (rev 293760)
@@ -569,8 +569,7 @@
 ASSERT(start < m_string.length());
 ASSERT(length <= m_string.length() - start);
 
-auto stringAfterRemoval = std::exchange(m_string, { });
-stringAfterRemoval.remove(start, length);
+auto stringAfterRemoval = makeStringByRemoving(std::exchange(m_string, { }), start, length);
 parse(WTFMove(stringAfterRemoval));
 }
 


Modified: trunk/Source/WTF/wtf/text/WTFString.cpp (293759 => 293760)

--- trunk/Source/WTF/wtf/text/WTFString.cpp	2022-05-04 06:14:20 UTC (rev 293759)
+++ trunk/Source/WTF/wtf/text/WTFString.cpp	2022-05-04 06:18:46 UTC (rev 293760)
@@ -78,27 +78,16 @@
 return m_impl->characterStartingAt(i);
 }
 
-template inline void String::removeInternal(const CharacterType* characters, unsigned position, unsigned lengthToRemove)
+String makeStringByRemoving(const String& string, unsigned position, unsigned lengthToRemove)
 {
-CharacterType* data;
-auto newImpl = StringImpl::createUninitialized(length() - lengthToRemove, data);
-StringImpl::copyCharacters(data, characters, position);
-StringImpl::copyCharacters(data + position, characters + position + lengthToRemove, length() - lengthToRemove - position);
-m_impl = WTFMove(newImpl);
-}
-
-void String::remove(unsigned position, unsigned lengthToRemove)
-{
 if (!lengthToRemove)
-return;
-auto length = this->length();
+return string;
+auto length = string.length();
 if (position >= length)
-return;
+return string;
 lengthToRemove = std::min(lengthToRemove, length - position);
-if (is8Bit())
-removeInternal(characters8(), position, lengthToRemove);
-else
-removeInternal(characters16(), position, lengthToRemove);
+StringView view { string };
+return makeString(view.left(position), view.substring(position + lengthToRemove));
 }
 
 String String::substring(unsigned position, unsigned length) const


Modified: trunk/Source/WTF/wtf/text/WTFString.h (293759 => 293760)

--- trunk/Source/WTF/wtf/text/WTFString.h	2022-05-04 06:14:20 UTC (rev 293759)
+++ 

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

2022-05-04 Thread zan
Title: [293759] trunk/Source/_javascript_Core








Revision 293759
Author z...@falconsigh.net
Date 2022-05-03 23:14:20 -0700 (Tue, 03 May 2022)


Log Message
[RISCV64] Implement MacroAssemblerRISCV64 move-conditionally methods
https://bugs.webkit.org/show_bug.cgi?id=239998

Reviewed by Yusuke Suzuki.

Provide implementations for the variants of the move-conditionally
operation in MacroAssemblerRISCV64. These are true macro operations,
often requiring scratch registers and branches to implement the
behavior since the RISC-V ISA doesn't provide appropriate instructions
out-of-the-box.

Test cases in testmasm are also enabled, including some additional
guards to avoid unused-variable warnings at build-time.

* assembler/MacroAssemblerRISCV64.h:
(JSC::MacroAssemblerRISCV64::moveConditionally32):
(JSC::MacroAssemblerRISCV64::moveConditionally64):
(JSC::MacroAssemblerRISCV64::moveConditionallyFloat):
(JSC::MacroAssemblerRISCV64::moveConditionallyDouble):
(JSC::MacroAssemblerRISCV64::moveConditionallyTest32):
(JSC::MacroAssemblerRISCV64::moveConditionallyTest64):
(JSC::MacroAssemblerRISCV64::moveDoubleConditionally32):
(JSC::MacroAssemblerRISCV64::moveDoubleConditionally64):
(JSC::MacroAssemblerRISCV64::moveDoubleConditionallyFloat):
(JSC::MacroAssemblerRISCV64::moveDoubleConditionallyDouble):
(JSC::MacroAssemblerRISCV64::moveDoubleConditionallyTest32):
(JSC::MacroAssemblerRISCV64::moveDoubleConditionallyTest64):
(JSC::MacroAssemblerRISCV64::branchForMoveConditionally):
* assembler/testmasm.cpp:
(JSC::testProbeModifiesStackPointer):
(JSC::testProbeModifiesStackValues):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/assembler/MacroAssemblerRISCV64.h
trunk/Source/_javascript_Core/assembler/testmasm.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (293758 => 293759)

--- trunk/Source/_javascript_Core/ChangeLog	2022-05-04 03:17:09 UTC (rev 293758)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-05-04 06:14:20 UTC (rev 293759)
@@ -1,3 +1,37 @@
+2022-05-03  Zan Dobersek  
+
+[RISCV64] Implement MacroAssemblerRISCV64 move-conditionally methods
+https://bugs.webkit.org/show_bug.cgi?id=239998
+
+Reviewed by Yusuke Suzuki.
+
+Provide implementations for the variants of the move-conditionally
+operation in MacroAssemblerRISCV64. These are true macro operations,
+often requiring scratch registers and branches to implement the
+behavior since the RISC-V ISA doesn't provide appropriate instructions
+out-of-the-box.
+
+Test cases in testmasm are also enabled, including some additional
+guards to avoid unused-variable warnings at build-time.
+
+* assembler/MacroAssemblerRISCV64.h:
+(JSC::MacroAssemblerRISCV64::moveConditionally32):
+(JSC::MacroAssemblerRISCV64::moveConditionally64):
+(JSC::MacroAssemblerRISCV64::moveConditionallyFloat):
+(JSC::MacroAssemblerRISCV64::moveConditionallyDouble):
+(JSC::MacroAssemblerRISCV64::moveConditionallyTest32):
+(JSC::MacroAssemblerRISCV64::moveConditionallyTest64):
+(JSC::MacroAssemblerRISCV64::moveDoubleConditionally32):
+(JSC::MacroAssemblerRISCV64::moveDoubleConditionally64):
+(JSC::MacroAssemblerRISCV64::moveDoubleConditionallyFloat):
+(JSC::MacroAssemblerRISCV64::moveDoubleConditionallyDouble):
+(JSC::MacroAssemblerRISCV64::moveDoubleConditionallyTest32):
+(JSC::MacroAssemblerRISCV64::moveDoubleConditionallyTest64):
+(JSC::MacroAssemblerRISCV64::branchForMoveConditionally):
+* assembler/testmasm.cpp:
+(JSC::testProbeModifiesStackPointer):
+(JSC::testProbeModifiesStackValues):
+
 2022-05-03  Yusuke Suzuki  
 
 [JSC] Extend Structure heap size from 1GB to 4GB


Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerRISCV64.h (293758 => 293759)

--- trunk/Source/_javascript_Core/assembler/MacroAssemblerRISCV64.h	2022-05-04 03:17:09 UTC (rev 293758)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerRISCV64.h	2022-05-04 06:14:20 UTC (rev 293759)
@@ -3435,19 +3435,285 @@
 return failure;
 }
 
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveConditionally32);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveConditionally64);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveConditionallyFloat);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveConditionallyDouble);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveConditionallyTest32);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveConditionallyTest64);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveDoubleConditionally32);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveDoubleConditionally64);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveDoubleConditionallyFloat);
-MACRO_ASSEMBLER_RISCV64_TEMPLATED_NOOP_METHOD(moveDoubleConditionallyDouble);
-