WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
61612
Clean up CSSPrimitiveValue::computeLength*
https://bugs.webkit.org/show_bug.cgi?id=61612
Summary
Clean up CSSPrimitiveValue::computeLength*
Luke Macpherson
Reported
2011-05-27 00:49:54 PDT
Clean up CSSPrimitiveValue::computeLength*
Attachments
Patch
(27.17 KB, patch)
2011-05-29 18:03 PDT
,
Luke Macpherson
no flags
Details
Formatted Diff
Diff
Patch
(21.24 KB, patch)
2011-06-10 00:38 PDT
,
Luke Macpherson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Luke Macpherson
Comment 1
2011-05-29 18:03:45 PDT
Created
attachment 95312
[details]
Patch
Luke Macpherson
Comment 2
2011-05-29 18:15:19 PDT
I anticipate abstracting out the type information in these functions will allow the removal of duplicated code in CSSStyleSelector and CSSStyleApplyProperty. Also note that this could also be done with overloading based on return type, at the expense of having per-type prototypes in the header file.
Eric Seidel (no email)
Comment 3
2011-05-29 20:11:09 PDT
Comment on
attachment 95312
[details]
Patch I'm confused. Why have the generic implementation if we have type specific ones for each of the types we use.
Luke Macpherson
Comment 4
2011-05-29 22:58:10 PDT
Hi Eric, I'm not sure if I understand you. There is no generic implementation of computeLength, just type specific implementations. All I'm doing is moving that type information out of the function name and into a type parameter. I think that's a good thing on it's own merits, but the advantage becomes that I can then have a templated class: template <typename T> class Foo { virtual void bar() { CSSPrimitiveValue v = ...; T baz = v.computeLength<typename T>(...); } } This is handy for eliminating code that would otherwise require separate implementations of Foo for each type.
Luke Macpherson
Comment 5
2011-06-09 17:16:27 PDT
Ping.
Eric Seidel (no email)
Comment 6
2011-06-09 22:39:28 PDT
Comment on
attachment 95312
[details]
Patch OK.
WebKit Review Bot
Comment 7
2011-06-09 22:41:47 PDT
Comment on
attachment 95312
[details]
Patch Rejecting
attachment 95312
[details]
from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-02', '--port..." exit_code: 2 Last 500 characters of output: 92 (offset -37 lines). Hunk #21 succeeded at 5819 (offset -37 lines). Hunk #22 succeeded at 5843 (offset -37 lines). 1 out of 22 hunks FAILED -- saving rejects to file Source/WebCore/css/CSSStyleSelector.cpp.rej patching file Source/WebCore/css/MediaQueryEvaluator.cpp patching file Source/WebCore/css/SVGCSSStyleSelector.cpp Hunk #1 succeeded at 572 (offset 2 lines). Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Eric Seidel', u'--force']" exit_code: 1 Full output:
http://queues.webkit.org/results/8823509
Luke Macpherson
Comment 8
2011-06-10 00:38:33 PDT
Created
attachment 96704
[details]
Patch
Luke Macpherson
Comment 9
2011-06-10 00:38:53 PDT
Fixed merge conflicts.
WebKit Review Bot
Comment 10
2011-06-10 11:17:33 PDT
Comment on
attachment 96704
[details]
Patch Clearing flags on attachment: 96704 Committed
r88553
: <
http://trac.webkit.org/changeset/88553
>
WebKit Review Bot
Comment 11
2011-06-10 11:17:38 PDT
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