WebKit-https.git
4 years agoSupport "plus-lighter" in mix-blend mode
dino@apple.com [Sat, 7 Mar 2015 00:08:32 +0000 (00:08 +0000)]
Support "plus-lighter" in mix-blend mode
https://bugs.webkit.org/show_bug.cgi?id=142416
<rdar://problem/19993979>

Reviewed by Darin Adler and Sam Weinig.

Source/WebCore:

Support the "plus-lighter" blending mode to CSS.
See my reply to: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html

Test: css3/blending/svg-blend-plus-lighter.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept the
new keyword.
* css/CSSPrimitiveValueMappings.h: Add the mappings to/from the GraphicsType.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator BlendMode):
* css/CSSValueKeywords.in: Add comment to show plus-darker and plus-lighter
are available.
* platform/graphics/GraphicsTypes.cpp: New GraphicsType for PlusLighter.
* platform/graphics/GraphicsTypes.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA filter.
(PlatformCAFilters::setBlendingFiltersOnLayer):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG
blending flag.

Source/WebKit2:

Output the appropriate blending type when logging.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):

LayoutTests:

Add tests and new expected results for plus-lighter.

* css3/blending/blend-mode-property-parsing-expected.txt:
* css3/blending/blend-mode-simple-composited.html:
* css3/blending/blend-mode-simple.html:
* css3/blending/script-tests/blend-mode-property-parsing.js:
* css3/blending/svg-blend-plus-lighter.html: Added.
* platform/mac/css3/blending/blend-mode-simple-composited-expected.png:
* platform/mac/css3/blending/blend-mode-simple-composited-expected.txt:
* platform/mac/css3/blending/blend-mode-simple-expected.png:
* platform/mac/css3/blending/blend-mode-simple-expected.txt:
* platform/mac/css3/blending/svg-blend-plus-lighter-expected.txt: Added.

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

4 years agoSoft link MediaAccessibility using new macros.
achristensen@apple.com [Sat, 7 Mar 2015 00:03:39 +0000 (00:03 +0000)]
Soft link MediaAccessibility using new macros.
https://bugs.webkit.org/show_bug.cgi?id=142406

Reviewed by David Kilzer.

* Configurations/WebCore.unexp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/CaptionUserPreferencesMediaAF.cpp:
* platform/cf/MediaAccessibilitySoftLink.cpp: Added.
* platform/cf/MediaAccessibilitySoftLink.h: Added.

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

4 years agoAdd 'initial' keyword support for scroll snap CSS properties
bfulgham@apple.com [Fri, 6 Mar 2015 23:39:57 +0000 (23:39 +0000)]
Add 'initial' keyword support for scroll snap CSS properties
https://bugs.webkit.org/show_bug.cgi?id=136345
<rdar://problem/18162325>

Reviewed by Dean Jackson.

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-initial.html

The existing implementation already had 'initial' keyword support, but did not fully follow
the CSS specification. In particular, the 'initial' state for the scroll-snap-points-x and
scroll-snap-points-y properties was not handled correctly.

Revise implementation to represent ScrollSnapPoints as a pointer, so that 'none' is a valid
state.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::scrollSnapPoints): If 'points' is null, return CSSValueNone.
* css/CSSPropertyNames.in: Provide custom initial/inherit handles for snap point x/y sets.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertScrollSnapPoints): Update to represent ScrollSnapPoints
as a pointer.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Provide custom pointer-based
implementation for ScrollSnapPoints.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Ditto.
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Ditto.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Ditto."
* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::updateFromStyle): Handle ScrollSnapPoints as pointers.
(WebCore::updateSnapOffsetsForScrollableArea): Ditto.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::scrollSnapPointsX): Update to use pointer-based representation of ScrollSnapPoints.
(WebCore::RenderStyle::scrollSnapPointsY): Ditto.
(WebCore::RenderStyle::setScrollSnapPointsX): Ditto.
(WebCore::RenderStyle::setScrollSnapPointsY): Ditto.
(WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
(WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
* rendering/style/RenderStyle.h:
* rendering/style/StyleScrollSnapPoints.cpp:
(WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Revise constructor to handle pointer argument.
* rendering/style/StyleScrollSnapPoints.h:

LayoutTests:

* css3/scroll-snap/scroll-snap-property-computed-style.js: Update for corrected 'initial' behavior.
* css3/scroll-snap/scroll-snap-property-computed-style-expected.txt: Rebaselined.
* css3/scroll-snap/scroll-snap-initial.html: Added.
* css3/scroll-snap/scroll-snap-initial-expected.txt: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoWeb Inspector: Adopt Object Literal Method Property Syntax
joepeck@webkit.org [Fri, 6 Mar 2015 22:41:15 +0000 (22:41 +0000)]
Web Inspector: Adopt Object Literal Method Property Syntax
https://bugs.webkit.org/show_bug.cgi?id=142409

Reviewed by Timothy Hatcher.

Mechanical change touching lots of files.

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

4 years agoWeb Inspector: Adopt Object Literal Shorthand Property Construction Syntax
joepeck@webkit.org [Fri, 6 Mar 2015 22:41:11 +0000 (22:41 +0000)]
Web Inspector: Adopt Object Literal Shorthand Property Construction Syntax
https://bugs.webkit.org/show_bug.cgi?id=142374

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:

Source/WebInspectorUI:

Mechanical change touching lots of files.

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

4 years agoWeb Inspector: Populate Debugger sidebar with all debuggable resources
jonowells@apple.com [Fri, 6 Mar 2015 22:33:27 +0000 (22:33 +0000)]
Web Inspector: Populate Debugger sidebar with all debuggable resources
https://bugs.webkit.org/show_bug.cgi?id=141232

Reviewed by Timothy Hatcher.

All debuggable resources now show in the debugger sidebar. The _resourceAdded handler now adds a script resource
to the sidebar regardless of whether it has any breakpoints set on it. The new function
_getTreeElementForSourceCodeAndAddToContentTreeOutline adds the element to the debugger sidebar before
_addBreakpointsForSourceCode is called. Removing all breakpoints from a resource no longer removes that
resource from the debugger sidebar. TreeOutline.prototype.removeChild has been updated so the disclosure
button will disappear and reappear correctly when removing/adding breakpoints.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint): Expand resource if first breakpoint is added.
(WebInspector.DebuggerSidebarPanel.prototype._getTreeElementForSourceCodeAndAddToContentTreeOutline): Created.
(WebInspector.DebuggerSidebarPanel.prototype._resourceAdded): Checks resource type and adds scripts to sidebar.
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceChanged):
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
(WebInspector.DebuggerSidebarPanel.prototype._removeBreakpointTreeElement): No longer removes empty parent.
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected): Displays scripts without breakpoints now.

* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.get disclosureButton): Drive-by fix. Unused. Deleted.

* UserInterface/Views/TreeOutline.js:
(TreeOutline.prototype.removeChild):
Remove parent class and set hasChildren to false if necessary to properly hide and reveal disclosure button
for elements whose children have been removed.

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

4 years agoES6: Object Literal Extensions - Methods
commit-queue@webkit.org [Fri, 6 Mar 2015 22:31:28 +0000 (22:31 +0000)]
ES6: Object Literal Extensions - Methods
https://bugs.webkit.org/show_bug.cgi?id=142390

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-06
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Support method syntax in object literals.

* parser/Parser.h:
* parser/Parser.cpp:
(JSC::stringForFunctionMode):
(JSC::Parser<LexerType>::parseProperty):
Methods are allowed for identifier, string, and numeric names,
and computed property names.

(JSC::Parser<LexerType>::parsePropertyMethod):
Helper for parsing a property method.

LayoutTests:

* js/object-literal-computed-methods-expected.txt: Added.
* js/object-literal-computed-methods.html: Added.
* js/object-literal-methods-expected.txt: Added.
* js/object-literal-methods.html: Added.
* js/script-tests/object-literal-computed-methods.js: Added.
* js/script-tests/object-literal-methods.js: Added.

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

4 years ago2015-03-06 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 6 Mar 2015 22:01:58 +0000 (22:01 +0000)]
2015-03-06  Geoffrey Garen  <ggaren@apple.com>

        Fix crashes seen on the the Windows buildbots after my last patch.

        Unreviewed.

        * wtf/FastMalloc.cpp:
        (WTF::fastAlignedMalloc): Let's pass these arguments in the right order.

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

4 years ago__proto__ shorthand property should not modify prototype in Object Literal construction
joepeck@webkit.org [Fri, 6 Mar 2015 21:31:27 +0000 (21:31 +0000)]
__proto__ shorthand property should not modify prototype in Object Literal construction
https://bugs.webkit.org/show_bug.cgi?id=142382

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

When parsing shorthand property syntax we know we will do a
put direct, even if the property name is __proto__. Pass that
information through to bytecode generation.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitDirectPutById):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitPutConstantProperty):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createProperty):
* parser/NodeConstructors.h:
(JSC::PropertyNode::PropertyNode):
* parser/Nodes.h:
(JSC::PropertyNode::putType):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createProperty):

LayoutTests:

* js/object-literal-shorthand-construction-expected.txt:
* js/script-tests/object-literal-shorthand-construction.js:
Update test to cover the __proto__ shorthand case which is
different from longhand case.

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

4 years agoReskin Captions button and container on OSX.
roger_fong@apple.com [Fri, 6 Mar 2015 21:29:29 +0000 (21:29 +0000)]
Reskin Captions button and container on OSX.
https://bugs.webkit.org/show_bug.cgi?id=142383.
<rdar://problem/20061466>
Reviewed by Eric Carlson.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-toggle-closed-captions-button): Create new captions button icon.
Update caption container to match rest of media controls better.
(audio::-webkit-media-controls-closed-captions-container):
(audio::-webkit-media-controls-closed-captions-container .list):
(audio::-webkit-media-controls-closed-captions-container h3):
(audio::-webkit-media-controls-closed-captions-container ul):
(audio::-webkit-media-controls-closed-captions-container li):
(audio::-webkit-media-controls-closed-captions-container li:focus):
(audio::-webkit-media-controls-closed-captions-container li:hover):
Fix up some fonts to make fonts between captions, status display and time displays consistent.
(audio::-webkit-media-controls-status-display):
(audio::-webkit-media-controls-time-remaining-display):

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

4 years ago2015-03-06 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 6 Mar 2015 20:19:47 +0000 (20:19 +0000)]
2015-03-06  Geoffrey Garen  <ggaren@apple.com>

        Fix crashes seen on the the 32-bit buildbots after my last patch.

        Unreviewed.

        * heap/CopiedBlock.h:
        (JSC::CopiedBlock::payload):
        * heap/CopiedSpace.cpp:
        (JSC::CopiedSpace::tryAllocateOversize): Round up to the right alignment,
        since the size of the CopiedBlock class is not guaranteed to be the
        right alignment, and is in fact the wrong alignment on 32-bit.

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

4 years agoREGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
bdakin@apple.com [Fri, 6 Mar 2015 20:13:46 +0000 (20:13 +0000)]
REGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
https://bugs.webkit.org/show_bug.cgi?id=142371
-and corresponding-
rdar://problem/20059224

Reviewed by Tim Horton.

This patch has the WKImmediateActionController keep track of whether or not it has
an active immediate action. Then we only call into Lookup and DD if the window is
key OR if the WKView’s immediateActionController has an active action.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController initWithPage:view:recognizer:]):
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController hasActiveImmediateAction]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):

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

4 years agoEnable disk cache validation test on iOS
antti@apple.com [Fri, 6 Mar 2015 19:56:17 +0000 (19:56 +0000)]
Enable disk cache validation test on iOS
https://bugs.webkit.org/show_bug.cgi?id=142405

Reviewed by Andreas Kling.

The features is enabled.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

4 years ago[Web Audio] Decoding specific .m4a file crashes tab
jer.noble@apple.com [Fri, 6 Mar 2015 19:31:16 +0000 (19:31 +0000)]
[Web Audio] Decoding specific .m4a file crashes tab
https://bugs.webkit.org/show_bug.cgi?id=139545

Reviewed by Eric Carlson.

Source/WebCore:

Test: webaudio/decode-audio-data-too-short.html

Bail out early if CoreAudio reports the number of frames in the file to be negative.

* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):

LayoutTests:

* webaudio/decode-audio-data-too-short-expected.txt: Added.
* webaudio/decode-audio-data-too-short.html: Added.
* webaudio/resources/media/too-short.m4a: Added.

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

4 years agoScroll to make the video element visible when exiting fullscreen.
commit-queue@webkit.org [Fri, 6 Mar 2015 19:28:26 +0000 (19:28 +0000)]
Scroll to make the video element visible when exiting fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=141439

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-03-06
Reviewed by Simon Fraser.

Source/WebCore:

This patch will scroll the element so it is visible when exiting fullscreen,
but only if the element is completely scrolled off screen.
Also update the element screen rect so exit animation goes to the correct location.

* dom/Element.cpp:
(WebCore::Element::scrollIntoViewIfNotVisible): Added.
* dom/Element.h: Add declaration for scrollIntoViewIfNotVisible.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController fullscreenMayReturnToInline]):
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]):
(-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
(WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):
(WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
(WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
(WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
* rendering/ScrollBehavior.cpp:
* rendering/ScrollBehavior.h:

Source/WebKit2:

This patch will restore interface state when exiting fullscreen.
Adds preparedToReturnToInline to continue exiting once the interface is updated.

* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline): added.
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):

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

4 years agoCrash in -[WebCascadeList objectAtIndex:] + 195
mmaxfield@apple.com [Fri, 6 Mar 2015 19:08:55 +0000 (19:08 +0000)]
Crash in -[WebCascadeList objectAtIndex:] + 195
https://bugs.webkit.org/show_bug.cgi?id=141274

Reviewed by David Kilzer.

Source/WebCore:

CTFontDescriptorRefs can live forever in caches inside CoreText, which means our
WebCascadeList can too.

Test: platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::FontCascade): Initialize WeakPtrFactory.
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::createWeakPtr):
* platform/graphics/mac/ComplexTextControllerCoreText.mm: Migrate the raw pointer
to WeakPtr.
(-[WebCascadeList initWithFont:character:]):
(-[WebCascadeList count]):
(-[WebCascadeList objectAtIndex:]):

Source/WTF:

* wtf/WeakPtr.h:
(WTF::WeakPtrFactory::createWeakPtr): WebCascadeList uses a const FontCascade,
and it calls createWeakPtr() on it. Therefore, createWeakPtr has to be marked
const.
(WTF::WeakPtrFactory::operator=): Removed because it was broken and had no
callers

LayoutTests:

* platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list-expected.txt: Added.
* platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html: Added.

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

4 years agoRename BreakingContextInlineHeaders.h to BreakingContext.h
mmaxfield@apple.com [Fri, 6 Mar 2015 19:06:30 +0000 (19:06 +0000)]
Rename BreakingContextInlineHeaders.h to BreakingContext.h
https://bugs.webkit.org/show_bug.cgi?id=142404

Reviewed by Simon Fraser.

No point naming it "InlineHeaders" when there are no non-inline-headers files.

No new tests because this is just a rename of a file.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlockLineLayout.cpp:
* rendering/line/BreakingContext.h: Renamed from Source/WebCore/rendering/line/BreakingContextInlineHeaders.h.
(WebCore::WordMeasurement::WordMeasurement):
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::currentObject):
(WebCore::BreakingContext::lineBreak):
(WebCore::BreakingContext::lineWidth):
(WebCore::BreakingContext::atEnd):
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
(WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory):
(WebCore::BreakingContext::InlineIteratorHistory::push):
(WebCore::BreakingContext::InlineIteratorHistory::update):
(WebCore::BreakingContext::InlineIteratorHistory::renderer):
(WebCore::BreakingContext::InlineIteratorHistory::offset):
(WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):
(WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode):
(WebCore::BreakingContext::InlineIteratorHistory::get):
(WebCore::BreakingContext::InlineIteratorHistory::current):
(WebCore::BreakingContext::InlineIteratorHistory::historyLength):
(WebCore::BreakingContext::InlineIteratorHistory::moveTo):
(WebCore::BreakingContext::InlineIteratorHistory::increment):
(WebCore::BreakingContext::InlineIteratorHistory::clear):
(WebCore::BreakingContext::initializeForCurrentObject):
(WebCore::BreakingContext::increment):
(WebCore::BreakingContext::handleBR):
(WebCore::borderPaddingMarginStart):
(WebCore::borderPaddingMarginEnd):
(WebCore::shouldAddBorderPaddingMargin):
(WebCore::previousInFlowSibling):
(WebCore::inlineLogicalWidth):
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::shouldSkipWhitespaceAfterStartObject):
(WebCore::BreakingContext::handleEmptyInline):
(WebCore::BreakingContext::handleReplaced):
(WebCore::firstPositiveWidth):
(WebCore::iteratorIsBeyondEndOfRenderCombineText):
(WebCore::nextCharacter):
(WebCore::updateCounterIfNeeded):
(WebCore::measureHyphenWidth):
(WebCore::textWidth):
(WebCore::ensureCharacterGetsLineBox):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::handleText):
(WebCore::textBeginsWithBreakablePosition):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
(WebCore::checkMidpoints):
(WebCore::BreakingContext::handleEndOfLine):
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
* rendering/line/LineBreaker.cpp:

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

4 years agoExpose some of the functionality of extract-localizable-strings.pl as a module
mitz@apple.com [Fri, 6 Mar 2015 18:47:28 +0000 (18:47 +0000)]
Expose some of the functionality of extract-localizable-strings.pl as a module
https://bugs.webkit.org/show_bug.cgi?id=142038

Reviewed by Sam Weinig.

* LocalizableStrings.pm: Copied from Source/WebCore/extract-localizable-strings.pl.
(setTreatWarningsAsErrors): Added this setter for the variable moved here.
(sawError): Added a getter.
(emitError): Added. Emits the error message and sets $sawError.
(unescapeHexSequence): Moved from extract-localizable-strings.pl and renamed to start with
a lowercase letter.
(keyCollisionCount): Added this getter.
(localizedCount): Added this getter.
(HandleUIString): Moved from extract-localizable-strings.pl and made it increment the
localized string count.
(writeStringsFile): Moved code from extract-localizable-strings.pl into this new subroutine.
(verifyStringsFile): Ditto.

* WebCore.xcodeproj/project.pbxproj: Added LocalizableStrings.pm to the Copy Scripts build
phase.

* extract-localizable-strings.pl:
(emitWarning): Moved to the module.
(UnescapeHexSequence): Ditto.
(HandleUIString): Ditto.

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

4 years agoRemove unused C++ DOM event handler attribute functions
darin@apple.com [Fri, 6 Mar 2015 18:45:48 +0000 (18:45 +0000)]
Remove unused C++ DOM event handler attribute functions
https://bugs.webkit.org/show_bug.cgi?id=142398

Reviewed by Anders Carlsson.

* dom/EventTarget.h: Removed now-unneeded macros: DEFINE_ATTRIBUTE_EVENT_LISTENER,
DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER, DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER,
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER, DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER,
DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER, DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER.

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::setOnended): Deleted.
(WebCore::AudioScheduledSourceNode::finish): Rewrote this to use dispatchEvent
instead of one-off event-sending code. Also use a lambda to avoid needing two
additional member functions to implement this.
(WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Deleted.
(WebCore::AudioScheduledSourceNode::notifyEnded): Deleted.
* Modules/webaudio/AudioScheduledSourceNode.h: Updated for above.

* Modules/battery/BatteryManager.h: Removed onxxx and setOnxxx functions,
including ones created with macros from EventTarget.h.
* Modules/encryptedmedia/MediaKeySession.h: Ditto.
* Modules/indexeddb/IDBDatabase.h: Ditto.
* Modules/indexeddb/IDBOpenDBRequest.h: Ditto.
* Modules/indexeddb/IDBRequest.h: Ditto.
* Modules/indexeddb/IDBTransaction.h: Ditto.
* Modules/mediastream/MediaStream.h: Ditto.
* Modules/mediastream/MediaStreamTrack.h: Ditto.
* Modules/mediastream/RTCDTMFSender.h: Ditto.
* Modules/mediastream/RTCDataChannel.h: Ditto.
* Modules/mediastream/RTCPeerConnection.h: Ditto.
* Modules/notifications/Notification.h: Ditto.
* Modules/speech/SpeechSynthesisUtterance.h: Ditto.
* Modules/webaudio/AudioContext.h: Ditto.
* Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
* Modules/webaudio/ScriptProcessorNode.h: Ditto.
* Modules/websockets/WebSocket.h: Ditto.
* css/FontLoader.h: Ditto.
* dom/Document.h: Ditto.
* dom/Element.cpp: Ditto.
* dom/Element.h: Ditto.
* dom/MessagePort.h: Ditto.
* fileapi/FileReader.h: Ditto.
* html/HTMLBodyElement.h: Ditto.
* html/HTMLFormElement.h: Ditto.
* html/HTMLFrameSetElement.h: Ditto.
* html/HTMLInputElement.h: Ditto.
* html/HTMLMediaElement.h: Ditto.
* html/HTMLVideoElement.h: Ditto.
* html/track/TextTrack.h: Ditto.
* html/track/TextTrackCue.h: Ditto.
* html/track/TrackListBase.h: Ditto.
* loader/appcache/DOMApplicationCache.h: Ditto.
* page/DOMWindow.h: Ditto.
* page/EventSource.h: Ditto.
* page/Performance.h: Ditto.
* workers/AbstractWorker.h: Ditto.
* workers/DedicatedWorkerGlobalScope.h: Ditto.
* workers/Worker.h: Ditto.
* workers/WorkerGlobalScope.h: Ditto.
* xml/XMLHttpRequest.h: Ditto.
* xml/XMLHttpRequestUpload.h: Ditto.

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

4 years agoSetting any of the <object> element plugin controlling attributes does not have any...
commit-queue@webkit.org [Fri, 6 Mar 2015 18:44:33 +0000 (18:44 +0000)]
Setting any of the <object> element plugin controlling attributes does not have any affect.
https://bugs.webkit.org/show_bug.cgi?id=141936.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-03-06
Reviewed by Simon Fraser.
Source/WebCore:

When setting any of the <object> element plugin controlling attributes
dynamically we need to mark the the element to be dirty by calling
setNeedsStyleRecalc(), so it has to recreate its renderer when needed.

Tests: fast/css/image-object-hover-inherit.html
       svg/as-object/svg-in-object-dynamic-attribute-change.html

* dom/Element.h: Delete unimplemented function.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute): Mark the element dirty by
calling setNeedsStyleRecalc() when one of the plugin controlling attributes
gets changed. We have to clear m_useFallbackContent because the attribute's
new value might fix the object rendering.

* html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.

LayoutTests:

* fast/css/image-object-hover-inherit-expected.html: Added.
* fast/css/image-object-hover-inherit.html: Added.
A guarding test to catch the case of reconstructing the image <object>
renderer while performing a synchronous resolveTree() followed by page
rendering or dump render tree.

* svg/as-object/resources/lime100x100.html: Added.
* svg/as-object/resources/lime100x100.png: Added.
* svg/as-object/resources/lime100x100.svg: Added.
* svg/as-object/resources/red100x100.svg: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change-expected.html: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change.html: Added.
Ensure that changing the 'type' and the 'data' attributes of the <object>
element will have the expected outcome. Also make sure that the <object>
element renderer falls back correctly when setting any of the attributes
to some unexpected value.

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

4 years agoTest horiz-origin-x and horiz-origin-y in SVG fonts
mmaxfield@apple.com [Fri, 6 Mar 2015 18:21:36 +0000 (18:21 +0000)]
Test horiz-origin-x and horiz-origin-y in SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=142403

Source/WebCore:

Reviewed by Simon Fraser.

Remove incorrect comment.

Test: svg/fonts/svg-font-horiz-origin.html

* svg/SVGToOTFFontConversion.cpp:
(WebCore::CFFBuilder::CFFBuilder):

LayoutTests:

Simply moving to the origin in glyph-space at the beginning
of path parsing won't work if subsequent coordinates are absolute.

Reviewed by Simon Fraser.

* svg/fonts/resources/svg-font-horiz-origin-font.svg: Added.
* svg/fonts/svg-font-horiz-origin-expected.html: Added.
* svg/fonts/svg-font-horiz-origin.html: Added.

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

4 years agoAllow tree dumping functions to be used in release builds by switching a flag
simon.fraser@apple.com [Fri, 6 Mar 2015 18:20:40 +0000 (18:20 +0000)]
Allow tree dumping functions to be used in release builds by switching a flag
https://bugs.webkit.org/show_bug.cgi?id=142379

Reviewed by Zalan Bujtas.

There are various tree dumping functions that are useful for debugging, and sometimes
you want to be able to use them in release builds. Currently they are surrounded by
in config.h

* config.h:
* dom/DocumentMarkerController.cpp:
* dom/DocumentMarkerController.h:
* dom/Element.cpp:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
* dom/Position.h:
* dom/Range.cpp:
* dom/Range.h:
* dom/Text.cpp:
* dom/Text.h:
* rendering/CounterNode.cpp:
* rendering/CounterNode.h:
* rendering/InlineBox.cpp:
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
* rendering/InlineTextBox.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
* rendering/RenderCounter.cpp:
* rendering/RenderCounter.h:
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::CompositingState::CompositingState):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h: showTreeCharacterOffset was unused.
* rendering/RootInlineBox.cpp:
* rendering/RootInlineBox.h:
* rendering/SimpleLineLayoutFunctions.cpp:
* rendering/SimpleLineLayoutFunctions.h:
* rendering/svg/SVGResources.cpp:
* rendering/svg/SVGResources.h:

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

4 years agoAn SVG element without intrinsic size inherits the container size as its viewport...
commit-queue@webkit.org [Fri, 6 Mar 2015 18:15:48 +0000 (18:15 +0000)]
An SVG element without intrinsic size inherits the container size as its viewport instead of inheriting the container viewport.
https://bugs.webkit.org/show_bug.cgi?id=141725.

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

Source/WebCore:

The current viewport of the <svg> element should be retrieved from its
renderer if the renderer is available. If the renderer is not created yet,
this means the viewport is needed to calculate the size of the renderer.
In this case, we should return the element size if it is intrinsic size.

