Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: fuzzer/res/imp/fuzzer-collapse-function-sk.html

Issue 1432783005: Add fuzzer-collapse-function-sk and demo (Closed) Base URL: https://skia.googlesource.com/buildbot@details3
Patch Set: Whitespace change Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fuzzer/res/imp/fuzzer-collapse-function-sk.html
diff --git a/fuzzer/res/imp/fuzzer-collapse-function-sk.html b/fuzzer/res/imp/fuzzer-collapse-function-sk.html
new file mode 100644
index 0000000000000000000000000000000000000000..f1d68dfa9daccbc3ae5a009c39bb47db411a6780
--- /dev/null
+++ b/fuzzer/res/imp/fuzzer-collapse-function-sk.html
@@ -0,0 +1,124 @@
+<!--
+ The common.js file must be included before this file.
+
+ This in an HTML Import-able file that contains the definition
+ of the following elements:
+
+ <fuzzer-collapse-function-sk>
+
+ To use this file import it:
+
+ <link href="/res/imp/fuzzer-collapse-function-sk.html" rel="import" />
+
+ Usage:
+
+ <fuzzer-collapse-function-sk></fuzzer-collapse-function-sk>
+
+ Properties:
+ func - The FunctionDetails object. Expected to have the following attributes:
+ functionName: String,
+ apiCount: Number,
+ binaryCount: Number,
+ byLineNumber: Array of Detail objects. See fuzzer-collapse-details-sk.html for schema.
+
+ expand: String, which should be "true" if the gui should start expanded
+
+ Methods:
+ setFunc(func) - Programmatically set the FunctionDetails object.
+ toggleLineNumbers() - Programmtically expand/collapse the line number details.
+
+ Events:
+ None.
+-->
+<link rel="import" href="/res/imp/bower_components/iron-collapse/iron-collapse.html">
+<link rel="import" href="fuzzer-collapse-details-sk.html">
+<dom-module id="fuzzer-collapse-function-sk">
+ <template>
+ <style>
+ #wrapper {
+ padding: 20px;
+ border-radius: 10px;
+ background-color: #E5E5E5;
+ color: #000000;
+ }
+
+ #wrapper div {
+ margin-top: 0px;
+ }
+
+ #indicator {
+ cursor: pointer;
+ margin: 1px 6px 1px 1px;
+ /*Make the indicator icon a bit smaller than normal*/
+ --iron-icon-height: 20px;
+ --iron-icon-width: 20px;
+ }
+
+ #indicator.toggled {
+ transform: rotate(.25turn);
+ }
+
+ ul {
+ list-style-type: none;
+ }
+ </style>
+ <div id="wrapper">
+ <div>
+ <iron-icon role="button" id="indicator" icon="icons:send" on-click="toggleLineNumbers" title="Click to toggle line number view"></iron-icon>
+ <span>
+ Function {{func.functionName}} -- {{totalCount}} outstanding fuzzes:
+ {{func.binaryCount}} binary and {{func.apiCount}} api
+ </span>
+ </div>
+ <iron-collapse id="lineNumbers">
+ <ul>
+ <template is="dom-repeat" items="{{func.byLineNumber}}" as="lineNumber">
+ <fuzzer-collapse-details-sk details="{{lineNumber}}"></fuzzer-collapse-details-sk>
+ </template>
+ </ul>
+ </iron-collapse>
+ </div>
+ </template>
+ <script>
+ Polymer({
+ is: 'fuzzer-collapse-function-sk',
+
+ properties: {
+ func: { //expected to be provided
+ type: Object,
+ value: function() {
+ return {};
+ }
+ },
+ totalCount: {
+ type: Number,
+ computed: "_getTotalCount(func)",
+ },
+ expand: {
+ type: String,
+ value: ""
+ },
+ },
+
+ ready: function() {
+ if (this.expand) {
+ this.$.lineNumbers.show();
+ this.$.indicator.toggleClass("toggled");
+ }
+ },
+
+ setFunc: function(func){
+ this.func = func;
+ },
+
+ _getTotalCount: function(func) {
+ return func.binaryCount + func.apiCount;
+ },
+
+ toggleLineNumbers: function() {
+ this.$.lineNumbers.toggle();
+ this.$.indicator.toggleClass("toggled");
+ }
+ });
+ </script>
+</dom-module>
« no previous file with comments | « fuzzer/res/imp/fuzzer-collapse-details-sk.html ('k') | fuzzer/res/imp/fuzzer-collapse-function-sk-demo.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698