nyxt
nyxt copied to clipboard
Hints do not appear for elements within a Shadow DOM
Describe the bug Hints will never be created for page elements which exist inside of a Shadow DOM, even if a hint would normally apply to that particular element otherwise.
Precise recipe to reproduce the issue
- Visit a web page that heavily utilizes Shadow DOM (example)
- Activate hints mode
- Observe missing hints (e.g.: No hint on the "Sign In" link for the previously linked example)
Information
- OS name+version: Linux 5.10.68-1-MANJARO
- Graphics card and driver: Radeon RX 570 Series / amdgpu 21.0.0-1
- Desktop environment / Window manager name+version: Xorg 1.20.13-3 / Xmonad 0.15
- How you installed Nyxt (Guix pack, package manager, build from source): Via AUR using yay package manager
- Information from
show-system-information:
Nyxt version: 2.2.1
Renderer version: GI-GTK
Operating system kernel: Linux 5.10.68-1-MANJARO
Lisp implementation: SBCL 2.1.7 (Dynamic space size: 1073741824)
Features: (:WEBKIT2 :WEBKIT2-2.32 :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING
:WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22
:GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6
:GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12
:GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF
:GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42
:GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56
:GLIB-2-58 :GLIB :NYXT-2 :FSET-EXT-STRINGS :CUSTOM-HASH-TABLE-NATIVE :SWANK
:PLUMP-UTF-32 :GLOBAL-VARS :DECLARE-TYPES :PARENSCRIPT
:SBCL+SAFE-STANDARD-READTABLE :NAMED-READTABLES :LPARALLEL :21BIT-CHARS
:CHUNGA :CLOSER-MOP :CL-PPCRE-UNICODE :FLEXI-STREAMS :CL-UNICODE :CL-PPCRE
:CL-JSON-DOUBLE-FLOAT-IS-SUBSUMED :CL-JSON-SINGLE-FLOAT-IS-SUBSUMED
:BORDEAUX-THREADS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS
:LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE CHIPZ-SYSTEM:GRAY-STREAMS
CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI
CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO
:SBCL-USES-SB-ROTATE-BYTE :CL-JSON-CLOS :CL-JSON :THREAD-SUPPORT :ASDF3.3
:ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P
:ASDF-UNICODE :X86-64 :GENCGC :64-BIT :ANSI-CL :COMMON-LISP :ELF
:IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN :PACKAGE-LOCAL-NICKNAMES
:SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL
:UNIX)
ASDF version: 3.3.1
Critical dependencies: (/home/chao/.cache/yay/nyxt/src/nyxt/_build/cl-cffi-gtk/gtk/cl-cffi-gtk.asd
/home/chao/.cache/yay/nyxt/src/nyxt/_build/cl-gobject-introspection/cl-gobject-introspection.asd
/home/chao/.cache/yay/nyxt/src/nyxt/_build/cl-webkit/webkit2/cl-webkit2.asd)
@aartaka Any idea how to fix this?
@aartaka Any idea how to fix this?
Yes. Taking shadowRoot of any DOM element allows us to get access to Shadow DOM (as described here). It will only work if page creator have allowed the Shadow DOM access, though.
Beyond the scope for 3.0 in my opinion. I can't commit to this.
@aartaka maybe post 3.0 work?
Yes, that's an improvement over existent behavior, so it can be added after 3.0. #2821 too (let me actually revert the initial iframe work so that it doesn't produce errors irritating everyone).
iframe support prototypes dropped in b436fcd103068e9918bcc84dbcf2eb03bd3a92b4, we can leave it (and Shadow DOM support) for 3.0+.
Thanks @aartaka.
Closed by #3001.