Create a skeleton for CSS Selector code generation
https://bugs.webkit.org/show_bug.cgi?id=126044

Source/JavaScriptCore: 

Reviewed by Antti Koivisto and Gavin Barraclough.

* assembler/LinkBuffer.h:
Add a new owner UID for code compiled for CSS.
Export the symbols needed to link code from WebCore.

Source/WebCore: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-12-22
Reviewed by Antti Koivisto and Gavin Barraclough.

Add CSSCompiler, which provides the basic infrastructure to compile
CSS Selectors on x86_64.

Compilation happens in two phases.
1) The various matching and relation of each CSSSelector is aggregated into units
   matching a single element: SelectorFragment.
   SelectorFragment also knows about the relations between different fragments,
   and contains all the information to generate the code for a particular element.
2) The compiler then goes over the fragments, and generate code based on the information
   of each fragment.

It the current state, SelectorCompiler only compiles the tag matching selectors and
any of the relation between selectors.

Depending on the relation and position of a fragment, failure on traversal or matching
does not necessarily causes the complete selector. A failure can cause matching to
resume from the parent or the sibling of a previously visisted node.
The implementation of this is done through the BacktrackingAction. In case of failure,
the next starting state is setup and the program counter jumps back to the appropriate
starting point.

When backtracking, the method used to save the starting point depends on the type
of backtracking.
The child/parent relation (">") is very common so it uses an additional register to keep
the next starting point (m_descendantBacktrackingStart).
The indirect sibling relation ("~") is much less common and uses the stack to save
the next starting point.

* WebCore.xcodeproj/project.pbxproj:
* cssjit/SelectorCompiler.cpp: Added.
(WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
(WebCore::SelectorCompiler::compileSelector):
(WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
(WebCore::SelectorCompiler::updateChainStates):
(WebCore::SelectorCompiler::isFirstAncestor):
(WebCore::SelectorCompiler::isFirstAdjacent):
(WebCore::SelectorCompiler::isAfterChildRelation):
(WebCore::SelectorCompiler::solveBacktrackingAction):
(WebCore::SelectorCompiler::requiresAdjacentTail):
(WebCore::SelectorCompiler::requiresDescendantTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
(WebCore::SelectorCompiler::testIsElementFlagOnNode):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
(WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
* cssjit/SelectorCompiler.h: Added.
(WebCore::SelectorCompilationStatus::SelectorCompilationStatus):
(WebCore::SelectorCompilationStatus::operator Status):
(WebCore::SelectorCompiler::simpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext):
* dom/Element.cpp:
(WebCore::Element::setChildrenAffectedByDirectAdjacentRules):
(WebCore::Element::setChildrenAffectedByForwardPositionalRules):
* dom/Element.h:
(WebCore::Element::tagQNameMemoryOffset):
(WebCore::Element::setChildrenAffectedByForwardPositionalRules):
* dom/Node.h:
(WebCore::Node::parentNodeMemoryOffset):
(WebCore::Node::previousSiblingMemoryOffset):
(WebCore::Node::nodeFlagsMemoryOffset):
(WebCore::Node::flagIsElement):
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedNameImpl::localNameMemoryOffset):
(WebCore::QualifiedName::QualifiedNameImpl::namespaceMemoryOffset):
(WebCore::QualifiedName::implMemoryOffset):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Small build fix for GTK+ with the CMake build

* CMakeLists.txt: Remove duplicate include directory and add missing directories
necessary for GTK+.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][CMake] Integrate GResource for inspector files (and others?)
https://bugs.webkit.org/show_bug.cgi?id=125569

Reviewed by Gustavo Noronha Silva.

Source/WebInspectorUI:

* GNUmakefile.am: Use the new generation script instead of generating with
shell scripting in the makefile.

Source/WebKit2:

* GNUmakefile.am: Use the newly added static WebKit2InspectorGResourceBundle.xml
instead of generating the same file each time.
* PlatformGTK.cmake: Add support for building the GResource bundles into WebKit2.
* UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml: Added.

Tools:

* gtk/generate-inspector-gresource-manifest.py: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][SOUP] WebContext::allowSpecificHTTPSCertificateForHost does not work correctly when m_usesNetworkProcess is false
https://bugs.webkit.org/show_bug.cgi?id=125564

Reviewed Carlos Garcia Campos.

WebContext::allowSpecificHTTPSCertificateForHost should send
AllowSpecificHTTPSCertificateForHost to the web process when
m_usesNetworkProcess is false. Also we shouldn't guard
WebProcess::allowSpecificHTTPSCertificateForHost with
!ENABLE(NETWORK_PROCESS) because we need this method when
m_usesNetworkProcess is false.

Patch by Kwang Yul Seo <skyul@company100.net> on 2013-12-22

* UIProcess/WebContext.cpp:
(WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/soup/WebProcessSoup.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] run-gtk-tests should always run glib tests with -k option
https://bugs.webkit.org/show_bug.cgi?id=126132

Reviewed by Philippe Normand.

With -k command line option, gtester continues running all other
test cases after a failure.

* Scripts/run-gtk-tests:
(TestRunner._run_test_glib): Use -k option when runing glib tests
to not stop on failure.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Implement platform specific Resource Response for SOUP
https://bugs.webkit.org/show_bug.cgi?id=125422

Reviewed by Martin Robinson.

SOUP specific Resource Response implementation for the Network
Process.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Build with network process unconditionally
https://bugs.webkit.org/show_bug.cgi?id=126128

Reviewed by Martin Robinson.

.:

* Source/autotools/SetupAutomake.m4: Remove network process
conditional for Makefiles.
* Source/autotools/SetupWebKitFeatures.m4: Remove network process
feature.

Source/WebKit2:

Build always with the network process enabled and decide whether
to use it or not using an environment variable. This makes a lot
easier to work on the network process and also to switch between
using it or not.

* GNUmakefile.am: Make sure we always include the WebKit2Prefix.h.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext): Use the network process when
WEBKIT_USE_NETWORK_PROCESS environment variable is present.
* WebKit2Prefix.h: Always enable network process for GTK port.

