Bug 26202 - add macros for primitive values to simplify CSSStyleSelector::applyProperty
Summary: add macros for primitive values to simplify CSSStyleSelector::applyProperty
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P5 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-04 20:00 PDT by Roland Steiner
Modified: 2009-06-04 20:31 PDT (History)
0 users

See Also:


Attachments
patch - add macros for primitive values (15.56 KB, patch)
2009-06-04 20:04 PDT, Roland Steiner
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Steiner 2009-06-04 20:00:15 PDT
[separated out from bug #26198]

Like the other HANDLE_... macros used I added 2 more that also include the
handling of primitive values. Using that allows to reduce the line count quite
a bit.

NOTE: There are some CSS properties that do not query whether a value is
actually a primitive value, but do an assignment unconditionally. AFAICT, this
would result in the asignment of a default value if the passed-in value is not,
in fact, primitive. 
As these cases should only occur with malformed input anyway, and as the UA is
supposed to ignore erroneous values, I believe my changes are correct in these
cases. 

There was no change in layout test results.
Comment 1 Roland Steiner 2009-06-04 20:04:43 PDT
Created attachment 30982 [details]
patch - add macros for primitive values

see main bug description
Comment 2 Eric Seidel (no email) 2009-06-04 20:26:28 PDT
Comment on attachment 30982 [details]
patch - add macros for primitive values

Excellent!
Comment 3 Eric Seidel (no email) 2009-06-04 20:31:11 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/css/CSSStyleSelector.cpp
Committed r44449