Skip to content

[reporelaypy] Forward branches to alternate remote - #56

Merged
JonWBedard merged 0 commit into
WebKit:mainfrom
JonWBedard:eng/forward-branches-to-remote
Dec 16, 2021
Merged

JonWBedard merged 0 commit into
WebKit:mainfrom
JonWBedard:eng/forward-branches-to-remote

Conversation

@JonWBedard

@JonWBedard JonWBedard commented Dec 15, 2021 •

Copy link
Copy Markdown
Member

a842447

[reporelaypy] Forward branches to alternate remote
https://bugs.webkit.org/show_bug.cgi?id=234347
<rdar://problem/86526293 >

Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py:
(Checkout.Encoder.default): Add remotes.
(Checkout.clone): After cloning a repository, add required remotes.
(Checkout.add_remotes): Track remotes in repository.
(Checkout.__init__): Allow caller to specify set of remotes to be tracked.
(Checkout.push_update): Push update for specified remote.
(Checkout.update_for): Return 'True' and 'False.'
(Checkout.update_all): If a branch is being updated, we should forward that
update to any tracked remotes.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/hooks.py:
(HookProcessor.process_worker_hook): After updating a branch, forward that
update to any tracked remotes.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py:
(CheckoutUnittest.test_constructor_no_sentinal): Capture debug logging.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py:
(CheckoutRouteUnittest.test_landing): Capture debug logging.
(CheckoutRouteUnittest.test_invoked_redirect): Ditto.
(CheckoutRouteUnittest.test_trac): Ditto.
* Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py:
(HooksUnittest.test_process): Test for any error logging.
(HooksUnittest.test_process_branch): Ditto.
* Tools/Scripts/libraries/reporelaypy/run: Allow caller to specify remote to be tracked.
* Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.


Canonical link: https://commits.webkit.org/245300@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287115 268f45cc-cd09-0410-ab3c-d52691b4dbfc

@JonWBedard JonWBedard self-assigned this Dec 15, 2021
@JonWBedard
JonWBedard requested a review from dewei-zhu December 15, 2021 17:03
@JonWBedard
JonWBedard force-pushed the eng/forward-branches-to-remote branch from 7fb4a5a to 3c47521 Compare December 15, 2021 17:03

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean self.remotes = remotes or dict()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is a pretty silly bug, will fix.

@JonWBedard
JonWBedard force-pushed the eng/forward-branches-to-remote branch 4 times, most recently from 70f548c to 1c095d6 Compare December 16, 2021 00:39

@dewei-zhu dewei-zhu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@JonWBedard
JonWBedard force-pushed the eng/forward-branches-to-remote branch from 1c095d6 to 6cb3533 Compare December 16, 2021 00:49
@JonWBedard
JonWBedard merged commit a842447 into WebKit:main Dec 16, 2021
@JonWBedard

Copy link
Copy Markdown
Member Author

@JonWBedard
JonWBedard force-pushed the eng/forward-branches-to-remote branch from 6cb3533 to a842447 Compare December 16, 2021 00:52
@JonWBedard
JonWBedard deleted the eng/forward-branches-to-remote branch December 16, 2021 00:53
webkit-early-warning-system pushed a commit to MenloDorian/Webkit that referenced this pull request Jun 23, 2022
https://bugs.webkit.org/show_bug.cgi?id=241905

Reviewed by Yusuke Suzuki.

offlineasm used to emit this LLInt code:
    ".loc 1 996\n"        "ldr x19, [x0] \n"                   // LowLevelInterpreter.asm:996
    ".loc 1 997\n"        "ldr x20, [x0, WebKit#8] \n"               // LowLevelInterpreter.asm:997
    ".loc 1 998\n"        "ldr x21, [x0, WebKit#16] \n"              // LowLevelInterpreter.asm:998
    ".loc 1 999\n"        "ldr x22, [x0, WebKit#24] \n"              // LowLevelInterpreter.asm:999
    ...
    ".loc 1 1006\n"       "ldr d8, [x0, WebKit#80] \n"               // LowLevelInterpreter.asm:1006
    ".loc 1 1007\n"       "ldr d9, [x0, WebKit#88] \n"               // LowLevelInterpreter.asm:1007
    ".loc 1 1008\n"       "ldr d10, [x0, WebKit#96] \n"              // LowLevelInterpreter.asm:1008
    ".loc 1 1009\n"       "ldr d11, [x0, WebKit#104] \n"             // LowLevelInterpreter.asm:1009
    ...

Now, it can emit this instead:
    ".loc 1 996\n"        "ldp x19, x20, [x0, #0] \n"          // LowLevelInterpreter.asm:996
    ".loc 1 997\n"        "ldp x21, x22, [x0, WebKit#16] \n"         // LowLevelInterpreter.asm:997
    ...
    ".loc 1 1001\n"       "ldp d8, d9, [x0, WebKit#80] \n"           // LowLevelInterpreter.asm:1001
    ".loc 1 1002\n"       "ldp d10, d11, [x0, WebKit#96] \n"         // LowLevelInterpreter.asm:1002
    ...

