WebKit-https.git
5 years agoMake the analysis page more useful
rniwa@webkit.org [Fri, 10 Apr 2015 21:04:22 +0000 (21:04 +0000)]
Make the analysis page more useful
https://bugs.webkit.org/show_bug.cgi?id=143617

Reviewed by Chris Dumez.

* public/api/analysis-tasks.php:
(fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
* public/v2/analysis.js:
(App.AnalysisTask.formattedCreatedAt): Added.
(App.AnalysisTask._addLeadingZero): Added.
(App.AnalysisTask.buildRequestCount): Added.
(App.AnalysisTask.finishedBuildRequestCount): Added.
(App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
(App.AnalysisTask.testGroups):
(App.AnalysisTask.triggerable):
(App.AnalysisTask.label):

* public/v2/app.css: Tweaked style rules for the analysis page.

* public/v2/app.js:
(App.buildPopup): Sort the list of platforms by name.
(App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
(App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
such as "Bugzilla" with the corresponding text field.

* public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
for the accompanying graph.

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

5 years agoReplace setFixedLayoutSizeEnabled: with an enum of layout modes
timothy_horton@apple.com [Fri, 10 Apr 2015 20:22:38 +0000 (20:22 +0000)]
Replace setFixedLayoutSizeEnabled: with an enum of layout modes
https://bugs.webkit.org/show_bug.cgi?id=143576

Reviewed by Simon Fraser.

* UIProcess/API/C/WKLayoutMode.h: Added.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _isFixedLayoutEnabled]): Deleted.
(-[WKWebView _setFixedLayoutEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h: Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _layoutMode]):
(-[WKView _setLayoutMode:]):
(-[WKView _isFixedLayoutEnabled]): Deleted.
(-[WKView _setFixedLayoutEnabled:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Add enums for "layout mode". Currently we have two values: "ViewSize",
which is the normal behavior, and "FixedSize", which is fixed layout mode.
More values will come in the future.

* TestWebKitAPI/Tests/WebKit2Cocoa/FixedLayoutSize.mm:
(TEST):
Adopt.

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

5 years ago_WKWebsiteDataStore doesn't track and remove offline application cache entries
andersca@apple.com [Fri, 10 Apr 2015 19:39:57 +0000 (19:39 +0000)]
_WKWebsiteDataStore doesn't track and remove offline application cache entries
https://bugs.webkit.org/show_bug.cgi?id=143614
rdar://problem/20243235

Reviewed by Andreas Kling.

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

* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
Add WKWebsiteDataTypeOfflineWebApplicationCache.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Create a custom application cache storage and fetch the origins from it.

(WebKit::WebsiteDataStore::removeData):
Delete either all the cache entries (since we don't track time in the application cache),
or the ones specified by the given entries.

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

5 years agoBuild fix.
ap@apple.com [Fri, 10 Apr 2015 19:09:14 +0000 (19:09 +0000)]
Build fix.

* Misc/WebNSURLExtras.mm: (-[NSString _webkit_unescapedQueryValue]): Ignore a deprecation.

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

5 years ago[Content Filtering] Support modifying request URLs
aestes@apple.com [Fri, 10 Apr 2015 19:00:31 +0000 (19:00 +0000)]
[Content Filtering] Support modifying request URLs
https://bugs.webkit.org/show_bug.cgi?id=143599
rdar://problem/20442560

Reviewed by Darin Adler.

Source/WebCore:

Tests: contentfiltering/modify-request-url.html
       http/tests/contentfiltering/modify-redirect-request-url.html

Allow NEFilterSource to modifiy request URLs. Also teach MockContentFilter to do the same for testing.

* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::willSendRequest): If NEFilterSource provided a string representing a
valid URL in decisionInfo[NEFilterSourceOptionsRedirectURL], then used that as the request URL.
* platform/spi/cocoa/NEFilterSourceSPI.h: Temporarily defined NEFilterSourceOptionsRedirectURL.
* testing/MockContentFilter.cpp:
(WebCore::MockContentFilter::willSendRequest): If settings() has a valid modifiedRequestURL, use it as the
request URL. Only do so once MockContentFilter has reached its decision point so that both initial requests and
redirect requests can be tested.
* testing/MockContentFilterSettings.h: Added modifiedRequestURL.
(WebCore::MockContentFilterSettings::modifiedRequestURL): Ditto.
(WebCore::MockContentFilterSettings::setModifiedRequestURL): Ditto.
* testing/MockContentFilterSettings.idl: Ditto.

LayoutTests:

* contentfiltering/allow-after-add-data-expected.html: Changed to use pass.html.
* contentfiltering/allow-after-finished-adding-data-expected.html: Ditto.
* contentfiltering/allow-after-response-expected.html: Ditto.
* contentfiltering/allow-after-will-send-request-expected.html: Ditto.
* contentfiltering/block-after-add-data-expected.html: Ditto.
* contentfiltering/block-after-add-data-then-allow-unblock-expected.html: Ditto.
* contentfiltering/block-after-add-data-then-deny-unblock-expected.html: Ditto.
* contentfiltering/block-after-finished-adding-data-expected.html: Ditto.
* contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.html: Ditto.
* contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.html: Ditto.
* contentfiltering/block-after-response-expected.html: Ditto.
* contentfiltering/block-after-response-then-allow-unblock-expected.html: Ditto.
* contentfiltering/block-after-response-then-deny-unblock-expected.html: Ditto.
* contentfiltering/block-after-will-send-request-expected.html: Ditto.
* contentfiltering/block-after-will-send-request-then-allow-unblock-expected.html: Ditto.
* contentfiltering/block-after-will-send-request-then-deny-unblock-expected.html: Ditto.
* contentfiltering/modify-request-url-expected.html: Added.
* contentfiltering/modify-request-url.html: Added.
* contentfiltering/resources/fail.html: Added.
* contentfiltering/resources/pass.html: Added.
* http/tests/contentfiltering/allow-after-redirect-expected.html: Removed the body tag.
* http/tests/contentfiltering/block-after-redirect-expected.html: Ditto.
* http/tests/contentfiltering/modify-redirect-request-url-expected.html: Added.
* http/tests/contentfiltering/modify-redirect-request-url.html: Added.

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

5 years agoDisable Linux-specific code in a Windows build
commit-queue@webkit.org [Fri, 10 Apr 2015 18:55:54 +0000 (18:55 +0000)]
Disable Linux-specific code in a Windows build
https://bugs.webkit.org/show_bug.cgi?id=137973

Patch by Milan Crha <mcrha@redhat.com> on 2015-04-10
Reviewed by Joseph Pecoraro.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):

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

5 years ago[Win] Layout Test fast/backgrounds/selection-background-color-of-list-style.html...
changseok.oh@collabora.com [Fri, 10 Apr 2015 18:14:52 +0000 (18:14 +0000)]
[Win] Layout Test fast/backgrounds/selection-background-color-of-list-style.html is failing
https://bugs.webkit.org/show_bug.cgi?id=143543

Reviewed by Brent Fulgham.

Added missing test results after r182546 for windows.

* platform/win/TestExpectations:
* platform/win/fast/backgrounds/selection-background-color-of-image-list-style-expected.png: Added.
* platform/win/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt: Added.
* platform/win/fast/backgrounds/selection-background-color-of-list-style-expected.png: Added.
* platform/win/fast/backgrounds/selection-background-color-of-list-style-expected.txt: Added.

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

5 years ago[ARM] Fix calleeSaveRegisters() on non iOS platforms after r180516
ossy@webkit.org [Fri, 10 Apr 2015 18:11:14 +0000 (18:11 +0000)]
[ARM] Fix calleeSaveRegisters() on non iOS platforms after r180516
https://bugs.webkit.org/show_bug.cgi?id=143368

Reviewed by Michael Saboff.

* jit/RegisterSet.cpp:
(JSC::RegisterSet::calleeSaveRegisters):

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

5 years agoshowRenderTree: Include the render object to the inlinebox output.
zalan@apple.com [Fri, 10 Apr 2015 18:07:31 +0000 (18:07 +0000)]
showRenderTree: Include the render object to the inlinebox output.
https://bugs.webkit.org/show_bug.cgi?id=143610

This helps to match the inlinebox and its renderer.

Reviewed by Antti Koivisto.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::showLineBox):

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

5 years ago[Win] Implement some methods in DOMHTMLDocument interface.
peavo@outlook.com [Fri, 10 Apr 2015 18:07:05 +0000 (18:07 +0000)]
[Win] Implement some methods in DOMHTMLDocument interface.
https://bugs.webkit.org/show_bug.cgi?id=143602

Reviewed by Alex Christensen.

* DOMHTMLClasses.cpp:
(DOMHTMLDocument::open):
(DOMHTMLDocument::close):
(DOMHTMLDocument::write):
(DOMHTMLDocument::writeln):

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

5 years agoUpdate wireless player placard for OSX.
roger_fong@apple.com [Fri, 10 Apr 2015 17:22:51 +0000 (17:22 +0000)]
Update wireless player placard for OSX.
https://bugs.webkit.org/show_bug.cgi?id=143585.
<rdar://problem/12067439>

Reviewed by Eric Carlson.

* Modules/mediacontrols/mediaControlsApple.css:
Adjust button positioning and svg.
(audio::-webkit-media-controls-wireless-playback-picker-button):
(audio::-webkit-media-controls-wireless-playback-picker-button.playing):
Style the wireless playback status placard, small and big versions.
(audio::-webkit-media-controls-wireless-playback-status):
(audio::-webkit-media-controls-wireless-playback-text):
(audio::-webkit-media-controls-wireless-playback-text-top):
(audio::-webkit-media-controls-wireless-playback-text-bottom):
(audio::-webkit-media-controls-wireless-playback-status.small):
(audio::-webkit-media-controls-wireless-playback-text-top.small):
(audio::-webkit-media-controls-wireless-playback-text-bottom.small):
* Modules/mediacontrols/mediaControlsApple.js:
Add new wireless player placard elements.
(Controller.prototype.createControls):
(Controller.prototype.configureInlineControls):
Make sure to switch between small and big placards when switching between fullscreen and small videos.
(Controller.prototype.configureFullScreenControls):
(Controller.prototype.handleFullscreenChange):
(Controller.prototype.updateWirelessPlaybackStatus):

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

5 years ago[Mac] Refactor MediaPlaybackTarget
eric.carlson@apple.com [Fri, 10 Apr 2015 14:31:48 +0000 (14:31 +0000)]
[Mac] Refactor MediaPlaybackTarget
https://bugs.webkit.org/show_bug.cgi?id=143571

Reviewed by Jer Noble.

Source/WebCore/:

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::addPlaybackTargetPickerClient): Don't call client if page playback target
    is NULL.
(WebCore::Document::didChoosePlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
* dom/Document.h:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setWirelessPlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
* html/HTMLMediaElement.h:

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::HTMLMediaSession): Don't initialize m_playbackTarget.
(WebCore::HTMLMediaSession::didChoosePlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
* html/HTMLMediaSession.h:

* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::playbackTarget): m_playbackTarget is a RefPtr<MediaPlaybackTarget>
(WebCore::Page::didChoosePlaybackTarget): Ditto.
* page/Page.h:

* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::setWirelessPlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.

Make MediaPlaybackTarget RefCounted, and don't require it to be serializable so it can be
subclassed to keep port-specific iformation out of the base class.
* platform/graphics/MediaPlaybackTarget.h:
(WebCore::MediaPlaybackTarget::targetType):
(WebCore::MediaPlaybackTarget::targetContext):
(WebCore::MediaPlaybackTarget::hasActiveRoute):
(WebCore::MediaPlaybackTarget::MediaPlaybackTarget):
(WebCore::MediaPlaybackTarget::setDevicePickerContext): Deleted.
(WebCore::MediaPlaybackTarget::devicePickerContext): Deleted.

MediaPlaybackTargetContext is the struct that is serialized to pass across the process boudary.
It has union to hold port-specific data.
* platform/graphics/MediaPlaybackTargetContext.h: Added.

* platform/graphics/MediaPlaybackTargetPicker.h: didChoosePlaybackTarget takes a Ref<MediaPlaybackTarget>&&
* platform/graphics/MediaPlaybackTargetPickerClient.h: Ditto.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setWirelessPlaybackTarget): Ditto.
* platform/graphics/MediaPlayer.h:

* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):

* platform/graphics/avfoundation/MediaPlaybackTargetMac.h: Added.
(WebCore::MediaPlaybackTargetMac::targetType):
(WebCore::MediaPlaybackTargetMac::outputContext):
* platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
(WebCore::MediaPlaybackTargetMac::create):
(WebCore::MediaPlaybackTargetMac::MediaPlaybackTargetMac):
(WebCore::MediaPlaybackTargetMac::~MediaPlaybackTargetMac):
(WebCore::MediaPlaybackTargetMac::targetContext):
(WebCore::MediaPlaybackTargetMac::hasActiveRoute):
(WebCore::toMediaPlaybackTargetMac):
(WebCore::MediaPlaybackTarget::encode): Deleted.
(WebCore::MediaPlaybackTarget::decode): Deleted.
(WebCore::MediaPlaybackTarget::hasActiveRoute): Deleted.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Allocate and pass a MediaPlaybackTargetMac
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Take a Ref<MediaPlaybackTarget&&

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setWirelessPlaybackTarget): Ditto.

* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::setWirelessPlaybackTarget): Ditto.

Source/WebKit2:

Pass a MediaPlaybackTargetContext across process boundary instead of a MediaPlaybackTarget.
* Shared/WebCoreArgumentCoders.h:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): New.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): New.
* Shared/mac/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): New.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): New.
(IPC::ArgumentCoder<MediaPlaybackTarget>::encode): Deleted.
(IPC::ArgumentCoder<MediaPlaybackTarget>::decode): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChoosePlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected): Take a Ref<MediaPlaybackTarget>&&.

Source/WebKit/mac/:

* WebView/WebMediaPlaybackTargetPicker.h:
* WebView/WebMediaPlaybackTargetPicker.mm:
(WebMediaPlaybackTargetPicker::didChoosePlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.

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

5 years agoAdd total test test of Streams API
calvaris@igalia.com [Fri, 10 Apr 2015 11:20:19 +0000 (11:20 +0000)]
Add total test test of Streams API
https://bugs.webkit.org/show_bug.cgi?id=142682

Unreviewed.

Increased the callbacks timeouts to make tests pass in slower bots
like Yosemite Debug.

* streams/reference-implementation/resources/streams-utils.js:
Created a standardTimeout variable with 100 as default.
* streams/reference-implementation/readable-stream-cancel.html:
* streams/reference-implementation/readable-stream-reader.html:
* streams/reference-implementation/readable-stream-templated.html:
* streams/reference-implementation/readable-stream.html: Used
standardTimeout for the test timeout callbacks.

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

5 years ago[CSS Grid Layout] Fix raw function pointer usages
svillar@igalia.com [Fri, 10 Apr 2015 10:51:01 +0000 (10:51 +0000)]
[CSS Grid Layout] Fix raw function pointer usages
https://bugs.webkit.org/show_bug.cgi?id=143481

Reviewed by Antti Koivisto.

The argument list of
resolveContentBasedTrackSizingFunctionsForItems() became too long
and rather incomprehensible as it included up to 6 function
pointers. This replaces all of them by an enum which describes the
phase of the algorithm that is currently running. With that phase
we have enough information to select the right function to call.

In order not to tangle up too much the method, the new explicit
switch statements where moved to static helper functions.

No new tests as this is just a code refactoring.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase): New helper function.
(WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::trackShouldGrowBeyondGrowthLimitsForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::updateTrackSizeForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::distributeSpaceToTracks):
* rendering/RenderGrid.h:

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

5 years agoWebRTC: Remove AudioStreamTrack and VideoStreamTrack (removed in spec)
adam.bergkvist@ericsson.com [Fri, 10 Apr 2015 10:48:47 +0000 (10:48 +0000)]
WebRTC: Remove AudioStreamTrack and VideoStreamTrack (removed in spec)
https://bugs.webkit.org/show_bug.cgi?id=143336

Reviewed by Philippe Normand.

The specific MediaStreamTrakc types (AudioStreamTrack and VideoStreamTrack) have been
removed from the Media Capture and Streams [1] specification.

[1] http://w3c.github.io/mediacapture-main/archives/20150324/getusermedia.html

There are no test for this feature to remove.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/AudioStreamTrack.cpp: Removed.
* Modules/mediastream/AudioStreamTrack.h: Removed.
* Modules/mediastream/AudioStreamTrack.idl: Removed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::addRemoteTrack):
(WebCore::MediaStream::active): Deleted.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::create):
(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::MediaStreamTrack::kind):
(WebCore::MediaStreamTrack::clone):
(WebCore::MediaStreamTrack::trackEnded): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/VideoStreamTrack.cpp: Removed.
* Modules/mediastream/VideoStreamTrack.h: Removed.
* Modules/mediastream/VideoStreamTrack.idl: Removed.
* WebCore.xcodeproj/project.pbxproj:

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

5 years agoFix some minor typos related to the WebProcessCreationParameter.
commit-queue@webkit.org [Fri, 10 Apr 2015 09:23:43 +0000 (09:23 +0000)]
Fix some minor typos related to the WebProcessCreationParameter.
https://bugs.webkit.org/show_bug.cgi?id=143598

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-04-10
Reviewed by Csaba Osztrogonác.

No new tests, no behavior change.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

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

5 years agoAdd total test test of Streams API
youenn.fablet@crf.canon.fr [Fri, 10 Apr 2015 09:00:08 +0000 (09:00 +0000)]
Add total test test of Streams API
https://bugs.webkit.org/show_bug.cgi?id=142682

Reviewed by Benjamin Poulain.

This is the full test set that we have for the implementation of
Streams API. When we add more features/code the number of passing
tests will increase.

We have the tests translated from the reference implementation at
streams/reference-implementation and our own tests for some other
things at the streams upper level.

We removed testharness stacktrace in case of failure because it
dumps the filenames with paths. You can activate it for a specific
test by setting its dumpStack attribute to true.

All our former custom tests were integrated in the spec so we they
are now in their appropriate places in the reference
implementation ones. Some of them were changed to match the actual
spec and they are failing now, but we only have to progressively
fix them.

* resources/testharnessreport.js: Avoid printing the stack in case
of test failure to be able to have failing tests as expected
unless commanded otherwise.
* streams/readablestream-constructor-expected.txt: Removed.
* streams/readablestream-constructor.html: Removed.
* streams/readablestream-start-expected.txt: Removed.
* streams/readablestream-start.html: Removed.
* streams/readablestreamreader-constructor-expected.txt: Removed.
* streams/readablestreamreader-constructor.html: Removed.
* streams/reference-implementation/bad-underlying-sources-expected.txt: Added.
* streams/reference-implementation/bad-underlying-sources.html: Added.
* streams/reference-implementation/brand-checks-expected.txt: Added.
* streams/reference-implementation/brand-checks.html: Added.
* streams/reference-implementation/count-queuing-strategy-expected.txt: Added.
* streams/reference-implementation/count-queuing-strategy.html: Added.
* streams/reference-implementation/readable-stream-cancel-expected.txt: Added.
* streams/reference-implementation/readable-stream-cancel.html: Added.
* streams/reference-implementation/readable-stream-expected.txt: Added.
* streams/reference-implementation/readable-stream-reader-expected.txt: Added.
* streams/reference-implementation/readable-stream-reader.html: Added.
* streams/reference-implementation/readable-stream-templated-expected.txt: Added.
* streams/reference-implementation/readable-stream-templated.html: Added.
* streams/reference-implementation/readable-stream.html: Added.
* streams/reference-implementation/resources/byte-length-queuing-strategy.js: Added.
* streams/reference-implementation/resources/count-queuing-strategy.js: Added.
* streams/reference-implementation/resources/streams-utils.js: Added.

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

5 years ago[CMake] Remove unnecessary ENABLE_WEBCORE switch
gyuyoung.kim@webkit.org [Fri, 10 Apr 2015 08:36:50 +0000 (08:36 +0000)]
[CMake] Remove unnecessary ENABLE_WEBCORE switch
https://bugs.webkit.org/show_bug.cgi?id=143584

Reviewed by Csaba Osztrogonác.

WebCore should be built for all ports. So ENABLE_WEBCORE switch looks be redundant.
Remove it.

* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFS.cmake:

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

5 years ago[Cocoa] Add a HAVE(AVKIT) and use it
aestes@apple.com [Fri, 10 Apr 2015 08:33:41 +0000 (08:33 +0000)]
[Cocoa] Add a HAVE(AVKIT) and use it
https://bugs.webkit.org/show_bug.cgi?id=143593

Reviewed by David Kilzer.

Source/WebCore:

* page/Settings.h: Only defined setAVKitEnabled() if HAVE(AVKIT).
* platform/ios/WebVideoFullscreenControllerAVKit.mm: Only compiled if HAVE(AVKIT).
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Ditto.

Source/WebKit/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Only set WebKitAVKitEnabled to YES if HAVE(AVKIT).
(-[WebPreferences setAVKitEnabled:]): Only set value for WebKitAVKitEnabled if HAVE(AVKIT).
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Only called Settings::setAVKitEnabled() if HAVE(AVKIT).

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoOptimized]): Returned false if !HAVE(AVKIT).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Removed the check for < iOS 8.2.
(WebKit::WebPageProxy::reattachToWebProcess): Ditto.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::create): Created a version of this function that returns nullptr if
the minimum required version of iOS is less than 8.2 or if !HAVE(AVKIT).
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Only called Settings::setAVKitEnabled(true) if HAVE(AVKIT).

Source/WTF:

* wtf/Platform.h: Defined HAVE(AVKIT) to be true on all Cocoa platforms except Watch OS.

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

5 years agoUse modern loops in WebProcess
commit-queue@webkit.org [Fri, 10 Apr 2015 06:07:56 +0000 (06:07 +0000)]
Use modern loops in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=143302

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-04-09
Reviewed by Darin Adler.

Use modern range for-loops in WebProcess.

No new tests, no behavior change.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::focusedWebPage):
(WebKit::WebProcess::webPageGroup):
(WebKit::WebProcess::setTextCheckerState):
(WebKit::WebProcess::resetAllGeolocationPermissions):

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

5 years agoSome CSS3 filters tests crash under iOS testing
simon.fraser@apple.com [Fri, 10 Apr 2015 05:21:14 +0000 (05:21 +0000)]
Some CSS3 filters tests crash under iOS testing
https://bugs.webkit.org/show_bug.cgi?id=143594
rdar://problem/20491140

Reviewed by David Kilzer.

Some tests disable accelerated compositing via testRunner.overridePreference(). In this case,
we'd not create a root scrolling tree node, so null-check it in AsyncScrollingCoordinator::updateNonFastScrollableRegion().

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):

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

5 years agoSimple line layout: Add <br> support.
zalan@apple.com [Fri, 10 Apr 2015 03:15:50 +0000 (03:15 +0000)]
Simple line layout: Add <br> support.
https://bugs.webkit.org/show_bug.cgi?id=139012

This patch enables RenderBlockFlows to use simple line layout on text content when <br> is present.
Simple text with <br> is a fairly common pattern on discussion(forum)-like web pages. This patch reduces memory usage
and speeds up layout for such content.

Source/WebCore:

PerformanceTest/layout/line-layout-simple.html shows more than 2x speedup, when each paragraph is modified by appending <br> to the end.
With <br> support enabled:
  mean: 70.02391461289068 runs/s
  median: 70.47986488932318 runs/s

While with <br> support disabled:
  mean: 30.417295049468184 runs/s
  median: 30.36517778760357 runs/s

Reviewed by Antti Koivisto.

Test: fast/text/simple-line-with-br.html

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::setSelectionState):
(WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
* rendering/RenderBlockFlow.h:
* rendering/RenderLineBreak.cpp:
(WebCore::simpleLineLayout):
(WebCore::ensureLineBoxes):
(WebCore::RenderLineBreak::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderLineBreak::positionForPoint):
(WebCore::RenderLineBreak::setSelectionState):
(WebCore::RenderLineBreak::linesBoundingBox):
(WebCore::RenderLineBreak::absoluteRects):
(WebCore::RenderLineBreak::absoluteQuads):
(WebCore::RenderLineBreak::collectSelectionRects):
* rendering/RenderLineBreak.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteRects):
(WebCore::RenderText::absoluteQuadsClippedToEllipsis):
(WebCore::RenderText::absoluteQuads):
(WebCore::RenderText::linesBoundingBox):
(WebCore::RenderText::caretMinOffset):
(WebCore::RenderText::caretMaxOffset):
(WebCore::RenderText::containsCaretOffset):
(WebCore::RenderText::hasRenderedText):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::consumeLineBreakIfNeeded):
(WebCore::SimpleLineLayout::skipWhitespaceIfNeeded):
(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::forceFragmentToLine):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::initializeSegments):
(WebCore::SimpleLineLayout::FlowContents::segmentForRenderer): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::hitTestFlow):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
(WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode):
(WebCore::SimpleLineLayout::RunResolver::Iterator::operator--):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isLastInRenderer):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isEmpty):
(WebCore::SimpleLineLayout::TextFragmentIterator::isSoftLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::isHardLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak): Deleted.

LayoutTests:

Test output changes in 2 different ways:
1. Repositioned RenderLineBreak elements. (1px wide <br> is the result of integral pixel snapping)
2. Removed empty content (<br>).

Reviewed by Antti Koivisto.

* fast/text/simple-line-with-br-expected.html: Added.
* fast/text/simple-line-with-br.html: Added.
* platform/mac-mavericks/fast/parser/open-comment-in-textarea-expected.txt:
* platform/mac-mavericks/http/tests/navigation/javascriptlink-frames-expected.txt:
* platform/mac/editing/pasteboard/5761530-1-expected.txt: Added.
* platform/mac/fast/css/text-overflow-ellipsis-bidi-expected.txt:
* platform/mac/fast/dom/focus-contenteditable-expected.txt:
* platform/mac/fast/forms/range/slider-padding-expected.txt: Added.
* platform/mac/fast/forms/textarea-scroll-height-expected.txt:
* platform/mac/fast/parser/open-comment-in-textarea-expected.txt:
* platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/mac/fast/text/svg-font-face-with-kerning-expected.txt: Added.
* platform/mac/http/tests/navigation/javascriptlink-frames-expected.txt:
* platform/mac/http/tests/navigation/postredirect-basic-expected.txt:
* platform/mac/http/tests/navigation/postredirect-goback1-expected.txt:
* platform/mac/printing/single-line-must-not-be-split-into-two-pages-expected.txt:
* platform/mac/svg/wicd/test-rightsizing-b-expected.txt:
* platform/mac/tables/mozilla/bugs/bug106795-expected.txt:
* platform/mac/tables/mozilla/bugs/bug1224-expected.txt:
* platform/mac/tables/mozilla/bugs/bug131020-expected.txt:
* platform/mac/tables/mozilla/bugs/bug131020_iframe-expected.txt:
* platform/mac/tables/mozilla/bugs/bug1430-expected.txt:
* platform/mac/tables/mozilla/bugs/bug16252-expected.txt:
* platform/mac/tables/mozilla/bugs/bug19599-expected.txt:
* platform/mac/tables/mozilla/bugs/bug20579-expected.txt:
* platform/mac/tables/mozilla/bugs/bug32205-3-expected.txt:
* platform/mac/tables/mozilla/bugs/bug82946-2-expected.txt:
* platform/mac/tables/mozilla/bugs/bug92143-expected.txt:
* platform/mac/tables/mozilla/marvin/tables_cellpadding-expected.txt:
* platform/mac/tables/mozilla/marvin/tables_cellspacing-expected.txt:
* platform/mac/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug1262-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
* platform/mac/tables/mozilla_expected_failures/other/test4-expected.txt:

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

5 years agoRegression(r182603): editing/selection/selection-invalid-offset.html is crashing
cdumez@apple.com [Fri, 10 Apr 2015 00:39:29 +0000 (00:39 +0000)]
Regression(r182603): editing/selection/selection-invalid-offset.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=143591

Reviewed by Ryosuke Niwa.

Add missing null-check for m_frame->editor().client() in
FrameSelection::updateAndRevealSelection().

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateAndRevealSelection):

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

5 years agoWeb Inspector: Uncaught exception using console.table with filter argument
commit-queue@webkit.org [Fri, 10 Apr 2015 00:36:27 +0000 (00:36 +0000)]
Web Inspector: Uncaught exception using console.table with filter argument
https://bugs.webkit.org/show_bug.cgi?id=143579

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-09
Reviewed by Timothy Hatcher.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._userProvidedColumnNames):
Reordering in the refactoring would have already converted this argument
to a RemoteObject. Assert that here instead of trying to convert.

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

5 years agoMinor cleanups to WebCore/plugins
commit-queue@webkit.org [Fri, 10 Apr 2015 00:30:00 +0000 (00:30 +0000)]
Minor cleanups to WebCore/plugins
https://bugs.webkit.org/show_bug.cgi?id=143509

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-04-09
Reviewed by Anders Carlsson.

1. Remove unnecessary #includes.
2. Fix some wrong namespace comments for consistency.

No new tests, no behavior change.

* plugins/DOMMimeType.cpp:
* plugins/DOMMimeType.h:
* plugins/DOMMimeTypeArray.h:
* plugins/DOMPlugin.h:
* plugins/DOMPluginArray.h:
* plugins/PluginData.cpp:
* plugins/PluginData.h:
* plugins/PluginMainThreadScheduler.cpp:
* plugins/PluginViewBase.h:

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

5 years agoWeb Inspector: ObjectTree Property Path tooltip has a few issues
commit-queue@webkit.org [Fri, 10 Apr 2015 00:21:12 +0000 (00:21 +0000)]
Web Inspector: ObjectTree Property Path tooltip has a few issues
https://bugs.webkit.org/show_bug.cgi?id=143587

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-09
Reviewed by Timothy Hatcher.

* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath.prototype.appendSymbolProperty):
(WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
Handle Symbol properties. They are treated as an impossible path
because we cannot guarentee a reference to the Symbol right now.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._rootPropertyPathForObject):
The savedResultIndex is on message.

* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement):
(WebInspector.ObjectTreeMapKeyTreeElement):
(WebInspector.ObjectTreeMapValueTreeElement):
In order for "key" to be available setup the mainTitle after
the call to the base's constructor.

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

5 years agoUpdate my email address and expertise.
gyuyoung.kim@webkit.org [Fri, 10 Apr 2015 00:17:48 +0000 (00:17 +0000)]
Update my email address and expertise.
https://bugs.webkit.org/show_bug.cgi?id=143586

Unreviewed, just update my info.

* Scripts/webkitpy/common/config/contributors.json:

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

5 years agoUpdated expectations on a few tests to account for error
mmirman@apple.com [Thu, 9 Apr 2015 23:42:01 +0000 (23:42 +0000)]
Updated expectations on a few tests to account for error
info not being added at throw time anymore.
https://bugs.webkit.org/show_bug.cgi?id=143542
rdar://problem/20475871

Reviewed by Michael Saboff.

Because sourceURL is now being appended at error construction time rather than when thrown,
the tests now attempt to append it during the code run by InspectorTest.sendCommand which I assume uses an eval.
Because this code is generated on the fly, it has no URL and thus sourceURL makes no sense.
Also since they are generated in a new locations, they will have a new lines and columns.

* inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt:
* inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt:
* inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt:
* platform/win/TestExpectations: Enabled the above tests on windows.

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

5 years ago[CSS Grid Layout] Implement justify-self and justify-item css properties.
jfernandez@igalia.com [Thu, 9 Apr 2015 23:36:28 +0000 (23:36 +0000)]
[CSS Grid Layout] Implement justify-self and justify-item css properties.
https://bugs.webkit.org/show_bug.cgi?id=133281

Reviewed by David Hyatt.

Implement the new property 'justify-items', defined in the CSS Box Alignment
Source/WebCore:

specification to describe the container's alignment behavior, in the same way
the 'align-items' property does. The 'justify-self' 'auto' value of any relative
positioned element will be resolved to its container's 'justify-items' value.

Test: fast/css/parse-justify-items.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::resolveContainerAlignmentAuto): Function to resolve 'auto' values for 'align-items' or 'justify-items'.
(WebCore::resolveSelfAlignmentAuto): Function to resolve 'auto' values for 'align-self' or 'justify-self'.
(WebCore::valueForItemPositionWithOverflowAlignment): Take into account the 'legacy' keyword.
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::resolveAlignmentAuto): Deleted (renamed to resolveContainerAlignmentAuto).
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Refactoring to share logic between justify-xxx and align-xxx properties.
(WebCore::CSSParser::parseLegacyPosition): Parsing logic of 'legacy' keyword,
(WebCore::CSSParser::parseItemPositionOverflowPosition): Take into account the 'legacy' keyword.
* css/CSSParser.h:
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInheritJustifyItems): Added.
(WebCore::StyleBuilderCustom::applyInitialJustifyItems): Added.
(WebCore::StyleBuilderCustom::applyValueJustifyItems): Added.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Resolve 'auto' values for justify-items when parents have the 'legacy' keyword.
* rendering/style/RenderStyle.h: Managing the new ItemPositionType fields.
* rendering/style/RenderStyleConstants.h: Added the ItemPositionType enumeration for handling the 'legacy' keyword.
* rendering/style/StyleRareNonInheritedData.cpp: Managing the new ItemPositionType fields.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

specification to desribe the container's alignment behavior, in the same way
the 'align-items' property does.

* fast/css/parse-justify-items-expected.txt: Added.
* fast/css/parse-justify-items.html: Added.
* fast/css/resources/alignment-parsing-utils.js: Added.
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):

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

5 years agoMake it possible to create an application cache storage with custom directories
andersca@apple.com [Thu, 9 Apr 2015 23:32:49 +0000 (23:32 +0000)]
Make it possible to create an application cache storage with custom directories
https://bugs.webkit.org/show_bug.cgi?id=143588

Reviewed by Sam Weinig.

Add cache directory and flat file directory name parameters to ApplicationCacheStorage::create.

* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::loadCache):
(WebCore::ApplicationCacheStorage::checkForDeletedResources):
(WebCore::ApplicationCacheStorage::flatFileAreaSize):
(WebCore::ApplicationCacheStorage::ApplicationCacheStorage):
(WebCore::ApplicationCacheStorage::create):
(WebCore::ApplicationCacheStorage::singleton):
* loader/appcache/ApplicationCacheStorage.h:

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

5 years agoPerf dashboard should automatically select ranges for A/B testing
rniwa@webkit.org [Thu, 9 Apr 2015 22:57:30 +0000 (22:57 +0000)]
Perf dashboard should automatically select ranges for A/B testing
https://bugs.webkit.org/show_bug.cgi?id=143580

Reviewed by Chris Dumez.

Added a new statistics option for picking a A/B test range selection strategy.
The selected ranges are shown in the graph using the same UI to show analysis tasks.

* public/v2/app.js:
(App.DashboardPaneProxyForPicker._platformOrMetricIdChanged): Updated the query parameters for
charts page used by the dashboard since we've added a new parameter at the end.
(App.Pane.ranges): Added. Merges ranges created for analysis tasks and A/B testing.
(App.Pane.updateStatisticsTools): Clone and set the test range selection strategies.
(App.Pane._cloneStrategy): Copy isSegmentation.
(App.Pane._updateMovingAverageAndEnvelope): Set testRangeCandidates.
(App.Pane._movingAverageOrEnvelopeStrategyDidChange): Update the charts when a new text range
selection strategy is picked by the user.
(App.Pane._computeMovingAverageAndOutliers): Compute the test ranges using the chosen strategy.
Avoid going through isAnomalyArray when no anomaly detection strategy is enabled. Also changed
the return value from the moving average time series to a dictionary that contains the moving
average time series, a dictionary of anomalies, and an array of test ranges.
(App.ChartsController._parsePaneList): Parse the test range selection strategy configuration.
(App.ChartsController._serializePaneList): Ditto for serialization.
(App.ChartsController._scheduleQueryStringUpdate): Update the URL hash when the user picks a new
test range selection strategy.

* public/v2/chart-pane.css: Fixed a typo as well as added a CSS rule for test ranges markers.

* public/v2/index.html: Added UI for selecting a test range selection strategy.

* public/v2/interactive-chart.js:
(App.InteractiveChartComponent._rangesChanged): Pass down "status" to be used as a class name.

* public/v2/js/statistics.js:
(Statistics.MovingAverageStrategies): Added isSegmentation to segmentation strategies.
(Statistics.TestRangeSelectionStrategies): Added.

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

5 years agoTrack IconDatabase retain counts for WebContent processes. Balance retain/releases...
commit-queue@webkit.org [Thu, 9 Apr 2015 22:37:19 +0000 (22:37 +0000)]
Track IconDatabase retain counts for WebContent processes. Balance retain/releases for processes that terminate before successfully doing it themselves.
https://bugs.webkit.org/show_bug.cgi?id=143517.

Patch by Gordon Sheridan <gordon_sheridan@apple.com> on 2015-04-09
Reviewed by Brady Eidson.

* UIProcess/WebIconDatabase.messages.in:
Move RetainIconForPageURL and ReleaseIconForPageURL messages to WebProcessProxy so they can be associated with the appropriate web process.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionDidClose):
Call releaseRemainingIconsForPageURLs() to balance retains/releases for this process.

(WebKit::WebProcessProxy::retainIconForPageURL):
Track retain counts for page URLs and call through to WebIconDatabase.

(WebKit::WebProcessProxy::releaseIconForPageURL):
Ditto.

(WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
Call releaseIconForPageURL() once for each outstanding retain count, for each page URL.

* UIProcess/WebProcessProxy.h:
Declare methods for retainIconForPageURL(), releaseIconForPageURL(), and releaseRemainingIconsForPageURLs().
Declare hash map to track number of retains per page URL.

* UIProcess/WebProcessProxy.messages.in:
Moved RetainIconForPageURL and ReleaseIconForPageURL messages here from WebIconDatabase.

* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
(WebKit::WebIconDatabaseProxy::retainIconForPageURL):
Modify the receiver of the message to be WebProcessProxy.

(WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
Ditto.

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

5 years agoText-combine erroneously draws vertically after non-layout-causing style change
mmaxfield@apple.com [Thu, 9 Apr 2015 22:36:56 +0000 (22:36 +0000)]
Text-combine erroneously draws vertically after non-layout-causing style change
https://bugs.webkit.org/show_bug.cgi?id=143461
<rdar://problem/19285490>

Reviewed by Darin Adler.

Source/WebCore:

RenderCombineText::styleDidChange() unconditionally uncombines its text. Layout then
recombines it. However, if there is a style change that does not cause layout, the
RenderCombineText will be left uncombined until the next layout.

Test: fast/text/text-combine-style-change-no-layout.html

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange):

LayoutTests:

* fast/text/text-combine-style-change-no-layout-expected.html: Added.
* fast/text/text-combine-style-change-no-layout.html: Added.

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

5 years ago[WK2] Regression(r182194): The NetworkProcess is calling the wrong memory pressure...
cdumez@apple.com [Thu, 9 Apr 2015 22:19:33 +0000 (22:19 +0000)]
[WK2] Regression(r182194): The NetworkProcess is calling the wrong memory pressure handler before suspending
https://bugs.webkit.org/show_bug.cgi?id=143575
<rdar://problem/20484338>

Reviewed by Andreas Kling.

After r182194, the NetworkProcess is calling the memory pressure
handler before getting suspended to free-up as much memory as possible
at this point.

However, we were calling the default memory pressure handling code
instead of the custom handler registered by the NetworkProcess. This
patch fixes the problem.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::lowMemoryHandler):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::processWillSuspend):
* NetworkProcess/NetworkProcess.h:

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

5 years agoREGRESSION (r182573): Action Menus no longer appear for WebKit2 views displaying...
beidson@apple.com [Thu, 9 Apr 2015 21:32:56 +0000 (21:32 +0000)]
REGRESSION (r182573): Action Menus no longer appear for WebKit2 views displaying an image
rdar://problem/20486551 and https://bugs.webkit.org/show_bug.cgi?id=143574

Reviewed by Brent Fulgham.

* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data): Clear up a name scoping issue.

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

5 years agoFlakiness Dashboard not loading insecure content if loaded with https URL
joepeck@webkit.org [Thu, 9 Apr 2015 20:03:23 +0000 (20:03 +0000)]
Flakiness Dashboard not loading insecure content if loaded with https URL
https://bugs.webkit.org/show_bug.cgi?id=143570

Reviewed by Alexey Proskuryakov.

* TestResultServer/app.yaml:
* TestResultServer/static-dashboards/loader.js:
Switch to https scheme.

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

5 years agoRevert part of 182516: it broke tests
simon.fraser@apple.com [Thu, 9 Apr 2015 19:03:28 +0000 (19:03 +0000)]
Revert part of 182516: it broke tests
https://bugs.webkit.org/show_bug.cgi?id=143568
rdar://problem/20484578

Reviewed by Myles Maxfield.

Revert the FontCascadeCocoa parts of r182516, since it broke some CSS shapes tests.

* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):
(WebCore::dilationSizeForTextColor): Deleted.

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

5 years agoSimple line layout(regression): Calling innerText on RenderFlow with multiple childre...
zalan@apple.com [Thu, 9 Apr 2015 18:57:33 +0000 (18:57 +0000)]
Simple line layout(regression): Calling innerText on RenderFlow with multiple children is slow.
https://bugs.webkit.org/show_bug.cgi?id=143554

Reviewed by Antti Koivisto.

Initialize render flow's segments only when the render flow changes in TextIterator.
The included performance test shows 6x speedup. (from ~10 runs/sec to ~60 runs/sec)

PerformanceTests:

* Layout/simple-line-layout-innertext.html: Added.

Source/WebCore:

Test: PerformanceTests/Layout/simple-line-layout-innertext.html.

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
* editing/TextIterator.h:
* rendering/SimpleLineLayoutFlowContents.cpp: Instruments log shows that vector's expandCapacity could be expensive when flow has large amount of children.
(WebCore::SimpleLineLayout::initializeSegments):

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

5 years ago[WK2][iOS] editorState() should not cause a synchronous layout
cdumez@apple.com [Thu, 9 Apr 2015 18:31:51 +0000 (18:31 +0000)]
[WK2][iOS] editorState() should not cause a synchronous layout
https://bugs.webkit.org/show_bug.cgi?id=142536
<rdar://problem/20041506>

Reviewed by Enrica Casucci.

Source/WebCore:

Add didChangeSelectionAndUpdateLayout() callback to EditorClient
that is called at the end of FrameSelection::updateAndRevealSelection().

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateAndRevealSelection):
* loader/EmptyClients.h:
* page/EditorClient.h:

Source/WebKit/mac:

Provide implementation for EditorClient::didChangeSelectionAndUpdateLayout().

* WebCoreSupport/WebEditorClient.h:

Source/WebKit/win:

Provide implementation for EditorClient::didChangeSelectionAndUpdateLayout().

* WebCoreSupport/WebEditorClient.h:

Source/WebKit2:

platformEditorState() on iOS does a synchronous layout to compute some
of the EditorState members (e.g. caretRectAtStart / caretRectAtEnd).
This is bad for performance as this is called every time the selection
is changed (which happens for e.g. when you set the value of a focused
HTMLInputElement).

This patch updates the behavior on iOS to only send a partial EditorState
on selection change so that the UIProcess gets most of the information
(the ones that do not require style recalc or layout) ASAP. A full Editor
state is then sent after the asynchronous layout is done.

With this change, I see a 38% improvement on Speedometer (26.4 +/- 0.37
-> 36.5 +/- 0.54) on iPhone 6 Plus.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
(WebKit::EditorState::PostLayoutData::encode):
(WebKit::EditorState::PostLayoutData::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
(-[WKContentView webSelectionRects]):
(-[WKContentView _addShortcut:]):
(-[WKContentView selectedText]):
(-[WKContentView isReplaceAllowed]):
(-[WKContentView _promptForReplace:]):
(-[WKContentView _transliterateChinese:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView _showDictionary:]):
(-[WKContentView _characterBeforeCaretSelection]):
(-[WKContentView _characterInRelationToCaretSelection:]):
(-[WKContentView _selectionAtDocumentStart]):
(-[WKContentView selectedTextRange]):
(-[WKContentView hasContent]):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::didChangeSelectionAndUpdateLayout):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
(WebKit::WebPage::didChangeSelection):
(WebKit::WebPage::sendPostLayoutEditorStateIfNeeded):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState):

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

5 years agoNetwork Cache: Crash in WebCore::CachedResource::tryReplaceEncodedData
antti@apple.com [Thu, 9 Apr 2015 16:20:21 +0000 (16:20 +0000)]
Network Cache: Crash in WebCore::CachedResource::tryReplaceEncodedData
https://bugs.webkit.org/show_bug.cgi?id=143562

Reviewed by Anders Carlsson.

If another thread comes and truncates the file before we map it we end up with a map that crashes when accessed.

* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):

    When creating a new file unlink any existing file instead of using O_TRUNC.

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

5 years agoGive each cache group a storage and use it in place of the singleton
andersca@apple.com [Thu, 9 Apr 2015 16:13:06 +0000 (16:13 +0000)]
Give each cache group a storage and use it in place of the singleton
https://bugs.webkit.org/show_bug.cgi?id=143540

Reviewed by Sam Weinig.

This is another step towards making the cache storage be per page.

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
(WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
(WebCore::ApplicationCacheGroup::cacheForMainRequest):
(WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::makeObsolete):
(WebCore::ApplicationCacheGroup::didReachMaxAppCacheSize):
(WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
* loader/appcache/ApplicationCacheGroup.h:
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCacheGroup):
(WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
(WebCore::ApplicationCacheStorage::cacheGroupForURL):
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):

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

5 years ago[EFL] fast/css/vertical-text-overflow-ellipsis-text-align-center.html is failing
commit-queue@webkit.org [Thu, 9 Apr 2015 15:42:52 +0000 (15:42 +0000)]
[EFL] fast/css/vertical-text-overflow-ellipsis-text-align-center.html is failing
https://bugs.webkit.org/show_bug.cgi?id=142571

Unreviewed EFL Gardening.

Rebaseline the fast/css/vertical-text-overflow-ellipsis-text-align-center.html.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-04-09

* platform/efl/TestExpectations:
* platform/efl/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.png:
* platform/efl/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt:

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

5 years agoUnreviewed EFL gardening. Added missing results after r182546.
commit-queue@webkit.org [Thu, 9 Apr 2015 15:39:30 +0000 (15:39 +0000)]
Unreviewed EFL gardening. Added missing results after r182546.
https://bugs.webkit.org/show_bug.cgi?id=143557

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-04-09

* platform/efl/fast/backgrounds/selection-background-color-of-image-list-style-expected.png: Added.
* platform/efl/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt: Added.
* platform/efl/fast/backgrounds/selection-background-color-of-list-style-expected.png: Added.
* platform/efl/fast/backgrounds/selection-background-color-of-list-style-expected.txt: Added.

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

5 years ago[EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
ossy@webkit.org [Thu, 9 Apr 2015 11:51:37 +0000 (11:51 +0000)]
[EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
https://bugs.webkit.org/show_bug.cgi?id=142907

Unreviewed typo fix after r182595.

* PlatformGTK.cmake:

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

5 years agoTry to fix the Mac build after r182596.
aestes@apple.com [Thu, 9 Apr 2015 09:26:46 +0000 (09:26 +0000)]
Try to fix the Mac build after r182596.

I was wrong to replace PLATFORM(IOS) with HAVE(PARENTAL_CONTROLS) in ContentFilterUnblockHandler.
The conditional should be HAVE(PARENTAL_CONTROLS) && PLATFORM(IOS).

* platform/ContentFilterUnblockHandler.h:
* platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
(WebCore::ContentFilterUnblockHandler::wrapWithDecisionHandler):
(WebCore::ContentFilterUnblockHandler::needsUIProcess):
(WebCore::ContentFilterUnblockHandler::encode):
(WebCore::ContentFilterUnblockHandler::decode):
(WebCore::ContentFilterUnblockHandler::canHandleRequest):
(WebCore::ContentFilterUnblockHandler::requestUnblockAsync):

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

5 years ago[Content Filtering] Add a HAVE(PARENTAL_CONTROLS) and use it
aestes@apple.com [Thu, 9 Apr 2015 08:54:41 +0000 (08:54 +0000)]
[Content Filtering] Add a HAVE(PARENTAL_CONTROLS) and use it
https://bugs.webkit.org/show_bug.cgi?id=143559

Reviewed by David Kilzer.

Source/WebCore:

* loader/ContentFilter.cpp:
(WebCore::ContentFilter::types): Only registered ParentalControlsContentFilter if HAVE(PARENTAL_CONTROLS).
* platform/ContentFilterUnblockHandler.h: Changed PLATFORM(IOS) to HAVE(PARENTAL_CONTROLS).
* platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
(WebCore::ContentFilterUnblockHandler::wrapWithDecisionHandler): Ditto.
(WebCore::ContentFilterUnblockHandler::needsUIProcess): Ditto.
(WebCore::ContentFilterUnblockHandler::encode): Ditto.
(WebCore::ContentFilterUnblockHandler::decode): Ditto.
(WebCore::ContentFilterUnblockHandler::canHandleRequest): Ditto.
(WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Ditto.
* platform/cocoa/ParentalControlsContentFilter.mm: Wrapped the file with HAVE(PARENTAL_CONTROLS)

Source/WTF:

Added PLATFORM(WATCHOS). Used PLATFORM() since Watch OS is just a variant of OS(IOS).
Defined HAVE(PARENTAL_CONTROLS) to be true on all Cocoa platforms except Watch OS.

* wtf/Platform.h:

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

5 years ago[EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
ossy@webkit.org [Thu, 9 Apr 2015 08:11:52 +0000 (08:11 +0000)]
[EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
https://bugs.webkit.org/show_bug.cgi?id=142907

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Scripts/generate-forwarding-headers.pl: Make it work with more path and platform arguments.

Tools:

* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/PlatformGTK.cmake:
* WebKitTestRunner/PlatformEfl.cmake:
* WebKitTestRunner/PlatformGTK.cmake:

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

5 years agoSkip http/tests/contentfiltering/ on all the platforms that skipped contentfiltering/
aestes@apple.com [Thu, 9 Apr 2015 07:33:36 +0000 (07:33 +0000)]
Skip http/tests/contentfiltering/ on all the platforms that skipped contentfiltering/
https://bugs.webkit.org/show_bug.cgi?id=143460

* platform/efl/TestExpectations:
* platform/win/TestExpectations:

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

5 years agoUnreviewed, added CSS Grid Layout to features.json file.
svillar@igalia.com [Thu, 9 Apr 2015 07:26:43 +0000 (07:26 +0000)]
Unreviewed, added CSS Grid Layout to features.json file.

* features.json:

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

5 years agoWeb Inspector: Simplify Legacy Tips support
commit-queue@webkit.org [Thu, 9 Apr 2015 06:57:32 +0000 (06:57 +0000)]
Web Inspector: Simplify Legacy Tips support
https://bugs.webkit.org/show_bug.cgi?id=143551

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-08
Reviewed by Timothy Hatcher.

* UserInterface/Models/ConsoleMessage.js:
* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
(WebInspector.ConsoleMessageView.prototype._levelString):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._filterMessageElements):

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

5 years ago[Streams API] Support the start function parameter in ReadableStream constructor
youenn.fablet@crf.canon.fr [Thu, 9 Apr 2015 06:48:16 +0000 (06:48 +0000)]
[Streams API] Support the start function parameter in ReadableStream constructor
https://bugs.webkit.org/show_bug.cgi?id=141160

Source/WebCore:

Reviewed by Benjamin Poulain.

Stores the JS source object in ReadableStreamJSSource and calls its "start" function.
This function takes a controller object that has three JS functions as members: close, enqueue and error.
This controller is stored in ReadableStreamJSSource as it will be reused as "pull" parameter.
All three JS functions do not currently do anything.

Test: streams/readablestream-start.html

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::start): Place holder for step 11 of https://streams.spec.whatwg.org/#rs-constructor.
* Modules/streams/ReadableStream.h:
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::constructJSReadableStream):
* bindings/js/ReadableStreamJSSource.cpp:
(WebCore::getPropertyFromObject): Helper function to get a public property from an object.
(WebCore::setPropertyToObject): Helper function to set a public property to an object.
(WebCore::callFunction): Helper function to call a JS function from C++.
(WebCore::ReadableStreamJSSource::ReadableStreamJSSource):
(WebCore::notImplementedFunction):
(WebCore::createReadableStreamEnqueueFunction): Creates the JS function for enqueue.
(WebCore::createReadableStreamCloseFunction): Creates the JS function for close.
(WebCore::createReadableStreamErrorFunction): Creates the JS function for error.
(WebCore::startReadableStreamAsync): Equivalent of promise resolution for start.
(WebCore::ReadableStreamJSSource::start): Calls the "start" function of the JS source with all three JS functions (enqueue, close, error) as parameters.
* bindings/js/ReadableStreamJSSource.h:

LayoutTests:

Reviewed by Benjamin Poulain.

Added tests to check that start JS function is called with the right parameters and can throw errors.

* streams/readablestream-start-expected.txt: Added.
* streams/readablestream-start.html: Added.

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

5 years agoException in console and broken right click after attempting to show context menu...
commit-queue@webkit.org [Thu, 9 Apr 2015 06:34:07 +0000 (06:34 +0000)]
Exception in console and broken right click after attempting to show context menu in Inspector
https://bugs.webkit.org/show_bug.cgi?id=143556

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-08
Reviewed by Brady Eidson.

* Shared/mac/NativeContextMenuItem.mm:
(WebKit::NativeContextMenuItem::NativeContextMenuItem):
Add an ASSERT to immediately catch a menu item created with a nil native menu item.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
Gracefully handle a null share context menu item.

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

5 years ago[Mac] Unreviewed test fix after r182584
bfulgham@apple.com [Thu, 9 Apr 2015 05:38:02 +0000 (05:38 +0000)]
[Mac] Unreviewed test fix after r182584
https://bugs.webkit.org/show_bug.cgi?id=143452

Source/WebCore:

Correct bit comparison to use the correct value for the Control-key

* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::typeForEvent):

Source/WebKit2:

Correct bit comparison to use the correct value for the Control-key

* Shared/mac/WebEventFactory.mm:
(WebKit::typeForEvent):

Tools:

Put both of these tests back to their original state now that the underlying
problem is fixed.

* TestWebKitAPI/Tests/WebKit2/MenuTypesForMouseEvents.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm:
(TestWebKitAPI::TEST):

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

5 years ago[EFL] Create PageUIClientEfl after sending CreateWebPage message
ljaehun.lim@samsung.com [Thu, 9 Apr 2015 05:22:49 +0000 (05:22 +0000)]
[EFL] Create PageUIClientEfl after sending CreateWebPage message
https://bugs.webkit.org/show_bug.cgi?id=143514

Reviewed by Gyuyoung Kim.

UIProcess sends some messages to WebPage before WebPage is created. It makes some error logs on debug build.
So this patch moves the initialization of m_pageUIClient after calling WKViewInitialize().

* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):

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

5 years agoThe results of A/B testing should state statistical significance
rniwa@webkit.org [Thu, 9 Apr 2015 04:58:19 +0000 (04:58 +0000)]
The results of A/B testing should state statistical significance
https://bugs.webkit.org/show_bug.cgi?id=143552

Reviewed by Chris Dumez.

Added statistical comparisons between results for each configuration on analysis task page using
Welch's t-test. The probability as well as t-statistics and the degrees of freedoms are reported.

* public/v2/app.js:
(App.TestGroupPane._populate): Report the list of statistical comparison between every pair of
root configurations in the results. e.g. if we've got A, B, C configurations then compare A/B, A/C
and B/C.
(App.TestGroupPane._computeStatisticalSignificance): Compute the statistical significance using
Welch's t-test. Report the probability by which two samples do not come from the same distribution.
(App.TestGroupPane._createConfigurationSummary): Include the array of results for this configuration.
Also renamed "items" to "requests" for clarity.

* public/v2/index.html: Added the template for showing statistical comparisons.

* public/v2/js/statistics.js: Renamed tDistributionQuantiles to tDistributionByOneSidedProbability
for clarity. Also factored out the functions to convert from one-sided probability to two-sided
probability and vice versa.
(Statistics.supportedConfidenceIntervalProbabilities):
(Statistics.confidenceIntervalDelta):
(Statistics.probabilityRangeForWelchsT): Added. Computes the lower bound and the upper bound for
the probability that two values are sampled from distinct distributions using Welch's t-test.
(Statistics.computeWelchsT): This function now takes two-sided probability like all other functions.
(.tDistributionByOneSidedProbability): Renamed from tDistributionQuantiles.
(.oneSidedToTwoSidedProbability): Extracted.
(.twoSidedToOneSidedProbability): Extracted.
(Statistics.MovingAverageStrategies): Converted the one-sided probability to the two-sided probability
now that computeWelchsT takes two-sided probability.

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

5 years agorun-jsc-benchmarks geomean of preferred means shouldn't print the VMs header twice
fpizlo@apple.com [Thu, 9 Apr 2015 04:47:24 +0000 (04:47 +0000)]
run-jsc-benchmarks geomean of preferred means shouldn't print the VMs header twice
https://bugs.webkit.org/show_bug.cgi?id=143553

Reviewed by Ryosuke Niwa.

Remove the spurious printVMs left over from an earlier change.

* Scripts/run-jsc-benchmarks:

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

5 years agoAdd a debug assertion that will fire if we try to paint layer contents on a backgroun...
simon.fraser@apple.com [Thu, 9 Apr 2015 03:44:44 +0000 (03:44 +0000)]
Add a debug assertion that will fire if we try to paint layer contents on a background thread
https://bugs.webkit.org/show_bug.cgi?id=143547

Reviewed by Alexey Proskuryakov.

New assertion to catch cases where other frameworks erroneously trigger painting
on a non-main (or non-Web) thread.

* platform/graphics/mac/WebLayer.mm:
(-[WebSimpleLayer display]):
(-[WebSimpleLayer drawInContext:]):

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

5 years ago[Mac] Unreviewed test fix after r182581
bfulgham@apple.com [Thu, 9 Apr 2015 03:42:04 +0000 (03:42 +0000)]
[Mac] Unreviewed test fix after r182581

The behavior of control-left-click is controlled by a system preference.
Our test bots have this turned off.

* TestWebKitAPI/Tests/WebKit2/MenuTypesForMouseEvents.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm:
(TestWebKitAPI::TEST):

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

5 years agoUnreviewed Test Fix after r182579. Add missing include.
joepeck@webkit.org [Thu, 9 Apr 2015 03:21:46 +0000 (03:21 +0000)]
Unreviewed Test Fix after r182579. Add missing include.

* UserInterface/Test.html:
Missing file was causing inspector/page/main-frame-resource.html to fail.

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

5 years ago[Win] Layout Test inspector/console/console-api.html is failing
bfulgham@apple.com [Thu, 9 Apr 2015 02:50:39 +0000 (02:50 +0000)]
[Win] Layout Test inspector/console/console-api.html is failing
https://bugs.webkit.org/show_bug.cgi?id=143548

* platform/win/TestExpectations: Skipped new timeout.

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

5 years ago[Mac] WebKit is not honoring OS preferences for secondary click behaviors
bfulgham@apple.com [Thu, 9 Apr 2015 02:41:31 +0000 (02:41 +0000)]
[Mac] WebKit is not honoring OS preferences for secondary click behaviors
https://bugs.webkit.org/show_bug.cgi?id=143452
<rdar://problem/20437483>

Reviewed by Tim Horton.

Source/WebCore:

We cannot rely on the event's button number to decide behavior. The OS settings might have
mapped middle button to context menu, etc. Instead, we should ask the OS (via NSMenu) what
the proper button press behavior is.

* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::mouseButtonForEvent): Ask NSMenu what kind of button press we have received.

Source/WebKit/mac:

We were improperly intercepting contextual menu clicks and passing them through
the mouseDown handler, rather than processing via NSView's menu handling code.

* WebView/WebHTMLView.mm:
(-[WebHTMLView otherMouseDown:]): Treat context menu events the same as the action
menu case, and pass it to AppKit for normal menu processing.

Source/WebKit2:

We cannot rely on the event's button number to decide behavior. The OS settings might have
mapped middle button to context menu, etc. Instead, we should ask the OS (via NSMenu) what
the proper button press behavior is.

* Shared/mac/WebEventFactory.mm:
(WebKit::mouseButtonForEvent): Ask NSMenu what kind of button press we have received.

Tools:

Add a new API test to confirm that Cocoa mouse button press events are properly
tagged with the desired menu behavior (i.e., 'None', 'Context', or 'Action'.)

The WK2 test dispatches mouse down events to a PlatformWebView, and checks with
some registered event handlers that the expected button press and context menu
events are received.

The WK1 unit test creates an NSEvent with the desired button press state, and then
uses WebCore::PlatformEventFactory::createPlatformMouseEvent to create a WebCore event.
We check the resulting PlatformMouseEvent for proper state.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new test files.
* TestWebKitAPI/Tests/WebKit2/MenuTypesForMouseEvents.cpp: Added.
(TestWebKitAPI::buildAndPerformTest): Helper function to build/run an individual test.
* TestWebKitAPI/Tests/WebKit2/mouse-button-listener.html: Added.
* TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm: Added.
(TestWebKitAPI::canCallMenuTypeForEvent): Helper function.
(TestWebKitAPI::buildAndPerformTest): Helper function to build/run an individual test.
* TestWebKitAPI/mac/PlatformWebViewMac.mm:
(TestWebKitAPI::PlatformWebView::simulateButtonClick): Added method to support firing
mouse down events.
* TestWebKitAPI/mac/PlatformWebViewMac.h:

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

5 years agoFix -Wformat in AnimationBase.cpp
mcatanzaro@igalia.com [Thu, 9 Apr 2015 02:15:36 +0000 (02:15 +0000)]
Fix -Wformat in AnimationBase.cpp
https://bugs.webkit.org/show_bug.cgi?id=143541

Reviewed by Simon Fraser.

* page/animation/AnimationBase.cpp:
(WebCore::nameForStateInput): Added. Converts an AnimationBase::AnimationStateInput to a
string.
(WebCore::AnimationBase::updateStateMachine): Print AnimationBase::AnimationStateInput as a
string, instead of passing it to %d and assuming that works, to silence GCC's -Wformat.

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

