A number of classes have a size() method which did not get capitalized, but they have other related methods which *did* get capitalized. This resulted in some pretty ridiculous code like:
int height = GetBox().size().Height();
There's a *ton* of this in the core/layout/ and core/paint/ directories now.
The justification for not capitalizing "size" was to avoid making WTF classes diverge from their STL counterparts (e.g., Vector::size()), but I would argue that in all other non-web-exposed cases, "Size" should be capitalized for consistency.
Most (but not all) of the methods listed here should probably be changed:
https://cs.chromium.org/search/?q=package:%5Echromium$+file:%5Esrc/third_party/WebKit/.*%5C.h$+%5Cssize%5C(%5C)+-file:src/third_party/WebKit/Source/platform/wtf&m=100&det=matsel&sort=1&type=cs
... with special emphasis on platform/geometry/*Rect.h, which accounts for a whole lot of the goofy usage.
Comment 1 by dcheng@chromium.org
, Apr 11 2017Status: Assigned (was: Untriaged)