summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 07:29:56 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 07:29:56 +0000
commit9eed98a471a7beb59e9b9d6e968c06a464a55104 (patch)
tree87267b09d9cc87b252d77e782a7ec130120338f7 /chrome/common/extensions/docs
parent84ba691d069bddc3ec9d90dd45d57fe72930580b (diff)
downloadchromium_src-9eed98a471a7beb59e9b9d6e968c06a464a55104.zip
chromium_src-9eed98a471a7beb59e9b9d6e968c06a464a55104.tar.gz
chromium_src-9eed98a471a7beb59e9b9d6e968c06a464a55104.tar.bz2
Re-fix the flicker during extension docs render. Caused by two things:
* The extension docs are self-mutation code which is pretty confusing. The JavaScript mutates the DOM, and the result is then serialized. This result is the basis for the next JavaScript run. Weird things can therefore happen if you try and follow the pattern "set initial style at low priority, override with higher priority later". Because the high priority ends up getting serialized out. Answer: instead of overriding body style with higher priority rule to show, remove low priority rule. This should leave the serialized output in a more consistent state run to run. * The templates are rendered in several asynchronous steps because of the XHR. This means that setting the style after render() exits isn't sufficient, need to wait until entire callback chain is complete. Code was already trying to do this, but had the problem described above. Fixed. Also, did some sprucing of the table of contents. TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs')
-rwxr-xr-xchrome/common/extensions/docs/js/api_page_generator.js3
-rwxr-xr-xchrome/common/extensions/docs/js/bootstrap.js6
-rwxr-xr-xchrome/common/extensions/docs/static/toolstrip.html (renamed from chrome/common/extensions/docs/static/tool_strips.html)0
-rwxr-xr-xchrome/common/extensions/docs/static/xhr.html16
-rwxr-xr-xchrome/common/extensions/docs/template/api_template.html13
5 files changed, 11 insertions, 27 deletions
diff --git a/chrome/common/extensions/docs/js/api_page_generator.js b/chrome/common/extensions/docs/js/api_page_generator.js
index adee3db..ea0a3f0 100755
--- a/chrome/common/extensions/docs/js/api_page_generator.js
+++ b/chrome/common/extensions/docs/js/api_page_generator.js
@@ -171,7 +171,8 @@ function renderTemplate(schemaContent) {
jstProcess(input, output);
// Show.
- document.getElementsByTagName("body")[0].style.display = "block";
+ var elm = document.getElementById("hider");
+ elm.parentNode.removeChild(elm);
if (parent && parent.done)
parent.done();
diff --git a/chrome/common/extensions/docs/js/bootstrap.js b/chrome/common/extensions/docs/js/bootstrap.js
index 28f21ce..e698917 100755
--- a/chrome/common/extensions/docs/js/bootstrap.js
+++ b/chrome/common/extensions/docs/js/bootstrap.js
@@ -1,6 +1,6 @@
// Hide body content initially to minimize flashing.
-document.write('<style type="text/css">');
-document.write('body { display:none; }');
+document.write('<style id="hider" type="text/css">');
+document.write('body { display:none!important; }');
document.write('</style>');
window.onload = function() {
@@ -11,4 +11,4 @@ window.onload = function() {
navigator.userAgent.indexOf("Chrome") > -1) {
window.renderPage();
}
-} \ No newline at end of file
+}
diff --git a/chrome/common/extensions/docs/static/tool_strips.html b/chrome/common/extensions/docs/static/toolstrip.html
index fbf2248..fbf2248 100755
--- a/chrome/common/extensions/docs/static/tool_strips.html
+++ b/chrome/common/extensions/docs/static/toolstrip.html
diff --git a/chrome/common/extensions/docs/static/xhr.html b/chrome/common/extensions/docs/static/xhr.html
deleted file mode 100755
index 43be3bcc..0000000
--- a/chrome/common/extensions/docs/static/xhr.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!-- BEGIN AUTHORED CONTENT -->
-<p>The standard XMLHttpRequest object can be used to communicate with multiple origins (ie domains) from an extension. You must pre-register the domains you want to talk to in the manifest, like so:</p>
-
-<pre>{
- "name": "My First Extension",
- "version": "1.0",
- "description": "The first extension that I made.",
- "permissions": [
- "http://www.blogger.com",
- "http://*.google.com"
- ]
-}</pre>
-
-<h3>Status</h3>
-<p>Implemented, but we don't yet enforce the permissions; all origins are allowed for now.</p>
-<!-- END AUTHORED CONTENT -->
diff --git a/chrome/common/extensions/docs/template/api_template.html b/chrome/common/extensions/docs/template/api_template.html
index ca95974..b9f54c8 100755
--- a/chrome/common/extensions/docs/template/api_template.html
+++ b/chrome/common/extensions/docs/template/api_template.html
@@ -40,17 +40,16 @@
<li> <a href="overview.html">Overview</a></li>
<li>Reference
<ul>
- <li><a href="manifest.html">manifest.json</a>
- <li><a href="tool_strips.html">Toolstrips</a>
+ <li><a href="manifest.html">Manifest</a>
+ <li><a href="toolstrip.html">Toolstrips</a>
+ <li><a href="pageActions.html">Page actions</a>
<li><a href="background_pages.html">Background pages</a>
- <li><a href="page_actions.html">Page actions</a>
<li><a href="content_scripts.html">Content scripts</a>
- <li jsselect="apiModules">
- <a jscontent="name" jsvalues=".href:module + '.html'">api module</a>
- </li>
+ <li><a href="tabs.html">Tabs</a>
+ <li><a href="windows.html">Windows</a>
+ <li><a href="self.html">Self</a>
<li><a href="npapi.html">NPAPI Plugins</a>
<li><a href="packaging.html">Packaging</a>
- <li><a href="xhr.html">Getting Data With XMLHttpRequest</a></li>
<li><a href="autoupdate.html">Autoupdate</a>
</ul>
<li>Samples