WebKit-https.git
5 years agoRemove isWK2 cruft from webkitdirs.pm after r170426
ossy@webkit.org [Thu, 12 Mar 2015 19:13:49 +0000 (19:13 +0000)]
Remove isWK2 cruft from webkitdirs.pm after r170426
https://bugs.webkit.org/show_bug.cgi?id=142618

Reviewed by Daniel Bates.

* Scripts/webkitdirs.pm:
(isWK2): Deleted.

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

5 years agotestRunner.setAlwaysAcceptCookies does not work with NetworkProcess
ap@apple.com [Thu, 12 Mar 2015 18:38:11 +0000 (18:38 +0000)]
testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=138687

Source/WebKit2:

Reviewed by Carlos Garcia Campos.

* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Don't change system-wide
cookie accept policy when in testing mode. Also, update the policy in WebProcesses too,
as we still do some networking there.

* UIProcess/WebProcessPool.h:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetAlwaysAcceptCookies): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setAlwaysAcceptCookies): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
Remove WKBundleSetAlwaysAcceptCookies SPI, as WKTR now uses an API in UI process.

Tools:

Reviewed by Carlos Garcia Campos.

Always change cookie policy from UI process, as changing it from WebProcess doesn't
affect other processes.

The implementation is imperfect, because the change happens asynchronously, but I
don't expect it to be a problem in practice.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setAlwaysAcceptCookies):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Unreviewed (only code changes were reviewed).

* platform/gtk/TestExpectations:
* platform/mac-wk2/TestExpectations:
Unskip tests that used to be affected.

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

5 years agoWKErrorDomain should be declared nonnull
andersca@apple.com [Thu, 12 Mar 2015 17:46:30 +0000 (17:46 +0000)]
WKErrorDomain should be declared nonnull
https://bugs.webkit.org/show_bug.cgi?id=142628

Reviewed by Antti Koivisto.

Add WK_ASSUME_NONNULL_BEGIN and WK_ASSUME_NONNULL_END so everything will be implicitly nonnull.

* UIProcess/API/Cocoa/WKError.h:

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

5 years agoPDFs don't snapshot properly in iOS Safari
commit-queue@webkit.org [Thu, 12 Mar 2015 17:27:26 +0000 (17:27 +0000)]
PDFs don't snapshot properly in iOS Safari
https://bugs.webkit.org/show_bug.cgi?id=142623

Patch by Ian Henderson <ian@ianhenderson.org> on 2015-03-12
Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
If we have a _customContentView, use UIView snapshotting instead of
trying to snapshot the web page.

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

5 years ago[Mac] Update AirPlay handling
eric.carlson@apple.com [Thu, 12 Mar 2015 17:18:31 +0000 (17:18 +0000)]
[Mac] Update AirPlay handling
https://bugs.webkit.org/show_bug.cgi?id=142541

Source/WebCore:

Unreviewed, respond to post-review comments.

* dom/Document.cpp:
(WebCore::Document::didChoosePlaybackTarget):
* page/ChromeClient.h:
* page/Page.cpp:
(WebCore::Page::showPlaybackTargetPicker):
(WebCore::Page::didChoosePlaybackTarget):
(WebCore::Page::configurePlaybackTargetMonitoring):

Source/WebKit2:

Unreviewed, respond to post-review comments and add previously reviewed changes
missed by a bungled merge.

* Shared/mac/WebCoreArgumentCodersMac.mm:
* UIProcess/WebMediaPlaybackTargetPickerProxy.cpp:
(WebKit::WebMediaPlaybackTargetPickerProxy::~WebMediaPlaybackTargetPickerProxy):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPlaybackTargetPicker):
* UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Added.
* UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/com.apple.WebProcess.sb.in:

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

5 years agoClean up after JoePeck.
simon.fraser@apple.com [Thu, 12 Mar 2015 17:02:47 +0000 (17:02 +0000)]
Clean up after JoePeck.

* http/tests/security/contentSecurityPolicy/injected-inline-style-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt:

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

5 years ago[EFL] Enable building EFL 1.13 with NEON support
ossy@webkit.org [Thu, 12 Mar 2015 16:55:13 +0000 (16:55 +0000)]
[EFL] Enable building EFL 1.13 with NEON support
https://bugs.webkit.org/show_bug.cgi?id=142619

Reviewed by Gyuyoung Kim.

* efl/jhbuild.modules:

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

5 years agoFix the !ENABLE(PICTURE_SIZES) build
ossy@webkit.org [Thu, 12 Mar 2015 16:40:15 +0000 (16:40 +0000)]
Fix the !ENABLE(PICTURE_SIZES) build
https://bugs.webkit.org/show_bug.cgi?id=142617

Reviewed by Darin Adler.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):

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

5 years agoUnreviewed EFL gardening on 13th Mar.
commit-queue@webkit.org [Thu, 12 Mar 2015 16:10:30 +0000 (16:10 +0000)]
Unreviewed EFL gardening on 13th Mar.
https://bugs.webkit.org/show_bug.cgi?id=142624

Rebaseline the missing test result.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-03-12

* platform/efl/TestExpectations:
* platform/efl/editing/inserting/before-after-input-element-expected.png: Added.
* platform/efl/editing/inserting/before-after-input-element-expected.txt: Added.
* platform/efl/fast/css/css2-system-fonts-expected.txt: Added.
* platform/efl/fast/text/tatechuyoko-expected.png: Added.
* platform/efl/fast/text/tatechuyoko-expected.txt: Added.

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

5 years agoWeb Inspector: Console Errors during provisional document loads get lost with "Clear...
commit-queue@webkit.org [Thu, 12 Mar 2015 16:10:00 +0000 (16:10 +0000)]
Web Inspector: Console Errors during provisional document loads get lost with "Clear Log on Reload"
https://bugs.webkit.org/show_bug.cgi?id=142603

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

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._provisionalLoadStarted):
Detect a provisional load has started to start save messages that come in at this time.

(WebInspector.LogContentView.prototype._sessionStarted):
Reappend provisional load messages if we auto-cleared.

(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
(WebInspector.LogContentView.prototype._clearProvisionalState):
Helpers for dealing with the provisional loading state.

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

5 years ago[ARM][Linux] GC sometimes stuck in an infinite loop if parallel GC is enabled
ossy@webkit.org [Thu, 12 Mar 2015 14:50:21 +0000 (14:50 +0000)]
[ARM][Linux] GC sometimes stuck in an infinite loop if parallel GC is enabled
https://bugs.webkit.org/show_bug.cgi?id=141290

Reviewed by Carlos Garcia Campos.

* wtf/Platform.h: Enable parallel GC after r181319.

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

5 years ago[cmake] Fix the incremental build issue revealed by r181419
ossy@webkit.org [Thu, 12 Mar 2015 10:27:45 +0000 (10:27 +0000)]
[cmake] Fix the incremental build issue revealed by r181419
https://bugs.webkit.org/show_bug.cgi?id=142613

Reviewed by Carlos Garcia Campos.

* CMakeLists.txt:

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

5 years agoUnreviewed follow-up fix to r181426. Initialize TextPosition with zeros in case it...
joepeck@webkit.org [Thu, 12 Mar 2015 06:37:53 +0000 (06:37 +0000)]
Unreviewed follow-up fix to r181426. Initialize TextPosition with zeros in case it gets used.

Address ASSERT in LayoutTests/printing/page-format-data.html.

* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
In case the TextPosition gets used because it wasn't created by a parser,
zeros are more realistic values then beforeFirst.

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

5 years agoMedia element time no longer updates while scrubbing following r181279.
roger_fong@apple.com [Thu, 12 Mar 2015 05:00:59 +0000 (05:00 +0000)]
Media element time no longer updates while scrubbing following r181279.
https://bugs.webkit.org/show_bug.cgi?id=142606.
<rdar://problem/20131014>

Reviewed by Eric Carlson.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleWrapperMouseMove):
Update time as a result of a mouse move if we are scrubbing.

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

5 years ago[Win] Update test expectations after r181408.
bfulgham@apple.com [Thu, 12 Mar 2015 04:53:11 +0000 (04:53 +0000)]
[Win] Update test expectations after r181408.

Also update with more debug assertions.

* platform/win/TestExpectations:
* platform/win/fast/forms/input-auto-fill-button-expected.txt: Added.

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

5 years agoWeb Inspector: CSS parser errors in the console should include column numbers
joepeck@webkit.org [Thu, 12 Mar 2015 04:49:05 +0000 (04:49 +0000)]
Web Inspector: CSS parser errors in the console should include column numbers
https://bugs.webkit.org/show_bug.cgi?id=114313

Reviewed by Darin Adler.

Source/WebCore:

Test: inspector-protocol/console/warnings-errors.html

* css/CSSParser.h:
(WebCore::CSSParser::currentCharacterOffset):
Get the current character offset depending on the source type.
Add instance variables to track column position and start
line / column for inline stylesheets.

* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSheet):
Initialize new instance variables.

(WebCore::CSSParser::currentLocation):
Update to include column information for the token. Also, if we are on the
first line we may need to take into account a start column offset as well.

(WebCore::CSSParser::realLex):
Set the token's start column.
When bumping the line number, reset the column offset for the next
line with the next character.

(WebCore::CSSParser::syntaxError):
(WebCore::CSSParser::logError):
Include column information.

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseString):
(WebCore::StyleSheetContents::parseStringAtPosition):
Include column information.

* css/StyleSheetContents.h:
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
(WebCore::InlineStyleSheetOwner::createSheet):
Save and use column information later on.

* dom/InlineStyleSheetOwner.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::ensureSourceData):
Updated parser signature needs starting column and no longer has optional parameters.

Source/WebInspectorUI:

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
Column numbers in console messages are also 1 based and should be adjusted.

LayoutTests:

Test errors in both external and inline CSS and Scripts to ensure they have
expected line:column information.

* inspector-protocol/console/warnings-errors-expected.txt: Added.
* inspector-protocol/console/warnings-errors.html: Added.
* inspector-protocol/resources/errors.css: Added.
* inspector-protocol/resources/errors.js: Added.

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

5 years agoRename the Mavericks result for input-auto-fill-button.html to use the
simon.fraser@apple.com [Thu, 12 Mar 2015 03:27:23 +0000 (03:27 +0000)]
Rename the Mavericks result for input-auto-fill-button.html to use the
correct name.

* platform/mac-mavericks/fast/forms/input-auto-fill-button-expected.txt: Renamed from LayoutTests/platform/mac-mavericks/fast/forms/input-auto-fill-button.txt.

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

5 years agoCache traversal missing large entries
antti@apple.com [Thu, 12 Mar 2015 02:01:42 +0000 (02:01 +0000)]
Cache traversal missing large entries
https://bugs.webkit.org/show_bug.cgi?id=142601

Reviewed by Andreas Kling.

When traversing cache entries we only read the header data from disk. This didn't work
correctly for entries larger than the read size.

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

    Partial reads only receive one callback with 'done' set to true.
    Ensure we actually return data in this case.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::decodeEntryHeader):

    Add some logging.

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

5 years ago[Mac] Update AirPlay handling
eric.carlson@apple.com [Thu, 12 Mar 2015 01:54:06 +0000 (01:54 +0000)]
[Mac] Update AirPlay handling
https://bugs.webkit.org/show_bug.cgi?id=142541

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::showPlaybackTargetPicker):
(WebCore::Document::addPlaybackTargetPickerClient):
(WebCore::Document::removePlaybackTargetPickerClient):
(WebCore::Document::configurePlaybackTargetMonitoring):
(WebCore::Document::requiresPlaybackTargetRouteMonitoring):
(WebCore::Document::playbackTargetAvailabilityDidChange):
(WebCore::Document::didChoosePlaybackTarget):
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::unregisterWithDocument):
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::HTMLMediaSession):
(WebCore::HTMLMediaSession::registerWithDocument):
(WebCore::HTMLMediaSession::unregisterWithDocument):
(WebCore::HTMLMediaSession::showPlaybackTargetPicker):
(WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
(WebCore::HTMLMediaSession::didChoosePlaybackTarget):
(WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
(WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring):
* html/HTMLMediaSession.h:
* page/ChromeClient.h:
* page/Page.cpp:
(WebCore::Page::didChoosePlaybackTarget):
(WebCore::Page::playbackTargetAvailabilityDidChange):
(WebCore::Page::configurePlaybackTargetMonitoring):
* page/Page.h:
(WebCore::Page::hasWirelessPlaybackTarget):
(WebCore::Page::playbackTarget):
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::clientDataBufferingTimerFired):
(WebCore::MediaSession::wirelessRoutesAvailableDidChange): Deleted.
* platform/audio/MediaSession.h:
(WebCore::MediaSession::didChoosePlaybackTarget):
(WebCore::MediaSession::externalOutputDeviceAvailableDidChange):
(WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
(WebCore::MediaSessionClient::setWirelessPlaybackTarget):
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Deleted.
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
* platform/graphics/AVPlaybackTarget.h: Added.
(WebCore::AVPlaybackTarget::~AVPlaybackTarget):
(WebCore::AVPlaybackTarget::AVPlaybackTarget):
(WebCore::AVPlaybackTarget::setDevicePickerContext):
(WebCore::AVPlaybackTarget::devicePickerContext):
* platform/graphics/AVPlaybackTargetPickerClient.h: Added.
(WebCore::AVPlaybackTargetPickerClient::~AVPlaybackTargetPickerClient):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setWirelessPlaybackTarget):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):
* platform/graphics/avfoundation/AVPlaybackTargetMac.mm: Added.
(WebCore::AVPlaybackTarget::encode):
(WebCore::AVPlaybackTarget::decode):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless):
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType):
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

Source/WebKit2:

* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<AVPlaybackTarget>::encode):
(IPC::ArgumentCoder<AVPlaybackTarget>::decode):
* UIProcess/PageClient.h:
* UIProcess/WebAVPlaybackTargetPickerProxy.cpp: Added.
(WebKit::WebAVPlaybackTargetPickerProxy::WebAVPlaybackTargetPickerProxy):
(WebKit::WebAVPlaybackTargetPickerProxy::~WebAVPlaybackTargetPickerProxy):
(WebKit::WebAVPlaybackTargetPickerProxy::showPlaybackTargetPicker):
(WebKit::WebAVPlaybackTargetPickerProxy::startingMonitoringPlaybackTargets):
(WebKit::WebAVPlaybackTargetPickerProxy::stopMonitoringPlaybackTargets):
* UIProcess/WebAVPlaybackTargetPickerProxy.h: Added.
(WebKit::WebAVPlaybackTargetPickerProxy::Client::~Client):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::devicePickerProxy):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::startingMonitoringPlaybackTargets):
(WebKit::WebPageProxy::stopMonitoringPlaybackTargets):
(WebKit::WebPageProxy::didChoosePlaybackTarget):
(WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPlaybackTargetPicker):
* UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.h: Added.
* UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.mm: Added.
(WebKit::WebAVPlaybackTargetPickerProxyMac::create):
(WebKit::WebAVPlaybackTargetPickerProxyMac::WebAVPlaybackTargetPickerProxyMac):
(WebKit::WebAVPlaybackTargetPickerProxyMac::~WebAVPlaybackTargetPickerProxyMac):
(WebKit::WebAVPlaybackTargetPickerProxyMac::outputeDeviceAvailabilityChangedTimerFired):
(WebKit::WebAVPlaybackTargetPickerProxyMac::availableDevicesDidChange):
(WebKit::WebAVPlaybackTargetPickerProxyMac::devicePicker):
(WebKit::WebAVPlaybackTargetPickerProxyMac::showPlaybackTargetPicker):
(WebKit::WebAVPlaybackTargetPickerProxyMac::currentDeviceDidChange):
(WebKit::WebAVPlaybackTargetPickerProxyMac::startingMonitoringPlaybackTargets):
(WebKit::WebAVPlaybackTargetPickerProxyMac::stopMonitoringPlaybackTargets):
(-[WebAVOutputDevicePickerMenuControllerHelper initWithCallback:]):
(-[WebAVOutputDevicePickerMenuControllerHelper clearCallback]):
(-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebAVPlaybackTargetPicker.cpp: Added.
(WebKit::WebAVPlaybackTargetPicker::WebAVPlaybackTargetPicker):
(WebKit::WebAVPlaybackTargetPicker::showPlaybackDevicePicker):
(WebKit::WebAVPlaybackTargetPicker::configureWireLessTargetMonitoring):
(WebKit::WebAVPlaybackTargetPicker::addClient):
(WebKit::WebAVPlaybackTargetPicker::removeClient):
(WebKit::WebAVPlaybackTargetPicker::didChoosePlaybackTarget):
(WebKit::WebAVPlaybackTargetPicker::playbackTargetAvailabilityDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::showPlaybackTargetPicker):
(WebKit::WebChromeClient::startingMonitoringPlaybackTargets):
(WebKit::WebChromeClient::stopMonitoringPlaybackTargets):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected):
(WebKit::WebPage::playbackTargetAvailabilityDidChange):
* WebProcess/com.apple.WebProcess.sb.in:

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

5 years agoMark compositing/backgrounds/background-image-with-negative-zindex.html as
simon.fraser@apple.com [Thu, 12 Mar 2015 01:10:40 +0000 (01:10 +0000)]
Mark compositing/backgrounds/background-image-with-negative-zindex.html as
an image failure, since r179871 was rolled out.

* platform/mac/TestExpectations:

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

5 years ago[Content Extensions] Add resource type and load type triggers.
commit-queue@webkit.org [Thu, 12 Mar 2015 01:03:43 +0000 (01:03 +0000)]
[Content Extensions] Add resource type and load type triggers.
https://bugs.webkit.org/show_bug.cgi?id=142422

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-11
Reviewed by Benjamin Poulain.

Source/WebCore:

New API tests.

* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getTypeFlags):
(WebCore::ContentExtensions::loadTrigger):
* contentextensions/ContentExtensionRule.h:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): Deleted.
* contentextensions/ContentExtensionsBackend.h:
* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendConditionalAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
* contentextensions/DFABytecodeCompiler.h:
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
* loader/ResourceLoadInfo.cpp: Added.
(WebCore::toResourceType):
(WebCore::readResourceType):
(WebCore::readLoadType):
(WebCore::ResourceLoadInfo::isThirdParty):
(WebCore::ResourceLoadInfo::getResourceFlags):
* loader/ResourceLoadInfo.h: Added.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* page/UserContentController.cpp:
(WebCore::UserContentController::actionsForResourceLoad):
(WebCore::UserContentController::actionsForURL): Deleted.
* page/UserContentController.h:

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testRequest):
(TestWebKitAPI::mainDocumentRequest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::testURL): Deleted.

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

5 years agoFix the build.
timothy_horton@apple.com [Thu, 12 Mar 2015 00:38:04 +0000 (00:38 +0000)]
Fix the build.

* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromHitTestResult):
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
(WebCore::EventHandler::handleMousePressEventTripleClick):
(WebCore::EventHandler::handleMousePressEventSingleClick):

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

5 years ago"static" should not be a reserved keyword in non-strict mode even when ES6 class...
rniwa@webkit.org [Thu, 12 Mar 2015 00:35:28 +0000 (00:35 +0000)]
"static" should not be a reserved keyword in non-strict mode even when ES6 class is enabled
https://bugs.webkit.org/show_bug.cgi?id=142600

Reviewed by Mark Lam.

Make "static" RESERVED_IF_STRICT and manually detect it in parseClass.

No new tests. This is already checked by js/reserved-words.html and js/keywords-and-reserved_words.html

* parser/Keywords.table:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
* parser/ParserTokens.h:

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

5 years ago<attachment> shouldn't use "user-select: all"
timothy_horton@apple.com [Thu, 12 Mar 2015 00:33:07 +0000 (00:33 +0000)]
<attachment> shouldn't use "user-select: all"
https://bugs.webkit.org/show_bug.cgi?id=142453

Reviewed by Darin Adler.

It turns out that "user-select: all" is rife with bugs; in lieu of fixing them
all (at least for now), let's not use "user-select: all" in the default stylesheet
for <attachment>. It's really overkill anyway, since <attachment> can't have children.
The only "user-select: all" behavior we actually want is select-on-click.
So, we'll implement that in a slightly different way.

Tests: fast/attachment/attachment-select-on-click-inside-user-select-all.html
       fast/attachment/attachment-select-on-click.html

* css/html.css:
(attachment):
No more "user-select: all".

(attachment:focus): Deleted.
We stopped using attachment focus a while back and forgot to remove this.

* dom/Node.h:
(WebCore::Node::shouldSelectOnMouseDown):
Add a virtual function that Node subclasses can override to indicate they
should be selected on mouse down.

* html/HTMLAttachmentElement.h:
Override the aforementioned virtual function; <attachment> should always
be selected on mouse down.

* page/EventHandler.cpp:
(WebCore::nodeToSelectOnMouseDownForNode):
Determine which node should be selected when a mousedown hits the given node.
If there's any "user-select: all", we go with the outermost "user-select: all".
Otherwise, we give the node a chance to say that it wants to be selected itself.

(WebCore::expandSelectionToRespectSelectOnMouseDown):
Rename this function, it's not just about "user-select: all" anymore.
Make use of nodeToSelectOnMouseDownForNode.

(WebCore::EventHandler::selectClosestWordFromHitTestResult):
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
(WebCore::EventHandler::handleMousePressEventTripleClick):
(WebCore::EventHandler::handleMousePressEventSingleClick):
(WebCore::expandSelectionToRespectUserSelectAll): Deleted.
Adjust to the new names.

* fast/attachment/attachment-select-on-click-inside-user-select-all.html: Added.
* fast/attachment/attachment-select-on-click.html: Added.
* platform/mac/fast/attachment/attachment-select-on-click-expected.png: Added.
* platform/mac/fast/attachment/attachment-select-on-click-expected.txt: Added.
* platform/mac/fast/attachment/attachment-select-on-click-inside-user-select-all-expected.png: Added.
* platform/mac/fast/attachment/attachment-select-on-click-inside-user-select-all-expected.txt: Added.
* platform/mac-mavericks/fast/attachment/attachment-select-on-click-inside-user-select-all-expected.txt: Added.
* platform/mac-mavericks/fast/attachment/attachment-select-on-click-expected.txt: Added.
Add two tests. One, for the basic functionality of clicking on an
<attachment> to select it. The second, to test that clicking on an
<attachment> inside a larger "user-select: all" element still selects
the whole "user-select: all" element.

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

5 years agoUsers of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocate...
ggaren@apple.com [Thu, 12 Mar 2015 00:15:21 +0000 (00:15 +0000)]
Users of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocated+reportExtraMemoryVisited
https://bugs.webkit.org/show_bug.cgi?id=142595

Reviewed by Andreas Kling.

Fixed this bug for canvas.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::memoryCost): Factored out the helper function
required by our IDL generator.

(WebCore::HTMLCanvasElement::createImageBuffer): Use
reportExtraMemoryAllocated.

* html/HTMLCanvasElement.h:

* html/HTMLCanvasElement.idl: Adopt the IDL for reporting cost in the
right way during GC. This will match our reportExtraMemoryAllocated
with a reportExtraMemoryVisited during GC.

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

5 years agoUpdate windows test results
mmirman@apple.com [Wed, 11 Mar 2015 23:52:45 +0000 (23:52 +0000)]
Update windows test results

Unreviewed followup to r181353

* platform/win/fast/events/event-attribute-expected.txt: update windows test results.

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

5 years agoA number of minor edits to the media controls on OSX.
roger_fong@apple.com [Wed, 11 Mar 2015 23:28:36 +0000 (23:28 +0000)]
A number of minor edits to the media controls on OSX.
https://bugs.webkit.org/show_bug.cgi?id=142551.
<rdar://problem/20114707>
Reviewed by Darin Adler.
This covers a slew of minor edits to the new media controls. They are as follows.
Small vertical placements adjustments to inline control elements.
Make sure buttons have no focus outlines.
Expand height of mute box that triggers the volume panel appearing.
Turn all button colors into an slightly transparent white.
Center status display text in fullscreen mode.
Lower position of captions container in fullscreen mode.
Show the controls on when done loading of the video an status display is hidden.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel):
(audio::-webkit-media-controls-panel button:focus):
(audio::-webkit-media-controls-rewind-button):
(audio::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-play-button.paused):
(audio::-webkit-media-controls-panel .mute-box):
(video::-webkit-media-controls-volume-max-button):
(audio::-webkit-media-controls-panel .volume-box):
(video::-webkit-media-controls-volume-min-button):
(audio::-webkit-media-controls-wireless-playback-picker-button):
(audio::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
(audio::-webkit-media-controls-fullscreen-button):
(audio::-webkit-media-controls-fullscreen-button.exit):
(audio::-webkit-media-controls-status-display):
(audio::-webkit-media-controls-time-remaining-display):
(video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
(video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
(video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
(video:-webkit-full-screen::-webkit-media-controls-play-button):
(video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
(video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
(video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
(video:-webkit-full-screen::-webkit-media-controls-status-display):
(video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
(audio::-webkit-media-controls-panel button:active): Deleted.
* Modules/mediacontrols/mediaControlsApple.js:

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

5 years agoUnreviewed, rolling out r179340 and r179344.
commit-queue@webkit.org [Wed, 11 Mar 2015 22:52:43 +0000 (22:52 +0000)]
Unreviewed, rolling out r179340 and r179344.
https://bugs.webkit.org/show_bug.cgi?id=142598

Caused images to stay alive forever when navigating away from
the page before they finish loading. (Requested by kling on
#webkit).

Reverted changesets:

"CachedImage: ensure clients overrides imageChanged instead of
notifyFinished"
https://bugs.webkit.org/show_bug.cgi?id=140722
http://trac.webkit.org/changeset/179340

"HTMLImageLoader: fix build failure on assert condition after
r179340"
https://bugs.webkit.org/show_bug.cgi?id=140722
http://trac.webkit.org/changeset/179344

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

5 years agoMany users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
ggaren@apple.com [Wed, 11 Mar 2015 22:32:19 +0000 (22:32 +0000)]
Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
https://bugs.webkit.org/show_bug.cgi?id=142593

Reviewed by Andreas Kling.

Adopt deprecatedReportExtraMemory as a short-term fix for runaway
memory growth in these cases where we have not adopted
reportExtraMemoryVisited.

Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited.
That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595.

Source/JavaScriptCore:

* API/JSBase.cpp:
(JSReportExtraMemoryCost):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::add):

Source/WebCore:

Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/,
which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::reportExtraMemoryAllocated):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::toJS):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::createWrapper):
* dom/CollectionIndexCache.cpp:
(WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::imageChanged):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::dropProtection):

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

5 years agoFix the build
mmaxfield@apple.com [Wed, 11 Mar 2015 22:23:45 +0000 (22:23 +0000)]
Fix the build

Unreviewed.

* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::start):
(WebKit::Download::resume):

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

5 years agoREGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
aestes@apple.com [Wed, 11 Mar 2015 22:02:01 +0000 (22:02 +0000)]
REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
https://bugs.webkit.org/show_bug.cgi?id=142526

Reviewed by Darin Adler.

Source/WebCore:

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.

LayoutTests:

* TestExpectations: Un-skipped contentfiltering/block-after-add-data.html.

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

5 years agoAllow adding a button in input elements for auto fill related functionality
weinig@apple.com [Wed, 11 Mar 2015 22:01:01 +0000 (22:01 +0000)]
Allow adding a button in input elements for auto fill related functionality
<rdar://problem/19782066>
https://bugs.webkit.org/show_bug.cgi?id=142564

Reviewed by Anders Carlsson.

Source/WebCore:

Test: fast/forms/input-auto-fill-button.html

- Adds a new button that can be shown in <input> elements - AutoFillButtonElement.
- Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
  where not feasible due to exported API/SPI).

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Add new files.

* css/html.css:
(input::-webkit-auto-fill-button):
(input::-webkit-auto-fill-button:hover):
(input::-webkit-auto-fill-button:active):
Add default style rules for the AutoFill button based on the ones
used for caps lock indicator.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::autoFillButtonElement):
(WebCore::HTMLInputElement::reset):
(WebCore::HTMLInputElement::setValueFromRenderer):
(WebCore::HTMLInputElement::setAutoFilled):
(WebCore::HTMLInputElement::setShowAutoFillButton):
(WebCore::HTMLInputElement::setAutofilled): Deleted.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::isAutoFilled):
(WebCore::HTMLInputElement::showAutoFillButton):
(WebCore::HTMLInputElement::isAutofilled): Deleted.
Add new bit to represent whether the AutoFill button should be shown
or not. By default it is not shown, and the client must enable it.

* html/InputType.cpp:
(WebCore::InputType::updateAutoFillButton):
* html/InputType.h:
(WebCore::InputType::autoFillButtonElement):
Add new virtual methods for updating and accessing the AutoFill button.

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::autoFillButtonElement):
(WebCore::TextFieldInputType::destroyShadowSubtree):
(WebCore::TextFieldInputType::updatePlaceholderText):
(WebCore::TextFieldInputType::shouldDrawAutoFillButton):
(WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
(WebCore::TextFieldInputType::createContainer):
(WebCore::TextFieldInputType::createAutoFillButton):
(WebCore::TextFieldInputType::updateAutoFillButton):
* html/TextFieldInputType.h:
Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
is slightly different than for the caps lock indicator, because I didn't want to force
the creation of a container for all <input> elements just in case an AutoFill button was
added. Instead, if an AutoFill button is added, the container is created on the fly and
the existing DOM is updated to move into it. Once a container is created, it is never
removed.

* html/shadow/AutoFillButtonElement.cpp: Added.
(WebCore::AutoFillButtonElement::create):
(WebCore::AutoFillButtonElement::AutoFillButtonElement):
(WebCore::AutoFillButtonElement::defaultEventHandler):
* html/shadow/AutoFillButtonElement.h: Added.
Add div subclass that swallows the click event and forwards it to the ChromeClient.

* page/ChromeClient.h:
Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
button was clicked.

* testing/Internals.cpp:
(WebCore::Internals::setAutofilled):
(WebCore::Internals::setShowAutoFillButton):
* testing/Internals.h:
* testing/Internals.idl:
Expose a new internals.setShowAutoFillButton() function to allow testing
of the AutoFill button from layout tests.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isValueAutofilled):
* css/SelectorCheckerTestFunctions.h:
(WebCore::isAutofilled):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
Update for new spelling of AutoFill.

Source/WebKit/mac:

* DOM/WebDOMOperations.mm:
(-[DOMHTMLInputElement _setAutofilled:]):
Update for consistent spelling of AutoFill.

Source/WebKit2:

- Adds new SPI to respond to clicks on the AutoFill button (both bundle and UIProcess).
- Adds new SPI to enable/disable the display of the AutoFill button on an element.
- Adds new SPI to get the bounds of the AutoFill button.
- Updates spelling of AutoFill to be consistent.

* UIProcess/API/APIUIClient.h:
(API::UIClient::didClickAutoFillButton):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleAutoFillButtonClick):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didClickAutoFillButton):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::didClickAutoFillButton):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::handleAutoFillButtonClick):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
Pipe the didClickAutoFillButton to the SPI layer.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
(-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
Update for new spelling of AutoFill.

* WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleGetHTMLInputElementAutoFilled):
(WKBundleNodeHandleSetHTMLInputElementAutoFilled):
Added. Replaces WKBundleNodeHandleGetHTMLInputElementAutofilled/WKBundleNodeHandleSetHTMLInputElementAutofilled
which are now deprecated due to inconsistent spelling of AutoFill.

(WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
(WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
(WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
Added.

(WKBundleNodeHandleGetHTMLInputElementAutofilled):
(WKBundleNodeHandleSetHTMLInputElementAutofilled):
Deprecated.

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::getOrCreate):
(WebKit::InjectedBundleNodeHandle::create):
(WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
(WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
(WebKit::InjectedBundleNodeHandle::coreNode):
(WebKit::InjectedBundleNodeHandle::document):
(WebKit::InjectedBundleNodeHandle::elementBounds):
(WebKit::InjectedBundleNodeHandle::renderRect):
(WebKit::InjectedBundleNodeHandle::renderedImage):
(WebKit::InjectedBundleNodeHandle::visibleRange):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilled):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled):
(WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds):
(WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::isTextField):
(WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
(WebKit::InjectedBundleNodeHandle::documentFrame):
(WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): Deleted.
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): Deleted.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
Fix-up InjectedBundleNodeHandle to store its underlying Node in a Ref, rather than a RefPtr.
Add helpers to implement the new SPI for WKBundleNodeHandleRef.

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
Update for new callback.

LayoutTests:

* fast/forms/input-auto-fill-button-expected.txt: Added.
* fast/forms/input-auto-fill-button.html: Added.

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

5 years agoRefactored the JSC::Heap extra cost API for clarity and to make some known bugs more...
ggaren@apple.com [Wed, 11 Mar 2015 21:29:57 +0000 (21:29 +0000)]
Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
https://bugs.webkit.org/show_bug.cgi?id=142589

Reviewed by Andreas Kling.

Source/JavaScriptCore:

* API/JSBase.cpp:
(JSReportExtraMemoryCost): Added a FIXME to annotate a known bug.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::visitAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::setJITCode): Updated for rename.

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reportExtraMemoryAllocatedSlowCase):
(JSC::Heap::deprecatedReportExtraMemorySlowCase): Renamed our reporting
APIs to clarify their relationship to each other: One must report extra
memory at the time of allocation, and at the time the GC visits it.

(JSC::Heap::extraMemorySize):
(JSC::Heap::size):
(JSC::Heap::capacity):
(JSC::Heap::sizeAfterCollect):
(JSC::Heap::willStartCollection): Updated for renames. Added explicit
API for deprecated users who can't use our best API.

(JSC::Heap::reportExtraMemoryCostSlowCase): Deleted.
(JSC::Heap::extraSize): Deleted.

* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::reportExtraMemoryAllocated):
(JSC::Heap::reportExtraMemoryVisited):
(JSC::Heap::deprecatedReportExtraMemory):
(JSC::Heap::reportExtraMemoryCost): Deleted. Ditto.

* heap/SlotVisitor.h:
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::reportExtraMemoryVisited):
(JSC::SlotVisitor::reportExtraMemoryUsage): Deleted. Moved this
functionality into the Heap since it's pretty detailed in its access
to the heap.

* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::visitChildren): Updated for
renames.

* runtime/JSString.cpp:
(JSC::JSString::visitChildren):
(JSC::JSRopeString::resolveRopeToAtomicString):
(JSC::JSRopeString::resolveRope):
* runtime/JSString.h:
(JSC::JSString::finishCreation): Updated for renames.

* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::add): Added FIXME.

* runtime/WeakMapData.cpp:
(JSC::WeakMapData::visitChildren): Updated for rename.

Source/WebCore:

Updated for renames to JSC extra cost APIs.

Added FIXMEs to our 10 use cases that are currently wrong, including
canvas, which is the cause of https://bugs.webkit.org/show_bug.cgi?id=142457.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferInternal):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::reportExtraMemoryAllocated):
(WebCore::SourceBuffer::reportExtraMemoryCost): Deleted.
* Modules/mediasource/SourceBuffer.h:
* bindings/js/JSDocumentCustom.cpp:
(WebCore::toJS):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::createWrapper):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* dom/CollectionIndexCache.cpp:
(WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
(WebCore::reportExtraMemoryCostForCollectionIndexCache): Deleted.
* dom/CollectionIndexCache.h:
(WebCore::Iterator>::computeNodeCountUpdatingListCache):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* html/HTMLCollection.h:
(WebCore::CollectionNamedElementCache::didPopulate):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::imageChanged):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::dropProtection):

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

5 years agoAdd basic support for BOL and EOL assertions to the URL Filter parser
benjamin@webkit.org [Wed, 11 Mar 2015 21:08:51 +0000 (21:08 +0000)]
Add basic support for BOL and EOL assertions to the URL Filter parser
https://bugs.webkit.org/show_bug.cgi?id=142568

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-11
Reviewed by Alex Christensen.

Source/WebCore:

This patch adds heavily restricted support for BOL and EOL to the URL filter parser.

Both assertions must be the first/last term of their pattern. Any advanced combination
results in a parsing error.

The BOL assertion is easy to represent: currently, any pattern starts at the beginning
of a line and the NFA are generated accordingly.

I had two options to represent the EOL assertion:
1) Add a new special transition on EOL.
2) Add a new vector of actions to the states, conditional to the EOL input.

I picked the first option to avoid growing every state by a vector
that would be empty in the vast majority of cases.

On the matching side, the interpreter was modified to support transitions on '\0'.
DFABytecodeInstruction::CheckValue now stops when running on a character after
the end of the string.

DFABytecodeInstruction::Jump gets two fixes: First we now account for the index
to avoid going past the end of the input. Second, stop on '\0' too... the reason
is that the unconditional jump is only used for fallback edges of the DFA, fallback
edge are not supposed to accept '\0'.

* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::printTransitions):
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFANode.h:
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::addTransition):
(WebCore::ContentExtensions::NFA::addEpsilonTransition):
(WebCore::ContentExtensions::printTransitions):
* contentextensions/NFANode.h:
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::populateTransitions):
(WebCore::ContentExtensions::NFAToDFA::convert):
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::Term::Term):
(WebCore::ContentExtensions::Term::isEndOfLineAssertion):
(WebCore::ContentExtensions::GraphBuilder::assertionBOL):
(WebCore::ContentExtensions::GraphBuilder::assertionEOL):
(WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):

Tools:

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

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

5 years agoCalling super() in a base class results in a crash
rniwa@webkit.org [Wed, 11 Mar 2015 21:03:24 +0000 (21:03 +0000)]
Calling super() in a base class results in a crash
https://bugs.webkit.org/show_bug.cgi?id=142563

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

The bug was caused by BytecodeGenerator trying to generate "super" expression inside the constructor of a base class.
Disallow that by keeping track of whether "super" has been used in the current scope or not (needsSuperBinding flag)
and then throwing a syntax error in parseFunctionInfo if it was used and the current scope wasn't the constructor of
a derived class.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo): Don't allow super() or super.foo outside the constructor of a derived class.
(JSC::Parser<LexerType>::parseClass): Pass in the constructor kind to parseGetterSetter.
(JSC::Parser<LexerType>::parseGetterSetter): Ditto to parseFunctionInfo.
(JSC::Parser<LexerType>::parseMemberExpression): Set needsSuperBinding flag true on the containing scope.
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::needsSuperBinding): Added.
(JSC::Scope::setNeedsSuperBinding): Added.

LayoutTests:

Added more test cases to an existing test.

* js/class-syntax-super-expected.txt:
* js/script-tests/class-syntax-super.js:

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

5 years ago[Mac] Update fullscreen placeholder UI to use Vibrancy.
jer.noble@apple.com [Wed, 11 Mar 2015 20:27:42 +0000 (20:27 +0000)]
[Mac] Update fullscreen placeholder UI to use Vibrancy.
https://bugs.webkit.org/show_bug.cgi?id=142586

Reviewed by Eric Carlson.

Update the fullscreen placeholder with a translucent vibrant appearance
using NSVisualEffectView. Since NSVisuaEffectView is only available for
OS X 10.10 and above, wrap the new implementation in a version check and
retain the old implementation.

Drive-by: Update the strings for the placeholder view with new HI guidance
as well.

* English.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
(WebCore::clickToExitFullScreenText):
* platform/mac/WebCoreFullScreenPlaceholderView.h:
* platform/mac/WebCoreFullScreenPlaceholderView.mm:
(-[WebCoreFullScreenPlaceholderView setExitWarningVisible:]):

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

5 years agosvg/animations/smil-leak-*.svg tests are flaky.
said@apple.com [Wed, 11 Mar 2015 20:08:26 +0000 (20:08 +0000)]
svg/animations/smil-leak-*.svg tests are flaky.
https://bugs.webkit.org/show_bug.cgi?id=114280

Unreviewed.

Some svg tests were flaky on mac only but they became flaky on all ports
after r181345. They pass locally and on EWS but not on bots. Mark them to
be flaky on all ports till we figure out the problem with these tests.

* TestExpectations:
* platform/mac/TestExpectations:

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

5 years agoMake it possible to zoom on pages that claim to lay out to device size and then fail...
timothy_horton@apple.com [Wed, 11 Mar 2015 19:16:20 +0000 (19:16 +0000)]
Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
https://bugs.webkit.org/show_bug.cgi?id=142549

Reviewed by Simon Fraser.

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::ViewportConfiguration):
Rename m_ignoreScalingConstraints to m_canIgnoreScalingConstraints,
because it being true does not guarantee that we will ignore scaling constraints,
but it being false does guarantee that we won't.

(WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
Ignore scaling constraints if the page:
    a) claimed to want to lay out to device-width and then laid out too wide
    b) claimed to want to lay out to device-height and then laid out too tall
    c) claimed to want to lay out with initialScale=1 and then laid out too wide

(WebCore::ViewportConfiguration::initialScale):
(WebCore::ViewportConfiguration::minimumScale):
(WebCore::ViewportConfiguration::allowsUserScaling):
Call shouldIgnoreScalingConstraints() instead of looking at the local, so we can
have some more logic here (as above).

(WebCore::ViewportConfiguration::description):
Dump whether we're ignoring scaling constraints.

(WebCore::ViewportConfiguration::dump):
Use WTFLogAlways so that the output goes to various other logging mechanisms
instead of just stderr.

* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
(WebCore::ViewportConfiguration::setIgnoreScalingConstraints): Deleted.

* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Flip the pref on by default.

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

5 years ago[GTK] Add support for handling TLS errors to MiniBrowser
carlosgc@webkit.org [Wed, 11 Mar 2015 19:14:20 +0000 (19:14 +0000)]
[GTK] Add support for handling TLS errors to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=142576

Reviewed by Sergio Villar Senin.

It's useful for testing TLS errors handling itself, but also to
allow ignoring TLS errors when testing.

* MiniBrowser/gtk/BrowserWindow.c:
(webViewLoadFailedWithTLSerrors):
(browserWindowConstructed):

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

5 years agoUse out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlo...
mmaxfield@apple.com [Wed, 11 Mar 2015 18:22:06 +0000 (18:22 +0000)]
Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
https://bugs.webkit.org/show_bug.cgi?id=142569

Reviewed by David Hyatt.

Source/WebCore:

Currently, RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline() return -1 to mean
that its baseline should be skipped. Instead of using this sentinel value, this patch changes the
return type from int to Optional<int>.

No new tests because there is no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::baselinePosition):
(WebCore::RenderBlock::firstLineBaseline):
(WebCore::RenderBlock::inlineBlockBaseline):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::firstLineBaseline):
(WebCore::RenderBlockFlow::inlineBlockBaseline):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.h:
(WebCore::RenderBox::firstLineBaseline):
(WebCore::RenderBox::inlineBlockBaseline):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::baselinePosition):
(WebCore::RenderFlexibleBox::firstLineBaseline):
(WebCore::RenderFlexibleBox::inlineBlockBaseline):
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
* rendering/RenderFlexibleBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::cellAbove):
(WebCore::RenderTable::cellBelow):
(WebCore::RenderTable::cellBefore):
(WebCore::RenderTable::cellAfter):
(WebCore::RenderTable::firstLineBlock):
(WebCore::RenderTable::baselinePosition):
(WebCore::RenderTable::inlineBlockBaseline):
(WebCore::RenderTable::firstLineBaseline):
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::cellBaselinePosition):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::firstLineBaseline):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.h:
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::baselinePosition):
(WebCore::RenderMathMLTable::firstLineBaseline):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::firstLineBaseline):
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::firstLineBaseline):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::firstLineBaseline):
(WebCore::RenderMathMLRoot::layout):
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::layout):
(WebCore::RenderMathMLScripts::firstLineBaseline):
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::firstLineBaseline):
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::firstLineBaseline):
* rendering/mathml/RenderMathMLUnderOver.h:

Source/WTF:

Provide a callback to Optional::valueOrCompute() which is evaluated only if necessary.

* wtf/Optional.h:
(WTF::Optional::valueOrCompute):

Tools:

Test Optional::valueOrCompute().

* TestWebKitAPI/Tests/WTF/Optional.cpp:
(TestWebKitAPI::TEST):

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

5 years ago<attachment>s should be created when dropping files onto contentEditable areas
timothy_horton@apple.com [Wed, 11 Mar 2015 18:21:05 +0000 (18:21 +0000)]
<attachment>s should be created when dropping files onto contentEditable areas
https://bugs.webkit.org/show_bug.cgi?id=142494
<rdar://problem/19982553>

Reviewed by Anders Carlsson.

Covered by existing tests.

* editing/mac/EditorMac.mm:
(WebCore::Editor::WebContentReader::readFilenames):
Instead of inserting the dropped URLs as strings, make an <attachment>
for each.

* editing/pasteboard/drag-files-to-editable-element-expected.txt:
* editing/pasteboard/drag-files-to-editable-element.html:
Update the test to expect <attachment>s instead of filenames.

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

5 years agoOptimize offsetWidth and offsetHeight to avoid doing layouts.
hyatt@apple.com [Wed, 11 Mar 2015 18:13:45 +0000 (18:13 +0000)]
Optimize offsetWidth and offsetHeight to avoid doing layouts.
https://bugs.webkit.org/show_bug.cgi?id=142544

Reviewed by Beth Dakin.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
* dom/Document.h:
Added a new method that only updates layout if it determines that the desired dimensions are out
of date.

* dom/Element.cpp:
(WebCore::Element::offsetWidth):
(WebCore::Element::offsetHeight):
Patch offsetWidth and offsetHeight to call the new method rather than updateLayoutIgnorePendingStylesheets.

LayoutTests:

* fast/images/repaint-subrect-grid.html:
Patch this test to use the window.internals update layout method rather than
relying on document.body.offsetWidth.

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

5 years ago[GTK] Add an option to enable MiniBrowser for non developer builds and always install it
carlosgc@webkit.org [Wed, 11 Mar 2015 18:08:39 +0000 (18:08 +0000)]
[GTK] Add an option to enable MiniBrowser for non developer builds and always install it
https://bugs.webkit.org/show_bug.cgi?id=126688

Reviewed by Gustavo Noronha Silva.

.:

Add ENABLE_MINIBROWSER option, enabled by default for development
builds and disabled for production builds unless explicilty enabled.

* Source/cmake/OptionsGTK.cmake:

Tools:

* CMakeLists.txt: Build testing tools only for developer builds,
but MiniBrowser when ENABLE_MINIBROWSER option is ON.
* MiniBrowser/gtk/CMakeLists.txt: Only add
-DWEBKIT_INJECTED_BUNDLE_PATH to the build for developer builds,
and add a rule to install the MiniBrowser.
* MiniBrowser/gtk/main.c:
(main): Only set WEBKIT_INJECTED_BUNDLE_PATH env var for developer
builds.

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

5 years agoAdd some DateMath tests to TestWebKitAPI
bfulgham@apple.com [Wed, 11 Mar 2015 17:49:04 +0000 (17:49 +0000)]
Add some DateMath tests to TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=142565

Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/CMakeLists.txt: Add new DateMath.cpp file.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj: Ditto.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters: Ditto.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto."
* TestWebKitAPI/Tests/WTF/DateMath.cpp: Added.

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

5 years ago[GTK] Do not look for child processes in the UI process binary path
carlosgc@webkit.org [Wed, 11 Mar 2015 17:47:38 +0000 (17:47 +0000)]
[GTK] Do not look for child processes in the UI process binary path
https://bugs.webkit.org/show_bug.cgi?id=135752

Reviewed by Gustavo Noronha Silva.

.:

* Source/cmake/OptionsGTK.cmake: Add -DDEVELOPMENT_BUILD=1 to the
build for development builds.

Source/WebKit2:

It's only useful for internal tools and tests, but never when
installed, since we don't install the processes in the bin dir but
in the libexec dir.

* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::findWebKitProcess): Only look or the executables in the
UI process binary path or WEBKIT_EXEC_PATH for development builds.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory): Only check
WEBKIT_INJECTED_BUNDLE_PATH env var for development builds.

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

5 years ago[Win] Test gardening after r181260
mmaxfield@apple.com [Wed, 11 Mar 2015 16:38:30 +0000 (16:38 +0000)]
[Win] Test gardening after r181260

Unreviewed.

* platform/win/svg/text/select-textLength-spacingAndGlyphs-squeeze-1-expected.txt: Added.
* platform/win/svg/text/select-textLength-spacingAndGlyphs-squeeze-2-expected.txt: Added.
* platform/win/svg/text/select-textLength-spacingAndGlyphs-squeeze-3-expected.txt: Added.
* platform/win/svg/text/select-textLength-spacingAndGlyphs-squeeze-4-expected.txt: Added.
* platform/win/svg/text/select-textLength-spacingAndGlyphs-stretch-1-expected.txt: Added.
* platform/win/svg/text/select-textLength-spacingAndGlyphs-stretch-2-expected.txt: Added.
* platform/win/svg/text/select-textLength-spacingAndGlyphs-stretch-3-expected.txt: Added.

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

5 years agoTest gardening after r181278
mmaxfield@apple.com [Wed, 11 Mar 2015 16:31:53 +0000 (16:31 +0000)]
Test gardening after r181278

Unreviewed.

