[Windows] Skip a small handful of tests that fail consistently on Windows bots.
* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Marking flaky on Mavericks.

* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Skip a small handful of tests that fail consistently on Windows bots Part 2.
* platform/win/TestExpectations: Typo, meant to skip the whole folder on Debug tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move ASan arguments from LLVM (-mllvm) to the frontend
https://bugs.webkit.org/show_bug.cgi?id=137365

Reviewed by David Kilzer.

* asan/asan.xcconfig:
Remove the -mllvm prefix to the asan-blacklist argument, moving it
to the clang frontend.

http://llvm.org/viewvc/llvm-project?view=revision&revision=212505

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] The number of processes did not affect the crash inconsistency, increase number of child processes again.
* Scripts/webkitpy/port/win.py:
(WinPort.default_child_processes): Ambitiously try 3 processes the testers are too slow now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Networking process stops loading web pages while running Alexa test with random URL list
https://bugs.webkit.org/show_bug.cgi?id=137362
<rdar://problem/18507382>

Reviewed by Alexey Proskuryakov.

ResourceHandleCFURLConnectionDelegateWithOperationQueue needs to signal threads waiting on
its semaphore when the handle is being destroyed. Otherwise, we can leave dispatch threads
hanging around waiting for a response. This can happen when the Web Content process dies.
Any thread/queue waiting on a response from that web process will leak and stay around
forever. If we reach the dispatch queue limit of 64, then all networking will cease to
happen in the Networking process. Fix this by signalling waiting threads and clearing out
our state in much the same way that -[WebCoreResourceHandleAsOperationQueueDelegate
detachHandle] does for Mac.

* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::releaseHandle):
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS JIT: add the initial implementation of :nth-child(An+B of selector)
https://bugs.webkit.org/show_bug.cgi?id=137285

Reviewed by Andreas Kling.

Source/WebCore:

This patch adds the baseline support for JIT compiling :nth-child(An+B of selector).

The simple optimizations from the classic :nth-child() are carried over to :nth-child(An+B of selector),
but the new code generation is pretty much left completely unoptimized.

The main challenge introduced with the new functional pseudo classes is the possibility of backtracking
while already inside a backtracking chain.

For example:
    :nth-child(odd of a+a+a~a)+b+b~b
has to backtrack the chain a+a+a while already in the backtracking chain b+b+b.

The easiest way to solve this would have been to have each subselector generate a new function.
The generator for :nth-child() would simply call the function call for each sibling.

In the example, we would have:
    functionA(): a+a+a~a
    selectorChecker(): :nth-child(odd of functionA())+b+b~b

I decided against explicit functions because I believe the would be counterproductive for the common cases.
I expect most use of :nth-child(of) to be done with a light filter without combinators, things like:
    :nth-child(odd of .class)
    :nth-child(odd of type.class)
    :nth-child(odd of type[attribute=value])
    etc.

For simple cases, inlining the internal filter will greatly simplify the generated code.

In this particular patch, the selector checkers are inlined, but we do not attempt to have good code generation.
The optimizations will come later.

To implement backtracking in the subselectors, the backtracking implementation was abstracted into the structure
BacktrackingLevel. Every time the code generator starts a new subselector, a new BacktrackingLevel is pushed onto
the multilevel backtracking stack. The code generation always use the latest BacktrackingLevel for code generation
until the subselector is finished, and code generation can continue with the existing state.

Tests: fast/selectors/nth-child-of-backtracking-adjacent-2.html
       fast/selectors/nth-child-of-backtracking-adjacent-optimized.html
       fast/selectors/nth-child-of-backtracking-adjacent.html
       fast/selectors/nth-child-of-boundaries-1.html
       fast/selectors/nth-child-of-boundaries-2.html
       fast/selectors/nth-child-of-boundaries-3.html
       fast/selectors/nth-child-of-chained-2.html
       fast/selectors/nth-child-of-has-parent.html
       fast/selectors/nth-child-of-never-matching-selector.html
       fast/selectors/nth-child-of-with-invalid-An+B.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::minimumRegisterRequirements):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
Previously, we only needed stack space for the adjacent backtracking entry.

Now we can have several backtracking level active at the same time. We compute how much stack we need
initially and each backtracking level take stack references as needed.

(WebCore::SelectorCompiler::computeBacktrackingInformation):
The entire backtracking infrastructure already works great for multilevel backtracking. It is actually
amazing how everything fits nicely together :)

The only addition here is logging facility in case we run into a bug.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
generateSelectorChecker() has handling for pseudo elements, which should not be used
for :nth-child(of). The core generator was moved to generateSelectorCheckerExcludingPseudoElements()
to be used for code generation of subselectors.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
The two main changes are:
1) Adopt the BacktrackingLevel to handle multilevel generation.
2) Descendant backtracking can use the stack if we have multi level descendant backtracking.
   In that case, we just use the stack like for adjacent backtracking.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
This is very similar to generateElementIsNthChild(). The main difference is we cannot use
the cache in this case.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::nthFilterIsAlwaysSatisified):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):

LayoutTests:

Those are new tests on top of the existing tests for :nth-child(An+B of selector).
They cover mostly areas related to the JIT optimizations.

