Bug 78447 - Web Inspector: open the inspector while on Kickstarter.com shows fonts that are not used
Summary: Web Inspector: open the inspector while on Kickstarter.com shows fonts that a...
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: Timothy Hatcher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-12 18:17 PST by Timothy Hatcher
Modified: 2012-02-14 10:50 PST (History)
12 users (show)

See Also:


Attachments
Proposed Change (3.84 KB, patch)
2012-02-12 20:05 PST, Timothy Hatcher
pfeldman: review-
Details | Formatted Diff | Diff
Proposed Change (5.85 KB, patch)
2012-02-14 07:43 PST, Timothy Hatcher
bweinstein: review+
timothy: commit-queue?
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2012-02-12 18:17:59 PST
The fonts listed on Kickstarter are never used and are never downloaded. The same happens if you disable images and open the inspector, since we return a set of CachedResources that never loaded.

I have a patch.
Comment 1 Timothy Hatcher 2012-02-12 20:05:31 PST
Created attachment 126704 [details]
Proposed Change
Comment 2 Timothy Hatcher 2012-02-12 20:07:57 PST
Note: the fonts and images don't show up if you load the page with the Inspector open.
Comment 3 Pavel Feldman 2012-02-13 00:09:44 PST
Comment on attachment 126704 [details]
Proposed Change

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

> Source/WebCore/inspector/InspectorPageAgent.cpp:767
> +                continue;

I think we can test this one.
Comment 4 Timothy Hatcher 2012-02-13 07:33:49 PST
(In reply to comment #3)
> (From update of attachment 126704 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=126704&action=review
> 
> > Source/WebCore/inspector/InspectorPageAgent.cpp:767
> > +                continue;
> 
> I think we can test this one.

Can you point me to a similar test?
Comment 5 Timothy Hatcher 2012-02-14 07:43:38 PST
Created attachment 126978 [details]
Proposed Change
Comment 6 WebKit Review Bot 2012-02-14 07:45:20 PST
Attachment 126978 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/update-webkit']" exit_code: 9

Updating OpenSource
First, rewinding head to replay your work on top of it...
Applying: [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets
Using index info to reconstruct a base tree...
<stdin>:1578: trailing whitespace.
        
<stdin>:1647: trailing whitespace.
    
<stdin>:1657: trailing whitespace.
    
<stdin>:1672: trailing whitespace.
        return 0;        
<stdin>:1674: trailing whitespace.
    
warning: squelched 7 whitespace errors
warning: 12 lines add whitespace errors.
Falling back to patching base and 3-way merge...
warning: too many files (created: 168776 deleted: 3), skipping inexact rename detection
Auto-merging LayoutTests/ChangeLog
CONFLICT (content): Merge conflict in LayoutTests/ChangeLog
Auto-merging Source/WebCore/ChangeLog
CONFLICT (content): Merge conflict in Source/WebCore/ChangeLog
Auto-merging Source/WebKit2/ChangeLog
CONFLICT (content): Merge conflict in Source/WebKit2/ChangeLog
Auto-merging Tools/ChangeLog
CONFLICT (content): Merge conflict in Tools/ChangeLog
Failed to merge in the changes.
Patch failed at 0001 [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

rebase refs/remotes/origin/master: command returned error: 1

Died at Tools/Scripts/update-webkit line 164.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Pavel Feldman 2012-02-14 07:51:25 PST
Comment on attachment 126978 [details]
Proposed Change

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

> LayoutTests/inspector/protocol/page-agent-expected.txt:-80
> -                    type : "Font"

I think this change is worth a real test + original protocol test is worth a valid font. Otherwise two bugs will give us the same result.
Comment 8 Timothy Hatcher 2012-02-14 09:43:53 PST
(In reply to comment #7)
> (From update of attachment 126978 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=126978&action=review
> 
> > LayoutTests/inspector/protocol/page-agent-expected.txt:-80
> > -                    type : "Font"
> 
> I think this change is worth a real test + original protocol test is worth a valid font. Otherwise two bugs will give us the same result.

This uses real fonts. The original test has 2 fonts. With this change only 1 is correctly shown. I don't see the benefit of having another test.
Comment 9 Brian Weinstein 2012-02-14 09:48:53 PST
Comment on attachment 126978 [details]
Proposed Change

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

> LayoutTests/ChangeLog:10
> +        * inspector/protocol/page-agent-expected.txt: Updated.

It would be nice to state a little more clearly here what is being updated about the test, because it is a bit confusing from the diff. The fact that there is another font shown in the results that was loaded would be good to mention.

> Source/WebCore/inspector/InspectorPageAgent.cpp:412
>          result.append(it->second.get());

This should just use cachedResource.
Comment 10 Timothy Hatcher 2012-02-14 10:50:34 PST
Fixed in r107715.