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

Side by Side Diff: telemetry/third_party/snap-it/content_script.js

Issue 3017573002: Make sure snap_page combined iframe serialized dom
Patch Set: . Created 3 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
OLDNEW
1 /** 1 /**
2 * Send the neccessary HTMLSerializer properties back to the extension. 2 * Send the neccessary HTMLSerializer properties back to the extension.
3 * 3 *
4 * @param {HTMLSerializer} htmlSerializer The HTMLSerializer. 4 * @param {HTMLSerializer} htmlSerializer The HTMLSerializer.
5 */ 5 */
6 function sendHTMLSerializerToExtension(htmlSerializer) { 6 function sendHTMLSerializerToExtension(htmlSerializer) {
7 var result = { 7 chrome.runtime.sendMessage(htmlSerializer.asDict());
8 'html': htmlSerializer.html,
9 'frameHoles': htmlSerializer.frameHoles,
10 'idToStyleIndex': htmlSerializer.idToStyleIndex,
11 'idToStyleMap': htmlSerializer.idToStyleMap,
12 'windowHeight': htmlSerializer.windowHeight,
13 'windowWidth': htmlSerializer.windowWidth,
14 'rootId': htmlSerializer.rootId,
15 'rootStyleIndex': htmlSerializer.rootStyleIndex,
16 'pseudoElementSelectorToCSSMap':
17 htmlSerializer.pseudoElementSelectorToCSSMap,
18 'pseudoElementPlaceHolderIndex':
19 htmlSerializer.pseudoElementPlaceHolderIndex,
20 'pseudoElementTestingStyleIndex':
21 htmlSerializer.pseudoElementStyleTestingIndex,
22 'pseudoElementTestingStyleId': htmlSerializer.pseudoElementTestingStyleId,
23 'unusedId': htmlSerializer.generateId(document),
24 'frameIndex': htmlSerializer.iframeFullyQualifiedName(window)
25 };
26 chrome.runtime.sendMessage(result);
27 } 8 }
28 9
29 var htmlSerializer = new HTMLSerializer(); 10 var htmlSerializer = new HTMLSerializer();
30 htmlSerializer.processDocument(document); 11 htmlSerializer.processDocument(document);
31 htmlSerializer.fillHolesAsync(document, sendHTMLSerializerToExtension); 12 htmlSerializer.fillHolesAsync(document, sendHTMLSerializerToExtension);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698