in https://cs.chromium.org/chromium/src/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl?l=87 we always check for NullOrUndefined, so even a union like (String? or TrustedHTML) will result in "undefined" being mapped to the empty string.
Once this bug is fixed, custom bindings added by https://chromium-review.googlesource.com/c/chromium/src/+/762436 should be removed. bashi@: Would you mind taking a look?
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e37fc7c66268fca183dfff186c40e44cfd800998 commit e37fc7c66268fca183dfff186c40e44cfd800998 Author: Jochen Eisinger <jochen@chromium.org> Date: Sun Nov 12 06:23:44 2017 Remove hack for TreatNullAsString This was supposed to be a temporary workaround until issue 714866 is fixed, but never got removed. BUG=774176,783916 R=mkwst@chromium.org,haraken@chromium.org Change-Id: I381d0bca04707d0a361d9ce12c96e189b626c389 Reviewed-on: https://chromium-review.googlesource.com/762436 Commit-Queue: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Hayato Ito <hayato@chromium.org> Cr-Commit-Position: refs/heads/master@{#515861} [add] https://crrev.com/e37fc7c66268fca183dfff186c40e44cfd800998/third_party/WebKit/LayoutTests/fast/dom/Element/innerHTML-treat-null-as-string.html [modify] https://crrev.com/e37fc7c66268fca183dfff186c40e44cfd800998/third_party/WebKit/Source/bindings/bindings.gni [add] https://crrev.com/e37fc7c66268fca183dfff186c40e44cfd800998/third_party/WebKit/Source/bindings/core/v8/custom/V8ElementCustom.cpp [add] https://crrev.com/e37fc7c66268fca183dfff186c40e44cfd800998/third_party/WebKit/Source/bindings/core/v8/custom/V8ShadowRootCustom.cpp [modify] https://crrev.com/e37fc7c66268fca183dfff186c40e44cfd800998/third_party/WebKit/Source/core/dom/Element.cpp [modify] https://crrev.com/e37fc7c66268fca183dfff186c40e44cfd800998/third_party/WebKit/Source/core/dom/Element.idl [modify] https://crrev.com/e37fc7c66268fca183dfff186c40e44cfd800998/third_party/WebKit/Source/core/dom/ShadowRoot.cpp [modify] https://crrev.com/e37fc7c66268fca183dfff186c40e44cfd800998/third_party/WebKit/Source/core/dom/ShadowRoot.idl
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/95e001a05d1aa95043803022f846ac70182b7e7c commit 95e001a05d1aa95043803022f846ac70182b7e7c Author: Jochen Eisinger <jochen@chromium.org> Date: Mon Nov 13 20:44:27 2017 Remove hack for TreatNullAsString This was supposed to be a temporary workaround until issue 714866 is fixed, but never got removed. BUG=774176,783916 R=haraken@chromium.org, mkwst@chromium.org TBR=jochen@chromium.org (cherry picked from commit e37fc7c66268fca183dfff186c40e44cfd800998) Change-Id: I381d0bca04707d0a361d9ce12c96e189b626c389 Reviewed-on: https://chromium-review.googlesource.com/762436 Commit-Queue: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Hayato Ito <hayato@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#515861} Reviewed-on: https://chromium-review.googlesource.com/767247 Reviewed-by: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/branch-heads/3239@{#466} Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578} [add] https://crrev.com/95e001a05d1aa95043803022f846ac70182b7e7c/third_party/WebKit/LayoutTests/fast/dom/Element/innerHTML-treat-null-as-string.html [modify] https://crrev.com/95e001a05d1aa95043803022f846ac70182b7e7c/third_party/WebKit/Source/bindings/bindings.gni [add] https://crrev.com/95e001a05d1aa95043803022f846ac70182b7e7c/third_party/WebKit/Source/bindings/core/v8/custom/V8ElementCustom.cpp [add] https://crrev.com/95e001a05d1aa95043803022f846ac70182b7e7c/third_party/WebKit/Source/bindings/core/v8/custom/V8ShadowRootCustom.cpp [modify] https://crrev.com/95e001a05d1aa95043803022f846ac70182b7e7c/third_party/WebKit/Source/core/dom/Element.cpp [modify] https://crrev.com/95e001a05d1aa95043803022f846ac70182b7e7c/third_party/WebKit/Source/core/dom/Element.idl [modify] https://crrev.com/95e001a05d1aa95043803022f846ac70182b7e7c/third_party/WebKit/Source/core/dom/ShadowRoot.cpp [modify] https://crrev.com/95e001a05d1aa95043803022f846ac70182b7e7c/third_party/WebKit/Source/core/dom/ShadowRoot.idl
Comment 1 by haraken@chromium.org
, Nov 12 2017Owner: bashi@chromium.org