85 inspector tests asserting in DrawingAreaProxyImpl::updateAcceleratedCompositingMode()
when there is a stale WebKitTestRunner preference
https://bugs.webkit.org/show_bug.cgi?id=115115

Reviewed by Darin Adler.

Source/WebCore:

* page/Settings.cpp:
(WebCore::Settings::setMockScrollbarsEnabled):
(WebCore::Settings::setUsesOverlayScrollbars):
Added FIXMEs.

Tools:

Delete stale preferences on launch.

* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Now that we don't have preferences stored from
the previous run, we need th reinstate them before creating a WKView. Not all preferences
can be applied to an existing view retroactively.
(WTR::TestController::resetPreferencesToConsistentValues): Split out of resetStateToConsistentValues,
because there is no injected bundle yet when calling this function from initialize().

* WebKitTestRunner/mac/main.mm: (setDefaultsToConsistentValuesForTesting): Delete
the preferences.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm: (WTR::InjectedBundle::platformInitialize):
Added some FIXMEs.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Upstream Source/WebKit/ios/
https://bugs.webkit.org/show_bug.cgi?id=123470

Reviewed by Sam Weinig.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/ios:

* DefaultDelegates/WebDefaultFormDelegate.h: Added.
* DefaultDelegates/WebDefaultFormDelegate.m: Added.
* DefaultDelegates/WebDefaultFrameLoadDelegate.h: Added.
* DefaultDelegates/WebDefaultFrameLoadDelegate.m: Added.
* DefaultDelegates/WebDefaultResourceLoadDelegate.h: Added.
* DefaultDelegates/WebDefaultResourceLoadDelegate.m: Added.
* DefaultDelegates/WebDefaultUIKitDelegate.h: Added.
* DefaultDelegates/WebDefaultUIKitDelegate.m: Added.
* Misc/EmojiFallbackFontSelector.cpp: Added.
* Misc/EmojiFallbackFontSelector.h: Added.
* Misc/MemoryMeasure.h: Added.
* Misc/MemoryMeasure.mm: Added.
* Misc/WebGeolocationCoreLocationProvider.h: Added.
* Misc/WebGeolocationCoreLocationProvider.mm: Added.
* Misc/WebGeolocationProviderIOS.h: Added.
* Misc/WebGeolocationProviderIOS.mm: Added.
* Misc/WebNSStringDrawing.h: Added.
* Misc/WebNSStringDrawing.mm: Added.
* Misc/WebNSStringExtrasIOS.h: Added.
* Misc/WebNSStringExtrasIOS.m: Added.
* Misc/WebNSStringExtrasIPhone.h: Added.
* Misc/WebUIKitSupport.h: Added.
* Misc/WebUIKitSupport.mm: Added.
* Storage/WebSQLiteDatabaseTrackerClient.h: Added.
* Storage/WebSQLiteDatabaseTrackerClient.mm: Added.
* WebCoreSupport/PopupMenuIOS.h: Added.
* WebCoreSupport/PopupMenuIOS.mm: Added.
* WebCoreSupport/SearchPopupMenuIOS.cpp: Added.
* WebCoreSupport/SearchPopupMenuIOS.h: Added.
* WebCoreSupport/WebCaretChangeListener.h: Added.
* WebCoreSupport/WebChromeClientIOS.h: Added.
* WebCoreSupport/WebChromeClientIOS.mm: Added.
* WebCoreSupport/WebFixedPositionContent.h: Added.
* WebCoreSupport/WebFixedPositionContent.mm: Added.
* WebCoreSupport/WebFixedPositionContentInternal.h: Added.
* WebCoreSupport/WebFrameIOS.h: Added.
* WebCoreSupport/WebFrameIOS.mm: Added.
* WebCoreSupport/WebFrameIPhone.h: Added.
* WebCoreSupport/WebGeolocation.mm: Added.
* WebCoreSupport/WebGeolocationInternal.h: Added.
* WebCoreSupport/WebGeolocationPrivate.h: Added.
* WebCoreSupport/WebMIMETypeRegistry.h: Added.
* WebCoreSupport/WebMIMETypeRegistry.mm: Added.
* WebCoreSupport/WebSelectionRect.h: Added.
* WebCoreSupport/WebSelectionRect.m: Added.
* WebCoreSupport/WebVisiblePosition.h: Added.
* WebCoreSupport/WebVisiblePosition.mm: Added.
* WebCoreSupport/WebVisiblePositionInternal.h: Added.
* WebKit.iOS.exp: Added.
* WebView/WebFrameViewWAKCompatibility.m: Added.
* WebView/WebMailDelegate.h: Added.
* WebView/WebPDFViewIOS.h: Added.
* WebView/WebPDFViewIOS.mm: Added.
* WebView/WebPDFViewIPhone.h: Added.
* WebView/WebPDFViewPlaceholder.h: Added.
* WebView/WebPDFViewPlaceholder.mm: Added.
* WebView/WebPlainWhiteView.h: Added.
* WebView/WebPlainWhiteView.mm: Added.
* WebView/WebUIKitDelegate.h: Added.

