WebKit-https.git
3 years agoUse NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
akling@apple.com [Sat, 9 Jan 2016 13:13:41 +0000 (13:13 +0000)]
Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
<https://webkit.org/b/152902>

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

Mostly mechanical conversion to NeverDestroyed throughout JavaScriptCore.

* API/JSAPIWrapperObject.mm:
(jsAPIWrapperObjectHandleOwner):
* API/JSManagedValue.mm:
(managedValueHandleOwner):
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::objectGroupForBreakpointAction):
* jit/ExecutableAllocator.cpp:
(JSC::DemandExecutableAllocator::allocators):

Source/WebCore:

Mostly mechanical conversion to NeverDestroyed throughout WebCore.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
(WebCore::stringForPlaybackTargetAvailability):
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::directionNext):
(WebCore::IDBCursor::directionNextUnique):
(WebCore::IDBCursor::directionPrev):
(WebCore::IDBCursor::directionPrevUnique):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::modeReadOnly):
(WebCore::IDBTransaction::modeReadWrite):
(WebCore::IDBTransaction::modeVersionChange):
(WebCore::IDBTransaction::modeReadOnlyLegacy):
(WebCore::IDBTransaction::modeReadWriteLegacy):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::readyState):
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::automaticKeyword):
(WebCore::MediaControlsHost::forcedOnlyKeyword):
(WebCore::MediaControlsHost::alwaysOnKeyword):
(WebCore::MediaControlsHost::externalDeviceType):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::openKeyword):
(WebCore::MediaSource::closedKeyword):
(WebCore::MediaSource::endedKeyword):
(WebCore::MediaSource::streamEndedWithError):
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::quickTimePluginReplacementScript):
(WebCore::QuickTimePluginReplacement::supportsMimeType):
(WebCore::QuickTimePluginReplacement::supportsFileExtension):
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::boundaryEventOccurred):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyIDForJSCSSPropertyName):
* bridge/c/c_instance.cpp:
(JSC::Bindings::globalExceptionString):
* css/MediaList.cpp:
(WebCore::addResolutionWarningMessageToConsole):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
* dom/ChildListMutationScope.cpp:
(WebCore::accumulatorMap):
* dom/DOMImplementation.cpp:
(WebCore::isSupportedSVG10Feature):
(WebCore::isSupportedSVG11Feature):
* dom/Document.cpp:
(WebCore::Document::readyState):
* dom/Element.cpp:
(WebCore::Element::webkitRegionOverset):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::isValidCSSContentType):
* dom/MutationObserver.cpp:
(WebCore::activeMutationObservers):
(WebCore::suspendedMutationObservers):
* dom/MutationRecord.cpp:
* dom/PseudoElement.cpp:
(WebCore::pseudoElementTagName):
(WebCore::PseudoElement::pseudoElementNameForEvents):
* dom/QualifiedName.cpp:
(WebCore::qualifiedNameCache):
(WebCore::nullQName):
* dom/ScriptElement.cpp:
(WebCore::isLegacySupportedJavaScriptLanguage):
(WebCore::ScriptElement::notifyFinished):
* editing/ApplyStyleCommand.cpp:
(WebCore::styleSpanClassString):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::shouldAddNamespaceElement):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isInterchangeNewlineNode):
(WebCore::isInterchangeConvertedSpaceSpan):
* editing/htmlediting.cpp:
(WebCore::nonBreakingSpaceString):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
(WebCore::createMarkupInternal):
* fileapi/Blob.cpp:
(WebCore::BlobURLRegistry::registry):
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
* html/DateInputType.cpp:
(WebCore::DateInputType::createStepRange):
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::createStepRange):
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::createStepRange):
* html/EmailInputType.cpp:
(WebCore::isValidEmailAddress):
* html/FormController.cpp:
(WebCore::FormKeyGenerator::formKey):
(WebCore::formStateSignature):
* html/HTMLAnchorElement.cpp:
(WebCore::rootEditableElementMap):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::formControlType):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::formControlType):
* html/HTMLFrameOwnerElement.h:
(WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::formControlType):
* html/HTMLLinkElement.cpp:
(WebCore::linkLoadEventSender):
* html/HTMLMediaElement.cpp:
(WebCore::documentToElementSetMap):
* html/HTMLObjectElement.cpp:
(WebCore::isRecognizedTagName):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::formControlType):
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::formControlType):
* html/HTMLPlugInElement.cpp:
(WebCore::registeredPluginReplacements):
* html/HTMLPlugInImageElement.cpp:
(WebCore::titleText):
(WebCore::subtitleText):
(WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::formControlType):
* html/HTMLStyleElement.cpp:
(WebCore::styleLoadEventSender):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::formControlType):
* html/HTMLTextFormControlElement.cpp:
(WebCore::directionString):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::appendFormData):
* html/InputTypeNames.cpp:
(WebCore::InputTypeNames::button):
(WebCore::InputTypeNames::checkbox):
(WebCore::InputTypeNames::color):
(WebCore::InputTypeNames::date):
(WebCore::InputTypeNames::datetime):
(WebCore::InputTypeNames::datetimelocal):
(WebCore::InputTypeNames::email):
(WebCore::InputTypeNames::file):
(WebCore::InputTypeNames::hidden):
(WebCore::InputTypeNames::image):
(WebCore::InputTypeNames::month):
(WebCore::InputTypeNames::number):
(WebCore::InputTypeNames::password):
(WebCore::InputTypeNames::radio):
(WebCore::InputTypeNames::range):
(WebCore::InputTypeNames::reset):
(WebCore::InputTypeNames::search):
(WebCore::InputTypeNames::submit):
(WebCore::InputTypeNames::telephone):
(WebCore::InputTypeNames::text):
(WebCore::InputTypeNames::time):
(WebCore::InputTypeNames::url):
(WebCore::InputTypeNames::week):
* html/MediaController.cpp:
(playbackStateWaiting):
(playbackStatePlaying):
(playbackStateEnded):
* html/MonthInputType.cpp:
(WebCore::MonthInputType::createStepRange):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::createStepRange):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::createStepRange):
* html/StepRange.cpp:
(WebCore::StepRange::acceptableError):
(WebCore::StepRange::alignValueForStep):
(WebCore::StepRange::stepMismatch):
* html/TimeInputType.cpp:
(WebCore::TimeInputType::createStepRange):
* html/WeekInputType.cpp:
(WebCore::WeekInputType::createStepRange):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::getImageData):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
(WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId):
(WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterInnerElement::MeterInnerElement):
(WebCore::MeterValueElement::valuePseudoId):
* html/shadow/MeterShadowElement.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::sliderThumbShadowPseudoId):
(WebCore::mediaSliderThumbShadowPseudoId):
(WebCore::SliderContainerElement::shadowPseudoId):
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::alternativeKeyword):
(WebCore::AudioTrack::descriptionKeyword):
(WebCore::AudioTrack::mainKeyword):
(WebCore::AudioTrack::mainDescKeyword):
(WebCore::AudioTrack::translationKeyword):
(WebCore::AudioTrack::commentaryKeyword):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::subtitlesKeyword):
(WebCore::TextTrack::captionsKeyword):
(WebCore::TextTrack::descriptionsKeyword):
(WebCore::TextTrack::chaptersKeyword):
(WebCore::TextTrack::metadataKeyword):
(WebCore::TextTrack::forcedKeyword):
(WebCore::TextTrack::disabledKeyword):
(WebCore::TextTrack::hiddenKeyword):
(WebCore::TextTrack::showingKeyword):
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::cueShadowPseudoId):
* html/track/VTTCue.cpp:
(WebCore::startKeyword):
(WebCore::middleKeyword):
(WebCore::endKeyword):
(WebCore::leftKeyword):
(WebCore::rightKeyword):
(WebCore::verticalGrowingLeftKeyword):
(WebCore::verticalGrowingRightKeyword):
(WebCore::VTTCueBox::vttCueBoxShadowPseudoId):
(WebCore::VTTCue::cueBackdropShadowPseudoId):
(WebCore::VTTCue::determineTextDirection):
(WebCore::VTTCue::markFutureAndPastNodes):
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::scroll):
(WebCore::VTTRegion::setScroll):
(WebCore::VTTRegion::parseSettingValue):
(WebCore::VTTRegion::textTrackCueContainerScrollingClass):
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::alternativeKeyword):
(WebCore::VideoTrack::captionsKeyword):
(WebCore::VideoTrack::mainKeyword):
(WebCore::VideoTrack::signKeyword):
(WebCore::VideoTrack::subtitlesKeyword):
(WebCore::VideoTrack::commentaryKeyword):
* html/track/WebVTTElement.cpp:
(WebCore::nodeTypeToTagName):
* html/track/WebVTTElement.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::collectMetadataHeader):
* inspector/InspectorCSSAgent.cpp:
(WebCore::computePseudoClassMask):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::sourceMapURLForResource):
* inspector/InspectorStyleSheet.cpp:
(WebCore::selectorsFromSource):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::sourceMapURLForScript):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::notifyFinished):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::corsPolicyPreventedLoad):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::initiatorName):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::defaultDatabaseFilename):
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::allowInlineScript):
(WebCore::CSPDirectiveList::allowInlineStyle):
(WebCore::CSPDirectiveList::allowEval):
(WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
* page/DOMWindow.cpp:
(WebCore::windowsWithUnloadEventListeners):
(WebCore::windowsWithBeforeUnloadEventListeners):
* page/EventHandler.cpp:
(WebCore::EventHandler::dragState):
(WebCore::focusDirectionForKey):
* page/Frame.cpp:
(WebCore::createRegExpForLabels):
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform):
* page/PageVisibilityState.cpp:
(WebCore::pageVisibilityStateString):
* page/SecurityPolicy.cpp:
(WebCore::originAccessMap):
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::shadowForBlending):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateKeyframeAnimations):
* platform/Cursor.cpp:
(WebCore::pointerCursor):
(WebCore::crossCursor):
(WebCore::handCursor):
(WebCore::moveCursor):
(WebCore::verticalTextCursor):
(WebCore::cellCursor):
(WebCore::contextMenuCursor):
(WebCore::aliasCursor):
(WebCore::zoomInCursor):
(WebCore::zoomOutCursor):
(WebCore::copyCursor):
(WebCore::noneCursor):
(WebCore::progressCursor):
(WebCore::noDropCursor):
(WebCore::notAllowedCursor):
(WebCore::iBeamCursor):
(WebCore::waitCursor):
(WebCore::helpCursor):
(WebCore::eastResizeCursor):
(WebCore::northResizeCursor):
(WebCore::northEastResizeCursor):
(WebCore::northWestResizeCursor):
(WebCore::southResizeCursor):
(WebCore::southEastResizeCursor):
(WebCore::southWestResizeCursor):
(WebCore::westResizeCursor):
(WebCore::northSouthResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::columnResizeCursor):
(WebCore::rowResizeCursor):
(WebCore::middlePanningCursor):
(WebCore::eastPanningCursor):
(WebCore::northPanningCursor):
(WebCore::northEastPanningCursor):
(WebCore::northWestPanningCursor):
(WebCore::southPanningCursor):
(WebCore::southEastPanningCursor):
(WebCore::southWestPanningCursor):
(WebCore::westPanningCursor):
(WebCore::grabCursor):
(WebCore::grabbingCursor):
* platform/Language.cpp:
(WebCore::preferredLanguagesOverride):
* platform/LocalizedStrings.cpp:
(WebCore::truncatedStringForLookupMenuItem):
* platform/MIMETypeRegistry.cpp:
(WebCore::mediaMIMETypeMap):
(WebCore::defaultMIMEType):
* platform/SchemeRegistry.cpp:
(WebCore::localURLSchemes):
(WebCore::displayIsolatedURLSchemes):
(WebCore::secureSchemes):
(WebCore::schemesWithUniqueOrigins):
(WebCore::emptyDocumentSchemes):
(WebCore::schemesForbiddenFromDomainRelaxation):
(WebCore::canDisplayOnlyIfCanRequestSchemes):
(WebCore::notAllowingJavascriptURLsSchemes):
(WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
(WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
(WebCore::CORSEnabledSchemes):
(WebCore::ContentSecurityPolicyBypassingSchemes):
* platform/ScrollbarTheme.cpp:
(WebCore::ScrollbarTheme::theme):
* platform/URL.cpp:
(WebCore::blankURL):
* platform/animation/Animation.cpp:
(WebCore::Animation::initialName):
* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::sharedSession):
* platform/audio/AudioSession.h:
* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::audioDestinations):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::repaintRectMap):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::transformColorSpace):
* platform/graphics/MediaPlayer.cpp:
(WebCore::applicationOctetStream):
(WebCore::textPlain):
(WebCore::codecs):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::singleton):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::playerToPrivateMap):
* platform/graphics/filters/SourceAlpha.cpp:
(WebCore::SourceAlpha::effectName):
* platform/graphics/filters/SourceGraphic.cpp:
(WebCore::SourceGraphic::effectName):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::mimeCommonTypesCache):
(WebCore::mimeModernTypesCache):
* platform/ios/CursorIOS.cpp:
(WebCore::cursor):
* platform/ios/TileControllerMemoryHandlerIOS.cpp:
(WebCore::tileControllerMemoryHandler):
* platform/ios/WebCoreMotionManager.mm:
(+[WebCoreMotionManager sharedManager]):
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::updateForEventName):
* platform/ios/wak/WKContentObservation.cpp:
(WebThreadGetObservedContentModifiers):
* platform/mac/DragImageMac.mm:
(WebCore::fontFromNSFont):
* platform/mac/ThemeMac.mm:
(WebCore::platformTheme):
* platform/mac/ThreadCheck.mm:
(WebCoreReportThreadViolation):
* platform/mediastream/mac/AVCaptureDeviceManager.h:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::singleton):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenter::platformCenter):
* platform/mock/mediasource/MockBox.cpp:
(WebCore::MockTrackBox::type):
(WebCore::MockInitializationBox::type):
(WebCore::MockSampleBox::type):
* platform/network/HTTPParsers.cpp:
(WebCore::parseXSSProtectionHeader):
* platform/network/ResourceHandle.cpp:
(WebCore::builtinResourceHandleConstructorMap):
(WebCore::builtinResourceHandleSynchronousLoaderMap):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::clientCerts):
* platform/text/AtomicStringKeyedMRUCache.h:
(WebCore::AtomicStringKeyedMRUCache::get):
* platform/text/cf/HyphenationCF.cpp:
(WebCore::cfLocaleCache):
* rendering/RenderBlock.cpp:
(WebCore::continuationOutlineTable):
* rendering/RenderCounter.cpp:
(WebCore::counterMaps):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::renderScrollbarTheme):
* rendering/RenderTheme.cpp:
(WebCore::customFocusRingColor):
* rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
* rendering/shapes/ShapeOutsideInfo.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::hyphenString):
(WebCore::RenderStyle::textEmphasisMarkString):
(WebCore::RenderStyle::initialDashboardRegions):
(WebCore::RenderStyle::noneDashboardRegions):
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::zeroLengthLinecapPath):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::nonScalingStrokePath):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::currentContentTransformation):
* rendering/svg/SVGResources.cpp:
(WebCore::clipperFilterMaskerTags):
(WebCore::markerTags):
(WebCore::fillAndStrokeTags):
(WebCore::chainableResourceTags):
* svg/SVGAngle.cpp:
(WebCore::SVGAngle::valueAsString):
* svg/SVGAnimateColorElement.cpp:
(WebCore::attributeValueIsCurrentColor):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::rotateMode):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::setCalcMode):
(WebCore::SVGAnimationElement::setAttributeType):
(WebCore::SVGAnimationElement::isAdditive):
(WebCore::SVGAnimationElement::isAccumulated):
(WebCore::inheritsFromProperty):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier):
(WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
(WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
(WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier):
(WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::radiusXIdentifier):
(WebCore::SVGFEMorphologyElement::radiusYIdentifier):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier):
(WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::filterResXIdentifier):
(WebCore::SVGFilterElement::filterResYIdentifier):
* svg/SVGGlyphMap.h:
(WebCore::SVGGlyphMap::svgGlyphForGlyph):
* svg/SVGLangSpace.cpp:
(WebCore::SVGLangSpace::xmlspace):
(WebCore::SVGLangSpace::addSupportedAttributes):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientTypeIdentifier):
(WebCore::SVGMarkerElement::orientAngleIdentifier):
(WebCore::SVGMarkerElement::synchronizeOrientType):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::type):
(WebCore::SVGStyleElement::media):
* svg/SVGTransform.cpp:
(WebCore::SVGTransform::transformTypePrefixForParsing):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::viewBoxIdentifier):
(WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
(WebCore::SVGViewSpec::transformIdentifier):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseClockValue):
(WebCore::SVGSMILElement::isSupportedAttribute):
(WebCore::SVGSMILElement::restart):
(WebCore::SVGSMILElement::fill):
(WebCore::SVGSMILElement::repeatCount):
(WebCore::SVGSMILElement::notifyDependentsIntervalChanged):

Source/WTF:

Mostly mechanical conversion to NeverDestroyed throughout WTF.

* wtf/RunLoop.cpp:
(WTF::RunLoop::current):
* wtf/ThreadingPthreads.cpp:
(WTF::threadMapMutex):
(WTF::threadMap):

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

3 years agoWeb Inspector: Test Resources should not be included in Production builds unless...
commit-queue@webkit.org [Sat, 9 Jan 2016 06:32:23 +0000 (06:32 +0000)]
Web Inspector: Test Resources should not be included in Production builds unless FORCE_TOOL_INSTALL
https://bugs.webkit.org/show_bug.cgi?id=152941
<rdar://problem/24119013>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-01-08
Reviewed by Dan Bernstein.

* Configurations/Base.xcconfig:
Combine inspector resources in production, but not test resources.

* Configurations/DebugRelease.xcconfig:
Do not combine inspector resources in Release/Debug. Combine test resources.

* Configurations/WebInspectorUIFramework.xcconfig:
Simplify by moving to other config files.

* Scripts/copy-user-interface-resources.pl:
Have FORCE_TOOL_INSTALL combine test resources as well.

* WebInspectorUI.vcxproj/build-webinspectorui.pl:
Only combine test resources in non-Production.

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

3 years agoAbsolute positioning -webkit-search-cancel-button crashes Safari.
zalan@apple.com [Sat, 9 Jan 2016 06:27:42 +0000 (06:27 +0000)]
Absolute positioning -webkit-search-cancel-button crashes Safari.
https://bugs.webkit.org/show_bug.cgi?id=152847
<rdar://problem/24112087>

Reviewed by Simon Fraser.

Do not call offsetFromContainer while resolving the painting position for the search/cancel button renderer.
It skips the static positioned parent input renderer, when the search/cancel renderer is absolute positioned.
This patch also fixes a rendering glitch when the margin-right is > 0.

Source/WebCore:

Test: fast/forms/absolute-positioned-custom-search-cancel-crash.html

* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintSearchFieldCancelButton):
(WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
(WebCore::RenderTheme::paintSearchFieldResultsButton):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::convertToPaintingPosition):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
(WebCore::RenderThemeMac::convertToPaintingRect): Deleted.

LayoutTests:

* fast/forms/absolute-positioned-custom-search-cancel-crash-expected.txt: Added.
* fast/forms/absolute-positioned-custom-search-cancel-crash.html: Added.

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

3 years agoAdd display-list drawing hooks to platform-specific GraphicsContext files
simon.fraser@apple.com [Sat, 9 Jan 2016 06:07:33 +0000 (06:07 +0000)]
Add display-list drawing hooks to platform-specific GraphicsContext files
https://bugs.webkit.org/show_bug.cgi?id=152940

Reviewed by Zalan Bujtas.

Call into the display list recorder for top-level entrypoints implemented in platform-specific
files.

The convention is that if a function begins with "platform", it's not a top-level
entry point, and should only be called when there's a platform context (i.e. not
recording, and not paintingDisabled).

A few instances are stubbed out until we have a more complete display list implementation.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawText):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::getCTM):
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::clipConvexPolygon):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::clipBounds):
(WebCore::GraphicsContext::drawLinesForText):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::translate):
(WebCore::GraphicsContext::setPlatformStrokeThickness):
(WebCore::GraphicsContext::setPlatformStrokeStyle):
(WebCore::GraphicsContext::concatCTM):
(WebCore::GraphicsContext::setCTM):
(WebCore::GraphicsContext::beginPlatformTransparencyLayer):
(WebCore::GraphicsContext::endPlatformTransparencyLayer):
(WebCore::GraphicsContext::clearRect):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::setLineCap):
(WebCore::GraphicsContext::setLineDash):
(WebCore::GraphicsContext::setLineJoin):
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::rotate):
(WebCore::GraphicsContext::scale):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
(WebCore::GraphicsContext::drawPattern):
(WebCore::GraphicsContext::setPlatformShouldAntialias):
(WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
(WebCore::GraphicsContext::isAcceleratedContext):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawPattern):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::clipConvexPolygon):
(WebCore::GraphicsContext::applyStrokePattern):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::drawPath):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::clipBounds):
(WebCore::GraphicsContext::beginPlatformTransparencyLayer):
(WebCore::GraphicsContext::endPlatformTransparencyLayer):
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::GraphicsContext::setMiterLimit):
(WebCore::GraphicsContext::clearRect):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::setLineCap):
(WebCore::GraphicsContext::setLineDash):
(WebCore::GraphicsContext::setLineJoin):
(WebCore::GraphicsContext::scale):
(WebCore::GraphicsContext::rotate):
(WebCore::GraphicsContext::translate):
(WebCore::GraphicsContext::concatCTM):
(WebCore::GraphicsContext::setCTM):
(WebCore::GraphicsContext::getCTM):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::drawLinesForText):
(WebCore::GraphicsContext::setURLForRect):
(WebCore::GraphicsContext::setIsCALayerContext):
(WebCore::GraphicsContext::isCALayerContext):
(WebCore::GraphicsContext::setIsAcceleratedContext):
(WebCore::GraphicsContext::isAcceleratedContext):
(WebCore::GraphicsContext::setPlatformTextDrawingMode):
(WebCore::GraphicsContext::setPlatformStrokeColor):
(WebCore::GraphicsContext::setPlatformStrokeThickness):
(WebCore::GraphicsContext::setPlatformFillColor):
(WebCore::GraphicsContext::setPlatformShouldAntialias):
(WebCore::GraphicsContext::setPlatformShouldSmoothFonts):
(WebCore::GraphicsContext::setPlatformAlpha):
(WebCore::GraphicsContext::setPlatformCompositeOperation):
(WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
(WebCore::GraphicsContext::platformFillEllipse):
(WebCore::GraphicsContext::platformStrokeEllipse):

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

3 years agoModern IDB: storage/indexeddb/setversion-blocked-by-versionchange-close.html fails.
beidson@apple.com [Sat, 9 Jan 2016 01:57:47 +0000 (01:57 +0000)]
Modern IDB: storage/indexeddb/setversion-blocked-by-versionchange-close.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152936

Reviewed by Alex Christensen.

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/resources/setversion-blocked-by-versionchange-close.js:
* storage/indexeddb/setversion-blocked-by-versionchange-close-expected.txt:

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

3 years agoAdd DisplayList hooks into GraphicsContext
simon.fraser@apple.com [Sat, 9 Jan 2016 01:41:27 +0000 (01:41 +0000)]
Add DisplayList hooks into GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=152932

Reviewed by Zalan Bujtas.

Add the hooks into GraphicsContext that call into the DisplayListRecorder if there
is one.

Rename size() to something less ambiguous.

Out-of-line some DisplayList functions so that the header doesn't need to see
DisplayListItems.h.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::save):
(WebCore::GraphicsContext::restore):
(WebCore::GraphicsContext::setStrokeThickness):
(WebCore::GraphicsContext::setStrokeStyle):
(WebCore::GraphicsContext::setStrokeColor):
(WebCore::GraphicsContext::setShadow):
(WebCore::GraphicsContext::setLegacyShadow):
(WebCore::GraphicsContext::clearShadow):
(WebCore::GraphicsContext::setFillColor):
(WebCore::GraphicsContext::setShadowsIgnoreTransforms):
(WebCore::GraphicsContext::setShouldAntialias):
(WebCore::GraphicsContext::setShouldSmoothFonts):
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::setAntialiasedFontDilationEnabled):
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setFillRule):
(WebCore::GraphicsContext::setFillGradient):
(WebCore::GraphicsContext::beginTransparencyLayer):
(WebCore::GraphicsContext::endTransparencyLayer):
(WebCore::GraphicsContext::drawGlyphs):
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):
(WebCore::GraphicsContext::setTextDrawingMode):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::setCompositeOperation):
(WebCore::GraphicsContext::setDrawLuminanceMask):
(WebCore::GraphicsContext::applyDeviceScaleFactor):
(WebCore::GraphicsContext::applyState):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::setDisplayListRecorder):
(WebCore::GraphicsContext::isRecording):
(WebCore::GraphicsContext::setFillRule): Deleted.
(WebCore::GraphicsContext::setShadowsIgnoreTransforms): Deleted.
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): Deleted.
(WebCore::GraphicsContext::setDrawLuminanceMask): Deleted.
* platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::clear):
(WebCore::DisplayList::DisplayList::removeItemsFromIndex):
* platform/graphics/displaylists/DisplayList.h:
(WebCore::DisplayList::DisplayList::itemCount):
(WebCore::DisplayList::DisplayList::clear): Deleted.
(WebCore::DisplayList::DisplayList::size): Deleted.
(WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::save):
(WebCore::DisplayList::Recorder::restore):
* platform/graphics/displaylists/DisplayListRecorder.h:
(WebCore::DisplayList::Recorder::itemCount):
(WebCore::DisplayList::Recorder::size): Deleted.
* platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::Replayer::replay):

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

3 years agoImplement download authentication with NetworkSession
achristensen@apple.com [Sat, 9 Jan 2016 01:21:57 +0000 (01:21 +0000)]
Implement download authentication with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=152878

Reviewed by Brady Eidson.

* DerivedSources.make:
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/Downloads/PendingDownload.cpp: Added.
(WebKit::PendingDownload::PendingDownload):
(WebKit::PendingDownload::willSendRedirectedRequest):
(WebKit::PendingDownload::continueWillSendRequest):
(WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::PendingDownload::didConvertToDownload):
(WebKit::PendingDownload::messageSenderConnection):
(WebKit::PendingDownload::messageSenderDestinationID):
* NetworkProcess/Downloads/PendingDownload.h:
(WebKit::PendingDownload::PendingDownload): Deleted.
* NetworkProcess/Downloads/PendingDownload.messages.in: Added.
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::continueWillSendRequest):
The completion handler should always be called.  If m_currentRequest is null, then the request will not proceed, which is the same as canceling it.
(WebKit::NetworkLoad::setPendingDownloadID):
(WebKit::NetworkLoad::setPendingDownload):
(WebKit::NetworkLoad::willPerformHTTPRedirection):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
If this load is going to become a download, then call the PendingDownload version of didReceiveAuthenticationChallenge to communicate with the
UI process directly because there wasn't necessarily a web process associated with this request that will become a download.
* NetworkProcess/NetworkLoad.h:
(WebKit::NetworkLoad::pendingDownloadID):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkDataTask::client):
(WebKit::NetworkDataTask::pendingDownloadID):
(WebKit::NetworkDataTask::pendingDownload):
(WebKit::NetworkDataTask::setPendingDownloadID):
(WebKit::NetworkDataTask::setPendingDownload):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
* PlatformMac.cmake:
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Authentication/AuthenticationManager.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
Removed unnecessary protection and move null check to before using the pointer it checks.

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

3 years agoFix internal Windows build
achristensen@apple.com [Sat, 9 Jan 2016 00:59:34 +0000 (00:59 +0000)]
Fix internal Windows build
https://bugs.webkit.org/show_bug.cgi?id=152937

Reviewed by Brent Fulgham.

* Source/cmake/WebKitCommon.cmake:
Try looking in the default cygwin installation directory for executables like bison, flex, gperf, and ruby.
This is needed on Windows builds that are not driven by cygwin, but need to use the cygwin installations of these tools.
This is the effective equivalent of this line in WebKitLibraries/win/tools/vsprops/common.props in the old build system:
set PATH=%SystemDrive%\cygwin\bin;%PATH%

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

3 years agoUnreviewed test gardening.
beidson@apple.com [Sat, 9 Jan 2016 00:50:40 +0000 (00:50 +0000)]
Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoMarking fast/scrolling/scroll-position-on-reload-rtl.html as failing on ios-simulator
ryanhaddad@apple.com [Sat, 9 Jan 2016 00:42:59 +0000 (00:42 +0000)]
Marking fast/scrolling/scroll-position-on-reload-rtl.html as failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152935

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoSkipping two unsupported mouse event tests on ios-simulator
ryanhaddad@apple.com [Sat, 9 Jan 2016 00:41:00 +0000 (00:41 +0000)]
Skipping two unsupported mouse event tests on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoFTL B3 should do varargs tail calls and stack overflows
fpizlo@apple.com [Sat, 9 Jan 2016 00:37:47 +0000 (00:37 +0000)]
FTL B3 should do varargs tail calls and stack overflows
https://bugs.webkit.org/show_bug.cgi?id=152934

Reviewed by Saam Barati.

I was trying to get tail-call-varargs-no-stack-overflow.js.ftl-no-cjit-validate to work and
at first I hit the stack overflow issue and then I hit the varargs tail call issue. That's
why I have two fixes in one change. Now the test passes.

This reduces the number of failures from 13 to 0.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower): Implement stack overflow handling.
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs): Varargs tail calls need to
append an Oops (i.e. "unreachable").

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

3 years agoUnreviewed test gardening.
beidson@apple.com [Sat, 9 Jan 2016 00:36:27 +0000 (00:36 +0000)]
Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoUnreviewed test gardening.
beidson@apple.com [Sat, 9 Jan 2016 00:24:12 +0000 (00:24 +0000)]
Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoB3 needs Neg()
fpizlo@apple.com [Sat, 9 Jan 2016 00:01:55 +0000 (00:01 +0000)]
B3 needs Neg()
https://bugs.webkit.org/show_bug.cgi?id=152925

Reviewed by Mark Lam.

Previously we said that negation should be represented as Sub(0, x). That's wrong, since
for floats, Sub(0, 0) == 0 while Neg(0) == -0.

One way to solve this would be to say that anyone trying to say Neg(x) where x is a float
should instead say BitXor(x, -0). That's actually correct, but I think that it would be odd
to use bitops to represent floating point operations. Whatever cuteness this would have
bought us would be outweighed by the annoyance of having to write code that matches
Sub(0, x) for integer negation and BitXor(x, -0) for double negation. For example, this
would mean strictly more code for anyone implementing a Neg(Neg(x))=>x strength reduction.
Also, I suspect that the omission of Neg would cause others to make the mistake of using
Sub to represent floating point negation.

So, this introduces a proper Neg() opcode to B3. It's now the canonical way of saying
negation for both ints and floats. For ints, we canonicalize Sub(0, x) to Neg(x). For
floats, we lower it to BitXor(x, -0) on x86.

This reduces the number of failures from 13 to 12.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::andFloat):
(JSC::MacroAssemblerX86Common::xorDouble):
(JSC::MacroAssemblerX86Common::xorFloat):
(JSC::MacroAssemblerX86Common::convertInt32ToDouble):
* b3/B3LowerMacrosAfterOptimizations.cpp:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):
* b3/air/AirOpcode.opcodes:
* ftl/FTLB3Output.cpp:
(JSC::FTL::Output::lockedStackSlot):
(JSC::FTL::Output::neg):
(JSC::FTL::Output::bitNot):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::chillDiv):
(JSC::FTL::Output::mod):
(JSC::FTL::Output::chillMod):
(JSC::FTL::Output::doubleAdd):
(JSC::FTL::Output::doubleSub):
(JSC::FTL::Output::doubleMul):
(JSC::FTL::Output::doubleDiv):
(JSC::FTL::Output::doubleMod):
(JSC::FTL::Output::doubleNeg):
(JSC::FTL::Output::bitAnd):
(JSC::FTL::Output::bitOr):
(JSC::FTL::Output::neg): Deleted.
* tests/stress/ftl-negate-zero.js: Added. This was already covered by op_negate but since
it's such a glaring bug, I thought having a test for it specifically would be good.

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

3 years agoMarking js/intl-collator.html as failing on ios-simulator
ryanhaddad@apple.com [Fri, 8 Jan 2016 23:50:28 +0000 (23:50 +0000)]
Marking js/intl-collator.html as failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152448

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoModern IDB: imported/w3c/indexeddb/keyorder.htm times out.
beidson@apple.com [Fri, 8 Jan 2016 23:41:56 +0000 (23:41 +0000)]
Modern IDB: imported/w3c/indexeddb/keyorder.htm times out.
https://bugs.webkit.org/show_bug.cgi?id=152929

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Existing test now runs in the test harness).

* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::setGetResult):

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

3 years agoMarking two css3/filters/composited-during-* tests as failing on ios-simulator.
ryanhaddad@apple.com [Fri, 8 Jan 2016 23:36:16 +0000 (23:36 +0000)]
Marking two css3/filters/composited-during-* tests as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=152282

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoConsider painting to be disabled on a GraphicsContext with no platform data, and...
simon.fraser@apple.com [Fri, 8 Jan 2016 23:26:48 +0000 (23:26 +0000)]
Consider painting to be disabled on a GraphicsContext with no platform data, and make updatingControlTints() immutable state
https://bugs.webkit.org/show_bug.cgi?id=152927

Reviewed by Tim Horton.

GraphicsContext had setters for paintingDisabled and updatingControlTints, but neither
were changed dynamically.

We can eliminate paintingDisabled by simply considering a GraphicsContext that was
created with no platform context to be paint-disabled.

We make updatingControlTints immutable state by providing a constructor that takes
a "NonPaintingReasons" enum, and doesn't create platform data.

More functions in platform code were protected by if (paintingDisabled())...

* page/FrameView.cpp:
(WebCore::FrameView::paintControlTints):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::setUpdatingControlTints): Deleted.
(WebCore::GraphicsContext::clip): Deleted.
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::paintingDisabled):
(WebCore::GraphicsContext::updatingControlTints):
(WebCore::GraphicsContextState::GraphicsContextState): Deleted.
(WebCore::GraphicsContext::setPaintingDisabled): Deleted.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::platformInit):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawPattern):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::applyStrokePattern):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipBounds):
(WebCore::GraphicsContext::setLineDash):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
(WebCore::GraphicsContext::setIsCALayerContext):
(WebCore::GraphicsContext::isCALayerContext):
(WebCore::GraphicsContext::setIsAcceleratedContext):
(WebCore::GraphicsContext::isAcceleratedContext):
(WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::GraphicsContext): Deleted.
* platform/graphics/win/GraphicsContextCairoWin.cpp:
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::GraphicsContext): Deleted.

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

3 years agoMark compositing/overflow/dynamic-composited-scrolling-status.html as failing on...
ryanhaddad@apple.com [Fri, 8 Jan 2016 23:25:15 +0000 (23:25 +0000)]
Mark compositing/overflow/dynamic-composited-scrolling-status.html as failing on ios-simulator, remove duplicate
expectation added by previous commit.

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoInputType::findClosestTickMarkValue should return an Optional<Decimal>
andersca@apple.com [Fri, 8 Jan 2016 23:19:50 +0000 (23:19 +0000)]
InputType::findClosestTickMarkValue should return an Optional<Decimal>
https://bugs.webkit.org/show_bug.cgi?id=152931

Reviewed by Andreas Kling.

This will make it possible to get rid of the notion of infinity from Decimal, allowing for more code simplification.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::findClosestTickMarkValue):
* html/HTMLInputElement.h:
* html/InputType.cpp:
(WebCore::InputType::findClosestTickMarkValue):
* html/InputType.h:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::findClosestTickMarkValue):
* html/RangeInputType.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):

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

3 years agoUnreviewed test gardening.
beidson@apple.com [Fri, 8 Jan 2016 23:19:19 +0000 (23:19 +0000)]
Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoRemoving WK2 specific results for this test.
beidson@apple.com [Fri, 8 Jan 2016 23:18:08 +0000 (23:18 +0000)]
Removing WK2 specific results for this test.

Legacy IDB passes just the same as Modern IDB.

* platform/wk2/imported/w3c/indexeddb/keypath-expected.txt: Removed.

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

3 years agoMarking two ios/scolling tests as failing on ios-simulator.
ryanhaddad@apple.com [Fri, 8 Jan 2016 23:16:42 +0000 (23:16 +0000)]
Marking two ios/scolling tests as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=152276

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoRebaselining two compositing tests for ios-simulator
ryanhaddad@apple.com [Fri, 8 Jan 2016 23:12:01 +0000 (23:12 +0000)]
Rebaselining two compositing tests for ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152138

Unreviewed test gardening.

* platform/ios-simulator-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
* platform/ios-simulator/compositing/contents-opaque/table-parts-expected.txt: Added.

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

3 years agoRemoving ios-simulator-wk1/ and ios-simulator-wk2/ expected.* files that are identica...
ryanhaddad@apple.com [Fri, 8 Jan 2016 22:51:26 +0000 (22:51 +0000)]
Removing ios-simulator-wk1/ and ios-simulator-wk2/ expected.* files that are identical to the ones in ios-simulator/
https://bugs.webkit.org/show_bug.cgi?id=152130

Unreviewed test gardening.

* platform/ios-simulator-wk1/editing/deleting/delete-block-merge-contents-011-expected.txt: Removed.
* platform/ios-simulator-wk1/editing/deleting/delete-first-list-item-expected.txt: Removed.
* platform/ios-simulator-wk1/editing/deleting/merge-different-styles-expected.txt: Removed.
* +1714 more

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

3 years agoRemoving deleted test fast/mediastream/RTCPeerConnection-state.html from mac TestExpe...
ryanhaddad@apple.com [Fri, 8 Jan 2016 22:29:54 +0000 (22:29 +0000)]
Removing deleted test fast/mediastream/RTCPeerConnection-state.html from mac TestExpectations file

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoModern IDB: IDBBindingUtilities chokes on unicode strings for get/set.
beidson@apple.com [Fri, 8 Jan 2016 22:21:24 +0000 (22:21 +0000)]
Modern IDB: IDBBindingUtilities chokes on unicode strings for get/set.
https://bugs.webkit.org/show_bug.cgi?id=152921

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* indexeddb/keypath-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::get): Don't do a potentially lossy utf8() conversion on the string.
(WebCore::set): Ditto.

LayoutTests:

* platform/mac-wk1/TestExpectations:

* storage/indexeddb/objectstore-autoincrement-expected.txt:
* storage/indexeddb/objectstore-autoincrement.html:
* storage/indexeddb/resources/objectstore-autoincrement.js:

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

3 years agoMake v3 UI analysis task page is hard to understand
rniwa@webkit.org [Fri, 8 Jan 2016 21:57:32 +0000 (21:57 +0000)]
Make v3 UI analysis task page is hard to understand
https://bugs.webkit.org/show_bug.cgi?id=152917

Reviewed by Antti Koivisto.

Add a dark gray border around the selected block in the analysis results viewer instead of using darker
shades since that looks as if they were bigger regression/progression.

Explicitly show "Failed" as the label instead of omitting with "-" when all build requests in an A/B
testing group fails.

* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.cssTemplate): Tweaked the style to underline text in the hovered blocks and the
selected blocks and show a dark gray border around the selected blocks.
(AnalysisResultsViewer.TestGroupStackingBlock):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): Use this._title for title.
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForRootSet): Deleted.

* public/v3/components/results-table.js:
(ResultsTable.prototype.render):
(ResultsTable.prototype._createRevisionListCells): Extracted from ResultsTable.prototype.render.
(ResultsTable.cssTemplate): Tweaked the style.
(ResultsTableRow):
(ResultsTableRow.prototype.constructor): Added _labelForWholeRow to store the label for the entire row.
This is used to show the comparison result of two root sets (e.g. A vs B).
(ResultsTableRow.prototype.setLabelForWholeRow): Added.
(ResultsTableRow.prototype.labelForWholeRow): Added.
(ResultsTableRow.prototype.resultContent): Extracted from buildHeading. Creates a hyperlinked bar graph
used for each A/B testing result.
(ResultsTableRow.prototype.buildHeading): Deleted since we need to set colspan on the second table cell
when we're creating a row with _labelForWholeRow.

* public/v3/components/test-group-results-table.js:
(TestGroupResultsTable.prototype.buildRowGroups): Added rows to show relative differences and statistical
significance between root sets (e.g. A vs B).

* public/v3/models/build-request.js:
(BuildRequest.prototype.hasCompleted): Added.

* public/v3/models/test-group.js:
(TestGroup.prototype.compareTestResults): Extracted from AnalysisResultsViewer.TestGroupStackingBlock's
_computeTestGroupStatus and generalized to be reused in TestGroupResultsTable.
(TestGroup.prototype._valuesForRootSet): Moved from AnalysisResultsViewer.TestGroupStackingBlock.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.cssTemplate): Tweaked the style.

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

3 years ago[WinCairo] Support more video formats.
peavo@outlook.com [Fri, 8 Jan 2016 21:42:25 +0000 (21:42 +0000)]
[WinCairo] Support more video formats.
https://bugs.webkit.org/show_bug.cgi?id=152890

Reviewed by Alex Christensen.

Use MediaFoundation api to detect all supported video/audio formats.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaFoundation::supportsType):

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

3 years agoFTL B3 compile() doesn't clear exception handlers before we add FTL-specific ones
fpizlo@apple.com [Fri, 8 Jan 2016 21:42:23 +0000 (21:42 +0000)]
FTL B3 compile() doesn't clear exception handlers before we add FTL-specific ones
https://bugs.webkit.org/show_bug.cgi?id=152922

Reviewed by Saam Barati.

FTL B3 was generating a handler table that first contained the old baseline handlers keyed
by baseline's bytecode indices and then the FTL handlers keyed by FTL callsite index. That's
wrong, since the FTL code block should not contain any baseline handlers. The fix is to
clear the handlers before generation, sort of like FTL LLVM does.

Also added some stuff to make it easier to inspect the handler table.

This reduces the numbe rof failures from 25 to 13.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::dumpExceptionHandlers):
(JSC::CodeBlock::beginDumpProfiling):
* bytecode/CodeBlock.h:
* ftl/FTLB3Compile.cpp:
(JSC::FTL::compile):

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

3 years agoWeb Inspector: Initiated section of Resource Details Sidebar should not display as...
commit-queue@webkit.org [Fri, 8 Jan 2016 21:33:59 +0000 (21:33 +0000)]
Web Inspector: Initiated section of Resource Details Sidebar should not display as empty and should update as the list changes
https://bugs.webkit.org/show_bug.cgi?id=152907
<rdar://problem/24109927>

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

* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.addInitiatedResource):
Dispatch an event when the list of initiated resources changes.

* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
Add/remove event listeners for initiated resources changes to refresh
the related resources section.

(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
Show/hide the related resources section depending on if we have something or not.

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

3 years agoNullopt and InPlace should be structs, not enum values
andersca@apple.com [Fri, 8 Jan 2016 21:32:12 +0000 (21:32 +0000)]
Nullopt and InPlace should be structs, not enum values
https://bugs.webkit.org/show_bug.cgi?id=152915

Reviewed by Andreas Kling.

Without this,

Optional<int> o = flag ? 1 : Nullopt;

would cause Nullopt to be treated as an integer, causing o to be initialized to 0,
instead of Nullopt. With this change, the above code now causes a compile error.

Also, get rid of the CONSTEXPR macro since all compilers support constexpr properly,
and add a WTF::makeOptional to match the current iteration of std::experimental::optional.

* wtf/Compiler.h:
* wtf/Forward.h:
* wtf/Optional.h:
(WTF::NulloptTag::NulloptTag):
(WTF::makeOptional):
* wtf/StdLibExtras.h:
(std::literals::chrono_literals::operator _s):
(std::literals::chrono_literals::operator _ms):
(std::move):

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

3 years agoModern IDB: Blocked event can fire on a delete request even after the last open conne...
beidson@apple.com [Fri, 8 Jan 2016 21:12:08 +0000 (21:12 +0000)]
Modern IDB: Blocked event can fire on a delete request even after the last open connection has closed.
https://bugs.webkit.org/show_bug.cgi?id=152896

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* indexeddb/idbfactory_open12-expected.txt:
* indexeddb/idbversionchangeevent-expected.txt:
* indexeddb/transaction-lifetime-expected.txt:

Source/WebCore:

No new tests (Progression in many tests).

* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::deleteDatabase):

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation): Allow for handling 2+ delete operations in a row.
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Ditto.
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient): Call "notifyCurrentRequestConnectionClosedOrFiredVersionChangeEvent"
  after the connection is actually removed from the set of open connections.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:

* platform/wk2/imported/w3c/indexeddb/idbfactory_open12-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/idbfactory_open12-expected.txt.
* platform/wk2/imported/w3c/indexeddb/idbversionchangeevent-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/idbversionchangeevent-expected.txt.

* storage/indexeddb/database-wrapper-expected.txt:
* storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt:
* storage/indexeddb/deletedatabase-not-blocked-expected.txt:
* storage/indexeddb/intversion-upgrades-expected.txt:
* storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js:
* storage/indexeddb/resources/deletedatabase-not-blocked.js:
* storage/indexeddb/resources/setversion-not-blocked.js:
* storage/indexeddb/setversion-not-blocked-expected.txt:

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

3 years ago[ANGLE] Correct UNREACHABLE runtime assertion for void constructors
bfulgham@apple.com [Fri, 8 Jan 2016 21:01:26 +0000 (21:01 +0000)]
[ANGLE] Correct UNREACHABLE runtime assertion for void constructors
https://bugs.webkit.org/show_bug.cgi?id=152900
<rdar://problem/24107501>

Reviewed by Alex Christensen.

Tested by Khronos WebGL 1.0.4 suite.

Merge a small part of ANGLE upstream commit r284735:

    commit    01971113492d9aca386f2bca021b1f4b134fc277
    author    Dmitry Skiba <dskiba@google.com>  Fri Jul 10 18:54:00 2015
    committer Jamie Madill <jmadill@chromium.org>  Fri Jul 10 19:03:34 2015
    tree      47e42eac00f7d64cddb14b3cc21a4e605c189d20

This issue was found by <https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/bugs/angle-constructor-invalid-parameters.html?webglVersion=1&quiet=0>

* src/compiler/translator/Types.cpp:
(TType::buildMangledName): Don't assert with UNREACHABLE here.

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

3 years ago[GTK] Several animation tests fail with accelerated compositing enabled
mcatanzaro@igalia.com [Fri, 8 Jan 2016 21:01:01 +0000 (21:01 +0000)]
[GTK] Several animation tests fail with accelerated compositing enabled

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] pageoverlay tests are failing
commit-queue@webkit.org [Fri, 8 Jan 2016 20:47:11 +0000 (20:47 +0000)]
[GTK] pageoverlay tests are failing

Unreviewed gardening.

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2016-01-08

* platform/gtk/TestExpectations:

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

3 years agoB3 incorrectly turns NotEqual(bool, 1) into Equal(bool, 1) instead of Equal(bool, 0)
fpizlo@apple.com [Fri, 8 Jan 2016 20:14:36 +0000 (20:14 +0000)]
B3 incorrectly turns NotEqual(bool, 1) into Equal(bool, 1) instead of Equal(bool, 0)
https://bugs.webkit.org/show_bug.cgi?id=152916

Reviewed by Mark Lam.

This was causing a failure in an ancient DFG layout test. Thanks, ftl-eager-no-cjit!

This reduces the number of failures from 27 to 25.

* b3/B3ReduceStrength.cpp:

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

3 years agoWeb Inspector: Uncaught exception: TypeError: this._initiatorSourceCodeLocation.sourc...
commit-queue@webkit.org [Fri, 8 Jan 2016 20:14:20 +0000 (20:14 +0000)]
Web Inspector: Uncaught exception: TypeError: this._initiatorSourceCodeLocation.sourceCode.addInitiatedResource is not a function
https://bugs.webkit.org/show_bug.cgi?id=152905
<rdar://problem/24109809>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-01-08
Reviewed by Brian Burg.

* UserInterface/Models/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.addInitiatedResource):
Only Resource has addInitiatedResource, so only call it if the
SourceCode in the SourceCodeLocation is a Resource.

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

3 years agoHovering link on http://help.apple.com/appletv/#/ does not show text underline.
zalan@apple.com [Fri, 8 Jan 2016 20:05:08 +0000 (20:05 +0000)]
Hovering link on help.apple.com/appletv/#/ does not show text underline.
https://bugs.webkit.org/show_bug.cgi?id=152906
<rdar://problem/23339617>

Reviewed by Simon Fraser.

GraphicsContext::computeLineBoundsAndAntialiasingModeForText() always integral ceils the origin y position to offset underline text.
This additional visual overflow offset is not taken into account by visualOverflowForDecorations().
Unfortunately we can't compute the exact same offset value while collecting repaint rects, because
computeLineBoundsAndAntialiasingModeForText() uses CTM scaling before adjusting the offset position.
Use 1px (css) bottom offset to cover this underling overflow.

Source/WebCore:

Test: fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* rendering/SimpleLineLayoutResolver.cpp: Add visual overflow to simple line layout.
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
* rendering/SimpleLineLayoutResolver.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::visualOverflowForDecorations):

LayoutTests:

* fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position-expected.txt: Added.
* fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html: Added.

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

3 years agoFTL B3 allocateCell() should not crash
fpizlo@apple.com [Fri, 8 Jan 2016 19:37:58 +0000 (19:37 +0000)]
FTL B3 allocateCell() should not crash
https://bugs.webkit.org/show_bug.cgi?id=152909

Reviewed by Mark Lam.

This code was crashing in some tests that forced GC slow paths because it was stubbed out
due to the use of undef. B3 doesn't have undef. In this case, there's no good reason to use
undef. We can just use zero. Since the path is dead anyway in that case, we weren't gaining
any LLVM optimizations by using undef.

This reduces the number of failures from 35 to 27.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::allocateCell):

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

3 years agoFTL B3 fails to realize that binary snippets might choose to omit their fast path
fpizlo@apple.com [Fri, 8 Jan 2016 19:02:53 +0000 (19:02 +0000)]
FTL B3 fails to realize that binary snippets might choose to omit their fast path
https://bugs.webkit.org/show_bug.cgi?id=152901

Reviewed by Mark Lam.

This reduces the number of failures from 99 to 35.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::emitBinarySnippet):

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

3 years agorestoreCalleeSavesFromVMCalleeSavesBuffer should use the scratch register
sbarati@apple.com [Fri, 8 Jan 2016 18:49:26 +0000 (18:49 +0000)]
restoreCalleeSavesFromVMCalleeSavesBuffer should use the scratch register
https://bugs.webkit.org/show_bug.cgi?id=152879

Reviewed by Filip Pizlo.

We were clobbering a register we needed when picking
a scratch register inside an FTL OSR Exit.

* dfg/DFGThunks.cpp:
(JSC::DFG::osrEntryThunkGenerator):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitRandomThunk):
(JSC::AssemblyHelpers::restoreCalleeSavesFromVMCalleeSavesBuffer):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::copyCalleeSavesFromFrameOrRegisterToVMCalleeSavesBuffer):
(JSC::AssemblyHelpers::restoreCalleeSavesFromVMCalleeSavesBuffer): Deleted.
* tests/stress/ftl-put-by-id-setter-exception-interesting-live-state.js:
(foo):

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

3 years agoModern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
beidson@apple.com [Fri, 8 Jan 2016 18:48:03 +0000 (18:48 +0000)]
Modern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
https://bugs.webkit.org/show_bug.cgi?id=152891

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* indexeddb/idbobjectstore_createIndex6-event_order-expected.txt:
* indexeddb/idbobjectstore_createIndex7-event_order-expected.txt:

Source/WebCore:

No new tests (At least two failing tests now pass).

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent): Whenever we add the IDBTransaction as an event target,
  also add the IDBDatabase.

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt.
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt.

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

3 years agoRolling out: Rename StringFromCharCode to StringFromSingleCharCode.
mark.lam@apple.com [Fri, 8 Jan 2016 18:44:36 +0000 (18:44 +0000)]
Rolling out: Rename StringFromCharCode to StringFromSingleCharCode.
https://bugs.webkit.org/show_bug.cgi?id=152897

Not reviewed.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileFromCharCode):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCode):
(JSC::stringFromSingleCharCode): Deleted.
* runtime/StringConstructor.h:

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

3 years ago[JSC] Use std::call_once instead of pthread_once when initializing LLVM.
peavo@outlook.com [Fri, 8 Jan 2016 18:20:43 +0000 (18:20 +0000)]
[JSC] Use std::call_once instead of pthread_once when initializing LLVM.
https://bugs.webkit.org/show_bug.cgi?id=152893

Reviewed by Mark Lam.

Use std::call_once since pthreads is not present on all platforms.

* llvm/InitializeLLVM.cpp:
(JSC::initializeLLVMImpl):
(JSC::initializeLLVM):

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

3 years agorun-webkit-tests mis-counts totals when there are other crashes
aakash_jain@apple.com [Fri, 8 Jan 2016 18:20:27 +0000 (18:20 +0000)]
run-webkit-tests mis-counts totals when there are other crashes
https://bugs.webkit.org/show_bug.cgi?id=152894
<rdar://problem/24098697>

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.add): Do not update result counters for other crashes.

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

3 years agoRename StringFromCharCode to StringFromSingleCharCode.
mark.lam@apple.com [Fri, 8 Jan 2016 18:10:36 +0000 (18:10 +0000)]
Rename StringFromCharCode to StringFromSingleCharCode.
https://bugs.webkit.org/show_bug.cgi?id=152897

Reviewed by Daniel Bates.

StringFromSingleCharCode is a better name because the intrinsic it represents
only applies when we are converting from a single char code.  This is purely
a refactoring patch.  There is no semantic change.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileFromCharCode):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCode):
(JSC::stringFromSingleCharCode):
* runtime/StringConstructor.h:

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

3 years ago[mips] Fixed unused parameter warnings
commit-queue@webkit.org [Fri, 8 Jan 2016 16:55:08 +0000 (16:55 +0000)]
[mips] Fixed unused parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=152885

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-01-08
Reviewed by Mark Lam.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):

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

3 years agoModern IDB: storage/indexeddb/dont-wedge.html is flaky.
beidson@apple.com [Fri, 8 Jan 2016 16:51:20 +0000 (16:51 +0000)]
Modern IDB: storage/indexeddb/dont-wedge.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=152892

Unreviewed.

* platform/mac-wk1/TestExpectations: Skip it for now.

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

3 years ago[mips] Max value of immediate arg of logical ops is 0xffff
commit-queue@webkit.org [Fri, 8 Jan 2016 16:37:36 +0000 (16:37 +0000)]
[mips] Max value of immediate arg of logical ops is 0xffff
https://bugs.webkit.org/show_bug.cgi?id=152884

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-01-08
Reviewed by Michael Saboff.

Replaced imm.m_value < 65535 checks with imm.m_value <= 65535

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::and32):
(JSC::MacroAssemblerMIPS::or32):

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

3 years ago[mips] Add new or32 implementation after r194613
commit-queue@webkit.org [Fri, 8 Jan 2016 16:28:44 +0000 (16:28 +0000)]
[mips] Add new or32 implementation after r194613
https://bugs.webkit.org/show_bug.cgi?id=152865

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-01-08
Reviewed by Michael Saboff.

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::or32):

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

3 years agoEnable selector filtering for shadow trees
antti@apple.com [Fri, 8 Jan 2016 09:06:10 +0000 (09:06 +0000)]
Enable selector filtering for shadow trees
https://bugs.webkit.org/show_bug.cgi?id=152831

Reviewed by Simon Fraser.

Selector filtering doesn't currently work in shadow trees making style resolve for them slow.
This is because SelectorFilter is not in "consistent" state.

This patch moves SelectorFilter ownership from StyleResolver to TreeResolver and guarantees
it is always upadated consistently. It eliminates a bunch of now unnecessary consistency checks
and special cases.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ElementRuleCollector):

    Assert for consistency instead of testing for it.

(WebCore::ElementRuleCollector::matchedResult):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):

    Selector filter can now be used if it exists.

* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::ElementRuleCollector): Deleted.
* css/RuleSet.cpp:
(WebCore::RuleSet::addRule):

    Disable selector filtering for custom shadow pseudo rules. They are resolved by shadow DOM resolver
    but may contain components matching the normal DOM.

* css/RuleSet.h:
(WebCore::RuleData::descendantSelectorIdentifierHashes):
(WebCore::RuleData::disableSelectorFiltering):
(WebCore::RuleData::compilationStatus):
(WebCore::RuleData::compiledSelectorCodeRef):
* css/SelectorFilter.cpp:
(WebCore::collectElementIdentifierHashes):
(WebCore::SelectorFilter::parentStackIsConsistent):

    New consistency conditions. This is now used for asserts only.

(WebCore::SelectorFilter::pushParentStackFrame):
(WebCore::SelectorFilter::popParentStackFrame):

    Selector filter only filters the current tree context, replace parentOrShadowHostElement with parentElement.

(WebCore::SelectorFilter::setupParentStack): Deleted.

    No longer needed.

(WebCore::SelectorFilter::pushParent):

    Remove consistency check. These cases no longer happen.

* css/SelectorFilter.h:
(WebCore::SelectorFilter::popParent):
(WebCore::SelectorFilter::parentStackIsEmpty):
(WebCore::SelectorFilter::fastRejectSelector):
(WebCore::SelectorFilter::parentStackIsConsistent): Deleted.
* css/StyleInvalidationAnalysis.cpp:
(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
(WebCore::StyleInvalidationAnalysis::invalidateStyle):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::appendAuthorStyleSheets):
(WebCore::StyleResolver::addKeyframeStyle):
(WebCore::StyleResolver::initElement):
(WebCore::StyleResolver::State::initForStyleResolve):

    We no longer owner the selector filter. Move it to State.

(WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
(WebCore::isAtShadowBoundary):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::StyleResolver::pushParentElement): Deleted.
(WebCore::StyleResolver::popParentElement): Deleted.

    No need for this logic.

* css/StyleResolver.h:
(WebCore::StyleResolver::ruleSets):
(WebCore::StyleResolver::mediaQueryEvaluator):
(WebCore::StyleResolver::State::document):
(WebCore::StyleResolver::State::setAuthorRollback):
(WebCore::StyleResolver::State::setUserRollback):
(WebCore::StyleResolver::State::selectorFilter):
(WebCore::StyleResolver::state):
(WebCore::checkRegionSelector):
(WebCore::StyleResolver::selectorFilter): Deleted.
(WebCore::StyleResolverParentPusher::StyleResolverParentPusher): Deleted.
(WebCore::StyleResolverParentPusher::push): Deleted.
(WebCore::StyleResolverParentPusher::~StyleResolverParentPusher): Deleted.
* style/StyleTreeResolver.cpp:

    This now owns the selector filter for a tree context.

(WebCore::Style::SelectorFilterPusher::SelectorFilterPusher):
(WebCore::Style::SelectorFilterPusher::push):
(WebCore::Style::SelectorFilterPusher::~SelectorFilterPusher):
(WebCore::Style::TreeResolver::TreeResolver):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
(WebCore::Style::TreeResolver::createRenderTreeRecursively):
(WebCore::Style::TreeResolver::resolveChildren):
(WebCore::Style::TreeResolver::resolveRecursively):

    Push the filter in a few more places to keep it consistent in shadow trees.

* style/StyleTreeResolver.h:

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

3 years agowebkit-patch build-and-test should have an option to iterate over new tests
youenn.fablet@crf.canon.fr [Fri, 8 Jan 2016 08:36:47 +0000 (08:36 +0000)]
webkit-patch build-and-test should have an option to iterate over new tests
https://bugs.webkit.org/show_bug.cgi?id=143093

Reviewed by Michael Catanzaro.

This patch introduces the --iterate-on-new-tests option to webkit-patch build-and-test.
It allows running run-webkit-tests on modified or new paths in LayoutTests.
Computation of new or modified tests is done by LayoutTestFinder.find_touched_tests
It implements the translation of -expected.* paths to their related tests.
It also implements the removal of skipped tests.

* Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
(LayoutTestFinder.find_touched_tests):
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py: Added.
(MockPort):
(MockPort.__init__):
(MockPort.tests):
(LayoutTestFinderTests):
(LayoutTestFinderTests.touched_files):
(LayoutTestFinderTests.test_touched_test):
(LayoutTestFinderTests.test_expected_touched_test):
(LayoutTestFinderTests.test_platform_expected_touched_test):
(LayoutTestFinderTests.test_platform_duplicate_touched_test):
(LayoutTestFinderTests.test_touched_but_skipped_test):
* Scripts/webkitpy/port/base.py:
(Port.potential_test_names_from_expected_file):
* Scripts/webkitpy/tool/commands/download_unittest.py:
(DownloadCommandsTest._default_options):
* Scripts/webkitpy/tool/steps/options.py:
(Options):
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.options):
(RunTests.run):
(RunTests):
(RunTests._new_or_modified_tests):
(RunTests._run_webkit_tests):
* Scripts/webkitpy/tool/steps/runtests_unittest.py:
(RunTestsTest.test_webkit_run_unit_tests):
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest._step_options):

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

3 years agoUnreviewed IndexedDB test gardening.
beidson@apple.com [Fri, 8 Jan 2016 05:33:49 +0000 (05:33 +0000)]
Unreviewed IndexedDB test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoMove computeLineBoundsForText from GraphicsContext* to GraphicsContext.
zalan@apple.com [Fri, 8 Jan 2016 04:56:39 +0000 (04:56 +0000)]
Move computeLineBoundsForText from GraphicsContext* to GraphicsContext.
https://bugs.webkit.org/show_bug.cgi?id=152882

Reviewed by Simon Fraser.

There is nothing platform specific about it.

No change in functionality.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeUnderlineBoundsForText): Rename to reflect its usage.
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText): Deleted.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLinesForText):
(WebCore::GraphicsContext::computeLineBoundsForText): Deleted.
* rendering/TextDecorationPainter.cpp:
(WebCore::drawSkipInkUnderline):

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

3 years agoFix new test.
jonlee@apple.com [Fri, 8 Jan 2016 04:29:42 +0000 (04:29 +0000)]
Fix new test.

* Animometer/resources/runner/tests.js: Wrong URL from an
old patch.
* Animometer/tests/master/particles.html:
* Animometer/tests/master/resources/dom-particles.js:
(Particle.call.reset): Figured out a simpler way to set up
the particles.
(this.move.reset): Deleted.
(this.move._applyAttributes): Deleted.
* Animometer/tests/master/resources/particles.js:
(Particle): Call move() after reset().

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

3 years agoUpdate benchmark test suite
jonlee@apple.com [Fri, 8 Jan 2016 04:28:12 +0000 (04:28 +0000)]
Update benchmark test suite
https://bugs.webkit.org/show_bug.cgi?id=152679

Reviewed by Simon Fraser.

Add a new test. The test has a rotating background
gradient, and does a better job physically simulating
particles.

* Animometer/resources/extensions.js: Teach Point to take constants as well as other Points.
(Point.prototype.length): Added.
(Point.prototype.normalize): Added.
* Animometer/resources/runner/tests.js: Add the test to the master suite.
* Animometer/tests/master/particles.html: Added.
* Animometer/tests/master/resources/particles.js: Added. Parent class for different kinds of particles.
(Particle):
(Particle.prototype.reset): If the particle starts slowing down in terms of its animation,
reset it.
(Particle.prototype.animate): Bounce off the walls elastically, and include gravity.
(Particle.prototype.move): Subclasses should override.
(ParticlesStage): Stage includes a rotating gradient background.
* Animometer/tests/master/resources/dom-particles.js: Added. Creates a <div> and adds it to
the stage.
* Animometer/tests/resources/star.svg: Added.

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

3 years agoModern IDB: Success-after-open event should only have the IDBOpenDBRequest as its...
beidson@apple.com [Fri, 8 Jan 2016 04:08:36 +0000 (04:08 +0000)]
Modern IDB: Success-after-open event should only have the IDBOpenDBRequest as its target.
https://bugs.webkit.org/show_bug.cgi?id=152875

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least 2 failing tests now pass).

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent): Only add the transaction and database as potential
  targets for this event if it is *not* the success-after-open event.
* Modules/indexeddb/client/IDBRequestImpl.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

3 years agoUpdate benchmark test suite
jonlee@apple.com [Fri, 8 Jan 2016 03:58:33 +0000 (03:58 +0000)]
Update benchmark test suite
https://bugs.webkit.org/show_bug.cgi?id=152679

Reviewed by Simon Fraser.

Move algorithm.js and sampler.js to tests/ and benchmark-runner.js to runner/.

Needed by both harnesses.
* Animometer/resources/runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/benchmark-runner.js.
* Animometer/developer.html:
* Animometer/index.html:

Needed only by the tests. Move to tests/. Statistics, in sampler.js, is used by ResultsDashboard, so move that
into extensions.js.
* Animometer/resources/extensions.js:
* Animometer/tests/resources/algorithm.js: Renamed from PerformanceTests/Animometer/resources/algorithm.js.
* Animometer/tests/resources/sampler.js: Renamed from PerformanceTests/Animometer/resources/sampler.js.
* Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
* Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
* Animometer/tests/bouncing-particles/bouncing-css-images.html:
* Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
* Animometer/tests/bouncing-particles/bouncing-svg-images.html:
* Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
* Animometer/tests/master/canvas-stage.html:
* Animometer/tests/misc/canvas-electrons.html:
* Animometer/tests/misc/canvas-stars.html:
* Animometer/tests/misc/compositing-transforms.html:
* Animometer/tests/simple/simple-canvas-paths.html:
* Animometer/tests/template/template-canvas.html:
* Animometer/tests/template/template-css.html:
* Animometer/tests/template/template-svg.html:
* Animometer/tests/text/layering-text.html:
* Animometer/tests/text/text-boxes.html:

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

3 years agoUpdate benchmark test suite
jonlee@apple.com [Fri, 8 Jan 2016 03:54:36 +0000 (03:54 +0000)]
Update benchmark test suite
https://bugs.webkit.org/show_bug.cgi?id=152679

Reviewed by Simon Fraser.

Fix tests for other browsers.

* Animometer/resources/extensions.js:
(Point.elementClientSize): Some browsers return 0 for SVG clientWidth and clientHeight.
Use getBoundingClientRect() instead.
* Animometer/tests/misc/resources/canvas-electrons.js:
(CanvasElectron.prototype._draw): Some browsers don't support ellipse.

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

3 years agoCorrect missing EXT_sRGB Format Handling
bfulgham@apple.com [Fri, 8 Jan 2016 02:51:43 +0000 (02:51 +0000)]
Correct missing EXT_sRGB Format Handling
https://bugs.webkit.org/show_bug.cgi?id=152876
<rdar://problem/23284389>

Reviewed by Alex Christensen.

Tested by WebGL 1.0.4 suite.

* platform/graphics/GraphicsContext3D.cpp:
(getDataFormat): Handle missing SRGB and SRGB_ALPHA cases.
* platform/graphics/GraphicsContext3D.h: Add missing SRGB_ALPHA value from the Khronos standard.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::texImage2D): Add an assertion that we are not being handed
an internal format to a method that works with normal formats.

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

3 years agoUse an appropriate buffer format for swipe snapshots
simon.fraser@apple.com [Fri, 8 Jan 2016 02:33:52 +0000 (02:33 +0000)]
Use an appropriate buffer format for swipe snapshots
https://bugs.webkit.org/show_bug.cgi?id=152880
rdar://problem/23728299

Reviewed by Tim Horton.
Source/WebCore:

Choose an appropriate buffer format for swipe snapshots, and avoid converting
them to YUV422.

* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::allowConversionFromFormatToFormat):

Source/WebKit2:

Choose an appropriate buffer format for swipe snapshots, and avoid converting
them to YUV422.

* UIProcess/API/Cocoa/WKWebView.mm:
(WebKit::bufferFormat):
(-[WKWebView _takeViewSnapshot]):

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

3 years agoprepare-ChangeLog should include radar number
commit-queue@webkit.org [Fri, 8 Jan 2016 02:18:01 +0000 (02:18 +0000)]
prepare-ChangeLog should include radar number
https://bugs.webkit.org/show_bug.cgi?id=152839
<rdar://problem/24093563>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-01-07
Reviewed by Daniel Bates.

When running `prepare-ChangeLog -b ###`, check for a bugzilla comment that
starts with a "<rdar://problem/####>" URL. If found, include that radar URL
in the ChangeLog description after the bug URL.

* Scripts/prepare-ChangeLog:
(main): Update signatures.
(fetchBugXMLData): XML Data is now used for multiple reasons. Extract this to just get the data.
(fetchBugDescriptionFromBugXMLData): Search data for <short_desc>.
(fetchRadarURLFromBugXMLData): Search comment text for radar URL.
(generateNewChangeLogs): Include radar URL if we found one.

* Scripts/webkitperl/prepare-ChangeLog_unittest/fetchRadarURLFromBugXMLData.pl: Added.
Tests for the radar URL extraction.

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

3 years agoFTL B3 lazy slow paths should do exceptions
fpizlo@apple.com [Fri, 8 Jan 2016 01:52:31 +0000 (01:52 +0000)]
FTL B3 lazy slow paths should do exceptions
https://bugs.webkit.org/show_bug.cgi?id=152853

Reviewed by Saam Barati.

This reduces the number of JSC test failures to 97.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):
* tests/stress/ftl-new-negative-array-size.js: Added.
(foo):

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

3 years agoUnreviewed, skip more tests that fail.
fpizlo@apple.com [Fri, 8 Jan 2016 01:38:50 +0000 (01:38 +0000)]
Unreviewed, skip more tests that fail.

* tests/stress/ftl-shr-exception.js:
(foo):
* tests/stress/ftl-xor-exception.js:
(foo):

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

3 years agoFTL B3 binary snippets should do exceptions
fpizlo@apple.com [Fri, 8 Jan 2016 01:10:15 +0000 (01:10 +0000)]
FTL B3 binary snippets should do exceptions
https://bugs.webkit.org/show_bug.cgi?id=152852

Reviewed by Saam Barati.

This reduces the number of JSC test failures to 110.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::emitBinarySnippet):
(JSC::FTL::DFG::LowerDFGToLLVM::emitBinaryBitOpSnippet):
(JSC::FTL::DFG::LowerDFGToLLVM::emitRightShiftSnippet):
* tests/stress/ftl-shr-exception.js: Added.
(foo):
(result.foo.valueOf):
* tests/stress/ftl-sub-exception.js: Added.
(foo):
(result.foo.valueOf):
* tests/stress/ftl-xor-exception.js: Added.
(foo):
(result.foo.valueOf):

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

3 years ago[EME] Secure stop information not written to disk
jer.noble@apple.com [Fri, 8 Jan 2016 01:05:47 +0000 (01:05 +0000)]
[EME] Secure stop information not written to disk
https://bugs.webkit.org/show_bug.cgi?id=152855

Reviewed by Eric Carlson.

Two separate bugs for the two APIs provided by AVFoundation. For the AVStreamSession path,
we were not calling the lazy-creation function which creates the AVStreamSession, and were
rather accessing the ivar directly. For the AVContentKeySession, we were not creating the
intermediate paths containing the secure stop database.

* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::contentKeySession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):

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

3 years agoUnreviewed, skipping this test. Looks like LLVM can't handle this one, either.
fpizlo@apple.com [Fri, 8 Jan 2016 00:34:53 +0000 (00:34 +0000)]
Unreviewed, skipping this test. Looks like LLVM can't handle this one, either.

* tests/stress/ftl-call-varargs-bad-args-exception-interesting-live-state.js:
(foo):

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

3 years agoAdd a waitUntilReady() step
jonlee@apple.com [Fri, 8 Jan 2016 00:10:01 +0000 (00:10 +0000)]
Add a waitUntilReady() step
https://bugs.webkit.org/show_bug.cgi?id=152862

Reviewed by Simon Fraser.

Add a waitUntilReady() callback that lets the benchmark complete
its setup before running the benchmark.

* Animometer/tests/resources/main.js:
(Benchmark.prototype.run): First call waitUntilReady, which returns
a promise. When the promise resolves, run everything that was in this
function.
(Benchmark.prototype.waitUntilReady): Default implementation returns
a resolved promise.
(Benchmark.prototype.resolveWhenFinished): Deleted.
* Animometer/tests/template/resources/template-canvas.js:
(new.TemplateCanvasStage.waitUntilReady): Example on how to override.

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

3 years agoUnreviewed, skipping this test. Looks like LLVM can't handle it.
fpizlo@apple.com [Fri, 8 Jan 2016 00:00:41 +0000 (00:00 +0000)]
Unreviewed, skipping this test. Looks like LLVM can't handle it.

* tests/stress/ftl-put-by-id-setter-exception-interesting-live-state.js:
(foo):

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

3 years agoFTL B3 JS calls should do exceptions
fpizlo@apple.com [Thu, 7 Jan 2016 23:47:16 +0000 (23:47 +0000)]
FTL B3 JS calls should do exceptions
https://bugs.webkit.org/show_bug.cgi?id=152851

Reviewed by Geoffrey Garen.

This reduces the number of JSC test failures with FTL B3 to 111.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToLLVM::compileTailCall):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
* tests/stress/ftl-call-bad-args-exception-interesting-live-state.js: Added.
* tests/stress/ftl-call-bad-callee-exception-interesting-live-state.js: Added.
* tests/stress/ftl-call-exception-interesting-live-state.js: Added.
* tests/stress/ftl-call-exception-no-catch.js: Added.
* tests/stress/ftl-call-exception.js: Added.
* tests/stress/ftl-call-varargs-bad-callee-exception-interesting-live-state.js: Added.
* tests/stress/ftl-call-varargs-exception-interesting-live-state.js: Added.
* tests/stress/ftl-call-varargs-exception-no-catch.js: Added.
* tests/stress/ftl-call-varargs-exception.js: Added.

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

3 years agoPerf dashboard should automatically add aggregators
rniwa@webkit.org [Thu, 7 Jan 2016 23:47:14 +0000 (23:47 +0000)]
Perf dashboard should automatically add aggregators
https://bugs.webkit.org/show_bug.cgi?id=152818

Reviewed by Chris Dumez.

When an aggregator entry is missing in aggregators table, automatically insert it in /api/report.

In a very early version of the perf dashboard, we had the ability to define a custom aggregator
in an admin page. In practice, nobody used or needed this feature so we got rid of it even before
the dashboard was landed into WebKit repository. This patch cleans up that mess.

* run-tests.js:
(main): Added the filtering capability.
(TestEnvironment): Expose the config JSON in the test environment.

* public/include/report-processor.php:
(ReportProcessor): Renamed name_to_aggregator now that it only contains ID.
(ReportProcessor::__construct): No longer fetches the aggregator table. An equivalent work is done
in newly added ensure_aggregators.
(ReportProcessor::process): Calls ensure_aggregators which populates name_to_aggregator_id.
(ReportProcessor::ensure_aggregators): Added. Add the builtin aggregators: Arithmetic, Geometric,
Harmonic, and Total.
(TestRunsGenerator): Renamed name_to_aggregator now that it only contains ID.
(TestRunsGenerator::__construct):
(TestRunsGenerator::add_aggregated_metric): Don't include aggregator_definition here since it's
never used now that all the aggregations are done natively in PHP.
(TestRunsGenerator::$aggregators): Added. We don't include SquareSum since it's only used for
computing run_square_sum_cache in test_runs table and it's useless elsewhere.
(TestRunsGenerator::aggregate_values): Add a comment about that.

* tests/api-report.js: Updated a test case to reflect the change.

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

3 years agoWeb Inspector: Add warnings to section that require specific values of other properties
commit-queue@webkit.org [Thu, 7 Jan 2016 23:44:27 +0000 (23:44 +0000)]
Web Inspector: Add warnings to section that require specific values of other properties
https://bugs.webkit.org/show_bug.cgi?id=148254

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-01-07
Reviewed by Timothy Hatcher.

Added a function to VisualStylePropertyEditor to allow dependencies to be set which,
whenever the editor is updated or changed, will be checked against the computed styles
of the element to see if all the necessary property values are set.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype.refresh):
(WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFlexboxSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateOutlineSection):
Added dependencies to relevant property editors.

(WebInspector.VisualStyleDetailsPanel.prototype._prepareForChange): Deleted.
No longer needed as the sidebar panel will refresh whenever triggered.

* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container.layout-reversed > .visual-style-property-title):
(.visual-style-property-container > .visual-style-property-title > .property-reference-info):
(.visual-style-property-container > .visual-style-property-editor-warning):
(.visual-style-property-container.layout-reversed > .visual-style-property-editor-warning):
(.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency):
(.visual-style-property-container > .visual-style-property-value-container):
(.visual-style-property-container.layout-reversed > .visual-style-property-value-container):

* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
(WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
(WebInspector.VisualStylePropertyEditor.prototype.addDependency):
(WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
(WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
Looks at the computed style for the node to see if any dependent properties do not
have one of the required values.

* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype._styleTextReset): Deleted.

* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):

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

3 years agoUse wavy offset for decoration painting when line style is TextDecorationStyleWavy.
zalan@apple.com [Thu, 7 Jan 2016 23:33:04 +0000 (23:33 +0000)]
Use wavy offset for decoration painting when line style is TextDecorationStyleWavy.
https://bugs.webkit.org/show_bug.cgi?id=152856

Reviewed by Simon Fraser.

No change in functionality.

* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):

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

3 years agoWeb Inspector: Allow error items on Exception page to be selected
commit-queue@webkit.org [Thu, 7 Jan 2016 23:32:29 +0000 (23:32 +0000)]
Web Inspector: Allow error items on Exception page to be selected
https://bugs.webkit.org/show_bug.cgi?id=152861

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-01-07
Reviewed by Brian Burg.

* UserInterface/Debug/UncaughtExceptionReporter.css:
(.uncaught-exception-sheet li):
Allowed user-select on text.

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

3 years agoBetter test gardening. Only skip those tests that use touch events, not the whole
ap@apple.com [Thu, 7 Jan 2016 23:32:26 +0000 (23:32 +0000)]
Better test gardening. Only skip those tests that use touch events, not the whole
directory.

* platform/ios-simulator-wk2/TestExpectations:

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

3 years agoModern IDB: Various imported/w3c/indexeddb tests fail due to expecting the wrong...
beidson@apple.com [Thu, 7 Jan 2016 23:30:00 +0000 (23:30 +0000)]
Modern IDB: Various imported/w3c/indexeddb tests fail due to expecting the wrong exception.
https://bugs.webkit.org/show_bug.cgi?id=152866

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (5 skipped tests now pass).

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putOrAdd): Reorder the exceptions, violating the spec but matching
  a vast majority of browsers.
(WebCore::IDBClient::IDBObjectStore::deleteFunction): Ditto.
(WebCore::IDBClient::IDBObjectStore::clear): Ditto.
(WebCore::IDBClient::IDBObjectStore::doCount): Ditto.

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

3 years agoTest gardening.
ap@apple.com [Thu, 7 Jan 2016 23:26:10 +0000 (23:26 +0000)]
Test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

3 years agoRemove unused shouldAntialias parameter from GraphicsContext::computeLineBoundsAndAnt...
zalan@apple.com [Thu, 7 Jan 2016 23:15:50 +0000 (23:15 +0000)]
Remove unused shouldAntialias parameter from GraphicsContext::computeLineBoundsAndAntialiasingModeForText()
https://bugs.webkit.org/show_bug.cgi?id=152859

Reviewed by Simon Fraser.

No change in functionality.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText):
(WebCore::GraphicsContext::drawLinesForText):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText):
(WebCore::GraphicsContext::drawLinesForText):

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

3 years agoFTL B3 PutById should do exceptions
fpizlo@apple.com [Thu, 7 Jan 2016 22:59:43 +0000 (22:59 +0000)]
FTL B3 PutById should do exceptions
https://bugs.webkit.org/show_bug.cgi?id=152850

Reviewed by Saam Barati.

Implemented PutById exception handling by following the idiom used in GetById. Reduces the
number of JSC test failures to 128.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutById):
* tests/stress/ftl-put-by-id-setter-exception-interesting-live-state.js: Added.
* tests/stress/ftl-put-by-id-setter-exception-no-catch.js: Added.
* tests/stress/ftl-put-by-id-setter-exception.js: Added.
* tests/stress/ftl-put-by-id-slow-exception-interesting-live-state.js: Added.
* tests/stress/ftl-put-by-id-slow-exception-no-catch.js: Added.
* tests/stress/ftl-put-by-id-slow-exception.js: Added.

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

3 years agoUnreviewed, rolling out r194714.
commit-queue@webkit.org [Thu, 7 Jan 2016 22:42:44 +0000 (22:42 +0000)]
Unreviewed, rolling out r194714.
https://bugs.webkit.org/show_bug.cgi?id=152864

it broke many JSC tests when FTL B3 is enabled (Requested by
pizlo on #webkit).

Reverted changeset:

"[JSC] When resolving Stack arguments, use addressing from SP
when addressing from FP is invalid"
https://bugs.webkit.org/show_bug.cgi?id=152840
http://trac.webkit.org/changeset/194714

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

3 years agoWeb Inspector: Add border-image properties to Visual sidebar
commit-queue@webkit.org [Thu, 7 Jan 2016 22:36:51 +0000 (22:36 +0000)]
Web Inspector: Add border-image properties to Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=152755

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-01-07
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Switched the order of VisualStyleURLInput and VisualStyleUnitSlider
to be ordered alphabetically.

* UserInterface/Views/VisualStyleBackgroundPicker.js:
(WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown):

* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content > .group + .group > .row:first-child):
(.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.border .visual-style-property-container.keyword-checkbox.border-image-slice):
Since the checkbox is so small, give it less room.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection.generateBorderImagePropertyEditors):
The three properties "border-image-width", "border-image-outset", and
"border-image-slice" all have the same syntax, so one function to generate
the layout for all three is much simpler.

(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
Added the border image properties to a seperate group under Background > Border.

* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype._keywordSelectMouseDown):

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.set units):
Reordered logic to allow a value of ""/null to set the units to the "Number"
value if it is allowed for that editor.

(WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue):
Instead of relying upon whether the editor has any units, just check to see if
the selected units are "Number" and, if not, add them to the value.

(WebInspector.VisualStyleNumberInputBox.prototype._unitsElementTextContent):

* UserInterface/Views/VisualStylePropertyCombiner.js:
(WebInspector.VisualStylePropertyCombiner):
Now has another argument that, when true, assumes the combiner has at least 4
numerical values and is of the form (can have units):
    property-name: value1 [value2 [value3 [value4 [...]]]];

(WebInspector.VisualStylePropertyCombiner.prototype.get synthesizedValue):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
If the new argument is true, assigns the existing values in the following way:
 - If there is 1 value, assign it to all of the editors.
 - If there are 2 values, assign the 1st one to editors 1 and 3 and the 2nd one
    to editors 2 and 4.
 - If there are 3 values, assign the 1st one to editor 1, the 2nd one to editors
    2 and 4, and the 3rd one to editor 3.
 - If there are 4 or more values, assign them normally.

* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedKeyword):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedKeyword):
Removed call to this.value to prevent recursion from VisualStyleNumberInputBox.

(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedUnit):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedUnit):
Removed call to this.units to prevent recursion from VisualStyleNumberInputBox.

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

3 years agoCan't play inline video in a stock WK1 WebView on Mac
timothy_horton@apple.com [Thu, 7 Jan 2016 22:31:27 +0000 (22:31 +0000)]
Can't play inline video in a stock WK1 WebView on Mac
https://bugs.webkit.org/show_bug.cgi?id=152860

Rubber-stamped by Jer Noble.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
The default for this preference is supposed to be NO on Mac. It is in
Settings.in, and in WebKit2, but this one place got it wrong.

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

3 years agoModern IDB: imported/w3c/indexeddb/idbcursor-continue.htm fails.
beidson@apple.com [Thu, 7 Jan 2016 22:17:15 +0000 (22:17 +0000)]
Modern IDB: imported/w3c/indexeddb/idbcursor-continue.htm fails.
https://bugs.webkit.org/show_bug.cgi?id=152849

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one failing test now passes).

* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::iterate): Don't allow returning an iterator outside of
  the cursor's assigned range.

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

3 years ago[mips] Lower immediates of logical operations.
commit-queue@webkit.org [Thu, 7 Jan 2016 22:13:38 +0000 (22:13 +0000)]
[mips] Lower immediates of logical operations.
https://bugs.webkit.org/show_bug.cgi?id=152693

On MIPS immediate operands of andi, ori, and xori are required to be 16-bit
non-negative numbers.

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-01-07
Reviewed by Michael Saboff.

* offlineasm/mips.rb:

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

3 years agoWeb Inspector: Add indicator that element has pseudo-class in DOM tree
commit-queue@webkit.org [Thu, 7 Jan 2016 22:11:33 +0000 (22:11 +0000)]
Web Inspector: Add indicator that element has pseudo-class in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=152680

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-01-07
Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement):
(WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
Added an event listener to the node for when pseudo-classes change.

* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline li.pseudo-class-enabled > .selection::before):
(.dom-tree-outline:focus li.selected.pseudo-class-enabled > .selection::before):
Used the hover/selected background style element to ensure that the indicator
is always positioned evenly with the first line of the opening tag.

(.dom-tree-outline li.hovered:not(.selected) .selection):
(.dom-tree-outline li .selection):
(.dom-tree-outline li.selected .selection):
(.dom-tree-outline li.elements-drag-over .selection):
Removed "display: none;" (as well as the "block" declarations) to allow
the ::before pseudo-element to display.

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

3 years agoVersioning.
bshafiei@apple.com [Thu, 7 Jan 2016 22:10:45 +0000 (22:10 +0000)]
Versioning.

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

3 years agotestRunner.runUIScript crashes while running multiple tests in a row that invokes...
ap@apple.com [Thu, 7 Jan 2016 22:09:33 +0000 (22:09 +0000)]
testRunner.runUIScript crashes while running multiple tests in a row that invokes the same UIScript
https://bugs.webkit.org/show_bug.cgi?id=152390
<rdar://problem/23948321>

Reviewed by Simon Fraser.

Tools:

Fix two use-after-frees.

1. WKPageCallAfterNextPresentationUpdate's callback has a pointer to TestInvocation,
but we may have already progressed to another test by the time the callback fires,
having destroyed the TestInvocation.
2. UIScriptController is a RefCounted object, but it has a raw pointer to
UIScriptContext which has the same lifetime as a TestInvocation.
As a result, completion blocks of UIScriptController actions would use a destroyed
TestInvocation.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::~TestInvocation):
(WTR::TestInvocation::url):
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::runUISideScriptAfterUpdateCallback):
(WTR::TestInvocation::runUISideScript):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/UIScriptContext/UIScriptContext.cpp:
(UIScriptContext::UIScriptContext):
(UIScriptContext::~UIScriptContext):
(UIScriptContext::runUIScript):
* WebKitTestRunner/UIScriptContext/UIScriptContext.h:
* WebKitTestRunner/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::UIScriptController):
(WTR::UIScriptController::contextDestroyed):
(WTR::UIScriptController::makeWindowObject):
(WTR::UIScriptController::setWillBeginZoomingCallback):
(WTR::UIScriptController::willBeginZoomingCallback):
(WTR::UIScriptController::setDidEndZoomingCallback):
(WTR::UIScriptController::didEndZoomingCallback):
(WTR::UIScriptController::setDidEndScrollingCallback):
(WTR::UIScriptController::didEndScrollingCallback):
(WTR::UIScriptController::setDidShowKeyboardCallback):
(WTR::UIScriptController::didShowKeyboardCallback):
(WTR::UIScriptController::setDidHideKeyboardCallback):
(WTR::UIScriptController::didHideKeyboardCallback):
(WTR::UIScriptController::uiScriptComplete):
* WebKitTestRunner/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::create):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::doAsyncTask):
(WTR::UIScriptController::zoomToScale):
(WTR::UIScriptController::singleTapAtPoint):
(WTR::UIScriptController::doubleTapAtPoint):
(WTR::UIScriptController::typeCharacterUsingHardwareKeyboard):
(WTR::UIScriptController::contentVisibleRect):
(WTR::UIScriptController::platformSetWillBeginZoomingCallback):
(WTR::UIScriptController::platformSetDidEndZoomingCallback):
(WTR::UIScriptController::platformSetDidShowKeyboardCallback):
(WTR::UIScriptController::platformSetDidHideKeyboardCallback):
(WTR::UIScriptController::platformSetDidEndScrollingCallback):
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::doAsyncTask):

LayoutTests:

* platform/ios-simulator/TestExpectations: Unskipped tests that used to be affected.

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

3 years ago[JSC] Update testCheckSubBadImm() for ARM64
commit-queue@webkit.org [Thu, 7 Jan 2016 22:02:54 +0000 (22:02 +0000)]
[JSC] Update testCheckSubBadImm() for ARM64
https://bugs.webkit.org/show_bug.cgi?id=152846

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-07
Reviewed by Mark Lam.

* b3/testb3.cpp:
(JSC::B3::testCheckSubBadImm):
The test was assuming the constant can always be used
as immediate. That's obviously not the case on ARM64.

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

3 years agoProgress towards implementing downloads with NetworkSession
achristensen@apple.com [Thu, 7 Jan 2016 21:28:42 +0000 (21:28 +0000)]
Progress towards implementing downloads with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=152760

Reviewed by Brady Eidson.

* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::Download):
There's no need to store the unused NetworkSession&.
(WebKit::Download::didStart):
(WebKit::Download::didReceiveAuthenticationChallenge):
Downloads with NetworkSession are NetworkLoads until the response is received, which is after authentication
challenges are handled by NetworkLoad's code.
(WebKit::Download::didReceiveResponse):
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
Create a PendingDownload, which is basically a NetworkLoad that knows that it will become a Download
when the response is received, regardless of whether or not there is a Content-Disposition header.
(WebKit::DownloadManager::dataTaskBecameDownloadTask):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/PendingDownload.h: Added.
(WebKit::PendingDownload::PendingDownload):
Added a new NetworkLoadClient for requests that will become downloads.
A PendingDownload contains a NetworkLoad so we can always keep them together
and so it can handle setting its pending download id.
* WebKit2.xcodeproj/project.pbxproj:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
Avoid dereferencing a pointer if the NetworkSession hadn't been created when a NetworkLoad starts.
This shouldn't be possible, but it's good to not assume that all pointers are non-null.
(WebKit::NetworkLoad::cancel):
Add a null check in case the constructor doesn't make m_task.
(WebKit::NetworkLoad::convertTaskToDownload):
(WebKit::NetworkLoad::setPendingDownloadID):
Added for downloads that start with startDownload.  The pending DownloadID is used to indicate that
this request should always become a download, regardless of whether or not the response has a
Content-Disposition header.
(WebKit::NetworkLoad::willPerformHTTPRedirection):
(WebKit::NetworkLoad::didReceiveResponse):
* NetworkProcess/NetworkLoad.h:
There's no need to store a DownloadID here.  It's stored in the NetworkDataTask (m_task).
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkDataTask::client):
(WebKit::NetworkDataTask::pendingDownloadID):
(WebKit::NetworkDataTask::setPendingDownloadID):
(WebKit::NetworkDataTask::downloadID): Deleted.
(WebKit::NetworkDataTask::setDownloadID): Deleted.
Renamed downloadID and setDownloadID to pendingDownloadID and setPendingDownloadID, respectively,
to indicate their use.  They are not the current downloadID, but they are the downloadID of the download
that will happen once the response is received and PolicyDownload will be returned in the completion handler.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
Call dataTaskBecameDownloadTask after didBecomeDownload because the networkDataTask is deleted by removing it
from m_pendingDownloads in dataTaskBecameDownloadTask.

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

3 years agoWeb Inspector: Make creating new rules in the Styles sidebar simpler
commit-queue@webkit.org [Thu, 7 Jan 2016 21:27:48 +0000 (21:27 +0000)]
Web Inspector: Make creating new rules in the Styles sidebar simpler
https://bugs.webkit.org/show_bug.cgi?id=152726

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-01-07
Reviewed by Timothy Hatcher.

When creating a new rules of any kind, first look to see if it already exists in
another rule that has no properties. If found, focus/select it instead of creating
a new rule. Otherwise, create the new rule like normal.

Also changed the way in which previously-focused sections/tree-items are saved
to rely upon the selector of the new rule and whether the section for that rule
is empty and an inspector rule.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.isInspectorRule):
Returns true if the style is an inspector rule.

(WebInspector.CSSStyleDeclaration.prototype.hasProperties):
Returns true if the style has CSS properties.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.rulesForSelector.ruleHasSelector):
(WebInspector.DOMNodeStyles.prototype.rulesForSelector):
Returns a list of CSSRule that match the given selector and are not
in media queries.

* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):

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

* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.cssStyleDeclarationSectionEditorFocused):
Now saves the newly focused section as the previously-focused section.

(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector):
Renamed from cssStyleDeclarationSectionFocusNextNewInspectorRule. Now needs
a selector argument.

(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
(WebInspector.RulesStyleDetailsPanel.prototype.sectionForStyle):
Returns the first section that has a style with matching selector.

(WebInspector.RulesStyleDetailsPanel.prototype.focusEmptySectionWithStyle):
Finds the section corresponding to the given style and, if empty, focuses it.

(WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
No longer clears the previously-focused section.

* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype.update):
(WebInspector.VisualStyleSelectorSection.prototype.treeItemForStyle):
Returns the first tree item that has a style with matching selector.

(WebInspector.VisualStyleSelectorSection.prototype.selectEmptyStyleTreeItem):
Finds the tree item corresponding to the given style and, if empty, selects it.

(WebInspector.VisualStyleSelectorSection.prototype._addNewRule):

* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
Now requires a delegate object.

(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):

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

3 years agoFTL B3 getById() should do exceptions
fpizlo@apple.com [Thu, 7 Jan 2016 21:20:37 +0000 (21:20 +0000)]
FTL B3 getById() should do exceptions
https://bugs.webkit.org/show_bug.cgi?id=152810

Reviewed by Saam Barati.

This adds abstractions for doing exceptions from patchpoints, and uses them to implement
exceptions from GetById. This covers all of the following ways that a GetById might throw an
exceptions:

- Throw without try/catch from the vmCall() in a GetById(Untyped:)
- Throw with try/catch from the vmCall() in a GetById(Untyped:)
- Throw without try/catch from the callOperation() in the patchpoint of a GetById
- Throw with try/catch from the callOperation() in the patchpoint of a GetById
- Throw without try/catch from the Call IC generated in the patchpoint of a GetById
- Throw with try/catch from the Call IC generated in the patchpoint of a GetById

This requires having a default exception target in FTL-generated code, and ensuring that this
target is generated regardless of whether we have branches to the B3 basic block of the
default exception target. This also requires adding some extra arguments to a
PatchpointValue, and then knowing that the arguments are used for OSR exit and not anything
else. This also requires associating the CallSiteIndex of the patchpoint with the register
set used for exit and with the OSR exit label for the unwind exit.

All of the stuff that you have to worry about when wiring a patchpoint to exception handling
is covered by the new PatchpointExceptionHandle object. You create one by calling
preparePatchpointForExceptions(). This sets up the B3 IR representation of the patchpoint
with stackmap arguments for the exceptional exit, and creates a PatchpointExceptionHandle
object that can be used to create zero or more actual OSR exits. It can create both OSR exits
for operation calls and OSR exits for unwind. You call the
PatchpointExceptionHandle::scheduleExitCreationXXX() methods from the generator callback to
actually get OSR exits.

This API makes heavy use of Box<>, late paths, and link tasks. For example, you can use the
PatchpointExceptionHandle to get a Box<JumpList> that you can append exception jumps to. When
you use this API, it automatically registers a link task that will link the JumpList to the
actual OSR exit label.

This API is very flexible about how you get to the label of the OSR exit. You are encouraged
to use the Box<JumpList> approach, but if you really just need the label, you can also get
a RefPtr<ExceptionTarget> and rely on the fact that the ExceptionTarget object will be able
to vend you the OSR exit label at link-time.

This reduces the number of JSC test failures with FTL B3 from 186 to 133. It also adds a
bunch of new tests specifically for all of the ways you might throw from GetById, and B3
passes all of these new tests. Note that I'm not counting the new tests as part of the
previous 186 test failures (FTL B3 failed all of the new tests prior to this change).

After this change, it should be easy to make all of the other patchpoints also handle
exceptions by just following the preparePatchpointForExceptions() idiom.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3StackmapValue.h:
* b3/B3ValueRep.cpp:
(JSC::B3::ValueRep::addUsedRegistersTo):
(JSC::B3::ValueRep::usedRegisters):
(JSC::B3::ValueRep::dump):
* b3/B3ValueRep.h:
(JSC::B3::ValueRep::doubleValue):
(JSC::B3::ValueRep::withOffset):
(JSC::B3::ValueRep::usedRegisters):
* ftl/FTLB3Compile.cpp:
(JSC::FTL::compile):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::unreachable):
(JSC::FTL::Output::speculate):
* ftl/FTLExceptionTarget.cpp: Added.
(JSC::FTL::ExceptionTarget::~ExceptionTarget):
(JSC::FTL::ExceptionTarget::label):
(JSC::FTL::ExceptionTarget::jumps):
(JSC::FTL::ExceptionTarget::ExceptionTarget):
* ftl/FTLExceptionTarget.h: Added.
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutById):
(JSC::FTL::DFG::LowerDFGToLLVM::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::compileIn):
(JSC::FTL::DFG::LowerDFGToLLVM::getById):
(JSC::FTL::DFG::LowerDFGToLLVM::emitBinarySnippet):
(JSC::FTL::DFG::LowerDFGToLLVM::emitBinaryBitOpSnippet):
(JSC::FTL::DFG::LowerDFGToLLVM::emitRightShiftSnippet):
(JSC::FTL::DFG::LowerDFGToLLVM::callCheck):
(JSC::FTL::DFG::LowerDFGToLLVM::preparePatchpointForExceptions):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitArgumentsForPatchpointIfWillCatchException):
(JSC::FTL::DFG::LowerDFGToLLVM::lowBlock):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::DFG::LowerDFGToLLVM::blessSpeculation):
* ftl/FTLPatchpointExceptionHandle.cpp: Added.
(JSC::FTL::PatchpointExceptionHandle::create):
(JSC::FTL::PatchpointExceptionHandle::defaultHandle):
(JSC::FTL::PatchpointExceptionHandle::~PatchpointExceptionHandle):
(JSC::FTL::PatchpointExceptionHandle::scheduleExitCreation):
(JSC::FTL::PatchpointExceptionHandle::scheduleExitCreationForUnwind):
(JSC::FTL::PatchpointExceptionHandle::PatchpointExceptionHandle):
(JSC::FTL::PatchpointExceptionHandle::createHandle):
* ftl/FTLPatchpointExceptionHandle.h: Added.
* ftl/FTLState.cpp:
* ftl/FTLState.h:
(JSC::FTL::verboseCompilationEnabled):
* tests/stress/ftl-get-by-id-getter-exception-interesting-live-state.js: Added.
* tests/stress/ftl-get-by-id-getter-exception-no-catch.js: Added.
* tests/stress/ftl-get-by-id-getter-exception.js: Added.
* tests/stress/ftl-get-by-id-slow-exception-interesting-live-state.js: Added.
* tests/stress/ftl-get-by-id-slow-exception-no-catch.js: Added.
* tests/stress/ftl-get-by-id-slow-exception.js: Added.
* tests/stress/ftl-operation-exception-interesting-live-state.js: Added.
* tests/stress/ftl-operation-exception-no-catch.js: Added.

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

3 years ago[mips] Implemented missing branch patching methods.
commit-queue@webkit.org [Thu, 7 Jan 2016 21:17:01 +0000 (21:17 +0000)]
[mips] Implemented missing branch patching methods.
https://bugs.webkit.org/show_bug.cgi?id=152845

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-01-07
Reviewed by Michael Saboff.

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::canJumpReplacePatchableBranch32WithPatch):
(JSC::MacroAssemblerMIPS::startOfPatchableBranch32WithPatchOnAddress):
(JSC::MacroAssemblerMIPS::revertJumpReplacementToPatchableBranch32WithPatch):

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

3 years ago[JSC] When resolving Stack arguments, use addressing from SP when addressing from...
commit-queue@webkit.org [Thu, 7 Jan 2016 21:16:07 +0000 (21:16 +0000)]
[JSC] When resolving Stack arguments, use addressing from SP when addressing from FP is invalid
https://bugs.webkit.org/show_bug.cgi?id=152840

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-07
Reviewed by Mark Lam.

ARM64 has two kinds of addressing with immediates:
-Signed 9bits direct (really only -256 to 255).
-Unsigned 12bits scaled by the load/store size.

When resolving the stack addresses, we easily run
past -256 bytes from FP. Addressing from SP gives us more
room to address the stack efficiently because we can
use unsigned immediates.

* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::repForArg):
* b3/air/AirAllocateStack.cpp:
(JSC::B3::Air::allocateStack):

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

3 years ago[mips] Make repatchCall public to fix compilation.
commit-queue@webkit.org [Thu, 7 Jan 2016 21:13:26 +0000 (21:13 +0000)]
[mips] Make repatchCall public to fix compilation.
https://bugs.webkit.org/show_bug.cgi?id=152843

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-01-07
Reviewed by Michael Saboff.

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::repatchCall):
(JSC::MacroAssemblerMIPS::linkCall): Deleted.

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

3 years ago[mips] Replaced subi with addi in getHostCallReturnValue
commit-queue@webkit.org [Thu, 7 Jan 2016 20:43:39 +0000 (20:43 +0000)]
[mips] Replaced subi with addi in getHostCallReturnValue
https://bugs.webkit.org/show_bug.cgi?id=152841

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-01-07
Reviewed by Michael Saboff.

MIPS architecture does not have subi instruction, addi with negative
number should be used instead.

* jit/JITOperations.cpp:

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

3 years agoARMv7 or32(TrustedImm32, AbsoluteAddress) may have a bug with its use of dataTempRegi...
mark.lam@apple.com [Thu, 7 Jan 2016 20:21:10 +0000 (20:21 +0000)]
ARMv7 or32(TrustedImm32, AbsoluteAddress) may have a bug with its use of dataTempRegister.
https://bugs.webkit.org/show_bug.cgi?id=152833

Reviewed by Michael Saboff.

Follow-up patch to fix illegal use of memoryTempRegister as the src for ARM64's
store32.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::or32):
(JSC::MacroAssemblerARM64::store):

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

3 years agoIncorrect position: fixed; rendering when child of position:relative/sticky.
zalan@apple.com [Thu, 7 Jan 2016 20:01:23 +0000 (20:01 +0000)]
Incorrect position: fixed; rendering when child of position:relative/sticky.
https://bugs.webkit.org/show_bug.cgi?id=147284

Reviewed by Simon Fraser and David Hyatt.

Computing logical left for positioned objects should take the relative positioned ancestors' offset
into account.

Source/WebCore:

Tests: fast/block/positioning/fixed-container-with-relative-parent.html
       fast/block/positioning/fixed-container-with-sticky-parent.html

* rendering/RenderBox.cpp:
(WebCore::computeInlineStaticDistance):

LayoutTests:

* fast/block/positioning/fixed-container-with-relative-parent-expected.html: Added.
* fast/block/positioning/fixed-container-with-relative-parent.html: Added.
* fast/block/positioning/fixed-container-with-sticky-parent-expected.html: Added.
* fast/block/positioning/fixed-container-with-sticky-parent.html: Added.

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

3 years ago[mips] GPRInfo::toArgumentRegister missing
commit-queue@webkit.org [Thu, 7 Jan 2016 20:00:08 +0000 (20:00 +0000)]
[mips] GPRInfo::toArgumentRegister missing
https://bugs.webkit.org/show_bug.cgi?id=152838

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-01-07
Reviewed by Michael Saboff.

* jit/GPRInfo.h:
(JSC::GPRInfo::toArgumentRegister):

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