Rewild Your Web

chore: browserhtml -> beaver

+114 -115
+34 -34
Cargo.lock
··· 652 652 checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" 653 653 654 654 [[package]] 655 + name = "beaver" 656 + version = "0.1.0" 657 + dependencies = [ 658 + "axum", 659 + "chrono", 660 + "dirs", 661 + "embedder_traits", 662 + "euclid", 663 + "global-hotkey", 664 + "gtk", 665 + "headers 0.4.1", 666 + "image", 667 + "keyboard-types 0.8.3", 668 + "libservo", 669 + "log", 670 + "mime_guess", 671 + "parking_lot", 672 + "rustls", 673 + "serde", 674 + "serde_json", 675 + "servo_config", 676 + "servo_config_macro", 677 + "tokio", 678 + "tower", 679 + "tower-http", 680 + "tracing", 681 + "tracing-perfetto", 682 + "tracing-subscriber", 683 + "tray-icon", 684 + "url", 685 + "winit", 686 + ] 687 + 688 + [[package]] 655 689 name = "bincode" 656 690 version = "1.3.3" 657 691 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 854 888 dependencies = [ 855 889 "alloc-no-stdlib", 856 890 "alloc-stdlib", 857 - ] 858 - 859 - [[package]] 860 - name = "browserhtml" 861 - version = "0.1.0" 862 - dependencies = [ 863 - "axum", 864 - "chrono", 865 - "dirs", 866 - "embedder_traits", 867 - "euclid", 868 - "global-hotkey", 869 - "gtk", 870 - "headers 0.4.1", 871 - "image", 872 - "keyboard-types 0.8.3", 873 - "libservo", 874 - "log", 875 - "mime_guess", 876 - "parking_lot", 877 - "rustls", 878 - "serde", 879 - "serde_json", 880 - "servo_config", 881 - "servo_config_macro", 882 - "tokio", 883 - "tower", 884 - "tower-http", 885 - "tracing", 886 - "tracing-perfetto", 887 - "tracing-subscriber", 888 - "tray-icon", 889 - "url", 890 - "winit", 891 891 ] 892 892 893 893 [[package]]
+1 -1
Cargo.toml
··· 1 1 [workspace] 2 2 resolver = "2" 3 - members = ["htmlshell"] 3 + members = ["beavershell"] 4 4 5 5 # Copied from the main Cargo.toml to allow 6 6 # workspace inheritance from component/ crates.
+7 -7
build-arm64.sh
··· 28 28 export LDFLAGS="-L${SYSROOT}/lib/aarch64-linux-gnu -fuse-ld=lld" 29 29 30 30 # Build without tray icon or global key support 31 - cargo build --target aarch64-unknown-linux-gnu --profile ${PROFILE} -p browserhtml \ 31 + cargo build --target aarch64-unknown-linux-gnu --profile ${PROFILE} -p beaver \ 32 32 --no-default-features \ 33 33 --features="libservo/clipboard,js_jit,max_log_level,webgpu" 34 34 35 - llvm-strip target/aarch64-unknown-linux-gnu/${PROFILE}/browserhtml 35 + llvm-strip target/aarch64-unknown-linux-gnu/${PROFILE}/beaver 36 36 37 - REMOTE_DIR=/home/mobian/browserhtml 37 + REMOTE_DIR=/home/mobian/beaver 38 38 39 39 echo "Pushing update..." 40 40 41 - # Create the browserhtml directory if needed. 42 - ssh mobian@mobian 'mkdir -p /home/mobian/browserhtml' 41 + # Create the beaver directory if needed. 42 + ssh mobian@mobian 'mkdir -p /home/mobian/beaver' 43 43 44 44 # rsync the binary 45 - rsync -vz --progress target/aarch64-unknown-linux-gnu/${PROFILE}/browserhtml \ 46 - mobian@mobian:${REMOTE_DIR}/browserhtml 45 + rsync -vz --progress target/aarch64-unknown-linux-gnu/${PROFILE}/beaver \ 46 + mobian@mobian:${REMOTE_DIR}/beaver 47 47 48 48 # rsync the resources 49 49 rsync -avz --progress resources mobian@mobian:${REMOTE_DIR}/
+1 -1
forkme.lock
··· 1 - 853fcf4fda0c31ab418c21eac4323d9e91d2b912 1 + c2333e1521bfc8a753dd2e9db2f8c484d30e6e77
+1 -1
htmlshell/Cargo.toml beavershell/Cargo.toml
··· 1 1 [package] 2 - name = "browserhtml" 2 + name = "beaver" 3 3 license = "AGPL-3.0-or-later" 4 4 version.workspace = true 5 5 rust-version.workspace = true
+5 -5
htmlshell/src/browser_window.rs beavershell/src/browser_window.rs
··· 109 109 webviews.values().next().cloned() 110 110 } 111 111 112 - /// Get the system webview (browserhtml shell UI). 112 + /// Get the system webview (beaverhtml shell UI). 113 113 pub(crate) fn system_webview(&self) -> Option<WebView> { 114 114 let system_id = self.system_webview_id.get()?; 115 115 self.webviews.borrow().get(&system_id).cloned() ··· 257 257 } 258 258 }, 259 259 WindowEvent::MouseInput { state, button, .. } => { 260 - // Send mouse events to the system webview (browserhtml shell) first. 260 + // Send mouse events to the system webview (beaverhtml shell) first. 261 261 // The shell's DOM hit testing will determine if events should be 262 262 // forwarded to embedded webviews. 263 263 if let Some(webview) = self.system_webview().or_else(|| self.first_webview()) { ··· 265 265 } 266 266 }, 267 267 WindowEvent::CursorMoved { position, .. } => { 268 - // Send mouse events to the system webview (browserhtml shell) first. 268 + // Send mouse events to the system webview (beaverhtml shell) first. 269 269 // The shell's DOM hit testing will determine if events should be 270 270 // forwarded to embedded webviews. 271 271 if let Some(webview) = self.system_webview().or_else(|| self.first_webview()) { ··· 283 283 } 284 284 }, 285 285 WindowEvent::MouseWheel { delta, .. } => { 286 - // Send wheel events to the system webview (browserhtml shell) first. 286 + // Send wheel events to the system webview (beaverhtml shell) first. 287 287 // The shell's DOM hit testing will determine if events should be 288 288 // forwarded to embedded webviews. 289 289 if let Some(webview) = self.system_webview().or_else(|| self.first_webview()) { ··· 311 311 } 312 312 }, 313 313 WindowEvent::Touch(touch) => { 314 - // Send touch events to the system webview (browserhtml shell) first. 314 + // Send touch events to the system webview (beaverhtml shell) first. 315 315 // The shell's DOM hit testing will determine if events should be 316 316 // forwarded to embedded webviews. 317 317 if let Some(webview) = self.system_webview().or_else(|| self.first_webview()) {
htmlshell/src/hotkeys.rs beavershell/src/hotkeys.rs
htmlshell/src/keyutils.rs beavershell/src/keyutils.rs
+12 -12
htmlshell/src/main.rs beavershell/src/main.rs
··· 53 53 std::env::var("BROWSERHTML_PROFILE").unwrap_or_else(|_| "default".into()) 54 54 } 55 55 56 - /// Get the configuration directory for browserhtml. 56 + /// Get the configuration directory for beaver. 57 57 /// Returns None if the directory cannot be determined. 58 58 fn config_dir() -> Option<PathBuf> { 59 59 #[cfg(target_os = "macos")] 60 60 { 61 - dirs::data_dir().map(|d| d.join("BrowserHTML").join(profile_name())) 61 + dirs::data_dir().map(|d| d.join("Beaver").join(profile_name())) 62 62 } 63 63 #[cfg(not(target_os = "macos"))] 64 64 { 65 - dirs::config_dir().map(|d| d.join("browserhtml").join(profile_name())) 65 + dirs::config_dir().map(|d| d.join("beaver").join(profile_name())) 66 66 } 67 67 } 68 68 ··· 72 72 .expect("Failed to install crypto provider"); 73 73 crate::resources::init(); 74 74 75 - // Load browserhtml preferences from config directory 75 + // Load beaver preferences from config directory 76 76 if let Some(prefs_path) = config_dir().map(|d| d.join("prefs.json")) { 77 77 if let Err(e) = prefs::load(&prefs_path) { 78 - log::warn!("Failed to load browserhtml preferences: {}", e); 78 + log::warn!("Failed to load beaver preferences: {}", e); 79 79 } 80 80 } 81 81 ··· 183 183 184 184 // In Mobile simulation mode, start with a smaller window size 185 185 let simulate_touch = matches!( 186 - get_embedder_pref("browserhtml.mobile_simulation"), 186 + get_embedder_pref("beaver.mobile_simulation"), 187 187 Some(PrefValue::Bool(true)) 188 188 ); 189 189 ··· 208 208 209 209 // Check if mobile simulation is enabled 210 210 let simulate_touch = matches!( 211 - get_embedder_pref("browserhtml.mobile_simulation"), 211 + get_embedder_pref("beaver.mobile_simulation"), 212 212 Some(PrefValue::Bool(true)) 213 213 ); 214 214 ··· 234 234 .borrow_mut() 235 235 .insert(webview_id, webview); 236 236 237 - // Set this as the system webview (the browserhtml shell UI) 237 + // Set this as the system webview (the beaver shell UI) 238 238 browser_window.system_webview_id.set(Some(webview_id)); 239 239 240 240 browser_window ··· 471 471 new_pipeline_id: PipelineId, 472 472 url: Url, 473 473 ) { 474 - // Call JavaScript API on the parent (browserhtml shell) to create a new tab 474 + // Call JavaScript API on the parent (beaver shell) to create a new tab 475 475 // that adopts the pre-created webview using the provided IDs. 476 476 // The IDs are serialized as strings since their internal structure is opaque. 477 477 let script = format!( ··· 521 521 } 522 522 523 523 fn show_notification(&self, webview: WebView, notification: Notification) { 524 - // For browserhtml, notifications from embedded webviews are routed through 524 + // For beaver, notifications from embedded webviews are routed through 525 525 // the constellation and arrive as iframe events (embednotificationshow). 526 526 // This delegate method is only called for non-embedded webviews, which 527 - // don't exist in browserhtml's architecture. 527 + // don't exist in beaver's architecture. 528 528 log::debug!( 529 529 "Notification from non-embedded webview {:?}: {:?}", 530 530 webview.id(), ··· 647 647 648 648 // Computes the index url depending on preferences and screen size. 649 649 fn index_url(event_loop: &ActiveEventLoop) -> String { 650 - let pref_override = match get_embedder_pref("browserhtml.mobile_simulation") { 650 + let pref_override = match get_embedder_pref("beaver.mobile_simulation") { 651 651 Some(PrefValue::Bool(value)) => value, 652 652 _ => false, 653 653 };
+6 -6
htmlshell/src/prefs.rs beavershell/src/prefs.rs
··· 6 6 7 7 /// BrowserHTML-specific preferences. 8 8 #[derive(Clone, Debug, PartialEq, Deserialize, Serialize, EmbedderPreferences)] 9 - #[namespace = "browserhtml"] 10 - pub struct BrowserHtmlPreferences { 9 + #[namespace = "beaver"] 10 + pub struct BeaverPreferences { 11 11 /// The UI theme 12 12 #[serde(default = "default_theme")] 13 13 pub theme: String, ··· 48 48 false 49 49 } 50 50 51 - impl BrowserHtmlPreferences { 51 + impl BeaverPreferences { 52 52 /// Default preferences as a const for static initialization. 53 53 pub const DEFAULT: Self = Self { 54 54 theme: String::new(), ··· 60 60 }; 61 61 } 62 62 63 - impl Default for BrowserHtmlPreferences { 63 + impl Default for BeaverPreferences { 64 64 fn default() -> Self { 65 65 Self { 66 66 theme: default_theme(), ··· 73 73 } 74 74 } 75 75 76 - // Generate global storage and accessors for browserhtml preferences 77 - servo::define_embedder_prefs!(BrowserHtmlPreferences); 76 + // Generate global storage and accessors for beaver preferences 77 + servo::define_embedder_prefs!(BeaverPreferences); 78 78 79 79 static EXPERIMENTAL_PREFS: &[&str] = &[ 80 80 "dom_async_clipboard_enabled",
htmlshell/src/protocols/mod.rs beavershell/src/protocols/mod.rs
htmlshell/src/protocols/resource.rs beavershell/src/protocols/resource.rs
htmlshell/src/resources.rs beavershell/src/resources.rs
htmlshell/src/touch_event_simulator.rs beavershell/src/touch_event_simulator.rs
+3 -4
htmlshell/src/tray.rs beavershell/src/tray.rs
··· 48 48 let tray_icon = match TrayIconBuilder::new() 49 49 .with_menu(Box::new(menu)) 50 50 .with_icon(icon) 51 - .with_tooltip("Browser.HTML") 51 + .with_tooltip("Beaver") 52 52 .build() 53 53 { 54 54 Ok(icon) => icon, ··· 97 97 let tray_icon = match TrayIconBuilder::new() 98 98 .with_menu(Box::new(menu)) 99 99 .with_icon(icon) 100 - .with_tooltip("Browser.HTML") 100 + .with_tooltip("Beaver") 101 101 .build() 102 102 { 103 103 Ok(icon) => icon, ··· 204 204 205 205 /// Load the tray icon from embedded bytes. 206 206 fn load_icon() -> Option<Icon> { 207 - let file_path = crate::resources::resources_dir_path() 208 - .join("browserhtml") 207 + let file_path = crate::resources::ancestor_dir_path("ui") 209 208 .join("system") 210 209 .join("logo.png"); 211 210
+3 -3
htmlshell/src/vhost.rs beavershell/src/vhost.rs
··· 96 96 impl PreferencesObserver for ServerState { 97 97 fn prefs_changed(&self, changes: &[(&'static str, PrefValue)]) { 98 98 for (name, value) in changes { 99 - if *name == "browserhtml.theme" { 99 + if *name == "beaver.theme" { 100 100 let PrefValue::Str(theme) = value else { 101 - error!("Unexpected value for browserhtml.theme: {value:?}"); 101 + error!("Unexpected value for beaver.theme: {value:?}"); 102 102 return; 103 103 }; 104 104 *self.theme.lock() = theme.to_string(); ··· 122 122 123 123 pub(crate) fn start_vhost(port: u16) { 124 124 // Get the initial value from the embedder preferences. 125 - let theme = match get_embedder_pref("browserhtml.theme") { 125 + let theme = match get_embedder_pref("beaver.theme") { 126 126 Some(PrefValue::Str(value)) => value, 127 127 _ => "default".to_owned(), 128 128 };
+1 -1
patches/components/script/dom/notification.rs.patch
··· 36 36 } 37 37 38 38 // TODO: step 7: If shown is false or oldNotification is non-null, 39 - @@ -859,6 +871,11 @@ 39 + @@ -857,6 +869,11 @@ 40 40 for (request, resource_type) in pending_requests { 41 41 self.fetch_and_show_when_ready(request, resource_type); 42 42 }
+3 -3
patches/components/script/dom/permissions.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -319,6 +319,7 @@ 3 + @@ -318,6 +318,7 @@ 4 4 if pref!(dom_permissions_testing_allowed_in_nonsecure_contexts) { 5 5 return PermissionState::Granted; 6 6 } ··· 8 8 return PermissionState::Denied; 9 9 } 10 10 11 - @@ -331,6 +332,10 @@ 11 + @@ -330,6 +331,10 @@ 12 12 // 2. If document is not allowed to use feature, return "denied". 13 13 if let Some(window) = global_scope.downcast::<Window>() { 14 14 if !window.Document().allowed_to_use_feature(feature) { ··· 19 19 return PermissionState::Denied; 20 20 } 21 21 } 22 - @@ -361,12 +366,24 @@ 22 + @@ -360,12 +365,24 @@ 23 23 return PermissionState::Denied; 24 24 }; 25 25 let (sender, receiver) = generic_channel::channel().expect("Failed to create IPC channel!");
+9 -9
patches/components/script/dom/window.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -38,7 +38,7 @@ 3 + @@ -37,7 +37,7 @@ 4 4 use embedder_traits::{ 5 5 AlertResponse, ConfirmResponse, EmbedderMsg, JavaScriptEvaluationError, PromptResponse, 6 6 ScriptToEmbedderChan, SimpleDialogRequest, Theme, UntrustedNodeAddress, ViewportDetails, ··· 9 9 }; 10 10 use euclid::default::Rect as UntypedRect; 11 11 use euclid::{Point2D, Rect, Scale, Size2D, Vector2D}; 12 - @@ -1139,12 +1139,22 @@ 12 + @@ -1145,12 +1145,22 @@ 13 13 14 14 let (sender, receiver) = 15 15 ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); ··· 33 33 receiver.recv().unwrap_or_else(|_| { 34 34 // If the receiver is closed, we assume the dialog was cancelled. 35 35 debug!("Alert dialog was cancelled or failed to show."); 36 - @@ -1172,13 +1182,22 @@ 36 + @@ -1178,13 +1188,22 @@ 37 37 // the user to respond with a positive or negative response. 38 38 let (sender, receiver) = 39 39 ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); ··· 57 57 // Step 5: Let userPromptHandler be WebDriver BiDi user prompt opened with this, 58 58 // "confirm", and message. 59 59 // 60 - @@ -1223,6 +1242,7 @@ 60 + @@ -1229,6 +1248,7 @@ 61 61 // defaulted to the value given by default. 62 62 let (sender, receiver) = 63 63 ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); ··· 65 65 let dialog = SimpleDialogRequest::Prompt { 66 66 id: self.Document().embedder_controls().next_control_id(), 67 67 message: message.to_string(), 68 - @@ -1229,8 +1249,16 @@ 68 + @@ -1235,8 +1255,16 @@ 69 69 default: default.to_string(), 70 70 response_sender: sender, 71 71 }; ··· 83 83 // Step 6: Let userPromptHandler be WebDriver BiDi user prompt opened with this, 84 84 // "prompt", and message. 85 85 // TODO: Add support for WebDriver BiDi. 86 - @@ -3047,9 +3075,33 @@ 86 + @@ -3032,9 +3060,33 @@ 87 87 &self, 88 88 input_event: &ConstellationInputEvent, 89 89 ) -> Option<HitTestResult> { ··· 120 120 } 121 121 122 122 #[expect(unsafe_code)] 123 - @@ -3068,8 +3120,25 @@ 123 + @@ -3053,8 +3105,25 @@ 124 124 // SAFETY: This is safe because `Window::query_elements_from_point` has ensured that 125 125 // layout has run and any OpaqueNodes that no longer refer to real nodes are gone. 126 126 let address = UntrustedNodeAddress(result.node.0 as *const c_void); ··· 147 147 cursor: result.cursor, 148 148 point_in_node: result.point_in_target, 149 149 point_in_frame, 150 - @@ -3750,6 +3819,8 @@ 150 + @@ -3735,6 +3804,8 @@ 151 151 player_context: WindowGLContext, 152 152 #[cfg(feature = "webgpu")] gpu_id_hub: Arc<IdentityHub>, 153 153 inherited_secure_context: Option<bool>, ··· 156 156 theme: Theme, 157 157 weak_script_thread: Weak<ScriptThread>, 158 158 ) -> DomRoot<Self> { 159 - @@ -3777,6 +3848,8 @@ 159 + @@ -3762,6 +3833,8 @@ 160 160 gpu_id_hub, 161 161 inherited_secure_context, 162 162 unminify_js,
+1 -1
patches/components/script/dom/workers/workerglobalscope.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -371,6 +371,8 @@ 3 + @@ -369,6 +369,8 @@ 4 4 gpu_id_hub, 5 5 init.inherited_secure_context, 6 6 init.unminify_js,
+7 -7
patches/components/script/script_thread.rs.patch
··· 76 76 } 77 77 } 78 78 79 - @@ -2963,6 +2985,9 @@ 79 + @@ -2966,6 +2988,9 @@ 80 80 .documents 81 81 .borrow() 82 82 .find_iframe(parent_pipeline_id, browsing_context_id); ··· 86 86 if let Some(frame_element) = frame_element { 87 87 frame_element.update_pipeline_id(new_pipeline_id, reason, can_gc); 88 88 } 89 - @@ -2981,6 +3006,7 @@ 89 + @@ -2984,6 +3009,7 @@ 90 90 // is no need to pass along existing opener information that 91 91 // will be discarded. 92 92 None, ··· 94 94 ); 95 95 } 96 96 } 97 - @@ -3260,6 +3286,44 @@ 97 + @@ -3263,6 +3289,44 @@ 98 98 } 99 99 } 100 100 ··· 139 139 fn ask_constellation_for_top_level_info( 140 140 &self, 141 141 sender_webview_id: WebViewId, 142 - @@ -3373,7 +3437,13 @@ 142 + @@ -3376,7 +3440,13 @@ 143 143 self.senders.pipeline_to_embedder_sender.clone(), 144 144 self.senders.constellation_sender.clone(), 145 145 incomplete.pipeline_id, ··· 154 154 incomplete.viewport_details, 155 155 origin.clone(), 156 156 final_url.clone(), 157 - @@ -3395,6 +3465,8 @@ 157 + @@ -3398,6 +3468,8 @@ 158 158 #[cfg(feature = "webgpu")] 159 159 self.gpu_id_hub.clone(), 160 160 incomplete.load_data.inherited_secure_context, ··· 163 163 incomplete.theme, 164 164 self.this.clone(), 165 165 ); 166 - @@ -3416,6 +3488,7 @@ 166 + @@ -3419,6 +3491,7 @@ 167 167 incomplete.webview_id, 168 168 incomplete.parent_info, 169 169 incomplete.opener, ··· 171 171 ); 172 172 if window_proxy.parent().is_some() { 173 173 // https://html.spec.whatwg.org/multipage/#navigating-across-documents:delaying-load-events-mode-2 174 - @@ -4132,6 +4205,24 @@ 174 + @@ -4151,6 +4224,24 @@ 175 175 document.event_handler().handle_refresh_cursor(); 176 176 } 177 177
+1 -1
patches/components/script_bindings/codegen/Bindings.conf.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -261,6 +261,10 @@ 3 + @@ -260,6 +260,10 @@ 4 4 'canGc': ['CheckValidity', 'GetLabels', 'GetValidity', 'SetValidity', 'ReportValidity', 'States'], 5 5 }, 6 6
+3 -3
readme.md
··· 23 23 ## Desktop builds 24 24 25 25 - Update with `forkme apply` 26 - - Build with `cargo build -r -p browserhtml` 27 - - Run with `cargo run -r -p browserhtml` or directly from the `target` directory as usual for Rust projects. 26 + - Build with `cargo build -r -p beaver` 27 + - Run with `cargo run -r -p beaver` or directly from the `target` directory as usual for Rust projects. 28 28 29 29 The current UI allows multiple windows, and each one is a simple tiling window manager. There is also a floating search window. 30 30 ··· 49 49 Then build with `./build-arm64.sh` or `./build-arm64.sh production` 50 50 51 51 The build script expects to be able to ssh with key authentication to `mobian@mobian`. You can then run on device with this command: 52 - `mobian@mobian:~$ ./browserhtml/browserhtml` 52 + `mobian@mobian:~$ ./beaver/beaver` 53 53 54 54 Note that you will have to set these 2 environment variables: 55 55
+5 -5
ui/settings/index.js
··· 230 230 231 231 // Register bindings: [<element id>, <preference name>] 232 232 [ 233 - ["new-view-url", "browserhtml.start_url"], 234 - ["homescreen-url", "browserhtml.homescreen_url"], 235 - ["search-engine-list", "browserhtml.search_engine"], 233 + ["new-view-url", "beaver.start_url"], 234 + ["homescreen-url", "beaver.homescreen_url"], 235 + ["search-engine-list", "beaver.search_engine"], 236 236 ["user-agent", "user_agent"], 237 237 ].forEach((item) => { 238 238 bindings.add(item[1], document.getElementById(item[0])); ··· 240 240 241 241 // Register boolean bindings: [<element id>, <preference name>] 242 242 [ 243 - ["virtual-keyboard-toggle", "browserhtml.ime_virtual_keyboard_enabled"], 244 - ["mobile-simulation-toggle", "browserhtml.mobile_simulation"], 243 + ["virtual-keyboard-toggle", "beaver.ime_virtual_keyboard_enabled"], 244 + ["mobile-simulation-toggle", "beaver.mobile_simulation"], 245 245 ["devtools-toggle", "devtools_server_enabled"], 246 246 ].forEach((item) => { 247 247 bindings.addBool(item[1], document.getElementById(item[0]));
+1 -1
ui/shared/search/engines.js
··· 1 1 // SPDX-License-Identifier: AGPL-3.0-or-later 2 2 3 - const PREF_NAME = "browserhtml.search_engine"; 3 + const PREF_NAME = "beaver.search_engine"; 4 4 5 5 // Load the default search engines resource. 6 6 import ENGINES from "//shared.localhost:8888/search/default_engines.json" with { type: "json" };
+1 -1
ui/shared/theme.js
··· 1 1 // SPDX-License-Identifier: AGPL-3.0-or-later 2 2 3 - const THEME_PREF_KEY = "browserhtml.theme"; 3 + const THEME_PREF_KEY = "beaver.theme"; 4 4 const DEFAULT_THEME = "default"; 5 5 6 6 // Available themes - TODO: make that dynamic
+1 -1
ui/system/index.html
··· 2 2 <!-- SPDX-License-Identifier: AGPL-3.0-or-later --> 3 3 <html> 4 4 <head> 5 - <title>Browser.HTML</title> 5 + <title>Beaver</title> 6 6 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" /> 7 7 <link rel="stylesheet" href="//theme.localhost:8888/index.css" /> 8 8 <link rel="stylesheet" href="//shared.localhost:8888/fonts/fonts.css" />
+6 -6
ui/system/index.js
··· 10 10 import "./mobile_radial_menu.js"; 11 11 12 12 let NEW_FRAME_DEFAULT_URL = navigator.servo.getStringPreference( 13 - "browserhtml.start_url", 13 + "beaver.start_url", 14 14 ); 15 15 16 16 // Unique ID for this browser window (used for cross-window communication) ··· 37 37 function detectMobileMode() { 38 38 // Check if mobile simulation is forced via preference 39 39 const mobileSimulation = navigator.servo.getBoolPreference( 40 - "browserhtml.mobile_simulation", 40 + "beaver.mobile_simulation", 41 41 ); 42 42 if (mobileSimulation) { 43 43 return true; ··· 66 66 console.log( 67 67 `[System PrefChanged] ${event.detail.name} : ${event.detail.value}`, 68 68 ); 69 - if (event.detail.name == "browserhtml.start_url") { 69 + if (event.detail.name == "beaver.start_url") { 70 70 NEW_FRAME_DEFAULT_URL = event.detail.value; 71 71 } 72 72 }); ··· 522 522 // Check if virtual keyboard is enabled. 523 523 if ( 524 524 !navigator.servo.getBoolPreference( 525 - "browserhtml.ime_virtual_keyboard_enabled", 525 + "beaver.ime_virtual_keyboard_enabled", 526 526 ) 527 527 ) { 528 528 return; ··· 571 571 function closeVirtualKeyboard() { 572 572 if ( 573 573 !navigator.servo.getBoolPreference( 574 - "browserhtml.ime_virtual_keyboard_enabled", 574 + "beaver.ime_virtual_keyboard_enabled", 575 575 ) 576 576 ) { 577 577 return; ··· 602 602 603 603 // Create homescreen webview 604 604 const homescreenUrl = navigator.servo.getStringPreference( 605 - "browserhtml.homescreen_url", 605 + "beaver.homescreen_url", 606 606 ); 607 607 const homescreen = new WebView(homescreenUrl, "Home", {}); 608 608 layoutManager.addWebView(homescreen);
+1 -1
ui/system/index_mobile.html
··· 2 2 <!-- SPDX-License-Identifier: AGPL-3.0-or-later --> 3 3 <html> 4 4 <head> 5 - <title>Browser.HTML</title> 5 + <title>Beaver</title> 6 6 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" /> 7 7 <link rel="stylesheet" href="//theme.localhost:8888/index.css" /> 8 8 <link rel="stylesheet" href="//shared.localhost:8888/fonts/fonts.css" />
+1 -1
ui/system/new_view.html
··· 18 18 <div class="search-block"> 19 19 <h1>Rewild Your Web</h1> 20 20 <div class="search-header"> 21 - <img src="logo.png" alt="Browser.HTML" class="logo" /> 21 + <img src="logo.png" alt="Beaver" class="logo" /> 22 22 <input 23 23 type="text" 24 24 class="search-input"