From 70c566098b947978fa53e168199f23bd06e8b993 Mon Sep 17 00:00:00 2001 From: Brzezinski Date: Sun, 7 Jun 2015 15:03:53 -0500 Subject: [PATCH] Basic optimizations, removed redundancies Optimized CSS properties, removed redundancies, added closing tags to HTML tags (could cause potential bugs in web browsers) --- site/blog/feed.xml | 2 - site/docs/build-ref.html | 98 +++---- site/docs/query.html | 248 +++++++++--------- site/index.html | 8 +- .../build/docgen/templates/be-header.html | 2 +- .../lib/webstatusserver/static/index.html | 2 +- .../lib/webstatusserver/static/test.html | 4 +- .../build/lib/webstatusserver/static/test.js | 8 +- third_party/javascript/d3/d3-js.js | 5 +- third_party/py/mock/html/_static/adctheme.css | 136 +++++----- third_party/py/mock/html/_static/basic.css | 4 +- third_party/py/mock/html/_static/doctools.js | 9 +- .../py/mock/html/_static/searchtools.js | 16 +- 13 files changed, 270 insertions(+), 272 deletions(-) diff --git a/site/blog/feed.xml b/site/blog/feed.xml index 62f2dc7479b7a4..04086cd5f98506 100644 --- a/site/blog/feed.xml +++ b/site/blog/feed.xml @@ -1,5 +1,3 @@ ---- ---- diff --git a/site/docs/build-ref.html b/site/docs/build-ref.html index 1d849126f97582..70b791b5dc367c 100644 --- a/site/docs/build-ref.html +++ b/site/docs/build-ref.html @@ -223,91 +223,91 @@

Targets

viewBox="0.00 0.00 581.89 188.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> G1 - + Target - + Target Rule - + Rule Target->Rule - - + + File - + File Target->File - - + + Package group - + Package group Target->Package group - - + + cc_library - + cc_library Rule->cc_library - - + + java_test - + java_test Rule->java_test - - + + ... - + ... Rule->... - - + + Source - + Source File->Source - - + + Generated - + Generated File->Generated - - + + @@ -631,81 +631,81 @@

Rules

viewBox="0.00 0.00 156.50 246.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> G1 - + r1 - + rule s1 - + in r1->s1 - - + + s2 - + in r1->s2 - - + + s3 - + in r1->s3 - - + + r2 - + rule r2->r1 - - + + s4 - + in r2->s4 - - + + o1 - + out o1->r1 - - + + o2 - + out o2->r2 - - + + diff --git a/site/docs/query.html b/site/docs/query.html index bd5901d00a3416..381600246bff34 100644 --- a/site/docs/query.html +++ b/site/docs/query.html @@ -733,113 +733,113 @@

Path operators: somepath, allpaths

viewBox="0.00 0.00 153.40 288.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> somepath1 - + n1 - + n2 - + n1->n2 - - + + n3 - + n2->n3 - - + + n10 - + n2->n10 - - + + n3->n10 - - + + n4 - + E n5 - + n6 - + n5->n6 - - + + n6->n4 - - + + n9 - + n6->n9 - - + + n7 - + S1 n7->n2 - - + + n7->n5 - - + + n8 - + S2 n8->n6 - - + + n10->n4 - - + + n11 - + n10->n11 - - + + @@ -850,113 +850,113 @@

Path operators: somepath, allpaths

viewBox="0.00 0.00 153.40 288.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> somepath2 - + n1 - + n2 - + n1->n2 - - + + n3 - + n2->n3 - - + + n10 - + n2->n10 - - + + n3->n10 - - + + n4 - + E n5 - + n6 - + n5->n6 - - + + n6->n4 - - + + n9 - + n6->n9 - - + + n7 - + S1 n7->n2 - - + + n7->n5 - - + + n8 - + S2 n8->n6 - - + + n10->n4 - - + + n11 - + n10->n11 - - + + @@ -967,113 +967,113 @@

Path operators: somepath, allpaths

