XSSAuditor performance regression due to threaded parser changes.
<http://webkit.org/b/115037>
<rdar://problem/13716069>

Reviewed by Anders Carlsson.

From Blink r148792 by <abarth@chromium.org>:

The refactoring we did for the threaded parser introduced a performance
regression in innerHTML because we'd boot up the XSSAuditor for fragment
parsing. This CL returns to our earlier behavior of not booting up the
XSSAuditor when parsing fragments.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::initForFragment):
* html/parser/XSSAuditor.h:
(XSSAuditor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clear StyleResolver state before returning from styleForElement().
<http://webkit.org/b/115035>

Reviewed by Antti Koivisto.

From Blink r148687 by <inferno@chromium.org>.

Source/WebCore:

A cached element pointer in the resolver state was causing confusion because
in some cases a subsequent call to styleForElement() would use a pointer to
a different object that is at the same memory address as the previous one.

Test: fast/css/reload-non-styled-element-crash.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):

LayoutTests:

* fast/css/reload-non-styled-element-crash-expected.txt: Added.
* fast/css/reload-non-styled-element-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148965 268f45cc-cd09-0410-ab3c-d52691b4dbfc