5 years agoWeb Inspector: Split ConsoleMessageImpl into the View and the Model
joepeck@webkit.org [Thu, 9 Apr 2015 01:37:58 +0000 (01:37 +0000)]
Web Inspector: Split ConsoleMessageImpl into the View and the Model
https://bugs.webkit.org/show_bug.cgi?id=142599

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* UserInterface/Models/ConsoleMessage.js: Added.
(WebInspector.ConsoleMessage):
(WebInspector.ConsoleMessage.prototype.get source):
(WebInspector.ConsoleMessage.prototype.get level):
(WebInspector.ConsoleMessage.prototype.get messageText):
(WebInspector.ConsoleMessage.prototype.get type):
(WebInspector.ConsoleMessage.prototype.get url):
(WebInspector.ConsoleMessage.prototype.get line):
(WebInspector.ConsoleMessage.prototype.get column):
(WebInspector.ConsoleMessage.prototype.get repeatCount):
(WebInspector.ConsoleMessage.prototype.get parameters):
(WebInspector.ConsoleMessage.prototype.get stackTrace):
(WebInspector.ConsoleMessage.prototype.get request):
New readonly model object for console messages.

* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/Base/Test.js:
(WebInspector.loaded):
Load the new files in the main / test page.

* UserInterface/Views/LegacyConsoleMessage.js: Removed.
* UserInterface/Views/LegacyConsoleMessageImpl.js: Removed.
Remove Legacy versions.

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
(WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult.saveResultCallback):
(WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
(WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage):
(WebInspector.JavaScriptLogViewController.prototype.updatePreviousMessageRepeatCount):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted.printResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Deleted.
Update LogViewController to create ConsoleMessageViews from ConsoleMessages when applicable.
Also clarify when we have a view versus model object.

* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
(WebInspector.LogManager.prototype.messagesCleared):
(WebInspector.LogManager.prototype._mainResourceDidChange):
Create model objects and issue events for the model objects.

* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._consoleMessageAdded):
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
Update now that the event gives us a model object.

* UserInterface/Views/ConsoleMessageView.js: Added.
(WebInspector.ConsoleMessageView):
(WebInspector.ConsoleMessageView.prototype.get element):
(WebInspector.ConsoleMessageView.prototype.get message):
(WebInspector.ConsoleMessageView.prototype.get repeatCount):
(WebInspector.ConsoleMessageView.prototype.set repeatCount):
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
(WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
(WebInspector.ConsoleMessageView.prototype._appendSavedResultIndex):
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
(WebInspector.ConsoleMessageView.prototype._appendParameters):
(WebInspector.ConsoleMessageView.prototype._appendStackTrace):
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
(WebInspector.ConsoleMessageView.prototype._formatParameter):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsValue):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsObject):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageView.prototype._rootPropertyPathForObject):
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.parameterFormatter):
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.stringFormatter):
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.floatFormatter):
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.integerFormatter):
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.styleFormatter):
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.isWhitelistedProperty):
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.append):
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString):
(WebInspector.ConsoleMessageView.prototype._shouldShowStackTrace):
(WebInspector.ConsoleMessageView.prototype._shouldHideURL):
(WebInspector.ConsoleMessageView.prototype._firstNonNativeCallFrame):
(WebInspector.ConsoleMessageView.prototype._linkifyLocation):
(WebInspector.ConsoleMessageView.prototype._linkifyCallFrame):
(WebInspector.ConsoleMessageView.prototype._userProvidedColumnNames):
(WebInspector.ConsoleMessageView.prototype._formatParameterAsTable):
(WebInspector.ConsoleMessageView.prototype._levelString):
(WebInspector.ConsoleMessageView.prototype._enforcesClipboardPrefixString):
(WebInspector.ConsoleMessageView.prototype._clipboardPrefixString):
New View class for a ConsoleMessage. This is a near direct port of the old code
to a view class that has a root element.

* UserInterface/Models/ConsoleCommandResultMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleCommandResult.js.
(WebInspector.ConsoleCommandResultMessage):
(WebInspector.ConsoleCommandResultMessage.clearMaximumSavedResultIndex):
(WebInspector.ConsoleCommandResultMessage.prototype.get savedResultIndex):
Rename, as this is a ConsoleMessage subclass with a specific type for console evaluation results.

* UserInterface/Views/ConsoleCommandView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleCommand.js.
(WebInspector.ConsoleCommandView):
(WebInspector.ConsoleCommandView.prototype.get element):
(WebInspector.ConsoleCommandView.prototype.get commandText):
(WebInspector.ConsoleCommandView.prototype.get message):
(WebInspector.ConsoleCommandView.prototype.toClipboardString):
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup):
(WebInspector.ConsoleGroup.prototype.get parentGroup):
(WebInspector.ConsoleGroup.prototype.render):
(WebInspector.ConsoleGroup.prototype.addMessageView):
(WebInspector.ConsoleGroup.prototype.append):
(WebInspector.ConsoleGroup.prototype._titleMouseDown):
(WebInspector.ConsoleGroup.prototype.addMessage): Deleted.
(WebInspector.ConsoleGroup.prototype._titleClicked): Deleted.
* UserInterface/Views/ConsoleSession.js:
(WebInspector.ConsoleSession):
(WebInspector.ConsoleSession.prototype.addMessageView):
(WebInspector.ConsoleSession.prototype.append):
(WebInspector.ConsoleSession.prototype.addMessage): Deleted.
(WebInspector.ConsoleSession.prototype.hasMessages): Deleted.
Convert to classes, and clarify these deal with View objects.

* UserInterface/Views/LogContentView.css:
(.console-message .repeat-count):
(.console-message .bubble): Deleted.
Better class name for the repeat count element.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
(WebInspector.LogContentView.prototype._formatMessagesAsData):
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._updateMessagesSelection):
(WebInspector.LogContentView.prototype._selectAllMessages):
(WebInspector.LogContentView.prototype._allMessageElements):
(WebInspector.LogContentView.prototype._unfilteredMessageElements):
(WebInspector.LogContentView.prototype._visibleMessageElements):
(WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
(WebInspector.LogContentView.prototype._filterMessageElements):
(WebInspector.LogContentView.prototype._upArrowWasPressed):
(WebInspector.LogContentView.prototype._downArrowWasPressed):
(WebInspector.LogContentView.prototype._previousMessage):
(WebInspector.LogContentView.prototype._nextMessage):
(WebInspector.LogContentView.prototype._performSearch):
(WebInspector.LogContentView.prototype._highlightRanges):
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
(WebInspector.LogContentView.prototype.didAppendConsoleMessage): Deleted.
(WebInspector.LogContentView.prototype._allMessages): Deleted.
(WebInspector.LogContentView.prototype._unfilteredMessages): Deleted.
(WebInspector.LogContentView.prototype._visibleMessages): Deleted.
(WebInspector.LogContentView.prototype._filterMessages): Deleted.
Rename lots of things to make it clear when we are dealing with
elements, model objects, or view objects. This class is still heavily
dealing with elements, and needs to be cleaned up later.

LayoutTests:

* inspector/console/console-api-expected.txt: Added.
* inspector/console/console-api.html: Added.
Add a basic test for console APIs creating the new ConsoleMessage model objects.

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

5 years agoFix uncaught exception seen in Inspector.
joepeck@webkit.org [Thu, 9 Apr 2015 01:37:52 +0000 (01:37 +0000)]
Fix uncaught exception seen in Inspector.

Reviewed by Timothy Hatcher.

* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.prototype.removeChild):
Add a null check. Everywhere else null checks this member variable
which may not exist yet, this case was missing the check.

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

5 years agoUse jsNontrivialString in more places if the string is guaranteed to be 2 or more...
joepeck@webkit.org [Thu, 9 Apr 2015 01:37:50 +0000 (01:37 +0000)]
Use jsNontrivialString in more places if the string is guaranteed to be 2 or more characters
https://bugs.webkit.org/show_bug.cgi?id=143430

Reviewed by Darin Adler.

* runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
(JSC::numberProtoFuncToString):
* runtime/SymbolPrototype.cpp:
(JSC::symbolProtoFuncToString):

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

5 years agoWeb Inspector: Regression: Showing of color swatches no longer works in Details Sidebar
commit-queue@webkit.org [Thu, 9 Apr 2015 01:02:14 +0000 (01:02 +0000)]
Web Inspector: Regression: Showing of color swatches no longer works in Details Sidebar
https://bugs.webkit.org/show_bug.cgi?id=143539

Patch by Tobias Reiss <tobi+webkit@basecode.de> on 2015-04-08
Reviewed by Timothy Hatcher.

Fix a regression where due to an ESLint error the whole line instead of just
the variable declaration was removed.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):

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

5 years ago[Win] Document some test failures.
bfulgham@apple.com [Thu, 9 Apr 2015 00:32:12 +0000 (00:32 +0000)]
[Win] Document some test failures.
https://bugs.webkit.org/show_bug.cgi?id=143542
https://bugs.webkit.org/show_bug.cgi?id=143543

* platform/win/TestExpectations: Mark as failing.

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

5 years ago[GTK] Add pango to jhbuild-optional.modules
mcatanzaro@igalia.com [Wed, 8 Apr 2015 23:14:07 +0000 (23:14 +0000)]
[GTK] Add pango to jhbuild-optional.modules
https://bugs.webkit.org/show_bug.cgi?id=143537

Reviewed by Martin Robinson.

* gtk/jhbuild-optional.modules: Add pango.

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

5 years agoExpose the "Share" menu for links, images, and media.
beidson@apple.com [Wed, 8 Apr 2015 23:11:38 +0000 (23:11 +0000)]
Expose the "Share" menu for links, images, and media.
<rdar://problem/20435340> and https://bugs.webkit.org/show_bug.cgi?id=143502

Reviewed by Tim Horton.

Source/WebCore:

* loader/EmptyClients.h:
* page/ContextMenuClient.h:
(WebCore::ContextMenuClient::shareSelectedTextMenuItem): Deleted.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
(WebCore::selectionContainsPossibleWord): Deleted.
* page/ContextMenuController.h:
(WebCore::ContextMenuController::page):

* platform/ContextMenuItem.cpp:
(WebCore::ContextMenuItem::ContextMenuItem):
(WebCore::ContextMenuItem::isNull):
(WebCore::ContextMenuItem::shareMenuItem):
(WebCore::ContextMenuItem::supportsShareMenu): Deleted.
(WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.
* platform/ContextMenuItem.h:

* platform/gtk/ContextMenuItemGtk.cpp:
(WebCore::ContextMenuItem::shareMenuItem): Return a null item.
(WebCore::ContextMenuItem::supportsShareMenu): Deleted.
(WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.

* platform/mac/ContextMenuItemMac.mm:
(WebCore::ContextMenuItem::shareMenuItem): Create a full-featured Share menu item instead of just for selected text.
(WebCore::ContextMenuItem::supportsShareMenu): Deleted.
(WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::selectedText): Instead of calculating selected text outside the HitTestResult, let the
  HitTestResult do what it does best: Calculate things!
* rendering/HitTestResult.h:

Source/WebKit/mac:

* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::shareMenuItem):

Source/WebKit/win:

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::shareMenuItem):
* WebCoreSupport/WebContextMenuClient.h:

Source/WebKit2:

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):

* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
* Shared/WebHitTestResult.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):

* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::shareMenuItem):
* WebProcess/WebCoreSupport/WebContextMenuClient.h:

* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::shareSelectedTextMenuItem): Deleted.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):

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

5 years agoAdd encoding and decoding of ints to WKRemoteObjectCoder
andersca@apple.com [Wed, 8 Apr 2015 22:47:26 +0000 (22:47 +0000)]
Add encoding and decoding of ints to WKRemoteObjectCoder
https://bugs.webkit.org/show_bug.cgi?id=143538

Reviewed by Tim Horton.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder encodeInt:forKey:]):
(-[WKRemoteObjectDecoder decodeIntForKey:]):

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

5 years ago[Curl] Compile error in CurlCacheEntry::parseResponseHeaders method.
peavo@outlook.com [Wed, 8 Apr 2015 22:21:30 +0000 (22:21 +0000)]
[Curl] Compile error in CurlCacheEntry::parseResponseHeaders method.
https://bugs.webkit.org/show_bug.cgi?id=143531

Reviewed by Alex Christensen.

Cache related methods in ResourceResponse have changed return type.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::parseResponseHeaders):

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

5 years agoRemove ApplicationCacheGroup::m_isCopy
andersca@apple.com [Wed, 8 Apr 2015 21:25:41 +0000 (21:25 +0000)]
Remove ApplicationCacheGroup::m_isCopy
https://bugs.webkit.org/show_bug.cgi?id=143536

Reviewed by Tim Horton.

Code that used to set m_isCopy to true is long gone.

* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::~ApplicationCache):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
(WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
* loader/appcache/ApplicationCacheGroup.h:
(WebCore::ApplicationCacheGroup::isCopy): Deleted.

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

5 years ago[GTK] Unreviewed, update more test expectations
mcatanzaro@igalia.com [Wed, 8 Apr 2015 21:17:50 +0000 (21:17 +0000)]
[GTK] Unreviewed, update more test expectations

Remove some expected failures from tests that are passing. Also, copypaste some
expectations to more appropriate locations in the expectations file.

* platform/gtk/TestExpectations:

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

5 years agoUnreviewed fix after r182496 for when the cached runs JSON doesn't exist.
rniwa@webkit.org [Wed, 8 Apr 2015 21:16:06 +0000 (21:16 +0000)]
Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.

* public/v2/app.js:
(App.Pane._fetch):
(App.Pane.refetchRuns):

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

5 years agoJSArray::sortNumeric should handle ArrayWithUndecided
fpizlo@apple.com [Wed, 8 Apr 2015 21:14:09 +0000 (21:14 +0000)]
JSArray::sortNumeric should handle ArrayWithUndecided
https://bugs.webkit.org/show_bug.cgi?id=143535

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

ArrayWithUndecided is what you get if you haven't stored anything into the array yet. We need to handle it.

* runtime/JSArray.cpp:
(JSC::JSArray::sortNumeric):
* tests/stress/sort-array-with-undecided.js: Added.

LayoutTests:

Upload the original test that first spotted this. Shortened it a bit so that it runs fast enough.

* js/regress/script-tests/sorting-benchmark.js: Added.
(log):
(bottom_up_merge_sort):
(aMinusB):
(verify):
(benchmark):
(makeArrays):
* js/regress/sorting-benchmark-expected.txt: Added.
* js/regress/sorting-benchmark.html: Added.

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

5 years ago[XvfbDriver] Regular expression used to match running X servers fails on Fedora 22.
clopez@igalia.com [Wed, 8 Apr 2015 21:12:44 +0000 (21:12 +0000)]
[XvfbDriver] Regular expression used to match running X servers fails on Fedora 22.
https://bugs.webkit.org/show_bug.cgi?id=143530

Reviewed by Žan Doberšek.

Assume that the default value for display (:0) is reserved and start checking on :1
Adjust webkitpy test and include two new test cases for this bug (display number not specified)
and for X server named Xorg.bin (previous bug 1376599)

* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._next_free_display)
* Scripts/webkitpy/port/xvfbdriver_unittest.py:
(XvfbDriverTest.test_start_no_pixel_tests):
(XvfbDriverTest.test_start_pixel_tests):
(XvfbDriverTest.test_start_arbitrary_worker_number):
(XvfbDriverTest.test_next_free_display):
(XvfbDriverTest.test_start_next_worker):

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

5 years agoDelete ApplicationCache static member functions
andersca@apple.com [Wed, 8 Apr 2015 21:00:19 +0000 (21:00 +0000)]
Delete ApplicationCache static member functions
https://bugs.webkit.org/show_bug.cgi?id=143534

Reviewed by Tim Horton.

Source/WebCore:

* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::deleteCacheForOrigin): Deleted.
(WebCore::ApplicationCache::deleteAllCaches): Deleted.
(WebCore::ApplicationCache::diskUsageForOrigin): Deleted.
* loader/appcache/ApplicationCache.h:

Source/WebKit2:

* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
(WebKit::WebApplicationCacheManager::deleteAllEntries):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCacheForOrigin):
(WebKit::InjectedBundle::appCacheUsageForOrigin):

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

5 years agoBlock popups from content extensions.
achristensen@apple.com [Wed, 8 Apr 2015 20:26:41 +0000 (20:26 +0000)]
Block popups from content extensions.
https://bugs.webkit.org/show_bug.cgi?id=143497

Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/contentextensions/popups.html

* loader/ResourceLoadInfo.cpp:
(WebCore::readResourceType):
* loader/ResourceLoadInfo.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::open):
* page/UserContentController.cpp:
(WebCore::UserContentController::actionsForResourceLoad):
* page/UserContentController.h:
Check content extensions before opening a window.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
Added popup test.

LayoutTests:

* http/tests/contentextensions/popups-expected.txt: Added.
* http/tests/contentextensions/popups.html: Added.
* http/tests/contentextensions/popups.html.json: Added.

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

5 years agoUnreviewed, revert accidental commit.
fpizlo@apple.com [Wed, 8 Apr 2015 20:24:40 +0000 (20:24 +0000)]
Unreviewed, revert accidental commit.

* Makefile.shared:

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

5 years agoDFG::IntegerCheckCombiningPhase's wrap-around check shouldn't trigger C++ undef behav...
fpizlo@apple.com [Wed, 8 Apr 2015 20:22:53 +0000 (20:22 +0000)]
DFG::IntegerCheckCombiningPhase's wrap-around check shouldn't trigger C++ undef behavior on wrap-around
https://bugs.webkit.org/show_bug.cgi?id=143532

Reviewed by Gavin Barraclough.

Oh the irony!  We were protecting an optimization that only worked if there was no wrap-around in JavaScript.
But the C++ code had wrap-around, which is undef in C++.  So, if the compiler was smart enough, our compiler
would think that there never was wrap-around.

This fixes a failure in stress/tricky-array-boiunds-checks.js when JSC is compiled with bleeding-edge clang.

* dfg/DFGIntegerCheckCombiningPhase.cpp:
(JSC::DFG::IntegerCheckCombiningPhase::isValid):

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

5 years ago[GTK] Unreviewed test expectation sanity-check
mcatanzaro@igalia.com [Wed, 8 Apr 2015 20:09:59 +0000 (20:09 +0000)]
[GTK] Unreviewed test expectation sanity-check

Remove duplicate expectation, and some expectations for tests that no longer exist.

* platform/gtk/TestExpectations:

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

5 years ago[CSS Shapes] Properly handle negative reference box widths and center coordinates
bjonesbe@adobe.com [Wed, 8 Apr 2015 19:40:43 +0000 (19:40 +0000)]
[CSS Shapes] Properly handle negative reference box widths and center coordinates
https://bugs.webkit.org/show_bug.cgi?id=142610

Reviewed by Rob Buis.
Source/WebCore:

Fix a few cases where values that should not be negative end up that
way.

This patch is based on a couple of Blink patches by Rob Buis.

Tests: fast/shapes/shape-outside-floats/shape-outside-floats-circle-negative-radius-crash.html
       fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-negative-width-crash.html

* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine): A
    negative margin box width means that the shape has no extent, so
    clamp to zero.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeCircle::floatValueForRadiusInBox): When computing
    the radii, take the absolute value, since the radii is based on
    the distance, which is always positive.
(WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Ditto.

LayoutTests:

Tests for the cases that trigger asserts.

* fast/shapes/shape-outside-floats/shape-outside-floats-circle-negative-radius-crash-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-circle-negative-radius-crash.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-negative-width-crash-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-negative-width-crash.html: Added.

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

5 years agoAdd a WebApplicationCache::storage() and use it instead of the WebCore singleton
andersca@apple.com [Wed, 8 Apr 2015 19:28:34 +0000 (19:28 +0000)]
Add a WebApplicationCache::storage() and use it instead of the WebCore singleton
https://bugs.webkit.org/show_bug.cgi?id=143525

Reviewed by Antti Koivisto.

* WebApplicationCache.cpp:
(WebApplicationCache::storage):
(WebApplicationCache::maximumSize):
(WebApplicationCache::setMaximumSize):
(WebApplicationCache::defaultOriginQuota):
(WebApplicationCache::setDefaultOriginQuota):
(WebApplicationCache::diskUsageForOrigin):
(WebApplicationCache::deleteAllApplicationCaches):
(WebApplicationCache::deleteCacheForOrigin):
(WebApplicationCache::originsWithCache):
* WebApplicationCache.h:

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

5 years agoUnreviewed, rolling out r182522.
commit-queue@webkit.org [Wed, 8 Apr 2015 18:44:58 +0000 (18:44 +0000)]
Unreviewed, rolling out r182522.
https://bugs.webkit.org/show_bug.cgi?id=143529

Not needed any more (Requested by ap on #webkit).

Reverted changeset:

"Fix the build."
http://trac.webkit.org/changeset/182522

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

5 years ago32-bit build fix after r182554.
enrica@apple.com [Wed, 8 Apr 2015 18:30:47 +0000 (18:30 +0000)]
32-bit build fix after r182554.

* UIProcess/API/mac/WKView.mm:
(-[WKView resignFirstResponder]):

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

5 years agoForce events should not require preventDefault in order to fire
bdakin@apple.com [Wed, 8 Apr 2015 18:25:25 +0000 (18:25 +0000)]
Force events should not require preventDefault in order to fire
https://bugs.webkit.org/show_bug.cgi?id=143503
-and corresponding-
rdar://problem/20458916

Reviewed by Tim Horton.

Source/WebCore:

Since these events will fire whether or not preventDefault was set on the
willBegin event, we should make sure we only send them when there are registered
event listeners. These are new events, so we don’t want to spam the vast majority
of web content that doesn’t use them yet.
* dom/Document.cpp:
(WebCore::Document::addListenerTypeIfNeeded):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::dispatchMouseForceWillBegin):
(WebCore::Element::dispatchMouseForceChanged):
(WebCore::Element::dispatchMouseForceDown):
(WebCore::Element::dispatchMouseForceUp):
(WebCore::Element::dispatchMouseForceClick):
(WebCore::Element::dispatchMouseForceCancelled):

Source/WebKit2:

We no longer need m_lastActionMenuHitTestPreventsDefault since we’ll always
dispatch the events to Element.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::inputDeviceForceDidChange):
(WebKit::WebPage::immediateActionDidCancel):

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

5 years ago[Mac][WebAudio] Update the AVAudioMix in the AudioSourceProviderAVFObjC when the...
jer.noble@apple.com [Wed, 8 Apr 2015 18:12:56 +0000 (18:12 +0000)]
[Mac][WebAudio] Update the AVAudioMix in the AudioSourceProviderAVFObjC when the list of enabled audio tracks change.
https://bugs.webkit.org/show_bug.cgi?id=143332

Reviewed by Eric Carlson.

Some media assets (notably, mp3s) will not have an enabled audio track when the AVAsset is
first loaded, so the AVAudioMix will have no trackID in it's parameters. Whenever the list
of enabled tracks change, recreate the AVAudioMix with the new first enabled audio trackID.

To facilitate this, add a new setter to AudioSourceProviderAVFObjC taking an AVAssetTrack to
use with the AVAudioMix. Whenever this parameter changes, the AVAudioMix is destroyed and
recreated.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Drive-by fix: when the media
    player switches engines, re-associate the audio source node with its provider.
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::setPlayerItem): Only create the mix if there is a valid AVPlayerItem and AVAssetTrack
(WebCore::AudioSourceProviderAVFObjC::setAudioTrack): Ditto.
(WebCore::AudioSourceProviderAVFObjC::createMix): Don't iterate over the AVPlayerItem's tracks,
    just use the one passed in through setAudioTrack().
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Clear the provider's track.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Set the provider's track.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider): Ditto.

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

5 years agoCalling makeFirstResponder on WKWebView doesn't work.
enrica@apple.com [Wed, 8 Apr 2015 18:06:58 +0000 (18:06 +0000)]
Calling makeFirstResponder on WKWebView doesn't work.
https://bugs.webkit.org/show_bug.cgi?id=143482
rdar://problem/20298166

Reviewed by Dan Bernstein.

Adding forwarding of the responder status to the WKView.
We also need to avoid doing any cleanup in resignFirstResponder
if we know we are about to regain responder status again.
Same goes for becomeFirstResponder.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView becomeFirstResponder]):
(-[WKWebView acceptsFirstResponder]):
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFristResponder]):
(-[WKView resignFirstResponder]):

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

5 years agoMove some ApplicationCache static member functions to ApplicationCacheStorage
andersca@apple.com [Wed, 8 Apr 2015 17:52:15 +0000 (17:52 +0000)]
Move some ApplicationCache static member functions to ApplicationCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=143524

Reviewed by Antti Koivisto.

Source/WebCore:

This is yet another step towards eliminating ApplicationCacheStorage::singleton() and making the storage be per page instead.

* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::deleteCacheForOrigin):
(WebCore::ApplicationCache::deleteAllCaches):
(WebCore::ApplicationCache::diskUsageForOrigin):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::deleteAllCaches):
(WebCore::ApplicationCacheStorage::deleteCacheForOrigin):
(WebCore::ApplicationCacheStorage::diskUsageForOrigin):
* loader/appcache/ApplicationCacheStorage.h:

Source/WebKit/mac:

* WebCoreSupport/WebApplicationCache.mm:
(+[WebApplicationCache diskUsageForOrigin:]):
(+[WebApplicationCache deleteAllApplicationCaches]):
(+[WebApplicationCache deleteCacheForOrigin:]):

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 8 Apr 2015 17:27:33 +0000 (17:27 +0000)]
Versioning.

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

5 years agoFill list style background with same color with that of list background.
changseok.oh@collabora.com [Wed, 8 Apr 2015 17:14:07 +0000 (17:14 +0000)]
Fill list style background with same color with that of list background.
https://bugs.webkit.org/show_bug.cgi?id=143483

Reviewed by Simon Fraser.

Source/WebCore:

LayoutListMarker does not have a node so its selectionBackgroundColor alway returns
the default theme color for selection. We can make it more natural by filling
the same color with that of LayoutListItem into it.

Tests: fast/backgrounds/selection-background-color-of-image-list-style.html
       fast/backgrounds/selection-background-color-of-list-style.html

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):

LayoutTests:

* fast/backgrounds/selection-background-color-of-image-list-style.html: Added.
* fast/backgrounds/selection-background-color-of-list-style.html: Added.
* platform/gtk/fast/backgrounds/selection-background-color-of-image-list-style-expected.png: Added.
* platform/gtk/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt: Added.
* platform/gtk/fast/backgrounds/selection-background-color-of-list-style-expected.png: Added.
* platform/gtk/fast/backgrounds/selection-background-color-of-list-style-expected.txt: Added.
* platform/mac/fast/backgrounds/selection-background-color-of-image-list-style-expected.png: Added.
* platform/mac/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt: Added.
* platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.png: Added.
* platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.txt: Added.

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

5 years agoAdd CMake build system for WinCairo port.
achristensen@apple.com [Wed, 8 Apr 2015 16:47:56 +0000 (16:47 +0000)]
Add CMake build system for WinCairo port.
https://bugs.webkit.org/show_bug.cgi?id=115944

Patch by Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer <paroga@webkit.org> on 2015-04-08
Reviewed by Chris Dumez.

.:

* Source/cmake/OptionsWindows.cmake:
* Source/cmake/WebKitMacros.cmake:
Make ADD_PRECOMPILED_HEADER more like http://stackoverflow.com/questions/148570/using-pre-compiled-headers-with-cmake

Source/WebCore:

* CMakeLists.txt:
* PlatformWin.cmake:
* PlatformWinCairo.cmake:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::TextureMapperGL):

Source/WebKit:

* CMakeLists.txt:

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/PlatformWin.cmake:

Tools:

* CMakeLists.txt:
* WinLauncher/CMakeLists.txt: Added.

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

5 years agoRename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for clarity
cdumez@apple.com [Wed, 8 Apr 2015 16:45:01 +0000 (16:45 +0000)]
Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for clarity
https://bugs.webkit.org/show_bug.cgi?id=143513

Reviewed by Andreas Kling.

Source/WebCore:

Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for
clarity as it is only used for the page cache. Also rename the
'DocumentWillBecomeInactive' value of the ReasonForSuspension enum to
'PageCache' as it is only used by CachedFrame for the page cache and it
is a lot more understandable.

Source/WebKit/mac:

Update ScriptExecutionContext::canSuspendActiveDOMObjects() to
canSuspendActiveDOMObjectsForPageCache() as the method was renamed.

* WebView/WebFrame.mm:
(-[WebFrame _cacheabilityDictionary]):

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

5 years agoUnreviewed, rolling out r182536.
commit-queue@webkit.org [Wed, 8 Apr 2015 16:25:54 +0000 (16:25 +0000)]
Unreviewed, rolling out r182536.
https://bugs.webkit.org/show_bug.cgi?id=143523

Made accessibility/table-sections.html time out on debug bots
(Requested by ap on #webkit).

Reverted changeset:

"Simple line layout: Add <br> support."
https://bugs.webkit.org/show_bug.cgi?id=139012
http://trac.webkit.org/changeset/182536

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

5 years agoGet rid of uses of ApplicationCacheStorage::singleton() from WebKitLegacy
andersca@apple.com [Wed, 8 Apr 2015 16:10:56 +0000 (16:10 +0000)]
Get rid of uses of ApplicationCacheStorage::singleton() from WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=143504

Reviewed by Sam Weinig.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:
Add WebApplicationCacheInternal.h.

Source/WebKit/mac:

Add a webApplicationCacheStorage() function and use it throughout WebKitLegacy.
In the future, webApplicationCacheStorage will return a custom singleton, but for now
it just returns ApplicationCacheStorage::singleton().

* Misc/WebCache.mm:
(+[WebCache empty]):
* WebCoreSupport/WebApplicationCache.mm:
(+[WebApplicationCache maximumSize]):
(+[WebApplicationCache setMaximumSize:]):
(+[WebApplicationCache defaultOriginQuota]):
(+[WebApplicationCache setDefaultOriginQuota:]):
(+[WebApplicationCache originsWithCache]):
(webApplicationCacheStorage):
* WebCoreSupport/WebApplicationCacheInternal.h: Added.
* WebCoreSupport/WebApplicationCacheQuotaManager.mm:
(-[WebApplicationCacheQuotaManager usage]):
(-[WebApplicationCacheQuotaManager quota]):
(-[WebApplicationCacheQuotaManager setQuota:]):
* WebView/WebView.mm:
(WebKitInitializeApplicationCachePathIfNecessary):

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

5 years ago[GTK] Crash in DOMObjectCache when a wrapped object owned by the cache is unreffed...
carlosgc@webkit.org [Wed, 8 Apr 2015 15:29:25 +0000 (15:29 +0000)]
[GTK] Crash in DOMObjectCache when a wrapped object owned by the cache is unreffed by the user
https://bugs.webkit.org/show_bug.cgi?id=143521

Reviewed by Martin Robinson.

This is a case we claim to support, but it only works if the
object has only one reference. In that case, when the user unrefs
it, the weak ref notify callback removes the object from the
cache. However, if the object has more than one ref, the cache
doesn't know the user unreffed it, and when clearing the cache we
try to remove more references than what the object actually has,
causing a crash in g_object_unref.

* bindings/gobject/DOMObjectCache.cpp:
(WebKit::DOMObjectCacheData::clearObject):

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

5 years agoSimple line layout: Add <br> support.
zalan@apple.com [Wed, 8 Apr 2015 15:11:56 +0000 (15:11 +0000)]
Simple line layout: Add <br> support.
https://bugs.webkit.org/show_bug.cgi?id=139012

This patch enables RenderBlockFlows to use simple line layout on text content when <br> is present.
Simple text with <br> is a fairly common pattern on discussion(forum)-like web pages. This patch reduces memory usage
and speeds up layout for such content.

Source/WebCore:

PerformanceTest/layout/line-layout-simple.html shows more than 2x speedup, when each paragraph is modified by appending <br> to the end.
With <br> support enabled:
  mean: 70.02391461289068 runs/s
  median: 70.47986488932318 runs/s

While with <br> support disabled:
  mean: 30.417295049468184 runs/s
  median: 30.36517778760357 runs/s

Reviewed by Antti Koivisto.

Test: fast/text/simple-line-with-br.html

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::setSelectionState):
(WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
* rendering/RenderBlockFlow.h:
* rendering/RenderLineBreak.cpp:
(WebCore::simpleLineLayout):
(WebCore::ensureLineBoxes):
(WebCore::RenderLineBreak::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderLineBreak::positionForPoint):
(WebCore::RenderLineBreak::setSelectionState):
(WebCore::RenderLineBreak::linesBoundingBox):
(WebCore::RenderLineBreak::absoluteRects):
(WebCore::RenderLineBreak::absoluteQuads):
(WebCore::RenderLineBreak::collectSelectionRects):
* rendering/RenderLineBreak.h:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::consumeLineBreakIfNeeded):
(WebCore::SimpleLineLayout::skipWhitespaceIfNeeded):
(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::forceFragmentToLine):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::initializeSegments):
(WebCore::SimpleLineLayout::FlowContents::segmentForRenderer): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::hitTestFlow):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
(WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode):
(WebCore::SimpleLineLayout::RunResolver::Iterator::operator--):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::EndOfSegmentSetter::EndOfSegmentSetter):
(WebCore::SimpleLineLayout::EndOfSegmentSetter::~EndOfSegmentSetter):
(WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isLastInRenderer):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isEmpty):
(WebCore::SimpleLineLayout::TextFragmentIterator::isSoftLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::isHardLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak): Deleted.

LayoutTests:

Test output changes in 2 different ways:
1. Repositioned RenderLineBreak elements. (1px wide <br> is the result of integral pixel snapping)
2. Removed empty content (<br>).

Reviewed by Antti Koivisto.

* fast/text/simple-line-with-br-expected.html: Added.
* fast/text/simple-line-with-br.html: Added.
* platform/mac-mavericks/fast/parser/open-comment-in-textarea-expected.txt:
* platform/mac-mavericks/http/tests/navigation/javascriptlink-frames-expected.txt:
* platform/mac/fast/css/text-overflow-ellipsis-bidi-expected.txt:
* platform/mac/fast/dom/focus-contenteditable-expected.txt:
* platform/mac/fast/forms/range/slider-padding-expected.txt: Added.
* platform/mac/fast/forms/textarea-scroll-height-expected.txt:
* platform/mac/fast/parser/open-comment-in-textarea-expected.txt:
* platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/mac/fast/text/svg-font-face-with-kerning-expected.txt: Added.
* platform/mac/http/tests/navigation/javascriptlink-frames-expected.txt:
* platform/mac/http/tests/navigation/postredirect-basic-expected.txt:
* platform/mac/http/tests/navigation/postredirect-goback1-expected.txt:
* platform/mac/printing/single-line-must-not-be-split-into-two-pages-expected.txt:
* platform/mac/svg/wicd/test-rightsizing-b-expected.txt:
* platform/mac/tables/mozilla/bugs/bug106795-expected.txt:
* platform/mac/tables/mozilla/bugs/bug1224-expected.txt:
* platform/mac/tables/mozilla/bugs/bug131020-expected.txt:
* platform/mac/tables/mozilla/bugs/bug131020_iframe-expected.txt:
* platform/mac/tables/mozilla/bugs/bug1430-expected.txt:
* platform/mac/tables/mozilla/bugs/bug16252-expected.txt:
* platform/mac/tables/mozilla/bugs/bug19599-expected.txt:
* platform/mac/tables/mozilla/bugs/bug20579-expected.txt:
* platform/mac/tables/mozilla/bugs/bug32205-3-expected.txt:
* platform/mac/tables/mozilla/bugs/bug82946-2-expected.txt:
* platform/mac/tables/mozilla/bugs/bug92143-expected.txt:
* platform/mac/tables/mozilla/marvin/tables_cellpadding-expected.txt:
* platform/mac/tables/mozilla/marvin/tables_cellspacing-expected.txt:
* platform/mac/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug1262-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
* platform/mac/tables/mozilla_expected_failures/other/test4-expected.txt:

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

5 years agoLazily initialize LogToSystemConsole flag to reduce memory usage
msaboff@apple.com [Wed, 8 Apr 2015 14:03:26 +0000 (14:03 +0000)]
Lazily initialize LogToSystemConsole flag to reduce memory usage
https://bugs.webkit.org/show_bug.cgi?id=143506

Reviewed by Mark Lam.

Only call into CF preferences code when we need to in order to reduce memory usage.

* inspector/JSGlobalObjectConsoleClient.cpp:
(Inspector::JSGlobalObjectConsoleClient::logToSystemConsole):
(Inspector::JSGlobalObjectConsoleClient::setLogToSystemConsole):
(Inspector::JSGlobalObjectConsoleClient::initializeLogToSystemConsole):
(Inspector::JSGlobalObjectConsoleClient::JSGlobalObjectConsoleClient):

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

5 years ago[GStreamer] compress property for the HTTP source element
philn@webkit.org [Wed, 8 Apr 2015 10:32:24 +0000 (10:32 +0000)]
[GStreamer] compress property for the HTTP source element
https://bugs.webkit.org/show_bug.cgi?id=143518

Reviewed by Carlos Garcia Campos.

Added a compress property so the default behavior or not
requesting content encoded to the server can be overridden if
needed. This is useful for adaptive streaming playback.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStart):

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

5 years agoRemove CSS functions min() and max() which had been dropped from specification
commit-queue@webkit.org [Wed, 8 Apr 2015 07:44:50 +0000 (07:44 +0000)]
Remove CSS functions min() and max() which had been dropped from specification
https://bugs.webkit.org/show_bug.cgi?id=143440

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-04-08
Reviewed by Darin Adler.

No new tests, No Behavior changes.

* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::create):
* css/CSSParser.cpp:
(WebCore::CSSParser::isCalculation):

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