[BlackBerry] Roll out r136173 as there are alternative approaches from the client sides now
https://bugs.webkit.org/show_bug.cgi?id=106236

Unreviewed, rolling out r136173.
This becomes unnecessary now as there are alternative approaches to
solve the issue from the client sides.

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::createWindow):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MIPS LLInt implementation.
https://bugs.webkit.org/show_bug.cgi?id=99706

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2013-01-07
Reviewed by Filip Pizlo.

LLInt implementation for MIPS.

Source/JavaScriptCore:

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::jump):
* dfg/DFGOperations.cpp:
(JSC):
* jit/JITStubs.cpp:
(JSC):
* jit/JITStubs.h:
(JITStackFrame):
* llint/LLIntOfflineAsmConfig.h:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* offlineasm/backends.rb:
* offlineasm/instructions.rb:
* offlineasm/mips.rb: Added.

Source/WTF:

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Tests in svg/dynamic-updates are flaky..
https://bugs.webkit.org/show_bug.cgi?id=106238

* platform/chromium/TestExpectations: Marked as flaky.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rebaseline svg/W3C-SVG-1.1/paths-data-03-f.svg.

* platform/chromium-win/svg/W3C-SVG-1.1/paths-data-03-f-expected.png: Updated expectation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make WKViews work when layer-backed
https://bugs.webkit.org/show_bug.cgi?id=106166

Reviewed by Sam Weinig.

When not in TileCache mode, WebKit2 views had redraw problems on scrolling,
if layer-backed.

The issue is that the DrawingAreaProxy code tries to optimize scrolling by
calling -scrollRect:by: on the WKView (an NSView) to copy bits, rather than
repainting the entire view. However, -scrollRect:by: does nothing for NSViews
that have layers.

Fix by plumbing through a canScrollView() function which PageClientImpl()
implements, returning true if the view does not have layer backing.
When canScrollView() is false, DrawingAreaProxyImpl::incorporateUpdate()
dirties the entire view.

* UIProcess/API/gtk/PageClientImpl.h:
(WebKit::PageClientImpl::canScrollView):
* UIProcess/API/mac/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::canScrollView):
* UIProcess/API/qt/raw/qrawwebview_p_p.h:
(QRawWebViewPrivate::canScrollView):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::canScrollView):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/PageClientBase.h:
(WebKit::PageClientBase::canScrollView):
* UIProcess/qt/QtPageClient.h:
(WebKit::QtPageClient::canScrollView):
* UIProcess/win/WebView.h:
(WebKit::WebView::canScrollView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r137632.
http://trac.webkit.org/changeset/137632
https://bugs.webkit.org/show_bug.cgi?id=106237

Caused major security regressions on ClusterFuzz (Requested by
inferno-sec on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-07

Source/WebCore:

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::startDelayUpdateScrollInfo):
(WebCore::RenderBlock::finishDelayUpdateScrollInfo):

LayoutTests:

* mathml/mo-stretch-crash-expected.txt: Removed.
* mathml/mo-stretch-crash.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rebaseline webaudio/realtimeanalyser-fft-sizing.html.

* platform/chromium-win/webaudio/realtimeanalyser-fft-sizing-expected.txt: Renamed from LayoutTests/platform/chromium-win-xp/webaudio/realtimeanalyser-fft-sizing-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clear pending container size requests as early as possible
https://bugs.webkit.org/show_bug.cgi?id=106162

Reviewed by Eric Seidel.

http://trac.webkit.org/changeset/137981 contained a bug where pending container size
requests were only cleared for images that use container sizes. Bitmap images do not use
container sizes so these requests were not being cleared. This patch does the trivial
refactoring so that container size requests are cleared as early as possible.

No new tests as this is just a refactoring of some messy code added in r137981.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::createImage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Handle the new AuthRetry result code in NetworkJob::notifyAuthReceived
https://bugs.webkit.org/show_bug.cgi?id=106233

Patch by Joe Mason <jmason@rim.com> on 2013-01-07
Reviewed by Rob Buis.

Internal PR: 270683
FilterStream::notifyAuthReceived has a new result code, AuthRetry. When it's received we
need to handle it by resending the request with the same credentials.

Reviewed internally by Leo Yang.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyAuthReceived):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutUnit(unsigned long long value) compile failure
https://bugs.webkit.org/show_bug.cgi?id=106239

Cast the result of ('unsigned long long' * 'int') to an int before storing in m_value
to avoid compile failure on some platforms.

Reviewed by Ryosuke Niwa.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::LayoutUnit): Cast to int after multiplication.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Touch Events are falling through fullscreen video
https://bugs.webkit.org/show_bug.cgi?id=106112

Patch by Genevieve Mak <gmak@rim.com> on 2013-01-07
Reviewed by Rob Buis.

Reviewed Internally by Jakob Petsovits.
PR #274326
Do not do viewport centering calculations if in fullscreen video.
The offset should be zero.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] move dumpAsText and friends to the TestRunner library
https://bugs.webkit.org/show_bug.cgi?id=106222

Reviewed by Adam Barth.

This moves dumpAsText, dumpChildFramesAsText, and dumpChildFrameScrollPositions to the TestRunner library.

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
(DRTTestRunner::reset):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
* DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
(WebTestRunner::WebTestRunner::shouldDumpAsText):
(WebTestRunner::WebTestRunner::setShouldDumpAsText):
(WebTestRunner::WebTestRunner::shouldGeneratePixelResults):
(WebTestRunner::WebTestRunner::setShouldGeneratePixelResults):
(WebTestRunner::WebTestRunner::shouldDumpChildFrameScrollPositions):
(WebTestRunner::WebTestRunner::shouldDumpChildFramesAsText):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
(WebTestRunner::TestRunner::TestRunner):
(WebTestRunner::TestRunner::reset):
(WebTestRunner::TestRunner::shouldDumpAsText):
(WebTestRunner):
(WebTestRunner::TestRunner::setShouldDumpAsText):
(WebTestRunner::TestRunner::shouldGeneratePixelResults):
(WebTestRunner::TestRunner::setShouldGeneratePixelResults):
(WebTestRunner::TestRunner::shouldDumpChildFrameScrollPositions):
(WebTestRunner::TestRunner::shouldDumpChildFramesAsText):
(WebTestRunner::TestRunner::dumpAsText):
(WebTestRunner::TestRunner::dumpChildFrameScrollPositions):
(WebTestRunner::TestRunner::dumpChildFramesAsText):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
(TestRunner):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge child process main functions as much as possible
https://bugs.webkit.org/show_bug.cgi?id=106192

Reviewed by Anders Carlsson.

To reduce copied code, this merges the Mac main functions for the WebProcess,
NetworkProcess, PluginProcess, and SharedWorkerProcess. Since slight variations
are needed, it adds a delegate class for hooks into the main function that each
process can override if necessary.

* NetworkProcess/mac/NetworkProcessMainMac.mm:
(WebKit::NetworkProcessMain):
Remove almost everything with a call to ChildProcessMain with the default delegate.

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess):
Move defaults registration here from PluginProcessMainMac.

* PluginProcess/mac/PluginProcessMainMac.mm:
(PluginProcessMainDelegate):
Add a delegate for the new shared main function that does does PluginProcess
specific work.

(WebKit::PluginProcessMainDelegate::doPreInitializationWork):
Move DYLD_INSERT_LIBRARIES removal and createPluginMIMETypesPreferences special mode
to this pre-initialization hook.

(WebKit::PluginProcessMainDelegate::doPostRunWork):
Move private temporary and cache directories clean up to this post run hook.

(WebKit::PluginProcessMain):
Call the ChildProcessMain shared main function with the PluginProcess as the process
to initialize and PluginProcessMainDelegate as the main delegate.

* Shared/mac/ChildProcessMain.h: Added.
(ChildProcessMainDelegate):
ChildProcessMainDelegate is a helper class that process can subclass to hook into
the main function.

(WebKit::ChildProcessMain):
Add a single version of the "main" function that uses the ChildProcessMainDelegate to
allow processes to hook into it.

* Shared/mac/ChildProcessMain.mm:
(WebKit::ChildProcessMainDelegate::~ChildProcessMainDelegate):
(WebKit::ChildProcessMainDelegate::installSignalHandlers):
(WebKit::ChildProcessMainDelegate::doPreInitializationWork):
(WebKit::ChildProcessMainDelegate::getConnectionIdentifier):
(WebKit::ChildProcessMainDelegate::getClientIdentifier):
(WebKit::ChildProcessMainDelegate::getClientProcessName):
(WebKit::ChildProcessMainDelegate::doPostRunWork):
Add default implementations of the delegate hooks, most processes should be able to
use the defaults.

* SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm:
(WebKit::SharedWorkerProcessMain):
Remove almost everything with a call to ChildProcessMain with the default delegate.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/mac/WebProcessMainMac.mm:
(WebProcessMainDelegate):
Add a delegate for the new shared main function that does does WebProcess
specific work.

(WebKit::WebProcessMainDelegate::doPreInitializationWork):
Move DYLD_INSERT_LIBRARIES removal to this this pre-initialization hook.

(WebKit::WebProcessMainDelegate::getConnectionIdentifier):
A custom getConnectionIdentifier is necessary for the WebProcess to keep support for having the WebProcess
be able to launch the UIProcess (for debugging purposes).

(WebKit::WebProcessMainDelegate::getClientIdentifier):
For the same reasons as about, a custom getClientIdentifier is needed.

(WebKit::WebProcessMain):
Call the ChildProcessMain shared main function with the WebProcess as the process
to initialize and WebProcessMainDelegate as the main delegate.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Remove more obsolete shim code
        https://bugs.webkit.org/show_bug.cgi?id=106248

        Reviewed by Anders Carlsson.

        Removing KeychainItemShimCallbacks, and SecItemRequestData::CopyContent, which was
        only needed for that obsolete version of shim.

        We now use WebProcessSecItemShimCallbacks.

        * Shared/mac/SecItemRequestData.h:
        * UIProcess/mac/WebProcessProxyMac.mm:
        (WebKit::handleSecItemRequest):
        * WebProcess/mac/WebProcessShim.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make the IFRAME_SEAMLESS flag runtime-enabled.
