CTTE: RenderMathMLFenced always has a MathMLInlineContainerElement.
<https://webkit.org/b/122986>

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

Also marked the class FINAL and made most methods private.

Reviewed by Anders Carlsson.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove PlatformCAAnimation::supportsValueFunction()
https://bugs.webkit.org/show_bug.cgi?id=122990

Reviewed by Tim Horton.

PlatformCAAnimation::supportsValueFunction always returns true now, so there's no need for it to exist anymore.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor stored website data APIs
https://bugs.webkit.org/show_bug.cgi?id=122781

Patch by Martin Hock <mhock@apple.com> on 2013-10-17
Reviewed by Brady Eidson.

Add WebOriginDataManager along with corresponding class
WebOriginDataManagerProxy and API WKOriginDataManager.

Currently, the new files are unused.

WKOriginDataManager should subsume the functionality of:
WKApplicationCacheManager, WKCookieManager, WKDatabaseManager,
WKKeyValueStorageManager, WKMediaCacheManager,
WKPluginSiteDataManager, and WKResourceCacheManager.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetOriginDataManager):
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKOriginDataManager.cpp: Added.
(WKOriginDataManagerGetTypeID):
(WKOriginDataManagerGetOrigins):
(WKOriginDataManagerDeleteEntriesForOrigin):
(WKOriginDataManagerDeleteAllEntries):
(WKOriginDataManagerStartObservingChanges):
(WKOriginDataManagerStopObservingChanges):
(WKOriginDataManagerSetChangeClient):
* UIProcess/API/C/WKOriginDataManager.h: Added.
* UIProcess/WebOriginDataManagerProxy.cpp: Added.
(WebKit::WebOriginDataManagerProxy::supplementName):
(WebKit::WebOriginDataManagerProxy::create):
(WebKit::WebOriginDataManagerProxy::WebOriginDataManagerProxy):
(WebKit::WebOriginDataManagerProxy::~WebOriginDataManagerProxy):
(WebKit::WebOriginDataManagerProxy::contextDestroyed):
(WebKit::WebOriginDataManagerProxy::processDidClose):
(WebKit::WebOriginDataManagerProxy::shouldTerminate):
(WebKit::WebOriginDataManagerProxy::refWebContextSupplement):
(WebKit::WebOriginDataManagerProxy::derefWebContextSupplement):
(WebKit::WebOriginDataManagerProxy::getOrigins):
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
(WebKit::WebOriginDataManagerProxy::deleteAllEntries):
(WebKit::WebOriginDataManagerProxy::startObservingChanges):
(WebKit::WebOriginDataManagerProxy::stopObservingChanges):
(WebKit::WebOriginDataManagerProxy::setChangeClient):
(WebKit::WebOriginDataManagerProxy::didChange):
* UIProcess/WebOriginDataManagerProxy.h: Added.
* UIProcess/WebOriginDataManagerProxy.messages.in: Added.
* UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Added.
(WebKit::WebOriginDataManagerProxyChangeClient::didChange):
* UIProcess/WebOriginDataManagerProxyChangeClient.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/OriginData/WebOriginDataManager.cpp: Added.
(WebKit::WebOriginDataManager::supplementName):
(WebKit::WebOriginDataManager::WebOriginDataManager):
(WebKit::WebOriginDataManager::getOrigins):
(WebKit::WebOriginDataManager::deleteEntriesForOrigin):
(WebKit::WebOriginDataManager::deleteAllEntries):
(WebKit::WebOriginDataManager::startObservingChanges):
(WebKit::WebOriginDataManager::stopObservingChanges):
* WebProcess/OriginData/WebOriginDataManager.h: Added.
* WebProcess/OriginData/WebOriginDataManager.messages.in: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Speculative buildfixes for GTK and EFL after r157582.

* CMakeLists.txt:
* GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: allow front-end to trigger the system beep sound to signal an error
https://bugs.webkit.org/show_bug.cgi?id=122955

Reviewed by Timothy Hatcher.

Source/WebCore:

New beep() method exposed on InspectorFrontendHost calling into WebCore's systemBeep().

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::beep):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:

Source/WebInspectorUI:

Provide a stub method for the new InspectorFrontendHost.beep() method.

* UserInterface/InspectorFrontendHostStub.js:
(WebInspector.InspectorFrontendHostStub.prototype.beep):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix three bugs in the equals() implementations for css gradients.
https://bugs.webkit.org/show_bug.cgi?id=122987

Reviewed by Andreas Kling.

1. Linear gradients were considered equal if the first gradient has no x and y
   position and the second has no x but does have y.
2. Same as 1, for radial gradients. (This doesn't happen in practice as
   CSSParser::parseRadialGradient rejects such input, so no test for this case.)
3. Radial gradients without x and y position weren't considered equal even if
   they were.

Source/WebCore:

* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::equals):
(WebCore::CSSRadialGradientValue::equals):

LayoutTests:

Merges https://codereview.chromium.org/26147006/

* cssom/cssvalue-comparison-expected.txt:
* cssom/cssvalue-comparison.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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