Test: svg/css/svg-css-different-intrinsic-sizes.html

* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentViewportSize): Change the order for
returning the viewport of the <svg> element. We should consider the case
of a valid renderer before considering the case of an intrinsic size.

LayoutTests:

* svg/css/svg-css-different-intrinsic-sizes-expected.html: Added.
* svg/css/svg-css-different-intrinsic-sizes.html: Added.
The intrinsic size of the <svg> element is overridden by CSS. The elements
inside the <svg> should consider the css size (which is equal to the <svg>
element viewport) instead of the <svg> element intrinsic size.

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

4 years agoAllow composited clip-path to be updated without a layer repaint
simon.fraser@apple.com [Fri, 6 Mar 2015 18:14:10 +0000 (18:14 +0000)]
Allow composited clip-path to be updated without a layer repaint
https://bugs.webkit.org/show_bug.cgi?id=142384

Reviewed by Zalan Bujtas.

Source/WebCore:

When clip-path is mapped to a compositing shape layer mask, we can just
push a new shape to the GraphicsLayer to update the clip path, without
needing to repaint.

Achieve this by adding ContextSensitivePropertyClipPath. When set, and the
stars are aligned, issue a StyleDifferenceRecompositeLayer rather than
a StyleDifferenceRepaint.

We ask RenderLayerCompositor whether the clip path can be composited
to hide platform differences related to whether GraphicsLayer supports
shape masks.

Test: compositing/masks/compositing-clip-path-change-no-repaint.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustStyleDifference): Remove obvious comment
about opacity. Handle ContextSensitivePropertyClipPath.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::canCompositeClipPath): If we have a mask
we have to paint the mask + clip path into the mask layer (mirrors code in
RenderLayerBacking::updateMaskingLayer but isn't quite similar enough to share).
* rendering/RenderLayerCompositor.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaint): Set ContextSensitivePropertyClipPath
and don't return, as is normal for context-sensitive property handling.
* rendering/style/RenderStyleConstants.h: Line things up to avoid future bit
fumbles, and remove unnecessary braces.

LayoutTests:

Test repaint with a clip-path change.

* compositing/masks/compositing-clip-path-change-no-repaint-expected.txt: Added.
* compositing/masks/compositing-clip-path-change-no-repaint.html: Added.

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

4 years ago[Content Extensions] Process all actions when blocking a URL.
commit-queue@webkit.org [Fri, 6 Mar 2015 18:13:10 +0000 (18:13 +0000)]
[Content Extensions] Process all actions when blocking a URL.
https://bugs.webkit.org/show_bug.cgi?id=142363

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-06
Reviewed by Darin Adler.

This can only be tested once we implement css selectors.

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
Do not return early when adding a block action.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
Process all actions before returning.

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

4 years agoRename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
antti@apple.com [Fri, 6 Mar 2015 18:09:06 +0000 (18:09 +0000)]
Rename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
https://bugs.webkit.org/show_bug.cgi?id=142401

Rubber-stamped by Anders Carlsson.

It is now fully cross-platform.

* NetworkProcess/cache/NetworkCacheStorage.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm.
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoDon't use dispatch_semaphore in NetworkCacheStorage
antti@apple.com [Fri, 6 Mar 2015 17:30:32 +0000 (17:30 +0000)]
Don't use dispatch_semaphore in NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=142395

Reviewed by Anders Carlsson.

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

    Add readSync to encapsulate the semaphore.

* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCache::Storage::traverse):

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

4 years agoMove dispatch_data use behind NetworkCache::Data abstraction
antti@apple.com [Fri, 6 Mar 2015 17:25:54 +0000 (17:25 +0000)]
Move dispatch_data use behind NetworkCache::Data abstraction
https://bugs.webkit.org/show_bug.cgi?id=142392

Reviewed by Anders Carlsson.

* NetworkProcess/cache/NetworkCacheData.h:
(WebKit::NetworkCache::DispatchPtr::DispatchPtr):
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::Data):
(WebKit::NetworkCache::Data::apply):
(WebKit::NetworkCache::Data::subrange):
(WebKit::NetworkCache::concatenate):
(WebKit::NetworkCache::mapFile):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCache::hashData):
(WebKit::NetworkCache::decodeEntryMetaData):
(WebKit::NetworkCache::decodeEntryHeader):
(WebKit::NetworkCache::decodeEntry):
(WebKit::NetworkCache::encodeEntryMetaData):
(WebKit::NetworkCache::encodeEntryHeader):
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
(WebKit::NetworkCache::mapFile): Deleted.

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

4 years ago[GTK] Test /webkit2/WebKitWebView/sync-request-on-max-conns might fail after finished
carlosgc@webkit.org [Fri, 6 Mar 2015 17:21:11 +0000 (17:21 +0000)]
[GTK] Test /webkit2/WebKitWebView/sync-request-on-max-conns might fail after finished
https://bugs.webkit.org/show_bug.cgi?id=142385

Reviewed by Sergio Villar Senin.

Use stack allocated GMainLoopSources to make sure they are
cancelled automatically if the test finishes before they have
been processed.

* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(testWebViewSyncRequestOnMaxConns):

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

4 years agoUse WTF abstraction for page size in NetworkCacheStorage
antti@apple.com [Fri, 6 Mar 2015 17:06:56 +0000 (17:06 +0000)]
Use WTF abstraction for page size in NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=142396

Reviewed by Darin Adler.

* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCache::decodeEntryMetaData):
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation):

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

4 years agoUse FastMalloc (bmalloc) instead of BlockAllocator for GC pages
ggaren@apple.com [Fri, 6 Mar 2015 16:58:51 +0000 (16:58 +0000)]
Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by Mark Hahnenberg.

Re-landing just the CopiedBlock piece of this patch.

* heap/CopiedBlock.h:
(JSC::CopiedBlock::createNoZeroFill):
(JSC::CopiedBlock::destroy):
(JSC::CopiedBlock::create):
(JSC::CopiedBlock::CopiedBlock):
(JSC::CopiedBlock::isOversize):
(JSC::CopiedBlock::payloadEnd):
(JSC::CopiedBlock::capacity):
* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::~CopiedSpace):
(JSC::CopiedSpace::tryAllocateOversize):
(JSC::CopiedSpace::tryReallocateOversize):
* heap/CopiedSpaceInlines.h:
(JSC::CopiedSpace::recycleEvacuatedBlock):
(JSC::CopiedSpace::recycleBorrowedBlock):
(JSC::CopiedSpace::allocateBlockForCopyingPhase):
(JSC::CopiedSpace::allocateBlock):
(JSC::CopiedSpace::startedCopying):
* heap/CopyWorkList.h:

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

4 years agoMake JavaScript binding get and set legacy event listener attributes directly
darin@apple.com [Fri, 6 Mar 2015 16:30:23 +0000 (16:30 +0000)]
Make JavaScript binding get and set legacy event listener attributes directly
https://bugs.webkit.org/show_bug.cgi?id=142282

Reviewed by Antti Koivisto.

Test: fast/dom/legacy-event-handler-attributes.html

This patch changes the JavaScript getters and setters for these attributes
to work directly without requiring any functions in the C++ DOM implementation.
A subsequent patch will remove the now-unused C++ DOM implementation.

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::setOnended): Remove code to set
m_hasEndedListener; this was incorrect since it only detected event listeners
set up with the event handler attribute, not with addEventListener.
(WebCore::AudioScheduledSourceNode::addEventListener): Added code to update
m_hasEndedListener after making changes to the event listeners.
(WebCore::AudioScheduledSourceNode::removeEventListener): Ditto.
(WebCore::AudioScheduledSourceNode::removeAllEventListeners): Ditto.
* Modules/webaudio/AudioScheduledSourceNode.h: Added above overrides.

* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::setOnaudioprocess): Remove code to set
m_hasAudioProcessListener; this was incorrect since it only detected event listeners
set up with the event handler attribute, not with addEventListener.
(WebCore::ScriptProcessorNode::addEventListener): Added code to update
m_hasAudioProcessListener after making changes to the event listeners.
(WebCore::ScriptProcessorNode::removeEventListener): Ditto.
(WebCore::ScriptProcessorNode::removeAllEventListeners): Ditto.
* Modules/webaudio/ScriptProcessorNode.h: Added above overrides.

* bindings/js/JSEventListener.cpp:
(WebCore::legacyEventListenerAttribute): Added.
(WebCore::createEventListenerForLegacyAttribute): Added.
(WebCore::setLegacyEventListenerAttribute): Added.
(WebCore::legacyWindowEventListenerAttribute): Added.
(WebCore::setLegacyWindowEventListenerAttribute): Added.

* bindings/js/JSEventListener.h:
(WebCore::createJSEventListenerForAttribute): Deleted.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeEventListenerCall): Deleted.
(LegacyEventListenerAttributeEventName): Added.
(LegacyEventListenerAttributePrefix): Added.
(GenerateImplementation): Use "auto" in lots of places to simplify the code
generation. Replaced the old inlined code to deal with legacy event listener
attributes with code that simply calls the new functions from JSEventLister.h.
(GenerateCallWith): Use "auto".
(GenerateConstructorDefinition): Ditto.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated expected
results since these now use auto.
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
* bindings/scripts/test/JS/JSTestException.cpp: Ditto.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Ditto.
* bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
* bindings/scripts/test/JS/JSTestNode.cpp: Ditto.
* bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
* bindings/scripts/test/JS/JSattribute.cpp: Ditto.
* bindings/scripts/test/JS/JSreadonly.cpp: Ditto.

* dom/MessagePort.cpp:
(WebCore::MessagePort::addEventListener): Moved logic that calls the start
function in here from setOnmessage, since the latter will no longer be called.
* dom/MessagePort.h: Ditto.

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

4 years ago[iOS] SVG fonts are garbled
mmaxfield@apple.com [Fri, 6 Mar 2015 15:37:07 +0000 (15:37 +0000)]
[iOS] SVG fonts are garbled
https://bugs.webkit.org/show_bug.cgi?id=142377

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-03-06
Reviewed by Simon Fraser.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

The C++ spec says that casting a negative floating point number to
an unsigned integer is undefined. Instead, use clamping.

Covered by existing SVG font tests.

* Configurations/FeatureDefines.xcconfig:
* svg/SVGToOTFFontConversion.cpp:
(WebCore::writeCFFEncodedNumber):

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

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

4 years agoUnreviewed, rolling out r181139.
commit-queue@webkit.org [Fri, 6 Mar 2015 14:34:51 +0000 (14:34 +0000)]
Unreviewed, rolling out r181139.
https://bugs.webkit.org/show_bug.cgi?id=142394

"Caused many crashes in API tests and layout tests in Debug
builds on bots." (Requested by ddkilzer on #webkit).

Reverted changeset:

"Allow tree dumping functions to be used in release builds by
switching a flag"
https://bugs.webkit.org/show_bug.cgi?id=142379
http://trac.webkit.org/changeset/181139

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

4 years ago[MediaStream] new load method for MediaStreamPrivate objects
philn@webkit.org [Fri, 6 Mar 2015 14:10:11 +0000 (14:10 +0000)]
[MediaStream] new load method for MediaStreamPrivate objects
https://bugs.webkit.org/show_bug.cgi?id=142346

Reviewed by Eric Carlson.

No new tests, existing mediastream tests cover this use-case.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource): Use new load method for MediaStreams.
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::load): New stub.
(WebCore::MediaPlayer::load): New load method for
MediaStreamPrivate.
(WebCore::MediaPlayer::nextBestMediaEngine): Set a new boolean on
the MediaEngineSupportParameters to differenciate with MSE and
normal video resources.
(WebCore::MediaPlayer::loadWithNextMediaEngine): Defer loading of
the MediaStream to the MediaPlayerPrivate backend.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaEngineSupportParameters::MediaEngineSupportParameters):
* platform/graphics/MediaPlayerPrivate.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::load): New empty load
method for MediaStreamPrivate objects.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
(WebCore::MediaPlayerPrivateQTKit::load): Ditto.
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:

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

4 years agoRename MediaStreamSource to RealtimeMediaSource
philn@webkit.org [Fri, 6 Mar 2015 14:07:13 +0000 (14:07 +0000)]
Rename MediaStreamSource to RealtimeMediaSource
https://bugs.webkit.org/show_bug.cgi?id=142330

Reviewed by Eric Carlson.

MediaStreamSource is a misleading name, it's not the source of a
MediaStream.

The chain from high level to low level is: MediaStream -
MediaStreamTrack - MediaStreamTrackPrivate - RealTimeMediaSource
and a MediaStream can contains several MediaStreamTrack objects of
different types.

MediaStreamSourceStates was also renamed to
RealtimeMediaSourceStates, and MediaStreamSourceCapabilities to
RealtimeMediaSourceCapabilities, for consistency.

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

4 years agoUnreviewed WinCairo port build fix since r181136.
gyuyoung.kim@samsung.com [Fri, 6 Mar 2015 11:14:57 +0000 (11:14 +0000)]
Unreviewed WinCairo port build fix since r181136.

* platform/network/curl/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformAdopt): Missing ":" in std::unique_ptr.

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

4 years agoUnguarded GTK-specific member and method usage in DrawingAreaImpl
zandobersek@gmail.com [Fri, 6 Mar 2015 10:48:19 +0000 (10:48 +0000)]
Unguarded GTK-specific member and method usage in DrawingAreaImpl
https://bugs.webkit.org/show_bug.cgi?id=142391

Reviewed by Carlos Garcia Campos.

r180924 introduced unguarded use of m_nativeSurfaceHandleForCompositing
and LayerTreeHost::setNativeSurfaceHandleForCompositing() in DrawingAreaImpl.
Definitions for both of these are guarded with USE(TEXTURE_MAPPER_GL) and PLATFORM(GTK),
so their use should be as well.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):

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

4 years agoRemove Mountain Lion libraries since ML isn't supported
ossy@webkit.org [Fri, 6 Mar 2015 10:37:50 +0000 (10:37 +0000)]
Remove Mountain Lion libraries since ML isn't supported
https://bugs.webkit.org/show_bug.cgi?id=142332

Reviewed by Darin Adler.

Tools:

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

WebKitLibraries:

* LLVMIncludesMountainLion.tar.bz2: Removed.
* LLVMLibrariesMountainLion.tar.bz2: Removed.

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

4 years agoUnreviewed EFL gardening on 6th Mar.
gyuyoung.kim@samsung.com [Fri, 6 Mar 2015 09:50:50 +0000 (09:50 +0000)]
Unreviewed EFL gardening on 6th Mar.

Skip tests regardening attachment download progress and unskip a passing test.

* platform/efl/TestExpectations:

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

4 years agoREGRESSION (r181140): WebKit2 fails to build on Mavericks buildbot
ddkilzer@apple.com [Fri, 6 Mar 2015 09:38:41 +0000 (09:38 +0000)]
REGRESSION (r181140): WebKit2 fails to build on Mavericks buildbot

Work around Xcode dependency tracking issues by making changes
to source files that need to be recompiled.

* NetworkProcess/NetworkProcess.cpp: Update copyright.  Include
NetworkCache.h since it didn't appear to be included by
NetworkCacheCoders.h.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm: Update copyright.

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

4 years agoLayout tests imported/w3c/web-platform-tests certificates should not be tracked on...
youenn.fablet@crf.canon.fr [Fri, 6 Mar 2015 09:27:15 +0000 (09:27 +0000)]
Layout tests imported/w3c/web-platform-tests certificates should not be tracked on WebKit VCS
https://bugs.webkit.org/show_bug.cgi?id=142083

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* resources/config.json: Replaced the _certs directory by a string to be replaced when copying this file to the web-platform-tests directory.
* web-platform-tests/.gitignore: Updated to stop ignoring _certs.
* web-platform-tests/_certs/01.pem: Removed.
* web-platform-tests/_certs/02.pem: Removed.
* web-platform-tests/_certs/cacert.pem: Removed.
* web-platform-tests/_certs/cakey.pem: Removed.
* web-platform-tests/_certs/index.txt.attr: Removed.
* web-platform-tests/_certs/index.txt.attr.old: Removed.
* web-platform-tests/_certs/index.txt.old: Removed.
* web-platform-tests/_certs/localhost.key: Removed.
* web-platform-tests/_certs/localhost.pem: Removed.
* web-platform-tests/_certs/serial: Removed.
* web-platform-tests/_certs/serial.old: Removed.

Tools:

Modifying on the fly wpt config.json to set the directory where to generate/read certificates as a subfolder of the layout test results folder.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._copy_webkit_test_files):

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

4 years agosetup-git-clone fails due to the failure to download python-irclib-0.4.8
ossy@webkit.org [Fri, 6 Mar 2015 09:23:17 +0000 (09:23 +0000)]
setup-git-clone fails due to the failure to download python-irclib-0.4.8
https://bugs.webkit.org/show_bug.cgi?id=141946

Reviewed by Ryosuke Niwa.

Check in ircbot.py and irclib.py to avoid network problems in the future.

* Scripts/webkitpy/common/net/irc/ircbot.py:
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_irc): Deleted.
* Scripts/webkitpy/thirdparty/__init___unittest.py:
(ThirdpartyTest.test_imports):
* Scripts/webkitpy/thirdparty/irc/__init__.py: Added.
* Scripts/webkitpy/thirdparty/irc/ircbot.py: Added.
* Scripts/webkitpy/thirdparty/irc/irclib.py: Added.

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

4 years agoDashboard: Perf bot status is missing for Apple {Mavericks,Yosemite} Release builds
ddkilzer@apple.com [Fri, 6 Mar 2015 09:20:52 +0000 (09:20 +0000)]
Dashboard: Perf bot status is missing for Apple {Mavericks,Yosemite} Release builds

See also fix to config.json in r181097.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot): Add missing "WK2" to the names of the perf
bots.

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

4 years agorun-jsc-stress-tests should determine the architecture from ELF binaries
ossy@webkit.org [Fri, 6 Mar 2015 09:18:58 +0000 (09:18 +0000)]
run-jsc-stress-tests should determine the architecture from ELF binaries
https://bugs.webkit.org/show_bug.cgi?id=142335

Reviewed by Darin Adler.

* Scripts/run-jsc-stress-tests:

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

4 years agoRename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE} to SOFT_LINK_{CONSTANT,FUNCTION...
ddkilzer@apple.com [Fri, 6 Mar 2015 09:16:19 +0000 (09:16 +0000)]
Rename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE} to SOFT_LINK_{CONSTANT,FUNCTION}_FOR_{HEADER,SOURCE}
<http://webkit.org/b/142177>

Reviewed by Alex Christensen.

* platform/cf/CoreMediaSoftLink.cpp:
- Rename SOFT_LINK_{CONSTANT,FUNCTION}_SOURCE() to
  SOFT_LINK_{CONSTANT,FUNCTION}_FOR_SOURCE().
* platform/cf/CoreMediaSoftLink.h:
- Rename SOFT_LINK_{CONSTANT,FUNCTION}_HEADER() to
  SOFT_LINK_{CONSTANT,FUNCTION}_FOR_HEADER().

* platform/mac/SoftLinking.h:
* platform/win/SoftLinking.h:
- Rename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE}() to
  SOFT_LINK_{CONSTANT,FUNCTION}_FOR_{HEADER,SOURCE}().

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

4 years ago[CSS Grid Layout] ASSERTION FAILED !track.growthLimitIsInfinite() in RenderGrid:...
svillar@igalia.com [Fri, 6 Mar 2015 08:55:53 +0000 (08:55 +0000)]
[CSS Grid Layout] ASSERTION FAILED !track.growthLimitIsInfinite() in RenderGrid::computeUsedBreadthOfGridTracks
https://bugs.webkit.org/show_bug.cgi?id=142265

Reviewed by Darin Adler.

Source/WebCore:

 The problem is that computeUsedBreadthOfGridTracks() could return
-1 for rows because we're calling computeContentLogicalHeight()
which can indeed return -1. In those cases we should clamp the
value to 0 the same as Flexbox does otherwise we could end up with
a negative value in the min track sizing function.

Test: fast/css-grid-layout/grid-indefinite-calculated-height-crash.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):

LayoutTests:

New test that crashes on Debug builds if we don't handle the case
of computeUsedBreadthOfGridTracks() returning -1.

* fast/css-grid-layout/grid-indefinite-calculated-height-crash-expected.txt: Added.
* fast/css-grid-layout/grid-indefinite-calculated-height-crash.html: Added.

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

4 years agoMove disk cache classes to namespace
antti@apple.com [Fri, 6 Mar 2015 08:00:22 +0000 (08:00 +0000)]
Move disk cache classes to namespace
https://bugs.webkit.org/show_bug.cgi?id=142339

Reviewed by Anders Carlsson.

Move everything to NetworkCache namespace.

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

4 years agoAllow tree dumping functions to be used in release builds by switching a flag
simon.fraser@apple.com [Fri, 6 Mar 2015 06:19:30 +0000 (06:19 +0000)]
Allow tree dumping functions to be used in release builds by switching a flag
https://bugs.webkit.org/show_bug.cgi?id=142379

Reviewed by Zalan Bujtas.

There are various tree dumping functions that are useful for debugging, and sometimes
you want to be able to use them in release builds. Currently they are surrounded by
in config.h

* config.h:
* dom/DocumentMarkerController.cpp:
* dom/DocumentMarkerController.h:
* dom/Element.cpp:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
* dom/Position.h:
* dom/Range.cpp:
* dom/Range.h:
* dom/Text.cpp:
* dom/Text.h:
* rendering/CounterNode.cpp:
* rendering/CounterNode.h:
* rendering/InlineBox.cpp:
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
* rendering/InlineTextBox.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
* rendering/RenderCounter.cpp:
* rendering/RenderCounter.h:
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::CompositingState::CompositingState):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h: showTreeCharacterOffset was unused.
* rendering/RootInlineBox.cpp:
* rendering/RootInlineBox.h:
* rendering/SimpleLineLayoutFunctions.cpp:
* rendering/SimpleLineLayoutFunctions.h:
* rendering/svg/SVGResources.cpp:
* rendering/svg/SVGResources.h:

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

4 years agoREGRESSION(r180924): ASSERTION FAILED: !from.isEmpty() in WebCore::TransformationMatr...
carlosgc@webkit.org [Fri, 6 Mar 2015 06:16:04 +0000 (06:16 +0000)]
REGRESSION(r180924): ASSERTION FAILED: !from.isEmpty() in WebCore::TransformationMatrix::rectToRect
https://bugs.webkit.org/show_bug.cgi?id=142345

Reviewed by Martin Robinson.

This was caused by r180924 that postpones the creation of the
TextureMapper, which could cause that a layer has not yet a size
when TextureMapper::paint() is called. This patch moves the
creation of the TextureMapper to
LayerTreeHostGtk::setNativeSurfaceHandleForCompositing(), so that
it's created as soon as it's possible to create. This method is
called by the drawing area right after creating the
LayerTreeHostGtk if it already have a handler, or when the handle
is received from the UI process.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize): Remove the
nsureTextureMapper call because at this point the layer context ID
is always 0, so it's impossible to create the TextureMapper.
(WebKit::LayerTreeHostGtk::compositeLayersToContext): Remove the
ensureTextureMapper call from here too, since at this point, if we
have a context, we should also have a TextureMapper. Add an ASSERT
right before using the TextureMapper.
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
Create the TextureMapper here.
(WebKit::LayerTreeHostGtk::ensureTextureMapper): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

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

4 years ago[Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
bfulgham@apple.com [Fri, 6 Mar 2015 05:17:53 +0000 (05:17 +0000)]
[Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
https://bugs.webkit.org/show_bug.cgi?id=142351
<rdar://problem/20058023>

Reviewed by Dean Jackson.

This problem was caused by incorrectly starting a new snapping animation timer when the
"end momentum" phase event had been received. This caused WebKit to recalculate the
animation curve for the remaining distance, resulting in the bad animation behavior.

Removing this incorrect start animation command when entering the momentum ended state
resolves the problem.

* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Remove the command to
start a new snap animation when entering the "end momentum" state.

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

4 years agoUse std::unique_ptr instead of PassOwnPtr|OwnPtr for ResourceRequest
commit-queue@webkit.org [Fri, 6 Mar 2015 04:48:55 +0000 (04:48 +0000)]
Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=142349

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

No new tests, no behavior changes.

* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromSessionCaches):
* platform/CrossThreadCopier.h:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::adopt):
(WebCore::ResourceRequestBase::copyData):
* platform/network/ResourceRequestBase.h:
* platform/network/cf/ResourceRequest.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/curl/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):
* platform/network/soup/ResourceRequest.h:
(WebCore::ResourceRequest::doPlatformCopyData):
(WebCore::ResourceRequest::doPlatformAdopt):

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

4 years ago[Win] Give up on Attachment testing.
bfulgham@apple.com [Fri, 6 Mar 2015 04:48:22 +0000 (04:48 +0000)]
[Win] Give up on Attachment testing.

Just skip Attachments until they settle down. Also document more debug assertions.

* platform/win/TestExpectations:

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

4 years agoBlock mixed mode content
oliver@apple.com [Fri, 6 Mar 2015 04:43:12 +0000 (04:43 +0000)]
Block mixed mode content
https://bugs.webkit.org/show_bug.cgi?id=142378

Reviewed by Darin Adler.

Source/WebCore:

Switched to blocking mixed mode content by default,
and modify the blocking rules to allow us to match
the behaviours of other browsers.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::canDisplayInsecureContent):
(WebCore::MixedContentChecker::canRunInsecureContent):
(WebCore::MixedContentChecker::logWarning):
* loader/MixedContentChecker.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::contentTypeFromResourceType):
(WebCore::CachedResourceLoader::checkInsecureContent):
* page/Settings.in:

LayoutTests:

Update test results to reflect the new reality.

* http/tests/security/mixedContent/insecure-css-in-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-css-in-main-frame-expected.txt:
* http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/insecure-image-in-main-frame-expected.txt:
* http/tests/security/mixedContent/insecure-plugin-in-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt:
* http/tests/security/mixedContent/insecure-xhr-in-main-frame.html:
* http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame.html:
* http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt:
* http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html:
* http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe-expected.txt:
* http/tests/security/mixedContent/resources/frame-with-insecure-frame.html:
* http/tests/security/mixedContent/resources/frame-with-redirect-http-to-https-frame.html:
* http/tests/security/mixedContent/resources/frame-with-redirect-https-to-http-frame.html:
* http/tests/xmlhttprequest/access-control-response-with-body.html:

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

4 years agoDocument::recalcStyle() shouldn't call viewportContentsChanged() if there is a pendin...
cdumez@apple.com [Fri, 6 Mar 2015 04:38:01 +0000 (04:38 +0000)]
Document::recalcStyle() shouldn't call viewportContentsChanged() if there is a pending layout
https://bugs.webkit.org/show_bug.cgi?id=142140

Reviewed by Darin Adler.

Stop calling FrameView::viewportContentsChanged() in Document::recalcStyle()
if there is a layout pending to avoid doing unncessary work. If there is a
layout pending, we don't need to do anything because viewportContentsChanged()
will be called after layout.

We only need to call FrameView::viewportContentsChanged() in
Document::recalcStyle() if a style recalc does not cause a layout. For e.g.
a '-webkit-transform' could make an animated GIF visible without causing a
layout, in which case we need to resume the animated GIF after style recalc.

No new tests, already covered by:
fast/images/animated-gif-webkit-transform.html

* dom/Document.cpp:
(WebCore::Document::recalcStyle):

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

4 years agonew layout test http/tests/usercontentfilter/character-set-basic-support.html fails
benjamin@webkit.org [Fri, 6 Mar 2015 04:37:27 +0000 (04:37 +0000)]
new layout test http/tests/usercontentfilter/character-set-basic-support.html fails
https://bugs.webkit.org/show_bug.cgi?id=142376

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-05

* http/tests/contentextensions/character-set-basic-support-expected.txt: Copied from LayoutTests/http/tests/usercontentfilter/character-set-basic-support-expected.txt.
* http/tests/contentextensions/character-set-basic-support.html: Copied from LayoutTests/http/tests/usercontentfilter/character-set-basic-support.html.
* http/tests/contentextensions/character-set-basic-support.html.json: Copied from LayoutTests/http/tests/usercontentfilter/character-set-basic-support.html.json.
* http/tests/contentextensions/resources: Copied from LayoutTests/http/tests/usercontentfilter/resources.
* http/tests/usercontentfilter: Removed.
* http/tests/usercontentfilter/character-set-basic-support-expected.txt: Removed.
* http/tests/usercontentfilter/character-set-basic-support.html: Removed.
* http/tests/usercontentfilter/character-set-basic-support.html.json: Removed.
* http/tests/usercontentfilter/resources: Removed.
* http/tests/usercontentfilter/resources/url-blocking-test.js: Removed.

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

4 years ago[iOS] TestExpectations for ios-simulator-wk2 should fall back to 'wk2' after 'ios...
ddkilzer@apple.com [Fri, 6 Mar 2015 04:04:29 +0000 (04:04 +0000)]
[iOS] TestExpectations for ios-simulator-wk2 should fall back to 'wk2' after 'ios-simulator'
<http://webkit.org/b/142226>

Reviewed by Darin Adler.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.default_baseline_search_path): Switch the
TestExpectations order of ios-simulator-wk2 from this:
  ios-simulator-wk2, wk2, ios-simulator
To this:
  ios-simulator-wk2, ios-simualtor, wk2

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

4 years agoUnreviewed Test Fix: Remove unnecessary reference to "window" causing test failure.
joepeck@webkit.org [Fri, 6 Mar 2015 03:41:16 +0000 (03:41 +0000)]
Unreviewed Test Fix: Remove unnecessary reference to "window" causing test failure.

* js/object-literal-shorthand-construction-expected.txt:
* js/script-tests/object-literal-shorthand-construction.js:

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

4 years agoMark http/tests/usercontentfilter/character-set-basic-support.html as failing.
slewis@apple.com [Fri, 6 Mar 2015 02:58:33 +0000 (02:58 +0000)]
Mark http/tests/usercontentfilter/character-set-basic-support.html as failing.
https://bugs.webkit.org/show_bug.cgi?id=142376

Unreviewed.

* TestExpectations:

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

4 years ago[Win] Provide tiered logging from MSBuild -- Errors on top, Warnings after
bfulgham@apple.com [Fri, 6 Mar 2015 01:39:28 +0000 (01:39 +0000)]
[Win] Provide tiered logging from MSBuild -- Errors on top, Warnings after
https://bugs.webkit.org/show_bug.cgi?id=142370

Reviewed by Dean Jackson.

* Scripts/webkitdirs.pm:
(buildVisualStudioProject): Tell MSBuild to output log files to two separate
logs, one for warnings, the other for errors.
* win/AssembleBuildLogs/AssembleLogs.cmd: Combine the error and warning logs
into the standard BuildOutput.htm document.

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

4 years ago[iOS Media] Web video on iPad appears black and missing the AirPlay placard when...
dino@apple.com [Fri, 6 Mar 2015 01:31:14 +0000 (01:31 +0000)]
[iOS Media] Web video on iPad appears black and missing the AirPlay placard when connected to an AirPlay route
https://bugs.webkit.org/show_bug.cgi?id=142373
<rdar://problem/19866072>

Reviewed by Brent Fulgham.

There was no style for the placard, which meant it had
zero height (and thus was invisible).

* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-wireless-playback-status): Added.
(audio::-webkit-media-controls-wireless-playback-status.hidden):

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

4 years agoAdjust volume box to not intersect with rest of inline media controls on OSX.
roger_fong@apple.com [Fri, 6 Mar 2015 01:29:49 +0000 (01:29 +0000)]
Adjust volume box to not intersect with rest of inline media controls on OSX.
https://bugs.webkit.org/show_bug.cgi?id=142372.
<rdar://problem/20064327>

Reviewed by Brent Fulgham.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel .volume-box):
(audio::-webkit-media-controls-panel .volume-box:active):

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

4 years agoSource/JavaScriptCore:
commit-queue@webkit.org [Fri, 6 Mar 2015 01:16:25 +0000 (01:16 +0000)]
Source/JavaScriptCore:
ES6: Object Literal Extensions - Shorthand Properties (Identifiers)
https://bugs.webkit.org/show_bug.cgi?id=142353

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-05
Reviewed by Geoffrey Garen.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseProperty):
Parsing an identifier property followed by a comma or end brace treat
as a shorthand property and create a property that has the same
property name as the identifier name and value of a variable with that
identifier. Otherwise, fall through to getter/setter parsing.

LayoutTests:
Web Inspector: Follow-up fixes to ObjectTreeBaseTreeElement
https://bugs.webkit.org/show_bug.cgi?id=142367

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-05
Reviewed by Geoffrey Garen.

* js/object-literal-shorthand-construction-expected.txt: Added.
* js/object-literal-shorthand-construction.html: Added.
* js/script-tests/object-literal-shorthand-construction.js: Added.
(equivalent):
(testShorthandConstructionEquivalent):
(testShorthandConstructionNotEquivalent):
Tests specifically for new literal construction with shorthands.

* sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt:
* sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt:
* sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt:
These tests use object literal shorthand construction syntax and expected
failures. The tests now fail differently, so just rebase their results.

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

4 years agoImplement new fullscreen media controls on Mac.
roger_fong@apple.com [Fri, 6 Mar 2015 00:52:55 +0000 (00:52 +0000)]
Implement new fullscreen media controls on Mac.
https://bugs.webkit.org/show_bug.cgi?id=142355.
<rdar://problem/16175787>
Reviewed by Dean Jackson.
Adjust sizes and positioning of all fullscreen media control elements.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-fullscreen-button.exit): Update to match entering fullscreen button.
(video:-webkit-full-screen::-webkit-media-controls-panel):
(video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider):
(video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
(video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
(video:-webkit-full-screen::-webkit-media-controls-play-button):
(video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
(video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
(video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
(video:-webkit-full-screen::-webkit-media-controls-timeline-container):
(video:-webkit-full-screen::-webkit-media-controls-current-time-display):
(video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
(audio:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb): Deleted.
(video:-webkit-full-screen::-webkit-media-controls-rewind-button): Deleted. Not used in full screen.

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

4 years agoWeb Inspector: Follow-up fixes to ObjectTreeBaseTreeElement
commit-queue@webkit.org [Fri, 6 Mar 2015 00:49:53 +0000 (00:49 +0000)]
Web Inspector: Follow-up fixes to ObjectTreeBaseTreeElement
https://bugs.webkit.org/show_bug.cgi?id=142367

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

* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.propertyPathType):
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
(WebInspector.ObjectTreeSetIndexTreeElement.prototype.resolvedValuePropertyPath):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):

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

4 years ago<attachment> should allow the title property to override its title
timothy_horton@apple.com [Fri, 6 Mar 2015 00:46:25 +0000 (00:46 +0000)]
<attachment> should allow the title property to override its title
https://bugs.webkit.org/show_bug.cgi?id=142369

Reviewed by Anders Carlsson.

Test: fast/attachment/attachment-title.html

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::parseAttribute):
Invalidate the attachment if the title changes.

(WebCore::HTMLAttachmentElement::attachmentTitle):
Use the title attribute for the title, unless it's empty, in which
case we'll use the file's name.

* html/HTMLAttachmentElement.h:
* rendering/RenderThemeMac.mm:
(WebCore::AttachmentLayout::layOutTitle):
Use attachmentTitle() instead of reaching into the file. Also rename
some things from filename to title.

* fast/attachment/attachment-title.html: Added.
* platform/mac/fast/attachment/attachment-title-expected.png: Added.
* platform/mac/fast/attachment/attachment-title-expected.txt: Added.
Add a test for the title property.

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

4 years agoWeb Inspector: console.debug/info should show up in Log Console Filter
commit-queue@webkit.org [Fri, 6 Mar 2015 00:44:38 +0000 (00:44 +0000)]
Web Inspector: console.debug/info should show up in Log Console Filter
https://bugs.webkit.org/show_bug.cgi?id=142300

Patch by Tobias Reiss <tobi+webkit@basecode.de> on 2015-03-05
Reviewed by Joseph Pecoraro.

Add WebInspector.ConsoleMessage.MessageLevel.Debug case that allows console.debug/info
to show up in Log Console Filter.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._filterMessages):

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

4 years agoDashboard has trouble parsing iOS test output
ddkilzer@apple.com [Fri, 6 Mar 2015 00:40:15 +0000 (00:40 +0000)]
Dashboard has trouble parsing iOS test output
<http://webkit.org/b/142364>

Reviewed by Alex Christensen.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTestResults.js:
(BuildbotTestResults.prototype._parseResults.resultSummarizer):
Add fallback path to build a regex using 'matchString' so that
it matches anywhere in the line.  In practice, 'matchString' is
a prefix for the label following the number.

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

4 years agoTwo text carets result when dragging a file into a contentEditable area that preventD...
timothy_horton@apple.com [Fri, 6 Mar 2015 00:36:37 +0000 (00:36 +0000)]
Two text carets result when dragging a file into a contentEditable area that preventDefault()s the "drop" event
https://bugs.webkit.org/show_bug.cgi?id=142362
<rdar://problem/20046434>

Reviewed by Simon Fraser.

* page/DragController.h:
* page/DragController.cpp:
(WebCore::DragController::clearDragCaret):
Rename cancelDrag to clearDragCaret, since that's really what it does.

(WebCore::DragController::tryDocumentDrag):
When updating the drag position, if we're now over a <input type="file">,
clear the drag caret. This avoids leaving a caret behind when dragging
over a <input type="file"> inside a contentEditable area.

(WebCore::DragController::performDragOperation):
When the content preventDefault()s while finishing a drag, we should still
clear the drag caret, because it's possible that the client did not
preventDefault() on dragover/etc., so we would have set a cursor, and
now need to clear it so that it doesn't get left behind.

(WebCore::DragController::mouseMovedIntoDocument):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::concludeEditDrag):
Adjust to renamed clearDragCaret.

(WebCore::DragController::dragEnded):
Make use of clearDragCaret (which is equivalent to this line).

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

4 years ago<attachment> should support indication of download progress
timothy_horton@apple.com [Fri, 6 Mar 2015 00:34:25 +0000 (00:34 +0000)]
<attachment> should support indication of download progress
https://bugs.webkit.org/show_bug.cgi?id=142336
<rdar://problem/19982504>

Reviewed by Anders Carlsson.

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::parseAttribute):
Invalidate the attachment if the progress attribute changes.

* platform/graphics/FloatRoundedRect.h:
(WebCore::FloatRoundedRect::Radii::Radii):
Add a Radii constructor that takes a single argument that is used
as the radius for all corners, for convenience.

* rendering/RenderThemeMac.mm:
(WebCore::attachmentProgressBarBackgroundColor):
(WebCore::attachmentProgressBarFillColor):
(WebCore::attachmentProgressBarBorderColor):
Add a bunch of constants for the progress bar.

(WebCore::paintAttachmentIconBackground):
Make use of fillRoundedRect instead of creating a path.

(WebCore::paintAttachmentProgress):
(WebCore::RenderThemeMac::paintAttachment):
Paint a progress bar if the progress attribute exists and
is a valid floating point number.

* fast/attachment/attachment-progress.html: Added.
* platform/mac/fast/attachment/attachment-progress-expected.png: Added.
* platform/mac/fast/attachment/attachment-progress-expected.txt: Added.
* platform/mac-mavericks/fast/attachment/attachment-progress-expected.txt: Added.
Add a test for the <attachment> progress attribute.

* platform/mac/fast/attachment/attachment-rendering-expected.png:
Rebaseline a test that changed in r181058 (and will change again!), but
which didn't start failing because the pixel test tolerance is such that
it only fails the hash check and not the test itself.

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

4 years agoFix linker warnings in TestWebKitAPI.
commit-queue@webkit.org [Fri, 6 Mar 2015 00:29:24 +0000 (00:29 +0000)]
Fix linker warnings in TestWebKitAPI.
https://bugs.webkit.org/show_bug.cgi?id=141912

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-05
Reviewed by David Kilzer.

* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
Do not export TearDownTestCase or SetUpTestCase symbols.

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

4 years ago[Win] Unreviewed EWS fix.
bfulgham@apple.com [Fri, 6 Mar 2015 00:21:10 +0000 (00:21 +0000)]
[Win] Unreviewed EWS fix.

* Scripts/webkitdirs.pm:
(buildVisualStudioProject): Dial logging back to 'ErrorsOnly' to see if that makes
the EWS output more usable.

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

4 years agoUnreviewed, rolling out r180846.
commit-queue@webkit.org [Thu, 5 Mar 2015 23:58:53 +0000 (23:58 +0000)]
Unreviewed, rolling out r180846.
https://bugs.webkit.org/show_bug.cgi?id=142368

Caused missing image banners in iTunes store pages (Requested
by smfr on #webkit).

Reverted changeset:

"FrameView::layoutTimerFired() should update style if needed
before doing layout"
https://bugs.webkit.org/show_bug.cgi?id=141688
http://trac.webkit.org/changeset/180846

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

4 years agoFix the build when NEON_INTRINSICS is enabled
commit-queue@webkit.org [Thu, 5 Mar 2015 23:56:25 +0000 (23:56 +0000)]
Fix the build when NEON_INTRINSICS is enabled
https://bugs.webkit.org/show_bug.cgi?id=142361

Patch by Sandy Perez <sperez@indaba.es> on 2015-03-05
Reviewed by Csaba Osztrogonác.

* platform/graphics/cpu/arm/filters/FEBlendNEON.h:
(WebCore::FEBlend::platformApplySoftware):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::standardBoxBlur):

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

4 years agoAdd basic support for character sets to the URL Filter parser
benjamin@webkit.org [Thu, 5 Mar 2015 23:47:21 +0000 (23:47 +0000)]
Add basic support for character sets to the URL Filter parser
https://bugs.webkit.org/show_bug.cgi?id=142257

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

Source/WebCore:

This patch is a first step toward making the URL filter parser a bit
more powerful: it adds support for character set atom.

I did not attempt to integrate that into the prefix tree in this patch,
instead, the GraphBuilder gets a two modes of generating the NFA:
PrefixTree and DirectGeneration.

As long as we only see trivial atoms, we use the PrefixTree generation
to minimize the number of nodes we need. As soon as we start a character
class, we switch to DirectGeneration and we generate the NFA from the input
without merging with previously seen patterns.

To differentiate between Trivial atoms and CharacterSet, we also gain
an AtomType state.

The character set themself are very simple: each character is represented by
a bit in a 16bytes bit vector.

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::quantifyTrivialAtom):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::GraphBuilder::atomBackReference):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassEnd):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
(WebCore::ContentExtensions::GraphBuilder::sinkAtom):
(WebCore::ContentExtensions::GraphBuilder::generateTransition):
(WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
(WebCore::ContentExtensions::GraphBuilder::sinkCharacterSet):
(WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):

LayoutTests:

* http/tests/usercontentfilter/character-set-basic-support-expected.txt: Added.
* http/tests/usercontentfilter/character-set-basic-support.html: Added.
* http/tests/usercontentfilter/character-set-basic-support.html.json: Added.
* http/tests/usercontentfilter/resources/url-blocking-test.js: Added.

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

4 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Thu, 5 Mar 2015 23:37:31 +0000 (23:37 +0000)]
[Win] Unreviewed gardening.

Confirmed with JSC that warning 4611 (interaction between '_setjmp' and C++ object
destruction is non-portable) should be ignored in the JavaScriptCore project.

* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: Silence warning 4611.

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

4 years agoRegression(r173761): ASSERTION FAILED: !is8Bit() in StringImpl::characters16()
benjamin@webkit.org [Thu, 5 Mar 2015 23:34:56 +0000 (23:34 +0000)]
Regression(r173761): ASSERTION FAILED: !is8Bit() in StringImpl::characters16()
https://bugs.webkit.org/show_bug.cgi?id=142350

Patch by Chris Dumez <cdumez@apple.com> on 2015-03-05
Reviewed by Michael Saboff and Benjamin Poulain.

Source/JavaScriptCore:

Call WTFString::hasInfixStartingAt() / hasInfixEndingAt() now that these
methods have been renamed for clarity.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncStartsWith):
(JSC::stringProtoFuncEndsWith):

Source/WTF:

Fix ASSERTION FAILED: !is8Bit() in StringImpl::characters16() from
WTF::equalInner() after r173761. The code was incorrectly assuming that
if stringImpl is 16-bit, then matchString is 16-bit too, which is not
correct.

Also rename WTFString::startsWith() / endsWith() taking an offset to
hasInfixStartingAt() / hasInfixEndingAt() for clarity. It seems odd
to call it startsWith even though it won't technically *start* with
the pattern if the input offset is greater than zero.

Also drop the caseSensitive argument as it is never used (always true
at call sites.

* wtf/text/StringImpl.cpp:
(WTF::equalInner):
(WTF::StringImpl::hasInfixStartingAt):
(WTF::StringImpl::hasInfixEndingAt):
(WTF::StringImpl::startsWith): Deleted.
(WTF::StringImpl::endsWith): Deleted.
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
(WTF::String::hasInfixStartingAt):
(WTF::String::hasInfixEndingAt):
(WTF::String::startsWith): Deleted.
(WTF::String::endsWith): Deleted.

Tools:

Add API test for WTFString::hasInfixStartingAt() to make sure it doesn't
crash if the string is 8-bit but the pattern is 16-bit (and vice-versa).

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

LayoutTests:

Update String.startsWith() / endsWith() test to cover cases where the
input string is 8-bit and the pattern is 16-bit, and vice-versa.

* js/script-tests/string-includes.js:
* js/string-includes-expected.txt:

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

4 years agoMinor touchups to inline media control icons.
roger_fong@apple.com [Thu, 5 Mar 2015 21:54:23 +0000 (21:54 +0000)]
Minor touchups to inline media control icons.
https://bugs.webkit.org/show_bug.cgi?id=142354.
<rdar://problem/20058854>.

Reviewed by Brent Fulgham.

Increase sizes of play/pause and fullscreen buttons slightly.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-play-button.paused):
(audio::-webkit-media-controls-fullscreen-button):

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

4 years agoWKWebView Encoder for remote object communication does not implement encodeInt32...
andersca@apple.com [Thu, 5 Mar 2015 21:41:51 +0000 (21:41 +0000)]
WKWebView Encoder for remote object communication does not implement encodeInt32:forKey:
https://bugs.webkit.org/show_bug.cgi?id=142356
rdar://problem/20058952

Reviewed by Tim Horton.

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

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

4 years ago[Win] Ensure build target directory exists when launching MSBuild
bfulgham@apple.com [Thu, 5 Mar 2015 21:38:14 +0000 (21:38 +0000)]
[Win] Ensure build target directory exists when launching MSBuild
https://bugs.webkit.org/show_bug.cgi?id=142360

Reviewed by Dean Jackson.

Create the build output directory (if it doesn't exist) before
launching MSBuild so that it can immediately begin writing logs.

* Scripts/webkitdirs.pm:
(buildVisualStudioProject):

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

4 years agofix config.json.
lforschler@apple.com [Thu, 5 Mar 2015 21:32:46 +0000 (21:32 +0000)]
fix config.json.

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

4 years agoUpdate inline media control icons for OSX.
roger_fong@apple.com [Thu, 5 Mar 2015 21:09:46 +0000 (21:09 +0000)]
Update inline media control icons for OSX.
https://bugs.webkit.org/show_bug.cgi?id=142305.
<rdar://problem/19997484>

Reviewed by Dean Jackson.

Changes include: new volume button, new full screen button, new play/pause button.
Repositioning of 30 second and play buttons.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel button):
(audio::-webkit-media-controls-rewind-button):
(audio::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-play-button.paused):
(audio::-webkit-media-controls-panel .mute-box):
(video::-webkit-media-controls-volume-max-button):
(video::-webkit-media-controls-volume-min-button):
(audio::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-fullscreen-button):
(audio::-webkit-media-controls-current-time-display):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
(Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
(Controller.prototype.updateVolume): Ditto
* platform/mac/TestExpectations: Skip two failing tests caused by this patch.
See https://bugs.webkit.org/show_bug.cgi?id=142142

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

4 years agoCaps lock indicator lays out in wrong place.
hyatt@apple.com [Thu, 5 Mar 2015 20:27:45 +0000 (20:27 +0000)]
Caps lock indicator lays out in wrong place.

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

4 years agorun-webkit-tests and run-perf-tests should use WebKitTestRunner by default
cdumez@apple.com [Thu, 5 Mar 2015 20:11:04 +0000 (20:11 +0000)]
run-webkit-tests and run-perf-tests should use WebKitTestRunner by default
https://bugs.webkit.org/show_bug.cgi?id=142325

Reviewed by Csaba Osztrogonác.

run-webkit-tests and run-perf-tests now use WebKitTestRunner by default.
As a result, "--webkit-test-runner / -2" parameters are replaced by
"--dump-render-tree / -1" so developers can run DumpRenderTree rather
than WebKitTestRunner.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunWebKit1Tests):
(RunWebKit1Tests.start):
(RunWebKit1LeakTests):
(RunWebKit1LeakTests.start):
(RunAndUploadPerfTestsWebKit1):
(RunAndUploadPerfTestsWebKit1.start):
(TestFactory):
(TestWebKit1LeaksFactory):
(TestWebKit1LeaksFactory.__init__):
(TestWebKit1Factory):
(TestWebKit1AllButJSCFactory):
(TestAllButJSCFactory):
(BuildAndPerfTestWebKit1Factory):
(BuildAndPerfTestWebKit1Factory.__init__):
(BuildAndPerfTestFactory):
(BuildAndPerfTestFactory.__init__):
(DownloadAndPerfTestWebKit1Factory):
(DownloadAndPerfTestWebKit1Factory.__init__):
(DownloadAndPerfTestFactory):
(DownloadAndPerfTestFactory.__init__):
(RunWebKitLeakTests): Deleted.
(RunWebKitLeakTests.start): Deleted.
(RunWebKit2Tests): Deleted.
(RunWebKit2Tests.start): Deleted.
(RunAndUploadPerfTestsWebKit2): Deleted.
(RunAndUploadPerfTestsWebKit2.start): Deleted.
(TestLeaksFactory): Deleted.
(TestLeaksFactory.__init__): Deleted.
(TestWebKit2Factory): Deleted.
(TestWebKit2AndJSCFactory): Deleted.
(BuildAndPerfTestWebKit2Factory): Deleted.
(BuildAndPerfTestWebKit2Factory.__init__): Deleted.
(DownloadAndPerfTestWebKit2Factory): Deleted.
(DownloadAndPerfTestWebKit2Factory.__init__): Deleted.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_build_driver):

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

4 years ago[Win] Switch to MSBuild so we get more useful stdout logging in buildbot
bfulgham@apple.com [Thu, 5 Mar 2015 20:05:20 +0000 (20:05 +0000)]
[Win] Switch to MSBuild so we get more useful stdout logging in buildbot
https://bugs.webkit.org/show_bug.cgi?id=140845

Reviewed by David Kilzer.

Update 'webkitdirs.pm' to locate the MSBuild used with Visual Studio 2013
and generate suitable build commands to drive a full build from our
existing solution files.

* Scripts/webkitdirs.pm:
(msBuildInstallDir): Added.
(determineConfigurationForVisualStudio): Revise to use MSBuild command
line arguments to drive the build.
(setupCygwinEnv): Warn user if MSBuild cannot be located.
(buildVisualStudioProject): Revise to use MSBuild command line arguments
to specify build architecture.
* win/AssembleBuildLogs/AssembleLogs.cmd: MSBuild doesn't produce individual
output logs, so don't attempt to consolidate them. Also: Drive-by fix: Don't
bother looking for CoreUI or SafariTheme build logs.

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

4 years ago[iOS Media] Use a blurry background for media controls
dino@apple.com [Thu, 5 Mar 2015 19:52:10 +0000 (19:52 +0000)]
[iOS Media] Use a blurry background for media controls
https://bugs.webkit.org/show_bug.cgi?id=142316
<rdar://problem/14911098>

Reviewed by Eric Carlson.

Start using the -webkit-appearance media-controls-light-bar-background
in order to get the blurry background of media controls.

* Modules/mediacontrols/mediaControlsApple.js: Keep the panel and the
panel background in sync when it comes to hiding and showing. It would
be better if this could be done on a container element in the future.
(Controller.prototype.handlePanelTransitionEnd):
(Controller.prototype.setPlaying):
(Controller.prototype.showControls):
(Controller.prototype.hideControls):

* Modules/mediacontrols/mediaControlsiOS.css: New background container
with the special appearance. I also renamed "composited-parent" to
"container", which makes more sense.
(video::-webkit-media-controls-panel-container):
(audio::-webkit-media-controls-panel-container):
(video::-webkit-media-controls-panel-background):
(audio::-webkit-media-controls-panel-background):
(video::-webkit-media-controls-panel-background.paused):
(video::-webkit-media-controls-panel):
(audio::-webkit-media-controls-panel):
(video::-webkit-media-controls-panel.paused):
(audio::-webkit-media-controls-optimized-fullscreen-button):
(audio::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
(video::-webkit-media-controls-panel-composited-parent): Deleted.
(video::-webkit-media-controls-panel:hover): Deleted.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createControls): Create the new background element.
(ControllerIOS.prototype.addControls):
(ControllerIOS.prototype.set pageScaleFactor): Temporarily disable
this because the background disappears when the zoom factor
is too high - we start tiling the background. This will be addressed
by https://bugs.webkit.org/show_bug.cgi?id=142317.

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

4 years agoMechanical text-related cleanup
mmaxfield@apple.com [Thu, 5 Mar 2015 19:51:05 +0000 (19:51 +0000)]
Mechanical text-related cleanup
https://bugs.webkit.org/show_bug.cgi?id=142326

Reviewed by Andreas Kling.

Use nullptr instead of 0.
Use references instead of pointers.

No new tests because there is no behavior change.

* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::adjustSelectionRectForComplexText):
(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
(WebCore::FontCascade::floatWidthForComplexText):
(WebCore::FontCascade::offsetForPositionForComplexText):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::TextLayout):
(WebCore::ComplexTextController::ComplexTextController):
* platform/graphics/mac/ComplexTextController.h:
* rendering/InlineIterator.h:
(WebCore::InlineIterator::InlineIterator):
(WebCore::InlineIterator::clear):
(WebCore::bidiNextShared):
(WebCore::bidiNextSkippingEmptyInlines):
(WebCore::bidiNextIncludingEmptyInlines):
(WebCore::InlineWalker::InlineWalker):
(WebCore::InlineIterator::increment):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::measureHyphenWidth):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):

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

4 years agoWeb Inspector: Add ObjectTreeBaseTreeElement to share functionality
commit-queue@webkit.org [Thu, 5 Mar 2015 19:40:07 +0000 (19:40 +0000)]
Web Inspector: Add ObjectTreeBaseTreeElement to share functionality
https://bugs.webkit.org/show_bug.cgi?id=142323

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

By making this change:

  - Share lots of duplicated code.
  - Array / Set / Map tree elements get context menu support

* UserInterface/Main.html:
* UserInterface/Views/ObjectTreeBaseTreeElement.js: Added.
(WebInspector.ObjectTreeBaseTreeElement):
(WebInspector.ObjectTreeBaseTreeElement.prototype.get property):
(WebInspector.ObjectTreeBaseTreeElement.prototype.get propertyPath):
(WebInspector.ObjectTreeBaseTreeElement.prototype.oncontextmenu):
(WebInspector.ObjectTreeBaseTreeElement.prototype.resolvedValue):
(WebInspector.ObjectTreeBaseTreeElement.prototype.resolvedValuePropertyPath):
(WebInspector.ObjectTreeBaseTreeElement.prototype.thisPropertyPath):
(WebInspector.ObjectTreeBaseTreeElement.prototype.hadError):
(WebInspector.ObjectTreeBaseTreeElement.prototype.propertyPathType):
(WebInspector.ObjectTreeBaseTreeElement.prototype.propertyPathString):
(WebInspector.ObjectTreeBaseTreeElement.prototype.createInteractiveGetterElement):
(WebInspector.ObjectTreeBaseTreeElement.prototype.createReadOnlyIconElement):
New file, copying most of the code from PropertyTreeElement so it can be shared.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
(WebInspector.ObjectTreeArrayIndexTreeElement):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype.invokedGetter):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype.get property): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValue): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathType): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._resolvedValuePropertyPath): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._thisPropertyPath): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._propertyPathString): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._updateTitle): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createInteractiveGetterElement.): Deleted.
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._createReadOnlyIconElement): Deleted.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype.invokedGetter):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTooltips):
(WebInspector.ObjectTreePropertyTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._alwaysDisplayAsProperty):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildrenInternal):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
(WebInspector.ObjectTreePropertyTreeElement.prototype.get property): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype.oncontextmenu): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._propertyPathType): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement.): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._createReadOnlyIconElement): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype): Deleted.
Subclass ObjectTreeBaseTreeElement and eliminate the code now
automatically handled by the base class.

* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.resolvedValue):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeMapEntryTreeElement.prototype._propertyPathString): Deleted.
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
(WebInspector.ObjectTreeSetIndexTreeElement):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype.resolvedValue):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._resolvedValuePropertyPath): Deleted.
Override resolved value since these are not about PropertyDescriptors.
This will make context menus work automatically.

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

4 years ago[buildbot] mastercfg_unittest.py should be runnable easily
ossy@webkit.org [Thu, 5 Mar 2015 19:32:51 +0000 (19:32 +0000)]
[buildbot] mastercfg_unittest.py should be runnable easily
https://bugs.webkit.org/show_bug.cgi?id=142219

Reviewed by Chris Dumez.

Buildbot 0.8.6p1 runs on build.webkit org with Twisted 12.1.0, which is
the last Twisted version works together with this buildbot version.

* Scripts/webkitpy/common/system/autoinstall.py:
(AutoInstaller): Added prepend_to_search_path argument to be able
to prefer autoinstalled package to system package.
(AutoInstaller.__init__):
(AutoInstaller._set_up_target_dir):
(AutoInstaller._extract_tar): Renamed from _extract_targz, now it works with tar.bz2 too.
(AutoInstaller._prepare_package):
(AutoInstaller._extract_targz): Renamed to _extract_tar.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_buildbot): Autoinstall Twisted 12.1.0.

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

4 years agoMove AxisScrollSnapAnimator logic to ScrollController
bfulgham@apple.com [Thu, 5 Mar 2015 19:32:27 +0000 (19:32 +0000)]
Move AxisScrollSnapAnimator logic to ScrollController
https://bugs.webkit.org/show_bug.cgi?id=142293
<rdar://problem/20039867>

Reviewed by Dean Jackson.

No change in function.

Move the animation logic out of 'AxisScrollSnapAnimator' into 'ScrollController'. Rename the remaining
bits of 'AxisScrollSnapAnimator' as 'ScrollSnapAnimatorState'. Remove a number of delegate methods required
by 'AxisScrollSnapAnimatorClient' that are no longer needed.

Also, break up some of the Scroll Snap Point math to be a little easier to understand.

* WebCore.xcodeproj/project.pbxproj: Rename 'platform/mac/AxisScrollSnapAnimator.{h,mm}' -> 'platform/cocoa/ScrollSnapAnimatorState.h'
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Mark 'scrollOffsetOnAxis' as const.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Make 'const'
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scrollOffsetOnAxis): Make 'const'
* platform/ScrollAnimator.h:
* platform/cocoa/ScrollController.h: No longer subclass from AxisScrollSnapAnimatorClient.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::scrollSnapPointState): Added accessors (const and non-const) for the individual
Scroll Snap State of each axis.
(WebCore::toWheelEventStatus): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Added helper function containing the snap wheel handler code
from AxisScrollSnapAnimator.
(WebCore::ScrollController::shouldOverrideWheelEvent): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::processWheelEventForScrollSnap): Update to use new methods moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::updateScrollAnimatorsAndTimers): Update for new ScrollSnapAnimatorState class.
(WebCore::ScrollController::updateScrollSnapPoints): Ditto.
(WebCore::ScrollController::startScrollSnapTimer): Call client (delegate) method.
(WebCore::ScrollController::stopScrollSnapTimer): Ditto.
(WebCore::ScrollController::horizontalScrollSnapTimerFired): Call new 'scrollSnapAnimationUpdate' method passing the
correct axis to animate.
(WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
(WebCore::ScrollController::scrollSnapAnimationUpdate): Moved from AxisScrollSnapAnimator.
(WebCore::projectedInertialScrollDistance): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::initializeGlideParameters): Ditto.
(WebCore::ScrollController::beginScrollSnapAnimation): Ditto.
(WebCore::ScrollController::endScrollSnapAnimation): Ditto.
(WebCore::snapProgress): Created a new function for this calculation to make reasoning about the 'computeSnapDelta' and
'computeGlideDelta' easier.
(WebCore::clampedSnapMagnitude): Ditto.
(WebCore::ScrollController::computeSnapDelta): Moved from AxisScrollSnapAnimator.
(WebCore::snapGlide): Created a new function for this calculation to make reasoning about the 'computeGlideDelta' easier.
(WebCore::ScrollController::computeGlideDelta): Moved from AxisScrollSnapAnimator.
(WebCore::ScrollController::scrollOffsetOnAxis): Deleted.
(WebCore::ScrollController::immediateScrollOnAxis): Deleted.
* platform/cocoa/ScrollSnapAnimatorState.h: Copied from platform/mac/AxisScrollSnapAnimator.h.
(WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient): Deleted.
* platform/cocoa/ScrollSnapAnimatorState.mm: Copied from platform/mac/AxisScrollSnapAnimator.mm.
(WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState):
(WebCore::ScrollSnapAnimatorState::pushInitialWheelDelta):
(WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta):
(WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow):
(WebCore::toWheelEventStatus): Deleted.
(WebCore::projectedInertialScrollDistance): Deleted.
(WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Deleted.
(WebCore::AxisScrollSnapAnimator::handleWheelEvent): Deleted.
(WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Deleted.
(WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Deleted.
(WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Deleted.
(WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation): Deleted.
(WebCore::AxisScrollSnapAnimator::computeSnapDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::computeGlideDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::initializeGlideParameters): Deleted.
(WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta): Deleted.
(WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow): Deleted.
* platform/mac/AxisScrollSnapAnimator.h: Removed.
* platform/mac/AxisScrollSnapAnimator.mm: Removed.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::pinnedInDirection): Removed.

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

4 years agoNetworkCache efficacy logging is using too much CPU
cdumez@apple.com [Thu, 5 Mar 2015 18:59:57 +0000 (18:59 +0000)]
NetworkCache efficacy logging is using too much CPU
https://bugs.webkit.org/show_bug.cgi?id=142186
<rdar://problem/19632080>

Reviewed by Antti Koivisto.

Source/WebKit2:

NetworkCache efficacy logging was using too much CPU mostly due to
database writes. Logging was using ~11.3% of the NetworkProcess'
CPU usage (~9.2% for writes / ~1.3% for reads).

This patch buffers writes requests in memory and only writes them
to disk every 10 seconds. We are thus writing to this less frequently
and writing more at once, in a single SQL transaction. After this
change, efficacy logging only accounts for ~3.5% of the NetworkProcess'
CPU activity (1.5% for writes / 1.2% for reads).

Now that CPU usage is more acceptable, this patch re-enables the
network cache efficicy logging.

* NetworkProcess/cache/NetworkCacheStatistics.h:

* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::executeSQLCommand):
(WebKit::executeSQLStatement):
Call step() instead of executeCommand() because:
- The input statement is already prepared.
- step() does not finalize() the statement and thus we caller can
  reuse it after calling reset().

(WebKit::NetworkCacheStatistics::NetworkCacheStatistics):
(WebKit::NetworkCacheStatistics::initialize):
(WebKit::NetworkCacheStatistics::bootstrapFromNetworkCache):
(WebKit::NetworkCacheStatistics::recordNotCachingResponse):
(WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCacheStatistics::recordRetrievalFailure):
(WebKit::NetworkCacheStatistics::markAsRequested):
(WebKit::NetworkCacheStatistics::writeTimerFired):
(WebKit::NetworkCacheStatistics::queryWasEverRequested):
(WebKit::NetworkCacheStatistics::addHashesToDatabase):
(WebKit::NetworkCacheStatistics::addStoreDecisionsToDatabase):
(WebKit::NetworkCacheStatistics::addHashToDatabase): Deleted.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
Re-enable the network cache efficacy logging.

Source/WTF:

* wtf/HashMap.h:
(WTF::copyToVector):
Add copyToVector() utility function for HashMap that uses an std::pair<key, value>
as element type.

* wtf/text/WTFString.h:
(WTF::StringCapture::StringCapture):
(WTF::StringCapture::operator=):
Add default constructor and assignment operator to StringCapture so that
it can be used in a Vector.

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

4 years ago[iOS Media] Small inline controls can clip the time widgets
dino@apple.com [Thu, 5 Mar 2015 18:57:46 +0000 (18:57 +0000)]
[iOS Media] Small inline controls can clip the time widgets
https://bugs.webkit.org/show_bug.cgi?id=142319

Reviewed by Eric Carlson.

Start counting the number of digits in a duration so that
we can assign classes to the time widgets that specify
a minimum width.

* Modules/mediacontrols/mediaControlsApple.css: Replace the hour-long and ten-hour-long
classes with number of digits.
(audio::-webkit-media-controls-time-remaining-display.five-digit-time):
(audio::-webkit-media-controls-current-time-display.five-digit-time):
(audio::-webkit-media-controls-time-remaining-display.six-digit-time):
(audio::-webkit-media-controls-current-time-display.six-digit-time):
(audio::-webkit-media-controls-time-remaining-display.hour-long-time): Deleted.
(audio::-webkit-media-controls-current-time-display.hour-long-time): Deleted.
(audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time): Deleted.
(audio::-webkit-media-controls-current-time-display.ten-hour-long-time): Deleted.

* Modules/mediacontrols/mediaControlsApple.js: Add some new class names.
(Controller.prototype.updateDuration): Set the class of the time
widgets when we know how long the media runs.

* Modules/mediacontrols/mediaControlsiOS.css: Values for iOS that
are big enough to avoid clipping.
(video::-webkit-media-controls-current-time-display):
(video::-webkit-media-controls-time-remaining-display):
(video::-webkit-media-controls-current-time-display.three-digit-time):
(video::-webkit-media-controls-time-remaining-display.three-digit-time):
(video::-webkit-media-controls-current-time-display.four-digit-time):
(video::-webkit-media-controls-time-remaining-display.four-digit-time):
(video::-webkit-media-controls-current-time-display.five-digit-time):
(video::-webkit-media-controls-time-remaining-display.five-digit-time):
(video::-webkit-media-controls-current-time-display.six-digit-time):
(video::-webkit-media-controls-time-remaining-display.six-digit-time):
(audio::-webkit-media-controls-timeline-container): Deleted.
(video::-webkit-media-text-track-container): Deleted.

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

4 years agoImplement ES6 StringIterator
utatane.tea@gmail.com [Thu, 5 Mar 2015 18:27:27 +0000 (18:27 +0000)]
Implement ES6 StringIterator
https://bugs.webkit.org/show_bug.cgi?id=142080

Reviewed by Filip Pizlo.

This patch introduces ES6 String Iterator.
It enumerates code points instead of elements in String.
So surrogate pairs should be handled correctly.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/StringIterator.prototype.js: Added.
(next):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSStringIterator.cpp: Added.
(JSC::JSStringIterator::finishCreation):
* runtime/JSStringIterator.h: Added.
(JSC::JSStringIterator::createStructure):
(JSC::JSStringIterator::create):
(JSC::JSStringIterator::JSStringIterator):
* runtime/StringIteratorConstructor.cpp: Added.
(JSC::StringIteratorConstructor::finishCreation):
* runtime/StringIteratorConstructor.h: Added.
(JSC::StringIteratorConstructor::create):
(JSC::StringIteratorConstructor::createStructure):
(JSC::StringIteratorConstructor::StringIteratorConstructor):
* runtime/StringIteratorPrototype.cpp: Added.
(JSC::StringIteratorPrototype::finishCreation):
(JSC::StringIteratorPrototype::getOwnPropertySlot):
(JSC::stringIteratorPrototypeIterator):
* runtime/StringIteratorPrototype.h: Added.
(JSC::StringIteratorPrototype::create):
(JSC::StringIteratorPrototype::createStructure):
(JSC::StringIteratorPrototype::StringIteratorPrototype):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncIterator):
* tests/stress/string-iterators.js: Added.
(testSurrogatePair):
(increment):
(for):

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

4 years ago[ARM] Fix the FTL build on Aarch64 Linux after r177421
ossy@webkit.org [Thu, 5 Mar 2015 17:29:11 +0000 (17:29 +0000)]
[ARM] Fix the FTL build on Aarch64 Linux after r177421
https://bugs.webkit.org/show_bug.cgi?id=142040

Reviewed by Mark Lam.

* llvm/library/LLVMExports.cpp:
(initializeAndGetJSCLLVMAPI):

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

4 years ago[Win] Reneable aria 'switch' tests after r18078.
bfulgham@apple.com [Thu, 5 Mar 2015 17:21:27 +0000 (17:21 +0000)]
[Win] Reneable aria 'switch' tests after r18078.

Add a Windows rebaseline. Also document another batch of debug assertions.

* platform/win/TestExpectations:
* platform/win/accessibility/aria-toggle-button-with-title-expected.txt: Added.
* platform/win/fast/attachment/attachment-subtitle-expected.txt: Added.

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

4 years ago[cmake] Fix the web replay build
ossy@webkit.org [Thu, 5 Mar 2015 17:09:32 +0000 (17:09 +0000)]
[cmake] Fix the web replay build
https://bugs.webkit.org/show_bug.cgi?id=142331

Reviewed by Gyuyoung Kim.

* CMakeLists.txt:
* inspector/InspectorReplayAgent.cpp:
(WebCore::buildInspectorObjectForSessionState):
(WebCore::buildInspectorObjectForSegmentState):

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

4 years agoSupport WorkQueue QOS classes on Mavericks
antti@apple.com [Thu, 5 Mar 2015 17:06:15 +0000 (17:06 +0000)]
Support WorkQueue QOS classes on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=142328

Reviewed by Anders Carlsson.

"The priority of a dispatch queue is inherited from its target queue.  In order to
change the priority of a queue created with dispatch_queue_create(), use the
dispatch_get_global_queue() function to obtain a target queue of the desired prior-
ity."

* wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::targetQueueForQOSClass):
(WTF::WorkQueue::platformInitialize):

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

4 years agoSwitch NetworkCacheStorage to WorkQueue abstraction
antti@apple.com [Thu, 5 Mar 2015 17:05:54 +0000 (17:05 +0000)]
Switch NetworkCacheStorage to WorkQueue abstraction
https://bugs.webkit.org/show_bug.cgi?id=142337

Reviewed by Anders Carlsson.

Don't use dispatch_async directly.

* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCacheStorage::ioQueue):
(WebKit::NetworkCacheStorage::backgroundIOQueue):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::NetworkCacheStorage):
(WebKit::NetworkCacheStorage::initialize):
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::dispatchReadOperation):
(WebKit::retrieveFromMemory):
(WebKit::NetworkCacheStorage::traverse):
(WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
(WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
(WebKit::NetworkCacheStorage::clear):
(WebKit::NetworkCacheStorage::shrinkIfNeeded):
(WebKit::NetworkCacheStorage::deleteOldVersions):

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

4 years ago[Win] AX: Implement support for ARIA 1.1 'switch' role
bfulgham@apple.com [Thu, 5 Mar 2015 16:51:26 +0000 (16:51 +0000)]
[Win] AX: Implement support for ARIA 1.1 'switch' role
https://bugs.webkit.org/show_bug.cgi?id=142016
<rdar://problem/19953264>

Reviewed by Chris Fleizach.

The changes in Bug 141986 did not update the proper Windows routines to
support the new ARIA 1.1 role. This turned out to be trivial.

* AccessibleBase.cpp:
(MSAARole): Provide MSAA role for 'switch'. Also correct 'ToggleButtonRole',
which was improperly reporting as 'push button'.

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

4 years agoUpgrade ES6 Iterator interfaces
utatane.tea@gmail.com [Thu, 5 Mar 2015 14:57:17 +0000 (14:57 +0000)]
Upgrade ES6 Iterator interfaces
https://bugs.webkit.org/show_bug.cgi?id=141351

Reviewed by Filip Pizlo.

This patch upgrades the exising ES6 iterator to align the latest spec.
In the latest spec,
1. `Iterator.next` returns object that implements IteratorResult interface { value: value, done, boolean }.
2. `Iterator.return` is introduced. When the iteration is terminated by the abrupt completion,
it is called to close iterator state.
3. Iterator.next of Array is moved from an iterator object to `%ArrayIteratorPrototype%`.

To upgrade it, we changes the bytecode that represents for-of loops.
And to embody the efficient iteration with an iterator object,
we implemented %ArrayIteratorPrototype%.next in JavaScript and
it is located in builtins/ArrayIterator.prototype.js.
Implementing it in JavaScript encourages inlining and
utilizes escape analysis for an iterator result object in DFG JIT.
And we dropped the intrinsic version of %ArrayIteratorPrototype%.next.

And we introduced IteratorOperations that is defined in the spec.
It aligns the iteration in the runtime to the latest spec.
Currently, Promise.all and Promise.race uses an iterable object.
However, Promise.all and Promise.race implementation is also based on the old spec.
Subsequent patches will upgrade it.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/ArrayIterator.prototype.js: Copied from Source/JavaScriptCore/runtime/ArrayIteratorPrototype.h.
(next):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::emitThrowTypeError):
(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::emitIsObject):
(JSC::BytecodeGenerator::emitIsUndefined):
* bytecompiler/BytecodeGenerator.h:
* jit/ThunkGenerators.cpp:
(JSC::arrayIteratorNextThunkGenerator): Deleted.
(JSC::arrayIteratorNextKeyThunkGenerator): Deleted.
(JSC::arrayIteratorNextValueThunkGenerator): Deleted.
* jit/ThunkGenerators.h:
* runtime/ArgumentsIteratorPrototype.cpp:
(JSC::ArgumentsIteratorPrototype::finishCreation):
(JSC::argumentsIteratorPrototypeFuncNext):
* runtime/ArrayIteratorPrototype.cpp:
(JSC::ArrayIteratorPrototype::finishCreation):
(JSC::ArrayIteratorPrototype::getOwnPropertySlot):
(JSC::arrayIteratorProtoFuncIterator):
(JSC::arrayIteratorPrototypeIterate): Deleted.
* runtime/ArrayIteratorPrototype.h:
* runtime/CommonIdentifiers.h:
* runtime/Intrinsic.h:
* runtime/IteratorOperations.cpp: Added.
(JSC::iteratorNext):
(JSC::iteratorValue):
(JSC::iteratorComplete):
(JSC::iteratorStep):
(JSC::iteratorClose):
(JSC::createIterResultObject):
* runtime/IteratorOperations.h: Copied from Source/JavaScriptCore/runtime/ArrayIteratorPrototype.cpp.
* runtime/JSArrayIterator.cpp:
(JSC::JSArrayIterator::finishCreation):
(JSC::JSArrayIterator::visitChildren): Deleted.
(JSC::createIteratorResult): Deleted.
(JSC::arrayIteratorNext): Deleted.
(JSC::arrayIteratorNextKey): Deleted.
(JSC::arrayIteratorNextValue): Deleted.
(JSC::arrayIteratorNextGeneric): Deleted.
* runtime/JSArrayIterator.h:
(JSC::JSArrayIterator::JSArrayIterator):
(JSC::JSArrayIterator::iterationKind): Deleted.
(JSC::JSArrayIterator::iteratedObject): Deleted.
(JSC::JSArrayIterator::nextIndex): Deleted.
(JSC::JSArrayIterator::setNextIndex): Deleted.
(JSC::JSArrayIterator::finish): Deleted.
(JSC::JSArrayIterator::offsetOfIterationKind): Deleted.
(JSC::JSArrayIterator::offsetOfIteratedObject): Deleted.
(JSC::JSArrayIterator::offsetOfNextIndex): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSPromiseConstructor.cpp:
(JSC::performPromiseRaceLoop):
(JSC::JSPromiseConstructorFuncRace):
(JSC::performPromiseAll):
(JSC::JSPromiseConstructorFuncAll):
* runtime/MapIteratorPrototype.cpp:
(JSC::MapIteratorPrototype::finishCreation):
(JSC::MapIteratorPrototypeFuncNext):
* runtime/SetIteratorPrototype.cpp:
(JSC::SetIteratorPrototype::finishCreation):
(JSC::SetIteratorPrototypeFuncNext):
* runtime/VM.cpp:
(JSC::thunkGeneratorForIntrinsic):
* tests/stress/array-iterators-next-with-call.js: Added.
(increment):
(for):
* tests/stress/array-iterators-next.js: Added.

Revive the older Array iterator tests that manually call 'next' method.

* tests/stress/custom-iterators.js: Added.
(iter.next):
(iter.Symbol.iterator):
(iter.return):
(iter.get next):
(iter.get return):
(iteratorInterfaceErrorTest.iter.next):
(iteratorInterfaceErrorTest.iter.Symbol.iterator):
(iteratorInterfaceErrorTest.iter.return):
(iteratorInterfaceErrorTest):
(iteratorInterfaceErrorTestReturn.iter.next):
(iteratorInterfaceErrorTestReturn.iter.Symbol.iterator):
(iteratorInterfaceErrorTestReturn.iter.return):
(iteratorInterfaceErrorTestReturn):
(iteratorInterfaceBreakTestReturn.iter.next):
(iteratorInterfaceBreakTestReturn.iter.Symbol.iterator):
(iteratorInterfaceBreakTestReturn.iter.return):
(iteratorInterfaceBreakTestReturn):

This tests the behavior of custom iterators.
'next' and 'return' of iterator work with for-of.

* tests/stress/iterators-shape.js: Added.
(iteratorShape):
(sameNextMethods):
(set var):

This tests the shape of iterators; iterators of Array have 'next' method in %ArrayIteratorPrototype%.

* tests/stress/map-iterators-next.js: Added.
(set var):
(.get if):
(otherKey):
* tests/stress/set-iterators-next.js: Added.
(otherKey):

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