diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /xpcom/ds | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xpcom/ds')
-rw-r--r-- | xpcom/ds/HTMLAtoms.py | 2 | ||||
-rw-r--r-- | xpcom/ds/StaticAtoms.py | 14 | ||||
-rw-r--r-- | xpcom/ds/nsObserverService.cpp | 9 | ||||
-rw-r--r-- | xpcom/ds/tools/perfecthash.py | 31 |
4 files changed, 25 insertions, 31 deletions
diff --git a/xpcom/ds/HTMLAtoms.py b/xpcom/ds/HTMLAtoms.py index ddaf52ae9f..927be525e3 100644 --- a/xpcom/ds/HTMLAtoms.py +++ b/xpcom/ds/HTMLAtoms.py @@ -41,6 +41,8 @@ HTML_PARSER_ATOMS = [ # ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN): Atom("shadowrootmode", "shadowrootmode"), # ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN): + Atom("shadowrootclonable", "shadowrootclonable"), + # ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN): Atom("stddeviation", "stddeviation"), # ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN): Atom("shadowrootdelegatesfocus", "shadowrootdelegatesfocus"), diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py index ca4ac97813..2a0a25431e 100644 --- a/xpcom/ds/StaticAtoms.py +++ b/xpcom/ds/StaticAtoms.py @@ -121,6 +121,8 @@ STATIC_ATOMS = [ Atom("aria_activedescendant", "aria-activedescendant"), Atom("aria_atomic", "aria-atomic"), Atom("aria_autocomplete", "aria-autocomplete"), + Atom("aria_braillelabel", "aria-braillelabel"), + Atom("aria_brailleroledescription", "aria-brailleroledescription"), Atom("aria_busy", "aria-busy"), Atom("aria_checked", "aria-checked"), Atom("aria_controls", "aria-controls"), @@ -206,7 +208,6 @@ STATIC_ATOMS = [ Atom("box", "box"), Atom("br", "br"), Atom("browser", "browser"), - Atom("mozbrowser", "mozbrowser"), Atom("button", "button"), Atom("callTemplate", "call-template"), Atom("canvas", "canvas"), @@ -340,7 +341,6 @@ STATIC_ATOMS = [ Atom("difference", "difference"), Atom("digit", "digit"), Atom("dir", "dir"), - Atom("dirAutoSetBy", "dirAutoSetBy"), Atom("directory", "directory"), Atom("dirname", "dirname"), Atom("disableOutputEscaping", "disable-output-escaping"), @@ -453,7 +453,6 @@ STATIC_ATOMS = [ Atom("flags", "flags"), Atom("flex", "flex"), Atom("flip", "flip"), - Atom("floating", "floating"), Atom("floor", "floor"), Atom("flowlength", "flowlength"), Atom("focus", "focus"), @@ -731,6 +730,7 @@ STATIC_ATOMS = [ Atom("noembed", "noembed"), Atom("noframes", "noframes"), Atom("nohref", "nohref"), + Atom("noinitialselection", "noinitialselection"), Atom("nomodule", "nomodule"), Atom("nonce", "nonce"), Atom("none", "none"), @@ -832,6 +832,7 @@ STATIC_ATOMS = [ Atom("onfocusout", "onfocusout"), Atom("onfullscreenchange", "onfullscreenchange"), Atom("onfullscreenerror", "onfullscreenerror"), + Atom("ongatheringstatechange", "ongatheringstatechange"), Atom("onget", "onget"), Atom("onhashchange", "onhashchange"), Atom("oninput", "oninput"), @@ -1062,6 +1063,7 @@ STATIC_ATOMS = [ Atom("rem", "rem"), Atom("remote", "remote"), Atom("removeelement", "removeelement"), + Atom("render", "render"), Atom("renderingobserverset", "renderingobserverset"), Atom("repeat", "repeat"), Atom("replace", "replace"), @@ -1234,7 +1236,6 @@ STATIC_ATOMS = [ Atom("textarea", "textarea"), Atom("textbox", "textbox"), Atom("textLink", "text-link"), - Atom("textNodeDirectionalityMap", "textNodeDirectionalityMap"), Atom("textOverlay", "text-overlay"), Atom("tfoot", "tfoot"), Atom("th", "th"), @@ -1242,7 +1243,6 @@ STATIC_ATOMS = [ Atom("thumb", "thumb"), Atom("time", "time"), Atom("title", "title"), - Atom("titlebar", "titlebar"), Atom("titletip", "titletip"), Atom("toggle", "toggle"), Atom("token", "token"), @@ -2262,6 +2262,7 @@ STATIC_ATOMS = [ Atom("_moz_swipe_animation_enabled", "-moz-swipe-animation-enabled"), Atom("_moz_gtk_csd_available", "-moz-gtk-csd-available"), Atom("_moz_gtk_csd_titlebar_radius", "-moz-gtk-csd-titlebar-radius"), + Atom("_moz_gtk_csd_titlebar_button_spacing", "-moz-gtk-csd-titlebar-button-spacing"), Atom("_moz_gtk_csd_minimize_button", "-moz-gtk-csd-minimize-button"), Atom("_moz_gtk_csd_minimize_button_position", "-moz-gtk-csd-minimize-button-position"), Atom("_moz_gtk_csd_maximize_button", "-moz-gtk-csd-maximize-button"), @@ -2409,6 +2410,8 @@ STATIC_ATOMS = [ Atom("mathml_legacy_mathvariant_attribute_disabled", "mathml.legacy_mathvariant_attribute.disabled"), Atom("layout_css_always_underline_links", "layout.css.always_underline_links"), Atom("layout_css_cached_scrollbar_styles_enabled", "layout.css.cached-scrollbar-styles.enabled"), + Atom("layout_css_h1_in_section_ua_styles_enabled", "layout.css.h1-in-section-ua-styles.enabled"), + Atom("dom_forms_number_hide_spin_buttons_when_no_hover_or_focus", "dom.forms.number.hide_spin_buttons_when_no_hover_or_focus"), # Contextual Identity / Containers Atom("usercontextid", "usercontextid"), Atom("geckoViewSessionContextId", "geckoViewSessionContextId"), @@ -2525,7 +2528,6 @@ STATIC_ATOMS = [ InheritingAnonBoxAtom("AnonBox_cellContent", ":-moz-cell-content"), InheritingAnonBoxAtom("AnonBox_dropDownList", ":-moz-dropdown-list"), InheritingAnonBoxAtom("AnonBox_fieldsetContent", ":-moz-fieldset-content"), - InheritingAnonBoxAtom("AnonBox_mozDisplayComboboxControlFrame", ":-moz-display-comboboxcontrol-frame"), InheritingAnonBoxAtom("AnonBox_htmlCanvasContent", ":-moz-html-canvas-content"), InheritingAnonBoxAtom("AnonBox_inlineTable", ":-moz-inline-table"), InheritingAnonBoxAtom("AnonBox_table", ":-moz-table"), diff --git a/xpcom/ds/nsObserverService.cpp b/xpcom/ds/nsObserverService.cpp index e0fd430cd4..882d867474 100644 --- a/xpcom/ds/nsObserverService.cpp +++ b/xpcom/ds/nsObserverService.cpp @@ -180,13 +180,14 @@ nsresult nsObserverService::EnsureValidCall() const { } nsresult nsObserverService::FilterHttpOnTopics(const char* aTopic) { - // Specifically allow http-on-opening-request and http-on-stop-request in the - // child process; see bug 1269765. + // Specifically allow some http-on-* observer notifications in the child + // process. if (mozilla::net::IsNeckoChild() && !strncmp(aTopic, "http-on-", 8) && + strcmp(aTopic, "http-on-before-stop-request") && strcmp(aTopic, "http-on-failed-opening-request") && + strcmp(aTopic, "http-on-image-cache-response") && strcmp(aTopic, "http-on-opening-request") && - strcmp(aTopic, "http-on-stop-request") && - strcmp(aTopic, "http-on-image-cache-response")) { + strcmp(aTopic, "http-on-stop-request")) { nsCOMPtr<nsIConsoleService> console( do_GetService(NS_CONSOLESERVICE_CONTRACTID)); nsCOMPtr<nsIScriptError> error( diff --git a/xpcom/ds/tools/perfecthash.py b/xpcom/ds/tools/perfecthash.py index 929b643a30..2a5778e86d 100644 --- a/xpcom/ds/tools/perfecthash.py +++ b/xpcom/ds/tools/perfecthash.py @@ -24,18 +24,6 @@ small dataset it was designed for. In the future we may want to optimize further import textwrap from collections import namedtuple -import six -from mozbuild.util import ensure_bytes - - -# Iteration over bytestrings works differently in Python 2 and 3; this function -# captures the two possibilities. Returns an 'int' given the output of iterating -# through a bytestring regardless of the input. -def _ord(c): - if six.PY3: - return c - return ord(c) - class PerfectHash(object): """PerfectHash objects represent a computed perfect hash function, which @@ -88,7 +76,7 @@ class PerfectHash(object): for bucket in buckets: # Once we've reached an empty bucket, we're done. - if len(bucket.entries) == 0: + if not bucket.entries: break # Try values for the basis until we find one with no conflicts. @@ -103,7 +91,7 @@ class PerfectHash(object): # There was a conflict, try the next basis. basis += 1 idx = 0 - del slots[:] + slots.clear() assert basis < self.U32_MAX, "table too small" else: slots.append(slot) @@ -127,15 +115,16 @@ class PerfectHash(object): 32-bit FNV is used for indexing into the first table, and the value stored in that table is used as the offset basis for indexing into the values table.""" - for byte in memoryview(ensure_bytes(key)): - obyte = _ord(byte) + FNV_PRIME = cls.FNV_PRIME + U32_MAX = cls.U32_MAX + for obyte in memoryview(key): basis ^= obyte # xor-in the byte - basis *= cls.FNV_PRIME # Multiply by the FNV prime - basis &= cls.U32_MAX # clamp to 32-bits + basis *= FNV_PRIME # Multiply by the FNV prime + basis &= U32_MAX # clamp to 32-bits return basis def key(self, entry): - return memoryview(ensure_bytes(self._key(entry))) + return memoryview(self._key(entry)) def get_raw_index(self, key): """Determine the index in self.entries without validating""" @@ -145,7 +134,7 @@ class PerfectHash(object): def get_index(self, key): """Given a key, determine the index in self.entries""" idx = self.get_raw_index(key) - if memoryview(ensure_bytes(key)) != self.key(self.entries[idx]): + if memoryview(key) != self.key(self.entries[idx]): return None return idx @@ -334,7 +323,7 @@ class CGHelper(object): not in the table.""" assert all( - _ord(b) <= 0x7F for e in self.phf.entries for b in self.phf.key(e) + b <= 0x7F for e in self.phf.entries for b in self.phf.key(e) ), "non-ASCII key" if return_type is None: |