Commit 9c8c53a5 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Web UI Polymer 3: Revert anchor alignment split

Since the tools/polymer/polymer.py script has been updated to handle
export annotations, revert
https://chromium-review.googlesource.com/c/chromium/src/+/1795315,
which split of the AnchorAlignment enum into a separate file, since
it is no longer necessary.

Bug: 965770
Change-Id: I7109485280d8d22befe4cdccca3a7e5cf54629bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1804957
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697046}
parent 964f683a
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/anchor_alignment.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html"> <link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html"> <link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html">
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/anchor_alignment.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html"> <link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html"> <link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html">
......
...@@ -3,10 +3,9 @@ ...@@ -3,10 +3,9 @@
// found in the LICENSE file. // found in the LICENSE file.
// clang-format off // clang-format off
// #import 'chrome://resources/cr_elements/cr_action_menu/cr_action_menu.m.js'; // #import {AnchorAlignment} from 'chrome://resources/cr_elements/cr_action_menu/cr_action_menu.m.js';
// #import 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.m.js'; // #import 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.m.js';
// //
// #import {AnchorAlignment} from 'chrome://resources/cr_elements/cr_action_menu/anchor_alignment.m.js';
// #import {eventToPromise, flushTasks} from 'chrome://test/test_util.m.js'; // #import {eventToPromise, flushTasks} from 'chrome://test/test_util.m.js';
// #import {getDeepActiveElement} from 'chrome://resources/js/util.m.js'; // #import {getDeepActiveElement} from 'chrome://resources/js/util.m.js';
// #import {keyDownOn} from 'chrome://resources/polymer/v3_0/iron-test-helpers/mock-interactions.js'; // #import {keyDownOn} from 'chrome://resources/polymer/v3_0/iron-test-helpers/mock-interactions.js';
......
...@@ -143,7 +143,6 @@ group("polymer3_elements") { ...@@ -143,7 +143,6 @@ group("polymer3_elements") {
":shared_style_css_module", ":shared_style_css_module",
":shared_vars_css_module", ":shared_vars_css_module",
"cr_action_menu:cr_action_menu_module", "cr_action_menu:cr_action_menu_module",
"cr_action_menu:modulize",
"cr_button:cr_button_module", "cr_button:cr_button_module",
"cr_checkbox:cr_checkbox_module", "cr_checkbox:cr_checkbox_module",
"cr_dialog:cr_dialog_module", "cr_dialog:cr_dialog_module",
......
...@@ -4,21 +4,15 @@ ...@@ -4,21 +4,15 @@
import("//third_party/closure_compiler/compile_js.gni") import("//third_party/closure_compiler/compile_js.gni")
import("//tools/polymer/polymer.gni") import("//tools/polymer/polymer.gni")
import("../../tools/js_modulizer.gni")
js_type_check("closure_compile") { js_type_check("closure_compile") {
deps = [ deps = [
":anchor_alignment",
":cr_action_menu", ":cr_action_menu",
] ]
} }
js_library("anchor_alignment") {
}
js_library("cr_action_menu") { js_library("cr_action_menu") {
deps = [ deps = [
":anchor_alignment",
"//ui/webui/resources/js:assert", "//ui/webui/resources/js:assert",
"//ui/webui/resources/js:util", "//ui/webui/resources/js:util",
"//ui/webui/resources/js/cr/ui:focus_row", "//ui/webui/resources/js/cr/ui:focus_row",
...@@ -27,11 +21,6 @@ js_library("cr_action_menu") { ...@@ -27,11 +21,6 @@ js_library("cr_action_menu") {
externs_list = [ "$externs_path/pending.js" ] externs_list = [ "$externs_path/pending.js" ]
} }
js_modulizer("modulize") {
input_files = [ "anchor_alignment.js" ]
deps = []
}
polymer_modulizer("cr_action_menu") { polymer_modulizer("cr_action_menu") {
js_file = "cr_action_menu.js" js_file = "cr_action_menu.js"
html_file = "cr_action_menu.html" html_file = "cr_action_menu.html"
...@@ -47,7 +36,6 @@ polymer_modulizer("cr_action_menu") { ...@@ -47,7 +36,6 @@ polymer_modulizer("cr_action_menu") {
"ui/webui/resources/html/polymer.html|dom,html,Polymer", "ui/webui/resources/html/polymer.html|dom,html,Polymer",
"ui/webui/resources/html/assert.html|assert", "ui/webui/resources/html/assert.html|assert",
"ui/webui/resources/html/cr.html|isMac, isWindows", "ui/webui/resources/html/cr.html|isMac, isWindows",
"ui/webui/resources/cr_elements/cr_action_menu/anchor_alignment.html|AnchorAlignment",
"ui/webui/resources/html/cr/ui/focus_row.html|FocusRow", "ui/webui/resources/html/cr/ui/focus_row.html|FocusRow",
"ui/webui/resources/html/cr/ui/focus_without_ink.html|focusWithoutInk", "ui/webui/resources/html/cr/ui/focus_without_ink.html|focusWithoutInk",
"ui/webui/resources/html/util.html|getDeepActiveElement, hasKeyModifiers", "ui/webui/resources/html/util.html|getDeepActiveElement, hasKeyModifiers",
...@@ -57,25 +45,15 @@ polymer_modulizer("cr_action_menu") { ...@@ -57,25 +45,15 @@ polymer_modulizer("cr_action_menu") {
js_type_check("closure_compile_module") { js_type_check("closure_compile_module") {
is_polymer3 = true is_polymer3 = true
deps = [ deps = [
":anchor_alignment.m",
":cr_action_menu.m", ":cr_action_menu.m",
] ]
} }
js_library("anchor_alignment.m") {
sources = [
"$root_gen_dir/ui/webui/resources/cr_elements/cr_action_menu/anchor_alignment.m.js",
]
deps = []
extra_deps = [ ":modulize" ]
}
js_library("cr_action_menu.m") { js_library("cr_action_menu.m") {
sources = [ sources = [
"$root_gen_dir/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.m.js", "$root_gen_dir/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.m.js",
] ]
deps = [ deps = [
":anchor_alignment.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:assert.m", "//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js:cr.m", "//ui/webui/resources/js:cr.m",
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @enum {number}
* @const
*/
/* #export */ const AnchorAlignment = {
BEFORE_START: -2,
AFTER_START: -1,
CENTER: 0,
BEFORE_END: 1,
AFTER_END: 2,
};
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<link rel="import" href="../../html/cr/ui/focus_without_ink.html"> <link rel="import" href="../../html/cr/ui/focus_without_ink.html">
<link rel="import" href="../../html/util.html"> <link rel="import" href="../../html/util.html">
<link rel="import" href="../shared_vars_css.html"> <link rel="import" href="../shared_vars_css.html">
<link rel="import" href="anchor_alignment.html">
<dom-module id="cr-action-menu"> <dom-module id="cr-action-menu">
<template> <template>
......
...@@ -34,6 +34,18 @@ let ShowAtConfig; ...@@ -34,6 +34,18 @@ let ShowAtConfig;
*/ */
let ShowAtPositionConfig; let ShowAtPositionConfig;
/**
* @enum {number}
* @const
*/
/* #export */ const AnchorAlignment = {
BEFORE_START: -2,
AFTER_START: -1,
CENTER: 0,
BEFORE_END: 1,
AFTER_END: 2,
};
/** @const {string} */ /** @const {string} */
const DROPDOWN_ITEM_CLASS = 'dropdown-item'; const DROPDOWN_ITEM_CLASS = 'dropdown-item';
......
...@@ -5,14 +5,6 @@ ...@@ -5,14 +5,6 @@
file="cr_elements/action_link_css.html" file="cr_elements/action_link_css.html"
type="chrome_html" type="chrome_html"
compress="gzip" /> compress="gzip" />
<structure name="IDR_CR_ELEMENTS_CR_ACTION_MENU_ANCHOR_ALIGNMENT_HTML"
file="cr_elements/cr_action_menu/anchor_alignment.html"
type="chrome_html"
compress="gzip" />
<structure name="IDR_CR_ELEMENTS_CR_ACTION_MENU_ANCHOR_ALIGNMENT_JS"
file="cr_elements/cr_action_menu/anchor_alignment.js"
type="chrome_html"
compress="gzip" />
<structure name="IDR_CR_ELEMENTS_CR_ACTION_MENU_HTML" <structure name="IDR_CR_ELEMENTS_CR_ACTION_MENU_HTML"
file="cr_elements/cr_action_menu/cr_action_menu.html" file="cr_elements/cr_action_menu/cr_action_menu.html"
type="chrome_html" type="chrome_html"
......
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
use_base_dir="false" use_base_dir="false"
type="BINDATA" type="BINDATA"
compress="gzip" /> compress="gzip" />
<include name="IDR_CR_ELEMENTS_CR_ACTION_MENU_ANCHOR_ALIGNMENT_M_JS"
file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_action_menu/anchor_alignment.m.js"
use_base_dir="false"
type="BINDATA"
compress="gzip" />
<include name="IDR_CR_ELEMENTS_CR_ACTION_MENU_M_JS" <include name="IDR_CR_ELEMENTS_CR_ACTION_MENU_M_JS"
file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.m.js" file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.m.js"
use_base_dir="false" use_base_dir="false"
......
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