Skip to content

Commit e388130

Browse files
author
Dart CI
committed
Version 2.17.0-55.0.dev
Merge commit '4c64181d73bdbb36d365c135d82556b722aafd28' into 'dev'
2 parents 4f40923 + 4c64181 commit e388130

File tree

7 files changed

+105
-18
lines changed

7 files changed

+105
-18
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ vars = {
110110
"dart_style_rev": "6f894c0ca33686122be9085f06e5b9bf6ad55262",
111111

112112
"dartdoc_rev" : "f9cfab1b84176873c80b89e7c8b54c669344f9ed",
113-
"devtools_rev" : "013958fbd45351e5975068756b7b9114465a7f98",
113+
"devtools_rev" : "f265c3028d5ed9a454762532bed144fa36b2e4d5",
114114
"ffi_rev": "4dd32429880a57b64edaf54c9d5af8a9fa9a4ffb",
115115
"fixnum_rev": "848341f061359ef7ddc0cad472c2ecbb036b28ac",
116116
"file_rev": "0e09370f581ab6388d46fda4cdab66638c0171a1",

sdk/lib/html/dart2js/html_dart2js.dart

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13989,6 +13989,40 @@ class Element extends Node
1398913989

1399013990
int get scrollWidth => JS<num>('num', '#.scrollWidth', this).round();
1399113991

13992+
/**
13993+
* Displays this element fullscreen.
13994+
*
13995+
* ## Other resources
13996+
*
13997+
* * [Fullscreen
13998+
* API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API)
13999+
* from MDN.
14000+
* * [Fullscreen specification](http://www.w3.org/TR/fullscreen/) from W3C.
14001+
*/
14002+
@SupportedBrowser(SupportedBrowser.CHROME)
14003+
@SupportedBrowser(SupportedBrowser.SAFARI)
14004+
Future<void> requestFullscreen([Map? options]) {
14005+
var retValue;
14006+
if (options != null) {
14007+
retValue = JS(
14008+
'',
14009+
'(#.requestFullscreen||#.webkitRequestFullscreen).call(#, #)',
14010+
this,
14011+
this,
14012+
this,
14013+
convertDartToNative_Dictionary(options));
14014+
} else {
14015+
retValue = JS(
14016+
'',
14017+
'(#.requestFullscreen||#.webkitRequestFullscreen).call(#)',
14018+
this,
14019+
this,
14020+
this);
14021+
}
14022+
if (retValue != null) return promiseToFuture(retValue);
14023+
return Future<void>.value();
14024+
}
14025+
1399214026
// To suppress missing implicit constructor warnings.
1399314027
factory Element._() {
1399414028
throw new UnsupportedError("Not supported");
@@ -14896,21 +14930,6 @@ class Element extends Node
1489614930

1489714931
void setPointerCapture(int pointerId) native;
1489814932

14899-
@JSName('webkitRequestFullscreen')
14900-
/**
14901-
* Displays this element fullscreen.
14902-
*
14903-
* ## Other resources
14904-
*
14905-
* * [Fullscreen
14906-
* API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API)
14907-
* from MDN.
14908-
* * [Fullscreen specification](http://www.w3.org/TR/fullscreen/) from W3C.
14909-
*/
14910-
@SupportedBrowser(SupportedBrowser.CHROME)
14911-
@SupportedBrowser(SupportedBrowser.SAFARI)
14912-
void requestFullscreen() native;
14913-
1491414933
// From ChildNode
1491514934

1491614935
void after(Object nodes) native;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'dart:html';
6+
7+
void main() async {
8+
var documentElement = document.documentElement!;
9+
10+
// `requestFullscreen` requires user interaction to succeed, so this just
11+
// tests that the bindings and type work.
12+
await documentElement.requestFullscreen().catchError((_) {});
13+
// Try it with an options argument.
14+
await documentElement
15+
.requestFullscreen({'navigationUI': 'show'}).catchError((_) {});
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'dart:html';
6+
7+
void main() async {
8+
var documentElement = document.documentElement!;
9+
10+
// `requestFullscreen` requires user interaction to succeed, so this just
11+
// tests that the bindings and type work.
12+
await documentElement.requestFullscreen().catchError((_) {});
13+
// Try it with an options argument.
14+
await documentElement
15+
.requestFullscreen({'navigationUI': 'show'}).catchError((_) {});
16+
}

tools/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ CHANNEL dev
2727
MAJOR 2
2828
MINOR 17
2929
PATCH 0
30-
PRERELEASE 54
30+
PRERELEASE 55
3131
PRERELEASE_PATCH 0

tools/dom/idl/dart/dart.idl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,10 @@ interface AudioScheduledSourceNode {
523523

524524
[DartSupplemental]
525525
interface Element : Node {
526-
// Remove operation requestFullscreen only use webKitRequestFullscreen.
526+
// Use template implementation that looks for both the non-prefixed and
527+
// prefixed `requestFullscreen` instead.
527528
[DartSuppress] void requestFullscreen();
529+
[DartSuppress] void webkitRequestFullscreen();
528530
// setAttribute and setAttributeNS can take in non-string values that are
529531
// then converted to strings.
530532
[DartSuppress] void setAttribute(DOMString name, DOMString value);

tools/dom/templates/html/impl/impl_Element.darttemplate

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,6 +1584,40 @@ $endif
15841584

15851585
int get scrollWidth => JS<num>('num', '#.scrollWidth', this).round();
15861586

1587+
/**
1588+
* Displays this element fullscreen.
1589+
*
1590+
* ## Other resources
1591+
*
1592+
* * [Fullscreen
1593+
* API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API)
1594+
* from MDN.
1595+
* * [Fullscreen specification](http://www.w3.org/TR/fullscreen/) from W3C.
1596+
*/
1597+
@SupportedBrowser(SupportedBrowser.CHROME)
1598+
@SupportedBrowser(SupportedBrowser.SAFARI)
1599+
Future<void> requestFullscreen([Map? options]) {
1600+
var retValue;
1601+
if (options != null) {
1602+
retValue = JS(
1603+
'',
1604+
'(#.requestFullscreen||#.webkitRequestFullscreen).call(#, #)',
1605+
this,
1606+
this,
1607+
this,
1608+
convertDartToNative_Dictionary(options));
1609+
} else {
1610+
retValue = JS(
1611+
'',
1612+
'(#.requestFullscreen||#.webkitRequestFullscreen).call(#)',
1613+
this,
1614+
this,
1615+
this);
1616+
}
1617+
if (retValue != null) return promiseToFuture(retValue);
1618+
return Future<void>.value();
1619+
}
1620+
15871621
$!MEMBERS
15881622
}
15891623

0 commit comments

Comments
 (0)