Bug 106714 - Clean up WebVTTNodeType code
Summary: Clean up WebVTTNodeType code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Elliott Sprehn
URL:
Keywords:
Depends on:
Blocks: 106679
  Show dependency treegraph
 
Reported: 2013-01-11 15:45 PST by Elliott Sprehn
Modified: 2013-01-14 12:19 PST (History)
10 users (show)

See Also:


Attachments
Patch (9.52 KB, patch)
2013-01-11 15:53 PST, Elliott Sprehn
no flags Details | Formatted Diff | Diff
Patch (9.57 KB, patch)
2013-01-11 17:39 PST, Elliott Sprehn
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Sprehn 2013-01-11 15:45:49 PST
Clean up WebVTTNodeType code
Comment 1 Elliott Sprehn 2013-01-11 15:53:40 PST
Created attachment 182439 [details]
Patch
Comment 2 Tony Chang 2013-01-11 16:15:14 PST
Comment on attachment 182439 [details]
Patch

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

> Source/WebCore/css/StyleResolver.cpp:657
> +    if (m_element->webVTTNodeType())

Nit: I would probably explicitly say != WebVTTNodeTypeNone or when declaring the enum, set WebVTTNodeTypeNone = 0.

> Source/WebCore/dom/Element.cpp:2318
> +    return ensureElementRareData()->setWebVTTNodeType(type);

Nit: return not needed.

> Source/WebCore/dom/NodeRareData.h:401
> +    unsigned m_webVTTNodeType : 2;

Nit: In RenderStyle, we normally add an end-of-line comment with the enum name so it's easier to verify that we've allocated enough space.
Comment 3 Elliott Sprehn 2013-01-11 17:39:59 PST
Created attachment 182453 [details]
Patch
Comment 4 Ryosuke Niwa 2013-01-11 23:32:23 PST
Thanks for the refactoring!
Comment 5 WebKit Review Bot 2013-01-14 12:19:25 PST
Comment on attachment 182453 [details]
Patch

Clearing flags on attachment: 182453

Committed r139639: <http://trac.webkit.org/changeset/139639>
Comment 6 WebKit Review Bot 2013-01-14 12:19:29 PST
All reviewed patches have been landed.  Closing bug.