Unreviewed Win build fix after r158855; wrap shapeInfoForFloat() in an ENABLE(CSS_SHAPES) guard.

* rendering/FloatingObjects.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unneeded moving of ESP to ECX in callToJavaScript for COMPILER(MSVC)
https://bugs.webkit.org/show_bug.cgi?id=123998

Reviewed by Mark Lam.

Dead code removal.  Passing esp as the first "C" argument to a JavaScript
function is no longer needed.

* jit/ThunkGenerators.cpp:
(JSC::callToJavaScript):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
returnFromJavaScript() for ARM_THUMB2 uses push()s which should be pop()s
https://bugs.webkit.org/show_bug.cgi?id=124006

Rubber stamped by Mark Hahnenberg.

Changed the push() calls to pop().

* jit/ThunkGenerators.cpp:
(JSC::returnFromJavaScript):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow customization of the contentsScale of TileController tiles
https://bugs.webkit.org/show_bug.cgi?id=124004

Reviewed by Tim Horton.

On some platorms, zooming out on pages with TiledBacking compositing
layers can cause very high memory use, because the TiledBacking retains
the original page scale while the zoom is in flight, but can be asked
to cover a large area.

Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
to provide an additional scale factor for newly created tiles. Platforms can
then customize this to create low-res tiles when necessary.

* WebCore.exp.in:
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::setScale):
(WebCore::TileController::createTileLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
* rendering/RenderLayerCompositor.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simple line layout crashes with SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=124002

Source/WebCore: 

Reviewed by Simon Fraser.
        
Don't use simple line layout for flows using SVG fonts. They crash if kerning is enabled.

Test: fast/text/svg-font-simple-line-crash.html

* platform/graphics/Font.h:
(WebCore::Font::isSVGFont):
        
    Add isSVGFont() so callers don't need to go via primaryFont().

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::constructTextRun):
* rendering/RenderBlock.cpp:
(WebCore::constructTextRunInternal):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
        
    Disallow SVG fonts.

* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun):
(WebCore::SVGTextMetrics::SVGTextMetrics):
* rendering/svg/SVGTextRunRenderingContext.h:
        
    Get rid of the abstract textRunNeedsRenderingContext in favor of just testing isSVGFont().

LayoutTests: 

Reviewed by Simon Fraser.

* fast/text/svg-font-simple-line-crash-expected.txt: Added.
* fast/text/svg-font-simple-line-crash.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid invalid cairo matrix when drawing surfaces too small
https://bugs.webkit.org/show_bug.cgi?id=123810

Drawing surfaces too small makes inverse matrix with values too big,
when this happen, cairo context is not valid anymore and it stops to draw anything.

Patch by Cidorvan Leite <cidorvan.leite@openbossa.org> on 2013-11-07
Reviewed by Martin Robinson.

Test: fast/canvas/drawImage-with-small-values.html

* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
https://bugs.webkit.org/show_bug.cgi?id=123945.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::sourceID):
(JSC::DebuggerCallFrame::sourceIDForCallFrame):
* debugger/DebuggerCallFrame.h:

Source/WebCore: 

No new tests.

* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::functionDetails):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::sourceID):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::clearBreakpoints):
(WebCore::ScriptDebugServer::updateCallFrame):
(WebCore::ScriptDebugServer::pauseIfNeeded):
* bindings/js/ScriptDebugServer.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::parseLocation):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::continueToLocation):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::compileScript):
(WebCore::InspectorDebuggerAgent::runScript):
(WebCore::InspectorDebuggerAgent::didParseSource):
(WebCore::InspectorDebuggerAgent::didPause):
(WebCore::InspectorDebuggerAgent::clear):
(WebCore::InspectorDebuggerAgent::reset):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
* inspector/InspectorInstrumentation.h:
* inspector/ScriptDebugListener.h:

Source/WebKit/mac: 

* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::exception):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Report error on unknown template class usage.
https://bugs.webkit.org/show_bug.cgi?id=123096

Patch by Tamas Gergely <gertom@inf.u-szeged.hu> on 2013-11-07
Reviewed by Darin Adler.

Report error when template class is not found in the dictionary.

* Scripts/webkit2/messages.py:
(class_template_headers):
(class_template_headers.template):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Fix in-band track tests after r158743
https://bugs.webkit.org/show_bug.cgi?id=124007

Add a new line to a bunch of tests to match changes made in r158743.

Patch by Brendan Long <b.long@cablelabs.com> on 2013-11-07
Reviewed by Eric Carlson.

