Add a WebKit1 preference for selection services
https://bugs.webkit.org/show_bug.cgi?id=137498
<rdar://problem/18572699>

Reviewed by Simon Fraser.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences serviceControlsEnabled]):
(-[WebPreferences setServiceControlsEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Add and plumb the preference.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):
Turn on image and selection services in the Legacy WebKit MiniBrowser.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't use backticks when running commands, as we run into sh-related
interpolation issues. Also, fix our usage of system() to properly
retrieve the status code.
https://bugs.webkit.org/show_bug.cgi?id=137541

Reviewed by Darin Adler.

* Scripts/git-add-reviewer:
(interactive):
(nonInteractive):
(requireCleanWorkTree):
(cherryPick):
(commit):
(addReviewerToFile):
(head):
(isAncestor):
(toCommit):
(changeLogsForCommit):
(resetToCommit):
(getConfigValue):
(runCommandWithOutput):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS Simulator results for mathml tests.

* platform/ios-simulator/mathml/*: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS Simulator results for scrollbars tests.

* platform/ios-simulator/scrollbars/*: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS Simulator results for scrollingcoordinator tests.

* platform/ios-simulator/scrollingcoordinator/*: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS Simulator results for security tests.

* platform/ios-simulator/security/*: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS Simulator results for sputnkik tests.

* platform/ios-simulator/sputnkik/*: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip some storage tests for iOS Simulator.

* platform/ios-simulator/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS Simulator results for svg tests.

* platform/ios-simulator/svg/*: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Mac OS Yosemite webkit build infrastructure.
        
This patch adds 15 bots to our build.webkit.org configuration.
We are matching the current Mavericks machines 1:1.
        
This patch includes some minor spacing changes to the buildslaves section to make everything similar.
        
Reviewed by Matt Hanson.

* BuildSlaveSupport/build.webkit.org-config/config.json:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the baseline implementation of :not(selectorList)
https://bugs.webkit.org/show_bug.cgi?id=137548

Reviewed by Andreas Kling.

Source/WebCore:

This patch extend the pseudo class :not() to support the new definition
in CSS Selectors level 4.

Instead of supporting a single simple selector, :not() now support
an arbitrary selector list, excepted pseudo elements.

One side effect of this change is :visited and :link are no longer supported
inside :not(). The reason has to do with complexity and performance.
Since :not() and :matches() can have arbitrary selector list, keeping track of
:visited and :link can have many combination superposing, some valid, some invalid.

Supporting :visited and :link should be possible by chaning the way we handle
them for style resolution, but given the limited use cases for such features
I'll wait to see if there is any interest before changing everything.

This patch only covers SelectorChecker to keep things simple. The CSS JIT
will come later.

Tests: fast/css/not-basics.html
       fast/css/parsing-css-not-1.html
       fast/css/parsing-css-not-2.html
       fast/css/parsing-css-not-3.html
       fast/css/parsing-css-not-4.html
       fast/css/parsing-css-not-5.html
       fast/css/parsing-css-not-6.html
       fast/css/parsing-css-not-7.html
       fast/css/parsing-css-not-8.html
       fast/css/parsing-css-not-9.html
       fast/css/parsing-css-nth-child-of-4.html
       fast/selectors/not-basics.html
       fast/selectors/not-nested.html
       fast/selectors/not-selector-list.html

* css/CSSGrammar.y.in:
Rename selectorListDoesNotMatchAnyPseudoElement() to selectorListDoesNotMatchAnyPseudoElement()
since both :not() and :nth-child(An+B of selectorList) have the same requirements at the moment. 

* css/CSSParserValues.cpp:
(WebCore::selectorListMatchesPseudoElement):
The patch adding :matches() introduced the possibility of putting pseudo element
arbitrary deep in a sequence of nested :matches(). Since this case is forbidded
by :not() and :nth-child(An+B of selectorList), selectorListMatchesPseudoElement()
now becomes recursive to find those pseudo elements.

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
CSSOM for the extended :not().

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::determineLinkMatchType):
* cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::addPseudoClassType):
Disable the new capabilities from the JIT for now.

LayoutTests:

There are 3 big kind of changes to the tests:
1) The new implementation intentionally breaks :not() of :visited and :link.
   Some test for the basic :not(:link) and :not(:visited) are consequently failing.
2) Some tests were ensuring that :not() only support simple selectors, those are
   becoming irrelevant.
3) New test for the feature.

* TestExpectations:
This patch intentionally breaks :not(:link). The test fast/history/link-inside-not.html
time out since it is waiting for the link to match.

* fast/css/invalid-not-with-simple-selector-sequence-expected.txt: Removed.
* fast/css/invalid-not-with-simple-selector-sequence.html: Removed.
This test originally came from IEtestcenter. None of it is useful, all the "invalid"
cases are now fully functional selectors.

* 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:
Parsing and CSS OM tests for the new :not().

* fast/css/parsing-css-matches-5-expected.txt:
* fast/css/parsing-css-matches-5.html:
* fast/css/parsing-css-matches-6-expected.txt:
* fast/css/parsing-css-matches-6.html:
* fast/css/parsing-css-matches-7-expected.txt:
* fast/css/parsing-css-matches-7.html:
* fast/css/parsing-css-matches-8-expected.txt:
* fast/css/parsing-css-matches-8.html:
Update the tests of :matches() to account for the extended :not().

* fast/dom/SelectorAPI/resig-SelectorsAPI-test-expected.txt:
Some cases covered by this test are now valid. The test is kept as is for
its historical value, but all the FAIL cover valid use cases in Level 4.

* platform/mac/css3/selectors3/html/css3-modsel-61-expected.txt:
* platform/mac/css3/selectors3/html/css3-modsel-83-expected.txt:
* platform/mac/css3/selectors3/xhtml/css3-modsel-61-expected.txt:
* platform/mac/css3/selectors3/xhtml/css3-modsel-83-expected.txt:
* platform/mac/css3/selectors3/xml/css3-modsel-61-expected.txt:
* platform/mac/css3/selectors3/xml/css3-modsel-83-expected.txt:
* platform/mac/fast/selectors/061-expected.txt:
* platform/mac/fast/selectors/083-expected.txt:
Those tests are changing because of the breakage of :link and :visited.

* fast/css/not-basics-expected.html: Added.
* fast/css/not-basics.html: Added.
Basic use cases of the extended :not() that should always style correctly.

* fast/css/parsing-css-not-1-expected.txt: Added.
* fast/css/parsing-css-not-1.html: Added.
* fast/css/parsing-css-not-2-expected.txt: Added.
* fast/css/parsing-css-not-2.html: Added.
* fast/css/parsing-css-not-3-expected.txt: Added.
* fast/css/parsing-css-not-3.html: Added.
* fast/css/parsing-css-not-4-expected.txt: Added.
* fast/css/parsing-css-not-4.html: Added.
* fast/css/parsing-css-not-5-expected.txt: Added.
* fast/css/parsing-css-not-5.html: Copied from LayoutTests/fast/css/parsing-css-matches-5.html.
* fast/css/parsing-css-not-6-expected.txt: Added.
* fast/css/parsing-css-not-6.html: Copied from LayoutTests/fast/css/parsing-css-matches-6.html.
* fast/css/parsing-css-not-7-expected.txt: Copied from LayoutTests/fast/css/parsing-css-matches-7-expected.txt.
* fast/css/parsing-css-not-7.html: Copied from LayoutTests/fast/css/parsing-css-matches-7.html.
* fast/css/parsing-css-not-8-expected.txt: Copied from LayoutTests/fast/css/parsing-css-matches-8-expected.txt.
* fast/css/parsing-css-not-8.html: Copied from LayoutTests/fast/css/parsing-css-matches-8.html.
* fast/css/parsing-css-not-9-expected.txt: Added.
* fast/css/parsing-css-not-9.html: Copied from LayoutTests/fast/css/parsing-css-matches-8.html.
Parsing of :not(). A lot of them were inspired by Yusuke Suzuki's test suite
for :matches(). A lot of test case apply to :not(), the main difference is that
pseudo elements must fail inside :not().

* fast/css/parsing-css-nth-child-of-4-expected.txt: Added.
* fast/css/parsing-css-nth-child-of-4.html: Added.
With the introduction of :matches(), it is possible to have arbitrarily deep pseudo elements.
The tests for :not() cover the case fixed with this patch, this addition covers :nth-child(of).

* fast/selectors/not-basics-expected.txt: Added.
* fast/selectors/not-basics.html: Added.
* fast/selectors/not-nested-expected.txt: Added.
* fast/selectors/not-nested.html: Added.
* fast/selectors/not-selector-list-expected.txt: Added.
* fast/selectors/not-selector-list.html: Added.
Test coverage for the new features.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ENABLE_CSS3_CONDITIONAL_RULES
https://bugs.webkit.org/show_bug.cgi?id=137571

Reviewed by Simon Fraser.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

We have good enough support for @supports that
it should be a consistent part of the platform. Remove
the compile-time guard.

* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::detectAtToken):
(WebCore::CSSParser::detectSupportsToken):
(WebCore::CSSParser::realLex):
* css/CSSParser.h:
* css/CSSRule.h:
* css/CSSRule.idl:
* css/CSSSupportsRule.cpp:
* css/CSSSupportsRule.h:
* css/CSSSupportsRule.idl:
* css/DOMWindowCSS.cpp:
* css/DOMWindowCSS.h:
* css/DOMWindowCSS.idl:
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collect):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
(WebCore::StyleRuleSupports::StyleRuleSupports):
* css/StyleRule.h:
(WebCore::toStyleRuleSupports):
* css/StyleSheetContents.cpp:
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* inspector/InspectorStyleSheet.cpp:
(flattenSourceData):
(WebCore::asCSSRuleList):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::css):
* page/DOMWindow.h:
* page/DOMWindow.idl:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

LayoutTests:

Unskipping tests.

* platform/ios-sim/Skipped:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Import W3C @supports tests
https://bugs.webkit.org/show_bug.cgi?id=137569
<rdar://problem/18601076>

Reviewed by Simon Fraser.

Import the tests from https://test.csswg.org/source/css-conditional-3/

We currently fail 2 tests, tracked in TestExpectations.

* TestExpectations:
* css3/conditional/w3c/LICENSE: Added.
* css3/conditional/w3c/at-supports-001-expected.html: Added.
* css3/conditional/w3c/at-supports-001.html: Added.
* css3/conditional/w3c/at-supports-002-expected.html: Added.
* css3/conditional/w3c/at-supports-002.html: Added.
* css3/conditional/w3c/at-supports-003-expected.html: Added.
* css3/conditional/w3c/at-supports-003.html: Added.
* css3/conditional/w3c/at-supports-004-expected.html: Added.
* css3/conditional/w3c/at-supports-004.html: Added.
* css3/conditional/w3c/at-supports-005-expected.html: Added.
* css3/conditional/w3c/at-supports-005.html: Added.
* css3/conditional/w3c/at-supports-006-expected.html: Added.
* css3/conditional/w3c/at-supports-006.html: Added.
* css3/conditional/w3c/at-supports-007-expected.html: Added.
* css3/conditional/w3c/at-supports-007.html: Added.
* css3/conditional/w3c/at-supports-008-expected.html: Added.
* css3/conditional/w3c/at-supports-008.html: Added.
* css3/conditional/w3c/at-supports-009-expected.html: Added.
* css3/conditional/w3c/at-supports-009.html: Added.
* css3/conditional/w3c/at-supports-010-expected.html: Added.
* css3/conditional/w3c/at-supports-010.html: Added.
* css3/conditional/w3c/at-supports-011-expected.html: Added.
* css3/conditional/w3c/at-supports-011.html: Added.
* css3/conditional/w3c/at-supports-012-expected.html: Added.
* css3/conditional/w3c/at-supports-012.html: Added.
* css3/conditional/w3c/at-supports-013-expected.html: Added.
* css3/conditional/w3c/at-supports-013.html: Added.
* css3/conditional/w3c/at-supports-014-expected.html: Added.
* css3/conditional/w3c/at-supports-014.html: Added.
* css3/conditional/w3c/at-supports-015-expected.html: Added.
* css3/conditional/w3c/at-supports-015.html: Added.
* css3/conditional/w3c/at-supports-016-expected.html: Added.
* css3/conditional/w3c/at-supports-016.html: Added.
* css3/conditional/w3c/at-supports-017-expected.html: Added.
* css3/conditional/w3c/at-supports-017.html: Added.
* css3/conditional/w3c/at-supports-018-expected.html: Added.
* css3/conditional/w3c/at-supports-018.html: Added.
* css3/conditional/w3c/at-supports-019-expected.html: Added.
* css3/conditional/w3c/at-supports-019.html: Added.
* css3/conditional/w3c/at-supports-020-expected.html: Added.
* css3/conditional/w3c/at-supports-020.html: Added.
* css3/conditional/w3c/at-supports-021-expected.html: Added.
* css3/conditional/w3c/at-supports-021.html: Added.
* css3/conditional/w3c/at-supports-022-expected.html: Added.
* css3/conditional/w3c/at-supports-022.html: Added.
* css3/conditional/w3c/at-supports-023-expected.html: Added.
* css3/conditional/w3c/at-supports-023.html: Added.
* css3/conditional/w3c/at-supports-024-expected.html: Added.
* css3/conditional/w3c/at-supports-024.html: Added.
* css3/conditional/w3c/at-supports-025-expected.html: Added.
* css3/conditional/w3c/at-supports-025.html: Added.
* css3/conditional/w3c/at-supports-026-expected.html: Added.
* css3/conditional/w3c/at-supports-026.html: Added.
* css3/conditional/w3c/at-supports-027-expected.html: Added.
* css3/conditional/w3c/at-supports-027.html: Added.
* css3/conditional/w3c/at-supports-028-expected.html: Added.
* css3/conditional/w3c/at-supports-028.html: Added.
* css3/conditional/w3c/at-supports-029-expected.html: Added.
* css3/conditional/w3c/at-supports-029.html: Added.
* css3/conditional/w3c/at-supports-030-expected.html: Added.
* css3/conditional/w3c/at-supports-030.html: Added.
* css3/conditional/w3c/at-supports-031-expected.html: Added.
* css3/conditional/w3c/at-supports-031.html: Added.
* css3/conditional/w3c/at-supports-032-expected.html: Added.
* css3/conditional/w3c/at-supports-032.html: Added.
* css3/conditional/w3c/at-supports-033-expected.html: Added.
* css3/conditional/w3c/at-supports-033.html: Added.

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