Web Inspector: Find evaluates attributes in a case sensitive manner
https://bugs.webkit.org/show_bug.cgi?id=128405

Patch by Chris J. Shull <chrisjshull@gmail.com> on 2014-02-08
Reviewed by Timothy Hatcher.

Source/WebCore:

Changed matchesAttribute to ignore case.

Updated existing test with additional cases:
inspector-protocol/dom/dom-search.html

* inspector/InspectorNodeFinder.cpp:
(WebCore::InspectorNodeFinder::matchesAttribute):

LayoutTests:

Added checks for searches where capitalization in the attributes did not match the capitalization in the search. Also fleshed out other search types with checks for valid capitalization differences.

* inspector-protocol/dom/dom-search-expected.txt:
* inspector-protocol/dom/resources/dom-search-queries.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused ChromeClient::formStateDidChange().
<https://webkit.org/b/128469>

Nobody listens for this callback anymore so remove it and stop
spamming no-op virtual dispatches in forms code.

Reviewed by Anders Carlsson.

* html/FileInputType.cpp:
(WebCore::FileInputType::setFiles):
* html/HTMLFormControlElementWithState.cpp:
* html/HTMLFormControlElementWithState.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::setValue):
(WebCore::HTMLInputElement::setValueFromRenderer):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::selectOption):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateValue):
(WebCore::HTMLTextAreaElement::setValueCommon):
* loader/EmptyClients.h:
* page/ChromeClient.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using PLATFORM(MAC) in WebCore except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128464

Reviewed by Anders Carlsson.

* Modules/webaudio/AudioContext.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::AudioContext::constructCommon):
* accessibility/AccessibilityNodeObject.cpp: Ditto.
(WebCore::AccessibilityNodeObject::visibleText):
* accessibility/AccessibilityObject.h: Ditto.
* accessibility/AccessibilityRenderObject.cpp: Ditto.
(WebCore::AccessibilityRenderObject::clickPoint):
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
(WebCore::AccessibilityRenderObject::addChildren):
* accessibility/AccessibilityRenderObject.h: Ditto.
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::platform): Made it explicit that this function returns
"mac" when built for iOS.
* bindings/js/ScriptController.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::ScriptController::ScriptController):
* bindings/js/ScriptController.h: Ditto.
* crypto/CryptoKey.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
!PLATFORM(GTK) when checking for whether to use CoreCrypto.
* crypto/keys/CryptoKeyRSA.h: Ditto.
* dom/Clipboard.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* dom/Document.cpp: Ditto.
(WebCore::Document::implicitClose):
* dom/KeyboardEvent.h: Ditto.
* editing/Editor.cpp: Ditto.
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::copyImage):
* editing/Editor.h: Ditto.
* editing/FrameSelection.h: Ditto.
* editing/TypingCommand.cpp: Ditto.
(WebCore::TypingCommand::typingAddedToOpenCommand):
* history/HistoryItem.h: Ditto.
* html/HTMLMediaElement.cpp: Ditto.
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h: Ditto.
* html/HTMLPlugInElement.cpp: Ditto.
(WebCore::registeredPluginReplacements):
* html/HTMLPlugInImageElement.cpp: Ditto.
(WebCore::HTMLPlugInImageElement::setDisplayState):
* html/HTMLSelectElement.cpp: Ditto.
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/MediaControlElements.cpp: Ditto.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
* html/shadow/MediaControlElements.h: Ditto.
* inspector/InspectorIndexedDBAgent.cpp: Ditto.
* loader/CookieJar.cpp: Ditto.
* loader/DocumentLoader.cpp: Ditto.
(WebCore::DocumentLoader::dataReceived):
* loader/DocumentLoader.h: Ditto.
(WebCore::DocumentLoader::didTellClientAboutLoad):
* loader/EmptyClients.h: Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadArchive): Added !PLATFORM(IOS) around Mac-only workaround.
(WebCore::FrameLoader::defaultObjectContentType): Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::FrameLoader::subresourceCachePolicy): Ditto.
* loader/ResourceBuffer.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around functions that
are implemented using Foundation.
* loader/ResourceLoadScheduler.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::ResourceLoadScheduler::scheduleLoad):
* loader/ResourceLoader.cpp: Ditto.
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
* loader/ResourceLoader.h: Ditto.
* loader/archive/cf/LegacyWebArchive.cpp: Ditto.
* loader/cache/CachedResource.cpp: Changed PLATFORM(MAC) to USE(FOUNDATION) around function
that is implemented using other USE(FOUNDATION)-guarded code.
* loader/cache/CachedResource.h: Ditto.
* page/Chrome.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* page/ChromeClient.h: Ditto.
* page/ContextMenuClient.h: Ditto.
* page/ContextMenuController.cpp: Ditto.
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::createAndAppendFontSubMenu):
(WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DragClient.h: Ditto.
* page/DragController.cpp: Ditto.
(WebCore::dragLocForDHTMLDrag):
(WebCore::dragLocForSelectionDrag):
(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
* page/EditorClient.h: Ditto.
* page/EventHandler.cpp: Ditto.
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::handleMouseDraggedEvent):
(WebCore::EventHandler::logicalScrollRecursively):
(WebCore::EventHandler::clearDragState):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::defaultWheelEventHandler):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
* page/EventHandler.h: Ditto.
* page/FrameView.cpp: Ditto.
(WebCore::FrameView::layout):
* page/Page.h: Ditto.
* page/Settings.cpp: Ditto.
* page/Settings.h: Ditto.
* page/scrolling/ScrollingCoordinator.cpp: Ditto.
* page/scrolling/ScrollingCoordinator.h: Ditto.
* page/scrolling/ScrollingStateNode.h: Removed unused #include.
* page/scrolling/ScrollingThread.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::ScrollingThread::createThreadIfNeeded):
* page/scrolling/ScrollingThread.h: Ditto.
* platform/network/cf/ResourceRequest.h: Added !PLATFORM(IOS) around
applyWebArchiveHackForMail.
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
* plugins/PluginViewNone.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA)
* rendering/RenderBox.cpp: Ditto.
(WebCore::RenderBox::logicalScroll):
* rendering/RenderLayerBacking.cpp: Ditto.
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
* rendering/RenderMenuList.h: Ditto.
* rendering/RenderText.cpp: Ditto.
(WebCore::RenderText::previousOffsetForBackwardDeletion):
* rendering/break_lines.cpp: Removed unused #include.
* testing/js/WebCoreTestSupport.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* xml/XSLStyleSheetLibxslt.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
!PLATFORM(GTK) around soft-linking libxslt.
* xml/XSLTExtensions.cpp: Ditto.
* xml/XSLTProcessorLibxslt.cpp: Ditto.
* xml/XSLTUnicodeSort.cpp: Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused ChromeClient::layoutUpdated().
<https://webkit.org/b/128470>

