RESOLVED FIXED Bug 238187
Add a debug overlay for interaction regions
https://bugs.webkit.org/show_bug.cgi?id=238187
Summary Add a debug overlay for interaction regions
Tim Horton
Reported 2022-03-21 22:41:10 PDT
Add a debug overlay for interaction regions
Attachments
Patch (62.24 KB, patch)
2022-03-21 22:42 PDT, Tim Horton
no flags
Patch (61.27 KB, patch)
2022-03-22 01:06 PDT, Tim Horton
no flags
Patch (62.82 KB, patch)
2022-03-31 14:45 PDT, Tim Horton
no flags
Patch (62.71 KB, patch)
2022-03-31 19:43 PDT, Tim Horton
no flags
Patch (62.83 KB, patch)
2022-03-31 22:45 PDT, Tim Horton
no flags
Tim Horton
Comment 1 2022-03-21 22:42:20 PDT
Tim Horton
Comment 2 2022-03-22 01:06:20 PDT
Radar WebKit Bug Importer
Comment 3 2022-03-28 22:42:15 PDT
Wenson Hsieh
Comment 4 2022-03-30 17:03:09 PDT
Comment on attachment 455345 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455345&action=review r=me (with a build fix for CMake) > Source/WebCore/dom/Node.cpp:2519 > + for (const auto& eventType : eventTypes()) { > + if (eventNames().isTouchRelatedEventType(eventType, *this)) > + return true; > + } > + return false; (Could consider using `containsIf` here — might be a tiny bit cleaner) > Source/WebCore/page/DebugPageOverlays.cpp:265 > + Vector<Setting> m_settings { FixedVector? > Source/WebCore/page/FrameSnapshotting.cpp:189 > + for (; !!renderer; renderer = renderer->parent()) { Could we use `ancestorsOfType<RenderElement>` here? > Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:40 > + _WKInteractionRegion = 1 << 4, Does this need availability information too?
Darin Adler
Comment 5 2022-03-30 20:50:22 PDT
Comment on attachment 455345 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455345&action=review >> Source/WebCore/page/DebugPageOverlays.cpp:265 >> + Vector<Setting> m_settings { > > FixedVector? std::array?
Tim Horton
Comment 6 2022-03-31 14:45:30 PDT
Tim Horton
Comment 7 2022-03-31 19:43:52 PDT
Tim Horton
Comment 8 2022-03-31 19:45:22 PDT
(In reply to Darin Adler from comment #5) > Comment on attachment 455345 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=455345&action=review > > >> Source/WebCore/page/DebugPageOverlays.cpp:265 > >> + Vector<Setting> m_settings { > > > > FixedVector? > > std::array? FixedVector seems like std::array with less steps? (unless we have another way to construct one from an initializer list without specifying the size?) (In reply to Wenson Hsieh from comment #4) > Comment on attachment 455345 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=455345&action=review > > r=me (with a build fix for CMake) > > > Source/WebCore/dom/Node.cpp:2519 > > + for (const auto& eventType : eventTypes()) { > > + if (eventNames().isTouchRelatedEventType(eventType, *this)) > > + return true; > > + } > > + return false; > > (Could consider using `containsIf` here — might be a tiny bit cleaner) Way cleaner! > > Source/WebCore/page/FrameSnapshotting.cpp:189 > > + for (; !!renderer; renderer = renderer->parent()) { > > Could we use `ancestorsOfType<RenderElement>` here? lineageOfType, apparently, so that we visit self. > > Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:40 > > + _WKInteractionRegion = 1 << 4, > > Does this need availability information too? Of course!
Darin Adler
Comment 9 2022-03-31 21:31:24 PDT
Comment on attachment 456310 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456310&action=review > Source/WebCore/page/DebugPageOverlays.cpp:266 > + { "constrain", "Constrain to Regions", true }, Need a bunch of _s here if you don’t want to mess things up for Chris.
Tim Horton
Comment 10 2022-03-31 21:42:58 PDT
(In reply to Darin Adler from comment #9) > Comment on attachment 456310 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=456310&action=review > > > Source/WebCore/page/DebugPageOverlays.cpp:266 > > + { "constrain", "Constrain to Regions", true }, > > Need a bunch of _s here if you don’t want to mess things up for Chris. I don't want to mess things up for Chris! I think I see what you're referring to.
Tim Horton
Comment 11 2022-03-31 22:45:24 PDT
EWS
Comment 12 2022-04-01 01:18:48 PDT
Committed r292208 (249111@main): <https://commits.webkit.org/249111@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456322 [details].
Note You need to log in before you can comment on or make changes to this bug.