Unify the various serialization of selector list
https://bugs.webkit.org/show_bug.cgi?id=139606

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-12-15
Reviewed by Andreas Kling.

Source/WebCore:

There were code in various place to build a string from the selectors contained
in a selecor list.

This patch adds a single function to do that: buildSelectorsText(). All the call sites
were modified to use it.

The serialization of :-webkit-any() gets fixed as a result.

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
(WebCore::appendSelectorList): Deleted.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::selectorsText):
(WebCore::CSSSelectorList::buildSelectorsText):
* css/CSSSelectorList.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::generateSelectorText):
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::cssText):

LayoutTests:

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/css/parsing-css-matches-1-expected.txt:
* fast/css/parsing-css-matches-1.html:
* fast/css/parsing-css-matches-2-expected.txt:
* fast/css/parsing-css-matches-2.html:
* fast/css/parsing-css-matches-4-expected.txt:
* fast/css/parsing-css-matches-4.html:
* fast/css/parsing-css-not-1-expected.txt:
* fast/css/parsing-css-not-1.html:
* fast/css/parsing-css-not-2-expected.txt:
* fast/css/parsing-css-not-2.html:
* fast/css/parsing-css-not-4-expected.txt:
* fast/css/parsing-css-not-4.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
cloneNode(true) does not clone nested template elements' contents
https://bugs.webkit.org/show_bug.cgi?id=137755

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by cloneChildNodes not copying template element's content.

Fixed the bug by adding the third behavior (CloneContent) to the polymorphic
cloneNodeInternal, which copies template element's content but not its children,
in addition to the existing CloneSelf (deep=false) and CloneChildren (deep=true).

Test: fast/dom/HTMLTemplateElement/cloneNode-nested-templates.html

* dom/Attr.cpp:
(WebCore::Attr::cloneNodeInternal): Renamed from cloneNode.
* dom/Attr.h:
* dom/CDATASection.cpp:
(WebCore::CDATASection::cloneNodeInternal): Renamed from cloneNode.
* dom/CDATASection.h:
* dom/Comment.cpp:
(WebCore::Comment::cloneNodeInternal): Renamed from cloneNode.
* dom/Comment.h:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes): Calls cloneNode with CloneContent.
* dom/Document.cpp:
(WebCore::Document::cloneNodeInternal): Renamed from cloneNode.
* dom/Document.h:
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::cloneNodeInternal): Renamed from cloneNode.
* dom/DocumentFragment.h:
* dom/DocumentType.cpp:
(WebCore::DocumentType::cloneNodeInternal): Renamed from cloneNode.
* dom/DocumentType.h:
* dom/Element.cpp:
(WebCore::Element::cloneNodeInternal): Renamed from cloneNode.
* dom/Element.h:
* dom/EntityReference.cpp:
(WebCore::EntityReference::cloneNodeInternal): Renamed from cloneNode.
* dom/EntityReference.h:
* dom/Node.h:
(WebCore::Node::cloneNode): Added. It calls cloneNodeInternal with CloneSelf or CloneChildren.
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::cloneNodeInternal): Renamed from cloneNode.
* dom/ProcessingInstruction.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::cloneNodeInternal): Renamed from cloneNode. Also moved from ShadowRoot.h.
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::cloneNodeInternal): Renamed from cloneNode.
* dom/Text.h:
* html/HTMLTemplateElement.cpp:
(WebCore::HTMLTemplateElement::cloneNodeInternal): Renamed from cloneNode. This is the only
function in which CloneContent results in a different behavior from CloneSelf.
* html/HTMLTemplateElement.h:

LayoutTests:

Added a regression test.

* fast/dom/HTMLTemplateElement/cloneNode-nested-templates-expected.txt: Added.
* fast/dom/HTMLTemplateElement/cloneNode-nested-templates.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] FTL JIT not working on ARM64
https://bugs.webkit.org/show_bug.cgi?id=139295

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Added the missing code for stack unwinding and some additional small fixes
to get FTL working correctly.

* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLUnwindInfo.cpp:
(JSC::FTL::UnwindInfo::parse):

Tools:

Added patches for llvm to add ARM64 support for FTL JIT

* efl/jhbuild.modules:
* efl/patches/llvm-elf-add-stackmaps-arm64.patch: Added.
* efl/patches/llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r177284.
https://bugs.webkit.org/show_bug.cgi?id=139658

"Breaks API tests and LayoutTests on Yosemite Debug"
(Requested by msaboff on #webkit).

Reverted changeset:

"Make sure range based iteration of Vector<> still receives
bounds checking"
https://bugs.webkit.org/show_bug.cgi?id=138821
http://trac.webkit.org/changeset/177284

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