Commit f306830b authored by dpapad's avatar dpapad Committed by Commit Bot

WebUI: Cleanup unnecessary code duplication in cr_dialog.

At r819219 a large part of cr_dialog.html code was duplicated between
CrOS/non-CrOS builds unnecessarily.

Bug: 1007433
Change-Id: Ia7de207202cdbd39f0b8d8671cd809249da36081
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2565184
Commit-Queue: dpapad <dpapad@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831882}
parent e9a72d64
......@@ -148,12 +148,14 @@
margin-top: 4px;
}
</style>
<!-- TODO(crbug/1139958): Remove "not chromeos" block when chromeVox issue is fixed-->
<!--Update both "not chromeos" and "chromeos" blocks if either changes-->
<if expr="not chromeos">
<!-- TODO(crbug/1139958): Remove "not chromeos" block when chromeVox issue
is fixed-->
<dialog id="dialog" on-close="onNativeDialogClose_"
on-cancel="onNativeDialogCancel_" part="dialog"
aria-labelledby="title">
<if expr="not chromeos">
aria-labelledby="title"
</if>
>
<!-- This wrapper is necessary, such that the "pulse" animation is not
erroneously played when the user clicks on the outer-most scrollbar. -->
<div id="content-wrapper" part="wrapper">
......@@ -175,32 +177,6 @@
<slot name="footer"></slot>
</div>
</dialog>
</if>
<if expr="chromeos">
<dialog id="dialog" on-close="onNativeDialogClose_"
on-cancel="onNativeDialogCancel_" part="dialog">
<!-- This wrapper is necessary, such that the "pulse" animation is not
erroneously played when the user clicks on the outer-most scrollbar. -->
<div id="content-wrapper" part="wrapper">
<div class="top-container">
<div id="title" class="title-container" tabindex="-1">
<slot name="title"></slot>
</div>
<cr-icon-button id="close" class="icon-clear"
hidden$="[[!showCloseButton]]" aria-label$="[[closeText]]"
on-click="cancel" on-keypress="onCloseKeypress_">
</cr-icon-button>
</div>
<slot name="header"></slot>
<div class="body-container" id="container" show-bottom-shadow
part="body-container">
<slot name="body"></slot>
</div>
<slot name="button-container"></slot>
<slot name="footer"></slot>
</div>
</dialog>
</if>
</template>
<script src="cr_dialog.js"></script>
</dom-module>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment