WebKit-https.git
5 years agoBuilding MediaDeviceInfo for enumerateDevices
commit-queue@webkit.org [Thu, 25 Jun 2015 01:15:00 +0000 (01:15 +0000)]
Building MediaDeviceInfo for enumerateDevices
https://bugs.webkit.org/show_bug.cgi?id=146257
<rdar://problem/21513462>

Patch by Matt Daiter <mdaiter@apple.com> on 2015-06-24
Reviewed by Eric Carlson.

MediaDeviceInfo necessary for enumerateDevices

* CMakeLists.txt: Added MediaDevicesInfo.idl
* DerivedSources.make: Added MediaDevicesInfo.idl
* Modules/mediastream/MediaDeviceInfo.h: Created class for MediaDevicesInfo
(WebCore::MediaDeviceInfo::create): Allocates class
(WebCore::MediaDeviceInfo::MediaDeviceInfo): Creates class for public
(WebCore::MediaDeviceInfo::~MediaDeviceInfo):
(WebCore::MediaDeviceInfo::label):
(WebCore::MediaDeviceInfo::deviceId):
(WebCore::MediaDeviceInfo::groupId):
(WebCore::MediaDeviceInfo::kind):
* Modules/mediastream/MediaDeviceInfo.idl:
* WebCore.xcodeproj/project.pbxproj:

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

5 years agoDetect view services by using the "com.apple.UIKit.vends-view-services" entitlement
andersca@apple.com [Thu, 25 Jun 2015 00:35:26 +0000 (00:35 +0000)]
Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
https://bugs.webkit.org/show_bug.cgi?id=146301

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/cocoa/SecuritySPI.h:

Source/WebKit2:

* UIProcess/ApplicationStateTracker.mm:
(WebKit::hasEntitlement):
(WebKit::isViewService):

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

5 years agoWebContent process is unreponsive/idle when WKWebView is inside a view service.
andersca@apple.com [Wed, 24 Jun 2015 23:56:24 +0000 (23:56 +0000)]
WebContent process is unreponsive/idle when WKWebView is inside a view service.
https://bugs.webkit.org/show_bug.cgi?id=146296

Reviewed by Tim Horton.

* Platform/spi/ios/AssertionServicesSPI.h: Renamed from Source/WebKit2/Platform/spi/ios/BKSProcessAssertionSPI.h.
Rename this and add SPI for BKSApplicationStateMonitor.

* Platform/spi/ios/UIKitSPI.h:
Add _UIApplicationIsExtension SPI.

* UIProcess/ApplicationStateTracker.mm:
(WebKit::isViewService):
Return whether we're an extension or the safari view controller service.

(WebKit::isBackgroundState):
Helper function that returns whether a given BKSApplicationState is a background state.

(WebKit::ApplicationStateTracker::ApplicationStateTracker):
If we're a view service, create a BKSApplicationStateMonitor and listen for state changes for our pid.

* UIProcess/ios/ProcessAssertionIOS.mm:
Update #import.

* WebKit2.xcodeproj/project.pbxproj:
Update for rename.

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

5 years agoWeb Inspector: Pressing tab in the styles sidebar shouldn't insert a tab character
commit-queue@webkit.org [Wed, 24 Jun 2015 23:54:12 +0000 (23:54 +0000)]
Web Inspector: Pressing tab in the styles sidebar shouldn't insert a tab character
https://bugs.webkit.org/show_bug.cgi?id=146189

Patch by Devin Rousso <drousso@apple.com> on 2015-06-24
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorCompletionController.js: Added variable to control whether semicolons are added to the end of autocompleted css values.
(WebInspector.CodeMirrorCompletionController):
(WebInspector.CodeMirrorCompletionController.prototype.set noEndingSemicolon):
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorSwitchRule):
(WebInspector.CSSStyleDeclarationSection.prototype.focusRuleSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.selectLastProperty):
(WebInspector.CSSStyleDeclarationSection.prototype.get selectorLocked):
(WebInspector.CSSStyleDeclarationSection.prototype.get locked):
(WebInspector.CSSStyleDeclarationSection.prototype._handleKeyDown):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor): Added functions for "Tab", "Shift-Tab", and "Shift-Enter" keypresses to improve usability.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.selectFirstProperty): Highlights the first property.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.selectLastProperty): Highlights the last property.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._insertNewlineAfterCurrentLine): Inserts a newline after the currently selected line.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey.switchRule):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey): Pressing shift-tab will move the cursor to the previous non-word character that is immediately after a word character.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey.switchRule):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey.highlightNextNameOrValue):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey): Pressing tab will move the cursor to each space character until the end of the line is reached, at
which point the cursor will move to the beginning of the next line.  Once the cursor is at the last line, pressing tab again will insert a newline.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorNextRule): Switches the focused rule to the next section.
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorPrevRule): Switches the focused rule to the previous section.

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

5 years agoAdd a new color -apple-wireless-playback-target-active
commit-queue@webkit.org [Wed, 24 Jun 2015 23:48:11 +0000 (23:48 +0000)]
Add a new color -apple-wireless-playback-target-active
https://bugs.webkit.org/show_bug.cgi?id=146269
<rdar://problem/21465189>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-06-24
Reviewed by Dean Jackson.

Source/WebCore:

At the moment we use -apple-system-blue to indicate an Airplay route is
active. This might not always be blue, so we need to add another system
color with a name that will allow us to change the underlying color.
Initially -apple-wireless-playback-target-active will be an alias to
-apple-system-blue.

Existing tests are modified to include the new color value.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateWirelessTargetPickerButton):
* Modules/mediacontrols/mediaControlsiOS.css:
(video::-webkit-media-controls-wireless-playback-picker-button.playing):
Use the new color value in the media controls.

* css/CSSParser.cpp:
(WebCore::isAppleLegacyCssValueKeyword): Returns true if the value keyword
has an '-apple' prefix which has to be replaced by '-webkit'

(WebCore::cssValueKeywordID): Call a new function which handles all the
'-apple' legacy keywords.

* css/CSSValueKeywords.in: Define the new color keyword.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemColor):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor):
Define the value of the new color keyword to be an alias of systemBlueColor.

LayoutTests:

Modify existing tests to include the new color value.

* fast/css/apple-system-colors-expected.txt:
* fast/css/apple-system-colors.html:
* platform/ios-simulator/fast/css/apple-system-colors-expected.txt:
* platform/mac-mavericks/fast/css/apple-system-colors-expected.txt:
* platform/mac/fast/css/apple-system-colors-expected.txt:

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

5 years agoWeb Inspector: console.group looks poor in console
joepeck@webkit.org [Wed, 24 Jun 2015 23:44:33 +0000 (23:44 +0000)]
Web Inspector: console.group looks poor in console
https://bugs.webkit.org/show_bug.cgi?id=146295

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
String for the default group name if you use console.group() without a name parameter.

* UserInterface/Views/LogContentView.css:
(.console-group-title::before):
Tweak the positioning and eliminate the log level ::before image.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
Reorder a bit to reduce a couple branches.

(WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
Take a very straightforward approach for group names.

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

5 years agoCrash on gog.com due to PolymorphicCallNode's having stale references to CallLinkInfo
msaboff@apple.com [Wed, 24 Jun 2015 22:50:44 +0000 (22:50 +0000)]
Crash on gog.com due to PolymorphicCallNode's having stale references to CallLinkInfo
https://bugs.webkit.org/show_bug.cgi?id=146285

Reviewed by Filip Pizlo.

CallLinkInfo's contain a RefPtr to a PolymorphicCallStubRoutine, named stub, which contains
a collection of PolymorphicCallNode.  Those PolymorphicCallNodes have a reference back to the
CallLinkInfo.  When a CallLinkInfo replaces or clears "stub", the ref count of the
PolymorphicCallStubRoutine is decremented as expected, but since it inherits from
GCAwareJITStubRoutine, it isn't actually deleted until GC.  In the mean time, the original
CallLinkInfo can go away.  If PolymorphicCallNode::unlink() is called at that point,
it will try to unlink a now deleted CallLinkInfo and crash as a result.

The fix is to clear the CallLinkInfo references from any PolymorphicCallNode objects when
when we set a new stub or clear an existing stub for a CallLinkInfo.  This is done by
calling PolymorphicCallNode::clearCallNodesFor() on the old stub.

The prior code would only call clearCallNodesFor() from the CallLinkInfo destructor.
This only took care of the last PolymorphicCallStubRoutine held in the CallLinkInfo.
Any prior PolymorphicCallStubRoutine would still have a, now bad, reference to the CallLinkInfo.

In the process I refactored CallLinkInfo from a struct to a class with proper accessors and
made all the data elements private.

* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::clearStub): Updated to call PolymorphicCallStubRoutine::clearCallNodesFor()
to clear the back references to this CallLinkInfo.
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::~CallLinkInfo): Moved clearCallNodesFor() call to clearStub().
(JSC::CallLinkInfo::setStub): Clear any prior stub before changing to the new stub.

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

5 years agoWork towards: Add status of Safari projects on iOS Dashboard on build-safari
commit-queue@webkit.org [Wed, 24 Jun 2015 22:41:39 +0000 (22:41 +0000)]
Work towards: Add status of Safari projects on iOS Dashboard on build-safari
https://bugs.webkit.org/show_bug.cgi?id=146126
<rdar://problem/18226291>

Patch by Jason Marcell <jmarcell@apple.com> on 2015-06-24
Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
(documentReady): Using combined queues to display iOS projects

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

5 years agoRefactor CallLinkInfo from a struct to a class
msaboff@apple.com [Wed, 24 Jun 2015 22:37:30 +0000 (22:37 +0000)]
Refactor CallLinkInfo from a struct to a class
https://bugs.webkit.org/show_bug.cgi?id=146292

Rubber stamped by Filip Pizlo.

Refactored CallLinkInfo from a struct to a class with proper accessors and made all the
data elements private.

Done in preparation for fixing https://bugs.webkit.org/show_bug.cgi?id=146285.

* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::clearStub):
(JSC::CallLinkInfo::unlink):
(JSC::CallLinkInfo::visitWeak):
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::callTypeFor):
(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::~CallLinkInfo):
(JSC::CallLinkInfo::specializationKindFor):
(JSC::CallLinkInfo::specializationKind):
(JSC::CallLinkInfo::isLinked):
(JSC::CallLinkInfo::setUpCall):
(JSC::CallLinkInfo::setCallLocations):
(JSC::CallLinkInfo::setUpCallFromFTL):
(JSC::CallLinkInfo::callReturnLocation):
(JSC::CallLinkInfo::hotPathBegin):
(JSC::CallLinkInfo::hotPathOther):
(JSC::CallLinkInfo::setCallee):
(JSC::CallLinkInfo::clearCallee):
(JSC::CallLinkInfo::callee):
(JSC::CallLinkInfo::setLastSeenCallee):
(JSC::CallLinkInfo::clearLastSeenCallee):
(JSC::CallLinkInfo::lastSeenCallee):
(JSC::CallLinkInfo::haveLastSeenCallee):
(JSC::CallLinkInfo::setStub):
(JSC::CallLinkInfo::stub):
(JSC::CallLinkInfo::seenOnce):
(JSC::CallLinkInfo::clearSeen):
(JSC::CallLinkInfo::setSeen):
(JSC::CallLinkInfo::hasSeenClosure):
(JSC::CallLinkInfo::setHasSeenClosure):
(JSC::CallLinkInfo::clearedByGC):
(JSC::CallLinkInfo::setCallType):
(JSC::CallLinkInfo::callType):
(JSC::CallLinkInfo::addressOfMaxNumArguments):
(JSC::CallLinkInfo::maxNumArguments):
(JSC::CallLinkInfo::offsetOfSlowPathCount):
(JSC::CallLinkInfo::setCalleeGPR):
(JSC::CallLinkInfo::calleeGPR):
(JSC::CallLinkInfo::slowPathCount):
(JSC::CallLinkInfo::setCodeOrigin):
(JSC::CallLinkInfo::codeOrigin):
(JSC::getCallLinkInfoCodeOrigin):
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeFromCallLinkInfo):
(JSC::CallLinkStatus::computeDFGStatuses):
* bytecode/CallLinkStatus.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printCallOp):
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLJSCallBase.cpp:
(JSC::FTL::JSCallBase::link):
* jit/AccessorCallJITStubRoutine.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileSetupVarargsFrame):
(JSC::JIT::compileOpCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileSetupVarargsFrame):
(JSC::JIT::compileOpCall):
* jit/JITOperations.cpp:
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallNode::unlink):
(JSC::PolymorphicCallNode::clearCallLinkInfo):
* jit/PolymorphicCallStubRoutine.h:
* jit/Repatch.cpp:
(JSC::generateByIdStub):
(JSC::linkSlowFor):
(JSC::linkFor):
(JSC::revertCall):
(JSC::unlinkFor):
(JSC::linkPolymorphicCall):
* jit/ThunkGenerators.cpp:
(JSC::virtualForThunkGenerator):

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

5 years agoMediaSession: propagate MediaSessionMetadata to WebPageProxy
mrajca@apple.com [Wed, 24 Jun 2015 22:36:07 +0000 (22:36 +0000)]
MediaSession: propagate MediaSessionMetadata to WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=146282

Reviewed by Darin Adler and Tim Horton.

WebCore:
* Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::setMetadata):

WebKit2:
* Shared/WebCoreArgumentCoders.cpp: Added ArgumentEncoder support for MediaSessionMetadata so we can send it
  through the web page proxy.
(IPC::ArgumentCoder<MediaSessionMetadata>::encode):
(IPC::ArgumentCoder<MediaSessionMetadata>::decode):
* Shared/WebCoreArgumentCoders.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mediaSessionMetadataDidChange):
* UIProcess/WebPageProxy.h: Receive mediaSessionMetadataDidChange in the web page proxy.
* UIProcess/WebPageProxy.messages.in: Added a new MediaSessionMetadataDidChange message.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mediaSessionMetadataDidChange): Push a mediaSessionMetadataDidChange message through the web page proxy.
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

5 years agoWeb Inspector: Show warning icon for invalid CSS properties and/or values
commit-queue@webkit.org [Wed, 24 Jun 2015 22:17:42 +0000 (22:17 +0000)]
Web Inspector: Show warning icon for invalid CSS properties and/or values
https://bugs.webkit.org/show_bug.cgi?id=145657

Patch by Devin Rousso <drousso@apple.com> on 2015-06-24
Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSCompletions.js:
(WebInspector.CSSCompletions.prototype.getClosestPropertyName): Calculates the levenshtein distance between a given property and every existing property name.  Returns the property name with the smallest distance or, in the case of multiple properties having the same distance, the first property in alphabetical order.
(WebInspector.CSSCompletions.prototype.propertyRequiresWebkitPrefix): Retruns if the property name exists only with a '-webkit-' prefix.
(WebInspector.CSSCompletions):
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .invalid-warning-marker):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .invalid-warning-marker.clickable:hover):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded.duplicatePropertyExistsBelow): Determines if there exists a property below (visually) the given property that has the same name.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded.generateInvalidMarker): Creates a warning icon marker at the given position with the given title.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded.instancesOfProperty): Returns the number of properties in the rule that have the same name.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): A button with a warning icon is now added to the beginning of an invalid property.  If this button is clicked, the property is replaced with the closest matching property and the autocomplete menu is opened.

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

5 years agoNull dereference in DocumentLoader::areAllLoadersPageCacheAcceptable()
cdumez@apple.com [Wed, 24 Jun 2015 21:43:54 +0000 (21:43 +0000)]
Null dereference in DocumentLoader::areAllLoadersPageCacheAcceptable()
https://bugs.webkit.org/show_bug.cgi?id=146286
<rdar://problem/21523788>

Reviewed by Sam Weinig.

Add null check for the Page in areAllLoadersPageCacheAcceptable()
to fix this top crasher until I can investigate how this can happen.

* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable):

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

5 years agoMove PluginMainThreadScheduler to WebKit/win
andersca@apple.com [Wed, 24 Jun 2015 21:34:28 +0000 (21:34 +0000)]
Move PluginMainThreadScheduler to WebKit/win
https://bugs.webkit.org/show_bug.cgi?id=146289

Reviewed by Tim Horton.

Source/WebCore:

* CMakeLists.txt:
* Configurations/WebCore.xcconfig:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* plugins/PluginMainThreadScheduler.cpp:
(WebCore::PluginMainThreadScheduler::scheduler): Deleted.
(WebCore::PluginMainThreadScheduler::PluginMainThreadScheduler): Deleted.
(WebCore::PluginMainThreadScheduler::scheduleCall): Deleted.
(WebCore::PluginMainThreadScheduler::registerPlugin): Deleted.
(WebCore::PluginMainThreadScheduler::unregisterPlugin): Deleted.
(WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): Deleted.
(WebCore::PluginMainThreadScheduler::dispatchCalls): Deleted.
(WebCore::PluginMainThreadScheduler::mainThreadCallback): Deleted.
* plugins/PluginMainThreadScheduler.h:
(WebCore::PluginMainThreadScheduler::Call::Call): Deleted.
(WebCore::PluginMainThreadScheduler::Call::performCall): Deleted.

Source/WebKit:

* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:

Source/WebKit/win:

* Plugins/PluginMainThreadScheduler.cpp: Renamed from Source/WebCore/plugins/PluginMainThreadScheduler.cpp.
(WebCore::PluginMainThreadScheduler::scheduler):
(WebCore::PluginMainThreadScheduler::PluginMainThreadScheduler):
(WebCore::PluginMainThreadScheduler::scheduleCall):
(WebCore::PluginMainThreadScheduler::registerPlugin):
(WebCore::PluginMainThreadScheduler::unregisterPlugin):
(WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):
(WebCore::PluginMainThreadScheduler::dispatchCalls):
(WebCore::PluginMainThreadScheduler::mainThreadCallback):
* Plugins/PluginMainThreadScheduler.h: Renamed from Source/WebCore/plugins/PluginMainThreadScheduler.h.
(WebCore::PluginMainThreadScheduler::Call::Call):
(WebCore::PluginMainThreadScheduler::Call::performCall):
* Plugins/PluginView.cpp:

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

5 years agoBetter fix for Element with blur backdrop-filter shows edge duplication and dark...
dino@apple.com [Wed, 24 Jun 2015 20:54:28 +0000 (20:54 +0000)]
Better fix for Element with blur backdrop-filter shows edge duplication and dark edges
https://bugs.webkit.org/show_bug.cgi?id=146287
<rdar://problem/21530437>

Reviewed by Simon Fraser.

There is no need to carry around a bit in FilterOperations indicating what
type of source property the object came from. Whether or not to clip to the
bounds of the filter region is purely a property of the type of CALayer
we are applying the filter to.

This basically reverts r185846.

Covered by the test for the previous commit.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBackdropFilterOperations): Deleted.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilterOperations): Deleted.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Set the normalized
edges property if we are a CABackdropLayer.
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::operator==):
(WebCore::FilterOperations::operationsMatch):
(WebCore::FilterOperations::operator=): Deleted.
* platform/graphics/filters/FilterOperations.h:
(WebCore::FilterOperations::isUsedForBackdropFilters): Deleted.
(WebCore::FilterOperations::setUsedForBackdropFilters): Deleted.

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

5 years agoSource/JavaScriptCore:
commit-queue@webkit.org [Wed, 24 Jun 2015 20:51:13 +0000 (20:51 +0000)]
Source/JavaScriptCore:
Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject
when posting a selection notification when on the border between two accessibilityObjects
https://bugs.webkit.org/show_bug.cgi?id=146177

Add an adopt() function to simplify JSRetainPtr<JSStringRef> { Adopt, string } to adopt(string).

Patch by Doug Russell <d_russell@apple.com> on 2015-06-24
Reviewed by Darin Adler.

* API/JSRetainPtr.h:
(adopt):

Source/WebCore:
Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject
when posting a selection notification when on the border between two accessibilityObjects
https://bugs.webkit.org/show_bug.cgi?id=146177

Patch by Doug Russell <d_russell@apple.com> on 2015-06-24
Reviewed by Darin Adler.

Add support for position to be passed for selection changes to allow checking.
for boundaries in the case of ignored elements.
Add support for searching for unignored siblings of AccessibilityObjects.
Include AccessibilityObject wrappers in notifications for tests.

Test: platform/mac/accessibility/selection-element-tabbing-to-link.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postTextStateChangeNotification):
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::previousSiblingUnignored):
(WebCore::AccessibilityObject::nextSiblingUnignored):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(isValueTypeSupported):
(arrayRemovingNonSupportedTypes):
(dictionaryRemovingNonSupportedTypes):
(-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
* editing/mac/FrameSelectionMac.mm:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):

Tools:
Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject
when posting a selection notification when on the border between two accessibilityObjects
https://bugs.webkit.org/show_bug.cgi?id=146177

Patch by Doug Russell <d_russell@apple.com> on 2015-06-24
Reviewed by Darin Adler.

Add support for mapping WebCore Accessibility types into JSValueRef types
so they can be used in tests.

* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(webAccessibilityObjectWrapperClass):
(-[AccessibilityNotificationHandler startObserving]):
(makeValueRefForValue):
(makeArrayRefForArray):
(makeObjectRefForDictionary):
(-[AccessibilityNotificationHandler _notificationReceived:]):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(webAccessibilityObjectWrapperClass):
(-[AccessibilityNotificationHandler startObserving]):
(makeValueRefForValue):
(makeArrayRefForArray):
(makeObjectRefForDictionary):
(-[AccessibilityNotificationHandler _notificationReceived:]):

LayoutTests:
Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject
when posting a selection notification when on the border between two accessibilityObjects
https://bugs.webkit.org/show_bug.cgi?id=146177

Add test for forward and backward tabbing between links and corresponding notifications
change element

Patch by Doug Russell <d_russell@apple.com> on 2015-06-24
Reviewed by Darin Adler.

* platform/mac/accessibility/selection-element-tabbing-to-link-expected.txt: Added.
* platform/mac/accessibility/selection-element-tabbing-to-link.html: Added.

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

5 years agoEnable -Winconsistent-missing-override when building with Xcode
andersca@apple.com [Wed, 24 Jun 2015 20:48:13 +0000 (20:48 +0000)]
Enable -Winconsistent-missing-override when building with Xcode
https://bugs.webkit.org/show_bug.cgi?id=146288

Reviewed by Sam Weinig.

* Configurations/Base.xcconfig:
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/webdatabase/DatabaseTask.h:
* html/DateTimeLocalInputType.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::platformLayer): Deleted.
(WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Deleted.
(WebCore::MediaPlayerPrivateAVFoundation::fileSize): Deleted.
(WebCore::MediaPlayerPrivateAVFoundation::engineDescription): Deleted.
(WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode): Deleted.
(WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Deleted.
* platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
(WebCore::VideoTrackPrivateAVF::trackIndex): Deleted.
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
(WebCore::CDMSessionAVFoundationObjC::type): Deleted.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
(WebCore::CDMSessionMediaSourceAVFObjC::type): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsAcceleratedRendering): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayToWirelessPlaybackTarget): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Deleted.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Deleted.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Deleted.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Deleted.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Deleted.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
(WebCore::MediaPlayerPrivateQTKit::supportsScanning): Deleted.
(WebCore::MediaPlayerPrivateQTKit::networkState): Deleted.
(WebCore::MediaPlayerPrivateQTKit::readyState): Deleted.
(WebCore::MediaPlayerPrivateQTKit::maximumDurationToCacheMediaTime): Deleted.
(WebCore::MediaPlayerPrivateQTKit::engineDescription): Deleted.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/SerializedPlatformRepresentationMac.h:
(WebCore::SerializedPlatformRepresentationMac::platformType): Deleted.
* platform/mac/ThemeMac.h:
(WebCore::ThemeMac::controlRequiresPreWhiteSpace): Deleted.
* testing/MockCDM.cpp:
(WebCore::MockCDMSession::setClient): Deleted.

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

5 years ago[Mac] A checkmark is briefly visible next to the webpage context menu items when...
commit-queue@webkit.org [Wed, 24 Jun 2015 20:32:27 +0000 (20:32 +0000)]
[Mac] A checkmark is briefly visible next to the webpage context menu items when they're clicked
https://bugs.webkit.org/show_bug.cgi?id=146284
<rdar://problem/20297182>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-06-24
Reviewed by Darin Adler.

The default value of [NSPopUpButtonCell altersStateOfSelectedItem] is YES.
This makes the popup menu items checkable by default. We need to change the
value of this attribute to NO when creating the popup menu, so the items
are uncheckable. The value of this property needs to change back to YES
if context menu is about selecting an option and not executing a command.

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::populate):

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

5 years agoAdd some images for a blog post.
joepeck@webkit.org [Wed, 24 Jun 2015 20:24:59 +0000 (20:24 +0000)]
Add some images for a blog post.

* blog-files/console-improvements/array-api.png: Added.
* blog-files/console-improvements/collections.png: Added.
* blog-files/console-improvements/console-messages.png: Added.
* blog-files/console-improvements/interactivity.m4v: Added.
* blog-files/console-improvements/iterators.png: Added.
* blog-files/console-improvements/localStorage-api.png: Added.
* blog-files/console-improvements/object-preview.png: Added.
* blog-files/console-improvements/object-tree.png: Added.
* blog-files/console-improvements/promises.png: Added.
* blog-files/console-improvements/tooltip-1.png: Added.
* blog-files/console-improvements/tooltip-2.png: Added.

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

5 years agoStrict Equality on objects should only check that one of the two sides is an object.
commit-queue@webkit.org [Wed, 24 Jun 2015 19:13:54 +0000 (19:13 +0000)]
Strict Equality on objects should only check that one of the two sides is an object.
https://bugs.webkit.org/show_bug.cgi?id=145992

Source/JavaScriptCore:

This patch adds a new optimization for checking strict equality on objects.
If we speculate that a strict equality comparison has an object on one side
we only need to type check that side. Equality is then determined by a pointer
comparison between the two values (although in the 32-bit case we must also check
that the other side is a cell). Once LICM hoists type checks out of a loop we
can be cleverer about how we choose the operand we type check if both are
speculated to be objects.

For testing I added the addressOf function, which returns the address
of a Cell to the runtime.

Patch by Keith Miller <keith_miller@apple.com> on 2015-06-24
Reviewed by Mark Lam.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStrictEq):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectStrictEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectStrictEquality):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectStrictEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectStrictEquality):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCompareStrictEq):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionAddressOf):
* tests/stress/equality-type-checking.js: Added.
(Foo):
(checkStrictEq):
(checkStrictEqOther):

LayoutTests:

Patch by Keith Miller <keith_miller@apple.com> on 2015-06-24
Reviewed by Mark Lam.

Adds a test that checks if strict equality checks with objects properly exit out of DFG code when
dealing with document.all, which is an object that masquerades as undefined.

* js/dom/document-all-strict-eq-expected.txt: Added.
* js/dom/document-all-strict-eq.html: Added.
* js/dom/script-tests/document-all-strict-eq.js: Added.
(f):

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

5 years agoImprove JSDOMPromise callPromiseFunction naming
youenn.fablet@crf.canon.fr [Wed, 24 Jun 2015 19:08:09 +0000 (19:08 +0000)]
Improve JSDOMPromise callPromiseFunction naming
https://bugs.webkit.org/show_bug.cgi?id=146280

Unreviewed.

No change in behavior.

* bindings/js/JSDOMPromise.h:
(WebCore::callPromiseFunction):

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

5 years ago[Win] Test gardening for fast/text/font-weight{,-zh}.html
mmaxfield@apple.com [Wed, 24 Jun 2015 18:41:56 +0000 (18:41 +0000)]
[Win] Test gardening for fast/text/font-weight{,-zh}.html
https://bugs.webkit.org/show_bug.cgi?id=146266
<rdar://problem/21391628>
<rdar://problem/21391673>

Unreviewed.

* platform/win/fast/text/font-weights-expected.png: Added.
* platform/win/fast/text/font-weights-expected.txt: Added.
* platform/win/fast/text/font-weights-zh-expected.png: Added.
* platform/win/fast/text/font-weights-zh-expected.txt: Added.

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

5 years agoREGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizo...
timothy_horton@apple.com [Wed, 24 Jun 2015 17:57:49 +0000 (17:57 +0000)]
REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizons.com/BackupCareRequest.aspx
<rdar://problem/21525376>

Reviewed by Sam Weinig.

* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange):
Null check.

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

5 years agoSubpixel rendering: roundToDevicePixel() snaps to wrong value.
zalan@apple.com [Wed, 24 Jun 2015 17:53:44 +0000 (17:53 +0000)]
Subpixel rendering: roundToDevicePixel() snaps to wrong value.
https://bugs.webkit.org/show_bug.cgi?id=146273
rdar://problem/18509840

Reviewed by Simon Fraser.

Due to the floating point approximate representation, we can't always produce
the correct snap value. This patch addresses the issue by removing redundant kFixedPointDenominator multiplication
and by changing the rounding in roundToDevicePixel() from float to double.

Source/WebCore:

API test is added.

* platform/LayoutUnit.h:
(WebCore::roundToDevicePixel):

Tools:

* TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:
(TestWebKitAPI::TEST):

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

5 years agoUpdate JavaScript dialog delegates to include a WKSecurityOriginRef argument.
beidson@apple.com [Wed, 24 Jun 2015 16:57:30 +0000 (16:57 +0000)]
Update JavaScript dialog delegates to include a WKSecurityOriginRef argument.
<rdar://problem/21269187> and https://bugs.webkit.org/show_bug.cgi?id=146249

Reviewed by Alex Christensen.

Source/WebKit2:

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Call the new signature if the client has it set.
  Otherwise fall back to the old signature.
* UIProcess/API/C/WKPageUIClient.h: Deprecate the old method signature, and add the new
  one to the newest V5 client structure.

Tools:

- Update WKTR to the new client structure.
- Update existing TestWebKitAPI tests to either use the new client structure or
  assign the old function signature to the updated variable name.
- Include a new test.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

* TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp:
(TestWebKitAPI::runJavaScriptAlert):

* TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp:
(TestWebKitAPI::TEST):

* TestWebKitAPI/Tests/WebKit2/ModalAlertsSPI.cpp:
(TestWebKitAPI::analyzeDialogArguments):
(TestWebKitAPI::runJavaScriptAlert):
(TestWebKitAPI::runJavaScriptConfirm):
(TestWebKitAPI::runJavaScriptPrompt):
(TestWebKitAPI::createNewPage):
(TestWebKitAPI::TEST):

* TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm:
(TestWebKitAPI::FullscreenZoomInitialFrame::initializeView):

* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::initializeView):

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

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

5 years agoMediaSession: Support setting of metadata
mrajca@apple.com [Wed, 24 Jun 2015 16:38:55 +0000 (16:38 +0000)]
MediaSession: Support setting of metadata
https://bugs.webkit.org/show_bug.cgi?id=146253

Reviewed by Eric Carlson.

* Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::MediaSession): Store a reference to the document so we can use it in setMetadata.
(WebCore::MediaSession::setMetadata): Implemented as described in the Media Session spec.
* Modules/mediasession/MediaSession.h:
* Modules/mediasession/MediaSession.idl: Added the setMetadata method.
* Modules/mediasession/MediaSessionMetadata.h:
(WebCore::MediaSessionMetadata::MediaSessionMetadata): Added to keep track of media session metadata.
(WebCore::MediaSessionMetadata::title):
(WebCore::MediaSessionMetadata::artist):
(WebCore::MediaSessionMetadata::album):
(WebCore::MediaSessionMetadata::artworkURL):
* WebCore.xcodeproj/project.pbxproj: Added MediaSessionMetadata.h.

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

5 years agoWeb Inspector: Background of Computed Styles is missing
commit-queue@webkit.org [Wed, 24 Jun 2015 16:36:34 +0000 (16:36 +0000)]
Web Inspector: Background of Computed Styles is missing
https://bugs.webkit.org/show_bug.cgi?id=146209

Patch by Devin Rousso <drousso@apple.com> on 2015-06-24
Reviewed by Timothy Hatcher.

* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.computed-style-properties.details-section): Added white background.

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

5 years agoContent Security Policy error message when frame load is blocked does not read well
dbates@webkit.org [Wed, 24 Jun 2015 15:54:23 +0000 (15:54 +0000)]
Content Security Policy error message when frame load is blocked does not read well
https://bugs.webkit.org/show_bug.cgi?id=146279

Reviewed by Csaba Osztrogon√°c.

Source/WebCore:

Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
emitted when the Content Security Policy of the page blocks a frame load.

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):

LayoutTests:

Update expected results.

* http/tests/security/contentSecurityPolicy/frame-src-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/frame-src-redirect-blocked-expected.txt:

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

5 years agoWeb Inspector: Right/Left arrow no longer works in console to expand/collapse ObjectTrees
commit-queue@webkit.org [Wed, 24 Jun 2015 15:32:32 +0000 (15:32 +0000)]
Web Inspector: Right/Left arrow no longer works in console to expand/collapse ObjectTrees
https://bugs.webkit.org/show_bug.cgi?id=141949

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

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
(WebInspector.ConsoleMessageView.prototype.get expandable):
(WebInspector.ConsoleMessageView.prototype.set expandable): Deleted.
(WebInspector.ConsoleMessageView.prototype._appendExtraParameters):
(WebInspector.ConsoleMessageView.prototype._appendStackTrace):
(WebInspector.ConsoleMessageView.prototype._makeExpandable):
Clarify what makes a ConsoleMessageView expandable or not.

(WebInspector.ConsoleMessageView.prototype.expand):
(WebInspector.ConsoleMessageView.prototype.collapse):
Handle the expand/collapse cases which could apply to the
ConsoleMessageView itself or an inner ObjectTreeView if that is all we contain.

(WebInspector.ConsoleMessageView.prototype._formatParameterAsObject):
Delete out of date comment. A console.log("message", obj) will want the
object tree member variable to handle auto expanding/collapsing of the
single object in the message.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
(WebInspector.LogContentView.prototype._rightArrowWasPressed):
Use the higher level ConsoleMessageView objects accessible from the element
to call through to expand/collapse.

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

5 years agoLayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html...
dbates@webkit.org [Wed, 24 Jun 2015 14:47:04 +0000 (14:47 +0000)]
LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html always passes
https://bugs.webkit.org/show_bug.cgi?id=146272

Reviewed by Darin Adler.

Fixes an issue where the test LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html
will always pass regardless of whether the Content Security Policy <meta> tag is present because
the external text track file is not valid WebVTT-formatted file.

The test verifies that the external text track file LayoutTests/http/tests/security/contentSecurityPolicy/resources/track.vtt
fails to load when the Content Security Policy of the page disallows loading of all media (media-src: "none")
by listening for a DOM error event to be dispatched to the <track>. And the text track file is not a valid
WebVTT-formatted file. So, it will always fail to load; => a DOM error event is always dispatched to the
<track>; => the test always passes.

* http/tests/security/contentSecurityPolicy/resources/track.vtt:

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

5 years agoFixed assertion in JSStringJoiner::join() (regression from r185899).
mark.lam@apple.com [Wed, 24 Jun 2015 14:18:16 +0000 (14:18 +0000)]
Fixed assertion in JSStringJoiner::join() (regression from r185899).

Not reviewed.

JSStringJoiner did not account for the case where the array being joined can
have null or undefined elements.  As a result, its size may be less than
its initially reserved capacity (which was estimated based on the array length).

* runtime/JSStringJoiner.cpp:
(JSC::JSStringJoiner::join):

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

5 years agointrinsic size keywords don't work for heights
svillar@igalia.com [Wed, 24 Jun 2015 13:36:00 +0000 (13:36 +0000)]
intrinsic size keywords don't work for heights
https://bugs.webkit.org/show_bug.cgi?id=113610

Reviewed by Darin Adler.

Source/WebCore:

Based on Blink's r148314 & r150355 by <cbiesinger@chromium.org>.

Adds intrinsic values support to heigh & min/max-height. This involves the
following changes:
- RenderBox needs to pass the content height through to computeLogicalHeight and
related functions, which needs it to resolve max-content, et. al.
- Make the callers pass the content height to this function. Some callers pass
logicalHeight() (adjusted for border/padding) which works because if
logicalHeight is not the content height, then it is the height we ended up using,
so the constrain* functions will just constrain to that value again.
- Parsing code needs to be adjusted to support intrinsic values for heights.

Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
       fast/css-intrinsic-dimensions/height-css-tables.html
       fast/css-intrinsic-dimensions/height-flexbox.html
       fast/css-intrinsic-dimensions/height-positioned-replaced.html
       fast/css-intrinsic-dimensions/height-positioned.html
       fast/css-intrinsic-dimensions/height-replaced.html
       fast/css-intrinsic-dimensions/height-tables-collapsed.html
       fast/css-intrinsic-dimensions/height-tables.html
       fast/css-intrinsic-dimensions/height.html

* css/CSSParser.cpp:
(WebCore::CSSParser::isValidSize): Refactored from validateWidth and
validateHeight.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::validateWidth): Deleted.
(WebCore::CSSParser::validateHeight): Deleted.
* css/CSSParser.h:
* platform/Length.h:
(WebCore::Length::isFillAvailable):
(WebCore::Length::isFitContent):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax):
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeContentLogicalHeight):
(WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
* rendering/RenderBox.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::hasReplacedLogicalHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
(WebCore::RenderTable::layout):

LayoutTests:

Based on Blink's r148314 by <cbiesinger@chromium.org>.

* fast/css-intrinsic-dimensions/height-css-tables-collapsed-expected.html: Added.
* fast/css-intrinsic-dimensions/height-css-tables-collapsed.html: Added.
* fast/css-intrinsic-dimensions/height-css-tables-expected.html: Added.
* fast/css-intrinsic-dimensions/height-css-tables.html: Added.
* fast/css-intrinsic-dimensions/height-expected.html: Added.
* fast/css-intrinsic-dimensions/height-flexbox-expected.html: Added.
* fast/css-intrinsic-dimensions/height-flexbox.html: Added.
* fast/css-intrinsic-dimensions/height-positioned-expected.html: Added.
* fast/css-intrinsic-dimensions/height-positioned-replaced-expected.html: Added.
* fast/css-intrinsic-dimensions/height-positioned-replaced.html: Added.
* fast/css-intrinsic-dimensions/height-positioned.html: Added.
* fast/css-intrinsic-dimensions/height-property-value-expected.txt:
* fast/css-intrinsic-dimensions/height-property-value.html:
* fast/css-intrinsic-dimensions/height-property-value.html.orig: Copied from LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html.
* fast/css-intrinsic-dimensions/height-replaced-expected.html: Added.
* fast/css-intrinsic-dimensions/height-replaced.html: Added.
* fast/css-intrinsic-dimensions/height-tables-collapsed-expected.html: Added.
* fast/css-intrinsic-dimensions/height-tables-collapsed.html: Added.
* fast/css-intrinsic-dimensions/height-tables-expected.html: Added.
* fast/css-intrinsic-dimensions/height-tables.html: Added.
* fast/css-intrinsic-dimensions/height.html: Added.
* fast/css-intrinsic-dimensions/resources/height-keyword-classes.css: Added.
(.min-content):
(.max-content):
(.fill-available):
(.fit-content):
(.max-height-min-content):
(.max-height-max-content):
(.max-height-fill-available):
(.max-height-fit-content):
(.min-height-min-content):
(.min-height-max-content):
(.min-height-fill-available):
(.min-height-fit-content):

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

5 years agoUnreviewed, rolling out r185906.
commit-queue@webkit.org [Wed, 24 Jun 2015 13:09:46 +0000 (13:09 +0000)]
Unreviewed, rolling out r185906.
https://bugs.webkit.org/show_bug.cgi?id=146276

MSVC doesn't yet provide a const-qualified std::array<T,
N>::size(), failing to compile the static_assert (Requested by
zdobersek on #webkit).

Reverted changeset:

"Improve the source code generated by make_names.pl"
https://bugs.webkit.org/show_bug.cgi?id=146208
http://trac.webkit.org/changeset/185906

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

5 years agoImprove the source code generated by make_names.pl
zandobersek@gmail.com [Wed, 24 Jun 2015 12:19:19 +0000 (12:19 +0000)]
Improve the source code generated by make_names.pl
https://bugs.webkit.org/show_bug.cgi?id=146208

Reviewed by Darin Adler.

Source/WebCore:

Clean up and optimize the output that's generated by the make_names.pl script
when generating large sets of DOM names for attributes and tags.

The GenerateStrings() function in the StaticString.pm module is split into
GenerateStringData() and GenerateASCIILiteral() so that the two new functions
can be used independently, with the original function still being called when
generating font names.

Tags and attributes have the corresponding static QualifiedName globals defined
as before. After that, two static const std::array<> objects are defined for
both types -- the first is an ordered array of addresses of the QualifiedName
objects (corresponding to the C array that was defined in getHTMLTags(),
getSVGAttrs() etc.), and the second is an ordered array of StringImpl::StaticASCIILiteral
objects that replaces separately defined StringImpl::StaticASCIILiteral objects
and the additional tables that contained pairs of QualifiedName object addresses
and the corresponding StaticASCIILiteral object references in the init() function.
This is all generated by the printStaticData() function in make_names.pl.

The printQualifiedNameCreation() function generates a static_assert() that ensures
that the corresponding std::array<QualifiedName*> and std::array<StaticASCIILiteral>
objects have the same amount of items, and then sets up a loop that walks through
the two arrays and properly constructs the QualifiedName objects from the static
literal data.

On the GTK port, this shaves off ~54kB from the final stripped shared library
on a 64-bit build, and ~21kB on a 32-bit build.

* bindings/scripts/StaticString.pm:
(GenerateStringData):
(GenerateASCIILiteral):
(GenerateStrings):
* dom/make_names.pl:
(printCppHead):
(printNamesCppFile):
(printStaticData):
(printQualifiedNameCreation):
(printInit): Deleted.
(printDefinitions): Deleted.

Source/WTF:

* wtf/text/StringImpl.h:
(WTF::StringImpl::assertHashIsCorrect): Make this method const-qualified.

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

5 years agoRemove some dead code from Download
ryuan.choi@navercorp.com [Wed, 24 Jun 2015 09:25:06 +0000 (09:25 +0000)]
Remove some dead code from Download
https://bugs.webkit.org/show_bug.cgi?id=146268

Reviewed by Darin Adler.

retrieveDestinationWithSuggestedFilename() was introduced for DownloadCFNetWin.cpp since r77585.
didDecideDestination and others are also introduced for WebKit2 Windows port since r77055.
Since WebKit2 Windows port is dropped, no one uses them now.

* Shared/Downloads/Download.cpp:
(WebKit::Download::decideDestinationWithSuggestedFilename):
(WebKit::Download::retrieveDestinationWithSuggestedFilename): Deleted.
* Shared/Downloads/Download.h:
(WebKit::Download::destination): Deleted.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::didDecideDestination): Deleted.
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::didDecideDestination): Deleted.
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::didDecideDestination): Deleted.

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

5 years ago2015-06-24 Darin Adler <darin@apple.com>
darin@apple.com [Wed, 24 Jun 2015 08:14:14 +0000 (08:14 +0000)]
2015-06-24  Darin Adler  <darin@apple.com>

        Fix Array.concat with RuntimeArray (regression from my last patch)

        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncConcat): Use getLength instead of JSArray::length.

        * runtime/JSArray.cpp:
        (JSC::JSArray::defineOwnProperty): Added comment about use of
        JSArray::length here that is incorrect (in a really non-obvious way).
        (JSC::JSArray::fillArgList): Ditto.
        (JSC::JSArray::copyToArguments): Ditto.

        * runtime/JSArray.h: Added a comment explaining that it is not always
        safe to use JSArray::length.

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

5 years agoRefactor UserMediaRequest to share more codes between MediaDevices.getUserMedia and...
youenn.fablet@crf.canon.fr [Wed, 24 Jun 2015 07:42:55 +0000 (07:42 +0000)]
Refactor UserMediaRequest to share more codes between MediaDevices.getUserMedia and legacy webkitGetUserMedia
https://bugs.webkit.org/show_bug.cgi?id=146237

Reviewed by Darin Adler.

Covered by existing tests, no change in behavior.

* Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::create): Simplified error handling by removing exception code parameter.
* Modules/mediastream/MediaConstraintsImpl.h: Ditto.
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getUserMedia): Removed code now in UserMediaRequest::start.
* Modules/mediastream/NavigatorUserMedia.cpp:
(WebCore::NavigatorUserMedia::webkitGetUserMedia): Ditto.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::parseOptions): Simplified error handling by removing exception code parameter.
(WebCore::UserMediaRequest::start): Renamed create in start and added common code.
* Modules/mediastream/UserMediaRequest.h:

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

5 years agoGardening: Fixing 2 bad asserts from r185889.
mark.lam@apple.com [Wed, 24 Jun 2015 05:44:48 +0000 (05:44 +0000)]
Gardening: Fixing 2 bad asserts from r185889.
https://bugs.webkit.org/show_bug.cgi?id=140575

Not reviewed.

* runtime/JSBoundSlotBaseFunction.cpp:
(JSC::JSBoundSlotBaseFunction::finishCreation):

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

5 years agoFix build.
andersca@apple.com [Wed, 24 Jun 2015 04:34:37 +0000 (04:34 +0000)]
Fix build.

* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager init]):

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

5 years agoFixed iOS production builds.
mitz@apple.com [Wed, 24 Jun 2015 02:34:05 +0000 (02:34 +0000)]
Fixed iOS production builds.

* JavaScriptCore.xcodeproj/project.pbxproj:

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

5 years agoMake Array.join work directly on substrings without reifying them
darin@apple.com [Wed, 24 Jun 2015 02:33:18 +0000 (02:33 +0000)]
Make Array.join work directly on substrings without reifying them
https://bugs.webkit.org/show_bug.cgi?id=146191

Reviewed by Andreas Kling.

Source/JavaScriptCore:

Besides the Array.join change, this has other optimizations based on
profiling the Peacekeeper array benchmark.

I measured a 14% speed improvement in the Peacekeeper array benchmark.

Still a lot of low hanging fruit in that test because so many of functions
on the array prototype are not optimizing for simple cases. For example,
the reverse function does individual get and put calls even when the array
is entirely made up of integers in contiguous storage.

* runtime/ArrayPrototype.cpp:
(JSC::getProperty): Use tryGetIndexQuickly first before getPropertySlot.
(JSC::argumentClampedIndexFromStartOrEnd): Marked inline.
(JSC::shift): Use the getProperty helper in this file instead of using
getPropertySlot. Use putByIndexInline instead of calling putByIndex directly.
In both cases this can yield a faster code path.
(JSC::unshift): Ditto.
(JSC::arrayProtoFuncToString): Updated to use the new JSStringJoiner
interface. Changed local variable name to thisArray since it's not a
JSObject*. Changed loop index to i instead of k.
(JSC::arrayProtoFuncToLocaleString): Updated to use the new JSStringJoiner
interface. Renamed thisObj to thisObject. Added a missing exception check
after the toLocaleString function is called, but before toString is called
the result of that function.
(JSC::arrayProtoFuncJoin): Updated to use the new JSStringJointer interface.
Added a missing exception check after calling toString on the separator
but before calling get to get the first element in the array-like object
being joined. Changed loop index to i instead of k. Added missing exception
check after calling toString on each string from the array before calling
get for the next element.
(JSC::arrayProtoFuncConcat): Use JSArray::length instead of using the
getLength function.
(JSC::arrayProtoFuncReverse): Ditto. Also use putByIndexInline.
(JSC::arrayProtoFuncShift): Ditto.
(JSC::arrayProtoFuncSplice): Use getIndex instead of get, which includes some
additional optimizations.
(JSC::getOrHole): Deleted. Unused function.
(JSC::arrayProtoFuncUnShift): Use putByIndexInline.

* runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue): Removed the duplicate copy of the the logic
from JSValue::toString.

* runtime/JSCJSValue.cpp:
(JSC::JSValue::toStringSlowCase): Improved the performance when converting a
small integer to a single character string.
(JSC::JSValue::toWTFStringSlowCase): Moved the contents of the
inlineJSValueNotStringtoString function here.
* runtime/JSCJSValue.h: Removed no longer used toWTFStringInline and fixed
a comment with a typo.

* runtime/JSObject.h:
(JSC::JSObject::putByIndexInline): Marked ALWAYS_INLINE because this was not
getting inlined at some call sites.
(JSC::JSObject::indexingData): Deleted. Unused function.
(JSC::JSObject::currentIndexingData): Deleted. Unused function.
(JSC::JSObject::getHolyIndexQuickly): Deleted. Unused function.
(JSC::JSObject::relevantLength): Deleted. Unused function.
(JSC::JSObject::currentRelevantLength): Deleted. Unused function.

* runtime/JSString.h: Added the StringViewWithUnderlyingString struct and
the viewWithUnderlyingString function. Removed the inlineJSValueNotStringtoString
and toWTFStringInline functions.

* runtime/JSStringJoiner.cpp:
(JSC::appendStringToData): Changed this to be a template instead of writing
it out, since StringView::getCharactersWithUpconvert does almsot exactly what
this function was trying to do.
(JSC::joinStrings): Rewrote this to use StringView.
(JSC::JSStringJoiner::joinedLength): Added. Factored out from the join function.
(JSC::JSStringJoiner::join): Rewrote to make it a bit simpler. Added an assertion
that we entirely filled capacity, since we are now reserving capacity and using
uncheckedAppend. Use String instead of RefPtr<StringImpl> because there was no
particular value to using the impl directly.

* runtime/JSStringJoiner.h: Changed the interface to the class to use StringView.
Also changed this class so it now has the responsibility to convert each JSValue
into a string. This let us share more code between toString and join, and also
lets us use the new viewWithUnderlyingString function, which could be confusing at
all the call sites, but is easier to understand here.

Source/WTF:

* wtf/Vector.h: Added an overload of uncheckedAppend like the one we added
a while back, a non-template function that forwards through to the function
template. This lets us call uncheckedAppend on an argument list and have it
properly convert it to the Vector's element type.

* wtf/text/StringView.h:
(WTF::StringView::getCharactersWithUpconvert): Changed to not use memcpy;
saw some indication the hand-written loop was faster when profiling. Also
use m_length directly when we know we are dealing with an 8-bit string,
since the masking that the index function does is not needed in that case.
(WTF::StringView::UpconvertedCharacters::UpconvertedCharacters): Ditto.
(WTF::StringView::toString): Ditto.
(WTF::StringView::toFloat): Ditto.
(WTF::StringView::toInt): Ditto.
(WTF::StringView::toStringWithoutCopying): Ditto.
(WTF::StringView::find): Ditto.

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

5 years agoRefactoring benchmark runner script to follow pep8 code style.
commit-queue@webkit.org [Wed, 24 Jun 2015 02:13:24 +0000 (02:13 +0000)]
Refactoring benchmark runner script to follow pep8 code style.
https://bugs.webkit.org/show_bug.cgi?id=146264

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-06-23
Reviewed by Ryosuke Niwa.

Refactor benchmark runner script to follow pep8 code style.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:
(GenericBenchmarkBuilder.prepare):
(GenericBenchmarkBuilder._run_create_script):
(GenericBenchmarkBuilder._copy_benchmark_to_temp_dir):
(GenericBenchmarkBuilder._fetch_remote_archive):
(GenericBenchmarkBuilder):
(GenericBenchmarkBuilder._checkout_with_subversion):
(GenericBenchmarkBuilder._apply_patch):
(GenericBenchmarkBuilder.clean):
(GenericBenchmarkBuilder._runCreateScript): Deleted.
(GenericBenchmarkBuilder._copyBenchmarkToTempDir): Deleted.
(GenericBenchmarkBuilder._fetchRemoteArchive): Deleted.
(GenericBenchmarkBuilder._checkoutWithSubverion): Deleted.
(GenericBenchmarkBuilder._applyPatch): Deleted.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__):
(BenchmarkRunner._find_plan_file):
(BenchmarkRunner.execute):
(BenchmarkRunner._cleanup):
(BenchmarkRunner._dump):
(BenchmarkRunner._wrap):
(BenchmarkRunner._merge):
(BenchmarkRunner._show_results):
(BenchmarkRunner._findPlanFile): Deleted.
(BenchmarkRunner.cleanup): Deleted.
(BenchmarkRunner.dump): Deleted.
(BenchmarkRunner.wrap): Deleted.
(BenchmarkRunner.merge): Deleted.
(BenchmarkRunner.show_results): Deleted.
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
(BrowserDriver.prepare_env):
(BrowserDriver.launch_url):
(BrowserDriver.close_browsers):
(BrowserDriver.prepareEnv): Deleted.
(BrowserDriver.launchUrl): Deleted.
(BrowserDriver.closeBrowser): Deleted.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver):
(OSXBrowserDriver.prepare_env):
(OSXBrowserDriver.close_browsers):
(OSXBrowserDriver._launch_process):
(OSXBrowserDriver._terminiate_processes):
(OSXBrowserDriver._launch_process_with_caffinate):
(OSXBrowserDriver._screen_size):
(OSXBrowserDriver.prepareEnv): Deleted.
(OSXBrowserDriver.closeBrowsers): Deleted.
(OSXBrowserDriver.launchProcess): Deleted.
(OSXBrowserDriver.terminateProcesses): Deleted.
(OSXBrowserDriver.launchProcessWithCaffinate): Deleted.
(OSXBrowserDriver.screenSize): Deleted.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver):
(OSXChromeDriver.launch_url):
(OSXChromeCanaryDriver):
(OSXChromeCanaryDriver.launch_url):
(OSXChromeDriver.launchUrl): Deleted.
(OSXChromeCanaryDriver.launchUrl): Deleted.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
(OSXFirefoxDriver):
(OSXFirefoxDriver.launch_url):
(OSXFirefoxNightlyDriver):
(OSXFirefoxNightlyDriver.launch_url):
(OSXFirefoxDriver.launchUrl): Deleted.
(OSXFirefoxNightlyDriver.launchUrl): Deleted.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):
(OSXSafariDriver.prepare_env):
(OSXSafariDriver.launch_url):
(OSXSafariDriver.close_browsers):
(OSXSafariDriver._maximize_window):
(OSXSafariDriver.prepareEnv): Deleted.
(OSXSafariDriver.launchUrl): Deleted.
(OSXSafariDriver.closeBrowsers): Deleted.
(OSXSafariDriver.maximizeWindow): Deleted.
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
(HTTPServerDriver.fetch_result):
(HTTPServerDriver.kill_server):
(HTTPServerDriver.get_return_code):
(HTTPServerDriver.set_device_id):
(HTTPServerDriver.fetchResult): Deleted.
(HTTPServerDriver.killServer): Deleted.
(HTTPServerDriver.getReturnCode): Deleted.
(HTTPServerDriver.setDeviceID): Deleted.
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver.base_url):
(SimpleHTTPServerDriver.fetch_result):
(SimpleHTTPServerDriver.kill_server):
(SimpleHTTPServerDriver.get_return_code):
(SimpleHTTPServerDriver): Deleted.
(SimpleHTTPServerDriver.baseUrl): Deleted.
(SimpleHTTPServerDriver.fetchResult): Deleted.
(SimpleHTTPServerDriver.killServer): Deleted.
(SimpleHTTPServerDriver.getReturnCode): Deleted.
* Scripts/webkitpy/benchmark_runner/utils.py:
(get_path_from_project_root):
(force_remove):
(getPathFromProjectRoot): Deleted.
(forceRemove): Deleted.

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

5 years agoShould reduce tile coverage for the first paint after a tab switch.
akling@apple.com [Wed, 24 Jun 2015 02:09:24 +0000 (02:09 +0000)]
Should reduce tile coverage for the first paint after a tab switch.
<https://webkit.org/b/146252>
<rdar://problem/19821583>

Reviewed by Darin Adler.

Reduce the number of tiles we need to paint after switching tabs,
to shorten the time it takes before we can flush pixels to screen.

We accomplish this by piggybacking on the "speculative tiling enabled"
mode of FrameView, which was previously only used to throttle painting
and layer flushes during page load.

When a FrameView becomes visible, which is what happens when you
switch to its tab, we revert the speculative tiling optimization to
its initial state, and reset the "scrolled by user" flag.

In practice this means that after switching tabs, we only generate
enough tiles to fill the viewport. Then, after 500ms has passed
or the user scrolls the page, we go back to the usual speculative
tiling mode.

* page/FrameView.cpp:
(WebCore::FrameView::show):

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

5 years ago[GTK] Crash performing drag-and-drop
mcatanzaro@igalia.com [Wed, 24 Jun 2015 02:04:38 +0000 (02:04 +0000)]
[GTK] Crash performing drag-and-drop
https://bugs.webkit.org/show_bug.cgi?id=146267

Reviewed by Darin Adler.

Return early if gtk_get_current_event() returns null to avoid a crash. Note that this does
not fix drag-and-drop. Note also this prevents the web process from forcing the UI process
to crash by sending fake startDrag messages.

* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::startDrag):

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

5 years ago[OS X] Rebaseline fast/text/font-weight{,-zh}.html for El Capitan
mmaxfield@apple.com [Wed, 24 Jun 2015 02:00:52 +0000 (02:00 +0000)]
[OS X] Rebaseline fast/text/font-weight{,-zh}.html for El Capitan
https://bugs.webkit.org/show_bug.cgi?id=146266
<rdar://problem/21391628>
<rdar://problem/21391673>

Unreviewed.

* fast/text/font-weights.html: Renamed from LayoutTests/platform/mac/fast/text/font-weights.html.
* platform/mac/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:
* platform/mac/fast/text/font-weights-expected.png: Added.
* platform/mac/fast/text/font-weights-expected.txt:
* platform/mac/fast/text/font-weights-zh-expected.png: Added.
* platform/mac/fast/text/font-weights-zh-expected.txt:
* platform/mac-mavericks/fast/text/font-weights-expected.txt: Moved from platform/mac/fast/text/font-weights-expected.txt
* platform/mac-yosemite/fast/text/font-weights-expected.txt: Ditto.
* platform/mac-yosemite/fast/text/font-weights-zh-expected.txt: Moved from platform/mac/fast/text/font-weights-zh-expected.txt

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

5 years agoAdd a class that tracks whether we're a background or foreground application
andersca@apple.com [Wed, 24 Jun 2015 00:50:36 +0000 (00:50 +0000)]
Add a class that tracks whether we're a background or foreground application
https://bugs.webkit.org/show_bug.cgi?id=146259
rdar://problem/19833808

Reviewed by Darin Adler.

First step towards being able to send out these notifications for view services.

* UIProcess/ApplicationStateTracker.h: Added.
(WebKit::ApplicationStateTracker::isInBackground):
* UIProcess/ApplicationStateTracker.mm: Added.
(WebKit::ApplicationStateTracker::singleton):
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::ApplicationStateTracker::addListener):
(WebKit::ApplicationStateTracker::applicationDidEnterBackground):
(WebKit::ApplicationStateTracker::applicationWillEnterForeground):
(WebKit::ApplicationStateTracker::invokeListeners):
(WebKit::ApplicationStateTracker::pruneListeners):
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]):
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]):
(-[WKProcessAssertionBackgroundTaskManager dealloc]): Deleted.
(-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]): Deleted.
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]): Deleted.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView isBackground]):
(-[WKContentView _applicationDidEnterBackground]):
(-[WKContentView _applicationWillEnterForeground]):
(-[WKContentView _applicationDidEnterBackground:]): Deleted.
(-[WKContentView _applicationWillEnterForeground:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoRemove windowResizerRect code, nobody is using it anymore
andersca@apple.com [Wed, 24 Jun 2015 00:43:03 +0000 (00:43 +0000)]
Remove windowResizerRect code, nobody is using it anymore
https://bugs.webkit.org/show_bug.cgi?id=146265

Reviewed by Beth Dakin.

Source/WebCore:

* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::windowResizerRect): Deleted.
* page/Chrome.h:
* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::windowResizerRect): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::ScrollView): Deleted.
(WebCore::ScrollView::windowResizerRectChanged): Deleted.
(WebCore::ScrollView::containsScrollbarsAvoidingResizer): Deleted.
(WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount): Deleted.
(WebCore::ScrollView::setParent): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::windowResizerRect): Deleted.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar): Deleted.
(WebCore::Scrollbar::setFrameRect): Deleted.
(WebCore::Scrollbar::setParent): Deleted.
* platform/Scrollbar.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::windowResizerRect): Deleted.

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::windowResizerRect): Deleted.
* WebCoreSupport/WebChromeClient.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowResizerRect): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowResizerRect): Deleted.
* WebProcess/WebPage/WebPage.h:

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

5 years agoWeb Inspector: Reduce QuickConsole DidResize events if it did not change
commit-queue@webkit.org [Wed, 24 Jun 2015 00:29:11 +0000 (00:29 +0000)]
Web Inspector: Reduce QuickConsole DidResize events if it did not change
https://bugs.webkit.org/show_bug.cgi?id=146258

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

* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged):
Do not trigger the event unless there was a change in visibility.

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

5 years agoWeb Inspector: TextEditor scroll position not correctly restored when switching tabs
commit-queue@webkit.org [Wed, 24 Jun 2015 00:27:29 +0000 (00:27 +0000)]
Web Inspector: TextEditor scroll position not correctly restored when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=146254

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

* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.updateLayout):
Workaround a larger issue with ContentView restoration so that
TextEditors restore their scroll position as expected.

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

5 years agoRestore binary compatibility with iOS 8 Safari after r185877
mitz@apple.com [Wed, 24 Jun 2015 00:21:04 +0000 (00:21 +0000)]
Restore binary compatibility with iOS 8 Safari after r185877
https://bugs.webkit.org/show_bug.cgi?id=146263

Reviewed by Anders Carlsson.

* Platform/spi/Cocoa: Added.
* Platform/spi/Cocoa/NSInvocationSPI.h: Added.

* UIProcess/API/Cocoa/WKSecurityOrigin.mm:
(-[WKSecurityOrigin methodSignatureForSelector:]): Override to check _WKSecurityOrigin for
possible category methods with the specified selector.
(-[WKSecurityOrigin forwardInvocation:]): Invoke using the implementation of the
_WKSecurityOrigin category method.

* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoCompletes native binding descriptors with native getters and potentially setters.
mmirman@apple.com [Tue, 23 Jun 2015 23:36:57 +0000 (23:36 +0000)]
Completes native binding descriptors with native getters and potentially setters.
https://bugs.webkit.org/show_bug.cgi?id=140575
rdar://problem/19506502

Reviewed by Mark Lam.

Source/JavaScriptCore:

* CMakeLists.txt:  Added JSBoundSlotBaseFunction.cpp
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/InjectedScriptSource.js: Added case for descriptor having a native getter.
* runtime/JSBoundSlotBaseFunction.cpp: Added.
(JSC::boundSlotBaseFunctionCall):
(JSC::JSBoundSlotBaseFunction::JSBoundSlotBaseFunction):
Necessary wrapper for custom getters and setters as objects.
(JSC::JSBoundSlotBaseFunction::create):
(JSC::JSBoundSlotBaseFunction::visitChildren):
(JSC::JSBoundSlotBaseFunction::finishCreation):
* runtime/JSBoundSlotBaseFunction.h: Added.
(JSC::JSBoundSlotBaseFunction::createStructure):
(JSC::JSBoundSlotBaseFunction::boundSlotBase):
(JSC::JSBoundSlotBaseFunction::customGetterSetter):
(JSC::JSBoundSlotBaseFunction::isGetter):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Added a globally initialized structure for JSBoundSlotBaseFunction
(JSC::JSGlobalObject::visitChildren): visits that structure
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::boundSlotBaseFunctionStructure): added a getter for that structure
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor): extends the case for CustomGetterSetter to
actually include GetterSetter as a JSBoundSlotBaseFunction
* runtime/VM.cpp: Added initializer for customGetterSetterFunctionMap
* runtime/VM.h: Added cache for JSBoundSlotBaseFunction

LayoutTests:

* inspector-protocol/runtime/getProperties-expected.txt: updated.
* js/dom/native-bindings-descriptors-expected.txt: Added.
* js/dom/native-bindings-descriptors.html: Added.
* js/dom/script-tests/native-bindings-descriptors.js: Added.

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

5 years agoMedia controls are missing the white backdrop in UIWebViews
dino@apple.com [Tue, 23 Jun 2015 22:47:04 +0000 (22:47 +0000)]
Media controls are missing the white backdrop in UIWebViews
https://bugs.webkit.org/show_bug.cgi?id=146251
<rdar://problem/20181345>

Reviewed by Simon Fraser.

Implement two new CALayer subclasses that explicitly set
something that resembles the system appearance for
media-controls-dark-bar-background and media-controls-light-bar-background.
This way, WebKit1 clients get a visible result.

Creating the actual system recipes is tracked by:
https://bugs.webkit.org/show_bug.cgi?id=146250

* WebCore.xcodeproj/project.pbxproj: Add new files.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::PlatformCALayerCocoa): Use the new CALayer subclasses for
the appropriate layer types.
* platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: Added.
* platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm: Added.
(-[WebLightSystemBackdropLayer init]):
(-[WebLightSystemBackdropLayer setBackgroundColor:]): Only set to a light grey.
(-[WebDarkSystemBackdropLayer init]):
(-[WebDarkSystemBackdropLayer setBackgroundColor:]): Only set to a dark grey.

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

5 years agoAdd operator! and copy/move constructors to WeakObjCPtr
andersca@apple.com [Tue, 23 Jun 2015 22:46:56 +0000 (22:46 +0000)]
Add operator! and copy/move constructors to WeakObjCPtr
https://bugs.webkit.org/show_bug.cgi?id=146255

Reviewed by Andreas Kling.

Source/WebKit2:

* Shared/mac/WeakObjCPtr.h:
(WebKit::WeakObjCPtr::WeakObjCPtr):
(WebKit::WeakObjCPtr::operator!):

Tools:

* TestWebKitAPI/Tests/WebKit2/cocoa/WeakObjCPtr.mm:
(TEST):

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

5 years agoWeb Inspector: Some brief previews are incorrectly treated as lossless
commit-queue@webkit.org [Tue, 23 Jun 2015 22:09:05 +0000 (22:09 +0000)]
Web Inspector: Some brief previews are incorrectly treated as lossless
https://bugs.webkit.org/show_bug.cgi?id=146247

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

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
When we have a brief preview we may need to override lossless / overflow
if the preview view itself shows less properties than were in the preview.

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

5 years agoSupport releasing media sessions
mrajca@apple.com [Tue, 23 Jun 2015 22:02:34 +0000 (22:02 +0000)]
Support releasing media sessions
https://bugs.webkit.org/show_bug.cgi?id=146132

Reviewed by Darin Adler.

* Modules/mediasession/MediaSession.cpp: Implemented as described in the Media Session spec.
(WebCore::MediaSession::releaseSession):
(WebCore::MediaSession::releaseInternal):
* Modules/mediasession/MediaSession.h:

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

5 years agoAX: iOS: VoiceOver and ARIA: has popup property not announced
cfleizach@apple.com [Tue, 23 Jun 2015 21:41:13 +0000 (21:41 +0000)]
AX: iOS: VoiceOver and ARIA: has popup property not announced
https://bugs.webkit.org/show_bug.cgi?id=146188

Reviewed by Darin Adler.

Expose the existing "has popup" property to the iOS Accessibility API.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityHasPopup]):

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

5 years agoUnreviewed test gardening after r185842
mmaxfield@apple.com [Tue, 23 Jun 2015 21:09:47 +0000 (21:09 +0000)]
Unreviewed test gardening after r185842
https://bugs.webkit.org/show_bug.cgi?id=145681
<rdar://problem/21169844>

* platform/mac-yosemite/fast/text/arabic-times-new-roman-expected.png: Copied from LayoutTests/platform/mac/fast/text/arabic-times-new-roman-expected.png.
* platform/mac-yosemite/fast/text/arabic-times-new-roman-expected.txt: Copied from LayoutTests/platform/mac/fast/text/arabic-times-new-roman-expected.txt.
* platform/mac/fast/text/arabic-times-new-roman-expected.png:
* platform/mac/fast/text/arabic-times-new-roman-expected.txt:
* platform/win/fast/text/arabic-times-new-roman-expected.png: Added.
* platform/win/fast/text/arabic-times-new-roman-expected.txt: Added.

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

5 years agoCrashTracer: com.apple.WebKit.Networking at JavaScriptCore: WTF::String::isolatedCopy...
antti@apple.com [Tue, 23 Jun 2015 20:34:50 +0000 (20:34 +0000)]
CrashTracer: com.apple.WebKit.Networking at JavaScriptCore: WTF::String::isolatedCopy const &
https://bugs.webkit.org/show_bug.cgi?id=146236
rdar://problem/21380700

Reviewed by Andreas Kling.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::clear):

    Don't crash if this is called with network cache disabled.

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

5 years agoAX Tests hit-test-input-{auto-fill, search}-button.html and input-search-cancel-butto...
dbates@webkit.org [Tue, 23 Jun 2015 18:54:26 +0000 (18:54 +0000)]
AX Tests hit-test-input-{auto-fill, search}-button.html and input-search-cancel-button.html fail on Windows
https://bugs.webkit.org/show_bug.cgi?id=146243

Mark the tests as failing for now.

* platform/win/TestExpectations:

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

5 years agoExpose some more rendering progress events, and have MiniBrowser log for each of...
simon.fraser@apple.com [Tue, 23 Jun 2015 18:27:13 +0000 (18:27 +0000)]
Expose some more rendering progress events, and have MiniBrowser log for each of them
https://bugs.webkit.org/show_bug.cgi?id=146227

Reviewed by Darin Adler.

Source/WebKit2:

Add _WKRenderingProgressEventFirstLayoutAfterSuppressedIncrementalRendering and
_WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering to the private
header, and convert them to/from WebCore milestones.

* Shared/API/Cocoa/_WKRenderingProgressEvents.h:
* Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h:
(renderingProgressEvents):
* UIProcess/API/Cocoa/WKWebView.mm:
(layoutMilestones):

Tools:

Register for layout milestones/rendering progress events in the WK1 and WK2
browser window controllers, and, if logging is turned on, log when they are
reached.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):
(-[WK1BrowserWindowController webView:didLayout:]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController _webView:renderingProgressDidChange:]):

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

5 years agoUnreviewed. Fix GTK+ build after r185876 and r185877.
carlosgc@webkit.org [Tue, 23 Jun 2015 18:04:08 +0000 (18:04 +0000)]
Unreviewed. Fix GTK+ build after r185876 and r185877.

* UIProcess/API/gtk/WebKitUIClient.cpp:
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
* UIProcess/API/gtk/WebKitWebView.cpp:

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

5 years agoGet rid of the window resizer size
andersca@apple.com [Tue, 23 Jun 2015 17:37:15 +0000 (17:37 +0000)]
Get rid of the window resizer size
https://bugs.webkit.org/show_bug.cgi?id=146240

Reviewed by Darin Adler.

This code was only used by older versions of GTK+, so get rid of it.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseNotifyResizerSize): Deleted.
(toplevelWindowResizeGripVisibilityChanged): Deleted.
(webkitWebViewBaseSetToplevelOnScreenWindow): Deleted.
(resizeWebKitWebViewBaseFromAllocation): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setWindowResizerSize): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowResizerRect):
(WebKit::WebPage::setWindowResizerSize): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoWKFrameInfo should have an accessor for the Frame's current security origin.
beidson@apple.com [Tue, 23 Jun 2015 17:28:20 +0000 (17:28 +0000)]
WKFrameInfo should have an accessor for the Frame's current security origin.
https://bugs.webkit.org/show_bug.cgi?id=146162

Reviewed by Dan Bernstein.

Source/WebKit2:

This patch:
- Promotes _WKSecurityOrigin to API.
- Makes the WKSecurityOrigin Cocoa API object work with API::SecurityOrigin.
- Adds a WKSecurityOrigin accessor to WKFrameInfo.
- Changes IPC messaging so every handler that calls out with a WKFrameInfo object
  gets a relevant SecurityOrigin to wrap.

* Shared/API/APISecurityOrigin.h:
(API::SecurityOrigin::create):
(API::SecurityOrigin::SecurityOrigin):

* Shared/API/Cocoa/WebKit.h:

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedAPI):

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):

* Shared/SecurityOriginData.cpp:
(WebKit::SecurityOriginData::fromFrame):
* Shared/SecurityOriginData.h:

* UIProcess/API/APIFrameInfo.cpp:
(API::FrameInfo::FrameInfo):
* UIProcess/API/APIFrameInfo.h:

* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didFailProvisionalLoadInSubframeWithError):

* UIProcess/API/APIUIClient.h:
(API::UIClient::createNewPage):
(API::UIClient::runJavaScriptAlert):
(API::UIClient::runJavaScriptConfirm):
(API::UIClient::runJavaScriptPrompt):

* UIProcess/API/C/WKApplicationCacheManager.cpp:
(WKApplicationCacheManagerGetApplicationCacheOrigins):

* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetKeyValueStorageOrigins):

* UIProcess/API/C/WKOriginDataManager.cpp:
(WKOriginDataManagerGetOrigins):

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
(WKPageSetPageNavigationClient):

* UIProcess/API/C/WKResourceCacheManager.cpp:
(WKResourceCacheManagerGetCacheOrigins):

* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo securityOrigin]):

* UIProcess/API/Cocoa/WKSecurityOrigin.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.h.
* UIProcess/API/Cocoa/WKSecurityOrigin.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.mm.
(-[WKSecurityOrigin dealloc]):
(-[WKSecurityOrigin description]):
(-[WKSecurityOrigin protocol]):
(-[WKSecurityOrigin host]):
(-[WKSecurityOrigin port]):
(-[WKSecurityOrigin _apiObject]):
* UIProcess/API/Cocoa/WKSecurityOriginInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOriginInternal.h.
(API::wrapper):

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

* UIProcess/API/Cocoa/WKUserContentController.mm:

* UIProcess/API/Cocoa/_WKSecurityOrigin.h:
* UIProcess/API/Cocoa/_WKSecurityOrigin.mm:
(-[_WKSecurityOrigin _initWithSecurityOrigin:]): Deleted.
(-[_WKSecurityOrigin protocol]): Deleted.
(-[_WKSecurityOrigin host]): Deleted.
(-[_WKSecurityOrigin port]): Deleted.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::didFailProvisionalLoadInSubframeWithError):

* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):

* UIProcess/UserContent/WebScriptMessageHandler.h:

* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::didPostMessage):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/UserContent/WebUserContentControllerProxy.messages.in:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

* WebKit2.xcodeproj/project.pbxproj:

* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/modal-alerts-in-new-about-blank-window.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/ModalAlerts.mm: Added.
(sawDialog):
(-[ModalAlertsUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(-[ModalAlertsUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[ModalAlertsUIDelegate webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[ModalAlertsUIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):
(TEST):

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

5 years ago<rdar://problem/21342465> Make -[WKWebView _certificateChain] public.
mitz@apple.com [Tue, 23 Jun 2015 16:45:30 +0000 (16:45 +0000)]
<rdar://problem/21342465> Make -[WKWebView _certificateChain] public.
https://bugs.webkit.org/show_bug.cgi?id=145886

Reviewed by Sam Weinig.

* Shared/WebCertificateInfo.h:
(WebKit::WebCertificateInfo::create): Changed to return a Ref rather than a PassRefPtr.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
PageLoadState::Observer functions to PageLoadStateObserver.

* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Updated for change to
WebCertificateInfo::create.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto.

* UIProcess/API/Cocoa/WKWebView.h: Declared new certificateChain property on WKWebView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView certificateChain]): Added. Returns the certificate chain from the page load
state, or an empty array if there is no certificate chain.

* UIProcess/API/Cocoa/WKWebViewPrivate.h: Deprecated _certificateChain.

* UIProcess/Cocoa/NavigationState.h: Declared overrides of new PageLoadState::Observer
functions.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeCertificateInfo): Override to call
-willChangeValueForKey:.
(WebKit::NavigationState::didChangeCertificateInfo): Override to call
-didChangeValueForKey:.

* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges): Call the new observer functions
willChangeCertificateInfo and didChangeCertificateInfo.
(WebKit::PageLoadState::didCommitLoad): Added new certificateInfo parameter, which is stored
in the uncommitted state.
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::certificateInfo): Added this getter.

* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad): Changed the parameter type from
WebCore::CertificateInfo to WebCertificateInfo.
* UIProcess/WebFrameProxy.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame): Pass the certificate info to
PageLoadState::didCommitLoad.

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

5 years agoWeb Inspector: Layout & Rendering timeline should show paint and layout records in...
mattbaker@apple.com [Tue, 23 Jun 2015 16:26:08 +0000 (16:26 +0000)]
Web Inspector: Layout & Rendering timeline should show paint and layout records in separate rows
https://bugs.webkit.org/show_bug.cgi?id=146119

Reviewed by Timothy Hatcher.

This patch makes the original Layout & Rendering timeline visually consistent with the Rendering Frames
timeline, which uses green to distinguish Paint from Layout. In order to support having record bars with
different colors in the same overview graph, the timeline has been split into two rows.

* UserInterface/Views/LayoutTimelineOverviewGraph.css:
(.timeline-overview-graph.layout > .graph-row):
(.timeline-overview-graph.layout > .graph-row > .timeline-record-bar):
(.timeline-overview-graph.layout > .graph-row > .timeline-record-bar > .segment):
New row styles.

* UserInterface/Views/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph.prototype.reset.createRecordRow):
(WebInspector.LayoutTimelineOverviewGraph.prototype.reset):
(WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout):
(WebInspector.LayoutTimelineOverviewGraph.prototype._updateRowLayout.createBar):
(WebInspector.LayoutTimelineOverviewGraph.prototype._updateRowLayout):
(WebInspector.LayoutTimelineOverviewGraph.prototype._layoutTimelineRecordAdded):
(WebInspector.LayoutTimelineOverviewGraph): Deleted.
Added bookkeeping objects for timeline row elements and their associated records.

* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar.timeline-record-type-layout.layout-timeline-record-paint > .segment):
New style for layout record event types.

* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.prototype.set records):
Add style class for eventType, if present.

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

5 years ago[CSS Grid Layout] Performance optimization: avoid computing overflow alignment if...
jfernandez@igalia.com [Tue, 23 Jun 2015 14:18:11 +0000 (14:18 +0000)]
[CSS Grid Layout] Performance optimization: avoid computing overflow alignment if not needed
https://bugs.webkit.org/show_bug.cgi?id=146231

Reviewed by Sergio Villar Senin.

We don't need to apply any overflow handling if alignment value don't have a potential
risk of data loss, as it's the case of 'start' value.

This patch avoid computing the overflow in all the cases, since it adds an unneeded
overhead which affects performance.

New code improves performance around 3%-8%, depending on the grid tests.

No new tests, no new funcitonality.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::rowPositionForChild):
(WebCore::RenderGrid::columnPositionForChild):

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

5 years agoMediaDevices.getUserMedia should migrate from callbacks to DOMPromise
youenn.fablet@crf.canon.fr [Tue, 23 Jun 2015 14:10:06 +0000 (14:10 +0000)]
MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
https://bugs.webkit.org/show_bug.cgi?id=146200

Reviewed by Darin Adler.

Source/WebCore:

Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
Removed MediaDevices.getUserMedia custom binding.

Covered by existing tests.

* CMakeLists.txt: Removing custom binding.
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
* Modules/mediastream/MediaDevices.h: Ditto.
* Modules/mediastream/MediaDevices.idl: Removing custom binding.
* Modules/mediastream/NavigatorUserMedia.cpp:
(WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::create): Moving from callback to promise.
(WebCore::UserMediaRequest::UserMediaRequest): Ditto.
(WebCore::UserMediaRequest::didCreateStream): Ditto.
(WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
(WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
* Modules/mediastream/UserMediaRequest.h: Ditto.
* bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
(WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
(WebCore::Error>::resolve):
(WebCore::Error>::reject):
* bindings/js/JSMediaDevicesCustom.cpp: Removed.
* bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.

LayoutTests:

* fast/mediastream/MediaDevices-getUserMedia-expected.txt:

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

5 years ago[Streams API] Implement ReadableStream js source "'cancel" callback
youenn.fablet@crf.canon.fr [Tue, 23 Jun 2015 11:29:32 +0000 (11:29 +0000)]
[Streams API] Implement ReadableStream js source "'cancel" callback
https://bugs.webkit.org/show_bug.cgi?id=146204

Reviewed by Darin Adler.

Source/WebCore:

Calling "cancel" JS function when web app is cancelling a JS readable stream.
Handling of promise returned value in case of async cancel.

Covered by rebased tests.

* bindings/js/ReadableJSStream.cpp:
(WebCore::ReadableJSStream::invoke): Refactoring to pass cancel reason or controller to the JS function.
(WebCore::ReadableJSStream::doStart): Ditto.
(WebCore::startReadableStreamAsync): Renaming readableStream as protectedStream.
(WebCore::createPullResultFulfilledFunction): Ditto.
(WebCore::ReadableJSStream::doPull): Refactoring to pass cancel reason or controller to the JS function.
(WebCore::createCancelResultFulfilledFunction): Cancel promise fullfil callback.
(WebCore::createCancelResultRejectedFunction): Cancel promise reject callback.
(WebCore::ReadableJSStream::doCancel): Calling cancel JS callback and handling promise returned value.
* bindings/js/ReadableJSStream.h: Refactoring to pass cancel reason or controller to the JS function.

LayoutTests:

* streams/reference-implementation/bad-underlying-sources-expected.txt:
* streams/reference-implementation/readable-stream-cancel-expected.txt:
* streams/reference-implementation/readable-stream-expected.txt:
* streams/reference-implementation/readable-stream-reader-expected.txt:

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

5 years agoRemove build warnings in Tools/DumpRenderTree/TestNetscapePlugIn
commit-queue@webkit.org [Tue, 23 Jun 2015 10:45:29 +0000 (10:45 +0000)]
Remove build warnings in Tools/DumpRenderTree/TestNetscapePlugIn
https://bugs.webkit.org/show_bug.cgi?id=146007

Patch by Tanay C <tanay.c@samsung.com> on 2015-06-23
Reviewed by Darin Adler.

* DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
* DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp: Add attribute to functions.
(pluginLogWithWindowObject):
(pluginLogWithArguments):
(pluginLog):
* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp: Add attribute to functions.
(PluginTest::executeScript):
(PluginTest::log):

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

5 years ago[EFL] Unreviewed, gardening.
gyuyoung.kim@webkit.org [Tue, 23 Jun 2015 09:34:04 +0000 (09:34 +0000)]
[EFL] Unreviewed, gardening.

Mark fast/forms/listbox-visible-size.html to failure and skip
fast/text/arabic-times-new-roman.html because it is for iOS.

* platform/efl/TestExpectations:

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

5 years agoBuild fix. A/B testing is broken when continuous builders report revisions out of...
rniwa@webkit.org [Tue, 23 Jun 2015 09:03:11 +0000 (09:03 +0000)]
Build fix. A/B testing is broken when continuous builders report revisions out of order.

* public/v2/app.js:
(App.AnalysisTaskController.Ember.Controller.extend.):

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

5 years ago[WinCairo] WebDownload::initWithRequest is not implemented.
peavo@outlook.com [Tue, 23 Jun 2015 08:56:40 +0000 (08:56 +0000)]
[WinCairo] WebDownload::initWithRequest is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=146203

Reviewed by Alex Christensen.

Implement method to start download from a IWebURLRequest object.

* WebDownloadCurl.cpp:
(WebDownload::initWithRequest): Implemented.

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

5 years ago[EFL] Add libhyphen-dev as dependency after r185862
ossy@webkit.org [Tue, 23 Jun 2015 07:10:31 +0000 (07:10 +0000)]
[EFL] Add libhyphen-dev as dependency after r185862
https://bugs.webkit.org/show_bug.cgi?id=146230

Reviewed by Gyuyoung Kim.

* efl/install-dependencies:

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

5 years ago[EFL][CustomProtocol] Do not add duplicated custom scheme
gyuyoung.kim@webkit.org [Tue, 23 Jun 2015 07:00:22 +0000 (07:00 +0000)]
[EFL][CustomProtocol] Do not add duplicated custom scheme
https://bugs.webkit.org/show_bug.cgi?id=146199

Reviewed by Carlos Garcia Campos.

WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol generates
a crash when duplicated scheme is registered on debug mode, or just registers it on release mode.
However application can register duplicate scheme by mistake or on purpose. Thus it would be good
if we don't register it instead of registering it or generating a crash when trying to regiseter
duplicated scheme.

EFL port want to allow user to change registered callback, thus EWK2ContextTest::ewk_context_url_scheme_register()
is modified to test it.

Test: ewk_context_url_scheme_register() in test_ewk2_context.cpp.

* UIProcess/API/efl/ewk_context.h: Added a comment to replace registered callback.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(EWK2ContextTest::schemeRequestCallback1):
(EWK2ContextTest::schemeRequestCallback2):
(TEST_F):
(EWK2ContextTest::schemeRequestCallback): Deleted.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
(WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):

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

5 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.
carlosgc@webkit.org [Tue, 23 Jun 2015 06:45:49 +0000 (06:45 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.9.3.

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

5 years ago[WTF] Platform.h: use _ABI64 instead of _MIPS_SIM_ABI64 to determine MIPS N64
ossy@webkit.org [Tue, 23 Jun 2015 06:33:16 +0000 (06:33 +0000)]
[WTF] Platform.h: use _ABI64 instead of _MIPS_SIM_ABI64 to determine MIPS N64
https://bugs.webkit.org/show_bug.cgi?id=145113

Patch by YunQiang Su <wzssyqa@gmail.com> on 2015-06-22
Reviewed by Csaba Osztrogon√°c.

* wtf/Platform.h:

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

5 years ago[EFL] Hyphenation is not supported
ryuan.choi@navercorp.com [Tue, 23 Jun 2015 05:23:57 +0000 (05:23 +0000)]
[EFL] Hyphenation is not supported
https://bugs.webkit.org/show_bug.cgi?id=89830

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake: Added an option for LibHyphen.

Source/WebCore:

Share libHyphen backend of GTK port.

Rebased fast/text/hyphenate-*.html

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* platform/efl/FileSystemEfl.cpp:
(WebCore::listDirectory): Deleted because of lack of functionality.
eina_file_ls returns full directory path so fnmatch fails to check dict file.
This patch reuse Posix implementation instead of EFL port specific function.
* platform/posix/FileSystemPOSIX.cpp: Ditto.
* platform/text/gtk/HyphenationLibHyphen.cpp: Moved to platform/text/hyphen
* platform/text/hyphen/HyphenationLibHyphen.cpp:
Renamed from Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp.
(WebCore::scanTestDictionariesDirectoryIfNecessary):
Added PLATFORM guard and EFL implementation for the test directory

Tools:

* efl/jhbuild.modules: Added webkitgtk-test-dicts for layout test.

LayoutTests:

Rebaseline expected results which is related to hyphenation.

* platform/efl/TestExpectations: Unskip hyphenate-locale.html
* platform/efl/fast/text/hyphenate-character-expected.png:
* platform/efl/fast/text/hyphenate-character-expected.txt:
* platform/efl/fast/text/hyphenate-first-word-expected.png:
* platform/efl/fast/text/hyphenate-first-word-expected.txt:
* platform/efl/fast/text/hyphenate-limit-before-after-expected.png:
* platform/efl/fast/text/hyphenate-limit-before-after-expected.txt:
* platform/efl/fast/text/hyphenate-limit-lines-expected.png:
* platform/efl/fast/text/hyphenate-limit-lines-expected.txt:
* platform/efl/fast/text/hyphenate-locale-expected.png: Added.
* platform/efl/fast/text/hyphenate-locale-expected.txt: Added.
* platform/efl/fast/text/hyphens-expected.png:
* platform/efl/fast/text/hyphens-expected.txt:

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

5 years agoPart 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox...
mitz@apple.com [Tue, 23 Jun 2015 04:10:42 +0000 (04:10 +0000)]
Part 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
https://bugs.webkit.org/show_bug.cgi?id=146197

Rubber-stamped by Anders Carlsson.

* WebKit2.xcodeproj/project.pbxproj: Deleted the WebKit2SandboxProfiles-IOSOverride target.

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

5 years ago[WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permiss...
cdumez@apple.com [Tue, 23 Jun 2015 03:54:30 +0000 (03:54 +0000)]
[WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permission request
https://bugs.webkit.org/show_bug.cgi?id=146228
<rdar://problem/15179262>

Reviewed by Daniel Bates.

Source/WebCore:

Add Geolocation::resetIsAllowed() API that merely resets
m_allowGeolocation to Unknown, so that we will request the permission
again the next time a position is requested.

* Modules/geolocation/Geolocation.h:
(WebCore::Geolocation::resetIsAllowed):

Source/WebKit/mac:

Call the new Geolocation::resetIsAllowed() API after denying the
current request, instead of calling
Geolocation::resetAllGeolocationPermission(). In addition to resetting
m_allowGeolocation to Unknown, the latter would also start a new
permission request. However, for
WebAllowDenyPolicyListener.denyOnlyThisRequest(), we really only want
to deny the current request and then reset m_allowGeolocation to
Unknown so that permission is requested again later if the app requests
a position again.

The previous implementation meant that if the client application keeps
calling WebAllowDenyPolicyListener.denyOnlyThisRequest(), we would end
up in an infinite loop (requesting for permission), even though the
application did not make any new geolocation requests.

* WebCoreSupport/WebGeolocationClient.mm:
(-[WebGeolocationPolicyListener denyOnlyThisRequest]):

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

5 years agoGet rid of factory json files in benchmark_runner
commit-queue@webkit.org [Tue, 23 Jun 2015 03:47:24 +0000 (03:47 +0000)]
Get rid of factory json files in benchmark_runner
https://bugs.webkit.org/show_bug.cgi?id=146175

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-06-22
Reviewed by Ryosuke Niwa.

Get rid of factory json files in benchmark_runner and refactoring the code.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/__init__.py:
(benchmark_builder_loader):
* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builder_factory.py:
(BenchmarkBuilderFactory):
* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Removed.
* Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:
(GenericBenchmarkBuilder):
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__):
(BenchmarkRunner.execute):
* Scripts/webkitpy/benchmark_runner/browser_driver/__init__.py:
(browser_driver_loader):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
(BrowserDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
(BrowserDriverFactory):
(BrowserDriverFactory.available_platforms):
(BrowserDriverFactory.available_browsers):
(BrowserDriverFactory.add_browser_driver):
(BrowserDriverFactory.create):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_drivers.json: Removed.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver):
(OSXBrowserDriver.prepareEnv):
(OSXBrowserDriver.terminateProcesses):
(OSXBrowserDriver.screenSize):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver):
(OSXChromeCanaryDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
(OSXFirefoxDriver):
(OSXFirefoxNightlyDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):
* Scripts/webkitpy/benchmark_runner/generic_factory.py:
(GenericFactory.create):
(GenericFactory.add):
(GenericFactory.iterateGetItem): Deleted.
* Scripts/webkitpy/benchmark_runner/http_server_driver/__init__.py:
(http_server_driver_loader):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
(HTTPServerDriver):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver_factory.py:
(HTTPServerDriverFactory):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_drivers.json: Removed.
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
(SimpleHTTPServerDriver):
* Scripts/webkitpy/benchmark_runner/utils.py:
(is_subclass):
(load_subclasses):
(ModuleNotFoundError): Deleted.
(loadModule): Deleted.
(loadJSONFromFile): Deleted.

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

5 years agoASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering...
simon.fraser@apple.com [Tue, 23 Jun 2015 01:59:08 +0000 (01:59 +0000)]
ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
https://bugs.webkit.org/show_bug.cgi?id=146225

Reviewed by Zalan Bujtas.

Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
been updated; this happens to work most of the time because painting updates them,
but if incremental rendering is suppressed, we may not have painted yet.

Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
dirty bits is cheaper than calling isStackingContext().

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

5 years agoMake it possible to enable incremental rendering suppression in MiniBrowser
simon.fraser@apple.com [Tue, 23 Jun 2015 01:59:05 +0000 (01:59 +0000)]
Make it possible to enable incremental rendering suppression in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=146223

Reviewed by Tim Horton.

Add a menu item to enable incremental rendering suppression to MiniBrowser.

For WK1, this just toggles a pref, and takes effect immediately.

For WK2, this is a WKConfiguration property, so only affects new web views.

Also remove a toolbar item connection to toggleUseMinimumViewSize: that caused
logging on launch.

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
* MiniBrowser/mac/BrowserWindow.xib:
* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleIncrementalRenderingSuppressed:]):
(-[SettingsController incrementalRenderingSuppressed]):
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]):

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

5 years agoRename PlatformCA*Mac to PlatformCA*Cocoa
dino@apple.com [Tue, 23 Jun 2015 01:51:05 +0000 (01:51 +0000)]
Rename PlatformCA*Mac to PlatformCA*Cocoa
https://bugs.webkit.org/show_bug.cgi?id=146224
<rdar://problem/21497182>

Reviewed by Simon Fraser.

Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
to the more accurate Cocoa suffix.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* page/mac/ServicesOverlayController.mm:
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Renamed from Source/WebCore/platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp.
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h.
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
* platform/graphics/ca/cocoa/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h.
* platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm.
* platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/mac/WebTiledBackingLayer.mm:

Source/WebKit2:

* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::filtersCanBeComposited):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::create):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):

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

5 years agoDelegates should be formal protocols
andersca@apple.com [Tue, 23 Jun 2015 01:24:02 +0000 (01:24 +0000)]
Delegates should be formal protocols
https://bugs.webkit.org/show_bug.cgi?id=146222
rdar://problem/17380856

Reviewed by Dan Bernstein.

Flip the switch on OS X and make delegates formal protocols.

* postprocess-headers.sh:

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

5 years ago[cssjit] Disable compiling scrollbar pseudoclass selectors
achristensen@apple.com [Tue, 23 Jun 2015 01:09:15 +0000 (01:09 +0000)]
[cssjit] Disable compiling scrollbar pseudoclass selectors
https://bugs.webkit.org/show_bug.cgi?id=146220

