WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 54368
Web Inspector: Wrong width displayed if inspecting h1 as block element
https://bugs.webkit.org/show_bug.cgi?id=54368
Summary
Web Inspector: Wrong width displayed if inspecting h1 as block element
Charlie Saxophone
Reported
2011-02-13 15:56:54 PST
Screen capture:
http://i.imgur.com/tkGY9.png
See #header h1 CSS width shows 300 pixels and inspected width value for #header h1 in viewport seems to inherit the #header width. As noted, a trivial issue, but tested this same quirk in firebug and it's inspector read h1 block elements okay.
Attachments
[IMAGE] Screenshot of what ToT Web Inspector tooltip renders for http://2fail4.com/test-case2-webkit.html
(84.68 KB, image/png)
2011-02-16 03:04 PST
,
Alexander Pavlov (apavlov)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2011-02-14 03:55:50 PST
@cs: can you come up with a publicly accessible test case? Either one on the Web or one attached to this bug. The values displayed in the tooltip are retrieved from the WebCore, so what you are seeing is effectively a computed width of the h1 element (offsetWidth).
Charlie Saxophone
Comment 2
2011-02-14 19:13:16 PST
@apavlov
http://2fail4.com/test-case-webkit.html
Just now tested for same quirk on Windows; same result.
Alexander Pavlov (apavlov)
Comment 3
2011-02-15 06:24:57 PST
@cs: OK, I can see the test case but it is slightly different from the one you are referring to in the screenshot. Are you concerned with the dark-blue area to the right of the black <p> rectangle containing the red text? If so, this is actually the effective right margin displayed in this manner. If you set the <p> background-color to white, you will see a light-blue box exactly 300x100 px covering the actual <p> element area (offsetWidth x offsetHeight).
Charlie Saxophone
Comment 4
2011-02-15 10:52:45 PST
http://2fail4.com/test-case2-webkit.html
I see what you mean, but look at this case; I guess I just think it's odd that the helper tag display's an element's parent's width rather than it's set width. i.e. #bd is 500 and p is 300 yet the inspector helper tag reports <element> p <width height> 500x160 rather than 300x160; maybe I just need to brush up on my CSS inheritance but I'm done beating this dead horse.
Alexander Pavlov (apavlov)
Comment 5
2011-02-16 03:03:01 PST
(In reply to
comment #4
)
>
http://2fail4.com/test-case2-webkit.html
> > I see what you mean, but look at this case; I guess I just think it's odd that the helper tag display's an element's parent's width rather than it's set width. i.e. #bd is 500 and p is 300 yet the inspector helper tag reports <element> p <width height> 500x160 rather than 300x160; maybe I just need to brush up on my CSS inheritance but I'm done beating this dead horse.
Charlie, we are definitely running different revisions of WebKit. Please see the attached screenshot for what the tip-of-tree (
r78569
) renders. Are you running the latest webkit nightly (
http://nightly.webkit.org
)?
Alexander Pavlov (apavlov)
Comment 6
2011-02-16 03:04:49 PST
Created
attachment 82606
[details]
[IMAGE] Screenshot of what ToT Web Inspector tooltip renders for
http://2fail4.com/test-case2-webkit.html
Charlie Saxophone
Comment 7
2011-02-16 13:45:22 PST
Yeah that looks like the issue; I'm not running the nightly build. Again, I originally tested the issue on Linux (ubuntu meerkat), but is the issue moot if I'm not running the nightly build? Because it looks like the issue has been resolved judging from your screenshot.
Alexander Pavlov (apavlov)
Comment 8
2011-02-17 00:43:27 PST
(In reply to
comment #7
)
> Yeah that looks like the issue; I'm not running the nightly build. Again, I originally tested the issue on Linux (ubuntu meerkat), but is the issue moot if I'm not running the nightly build? Because it looks like the issue has been resolved judging from your screenshot.
I just tested it on Lucid Lynx's Chromium daily ppa (WebKit revision 78450), and the dimensions in the tooltip are the same as in my screenshot. So I believe we can close the issue as FIXED.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug