REGRESSION (r161429?): Frequent crashes on media/track/media-element-enqueue-event-crash.html
https://bugs.webkit.org/show_bug.cgi?id=117756

* platform/mac/TestExpectations: Skipping the test, it crashes very frequently.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert back to using the -n option when producing symbolic links to the GTK-specific
API directories under Source/WebKit2/. Removing the option in r161497 resulted in
recursive links being created under those directories since the links were dereferenced.

To actually ensure that the link is created anew, remove it so it is reconstructed.

Rubber-stamped by Carlos Garcia Campos.

* GNUmakefile.am:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression: failing RegExp tests on 32 bit architectures.
https://bugs.webkit.org/show_bug.cgi?id=126699

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2014-01-09
Reviewed by Michael Saboff.

Fix setRegExpConstructor functions for 32 bit architectures.

* runtime/RegExpConstructor.cpp:
(JSC::setRegExpConstructorInput):
(JSC::setRegExpConstructorMultiline):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Move InjectedScript classes into JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=126598

Source/JavaScriptCore:

Reviewed by Timothy Hatcher.

Part 1: Extract InspectorInstrumentationCookie class from InspectorInstrumentation.
Part 2: Move InjectedScriptSource and generation into JavaScriptCore.
Part 3: Update CodeGeneratorInspector to avoid inlining virtual destructors.
Part 4: Move all inspector scripts into JavaScriptCore and update generators.
Part 5: Move InjectedScript classes into JavaScriptCore
Part 6: Put it all together. Make WebCore use the JavaScriptCore InjectedScript files.

There are pieces of logic that WebCore wants to hook into in the InjectedScript
execution (e.g. for CommandLineAPIModule and InspectorInstrumentation). Create
hooks for those in a base class called InspectorEnvironment. For now, the
InspectorControllers (Page, JSGlobalObject, Worker) will be the InspectorEnvironments
and provide answers to its hooks.

* inspector/InspectorEnvironment.h: Added.
New hooks needed by WebCore in various places. Mostly stubbed in JavaScriptCore.

* inspector/InjectedScript.cpp: Renamed from Source/WebCore/inspector/InjectedScript.cpp.
* inspector/InjectedScript.h: Added.
* inspector/InjectedScriptBase.cpp: Renamed from Source/WebCore/inspector/InjectedScriptBase.cpp.
* inspector/InjectedScriptBase.h: Renamed from Source/WebCore/inspector/InjectedScriptBase.h.
* inspector/InjectedScriptModule.cpp: Renamed from Source/WebCore/inspector/InjectedScriptModule.cpp.
* inspector/InjectedScriptModule.h: Renamed from Source/WebCore/inspector/InjectedScriptModule.h.
Cleanup the style of these files (nullptr, formatting, whitespace, etc).
Use the InspectorEnvironments call/evaluate function for ScriptFunctionCalls and checking access

* inspector/InjectedScriptManager.cpp: Renamed from Source/WebCore/inspector/InjectedScriptManager.cpp.
* inspector/InjectedScriptManager.h: Renamed from Source/WebCore/inspector/InjectedScriptManager.h.
Take an InspectorEnvironment with multiple hooks, instead of a single hook function.

* inspector/InjectedScriptHost.cpp: Added.
* inspector/InjectedScriptHost.h: Added.
* inspector/JSInjectedScriptHost.cpp: Renamed from Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp.
* inspector/JSInjectedScriptHost.h: Added.
* inspector/JSInjectedScriptHostPrototype.cpp: Added.
* inspector/JSInjectedScriptHostPrototype.h: Added.
Implementation of InjectedScriptHost which is passed into the script (InjectedScriptSource.js)
that we inject into the page. This is mostly copied from the original autogenerated code,
then simplified and cleaned up. InjectedScriptHost can be subclasses to provide specialized
implementations of isHTMLAllCollection and type for Web/DOM types unknown to a pure JS context.

For OS X be sure to export the scripts as if they are private headers.

* GNUmakefile.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/scripts/cssmin.py: Renamed from Source/WebCore/inspector/Scripts/cssmin.py.
* inspector/scripts/inline-and-minify-stylesheets-and-scripts.py: Renamed from Source/WebCore/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py.
* inspector/scripts/jsmin.py: Renamed from Source/WebCore/inspector/Scripts/jsmin.py.
* inspector/scripts/xxd.pl: Renamed from Source/WebCore/inspector/xxd.pl.

This avoids build errors about duplicate exported virtual inlined methods
are included from multiple places. Just put empty destructors in the
implementation file instead of inlined.

* inspector/scripts/CodeGeneratorInspector.py:
(Generator):
(Generator.go):
* inspector/scripts/CodeGeneratorInspectorStrings.py:

Move InjectedScriptSource.js and derived sources generation.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/InjectedScriptSource.js: Renamed from Source/WebCore/inspector/InjectedScriptSource.js.

Source/WebCore:

Reviewed by Timothy Hatcher.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Remove old InjectedScript files.

* ForwardingHeaders/inspector/InjectedScript.h: Added.
* ForwardingHeaders/inspector/InjectedScriptBase.h: Added.
* ForwardingHeaders/inspector/InjectedScriptHost.h: Added.
* ForwardingHeaders/inspector/InjectedScriptManager.h: Added.
* ForwardingHeaders/inspector/InjectedScriptModule.h: Added.
* ForwardingHeaders/inspector/InspectorEnvironment.h: Added.
Expose headers to WebCore.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::developerExtrasEnabled):
(WebCore::InspectorController::canAccessInspectedScriptState):
(WebCore::InspectorController::functionCallHandler):
(WebCore::InspectorController::evaluateHandler):
(WebCore::InspectorController::willCallInjectedScriptFunction):
(WebCore::InspectorController::didCallInjectedScriptFunction):
* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::functionCallHandler):
(WebCore::WorkerInspectorController::evaluateHandler):
(WebCore::WorkerInspectorController::willCallInjectedScriptFunction):
(WebCore::WorkerInspectorController::didCallInjectedScriptFunction):
Make both InspectorControllers in WebCore be InspectorEnvironments.

* bindings/js/JSMainThreadExecState.h:
* bindings/js/JSMainThreadExecState.cpp:
(WebCore::evaluateHandlerFromAnyThread):
Make JSC::evaluate wrapper like the existing JSC::call wrapper.
These will be the ScriptFunctionCall implementations when debugging
a WebCore::Page or worker, instead of the pure JSC versions.

* inspector/PageInjectedScriptHost.h: Copied from Source/WebCore/inspector/CommandLineAPIModule.h.
* inspector/PageInjectedScriptHost.cpp: Copied from Source/WebCore/inspector/PageInjectedScriptManager.cpp.
(WebCore::PageInjectedScriptHost::type):
(WebCore::PageInjectedScriptHost::isHTMLAllCollection):
WebCore InjectedScriptHost implementation for DOM type handling.

* inspector/PageInjectedScriptManager.h:
* inspector/PageInjectedScriptManager.cpp:
(WebCore::PageInjectedScriptManager::PageInjectedScriptManager):
(WebCore::PageInjectedScriptManager::discardInjectedScriptsFor):
WebCore InjectedScriptManager implementation for CommandLineAPI and
specialized DOMWindow injected script management.

