Created attachment 40073 [details] test files with <p> and <dl> elements Problem Description: The Inspect feature incorrectly includes a definition list that precedes a paragraph. Steps to Reproduce: 1. Open the background.html file in WebKit. 2. Enable Web Inspector and click the magnifying glass icon 3. Hover the mouse pointer over a paragraph that follows a definition list, e.g., the paragraph immediately preceding the "background-color" heading. Actual Result: Both the paragraph and the preceding definition list are highlighted, incorrectly showing the top margin of the paragraph above the definition list. Expected Result: The definition list should not be included. Note: Firebug gets it wrong too.
Reproduce-able with the test case - thanks! More oddities. - selecting a <dl> element only selects the first definition - selecting a <dl> element, looking at the metrics, shows height=0 - selecting a <p> element, looking at the metrics, seems to show a height that also includes the <dl> So, in some sense, the metrics and selected elements seem to be pretty close to each other, despite being wrong. Now, rename the reference.css file included to x-reference.css and reload. voila! everything seems to work as expected! The .css doesn't have any really weird stuff in it, like <p>'s and <dl>'s with crazy settings for height/top/bottom/etc. However, the <dt> and <dd> are both assigned a float: left. Which is definitely odd. Rename the .css file back to reference.css, but change float:left for dd and dt to x-float (so they will be ignored). Reload. voila! everything seems to work as expected! I think what's happening is the <p> is getting the height of the dt/dd's, because they are floating and it's the next thing in line to be formatted. At this point, I'm willing to declare - WORKSFORME
There are bugs here. The tall height of the <p> and the 0 height of the <dl>. This test case can be reduced for clarity.
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests. Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.