Avoid calculating style for ::before/::after without content.

A universal ::before or ::after rule without content triggers calculation
of pseudo style for most elements on theverge.com just to find that most of
them won't be rendered due to the missing content.

Check if matching ::before or ::after rules actually contain a content
value before marking the render style with setHasPseudoStyle.

This change reduces the style recalc time by ~50% when expanding the
comments section on theverge.com articles.

R=esprehn@chromium.org,eseidel@chromium.org
BUG=412558

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182308 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: 5a4427dd553f5bb50412fc378f636e942ba0a7f2
  1. third_party/