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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp

Issue 2740643002: DevTools: expose length of the stylesheet content in protocol (Closed)
Patch Set: Created 3 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 | third_party/WebKit/Source/core/inspector/browser_protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
index c80ddf165bcd21eece129e4ce907512da9ba45d1..23f71230b5e47a8b14c007336ea6290aa8c89064 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
@@ -1423,7 +1423,8 @@ InspectorStyleSheet::buildObjectForStyleSheetInfo() {
Document* document = styleSheet->ownerDocument();
LocalFrame* frame = document ? document->frame() : nullptr;
-
+ String text;
+ getText(&text);
std::unique_ptr<protocol::CSS::CSSStyleSheetHeader> result =
protocol::CSS::CSSStyleSheetHeader::create()
.setStyleSheetId(id())
@@ -1437,6 +1438,7 @@ InspectorStyleSheet::buildObjectForStyleSheetInfo() {
styleSheet->startPositionInSource().m_line.zeroBasedInt())
.setStartColumn(
styleSheet->startPositionInSource().m_column.zeroBasedInt())
+ .setLength(text.length())
.build();
if (hasSourceURL())
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/browser_protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698