CTTE: RenderMathMLOperator always has a MathMLElement.
<https://webkit.org/b/122988>

Reviewed by Antti Koivisto.

The renderer is never anonymous and always has a corresponding
MathMLElement. Overload element() with a tighter return type.

Also marked the class FINAL and made most methods private.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: logged objects are highlighted in blue
https://bugs.webkit.org/show_bug.cgi?id=122897

Reviewed by Joseph Pecoraro.

Switch to using the system highlight color for the background selected messages.
Also removing SVG assets no longer needed since we won't be showing white prompt
and result icons anymore as well as a few generated canvas states.

* UserInterface/Images/UserInputPromptPreviousSelected.svg: Removed.
* UserInterface/Images/UserInputResultSelected.svg: Removed.
* UserInterface/LogContentView.css:
(.console-messages:focus .console-item.selected):
* UserInterface/Main.js:
(WebInspector._generateDisclosureTriangleImages):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Go to line keyboard command and dialog
https://bugs.webkit.org/show_bug.cgi?id=122893

Reviewed by Timothy Hatcher.

Add a text input over source code text editors, centered within the width of the editor
and towards the top of the editor, upon pressing Command+L or Control+G to match the
behavior in Chrome.

* Localizations/en.lproj/localizedStrings.js:
New localized string "Line Number".

* UserInterface/GoToLineDialog.css: Added.
Styling for the go-to-line dialog.

* UserInterface/GoToLineDialog.js: Added.
(WebInspector.GoToLineDialog):
Generate the DOM structure for the dialog.

(WebInspector.GoToLineDialog.prototype.present):
Present the dialog as a child of a parent element. The dialog's text field automatically
gets focus and resets to be empty.

(WebInspector.GoToLineDialog.prototype.dismiss):
Dismiss the dialog if visible, this triggers the goToLineDialogWasDismissed delegate method.

(WebInspector.GoToLineDialog.prototype.handleEvent):
Route the various events registered in the dialog's DOM tree: input, keydown, blur, mousedown
and click.

(WebInspector.GoToLineDialog.prototype._handleInputEvent):
Update the "non-empty" class on the dialog's element depending on the content of the dialog's
text field. If there is content in the text field, this will make the clear icon visible.

(WebInspector.GoToLineDialog.prototype._handleKeydownEvent):
If the Esc. key is pressed when there is text in the dialog's input field, clear the input field.
If no text is in the input field, dismiss the input field. When the Enter key is pressed, we call
the isGoToLineDialogValueValid() method on the delegate to figure out if the text field value is
valid. If it's not, we select the text field value so that it may be easily replaced and play
en error sound. If it's valid, we call the goToLineDialogValueWasValidated() delegate method
and dismiss the dialog.

(WebInspector.GoToLineDialog.prototype._handleBlurEvent):
Dismiss the dialog when its text field loses focus. This ensures that clicking anywhere outside
of the dialog removes it from display.

(WebInspector.GoToLineDialog.prototype._handleMousedownEvent):
Upon pressing the mouse down on the clear icon, select the entire text field content (matches
the behavior of Xcode) and prevent the default event action that would blur the text field
which would dismiss the dialog.

(WebInspector.GoToLineDialog.prototype._handleClickEvent):
Clear the content of the dialog's text field upon clicking on its clear button.

(WebInspector.GoToLineDialog.prototype._clear):
Reset the dialog's text field's value to an empty string and remove the "non-empty" CSS class name
controlling the display of the clear button.

* UserInterface/Images/CloseWhite.svg: Added.
Variation of the Close.svg icon with a white cross.

* UserInterface/Main.html:
Link to the newly added resources for GoToLineDialog.

* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
Register the Command+L and Control+G keyboard shortcuts to bring up the go-to-line dialog.

(WebInspector.SourceCodeTextEditor.prototype.showGoToLineDialog):
Method called upon pressing the Command+L and Control+G keyboard shorcuts creating an instance
of a GoToDialog if necessary, becoming its delegate and presenting it in the context of the
editor's root element.

(WebInspector.SourceCodeTextEditor.prototype.isGoToLineDialogValueValid):
Delegate method called to validate the line number presently set in the go-to-dialog's text field,
checking it's a number between 1 and the number of lines in the source code.

(WebInspector.SourceCodeTextEditor.prototype.goToLineDialogValueWasValidated):
Delegate method called when the line number set in the go-to-dialog's text field has been validated.
We reveal and select the line at the number provided.

(WebInspector.SourceCodeTextEditor.prototype.goToLineDialogWasDismissed):
Ensure the source code editor regains focus upon dismissing the go-to-dialog.

* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.revealPosition):
Add a new opt-in option to not highlight the revealed position. The code in goToLineDialogValueWasValidated()
sets that new flag to true to avoid an unnecessary highlight on top of the selection.

(WebInspector.TextEditor.prototype.get lineCount):
Expose the lineCount() method on the private CodeMirror instance.

(WebInspector.TextEditor.prototype.focus):
Expose the focus() method on the private CodeMirror instance.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Improve the viewport of some websites like mobilesyrup.com/2013/08/25/moto-x-review/
https://bugs.webkit.org/show_bug.cgi?id=122995

Patch by Jacky Jiang <zhajiang@blackberry.com> on 2013-10-17.
Reviewed by George Staikos.
Internally reviewed by George Staikos and Eli Fidler.

JIRA 523949
Force to respect the viewport when there is viewport meta tag but width
is not specified even though the viewport is broken. By doing that, We
want to improve the user experience of some websites that use a reasonable
initial-scale, but have some overly-wide contents

The contents of those websites like mobilesyrup.com/2013/08/25/moto-x-review
should be improved by the contents provider eventually.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove JITStubCall.h
https://bugs.webkit.org/show_bug.cgi?id=122991

Reviewed by Geoff Garen.

Happily this is no longer used

* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/JIT.cpp:
* jit/JITArithmetic.cpp:
* jit/JITArithmetic32_64.cpp:
* jit/JITCall.cpp:
* jit/JITCall32_64.cpp:
* jit/JITOpcodes.cpp:
* jit/JITOpcodes32_64.cpp:
* jit/JITPropertyAccess.cpp:
* jit/JITPropertyAccess32_64.cpp:
* jit/JITStubCall.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed restoreArgumentReference (another use of JITStackFrame)
https://bugs.webkit.org/show_bug.cgi?id=122997

Reviewed by Oliver Hunt.

* jit/JSInterfaceJIT.h: Removed an unused function. This is a step
toward using the C stack.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CSS Regions] Crash when highlighting a node of a flow with no regions
https://bugs.webkit.org/show_bug.cgi?id=122993

Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector-protocol/dom/highlight-flow-with-no-region.html

Even if a named flow has no regions the content of the flow will still have renderer objects created.
Removed the assumption that all renderers inside a RenderFlowThread will always have an enclosing RenderRegion.

* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRendererFragments):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):

LayoutTests:

Added test to check that DOM.highlightNode is not crashing WebCore when the node is inside
a flow with no associated regions.

* inspector-protocol/dom/highlight-flow-with-no-region-expected.txt: Added.
* inspector-protocol/dom/highlight-flow-with-no-region.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tidied up the Vector<T> move constructor
https://bugs.webkit.org/show_bug.cgi?id=122998

Reviewed by Anders Carlsson.

* wtf/Vector.h:
(WTF::::Vector): Don't call swap() "weird". It's the way most std types
implement move constructors.

Do inline this function, so the compiler can optimize away a logical
move into a physical no-op.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Run JavaScriptCore tests again on Windows.
https://bugs.webkit.org/show_bug.cgi?id=122787

Patch by Alex Christensen <achristensen@webkit.org> on 2013-10-17
Reviewed by Tim Horton.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.sln: Added.
* jit/JITStubsMSVC64.asm: Removed reference to cti_vm_throw unused since r157581.

Tools:

* Scripts/build-jsc:
(buildMyProject): Use JavaScriptCore.sln to build JavaScriptCore and WTF.
* Scripts/run-javascriptcore-tests: Don't run stress tests on WinCairo.
* Scripts/webkitdirs.pm:
(determineConfigurationForVisualStudio):
(determineConfigurationProductDir):
Build directory should end with bin64 and configuration should end with |x64 on Win64.
(isAppleWinWebKit):
(copyInspectorFrontendFiles):
(setPathForRunningWebKitApp):
Separated WinCairo directories and options from AppleWin.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash fix for Windows XP.
https://bugs.webkit.org/show_bug.cgi?id=122790

Patch by Anthony Johnson <anthony.johnson@flexsim.com> on 2013-10-17
Reviewed by Geoffrey Garen.

* win/tools/vsprops/common.props:
Replaced stack and heap sizes of zero with blank stack and heap sizes.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Eliminate uses of JITSTACKFRAME_ARGS_INDEX as scratch area for thunks
https://bugs.webkit.org/show_bug.cgi?id=122973

Reviewed by Michael Saboff.

* jit/ThunkGenerators.cpp:
(JSC::throwExceptionFromCallSlowPathGenerator): This was all dead code,
so I removed it.

The code acted as if it needed to pass an argument to
lookupExceptionHandler, and as if it passed that argument to itself
through JITStackFrame. However, lookupExceptionHandler does not take
an argument (other than the default ExecState argument), and the code
did not initialize the thing that it thought it passed to itself!


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed an unused #define
https://bugs.webkit.org/show_bug.cgi?id=123000

Reviewed by Anders Carlsson.

* jit/JITStubs.h: Removed the concept of JITSTACKFRAME_ARGS_INDEX,
since it is unused now. This is a step toward using the C stack.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PlatformCALayer constructor should take layer type as an argument
https://bugs.webkit.org/show_bug.cgi?id=122915

Reviewed by Anders Carlsson.

No new tests, just restoring old code.

Un-do part of the patch for bug 122915; we can't early-return
in the constructor, there's still more work to do.

* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::PlatformCALayerMac):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed the JITStackFrame struct
https://bugs.webkit.org/show_bug.cgi?id=123001

Reviewed by Anders Carlsson.

* jit/JITStubs.h: JITStackFrame and JITStubArg are unused now, since all
our helper functions obey the C function call ABI.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: RenderMathMLSpace always has a MathMLTextElement.
<https://webkit.org/b/122992>

The renderer is never anonymous and always has a corresponding
MathMLTextElement. Overload element() with a tighter return type.

Also marked the class FINAL and made most methods private.

Reviewed by Antti Koivisto.

* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::RenderMathMLSpace):
(WebCore::RenderMathMLSpace::updateFromElement):
* rendering/mathml/RenderMathMLSpace.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass VM instead of JSGlobalObject to JSONObject constructor.
<https://webkit.org/b/122999>

JSONObject was only use the JSGlobalObject to grab at the VM.
Dodge a few loads by passing the VM directly instead.

Reviewed by Geoffrey Garen.

* runtime/JSONObject.cpp:
(JSC::JSONObject::JSONObject):
(JSC::JSONObject::finishCreation):
* runtime/JSONObject.h:
(JSC::JSONObject::create):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't add an include for return type of a [Custom] function in generated bindings code
https://bugs.webkit.org/show_bug.cgi?id=122972

Reviewed by Sam Weinig.

* bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Don't.


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

* platform/efl-wk2/plugins/npruntime/object-from-destroyed-plugin-expected.txt: Added.
* platform/efl-wk2/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: Added.
* platform/efl/fast/forms/control-restrict-line-height-expected.png: Rebaseline after r155408.
* platform/efl/fast/forms/control-restrict-line-height-expected.txt: Rebaseline after r155408.

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

Unskip tests which are already passed.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, speculative ARM build fix.
https://bugs.webkit.org/show_bug.cgi?id=122890
<rdar://problem/15258624>

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::firstRegister):
(JSC::ARM64Assembler::lastRegister):
(JSC::ARM64Assembler::firstFPRegister):
(JSC::ARM64Assembler::lastFPRegister):
* assembler/MacroAssemblerARM64.h:
* assembler/MacroAssemblerARMv7.h:



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