Tools:

* Scripts/webkitperl/FeatureList.pm: Remove network-process
feature command line option.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening

Rebaseline tests after 160908.

* platform/efl/TestExpectations:
* platform/efl/editing/inserting/break-blockquote-after-delete-expected.png: Added.
* platform/efl/editing/inserting/break-blockquote-after-delete-expected.txt: Added.
* platform/efl/fast/css-generated-content/table-row-group-to-inline-expected.txt:
* platform/efl/fast/dynamic/011-expected.txt:
* platform/efl/fast/forms/formmove3-expected.txt:
* platform/efl/fast/forms/preserveFormDuringResidualStyle-expected.txt:
* platform/efl/fast/invalid/001-expected.txt:
* platform/efl/fast/invalid/003-expected.txt:
* platform/efl/fast/invalid/004-expected.txt:
* platform/efl/fast/invalid/007-expected.txt:
* platform/efl/fast/invalid/019-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
* platform/efl/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt:
* platform/efl/fast/ruby/ruby-base-merge-block-children-crash-expected.txt:
* platform/efl/tables/mozilla/bugs/bug113235-1-expected.txt:
* platform/efl/tables/mozilla/bugs/bug647-expected.txt:
* platform/efl/tables/mozilla/other/wa_table_tr_align-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] WebGL is not working with GLES
https://bugs.webkit.org/show_bug.cgi?id=126138

Reviewed by Martin Robinson.

m_texture has been unnecessarily regenerated. It's generated in GraphicsContext3D
constructor for offscreen rendering. And m_compositorTexture is used by only Mac port.
They create it in their GraphicsContext3D constructor so that we don't need to recreate it
in GC3DOpenGLES::reshapeFBOs.

No new tests since no functionality changed.

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):


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