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

Unified Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 798963002: Only populate line number in case parsing synchronously. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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: Source/core/xml/parser/XMLDocumentParser.cpp
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
index 531e397b7eddf871ba1add52cc4876c270b0355e..52f2c1fce15bf4520ff6ff3dccc9996b643dc919 100644
--- a/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -1507,6 +1507,11 @@ xmlDocPtr xmlDocPtrForString(ResourceFetcher* fetcher, const String& source, con
return xmlReadMemory(input.data(), input.size(), url.latin1().data(), input.encoding(), XSLT_PARSE_OPTIONS);
}
+bool XMLDocumentParser::hasLineNumber() const
+{
+ return true;
rmcilroy 2014/12/12 14:18:31 maybe return isParsing()?
pfeldman 2014/12/12 17:21:06 Done, all necessary checks are in ScriptableDocume
+}
+
OrdinalNumber XMLDocumentParser::lineNumber() const
{
return OrdinalNumber::fromOneBasedInt(context() ? context()->input->line : 1);
« Source/core/html/parser/HTMLDocumentParser.cpp ('K') | « Source/core/xml/parser/XMLDocumentParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698