Bug 70242 - Web Inspector: [Chromium] Different dimensions are reported for elements onscreen and in the Metrics pane
Summary: Web Inspector: [Chromium] Different dimensions are reported for elements onsc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
: 71974 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-17 08:23 PDT by Alexander Pavlov (apavlov)
Modified: 2011-11-11 06:34 PST (History)
14 users (show)

See Also:


Attachments
[PATCH] Suggested fix (3.06 KB, patch)
2011-10-17 08:32 PDT, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2011-10-17 08:23:12 PDT
1. Search for something on google.com, inspect the results page <body> element
2. Change the page zoom, re-select the <body> element

The element highlight tooltip and the Metrics pane display different dimensions for the <body> element.
Comment 1 Alexander Pavlov (apavlov) 2011-10-17 08:32:22 PDT
Created attachment 111269 [details]
[PATCH] Suggested fix

The patch makes use of the dimensions equal to the element's offsetWidth/offsetHeight in the tooltip.
Comment 2 WebKit Review Bot 2011-10-17 08:34:20 PDT
Attachment 111269 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/update-webkit', '--chromium']" exit_code: 2

Updating OpenSource
Current branch master is up to date.
Updating chromium port dependencies using gclient...
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Re-trying 'depot_tools/gclient sync'
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Re-trying 'depot_tools/gclient sync'
Error: Can't switch the checkout to http://v8.googlecode.com/svn/branches/3.6@9637; UUID don't match and there is local changes in /mnt/git/webkit-style-queue/Source/WebKit/chromium/v8. Delete the directory and try again.
Error: 'depot_tools/gclient sync' failed 3 tries and returned 256 at Tools/Scripts/update-webkit-chromium line 107.
Re-trying 'depot_tools/gclient sync'
No such file or directory at Tools/Scripts/update-webkit line 104.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 John Mellor 2011-10-17 08:39:16 PDT
By the way, having the different dimensions (size in [scaled] CSS pixels vs size in [unscaled] device pixels) available can be useful, especially in environments where scaling is common. Ideally the Metrics pane might have a menu (like the Styles pane) letting you switch between CSS pixels and device pixels (this setting would apply to both the Metrics pane and the element highlight tooltip).
Comment 4 Vsevolod Vlasov 2011-10-17 11:30:39 PDT
This patch looks good, but while looking into it I found two somewhat related problems:

https://bugs.webkit.org/show_bug.cgi?id=70250
https://bugs.webkit.org/show_bug.cgi?id=70252
Comment 5 Alexander Pavlov (apavlov) 2011-10-18 01:03:54 PDT
Committed r97726: <http://trac.webkit.org/changeset/97726>
Comment 6 Alexander Pavlov (apavlov) 2011-11-11 06:34:54 PST
*** Bug 71974 has been marked as a duplicate of this bug. ***