[Webkit-unassigned] [Bug 115513] Improving PageSerializer.cpp to retrieve the subresources specified in @media rules in css

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 6 09:12:22 PDT 2013


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
 Attachment #200668|review?                     |review+
               Flag|                            |

--- Comment #33 from Darin Adler <darin at apple.com>  2013-05-06 09:10:45 PST ---
(From update of attachment 200668)
View in context: https://bugs.webkit.org/attachment.cgi?id=200668&action=review

> Source/WebCore/page/PageSerializer.cpp:280
> +            StyleRuleMedia* mediaStyle = static_cast<StyleRuleMedia*>(styleSheet->contents()->ruleAt(i));

I think this might read better without this local variable.

> Source/WebCore/page/PageSerializer.cpp:283
> +            size_t ruleSize = rules.size();

I think “rule size” is a strange name for this, since it’s not the size of a rule. I suggest either rulesSize or just size for this local.

> Source/WebCore/page/PageSerializer.cpp:285
> +                const RefPtr<StyleRuleBase>& rule = rules[i];

This is OK, but this is better:

    StyleRuleBase* rule = rules[i].get();

Since we have to do the get() on the next line anyway, it’s better to do it right away to avoid const RefPtr&.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list