Until Windows adopts the SVG -> OTF Converter, we should mark this test as Mac-only.

* platform/mac/svg/fonts/resources/svg-font-general.svg: Renamed from LayoutTests/svg/fonts/resources/svg-font-general.svg.
* platform/mac/svg/fonts/svg-font-general-expected.html: Renamed from LayoutTests/svg/fonts/svg-font-general-expected.html.
* platform/mac/svg/fonts/svg-font-general.html: Renamed from LayoutTests/svg/fonts/svg-font-general.html.

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

5 years agoUnreviewed, rolling out r181367.
commit-queue@webkit.org [Wed, 11 Mar 2015 15:58:13 +0000 (15:58 +0000)]
Unreviewed, rolling out r181367.
https://bugs.webkit.org/show_bug.cgi?id=142581

Caused crashes on the debug bots (Requested by cdumez on
#webkit).

Reverted changeset:

"Web Inspector: CSS parser errors in the console should
include column numbers"
https://bugs.webkit.org/show_bug.cgi?id=114313
http://trac.webkit.org/changeset/181367

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

5 years agoWeb Inspector: Reload after Global Search results in empty Resources Sidebar.
commit-queue@webkit.org [Wed, 11 Mar 2015 14:52:04 +0000 (14:52 +0000)]
Web Inspector: Reload after Global Search results in empty Resources Sidebar.
https://bugs.webkit.org/show_bug.cgi?id=142572

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

If you reload when the search content tree outline is showing, break out
to show the resource tree outline.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._showResourcesContentTreeOutline):
(WebInspector.ResourceSidebarPanel.prototype._showSearchContentTreeOutline):

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

5 years agoInline block children do not have correct baselines if their children are also block...
mmaxfield@apple.com [Wed, 11 Mar 2015 14:41:01 +0000 (14:41 +0000)]
Inline block children do not have correct baselines if their children are also block elements
https://bugs.webkit.org/show_bug.cgi?id=142559

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-03-11
Reviewed by Darin Adler.

Source/WebCore:

Perform the same computation on child block elements as child inline elements.

Test: fast/text/baseline-inline-block-block-children.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::inlineBlockBaseline):

LayoutTests:

* fast/text/baseline-inline-block-block-children-expected.html: Added.
* fast/text/baseline-inline-block-block-children.html: Added.

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

5 years agoWeb Inspector: SearchResultTreeElement.representedObject is missing a saveIdentityToC...
commit-queue@webkit.org [Wed, 11 Mar 2015 14:09:29 +0000 (14:09 +0000)]
Web Inspector: SearchResultTreeElement.representedObject is missing a saveIdentityToCookie implementation
https://bugs.webkit.org/show_bug.cgi?id=134698

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

This will restore selection of a global search tree element if you
close and reopen the inspector in such a case.

* UserInterface/Models/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject.prototype.get resource):
(WebInspector.DOMSearchMatchObject.titleForDOMNode):
Cookie has the resource URL, DOM Node title, and text range.

* UserInterface/Models/SourceCodeSearchMatchObject.js:
(WebInspector.SourceCodeSearchMatchObject.prototype.get sourceCodeTextRange):
Cookie has the source code URL and text range.

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

5 years ago[CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO...
clopez@igalia.com [Wed, 11 Mar 2015 14:00:15 +0000 (14:00 +0000)]
[CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO is broken.
https://bugs.webkit.org/show_bug.cgi?id=142577

Reviewed by Carlos Garcia Campos.

No new tests, this is a build fix.

* PlatformEfl.cmake: Include GSTREAMER_AUDIO_LIBRARIES on the link step both for ENABLE_VIDEO and ENABLE_WEB_AUDIO.
* PlatformGTK.cmake: Idem.

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 11 Mar 2015 08:44:12 +0000 (08:44 +0000)]
Versioning.

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

5 years agoRename MediaStreamCenter to RealtimeMediaSourceCenter
philn@webkit.org [Wed, 11 Mar 2015 08:10:07 +0000 (08:10 +0000)]
Rename MediaStreamCenter to RealtimeMediaSourceCenter
https://bugs.webkit.org/show_bug.cgi?id=142535

Reviewed by Eric Carlson.

As per bug title, rename MediaStreamCenter to
RealtimeMediaSourceCenter, this class manages
RealtimeMediaSources, not MediaStreams. Some un-needed includes of
the header were also removed.

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

5 years agoRemove unnecessary create() factory functions
gyuyoung.kim@samsung.com [Wed, 11 Mar 2015 07:10:08 +0000 (07:10 +0000)]
Remove unnecessary create() factory functions
https://bugs.webkit.org/show_bug.cgi?id=142558

Reviewed by Darin Adler.

create() function which just returns new instance can be replaced with std::make_unique<>.

No new tests, no behavior changes.

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
* crypto/keys/CryptoKeyAES.cpp:
(WebCore::CryptoKeyAES::exportData):
* crypto/keys/CryptoKeyDataOctetSequence.h:
* crypto/keys/CryptoKeyHMAC.cpp:
(WebCore::CryptoKeyHMAC::exportData):
* crypto/keys/CryptoKeySerializationRaw.cpp:
(WebCore::CryptoKeySerializationRaw::keyData):
* platform/audio/mac/CARingBuffer.cpp:
(WebCore::CARingBuffer::create): Deleted.
* platform/audio/mac/CARingBuffer.h:
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::prepare):
* testing/Internals.cpp:
(WebCore::Internals::queueMicroTask):
* testing/MicroTaskTest.cpp:
(WebCore::MicroTaskTest::create): Deleted.
* testing/MicroTaskTest.h:
(WebCore::MicroTaskTest::MicroTaskTest):

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

5 years agoWeb Inspector: CSS parser errors in the console should include column numbers
commit-queue@webkit.org [Wed, 11 Mar 2015 06:11:10 +0000 (06:11 +0000)]
Web Inspector: CSS parser errors in the console should include column numbers
https://bugs.webkit.org/show_bug.cgi?id=114313

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-10
Reviewed by Benjamin Poulain.

Source/WebCore:

Test: inspector-protocol/console/warnings-errors.html

* css/CSSParser.h:
(WebCore::CSSParser::currentCharacterOffset):
Get the current character offset depending on the source type.
Add instance variables to track column position and start
line / column for inline stylesheets.

* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSheet):
Initialize new instance variables.

(WebCore::CSSParser::currentLocation):
Update to include column information. Also, if we are on the first line
we may need to take into account a start column offset as well.

(WebCore::CSSParser::realLex):
When bumping the line number, reset the column offset for the next
line with the next character.

(WebCore::CSSParser::syntaxError):
(WebCore::CSSParser::logError):
Include column information.

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseString):
(WebCore::StyleSheetContents::parseStringAtLineAndColumn):
Include column information.

* css/StyleSheetContents.h:
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
(WebCore::InlineStyleSheetOwner::createSheet):
Save and use column information later on.

* dom/InlineStyleSheetOwner.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::ensureSourceData):
Updated parser signature needs starting column and no longer has optional parameters.

Source/WebInspectorUI:

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
Column numbers in console messages are also 1 based and should be adjusted.

LayoutTests:

Test errors in both external and inline CSS and Scripts to ensure they have
expected line:column information.

* inspector-protocol/console/warnings-errors-expected.txt: Added.
* inspector-protocol/console/warnings-errors.html: Added.
* inspector-protocol/resources/errors.css: Added.
* inspector-protocol/resources/errors.js: Added.

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

5 years agoTry to fix the GTK build.
darin@apple.com [Wed, 11 Mar 2015 05:56:24 +0000 (05:56 +0000)]
Try to fix the GTK build.

* html/HTMLVideoElement.idl: Work around gobject bindings generator limitation
by putting in a LANGUAGE_GOBJECT conditional.

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

5 years agoUnreviewed EFL gardening on 10th Mar.
gyuyoung.kim@samsung.com [Wed, 11 Mar 2015 05:30:43 +0000 (05:30 +0000)]
Unreviewed EFL gardening on 10th Mar.

Mark smil-leak-foo tests, 3 tests of fast/css to failure.

* platform/efl/TestExpectations:

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

5 years agoAdd interface to delete disk cache entries
antti@apple.com [Wed, 11 Mar 2015 04:08:53 +0000 (04:08 +0000)]
Add interface to delete disk cache entries
https://bugs.webkit.org/show_bug.cgi?id=142546

Reviewed by Anders Carlsson.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::remove):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::remove):

    Move deletion to a serial queue so we can't create large number of threads.

(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
(WebKit::NetworkCache::Storage::removeEntry): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::deleteQueue):

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

5 years ago5 tests fail on Apple Mac WK2 performance bots
cdumez@apple.com [Wed, 11 Mar 2015 03:29:44 +0000 (03:29 +0000)]
5 tests fail on Apple Mac WK2 performance bots
https://bugs.webkit.org/show_bug.cgi?id=142485

Reviewed by Andreas Kling.

Only log errors in debug builds if SandboxExtension::createHandle() fails
so that performance tests don't fail because of it. Such error is not
fatal and is expected under certain circumstances. In particular,
SandboxExtension::createHandle() is sometimes called for non-existing
files (e.g. from NetworkResourceLoadParameters::encode()).

* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::createHandle):

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

5 years agoRegression(r181257): WTF_WorkQueue.Simple is flaky
bfulgham@apple.com [Wed, 11 Mar 2015 02:52:21 +0000 (02:52 +0000)]
Regression(r181257): WTF_WorkQueue.Simple is flaky
https://bugs.webkit.org/show_bug.cgi?id=142560

Unreviewed attempt to improve test stability.

* TestWebKitAPI/Tests/WTF/WorkQueue.cpp: Check the reference count for
the WorkQueue a little later to redue flakiness.

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

5 years agoWeb Inspector: console.error output broken, does not produce ObjectTree
commit-queue@webkit.org [Wed, 11 Mar 2015 02:36:12 +0000 (02:36 +0000)]
Web Inspector: console.error output broken, does not produce ObjectTree
https://bugs.webkit.org/show_bug.cgi?id=142554

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

* UserInterface/Models/IssueMessage.js:
(WebInspector.IssueMessage):
* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):

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

5 years ago[Win] 17 different JSC tests started to fail in DST
bfulgham@apple.com [Wed, 11 Mar 2015 02:34:04 +0000 (02:34 +0000)]
[Win] 17 different JSC tests started to fail in DST
https://bugs.webkit.org/show_bug.cgi?id=142531

Reviewed by Chris Dumez.

The stock 'GetTimeZoneInformation' call does not always match the actual Daylight
Savings calendar. This results in a period of time when these tests fail.

If available, we should take advantage of the new 'GetTimeZoneInformationForYear',
which accesses a dynamic calendar of DST dates, which is presumbably updated by
Microsoft from year-to-year.

* wtf/DateMath.cpp:
(WTF::timeZoneInformationForYearFunction): New function to conditionally access
some Vista (and newer) functionality.
(WTF::calculateUTCOffset): Call new function (if available) to calculate proper UTC
time offset.

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

5 years agoMigrate from SystemUIFontSelect to AppleSystemFontOSSubversion
mmaxfield@apple.com [Wed, 11 Mar 2015 02:26:56 +0000 (02:26 +0000)]
Migrate from SystemUIFontSelect to AppleSystemFontOSSubversion
https://bugs.webkit.org/show_bug.cgi?id=142555

Reviewed by Simon Fraser.

* DumpRenderTree/mac/DumpRenderTree.mm:
(setDefaultsToConsistentValuesForTesting):
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):

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

5 years agoSome event handler fixes
darin@apple.com [Wed, 11 Mar 2015 02:21:20 +0000 (02:21 +0000)]
Some event handler fixes
https://bugs.webkit.org/show_bug.cgi?id=142474

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::createInjectedScript): Call clearException.
I spotted the fact it was missing by auditing all the calls to JSC::call.

Source/WebCore:

* bindings/scripts/CodeGenerator.pm:
(GenerateConditionalStringFromAttributeValue): Improved the algorithm here to
handle combinations of & and | in conditional expressions; that's coming up when
combining conditionals for includes in NavigatorContentUtils.idl.

* bindings/scripts/CodeGeneratorJS.pm:
(AddToImplIncludes): Removed the rudimentary attempt to split and merge
conditionals involving | here; instead we rely on the rules in the
GenerateConditionalStringFromAttributeValue to handle this.
(GenerateImplementation): Passed new "conditional" argument to JSValueToNative.
(GenerateParametersCheck): Pass "conditional" argument to AddToImplIncludes and
JSValueToNative.
(JSValueToNative): Changed to take "conditional" as an argument, since getting
it from the signature won't work for a method parameter.
(WriteData): Merge duplicates based on the result of the
GenerateConditionalStringFromAttributeValue function rather than on the values
passed into that function, since that function converts conditionals into a
canonical form and can make two strings equal that don't start out that way.

* bindings/scripts/CodeGeneratorObjC.pm:
(SkipAttribute): Added code to guarantee we won't make Objective-C bindings
for event handlers. We will rename EventListener to EventHandler in a
subsequent patch.

* bindings/scripts/test/JS/JSTestInterface.cpp: Updated for a progression caused
by the better logic for conditional includes.

* bindings/scripts/test/JS/JSTestObj.cpp: Updated for change to the test below.
* bindings/scripts/test/TestObj.idl: Added test of an event handler attribute.

* dom/Document.idl: Removed unneeded language #if around event handler
attributes. Removed all the commented out event handler attributes.
Sorted event handler attributes into a single section rather than separating
"standard" from "extensions". Sorted the conditional event handler attributes
into paragraphs at the bottom. We will probably make them all unconditional
in a subsequent patch.

* dom/Element.idl: Removed unneeded language #if around event handler
attributes. Removed all the commented out event handler attributes.
Moved event handler attributes here from all derived element classes to
match the approach from the HTML standard. Also resorted the attributes
as in Document above.

* html/HTMLBodyElement.idl: Removed unneeded language #if around event handler
attributes. Removed all the commented out event handler attributes.
Sorted event handler attributes into a single section rather than separating
"standard" from "overrides".

* html/HTMLElement.cpp:
(WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
Added a few missing attribute names, and re-sorted a bit. Moved any from
element subclasses here.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::parseAttribute): Moved code to handle
oncomplete and oncompleteerror to Element and HTMLElement.
* html/HTMLFormElement.idl: Ditto.

* html/HTMLFrameSetElement.idl: Removed #if and resorted as above.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute): Moved code to handle
onsearch to HTMLElement.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Moved code to handle
all the event handler attributes to HTMLElement.
(WebCore::HTMLMediaElement::updateCaptionContainer): Removed a redundant
if statement I noticed while auditing all calls to JSC::call.
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added clearException.
I noticed this was missing because a flawed earlier version of my patch was
causing the script to fail, leaving an exception behind that caused an
assertion later. So I audited all calls to JSC::call looking for this mistake.

* html/HTMLMediaElement.idl: Moved all the event handlers from here to
Element. Also changed everything possible to use Conditional instead of #if.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Added
clearException. Noticed it was missing while auditing all calls to JSC::call.

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::parseAttribute): Moved event handler code to
HTMLElement.

* html/HTMLVideoElement.idl: Moved event handler to Element.idl and use
Conditional instead of #if.

* page/DOMWindow.idl: Use Conditional instead of #if and tidy up the event
handlers section.

* svg/svgattrs.in: Remove six unused attribute names. Presumably used in
some older scheme to implement event handlers but no longer used at all.

LayoutTests:

* fast/dom/event-handler-attributes-expected.txt: Updated for new tests and to
expect more tests to pass.

* fast/dom/event-handler-attributes.html: Added testing of event handlers on
non-HTML, non-SVG elements, and on SVG elements. Also removed
webkitpresentationmodechanged from the test, for now at least.

* fast/events/event-attribute-expected.txt: Updated to expect more tests to pass.

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

5 years agoFunctions should have initialization precedence over arguments.
mmirman@apple.com [Wed, 11 Mar 2015 00:33:03 +0000 (00:33 +0000)]
Functions should have initialization precedence over arguments.
https://bugs.webkit.org/show_bug.cgi?id=142550
rdar://problem/19702564

Reviewed by Geoffrey Garen.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeCapturedVariable):
* tests/stress/initialize_functions_after_arguments.js: Added.

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

5 years agoCSS scroll-snap-destination and scroll-snap-coordinate are not honoring position...
bfulgham@apple.com [Tue, 10 Mar 2015 23:19:38 +0000 (23:19 +0000)]
CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
https://bugs.webkit.org/show_bug.cgi?id=142411

Reviewed by Simon Fraser.

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-position-values.html.

Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
and 'left', 'right', and 'center' for the X axis.

Correct implementation to support calculated values for Scroll Snap Point markup. This required the
Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
to a regular CSSValue.

Add tests that these position labels, as well as combinations with percentages and pixel offsets
are parsed properly.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
when working with Length values. This is necessary to allow calculated results to be based on the proper default
page dimensions.
(WebCore::scrollSnapPoints): Ditto.
(WebCore::scrollSnapCoordinates): Ditto.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
positions.
(WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
(WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
(WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
(WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
(WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
(WebCore::CSSParser::parseTransformOrigin): Ditto.
(WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
* css/CSSParser.h:
* css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
repeat values as calculations.

LayoutTests:

Add a test for <position> types in scroll snap operations. Also update the test expectations
for computed styles now that double-precision math is being used for calculated values.

* css3/scroll-snap/scroll-snap-position-values-expected.txt: Added.
* css3/scroll-snap/scroll-snap-position-values.html: Added.
* css3/scroll-snap/scroll-snap-property-computed-style-expected.txt: Updated
* css3/scroll-snap/scroll-snap-property-computed-style.js: Updated

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

5 years agoAdd support for more emoji with variation.
enrica@apple.com [Tue, 10 Mar 2015 23:12:53 +0000 (23:12 +0000)]
Add support for more emoji with variation.
https://bugs.webkit.org/show_bug.cgi?id=142548
rdar://problem/20105008

Reviewed by Tim Horton.

Source/WebCore:

Update ICU rules to support new emoji with variation.

Test: editing/selection/extend-by-character-007.html

* platform/text/TextBreakIterator.cpp:
(WebCore::cursorMovementIterator):

LayoutTests:

* editing/selection/extend-by-character-007-expected.txt: Added.
* editing/selection/extend-by-character-007.html: Added.

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

5 years agoEden collections should trigger sweep of MarkedBlocks containing new objects.
akling@apple.com [Tue, 10 Mar 2015 22:59:10 +0000 (22:59 +0000)]
Eden collections should trigger sweep of MarkedBlocks containing new objects.
<https://webkit.org/b/142538>

Reviewed by Geoffrey Garen.

Take a snapshot of all MarkedBlocks with new objects as part of Eden collections,
and append that to the IncrementalSweeper's working set.

This ensures that we run destructors for objects that were discovered to be garbage during
Eden collections, instead of delaying their teardown until the next full collection,
or the next allocation cycle for their block.

* heap/Heap.cpp:
(JSC::Heap::snapshotMarkedSpace): For Eden collections, snapshot the list of MarkedBlocks
that contain new objects, since those are the only ones we're interested in.
Also use Vector::resizeToFit() to allocate the snapshot for full collections, since we know
the final size we need up front.

(JSC::Heap::notifyIncrementalSweeper): For Eden collections, tell the IncrementalSweeper
to add the block snapshot (taken earlier) to its existing set of blocks instead of replacing
it entirely. This allows Eden collections and incremental sweeping to occur interleaved with
each other without missing destruction opportunities.

* heap/IncrementalSweeper.h:
* heap/IncrementalSweeper.cpp:
(JSC::IncrementalSweeper::doSweep):
(JSC::IncrementalSweeper::sweepNextBlock): Change the way we iterate over the sweeper's
work list: instead of keeping an index for the next block, just pop from the end of the list.
This allows us to add new blocks and deduplicate the list without disturbing iteration.

(JSC::IncrementalSweeper::startSweeping): Make this take a Vector<MarkedBlock>&& so we can
pass ownership of this Vector efficiently from Heap to IncrementalSweeper.

(JSC::IncrementalSweeper::addBlocksAndContinueSweeping): Added. This is used by Eden
collections to add a set of MarkedBlocks with new objects to the sweeper's existing
working set and kick the timer.

* heap/MarkedSpace.h:
(JSC::MarkedSpace::blocksWithNewObjects): Expose the list of MarkedBlocks with new objects.

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

5 years agoFix warning about loading insecure content from secure webkit.org/blog
commit-queue@webkit.org [Tue, 10 Mar 2015 22:39:40 +0000 (22:39 +0000)]
Fix warning about loading insecure content from secure webkit.org/blog
https://bugs.webkit.org/show_bug.cgi?id=142545

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-10
Reviewed by Mark Rowe.

* blog/wp-content/themes/webkit/footer.php:
Use an "https" URL for the subresource, instead of "http".

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

5 years agoUse unsigned for HashSet size.
commit-queue@webkit.org [Tue, 10 Mar 2015 21:54:21 +0000 (21:54 +0000)]
Use unsigned for HashSet size.
https://bugs.webkit.org/show_bug.cgi?id=142518

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-10
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

* dfg/DFGAvailabilityMap.cpp:
(JSC::DFG::AvailabilityMap::prune):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* heap/MarkedBlockSet.h:
(JSC::MarkedBlockSet::remove):
* runtime/WeakMapData.h:

Source/WebCore:

* Modules/websockets/WebSocketDeflateFramer.cpp:
(WebCore::WebSocketExtensionDeflateFrame::processResponse):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::checkForDuplicate):
(WebCore::CloneSerializer::writeConstantPoolIndex):
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::~ScriptRunner):
* loader/ResourceLoadScheduler.h:
* platform/graphics/Font.cpp:
(WebCore::Font::systemFallbackFontForCharacter):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontDataIfNeeded):
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/FontCache.h:
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::getSystemFontFallbackForCharacters):
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::similarFont):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::shouldAutoActivateFontIfNeeded):
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::similarFont):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::FlexBoxIterator::next):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::computeOverflowFromCells):

Source/WTF:

* wtf/HashCountedSet.h:
(WTF::Traits>::size):
(WTF::Traits>::capacity):
* wtf/HashMap.h:
(WTF::X>::size):
(WTF::X>::capacity):
* wtf/HashSet.h:
(WTF::V>::size):
(WTF::V>::capacity):
* wtf/HashTable.h:
(WTF::HashTable::Stats::recordCollisionAtCount):
(WTF::HashTable::Stats::dumpStats):
(WTF::HashTable::size):
(WTF::HashTable::capacity):
(WTF::KeyTraits>::deallocateTable):
(WTF::KeyTraits>::checkTableConsistencyExceptSize):
* wtf/HashTraits.h:
* wtf/ListHashSet.h:
(WTF::U>::size):
(WTF::U>::capacity):

Tools:

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::testInitialCapacity):
* TestWebKitAPI/Tests/WTF/ListHashSet.cpp:
(TestWebKitAPI::TEST):

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

5 years ago[Mac] Refactor media controls code
eric.carlson@apple.com [Tue, 10 Mar 2015 21:26:36 +0000 (21:26 +0000)]
[Mac] Refactor media controls code
https://bugs.webkit.org/show_bug.cgi?id=142455

Reviewed by Dean Jackson.

Source/WebCore:

