From patchwork Thu Feb 9 21:27:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Brandt X-Patchwork-Id: 9565525 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CAB4560236 for ; Thu, 9 Feb 2017 21:30:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB34228540 for ; Thu, 9 Feb 2017 21:30:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFCAE2855A; Thu, 9 Feb 2017 21:30:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 446C128540 for ; Thu, 9 Feb 2017 21:30:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752683AbdBIV2w (ORCPT ); Thu, 9 Feb 2017 16:28:52 -0500 Received: from mga02.intel.com ([134.134.136.20]:44799 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753245AbdBIV2u (ORCPT ); Thu, 9 Feb 2017 16:28:50 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 09 Feb 2017 13:27:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,137,1484035200"; d="scan'208";a="1092904271" Received: from jasandov-mobl.amr.corp.intel.com (HELO technocore.amr.corp.intel.com) ([10.252.206.44]) by orsmga001.jf.intel.com with ESMTP; 09 Feb 2017 13:27:46 -0800 From: Todd Brandt To: linux-pm@vger.kernel.org Cc: todd.e.brandt@intel.com, rjw@rjwysocki.net, rafael.j.wysocki@intel.com, Todd Brandt Subject: [PATCH v3 4/4] AnalyzeSuspend v4.5: fix drag and zoom bug in javascript Date: Thu, 9 Feb 2017 13:27:43 -0800 Message-Id: <2a82a0c85f1339704f09e45f2da94b7e4af781cc.1486675333.git.todd.e.brandt@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Todd Brandt --- v2 changes: - added fixes since initial upstream attempt scripts/analyze_suspend.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/analyze_suspend.py b/scripts/analyze_suspend.py index 383df79..20cdb2b 100755 --- a/scripts/analyze_suspend.py +++ b/scripts/analyze_suspend.py @@ -3846,6 +3846,7 @@ def addScriptCode(hf, testruns): ' function zoomTimeline() {\n'\ ' var dmesg = document.getElementById("dmesg");\n'\ ' var zoombox = document.getElementById("dmesgzoombox");\n'\ + ' var left = zoombox.scrollLeft;\n'\ ' var val = parseFloat(dmesg.style.width);\n'\ ' var newval = 100;\n'\ ' var sh = window.outerWidth / 2;\n'\ @@ -3853,12 +3854,12 @@ def addScriptCode(hf, testruns): ' newval = val * 1.2;\n'\ ' if(newval > 910034) newval = 910034;\n'\ ' dmesg.style.width = newval+"%";\n'\ - ' zoombox.scrollLeft = ((zoombox.scrollLeft + sh) * newval / val) - sh;\n'\ + ' zoombox.scrollLeft = ((left + sh) * newval / val) - sh;\n'\ ' } else if (this.id == "zoomout") {\n'\ ' newval = val / 1.2;\n'\ ' if(newval < 100) newval = 100;\n'\ ' dmesg.style.width = newval+"%";\n'\ - ' zoombox.scrollLeft = ((zoombox.scrollLeft + sh) * newval / val) - sh;\n'\ + ' zoombox.scrollLeft = ((left + sh) * newval / val) - sh;\n'\ ' } else {\n'\ ' zoombox.scrollLeft = 0;\n'\ ' dmesg.style.width = "100%";\n'\ @@ -4068,7 +4069,7 @@ def addScriptCode(hf, testruns): ' window.addEventListener("load", function () {\n'\ ' var dmesg = document.getElementById("dmesg");\n'\ ' dmesg.style.width = "100%"\n'\ - ' document.onmousedown = onMouseDown;\n'\ + ' dmesg.onmousedown = onMouseDown;\n'\ ' document.onmouseup = onMouseUp;\n'\ ' document.onkeypress = onKeyPress;\n'\ ' document.getElementById("zoomin").onclick = zoomTimeline;\n'\