Commit 948352ea authored by abarth@chromium.org's avatar abarth@chromium.org

RenderLayerScrollableArea::updateResizerStyle shouldn't do work if there's no resizer

In profiling updateStyle on Silk's toggle_drawer test case, we saw some time
being spent updating the style of the resizer, which is wasted work because
there is no resizer. This CL teaches the code not to do work if there's no
resizer.

R=esprehn@chromium.org
BUG=335703

Review URL: https://codereview.chromium.org/182733014

git-svn-id: svn://svn.chromium.org/blink/trunk@168555 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5941ea1b
......@@ -1223,6 +1223,9 @@ void RenderLayerScrollableArea::updateResizerAreaSet()
void RenderLayerScrollableArea::updateResizerStyle()
{
if (!m_resizer && !m_box->canResize())
return;
RenderObject* actualRenderer = rendererForScrollbar(m_box);
RefPtr<RenderStyle> resizer = m_box->hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(PseudoStyleRequest(RESIZER), actualRenderer->style()) : PassRefPtr<RenderStyle>(nullptr);
if (resizer) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment