Bug 159336 - Cleanup of MathML headers
Summary: Cleanup of MathML headers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords:
Depends on: 153991
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-01 02:01 PDT by Frédéric Wang (:fredw)
Modified: 2016-07-14 11:00 PDT (History)
9 users (show)

See Also:


Attachments
Patch (26.74 KB, patch)
2016-07-14 01:50 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Patch (32.56 KB, patch)
2016-07-14 10:05 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2016-07-01 02:01:02 PDT
Another small refactoring we can do after https://trac.webkit.org/wiki/MathML/Early_2016_Refactoring#Phase1 is improving the inheritance and visibility in MathML element and renderer classes. The hierarchy as changed a lot and these are not always respected:

* Use final for class that are not extended.
* Use final instead of override for virtual members that are not overridden by derived classes.
* Try and reduce the visibility of function members to private or protected as appropriate.
Comment 1 Frédéric Wang (:fredw) 2016-07-14 01:50:51 PDT
Created attachment 283627 [details]
Patch
Comment 2 Brady Eidson 2016-07-14 09:51:18 PDT
Comment on attachment 283627 [details]
Patch

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

r- with prejudice

(j/k, but, in all seriousness, #pragma once is used *instead* of header guards, not in addition to them!

Otherwise nice cleanup.

> Source/WebCore/ChangeLog:9
> +        - Use #pragma once

Nice!

> Source/WebCore/mathml/MathMLElement.h:30
>  #ifndef MathMLElement_h
>  #define MathMLElement_h
> +#pragma once

...

NOOOooooooo!

> Source/WebCore/mathml/MathMLInlineContainerElement.h:29
>  #ifndef MathMLInlineContainerElement_h
>  #define MathMLInlineContainerElement_h
> +#pragma once

:(

> Source/WebCore/mathml/MathMLMathElement.h:29
>  #ifndef MathMLMathElement_h
>  #define MathMLMathElement_h
> +#pragma once

<weeps>

> Source/WebCore/mathml/MathMLMencloseElement.h:29
>  #ifndef MathMLMencloseElement_h
>  #define MathMLMencloseElement_h
> +#pragma once

etc etc etc
Comment 3 Frédéric Wang (:fredw) 2016-07-14 10:05:28 PDT
Created attachment 283655 [details]
Patch
Comment 4 WebKit Commit Bot 2016-07-14 11:00:06 PDT
Comment on attachment 283655 [details]
Patch

Clearing flags on attachment: 283655

Committed r203228: <http://trac.webkit.org/changeset/203228>
Comment 5 WebKit Commit Bot 2016-07-14 11:00:12 PDT
All reviewed patches have been landed.  Closing bug.