No new tests, updated tests/media/hls/video-controls-live-stream-expected.txt.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
(Controller.prototype.createControls):
(Controller.prototype.setControlsType):
(Controller.prototype.configureInlineControls):
(Controller.prototype.updateStatusDisplay):
(Controller.prototype.handlePanelMouseDown):
(Controller.prototype.showControls):
(Controller.prototype.hideControls):
(Controller.prototype.handleOptimizedFullscreenButtonClicked):
(Controller.prototype.currentPlaybackTargetIsWireless):
(Controller.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
(Controller.prototype.updateWirelessPlaybackStatus):
(Controller.prototype.updateWirelessTargetAvailable):
(Controller.prototype.handleWirelessPickerButtonClicked):
(Controller.prototype.handleWirelessPlaybackChange):
(Controller.prototype.handleWirelessTargetAvailableChange):
(Controller.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS):
(ControllerIOS.prototype.addVideoListeners):
(ControllerIOS.prototype.removeVideoListeners):
(ControllerIOS.prototype.createControls):
(ControllerIOS.prototype.setControlsType):
(ControllerIOS.prototype.configureInlineControls):
(ControllerIOS.prototype.showControls):
(ControllerIOS.prototype.handleWirelessPickerButtonTouchEnd):
(ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
(ControllerIOS.prototype.updateStatusDisplay):
(ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
(ControllerIOS.prototype.currentPlaybackTargetIsWireless): Deleted.
(ControllerIOS.prototype.updateWirelessPlaybackStatus): Deleted.
(ControllerIOS.prototype.updateWirelessTargetAvailable): Deleted.
(ControllerIOS.prototype.hideControls): Deleted.
(ControllerIOS.prototype.handleWirelessPlaybackChange): Deleted.
(ControllerIOS.prototype.handleWirelessTargetAvailableChange): Deleted.

LayoutTests:

* platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt:

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

5 years ago[iOS] Add WebKitSystemInterface for iOS 8.2
dbates@webkit.org [Tue, 10 Mar 2015 21:17:39 +0000 (21:17 +0000)]
[iOS] Add WebKitSystemInterface for iOS 8.2
https://bugs.webkit.org/show_bug.cgi?id=142505

Rubber-stamped by Anders Carlsson.

Make copy-webkitlibraries-to-product-directory install libWebKitSystemInterfaceIOS{Device, Simulator}8.2.a.
I inadvertently forgot to add libWebKitSystemInterfaceIOS{Device, Simulator}8.2.a to script
copy-webkitlibraries-to-product-directory in r181286.

* Scripts/copy-webkitlibraries-to-product-directory:

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

5 years agoRemove PassRefPtr from svg/properties classes.
commit-queue@webkit.org [Tue, 10 Mar 2015 20:39:50 +0000 (20:39 +0000)]
Remove PassRefPtr from svg/properties classes.
https://bugs.webkit.org/show_bug.cgi?id=142063.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-03-10
Reviewed by Darin Adler.
Source/WebCore:

Remove PassRefPtr from svg/properties classes. All the return types and
the local variables should be RefPtr. If we are sure the pointer can't
be null, we use Ref instead.

* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
(WebCore::SVGMarkerElement::orientTypeAnimated):
* svg/SVGMarkerElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
(WebCore::SVGPathElement::pathSegList):
(WebCore::SVGPathElement::animatedPathSegList):
* svg/SVGPathElement.h:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
(WebCore::SVGPolyElement::points):
(WebCore::SVGPolyElement::animatedPoints):
* svg/SVGPolyElement.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
(WebCore::SVGTextContentElement::textLengthAnimated):
* svg/SVGTextContentElement.h:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::transform):
(WebCore::SVGViewSpec::viewBoxAnimated):
(WebCore::SVGViewSpec::preserveAspectRatioAnimated):
(WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
* svg/SVGViewSpec.h:
* svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
(WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
* svg/properties/SVGAnimatedListPropertyTearOff.h:
(WebCore::SVGAnimatedListPropertyTearOff::create):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
* svg/properties/SVGAnimatedProperty.h:
(WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
* svg/properties/SVGAnimatedPropertyMacros.h:
* svg/properties/SVGAnimatedPropertyTearOff.h:
(WebCore::SVGAnimatedPropertyTearOff::create):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
(WebCore::SVGAnimatedStaticPropertyTearOff::create):
* svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
(WebCore::SVGAnimatedTransformListPropertyTearOff::create):
* svg/properties/SVGListProperty.h:
(WebCore::SVGListProperty::initializeValuesAndWrappers):
(WebCore::SVGListProperty::getItemValuesAndWrappers):
(WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
(WebCore::SVGListProperty::replaceItemValuesAndWrappers):
(WebCore::SVGListProperty::removeItemValuesAndWrappers):
(WebCore::SVGListProperty::appendItemValuesAndWrappers):
* svg/properties/SVGListPropertyTearOff.h:
(WebCore::SVGListPropertyTearOff::create):
(WebCore::SVGListPropertyTearOff::initialize):
(WebCore::SVGListPropertyTearOff::getItem):
(WebCore::SVGListPropertyTearOff::insertItemBefore):
(WebCore::SVGListPropertyTearOff::replaceItem):
(WebCore::SVGListPropertyTearOff::removeItem):
(WebCore::SVGListPropertyTearOff::appendItem):
* svg/properties/SVGPathSegListPropertyTearOff.cpp:
(WebCore::SVGPathSegListPropertyTearOff::getItem):
(WebCore::SVGPathSegListPropertyTearOff::replaceItem):
(WebCore::SVGPathSegListPropertyTearOff::removeItem):
* svg/properties/SVGPathSegListPropertyTearOff.h:
(WebCore::SVGPathSegListPropertyTearOff::create):
(WebCore::SVGPathSegListPropertyTearOff::initialize):
(WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
(WebCore::SVGPathSegListPropertyTearOff::appendItem):
* svg/properties/SVGPropertyInfo.h:
* svg/properties/SVGStaticListPropertyTearOff.h:
(WebCore::SVGStaticListPropertyTearOff::create):
* svg/properties/SVGStaticPropertyTearOff.h:
(WebCore::SVGStaticPropertyTearOff::create):
* svg/properties/SVGTransformListPropertyTearOff.h:
(WebCore::SVGTransformListPropertyTearOff::create):
(WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
(WebCore::SVGTransformListPropertyTearOff::consolidate):

Source/WTF:

* wtf/Ref.h:
(WTF::static_reference_cast): Add a stat_cast function to Ref<>.

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

5 years agoUse std::numeric_limits<unsigned>::max() instead of (unsigned)-1.
mark.lam@apple.com [Tue, 10 Mar 2015 20:18:24 +0000 (20:18 +0000)]
Use std::numeric_limits<unsigned>::max() instead of (unsigned)-1.
<https://webkit.org/b/142539>

Reviewed by Benjamin Poulain.

* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::privateCompile):
(JSC::JIT::privateCompileExceptionHandlers):
* jit/JITInlines.h:
(JSC::JIT::emitNakedCall):
(JSC::JIT::addSlowCase):
(JSC::JIT::addJump):
(JSC::JIT::emitJumpSlowToHot):
(JSC::JIT::emitGetVirtualRegister):
* jit/SlowPathCall.h:
(JSC::JITSlowPathCall::call):
* yarr/Yarr.h:

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

5 years agoFix the build
timothy_horton@apple.com [Tue, 10 Mar 2015 20:11:37 +0000 (20:11 +0000)]
Fix the build

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):

* History/WebHistory.mm:
(-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):

* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::startWithHandle):
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):

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

5 years agoExtend URL filter's Term definition to support groups/subpatterns
benjamin@webkit.org [Tue, 10 Mar 2015 20:09:26 +0000 (20:09 +0000)]
Extend URL filter's Term definition to support groups/subpatterns
https://bugs.webkit.org/show_bug.cgi?id=142519

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-10
Reviewed by Alex Christensen.

Source/WebCore:

Pretty simple extension: Term is extended to support holding
a Vector of Term. The quantifier of the Term applies to its
Vector of term as a whole.

To avoid exposing too much internal in the API of Term, I moved
graph generation from GraphBuilder to Term.

Sinking a CharacterSet works as usual. Sinking a Group is done
by sinking each of its Terms one by one and then apply the quantifier
on the whole subgraph. This is done by recursively calling into
Term::generateGraph().

Since groups could be nested, the groups make a stack with the latest
open group on top.
When sinking a floating Term, it is sunk to the latest open group. If there is no open
group, we use the prefix tree and sink the whole subpattern to the graph.

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::Term::Term):
(WebCore::ContentExtensions::Term::extendGroupSubpattern):
(WebCore::ContentExtensions::Term::generateGraph):
(WebCore::ContentExtensions::Term::operator==):
(WebCore::ContentExtensions::Term::hash):
(WebCore::ContentExtensions::Term::isUniversalTransition):
(WebCore::ContentExtensions::Term::generateSubgraphForAtom):
(WebCore::ContentExtensions::Term::destroy):
(WebCore::ContentExtensions::Term::Group::operator==):
(WebCore::ContentExtensions::Term::Group::hash):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
(WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
(WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
(WebCore::ContentExtensions::Term::quantifier): Deleted.
(WebCore::ContentExtensions::Term::visitSimpleTransitions): Deleted.
(WebCore::ContentExtensions::GraphBuilder::addTransitions): Deleted.
(WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm): Deleted.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testURL):

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

5 years agoFix the Mac build with a newer compiler
timothy_horton@apple.com [Tue, 10 Mar 2015 19:36:28 +0000 (19:36 +0000)]
Fix the Mac build with a newer compiler

* Plugins/WebPluginController.mm:
(WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_):
(WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_):

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

5 years ago[Win] JSC Build Warnings Need to be Resolved.
mark.lam@apple.com [Tue, 10 Mar 2015 19:29:13 +0000 (19:29 +0000)]
[Win] JSC Build Warnings Need to be Resolved.
<https://webkit.org/b/142366>

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

Applied some benign changes to make the MSVC compiler happy.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillJSValue):
* runtime/BasicBlockLocation.cpp:
(JSC::BasicBlockLocation::getExecutedRanges):
* runtime/ControlFlowProfiler.cpp:
(JSC::ControlFlowProfiler::hasBasicBlockAtTextOffsetBeenExecuted):

Source/WTF:

* wtf/Compiler.h:
- MSVC also does not have the CONSIDERS_UNREACHABLE_CODE quirk.

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

5 years agoUpgrade Map, Set and WeakMap constructor interface
utatane.tea@gmail.com [Tue, 10 Mar 2015 19:13:48 +0000 (19:13 +0000)]
Upgrade Map, Set and WeakMap constructor interface
https://bugs.webkit.org/show_bug.cgi?id=142348

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

In the latest ES6 spec, Map and Set constructors take initialization data sets
as iterable value. And iterate it and add the values into the constructed one.

This is breaking change because the old constructor interface is
already shipped in Safari 8.

* runtime/MapConstructor.cpp:
(JSC::callMap):
(JSC::constructMap):
(JSC::MapConstructor::getCallData):
* runtime/SetConstructor.cpp:
(JSC::callSet):
(JSC::constructSet):
* runtime/WeakMapConstructor.cpp:
(JSC::callWeakMap):
(JSC::constructWeakMap):
(JSC::WeakMapConstructor::getCallData):
* tests/stress/map-constructor-adder.js: Added.
* tests/stress/map-constructor.js: Added.
(testCallTypeError):
(testTypeError):
(for):
* tests/stress/set-constructor-adder.js: Added.
(Set.prototype.add):
* tests/stress/set-constructor.js: Added.
(for):
* tests/stress/weak-map-constructor-adder.js: Added.
* tests/stress/weak-map-constructor.js: Added.
(testCallTypeError):
(testTypeError):
(for):

LayoutTests:

Constructor semantics is changed.

* js/basic-map-expected.txt:
* js/basic-set-expected.txt:
* js/dom/basic-weakmap-expected.txt:
* js/script-tests/basic-map.js:
* js/script-tests/basic-set.js:
(set new):

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

5 years agoAdjustments to media control fonts.
roger_fong@apple.com [Tue, 10 Mar 2015 19:04:54 +0000 (19:04 +0000)]
Adjustments to media control fonts.
https://bugs.webkit.org/show_bug.cgi?id=142509.
<rdar://problem/20085228>
Reviewed by Darin Adler.
Use system font for controls. Adjust surrounding divs accordingly.
Apply subpixel antialiasing to all media control text.
* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls):
(audio::-webkit-media-controls-closed-captions-container .list):
(audio::-webkit-media-controls-status-display):
(audio::-webkit-media-controls-time-remaining-display):
(audio::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-time-remaining-display.five-digit-time):
(audio::-webkit-media-controls-current-time-display.five-digit-time):
(audio::-webkit-media-controls-time-remaining-display.six-digit-time):
(audio::-webkit-media-controls-current-time-display.six-digit-time):

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

5 years agoWeb Inspector: Destructuring function parameters should show type information
saambarati1@gmail.com [Tue, 10 Mar 2015 18:47:04 +0000 (18:47 +0000)]
Web Inspector: Destructuring function parameters should show type information
https://bugs.webkit.org/show_bug.cgi?id=142233

Reviewed by Joseph Pecoraro.

JSC supports a function's formal parameter being a destructuring pattern,
and so should the type profiler in the Inspector. This was just an oversight
not to have this in bug 141215.

This patch also does a bit of refactoring to not have duplicate code
that traverses AST nodes in TypeTokenAnnotator and ScriptSyntaxTree.
Before, both of these classes were responsible for traversing the AST
in an identical way, this is bad. Now, ScriptSyntaxTree contains the
canonical implementation of how the AST should be traversed and which
AST nodes should be collected for type profiling. ScriptSyntaxTree will
pass this information back to TypeTokenAnnotator.

* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
(WebInspector.TypeTokenAnnotator.prototype._insertTypeTokensForEachNode): Deleted.
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype.):
(WebInspector.ScriptSyntaxTree.prototype.updateTypes):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WebInspector.ScriptSyntaxTree.prototype.gatherIdentifiersInVariableDeclaration): Deleted.

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

