LayoutTheme, ThemePainter: Assume LayoutObject::GetNode() is a non-null Element
After LayoutTheme::AdjustStyle() call, we can assume a LayoutObject with a HasEffectiveAppearnace() style always has a non-null Element for GetNode(). This CL simplifies blink::LayoutTheme and blink::ThemePainter by the assumption. * Change the |const Element*| arguments of |LayoutTheme:: AdjustSliderContainerStyle()| to |const Element&|. * Remove unused |const Element*| arguments of |LayoutTheme:: AdjustMenuList*Style()|. * Change the argument order of LayoutTheme::AdjustStyle() to follow Google C++ style guide. * Public methods of ThemePainter still take |const Node*| arguments, but the methods set up |const Element&| variables at the beginning. * Protected methods of ThemePainter take |const Element&| arguments. * Add |const Element&| arguments to some of ThemePainter methods because they refer to LayoutObject::GetNode(). * Remove IsDisabled(), IsPressed(), and IsHovered() in theme_painter_default.cc. They are not helpful any longer. This CL has no behavior changes. Change-Id: I8a8fee402720ddeacfe77ebf920146b72bf6767e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404510 Auto-Submit: Kent Tamura <tkent@chromium.org> Reviewed-by:Ian Kilpatrick <ikilpatrick@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#806517}
Showing
This diff is collapsed.
Please register or sign in to comment