Use the Selector Code Generator for matching in SelectorQuery
https://bugs.webkit.org/show_bug.cgi?id=126185

Reviewed by Ryosuke Niwa.

Source/WebCore: 

Compile selectors on demand and use the generated binary to perform
element matching in SelectorQuery.

Tests: fast/selectors/querySelector-long-adjacent-backtracking.html
       fast/selectors/querySelector-long-child-backtracking.html
       fast/selectors/querySelector-mixed-child-adjacent-backtracking.html
       fast/selectors/querySelector-multiple-simple-child-backtracking.html
       fast/selectors/querySelector-simple-adjacent-backtracking.html
       fast/selectors/querySelector-simple-child-backtracking.html

* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
(WebCore::SelectorDataList::executeCompiledSelectorCheckerWithContext):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:

LayoutTests: 

Add some tests for longer backtracking cases typically not covered by the other tests.

* fast/selectors/querySelector-long-adjacent-backtracking-expected.txt: Added.
* fast/selectors/querySelector-long-adjacent-backtracking.html: Added.
* fast/selectors/querySelector-long-child-backtracking-expected.txt: Added.
* fast/selectors/querySelector-long-child-backtracking.html: Added.
* fast/selectors/querySelector-mixed-child-adjacent-backtracking-expected.txt: Added.
* fast/selectors/querySelector-mixed-child-adjacent-backtracking.html: Added.
* fast/selectors/querySelector-multiple-simple-child-backtracking-expected.txt: Added.
* fast/selectors/querySelector-multiple-simple-child-backtracking.html: Added.
* fast/selectors/querySelector-simple-adjacent-backtracking-expected.txt: Added.
* fast/selectors/querySelector-simple-adjacent-backtracking.html: Added.
* fast/selectors/querySelector-simple-child-backtracking-expected.txt: Added.
* fast/selectors/querySelector-simple-child-backtracking.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reduce use of String::characters
https://bugs.webkit.org/show_bug.cgi?id=126854

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* API/JSValueRef.cpp:
(JSValueMakeFromJSONString): Use characters16 instead of characters for 16-bit case.
Had to remove length check because an empty string could be either 8 bit or 16 bit.
Don't need a null string check before calling is8Bit because JSStringRef can't hold
a null string.

* bindings/ScriptValue.cpp:
(Deprecated::jsToInspectorValue): Use the existing string here instead of creating
a new one by calling characters and length on the old string. I think this may be
left over from when string types were not the same in JavaScriptCore and WebCore.
Also rewrite the property names loop to use modern for syntax and fewer locals.

* inspector/InspectorValues.cpp:
(Inspector::escapeChar): Changed to use appendLiteral instead of hard-coding string
lengths. Moved handling of "<" and ">" in here instead of at the call site.
(Inspector::doubleQuoteString): Simplify the code so there is no use of characters
and length. This is still an inefficient way of doing this job and could use a rethink.

* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate): Use RetainPtr, createCFString, and the conversion from
CFStringRef to WTF::String to remove a lot of unneeded code.

* runtime/Identifier.h: Removed unneeded Identifier::characters function.

* runtime/JSStringBuilder.h:
(JSC::JSStringBuilder::append): Use characters16 instead of characters function here,
since we have already checked is8Bit above.

Source/WebCore:

* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
Get rid of unneeded code to turn a WTF::String into an NSString, since that's
built into the WTF::String class.

* editing/CompositeEditCommand.cpp:
(WebCore::containsOnlyWhitespace): Use WTF::String's [] operator instead of
an explicit call to the characters function. Small performance cost.
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertText): Ditto.

* editing/VisibleUnits.cpp:
(WebCore::startOfParagraph): Use reverseFind instead of writing our own loop.
(WebCore::endOfParagraph): Use find instead of writing our own loop.

* html/parser/HTMLParserIdioms.cpp:
(WebCore::stripLeadingAndTrailingHTMLSpaces): Use characters16 instead of
characters since we have already checked is8Bit.
(WebCore::parseHTMLNonNegativeInteger): Ditto. Replace the length check with
a check of isNull since a zero length string could be 8 bit, but it's not
safe to call is8Bit on a null WTF::String. (That should probably be fixed.)

* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::createSearchRegexSource): Use StringBuilder
instead of String in code that builds up a string one character at a time.
The old way was ridiculously slow because it allocated a new string for every
character; the new way still isn't all that efficient, but it's better. Also
changed to use strchr instead of WTF::String::find for special characters.

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): Use WTF::String's
[] operator instead of an explicit call to the characters function.
* inspector/InspectorStyleTextEditor.cpp:
(WebCore::InspectorStyleTextEditor::insertProperty): Ditto.
(WebCore::InspectorStyleTextEditor::internalReplaceProperty): Ditto.
* platform/Length.cpp:
(WebCore::newCoordsArray): Ditto.

* platform/LinkHash.cpp:
(WebCore::visitedLinkHash): Use characters16 instead of characters since
we have already checked is8Bit. Replace the length check with a check of
isNull (as above in parseHTMLNonNegativeInteger).

* platform/graphics/Color.cpp:
(WebCore::Color::parseHexColor): Use characters16 since we already checked is8Bit.
(WebCore::Color::Color): Ditto.

* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun): Use characters16 instead of characters since
we have already checked is8Bit. Replace the length check with a check of
isNull (as above in parseHTMLNonNegativeInteger).

* platform/text/TextEncodingRegistry.cpp:
(WebCore::atomicCanonicalTextEncodingName): Use characters16 instead of
characters since we already checked is8Bit. Also use isEmpty instead of !length.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun): Use characters16 instead of characters
since we have already checked is8Bit. Replace the length check with a check of
isNull (as above in parseHTMLNonNegativeInteger).

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::width): Check for zero length instead of checking
for null characters.

* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::registerLigaturesInGlyphCache): Rewrite ligatures
for loop and give local variables a better name. Construct the substring with
the substring function. Still a really inefficient approach -- allocating a new
string for every character is absurdly expensive.

* xml/XPathFunctions.cpp:
(WebCore::XPath::FunId::evaluate): Use String instead of StringBuilder. Still
not all that efficient, but better than before. Use substring to construct the
substring.

* xml/XPathNodeSet.h: Added begin and end functions so we can use a C++11 for
loop with this class.

Source/WTF:

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace): Use characters16 here since is8Bit was already checked.
* wtf/text/WTFString.h:
(WTF::String::isAllSpecialCharacters): Use characters16 here since is8Bit was
already checked. Also renamed "len" to "length".

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Mac build after r161777.

* gtest/xcode/Config/General.xcconfig: AspenFamily.xcconfig excludes
macosx from SUPPORTED_PLATFORMS, so add it back in ourselves.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the Windows build after r161839.

* WebCore.vcxproj/WebCoreCommon.props:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] Error messages should use source code labels, not internal mangled symbols.
https://bugs.webkit.org/show_bug.cgi?id=126832

Reviewed by Dean Jackson.

Source/WebCore: 

Revised fast/canvas/webgl/glsl-conformance.html.

* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::getSymbolInfo): Correct missing 'break'.
(WebCore::ANGLEWebKitBridge::compileShaderSource): Call 'getSymbolInfo'
for SH_VARYINGS.
* platform/graphics/GraphicsContext3D.h: Add new declarations.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::compileShader): Demangle log output.
(WebCore::GraphicsContext3D::mappedSymbolName): Added.
(WebCore::GraphicsContext3D::getUnmangledInfoLog): Added.
(WebCore::GraphicsContext3D::getProgramInfoLog): Demangle log output.
(WebCore::GraphicsContext3D::getShaderInfoLog): Demangle log output.

LayoutTests: 

* fast/canvas/webgl/glsl-conformance.html: Add log to program output
showing error message to confirm proper labels are being used.
* fast/canvas/webgl/glsl-conformance-expected.txt: updated.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TextBreakIterator's should support Latin-1 for all iterator types (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=126856

Reviewed by Darin Adler.

- Do some initial cleanup before adding complete Latin-1 support.

* platform/text/TextBreakIterator.cpp:
Remove non-ICU acquireLineBreakIterator() implementation.

* platform/text/TextBreakIterator.h:
- Changes acquireLineBreakIterator() to take a StringView.

* platform/text/TextBreakIteratorICU.cpp:
- Refactor iterator initialization and setting of text on the iterator.
- Add support for using a Latin-1 provider (this is not currently used).

* platform/text/icu/UTextProviderLatin1.cpp:
* platform/text/icu/UTextProviderLatin1.h:
- Add back non-context aware Latin-1 provider (from r129662).
- Rename context aware provider.

* platform/text/icu/UTextProviderUTF16.cpp:
* platform/text/icu/UTextProviderUTF16.h:
- Rename context aware provider.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Fix the build

For now, ensure we build WebKit System Interface before we build WebKit.
We'll remove this constraint and the constraint to build WebKit Additions
in a subsequent commit.

* Scripts/build-webkit:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use an std::atomic<uint32_t> when computing IDBDatabase transaction IDs
https://bugs.webkit.org/show_bug.cgi?id=126853

Reviewed by Sam Weinig.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::nextTransactionId):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove all uses of AtomicallyInitializedStatic from WebCore
https://bugs.webkit.org/show_bug.cgi?id=126861

Reviewed by Darin Adler.

* Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
(WebCore::transactions):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::originMap):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::encodingRegistryMutex):
(WebCore::newTextCodec):
(WebCore::atomicCanonicalTextEncodingName):
(WebCore::dumpTextEncodingNameMap):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::DefaultSharedWorkerRepository::instance):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the 32-bit build.

* platform/text/icu/UTextProviderLatin1.cpp:
(WebCore::uTextLatin1Clone):
(WebCore::uTextLatin1Extract):
(WebCore::uTextLatin1MapNativeIndexToUTF16):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove the last remaining uses of AtomicallyInitializedStatic
https://bugs.webkit.org/show_bug.cgi?id=126863

Reviewed by Darin Adler.

Source/WebKit2:

* Shared/mac/SecItemShim.cpp:
(WebKit::responseMap):

Source/WTF:

* wtf/HashTable.cpp:
(WTF::hashTableStatsMutex):
(WTF::HashTableStats::recordCollisionAtCount):
(WTF::HashTableStats::dumpStats):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::cachedCollatorMutex):
(WTF::Collator::createCollator):
(WTF::Collator::releaseCollator):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add type checking to isEqual methods
https://bugs.webkit.org/show_bug.cgi?id=126862

Reviewed by Anders Carlsson.

Source/WebCore:

* page/ios/WebEventRegion.mm:
(-[WebEventRegion isEqual:]): Add type checking on the argument.
Add a FIXME about the lack of a hash method override. Formatted to match
the usual WebKit coding style.

Source/WebKit/ios:

* WebCoreSupport/WebVisiblePosition.mm:
(-[WebVisiblePosition isEqual:]): Add type checking on the argument.
Add a FIXME about the lack of a hash method override. Simplified by
removing the unneeded local variables.

Source/WebKit/mac:

* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin isEqual:]): Added a FIXME about the lack of a hash method
override. Tweaked formatting.

* WebView/WebDashboardRegion.mm:
(-[WebDashboardRegion isEqual:]): Added type checking on the argument. Added a
FIXME about the lack of a hash method override.

Source/WebKit2:

* UIProcess/API/ios/WKInteractionView.mm:
(-[WKTextRange isEqual:]): Added type checking for the argument. The old
code asserted instead, and it's not clear what guarantees that assertion is
true. Added a FIXME about the lack of a hash method. Added another FIXME
about the fact that this method ignores much of the object state. Removed
an unneeded extra fetch of the isRange property. Deleted some dead code.
(-[WKTextPosition isEqual:]): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add deprecatedCharacters as a synonym for characters and convert most call sites
https://bugs.webkit.org/show_bug.cgi?id=126858

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* API/JSStringRef.cpp:
(JSStringGetCharactersPtr):
(JSStringGetUTF8CString):
(JSStringIsEqual):
* API/JSStringRefCF.cpp:
(JSStringCopyCFString):
* API/OpaqueJSString.h:
(OpaqueJSString::characters):
(OpaqueJSString::deprecatedCharacters):
(OpaqueJSString::length):
(OpaqueJSString::OpaqueJSString):
* inspector/InspectorValues.cpp:
(Inspector::InspectorValue::parseJSON):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseInt):
* runtime/StringPrototype.cpp:
(JSC::localeCompare):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncLink):
Use deprecatedCharacters instead of characters.

Source/WebCore:

* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::IDBKeyPathLexer::IDBKeyPathLexer):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol):
(WebCore::ThreadableWebSocketChannelClientWrapper::setExtensions):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasMisspelling):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::write):
* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
* dom/Document.cpp:
(WebCore::Document::parseQualifiedName):
* editing/Editor.cpp:
(WebCore::Editor::misspelledWordAtCaretOrRange):
(WebCore::Editor::misspelledSelectionString):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
(WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
* editing/TextCheckingHelper.h:
(WebCore::TextCheckingParagraph::textDeprecatedCharacters):
* editing/TextIterator.cpp:
(WebCore::collapsedSpaceLength):
(WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
(WebCore::containsKanaLetters):
(WebCore::SearchBuffer::SearchBuffer):
* editing/TextIterator.h:
(WebCore::TextIterator::characters):
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::characterAfter):
* editing/VisibleUnits.cpp:
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::visualWordPosition):
(WebCore::previousBoundary):
(WebCore::nextBoundary):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append):
* html/FormDataList.cpp:
(WebCore::FormDataList::appendString):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::normalizeSpaces):
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
* loader/appcache/ManifestParser.cpp:
(WebCore::parseManifest):
* page/ContentSecurityPolicy.cpp:
(WebCore::isSourceListNone):
(WebCore::CSPSourceList::parse):
(WebCore::NonceDirective::parse):
(WebCore::MediaListDirective::parse):
(WebCore::CSPDirectiveList::parse):
(WebCore::CSPDirectiveList::parseReportURI):
(WebCore::CSPDirectiveList::parseReflectedXSS):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
(WebCore::PageSerializer::serializeCSSStyleSheet):
* platform/Length.cpp:
(WebCore::newCoordsArray):
(WebCore::newLengthArray):
* platform/LinkHash.cpp:
(WebCore::visitedURL):
(WebCore::visitedLinkHash):
* platform/SharedBuffer.cpp:
(WebCore::utf8Buffer):
* platform/URL.cpp:
(WebCore::URL::port):
(WebCore::encodeHostnames):
* platform/graphics/StringTruncator.cpp:
(WebCore::centerTruncateToBuffer):
(WebCore::rightTruncateToBuffer):
(WebCore::rightClipToCharacterBuffer):
(WebCore::rightClipToWordBuffer):
(WebCore::leftTruncateToBuffer):
(WebCore::truncateString):
(WebCore::StringTruncator::width):
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
* platform/network/FormDataBuilder.cpp:
(WebCore::FormDataBuilder::addFilenameToMultiPartHeader):
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::bindBlob):
(WebCore::SQLiteStatement::bindText):
* platform/text/DecodeEscapeSequences.h:
(WebCore::decodeEscapeSequences):
* platform/text/TextBreakIterator.cpp:
(WebCore::numGraphemeClusters):
(WebCore::numCharactersInGraphemeClusters):
* platform/text/TextBreakIteratorICU.cpp:
(WebCore::setUpIteratorWithRules):
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::encode):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderText.cpp:
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::computeCanUseSimpleFontCodePath):
* rendering/RenderText.h:
(WebCore::RenderText::characters):
(WebCore::RenderText::deprecatedCharacters):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::tryHyphenating):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::processRenderSVGInlineText):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::measureCharacterRange):
(WebCore::SVGTextMetrics::SVGTextMetrics):
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
* svg/SVGAngle.cpp:
(WebCore::SVGAngle::setValueAsString):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::parsePoint):
* svg/SVGAnimationElement.cpp:
(WebCore::parseKeySplines):
* svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::parseViewBox):
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection):
* svg/SVGGlyphMap.h:
(WebCore::SVGGlyphMap::addGlyph):
(WebCore::SVGGlyphMap::collectGlyphsForString):
* svg/SVGGlyphRefElement.cpp:
(WebCore::SVGGlyphRefElement::parseAttribute):
* svg/SVGLength.cpp:
(WebCore::SVGLength::setValueAsString):
* svg/SVGLengthList.cpp:
(WebCore::SVGLengthList::parse):
* svg/SVGNumberList.cpp:
(WebCore::SVGNumberList::parse):
* svg/SVGParserUtilities.cpp:
(WebCore::parseNumberFromString):
(WebCore::parseNumberOptionalNumber):
(WebCore::parseRect):
(WebCore::pointsListFromSVGData):
(WebCore::parseGlyphName):
(WebCore::parseKerningUnicodeString):
(WebCore::parseDelimitedString):
* svg/SVGPreserveAspectRatio.cpp:
(WebCore::SVGPreserveAspectRatio::parse):
* svg/SVGStringList.cpp:
(WebCore::SVGStringList::parse):
* svg/SVGTransformList.cpp:
(WebCore::SVGTransformList::parse):
* svg/SVGTransformable.cpp:
(WebCore::SVGTransformable::parseTransformType):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::parseViewSpec):
* svg/SVGZoomAndPan.h:
(WebCore::SVGZoomAndPan::parseAttribute):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::parseString):
* xml/XSLTUnicodeSort.cpp:
(WebCore::xsltUnicodeSortFunction):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::doWrite):
(WebCore::parseAttributes):
Use deprecatedCharacters instead of characters.

Source/WebKit/mac:

* History/BinaryPropertyList.cpp:
(BinaryPropertyListSerializer::appendStringObject):
Use deprecatedCharacters instead of characters.

Source/WebKit2:

