Skip to content

Commit d3e1a2b

Browse files
committed
servo: Merge #13489 - Add support for fullscreen #10102 (from farodin91:fullscreen); r=jdm
<!-- Please describe your changes on the following line: --> I'm start working on fullscreen support. jdm Should be the entry_point in ScriptReflow a Option if fullscreen is enabled or point on the entry_node? For example the RootNode. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #10102 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 8b69e73594647319e95bd0fd36c2addabcee1e5d UltraBlame original commit: 088b220230d754d962ef695873042c7cf8ed3f43
1 parent 3d4814e commit d3e1a2b

25 files changed

+2894
-159
lines changed

servo/Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

servo/components/atoms/static_atoms.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,5 @@ statechange
9393
controllerchange
9494
fetch
9595
characteristicvaluechanged
96+
fullscreenchange
97+
fullscreenerror

servo/components/compositing/compositor.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,6 +3091,32 @@ func
30913091
;
30923092
}
30933093
(
3094+
Msg
3095+
:
3096+
:
3097+
SetFullscreenState
3098+
(
3099+
state
3100+
)
3101+
ShutdownState
3102+
:
3103+
:
3104+
NotShuttingDown
3105+
)
3106+
=
3107+
>
3108+
{
3109+
self
3110+
.
3111+
window
3112+
.
3113+
set_fullscreen_state
3114+
(
3115+
state
3116+
)
3117+
;
3118+
}
3119+
(
30943120
_
30953121
ShutdownState
30963122
:

servo/components/compositing/compositor_thread.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,10 @@ Fn
494494
Send
495495
>
496496
)
497+
SetFullscreenState
498+
(
499+
bool
500+
)
497501
}
498502
impl
499503
Debug
@@ -998,6 +1002,24 @@ f
9981002
Dispatch
9991003
"
10001004
)
1005+
Msg
1006+
:
1007+
:
1008+
SetFullscreenState
1009+
(
1010+
.
1011+
.
1012+
)
1013+
=
1014+
>
1015+
write
1016+
!
1017+
(
1018+
f
1019+
"
1020+
SetFullscreenState
1021+
"
1022+
)
10011023
}
10021024
}
10031025
}

servo/components/compositing/windowing.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,16 @@ i32
700700
)
701701
;
702702
fn
703+
set_fullscreen_state
704+
(
705+
&
706+
self
707+
state
708+
:
709+
bool
710+
)
711+
;
712+
fn
703713
set_page_title
704714
(
705715
&

servo/components/constellation/constellation.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6376,6 +6376,32 @@ new_value
63766376
)
63776377
;
63786378
}
6379+
FromScriptMsg
6380+
:
6381+
:
6382+
SetFullscreenState
6383+
(
6384+
state
6385+
)
6386+
=
6387+
>
6388+
{
6389+
self
6390+
.
6391+
compositor_proxy
6392+
.
6393+
send
6394+
(
6395+
ToCompositorMsg
6396+
:
6397+
:
6398+
SetFullscreenState
6399+
(
6400+
state
6401+
)
6402+
)
6403+
;
6404+
}
63796405
}
63806406
}
63816407
fn

servo/components/profile/time.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,28 @@ Event
11681168
ProfilerCategory
11691169
:
11701170
:
1171+
ScriptEnterFullscreen
1172+
=
1173+
>
1174+
"
1175+
Script
1176+
Enter
1177+
Fullscreen
1178+
"
1179+
ProfilerCategory
1180+
:
1181+
:
1182+
ScriptExitFullscreen
1183+
=
1184+
>
1185+
"
1186+
Script
1187+
Exit
1188+
Fullscreen
1189+
"
1190+
ProfilerCategory
1191+
:
1192+
:
11711193
ApplicationHeartbeat
11721194
=
11731195
>

servo/components/profile_traits/time.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,12 @@ ScriptServiceWorkerEvent
342342
ScriptParseXML
343343
=
344344
0x76
345+
ScriptEnterFullscreen
346+
=
347+
0x77
348+
ScriptExitFullscreen
349+
=
350+
0x78
345351
ApplicationHeartbeat
346352
=
347353
0x90

0 commit comments

Comments
 (0)