Reviewed by Benjamin Poulain.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addScrollbarPseudoClassType):
Don't compile selectors with scrollbar pseudoclasses.

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

5 years ago[ES6] Allow trailing comma in ArrayBindingPattern and ObjectBindingPattern
utatane.tea@gmail.com [Tue, 23 Jun 2015 00:51:44 +0000 (00:51 +0000)]
[ES6] Allow trailing comma in ArrayBindingPattern and ObjectBindingPattern
https://bugs.webkit.org/show_bug.cgi?id=146192

Reviewed by Darin Adler.

Source/JavaScriptCore:

According to the ES6 spec, trailing comma in ArrayBindingPattern and ObjectBindingPattern is allowed.
And empty ArrayBindingPattern and ObjectBindingPattern is also allowed.

This patch allows trailing comma and empty binding patterns.

* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayPatternNode::bindValue):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseDeconstructionPattern):
* tests/stress/trailing-comma-in-patterns.js: Added.
(shouldBe):
(iterator):

LayoutTests:

* js/object-literal-syntax-expected.txt:

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

5 years agoA/B testing results should be shown even if they were submitted to different platforms
rniwa@webkit.org [Tue, 23 Jun 2015 00:47:51 +0000 (00:47 +0000)]
A/B testing results should be shown even if they were submitted to different platforms
https://bugs.webkit.org/show_bug.cgi?id=146219

Reviewed by Andreas Kling.

Fetch A/B testing results regardless of the platform to which results are submitted
by providing the platform ID to which the results were submitted for each test group.

* public/api/test-groups.php:
(main): Include the platform id in the test groups.
* public/v2/analysis.js:
(App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.

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

5 years ago-webkit-clip-path clips incorrectly if the element bounds go beyond the top edge...
simon.fraser@apple.com [Mon, 22 Jun 2015 23:32:30 +0000 (23:32 +0000)]
-webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
https://bugs.webkit.org/show_bug.cgi?id=146218
rdar://problem/21127840

Reviewed by Zalan Bujtas.
Source/WebCore:

The clip path is computed using the RenderLayer's bounding box, so needs to be offset
by the offsetFromRenderer when set on the mask layer.

Test: compositing/masks/compositing-clip-path-origin.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

LayoutTests:

Test clip path on layers with non-zero bounds offsetFromRenderer because of box shadow,
or vertical writing mode.

* compositing/masks/compositing-clip-path-origin-expected.html: Added.
* compositing/masks/compositing-clip-path-origin.html: Added.

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

5 years agofast/text/justify-ideograph-{complex,simple,vertical}.html tests are flaky on El...
ddkilzer@apple.com [Mon, 22 Jun 2015 23:02:04 +0000 (23:02 +0000)]
fast/text/justify-ideograph-{complex,simple,vertical}.html tests are flaky on El Capitan Debug builds

Tracked by <rdar://problem/21486062>.

* platform/mac/TestExpectations: Mark tests as flaky:
- fast/text/justify-ideograph-complex.html
- fast/text/justify-ideograph-simple.html
- fast/text/justify-ideograph-vertical.html

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

5 years agoFix build.
andersca@apple.com [Mon, 22 Jun 2015 22:36:14 +0000 (22:36 +0000)]
Fix build.

* wtf/threads/BinarySemaphore.cpp:

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

5 years agoWeb sockets should be treated as active mixed content
mcatanzaro@igalia.com [Mon, 22 Jun 2015 22:22:54 +0000 (22:22 +0000)]
Web sockets should be treated as active mixed content
https://bugs.webkit.org/show_bug.cgi?id=140624

Reviewed by Sam Weinig.

Source/WebCore:

Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
       http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): Block ws:// WebSocket connections from https:// pages, and
emit the onerror event after doing so.
* platform/SchemeRegistry.cpp:
(WebCore::secureSchemes): Add wss:// to the list of secure schemes.

LayoutTests:

* http/tests/security/mixedContent/resources/frame-with-insecure-websocket.html: Added.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe-expected.txt: Added.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html: Added.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame-expected.txt: Added.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html: Added.

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

5 years agoGet rid of the Windows specific BinarySemaphore implementation
andersca@apple.com [Mon, 22 Jun 2015 22:07:20 +0000 (22:07 +0000)]
Get rid of the Windows specific BinarySemaphore implementation
https://bugs.webkit.org/show_bug.cgi?id=146216

Reviewed by Andreas Kling.

The fact that the Windows implementation uses a HEVENT internally was only useful
to the Windows port of WebKit2; we can get rid of it now.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* wtf/threads/BinarySemaphore.h:
(WTF::BinarySemaphore::event): Deleted.
* wtf/threads/win/BinarySemaphoreWin.cpp: Removed.
(WTF::BinarySemaphore::BinarySemaphore): Deleted.
(WTF::BinarySemaphore::~BinarySemaphore): Deleted.
(WTF::BinarySemaphore::signal): Deleted.
(WTF::BinarySemaphore::wait): Deleted.

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

5 years agoElement with blur backdrop-filter shows edge duplication and dark edges
dino@apple.com [Mon, 22 Jun 2015 22:06:45 +0000 (22:06 +0000)]
Element with blur backdrop-filter shows edge duplication and dark edges
https://bugs.webkit.org/show_bug.cgi?id=146215
<rdar://problem/20367695>

Reviewed by Tim Horton.

Source/WebCore:

The input images to backdrop filters should duplicate their edge pixels
outwards, rather than using transparent pixels. This is a flag we
set on the Gaussian blur, but means we have to remember if the
FilterOperations list came from a regular filter or a backdrop filter.

Test: css3/filters/backdrop/blur-input-bounds.html

* css/CSSPropertyNames.in: New custom convertor for backdrop-filter.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor
that sets the backdrop flag, but is otherwise the same as a normal filter
convertor.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilterOperations): Inherit the backdrop flag if either of our
inputs has it.
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges
key on the CAFilter if necessary.
* platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if
these operations are intended for backdrops.
(WebCore::FilterOperations::operator=):
(WebCore::FilterOperations::operator==):
* platform/graphics/filters/FilterOperations.h:
(WebCore::FilterOperations::isUsedForBackdropFilters):
(WebCore::FilterOperations::setUsedForBackdropFilters):

LayoutTests:

Add a pixel test to show that the input images to backdrop filters should duplicate their
edge pixels. Unfortunately this is not reproducible with normal filters, so it
can't be a reference test.

* css3/filters/backdrop/blur-input-bounds.html: Added.
* platform/mac/css3/filters/backdrop/blur-input-bounds-expected.png: Added.
* platform/mac/css3/filters/backdrop/blur-input-bounds-expected.txt: Added.

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

5 years agoWeb Inspector: gaps between sections of the styles sidebar rules tab confusing, shoul...
commit-queue@webkit.org [Mon, 22 Jun 2015 22:02:09 +0000 (22:02 +0000)]
Web Inspector: gaps between sections of the styles sidebar rules tab confusing, should say "Media: all"
https://bugs.webkit.org/show_bug.cgi?id=142918

Patch by Devin Rousso <drousso@apple.com> on 2015-06-22
Reviewed by Timothy Hatcher.

* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label:not(.filter-section-non-matching) ~ .label):
Now properly adds padding to filtered labels.
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label ~ .label): Deleted.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): If a section of CSS rules has no media or inheritance, add
a label that says "Media: all" above the section.

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

5 years ago[TextIndicator] Text shifts one pixel to the left when I force click to bring up...
timothy_horton@apple.com [Mon, 22 Jun 2015 21:33:12 +0000 (21:33 +0000)]
[TextIndicator] Text shifts one pixel to the left when I force click to bring up Lookup in Mail messages
https://bugs.webkit.org/show_bug.cgi?id=146214
<rdar://problem/20782970>

Reviewed by Dean Jackson.

* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
(WebCore::TextIndicatorWindow::setTextIndicator):
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]): Deleted.
When the WebView is at a nonintegral position, we can end up needing a TextIndicator
with a nonintegral position. We need to round the window position, so we need to apply
the fractional part to the indicator layers inside, not to the window.

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

5 years agoSimplify Connection::SyncMessageState
andersca@apple.com [Mon, 22 Jun 2015 21:11:25 +0000 (21:11 +0000)]
Simplify Connection::SyncMessageState
https://bugs.webkit.org/show_bug.cgi?id=146213

Reviewed by Andreas Kling.

Since we no longer support Connections dispatching to multiple threads, we can make SyncMessageState
into a singleton and get rid of the RunLoop -> SyncMessageState hash map.

* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::singleton):
(IPC::Connection::SyncMessageState::SyncMessageState):
(IPC::Connection::SyncMessageState::processIncomingMessage):
(IPC::Connection::SyncMessageState::dispatchMessages):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingSyncReply):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::SyncMessageState::syncMessageStateMap): Deleted.
(IPC::Connection::SyncMessageState::syncMessageStateMapMutex): Deleted.
(IPC::Connection::SyncMessageState::getOrCreate): Deleted.
(IPC::Connection::SyncMessageState::~SyncMessageState): Deleted.
(IPC::Connection::Connection): Deleted.
* Platform/IPC/Connection.h:

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

5 years ago[iOS] Arabic text styled with Georgia is rendered as boxes
mmaxfield@apple.com [Mon, 22 Jun 2015 20:53:26 +0000 (20:53 +0000)]
[iOS] Arabic text styled with Georgia is rendered as boxes
https://bugs.webkit.org/show_bug.cgi?id=145681
<rdar://problem/21169844>

Reviewed by Darin Adler.

Source/WebCore:

Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns
TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead
of using TimesNewRomanPSMT, we will simply just use GeezaPro.

Test: fast/text/arabic-times-new-roman.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic()
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::fontFamilyShouldNotBeUsedForArabic):

LayoutTests:

* fast/text/arabic-times-new-roman.html: Added.
* platform/ios-simulator/fast/text/arabic-times-new-roman-expected.txt: Added.
* platform/ios-simulator/fast/text/arabic-times-new-roman-expected.png: Added.
* platform/mac-mavericks/fast/text/arabic-times-new-roman-expected.txt: Added.
* platform/mac/fast/text/arabic-times-new-roman-expected.txt: Added.
* platform/mac/fast/text/arabic-times-new-roman-expected.png: Added.

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

5 years agoUnreviewed non-mac debug build fix after r185840.
achristensen@apple.com [Mon, 22 Jun 2015 20:49:53 +0000 (20:49 +0000)]
Unreviewed non-mac debug build fix after r185840.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
Added enable flag around assertion.

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

5 years ago[Content Extensions] Add SPI to reload without content blocking.
achristensen@apple.com [Mon, 22 Jun 2015 20:10:50 +0000 (20:10 +0000)]
[Content Extensions] Add SPI to reload without content blocking.
https://bugs.webkit.org/show_bug.cgi?id=146128
rdar://problem/20351903

Reviewed by Sam Weinig.

Source/WebCore:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::open):
* page/Page.h:
(WebCore::Page::userContentController):
(WebCore::Page::userContentExtensionsEnabled):
(WebCore::Page::setUserContentExtensionsEnabled):
(WebCore::Page::group):
* page/UserContentController.cpp:
(WebCore::UserContentController::removeAllUserContentExtensions):
(WebCore::UserContentController::processContentExtensionRulesForLoad):
(WebCore::UserContentController::actionsForResourceLoad):
* page/UserContentController.h:

Source/WebKit2:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetCustomUserAgent):
(WKPageSetUserContentExtensionsEnabled):
(WKPageSupportsTextEncoding):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _customUserAgent]):
(-[WKWebView _setUserContentExtensionsEnabled:]):
(-[WKWebView _userContentExtensionsEnabled]):
(-[WKWebView _setCustomUserAgent:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
(WebKit::WebPageProxy::setUserContentExtensionsEnabled):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::userContentExtensionsEnabled):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setShouldScaleViewToFitDocument):
(WebKit::WebPage::setUserContentExtensionsEnabled):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Pass a boolean from the API to WebCore.

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

5 years agoRemove m_clientRunLoop from IPC::Connection
andersca@apple.com [Mon, 22 Jun 2015 19:52:51 +0000 (19:52 +0000)]
Remove m_clientRunLoop from IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=146212

Reviewed by Sam Weinig.

We only ever create connections whose messages are dispatched to the main run loop, so we can
vastly simplify the code by only allowing messages to be dispatched there.

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
* Platform/IPC/Connection.cpp:
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
(IPC::Connection::waitForMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::wakeUpRunLoop):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::receiveSourceEventHandler):
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::WebProcessConnection):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::establishConnection):

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

5 years agoREGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtr...
zalan@apple.com [Mon, 22 Jun 2015 19:35:19 +0000 (19:35 +0000)]
REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
https://bugs.webkit.org/show_bug.cgi?id=146116
rdar://problem/20959369

Reviewed by Brent Fulgham.

This patch ensures that we don't adjust the selection unless the visual selection still matches this subtree root.

When multiple selection roots are present we need to ensure that a RenderObject
only shows up in one of them.
RenderView::splitSelectionBetweenSubtrees(), as the name implies, splits the
selection and sets the selection range (start/end) on each selection root.
However, SelectionSubtreeRoot::adjustForVisibleSelection() later recomputes the range
based on visible selection and that could end up collecting renderers as selection start/end
from another selection subtree.
RenderObject's holds the last selection state (RenderObject::setSelectionState).
If we set a renderer first as "on selection border" and later "inside" using multiple selection roots,
we can't clean up selections properly when this object gets destroyed.
One of the roots ends up with a dangling RenderObject pointer.

Source/WebCore:

Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html

* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):

LayoutTests:

* fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees-expected.txt: Added.
* fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html: Added.

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