Also, there was some code that kept recomputing the base address of a sequence of load/store
instructions.  For example,
    ".loc 6 902\n"        "add x13, sp, x10, lsl WebKit#3 \n"        // WebAssembly.asm:902
                          "ldr x0, [x13, WebKit#48] \n"
                          "add x13, sp, x10, lsl WebKit#3 \n"
                          "ldr x1, [x13, WebKit#56] \n"
                          "add x13, sp, x10, lsl WebKit#3 \n"
                          "ldr x2, [x13, WebKit#64] \n"
                          "add x13, sp, x10, lsl WebKit#3 \n"
                          "ldr x3, [x13, WebKit#72] \n"
    ...

For such places, we observe that the base address is the same for every load/store instruction
in the sequence, and precompute it in the LLInt asm code to help out the offline asm.  This
allows the offlineasm to now emit this more efficient code instead:
    ".loc 6 896\n"        "add x10, sp, x10, lsl WebKit#3 \n"        // WebAssembly.asm:896
    ".loc 6 898\n"        "ldp x0, x1, [x10, WebKit#48] \n"          // WebAssembly.asm:898
                          "ldp x2, x3, [x10, WebKit#64] \n"
    ...

* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/llint/WebAssembly.asm:
* Source/JavaScriptCore/offlineasm/arm64.rb:
* Source/JavaScriptCore/offlineasm/instructions.rb:

Canonical link: https://commits.webkit.org/251799@main
Wowfunhappy referenced this pull request in Wowfunhappy/WebKit Jun 15, 2026
…f transparent-clear (#56)

Opaque layers use a no-alpha BGRX8 backing, so clearing the dirty region to transparent
left RGB 0 = black where content didn't cover. White-fill opaque backings; keep
transparent-clear for non-opaque.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Wowfunhappy referenced this pull request in Wowfunhappy/WebKit Jun 16, 2026
…ilently dropping (#47)

The default mach_msg send-error case dropped the message and continued with its logging
hard-disabled (FILE* _d = NULL), hiding any occurrence. Instrumented + exercised heavily
(8+ sites, video, scroll): ZERO occurrences, so the historical IOSurface INVALID_RIGHT
errors (compositing #56) no longer happen in normal use. Replace the dead debug block
with a single WTFLogAlways so the case is no longer silent/hidden, keeping the graceful
per-send failure (vs aborting the whole process). Removes dead scaffolding.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Wowfunhappy referenced this pull request in Wowfunhappy/WebKit Jun 18, 2026
Two root causes. (1) MinimalPageClient::executeSavedCommandBySelector was a stub returning {}. The Mac key path forwards unhandled scroll commands via an ExecuteSavedCommandBySelector IPC to the UIProcess page client; upstream WKWebView implements scrollPageDown:/etc. as NSResponder action methods routing through WebViewImpl, but Safari's WKView has none and this page client stubbed the hop, so PageDown/PageUp/Home/End did nothing. Implemented it to map the scroll selectors to their WebCore Editor commands (scrollPageDown:->ScrollPageForward, etc.) and run executeEditCommand as the upstream action methods do; unknown selectors return false to bubble to Safari.

(2) Arrow keys routed through EventHandlerDrivenSmoothKeyboardScrolling -> AsyncScrollingCoordinator's scrolling-thread keyboard gesture, which is never serviced in this backport (#56/#57). Default that preference off for PLATFORM(MAC) so arrows take the synchronous EventHandler::logicalScrollRecursively path (the same instant path PageDown/Space already use). Selects an existing upstream path; adds no mechanism.

Verified live: down-arrow 0->480, PageDown x3 ->1683, Space x2 ->1122 on a long article; wheel (#39) unregressed (->1800 with cursor over content); cnn renders.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Wowfunhappy referenced this pull request in Wowfunhappy/WebKit Jun 18, 2026
The backport installed a global NSEvent monitor (+[WKView installEventMonitorOnce]) that intercepted mouse/scroll/key events and dispatched them to WKView, on the belief that layer-tree mirror subviews intercepted hit-testing. That was a MISDIAGNOSIS: WKView hosts the WebContent layer tree as a plain CALayer sublayer of its backing layer (MinimalPageClient enterAcceleratedCompositingMode/setRemoteLayerTreeRootNode, [[m_view layer] addSublayer:]) with ZERO NSView subviews. CALayers don't participate in NSView -hitTest:, so nothing ever intercepted events. Worse, the monitor consumed events before -[NSWindow sendEvent:] (where AppKit activates the window on click), creating the very click-to-activate problem it then re-patched.

Remove the monitor and rely on AppKit's natural responder chain; WKView's own scrollWheel:/keyDown:/mouseDown:/mouseMoved: handlers receive events directly. Keep the -hitTest: override as upstream-equivalent insurance (upstream WebViewImpl::hitTest does the same redirect).

Verified live: main-view links/scroll/typing/right-click; hover (#17) fires :hover on a fresh page AND with the address bar focused; Reader scroll (#39) works via natural routing to the topmost ReaderWKView; and every secondary WKView that relied on the monitor -- uBlock popover (#14/#23), Web Inspector (#16), App Store (#72), Top Sites (#13), Preferences>Extensions (#24) -- stays interactive. No crashes. Retires the #62 event-monitor keystone and supersedes #39's monitor routing. (The DDG-logo black box, a separate #56 IOSurface-backing symptom, is root-caused but not fixed here.)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants