DescriptionRename various LayoutDelegate types/functions for brevity and consistency.
* "Type" was removed from the enum class names; many of the enums in the
codebase are types of things, but we don't normally append "type". Removing
this left the code reading about as clearly as before to me, but was more
consistent with elsewhere, and briefer.
* LayoutDistance -> Metric. "Layout" is redundant with LayoutDelegate, which is
used to qualify accesses to the enum anyway, and "distance" seems less clear
to me than "metric" (plus is longer), especially if in the future we add
values that are less obviously distances, e.g. font sizes or something.
The primary goal of these changes was to reduce the verbosity at call sites. I
hope to use these much more broadly across views, but the current syntax felt
very long-winded. It seems like maybe more could be done, but this is a start.
Of course, due to the vagaries of git cl format, this ended up being wrapped
over more lines than before, but it's less verbose doing so. :P
Also changed one const to constexpr.
BUG=none
TEST=none
Review-Url: https://codereview.chromium.org/2663013003
Cr-Commit-Position: refs/heads/master@{#447429}
Committed: https://chromium.googlesource.com/chromium/src/+/a023c75cbfdf289ca3104d272c16447dead2c1a5
Patch Set 1 #
Total comments: 2
Depends on Patchset: Messages
Total messages: 14 (9 generated)
|