WebKit-https.git
5 years agoRoll out r165076.
akling@apple.com [Wed, 10 Dec 2014 00:47:51 +0000 (00:47 +0000)]
Roll out r165076.
<rdar://problem/18490587>

This change broke selection when editing Confluence wiki pages.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/Document.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
(WebCore::Document::updateStyleIfNeededForNode): Deleted.
* dom/Document.h:
* editing/htmlediting.cpp:
(WebCore::isEditablePosition):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent):

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

5 years agoUnreviewed, rolling out r177037.
commit-queue@webkit.org [Wed, 10 Dec 2014 00:22:15 +0000 (00:22 +0000)]
Unreviewed, rolling out r177037.
https://bugs.webkit.org/show_bug.cgi?id=139464

broke ~50 API tests (Requested by thorton on #webkit).

Reverted changeset:

"Use the new storage namespace provider in WebKit1"
https://bugs.webkit.org/show_bug.cgi?id=139425
http://trac.webkit.org/changeset/177037

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

5 years agoURTBF after r177032.
ossy@webkit.org [Wed, 10 Dec 2014 00:12:30 +0000 (00:12 +0000)]
URTBF after r177032.

* CMakeLists.txt:

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

5 years agoMove mixed border color test image result to mac folder,
cavalcantii@gmail.com [Tue, 9 Dec 2014 23:26:14 +0000 (23:26 +0000)]
Move mixed border color test image result to mac folder,
should address yosemite case.

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

5 years agoFix iOS build after r177035.
mmaxfield@apple.com [Tue, 9 Dec 2014 23:05:19 +0000 (23:05 +0000)]
Fix iOS build after r177035.

Unreviewed.

I accidentally added my line to WebCore.exp.in inside an

* WebCore.exp.in:

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

5 years agoKotoeri sometimes doesn't correctly process the first chanaracter in a text field...
ap@apple.com [Tue, 9 Dec 2014 22:39:35 +0000 (22:39 +0000)]
Kotoeri sometimes doesn't correctly process the first chanaracter in a text field in Safari 7.1 or 6.2
https://bugs.webkit.org/show_bug.cgi?id=139459
rdar://problem/19017432
rdar://problem/19036869

Reviewed by Enrica Casucci.

When inputContext changes, notify the application. We already did this when the context
changed due to plug-ins, and this used to sort of make it work on on yahoo.co.jp,
which has plug-ins. But that was quite unreliable, as evidenced by the reproducible
cases where we didn't use an input method for the first keypress.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::notifyApplicationAboutInputContextChange):

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

5 years agoEnable automatic optimized fullscreen mode.
commit-queue@webkit.org [Tue, 9 Dec 2014 21:54:44 +0000 (21:54 +0000)]
Enable automatic optimized fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=139437

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-12-09
Source/WebCore:

Reviewed by Eric Carlson.

Anticipate transition to optimized video fullscreen mode when entering background.

* WebCore.exp.in:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::overrideBackgroundPlaybackRestriction): Add logic for automatic transition detection.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Add logic for automatic transition detection.

Source/WebKit2:

Reviewed by Simon Fraser.

Anticipate the automatic transition to optimized video fullscreen mode when deciding if the page is visible.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingVideoOptimized]): Renamed. Test precondition.
(-[WKWebView _mayAutomaticallyShowVideoOptimized]): Added.
(-[WKWebView _isPlayingFullscreenOptimizedVideo]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewVisible): Test for optimized modes even when not in a window.

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

5 years agoAdd support for clearing the disk cache
andersca@apple.com [Tue, 9 Dec 2014 21:53:45 +0000 (21:53 +0000)]
Add support for clearing the disk cache
https://bugs.webkit.org/show_bug.cgi?id=139458

Reviewed by Antti Koivisto.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
If we're asked to clear the disk cache, do so. Clearing the cache is asynchronous,
so we make sure not to call the completion handler right away in that case.

* NetworkProcess/NetworkProcess.h:
Add clearDiskCache member function.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache):
Clear the disk cache, then call the completion handler.

* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins):
Call the new clearDiskCache function.

* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeDiskCache.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
Handle WKWebsiteDataTypeDiskCache.

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

5 years agoUse the new storage namespace provider in WebKit1
andersca@apple.com [Tue, 9 Dec 2014 21:49:30 +0000 (21:49 +0000)]
Use the new storage namespace provider in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=139425

Reviewed by Tim Horton.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
Set the storage namespace provider from the web page group.

Source/WebKit/win:

* WebView.cpp:
(localStorageDatabasePath):
Helper from getting the local storage database path given a WebPreferences instance.

(WebView::initWithFrame):
Create a storage namespace provider.

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

5 years agoFix webkitpy test expectation
benjamin@webkit.org [Tue, 9 Dec 2014 21:45:51 +0000 (21:45 +0000)]
Fix webkitpy test expectation

Not sure what I messed up, but TOTAL_SKIPS was not right.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-12-09

* Scripts/webkitpy/port/test.py:

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

5 years agoDelete Node::boundingBox()
mmaxfield@apple.com [Tue, 9 Dec 2014 21:03:54 +0000 (21:03 +0000)]
Delete Node::boundingBox()
https://bugs.webkit.org/show_bug.cgi?id=139333

Source/WebCore:

Conceptually, boundingBox() should be on RenderInline. In addition,
Node::boundingBox() is completely broken for inline elements: it
makes a rect from the top left of the first inline child to the
bottom right of the last inline child, disregarding the intermediate
inline children. This breaks with vertical text and with line
breaks.

What makes this problem worse is that some functions actually rely
on this bad behavior. These functions are functions that use the
Node's so-called "bounding box" to scroll to an anchor tag.

This patch goes through all the call sites of Node::boundingBox(),
and segregates them into calls that expect the true bounding box
and calls that need this false bounding box. This patch then moves
this false bounding box into RenderElement, using the name
anchorRect(). Callers what want the correct bounding box have been
updated to use RenderElement::absoluteBoundingBoxRect().

Reviewed by Zalan Bujtas.

No new tests because there should be no behavior change.

* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect): Use
RenderObject::absoluteBoundingBoxRect()
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner): Deleted.
(WebCore::ContainerNode::getLowerRightCorner): Deleted.
(WebCore::ContainerNode::boundingBox): Deleted.
* dom/ContainerNode.h:
* dom/Element.cpp:
(WebCore::Element::scrollIntoView): Use RenderElement::anchorRect().
(WebCore::Element::scrollIntoViewIfNeeded): Ditto.
(WebCore::Element::updateFocusAppearance): Ditto.
* dom/Node.cpp:
(WebCore::Node::boundingBox): Deleted.
* dom/Node.h:
(WebCore::Node::pixelSnappedBoundingBox): Deleted.
* html/ColorInputType.cpp:
(WebCore::ColorInputType::elementRectRelativeToRootView): Use
RenderObject::absoluteBoundingBoxRect()
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect): Use
RenderElement::anchorRect().
(WebCore::FrameView::scrollToAnchor): Ditto.
* page/SpatialNavigation.cpp:
(WebCore::nodeRectInAbsoluteCoordinates): Use
RenderObject::absoluteBoundingBoxRect()
* rendering/RenderElement.cpp:
(WebCore::RenderElement::getUpperLeftCorner): Moved from ContainerNode.
(WebCore::RenderElement::getLowerRightCorner): Moved from
ContainerNode.
(WebCore::RenderElement::anchorRect): Moved from ContainerNode.
* rendering/RenderObject.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::topOfFirstText): Helper for
RenderElement::anchorRect()
* rendering/RenderText.h:

Source/WebKit/mac:

Reviewed by Zalan Bujtas.

* WebView/WebActionMenuController.mm:
(elementBoundingBoxInWindowCoordinatesFromNode): Use
RenderObject::absoluteBoundingBoxRect().

Source/WebKit2:

Reviewed by Zalan Bujtas.

* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates):
Use RenderObject::absoluteBoundingBoxRect().
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
(WebKit::WebPage::findZoomableAreaForPoint): Use
RenderObject::absoluteBoundingBoxRect().

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

5 years agoRemove virtual test support from webkitpy
benjamin@webkit.org [Tue, 9 Dec 2014 20:50:16 +0000 (20:50 +0000)]
Remove virtual test support from webkitpy
https://bugs.webkit.org/show_bug.cgi?id=139427

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-12-09
Reviewed by Alexey Proskuryakov.

It seems that the only concrete client of virtual tests is the unit tests :D

This patch tries to clean as much useless code as possible.

* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_tolerance):
(RunTest.test_virtual): Deleted.
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer._print_test_trace):
* Scripts/webkitpy/port/base.py:
(Port.expected_filename):
(Port.tests):
(Port.test_isfile):
(Port.test_isdir):
(Port.sample_process):
(Port.find_system_pid):
(Port.test_expectations_file_position):
(Port.virtual_test_suites): Deleted.
(Port): Deleted.
(Port.populated_virtual_test_suites): Deleted.
(Port._virtual_tests): Deleted.
(Port.lookup_virtual_test_base): Deleted.
(Port.lookup_virtual_test_args): Deleted.
(VirtualTestSuite): Deleted.
(VirtualTestSuite.__init__): Deleted.
(VirtualTestSuite.__repr__): Deleted.
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_test_exists):
(PortTest.test_test_isfile):
(PortTest.test_test_isdir):
(PortTest.test_tests):
* Scripts/webkitpy/port/driver.py:
(DriverProxy.run_test): Deleted.
* Scripts/webkitpy/port/test.py:
(TestPort._skipped_tests_for_unsupported_features):
(TestPort.all_baseline_variants):
(TestPort.virtual_test_suites): Deleted.
* Scripts/webkitpy/tool/commands/queries.py:
(PrintBaselines.__init__):
(PrintBaselines.execute):
* Scripts/webkitpy/tool/commands/queries_unittest.py:
(PrintBaselinesTest.test_basic):
(PrintBaselinesTest.test_multiple):
(PrintBaselinesTest.test_csv):

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

5 years ago[WK2] Crash when answering notification permission request after navigating
cdumez@apple.com [Tue, 9 Dec 2014 20:31:41 +0000 (20:31 +0000)]
[WK2] Crash when answering notification permission request after navigating
https://bugs.webkit.org/show_bug.cgi?id=139429
<rdar://problem/18921122>

Reviewed by Andreas Kling.

Source/WebKit2:

When requesting a notification permission, navigating away and then
answering the permission, WebKit2 would crash. This is because upon
navigating, the request is cancelled and removed from the HashMaps
in NotificationPermissionRequestManager. When
didReceiveNotificationPermissionDecision() is later called, it would
look for the request identifier in m_idToOriginMap HashMap. As the
request was cancelled, HashMap::take() call would return null for
the SecurityOrigin*. This security origin pointer is then removed
from m_originToIDMap, but the code was failing to do a null check
first. Calling HashMap::remove(nullptr) would then crash.

This patch adds the missing null check and a layout test to cover
this case.

Test: http/tests/notifications/legacy/notification-request-permission-then-navigate.html

* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):

LayoutTests:

Add layout test to cover the case where the notification permission is
requesting before navigating to a new URL and answered after the page
is navigated away.

* http/tests/notifications/legacy/notification-request-permission-then-navigate-expected.txt: Added.
* http/tests/notifications/legacy/notification-request-permission-then-navigate.html: Added.
* http/tests/notifications/legacy/resources/notify-opener-done.html: Added.
* http/tests/notifications/legacy/resources/request-permission-then-navigate.html: Added.

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

5 years agoImplement clearing of cookies
andersca@apple.com [Tue, 9 Dec 2014 20:29:59 +0000 (20:29 +0000)]
Implement clearing of cookies
https://bugs.webkit.org/show_bug.cgi?id=139455

Reviewed by Andreas Kling.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
Handle deleting cookies by finding the right network storage session and deleting the cookies from it.
Then, send a DidDeleteWebsiteData message back.

* NetworkProcess/NetworkProcess.h:
Add new members.

* NetworkProcess/NetworkProcess.messages.in:
Add new DeleteWebsiteData message.

* Shared/WebsiteData/WebsiteDataTypes.h:
Move the website data types enum to its own file so it can be shared.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
Update now that WebsiteDataTypes is its own enum.

(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
removeDataModifiedSince was renamed to removeData.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::generateCallbackID):
Helper function to create a callback ID.

(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
Assert that we have no pending callbacks.

(WebKit::NetworkProcessProxy::deleteWebsiteData):
Put the completion handler in our map and message the network process.

(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
Call all completion handlers.

(WebKit::NetworkProcessProxy::didDeleteWebsiteData):
Grab the completion handler and call it.

* UIProcess/Network/NetworkProcessProxy.h:
Add new members.

* UIProcess/Network/NetworkProcessProxy.messages.in:
Add DidDeleteWebsiteData callback.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessType):
Helper function that computes the type of process access we'd need for the given mask of
website data types.

(WebKit::WebsiteDataStore::removeData):
Gather all the network processes and message them. Use a callback aggregator object to track callbacks
so we'll call the completion handler once all callbacks have been invoked.

* UIProcess/WebsiteData/WebsiteDataStore.h:
Move WebsiteDataTypes to its own file.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

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

5 years agoREGRESSION (r173272): When open PDF from Safari in iBooks, title is replaced to ...
antti@apple.com [Tue, 9 Dec 2014 20:06:57 +0000 (20:06 +0000)]
REGRESSION (r173272): When open PDF from Safari in iBooks, title is replaced to “QuickLookPDF-s72DbgAU-1”
https://bugs.webkit.org/show_bug.cgi?id=139453
rdar://problem/19052192

Reviewed by Pratik Solanki.

Pulling the suggested filename from the platform response returned null string on USE(CFNETWORK) code path
if it was the first thing needed from it.

* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename): Use the lazy accessor.

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

5 years agoDFG Tries using an inner object's getter/setter when one hasn't been defined
msaboff@apple.com [Tue, 9 Dec 2014 19:52:40 +0000 (19:52 +0000)]
DFG Tries using an inner object's getter/setter when one hasn't been defined
https://bugs.webkit.org/show_bug.cgi?id=139229

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Added a new NullGetterFunction singleton class to use for getters and setters that
haven't been set to a user defined value.  The NullGetterFunction callReturnUndefined()
and createReturnUndefined() methods return undefined.  Changed all null checks of the
getter and setter pointers to the newly added isGetterNull() and isSetterNull()
helper methods.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
Added NullGetterFunction.cpp & .h to build files.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
* runtime/PropertyDescriptor.cpp:
(JSC::PropertyDescriptor::setDescriptor):
(JSC::PropertyDescriptor::setAccessorDescriptor):
Changed checking getter and setter to null to use new isGetterNull() and isSetterNull()
helpers.

* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
* inspector/JSJavaScriptCallFramePrototype.cpp:
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/JSObject.cpp:
(JSC::JSObject::putIndexedDescriptor):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnNonIndexProperty):
* runtime/MapPrototype.cpp:
(JSC::MapPrototype::finishCreation):
* runtime/SetPrototype.cpp:
(JSC::SetPrototype::finishCreation):
Updated calls to GetterSetter::create(), setGetter(), setSetter(), withGetter()
and withSetter() to provide a global object.

* runtime/GetterSetter.cpp:
(JSC::GetterSetter::withGetter):
(JSC::GetterSetter::withSetter):
(JSC::callGetter):
(JSC::callSetter):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::create):
(JSC::GetterSetter::isGetterNull):
(JSC::GetterSetter::isSetterNull):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setSetter):
Changed to use NullGetterFunction for unspecified getters / setters.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::createThrowTypeError):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::nullGetterFunction):
(JSC::JSGlobalObject::evalFunction):
Added m_nullGetterFunction singleton.  Updated calls to GetterSetter::create(),
setGetter() and setSetter() to provide a global object.

* runtime/NullGetterFunction.cpp: Added.
(JSC::callReturnUndefined):
(JSC::constructReturnUndefined):
(JSC::NullGetterFunction::getCallData):
(JSC::NullGetterFunction::getConstructData):
* runtime/NullGetterFunction.h: Added.
(JSC::NullGetterFunction::create):
(JSC::NullGetterFunction::createStructure):
(JSC::NullGetterFunction::NullGetterFunction):
New singleton class that returns undefined when called.

LayoutTests:

New regression test.

* js/regress-139229-expected.txt: Added.
* js/regress-139229.html: Added.
* js/script-tests/regress-139229.js: Added.
(InnerObjectNoGetter):
(InnerObjectNoGetter.prototype.set enabled):
(InnerObjectNoSetter):
(InnerObjectNoSetter.prototype.get enabled):
(OuterObject):
(OuterObject.prototype.get enabled):
(OuterObject.prototype.set enabled):

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

5 years agoRe-enable function.arguments
ggaren@apple.com [Tue, 9 Dec 2014 19:39:29 +0000 (19:39 +0000)]
Re-enable function.arguments
https://bugs.webkit.org/show_bug.cgi?id=139452
Source/JavaScriptCore:

<rdar://problem/18848149>

Reviewed by Sam Weinig.

Disabling function.arguments broke a few websites, and we don't have
time right now to work through the details.

I'm re-enabling function.arguments but leaving in the infrastructure
to re-disable it, so we can try this experiment again in the future.

* runtime/Options.h:

LayoutTests:

Reviewed by Sam Weinig.

* TestExpectations: Re-enable these tests, since WebKit supports this
feature by default now.

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

5 years agoBlink Merge: Remove 'http_lock' code from webkitpy
ossy@webkit.org [Tue, 9 Dec 2014 19:32:54 +0000 (19:32 +0000)]
Blink Merge: Remove 'http_lock' code from webkitpy
https://bugs.webkit.org/show_bug.cgi?id=136722

Reviewed by Alexey Proskuryakov.

Based on Blink commit by Dirk Pranke <dpranke@chromium.org>
https://chromium.googlesource.com/chromium/blink/+/196f8146a948275c2f1594b13e30ab19a6e6fd66

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.__init__):
(LayoutTestRunner.run_tests):
(LayoutTestRunner.start_servers): Renamed from start_servers_with_lock.
(LayoutTestRunner.stop_servers): Renamed from stop_servers_with_lock.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(FakePrinter.flush):
(LayoutTestRunnerTests._runner):
(LayoutTestRunnerTests._run_tests):
(LayoutTestRunnerTests.test_servers_started):
(LockCheckingRunner): Deleted.
(LockCheckingRunner.__init__): Deleted.
(LockCheckingRunner.handle_finished_list): Deleted.
(LayoutTestRunnerTests.test_http_locking): Deleted.
* Scripts/webkitpy/port/base.py:
(Port.__init__):
(Port.to.http_server_supports_ipv6):
(Port.to.stop_websocket_server):
(Port.to.acquire_http_lock): Deleted.
(Port.to.release_http_lock): Deleted.
* Scripts/webkitpy/port/http_lock.py: Removed.
* Scripts/webkitpy/port/http_lock_unittest.py: Removed.
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.show_results_html_file):
(IOSSimulatorPort.acquire_http_lock): Deleted.
(IOSSimulatorPort): Deleted.
(IOSSimulatorPort.release_http_lock): Deleted.
* Scripts/webkitpy/port/mac.py:
(MacPort.show_results_html_file):
(MacPort): Deleted.
(MacPort.acquire_http_lock): Deleted.
(MacPort.release_http_lock): Deleted.
* Scripts/webkitpy/port/mock_drt.py:
(MockDRTPort.start_websocket_server):
(MockDRTPort.stop_websocket_server):
(MockDRTPort.acquire_http_lock): Deleted.
(MockDRTPort.release_http_lock): Deleted.
* Scripts/webkitpy/port/mock_drt_unittest.py:
(MockDRTPortTest.test_uses_apache):
(MockDRTPortTest.integration_test_http_lock): Deleted.
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.assert_servers_are_up):
(PortTestCase.integration_test_http_lock): Deleted.
* Scripts/webkitpy/port/test.py:
(TestPort.start_websocket_server):
(TestPort.stop_websocket_server):
(TestPort.acquire_http_lock): Deleted.
(TestPort.release_http_lock): Deleted.

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

5 years agoSwitch from using PLATFORM_NAME to SDK selectors in ANGLE, bmalloc, gtest, JavaScript...
ddkilzer@apple.com [Tue, 9 Dec 2014 19:08:43 +0000 (19:08 +0000)]
Switch from using PLATFORM_NAME to SDK selectors in ANGLE, bmalloc, gtest, JavaScriptCore, WTF
<http://webkit.org/b/139212>

Reviewed by Joseph Pecoraro.

Source/bmalloc:

* Configurations/Base.xcconfig:
- Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
  on OS X.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
- Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
  on OS X.
- Only set LLVM_LOCAL_HEADER_PATH and LLVM_SYSTEM_HEADER_PATH on
  OS X.
- Set JAVASCRIPTCORE_CONTENTS_DIR and
  JAVASCRIPTCORE_FRAMEWORKS_DIR separately for iOS and OS X.

* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.

* Configurations/JSC.xcconfig:
- Only set CODE_SIGN_ENTITLEMENTS for iOS hardware builds.

* Configurations/JavaScriptCore.xcconfig:
- Set OTHER_LDFLAGS separately for iOS and OS X.
- Set SECTORDER_FLAGS separately for iOS and OS X, but only for
  Production builds.
- Only set EXCLUDED_SOURCE_FILE_NAMES for iOS.

* Configurations/LLVMForJSC.xcconfig:
- Rename LLVM_LIBS_iphoneos to LLVM_LIBS_ios.
- Set LLVM_LIBRARY_PATHS and OTHER_LDFLAGS_LLVM_ENABLE_FTL_JIT
  separately for iOS hardware and OS X.
- Fix curly braces in LIBRARY_SEARCH_PATHS.
- Merge OTHER_LDFLAGS_BASE into OTHER_LDFLAGS. (Could have been
  done before this patch.)

* Configurations/ToolExecutable.xcconfig:
- Only set CODE_SIGN_ENTITLEMENTS for iOS, per target.
- Only set CLANG_ENABLE_OBJC_ARC for i386 on the iOS Simulator.
- Add missing newline.

* Configurations/Version.xcconfig:
- Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:
- Only set SDKROOT and TOOLCHAINS on OS X.

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:
- Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
  on OS X.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.

Source/WTF:

* Configurations/Base.xcconfig:
- Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
  on OS X.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.

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

5 years agoMark several hidpi compositing tests that fail on EWS bots with ATI graphics.
ap@apple.com [Tue, 9 Dec 2014 18:52:41 +0000 (18:52 +0000)]
Mark several hidpi compositing tests that fail on EWS bots with ATI graphics.

* platform/mac/TestExpectations:

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

5 years agoAX: [ATK] MathML tokens, tables, and row-like elements are exposed with ATK_ROLE_UNKNOWN
jdiggs@igalia.com [Tue, 9 Dec 2014 18:31:53 +0000 (18:31 +0000)]
AX: [ATK] MathML tokens, tables, and row-like elements are exposed with ATK_ROLE_UNKNOWN
https://bugs.webkit.org/show_bug.cgi?id=139402

Reviewed by Chris Fleizach.

Source/WebCore:

Expose tables and their children using existing table AtkRole types,
token elements using the new ATK_ROLE_STATIC, and row-like elements
using ATK_ROLE_PANEL. Also expose <mlabeledtr> as a math table row
and <ms> as math text.

No new tests; instead, added MathML elements to roles-exposed.html.

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isMathToken):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isMathToken):
(WebCore::AccessibilityRenderObject::isMathText):
(WebCore::AccessibilityRenderObject::isMathTableRow):
* accessibility/AccessibilityRenderObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* css/mathml.css:
(ms, mi, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose):
(mi, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
* mathml/mathtags.in:

LayoutTests:

* accessibility/roles-exposed.html: Added MathML elements.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated for added elements.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated for added elements.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for added elements.
* platform/mac-mountainlion/accessibility/roles-exposed-expected.txt: Updated for added elements.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated for added elements.

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

5 years ago[Apple] Use Accelerate framework to speed-up FEGaussianBlur
dino@apple.com [Tue, 9 Dec 2014 18:31:04 +0000 (18:31 +0000)]
[Apple] Use Accelerate framework to speed-up FEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=139310

Unreviewed followup, after comments by Andreas Kling.

It was pointed out that we already have a USE(ACCELERATE), so
we don't need a HAVE(ACCELERATE) :)

Source/WebCore:

* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::platformApply):

Source/WTF:

* wtf/Platform.h:

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

5 years agoUndefined Symbol build error "_objc_registerThreadWithCollector" when building WebKit...
berto@igalia.com [Tue, 9 Dec 2014 18:21:16 +0000 (18:21 +0000)]
Undefined Symbol build error "_objc_registerThreadWithCollector" when building WebKit GTK Mac OS X on Snow Leopard
https://bugs.webkit.org/show_bug.cgi?id=58737

Reviewed by Darin Adler.

Replace OS(MAC_OS_X) with PLATFORM(MAC) to prevent using
osx-specific code in WebKitGTK+ builds.

* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal):

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

5 years agoUnreviewed. Style fix following r177019.
berto@igalia.com [Tue, 9 Dec 2014 17:53:31 +0000 (17:53 +0000)]
Unreviewed. Style fix following r177019.

Use nullptr instead of 0.

* bindings/gobject/ConvertToUTF8String.cpp:
(convertToUTF8String):

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

5 years agoRefactor of rebuildFloatingObjectSetFromIntrudingFloats function after r176957.
jfernandez@igalia.com [Tue, 9 Dec 2014 17:44:40 +0000 (17:44 +0000)]
Refactor of rebuildFloatingObjectSetFromIntrudingFloats function after r176957.
https://bugs.webkit.org/show_bug.cgi?id=139445

Reviewed by Darin Adler.

The function rebuildFloatingObjectSetFromIntrudingFloats would be clearer if
we use a helper function to locate the previous sibling with overhanging floats.

These changes has been suggested as part of the patch review for bug #139150, which
landed in r176957.

No new tests, no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::avoidsFloats):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::previousSiblingWithOverhangingFloats):
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.h:
(WebCore::RenderBox::isGridItem):

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

5 years agoGive WebsiteDataStore a unique ID
andersca@apple.com [Tue, 9 Dec 2014 17:16:12 +0000 (17:16 +0000)]
Give WebsiteDataStore a unique ID
https://bugs.webkit.org/show_bug.cgi?id=139448

Reviewed by Andreas Kling.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::generateIdentifier):
(WebKit::WebsiteDataStore::WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::identifier):

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

5 years agoconvertToUTF8String converts null string to empty string
berto@igalia.com [Tue, 9 Dec 2014 17:11:18 +0000 (17:11 +0000)]
convertToUTF8String converts null string to empty string
https://bugs.webkit.org/show_bug.cgi?id=133904

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Test added to Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp

Return 0 if the string is null.

* bindings/gobject/ConvertToUTF8String.cpp:
(convertToUTF8String):

Tools:

Test that trying to get the value of a non-existent attribute
returns 0 instead of an empty string.

* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp:
(WebKitDOMNodeTest::testInsertion):

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

5 years agoBuild fix.
andersca@apple.com [Tue, 9 Dec 2014 15:57:55 +0000 (15:57 +0000)]
Build fix.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:

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

5 years agoWhen invalidating fullscreen, cancel instead of stop optimizedFullscfreen.
commit-queue@webkit.org [Tue, 9 Dec 2014 12:43:21 +0000 (12:43 +0000)]
When invalidating fullscreen, cancel instead of stop optimizedFullscfreen.
https://bugs.webkit.org/show_bug.cgi?id=139145

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-12-09
Reviewed by Eric Carlson.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::invalidate): call cancel instead of stop
* platform/spi/ios/AVKitSPI.h: add -cancelOptimizedFullscreen.

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

5 years ago[GTK] LDFLAGS is ignored when running g-ir-scanner
commit-queue@webkit.org [Tue, 9 Dec 2014 10:20:27 +0000 (10:20 +0000)]
[GTK] LDFLAGS is ignored when running g-ir-scanner
https://bugs.webkit.org/show_bug.cgi?id=138832

Patch by Ting-Wei Lan <lantw44@gmail.com> on 2014-12-09
Reviewed by Carlos Garcia Campos.

GTK+ requires libintl on FreeBSD because there is no gettext
implementation in FreeBSD libc. In order to link to libintl, which is
not located in the default search path of the linker, we need to add
the required path via the linker command line. However, LDFLAGS is
ignored when running g-ir-scanner starting from r167873, so we have
to manually pick required flags from CMAKE_SHARED_LINKER_FLAGS and
put them in correct order to prevent g-ir-scanner from linking to
the installed version of libraries.

* PlatformGTK.cmake:

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

5 years ago[Media][GTK][EFL] Reduce style updates (painting) in controls
berto@igalia.com [Tue, 9 Dec 2014 10:04:02 +0000 (10:04 +0000)]
[Media][GTK][EFL] Reduce style updates (painting) in controls
https://bugs.webkit.org/show_bug.cgi?id=137773

Reviewed by Carlos Garcia Campos.

Don't update media controls if they are not visible, and
initialize slider to a zero value.

* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.createControls):
(Controller.prototype.handleDurationChange):
(Controller.prototype.updateProgress):
(Controller.prototype.updateTime):
* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.updateTime):

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

5 years ago[GStreamer] Add video/mp2t as alternative mimetype for MPEG TS
commit-queue@webkit.org [Tue, 9 Dec 2014 09:51:34 +0000 (09:51 +0000)]
[GStreamer] Add video/mp2t as alternative mimetype for MPEG TS
https://bugs.webkit.org/show_bug.cgi?id=139433

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-09
Reviewed by Philippe Normand.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeCache):
It's used e.g. on http://www.jwplayer.com/html5/mediasource/ .

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

5 years ago[GTK] Bump minimum version of ATK used by jhbuild to at least 2.15.2
jdiggs@igalia.com [Tue, 9 Dec 2014 09:20:05 +0000 (09:20 +0000)]
[GTK] Bump minimum version of ATK used by jhbuild to at least 2.15.2
https://bugs.webkit.org/show_bug.cgi?id=139070

Reviewed by Carlos Garcia Campos.

Tools:

* gtk/jhbuild.modules:

LayoutTests:

* platform/gtk/accessibility/roles-exposed-expected.txt: Updated to reflect
the fact that the exposed role is STATIC and not UNKNOWN.

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

5 years agoEnable activating optimized fullscreen mode from standard fulscreen mode.
commit-queue@webkit.org [Tue, 9 Dec 2014 08:25:09 +0000 (08:25 +0000)]
Enable activating optimized fullscreen mode from standard fulscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=139137

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-12-09
Source/WebCore:

Reviewed by Jer Noble.

Going from standard fullscreen mode to optimized fullscreen mode requires the ability to
update the fullscreen mode in HTMLMediaElement and a new standard-and-optimized-fullscreen mode.

This change KVO observes AVKit's optimizedFullscreenActive and forwards the change down to HTMLMediaElement so it can adjust behavior appropriately.
It also hides the standard fullscreen window when going into this mode.
When exiting fullscreen from standard-and-optimized, first exit fullscreen immediately, then stopOptimizedFullscreen, and notify of completion when
optimizedFullscreen goes inactive.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::fullscreenMode):
    Treat VideoFullscreenModeStandardAndOptimized as a kind of optimized mode.
* WebCore.exp.in: New export for WebVideoFullscreenModelVideoElement::fullscreenModeChanged
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::displayType):
    Treat VideoFullscreenModeStandardAndOptimized as a kind of optimized mode.
* html/HTMLMediaElement.h: Add new fullscreen mode.
(WebCore::HTMLMediaElement::fullscreenModeChanged): Update fullscreen mode so it does optimized fullscreen mode behaviors when applicable.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare setOptimizedActive
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVVideoLayer setPlayerViewController:]): observe optimizedFullscreenActive
(-[WebAVVideoLayer observeValueForKeyPath:ofObject:change:context:]): respond to changes to optimizedFullscreenActive
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): Init members.
(WebVideoFullscreenInterfaceAVKit::playerController):
    Give player controller a reference to the WebVideoFullscreenInterface so it can pass along mode change state.
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): Handle new fullscreen modes.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::invalidate): ditto
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::setOptimizedActive): Handle changes to fullscreen mode.
    Also handle the case that exiting fullscreen happend when optimized mode ends.
* platform/ios/WebVideoFullscreenModel.h: declare fullscreenModeChanged()
* platform/ios/WebVideoFullscreenModelVideoElement.h: declare fullscreenModeChanged()
* platform/ios/WebVideoFullscreenModelVideoElement.mm: add fullscreenModeChanged()
(WebVideoFullscreenModelVideoElement::WebVideoFullscreenModelVideoElement): Init members.
(WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Added. Update video element fullscreen mode.

Source/WebKit2:

Reviewed by Simon Fraser.

Going from standard fullscreen mode to optimized fullscreen mode requires the ability to
update the fullscreen mode and a new standard-and-optimized-fullscreen mode.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isPlayingFullscreenOptimizedVideo]):
Treat new standard-and-optimized as a kind of optimized.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: IPC fullscreen mode changes
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: ditto
(WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): dito
* WebProcess/ios/WebVideoFullscreenManager.h: ditto
* WebProcess/ios/WebVideoFullscreenManager.messages.in: ditto
* WebProcess/ios/WebVideoFullscreenManager.mm: dito
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): ditto
(WebKit::WebVideoFullscreenManager::setFullscreenModeChanged): ditto

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

5 years agoREGRESSION (r158036): WebView cannot handle HTTP Basic Authentication challenge
ap@apple.com [Tue, 9 Dec 2014 07:26:42 +0000 (07:26 +0000)]
REGRESSION (r158036): WebView cannot handle HTTP Basic Authentication challenge
https://bugs.webkit.org/show_bug.cgi?id=138843
rdar://problem/18793695

Reviewed by Dan Bernstein.

* Panels/WebAuthenticationPanel.m:
(-[WebAuthenticationPanel cancel:]):
(-[WebAuthenticationPanel logIn:]):
Don't close the panel before using panel.sheetParent, because the parent becomes nil.
In fact, we don't need to close it at all, it's enough to call orderOut:, and even
that only when using an old NSWindow API.

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

5 years agoFix EFL build fix since r177001
gyuyoung.kim@samsung.com [Tue, 9 Dec 2014 05:53:00 +0000 (05:53 +0000)]
Fix EFL build fix since r177001
https://bugs.webkit.org/show_bug.cgi?id=139428

Unreviewed, EFL build fix.

Do not inherit duplicated class. ExpressionNode is already
child of ParserArenaFreeable class.

* parser/Nodes.h:

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

5 years agoFix Build Warning in JavaScriptCore ControlFlowProfiler::dumpData() api.
commit-queue@webkit.org [Tue, 9 Dec 2014 05:24:34 +0000 (05:24 +0000)]
Fix Build Warning in JavaScriptCore ControlFlowProfiler::dumpData() api.
https://bugs.webkit.org/show_bug.cgi?id=139384

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-12-08
Reviewed by Mark Lam.

Fix Build Warning by using dataLog() function instead of dataLogF() function.

* runtime/ControlFlowProfiler.cpp:
(JSC::ControlFlowProfiler::dumpData):

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

5 years agoWeb Inspector: Enable runtime API for JSC's control flow profiler
saambarati1@gmail.com [Tue, 9 Dec 2014 05:02:04 +0000 (05:02 +0000)]
Web Inspector: Enable runtime API for JSC's control flow profiler
https://bugs.webkit.org/show_bug.cgi?id=139346

Reviewed by Joseph Pecoraro.

This patch creates an API that the Web Inspector can use
to get information about which basic blocks have exectued
from JSC's control flow profiler.

* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getBasicBlocks):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/protocol/Runtime.json:

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

5 years ago[EFL] Use DependenciesEFL instead of Dependencies
ljaehun.lim@samsung.com [Tue, 9 Dec 2014 04:56:38 +0000 (04:56 +0000)]
[EFL] Use DependenciesEFL instead of Dependencies

Unreviewed, fix simple typo.

* PlatformEfl.cmake:

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

5 years agoRebaseline Mavericks test results after r176978.
mmaxfield@apple.com [Tue, 9 Dec 2014 03:10:04 +0000 (03:10 +0000)]
Rebaseline Mavericks test results after r176978.

Unreviewed.

* platform/mac-mavericks/fast/forms/search-vertical-alignment-expected.png:
* platform/mac-mavericks/fast/forms/search-vertical-alignment-expected.txt:

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

5 years agoFix the iOS build after r177002
benjamin@webkit.org [Tue, 9 Dec 2014 02:24:13 +0000 (02:24 +0000)]
Fix the iOS build after r177002

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-12-08

* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):

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

5 years agoImplementation EXT_sRGB as a WebGL1 extension.
roger_fong@apple.com [Tue, 9 Dec 2014 02:04:38 +0000 (02:04 +0000)]
Implementation EXT_sRGB as a WebGL1 extension.
https://bugs.webkit.org/show_bug.cgi?id=109332.
<rdar://problem/17363470>
Reviewed by Dean Jackson.
Tested by:
webgl/1.0.3/conformance/webgl/ext-sRGB.html
fast/canvas/webgl/constants.html
This patch implements the SRGB extension for WebGL1.
Details of the extension specification are outlined here:
https://www.khronos.org/registry/webgl/extensions/EXT_sRGB/
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* html/canvas/EXTsRGB.cpp: Added.
(WebCore::EXTsRGB::EXTsRGB):
(WebCore::EXTsRGB::~EXTsRGB):
(WebCore::EXTsRGB::getName):
* html/canvas/EXTsRGB.h: Added.
* html/canvas/EXTsRGB.idl: Added.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::checkStatus):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::renderbufferStorage):
(WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContext.idl:
* platform/graphics/Extensions3D.h:
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
(WebCore::GraphicsContext3D::getClearBitsByFormat):
(WebCore::GraphicsContext3D::getChannelBitsByFormat):
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::texImage2D):

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

5 years agoSource/JavaScriptCore:
ggaren@apple.com [Tue, 9 Dec 2014 01:53:53 +0000 (01:53 +0000)]
Source/JavaScriptCore:
Removed some allocation and cruft from the parser
https://bugs.webkit.org/show_bug.cgi?id=139416

Reviewed by Mark Lam.

Now, the only AST nodes that require a destructor are the ones that
relate to pickling a function's arguments -- which will required some
deeper thinking to resolve.

This is a < 1% parser speedup.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj: Removed NodeInfo because it
was unused.

* bytecompiler/NodesCodegen.cpp:
(JSC::CommaNode::emitBytecode):
(JSC::SourceElements::lastStatement):
(JSC::SourceElements::emitBytecode): Updated for interface change to linked list.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::varDeclarations):
(JSC::ASTBuilder::funcDeclarations):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::addVar): Removed the ParserArenaData abstraction because
it wasn't buying us anything. We can just use Vector directly.

(JSC::ASTBuilder::createCommaExpr):
(JSC::ASTBuilder::appendToCommaExpr): Changed to use a linked list instead
of a vector, to avoid allocating a vector with inline capacity in the
common case in which an expression is not followed by a vector.

(JSC::ASTBuilder::Scope::Scope): Use Vector directly to avoid new'ing
up a Vector*.

(JSC::ASTBuilder::appendToComma): Deleted.
(JSC::ASTBuilder::combineCommaNodes): Deleted.

* parser/Lexer.cpp:

* parser/NodeConstructors.h:
(JSC::StatementNode::StatementNode):
(JSC::CommaNode::CommaNode):
(JSC::SourceElements::SourceElements): Updated for interface change to linked list.

* parser/NodeInfo.h: Removed.

* parser/Nodes.cpp:
(JSC::SourceElements::append):
(JSC::SourceElements::singleStatement): Use a linked list instead of a
vector to track the statements in a list. This removes some allocation
and it means that we don't need a destructor anymore.

(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::EvalNode::EvalNode):
(JSC::FunctionNode::FunctionNode): Updated for interface change to reference,
since these values are never null.

* parser/Nodes.h:
(JSC::StatementNode::next):
(JSC::StatementNode::setNext):
(JSC::CommaNode::append): Deleted. Updated for interface change to linked list.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::didFinishParsing): Updated for interface change to reference.

(JSC::Parser<LexerType>::parseVarDeclarationList):
(JSC::Parser<LexerType>::parseExpression): Track comma expressions as
an explicit list of CommaNodes, removing a use of vector and a destructor.

* parser/Parser.h:
(JSC::Parser<LexerType>::parse):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createCommaExpr):
(JSC::SyntaxChecker::appendToCommaExpr):
(JSC::SyntaxChecker::appendToComma): Deleted. Updated for interface changes.

LayoutTests:
Removed the custom allocator for ParserArena
https://bugs.webkit.org/show_bug.cgi?id=139305

Reviewed by Mark Lam.

Added a test for something I messed up while writing this patch.

* js/basic-strict-mode-expected.txt:
* js/script-tests/basic-strict-mode.js:

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

5 years ago[Apple] Use Accelerate framework to speed-up FEGaussianBlur
dino@apple.com [Tue, 9 Dec 2014 01:31:37 +0000 (01:31 +0000)]
[Apple] Use Accelerate framework to speed-up FEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=139310
<rdar://problem/18434594>

PerformanceTests:

Reviewed by Simon Fraser.

Add an interactive performance test that measures the speed of a set
of blur operations on a generated images.

* Interactive/blur-filter-timing.html: Added.

Source/WebCore:

<rdar://problem/18434594>

Reviewed by Simon Fraser.

Using Apple's Accelerate framework provides faster blurs
than the parallel jobs approach, especially since r168577
which started performing retina-accurate filters.

Using Accelerate.framework to replace the existing box blur (what
we use to approximate Gaussian blurs) gets about a 20% speedup on
desktop class machines, but between a 2x-6x speedup on iOS hardware.
Obviously this depends on the size of the content being blurred,
but it is still good.

The change is to intercept the platformApply function on
FEGaussianBlur and send it off to Accelerate.

There is an interactive performance test: PerformanceTests/Interactive/blur-filter-timing.html

* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::kernelPosition): Move this to a file static function from the .h.
(WebCore::accelerateBoxBlur): The Accelerate implementation.
(WebCore::standardBoxBlur): The default generic/standard implementation.
(WebCore::FEGaussianBlur::platformApplyGeneric): Use accelerate or the default form.
(WebCore::FEGaussianBlur::platformApply): Don't try the parallelJobs approach if Accelerate is available.
* platform/graphics/filters/FEGaussianBlur.h:
(WebCore::FEGaussianBlur::kernelPosition): Deleted. Move into the .cpp.

Source/WTF:

<rdar://problem/18434594>

Reviewed by Simon Fraser.

Add a HAVE_ACCELERATE flag, true on Apple platforms.

* wtf/Platform.h:

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

5 years agoCopy and Lookup menu items should be disabled when something is not copyable
bdakin@apple.com [Tue, 9 Dec 2014 01:29:56 +0000 (01:29 +0000)]
Copy and Lookup menu items should be disabled when something is not copyable
https://bugs.webkit.org/show_bug.cgi?id=139423

Reviewed by Tim Horton.

Source/WebCore:

New function allowCopy() indicates whether the HitTestResult would allow itself to
be copied onto the pasteboard.
* WebCore.exp.in:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::allowsCopy):
* rendering/HitTestResult.h:

Source/WebKit/mac:

Disable both lookup and copy when a HitTestResult does not allow copy.
* WebView/WebActionMenuController.mm:

Set autoenablesItems to NO. It’s messing with our ability to control the enable/
disable state otherwise.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit2:

Add allowsCopy to the WebHitTestResult.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::allowsCopy):

Set autoenablesItems to NO. It’s messing with our ability to control the enable/
disable state otherwise.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):

Disable both lookup and copy when a WebHitTestResult does not allow copy.
* UIProcess/mac/WKActionMenuController.mm:

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

5 years agoMove 'text-shadow' check from RenderStyle::changeRequiresLayout() to changeAffectsVis...
cdumez@apple.com [Tue, 9 Dec 2014 01:28:26 +0000 (01:28 +0000)]
Move 'text-shadow' check from RenderStyle::changeRequiresLayout() to changeAffectsVisualOverflow()
https://bugs.webkit.org/show_bug.cgi?id=139420

Reviewed by Simon Fraser.

Move 'text-shadow' check from RenderStyle::changeRequiresLayout() to
changeAffectsVisualOverflow(). This has no behavior change as
changeRequiresLayout() calls changeAffectsVisualOverflow(). However,
this is clearer as text-shadow affects the visual overflow (similarly
to box-shadow).

No new tests, no behavior change.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeAffectsVisualOverflow):
(WebCore::RenderStyle::changeRequiresLayout):

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

5 years agoUnreviewed, rolling out r176979.
commit-queue@webkit.org [Tue, 9 Dec 2014 01:26:28 +0000 (01:26 +0000)]
Unreviewed, rolling out r176979.
https://bugs.webkit.org/show_bug.cgi?id=139424

"New JSC test in this patch is failing" (Requested by mlam on
#webkit).

Reverted changeset:

"Fixes operationPutByIds such that they check that the put
didn't"
https://bugs.webkit.org/show_bug.cgi?id=139196
http://trac.webkit.org/changeset/176979

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

5 years ago<rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListFor...
mitz@apple.com [Tue, 9 Dec 2014 01:20:52 +0000 (01:20 +0000)]
<rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
https://bugs.webkit.org/show_bug.cgi?id=138750

Reviewed by Tim Horton.

The snapshot for the current gesture was being removed mid-gesture by the callback from
dispatchAfterEnsuringDrawing scheduled by the previous gesture. The fix is to ignore the
callback for a gesture if it is made after the snapshot for that gesture has already been
removed (which can happen as a result of the watchdog timer firing).

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::ViewGestureController): Initialize new member variable.
(WebKit::addLogEntry): Fixed the log message format.
(WebKit::ViewGestureController::endSwipeGesture): When dispatchAfterEnsuringDrawing() calls
us back, bail out if the gesture snapshot has already been removed.
(WebKit::ViewGestureController::removeSwipeSnapshot): Increment
m_gesturePendingSnapshotRemoval.
* UIProcess/mac/ViewGestureController.h: Added m_gesturePendingSnapshotRemoval member
variable.

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

5 years agoFix typo.
andersca@apple.com [Tue, 9 Dec 2014 01:17:35 +0000 (01:17 +0000)]
Fix typo.

* storage/StorageNamespaceImpl.cpp:
(WebCore::localStorageNamespaceMap):

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

5 years agoWebStorageNamespaceProvider should create StorageNamespaceImpls
andersca@apple.com [Tue, 9 Dec 2014 00:28:25 +0000 (00:28 +0000)]
WebStorageNamespaceProvider should create StorageNamespaceImpls
https://bugs.webkit.org/show_bug.cgi?id=139419

Reviewed by Andreas Kling.

Source/WebCore:

* WebCore.exp.in:
Export new symbols.

* WebCore.xcodeproj/project.pbxproj:
Make StorageNamespaceImpl.h a private header.

* storage/StorageNamespaceImpl.cpp:
(WebCore::localStorageNamespaceMap):
Use NeverDestroyed.

(WebCore::StorageNamespaceImpl::createSessionStorageNamespace):
(WebCore::StorageNamespaceImpl::getOrCreateLocalStorageNamespace):
Add new functions for creating namespaces.

(WebCore::StorageNamespaceImpl::localStorageNamespace):
(WebCore::StorageNamespaceImpl::sessionStorageNamespace):
Call the new functions.

* storage/StorageNamespaceImpl.h:
Add new members, make sure to deprecate the ones we don't want anyone calling.

* storage/StorageNamespaceProvider.cpp:
(WebCore::StorageNamespaceProvider::localStorageNamespace):
(WebCore::StorageNamespaceProvider::transientLocalStorageNamespace):
* storage/StorageNamespaceProvider.h:
Pass the quota when creating storage namespaces.

Source/WebKit:

* Storage/WebStorageNamespaceProvider.cpp:
(WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
Create StorageNamespaceImpls.

(WebStorageNamespaceProvider::createSessionStorageNamespace): Deleted.
Delete this for now.

* Storage/WebStorageNamespaceProvider.h:

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

5 years agoAdding user content to a group should force that group to be created
andersca@apple.com [Tue, 9 Dec 2014 00:23:22 +0000 (00:23 +0000)]
Adding user content to a group should force that group to be created
https://bugs.webkit.org/show_bug.cgi?id=139421
rdar://problem/19180108

Reviewed by Sam Weinig.

* WebCoreSupport/WebViewGroup.h:
Store the local storage database path in the group.

* WebCoreSupport/WebViewGroup.mm:
(WebViewGroup::getOrCreate):
If we have an existing group that hasn't had its storage namespace provider created, and the path passed is not empty,
set it. This will ensure that getOrCreate will still work when creating a storage namspace provider.

(WebViewGroup::WebViewGroup):
Initialize the new member variable.

(WebViewGroup::storageNamespaceProvider):
Create the namespace provider lazily.

* WebView/WebView.mm:
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
Use getOrCreate instead of get.

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

5 years agoREGRESSION (173394): Support for webcam is broken
ap@apple.com [Tue, 9 Dec 2014 00:16:38 +0000 (00:16 +0000)]
REGRESSION (173394): Support for webcam is broken
https://bugs.webkit.org/show_bug.cgi?id=139313

Test by Antti Koivisto, reviewed and tweaked by Alexey Proskuryakov.

* http/tests/multipart/multipart-image-expected.html: Added.
* http/tests/multipart/multipart-image.html: Added.

* http/tests/multipart/resources/multipart.php: Multiopart boundary must start on
a new line, so make it so. In newwer OS versions, CFNetwork has a workaround that
makes invalid multipart response work, which is why the test was passing locally.

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

5 years agoMove the new :nth-child() and :nth-last-child() out of experimental
benjamin@webkit.org [Mon, 8 Dec 2014 23:57:38 +0000 (23:57 +0000)]
Move the new :nth-child() and :nth-last-child() out of experimental
https://bugs.webkit.org/show_bug.cgi?id=139329

Reviewed by Andreas Kling.

The code is stable.
Feedback has only been positive.
All the known issues have been reported to the CSS WG.

The #ifdef don't really work anymore anyway for :nth-child() and :nth-last-child().

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):

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

5 years agoA selector should not match anything if there is a subselector after a non-scrollbar...
benjamin@webkit.org [Mon, 8 Dec 2014 23:56:20 +0000 (23:56 +0000)]
A selector should not match anything if there is a subselector after a non-scrollbar pseudo element
https://bugs.webkit.org/show_bug.cgi?id=139336
Source/WebCore:

rdar://problem/19051623

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-12-08
Reviewed by Andreas Kling.

Tests: fast/css/duplicated-after-pseudo-element.html
       fast/css/duplicated-before-pseudo-element.html
       fast/css/simple-selector-after-pseudo-element.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::constructFragments):
The code filtering out simple selectors was only considering
the relation CSSSelector::SubSelector. That comes from SelectorChecker where
the relation considered is the one from the previous selector.

In this case, the relation is the extracted from the current simple selector,
which is the relation with the following selector.

When a single simple selector was following a pseudo element, the relation evaluated
to descendant/adjacent/direct-adjacent and we were skipping the early return.
That simple selector was evaluated as a regular filter on the element.

In the CSS JIT, we can just remove that test altogether. Fragments are built one after
the other. By definition, the evaluated simple selector belong to the current fragment.

LayoutTests:

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-12-08
Reviewed by Andreas Kling.

* fast/css/duplicated-after-pseudo-element-expected.html: Added.
* fast/css/duplicated-after-pseudo-element.html: Added.
* fast/css/duplicated-before-pseudo-element-expected.html: Added.
* fast/css/duplicated-before-pseudo-element.html: Added.
* fast/css/simple-selector-after-pseudo-element-expected.html: Added.
* fast/css/simple-selector-after-pseudo-element.html: Added.

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

5 years agoFix the parsing of advanced :lang() after r176902
benjamin@webkit.org [Mon, 8 Dec 2014 23:55:04 +0000 (23:55 +0000)]
Fix the parsing of advanced :lang() after r176902
https://bugs.webkit.org/show_bug.cgi?id=139379

Reviewed by Andreas Kling.

Source/WebCore:

There were two mistakes that were only caught in debug:

The lexer was not calling isIdentifierStart() before parseIdentifier().
Some identifier we were parsing should have been invalid.
This was caught with an assertion in parseIdentifier().

The other issue is that we were accumulating pointer to freed memory.
The tokenizer for LANGRANGE was creating a new string with a StringBuilder.
The problem is that CSSParserString does not keep the source string alive.
Consequently, the list of language range was accumulating pointers to dead
StringImpls.

The fix there is to simply extend the token to take the original asterisk character
from the input. That is not elegant but that's efficient and we know
the buffer lifetime.

* css/CSSParser.cpp:
(WebCore::CSSParser::realLex):
* css/CSSGrammar.y.in: Fix the indentation of a language range rule.

LayoutTests:

Unskip and update the tests.

All the interesting cases were covered, I just had to update
the expectations.

* TestExpectations:
* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/parsing-css-lang-expected.txt:
* fast/css/parsing-css-lang.html:

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

5 years agoFix iOS build after r176971.
mmaxfield@apple.com [Mon, 8 Dec 2014 23:34:03 +0000 (23:34 +0000)]
Fix iOS build after r176971.

I had previously modified the WTF forwarding header instead of modifying the real source.

* wtf/unicode/CharacterNames.h:

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

5 years agoTry to fix the 32-bit build.
andersca@apple.com [Mon, 8 Dec 2014 23:14:41 +0000 (23:14 +0000)]
Try to fix the 32-bit build.

* WebCore.exp.in:

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

5 years agoThe website data store should know all its associated pages
andersca@apple.com [Mon, 8 Dec 2014 23:14:06 +0000 (23:14 +0000)]
The website data store should know all its associated pages
https://bugs.webkit.org/show_bug.cgi?id=139411

Reviewed by Tim Horton.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
* UIProcess/WebPageProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::addWebPage):
(WebKit::WebsiteDataStore::removeWebPage):
* UIProcess/WebsiteData/WebsiteDataStore.h:

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

5 years agoFixes operationPutByIds such that they check that the put didn't
mmirman@apple.com [Mon, 8 Dec 2014 23:11:23 +0000 (23:11 +0000)]
Fixes operationPutByIds such that they check that the put didn't
change the structure of the object who's property access is being
cached.
https://bugs.webkit.org/show_bug.cgi?id=139196

Reviewed by Filip Pizlo.

* jit/JITOperations.cpp:
(JSC::operationGetByIdOptimize): changed get to getPropertySlot
(JSC::operationPutByIdStrictBuildList): saved the structure before the put.
(JSC::operationPutByIdNonStrictBuildList): ditto.
(JSC::operationPutByIdDirectStrictBuildList): ditto.
(JSC::operationPutByIdDirectNonStrictBuildList): ditto.
* jit/Repatch.cpp:
(JSC::tryCachePutByID): fixed structure() to use the existant vm.
(JSC::tryBuildPutByIdList): Added a check that the old structure's id
is the same as the new.
(JSC::buildPutByIdList): Added an argument
* jit/Repatch.h:
(JSC::buildPutByIdList): Added an argument
* tests/stress/put-by-id-build-list-order-recurse.js: Test that failed before the change
* tests/stress/put-by-id-strict-build-list-order.js: Added.

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

5 years agoInline elements whose parents have small line-height are laid out too low
mmaxfield@apple.com [Mon, 8 Dec 2014 23:10:53 +0000 (23:10 +0000)]
Inline elements whose parents have small line-height are laid out too low
https://bugs.webkit.org/show_bug.cgi?id=139375

Reviewed by Dave Hyatt.

Source/WebCore:

This is a port of the Blink patch at
https://src.chromium.org/viewvc/blink?revision=155253&view=revision.

When laying out inline elements, we try to align leaf children's parents'
baselines across the entire line. However, if you set line-height: 0px on a
span, the entire InlineBox which represents that span will have a height of
0, and therefore be laid out entirely on the baseline. In addition, we will
try to vertically center the leaf text in the span's InlineBox, which means
the leaf text will be vertically centered on the baseline. All the other
major browsers do not have this behavior; instead, they line up the boxes
as you would expect.

This bug led to a rendering problem on the front page of the New York Times.

Here is the ChangeLog from the Blink patch:

Fix baseline position when it is outside the element's box

Specifically, we shouldn't force the baseline to be inside the element. IE
and FF don't do this, and it's incompatible with the CSS spec:

"The baseline of an 'inline-block' is the baseline of its last line box in
the normal flow, unless it has either no in-flow line boxes or if its
'overflow' property has a computed value other than 'visible', in which case
the baseline is the bottom margin edge."
-- http://www.w3.org/TR/CSS21/visudet.html#leading

It doesn't have a special case for "baseline is outside of the element's
margin box".

Test: fast/text/small-line-height.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::baselinePosition):

LayoutTests:

Add fast/text/small-line-height.html for a simple example. In addition, update
existing tests.

* fast/forms/textfield-overflow-by-value-update-expected.txt:
* fast/regions/cssom/client-rects-inline-complex.html:
* fast/regions/overflow/overflow-region-inline-expected.html:
* fast/text/small-line-height-expected.html: Added.
* fast/text/small-line-height.html: Added.
* platform/mac/fast/box-sizing/box-sizing-expected.png:
* platform/mac/fast/box-sizing/box-sizing-expected.txt:
* platform/mac/fast/forms/search-vertical-alignment-expected.png:
* platform/mac/fast/forms/search-vertical-alignment-expected.txt:
* platform/mac/fast/forms/textfield-overflow-by-value-update-expected.png: Removed.
* platform/mac/fast/multicol/client-rects-expected.png:
* platform/mac/fast/multicol/client-rects-expected.txt:
* platform/mac/fast/multicol/client-rects-spanners-complex-expected.png:
* platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt:
* platform/mac/fast/multicol/client-rects-spanners-expected.png:
* platform/mac/fast/multicol/client-rects-spanners-expected.txt:
* platform/mac/fast/multicol/layers-split-across-columns-expected.png:
* platform/mac/fast/multicol/layers-split-across-columns-expected.txt:
* platform/mac/fast/multicol/newmulticol/client-rects-expected.png:
* platform/mac/fast/multicol/newmulticol/client-rects-expected.txt:

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

5 years ago[iOS] YouTube plug-in replacement should support partial urls
eric.carlson@apple.com [Mon, 8 Dec 2014 22:56:06 +0000 (22:56 +0000)]
[iOS] YouTube plug-in replacement should support partial urls
https://bugs.webkit.org/show_bug.cgi?id=139400

Reviewed by Alexey Proskuryakov.

* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::youTubeURL): Call Document::completeURL.

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

5 years agoWebStorageNamespaceProvider should know about its local storage database path
andersca@apple.com [Mon, 8 Dec 2014 22:39:27 +0000 (22:39 +0000)]
WebStorageNamespaceProvider should know about its local storage database path
https://bugs.webkit.org/show_bug.cgi?id=139413

Reviewed by Andreas Kling.

Source/WebKit:

* Storage/WebStorageNamespaceProvider.cpp:
(WebStorageNamespaceProvider::create):
(WebStorageNamespaceProvider::WebStorageNamespaceProvider):
* Storage/WebStorageNamespaceProvider.h:

Source/WebKit/mac:

* WebCoreSupport/WebViewGroup.h:
* WebCoreSupport/WebViewGroup.mm:
(WebViewGroup::getOrCreate):
(WebViewGroup::WebViewGroup):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView setGroupName:]):
(-[WebView groupName]): Deleted.

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

5 years agoBuild fix.
andersca@apple.com [Mon, 8 Dec 2014 22:38:23 +0000 (22:38 +0000)]
Build fix.

* platform/network/soup/CookieJarSoup.cpp:
(WebCore::deleteAllCookiesModifiedSince):

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

5 years agoRoll out r175352.
akling@apple.com [Mon, 8 Dec 2014 22:17:55 +0000 (22:17 +0000)]
Roll out r175352.
<https://webkit.org/b/139146>

This change caused some unexpected assertions in line box teardown.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeRemovedFromTree):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::willBeDestroyed):
* rendering/RenderReplaced.h:

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

5 years agoChange WTF::currentCPUTime to return std::chrono::microseconds and get rid of current...
andersca@apple.com [Mon, 8 Dec 2014 22:17:03 +0000 (22:17 +0000)]
Change WTF::currentCPUTime to return std::chrono::microseconds and get rid of currentCPUTimeMS
https://bugs.webkit.org/show_bug.cgi?id=139410

Reviewed by Andreas Kling.

Source/JavaScriptCore:

* API/JSContextRef.cpp:
(JSContextGroupSetExecutionTimeLimit):
(JSContextGroupClearExecutionTimeLimit):
* runtime/Watchdog.cpp:
(JSC::Watchdog::setTimeLimit):
(JSC::Watchdog::didFire):
(JSC::Watchdog::startCountdownIfNeeded):
(JSC::Watchdog::startCountdown):
* runtime/Watchdog.h:
* runtime/WatchdogMac.cpp:
(JSC::Watchdog::startTimer):

Source/WTF:

* wtf/CurrentTime.cpp:
(WTF::currentCPUTime):
(WTF::currentCPUTimeMS): Deleted.
* wtf/CurrentTime.h:

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

5 years agoCFA wrongly assumes that a speculation for SlowPutArrayStorageShape disallows ArraySt...
mark.lam@apple.com [Mon, 8 Dec 2014 22:12:25 +0000 (22:12 +0000)]
CFA wrongly assumes that a speculation for SlowPutArrayStorageShape disallows ArrayStorageShape arrays.
<https://webkit.org/b/139327>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

The code generator and runtime slow paths expects otherwise.  This patch fixes
CFA to match the code generator's expectation.

* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::arrayModesThatPassFiltering):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShapes):

LayoutTests:

* js/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage-expected.txt: Added.
* js/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage.html: Added.
* js/script-tests/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage.js: Added.
(foo):
(test):

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

5 years ago[iOS] Narrow non-breaking space does not fall back to a correct font
mmaxfield@apple.com [Mon, 8 Dec 2014 22:10:40 +0000 (22:10 +0000)]
[iOS] Narrow non-breaking space does not fall back to a correct font
https://bugs.webkit.org/show_bug.cgi?id=139335

Reviewed by Enrica Casucci.

Source/WebCore:

Test: fast/text/narrow-non-breaking-space.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::requiresCustomFallbackFont):
(WebCore::FontCache::getCustomFallbackFont):

LayoutTests:

* fast/text/narrow-non-breaking-space-expected.html: Added.
* fast/text/narrow-non-breaking-space.html: Added.

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

5 years ago[iOS] Fix the WebKit build with the public SDK
dbates@webkit.org [Mon, 8 Dec 2014 22:06:02 +0000 (22:06 +0000)]
[iOS] Fix the WebKit build with the public SDK

Source/WebCore:

Include header UIKit.h.

* platform/spi/ios/MediaPlayerSPI.h:

Source/WebKit/mac:

Include header NSURLDownloadSPI.h.

* WebCoreSupport/WebFrameLoaderClient.mm:

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

5 years ago<rdar://problem/18046692> [iOS] Safari crashes at -[_NSUndoStack popAndInvoke] when...
mitz@apple.com [Mon, 8 Dec 2014 21:53:54 +0000 (21:53 +0000)]
<rdar://problem/18046692> [iOS] Safari crashes at -[_NSUndoStack popAndInvoke] when trying to undo typing on closed tab
https://bugs.webkit.org/show_bug.cgi?id=139408

Reviewed by Anders Carlsson.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView undoManager]): Override to initialize if necessary and return a unique undo
manager for this instance. This ensures that undoable operations for this webview don’t get
put in other undo managers, and matches UIWebView behavior.

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

5 years agoRevert r176293 & r176275
cdumez@apple.com [Mon, 8 Dec 2014 20:40:27 +0000 (20:40 +0000)]
Revert r176293 & r176275

Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
instead of size_t. There is some disagreement regarding the long-term direction
of the API and we shouldn’t leave the API partly transitioned to unsigned type
while making a decision.

Source/JavaScriptCore:

* bytecode/PreciseJumpTargets.cpp:
* replay/EncodedValue.h:

Source/WebCore:

* WebCore.exp.in:
* bindings/js/JSDOMBinding.h:
(WebCore::jsArray):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* cssjit/SelectorCompiler.cpp:
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
(WebCore::SearchBuffer::length):
* html/HTMLFormElement.cpp:
(WebCore::removeFromVector):
* html/parser/HTMLParserIdioms.h:
* html/parser/XSSAuditor.cpp:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):

Source/WebKit2:

* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/DataReference.h:

Source/WTF:

* wtf/Forward.h:
* wtf/Vector.h:
(WTF::VectorTypeOperations::compare):
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::shouldReallocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
(WTF::VectorBufferBase::capacity):
(WTF::VectorBufferBase::VectorBufferBase):
(WTF::VectorBuffer::VectorBuffer):
(WTF::VectorBuffer::allocateBuffer):
(WTF::VectorBuffer::tryAllocateBuffer):
(WTF::VectorBuffer::shouldReallocateBuffer):
(WTF::VectorBuffer::reallocateBuffer):
(WTF::VectorBuffer::swap):
(WTF::VectorBuffer::swapInlineBuffer):
(WTF::VectorBuffer::swapInlineBuffers):
(WTF::Vector::Vector):
(WTF::Vector::capacity):
(WTF::Vector::at):
(WTF::Vector::operator[]):
(WTF::OverflowHandler>::find):
(WTF::OverflowHandler>::reverseFind):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::resizeToFit):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::reserveInitialCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):
(WTF::OverflowHandler>::reverse):
(WTF::OverflowHandler>::checkConsistency):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::adopt):
(WTF::equalIgnoringNullity):
* wtf/text/StringView.h:
(WTF::append):
* wtf/text/WTFString.h:

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

5 years agoMake deleting all cookies after a given date a little more sane
andersca@apple.com [Mon, 8 Dec 2014 20:36:27 +0000 (20:36 +0000)]
Make deleting all cookies after a given date a little more sane
https://bugs.webkit.org/show_bug.cgi?id=139409

Reviewed by Antti Koivisto.

Source/WebCore:

* WebCore.exp.in:
Update exports.

* platform/network/PlatformCookieJar.h:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/curl/CookieJarCurl.cpp:
* platform/network/soup/CookieJarSoup.cpp:
Rename deleteAllCookiesModifiedAfterDate to deleteAllCookiesModifiedSince and change it
to take an std::chrono::system_clock::time_point instead.

* platform/network/mac/CookieJarMac.mm:
(WebCore::cookieStorage):
Helper function that returns an NSHTTPCookieStorage given a network session.

(WebCore::deleteAllCookiesModifiedSince):
Get the cookie storage from the network storage instead of just getting the global one.

Source/WebKit2:

Change all the doubles to std::chrono::system_clock::time_points instead.

* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode):
(IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode):
* Platform/IPC/ArgumentCoders.h:
* Scripts/webkit/messages.py:
(headers_for_type):
* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerDeleteAllCookiesModifiedAfterDate):
* UIProcess/API/C/WKCookieManager.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedAfterDate): Deleted.
* UIProcess/WebCookieManagerProxy.h:
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::deleteAllCookiesModifiedAfterDate): Deleted.
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/WebCookieManager.messages.in:

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

5 years agoMove the callback invocation outside of the loop.
andersca@apple.com [Mon, 8 Dec 2014 20:07:20 +0000 (20:07 +0000)]
Move the callback invocation outside of the loop.

Rubber-stamped by Tim Horton.

* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):

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

5 years agoAdd action menu tests
timothy_horton@apple.com [Mon, 8 Dec 2014 19:40:27 +0000 (19:40 +0000)]
Add action menu tests
https://bugs.webkit.org/show_bug.cgi?id=139156

Reviewed by Dean Jackson.

* TestWebKitAPI/PlatformWebView.h:
* TestWebKitAPI/mac/PlatformWebViewMac.mm:
(TestWebKitAPI::PlatformWebView::PlatformWebView):
Add a mechanism allowing tests to provide their own WKView subclass.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/action-menu-targets.html: Added.
Add a file with lots of menu targets.

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm: Added.
(-[ActionMenusTestWKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]):
(-[ActionMenusTestWKView runMenuSequenceAtPoint:preMenuNeedsUpdateHandler:preWillOpenMenuHandler:preDidCloseMenuHandler:]):
(-[ActionMenusTestWKView runMenuSequenceAtPoint:preDidCloseMenuHandler:]):
Run through the normal sequence of callbacks, recording what items and type were returned, and give clients a chance to do work at various points in the process.

(-[ActionMenusTestWKView _setOverrideActionMenuItems:]):

(TestWebKitAPI::didFinishLoadForFrameCallback):
(TestWebKitAPI::didFinishDownloadCallback):
(TestWebKitAPI::didCreateDownloadDestinationCallback):
Watch downloads and ensure that they match the content we expect.

(TestWebKitAPI::watchPasteboardForString):
(TestWebKitAPI::watchPasteboardForImage):
(TestWebKitAPI::JavaScriptStringCallbackContext::JavaScriptStringCallbackContext):
(TestWebKitAPI::JavaScriptBoolCallbackContext::JavaScriptBoolCallbackContext):
(TestWebKitAPI::javaScriptStringCallback):
(TestWebKitAPI::javaScriptBoolCallback):
(TestWebKitAPI::callJavaScriptReturningString):
(TestWebKitAPI::callJavaScriptReturningBool):
(TestWebKitAPI::watchEditableAreaForString):
(TestWebKitAPI::waitForVideoReady):
(TestWebKitAPI::retrieveSelection):
(TestWebKitAPI::retrieveSelectionInElement):
(TestWebKitAPI::performMenuItemAtIndexOfTypeAsync):
(TestWebKitAPI::ensureMenuItemAtIndexOfTypeIsDisabled):
Add many helpers for testing, especially to make asynchronous things synchronous.

(TestWebKitAPI::windowPointForTarget):
(TestWebKitAPI::inset8):
Hard-code points in action-menu-targets.html for hit testing.

(TestWebKitAPI::TEST):
Add a suite of tests for WebKit2 action menus.

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm: Added.
(TestWebKitAPI::createActionContextForPhoneNumber):
(TestWebKitAPI::ActionMenuTest::ActionMenuTest):
(TestWebKitAPI::ActionMenuTest::prepareForActionMenu):
(TestWebKitAPI::ActionMenuTest::actionContextForResultAtPoint):
(TestWebKitAPI::ActionMenuTest::drawRect):
(TestWebKitAPI::ActionMenuTest::didCreatePage):
Add a bundle with a PageOverlay and a actionContextForResultAtPoint override,
so that we can test that infrastructure.

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

5 years agoURTBF after r176953, add an unreachable return to make GCC happy.
ossy@webkit.org [Mon, 8 Dec 2014 19:30:19 +0000 (19:30 +0000)]
URTBF after r176953, add an unreachable return to make GCC happy.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):

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

5 years ago[CSS Grid Layout] Grid items must set a new formatting context.
jfernandez@igalia.com [Mon, 8 Dec 2014 19:13:16 +0000 (19:13 +0000)]
[CSS Grid Layout] Grid items must set a new formatting context.
https://bugs.webkit.org/show_bug.cgi?id=139150

Reviewed by David Hyatt.

Source/WebCore:

Grid item's margins must not collapse even when they may be adjoining to
its content's margins. Also, setting a new formatting context prevents any
'float' protruding content on the adjoining grid items.

This patch also renames the expandsToEncloseOverhangingFloats to be more generic now,
determining whether a new formatting context is set or not. This affects not only to
how floats behave, but whether margins should collapse or not.

Tests: fast/css-grid-layout/float-not-protruding-into-next-grid-item.html
       fast/css-grid-layout/grid-item-margins-not-collapse.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::avoidsFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlock::expandsToEncloseOverhangingFloats): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::MarginInfo::MarginInfo): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::layoutBlock): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::computeOverflow): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::addOverhangingFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange): Using the new createsNewFormattingContext function.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::createsNewFormattingContext): Added.
(WebCore::RenderBox::avoidsFloats): Removed checks already defined in the new createsNewFormattingContext function.
* rendering/RenderBox.h:
(WebCore::RenderBox::isGridItem): Added.

LayoutTests:

Test to verify that grid items's margin don't collapese with its parent's margin
and there is no 'float' protruding content on the adjoining grid items.

I had to rebaseline the form-hides-table.html test because table-caption, which
is supposed to establish a new formatting context, does not allow margins collapsing.

* fast/css-grid-layout/float-not-protruding-into-next-grid-item-expected.html: Added.
* fast/css-grid-layout/float-not-protruding-into-next-grid-item.html: Added.
* fast/css-grid-layout/grid-item-margins-not-collapse-expected.html: Added.
* fast/css-grid-layout/grid-item-margins-not-collapse.html: Added.
* platform/gtk/fast/forms/form-hides-table-expected.txt: Rebaseline needed.
* platform/mac/fast/forms/form-hides-table-expected.txt: Rebaseline needed.
* platform/efl/TestExpectations: Mark fast/forms/form-hides-table-expected as failure.

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

5 years agoAdd a stub implementation of WebsiteDataStore::removeDataModifiedSince
andersca@apple.com [Mon, 8 Dec 2014 18:50:39 +0000 (18:50 +0000)]
Add a stub implementation of WebsiteDataStore::removeDataModifiedSince
https://bugs.webkit.org/show_bug.cgi?id=139406

Reviewed by Antti Koivisto.

Change _WKWebsiteDataStore to call the newly added function.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
(toSystemClockTime):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeDataModifiedSince):
* UIProcess/WebsiteData/WebsiteDataStore.h:

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

5 years ago[iOS] Attempt to fix the public SDK build after <https://trac.webkit.org/r176841>
dbates@webkit.org [Mon, 8 Dec 2014 18:47:53 +0000 (18:47 +0000)]
[iOS] Attempt to fix the public SDK build after <https://trac.webkit.org/r176841>
(https://bugs.webkit.org/show_bug.cgi?id=139227)

* platform/spi/ios/AVKitSPI.h:

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

5 years ago[GTK] Let DrawingArea manages setAcceleratedCompositingWindowId
yoon@igalia.com [Mon, 8 Dec 2014 18:46:49 +0000 (18:46 +0000)]
[GTK] Let DrawingArea manages setAcceleratedCompositingWindowId
https://bugs.webkit.org/show_bug.cgi?id=117230

Reviewed by Anders Carlsson.

This is a preparation patch for Threaded Coordinated Graphics.

LayerTreeHostGtk uses a native window handle to make glContext for
accelerated compositing. Therefore it is natural for DrawingArea to take
responsibility for the native window handle. And, in Coordinated
Graphics case, WebPage creates LayerTreeHost before receiving a native
window handle from UIProcess. It means we need a method to pass the
native window handle to already created LayerTreeHost.

This patch uses DrawingAreaProxy::setNativeSurfaceHandleForCompositing
instead of WebCoreProxy::setAcceleratedCompositingWindowId to set window
ID for accelerated compositing.

Also, this patch renames the setAcceleratedCompositingWindowId with a
more generic name, setNativeSurfaceHandleForCompositing.

No new tests. No change in functionality.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/WebPageProxy.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::setAcceleratedCompositingWindowId): Deleted.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::nativeSurfaceHandleForCompositing):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::glContext):
(WebKit::LayerTreeHostGtk::initialize):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::setAcceleratedCompositingWindowId): Deleted.

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

5 years agoStop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy()
cdumez@apple.com [Mon, 8 Dec 2014 18:42:12 +0000 (18:42 +0000)]
Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy()
https://bugs.webkit.org/show_bug.cgi?id=139350

Reviewed by Antti Koivisto.

Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy()
and use m_loadType instead. ResourceRequest::cachePolicy() is meant to be passed
to the network stack, and isn't supposed to be used as input inside WebCore.

No new tests, no behavior change.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):

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

5 years ago[GTK] UserMedia Permission Request API
philn@webkit.org [Mon, 8 Dec 2014 18:14:19 +0000 (18:14 +0000)]
[GTK] UserMedia Permission Request API
https://bugs.webkit.org/show_bug.cgi?id=136449

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Very basic constraints validation support in the GStreamer
MediaStreamCenter. This is needed so the GTK C API tests using the
getUserMedia() API would not time out.

* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterGStreamer::~MediaStreamCenterGStreamer):
(WebCore::MediaStreamCenterGStreamer::validateRequestConstraints):
(WebCore::MediaStreamCenterGStreamer::createMediaStream):

Source/WebKit2:

* PlatformGTK.cmake: GTK-specific new files.
* UIProcess/API/gtk/WebKitUIClient.cpp:  DecidePolicy handler
implementation for UserMediaPermissionRequest.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp: Added,
WebKitGTK API for UserMediaPermissionRequest, very similar to the
one used for Geolocation.
(webkitUserMediaPermissionRequestAllow):
(webkitUserMediaPermissionRequestDeny):
(webkit_permission_request_interface_init):
(webkitUserMediaPermissionRequestDispose):
(webkit_user_media_permission_get_media_types):
(webkitUserMediaPermissionRequestGetProperty):
(webkit_user_media_permission_request_class_init):
(webkitUserMediaPermissionRequestCreate):
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h: Added.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Expose new API
in documentation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/webkit2.h: Expose UserMediaPermissionRequest API.

Tools:

The GTK version of the MiniBrowser has gained UserMedia permission
request support.

* MiniBrowser/gtk/BrowserWindow.c: Show a popup when the page
requires user permission to access audio/video devices.
(permissionRequestDialogCallback):
(webViewDecidePermissionRequest):
(geolocationRequestDialogCallback): Deleted.

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

5 years agoAdd a stubbed out method for clearing out the website data store
andersca@apple.com [Mon, 8 Dec 2014 18:05:44 +0000 (18:05 +0000)]
Add a stubbed out method for clearing out the website data store
https://bugs.webkit.org/show_bug.cgi?id=139404

Reviewed by Antti Koivisto.

Source/WebKit2:

Add stubbed out method that just calls the completion handler.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):

Tools:

Add a debug menu item for testing clearing of website data.

* MiniBrowser/mac/MainMenu.xib:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController clearWebsiteData:]):

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

5 years ago[EFL] Change expectations for two accessibility layout tests.
commit-queue@webkit.org [Mon, 8 Dec 2014 17:27:48 +0000 (17:27 +0000)]
[EFL] Change expectations for two accessibility layout tests.
https://bugs.webkit.org/show_bug.cgi?id=139399

Unreviewed gardening.

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-12-08

* platform/efl/accessibility/roles-exposed-expected.txt:
* platform/efl/accessibility/table-sections-expected.txt:

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

5 years agoRemove ResourceHandle::loadsBlocked()
andersca@apple.com [Mon, 8 Dec 2014 16:57:42 +0000 (16:57 +0000)]
Remove ResourceHandle::loadsBlocked()
https://bugs.webkit.org/show_bug.cgi?id=139401

Reviewed by Daniel Bates.

This hasn't returned true since Leopard, so get rid of it.

* page/Chrome.cpp:
(WebCore::Chrome::canRunModalNow):
* platform/network/ResourceHandle.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.

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

5 years agoAX: iOS: VoiceOver gets hung on some websites consistently.
cfleizach@apple.com [Mon, 8 Dec 2014 16:12:39 +0000 (16:12 +0000)]
AX: iOS: VoiceOver gets hung on some websites consistently.
https://bugs.webkit.org/show_bug.cgi?id=139331

Reviewed by Mario Sanchez Prada.

iFrames are attachments on iOS, but they do not have attachment views. As a result,
WebCore would return incorrect information for the element count and index of children elements.

No tests. Bug only manifests itself when iOS accessibility frameworks call into WebCore.

* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::isDetachedFromParent):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isDetachedFromParent):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper accessibilityContainer]):

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

5 years agoREGRESSION (173394): Support for webcam is broken
antti@apple.com [Mon, 8 Dec 2014 12:59:41 +0000 (12:59 +0000)]
REGRESSION (173394): Support for webcam is broken
https://bugs.webkit.org/show_bug.cgi?id=139313

Reviewed by Alexey Proskuryakov.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):

    Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.

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

5 years ago[CoordinatedGraphics] Move CoordinatedBackingStore and CoordinatedGraphicsScene to...
yoon@igalia.com [Mon, 8 Dec 2014 12:09:30 +0000 (12:09 +0000)]
[CoordinatedGraphics] Move CoordinatedBackingStore and CoordinatedGraphicsScene to Shared
https://bugs.webkit.org/show_bug.cgi?id=139385

Reviewed by Martin Robinson.

For the Threaded Compositor, CoordinatedBackingStore and
CoordinatedGraphicsScene should be placed at the Shared instead of
UIProcess because it can be used in the WebProcess also.