viewBox="0.00 0.00 153.40 288.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> allpaths - + n1 - + n2 - + n1->n2 - - + + n3 - + n2->n3 - - + + n10 - + n2->n10 - - + + n3->n10 - - + + n4 - + E n5 - + n6 - + n5->n6 - - + + n6->n4 - - + + n9 - + n6->n9 - - + + n7 - + S1 n7->n2 - - + + n7->n5 - - + + n8 - + S2 n8->n6 - - + + n10->n4 - - + + n11 - + n10->n11 - - + + @@ -1516,56 +1516,56 @@

Print the label of each target, in rank order

viewBox="0.00 0.00 169.00 260.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> mygraph - + //a:a - + //a:a //a:a.cc - + //a:a.cc //a:a->//a:a.cc - - + + //b:b - + //b:b //b:b->//a:a - - + + //b:b.cc - + //b:b.cc //b:b->//b:b.cc - - + + //c:c - + //c:c //c:c->//a:a - - + + //c:c->//b:b - - + + diff --git a/site/index.html b/site/index.html index 70ffa8e7fba2e5..7ad2c9e87ebb15 100644 --- a/site/index.html +++ b/site/index.html @@ -45,19 +45,19 @@

Flexible

Get Started

-

Install Bazel

+

Install Bazel

See our Installation Guide to learn how to download and install Bazel.

-

Run Bazel

+

Run Bazel

See our Getting Started Guide to learn how to write a BUILD file and run Bazel .

-

Bazel Commands

+

Bazel Commands

See our User Manual to learn about the Bazel command-line tool.

-

Learn More

+

Learn More

Take a look at our documentation and read our FAQ.

diff --git a/src/main/java/com/google/devtools/build/docgen/templates/be-header.html b/src/main/java/com/google/devtools/build/docgen/templates/be-header.html index 1a9593c99c4712..a8bb48ad43e985 100644 --- a/src/main/java/com/google/devtools/build/docgen/templates/be-header.html +++ b/src/main/java/com/google/devtools/build/docgen/templates/be-header.html @@ -191,4 +191,4 @@

Implicit output targets

In this way, the build tool may hide certain implementation details of how it does its job. This is explained more fully in the BUILD Concept Reference. -

+

\ No newline at end of file diff --git a/src/main/java/com/google/devtools/build/lib/webstatusserver/static/index.html b/src/main/java/com/google/devtools/build/lib/webstatusserver/static/index.html index f57bc30c8e446c..827be8a6d5862f 100644 --- a/src/main/java/com/google/devtools/build/lib/webstatusserver/static/index.html +++ b/src/main/java/com/google/devtools/build/lib/webstatusserver/static/index.html @@ -1,7 +1,7 @@ Bazel web server - + diff --git a/src/main/java/com/google/devtools/build/lib/webstatusserver/static/test.html b/src/main/java/com/google/devtools/build/lib/webstatusserver/static/test.html index 04a6fb712c57a0..2d0af245a11ae9 100644 --- a/src/main/java/com/google/devtools/build/lib/webstatusserver/static/test.html +++ b/src/main/java/com/google/devtools/build/lib/webstatusserver/static/test.html @@ -1,6 +1,6 @@ Tests Result Page - + @@ -13,7 +13,7 @@

Bazel web status server


