Skip to content

Commit b7eba3b

Browse files
mollyibotcopybara-github
authored andcommitted
Fix opensource build failure for macos system after patching elemental2/dom/w3c_css.js to exclude collided StylePropertyMapReadonly.
PiperOrigin-RevId: 767673291
1 parent ac2c8f1 commit b7eba3b

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

java/elemental2/dom/BUILD

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ patch_extern_file(
4545
patch_file = "w3c_rtc.js.diff",
4646
)
4747

48+
# Patch for w3c_css.js:
49+
# - Exclude StylePropertyMapReadonly api that are not released.
50+
# TODO(b/422164865): Remove the patch when a new jscompiler release containing the change is
51+
# installed.
52+
patch_extern_file(
53+
name = "w3c_css_patched",
54+
src = "//third_party:w3c_css.js",
55+
patch_file = "w3c_css.js.diff",
56+
)
57+
4858
filegroup(
4959
name = "externs",
5060
srcs = [
@@ -67,7 +77,7 @@ filegroup(
6777
":window_patched",
6878
"//third_party:w3c_range.js",
6979
"//third_party:w3c_geometry1.js",
70-
"//third_party:w3c_css.js",
80+
":w3c_css_patched",
7181
"//third_party:w3c_css3d.js",
7282
"//third_party:w3c_xml.js",
7383
"//third_party:flash.js",

java/elemental2/dom/w3c_css.js.diff

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
299,324d298
2+
<
3+
< /**
4+
< * @constructor
5+
< * @see https://developer.mozilla.org/docs/Web/API/StylePropertyMap
6+
< */
7+
< function StylePropertyMapReadonly() {}
8+
<
9+
< /**
10+
< * @const {number}
11+
< * @see https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size
12+
< */
13+
< StylePropertyMapReadonly.prototype.size;
14+
<
15+
< /**
16+
< * @param {string} property
17+
< * @return {(!CSSStyleValue|undefined)}
18+
< * @see https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/get
19+
< */
20+
< StylePropertyMapReadonly.prototype.get = function(property) {}
21+
<
22+
< /**
23+
< * @param {string} property
24+
< * @return {!Array<!CSSStyleValue>}
25+
< * @see https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll
26+
< */
27+
< StylePropertyMapReadonly.prototype.getAll = function(property) {}
28+
327,340d300
29+
< * @param {string} property
30+
< * @return {boolean}
31+
< * @see https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/has
32+
< */
33+
< StylePropertyMapReadonly.prototype.has = function(property) {}
34+
<
35+
< /**
36+
< * @param {function(!Array<!CSSStyleValue>, string, !StylePropertyMapReadOnly): void} callbackfn
37+
< * @param {*=} opt_thisArg
38+
< * @see https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/forEach
39+
< */
40+
< StylePropertyMapReadonly.prototype.forEach = function(callbackfn, opt_thisArg) {}
41+
<
42+
< /**

0 commit comments

Comments
 (0)