Fix the setter definition from r163514.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-06

* UIProcess/API/Cocoa/WKWebViewPrivate.h:


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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make adoption agency use the task queue
https://bugs.webkit.org/show_bug.cgi?id=109445

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: fast/parser/adoption-agency-crash-01.html
       fast/parser/adoption-agency-crash-02.html
       fast/parser/adoption-agency-crash-03.html

* html/parser/HTMLConstructionSite.cpp:
(WebCore::insert):
(WebCore::executeInsertTask):
(WebCore::executeReparentTask):
(WebCore::executeInsertAlreadyParsedChildTask):
(WebCore::executeTakeAllChildrenTask):
(WebCore::executeTask):
(WebCore::HTMLConstructionSite::attachLater):
(WebCore::HTMLConstructionSite::executeQueuedTasks):
(WebCore::HTMLConstructionSite::insertTextNode):
(WebCore::HTMLConstructionSite::reparent):
(WebCore::HTMLConstructionSite::insertAlreadyParsedChild):
(WebCore::HTMLConstructionSite::takeAllChildren):
(WebCore::HTMLConstructionSite::fosterParent):
* html/parser/HTMLConstructionSite.h:
(WebCore::HTMLConstructionSiteTask::HTMLConstructionSiteTask):
(WebCore::HTMLConstructionSiteTask::oldParent):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):

LayoutTests:

* TestExpectations:
* fast/parser/adoption-agency-crash-01-expected.txt: Added.
* fast/parser/adoption-agency-crash-01.html: Added.
* fast/parser/adoption-agency-crash-02-expected.txt: Added.
* fast/parser/adoption-agency-crash-02.html: Added.
* fast/parser/adoption-agency-crash-03-expected.txt: Added.
* fast/parser/adoption-agency-crash-03.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regenerate JSTestObj now that ScriptArguments moved. Generator knows what to do.

Rubber-stamped by Zalan Bujtas.

* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix iOS builds after r163574

* API/JSManagedValue.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Rounded Insets Let Content Overlap Shape
https://bugs.webkit.org/show_bug.cgi?id=127852

Reviewed by Bem Jones-Bey.

Source/WebCore:

Using LengthSize to FloatSize conversion from LengthSize.h lead to miscalculated
inset border radius, when the border radius was defined by percentages. This patch
fixes the behavior and removes the incorrect conversion.

Test: fast/shapes/shape-outside-floats/shape-outside-rounded-inset.html

* css/LengthFunctions.cpp:
(WebCore::floatSizeForLengthSize): Add new helper function for LengthSize to FloatSize conversion.
* css/LengthFunctions.h:
* platform/LengthSize.h: Remove floatSize conversion.
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape): Use new helper function to calculate the right with for the inset border radius.

LayoutTests:

* fast/shapes/shape-outside-floats/shape-outside-rounded-inset-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-rounded-inset.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Crash in WebCore::AXObjectCache::computedObjectAttributeCache
https://bugs.webkit.org/show_bug.cgi?id=128310

Reviewed by Alexey Proskuryakov.

Be more careful about using axObjectCache() directly since it can return null.
I audited the usage cases of this method and ensured the ptr was not null in cases
where I thought we might get hit by this.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::parentObject):
(WebCore::AccessibilityNodeObject::menuForMenuButton):
(WebCore::AccessibilityNodeObject::menuButtonForMenu):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
(WebCore::AccessibilityObject::findMatchingObjects):
(WebCore::AccessibilityObject::elementAccessibilityHitTest):
(WebCore::AccessibilityObject::axObjectCache):
(WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
(WebCore::AccessibilityObject::accessibilityIsIgnored):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::parentObjectIfExists):
(WebCore::AccessibilityRenderObject::parentObject):
(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::isTabItemSelected):
(WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
(WebCore::AccessibilityRenderObject::nodeIsTextControl):
(WebCore::AccessibilityRenderObject::activeDescendant):
(WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
(WebCore::AccessibilityRenderObject::observableObject):
(WebCore::AccessibilityRenderObject::textChanged):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::addChildScrollbar):
(WebCore::AccessibilityScrollView::webAreaObject):
(WebCore::AccessibilityScrollView::parentObject):
(WebCore::AccessibilityScrollView::parentObjectIfExists):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WebKit2] Remove JoinExistingSession from plist
https://bugs.webkit.org/show_bug.cgi?id=128318
<rdar://problem/15971612>

Reviewed by Tim Horton.

Remove JoinExistingSession key that is not available on iOS.

* NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] WebKit2 can't access the GPU
https://bugs.webkit.org/show_bug.cgi?id=128345
<rdar://problem/15976084>

Reviewed by Tim Horton.

Add an entitlement to allow web process to access GPU.

* Configurations/WebContent-iOS.entitlements: Added.
* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r163558.
http://trac.webkit.org/changeset/163558
https://bugs.webkit.org/show_bug.cgi?id=128350

Breaks scrolling on certain websites (Requested by bfulgham on
#webkit).

* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):
* page/WheelEventDeltaTracker.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+[JSContext currentCallee] should return the currently executing JS function
https://bugs.webkit.org/show_bug.cgi?id=122621

Reviewed by Geoffrey Garen.

It would be useful if there was a +[JSContext currentObject] API which was 
callable from ObjC API callbacks. Its purpose would be to allow convenient 
access to the JSValue wrapper for the currently-executing block callback.

* API/JSContext.h:
* API/JSContext.mm:
(+[JSContext currentCallee]):
(-[JSContext beginCallbackWithData:calleeValue:thisValue:argumentCount:arguments:]):
* API/JSContextInternal.h:
* API/ObjCCallbackFunction.mm:
(JSC::objCCallbackFunctionCallAsFunction):
(JSC::objCCallbackFunctionCallAsConstructor):
* API/tests/testapi.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ChildProcess::m_activeTasks
https://bugs.webkit.org/show_bug.cgi?id=128342

Reviewed by Anders Carlson.

Currently we funnel a number of different user activities
to a single UserActivity object, which requires a call down
from WebCore to WebKit2. Split these out so we can track
them separately.

Source/WebCore: 

* page/ChromeClient.h:
    - removed [inc|dec]rementActivePageCount
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
    - incrementActivePageCount -> beginActivity
(WebCore::PageThrottler::~PageThrottler):
    - decrementActivePageCount -> endActivity
(WebCore::PageThrottler::throttlePage):
    - decrementActivePageCount -> endActivity
(WebCore::PageThrottler::unthrottlePage):
    - incrementActivePageCount -> beginActivity
* page/PageThrottler.h:
    - Added m_pageActivity.

Source/WebKit2: 

* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
    - added m_connectionActivity.
* PluginProcess/PluginProcess.h:
(WebKit::PluginProcess::connectionActivity):
    - added m_connectionActivity.
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didReceiveSyncMessage):
(WebKit::WebProcessConnection::destroyPlugin):
(WebKit::WebProcessConnection::createPlugin):
    - use connectionActivity
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess):
    - use a separate UserActivity for Java.
* Shared/ActivityAssertion.cpp:
(WebKit::ActivityAssertion::ActivityAssertion):
(WebKit::ActivityAssertion::~ActivityAssertion):
* Shared/ActivityAssertion.h:
    - ChildProcess -> UserActivity
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::ChildProcess):
* Shared/ChildProcess.h:
    - remove m_activeTasks.
(WebKit::ChildProcess::processSuppressionEnabled):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
    - removed [inc|dec]rementActivePageCount



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Check selectors exactly when invalidating style
https://bugs.webkit.org/show_bug.cgi?id=128321

Reviewed by Andreas Kling.
        
Selectors are now really fast to match with the JIT. Take advantage of this by invalidating
the document style exactly when a new stylesheet arrives (instead of using heuristics).
        
This reduces need for large style recalculations in some common cases.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::clearMatchedRules):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::hasMatchedRules):
* css/RuleSet.h:
(WebCore::RuleSet::hasShadowPseudoElementRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
* css/SelectorChecker.h:
        
    Add new mode where all pseudo elements match so we can invalidate their element.

* css/StyleInvalidationAnalysis.cpp:
(WebCore::shouldDirtyAllStyle):
(WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
(WebCore::invalidateStyleRecursively):
(WebCore::StyleInvalidationAnalysis::invalidateStyle):
        
    Switch to real selector checker.

* css/StyleInvalidationAnalysis.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::MatchedProperties::~MatchedProperties):
* css/StyleResolver.h:
(WebCore::StyleResolver::mediaQueryEvaluator):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add missing &.

* css/StyleInvalidationAnalysis.cpp:
(WebCore::shouldDirtyAllStyle):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Workaround REGRESSION(r163195-r163227): Crash beneath NSErrorUserInfoFromJSException when installing AppleInternal.mpkg
https://bugs.webkit.org/show_bug.cgi?id=128347

Reviewed by Geoffrey Garen.

Added a flag to VM class called m_ignoreStackLimit that disables stack limit checks.
We set this flag in JSContextGroupCreate() and JSGlobalContextCreateInGroup().

Disabled stack overflow tests in testapi.js since it uses these paths.

THis patch will be reverted as part of a comprehensive solution to the problem.

* API/JSContextRef.cpp:
(JSContextGroupCreate):
(JSGlobalContextCreateInGroup):
* API/tests/testapi.js:
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::updateStackLimitWithReservedZoneSize):
* runtime/VM.h:
(JSC::VM::ignoreStackLimit):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use child iterator in HTMLDetailsElement::findMainSummary().
<https://webkit.org/b/128335>

Reviewed by Antti Koivisto.

* html/HTMLDetailsElement.h:
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::findMainSummary):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Begin work on making preferences per page instead of per page group
https://bugs.webkit.org/show_bug.cgi?id=128349

Reviewed by Andreas Kling.

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupGetPreferences):
* UIProcess/API/C/mac/WKPagePrivateMac.cpp:
(WKPageIsURLKnownHSTSHost):
* UIProcess/API/mac/WKView.mm:
(-[WKView _preferencesDidChange]):
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorPageGroups::createInspectorPageGroup):
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::setAttachedWindowHeight):
(WebKit::WebInspectorProxy::setAttachedWindowWidth):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::shouldOpenAttached):
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::preferences):
* UIProcess/WebPageGroup.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::create):
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::isProcessSuppressible):
(WebKit::WebPageProxy::canShowMIMEType):
(WebKit::WebPageProxy::preferencesDidChange):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::preferences):
(WebKit::WebPageProxy::setPreferences):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::createWebPage):
* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::windowFrameDidChange):
(WebKit::WebInspectorProxy::platformAttach):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
loadSubframe can return null in SubframeLoader::loadOrRedirectSubframe
https://bugs.webkit.org/show_bug.cgi?id=128344

Reviewed by Ryosuke Niwa.

Source/WebCore:

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadOrRedirectSubframe):

LayoutTests:

* TestExpectations: Unskipped tests that were previously crashing

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for AVKit fullscreen to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=128143

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-02-06
Reviewed by Simon Fraser.

Source/WebCore:

Rename overloaded functions to prevent ambiguous template parameter
compile error in generated code.

Rename overloaded exitFullscreen to exitFullscreenWithCompletionHandler.
Rename overloaded enterFullscreen to enterFullscreenWithCompletionHandler.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController exitFullscreen]):
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::enterFullscreenWithCompletionHandler):
(WebVideoFullscreenInterfaceAVKit::enterFullscreen):
(WebVideoFullscreenInterfaceAVKit::exitFullscreenWithCompletionHandler):
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):
* platform/ios/WebVideoFullscreenModelMediaElement.h:

Source/WebKit2:

Add WebVideoFullscreenManager and WebVideoFullscreenManagerProxy that implement
WebVideoFullscreenModel and WebVideoFullscreenInterface.

* DerivedSources.make:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
    initialize member m_videoFullscreenManager

(WebKit::WebPageProxy::videoFullscreenManager):
    add accessor for videoFullscreenManager

* UIProcess/WebPageProxy.h:
* UIProcess/WebVideoFullscreenManagerProxy.cpp: Added.
(WebKit::WebVideoFullscreenManagerProxy::create):
(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
(WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
    add basic creation for object.

(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
(WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
(WebKit::WebVideoFullscreenManagerProxy::play):
(WebKit::WebVideoFullscreenManagerProxy::pause):
(WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
(WebKit::WebVideoFullscreenManagerProxy::seekToTime):
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
    implement WebVideoFullscreenModel to send IPC message.

* UIProcess/WebVideoFullscreenManagerProxy.h: Added.
* UIProcess/WebVideoFullscreenManagerProxy.messages.in: Added.
    this interface closely matches WebVideoFullscreenInterface

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::supportsFullscreenForNode):
(WebKit::WebChromeClient::enterFullscreenForNode):
(WebKit::WebChromeClient::exitFullscreenForNode):
    Forward these requests onto the videoFullscreenManager

* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::videoFullscreenManager):
    accessor for m_videoFullscreenManager

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebVideoFullscreenManager.cpp: Added.
(WebKit::WebVideoFullscreenManager::create):
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
(WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager):
    add basic creation for object.

(WebKit::WebVideoFullscreenManager::supportsFullscreen):
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
(WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
    implement interface called by WebChromeClient

(WebKit::WebVideoFullscreenManager::setDuration):
(WebKit::WebVideoFullscreenManager::setCurrentTime):
(WebKit::WebVideoFullscreenManager::setRate):
(WebKit::WebVideoFullscreenManager::setVideoDimensions):
(WebKit::WebVideoFullscreenManager::setVideoLayer):
(WebKit::WebVideoFullscreenManager::setVideoLayerID):
(WebKit::WebVideoFullscreenManager::enterFullscreen):
(WebKit::WebVideoFullscreenManager::exitFullscreen):
    implement WebVideoFullscreenInterface to send IPC message.

* WebProcess/WebVideoFullscreenManager.h: Added.
* WebProcess/WebVideoFullscreenManager.messages.in: Added.
    this interface closely matches WebVideoFullscreenModel

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix DoYouEvenBench after r163429.

* Scripts/webkitpy/performance_tests/perftest.py:


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