https://bugs.webkit.org/show_bug.cgi?id=106213

Reviewed by Ojan Vafai.

Source/WebCore:

Seamless IFrames live behind the IFRAME_SEAMLESS compile-time flag, this
patch adds another layer to that in order to enable runtime decisions
about when it should be active. This will allow ports (Chromium, for
instance) to toggle the feature on/off for particular builds without
recompiling from scratch.

* WebCore.exp.in:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::seamlessIFramesEnabled):
(WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled):
    Add seamless IFrames to the set of runtime controlled features.
* dom/Document.cpp:
(WebCore::Document::shouldDisplaySeamlesslyWithParent):
    If seamless IFrames aren't runtime enabled, always return false from
    Document::shouldDisplaySeamlesslyWithParent. As this method already
    acts as the single gate that controls the rest of the system, it's
    the only place we need to make the runtime check.

Source/WebKit/chromium:

* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableSeamlessIFrames):
(WebKit):
(WebKit::WebRuntimeFeatures::areSeamlessIFramesEnabled):
    Expose the new runtime feature to the Chromium port.

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::setSeamlessIFramesEnabled):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
    Add a toggle for seamless IFrames to EFL's DRTSuport.

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):
    Add a toggle for seamless IFrames to GTK's DRTSuport.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences seamlessIFramesEnabled]):
(-[WebPreferences setSeamlessIFramesEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
    Add a seamless IFrame preference to WebPreferences, and use it to
    toggle the runtime state of the feature as appropriate.

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::setSeamlessIFramesEnabled):
* WebCoreSupport/DumpRenderTreeSupportQt.h:
    Add a toggle for seamless IFrames to QT's DRTSuport.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetSeamlessIFramesEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setSeamlessIFramesEnabled):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
    Add a toggle for seamless IFrames to InjectedBundle, and set it to
    true when beginning testing.

Tools:

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::WebPage::resetSettings):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
    Ensure that seamless IFrames are enabled for layout tests in each of
    the ports that support seamless IFrames.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] fast/speech/scripted/navigate-away.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=106249

* platform/chromium/TestExpectations: Marked as flaky.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Updating test expectations following r138717.

* platform/chromium-linux/platform/chromium/fast/events/touch: Removed.
* platform/chromium-linux/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt: Removed.
* platform/chromium-mac/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt:
* platform/chromium-win-xp/platform/chromium/fast/events: Added.
* platform/chromium-win-xp/platform/chromium/fast/events/touch: Added.
* platform/chromium-win-xp/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt: Added.
* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Some characters are not rotated properly in vertical text
https://bugs.webkit.org/show_bug.cgi?id=105663
<rdar://problem/12738911>

Source/WebCore: 

Reviewed by Dan Bernstein.

Test: platform/mac/fast/text/vertical-no-sideways.html

* platform/graphics/Font.cpp:
(WebCore::Font::isCJKIdeographOrSymbol): Added several characters to the list.
* platform/graphics/FontFastPath.cpp:
(WebCore::shouldIgnoreRotation): Added
(WebCore::Font::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation): Added logic to avoid
rotation for all the characters listed in shouldIgnoreRotation.

LayoutTests: 

Reviewed by Dan Bernstein. 

* platform/mac/fast/text/vertical-no-sideways.html: Added. 
* platform/mac/platform/mac/fast/text/vertical-no-sideways-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Fix PlatformContextSkia::setDrawingToImageBuffer abuse
https://bugs.webkit.org/show_bug.cgi?id=104956

Reviewed by James Robinson.

Replaced PlatformContextSkia::SetDrawingToImageBuffer with GraphicsContext::setShouldSmoothFonts.

Source/WebCore:

No new tests needed. No change in functionality.

* platform/graphics/chromium/CompositorHUDFontAtlas.cpp:
(WebCore::CompositorHUDFontAtlas::generateFontAtlas):
* platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
(WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::couldUseLCDRenderedText):
(WebCore):

Source/WebKit/chromium:

* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::paintContents):
(WebKit):
(WebKit::NonCompositedContentHost::setShowDebugBorders):
* src/PageWidgetDelegate.cpp:
(WebKit::PageWidgetDelegate::paint):
* src/WebFontImpl.cpp:
(WebKit::WebFontImpl::drawText):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Heap-buffer-overflow in WebCore::RenderBlock::clone.
https://bugs.webkit.org/show_bug.cgi?id=101984

Reviewed by Julien Chaffraix.

Source/WebCore:

Add a global in RenderBlock to prevent recursion inside splitFlow.
While inside splitFlow (multi-column handling), we move many children
using fullRemoveInsert=true, causing RenderBlock::addChild to be called
and recursing in splitFlow. This messes the tree splitting happening in
RenderBlock::splitBlocks and can cause bad casts.

Test: fast/multicol/recursive-split-flow-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):

LayoutTests:

* fast/multicol/recursive-split-flow-crash-expected.txt: Added.
* fast/multicol/recursive-split-flow-crash.html: Added.


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