* bindings/js/JSBindingsAllInOne.cpp:
* inspector/CommandLineAPIHost.cpp:
* inspector/CommandLineAPIHost.h:
* inspector/CommandLineAPIModule.cpp:
(WebCore::CommandLineAPIModule::host):
* inspector/CommandLineAPIModule.h:
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::addToFrontend):
* inspector/ConsoleMessage.h:
* inspector/InjectedScriptCanvasModule.cpp:
(WebCore::InjectedScriptCanvasModule::InjectedScriptCanvasModule):
* inspector/InjectedScriptCanvasModule.h:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorCanvasAgent.h:
(WebCore::InspectorCanvasAgent::create):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
(WebCore::InspectorDOMAgent::create):
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
(WebCore::InspectorDebuggerAgent::injectedScriptManager):
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::create):
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
(WebCore::InspectorIndexedDBAgent::create):
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::PageProfilerAgent::PageProfilerAgent):
(WebCore::InspectorProfilerAgent::create):
(WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
* inspector/InspectorRuntimeAgent.h:
(WebCore::InspectorRuntimeAgent::injectedScriptManager):
* inspector/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::PageConsoleAgent):
* inspector/PageConsoleAgent.h:
(WebCore::PageConsoleAgent::create):
* inspector/PageDebuggerAgent.cpp:
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
* inspector/PageRuntimeAgent.h:
(WebCore::PageRuntimeAgent::create):
* inspector/WorkerConsoleAgent.cpp:
(WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
* inspector/WorkerConsoleAgent.h:
(WebCore::WorkerConsoleAgent::create):
* inspector/WorkerDebuggerAgent.cpp:
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
* inspector/WorkerRuntimeAgent.h:
(WebCore::WorkerRuntimeAgent::create):
Switch to using the Inspector namespace and JSC InjectedScript files.

* bindings/js/JSInjectedScriptManager.cpp: Removed.
* inspector/InjectedScript.h: Removed.
* inspector/InjectedScriptHost.cpp: Removed.
* inspector/InjectedScriptHost.h: Removed.
* inspector/InjectedScriptHost.idl: Removed.

With the updated location switch to using the appropriate INSPECTOR_SCRIPTS_DIR
variable which defines where the scripts are.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

Currently InjectedScriptBase uses InspectorInstrumentation directly
to track calling into JavaScript for timeline purposes. We will remove
the direct call from InjectedScriptBase and extracting the Cookie class
will make that easier.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/InspectorInstrumentationCookie.cpp: Added.
(WebCore::InspectorInstrumentationCookie::InspectorInstrumentationCookie):
(WebCore::InspectorInstrumentationCookie::operator=):
(WebCore::InspectorInstrumentationCookie::~InspectorInstrumentationCookie):
* inspector/InspectorInstrumentationCookie.h: Added.
(WebCore::InspectorInstrumentationCookie::isValid):
(WebCore::InspectorInstrumentationCookie::instrumentingAgents):
(WebCore::InspectorInstrumentationCookie::hasMatchingTimelineAgentId):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Constructors for Objective-C classes do not work properly with instanceof
https://bugs.webkit.org/show_bug.cgi?id=126670

Reviewed by Oliver Hunt.

This bug is due to the fact that the JS constructors created for Objective-C classes via the JSC
API inherit from JSCallbackObject, which overrides hasInstance with its own customHasInstance.
JSCallbackObject::customHasInstance only checks the JSClassRefs for hasInstance callbacks.
If it doesn't find any callbacks, it returns false.

This patch adds a hasInstance callback to constructors created for Objective-C wrapper classes.

* API/JSWrapperMap.mm:
(constructorHasInstance):
(constructorWithCustomBrand):
(allocateConstructorForCustomClass):
* API/tests/testapi.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Windows build fix for r161563.

Remove reference to removed file.

* bindings/js/JSBindingsAllInOne.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Promote WKBackForwardList{,Item}.h to public
https://bugs.webkit.org/show_bug.cgi?id=126707

Reviewed by Sam Weinig.

Source/WebKit2: 

* UIProcess/API/Cocoa/WKBackForwardList.h: Stopped including the C API header.
* UIProcess/API/Cocoa/WKBackForwardListItem.h: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Made the headers public.

Tools: 

* Scripts/check-for-webkit-framework-include-consistency: Account for stale private headers
left behind in the build products directory after a private header is made public.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disconnect child frames iteratively
https://bugs.webkit.org/show_bug.cgi?id=126700

Reviewed by Andreas Kling.

Use descendant iterator instead of recursion for traversal.

* dom/ContainerNode.cpp:
(WebCore::willRemoveChild):
(WebCore::willRemoveChildren):
(WebCore::ContainerNode::disconnectDescendantFrames):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::assertConnectedSubrameCountIsConsistent):
(WebCore::collectFrameOwners):
(WebCore::disconnectSubframes):
        
    Get rid of the strange ChildFrameDisconnector class in favor of a function.

