ScriptExecutionContext log exception should include a column number
https://bugs.webkit.org/show_bug.cgi?id=114315

Reviewed by Oliver Hunt.

Source/WebCore:

Test: inspector/console/console-exception-stack-traces.html

* bindings/js/ScriptCallStackFactory.h:
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
Generate a ScriptCallStack from an exception. Use the vm.exceptionStack
if available, and fallback to the exception object where needed.

* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
Always include a non-empty call stack with exceptions.
Where not provided, fallback to the exception object.

* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
* dom/ScriptExecutionContext.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::PendingException::PendingException):
(ScriptExecutionContext::PendingException):
(WebCore::ScriptExecutionContext::reportException):
* workers/DefaultSharedWorkerRepository.cpp:
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/SharedWorkerContext.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::logExceptionToConsole):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::performTask):
Plumb columnNumber through as needed.

LayoutTests:

* inspector/console/console-exception-stack-traces-expected.txt: Added.
* inspector/console/console-exception-stack-traces.html: Added.
Verifies that exceptions have stack traces and match a console.trace stack.

* http/tests/inspector-enabled/console-exception-while-no-inspector-expected.txt: Removed.
* http/tests/inspector-enabled/console-exception-while-no-inspector.html: Removed.
We now save exception backtraces even if the inspector is not open.

* fast/dom/javascript-url-exception-isolation-expected.txt
* fast/events/remove-target-with-shadow-in-drag-expected.txt
* fast/events/set-attribute-listener-window-onerror-crash-expected.txt
* inspector-protocol/media-query-listener-exception-expected.txt:
* inspector/console/console-uncaught-exception-expected.txt:
* inspector/console/console-uncaught-exception-in-eval-expected.txt:
Update results that now include backtraces or different data. Most better, some worse.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitbot should recognize its own nickname in greetings.
https://bugs.webkit.org/show_bug.cgi?id=115196

Reviewed by Andreas Kling.

Make webkitbot recognize other forms of its nick. Also be tolerant of spaces between the nick and !.

* Scripts/webkitpy/tool/bot/irc_command.py:
(Hi.execute):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix. Forgot to merge args.

* Scripts/webkitpy/tool/bot/irc_command.py:
(Hi.execute):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC: Fix interpreter misbehavior in builds with JIT disabled
https://bugs.webkit.org/show_bug.cgi?id=115190

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-04-25
Reviewed by Oliver Hunt.

Commit http://trac.webkit.org/changeset/147858 modified
some details on how JS stack traces are built. The method
"getLineNumberForCallFrame", renamed in that changeset to
"getBytecodeOffsetForCallFrame" is always returning `0' when
JIT is disabled

How to reproduce:
 - Build webkit with JIT disabled
 - Open MiniBrowser, for example, with http://google.com
 - In a debug build, WebProcess will hit the following ASSERT:
   Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:279 ASSERT(low);

* interpreter/Interpreter.cpp:
(JSC::getBytecodeOffsetForCallFrame):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable balanced page group load deferrer behaviour.
https://bugs.webkit.org/show_bug.cgi?id=115189

Patch by Mike Lattanzio <mlattanzio@blackberry.com> on 2013-04-25
Reviewed by Rob Buis.

Prevent a possible deadlock by enabling balanced deferrers.
Internally reviewed by: Joe Mason
PR 329986

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stack guards are too conservative
https://bugs.webkit.org/show_bug.cgi?id=115147

Reviewed by Geoffrey Garen.

Reduce the limits and simplify the decision making.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::StackPolicy::StackPolicy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Make scroll position adjustment work with pages with fixed position elements.
https://bugs.webkit.org/show_bug.cgi?id=115178

Patch by Iris Wu <shuwu@blackberry.com> on 2013-04-25
Reviewed by Rob Buis.

PR 308796

Currently the position WebPage::adjustDocumentScrollPosition adjusts is the top
left point of the viewport.
On the page with fixed position elements, we want it to adjust the position beneath
the fixed elements so it can be always visible.

The basic idea is:
1.  Detect if there are fixed position elements before going through ProximityDetector.
2.  If the fixed element exists, calculate its the size and the actual visible position
    beneath it.
3.  Pass the position to ProximityDetector. Then according to the new position we get,
    calculate the top left position of the viewport (final scroll position).

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::fixedElementSizeDelta):
(WebKit):
* Api/WebPage.h:
* Api/WebPageCompositor.cpp:
(BlackBerry::WebKit::WebPageCompositorPrivate::findFixedElementRect):
(WebKit):
* Api/WebPageCompositor_p.h:
(WebPageCompositorPrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add definition of GlyphBufferGlyph for BlackBerry
https://bugs.webkit.org/show_bug.cgi?id=115183

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-04-25
Reviewed by Xan Lopez.

BlackBerry uses an unsigned int.

* platform/graphics/GlyphBuffer.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove OS(WINCE) from AccessibilityObject.h
https://bugs.webkit.org/show_bug.cgi?id=115192

Reviewed by Andreas Kling.

Use the same files like the the other PLATFORM(WIN) ports use.

Source/WebCore:

* PlatformWinCE.cmake:
* accessibility/AccessibilityObject.h:
(AccessibilityObject):

Source/WebKit:

* PlatformWinCE.cmake:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.

Rubber-stamped by Anders Koivisto.

Source/WebCore:

* PlatformWinCE.cmake:
* accessibility/AccessibilityObject.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):

Source/WebKit:

* PlatformWinCE.cmake:

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataEnableFeatures.in:

Source/WTF:

* wtf/FeatureDefines.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Update a comment, mentioning a newly filed bug.

        * platform/wk2/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Media elements shouldn't resume playback when a page is restored from the back/forward cache if the WKView isn't in a window
https://bugs.webkit.org/show_bug.cgi?id=115191

Reviewed by Eric Carlson.

If a page is suspended, then resumed when its WebView or WKView has been removed from a window,
the page's media elements will unpause. Check whether media is allowed to start during resume()
via Page::canMediaStart() and if not, register for mediaCanStart notifications. Then, in
mediaCanStart() if the media is force-paused, unpause it.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::mediaCanStart):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::pageConsentRequiredForResume):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix autocompletion for Benjamin. The Bugzilla email address must come first.

* Scripts/webkitpy/common/config/contributors.json:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Glyphs may fail to render when using SVG font
https://bugs.webkit.org/show_bug.cgi?id=115193

Reviewed by Simon Fraser.

Calling SimpleFontData::applyTransforms() when the font used is
an SVG font makes little sense since Core Text doesn’t know or
understand SVG fonts and would be passed some other, unrelated
platform font.

* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::applyTransforms):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Selection overlay on non-composited iframes are incorrectly positioned.
https://bugs.webkit.org/show_bug.cgi?id=115197

Patch by Andrew Lo <anlo@rim.com> on 2013-04-25
Reviewed by Rob Buis.

When drawing the selection overlay, the rects to
paint when selecting text on non-composited sub-frames
need to be adjusted by the frame position.

* WebKitSupport/SelectionOverlay.cpp:
(BlackBerry::WebKit::SelectionOverlay::paintContents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stack guards are too conservative
https://bugs.webkit.org/show_bug.cgi?id=115147

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

Increase stack guard to closer to old size.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::StackPolicy::StackPolicy):

Source/WTF:

Use getrlimit on darwin to get the stack size for the main thread.

* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename DecidePolicyForResponse message to DecidePolicyForResponseSync
https://bugs.webkit.org/show_bug.cgi?id=115207

Reviewed by Beth Dakin.

In preparation for adding a new async DecidePolicyForResponse message,
rename the current one to DecidePolicyForResponseSync. Also split out the async part
into a separate WebPageProxy::decidePolicyForResponse member function.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Pass relatedPage when creating a page in WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=115206

        Reviewed by Geoffrey Garen.

        To make sure that window.open() opens in the same process even when using multiple processes.

        * WebKitTestRunner/PlatformWebView.h:
        * WebKitTestRunner/TestController.cpp:
        (WTR::TestController::createOtherPage):
        (WTR::TestController::createWebViewWithOptions):
        * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
        (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:relatedToPage:useTiledDrawing:]):
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/win/PlatformWebViewWin.cpp:
        (WTR::PlatformWebView::PlatformWebView):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for smart compliers.

Reviewed by Tim Horton.

[NSDictionary dictionaryWithObjectsAndKeys:] returns an NSDictionary,
not a NSMutableDictionary.

* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::updateSpellingUIWithGrammarString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix 32bit build

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