browsing_context.go RawHistoryFolder

1package dto
2
3// SourceHostKind identifies the product host that originated a browsing-context request.
4type SourceHostKind string
5
6const (
7	// SourceHostWorkspace is the default persisted workspace pane host.
8	SourceHostWorkspace SourceHostKind = "workspace"
9	// SourceHostFloating is a transient floating pane outside the workspace tree.
10	SourceHostFloating SourceHostKind = "floating"
11)
12
13// BrowserEngineKind identifies the browser engine that produced a normalized request.
14type BrowserEngineKind string
15
16const (
17	BrowserEngineUnknown BrowserEngineKind = "unknown"
18	BrowserEngineCEF     BrowserEngineKind = "cef"
19	BrowserEngineWebKit  BrowserEngineKind = "webkit"
20)
21
22// PopupFeatureState describes whether popup metadata is available and explicit.
23// Host policy treats its zero value as featureless, not PopupFeaturesUnknown;
24// popup producers must set State explicitly when resolution must be deferred.
25type PopupFeatureState string
26
27const (
28	PopupFeaturesUnknown   PopupFeatureState = "unknown"
29	PopupFeaturesNone      PopupFeatureState = "none"
30	PopupFeaturesSpecified PopupFeatureState = "specified"
31)
32
33// PopupFeatures is the engine-independent subset of window.open features used by host policy.
34type PopupFeatures struct {
35	State PopupFeatureState
36
37	X, Y, Width, Height                int
38	XSet, YSet, WidthSet, HeightSet    bool
39	ToolbarVisible, LocationbarVisible bool
40	ToolbarVisibilitySet               bool
41	LocationbarVisibilitySet           bool
42	Resizable, ResizableSet            bool
43	IsPopup, IsPopupSet                bool
44}
45
46// WindowDisposition describes how the browsing context should be presented.
47type WindowDisposition string
48
49const (
50	WindowDispositionCurrentTab WindowDisposition = "current-tab"
51	WindowDispositionNewTab     WindowDisposition = "new-tab"
52	WindowDispositionNewPopup   WindowDisposition = "new-popup"
53	WindowDispositionNewWindow  WindowDisposition = "new-window"
54)
55
56// TriggerKind categorizes what triggered a browsing-context request.
57type TriggerKind string
58
59const (
60	TriggerUnknown               TriggerKind = "unknown"
61	TriggerLinkNewPage           TriggerKind = "link-new-page"
62	TriggerScriptWindowOpen      TriggerKind = "script-window-open"
63	TriggerNamedTargetNavigation TriggerKind = "named-target-navigation"
64	TriggerAuthPopupRequest      TriggerKind = "auth-popup-request"
65)
66
67// RequestContextDisposition makes request-context inheritance explicit at the policy seam.
68type RequestContextDisposition string
69
70const (
71	RequestContextInheritParent RequestContextDisposition = "inherit-parent"
72	RequestContextIsolate       RequestContextDisposition = "isolate"
73)
74
75// NewBrowsingContextRequest is the normalized request captured before host policy runs.
76type NewBrowsingContextRequest struct {
77	ParentWebViewID uint64
78
79	Engine     BrowserEngineKind
80	SourceHost SourceHostKind
81
82	SourceBrowserID int32
83	SourceFrameID   string
84	SourceFrameURL  string
85
86	TargetURI         string
87	TargetFrameName   string
88	TargetDisposition WindowDisposition
89
90	IsUserGesture      bool
91	NoJavaScriptAccess bool
92	PopupFeatures      PopupFeatures
93
94	TriggerKind               TriggerKind
95	AuthIntent                bool
96	RequiresNativeOpener      bool
97	RequestContextDisposition RequestContextDisposition
98}
99
100// HostDecisionKind categorizes approved hosts for a new browsing context.
101type HostDecisionKind string
102
103const (
104	HostDecisionReuseNamedPane      HostDecisionKind = "reuse-named-pane"
105	HostDecisionNavigateSource      HostDecisionKind = "navigate-source"
106	HostDecisionCreatePane          HostDecisionKind = "create-pane"
107	HostDecisionCreateBrowserWindow HostDecisionKind = "create-browser-window"
108	HostDecisionCreateNativePopup   HostDecisionKind = "create-native-popup"
109	HostDecisionAwaitPopupFeatures  HostDecisionKind = "await-popup-features"
110	HostDecisionDeny                HostDecisionKind = "deny"
111)
112
113// HostDecisionReasonCode is a stable machine-readable policy explanation.
114type HostDecisionReasonCode string
115
116const (
117	HostDecisionReasonEmptyTarget              HostDecisionReasonCode = "empty-target"
118	HostDecisionReasonAuthNativePopup          HostDecisionReasonCode = "auth-native-popup"
119	HostDecisionReasonNativeOpenerRequired     HostDecisionReasonCode = "native-opener-required"
120	HostDecisionReasonAmbiguousOpenerNative    HostDecisionReasonCode = "ambiguous-opener-native"
121	HostDecisionReasonNamedContextReuse        HostDecisionReasonCode = "named-context-reuse"
122	HostDecisionReasonFloatingFeaturesPending  HostDecisionReasonCode = "floating-features-pending"
123	HostDecisionReasonFloatingPopupFeatures    HostDecisionReasonCode = "floating-popup-features"
124	HostDecisionReasonFloatingFeaturelessBlank HostDecisionReasonCode = "floating-featureless-blank"
125	HostDecisionReasonFloatingBrowserWindow    HostDecisionReasonCode = "floating-browser-window"
126	HostDecisionReasonWorkspacePane            HostDecisionReasonCode = "workspace-pane"
127)
128
129// BrowsingContextFailureCode is a stable machine-readable operational failure.
130type BrowsingContextFailureCode string
131
132const (
133	BrowsingContextFailureHostUnavailable   BrowsingContextFailureCode = "host-unavailable"
134	BrowsingContextFailureHostFailed        BrowsingContextFailureCode = "host-failed"
135	BrowsingContextFailureFeatureResolution BrowsingContextFailureCode = "feature-resolution-failed"
136	BrowsingContextFailureStagingDetach     BrowsingContextFailureCode = "staging-detach-failed"
137	BrowsingContextFailureNativeArm         BrowsingContextFailureCode = "native-arm-failed"
138	BrowsingContextFailureFallback          BrowsingContextFailureCode = "fallback-failed"
139)
140
141// HostDecision represents the output of browsing-context policy.
142type HostDecision struct {
143	Kind       HostDecisionKind
144	SourceHost SourceHostKind
145
146	ReuseContextName    string
147	BrowsingContextName string
148
149	RequestContextDisposition RequestContextDisposition
150	RequiresNativeOpener      bool
151	ReasonCode                HostDecisionReasonCode
152	Reason                    string
153}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close