[webkit-changes] [295657] trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h
Title: [295657] trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h Revision 295657 Author hey...@apple.com Date 2022-06-17 22:54:10 -0700 (Fri, 17 Jun 2022) Log Message SVGAnimatedProperty::isAnimating need not compute number of animators https://bugs.webkit.org/show_bug.cgi?id=241732 Reviewed by Tim Horton. We just need to know if there are any. * Source/WebCore/svg/properties/SVGAnimatedProperty.h: (WebCore::SVGAnimatedProperty::isAnimating const): Canonical link: https://commits.webkit.org/251662@main Modified Paths trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h Diff Modified: trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h (295656 => 295657) --- trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h 2022-06-18 04:26:27 UTC (rev 295656) +++ trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h 2022-06-18 05:54:10 UTC (rev 295657) @@ -53,7 +53,7 @@ virtual std::optional synchronize() { return std::nullopt; } // Control the animation life cycle. -bool isAnimating() const { return m_animators.computeSize(); } +bool isAnimating() const { return !m_animators.computesEmpty(); } virtual void startAnimation(SVGAttributeAnimator& animator) { m_animators.add(animator); } virtual void stopAnimation(SVGAttributeAnimator& animator) { m_animators.remove(animator); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295656] trunk/Source
Title: [295656] trunk/Source Revision 295656 Author mark@apple.com Date 2022-06-17 21:26:27 -0700 (Fri, 17 Jun 2022) Log Message Enhance Options::useOSLog to accept an os log type value. https://bugs.webkit.org/show_bug.cgi?id=241719 Reviewed by Yusuke Suzuki. This option only applies to OS(DARWIN). For example, we can now use any of these: --useOSLog=default// logs to OS_LOG_TYPE_DEFAULT --useOSLog=info // logs to OS_LOG_TYPE_INFO --useOSLog=debug // logs to OS_LOG_TYPE_DEBUG --useOSLog=error // logs to OS_LOG_TYPE_ERROR --useOSLog=fault. // logs to OS_LOG_TYPE_FAULT We can still use --useOSLog=0 or false (which means do the normal dataLog) and --useOSLog=1 or true (which means dataLog to OS_LOG_TYPE_ERROR). Previously, when we specify --useOSLog=1, we will log to OS_LOG_TYPE_INFO. This has been a source of friction in usage because no one ever remembers that we need to enable OS_LOG_TYPE_INFO in the log stream to see this logging. Instead, --useOSLog=1 will now log to OS_LOG_TYPE_ERROR, which ensures that logging will show up in log stream. This is fine to do because the --useOSLog=1 option indicates that the client really wants to see the logs. Otherwise, the client can use one of the other os log types if they want something different. Secondly, because --useOSLog=1 indicates that the client really wants to see the logs, logging to OS_LOG_TYPE_ERROR ensures that the logging is flushed to the file system instead of sitting in a memory buffer, and potentially not showing up in the log stream. Also made the following changes: 1. Changed Options::dumpAllOptions to use dataLog instead of printing to stderr. This allows its output to be diverted using Options::useOSLog as well. 2. Moved the call to WTF::setDataFile from Options::initialize to Options::recomputeDependentOptions. This allows Options::useOSLog to be specified using the jsc shell's --useOSLog argument instead of requiring it to be specified using the JSC_useOSLog env var in order to work. To enable this, added a useOSLogOptionHasChanged flag that can be set in the parser of the Options::useOSLog option. This prevents Options::recomputeDependentOptions from calling initializeDatafileToUseOSLog() repeatedly every time any option is set. 3. Added initializeDatafileToUseOSLog() which now instantiates the appropriate OSLogPrintStream and sets it using WTF::setDataFile. initializeDatafileToUseOSLog() also asserts that it is called at most once. 4. Added an assertion in WTF::setDataFile() to ensure that it is not called more than once. 5. #if out the calls to overrideAliasedOptionWithHeuristic() on PLATFORM(COCOA). They are not needed because, on PLATFORM(COCOA), we already iterate through every env var starting with JSC_ and call Options::setOption() on it. Options::setOption() will also handle aliased options. For reference, this is an example of how we can view the logs using log stream once --useOSLog=1 is used: # log stream --predicate 'category == "DataLog"' * Source/_javascript_Core/API/glib/JSCOptions.cpp: * Source/_javascript_Core/jsc.cpp: (CommandLine::parseArguments): * Source/_javascript_Core/runtime/Options.cpp: (JSC::parse): (JSC::asDarwinOSLogType): (JSC::initializeDatafileToUseOSLog): (JSC::asString): (JSC::Options::recomputeDependentOptions): (JSC::Options::initialize): (JSC::Options::setOptionWithoutAlias): (JSC::Options::dumpAllOptions): (JSC::OptionReader::Option::initValue): (JSC::OptionReader::Option::dump const): (JSC::OptionReader::Option::operator== const): * Source/_javascript_Core/runtime/Options.h: * Source/_javascript_Core/runtime/OptionsList.h: * Source/WTF/wtf/DataLog.cpp: (WTF::setDataFile): Canonical link: https://commits.webkit.org/251661@main Modified Paths trunk/Source/_javascript_Core/API/glib/JSCOptions.cpp trunk/Source/_javascript_Core/jsc.cpp trunk/Source/_javascript_Core/runtime/Options.cpp trunk/Source/_javascript_Core/runtime/Options.h trunk/Source/_javascript_Core/runtime/OptionsList.h trunk/Source/WTF/wtf/DataLog.cpp Diff Modified: trunk/Source/_javascript_Core/API/glib/JSCOptions.cpp (295655 => 295656) --- trunk/Source/_javascript_Core/API/glib/JSCOptions.cpp 2022-06-18 03:57:40 UTC (rev 295655) +++ trunk/Source/_javascript_Core/API/glib/JSCOptions.cpp 2022-06-18 04:26:27 UTC (rev 295656) @@ -164,6 +164,20 @@ } } +static bool valueFromGValue(const GValue* gValue, OSLogType& value) +{ +unsigned optionValue = g_value_get_uint(gValue); +if (optionValue > static_cast(OSLogType::Fault)) +return false; +value = static_cast(optionValue); +return true; +} + +static void valueToGValue(OSLogType value, GValue* gValue) +{ +g_value_set_uint(gValue, static_cast(value)); +} + static gboolean jscOptionsSetValue(const char* option, const GValue* value) { #define SET_OPTION_VALUE(type_, name_, defaultValue_, availability_, description_) \ @@ -569,6
[webkit-changes] [295655] trunk/Source/WebCore/page/FocusController.cpp
Title: [295655] trunk/Source/WebCore/page/FocusController.cpp Revision 295655 Author nmouchta...@apple.com Date 2022-06-17 20:57:40 -0700 (Fri, 17 Jun 2022) Log Message Assertion failed m_page.shouldSuppressScrollbarAnimations() in FocusController::setIsVisibleAndActiveInternal(bool) https://bugs.webkit.org/show_bug.cgi?id=241609 Reviewed by Simon Fraser. Revert to original assert after change in https://bugs.webkit.org/show_bug.cgi?id=238497. In the case of a scrollable area with no scrollbars, m_scrollerImpPair is not nil, but its members _horizontalScrollerImp and _verticalScrollerImp are nil, so presumably the NSScroller API handles this case correctly. * Source/WebCore/page/FocusController.cpp: (WebCore::FocusController::setIsVisibleAndActiveInternal): Canonical link: https://commits.webkit.org/251660@main Modified Paths trunk/Source/WebCore/page/FocusController.cpp Diff Modified: trunk/Source/WebCore/page/FocusController.cpp (295654 => 295655) --- trunk/Source/WebCore/page/FocusController.cpp 2022-06-18 03:46:55 UTC (rev 295654) +++ trunk/Source/WebCore/page/FocusController.cpp 2022-06-18 03:57:40 UTC (rev 295655) @@ -963,10 +963,7 @@ continue; for (auto& scrollableArea : *scrollableAreas) { -if (!scrollableArea->scrollbarsCanBeActive()) -continue; -ASSERT(m_page.shouldSuppressScrollbarAnimations()); - +ASSERT(scrollableArea->scrollbarsCanBeActive() || m_page.shouldSuppressScrollbarAnimations()); contentAreaDidShowOrHide(scrollableArea, contentIsVisible); } } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295654] trunk/Websites/perf.webkit.org/tools/sync-commits.py
Title: [295654] trunk/Websites/perf.webkit.org/tools/sync-commits.py Revision 295654 Author commit-qu...@webkit.org Date 2022-06-17 20:46:55 -0700 (Fri, 17 Jun 2022) Log Message sync-commits.py should force reset to FETCH_HEAD instead. Patch by Zhifei Fang on 2022-06-17 Reviewed by Jonathan Bedard. * Websites/perf.webkit.org/tools/sync-commits.py: (GitRepository._fetch_remote): Canonical link: https://commits.webkit.org/251659@main Modified Paths trunk/Websites/perf.webkit.org/tools/sync-commits.py Diff Modified: trunk/Websites/perf.webkit.org/tools/sync-commits.py (295653 => 295654) --- trunk/Websites/perf.webkit.org/tools/sync-commits.py 2022-06-18 00:50:59 UTC (rev 295653) +++ trunk/Websites/perf.webkit.org/tools/sync-commits.py 2022-06-18 03:46:55 UTC (rev 295654) @@ -303,7 +303,8 @@ def _fetch_remote(self): if self._report_svn_revision: -self._run_git_command(['pull']) +self._run_git_command(['fetch', 'origin', self._git_branch]) +self._run_git_command(['reset', '--hard', 'FETCH_HEAD']) subprocess.check_call(['rm', '-rf', os.path.join(self._git_checkout, '.git/svn')]) self._run_git_command(['svn', 'fetch']) else: ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295653] trunk/Websites/perf.webkit.org/tools/sync-commits.py
Title: [295653] trunk/Websites/perf.webkit.org/tools/sync-commits.py Revision 295653 Author commit-qu...@webkit.org Date 2022-06-17 17:50:59 -0700 (Fri, 17 Jun 2022) Log Message [sync-commit.py] Stop syncing SVN revision after a certain revision Patch by Zhifei Fang on 2022-06-17 Reviewed by Dewei Zhu. * Websites/perf.webkit.org/tools/sync-commits.py: (load_repository): (GitRepository.__init__): (GitRepository.fetch_next_commit): (GitRepository._svn_revision_from_git_hash): (GitRepository._git_hash_from_svn_revision_hash_mixed): (GitRepository._revision_from_tokens): (GitRepository._git_hash_from_svn_revision): Deleted. Canonical link: https://commits.webkit.org/251658@main Modified Paths trunk/Websites/perf.webkit.org/tools/sync-commits.py Diff Modified: trunk/Websites/perf.webkit.org/tools/sync-commits.py (295652 => 295653) --- trunk/Websites/perf.webkit.org/tools/sync-commits.py 2022-06-18 00:15:50 UTC (rev 295652) +++ trunk/Websites/perf.webkit.org/tools/sync-commits.py 2022-06-18 00:50:59 UTC (rev 295653) @@ -18,7 +18,10 @@ # There are some buggy commit messages: # Canonical link: https://commits.webkit.org/https://commits.webkit.org/232477@main -REVISION_IDENTIFIER_RE = re.compile(r'Canonical link: (https\://commits\.webkit\.org/)+(?P\d+@[\w\.\-]+)\n') +REVISION_IDENTIFIER_IN_MSG_RE = re.compile(r'Canonical link: (https\://commits\.webkit\.org/)+(?P\d+\.?\d*@[\w\.\-]+)\n') +REVISION_IN_MSG_RE = re.compile(r'git-svn-id: https://svn\.webkit\.org/repository/webkit/[\w\W]+@(?P\d+) [\w\d\-]+\n') +HASH_RE = re.compile(r'^[a-f0-9A-F]+$') +REVISION_RE = re.compile(r'^[Rr]?(?P\d+)$') def main(argv): parser = argparse.ArgumentParser() @@ -49,7 +52,8 @@ return GitRepository( name=repository['name'], git_url=repository['url'], git_checkout=repository['gitCheckout'], git_branch=repository.get('branch'), report_revision_identifier_in_commit_msg=repository.get('reportRevisionIdentifier'), -report_svn_revison=repository.get('reportSVNRevision')) +report_svn_revison=repository.get('reportSVNRevision'), +max_revision=repository.get('maxRevision')) return SVNRepository(name=repository['name'], svn_url=repository['url'], should_trust_certificate=repository.get('trustCertificate', False), use_server_auth=repository.get('useServerAuth', False), account_name_script_path=repository.get('accountNameFinderScript')) @@ -91,6 +95,7 @@ break if result.get('status') == 'FailedToFindPreviousCommit': +print result previous_commit = self.fetch_commit(server_config, result['commit']['previousCommit']) if not previous_commit: raise Exception('Could not find the previous commit %s of %s' % (result['commit']['previousCommit'], result['commit']['revision'])) @@ -198,7 +203,7 @@ class GitRepository(Repository): -def __init__(self, name, git_checkout, git_url, git_branch=None, report_revision_identifier_in_commit_msg=False, report_svn_revison=False): +def __init__(self, name, git_checkout, git_url, git_branch=None, report_revision_identifier_in_commit_msg=False, report_svn_revison=False, max_revision=None): assert(os.path.isdir(git_checkout)) super(GitRepository, self).__init__(name) self._git_checkout = git_checkout @@ -207,6 +212,7 @@ self._tokenized_hashes = [] self._report_revision_identifier_in_commit_msg = report_revision_identifier_in_commit_msg self._report_svn_revision = report_svn_revison +self._max_revision = max_revision def fetch_next_commit(self, server_config, last_fetched): if not last_fetched: @@ -214,10 +220,10 @@ tokens = self._tokenized_hashes[0] else: if self._report_svn_revision: -last_fetched_git_hash = self._git_hash_from_svn_revision(last_fetched) +last_fetched_git_hash = self._git_hash_from_svn_revision_hash_mixed(last_fetched) if not last_fetched_git_hash: self._fetch_remote() -last_fetched_git_hash = self._git_hash_from_svn_revision(last_fetched) +last_fetched_git_hash = self._git_hash_from_svn_revision_hash_mixed(last_fetched) if not last_fetched_git_hash: raise ValueError('Cannot find the git hash for the last fetched svn revision') last_fetched = last_fetched_git_hash @@ -237,10 +243,17 @@ return None def _svn_revision_from_git_hash(self, git_hash): +message = self._run_git_command(['log', git_hash, '-1', '--pretty=%B']) +revision_match = REVISION_IN_MSG_RE.search(message) +if revision_match: +return revision_match.group('revision') return self._run_git_command(['svn', 'find-rev', git_hash]).strip() -def
[webkit-changes] [295652] trunk/Source/WebCore/platform/audio/DenormalDisabler.h
Title: [295652] trunk/Source/WebCore/platform/audio/DenormalDisabler.h Revision 295652 Author commit-qu...@webkit.org Date 2022-06-17 17:15:50 -0700 (Fri, 17 Jun 2022) Log Message General Protection Fault in WebKitWebProcess on 32bit CPUs Patch by Karo on 2022-06-17 https://bugs.webkit.org/show_bug.cgi?id=241588 Reviewed by Yusuke Suzuki. The DAZ flag is used unconditionally and that makes every 32 bit CPUs crash except newer steppings of Pentium 4. * Source/WebCore/platform/audio/DenormalDisabler.h: (WebCore::DenormalDisabler::DenormalDisabler): (WebCore::DenormalDisabler::isDAZSupported): Canonical link: https://commits.webkit.org/251657@main Modified Paths trunk/Source/WebCore/platform/audio/DenormalDisabler.h Diff Modified: trunk/Source/WebCore/platform/audio/DenormalDisabler.h (295651 => 295652) --- trunk/Source/WebCore/platform/audio/DenormalDisabler.h 2022-06-17 23:59:31 UTC (rev 295651) +++ trunk/Source/WebCore/platform/audio/DenormalDisabler.h 2022-06-18 00:15:50 UTC (rev 295652) @@ -26,6 +26,7 @@ #define DenormalDisabler_h #include +#include namespace WebCore { @@ -36,7 +37,7 @@ #define HAVE_DENORMAL #endif -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) +#if COMPILER(GCC_COMPATIBLE) && defined(__SSE__) #define HAVE_DENORMAL #endif @@ -56,7 +57,7 @@ _controlfp_s(, _DN_FLUSH, _MCW_DN); #else m_savedCSR = getCSR(); -setCSR(m_savedCSR | 0x8040); +setCSR(m_savedCSR | (isDAZSupported() ? 0x8040 : 0x8000)); #endif } @@ -83,7 +84,32 @@ #endif } private: -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) +#if COMPILER(GCC_COMPATIBLE) && defined(__SSE__) +static inline bool isDAZSupported() +{ +#if CPU(X86_64) +return true; +#else +static bool s_isInited = false; +static bool s_isSupported = false; +if (s_isInited) +return s_isSupported; + +struct fxsaveResult { +uint8_t before[28]; +uint32_t CSRMask; +uint8_t after[480]; +} __attribute__ ((aligned (16))); + +fxsaveResult registerData; +memset(, 0, sizeof(fxsaveResult)); +asm volatile("fxsave %0" : "=m" (registerData)); +s_isSupported = registerData.CSRMask & 0x0040; +s_isInited = true; +return s_isSupported; +#endif +} + inline int getCSR() { int result; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295651] trunk
Title: [295651] trunk Revision 295651 Author drou...@apple.com Date 2022-06-17 16:59:31 -0700 (Fri, 17 Jun 2022) Log Message Web Inspector: Allow forcing pseudo class :target https://bugs.webkit.org/show_bug.cgi?id=241707 Reviewed by Patrick Angle and Yusuke Suzuki. Test: inspector/css/forcePseudoState.html * Source/_javascript_Core/inspector/protocol/CSS.json: * Source/WebCore/inspector/agents/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::forcePseudoState): * Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js: (WI.CSSManager.displayNameForForceablePseudoClass): (WI.CSSManager.prototype.canForcePseudoClass): * Source/WebCore/css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne const): * Source/WebCore/cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): (WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION): (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsTarget): * Source/WebCore/dom/Document.h: (WebCore::Document::cssTargetMemoryOffset): Deleted. Adjust the CSS JIT to also take into account Web Inspector forcibly applying `:target` styles. * LayoutTests/inspector/css/forcePseudoState.html: * LayoutTests/inspector/css/forcePseudoState-expected.txt: Canonical link: https://commits.webkit.org/251656@main Modified Paths trunk/LayoutTests/inspector/css/forcePseudoState-expected.txt trunk/LayoutTests/inspector/css/forcePseudoState.html trunk/Source/_javascript_Core/inspector/protocol/CSS.json trunk/Source/WebCore/css/SelectorChecker.cpp trunk/Source/WebCore/cssjit/SelectorCompiler.cpp trunk/Source/WebCore/dom/Document.h trunk/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js Diff Modified: trunk/LayoutTests/inspector/css/forcePseudoState-expected.txt (295650 => 295651) --- trunk/LayoutTests/inspector/css/forcePseudoState-expected.txt 2022-06-17 23:56:37 UTC (rev 295650) +++ trunk/LayoutTests/inspector/css/forcePseudoState-expected.txt 2022-06-17 23:59:31 UTC (rev 295651) @@ -42,6 +42,14 @@ PASS: Should not have any enabled pseudo classes. PASS: Should change back to initial style. +-- Running test case: CSS.forcePseudoState.target +Forcing pseudo class... +PASS: Should have one enabled pseudo class. +PASS: Should change styles. +Removing forced pseudo class... +PASS: Should not have any enabled pseudo classes. +PASS: Should change back to initial style. + -- Running test case: CSS.forcePseudoState.visited Forcing pseudo class... PASS: Should have one enabled pseudo class. Modified: trunk/LayoutTests/inspector/css/forcePseudoState.html (295650 => 295651) --- trunk/LayoutTests/inspector/css/forcePseudoState.html 2022-06-17 23:56:37 UTC (rev 295650) +++ trunk/LayoutTests/inspector/css/forcePseudoState.html 2022-06-17 23:59:31 UTC (rev 295651) @@ -15,7 +15,8 @@ {forceablePseudoClass: WI.CSSManager.ForceablePseudoClass.FocusVisible, expectedBackgroundColor: "rgb(0, 0, 30)"}, {forceablePseudoClass: WI.CSSManager.ForceablePseudoClass.FocusWithin, expectedBackgroundColor: "rgb(0, 0, 40)"}, {forceablePseudoClass: WI.CSSManager.ForceablePseudoClass.Hover, expectedBackgroundColor: "rgb(0, 0, 50)"}, -{forceablePseudoClass: WI.CSSManager.ForceablePseudoClass.Visited, expectedBackgroundColor: "rgb(0, 0, 60)"}, +{forceablePseudoClass: WI.CSSManager.ForceablePseudoClass.Target, expectedBackgroundColor: "rgb(0, 0, 60)"}, +{forceablePseudoClass: WI.CSSManager.ForceablePseudoClass.Visited, expectedBackgroundColor: "rgb(0, 0, 70)"}, ].forEach(({forceablePseudoClass, expectedBackgroundColor}) => { suite.addTestCase({ name: "CSS.forcePseudoState." + forceablePseudoClass, @@ -83,9 +84,12 @@ #test-element:hover { background-color: rgb(0, 0, 50); } -#test-element:visited { +#test-element:target { background-color: rgb(0, 0, 60); } +#test-element:visited { +background-color: rgb(0, 0, 70); +} Modified: trunk/Source/_javascript_Core/inspector/protocol/CSS.json (295650 => 295651) --- trunk/Source/_javascript_Core/inspector/protocol/CSS.json 2022-06-17 23:56:37 UTC (rev 295650) +++ trunk/Source/_javascript_Core/inspector/protocol/CSS.json 2022-06-17 23:59:31 UTC (rev 295651) @@ -63,6 +63,7 @@ "focus-visible", "focus-within", "hover", +"target", "visited" ], "description": "Pseudo-style identifier (see enum PseudoId in RenderStyleConstants.h)." Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (295650 => 295651) --- trunk/Source/WebCore/css/SelectorChecker.cpp 2022-06-17 23:56:37 UTC (rev 295650) +++ trunk/Source/WebCore/css/SelectorChecker.cpp 2022-06-17 23:59:31 UTC (rev 295651) @@ -962,7 +962,7 @@ return selector.matchNth(count); } case CSSSelector::PseudoClassTarget: -if ( ==
[webkit-changes] [295649] trunk
Title: [295649] trunk Revision 295649 Author commit-qu...@webkit.org Date 2022-06-17 16:56:33 -0700 (Fri, 17 Jun 2022) Log Message video.currentSrc should not be reset when a new load errors https://bugs.webkit.org/show_bug.cgi?id=225451 Patch by Youssef Soliman on 2022-06-17 Reviewed by Jer Noble. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-currentSrc-expected.txt: Covered by existing test which was previously failing. * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::prepareForLoad): Media test removed since this condition is already covered by the above WPT test. * LayoutTests/media/video-currentsrc-cleared.html: Removed. * LayoutTests/media/video-currentsrc-cleared-expected.txt: Removed. Canonical link: https://commits.webkit.org/251654@main Modified Paths trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-currentSrc-expected.txt trunk/Source/WebCore/html/HTMLMediaElement.cpp Removed Paths trunk/LayoutTests/media/video-currentsrc-cleared-expected.txt trunk/LayoutTests/media/video-currentsrc-cleared.html Diff Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-currentSrc-expected.txt (295648 => 295649) --- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-currentSrc-expected.txt 2022-06-17 23:47:50 UTC (rev 295648) +++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-currentSrc-expected.txt 2022-06-17 23:56:33 UTC (rev 295649) @@ -1,3 +1,3 @@ -FAIL Test currentSrc behaviour in various playback scenarios assert_true: Not reset when a new load errors expected true got false +PASS Test currentSrc behaviour in various playback scenarios Deleted: trunk/LayoutTests/media/video-currentsrc-cleared-expected.txt (295648 => 295649) --- trunk/LayoutTests/media/video-currentsrc-cleared-expected.txt 2022-06-17 23:47:50 UTC (rev 295648) +++ trunk/LayoutTests/media/video-currentsrc-cleared-expected.txt 2022-06-17 23:56:33 UTC (rev 295649) @@ -1,12 +0,0 @@ - -Check that 'currentsrc' is cleared when there is no media resource. - -EVENT(canplaythrough) -EXPECTED (video.currentSrc.indexOf("content/test") > '-1') OK -RUN(video.src = "" - -EVENT(error) -EXPECTED (video.currentSrc == '') OK - -END OF TEST - Deleted: trunk/LayoutTests/media/video-currentsrc-cleared.html (295648 => 295649) --- trunk/LayoutTests/media/video-currentsrc-cleared.html 2022-06-17 23:47:50 UTC (rev 295648) +++ trunk/LayoutTests/media/video-currentsrc-cleared.html 2022-06-17 23:56:33 UTC (rev 295649) @@ -1,34 +0,0 @@ - - - - -function error() -{ -testExpected('video.currentSrc', ''); -consoleWrite(''); -endTest(); -} - -function canplaythrough() -{ -testExpected('video.currentSrc.indexOf("content/test")', -1, '>'); -run('video.src = "" -consoleWrite(''); -} - -function start() -{ -findMediaElement(); -waitForEvent('error', error); -waitForEvent('canplaythrough', canplaythrough); -video.src = "" "content/test"); -} - - - - -Check that 'currentsrc' is cleared when there is no media resource. - - Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (295648 => 295649) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2022-06-17 23:47:50 UTC (rev 295648) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2022-06-17 23:56:33 UTC (rev 295649) @@ -1183,7 +1183,6 @@ m_haveFiredLoadedData = false; m_completelyLoaded = false; m_havePreparedToPlay = false; -setCurrentSrc(URL()); #if ENABLE(WIRELESS_PLAYBACK_TARGET) m_failedToPlayToWirelessTarget = false; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295650] trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp
Title: [295650] trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp Revision 295650 Author beid...@apple.com Date 2022-06-17 16:56:37 -0700 (Fri, 17 Jun 2022) Log Message pas_panic_on_out_of_memory_error decoding large session state data blobs https://bugs.webkit.org/show_bug.cgi?id=241486 and Reviewed by Tim Horton. * Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp: (WebKit::encodeLegacySessionState): Try malloc, and gracefully handle failure. This will result in some users losing session state blobs in large single tab use cases, but is better than crashing the UI process. Better handling these cases will be subject of followup work. Canonical link: https://commits.webkit.org/251654@main Modified Paths trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp Diff Modified: trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp (295649 => 295650) --- trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp 2022-06-17 23:56:33 UTC (rev 295649) +++ trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp 2022-06-17 23:56:37 UTC (rev 295650) @@ -515,7 +515,9 @@ CFIndex length = CFDataGetLength(data.get()); size_t bufferSize = length + sizeof(uint32_t); -auto buffer = MallocPtr::malloc(bufferSize); +auto buffer = MallocPtr::tryMalloc(bufferSize); +if (!buffer) +return nullptr; // Put the session state version number at the start of the buffer buffer.get()[0] = (sessionStateDataVersion & 0xff00) >> 24; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295648] trunk/Source/WebKit
Title: [295648] trunk/Source/WebKit Revision 295648 Author bfulg...@apple.com Date 2022-06-17 16:47:50 -0700 (Fri, 17 Jun 2022) Log Message Avoid using hardware JPEG decoding in the WebContent process https://bugs.webkit.org/show_bug.cgi?id=241560 Reviewed by Simon Fraser. This patch switches the file thumbnail logic in WebKit to use PNG, rather than JPEG. This provides two benefits: (1) it uses a better image format for this use case, and (2) it avoids attempts by CoreGraphics to perform hardware JPEG decoding in the WebContent process, which is prohibited by the current sandbox. * Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm: (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Switch to using UIImagePNGRepresentation. * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon): Canonical link: https://commits.webkit.org/251653@main Modified Paths trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp Diff Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm (295647 => 295648) --- trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2022-06-17 23:18:36 UTC (rev 295647) +++ trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2022-06-17 23:47:50 UTC (rev 295648) @@ -436,8 +436,8 @@ for (NSURL *fileURL in fileURLs) filenames.uncheckedAppend(String::fromUTF8(fileURL.fileSystemRepresentation)); -NSData *jpeg = UIImageJPEGRepresentation(iconImage, 1.0); -RefPtr iconImageDataRef = adoptRef(toImpl(WKDataCreate(reinterpret_cast([jpeg bytes]), [jpeg length]))); +NSData *png = UIImagePNGRepresentation(iconImage); +RefPtr iconImageDataRef = adoptRef(toImpl(WKDataCreate(reinterpret_cast([png bytes]), [png length]))); _listener->chooseFiles(filenames, displayString, iconImageDataRef.get()); [self _dispatchDidDismiss]; Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (295647 => 295648) --- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2022-06-17 23:18:36 UTC (rev 295647) +++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2022-06-17 23:47:50 UTC (rev 295648) @@ -4969,7 +4969,7 @@ if (!iconData.empty()) { RetainPtr dataRef = adoptCF(CFDataCreate(nullptr, iconData.data(), iconData.size())); RetainPtr imageProviderRef = adoptCF(CGDataProviderCreateWithCFData(dataRef.get())); -RetainPtr imageRef = adoptCF(CGImageCreateWithJPEGDataProvider(imageProviderRef.get(), nullptr, true, kCGRenderingIntentDefault)); +RetainPtr imageRef = adoptCF(CGImageCreateWithPNGDataProvider(imageProviderRef.get(), nullptr, true, kCGRenderingIntentDefault)); icon = Icon::createIconForImage(WTFMove(imageRef)); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295647] trunk
Title: [295647] trunk Revision 295647 Author commit-qu...@webkit.org Date 2022-06-17 16:18:36 -0700 (Fri, 17 Jun 2022) Log Message Cues displayed during end time https://bugs.webkit.org/show_bug.cgi?id=221854 Patch by Youssef Soliman on 2022-06-17 Reviewed by Eric Carlson. Fixed edge case with cue intervals that had end times that coincided with the current media time in order to follow the spec. Test: media/track/track-cue-endtime.html * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): * LayoutTests/media/track/track-cue-endtime-expected.txt: Added. * LayoutTests/media/track/track-cue-endtime.html: Added. Canonical link: https://commits.webkit.org/251652@main Modified Paths trunk/Source/WebCore/html/HTMLMediaElement.cpp Added Paths trunk/LayoutTests/media/track/track-cue-endtime-expected.txt trunk/LayoutTests/media/track/track-cue-endtime.html Diff Added: trunk/LayoutTests/media/track/track-cue-endtime-expected.txt (0 => 295647) --- trunk/LayoutTests/media/track/track-cue-endtime-expected.txt (rev 0) +++ trunk/LayoutTests/media/track/track-cue-endtime-expected.txt 2022-06-17 23:18:36 UTC (rev 295647) @@ -0,0 +1,17 @@ + +Test to ensure that a cue with an endtime equal to the current time is not active. + +RUN(textTrack = video.addTextTrack('subtitles')) +RUN(textTrack.addCue(new VTTCue(1, 2, 'This should be gone by 2s.'))) +RUN(shouldBeActiveCue = new VTTCue(2, 3, 'This should appear alone at 2s.')) +RUN(textTrack.addCue(shouldBeActiveCue)) + +EVENT(canplaythrough) +RUN(video.currentTime = 2) + +EVENT(seeked) +EXPECTED (activeCues.length == '1') OK +EXPECTED (shouldBeActiveCue == '[object VTTCue]') OK + +END OF TEST + Added: trunk/LayoutTests/media/track/track-cue-endtime.html (0 => 295647) --- trunk/LayoutTests/media/track/track-cue-endtime.html (rev 0) +++ trunk/LayoutTests/media/track/track-cue-endtime.html 2022-06-17 23:18:36 UTC (rev 295647) @@ -0,0 +1,54 @@ + + + + +let textTrack; +let shouldBeActiveCue; +let activeCues; + +function setup() +{ +findMediaElement(); +video.src = "" "../content/test"); + +run("textTrack = video.addTextTrack('subtitles')"); +run("textTrack.addCue(new VTTCue(1, 2, 'This should be gone by 2s.'))"); +run("shouldBeActiveCue = new VTTCue(2, 3, 'This should appear alone at 2s.')"); +run("textTrack.addCue(shouldBeActiveCue)"); +consoleWrite(""); +} + +function canplaythrough() +{ +run("video.currentTime = 2"); +consoleWrite(""); +} + +function seeked() +{ +activeCues = textTrack.activeCues; + +testExpected('activeCues.length', 1); +testExpected('shouldBeActiveCue', activeCues[0]); +consoleWrite(""); + +endTest(); +} + +setCaptionDisplayMode('Automatic'); + +waitForEvent('canplaythrough', canplaythrough); + +waitForEvent('seeked', seeked); + + + + + + +Test to ensure that a cue with an endtime equal to the current time is not active. + + Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (295646 => 295647) --- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2022-06-17 23:09:22 UTC (rev 295646) +++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2022-06-17 23:18:36 UTC (rev 295647) @@ -1682,7 +1682,10 @@ // The user agent must synchronously unset [the text track cue active] flag // whenever ... the media element's readyState is changed back to HAVE_NOTHING. if (m_readyState != HAVE_NOTHING && m_player) { -currentCues = m_cueData->cueTree.allOverlaps({ movieTime, movieTime }); +for (auto& cue : m_cueData->cueTree.allOverlaps({ movieTime, movieTime })) { +if (cue.low() <= movieTime && cue.high() > movieTime) +currentCues.append(cue); +} if (currentCues.size() > 1) std::sort(currentCues.begin(), currentCues.end(), ); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295646] trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp
Title: [295646] trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp Revision 295646 Author drou...@apple.com Date 2022-06-17 16:09:22 -0700 (Fri, 17 Jun 2022) Log Message Add PaymentHandler references when handling updates https://bugs.webkit.org/show_bug.cgi?id=241726 Reviewed by Wenson Hsieh. * Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp: (WebCore::PaymentRequest::paymentMethodChanged): (WebCore::PaymentRequest::settleDetailsPromise): (WebCore::PaymentRequest::complete): (WebCore::PaymentRequest::retry): Canonical link: https://commits.webkit.org/251651@main Modified Paths trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp Diff Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp (295645 => 295646) --- trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp 2022-06-17 22:18:20 UTC (rev 295645) +++ trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp 2022-06-17 23:09:22 UTC (rev 295646) @@ -560,10 +560,13 @@ { whenDetailsSettled([this, protectedThis = Ref { *this }, methodName, methodDetailsFunction = WTFMove(methodDetailsFunction)]() mutable { auto& eventName = eventNames().paymentmethodchangeEvent; -if (hasEventListeners(eventName)) +if (hasEventListeners(eventName)) { dispatchAndCheckUpdateEvent(PaymentMethodChangeEvent::create(eventName, methodName, WTFMove(methodDetailsFunction))); -else -activePaymentHandler()->detailsUpdated(UpdateReason::PaymentMethodChanged, { }, { }, { }, { }); +return; +} + +Ref activePaymentHandler = *this->activePaymentHandler(); +activePaymentHandler->detailsUpdated(UpdateReason::PaymentMethodChanged, { }, { }, { }, { }); }); } @@ -641,6 +644,8 @@ return; } +Ref activePaymentHandler = *this->activePaymentHandler(); + auto& context = *m_detailsPromise->scriptExecutionContext(); auto throwScope = DECLARE_THROW_SCOPE(context.vm()); auto detailsUpdate = convertDictionary(*context.globalObject(), m_detailsPromise->result()); @@ -678,7 +683,7 @@ m_serializedModifierData = WTFMove(std::get<1>(shippingOptionAndModifierData)); } -auto result = activePaymentHandler()->detailsUpdated(reason, WTFMove(detailsUpdate.error), WTFMove(detailsUpdate.shippingAddressErrors), WTFMove(detailsUpdate.payerErrors), detailsUpdate.paymentMethodErrors.get()); +auto result = activePaymentHandler->detailsUpdated(reason, WTFMove(detailsUpdate.error), WTFMove(detailsUpdate.shippingAddressErrors), WTFMove(detailsUpdate.payerErrors), detailsUpdate.paymentMethodErrors.get()); if (result.hasException()) { abortWithException(result.releaseException()); return; @@ -775,7 +780,8 @@ if (!m_activePaymentHandler) return Exception { AbortError }; -auto exception = activePaymentHandler()->complete(document, WTFMove(result), WTFMove(serializedData)); +Ref activePaymentHandler = *this->activePaymentHandler(); +auto exception = activePaymentHandler->complete(document, WTFMove(result), WTFMove(serializedData)); if (exception.hasException()) return exception.releaseException(); @@ -790,7 +796,9 @@ return Exception { AbortError }; m_state = State::Interactive; -return activePaymentHandler()->retry(WTFMove(errors)); + +Ref activePaymentHandler = *this->activePaymentHandler(); +return activePaymentHandler->retry(WTFMove(errors)); } void PaymentRequest::cancel() ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295645] trunk
Title: [295645] trunk Revision 295645 Author wenson_hs...@apple.com Date 2022-06-17 15:18:20 -0700 (Fri, 17 Jun 2022) Log Message attachment elements with `-webkit-user-drag: none;` should not be draggable https://bugs.webkit.org/show_bug.cgi?id=241720 rdar://95401577 Reviewed by Tim Horton. The logic to walk up the ancestor chain in search of draggable elements in `draggableElement()` currently ignores `-webkit-user-drag` for `attachment` elements, and instead considers the attachment draggable as long as it's either the only element in the selection range, or the selection range does not encompass the hit-tested attachment element. Fix this by only proceeding with the single-attachment-drag codepath (`DragSourceAction::Attachment`) in the case where the dragged attachment has a `-webkit-user-drag` value that isn't `"none"`. Test: WKAttachmentTests.UserDragNonePreventsDragOnAttachmentElement * Source/WebCore/page/DragController.cpp: (WebCore::DragController::draggableElement const): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/251650@main Modified Paths trunk/Source/WebCore/page/DragController.cpp trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm Diff Modified: trunk/Source/WebCore/page/DragController.cpp (295644 => 295645) --- trunk/Source/WebCore/page/DragController.cpp 2022-06-17 21:42:20 UTC (rev 295644) +++ trunk/Source/WebCore/page/DragController.cpp 2022-06-17 22:18:20 UTC (rev 295645) @@ -787,6 +787,10 @@ if (auto attachment = enclosingAttachmentElement(*startElement)) { auto& selection = sourceFrame->selection().selection(); bool isSingleAttachmentSelection = selection.start() == Position(attachment.get(), Position::PositionIsBeforeAnchor) && selection.end() == Position(attachment.get(), Position::PositionIsAfterAnchor); +auto* renderer = attachment->renderer(); +if (!renderer || renderer->style().userDrag() == UserDrag::None) +return nullptr; + auto selectedRange = selection.firstRange(); if (isSingleAttachmentSelection || !selectedRange || !contains(*selectedRange, *attachment)) { state.type = DragSourceAction::Attachment; @@ -793,7 +797,7 @@ return attachment.get(); } } -#endif +#endif // ENABLE(ATTACHMENT_ELEMENT) auto selectionDragElement = state.type.contains(DragSourceAction::Selection) && m_dragSourceAction.contains(DragSourceAction::Selection) ? startElement : nullptr; if (ImageOverlay::isOverlayText(startElement)) Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm (295644 => 295645) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm 2022-06-17 21:42:20 UTC (rev 295644) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm 2022-06-17 22:18:20 UTC (rev 295645) @@ -40,9 +40,11 @@ #import #import #import +#import #import #import #import +#import #import #import @@ -1882,6 +1884,28 @@ EXPECT_TRUE([[info data] isEqualToData:testImageData()]); } +TEST(WKAttachmentTests, UserDragNonePreventsDragOnAttachmentElement) +{ +auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); +auto styleSheet = adoptNS([[_WKUserStyleSheet alloc] initWithSource:@"attachment { -webkit-user-drag: none; }" forMainFrameOnly:YES]); +[[configuration userContentController] _addUserStyleSheet:styleSheet.get()]; +[configuration _setAttachmentElementEnabled:YES]; + +auto simulator = adoptNS([[DragAndDropSimulator alloc] initWithWebViewFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); +auto *webView = [simulator webView]; +[webView synchronouslyLoadHTMLString:attachmentEditingTestMarkup]; + +auto file = adoptNS([[NSFileWrapper alloc] initWithURL:testPDFFileURL() options:0 error:nil]); +[webView synchronouslyInsertAttachmentWithFileWrapper:file.get() contentType:nil]; +[simulator runFrom:NSMakePoint(15, 15) to:NSMakePoint(50, 50)]; + +#if PLATFORM(MAC) +EXPECT_NULL([simulator draggingInfo]); +#else +EXPECT_EQ(0U, [simulator sourceItemProviders].count); +#endif +} + #pragma mark - Platform-specific tests #if PLATFORM(MAC) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295644] trunk/Source/WebKit/Resources/SandboxProfiles/ios/ com.apple.WebKit.WebContent.sb.in
Title: [295644] trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in Revision 295644 Author pvol...@apple.com Date 2022-06-17 14:42:20 -0700 (Fri, 17 Jun 2022) Log Message Remove some sandbox telemetry https://bugs.webkit.org/show_bug.cgi?id=241725 Reviewed by Geoffrey Garen. Remove some sandbox telemetry in the WebContent process on iOS to make room for other telemetry. * Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in: Canonical link: https://commits.webkit.org/251649@main Modified Paths trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in Diff Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in (295643 => 295644) --- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in 2022-06-17 20:33:59 UTC (rev 295643) +++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in 2022-06-17 21:42:20 UTC (rev 295644) @@ -353,7 +353,7 @@ "com.apple.mt" "com.apple.preferences.sounds") -(deny mach-lookup (with telemetry) +(deny mach-lookup (global-name "com.apple.frontboard.systemappservices") ; -[UIViewServiceInterface _createProcessAssertion] -> SBSProcessIDForDisplayIdentifier() ) @@ -518,7 +518,7 @@ (global-name "com.apple.logd.events") ) -(deny mach-lookup (with telemetry) +(deny mach-lookup (with no-report) (global-name "com.apple.distributed_notifications@1v3")) (deny mach-lookup (with no-report) @@ -1172,9 +1172,12 @@ SYS_fgetxattr SYS_fstatat64 SYS_fsync +SYS_getattrlistbulk ;; xpc_realpath and directory enumeration SYS_getgid SYS_getxattr +SYS_iopolicysys SYS_mkdirat +SYS_open_dprotected_np SYS_openat_nocancel SYS_pread_nocancel SYS_rmdir @@ -1195,13 +1198,10 @@ SYS___pthread_kill SYS___pthread_sigmask SYS___semwait_signal -SYS_getattrlistbulk ;; xpc_realpath and directory enumeration -SYS_iopolicysys #if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS) SYS_necp_client_action SYS_necp_open #endif -SYS_open_dprotected_np SYS_psynch_rw_wrlock SYS_socket SYS_umask ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295643] trunk
Title: [295643] trunk Revision 295643 Author jbed...@apple.com Date 2022-06-17 13:33:59 -0700 (Fri, 17 Jun 2022) Log Message [git-webkit] Add WebKit-security remote https://bugs.webkit.org/show_bug.cgi?id=241647 Reviewed by Stephanie Lewis. * Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: (Setup.github): Don't add remote postfix if repo name already has the remote postfix. * metadata/git_config_extension: Add WebKit-security remote. Canonical link: https://commits.webkit.org/251648@main Modified Paths trunk/Tools/Scripts/libraries/webkitscmpy/setup.py trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py trunk/metadata/git_config_extension Diff Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295642 => 295643) --- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2022-06-17 19:06:35 UTC (rev 295642) +++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2022-06-17 20:33:59 UTC (rev 295643) @@ -29,7 +29,7 @@ setup( name='webkitscmpy', -version='5.0.1', +version='5.0.2', description='Library designed to interact with git and svn repositories.', long_description=readme(), classifiers=[ Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295642 => 295643) --- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2022-06-17 19:06:35 UTC (rev 295642) +++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2022-06-17 20:33:59 UTC (rev 295643) @@ -46,7 +46,7 @@ "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `" ) -version = Version(5, 0, 1) +version = Version(5, 0, 2) AutoInstall.register(Package('fasteners', Version(0, 15, 0))) AutoInstall.register(Package('jinja2', Version(2, 11, 3))) Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (295642 => 295643) --- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py 2022-06-17 19:06:35 UTC (rev 295642) +++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py 2022-06-17 20:33:59 UTC (rev 295643) @@ -60,7 +60,7 @@ sys.stderr.write('You are not a member of {}\n'.format(team)) sys.stderr.write('Created "{}" fork will not be accessible to other contributors\n'.format(remote)) -forked_name = '{}{}'.format(repository.name, '-{}'.format(remote) if remote else '') +forked_name = '{}{}'.format(repository.name, '-{}'.format(remote) if remote and not repository.name.endswith(remote) else '') log.info('Verifying user owned fork...') response = requests.get('{}/repos/{}/{}'.format( repository.api_url, Modified: trunk/metadata/git_config_extension (295642 => 295643) --- trunk/metadata/git_config_extension 2022-06-17 19:06:35 UTC (rev 295642) +++ trunk/metadata/git_config_extension 2022-06-17 20:33:59 UTC (rev 295643) @@ -8,7 +8,9 @@ [webkitscmpy "remotes"] origin = g...@github.com:WebKit/WebKit.git apple = g...@github.com:apple/WebKit.git +security = g...@github.com:WebKit/WebKit-security.git [webkitscmpy "access"] apple = apple/teams/WebKit +security = WebKit/teams/security [webkitscmpy "pre-pr"] style-checker = python3 Tools/Scripts/check-webkit-style ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295642] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ WKContentExtensionStore.mm
Title: [295642] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm Revision 295642 Author achristen...@apple.com Date 2022-06-17 12:06:35 -0700 (Fri, 17 Jun 2022) Log Message New test: [macOS/iOS arm64] TestWebKitAPI.WKContentRuleListStoreTest.CrossOriginCookieBlocking is crashing https://bugs.webkit.org/show_bug.cgi?id=241653 Reviewed by Yusuke Suzuki. * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm: (TEST_F): Canonical link: https://commits.webkit.org/251647@main Modified Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm Diff Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm (295641 => 295642) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm 2022-06-17 18:57:08 UTC (rev 295641) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm 2022-06-17 19:06:35 UTC (rev 295642) @@ -224,8 +224,18 @@ auto request = co_await connection.awaitableReceiveHTTPRequest(); auto path = HTTPServer::parsePath(request); auto response = [&] { -if (path == "/com"_s) +if (path == "/com"_s) { +#if CPU(ARM64E) && defined(NDEBUG) +// FIXME: This is exactly equivalent code, but the code below crashes on release builds on arm64e. +// See rdar://95391568 +HashMap headerFields; +headerFields.reserveInitialCapacity(1); +headerFields.add("Set-Cookie"_s, "testCookie=42; Path=/; SameSite=None; Secure"_s); +return HTTPResponse(WTFMove(headerFields), "alert('hi')"_s); +#else return HTTPResponse({ { "Set-Cookie"_s, "testCookie=42; Path=/; SameSite=None; Secure"_s } }, "alert('hi')"_s); +#endif +} if (path == "/org"_s) return HTTPResponse("fetch('https://example.com/cookie-check', {credentials: 'include'})"_s); if (path == "/cookie-check"_s) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295641] trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/ LocalAuthenticator.mm
Title: [295641] trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm Revision 295641 Author j_pas...@apple.com Date 2022-06-17 11:57:08 -0700 (Fri, 17 Jun 2022) Log Message [WebAuthn] Upgrading a legacy platform credential to a passkey does not delete the legacy credential https://bugs.webkit.org/show_bug.cgi?id=241608 rdar://95059952 Reviewed by Brent Fulgham. * Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::deleteDuplicateCredential const): Query credentials by user handle, regardless of sync status to properly remove legacy credentials. Canonical link: https://commits.webkit.org/251646@main Modified Paths trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm Diff Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm (295640 => 295641) --- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm 2022-06-17 18:03:22 UTC (rev 295640) +++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm 2022-06-17 18:57:08 UTC (rev 295641) @@ -670,15 +670,14 @@ if (memcmp(userHandle->data(), creationOptions.user.id.data(), userHandle->byteLength())) return false; -auto query = adoptNS([[NSMutableDictionary alloc] init]); -[query setDictionary:@{ +NSDictionary *query = @{ (id)kSecClass: (id)kSecClassKey, (id)kSecAttrApplicationLabel: toNSData(credential->rawId()).get(), +(id)kSecAttrSynchronizable: (id)kSecAttrSynchronizableAny, (id)kSecUseDataProtectionKeychain: @YES -}]; -updateQueryIfNecessary(query.get()); +}; -OSStatus status = SecItemDelete((__bridge CFDictionaryRef)query.get()); +OSStatus status = SecItemDelete((__bridge CFDictionaryRef)query); if (status && status != errSecItemNotFound) LOG_ERROR(makeString("Couldn't delete older credential: "_s, status).utf8().data()); return true; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295640] trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
Title: [295640] trunk/Source/WebInspectorUI/UserInterface/Base/Main.js Revision 295640 Author timo...@apple.com Date 2022-06-17 11:03:22 -0700 (Fri, 17 Jun 2022) Log Message Inspector window goes into an inactive state when extension tab is selected. https://bugs.webkit.org/show_bug.cgi?id=241652 rdar://91768323 Reviewed by Devin Rousso. * Source/WebInspectorUI/UserInterface/Base/Main.js: (WI.contentLoaded): Update event listeners to use a single _updateWindowInactiveState and listen to visibilitychange. (WI._updateWindowInactiveState): Combined from WI._windowFocused and WI._windowBlurred. Use document.hasFocus() to check for an active window, which works for child frames too. When an iframe is the active element, we will not get any more focus or blur events for the main window, so use a 250ms timeout to keep checking while the iframe is focused. Canonical link: https://commits.webkit.org/251645@main Modified Paths trunk/Source/WebInspectorUI/UserInterface/Base/Main.js Diff Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (295639 => 295640) --- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2022-06-17 17:42:19 UTC (rev 295639) +++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2022-06-17 18:03:22 UTC (rev 295640) @@ -215,8 +215,9 @@ document.addEventListener("dragover", WI._handleDragOver); document.addEventListener("focus", WI._focusChanged, true); -window.addEventListener("focus", WI._windowFocused); -window.addEventListener("blur", WI._windowBlurred); +window.addEventListener("focus", WI._updateWindowInactiveState); +window.addEventListener("blur", WI._updateWindowInactiveState); +window.addEventListener("visibilitychange", WI._updateWindowInactiveState); window.addEventListener("resize", WI._windowResized); window.addEventListener("keydown", WI._windowKeyDown); window.addEventListener("keyup", WI._windowKeyUp); @@ -1821,22 +1822,18 @@ } }; -WI._windowFocused = function(event) +WI._updateWindowInactiveState = function(event) { -if (event.target.document.nodeType !== Node.DOCUMENT_NODE) -return; - // FIXME: We should use the :window-inactive pseudo class once https://webkit.org/b/38927 is fixed. -document.body.classList.remove(WI.dockConfiguration === WI.DockConfiguration.Undocked ? "window-inactive" : "window-docked-inactive"); -}; -WI._windowBlurred = function(event) -{ -if (event.target.document.nodeType !== Node.DOCUMENT_NODE) -return; +if (document.activeElement?.tagName === "IFRAME") { +// An active iframe means an extension tab is active and we can't tell when the window blurs due to cross-origin restrictions. +// In this case we need to keep checking to know if the window loses focus since there is no event we can use. +setTimeout(WI._updateWindowInactiveState, 250); +} -// FIXME: We should use the :window-inactive pseudo class once https://webkit.org/b/38927 is fixed. -document.body.classList.add(WI.dockConfiguration === WI.DockConfiguration.Undocked ? "window-inactive" : "window-docked-inactive"); +let inactive = !document.hasFocus(); +document.body.classList.toggle(WI.dockConfiguration === WI.DockConfiguration.Undocked ? "window-inactive" : "window-docked-inactive", inactive); }; WI._windowResized = function(event) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295639] trunk/Source/WTF
Title: [295639] trunk/Source/WTF Revision 295639 Author commit-qu...@webkit.org Date 2022-06-17 10:42:19 -0700 (Fri, 17 Jun 2022) Log Message [Cocoa] Rename WebM Experiment to Alternate WebM Player https://bugs.webkit.org/show_bug.cgi?id=241695 Patch by Youssef Soliman on 2022-06-17 Reviewed by Eric Carlson. Renamed the WebM Experiment to a more legible name and fixed flag to show up in internal debug menu. * Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml: * Source/WTF/wtf/PlatformEnableCocoa.h: Canonical link: https://commits.webkit.org/251644@main Modified Paths trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml trunk/Source/WTF/wtf/PlatformEnableCocoa.h Diff Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml (295638 => 295639) --- trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml 2022-06-17 17:23:42 UTC (rev 295638) +++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml 2022-06-17 17:42:19 UTC (rev 295639) @@ -54,6 +54,19 @@ WebCore: default: true +AlternateWebMPlayerEnabled: + type: bool + humanReadableName: "Alternate WebM Player" + humanReadableDescription: "Enable Alternate WebM Player" + condition: ENABLE(ALTERNATE_WEBM_PLAYER) + defaultValue: +WebKitLegacy: + default: false +WebKit: + default: false +WebCore: + default: false + AlwaysZoomOnDoubleTap: type: bool humanReadableName: "DTTZ always" @@ -976,16 +989,6 @@ WebKit: default: false -WebMExperimentEnabled: - type: bool - humanReadableName: "WebM Experiment" - humanReadableDescription: "Enable WebM Experiment" - webcoreBinding: RuntimeEnabledFeatures - condition: ENABLE(WEBM_EXPERIMENT) - defaultValue: -WebCore: - default: false - WebRTCAudioLatencyAdaptationEnabled: type: bool humanReadableName: "WebRTC Audio Latency Adaptation" Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (295638 => 295639) --- trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2022-06-17 17:23:42 UTC (rev 295638) +++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2022-06-17 17:42:19 UTC (rev 295639) @@ -51,6 +51,10 @@ #define ENABLE_AIRPLAY_PICKER 1 #endif +#if !defined(ENABLE_ALTERNATE_WEBM_PLAYER) && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST)) +#define ENABLE_ALTERNATE_WEBM_PLAYER 1 +#endif + #if !defined(ENABLE_ANIMATED_KEYBOARD_SCROLLING) && PLATFORM(IOS_FAMILY) #define ENABLE_ANIMATED_KEYBOARD_SCROLLING 1 #endif @@ -666,10 +670,6 @@ #define ENABLE_WEBGL2 1 #endif -#if !defined(ENABLE_WEBM_EXPERIMENT) && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST)) -#define ENABLE_WEBM_EXPERIMENT 1 -#endif - #if !defined(ENABLE_WEBPROCESS_NSRUNLOOP) && PLATFORM(MAC) #define ENABLE_WEBPROCESS_NSRUNLOOP 1 #endif ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295638] trunk/LayoutTests/imported/w3c
Title: [295638] trunk/LayoutTests/imported/w3c Revision 295638 Author simon.fra...@apple.com Date 2022-06-17 10:23:42 -0700 (Fri, 17 Jun 2022) Log Message Update Intersection Observer WPTs https://bugs.webkit.org/show_bug.cgi?id=241708 Reviewed by Antoine Quint. Update Intersection Observer WPTs from 93a98d6ac4785d3c78b57845d91c78e2bf12c6eb * LayoutTests/imported/w3c/resources/import-expectations.json: * LayoutTests/imported/w3c/resources/resource-files.json: * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/display-none-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/display-none.html: * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split.html: * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-with-fractional-bounds-2-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-with-fractional-bounds-2.html: Added. * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-with-fractional-bounds-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-with-fractional-bounds.html: Added. * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/intersection-observer-test-utils.js: (return.new.Promise.): (return.new.Promise): (waitForNotification): (waitForFrame): Deleted. (runTestCycle): Deleted. * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/v2/simple-occlusion-svg-foreign-object.html: * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/intersection-observer/zero-area-element-visible.html: Canonical link: https://commits.webkit.org/251643@main Modified Paths trunk/LayoutTests/imported/w3c/resources/import-expectations.json trunk/LayoutTests/imported/w3c/resources/resource-files.json trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/display-none-expected.txt trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/display-none.html trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-ib-split.html trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/resources/intersection-observer-test-utils.js trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/v2/simple-occlusion-svg-foreign-object.html trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/w3c-import.log trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/zero-area-element-visible.html Added Paths trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-with-fractional-bounds-2-expected.txt trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-with-fractional-bounds-2.html trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-with-fractional-bounds-expected.txt trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/intersection-ratio-with-fractional-bounds.html Diff Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (295637 => 295638) --- trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2022-06-17 16:23:05 UTC (rev 295637) +++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2022-06-17 17:23:42 UTC (rev 295638) @@ -33,6 +33,7 @@ "density-size-correction": "import", "encrypted-media": "import", "imported/w3c/web-platform-tests/css/css-position/sticky": "import", +"intersection-observer": "import", "paint-timing/": "import", "paint-timing/fcp-only": "import", "paint-timing/resources": "import", Modified: trunk/LayoutTests/imported/w3c/resources/resource-files.json (295637 => 295638) --- trunk/LayoutTests/imported/w3c/resources/resource-files.json 2022-06-17 16:23:05 UTC (rev 295637) +++ trunk/LayoutTests/imported/w3c/resources/resource-files.json 2022-06-17 17:23:42 UTC (rev 295638) @@ -233,6 +233,7 @@ "csswg-test/WOFF2-UserAgent/Tests/xhtml1/testcaseindex.xht", "html/rendering/the-details-element/empty-crash.html", "html/rendering/the-details-element/single-summary.html", +"intersection-observer/observer-in-iframe.html", "shadow-dom/declarative/support/declarative-child-frame.html", "shadow-dom/event-on-pseudo-element-crash.html", "shadow-dom/imperative-slot-api-crash.html", Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/display-none-expected.txt (295637 => 295638) --- trunk/LayoutTests/imported/w3c/web-platform-tests/intersection-observer/display-none-expected.txt 2022-06-17 16:23:05 UTC (rev 295637) +++
[webkit-changes] [295637] trunk/Tools/CISupport/ews-build
Title: [295637] trunk/Tools/CISupport/ews-build Revision 295637 Author jbed...@apple.com Date 2022-06-17 09:23:05 -0700 (Fri, 17 Jun 2022) Log Message [ews-build.webkit.org] Seperate authentication for EWS and Merge-Queue https://bugs.webkit.org/show_bug.cgi?id=241698 Reviewed by Aakash Jain. * Tools/CISupport/ews-build/events.py: (Events.sendDataToGitHub): Allow caller to pick a different set of GitHub credentials. (Events.buildFinishedGitHub): Pick GitHub credentials specific to builder. (Events.stepStartedGitHub): Ditto. * Tools/CISupport/ews-build/steps.py: (GitHub): (GitHub.user_for_queue): Map buildername to GitHub user. (GitHub.credentials): Allow caller to pick a different set of GitHub credentials. (GitHubMixin.fetch_data_from_url_with_authentication_github): Pick GitHub credentials specific to builder. (GitHubMixin.add_label): Ditto. (GitHubMixin.remove_labels): Ditto. (GitHubMixin.comment_on_pr): Ditto. (GitHubMixin.update_pr): Ditto. (GitHubMixin.close_pr): Ditto. (CheckOutPullRequest.run): Ditto. (PushPullRequestBranch.start): Ditto. * Tools/CISupport/ews-build/steps_unittest.py: Canonical link: https://commits.webkit.org/251642@main Modified Paths trunk/Tools/CISupport/ews-build/events.py trunk/Tools/CISupport/ews-build/steps.py trunk/Tools/CISupport/ews-build/steps_unittest.py Diff Modified: trunk/Tools/CISupport/ews-build/events.py (295636 => 295637) --- trunk/Tools/CISupport/ews-build/events.py 2022-06-17 15:45:24 UTC (rev 295636) +++ trunk/Tools/CISupport/ews-build/events.py 2022-06-17 16:23:05 UTC (rev 295637) @@ -116,8 +116,8 @@ agent.request(b'POST', self.EVENT_SERVER_ENDPOINT, Headers({'Content-Type': ['application/json']}), body) -def sendDataToGitHub(self, repository, sha, data): -username, access_token = GitHub.credentials() +def sendDataToGitHub(self, repository, sha, data, user=None): +username, access_token = GitHub.credentials(user=user) data['description'] = data.get('description', '') if len(data['description']) > self.MAX_GITHUB_DESCRIPTION: @@ -196,7 +196,7 @@ description=build.get('state_string'), context=build['description'] + custom_suffix, ) -self.sendDataToGitHub(repository, sha, data_to_send) +self.sendDataToGitHub(repository, sha, data_to_send, user=GitHub.user_for_queue(self.extractProperty(build, 'buildername'))) @defer.inlineCallbacks def buildFinished(self, key, build): @@ -259,7 +259,7 @@ description=state_string, context=builder.get('description', '?') + custom_suffix, ) -self.sendDataToGitHub(repository, sha, data_to_send) +self.sendDataToGitHub(repository, sha, data_to_send, user=GitHub.user_for_queue(self.extractProperty(build, 'buildername'))) @defer.inlineCallbacks def stepStarted(self, key, step): Modified: trunk/Tools/CISupport/ews-build/steps.py (295636 => 295637) --- trunk/Tools/CISupport/ews-build/steps.py 2022-06-17 15:45:24 UTC (rev 295636) +++ trunk/Tools/CISupport/ews-build/steps.py 2022-06-17 16:23:05 UTC (rev 295637) @@ -76,11 +76,19 @@ class GitHub(object): +_cache = {} + @classmethod def repository_urls(cls): return [GITHUB_URL + project for project in GITHUB_PROJECTS] @classmethod +def user_for_queue(cls, queue): +if queue.lower() in ['commit-queue', 'merge-queue', 'unsafe-merge-queue']: +return 'merge-queue' +return None + +@classmethod def pr_url(cls, pr_number, repository_url=None): if not repository_url: repository_url = '{}{}'.format(GITHUB_URL, GITHUB_PROJECTS[0]) @@ -120,14 +128,21 @@ return '{}/statuses/{}'.format(api_url, sha) @classmethod -def credentials(cls): +def credentials(cls, user=None): +prefix = f"GITHUB_COM_{user.upper().replace('-', '_')}_" if user else 'GITHUB_COM_' + +if prefix in cls._cache: +return cls._cache[prefix] + try: passwords = json.load(open('passwords.json')) -return passwords.get('GITHUB_COM_USERNAME', None), passwords.get('GITHUB_COM_ACCESS_TOKEN', None) +cls._cache[prefix] = passwords.get(f'{prefix}USERNAME', None), passwords.get(f'{prefix}ACCESS_TOKEN', None) except Exception as e: print('Error reading GitHub credentials') -return None, None +cls._cache[prefix] = None, None +return cls._cache[prefix] + @classmethod def email_for_owners(cls, owners): if not owners: @@ -147,7 +162,7 @@ def fetch_data_from_url_with_authentication_github(self, url): response = None try: -username, access_token = GitHub.credentials() +username, access_token = GitHub.credentials(user=GitHub.user_for_queue(self.getProperty('buildername', ''))) auth = HTTPBasicAuth(username, access_token) if
[webkit-changes] [295636] trunk
Title: [295636] trunk Revision 295636 Author andresg...@apple.com Date 2022-06-17 08:45:24 -0700 (Fri, 17 Jun 2022) Log Message AX ITM: Crash in com.apple.WebKit.WebContent at Recursion :: com.apple.WebCore: WebCore::AXIsolatedTree::collectNodeChangesForSubtree. https://bugs.webkit.org/show_bug.cgi?id=241571 Test: accessibility/deep-tree.html Reviewed by Chris Fleizach. Added a limit for recursive calls to AXIsolatedTree::collectNodeChangesForSubtree. The limit is obtained from the DOM maximum tree depth. In addition, added a sanity check during parent-child traversal, that none of the children can be equal to the parent. This will not cover all possible circular relations that can cause an infinite recursion, but may catch some pathological cases. * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::create): (WebCore::AXIsolatedTree::collectNodeChangesForSubtree): (WebCore::AXIsolatedTree::updateNode): * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: * LayoutTests/accessibility/deep-tree-expected.txt: Added. * LayoutTests/accessibility/deep-tree.html: Added. * LayoutTests/platform/glib/accessibility/deep-tree-expected.txt: Added. Canonical link: https://commits.webkit.org/251641@main Modified Paths trunk/LayoutTests/platform/mac-wk1/TestExpectations trunk/LayoutTests/platform/win/TestExpectations trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h Added Paths trunk/LayoutTests/accessibility/deep-tree-expected.txt trunk/LayoutTests/accessibility/deep-tree.html trunk/LayoutTests/platform/glib/accessibility/deep-tree-expected.txt Diff Added: trunk/LayoutTests/accessibility/deep-tree-expected.txt (0 => 295636) --- trunk/LayoutTests/accessibility/deep-tree-expected.txt (rev 0) +++ trunk/LayoutTests/accessibility/deep-tree-expected.txt 2022-06-17 15:45:24 UTC (rev 295636) @@ -0,0 +1,11 @@ +This tests that trying to retrieve AX objects deeper than the 512 level allowed in the DOM tree fails gracefully. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS axChild.childAtIndex(0).stringValue is 'AXValue: deepest child' +PASS axChild is null +PASS successfullyParsed is true + +TEST COMPLETE +deepest child Added: trunk/LayoutTests/accessibility/deep-tree.html (0 => 295636) --- trunk/LayoutTests/accessibility/deep-tree.html (rev 0) +++ trunk/LayoutTests/accessibility/deep-tree.html 2022-06-17 15:45:24 UTC (rev 295636) @@ -0,0 +1,45 @@ + + + + + + + + +