WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137243
Generalize is<>() / downcast<>() support to all types
https://bugs.webkit.org/show_bug.cgi?id=137243
Summary
Generalize is<>() / downcast<>() support to all types
Chris Dumez
Reported
2014-09-29 19:59:22 PDT
Generalize is<>() / downcast<>() support to all types, not just Nodes.
Attachments
Patch
(87.46 KB, patch)
2014-09-29 21:25 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(89.27 KB, patch)
2014-09-29 22:15 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(89.45 KB, patch)
2014-09-29 22:18 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(89.56 KB, patch)
2014-09-30 06:48 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(89.39 KB, patch)
2014-09-30 13:10 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(90.67 KB, patch)
2014-09-30 13:48 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2014-09-29 21:25:39 PDT
Created
attachment 238907
[details]
Patch
WebKit Commit Bot
Comment 2
2014-09-29 21:26:49 PDT
Attachment 238907
[details]
did not pass style-queue: ERROR: Source/WebCore/html/HTMLElement.h:159: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/mathml/MathMLElement.h:86: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 67 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 3
2014-09-29 22:15:24 PDT
Created
attachment 238910
[details]
Patch
WebKit Commit Bot
Comment 4
2014-09-29 22:17:32 PDT
Attachment 238910
[details]
did not pass style-queue: ERROR: Source/WebCore/html/HTMLElement.h:159: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/mathml/MathMLElement.h:86: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 69 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 5
2014-09-29 22:18:38 PDT
Created
attachment 238911
[details]
Patch
WebKit Commit Bot
Comment 6
2014-09-29 22:22:30 PDT
Attachment 238911
[details]
did not pass style-queue: ERROR: Source/WebCore/html/HTMLElement.h:159: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/mathml/MathMLElement.h:86: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 69 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 7
2014-09-30 06:48:22 PDT
Created
attachment 238923
[details]
Patch
WebKit Commit Bot
Comment 8
2014-09-30 06:49:36 PDT
Attachment 238923
[details]
did not pass style-queue: ERROR: Source/WebCore/html/HTMLElement.h:159: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/mathml/MathMLElement.h:86: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 69 files If any of these errors are false positives, please file a bug against check-webkit-style.
Benjamin Poulain
Comment 9
2014-09-30 12:33:56 PDT
Comment on
attachment 238923
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=238923&action=review
> Source/WebCore/bindings/js/JSEventListener.cpp:136 > - if (scriptExecutionContext->isWorkerGlobalScope()) { > + if (is<WorkerGlobalScope>(scriptExecutionContext)) { > bool terminatorCausedException = (exec->hadException() && isTerminatedExecutionException(exec->exception())); > if (terminatorCausedException || (vm.watchdog && vm.watchdog->didFire()))
I wonder why those conditions are in that order, looks a bit backward to me.
> Source/WebCore/dom/Element.h:789 > +namespace WTF { > +template <> > +struct TypeCastTraits<const WebCore::Element, const WebCore::Node> { > + static bool isOfType(const WebCore::Node& node) { return node.isElementNode(); } > +}; > +}
Would SPECIALIZE_TYPE_TRAITS_BEGIN work here?
> Source/WebCore/dom/ScriptExecutionContext.h:-240 > -#define SCRIPT_EXECUTION_CONTEXT_TYPE_CASTS(ToValueTypeName) \ > - template<typename T> inline ToValueTypeName* to##ToValueTypeName(const RefPtr<T>& context) { return to##ToValueTypeName(context.get()); } \ > - TYPE_CASTS_BASE(ToValueTypeName, ScriptExecutionContext, context, context->is##ToValueTypeName(), context.is##ToValueTypeName()) > -
Die preprocessor, die!
Chris Dumez
Comment 10
2014-09-30 12:46:02 PDT
Comment on
attachment 238923
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=238923&action=review
>> Source/WebCore/dom/Element.h:789 >> +} > > Would SPECIALIZE_TYPE_TRAITS_BEGIN work here?
https://bugs.webkit.org/show_bug.cgi?id=137241
is taking care of this. It is in the commit queue. I'll rebase this patch as soon as the other one lands.
Chris Dumez
Comment 11
2014-09-30 13:10:06 PDT
Created
attachment 238950
[details]
Patch
WebKit Commit Bot
Comment 12
2014-09-30 13:11:19 PDT
Attachment 238950
[details]
did not pass style-queue: ERROR: Source/WebCore/html/HTMLElement.h:159: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/mathml/MathMLElement.h:86: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 69 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 13
2014-09-30 13:48:57 PDT
Created
attachment 238955
[details]
Patch
WebKit Commit Bot
Comment 14
2014-09-30 13:50:47 PDT
Attachment 238955
[details]
did not pass style-queue: ERROR: Source/WebCore/html/HTMLElement.h:159: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/mathml/MathMLElement.h:86: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 70 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 15
2014-09-30 14:32:59 PDT
Comment on
attachment 238955
[details]
Patch Clearing flags on attachment: 238955 Committed
r174125
: <
http://trac.webkit.org/changeset/174125
>
WebKit Commit Bot
Comment 16
2014-09-30 14:33:04 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