5 years agoToo large plugins are crashing.
rgabor@webkit.org [Tue, 10 Mar 2015 18:17:18 +0000 (18:17 +0000)]
Too large plugins are crashing.
https://bugs.webkit.org/show_bug.cgi?id=139856

Reviewed by Darin Adler.

Add layout test to cover this crash.

* plugins/large-plugin-crash-expected.txt: Added.
* plugins/large-plugin-crash.html: Added.

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

5 years agobmalloc: tryFastMalloc shouldn't crash
ggaren@apple.com [Tue, 10 Mar 2015 18:00:59 +0000 (18:00 +0000)]
bmalloc: tryFastMalloc shouldn't crash
https://bugs.webkit.org/show_bug.cgi?id=142443

Reviewed by Sam Weinig.

Rolling back in r181307 with a check for whether bmalloc is enabled, to
avoid crashes when running with ASan and GuardMalloc.

Source/bmalloc:

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::tryAllocate):
* bmalloc/Allocator.h:
* bmalloc/Cache.cpp:
(bmalloc::Cache::tryAllocateSlowCaseNullCache):
* bmalloc/Cache.h:
(bmalloc::Cache::tryAllocate):
* bmalloc/Heap.cpp:
(bmalloc::Heap::allocateXLarge):
(bmalloc::Heap::tryAllocateXLarge):
* bmalloc/Heap.h:
* bmalloc/VMAllocate.h:
(bmalloc::tryVMAllocate):
(bmalloc::vmAllocate):
* bmalloc/bmalloc.h:
(bmalloc::api::tryMalloc):
(bmalloc::api::realloc):
(bmalloc::api::free):

Source/WTF:

* wtf/FastMalloc.cpp:
(WTF::fastMalloc):
(WTF::fastRealloc):
(WTF::fastAlignedMalloc):
(WTF::tryFastMalloc):
(WTF::tryFastRealloc): Deleted.
* wtf/FastMalloc.h:

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

5 years agoFixed a crash in CertificateInfo::containsNonRootSHA1SignedCertificate when loading...
mitz@apple.com [Tue, 10 Mar 2015 17:55:21 +0000 (17:55 +0000)]
Fixed a crash in CertificateInfo::containsNonRootSHA1SignedCertificate when loading a non-HTTPS webapge.

Reviewed by Anders Carlsson.

* platform/network/mac/CertificateInfoMac.mm:
(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Null-check the certificate chain.

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

5 years agoFixed the build.
mitz@apple.com [Tue, 10 Mar 2015 16:31:49 +0000 (16:31 +0000)]
Fixed the build.

* platform/spi/cocoa/SecuritySPI.h:

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

5 years agoGCC: CRASH() should be annotated with NORETURN
commit-queue@webkit.org [Tue, 10 Mar 2015 16:01:51 +0000 (16:01 +0000)]
GCC: CRASH() should be annotated with NORETURN
https://bugs.webkit.org/show_bug.cgi?id=142524

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-03-10
Reviewed by Anders Carlsson.

Source/JavaScriptCore:

Don't return from a NORETURN function. This used to avoid a warning from GCC, but now it
causes one.

* jsc.cpp:

Source/WTF:

Add COMPILER(GCC) to #ifdefs that already exist for Clang.

* wtf/Assertions.cpp:
* wtf/Assertions.h:

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

5 years agoSimple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextF...
zalan@apple.com [Tue, 10 Mar 2015 15:16:24 +0000 (15:16 +0000)]
Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
https://bugs.webkit.org/show_bug.cgi?id=142344

Reviewed by Antti Koivisto.

This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
the segment looping and position handling logic are no longer duplicated. It also unifies
the static next*() functions' signature.

No change in functionality.

* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
(WebCore::SimpleLineLayout::nextBreakablePosition):
(WebCore::SimpleLineLayout::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
(WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.h:

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

5 years ago[GTK] Contents not shown when entering AC mode unless the window is resized
carlosgc@webkit.org [Tue, 10 Mar 2015 13:38:31 +0000 (13:38 +0000)]
[GTK] Contents not shown when entering AC mode unless the window is resized
https://bugs.webkit.org/show_bug.cgi?id=142347

Reviewed by Žan Doberšek.

The problem is once again that we are now creating the redirected
X window in realize method. When entering AC mode we resize the
redirected window to the drawing area size. Since the size hasn't
changed from the drawing area point of view, the web process is
not notified. The WebProcess always uses the window size, instead
of the root layer size, to make sure it's in sync, see the comment
in LayerTreeHostGtk::compositeLayersToContext(). So, we need to
enforce a resize when we change the size of the redirected window
when entering AC mode.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseEnterAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
(WebKit::DrawingAreaProxyImpl::forceResize):

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

5 years ago[GTK] GL_MAX_VARYING_FLOATS is not defined in OpenGL ES 2
carlosgc@webkit.org [Tue, 10 Mar 2015 13:26:35 +0000 (13:26 +0000)]
[GTK] GL_MAX_VARYING_FLOATS is not defined in OpenGL ES 2
https://bugs.webkit.org/show_bug.cgi?id=142529

Reviewed by Žan Doberšek.

Do not use GL_MAX_VARYING_FLOATS when platform is GTK+ and using
OpenGL ES 2.

* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::checkVaryingsPacking):

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

5 years agoUnreviewed. Fix GTK+ build with OpenGL ES 2 enabled.
carlosgc@webkit.org [Tue, 10 Mar 2015 13:23:40 +0000 (13:23 +0000)]
Unreviewed. Fix GTK+ build with OpenGL ES 2 enabled.

Remove USE(OPENGL) ifdef from GLContext.cpp, since there's nothing
specific to OpenGL in that file, and everything depending on
configure options is already protected by USE(GLX) and USE(EGL)
ifdefs. This is causing linking issues when building with OpenGL
ES 2, because the header doesn't have the ifdef, and the cpp file
is not compiled leaving all the interface undefined.

Patch by José Dapena Paz <jdapena@igalia.com> on 2015-03-10
Rubber-stamped by Carlos Garcia Campos.

* platform/graphics/GLContext.cpp:

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

5 years ago[GTK] Add a configure option to build with OpenGL ES 2
carlosgc@webkit.org [Tue, 10 Mar 2015 13:19:35 +0000 (13:19 +0000)]
[GTK] Add a configure option to build with OpenGL ES 2
https://bugs.webkit.org/show_bug.cgi?id=142498

Patch by Carlos Garcia Campos  <cgarcia@igalia.com> and José Dapena Paz <jdapena@igalia.com> on 2015-03-10
Reviewed by Martin Robinson.

.:

Add ENABLE_GLES2 option. It's disabled by default, but if passed
GLES2 is required and OpenGL is not even searched. Otherwise we
search for OpenGL as usual, using it only if present.

* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Build GLES or GL specific files depending on the build options.

* PlatformGTK.cmake:

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

5 years agoShrink the CSSPropertyID enum type
zandobersek@gmail.com [Tue, 10 Mar 2015 09:21:20 +0000 (09:21 +0000)]
Shrink the CSSPropertyID enum type
https://bugs.webkit.org/show_bug.cgi?id=142456

Reviewed by Sam Weinig.

Specify uint16_t as the base type for the CSSPropertyID enum.
This is enough to cover all of the CSS properties (429 at this moment,
with static_assert covering future changes). It halves the enum type size,
from 4 bytes to 2, reducing the size of various CSSPropertyID containers.

No new tests -- no change in behavior.

* css/CSSPrimitiveValue.cpp:
(WebCore::propertyName): Remove the unnecessary propertyID < 0 check.
* css/makeprop.pl:

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

5 years agoGardening: fix bleeding debug test bots.
mark.lam@apple.com [Tue, 10 Mar 2015 08:47:24 +0000 (08:47 +0000)]
Gardening: fix bleeding debug test bots.
https://webkit.org/b/142513>

Not reviewed.

The test needs to initialize WTF threading explicitly before using it.

* API/tests/CompareAndSwapTest.cpp:
(testCompareAndSwap):

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

5 years ago[cmake] Handle unused parameter warnings as build errors except in WebKit2
ossy@webkit.org [Tue, 10 Mar 2015 08:33:30 +0000 (08:33 +0000)]
[cmake] Handle unused parameter warnings as build errors except in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=142338

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/WebKitHelpers.cmake:

Source/WebKit2:

* CMakeLists.txt:

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

5 years agoSource/WebCore:
mitz@apple.com [Tue, 10 Mar 2015 07:34:06 +0000 (07:34 +0000)]
Source/WebCore:
WebCore part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
https://bugs.webkit.org/show_bug.cgi?id=142461

Reviewed by Sam Weinig.

* WebCore.xcodeproj/project.pbxproj: Added reference to SecuritySPI.h and sorted the
spi/cocoa group.

* platform/network/cf/CertificateInfo.h: Declared new member function
containsNonRootSHA1SignedCertificate.

* platform/network/mac/CertificateInfoMac.mm:
(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Added. Checks if any but
the last certificate in the chain uses SHA-1 as its signature hash algorithm.

* platform/network/curl/CertificateInfo.h:
(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Added notImplemented
implementation.

* platform/network/soup/CertificateInfo.h:
(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Ditto.

* platform/spi/cocoa/SecuritySPI.h: Added.

Source/WebKit2:
WebKit2 part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
https://bugs.webkit.org/show_bug.cgi?id=142461

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Initialize
webPageConfiguration.treatsSHA1SignedCertificatesAsInsecure from the WKWebViewConfiguration.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
Added _treatsSHA1SignedCertificatesAsInsecure ivar.
(-[WKWebViewConfiguration copyWithZone:]): Copy _treatsSHA1SignedCertificatesAsInsecure.
(-[WKWebViewConfiguration _treatsSHA1SignedCertificatesAsInsecure]): Added this getter.
(-[WKWebViewConfiguration _setTreatsSHA1SignedCertificatesAsInsecure:]): Added this setter.

* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared new
_treatsSHA1SignedCertificatesAsInsecure property.

* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::didCommitLoad): Use new hasInsecureContent parameter to initialize
hasInsecureContent parameter in the uncommitted state.
* UIProcess/PageLoadState.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize new m_treatsSHA1CertificatesAsInsecure
member variable from the WebPageConfiguration.
(WebKit::WebPageProxy::didCommitLoadForFrame): Pass true for the new hasInsecureContent to
PageLoadState::didCommitLoad if we are treating SHA1-signed certificates as insecure and
the certificate info contains a non-root SHA1-signed certificate.
* UIProcess/WebPageProxy.h: Added m_treatsSHA1CertificatesAsInsecure member variable.

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

5 years ago[WinCairo] Unreviewed build fix.
achristensen@apple.com [Tue, 10 Mar 2015 07:15:52 +0000 (07:15 +0000)]
[WinCairo] Unreviewed build fix.

* JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props:
Added directory containing config.h, like r181304.

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

5 years agoYet another build fix for Windows.
mark.lam@apple.com [Tue, 10 Mar 2015 06:56:28 +0000 (06:56 +0000)]
Yet another build fix for Windows.
https://webkit.org/b/142513>

Reviewed by Alex Christensen.

Looks like MSVC requires the function be explicitly declared in a header file
in order for it to be linkable from another file in the same project.  This is
strange, but it seems to make MSVC happy.

Also fixed a typo in testapi.vcxproj.filters.

* API/tests/CompareAndSwapTest.cpp:
* API/tests/CompareAndSwapTest.h: Added.
* API/tests/testapi.c:
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:

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

5 years agoSkip contentfiltering/block-after-add-data.html for now.
ap@apple.com [Tue, 10 Mar 2015 06:54:27 +0000 (06:54 +0000)]
Skip contentfiltering/block-after-add-data.html for now.
https://bugs.webkit.org/show_bug.cgi?id=142526

* TestExpectations:

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

5 years agoUnreviewed, rolling out r181307.
commit-queue@webkit.org [Tue, 10 Mar 2015 06:50:17 +0000 (06:50 +0000)]
Unreviewed, rolling out r181307.
https://bugs.webkit.org/show_bug.cgi?id=142525

Broke ASan tests (Requested by ap on #webkit).

Reverted changeset:

"bmalloc: tryFastMalloc shouldn't crash"
https://bugs.webkit.org/show_bug.cgi?id=142443
http://trac.webkit.org/changeset/181307

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