Web Inspector: introduce WebInspector.TextUtils
https://bugs.webkit.org/show_bug.cgi?id=109289

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-02-11
Reviewed by Pavel Feldman.

Add new WebInspector.TextUtils file and extract commonly used
text-operation subroutines from DefaultTextEditor into it.

No new tests: no change in behaviour.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
(WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
(WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
* inspector/front-end/TextUtils.js: Added.
(WebInspector.TextUtils.isStopChar):
(WebInspector.TextUtils.isWordChar):
(WebInspector.TextUtils.isSpaceChar):
(WebInspector.TextUtils.isWord):
(WebInspector.TextUtils.isBraceChar):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[QT] Regression (r142444): Broke qt linux minimal build
https://bugs.webkit.org/show_bug.cgi?id=109423

Patch by Alexander Shalamov <alexander.shalamov@intel.com> on 2013-02-11
Reviewed by Kenneth Rohde Christiansen.

Test: cssom/cssvalue-comparison.html

* css/CSSValue.cpp:
(WebCore::CSSValue::equals):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: fix closure compiler warnings in the profiler code
https://bugs.webkit.org/show_bug.cgi?id=109432

Reviewed by Pavel Feldman.

Updated type annotations to match the code.

* inspector/front-end/NativeMemorySnapshotView.js:
* inspector/front-end/ProfilesPanel.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: WebInspector.Project refactorings.
https://bugs.webkit.org/show_bug.cgi?id=109433

Reviewed by Alexander Pavlov.

Source/WebCore:

This change prepares Workspace and Project to migration to project-per-domain mode for network based projects.
Renamed WebInspector.WorkspaceProvider to WebInspector.ProjectDelegate.
Renamed Project.name() to Project.id() and delegated it to project delegate.
Added Project.displayName() method that is delegated to project delegate.
SimpleWorkspaceProvider is now responsible for creation of SimpleWorkspaceDelegates and
isolates various mappings from Project/ProjectDelegate concept.
UISourceCode is now created based on path in the project.
UISourceCode uri is now calculated based on project and path (right now uri is equal to path).

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/FileSystemProjectDelegate.js: Renamed from Source/WebCore/inspector/front-end/FileSystemWorkspaceProvider.js.
(WebInspector.FileSystemProjectDelegate):
(WebInspector.FileSystemProjectDelegate.prototype.id):
(WebInspector.FileSystemProjectDelegate.prototype.type):
(WebInspector.FileSystemProjectDelegate.prototype.displayName):
(WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
(WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
(WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
(WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
(WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
(WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
(WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
(WebInspector.FileSystemProjectDelegate.prototype._populate):
(WebInspector.FileSystemProjectDelegate.prototype._addFile):
(WebInspector.FileSystemProjectDelegate.prototype._removeFile):
(WebInspector.FileSystemProjectDelegate.prototype.reset):
(WebInspector.FileSystemUtils):
(WebInspector.FileSystemUtils.errorHandler):
(WebInspector.FileSystemUtils.requestFileSystem):
(.fileSystemLoaded):
(.innerCallback):
(WebInspector.FileSystemUtils.requestFilesRecursive):
(.fileEntryLoaded):
(.fileLoaded):
(.readerLoadEnd):
(WebInspector.FileSystemUtils.requestFileContent):
(.fileWriterCreated.fileTruncated):
(.fileWriterCreated):
(.writerEnd):
(WebInspector.FileSystemUtils.setFileContent):
(WebInspector.FileSystemUtils._getDirectory):
(.toArray):
(WebInspector.FileSystemUtils._readDirectory):
(WebInspector.FileSystemUtils._requestEntries):
* inspector/front-end/IsolatedFileSystemModel.js:
(WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
* inspector/front-end/SimpleWorkspaceProvider.js:
(WebInspector.SimpleProjectDelegate):
(WebInspector.SimpleProjectDelegate.prototype.id):
(WebInspector.SimpleProjectDelegate.prototype.displayName):
(WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
(WebInspector.SimpleProjectDelegate.prototype.setFileContent):
(WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
(WebInspector.SimpleProjectDelegate.prototype.addFile):
(WebInspector.SimpleProjectDelegate.prototype._uniquePath):
(WebInspector.SimpleProjectDelegate.prototype.removeFile):
(WebInspector.SimpleProjectDelegate.prototype.reset):
(WebInspector.SimpleWorkspaceProvider):
(WebInspector.SimpleWorkspaceProvider.uriForURL):
(WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
(WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
(WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
(WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
(WebInspector.SimpleWorkspaceProvider.prototype.reset):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
(WebInspector.UISourceCode.prototype.path):
(WebInspector.UISourceCode.prototype.uri):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/Workspace.js:
(WebInspector.FileDescriptor):
(WebInspector.ProjectDelegate):
(WebInspector.ProjectDelegate.prototype.id):
(WebInspector.ProjectDelegate.prototype.displayName):
(WebInspector.ProjectDelegate.prototype.requestFileContent):
(WebInspector.ProjectDelegate.prototype.setFileContent):
(WebInspector.ProjectDelegate.prototype.searchInFileContent):
(WebInspector.Project):
(WebInspector.Project.prototype.id):
(WebInspector.Project.prototype.type):
(WebInspector.Project.prototype.displayName):
(WebInspector.Project.prototype.isServiceProject):
(WebInspector.Project.prototype._fileAdded):
(WebInspector.Project.prototype._fileRemoved):
(WebInspector.Project.prototype._reset):
(WebInspector.Project.prototype.uiSourceCode):
(WebInspector.Project.prototype.uiSourceCodeForOriginURL):
(WebInspector.Project.prototype.uiSourceCodeForURI):
(WebInspector.Project.prototype.uiSourceCodes):
(WebInspector.Project.prototype.requestFileContent):
(WebInspector.Project.prototype.setFileContent):
(WebInspector.Project.prototype.searchInFileContent):
(WebInspector.Project.prototype.dispose):
(WebInspector.Workspace.prototype.uiSourceCode):
(WebInspector.Workspace.prototype.uiSourceCodeForURI):
(WebInspector.Workspace.prototype.addProject):
(WebInspector.Workspace.prototype.removeProject):
(WebInspector.Workspace.prototype.project):
(WebInspector.Workspace.prototype.uiSourceCodes):
(WebInspector.Workspace.prototype.projectForUISourceCode):
* inspector/front-end/inspector.html:

LayoutTests:

* inspector/debugger/live-edit-breakpoints.html:
* inspector/uisourcecode-revisions.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename PreloadTask to StartTagScanner to match its purpose
https://bugs.webkit.org/show_bug.cgi?id=109406

Reviewed by Sam Weinig.

As discussed in bug 107807.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::StartTagScanner::StartTagScanner):
(WebCore::StartTagScanner::processAttributes):
(WebCore::HTMLPreloadScanner::processToken):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed revert test fix attempt and skip it.

* inspector/editor/text-editor-home-button.html:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WKTR] Regression(r141836) fast/dom/Window/mozilla-focus-blur.html started failing
https://bugs.webkit.org/show_bug.cgi?id=109438

Reviewed by Kenneth Rohde Christiansen.

Some refactoring in r141836 caused the view not to get focus if the focused
frame is not the main one. The idea of the code was to remove focus from the
view if the focused frame was not the main one, and then focus the view again.
However, after the refactoring, the second step never happened: Focus was
removed but not given again.

* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::focus):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Skip fast/forms/number/number-l10n-input.html that was added in r142122
but fails on EFL port.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add graphics subdirectory to include path.
https://bugs.webkit.org/show_bug.cgi?id=109437

Patch by Mike Lattanzio <mlattanzio@rim.com> on 2013-02-11
Reviewed by Rob Buis.

Add browser/platform/graphics to include path.

Internal review by Jeff Rogers.

* Scripts/webkitdirs.pm:
(blackberryCMakeArguments):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove AttributeBase now that NEW_XML is gone
https://bugs.webkit.org/show_bug.cgi?id=109408

Reviewed by Adam Barth.

Just deleting code.  HTMLToken::Attribute is now just
the real class and not a typedef.

* html/parser/CompactHTMLToken.cpp:
(WebCore::CompactHTMLToken::CompactHTMLToken):
* html/parser/HTMLTokenizer.cpp:
(WebCore::AtomicHTMLToken::nameForAttribute):
* xml/parser/MarkupTokenBase.h:
(WebCore):
(MarkupTokenBase):
(Attribute):
(Range):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC build failing with verbose debug mode
https://bugs.webkit.org/show_bug.cgi?id=109441

Reviewed by Darin Adler.

Fixing some verbose messages which caused build errors.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::mergeToSuccessors):
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::performBlockCFA):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::setReplacement):
(JSC::DFG::CSEPhase::eliminate):
* dfg/DFGPredictionInjectionPhase.cpp:
(JSC::DFG::PredictionInjectionPhase::run):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add form navigation control state tracking.
https://bugs.webkit.org/show_bug.cgi?id=109300

Reviewed by Rob Buis.

Add form navigation control state tracking.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::focusNextField):
(WebKit):
(BlackBerry::WebKit::WebPage::focusPreviousField):
(BlackBerry::WebKit::WebPage::submitForm):
* Api/WebPage.h:
* Api/WebPageClient.h:
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::InputHandler):
(BlackBerry::WebKit::InputHandler::setElementUnfocused):
(BlackBerry::WebKit::InputHandler::updateFormState):
* WebKitSupport/InputHandler.h:
(InputHandler):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler
https://bugs.webkit.org/show_bug.cgi?id=108670

Reviewed by Kentaro Hara.

Source/WebCore:

Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
listeners, as those listeners may close the database in response to events.

Also, removed extraneous super-calls from hasPendingActivity() overrides.

Test: storage/indexeddb/database-wrapper.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::hasPendingActivity): Implemented.
* Modules/indexeddb/IDBDatabase.h: Declared.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::hasPendingActivity): Simplified.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::hasPendingActivity): Simplified.

LayoutTests:

* storage/indexeddb/database-wrapper-expected.txt: Added.
* storage/indexeddb/database-wrapper.html: Added.
* storage/indexeddb/resources/database-wrapper.js: Added.
(test):
(openDB):
(onUpgradeNeeded):
(openSuccess.get request.onsuccess):
(onVersionChange):
(collectGarbage):
(openAgain):
(onBlocked):
(openAgainSuccess):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move WebVTTToken off of MarkupTokenBase
https://bugs.webkit.org/show_bug.cgi?id=109410

Reviewed by Tony Gentilcore.

This introduces a small amount of "copy/paste" code
but actually makes WebVTTToken much smaller and simpler!
This also frees the HTMLParser to have its Token class
back to itself so we can tune it to make HTML faster.

* html/track/WebVTTToken.h:
(WebVTTToken):
(WebCore::WebVTTToken::WebVTTToken):
(WebCore::WebVTTToken::appendToName):
(WebCore::WebVTTToken::type):
(WebCore::WebVTTToken::name):
(WebCore::WebVTTToken::ensureIsCharacterToken):
(WebCore::WebVTTToken::appendToCharacter):
(WebCore::WebVTTToken::beginEmptyStartTag):
(WebCore::WebVTTToken::beginStartTag):
(WebCore::WebVTTToken::beginEndTag):
(WebCore::WebVTTToken::beginTimestampTag):
(WebCore::WebVTTToken::makeEndOfFile):
(WebCore::WebVTTToken::clear):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Extensions API] expose ExtensionServerClient to tests so tests use same port as extensions API
https://bugs.webkit.org/show_bug.cgi?id=109443

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Promote extensionServer var to the outer closure, so it may be accessed by platform-specific (or test) code.

* inspector/front-end/ExtensionAPI.js:
(buildExtensionAPIInjectedScript):

LayoutTests:

- replace additional message ports used for evaluating code in front-end with normal extension transport.

* http/tests/inspector/extensions-test.js:
(initialize_ExtensionsTest.window.buildPlatformExtensionAPI):
(initialize_ExtensionsTest.InspectorTest._replyToExtension):
(initialize_ExtensionsTest.onEvaluate):
* http/tests/inspector/resources/extension-main.js:
* inspector/extensions/extensions-audits.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
https://bugs.webkit.org/show_bug.cgi?id=108640

Reviewed by Vsevolod Vlasov.

Source/WebCore:

- only set first parameter to eval() callback iff expression successfully evaluates;
- use object, not bool as second parameter;
- pass exceptions and extension errors as second parameter if evaluate failed;
- minor drive-by changes in ExtensionAPI utilities.

* inspector/front-end/ExtensionAPI.js:
(injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
(injectedExtensionAPI.InspectedWindow.prototype.):
(injectedExtensionAPI.InspectedWindow.prototype.eval):
(injectedExtensionAPI.extractCallbackArgument):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
(WebInspector.ExtensionStatus):

LayoutTests:

Rebase tests following change in exception parameter to inspectedWindow.eval() callback.

* inspector/extensions/extensions-eval-expected.txt:
* inspector/extensions/extensions-eval.html:
* inspector/extensions/extensions-sidebar-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Set mouse document position for mouse event in DRT.
https://bugs.webkit.org/show_bug.cgi?id=109094.

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-02-11
Reviewed by Rob Buis.

RIM PR 246976.
Internally Reviewed by Nima Ghanavatian & Genevieve Mak.

Set mouse document position when we create mouse event in DRT.

* DumpRenderTree/blackberry/EventSender.cpp:
(setMouseEventDocumentPos):
(mouseDownCallback):
(mouseUpCallback):
(mouseMoveToCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton
https://bugs.webkit.org/show_bug.cgi?id=109294

Reviewed by Pavel Feldman.

Source/WebCore:

Use the stack that caused style recalculation as a cause for relayout performed due to
layout invalidation caused by style recalculation.

* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.prototype.reset):
(WebInspector.TimelinePresentationModel.Record):

LayoutTests:

* inspector/timeline/timeline-layout-reason-expected.txt: Added.
* inspector/timeline/timeline-layout-reason.html: Added.
* inspector/timeline/timeline-test.js:
(initialize_Timeline.step2):
(initialize_Timeline.InspectorTest.evaluateWithTimeline): Extracted "performActions" step from performActionsAndPrint()
(initialize_Timeline.):
(initialize_Timeline.InspectorTest.performActionsAndPrint):
(initialize_Timeline.InspectorTest.findPresentationRecord.findByType):
(initialize_Timeline.InspectorTest.findPresentationRecord):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed fix after r13954 for !ENABLE(JIT) builds.

* llint/LowLevelInterpreter.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Mark fast/flexbox/line-clamp-link-after-ellipsis.html as failing
on EFL port. This test was introduced in r142335.

* platform/efl/TestExpectations:

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