WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
72924
CSSValue: reorder ClassType enum to allow faster comparisons, add COMPILE_ASSERT on class size.
https://bugs.webkit.org/show_bug.cgi?id=72924
Summary
CSSValue: reorder ClassType enum to allow faster comparisons, add COMPILE_ASS...
Luke Macpherson
Reported
2011-11-21 18:06:38 PST
CSSValue: reorder ClassType enum to allow faster comparisons, add COMPILE_ASSERT on class size.
Attachments
Patch
(6.63 KB, patch)
2011-11-21 18:20 PST
,
Luke Macpherson
no flags
Details
Formatted Diff
Diff
Patch
(6.64 KB, patch)
2011-11-22 15:52 PST
,
Luke Macpherson
no flags
Details
Formatted Diff
Diff
Patch
(6.99 KB, patch)
2011-11-22 22:20 PST
,
Luke Macpherson
no flags
Details
Formatted Diff
Diff
Patch for landing
(7.05 KB, patch)
2011-11-23 19:52 PST
,
Luke Macpherson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Luke Macpherson
Comment 1
2011-11-21 18:20:01 PST
Created
attachment 116162
[details]
Patch
Andreas Kling
Comment 2
2011-11-22 05:26:14 PST
Comment on
attachment 116162
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116162&action=review
Good idea, I'd like one more iteration though.
> Source/WebCore/css/CSSValue.h:97 > + /* Primitive class types must appear before PrimitiveClass */
Coding style, we use C++ comments (//), and end them in periods.
> Source/WebCore/css/CSSValue.h:103 > + /* Image generator classes */
Ditto.
> Source/WebCore/css/CSSValue.h:109 > + /* Timing function classes */
Ditto.
> Source/WebCore/css/CSSValue.h:114 > + /* Other class types */
Ditto.
> Source/WebCore/css/CSSValue.h:139 > + /* List class types must appear after ValueListClass */
Ditto.
> Source/WebCore/css/CSSValue.h:145 > + /* Do not append non-list class types here */
Ditto.
> Source/WebCore/css/CSSValue.h:157 > + COMPILE_ASSERT((sizeof(CSSValue) - sizeof(RefCounted<CSSValue>)) <= 4, CSS_value_packs_into_four_bytes);
This should be in CSSValue.cpp instead.
> Source/WebCore/css/CSSValue.h:173 > - unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitTypes > + unsigned char m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitTypes
I suppose you're making this change because of MSVC? At least note it in the ChangeLog as it's unrelated to the rest of the patch.
Luke Macpherson
Comment 3
2011-11-22 15:52:12 PST
Created
attachment 116285
[details]
Patch
Luke Macpherson
Comment 4
2011-11-22 15:57:05 PST
Patch addresses those issues. I've changed back from unsigned char to unsigned - since we are only trying to pack 15 bits into 32 (behavior due to extending the 32-bit RefPtr), we probably don't care too much that MSVC doesn't pack it tightly.
Luke Macpherson
Comment 5
2011-11-22 15:59:40 PST
(In reply to
comment #4
)
> Patch addresses those issues. I've changed back from unsigned char to unsigned - since we are only trying to pack 15 bits into 32 (behavior due to extending the 32-bit RefPtr), we probably don't care too much that MSVC doesn't pack it tightly.
s/RefPtr/RefCounted
Luke Macpherson
Comment 6
2011-11-22 22:20:25 PST
Created
attachment 116317
[details]
Patch
Andreas Kling
Comment 7
2011-11-23 03:26:18 PST
Comment on
attachment 116317
[details]
Patch r=me
WebKit Review Bot
Comment 8
2011-11-23 15:08:28 PST
Comment on
attachment 116317
[details]
Patch Rejecting
attachment 116317
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: Value.o CXX(target) out/Debug/obj.target/webcore_remaining/Source/WebCore/css/CSSValue.o CXX(target) out/Debug/obj.target/webcore_remaining/Source/WebCore/css/CSSValueList.o Source/WebCore/css/CSSValue.cpp:62: error: size of array 'CSS_value_packs_into_four_bytes' is negative CXX(target) out/Debug/obj.target/webcore_remaining/Source/WebCore/css/CSSWrapShapes.o make: *** [out/Debug/obj.target/webcore_remaining/Source/WebCore/css/CSSValue.o] Error 1 make: *** Waiting for unfinished jobs.... Full output:
http://queues.webkit.org/results/10645027
Luke Macpherson
Comment 9
2011-11-23 19:52:35 PST
Created
attachment 116472
[details]
Patch for landing
WebKit Review Bot
Comment 10
2011-11-23 22:04:16 PST
Comment on
attachment 116472
[details]
Patch for landing Clearing flags on attachment: 116472 Committed
r101119
: <
http://trac.webkit.org/changeset/101119
>
WebKit Review Bot
Comment 11
2011-11-23 22:04:20 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug