Avoid computing style twice when element has no existing style
Avoid computing style twice when element has no existing style

Merges https://trac.webkit.org/changeset/148970 from Antti Koivisto.

We currently compute element style twice if we end up having to reattach,
first in recalcStyle and then again during attach(). We can easily avoid
this in common case where the element has no existing style
(usually because it is display:none or we're doing lazy attach).

In Element::recalcStyle don't compute the style and diff if there is no
existing style as there is nothing to diff against. Instead just call
reattach() directly, we ended up doing that anyway with the existing code.

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

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@149050 bbb929c8-8fbe-4397-9dbb-9b2b20218538

primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs