Bug 112371 - Web Inspector: Paint rectangles shown on hover over Timeline's paint records occasionally have wrong offsets
Summary: Web Inspector: Paint rectangles shown on hover over Timeline's paint records ...
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: Andrey Kosyakov
URL:
Keywords:
Depends on: 112787
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-14 11:35 PDT by Andrey Kosyakov
Modified: 2013-03-21 09:00 PDT (History)
14 users (show)

See Also:


Attachments
Patch (10.75 KB, patch)
2013-03-18 07:16 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (17.61 KB, patch)
2013-03-19 11:20 PDT, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (12.34 KB, patch)
2013-03-20 04:39 PDT, Andrey Kosyakov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2013-03-14 11:35:30 PDT
1. Navigate to www.ign.com.
2. Open Web Inspector, start timeline record.
3. Reload the page.
4. Let it run for a few seconds, then stop timeline.
5. Filter paint records, hover over them.
6. Note many paint rectangles are shown at top left corner (0, 0)

This apparently happens for sub-frames.
Comment 1 Andrey Kosyakov 2013-03-18 07:16:24 PDT
Created attachment 193555 [details]
Patch
Comment 2 Pavel Feldman 2013-03-19 10:03:07 PDT
Comment on attachment 193555 [details]
Patch

A test?
Comment 3 Andrey Kosyakov 2013-03-19 11:20:25 PDT
Created attachment 193874 [details]
Patch
Comment 4 Pavel Feldman 2013-03-20 00:46:07 PDT
Comment on attachment 193874 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=193874&action=review

> Source/WebCore/inspector/InspectorInstrumentation.cpp:538
> +void InspectorInstrumentation::didPaintImpl(InstrumentingAgents*  instrumentingAgents, Frame* frame, GraphicsContext* context, const LayoutRect& rect)

Extra space here.

> Source/WebCore/inspector/InspectorTimelineAgent.cpp:304
> +    LayoutRect rectInRootCoordinates = frame->view()->contentsToRootView(pixelSnappedIntRect(rect));

So that's the actual fix? Looks like two changes in one patch to me.
Comment 5 Andrey Kosyakov 2013-03-20 04:39:31 PDT
Created attachment 194023 [details]
Patch
Comment 6 Simon Fraser (smfr) 2013-03-20 09:24:24 PDT
Comment on attachment 194023 [details]
Patch

A good testcase for this would test highlight rects inside an iframe which is css-transformed.
Comment 7 Andrey Kosyakov 2013-03-21 08:37:15 PDT
(In reply to comment #6)
> (From update of attachment 194023 [details])
> A good testcase for this would test highlight rects inside an iframe which is css-transformed.

Thanks, but unfortunately we're not there yet -- transformed layers are off, too. I'm working on it right now, though (see bug 112919)
Comment 8 Andrey Kosyakov 2013-03-21 09:00:36 PDT
Committed r146476: <http://trac.webkit.org/changeset/146476>