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

Unified Diff: Source/devtools/front_end/CSSParser.js

Issue 208593002: DevTools: fix CSS parser to properly report last parsed chunk (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/ScriptFormatterWorker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/CSSParser.js
diff --git a/Source/devtools/front_end/CSSParser.js b/Source/devtools/front_end/CSSParser.js
index 1c379c4a791530c114c15974c2a70f6b77b871ad..5ac9f5414be471c2511c32278d4a1809c89f9b82 100644
--- a/Source/devtools/front_end/CSSParser.js
+++ b/Source/devtools/front_end/CSSParser.js
@@ -88,7 +88,7 @@ WebInspector.CSSParser.prototype = {
for (var i = 0; i < chunk.length; ++i)
this._rules.push(chunk[i]);
- if (data.index === data.total - 1)
+ if (data.isLastChunk)
this._onFinishedParsing();
this.dispatchEventToListeners(WebInspector.CSSParser.Events.RulesParsed);
},
@@ -104,7 +104,7 @@ WebInspector.CSSParser.prototype = {
}
/**
- * @typedef {{index: number, total: number, chunk: !Array.<!WebInspector.CSSParser.Rule>}}
+ * @typedef {{isLastChunk: boolean, chunk: !Array.<!WebInspector.CSSParser.Rule>}}
*/
WebInspector.CSSParser.DataChunk;
« no previous file with comments | « no previous file | Source/devtools/front_end/ScriptFormatterWorker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698