* Shared/APIString.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::checkTextOfParagraph):
(WebKit::WebPageProxy::checkSpellingOfString):
(WebKit::WebPageProxy::checkGrammarOfString):
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::encodeString):
Use deprecatedCharacters instead of characters.

Source/WTF:

* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal):
(WTF::SubstringTranslator::hash):
(WTF::SubstringTranslator::equal):
* wtf/text/AtomicString.h:
(WTF::AtomicString::characters):
* wtf/text/Base64.cpp:
(WTF::base64Decode):
(WTF::base64URLDecode):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::characters):
(WTF::StringBuilder::deprecatedCharacters):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::getData16SlowCase):
(WTF::StringImpl::upper):
(WTF::StringImpl::lower):
(WTF::StringImpl::find):
(WTF::StringImpl::findIgnoringCase):
* wtf/text/StringImpl.h:
(WTF::StringImpl::characters):
(WTF::StringImpl::deprecatedCharacters):
(WTF::StringImpl::getCharacters<UChar>):
(WTF::equalIgnoringNullity):
* wtf/text/WTFString.cpp:
(WTF::String::append):
(WTF::String::appendInternal):
(WTF::String::insert):
(WTF::String::truncate):
(WTF::String::percentage):
* wtf/text/WTFString.h:
(WTF::String::characters):
(WTF::String::deprecatedCharacters):
(WTF::String::getCharactersWithUpconvert<UChar>):
(WTF::append):
Use deprecatedCharacters instead of characters.

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

Reviewed by Darin Adler.

* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
* wtf/ThreadingWin.cpp:
(WTF::initializeThreading):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add PLATFORM(COCOA) and USE(FOUNDATION)
https://bugs.webkit.org/show_bug.cgi?id=126859

Reviewed by Anders Carlsson.

Source/WebCore:

* config.h: Use PLATFORM(COCOA) instead of PLATFORM(MAC) || PLATFORM(IOS)
to set USE(FILE_LOCK). Would be nice to use OS(DARWIN), but that would be
a change in behavior that might be incorrect. Removed bogus comments in
the USE(NEW_THEME) setting code. Removed redundant code to set USE(CA),
which exactly duplicates code that already exists in Platform.h.

Source/WTF:

* wtf/Platform.h: Added PLATFORM(COCOA), which for now is set at exactly the same
times that PLATFORM(MAC) is. Added USE(FOUNDATION), which is set at the same times
that PLATFORM(COCOA) is. Re-organize the PLATFORM(MAC) and PLATFORM(IOS) settings
in the header so they are a bit easier to read. Put HAVE_LANGINFO_H in with the
rest of the OS(UNIX) settings and put HAVE_READLINE in with the rest of the
OS(DARWIN) settings. Tweak formatting a bit.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix iOS build breakage from http://trac.webkit.org/changeset/161844
https://bugs.webkit.org/show_bug.cgi?id=126866

Reviewed by Simon Fraser.

* platform/text/TextBreakIteratorICU.cpp:
(WebCore::cursorMovementIterator): Use initializeIterator instead of createSharedIterator,
which does not exist.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix an assertion failure in initializeDates() when launching Safari, which was introduced in r161852.

Reviewed by Andy Estes.

* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading): Set isInitialized to true.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the Windows build after r161852.

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Make API tests work again
https://bugs.webkit.org/show_bug.cgi?id=126769

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2014-01-12
Reviewed by Gyuyoung Kim.

The EFL and WK2 test binaries are currently being generated at *TestWebKitAPI/
[E]WebKit2, respectively, and this causes problems because the logic to find
where WebProcess is to look in the same directory of the running process and
then proceed to use LIBEXECDIR (typically /usr/loca/bin).

This patch introduces a WEBKIT_EXEC_PATH environment variable, inspired in the
Gtk port, which allows us to look for WebProcess initially in this directory,
if it's defined.

.:

* Source/cmake/OptionsEfl.cmake: Define WEBKIT_EXEC_PATH, to be used by
[E]WebKit2 tests.

Source/WebKit2:

* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::findProcessPath): Change the logic to look initially in
WEBKIT_EXEC_PATH, then proceed with the existing checks.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::EWK2UnitTestEnvironment):
Define WEBKIT_EXEC_PATH to be used by EWebKit2 tests.

Tools:

* TestWebKitAPI/efl/main.cpp:
(main): Define WEBKIT_EXEC_PATH to be used by WebKit2 API tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed test maintenance.

* platform/mac/TestExpectations: Re-enable the typedarray/data-view-test.html
WebGL test now that it works properly.



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