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

Side by Side Diff: Source/devtools/front_end/documentation/DocumentationView.js

Issue 554243002: DevTools: [Documentation] fix css styles for renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/documentationView.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.View} 7 * @extends {WebInspector.View}
8 */ 8 */
9 WebInspector.DocumentationView = function() 9 WebInspector.DocumentationView = function()
10 { 10 {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 for (var i = 0; i < examples.length; ++i) { 211 for (var i = 0; i < examples.length; ++i) {
212 var example = section.createChild("div", "documentation-example"); 212 var example = section.createChild("div", "documentation-example");
213 var exampleDescription = example.createChild("div", "documentation-e xample-description-section"); 213 var exampleDescription = example.createChild("div", "documentation-e xample-description-section");
214 if (examples[i].liveUrl) { 214 if (examples[i].liveUrl) {
215 var liveUrl = exampleDescription.createChild("a", "documentation -example-link"); 215 var liveUrl = exampleDescription.createChild("a", "documentation -example-link");
216 liveUrl.classList.add("documentation-box"); 216 liveUrl.classList.add("documentation-box");
217 liveUrl.href = examples[i].liveUrl; 217 liveUrl.href = examples[i].liveUrl;
218 liveUrl.textContent = WebInspector.UIString("Example"); 218 liveUrl.textContent = WebInspector.UIString("Example");
219 } 219 }
220 exampleDescription.appendChild(this._renderBlock(examples[i].descrip tion)); 220 if (examples[i].description)
221 exampleDescription.appendChild(this._renderBlock(examples[i].des cription));
221 var code = example.createChild("div", "documentation-code"); 222 var code = example.createChild("div", "documentation-code");
222 code.classList.add("source-code"); 223 code.classList.add("source-code");
223 code.textContent = examples[i].code; 224 code.textContent = examples[i].code;
224 if (!examples[i].language) 225 if (!examples[i].language)
225 continue; 226 continue;
226 var syntaxHighlighter = new WebInspector.DOMSyntaxHighlighter(WebIns pector.DocumentationView._languageToMimeType[examples[i].language.toLowerCase()] , true); 227 var syntaxHighlighter = new WebInspector.DOMSyntaxHighlighter(WebIns pector.DocumentationView._languageToMimeType[examples[i].language.toLowerCase()] , true);
227 syntaxHighlighter.syntaxHighlightNode(code); 228 syntaxHighlighter.syntaxHighlightNode(code);
228 } 229 }
229 }, 230 },
230 231
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 function computeDescriptors(column) 341 function computeDescriptors(column)
341 { 342 {
342 var token = textEditor.tokenAtTextPosition(textSelection.startLine, column); 343 var token = textEditor.tokenAtTextPosition(textSelection.startLine, column);
343 if (!token) 344 if (!token)
344 return []; 345 return [];
345 var tokenText = textEditor.line(textSelection.startLine).substring(t oken.startColumn, token.endColumn); 346 var tokenText = textEditor.line(textSelection.startLine).substring(t oken.startColumn, token.endColumn);
346 return urlProvider.itemDescriptors(tokenText); 347 return urlProvider.itemDescriptors(tokenText);
347 } 348 }
348 } 349 }
349 } 350 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/documentationView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698