* media/track/audio/audio-track-mkv-vorbis-language-expected.txt:
* media/track/in-band/track-in-band-kate-ogg-addtrack-expected.txt:
* media/track/in-band/track-in-band-kate-ogg-cues-added-once-expected.txt:
* media/track/in-band/track-in-band-kate-ogg-kind-expected.txt:
* media/track/in-band/track-in-band-kate-ogg-language-expected.txt:
* media/track/in-band/track-in-band-kate-ogg-mode-expected.txt:
* media/track/in-band/track-in-band-kate-ogg-style-expected.txt:
* media/track/in-band/track-in-band-kate-ogg-track-order-expected.txt:
* media/track/in-band/track-in-band-mkv-chapters-expected.txt:
* media/track/in-band/track-in-band-srt-mkv-addtrack-expected.txt:
* media/track/in-band/track-in-band-srt-mkv-cues-added-once-expected.txt:
* media/track/in-band/track-in-band-srt-mkv-kind-expected.txt:
* media/track/in-band/track-in-band-srt-mkv-language-expected.txt:
* media/track/in-band/track-in-band-srt-mkv-mode-expected.txt:
* media/track/in-band/track-in-band-srt-mkv-style-expected.txt:
* media/track/in-band/track-in-band-srt-mkv-track-order-expected.txt:
* media/track/video/video-track-mkv-theora-language-expected.txt:
* media/track/video/video-track-mkv-theora-selected-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use SQLite journal mode WAL (WriteAheadLogging)
https://bugs.webkit.org/show_bug.cgi?id=124009

Reviewed by Anders Carlsson.

WriteAheadLogging journalling is better than the traditional rollback model.

* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gtk] Disable LTO when building cairo
https://bugs.webkit.org/show_bug.cgi?id=123954

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-07
Reviewed by Martin Robinson.

Cairo always uses LTO, when it detects compiler support.
LTO is buggy in many/all versions of GCC and shouldn't be enabled by
default. This patch disables LTO when building cairo library.
- See: https://bugs.freedesktop.org/show_bug.cgi?id=60852

With gcc 4.7.3, for example, the build fails with the following message:
'lto1: fatal error: LTO_tags out of range: Range is 0 to 361, value is 15872'

* gtk/jhbuild.modules:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use std::function for all policy continuation functions
https://bugs.webkit.org/show_bug.cgi?id=124011

Reviewed by Sam Weinig.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::responseReceived):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::loadPostRequest):
* loader/PolicyCallback.cpp:
(WebCore::PolicyCallback::clear):
(WebCore::PolicyCallback::set):
(WebCore::PolicyCallback::call):
(WebCore::PolicyCallback::clearRequest):
(WebCore::PolicyCallback::cancel):
* loader/PolicyCallback.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
* loader/PolicyChecker.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash when submitting form in a document with null encoding
https://bugs.webkit.org/show_bug.cgi?id=123975

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f

The CString object which is passed to normalizeLineEndingsToCRLF() can be
a null string. It is created in FormDataList::appendString(), and it
produces a null CString if FormDataList::m_encoding is a null encoding.

Test: fast/forms/form-submit-in-image-document.html

* platform/text/LineEnding.cpp:
(internalNormalizeLineEndingsToCRLF):

LayoutTests:

* fast/forms/form-submit-in-image-document-expected.txt: Added.
* fast/forms/form-submit-in-image-document.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084
https://bugs.webkit.org/show_bug.cgi?id=124012

Reviewed by Eric Carlson.

The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in HTMLMediaElement::contextDestroyed
https://bugs.webkit.org/show_bug.cgi?id=123963

Reviewed by Eric Carlson.

Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):

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

Remove failure test expectations from passing tests.

* platform/efl-wk2/fast/repaint/caret-with-transformation-expected.png: Removed.
* platform/efl/TestExpectations:
* platform/efl/fast/repaint/caret-with-transformation-expected.png: Added.
* platform/efl/fast/repaint/caret-with-transformation-expected.txt: Renamed from LayoutTests/platform/efl-wk2/fast/repaint/caret-with-transformation-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't repaint the view when the web process crashes
https://bugs.webkit.org/show_bug.cgi?id=124013

Reviewed by Dan Bernstein.

It's up to each individual port to decide whether the view should be repainted when the web process crashes.

* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setViewNeedsDisplay):
(WebKit::PageClientImpl::displayView):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the 32-bit build. Virtual thunks seem to have different
symbol names between 32- and 64-bit.

* WebCore.exp.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove npr.org specific hack in HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=123859

Reviewed by Jer Noble.

Remove the site specific hack added in r57820, it is no longer necessary.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
(HTMLMediaElement::play): Don't special case npr.org.
* html/HTMLMediaElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reproducible crash when using Map (affects Web Inspector)
https://bugs.webkit.org/show_bug.cgi?id=123940

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Trivial fix.  Once again we get bitten by attempting to be clever when
growing while adding entries to indexing maps.

Now we simply do a find(), and then add() _after_ we've ensured there is
sufficient space in the MapData list.

* runtime/MapData.cpp:
(JSC::MapData::add):

LayoutTests:

Add testcases

* js/map-grow-with-holes-expected.txt: Added.
* js/map-grow-with-holes.html: Added.
* js/script-tests/map-grow-with-holes.js: Added.
(get map):

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