Bug 95875 - [Chromium] Regression: Web Inspector tool-tips pixellated with --force-device-scale-factor=2
Summary: [Chromium] Regression: Web Inspector tool-tips pixellated with --force-device...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Linux
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-05 11:23 PDT by Jeff Timanus
Modified: 2012-09-06 23:25 PDT (History)
4 users (show)

See Also:


Attachments
Fuzzy tool tip screen shot. (243.31 KB, image/png)
2012-09-05 11:24 PDT, Jeff Timanus
no flags Details
Patch (2.64 KB, patch)
2012-09-06 04:18 PDT, Alexander Pavlov (apavlov)
vsevik: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Timanus 2012-09-05 11:23:57 PDT
The web inspector tool-tip UI is pixelated when viewed in ChromeOS with a non-1 device scale factor applied.

This was potentially introduced by r127240. (wkbug.com/95456)  The tool-tip boundary was previously drawn via native calls to skia, but it is now rendered with a web-ui, using a canvas2d element.  Canvas2D elements do not change resolution under page scale operations, and as a result the UI becomes chunky.

Repro Steps:
  - Build ChromeOS (use_aura=1 chromeos=1)
  - Run Chrome:  out/Debug/chrome --force-compositing-mode --force-device-scale-factor=2
  - Use the web-inspector to highlight dom elements on a page.

See attached screen shot for an example.
Comment 1 Jeff Timanus 2012-09-05 11:24:29 PDT
Created attachment 162294 [details]
Fuzzy tool tip screen shot.
Comment 2 Pavel Feldman 2012-09-06 02:25:30 PDT
What would people do to canvas code in such cases? Multiply things by devicePixelRatio?
Comment 3 Alexander Pavlov (apavlov) 2012-09-06 02:55:00 PDT
(In reply to comment #2)
> What would people do to canvas code in such cases? Multiply things by devicePixelRatio?

Found a context-scaling solution: http://blog.iwalt.com/2010/08/generating-highresolution-graphics-with-html5s-canvas-element.html
Comment 4 Alexander Pavlov (apavlov) 2012-09-06 03:24:21 PDT
(In reply to comment #0)

> Repro Steps:
>   - Build ChromeOS (use_aura=1 chromeos=1)
>   - Run Chrome:  out/Debug/chrome --force-compositing-mode --force-device-scale-factor=2
>   - Use the web-inspector to highlight dom elements on a page.

Are there any other ways to reproduce the issue other than using ChromeOS? I'm failing to get the device scale factor override in desktop Chromium on Linux.
Comment 5 Alexander Pavlov (apavlov) 2012-09-06 04:18:58 PDT
Created attachment 162472 [details]
Patch
Comment 6 Jeff Timanus 2012-09-06 10:36:37 PDT
(In reply to comment #4)
> (In reply to comment #0)
> 
> > Repro Steps:
> >   - Build ChromeOS (use_aura=1 chromeos=1)
> >   - Run Chrome:  out/Debug/chrome --force-compositing-mode --force-device-scale-factor=2
> >   - Use the web-inspector to highlight dom elements on a page.
> 
> Are there any other ways to reproduce the issue other than using ChromeOS? I'm failing to get the device scale factor override in desktop Chromium on Linux.

From my understanding --force-device-scale-factor only works in ChromeOS.

I had a quick look at the patch, and I think it is the correct approach.
Comment 7 Alexander Pavlov (apavlov) 2012-09-06 23:25:53 PDT
Committed r127833: <http://trac.webkit.org/changeset/127833>