1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 * Custom version of chrome://resources/css/tree.css.js, adding support for
9 * inverted arrow icons.
22 var HEIGHT = WIDTH / 2 + 2;
31 * @param {string} name CSS canvas identifier.
32 * @param {string} backgroundColor Background color.
33 * @param {string} strokeColor Outline color.
35 function prepareTriangle(name, backgroundColor, strokeColor) {
36 var ctx = document.getCSSCanvasContext('2d',
41 ctx.fillStyle = backgroundColor;
42 ctx.strokeStyle = strokeColor;
43 ctx.translate(MARGIN, MARGIN);
48 ctx.lineTo(WIDTH / 2, HEIGHT);
57 'tree-triangle', 'rgba(122, 122, 122, 0.6)', 'rgba(0, 0, 0, 0)');
58 prepareTriangle('tree-triangle-inverted', '#ffffff', '#ffffff');