Source/WebKit/mac:

* Configurations/WebKit.xcconfig: Excluded some iOS files from the Mac build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Delete the expected results for Lion.

Rubber-stamped by Anders Carlsson.

* platform/mac-lion: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Set svn:ignore for .pyc files created for test-webkitpy.

* Scripts/webkitpy/layout_tests/reftests: Added property svn:ignore.
* Scripts/webkitpy/performance_tests: Added property svn:ignore.
* Scripts/webkitpy/to_be_moved: Added property svn:ignore.
* Scripts/webkitpy/w3c: Added property svn:ignore.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove code for Mac Lion
https://bugs.webkit.org/show_bug.cgi?id=123542

Reviewed by Anders Carlsson.

Source/WebCore: 

Removed the code for Mac OS X 10.7.

* platform/graphics/ImageBuffer.h:
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::context):
(WebCore::ImageBuffer::flushContext):
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::imageSourceOptions):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::scrollAnimationEnabledForSystem):
* platform/mac/ScrollElasticityController.mm:
(WebCore::reboundDeltaForElasticDelta):
* platform/mac/ThemeMac.mm:
(WebCore::updateStates):
(WebCore::paintCheckbox):
(WebCore::paintRadio):
(WebCore::paintButton):
* platform/mac/WebCoreNSCellExtras.h:
* platform/mac/WebCoreNSCellExtras.m:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::textField):

Source/WebKit/mac: 

* WebView/WebHTMLView.mm:
(-[WebHTMLView attachRootLayer:]):
* WebView/WebView.mm:

Source/WebKit2: 


* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* UIProcess/API/mac/WKView.mm:
(-[WKView viewWillMoveToWindow:]):
* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF: 

* wtf/Platform.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove basic uses of InspectorState from agents
https://bugs.webkit.org/show_bug.cgi?id=123534

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-30
Reviewed by Timothy Hatcher.

* inspector/InspectorAgent.h:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::enable):
(WebCore::InspectorAgent::disable):
(WebCore::InspectorAgent::evaluateForTestInFrontend):
(WebCore::InspectorAgent::inspect):
InspectorAgentState::inspectorAgentEnabled -> m_enabled.

* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::enable):
Remove unused state.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::enable):
(WebCore::InspectorCSSAgent::disable):
(WebCore::InspectorCSSAgent::startSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
Remove unused states. Make CSSAgentState::isSelectorProfiling check profile object exists or not.

* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::enable):
(WebCore::InspectorCanvasAgent::disable):
Remove unused state, member variable already existed.

* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::disable):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
ConsoleAgentState::consoleMessagesEnabled already had m_enabled.
ConsoleAgentState::monitoringXHR -> m_monitoringXHREnabled.

* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
(WebCore::InspectorDOMAgent::clearFrontend):
(WebCore::InspectorDOMAgent::setDocument):
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::mainFrameDOMContentLoaded):
DOMAgentState::documentRequested -> m_documentRequested.

* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
DOMDebuggerAgentState::pauseOnAllXHRs -> m_pauseOnAllXHRsEnabled.

* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::enable):
(WebCore::InspectorDOMStorageAgent::disable):
(WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
DOMStorageAgentState::domStorageAgentEnabled -> m_enabled.

* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::enable):
(WebCore::InspectorDatabaseAgent::disable):
Remove unused state, m_enabled already existed.

* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::enable):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::enabled):
(WebCore::InspectorDebuggerAgent::clearFrontend):
(WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl):
DebuggerAgentState::pauseOnExceptionsState removed, never read.
DebuggerAgentState::debuggerEnabled -> m_enabled.

* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
(WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorHeapProfilerAgent::clearFrontend):
(WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
HeapProfilerAgentState::profileHeadersRequested -> m_profileHeadersRequested.

* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::enable):
(WebCore::InspectorIndexedDBAgent::disable):
Remove unused state, never read.

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::enable):
(WebCore::InspectorLayerTreeAgent::disable):
Remove unused state, did not need to be read.

* inspector/InspectorPageAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::webViewResized):
(WebCore::InspectorPageAgent::enable):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::setDeviceMetricsOverride):
(WebCore::InspectorPageAgent::deviceMetricsChanged):
(WebCore::InspectorPageAgent::setShowPaintRects):
(WebCore::InspectorPageAgent::setShowDebugBorders):
(WebCore::InspectorPageAgent::setShowFPSCounter):
(WebCore::InspectorPageAgent::setContinuousPaintingEnabled):
(WebCore::InspectorPageAgent::setScriptExecutionDisabled):
(WebCore::InspectorPageAgent::applyScreenWidthOverride):
(WebCore::InspectorPageAgent::applyScreenHeightOverride):
(WebCore::InspectorPageAgent::didPaint):
(WebCore::InspectorPageAgent::didLayout):
(WebCore::InspectorPageAgent::updateTouchEventEmulationInPage):
(WebCore::InspectorPageAgent::setTouchEmulationEnabled):
(WebCore::InspectorPageAgent::setEmulatedMedia):
(WebCore::InspectorPageAgent::applyEmulatedMedia):
PageAgentState::pageAgentScreenWidthOverride -> m_screenWidthOverride.
PageAgentState::pageAgentScreenHeightOverride -> m_screenHeightOverride.
PageAgentState::pageAgentFontScaleFactorOverride -> m_fontScaleFactorOverride.
PageAgentState::pageAgentFitWindow -> m_fitWindowOverride.
PageAgentState::pageAgentShowPaintRects -> m_showPaintRects.
PageAgentState::pageAgentEmulatedMedia -> m_emulatedMedia.
Remove other unused states.

* inspector/InspectorProfilerAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::enable):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
(WebCore::InspectorProfilerAgent::enabled):
ProfilerAgentState::profileHeadersRequested -> m_profileHeadersRequested.
Remove other unused states.

* inspector/InspectorResourceAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::~InspectorResourceAgent):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::applyUserAgentOverride):
(WebCore::InspectorResourceAgent::enable):
(WebCore::InspectorResourceAgent::disable):
(WebCore::InspectorResourceAgent::setUserAgentOverride):
(WebCore::InspectorResourceAgent::setCacheDisabled):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
ResourceAgentState::resourceAgentEnabled -> m_enabled.
ResourceAgentState::cacheDisabled -> m_cacheDisabled.
ResourceAgentState::userAgentOverride -> m_userAgentOverride (this already existed and was unused).

* inspector/InspectorTimelineAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):
(WebCore::InspectorTimelineAgent::setDOMCounters):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
TimelineAgentState::timelineAgentEnabled -> m_enabled.
TimelineAgentState::includeDomCounters -> m_includeDOMCounters.
Remove other unused states.

* inspector/InspectorWorkerAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
(WebCore::InspectorWorkerAgent::clearFrontend):
(WebCore::InspectorWorkerAgent::enable):
(WebCore::InspectorWorkerAgent::disable):
(WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
(WebCore::InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart):
(WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
WorkerAgentState::workerInspectionEnabled -> m_enabled.
WorkerAgentState::autoconnectToWorkers -> m_shouldPauseDedicatedWorkerOnStart.

* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::enable):
(WebCore::PageRuntimeAgent::disable):
Remove unused state, not read.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: AXFocused not exposed on ARIA menuitems
https://bugs.webkit.org/show_bug.cgi?id=123494

Reviewed by Chris Fleizach.

Source/WebCore:

ARIA menuitems should expose AXFocused accessibility attribute.

Test: platform/mac/accessibility/aria-menuitem-focus.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):

LayoutTests:

Adding test to make sure ARIA menuitems expose each piece of their focus state correctly.

* platform/mac/accessibility/aria-menuitem-focus-expected.txt: Added.
* platform/mac/accessibility/aria-menuitem-focus.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
XHR.response is null when requesting empty file as arraybuffer
https://bugs.webkit.org/show_bug.cgi?id=123457

Source/WebCore:

Reviewed by Sam Weinig.

Test: http/tests/xmlhttprequest/response-empty-arraybuffer.html

* xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseArrayBuffer): Don't do this.

LayoutTests:

Based on a Blink test by yusukesuzuki@chromium.org.

Reviewed by Sam Weinig.

Failures in expected results appear to mean that Blink caches XHR responses in more
cases. It's not directly related to the patch.

* http/tests/xmlhttprequest/response-empty-arraybuffer-expected.txt: Added.
* http/tests/xmlhttprequest/response-empty-arraybuffer.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Legible Output callbacks should happen on notification queue
https://bugs.webkit.org/show_bug.cgi?id=123545

Reviewed by Eric Carlson.

Modify the callback creation for Legible Output items so that they
are made on our notification queue. The use of the main queue was a
holdover from some temporary code used during earlier development.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::AVFWrapper): Assert this happens on the main thread.
(WebCore::AVFWrapper::~AVFWrapper): Ditto.
(WebCore::destroyAVFWrapper): Ditto.
(WebCore::AVFWrapper::createPlayer): Ditto.
(WebCore::AVFWrapper::createPlayerItem): Ditto.
Also, instruct LegibleOutput callbacks to happen on our notification
queue, rather than the main thread.
(WebCore::AVFWrapper::createAVCFVideoLayer): Assert this happens on the main thread.
(WebCore::AVFWrapper::destroyVideoLayer): Ditto.
(WebCore::AVFWrapper::createImageGenerator): Ditto.
(WebCore::AVFWrapper::destroyImageGenerator): Ditto.


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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplifying MediaStream and MediStreamDescriptor creation
https://bugs.webkit.org/show_bug.cgi?id=123443

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-10-30
Reviewed by Eric Carlson.

The internal process of creating a MediaStream and MediaStreamDescriptor was quite confusing and spread.
We can take advantage of the platform implementation of MediaStreamTrack (aka MediaStreamTrackPrivate)
and simplify the whole process.
A new constructor that receives vectors of MediaStreamTrackPrivate objects were added, then the check
if a source already exists or if the tracks are all ended are now made in MediaStreamDescriptor.

No new tests needed.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create): Removed unnecessary variables in one create method and using new
MediaStreamDescriptor::create method that receives vector of MediaStreamTrackPrivate objects as parameter.

* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): Removed passing flag to
MediaStreamDescriptor create.

* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::create): Removed EndedAtCreationFlag parameter, because this is being
handled inside constructor by analyzing the tracks or sources passed.
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Adding new constructor that receives vector of
MediaStreamTrackPrivate as parameter.

(WebCore::MediaStreamDescriptor::addTrack): Changed to store the track's source in the object.

(WebCore::MediaStreamDescriptor::removeTrack):
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::numberOfAudioTracks):
(WebCore::MediaStreamDescriptor::audioTracks):
(WebCore::MediaStreamDescriptor::numberOfVideoTracks):
(WebCore::MediaStreamDescriptor::videoTracks):
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::MockMediaStreamCenter::createMediaStream): Removing flag that is being passed to
MediaStreamDescriptor's create method.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add forwarding headers needed to build WebKitGTK.