Nobody listens for this callback anymore so remove it.

Reviewed by Anders Carlsson.

* page/Chrome.cpp:
* page/Chrome.h:
* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::layout):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using getCharactersWithUpconvert in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=128457

Reviewed by Andreas Kling.

Source/JavaScriptCore:

Change substituteBackreferencesSlow to take StringViews and use a StringBuilder instead of upconverting
if the source or replacement strings area 16-bit.

* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow):
(JSC::substituteBackreferences):

Source/WTF:

* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
Add a new overload that takes a StringView.

* wtf/text/StringView.h:
(WTF::StringView::find):
Add new find member function.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: storage/indexeddb/mozilla/cursors.html fails
<rdar://problem/16017998> and https://bugs.webkit.org/show_bug.cgi?id=128423

Reviewed by Dan Bernstein.

Source/WebCore:

Tested by storage/indexeddb/mozilla/cursors.html (And probably others)

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::OpenCursorOperation::perform): Distinguish between an error while opening the cursor
  and opening a cursor that points to no records.

Source/WebKit2:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::internalAdvanceOnce): Store the primary key for object store cursors.
(WebKit::SQLiteIDBCursor::iterate): We’re not supposed to check for equality to the target key.
  Depending on the direction of the cursor we should check for the next highest or next lowest key.

LayoutTests:

* platform/mac-wk2/TestExpectations: Unskip storage/indexeddb/mozilla/cursors.html.

Revert the change to storage/indexeddb/mozilla/clear.html as it is now clear how a
null cursor might be returned from openCursor:
* storage/indexeddb/mozilla/clear-expected.txt:
* storage/indexeddb/mozilla/resources/clear.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: storage/indexeddb/mozilla/versionchange-abort.html fails
<rdar://problem/16018887> and https://bugs.webkit.org/show_bug.cgi?id=128442

Reviewed by Dan Bernstein.

Source/WebCore:

Tested by storage/indexeddb/mozilla/versionchange-abort.html (and probably others)

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::version): If the version is NoIntVersion, return DefaultIntVersion to script.

LayoutTests:

* platform/mac-wk2/TestExpectations: Enable the test.
  Also add all the other storage/indexeddb/mozilla test with expectations as they
  are what I’m focusing on right now.

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