No new tests because there is no behavior change.

* PlatformEfl.cmake:
* Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp.
* Shared/CoordinatedGraphics/CoordinatedBackingStore.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h.

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

5 years agoWebkit using Harfbuzz does not display Arabic script correctly
berto@igalia.com [Mon, 8 Dec 2014 11:34:48 +0000 (11:34 +0000)]
Webkit using Harfbuzz does not display Arabic script correctly
https://bugs.webkit.org/show_bug.cgi?id=136337

Patch by Doron Wloschowsky <doron_wloschowsky@scee.net> on 2014-12-08
Reviewed by Carlos Garcia Campos.

Using reinterpret_cast to convert hb_codepoint_t* into UChar*
doesn't work on big endian systems.

* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
(WebCore::harfBuzzGetGlyph):

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

5 years ago[as] Updated Assamese translations of WebKitGtk+
berto@igalia.com [Mon, 8 Dec 2014 11:33:38 +0000 (11:33 +0000)]
[as] Updated Assamese translations of WebKitGtk+
https://bugs.webkit.org/show_bug.cgi?id=137487

Patch by Nilamdyuti Goswami <nilamdyuti@gmail.com> on 2014-12-08
Reviewed by Carlos Garcia Campos.

* as.po:

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

5 years ago[GStreamer] Major cleanup of AudioDestination implementation
commit-queue@webkit.org [Mon, 8 Dec 2014 09:34:25 +0000 (09:34 +0000)]
[GStreamer] Major cleanup of AudioDestination implementation
https://bugs.webkit.org/show_bug.cgi?id=139370

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-08
Reviewed by Philippe Normand.

* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
Add an audioresample element before the audio sink. The audio sink
might not be able to handle our sampling rate.

(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
(WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer):
(WebCore::AudioDestinationGStreamer::stop):
(WebCore::AudioDestinationGStreamer::finishBuildingPipelineAfterWavParserPadReady): Deleted.
Don't use a wavparse element but directly link the raw audio from
the source to the audio sink.

(WebCore::AudioDestinationGStreamer::start):
Catch errors when going to PLAYING early, we might not get an error
message.

* platform/audio/gstreamer/AudioDestinationGStreamer.h:
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(getGStreamerMonoAudioCaps):
(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcChangeState):
Don't use a WAV encoder but directly output raw audio. Also don't
include a unneeded audioconvert element before the interleave.

(webKitWebAudioSrcLoop):
Add timestamps and durations to the output buffers, map them in
READWRITE mode and actually keep them mapped until we're sure
nothing is actually writing into them.

(webKitWebAudioSrcLoop):
Pause the task on errors instead of continuously calling it again
immediately.

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

5 years ago[GStreamer] Use gst_message_parse_buffering()
commit-queue@webkit.org [Mon, 8 Dec 2014 09:28:32 +0000 (09:28 +0000)]
[GStreamer] Use gst_message_parse_buffering()
https://bugs.webkit.org/show_bug.cgi?id=139365

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-08
Reviewed by Philippe Normand.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
Use gst_message_parse_buffering() instead of manually getting
the percentage from the message's structure. While the latter
is supposed to work and part of the ABI stability guarantee,
it's just not nice and overly complicated.

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

5 years ago[GStreamer] Minor cleanup of the AudioFileReader implementation
commit-queue@webkit.org [Mon, 8 Dec 2014 09:26:36 +0000 (09:26 +0000)]
[GStreamer] Minor cleanup of the AudioFileReader implementation
https://bugs.webkit.org/show_bug.cgi?id=139367

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-08
Reviewed by Philippe Normand.

* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::~AudioFileReader):
Don't call gst_bus_remove_signal_watch(), the source was already
destroyed together with the main context and doing it again here
will give a g_critical().

(WebCore::AudioFileReader::handleSample):
Calculate the number of samples from the actual buffer size
and the bytes-per-frame instead of the buffer duration. Using
the buffer duration can lead to rounding errors and might cause
too few samples to be copied over later.

(WebCore::AudioFileReader::handleMessage):
Set the pipeline to GST_STATE_NULL immediately when receiving
errors to prevent other follow-up error messages from propagating
through the bus and spamming the user's terminal with g_warnings().

(WebCore::AudioFileReader::handleNewDeinterleavePad):
Sync the state of the queue and sink after deinterleave with
the parent state instead of just setting them to READY. That
way we potentially go to PAUSED state a bit earlier already
and prevent a potential race condition that could cause buffers
to arrive in the new elements in READY state already (which would
fail).

(WebCore::AudioFileReader::plugDeinterleave):
Handle multiple decodebin source pads by ignoring all following
ones just in case there are multiple for whatever reason.

(WebCore::AudioFileReader::decodeAudioForBusCreation):
Catch errors from going to PAUSED state early. We might not
get a error message at all if we're unlucky.

(WebCore::AudioFileReader::plugDeinterleave):
(WebCore::AudioFileReader::createBus):
(WebCore::AudioFileReader::handleSample):
Downmix to mono if required instead of just using the front
left channel and claiming it is mono. Downmixing from stereo
to mono will mix both channels instead of just taking the left.

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

5 years ago[GStreamer] Handle CLOCK_LOST and LATENCY messages
commit-queue@webkit.org [Mon, 8 Dec 2014 09:25:01 +0000 (09:25 +0000)]
[GStreamer] Handle CLOCK_LOST and LATENCY messages
https://bugs.webkit.org/show_bug.cgi?id=139341

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-08
Reviewed by Philippe Normand.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Handle CLOCK_LOST message by shortly going back to PAUSED state
and then to PLAYING again to let the pipeline select a new clock
for us.
This can happen if the stream that ends in a sink that provides
the current clock disappears, for example if the audio sink
provides the clock and the audio stream is disabled. It also
happens relatively often with HTTP adaptive streams when switching
between different variants of a stream.

Also handle the LATENCY message by triggering the default GStreamer
mechanism to update the latency. This can happen if the latency of
live elements changes, or for one reason or another a new live element
is added or removed from the pipeline.

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

5 years ago[GStreamer] Use audio-filter property on GStreamer >= 1.4.2
commit-queue@webkit.org [Mon, 8 Dec 2014 09:23:25 +0000 (09:23 +0000)]
[GStreamer] Use audio-filter property on GStreamer >= 1.4.2
https://bugs.webkit.org/show_bug.cgi?id=139360

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-08
Reviewed by Philippe Normand.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
Since 1.4.0 there is an audio-filter property we can use to place
the pitch-preserving filter at a more canonical position inside
the pipeline. Since 1.4.2 this property also handles all necessary
conversions for us.
This simplifies our sink code a bit because we don't have to create
a custom sink bin anymore.

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

5 years ago[GStreamer] Add video/flv to the list of supported mimetypes
commit-queue@webkit.org [Mon, 8 Dec 2014 09:22:02 +0000 (09:22 +0000)]
[GStreamer] Add video/flv to the list of supported mimetypes
https://bugs.webkit.org/show_bug.cgi?id=139344

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-08
Reviewed by Gustavo Noronha Silva.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeCache):
Add video/flv additional to video/x-flv to the list of supported
mimetypes. It's used on some websites, e.g.
http://www.jwplayer.com/html5/formats/

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

5 years ago[GStreamer] Remove GStreamer 0.10 #ifdefs.
commit-queue@webkit.org [Mon, 8 Dec 2014 09:19:26 +0000 (09:19 +0000)]
[GStreamer] Remove GStreamer 0.10 #ifdefs.
https://bugs.webkit.org/show_bug.cgi?id=138921

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-08
Reviewed by Philippe Normand.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::initializeGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered):
Remove GStreamer 0.10 #ifdefs, we depend on >= 1.0.3 at least.

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

5 years ago[GStreamer] Add application/x-mpegurl to the list of supported mimetypes.
commit-queue@webkit.org [Mon, 8 Dec 2014 09:18:32 +0000 (09:18 +0000)]
[GStreamer] Add application/x-mpegurl to the list of supported mimetypes.
https://bugs.webkit.org/show_bug.cgi?id=139343

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-08
Reviewed by Gustavo Noronha Silva.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeCache):
It's an alternative mimetype for the already supported
application/vnd.apple.mpegurl (aka HLS) and adding it
allows all streams on http://www.jwplayer.com/html5/hls/
to be played.

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

5 years agoFix build warning in WebKit2/UIProcess module.
commit-queue@webkit.org [Mon, 8 Dec 2014 09:15:36 +0000 (09:15 +0000)]
Fix build warning in WebKit2/UIProcess module.
https://bugs.webkit.org/show_bug.cgi?id=139386

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-12-08
Reviewed by Alexey Proskuryakov.

Fix build warning by removing unused parameter name from function

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):

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

5 years ago[CoordinatedGraphics] Change the namespace of CoordinatedBackingStore and Coordinated...
yoon@igalia.com [Mon, 8 Dec 2014 03:50:34 +0000 (03:50 +0000)]
[CoordinatedGraphics] Change the namespace of CoordinatedBackingStore and CoordinatedGraphicsScene
https://bugs.webkit.org/show_bug.cgi?id=139372

Reviewed by Gyuyoung Kim.

CoordinatedBackingStore and CoordinatedGraphicsScene should be declared in the WebKit namespace
instead of WebCore namespace.

* UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
(WebKit::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile):
(WebKit::CoordinatedBackingStore::rect):
(WebCore::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile): Deleted.
(WebCore::CoordinatedBackingStore::rect): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
(WebKit::CoordinatedGraphicsScene::setViewBackgroundColor):
(WebKit::CoordinatedGraphicsScene::viewBackgroundColor):
(WebKit::CoordinatedGraphicsScene::layerByID):
(WebKit::CoordinatedGraphicsScene::rootLayer):
(WebCore::CoordinatedGraphicsScene::setViewBackgroundColor): Deleted.
(WebCore::CoordinatedGraphicsScene::viewBackgroundColor): Deleted.
(WebCore::CoordinatedGraphicsScene::layerByID): Deleted.
(WebCore::CoordinatedGraphicsScene::rootLayer): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
(WebKit::CoordinatedLayerTreeHostProxy::coordinatedGraphicsScene):
* UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
(WebKit::toImpl):
(WebKit::toAPI):
(toImpl): Deleted.
(toAPI): Deleted.
* UIProcess/CoordinatedGraphics/WebView.h:

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

5 years agoUse more PassRef in AtomicString.
akling@apple.com [Sun, 7 Dec 2014 23:25:59 +0000 (23:25 +0000)]
Use more PassRef in AtomicString.
<https://webkit.org/b/139319>

Reviewed by Antti Koivisto.

Make a pass over AtomicString and convert functions that return PassRefPtr
into returning RefPtr (where it may be null) and PassRef otherwise.
This allows the compiler to skip null checks in many places.

* wtf/text/AtomicString.cpp:
(WTF::addToStringTable):
(WTF::AtomicString::add):
(WTF::AtomicString::addFromLiteralData):
(WTF::AtomicString::addSlowCase):
* wtf/text/AtomicString.h:
(WTF::AtomicString::add):
(WTF::AtomicString::addWithStringTableProvider):
* wtf/text/cf/AtomicStringCF.cpp:
(WTF::AtomicString::add):

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

5 years agoRemove the unused WTF_USE_GCC_COMPUTED_GOTO_WORKAROUND after r129453.
ossy@webkit.org [Sun, 7 Dec 2014 22:25:01 +0000 (22:25 +0000)]
Remove the unused WTF_USE_GCC_COMPUTED_GOTO_WORKAROUND after r129453.
https://bugs.webkit.org/show_bug.cgi?id=139373

Reviewed by Sam Weinig.

* interpreter/Interpreter.cpp:

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