Bug 137429 - Use is<>() / downcast<>() for StyleSheet subclasses
Summary: Use is<>() / downcast<>() for StyleSheet subclasses
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 137056
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-04 21:51 PDT by Chris Dumez
Modified: 2014-10-05 17:24 PDT (History)
5 users (show)

See Also:


Attachments
Patch (8.54 KB, patch)
2014-10-04 22:14 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (8.60 KB, patch)
2014-10-05 16:37 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2014-10-04 21:51:38 PDT
Use is<>() / downcast<>() for StyleSheet subclasses
Comment 1 Chris Dumez 2014-10-04 22:14:02 PDT
Created attachment 239291 [details]
Patch
Comment 2 Benjamin Poulain 2014-10-05 15:54:40 PDT
Comment on attachment 239291 [details]
Patch

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

> Source/WebCore/dom/DocumentStyleSheetCollection.cpp:411
>      for (unsigned i = 0; i < sheets.size(); ++i) {

Let's update the loop too.

> Source/WebCore/dom/DocumentStyleSheetCollection.cpp:413
> +        if (!is<CSSStyleSheet>(*sheets[i]))
>              continue;

I would move this after sheets[i]->disabled() to reduce the span between is<> and downcast<>, making it easier to follow the flow.
Comment 3 Chris Dumez 2014-10-05 16:37:58 PDT
Created attachment 239302 [details]
Patch
Comment 4 WebKit Commit Bot 2014-10-05 17:24:00 PDT
Comment on attachment 239302 [details]
Patch

Clearing flags on attachment: 239302

Committed r174332: <http://trac.webkit.org/changeset/174332>
Comment 5 WebKit Commit Bot 2014-10-05 17:24:04 PDT
All reviewed patches have been landed.  Closing bug.