Bug 189298 - Update code style guidelines for using namespace inside a namespace definition
Summary: Update code style guidelines for using namespace inside a namespace definition
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-04 23:25 PDT by Fujii Hironori
Modified: 2018-09-05 19:56 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.73 KB, patch)
2018-09-04 23:37 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-09-04 23:25:48 PDT
Update code style guidelines for using namespace inside a namespace definition

https://webkit.org/code-style-guidelines/#using-position

> [](#using-position) In implementation files, put all other "using" statements at the beginning of the file, before any namespace definitions and after any "include" statements.
> 
> ###### Right:
> 
> ```cpp
> // HTMLSelectElement.cpp
> 
> using namespace other;
> 
> namespace WebCore {
> 
> } // namespace WebCore
> ```
> 
> ###### Wrong:
> 
> ```cpp
> // HTMLSelectElement.cpp
> 
> namespace WebCore {
> 
> using namespace other;
> 
> } // namespace WebCore
> ```


[webkit-dev] Moving WebCore to unified source builds and style changes.
https://lists.webkit.org/pipermail/webkit-dev/2017-October/029656.html

> 1) Move all “using namespace <name>;” inside the WebCore namespace (they used to be in the global namespace) and change to "using WebCore::<type-name>;” in .mm files.
Comment 1 Fujii Hironori 2018-09-04 23:37:17 PDT
Created attachment 348897 [details]
Patch
Comment 2 Fujii Hironori 2018-09-05 19:55:46 PDT
Comment on attachment 348897 [details]
Patch

Clearing flags on attachment: 348897

Committed r235717: <https://trac.webkit.org/changeset/235717>
Comment 3 Fujii Hironori 2018-09-05 19:55:49 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-09-05 19:56:21 PDT
<rdar://problem/44165719>