- + passed diff --git a/src/main/java/com/google/devtools/build/lib/webstatusserver/static/test.js b/src/main/java/com/google/devtools/build/lib/webstatusserver/static/test.js index 406dcabd55f03a..600015f6e43041 100644 --- a/src/main/java/com/google/devtools/build/lib/webstatusserver/static/test.js +++ b/src/main/java/com/google/devtools/build/lib/webstatusserver/static/test.js @@ -56,7 +56,7 @@ function renderInfo(info) { $('#testInfo').empty(); var data = [ ['Targets: ', info['targets']], - ['Started at: ', showDate(new Date(info['startTime']))], + ['Started at: ', showDate(new Date(info['startTime']))] ]; if (info['finished']) { data.push(['Finished at: ', showDate(new Date(info['endTime']))]); @@ -264,8 +264,8 @@ function renderDetails(tests, predicate) { } function toggleVisibility() { - $('#testDetails > [show=false]').hide(); - $('#testDetails > [show=true]').show(); + $('#testDetails').find('> [show=false]').hide(); + $('#tes').find('> [show=true] w=true]').show(); $('[toggle=on]').siblings('[show=false]').hide(); $('[toggle=on]').siblings('[show=true]').show(); } @@ -358,7 +358,7 @@ function updateVisibleCases() { if (textFilterActive()) { // expand nodes to save some clicking - if user searched for something that // is leaf of the tree, she definitely wants to see it - $('#testDetails > [show=true]').find('[toggle=off]').click(); + $('#testDetails').find('> [show=true]').find('[toggle=off]').click(); } } diff --git a/third_party/javascript/d3/d3-js.js b/third_party/javascript/d3/d3-js.js index 31c211604c742b..d162656a09f24a 100644 --- a/third_party/javascript/d3/d3-js.js +++ b/third_party/javascript/d3/d3-js.js @@ -2250,7 +2250,10 @@ d3 = function() { x: function(x) { return x.toString(16); }, - X: function(x) { + /** + * @return {string} + */ + X: function(x) { return x.toString(16).toUpperCase(); }, g: function(x, p) { diff --git a/third_party/py/mock/html/_static/adctheme.css b/third_party/py/mock/html/_static/adctheme.css index 60395bcefb4c2b..303d8ba23bea6d 100644 --- a/third_party/py/mock/html/_static/adctheme.css +++ b/third_party/py/mock/html/_static/adctheme.css @@ -196,9 +196,7 @@ ul.search { ul.search li { padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; + background: url(file.png) no-repeat 0 7px; } ul.search li a { @@ -639,10 +637,8 @@ dl.function dt { } ul { -list-style-image:none; -list-style-position:outside; -list-style-type:square; -margin:0 0 0 30px; + list-style: square outside none; + margin:0 0 0 30px; padding:0 0 12px 6px; } #docstitle { @@ -663,95 +659,95 @@ padding:0 0 12px 6px; font-size: 15px; } #header { -height:45px; -left:0; -position:absolute; -right:0; -top:36px; -z-index:900; + height:45px; + left:0; + position:absolute; + right:0; + top:36px; + z-index:900; } #header h1 { -font-size:10pt; -margin:0; -padding:5px 0 0 10px; -text-shadow:0 1px 0 #D5D5D5; -white-space:nowrap; + font-size:10pt; + margin:0; + padding:5px 0 0 10px; + text-shadow:0 1px 0 #D5D5D5; + white-space:nowrap; } h1 { --x-system-font:none; -color:#000000; -font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; -font-size:30px; -font-size-adjust:none; -font-stretch:normal; -font-style:normal; -font-variant:normal; -font-weight:bold; -line-height:normal; -margin-bottom:25px; -margin-top:1em; + -x-system-font:none; + color:#000000; + font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + font-size:30px; + font-size-adjust:none; + font-stretch:normal; + font-style:normal; + font-variant:normal; + font-weight:bold; + line-height:normal; + margin-bottom:25px; + margin-top:1em; } .footer { -border-top:1px solid #DDDDDD; -clear:both; -padding-top:9px; -width:100%; -font-size:10px; + border-top:1px solid #DDDDDD; + clear:both; + padding-top:9px; + width:100%; + font-size:10px; } p { --x-system-font:none; -font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; -font-size:12px; -font-size-adjust:none; -font-stretch:normal; -font-style:normal; -font-variant:normal; -font-weight:normal; -line-height:normal; -margin-bottom:10px; -margin-top:0; + -x-system-font:none; + font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + font-size:12px; + font-size-adjust:none; + font-stretch:normal; + font-style:normal; + font-variant:normal; + font-weight:normal; + line-height:normal; + margin-bottom:10px; + margin-top:0; } h2 { -border-bottom:1px solid #919699; -color:#000000; -font-size:24px; -margin-top:2.5em; -padding-bottom:2px; + border-bottom:1px solid #919699; + color:#000000; + font-size:24px; + margin-top:2.5em; + padding-bottom:2px; } a:link:hover { -color:#093D92; -text-decoration:underline; + color:#093D92; + text-decoration:underline; } a:link { -color:#093D92; -text-decoration:none; + color:#093D92; + text-decoration:none; } - ol { -list-style-position:outside; -list-style-type:decimal; -margin:0 0 0 30px; -padding:0 0 12px 6px; + list-style: decimal outside; + margin:0 0 0 30px; + padding:0 0 12px 6px; } + li { -margin-top:7px; -font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; -font-size:12px; -font-size-adjust:none; -font-stretch:normal; -font-style:normal; -font-variant:normal; -font-weight:normal; -line-height:normal; + margin-top:7px; + font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + font-size:12px; + font-size-adjust:none; + font-stretch:normal; + font-style:normal; + font-variant:normal; + font-weight:normal; + line-height:normal; } + li p { -margin-top:8px; + margin-top:8px; } \ No newline at end of file diff --git a/third_party/py/mock/html/_static/basic.css b/third_party/py/mock/html/_static/basic.css index 43e8bafaf35879..a8e20dfc4a7619 100644 --- a/third_party/py/mock/html/_static/basic.css +++ b/third_party/py/mock/html/_static/basic.css @@ -100,9 +100,7 @@ ul.search { ul.search li { padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; + background: url(file.png) no-repeat 0 7px; } ul.search li a { diff --git a/third_party/py/mock/html/_static/doctools.js b/third_party/py/mock/html/_static/doctools.js index d4619fdfb10d95..b9399d82bd61f4 100644 --- a/third_party/py/mock/html/_static/doctools.js +++ b/third_party/py/mock/html/_static/doctools.js @@ -32,7 +32,7 @@ if (!window.console || !console.firebug) { */ jQuery.urldecode = function(x) { return decodeURIComponent(x).replace(/\+/g, ' '); -} +}; /** * small helper function to urlencode strings @@ -118,7 +118,10 @@ var Documentation = { * i18n support */ TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + /** + * @return {number} + */ + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, LOCALE : 'unknown', // gettext and ngettext don't access this so that the functions @@ -213,7 +216,7 @@ var Documentation = { * helper function to hide the search marks again */ hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); + $('#searchbo').find('.highlight-link').fadeOut(300); $('span.highlighted').removeClass('highlighted'); }, diff --git a/third_party/py/mock/html/_static/searchtools.js b/third_party/py/mock/html/_static/searchtools.js index 663be4c909bac8..c16978c18addd1 100644 --- a/third_party/py/mock/html/_static/searchtools.js +++ b/third_party/py/mock/html/_static/searchtools.js @@ -34,7 +34,7 @@ jQuery.makeSearchSummary = function(text, keywords, hlwords) { rv = rv.highlightText(this, 'highlighted'); }); return rv; -} +}; /** @@ -217,7 +217,7 @@ var Stemmer = function() { w = firstch.toLowerCase() + w.substr(1); return w; } -} +}; /** @@ -275,8 +275,8 @@ var Search = { Search.dots.text(dotString); if (Search._pulse_status > -1) window.setTimeout(pulse, 500); - }; - pulse(); + } + pulse(); }, /** @@ -334,8 +334,8 @@ var Search = { // only add if not already in the list if (!$.contains(toAppend, word)) toAppend.push(word); - }; - var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); + } + var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); // console.debug('SEARCH: searching for:'); // console.info('required: ', searchterms); @@ -357,7 +357,7 @@ var Search = { // lookup as object for (var i = 0; i < objectterms.length; i++) { var others = [].concat(objectterms.slice(0,i), - objectterms.slice(i+1, objectterms.length)) + objectterms.slice(i+1, objectterms.length)); var results = this.performObjectSearch(objectterms[i], others); // Assume first word is most likely to be the object, // other words more likely to be in description. @@ -553,7 +553,7 @@ var Search = { return [importantResults, objectResults, unimportantResults] } -} +}; $(document).ready(function() { Search.init();