* dom/ContainerNodeAlgorithms.h:
(WebCore::disconnectSubframesIfNeeded):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PDFDocumentImage can be very slow to do the initial paint
https://bugs.webkit.org/show_bug.cgi?id=126633
<rdar://problem/15770980>

Reviewed by Simon Fraser.

* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::PDFDocumentImage):
(WebCore::PDFDocumentImage::size):
(WebCore::transformContextForPainting):
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
(WebCore::applyRotationForPainting):
(WebCore::PDFDocumentImage::drawPDFPage):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/mac/PDFDocumentImageMac.mm:
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Store rotation from the PDF in degrees, since it can
only be 0, 90, 180, or 270, and don't do any trig to
perform the rotation, to avoid introducing minor rounding
issues in the size.

Once we're going to paint, if the difference between the
computed scale for each axis is due only to integer rounding
of the image size, use the same scale for both axes, to avoid
a CG slow-path which occurs whenever the scale is nonuniform.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Factor the ReferenceBox type out of BasicShapes
https://bugs.webkit.org/show_bug.cgi?id=126648

Reviewed by Dirk Schulze.

Moving ReferenceBox out of BasicShapes and into RenderStyleConstants
as the LayoutBox enum. Most of the changes are removing the BasicShape
namespace.

Refactoring, no new tests.

* css/BasicShapeFunctions.cpp:
(WebCore::valueForBox):
(WebCore::boxForValue):
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/BasicShapeFunctions.h:
* css/CSSBasicShapes.cpp:
(WebCore::CSSBasicShapeRectangle::cssText):
(WebCore::CSSBasicShapeRectangle::equals):
(WebCore::CSSBasicShapeCircle::cssText):
(WebCore::CSSBasicShapeCircle::equals):
(WebCore::CSSDeprecatedBasicShapeCircle::cssText):
(WebCore::CSSDeprecatedBasicShapeCircle::equals):
(WebCore::CSSBasicShapeEllipse::cssText):
(WebCore::CSSBasicShapeEllipse::equals):
(WebCore::CSSDeprecatedBasicShapeEllipse::cssText):
(WebCore::CSSDeprecatedBasicShapeEllipse::equals):
(WebCore::CSSBasicShapePolygon::cssText):
(WebCore::CSSBasicShapePolygon::equals):
(WebCore::CSSBasicShapeInsetRectangle::cssText):
(WebCore::CSSBasicShapeInsetRectangle::equals):
(WebCore::CSSBasicShapeInset::cssText):
* css/CSSBasicShapes.h:
(WebCore::CSSBasicShape::layoutBox):
(WebCore::CSSBasicShape::setLayoutBox):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseShapeProperty):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
* rendering/ClipPathOperation.h:
(WebCore::ShapeClipPathOperation::setReferenceBox):
(WebCore::ShapeClipPathOperation::referenceBox):
(WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
(WebCore::BoxClipPathOperation::create):
(WebCore::BoxClipPathOperation::referenceBox):
(WebCore::BoxClipPathOperation::BoxClipPathOperation):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createLayoutBoxShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::setShapeSize):
(WebCore::ShapeInfo::logicalTopOffset):
(WebCore::ShapeInfo::logicalLeftOffset):
* rendering/shapes/ShapeInsideInfo.h:
* rendering/shapes/ShapeOutsideInfo.h:
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShape::canBlend):
(WebCore::BasicShape::referenceBoxSize):
* rendering/style/BasicShapes.h:
(WebCore::BasicShape::layoutBox):
(WebCore::BasicShape::setLayoutBox):
(WebCore::BasicShape::BasicShape):
* rendering/style/RenderStyleConstants.h:
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::createLayoutBoxValue):
(WebCore::ShapeValue::layoutBox):
(WebCore::ShapeValue::ShapeValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Margin tiles are not repainted when background color changes
https://bugs.webkit.org/show_bug.cgi?id=126541
-and corresponding-
<rdar://problem/15578131>

Reviewed by Simon Fraser.

This patch adds an optional parameter to GraphicsLayer::setNeedsDisplayInRect, 
RenderLayerBacking::setContentsNeedDisplay(), and 
RenderLayer::setBackingNeedsRepaint() that is used to determine whether or not to 
clip the invalidation rect to the size of the layer. Then whenever the margin 
needs to be repainted, we can call setNeedsDisplayInRect() with a rect that 
includes the margin, and also indicate that it should not be clipped.

GraphicsLayer now takes an optional parameter which is an enum called 
ShouldClipToLayer.
* WebCore.exp.in:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::setNeedsDisplayInRect):
* platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setNeedsDisplayInRect):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Make TileController::bounds() a virtual function, and declare it on TiledBacking 
so that we can call it from RenderLayerBacking.
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileController.h:

RenderLayer also now takes an optional parameter which is an enum called 
ShouldClipToLayer.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:

If the margin needs to be repainted, call GraphicsLayer::setNeedsDisplayInRect 
with a big enough rect and a ShouldClipToLayer value of DoNotClipToLayer.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
* rendering/RenderLayerBacking.h:

Whenever all of the root contents need to be repainted the margin will also need 
to be repainted, so call setBackingNeedsRepaint() with the new parameter 
indicating the the invalidation should NOT be clipped to the layer size.
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintRootContents):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 View Gestures: Support plugins that take over the page scale gesture
https://bugs.webkit.org/show_bug.cgi?id=126399
<rdar://problem/15738928>

Reviewed by Sam Weinig.

Teach ViewGestureController how to handle WebFrame::handlesPageScaleGesture=true,
which is used so that PDFPlugin can deal with magnification itself.

* UIProcess/mac/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::didCollectGeometryForMagnificationGesture):
(WebKit::ViewGestureController::handleMagnificationGesture):
(WebKit::ViewGestureController::endMagnificationGesture):
(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
If the WebFrame is going to handle the page scale gesture itself (which currently
simply means that it is a main-frame PDFPlugin), send the magnification information
straight through to it. Also, don't provide smart-zoom in this case, since there
is currently no way to collect geometry information from the plugin.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureController.messages.in:
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
Retrieve WebFrame::handlesPageScaleGesture and return it to the UI process.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DocumentOrderedMap should use iterator
https://bugs.webkit.org/show_bug.cgi?id=126696

Reviewed by Andreas Kling.

* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesId):
(WebCore::keyMatchesName):
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
(WebCore::keyMatchesLowercasedUsemap):
(WebCore::keyMatchesLabelForAttribute):
(WebCore::keyMatchesWindowNamedItem):
(WebCore::keyMatchesDocumentNamedItem):
        
    Switch to Element references.

(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getAllElementsById):
        
     Use element iterator instead of ElementTraversal.

* dom/DocumentOrderedMap.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Narrow underlines are too tall
https://bugs.webkit.org/show_bug.cgi?id=126708

Reviewed by Simon Fraser.

Source/WebCore:

I made a typo in r158392 and used was settings the line rect's
height equal to its width. No one noticed because of the subsequent
if statement.

Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::computeLineBoundsAndAntialiasingModeForText):

LayoutTests:

This test clips to a region that should not be drawn in, then draws a scaled underline. It then compares
the output to an empty element.

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AI for CreateArguments should pass through non-SpecEmpty input values
https://bugs.webkit.org/show_bug.cgi?id=126709

Reviewed by Mark Hahnenberg.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* tests/stress/use-arguments-as-object-pointer.js: Added.
(foo):



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