The areas with the least test coverage for correctness is multilevel backtracking.
I expect we will create more of those tests while extending :not() and adding :matches().

* fast/selectors/nth-child-of-backtracking-adjacent-expected.txt: Added.
* fast/selectors/nth-child-of-backtracking-adjacent-optimized.html: Added.
* fast/selectors/nth-child-of-backtracking-adjacent-expected.html: Added.
* fast/selectors/nth-child-of-backtracking-adjacent.html: Added.
* fast/selectors/nth-child-of-backtracking-adjacent-2-expected.txt: Added.
* fast/selectors/nth-child-of-backtracking-adjacent-2.html: Added.
Those tests are based on Yusuke's backtracking test suite for adjacent combinators.

The tests in nth-child-of-backtracking-adjacent.html use :nth-child(of) inside a regular
backtracking chain.

The tests in nth-child-of-backtracking-adjacent-2.html test backtracking inside :nth-chlid(of).

* fast/selectors/nth-child-of-boundaries-1-expected.txt: Added.
* fast/selectors/nth-child-of-boundaries-1.html: Added.
* fast/selectors/nth-child-of-boundaries-2-expected.txt: Added.
* fast/selectors/nth-child-of-boundaries-2.html: Added.
* fast/selectors/nth-child-of-boundaries-3-expected.txt: Added.
* fast/selectors/nth-child-of-boundaries-3.html: Added.
Test various abuse of :nth-child(of).

* fast/selectors/nth-child-of-chained-2-expected.txt: Added.
* fast/selectors/nth-child-of-chained-2.html: Added.
Test that disjoint :nth-child(of) are not agregated, unlike the old :nth-child().

* fast/selectors/nth-child-of-has-parent-expected.txt: Added.
* fast/selectors/nth-child-of-has-parent.html: Added.
Make sure we don't optimize out the parent check when skipping filters that always match.

* fast/selectors/nth-child-of-never-matching-selector-expected.txt: Added.
* fast/selectors/nth-child-of-never-matching-selector.html: Added.
Test code generation for things that never match.

* fast/selectors/nth-child-of-with-invalid-An+B-expected.txt: Added.
* fast/selectors/nth-child-of-with-invalid-An+B.html: Added.
Test for useless variation of An+B that can never match anything.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Annoying build warnings in WTFString API tests
https://bugs.webkit.org/show_bug.cgi?id=137360

Reviewed by Darin Adler.

* TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::TEST): Change EXPECT_EQ(false, ok) to EXPECT_FALSE(ok) and EXPECT_EQ(true, ok) to EXPECT_TRUE(ok).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
update-work-items should never delete items
https://bugs.webkit.org/show_bug.cgi?id=137366

Reviewed by Ryosuke Niwa.

As we don't just replace the whole list any more, indicate which items are high
priority, and which are not. Hight priority ones will be prepended to the queue,
others will be appended.

This creates a bit of unfairness in that high priority item queue becomes a LIFO.
But hopefully we will never have many rollouts competing like that.

* QueueStatusServer/app.yaml: Update version.

* QueueStatusServer/handlers/updateworkitems.py: Never remove items. Pass high
priority and regular items separately. Removed some error handling that used to
end up in returning status 500 - an uncaught exception does that automatically.

* QueueStatusServer/main.py: Removed unnecessary regexps from URL matching code.

* QueueStatusServer/model/workitems.py: Added a way to add high priority items.

* QueueStatusServer/templates/updateworkitems.html: Added a field for high
priority items.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(BugzillaQueries._parse_attachment_ids_request_query): Removed an annoying log
line that complicated testing.

* Scripts/webkitpy/common/net/statusserver.py: Pass high priority items separately.

* Scripts/webkitpy/tool/bot/feeders.py: For commit queue, split high and regular
priority items into separate lists.

* Scripts/webkitpy/common/net/statusserver_mock.py:
* Scripts/webkitpy/tool/bot/feeders_unittest.py:
* Scripts/webkitpy/tool/commands/queues_unittest.py:
Updated tests.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Create an SPI wrapper for _UIHighlightView and use it in WKContentView
https://bugs.webkit.org/show_bug.cgi?id=137370

Reviewed by Tim Horton.

Source/WebCore:

Added _UIHighlightViewSPI.h. When building against the internal SDK it imports <UIKit/_UIHighlightView.h>. Otherwise, it redeclares the SPI we use in WebKit2.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/ios/_UIHighlightViewSPI.h: Added.

Source/WebKit2:

* UIProcess/ios/WKContentViewInteraction.mm: Included <WebCore/_UIHighlightViewSPI.h> instead of <UIKit/_UIHighlightView.h>.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use version number 101000 instead of 10100 for OS X Yosemite
https://bugs.webkit.org/show_bug.cgi?id=137372

Reviewed by Mark Rowe.

The version number for OS X Yosemite is 101000.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

* DumpRenderTree/mac/TextInputController.m:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/18531395> REGRESSION (r173272): Crash in ResourceResponse::platformSuggestedFilename() when called on the null response
https://bugs.webkit.org/show_bug.cgi?id=137239

Reviewed by Pratik Solanki.

* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename): Return the null String if
m_cfResponse is null.



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