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

WebUI cleanup: Remove unused paper-toolbar Polymer element.

Bug: 768599
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I8104ae1a081564d66425cd0f6bdec9229f4f6c26
Reviewed-on: https://chromium-review.googlesource.com/682455Reviewed-by: default avatarDave Schuyler <dschuyler@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505267}
parent d6d837f5
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-icon-item.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-icon-item.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-listbox.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-listbox.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-toolbar/paper-toolbar.html">
<link rel="import" href="audio_settings.html"> <link rel="import" href="audio_settings.html">
<link rel="import" href="battery_settings.html"> <link rel="import" href="battery_settings.html">
<link rel="import" href="bluetooth_settings.html"> <link rel="import" href="bluetooth_settings.html">
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
"paper-styles": "PolymerElements/paper-styles#1.1.4", "paper-styles": "PolymerElements/paper-styles#1.1.4",
"paper-tabs": "PolymerElements/paper-tabs#1.6.2", "paper-tabs": "PolymerElements/paper-tabs#1.6.2",
"paper-toggle-button": "PolymerElements/paper-toggle-button#1.3.0", "paper-toggle-button": "PolymerElements/paper-toggle-button#1.3.0",
"paper-toolbar": "PolymerElements/paper-toolbar#1.1.6",
"paper-tooltip": "PolymerElements/paper-tooltip#1.1.3", "paper-tooltip": "PolymerElements/paper-tooltip#1.1.3",
"polymer": "Polymer/polymer#1.9.1", "polymer": "Polymer/polymer#1.9.1",
"web-animations-js": "web-animations/web-animations-js#2.2.2" "web-animations-js": "web-animations/web-animations-js#2.2.2"
......
{
"name": "paper-toolbar",
"version": "1.1.6",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "A material design toolbar that is easily customizable",
"private": true,
"main": "paper-toolbar.html",
"authors": [
"The Polymer Authors"
],
"keywords": [
"web-components",
"polymer",
"toolbar",
"layout"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/paper-toolbar.git"
},
"dependencies": {
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.1.0",
"polymer": "Polymer/polymer#^1.2.0"
},
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
"iron-icons": "PolymerElements/iron-icons#^1.0.0",
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
"paper-progress": "PolymerElements/paper-progress#^1.0.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": []
}
# Copyright 2017 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.
#
# NOTE: Created with generate_compiled_resources_gyp.py, please do not edit.
{
'targets': [
{
'target_name': 'paper-toolbar-extracted',
'includes': ['../../../../closure_compiler/compile_js2.gypi'],
},
],
}
Polymer({
is: 'paper-toolbar',
hostAttributes: {
'role': 'toolbar'
},
properties: {
/**
* Controls how the items are aligned horizontally when they are placed
* at the bottom.
* Options are `start`, `center`, `end`, `justified` and `around`.
*/
bottomJustify: {
type: String,
value: ''
},
/**
* Controls how the items are aligned horizontally.
* Options are `start`, `center`, `end`, `justified` and `around`.
*/
justify: {
type: String,
value: ''
},
/**
* Controls how the items are aligned horizontally when they are placed
* in the middle.
* Options are `start`, `center`, `end`, `justified` and `around`.
*/
middleJustify: {
type: String,
value: ''
}
},
attached: function() {
this._observer = this._observe(this);
this._updateAriaLabelledBy();
},
detached: function() {
if (this._observer) {
this._observer.disconnect();
}
},
_observe: function(node) {
var observer = new MutationObserver(function() {
this._updateAriaLabelledBy();
}.bind(this));
observer.observe(node, {
childList: true,
subtree: true
});
return observer;
},
_updateAriaLabelledBy: function() {
var labelledBy = [];
var contents = Polymer.dom(this.root).querySelectorAll('content');
for (var content, index = 0; content = contents[index]; index++) {
var nodes = Polymer.dom(content).getDistributedNodes();
for (var node, jndex = 0; node = nodes[jndex]; jndex++) {
if (node.classList && node.classList.contains('title')) {
if (node.id) {
labelledBy.push(node.id);
} else {
var id = 'paper-toolbar-label-' + Math.floor(Math.random() * 10000);
node.id = id;
labelledBy.push(id);
}
}
}
}
if (labelledBy.length > 0) {
this.setAttribute('aria-labelledby', labelledBy.join(' '));
}
},
_computeBarExtraClasses: function(barJustify) {
if (!barJustify) return '';
return barJustify + (barJustify === 'justified' ? '' : '-justified');
}
});
\ No newline at end of file
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><html><head><link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-styles/default-theme.html">
<link rel="import" href="../paper-styles/typography.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
<!--
Material design: [Toolbars](https://www.google.com/design/spec/components/toolbars.html)
`paper-toolbar` is a horizontal bar containing items that can be used for
label, navigation, search and actions. The items placed inside the
`paper-toolbar` are projected into a `class="horizontal center layout"` container inside of
`paper-toolbar`'s Shadow DOM. You can use flex attributes to control the items'
sizing.
Example:
```html
<paper-toolbar>
<paper-icon-button icon="menu" on-tap="menuAction"></paper-icon-button>
<div class="title">Title</div>
<paper-icon-button icon="more-vert" on-tap="moreAction"></paper-icon-button>
</paper-toolbar>
```
`paper-toolbar` has a standard height, but can made be taller by setting `tall`
class on the `paper-toolbar`. This will make the toolbar 3x the normal height.
```html
<paper-toolbar class="tall">
<paper-icon-button icon="menu"></paper-icon-button>
</paper-toolbar>
```
Apply `medium-tall` class to make the toolbar medium tall. This will make the
toolbar 2x the normal height.
```html
<paper-toolbar class="medium-tall">
<paper-icon-button icon="menu"></paper-icon-button>
</paper-toolbar>
```
When `tall`, items can pin to either the top (default), middle or bottom. Use
`middle` class for middle content and `bottom` class for bottom content.
```html
<paper-toolbar class="tall">
<paper-icon-button icon="menu"></paper-icon-button>
<div class="middle title">Middle Title</div>
<div class="bottom title">Bottom Title</div>
</paper-toolbar>
```
For `medium-tall` toolbar, the middle and bottom contents overlap and are
pinned to the bottom. But `middleJustify` and `bottomJustify` attributes are
still honored separately.
To make an element completely fit at the bottom of the toolbar, use `fit` along
with `bottom`.
```html
<paper-toolbar class="tall">
<div id="progressBar" class="bottom fit"></div>
</paper-toolbar>
```
When inside a `paper-header-panel` element, the class `.animate` is toggled to animate
the height change in the toolbar.
### Styling
The following custom properties and mixins are available for styling:
Custom property | Description | Default
----------------|-------------|----------
`--paper-toolbar-title` | Mixin applied to the title of the toolbar | `{}`
`--paper-toolbar-background` | Toolbar background color | `--primary-color`
`--paper-toolbar-color` | Toolbar foreground color | `--dark-theme-text-color`
`--paper-toolbar-height` | Custom height for toolbar | `64px`
`--paper-toolbar-sm-height` | Custom height for small screen toolbar | `56px`
`--paper-toolbar` | Mixin applied to the toolbar | `{}`
`--paper-toolbar-content` | Mixin applied to the content section of the toolbar | `{}`
`--paper-toolbar-medium` | Mixin applied to medium height toolbar | `{}`
`--paper-toolbar-tall` | Mixin applied to tall height toolbar | `{}`
`--paper-toolbar-transition` | Transition applied to the `.animate` class | `height 0.18s ease-in`
### Accessibility
`<paper-toolbar>` has `role="toolbar"` by default. Any elements with the class `title` will
be used as the label of the toolbar via `aria-labelledby`.
@demo demo/index.html
-->
</head><body><dom-module id="paper-toolbar">
<template>
<style>
:host {
--calculated-paper-toolbar-height: var(--paper-toolbar-height, 64px);
--calculated-paper-toolbar-sm-height: var(--paper-toolbar-sm-height, 56px);
/* technical */
display: block;
position: relative;
box-sizing: border-box;
-moz-box-sizing: border-box;
/* size */
height: var(--calculated-paper-toolbar-height);
background: var(--paper-toolbar-background, --primary-color);
color: var(--paper-toolbar-color, --dark-theme-text-color);
@apply(--paper-toolbar);
}
:host(.animate) {
/* transition */
transition: var(--paper-toolbar-transition, height 0.18s ease-in);
}
:host(.medium-tall) {
height: calc(var(--calculated-paper-toolbar-height) * 2);
@apply(--paper-toolbar-medium);
}
:host(.tall) {
height: calc(var(--calculated-paper-toolbar-height) * 3);
@apply(--paper-toolbar-tall);
}
.toolbar-tools {
position: relative;
height: var(--calculated-paper-toolbar-height);
padding: 0 16px;
pointer-events: none;
@apply(--layout-horizontal);
@apply(--layout-center);
@apply(--paper-toolbar-content);
}
/*
* TODO: Where should media query breakpoints live so they can be shared between elements?
*/
@media (max-width: 600px) {
:host {
height: var(--calculated-paper-toolbar-sm-height);
}
:host(.medium-tall) {
height: calc(var(--calculated-paper-toolbar-sm-height) * 2);
}
:host(.tall) {
height: calc(var(--calculated-paper-toolbar-sm-height) * 3);
}
.toolbar-tools {
height: var(--calculated-paper-toolbar-sm-height);
}
}
#topBar {
position: relative;
}
/* middle bar */
#middleBar {
position: absolute;
top: 0;
right: 0;
left: 0;
}
:host(.tall) #middleBar,
:host(.medium-tall) #middleBar {
-webkit-transform: translateY(100%);
transform: translateY(100%);
}
/* bottom bar */
#bottomBar {
position: absolute;
right: 0;
bottom: 0;
left: 0;
}
/*
* make elements (e.g. buttons) respond to mouse/touch events
*
* `.toolbar-tools` disables touch events so multiple toolbars can stack and not
* absorb events. All children must have pointer events re-enabled to work as
* expected.
*/
.toolbar-tools > ::content > *:not([disabled]) {
pointer-events: auto;
}
.toolbar-tools > ::content .title {
@apply(--paper-font-common-base);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 20px;
font-weight: 400;
line-height: 1;
pointer-events: none;
@apply(--layout-flex);
}
.toolbar-tools > ::content > .title {
margin-left: 56px;
}
.toolbar-tools > ::content > paper-icon-button + .title {
margin-left: 0;
}
/**
* The --paper-toolbar-title mixin is applied here instead of above to
* fix the issue with margin-left being ignored due to css ordering.
*/
.toolbar-tools > ::content .title {
@apply(--paper-toolbar-title);
}
.toolbar-tools > ::content paper-icon-button[icon=menu] {
margin-right: 24px;
}
.toolbar-tools > ::content > .fit {
position: absolute;
top: auto;
right: 0;
bottom: 0;
left: 0;
width: auto;
margin: 0;
}
/* TODO(noms): Until we have a better solution for classes that don't use
* /deep/ create our own.
*/
.start-justified {
@apply(--layout-start-justified);
}
.center-justified {
@apply(--layout-center-justified);
}
.end-justified {
@apply(--layout-end-justified);
}
.around-justified {
@apply(--layout-around-justified);
}
.justified {
@apply(--layout-justified);
}
</style>
<div id="topBar" class$="toolbar-tools [[_computeBarExtraClasses(justify)]]">
<content select=":not(.middle):not(.bottom)"></content>
</div>
<div id="middleBar" class$="toolbar-tools [[_computeBarExtraClasses(middleJustify)]]">
<content select=".middle"></content>
</div>
<div id="bottomBar" class$="toolbar-tools [[_computeBarExtraClasses(bottomJustify)]]">
<content select=".bottom"></content>
</div>
</template>
</dom-module>
<script src="paper-toolbar-extracted.js"></script></body></html>
\ No newline at end of file
...@@ -298,12 +298,6 @@ Tree: v1.3.0 ...@@ -298,12 +298,6 @@ Tree: v1.3.0
Revision: 2f279868a9c8965aba76017c7ee6008ac4879f6a Revision: 2f279868a9c8965aba76017c7ee6008ac4879f6a
Tree link: https://github.com/PolymerElements/paper-toggle-button/tree/v1.3.0 Tree link: https://github.com/PolymerElements/paper-toggle-button/tree/v1.3.0
Name: paper-toolbar
Repository: https://github.com/PolymerElements/paper-toolbar.git
Tree: v1.1.6
Revision: 39b8ad381bd4ba7834ed8f30a938b49810b9204f
Tree link: https://github.com/PolymerElements/paper-toolbar/tree/v1.1.6
Name: paper-tooltip Name: paper-tooltip
Repository: https://github.com/PolymerElements/paper-tooltip.git Repository: https://github.com/PolymerElements/paper-tooltip.git
Tree: v1.1.3 Tree: v1.1.3
......
...@@ -647,12 +647,6 @@ ...@@ -647,12 +647,6 @@
<structure name="IDR_POLYMER_1_0_PAPER_TOGGLE_BUTTON_PAPER_TOGGLE_BUTTON_HTML" <structure name="IDR_POLYMER_1_0_PAPER_TOGGLE_BUTTON_PAPER_TOGGLE_BUTTON_HTML"
file="../../../third_party/polymer/v1_0/components-chromium/paper-toggle-button/paper-toggle-button.html" file="../../../third_party/polymer/v1_0/components-chromium/paper-toggle-button/paper-toggle-button.html"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_POLYMER_1_0_PAPER_TOOLBAR_PAPER_TOOLBAR_EXTRACTED_JS"
file="../../../third_party/polymer/v1_0/components-chromium/paper-toolbar/paper-toolbar-extracted.js"
type="chrome_html" />
<structure name="IDR_POLYMER_1_0_PAPER_TOOLBAR_PAPER_TOOLBAR_HTML"
file="../../../third_party/polymer/v1_0/components-chromium/paper-toolbar/paper-toolbar.html"
type="chrome_html" />
<structure name="IDR_POLYMER_1_0_PAPER_TOOLTIP_PAPER_TOOLTIP_EXTRACTED_JS" <structure name="IDR_POLYMER_1_0_PAPER_TOOLTIP_PAPER_TOOLTIP_EXTRACTED_JS"
file="../../../third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js" file="../../../third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js"
type="chrome_html" /> type="chrome_html" />
......
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