From 76ffa000558a4d97065335fbc485f2bb6b64756c Mon Sep 17 00:00:00 2001 From: Rob Campbell Date: Thu, 3 Feb 2011 12:06:50 -0500 Subject: [PATCH] Bug 626607 - Select All on webconsole includes messages that were filtered out; r=dolske a=blocking-final+ --- .../components/console/hudservice/HUDService.jsm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/toolkit/components/console/hudservice/HUDService.jsm b/toolkit/components/console/hudservice/HUDService.jsm index 8251e551b550..ffd94a3dd1f0 100644 --- a/toolkit/components/console/hudservice/HUDService.jsm +++ b/toolkit/components/console/hudservice/HUDService.jsm @@ -2851,17 +2851,26 @@ HUD_SERVICE.prototype = // Gather up the selected items and concatenate their clipboard text. let strings = []; + let newGroup = false; for (let i = 0; i < aOutputNode.selectedCount; i++) { let item = aOutputNode.selectedItems[i]; // Add newlines between groups so that group boundaries show up in the // copied output. if (i > 0 && item.classList.contains("webconsole-new-group")) { - strings.push("\n"); + newGroup = true; } - let timestampString = ConsoleUtils.timestampString(item.timestamp); - strings.push("[" + timestampString + "] " + item.clipboardText); + // Ensure the selected item hasn't been filtered by type or string. + if (!item.classList.contains("hud-filtered-by-type") && + !item.classList.contains("hud-filtered-by-string")) { + let timestampString = ConsoleUtils.timestampString(item.timestamp); + if (newGroup) { + strings.push("\n"); + newGroup = false; + } + strings.push("[" + timestampString + "] " + item.clipboardText); + } } clipboardHelper.copyString(strings.join("\n")); }