Web Inspector: clearing the console log doesn't update the activity viewer
https://bugs.webkit.org/show_bug.cgi?id=130774

Reviewed by Joseph Pecoraro.

Ensure we take the changes made to the ivars into account on the view.

* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._consoleWasCleared):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up questionable style in ScriptExecutable::prepareForExecutionImpl
https://bugs.webkit.org/show_bug.cgi?id=130845

Reviewed by Filip Pizlo.

There was a hack added to make sure C Loop LLInt worked which included overriding the
global Options::useLLInt setting, which makes no sense to do here. We should put the
update of the global setting in Options::recomputeDependentOptions along with the other
execution engine flags.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::prepareForExecutionImpl):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Provide SPI to disallow remote inspection of a JSContext
https://bugs.webkit.org/show_bug.cgi?id=130853

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-03-27
Reviewed by Timothy Hatcher.

* API/JSContextPrivate.h: Added.
* API/JSContext.mm:
(-[JSContext _remoteInspectionEnabled]):
(-[JSContext _setRemoteInspectionEnabled:]):
ObjC SPI to enable/disable remote inspection.

* API/JSContextRefPrivate.h:
* API/JSContextRef.cpp:
(JSGlobalContextGetRemoteInspectionEnabled):
(JSGlobalContextSetRemoteInspectionEnabled):
C SPI to enable/disable remote inspection.

* JavaScriptCore.xcodeproj/project.pbxproj:
Add new private header, and export as a private header.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove comment from Filter.h
https://bugs.webkit.org/show_bug.cgi?id=130848

Reviewed by Simon Fraser.

Exploring the use of consts on applyScale() methods didn't yield
good results.

No new tests, no change on behavior.

* platform/graphics/filters/Filter.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some unnecessary branches from LiveNodeList traversal
https://bugs.webkit.org/show_bug.cgi?id=130854

Reviewed by Andreas Kling.

Compile different traversal code paths for all NodeList subclasses.

* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList):
(WebCore::ClassNodeList::~ClassNodeList):
(WebCore::ClassNodeList::nodeMatches): Deleted.
* dom/ClassNodeList.h:
(WebCore::ClassNodeList::nodeMatches):
(WebCore::ClassNodeList::nodeMatchesInlined): Deleted.
        
    Remove separate nodeMatchesInlined functions. 
    We now rely on exact types and marking classes final.

* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::~LiveNodeList):
(WebCore::LiveNodeList::namedItem):
(WebCore::LiveNodeList::rootNode): Deleted.
(WebCore::isMatchingElement): Deleted.
(WebCore::firstMatchingElement): Deleted.
(WebCore::lastMatchingElement): Deleted.
(WebCore::nextMatchingElement): Deleted.
(WebCore::previousMatchingElement): Deleted.
(WebCore::traverseMatchingElementsForward): Deleted.
(WebCore::traverseMatchingElementsBackward): Deleted.
(WebCore::LiveNodeList::collectionFirst): Deleted.
(WebCore::LiveNodeList::collectionLast): Deleted.
(WebCore::LiveNodeList::collectionTraverseForward): Deleted.
(WebCore::LiveNodeList::collectionTraverseBackward): Deleted.
(WebCore::LiveNodeList::length): Deleted.
(WebCore::LiveNodeList::item): Deleted.
(WebCore::LiveNodeList::memoryCost): Deleted.
(WebCore::LiveNodeList::invalidateCache): Deleted.
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::invalidateCacheForAttribute):
(WebCore::CachedLiveNodeList::collectionCanTraverseBackward):
(WebCore::LiveNodeList::rootNode):
(WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
        
    Add CachedLiveNodeList<NodeListType> utility type that interfaces with CollectionIndexCache.
    It is the base class for all concrete LiveNodeLists.

(WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
(WebCore::CachedLiveNodeList<NodeListType>::collectionFirst):
(WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
(WebCore::nextMatchingElement):
(WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
(WebCore::previousMatchingElement):
(WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
(WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
(WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
(WebCore::CachedLiveNodeList<NodeListType>::length):
(WebCore::CachedLiveNodeList<NodeListType>::item):
(WebCore::CachedLiveNodeList<NodeListType>::memoryCost):
        
    Templated code moves to header.

(WebCore::LiveNodeList::LiveNodeList): Deleted.
(WebCore::LiveNodeList::~LiveNodeList): Deleted.
(WebCore::LiveNodeList::invalidateCache): Deleted.
(WebCore::LiveNodeList::collectionCanTraverseBackward): Deleted.
(WebCore::LiveNodeList::willValidateIndexCache): Deleted.
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
* dom/NameNodeList.h:
* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches):
(WebCore::NodeListsNodeData::invalidateCaches):
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::TagNodeList):
(WebCore::HTMLTagNodeList::HTMLTagNodeList):
(WebCore::HTMLTagNodeList::~HTMLTagNodeList):
(WebCore::TagNodeList::nodeMatches): Deleted.
(WebCore::HTMLTagNodeList::nodeMatches): Deleted.
* dom/TagNodeList.h:
(WebCore::TagNodeList::nodeMatches):
(WebCore::HTMLTagNodeList::nodeMatches):
(WebCore::TagNodeList::create): Deleted.
(WebCore::HTMLTagNodeList::nodeMatchesInlined): Deleted.
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
* html/RadioNodeList.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add reload and reloadFromOrigin as API
https://bugs.webkit.org/show_bug.cgi?id=130858

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView reload:]):
(-[WKWebView reloadFromOrigin:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Give WebProcess a proxy application entitlement
https://bugs.webkit.org/show_bug.cgi?id=130806

Reviewed by Timothy Hatcher.

* Configurations/WebContent-iOS.entitlements:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crash when RenderView is cleared inside of frame flattening layout
https://bugs.webkit.org/show_bug.cgi?id=130864

Reviewed by Dan Bernstein.

Navigating on http://wallstcheatsheet.com pages on iOS in WebKit1 would
sometimes crash when, inside the inChildFrameLayoutWithFrameFlattening clause,
our frame's RenderView would be null after doing a layout from the root frame,
possibly also when WebCore was being re-entered from another thread.

Add a null check to fix this.

Crash was timing-dependent and hard to test.

* page/FrameView.cpp:
(WebCore::FrameView::layout):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't leak the WKBrowsingContextController
https://bugs.webkit.org/show_bug.cgi?id=130815

Reviewed by Tim Horton.

Use adoptNS to avoid leaking the WKBrowsingContextController.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView browsingContextController]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support dynamic layer hosting context changes
<rdar://problem/16278019>
https://bugs.webkit.org/show_bug.cgi?id=130863

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView _windowDidChangeLayerHosting:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::layerHostingModeDidChange):
* UIProcess/WebPageProxy.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Check the remembered set bit faster
https://bugs.webkit.org/show_bug.cgi?id=130860

Reviewed by Oliver Hunt.

Currently we look up the remembered set bit in the MarkedBlock in C++ code, but
that bit is also stored in the object. We should look it up there whenever possible.

* heap/CopiedBlockInlines.h:
(JSC::CopiedBlock::shouldReportLiveBytes):
* heap/Heap.cpp:
(JSC::Heap::addToRememberedSet):
* heap/Heap.h:
* heap/HeapInlines.h: Removed.
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::reportExtraMemoryUsage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid fetching JSObject::structure() repeatedly in putDirectInternal.
<https://webkit.org/b/130857>

Use the cached Structure* instead of re-fetching it over and over since
that's a non-trivial operation these days.

Reviewed by Mark Hahnenberg.

* runtime/JSObject.h:
(JSC::JSObject::putDirectInternal):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove LiveNodeList::Type
https://bugs.webkit.org/show_bug.cgi?id=130866

Reviewed by Andreas Kling.

We don't need dynamic type information anymore.

* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByName):
(WebCore::ContainerNode::getElementsByClassName):
(WebCore::ContainerNode::radioNodeList):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::LiveNodeList):
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::invalidationType):
(WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
(WebCore::LiveNodeList::type): Deleted.
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
(WebCore::NameNodeList::nodeMatches): Deleted.
* dom/NameNodeList.h:
(WebCore::NameNodeList::nodeMatches):
* dom/NodeRareData.h:
(WebCore::NodeListTypeIdentifier<ClassNodeList>::value):
(WebCore::NodeListTypeIdentifier<NameNodeList>::value):
(WebCore::NodeListTypeIdentifier<TagNodeList>::value):
(WebCore::NodeListTypeIdentifier<HTMLTagNodeList>::value):
(WebCore::NodeListTypeIdentifier<RadioNodeList>::value):
(WebCore::NodeListTypeIdentifier<LabelsNodeList>::value):
        
    Get unique id from type for key generation purposes only.

(WebCore::NodeListsNodeData::addCacheWithAtomicName):
(WebCore::NodeListsNodeData::addCacheWithName):
(WebCore::NodeListsNodeData::removeCacheWithAtomicName):
(WebCore::NodeListsNodeData::removeCacheWithName):
(WebCore::NodeListsNodeData::namedNodeListKey):
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::TagNodeList):
(WebCore::HTMLTagNodeList::HTMLTagNodeList):
* dom/TagNodeList.h:
* html/LabelableElement.cpp:
(WebCore::LabelableElement::labels):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
* html/RadioNodeList.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r166360.
https://bugs.webkit.org/show_bug.cgi?id=130869

Seems to have broken PLT (Requested by ap on #webkit).

Reverted changeset:

Source/WebCore:

"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360

Source/WebKit/mac:

"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360

Source/WebKit2:

"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360

Source/WTF:

"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
https://bugs.webkit.org/show_bug.cgi?id=130868

Reviewed by Sam Weinig.

* Shared/API/Cocoa/RemoteObjectRegistry.h:
* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
* Shared/API/Cocoa/WKRemoteObject.h:
* Shared/API/Cocoa/WKRemoteObject.mm:
(-[WKRemoteObject _initWithObjectRegistry:interface:]):
* Shared/API/Cocoa/WKRemoteObjectCoder.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
* Shared/API/Cocoa/WKRemoteObjectInterface.h:
* Shared/API/Cocoa/WKRemoteObjectInterface.mm:
(isContainerClass): Deleted.
(propertyListClasses): Deleted.
(allowedArgumentClassesForMethod): Deleted.
(initializeAllowedArgumentClasses): Deleted.
(-[WKRemoteObjectInterface initWithProtocol:identifier:]): Deleted.
(+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]): Deleted.
(-[WKRemoteObjectInterface description]): Deleted.
(classesForSelectorArgument): Deleted.
(-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Deleted.
(-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Deleted.
(methodArgumentTypeEncodingForSelector): Deleted.
(-[WKRemoteObjectInterface _methodSignatureForSelector:]): Deleted.
(-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Deleted.
* Shared/API/Cocoa/WKRemoteObjectRegistry.h:
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry registerExportedObject:interface:]): Deleted.
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]): Deleted.
(-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]): Deleted.
(-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]): Deleted.
(-[WKRemoteObjectRegistry _invalidate]): Deleted.
(-[WKRemoteObjectRegistry _sendInvocation:interface:]): Deleted.
(-[WKRemoteObjectRegistry WebKit::]): Deleted.
(-[WKRemoteObjectRegistry _invokeMethod:]): Deleted.
(-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectInterface.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm.
(isContainerClass):
(propertyListClasses):
(allowedArgumentClassesForMethod):
(initializeAllowedArgumentClasses):
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
(-[_WKRemoteObjectInterface description]):
(classesForSelectorArgument):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
(methodArgumentTypeEncodingForSelector):
(-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
(-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm.
(-[_WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[_WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
(-[_WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
(-[_WKRemoteObjectRegistry _invalidate]):
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[_WKRemoteObjectRegistry WebKit::]):
(-[_WKRemoteObjectRegistry _invokeMethod:]):
(-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
(-[WKBrowsingContextController remoteObjectRegistry]): Deleted.
* UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _remoteObjectRegistry]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h.
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]): Deleted.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Compute a good exposed rect when scaling WKContentView
https://bugs.webkit.org/show_bug.cgi?id=130761

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-27
Reviewed by Simon Fraser.

Source/WebCore: 

* WebCore.exp.in:
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::setScrollVelocity):
(WebCore::ScrollView::computeCoverageRect):
While scaling in, do not add margins tiles. When scaling out, add 1 margin tile size
all around.

Source/WebKit2: 

Add a simple heuristic to improve tiling while zooming. In theory we could take the zoom
center and scaleRate to split the speed between scrolling and pinching. In practice,
zoom is transitory and is not as predictable as scrolling, so this patch just does a very
simple heuristic:
-When zooming in, do not expand coverage.
-When zooming out, add half a tile size on every side.

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::timestamp):
(WebKit::VisibleContentRectUpdateInfo::horizontalVelocity):
(WebKit::VisibleContentRectUpdateInfo::verticalVelocity):
(WebKit::VisibleContentRectUpdateInfo::scaleChangeRate):
* UIProcess/ios/WKContentView.mm:
(WebKit::HistoricalVelocityData::VelocityData::VelocityData):
(WebKit::HistoricalVelocityData::velocityForNewData):
(WebKit::HistoricalVelocityData::append):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::adjustExposedRectForBoundedScale):
When zooming past the maximum size, adjust the exposed rect to continue tiling the area
at maximum size. Otherwise, we tile a tiny area, and have to retile larger when the animation
pull back the view to maximum scale.

(WebKit::adjustVelocityDataForBoundedScale):
Since we do not split the velocity from scrolling from the scaling, just clear the velocity when zooming.
Also clear the scaleChangeRate when the scale is out of bounds. There is no reason to add tiles for
temporary state.

(WebKit::WebPage::updateVisibleContentRects):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r166364.
https://bugs.webkit.org/show_bug.cgi?id=130872

Caused a test assertion (Requested by smfr on #webkit).

Reverted changeset:

"Operator stretching: expose a math data API"
https://bugs.webkit.org/show_bug.cgi?id=130572
http://trac.webkit.org/changeset/166364

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][iOS] <rdar://problem/16414684> WKWebView should draw a white background before the page loads
https://bugs.webkit.org/show_bug.cgi?id=130873

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-27
Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes][css clip-path] rounded corner calculation for box shapes is wrong
https://bugs.webkit.org/show_bug.cgi?id=127982

Reviewed by Simon Fraser.

Source/WebCore:

Calculate rounded corners for box shapes as defined in the CSS Shapes
spec.

Tests: css3/masking/clip-path-border-radius-border-box-000.html
       css3/masking/clip-path-border-radius-content-box-000.html
       css3/masking/clip-path-border-radius-content-box-001.html
       css3/masking/clip-path-border-radius-padding-box-000.html
       css3/masking/clip-path-border-radius-padding-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-003.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-002.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-003.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-004.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-002.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-003.html

* platform/graphics/RoundedRect.h:
(WebCore::RoundedRect::Radii::transposedRadii): Transpose radii for
    vertical writing modes.
(WebCore::RoundedRect::moveBy): Add method for use with clip path.
(WebCore::RoundedRect::transposedRect): Transpose rect for vertical
    writing modes.
* rendering/RenderBox.h:
(WebCore::RenderBox::marginBoxRect): Return the margin box rect for
    the RenderBox.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath): Call the new function for the
    rounded corner calculation.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape): Call the new function
    for the rounded corner calculation.
* rendering/shapes/BoxShape.cpp:
(WebCore::adjustRadiusForMarginBoxShape): Helper function for
    computeRoundedRectForLayoutBoxShape.
(WebCore::computeMarginBoxShapeRadius): Ditto.
(WebCore::computeMarginBoxShapeRadii): Ditto.
(WebCore::computeRoundedRectForBoxShape): Utility function to do the
    rounded corner calculation.
* rendering/shapes/BoxShape.h: Add new function.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::getRoundedInnerBorderFor): Add default argument
    values.

LayoutTests:

* css3/masking/clip-path-border-radius-border-box-000-expected.html: Added.
* css3/masking/clip-path-border-radius-border-box-000.html: Added.
* css3/masking/clip-path-border-radius-content-box-000-expected.html: Added.
* css3/masking/clip-path-border-radius-content-box-000.html: Added.
* css3/masking/clip-path-border-radius-content-box-001-expected.html: Added.
* css3/masking/clip-path-border-radius-content-box-001.html: Added.
* css3/masking/clip-path-border-radius-padding-box-000-expected.html: Added.
* css3/masking/clip-path-border-radius-padding-box-000.html: Added.
* css3/masking/clip-path-border-radius-padding-box-001-expected.html: Added.
* css3/masking/clip-path-border-radius-padding-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-003-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-003.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-003-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-003.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-004-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-004.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-003-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-003.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for AirPlay picker in WK2 for iOS.
https://bugs.webkit.org/show_bug.cgi?id=130855
<rdar://problem/15349859>

Source/WebCore: 

Reviewed by Eric Carlson, Joseph Pecoraro and Benjamin Poulain.

Adds support in HTMLMediaSession to display the airplay picker
and to monitor presence of available wireless targets.

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::showPlaybackTargetPicker):
(WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
* loader/EmptyClients.h:
* page/ChromeClient.h:
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::wirelessRoutesAvailableChanged):
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
(WebCore::MediaSessionManager::startMonitoringAirPlayRoutes):
(WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes):
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::hasWirelessTargetsAvailable):
(WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes):
(WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes):
(-[WebMediaSessionHelper initWithCallback:]):
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):

Source/WebKit/ios: 

Reviewed by Eric Carlson, Joseph Pecoraro and Benjamin Poulain.

Adds stub for new WebKit chrome client method.

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::showAirPlayRoutePicker):

Source/WebKit2: 

Reviewed by Joseph Pecoraro and Benjamin Poulain.

Adds support to display the airplay picker for iPhone and iPad
in WK2.
The picker on iPad is displayed next to the airplay button.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showAirPlayRoutePicker):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showAirPlayRoutePicker:fromRect:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showAirPlayRoutePicker):
* UIProcess/ios/forms/WKAirPlayRoutePicker.h: Added.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Added.
(-[WKAirPlayRoutePicker initWithView:]):
(-[WKAirPlayRoutePicker dealloc]):
(-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]):
(-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]):
(-[WKAirPlayRoutePicker _windowWillRotate:]):
(-[WKAirPlayRoutePicker _windowDidRotate:]):
(-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):
(-[WKAirPlayRoutePicker show:fromRect:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::showAirPlayRoutePicker):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::touchEventSyncForTesting):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rectForElementAtInteractionLocation):
(WebKit::WebPage::handleTap):



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