Bug 53143

Summary: Add IntRectHash
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: PlatformAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch darin: review+

Description Alexey Proskuryakov 2011-01-25 16:35:42 PST
To use IntRect as a key in a rect->PDF cache of page previews in WebKit2.
Comment 1 Alexey Proskuryakov 2011-01-25 16:37:09 PST
Created attachment 80145 [details]
proposed patch
Comment 2 WebKit Review Bot 2011-01-25 16:40:14 PST
Attachment 80145 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/platform/graphics/IntRectHash.h:30:  Alphabetical sorting problem.  [build/include_order] [4]
Source/WebCore/platform/graphics/IntRectHash.h:37:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Source/WebCore/platform/graphics/IntRectHash.h:48:  More than one command on the same line  [whitespace/newline] [4]
Source/WebCore/platform/graphics/IntSizeHash.h:29:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Source/WebCore/platform/graphics/IntSizeHash.h:34:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 5 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Darin Adler 2011-01-25 18:18:47 PST
Comment on attachment 80145 [details]
proposed patch

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

>> Source/WebCore/platform/graphics/IntRectHash.h:30
>> +#include "IntPointHash.h"
> 
> Alphabetical sorting problem.  [build/include_order] [4]

I agree with the style bot.

>> Source/WebCore/platform/graphics/IntRectHash.h:37
>> +    template<> struct IntHash<WebCore::IntRect> {
> 
> Code inside a namespace should not be indented.  [whitespace/indent] [4]

I agree with the style bot.

>> Source/WebCore/platform/graphics/IntRectHash.h:48
>> +    template<> struct DefaultHash<WebCore::IntRect> { typedef IntHash<WebCore::IntRect> Hash; };
> 
> More than one command on the same line  [whitespace/newline] [4]

This is a false positive from the style bot.

>> Source/WebCore/platform/graphics/IntSizeHash.h:29
>> +    template<> struct IntHash<WebCore::IntSize> {
> 
> Code inside a namespace should not be indented.  [whitespace/indent] [4]

I agree with the style bot, but I’m not sure we should re-indent the whole file.

>> Source/WebCore/platform/graphics/IntSizeHash.h:34
>> +    template<> struct DefaultHash<WebCore::IntSize> { typedef IntHash<WebCore::IntSize> Hash; };
> 
> More than one command on the same line  [whitespace/newline] [4]

False positive from the style bot.
Comment 4 Alexey Proskuryakov 2011-01-25 19:30:55 PST
Committed <http://trac.webkit.org/changeset/76660>.