Roll r168668 back in.

<https://bugs.webkit.org/show_bug.cgi?id=132621>

Reviewed by Brent Fulgham.

Source/WebCore:
Tests: fast/events/beforeload-assertion.html
       fast/events/beforeload-iframe-crash.html
       fast/events/beforeload-input-time-crash.html

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
* dom/Document.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::renderWidgetForJSBindings):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderWidgetForJSBindings):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::performPostLayoutTasks):
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

LayoutTests:
* compositing/plugins/composited-plugin.html:
* compositing/plugins/no-backing-store.html:
* fast/dom/beforeload/flash-before-load.html:
* fast/events/beforeload-assertion-expected.txt: Added.
* fast/events/beforeload-assertion.html: Added.
* fast/events/beforeload-iframe-crash-expected.txt: Added.
* fast/events/beforeload-iframe-crash.html: Added.
* fast/events/beforeload-input-time-crash-expected.txt: Added.
* fast/events/beforeload-input-time-crash.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
(testImpl.iframe.onload):
(testImpl):
* http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
* platform/mac/plugins/supports-carbon-event-model.html:
* platform/mac/plugins/testplugin-onnew-onpaint.html:
* plugins/get-user-agent-with-null-npp-from-npp-new.html:
* plugins/mouse-click-plugin-clears-selection.html:
* plugins/netscape-plugin-map-data-to-src.html:
* plugins/no-mime-with-valid-extension.html:
* plugins/plugin-initiate-popup-window.html:
* plugins/windowless_plugin_paint_test.html:
* resources/plugin.js: Added.
(runAfterPluginLoad):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-[WKProcessPoolConfiguration setCachePartitionedURLSchemes:] should do a deep copy
https://bugs.webkit.org/show_bug.cgi?id=133393

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS JIT: add support for the pseudo classes :hover and :active
https://bugs.webkit.org/show_bug.cgi?id=133295

Reviewed by Andreas Kling.

This patch adds compilation support for :hover and :active. The code generation of both of them is trivial,
most of the patch is improving the infrastructure and safety.

The document compatibility mode is moved to its own typed enum. This ensure the values are exclusives and
the native type is known (unsigned char here). The values are changes to binary flags to take advantage of
test-and-branch on ARM64 (not used explicitely, it is automatically generated by the MacroAssembler).

The other important refactoring is the code updating the flags on RenderStyle::NonInheritedFlags.
The code was duplicated in some places so it is move into its own function addFlagToElementStyleFromContext().

The generators themself are very simple. First we check the quirks-mode exceptions, that is generally excluded
at compile time because the conditions are almost never met, even in strict mode.
Then we have two cases: style resolution and query selector. Almost everything is just function calls.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagToElementStyleFromContext):
(WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
(WebCore::SelectorCompiler::getDocument):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::elementIsActive):
(WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
(WebCore::SelectorCompiler::elementIsHovered):
(WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setCompatibilityMode):
(WebCore::Document::implicitOpen):
(WebCore::Document::cloneDataFromDocument):
* dom/Document.h:
(WebCore::Document::compatibilityModeMemoryOffset):
(WebCore::Document::inQuirksMode):
(WebCore::Document::inLimitedQuirksMode):
(WebCore::Document::inNoQuirksMode):
(WebCore::Document::compatibilityMode): Deleted.
* html/ImageDocument.cpp:
(WebCore::ImageDocument::ImageDocument):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::MediaDocument):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::PluginDocument):
* html/TextDocument.cpp:
(WebCore::TextDocument::TextDocument):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::setDefaultCompatibilityMode):
(WebCore::HTMLConstructionSite::setCompatibilityMode):
(WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype):
(WebCore::HTMLConstructionSite::insertDoctype):
* html/parser/HTMLConstructionSite.h:
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):
* loader/SinkDocument.cpp:
(WebCore::SinkDocument::SinkDocument):
* page/ios/FrameIOS.mm:
(WebCore::Frame::initWithSimpleHTMLDocument):
* rendering/style/RenderStyle.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prepare css jit for arm64 and other architectures.
https://bugs.webkit.org/show_bug.cgi?id=133394

Reviewed by Benjamin Poulain.

* cssjit/FunctionCall.h:
(WebCore::FunctionCall::swapArguments):
* cssjit/RegisterAllocator.h:
Use a designated temporary register on arm64 to prevent using a deallocated argument register to swap argument registers in.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
Added assertion to make sure there are enough registers.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable css jit by default on arm64.
https://bugs.webkit.org/show_bug.cgi?id=133246
<rdar://problem/17073407>

Reviewed by Benjamin Poulain.

* wtf/Platform.h:
Added arm64 to list of supported architectures.



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