Web Inspector: move completions calculation into RuntimeModel (part 1)
https://bugs.webkit.org/show_bug.cgi?id=98053

Reviewed by Yury Semikhatsky.

Source/WebCore:

- moves current execution context state into runtime model
- moves completionsForTextPrompt and its private helpers into runtime model
- makes text prompt use generic expression stop characters by default

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._frameChanged):
(WebInspector.ConsoleView.prototype._appendContextOption):
(WebInspector.ConsoleView.prototype._contextChanged):
* inspector/front-end/DatabaseQueryView.js:
(WebInspector.DatabaseQueryView):
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyPrompt):
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.setCurrentExecutionContext):
(WebInspector.RuntimeModel.prototype.currentExecutionContext):
(WebInspector.RuntimeModel.prototype._executionContextCreated):
(WebInspector.RuntimeModel.prototype.evaluate.evalCallback):
(WebInspector.RuntimeModel.prototype.evaluate):
(WebInspector.RuntimeModel.prototype.completionsForTextPrompt):
(WebInspector.RuntimeModel.prototype._completionsForExpression.evaluated.getCompletions):
(WebInspector.RuntimeModel.prototype._completionsForExpression.evaluated):
(WebInspector.RuntimeModel.prototype._completionsForExpression.receivedPropertyNamesFromEval):
(WebInspector.RuntimeModel.prototype._completionsForExpression.receivedPropertyNames):
(WebInspector.RuntimeModel.prototype._completionsForExpression):
(WebInspector.RuntimeModel.prototype._reportCompletions):
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt):
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype.update):

LayoutTests:

* http/tests/inspector/console-cd-completions.html:
* http/tests/inspector/network/network-initiator-from-console.html:
* inspector/debugger/debugger-completions-on-call-frame.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TreeScope should not use node->shadowAncetorNode()
https://bugs.webkit.org/show_bug.cgi?id=97869

Reviewed by Ryosuke Niwa.

TreeScope uses shadowAncestorNode(), but we should use shadowHost() here. shadowAncestorNode() is deprecated.

No new tests, simple refactoring.

* dom/TreeScope.cpp:
(WebCore::TreeScope::ancestorInThisScope):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Restore WebCore/ChangeLog lines deleted in r130097
https://bugs.webkit.org/show_bug.cgi?id=98112

Reviewed by Eric Seidel.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ScrollView::setScrollPosition is overridden by FrameView, but is not virtual
https://bugs.webkit.org/show_bug.cgi?id=98064

Reviewed by Simon Fraser.

Virtualize ScrollView::setScrollPosition, and override it in FrameView.

No new tests, this causes subtle behavior differences in currently-untestable code.

* page/FrameView.h:
(FrameView):
* platform/ScrollView.h:
(ScrollView):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Refactoring] DOMSelection should not use shadowAncestorNode
https://bugs.webkit.org/show_bug.cgi?id=97872

Reviewed by Ryosuke Niwa.

Since Node::shadowAncestorNode is deprecated, it should not be used.
Here, we should use TreeScope::ancestorInThisScope instead.

No new tests, covered by existing test.

* page/DOMSelection.cpp:
(WebCore::selectionShadowAncestor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix ASSERT introduced in
http://trac.webkit.org/changeset/130103. It turns out this case can
occur. This patch causes us to handle it the same way we did
previously.

* bindings/v8/IntrusiveDOMWrapperMap.h:
(WebCore::IntrusiveDOMWrapperMap::removeIfPresent):


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