WebKit-https.git
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

4 years ago[EFL][WK2] Crash when "Download Linked File" from MiniBrowser context menu is clicked
commit-queue@webkit.org [Thu, 5 Mar 2015 14:05:12 +0000 (14:05 +0000)]
[EFL][WK2] Crash when "Download Linked File" from MiniBrowser context menu is clicked
https://bugs.webkit.org/show_bug.cgi?id=131162

Patch by Lukasz Bialek <l.bialek@samsung.com> on 2015-03-05
Reviewed by Gyuyoung Kim.

Source/WebKit2:

"Download Linked File" crashes because of null-pointer exception of Download Job.
Due to architectural difficulties, easy fix is not possible (EwkView is needed in
DownloadManager to create DownloadJobs and it is only used to notify the client
about download (finished, error, cancel) via smart callback using EwkView (Evas_Object).

Propose a new callbacks which are view independent and detach EFL's DownloadManager
from EwkView. It makes DownloadManagerEFL consistent with WKContextDownload.
Fix the crash and restore download functionality.

* PlatformEfl.cmake:
Enable newly reimplemented tests
* UIProcess/API/efl/EwkViewCallbacks.h:
Remove old callback mechanism
* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_download_callbacks_set):
* UIProcess/API/efl/ewk_context.h:
Declare new callback functions and registration functions
* UIProcess/API/efl/ewk_download_job.cpp:
(EwkDownloadJob::EwkDownloadJob):
(EwkDownloadJob::view): Deleted.
* UIProcess/API/efl/ewk_download_job.h:
* UIProcess/API/efl/ewk_download_job_private.h:
(EwkDownloadJob::create):
Remove EwkView dependency
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
Alter tests to new callback mechanism
* UIProcess/efl/DownloadManagerEfl.cpp:
(WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename):
(WebKit::DownloadManagerEfl::didStart):
(WebKit::DownloadManagerEfl::didFail):
(WebKit::DownloadManagerEfl::didCancel):
(WebKit::DownloadManagerEfl::didFinish):
(WebKit::DownloadManagerEfl::DownloadManagerEfl):
(WebKit::DownloadManagerEfl::registerDownloadJob):
(WebKit::DownloadManagerEfl::setCallbacks):
* UIProcess/efl/DownloadManagerEfl.h:
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::handleDownloadRequest):
Add support of new callback mechanism

Tools:

* MiniBrowser/efl/main.c:
(on_download_request):
(on_download_finished):
(on_download_failed):
(window_create):
Adapt download callbacks to new callback mechanism

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

4 years agoUnreviewed. Fix /webkit2/WebKitWebResource/mime-type after r180927.
carlosgc@webkit.org [Thu, 5 Mar 2015 10:45:23 +0000 (10:45 +0000)]
Unreviewed. Fix /webkit2/WebKitWebResource/mime-type after r180927.

In r180927 we updated the libsoup version used by the jhbuild. In
this new version the sniffer uses image/x-icon instead of
image/vnd.microsoft.icon for blank.ico resource.

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

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

4 years ago[SOUP] Check TLS errors as soon as they are set in the SoupMessage
carlosgc@webkit.org [Thu, 5 Mar 2015 10:38:30 +0000 (10:38 +0000)]
[SOUP] Check TLS errors as soon as they are set in the SoupMessage
https://bugs.webkit.org/show_bug.cgi?id=142244

Reviewed by Sergio Villar Senin.

Source/WebCore:

Connect to the notify::tls-errors signal of SoupMessage to cancel
the load earlier in case of TLS failure, preventing any private
data from being sent to the server before the TLS errors are checked.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::tlsErrorsChangedCallback):
(WebCore::gotHeadersCallback):
(WebCore::createSoupMessageForHandleAndRequest):

Tools:

Check that the SSL server doesn't process any request in case of
TLS errors when the policy is set to FAIL.

* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(testTLSErrorsPolicy):
(testTLSErrorsRedirect):
(testTLSErrorsHTTPAuth):
(testLoadFailedWithTLSErrors):
(testSubresourceLoadFailedWithTLSErrors):
(httpsServerCallback):

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

4 years ago[SOUP] Disable RC4
commit-queue@webkit.org [Thu, 5 Mar 2015 09:27:21 +0000 (09:27 +0000)]
[SOUP] Disable RC4
https://bugs.webkit.org/show_bug.cgi?id=140014

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-03-05
Reviewed by Carlos Garcia Campos.

Disallow RC4-based ciphersuites when performing TLS negotiation,
because it is no longer considered secure.

* NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
(main):
* WebProcess/EntryPoint/unix/WebProcessMain.cpp:
(main):

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

4 years agoTextCheckingParagraph::isEmpty() is sufficient to check whether paragraph is empty
g.czajkowski@samsung.com [Thu, 5 Mar 2015 08:56:22 +0000 (08:56 +0000)]
TextCheckingParagraph::isEmpty() is sufficient to check whether paragraph is empty
https://bugs.webkit.org/show_bug.cgi?id=142276

Reviewed by Darin Adler.

TextCheckingParagraph::isEmpty() already calls TextCheckingParagraph::isRangeEmpty().
There is no need to call them both at the caller site.

No new tests. No behavior change.

* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
Update caller site.

* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingParagraph::isEmpty):
Avoid using helepers here to get rid of them as they are
no longer needed outside TextCheckingParagraph.

* editing/TextCheckingHelper.h:
(WebCore::TextCheckingParagraph::isTextEmpty): Deleted.
(WebCore::TextCheckingParagraph::isRangeEmpty): Deleted.
Do not expose isTextEmpty() and isRangeEmpty().

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

4 years ago[EFL] REGRESSION (r178685): ASSERTION FAILED: !parameters.mediaKeyStorageDirectory...
commit-queue@webkit.org [Thu, 5 Mar 2015 08:51:52 +0000 (08:51 +0000)]
[EFL] REGRESSION (r178685): ASSERTION FAILED: !parameters.mediaKeyStorageDirectory.isEmpty()
https://bugs.webkit.org/show_bug.cgi?id=141154

Patch by Pawel Forysiuk <p.forysiuk@samsung.com> on 2015-03-05
Reviewed by Jer Noble.

Unlike GTK, EFL port enables ENABLE_ENCRYPTED_MEDIA_V2 build option by default.

For the sake of completeness WebKitTestRunner should specify temporary
folder for MediaKeysStorageDirecory as well as IndexedDB, LocalStorage, etc.

Default non legacy paths are set up in ProcessPoolConfiguration constructor.
They use WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation
to get data storage paths. Only Mac port has an actual implementation of it.
However, WebKitTestRunner overrides them in favour of unique temporary dir
which is taken from libraryPathForTesting().

Since WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation
is not implemented for EFL and GTK ports it returns an empty string.
All default data folders besides MediaKeys are overridden in TestRunner
code with unique temporary folders derived from DUMPRENDERTREE_TEMP
env variable.

GTK port does not enable encrypted keys by default so
WebMediaKeyStorageManager::initialize() code path is never triggered.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Set MediaKeysStorageDirectory for all
WebKit ports.

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

4 years ago[buildbot] Add regression test to check which builder runs which tests
ossy@webkit.org [Thu, 5 Mar 2015 08:03:22 +0000 (08:03 +0000)]
[buildbot] Add regression test to check which builder runs which tests
https://bugs.webkit.org/show_bug.cgi?id=142166

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
(BuildStepsConstructorTest.createTest):
(BuildStepsTest):
(BuildStepsTest.generateTests):
(BuildStepsTest.createTest):
(BuildStepsTest.createTest.doTest):
(BuildStepsTest.test_unnecessary_expected_results):

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

4 years agoClarify RenderElement::adjustStyleDifference()
simon.fraser@apple.com [Thu, 5 Mar 2015 05:41:42 +0000 (05:41 +0000)]
Clarify RenderElement::adjustStyleDifference()
https://bugs.webkit.org/show_bug.cgi?id=142256

Reviewed by David Hyatt.

Make RenderElement::adjustStyleDifference() clearer in two ways.

First, replace lots of if (diff < X) diff = X with
diff = std::max(diff, X). I did this even in cases where diff was
being set unconditionally, because it's never correct to change the diff
to a lesser value.

Second the "set at least SimplifiedLayout, but if we have PositionedMovementOnly
set it to SimplifiedLayoutAndPositionedMovement" was confusingly written.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustStyleDifference):

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

4 years agoTest gardening after r181013
mmaxfield@apple.com [Thu, 5 Mar 2015 05:30:46 +0000 (05:30 +0000)]
Test gardening after r181013

Unreviewed.

* platform/mac/fast/text/trailing-word-expected.html: Renamed from LayoutTests/fast/text/trailing-word-expected.html.
* platform/mac/fast/text/trailing-word.html: Renamed from LayoutTests/fast/text/trailing-word.html.

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

4 years agoSwitch new soft-linking debug asserts to release asserts
ddkilzer@apple.com [Thu, 5 Mar 2015 05:14:53 +0000 (05:14 +0000)]
Switch new soft-linking debug asserts to release asserts
<http://webkit.org/b/142176>

Reviewed by Alex Christensen.

* platform/mac/SoftLinking.h:
(SOFT_LINK_CONSTANT_SOURCE): Switch to release assert.
(SOFT_LINK_FUNCTION_SOURCE): Ditto.
* platform/win/SoftLinking.h:
(SOFT_LINK_CONSTANT_SOURCE): Ditto.
(SOFT_LINK_FUNCTION_SOURCE): Ditto.  Note that this method is
effectively only called once because the function pointer is
replaced after the first time it's called.

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

4 years agoWeb Inspector: Improve display of previews with overflow
commit-queue@webkit.org [Thu, 5 Mar 2015 05:13:46 +0000 (05:13 +0000)]
Web Inspector: Improve display of previews with overflow
https://bugs.webkit.org/show_bug.cgi?id=142321

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

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):

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

4 years agoOptimize content extensions.
commit-queue@webkit.org [Thu, 5 Mar 2015 04:54:08 +0000 (04:54 +0000)]
Optimize content extensions.
https://bugs.webkit.org/show_bug.cgi?id=142295

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

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
There is no need to add duplicate sequential actions.
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Action::operator==):
Added to compare actions.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
Return early if a block action is found instead of moving to the next extension.

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

4 years agoHide Promise with runtime flags under Cocoa JSContext API
utatane.tea@gmail.com [Thu, 5 Mar 2015 04:25:49 +0000 (04:25 +0000)]
Hide Promise with runtime flags under Cocoa JSContext API
https://bugs.webkit.org/show_bug.cgi?id=141965

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Since there's no run loop in JavaScriptCore APIs, Promises don't work currently.
So until they work, we hide Promise from a global object.
Introduce new JSC runtime flag, PromiseDisabled. When `isPromiseDisabled` is true,
Promise constructor is not attached to JSGlobalObject.

To make 0 as default runtime flags, we choose PromiseDisabled flag
instead of PromiseEnabled flag. So by default, Promise is enabled.

* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::JSCallbackObject):
* API/JSContextRef.cpp:
(javaScriptRuntimeFlags):
(JSGlobalContextCreateInGroup):
* API/tests/testapi.c:
(main):
* API/tests/testapi.mm:
(testObjectiveCAPI):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::create):
* runtime/RuntimeFlags.h:
(JSC::RuntimeFlags::createAllEnabled):

Source/WebKit/mac:

Add new JSC runtime flag, PromiseDisabled.

* WebView/WebPreferencesPrivate.h:

Source/WebKit/win:

Add new JSC runtime flag, PromiseDisabled.

* Interfaces/IWebPreferences.idl:
* Interfaces/IWebPreferencesPrivate.idl:

Source/WebKit2:

Add new JSC runtime flag, PromiseDisabled.

* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

4 years agoUnreviewed, rolling out r181054.
commit-queue@webkit.org [Thu, 5 Mar 2015 02:35:59 +0000 (02:35 +0000)]
Unreviewed, rolling out r181054.
https://bugs.webkit.org/show_bug.cgi?id=142320

Broke the api tests (Requested by sundiamonde on #webkit).

Reverted changeset:

"Fix linker warnings in TestWebKitAPI."
https://bugs.webkit.org/show_bug.cgi?id=141912
http://trac.webkit.org/changeset/181054

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

4 years agoUnreviewed, rolling out r181046.
commit-queue@webkit.org [Thu, 5 Mar 2015 02:27:44 +0000 (02:27 +0000)]
Unreviewed, rolling out r181046.
https://bugs.webkit.org/show_bug.cgi?id=142318

Broke two layout tests (Requested by sundiamonde on #webkit).

Reverted changeset:

"Update inline media control icons for OSX."
https://bugs.webkit.org/show_bug.cgi?id=142305
http://trac.webkit.org/changeset/181046

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

4 years agoWeb Inspector: Array/Collection Sizes should be visible and distinct
commit-queue@webkit.org [Thu, 5 Mar 2015 02:27:23 +0000 (02:27 +0000)]
Web Inspector: Array/Collection Sizes should be visible and distinct
https://bugs.webkit.org/show_bug.cgi?id=142254

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

Source/JavaScriptCore:

* runtime/WeakMapData.h:
(JSC::WeakMapData::size):
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::weakMapSize):
* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakMapSize):
Add a way to get a WeakMap's size.

* inspector/protocol/Runtime.json:
Include size in RemoteObject and ObjectPreview.

* inspector/InjectedScriptSource.js:
Set the size of RemoteObjects and previews if they
are array/collection types.

Source/WebInspectorUI:

* UserInterface/Models/ObjectPreview.js:
(WebInspector.ObjectPreview):
(WebInspector.ObjectPreview.fromPayload):
(WebInspector.ObjectPreview.prototype.get size):
(WebInspector.ObjectPreview.prototype.hasSize):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPrimitiveValue):
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.get size):
(WebInspector.RemoteObject.prototype.hasSize):
Check if this type has a size and get the size.
Gracefully handle construction for legacy protocols.

* UserInterface/Views/ObjectPreviewView.css:
(.object-preview > .size):
* UserInterface/Views/FormattedValue.css:
(:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap) > .size):
Style the array/collection size.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView):
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
(WebInspector.FormattedValue.createElementForRemoteObject):
(WebInspector.FormattedValue.createElementForObjectPreview):
(WebInspector.FormattedValue.createElementForPropertyPreview):
Add an element showing the array/collection size.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype):
Remove special handling for Array sizes now that this is handled earlier.

* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager.prototype.processData):
(WebInspector.StorageManager.prototype.requestIndexedDatabaseData):
Fix what looks like broken RemoteObject construction.

LayoutTests:

* inspector-protocol/runtime/getProperties-expected.txt:
* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:
Update tests now that RemoteObjects and Previews may have an explicit size.

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

4 years agoGC should compute stack bounds and dump registers at the earliest opportunity.
akling@apple.com [Thu, 5 Mar 2015 02:19:14 +0000 (02:19 +0000)]
GC should compute stack bounds and dump registers at the earliest opportunity.
<https://webkit.org/b/142310>
<rdar://problem/20045624>

Reviewed by Geoffrey Garen.

Make Heap::collect() a wrapper function around a collectImpl() where the work is actually done.
The wrapper function that grabs a snapshot of the current stack boundaries and register values
on entry, and sanitizes the stack on exit.

This is a speculative fix for what appears to be overly conservative behavior in the garbage
collector following r178364 which caused a measurable regression in memory usage on Membuster.
The theory being that we were putting pointers to dead things on the stack before scanning it,
and by doing that ended up marking things that we'd otherwise discover to be garbage.

* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::gatherStackRoots):
(JSC::Heap::collect):
(JSC::Heap::collectImpl):
* heap/Heap.h:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::gatherFromCurrentThread):
(JSC::MachineThreads::gatherConservativeRoots):
* heap/MachineStackMarker.h:

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

4 years agoSilence GCC's -Wstrict-prototypes
commit-queue@webkit.org [Thu, 5 Mar 2015 01:51:57 +0000 (01:51 +0000)]
Silence GCC's -Wstrict-prototypes
https://bugs.webkit.org/show_bug.cgi?id=142278

Patch by Debarshi Ray <debarshir@gnome.org> on 2015-03-04
Reviewed by Alexey Proskuryakov.

* API/JSContextRef.h:

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

4 years ago<attachment> icons are low-resolution when transformed or under page scale
timothy_horton@apple.com [Thu, 5 Mar 2015 01:43:07 +0000 (01:43 +0000)]
<attachment> icons are low-resolution when transformed or under page scale
https://bugs.webkit.org/show_bug.cgi?id=142262
<rdar://problem/20035480>

Reviewed by Dean Jackson.

We should use Icon::createIconForFiles, just like <input type="file"> does,
instead of directly talking to IconServices. This results both in less code
and in NSImage's multiresolution magic making the icons sharp even under
the influence of transforms and page scale.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/IconServicesSPI.h: Removed.
* platform/spi/mac/LaunchServicesSPI.h: Removed.
Get rid of IconServicesSPI.h and LaunchServicesSPI.h.

* platform/graphics/Icon.h:
Include RetainPtr just once.
paint() should take a GraphicsContext reference (null is not an option)
and a FloatRect (after all, it just turns around and converts to NSRect).

* platform/graphics/ios/IconIOS.mm:
(WebCore::Icon::paint):
* platform/graphics/mac/IconMac.mm:
(WebCore::Icon::createIconForFiles):
(WebCore::Icon::paint):
* platform/graphics/efl/IconEfl.cpp:
(WebCore::Icon::paint):
* platform/graphics/gtk/IconGtk.cpp:
(WebCore::Icon::paint):
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::paint):
Adapt to the paint() signature changes, fix some style, etc.

* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
Adapt to the paint() signature changes.

* rendering/RenderThemeMac.mm:
(WebCore::paintAttachmentIcon):
Use Icon::createIconForFiles instead of IconServices.

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

4 years ago<attachment> should not appear selected when the cursor is adjacent to it
timothy_horton@apple.com [Thu, 5 Mar 2015 01:40:45 +0000 (01:40 +0000)]
<attachment> should not appear selected when the cursor is adjacent to it
https://bugs.webkit.org/show_bug.cgi?id=142311
<rdar://problem/20045862>

Reviewed by Dean Jackson.

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::isSelected): Deleted.
* rendering/RenderAttachment.h:
* rendering/RenderThemeMac.mm:
(WebCore::titleTextColorForAttachment):
(WebCore::RenderThemeMac::paintAttachment):
(WebCore::labelTextColorForAttachment): Deleted.
We were using the wrong (and far too complicated) mechanism to determine
if the attachment is selected (to decide which highlight color to use).
Instead, just check selectionState().

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

4 years ago<attachment> should show the file size as detail text below the icon
timothy_horton@apple.com [Thu, 5 Mar 2015 01:39:27 +0000 (01:39 +0000)]
<attachment> should show the file size as detail text below the icon
https://bugs.webkit.org/show_bug.cgi?id=142261
<rdar://problem/20009570>

Reviewed by Dean Jackson.

Test: fast/attachment/attachment-subtitle.html

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFile):
(WebCore::HTMLAttachmentElement::parseAttribute):
* html/HTMLAttachmentElement.h:
Let RenderAttachment know when the subtitle attribute changes.

* html/HTMLAttributeNames.in:
Add a subtitle attribute.

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::invalidate):
(WebCore::RenderAttachment::representedFileChanged): Deleted.
* rendering/RenderAttachment.h:
Rename representedFileChanged to invalidate; it will cause layout and
repaint of the attachment. Mostly for use from HTMLAttachmentElement,
when properties that affect the display and/or intrinsic size change.

* rendering/RenderThemeMac.mm:
(WebCore::attachmentTitleInactiveBackgroundColor):
(WebCore::attachmentTitleInactiveTextColor):
(WebCore::attachmentSubtitleTextColor):
(WebCore::titleTextColorForAttachment):
(WebCore::AttachmentLayout::addTitleLine):
(WebCore::AttachmentLayout::layOutTitle):
(WebCore::AttachmentLayout::layOutSubtitle):
(WebCore::AttachmentLayout::AttachmentLayout):
(WebCore::addAttachmentTitleBackgroundRightCorner):
(WebCore::addAttachmentTitleBackgroundLeftCorner):
(WebCore::paintAttachmentTitleBackground):
(WebCore::paintAttachmentTitle):
(WebCore::paintAttachmentSubtitle):
(WebCore::RenderThemeMac::paintAttachment):
(WebCore::attachmentLabelInactiveBackgroundColor): Deleted.
(WebCore::attachmentLabelInactiveTextColor): Deleted.
(WebCore::labelTextColorForAttachment): Deleted.
(WebCore::AttachmentLayout::addLine): Deleted.
(WebCore::AttachmentLayout::layOutLabel): Deleted.
(WebCore::addAttachmentLabelBackgroundRightCorner): Deleted.
(WebCore::addAttachmentLabelBackgroundLeftCorner): Deleted.
(WebCore::paintAttachmentLabelBackground): Deleted.
(WebCore::paintAttachmentLabel): Deleted.
Rename everything "label" to "title" (except LabelLine, which is not
specifically about the title). We're going to use "title" for the
main text below the icon, and "subtitle" for the secondary text below that.

Avoid keeping the CTFonts on the AttachmentLayout; there's no need for it.

Add layOutSubtitle and paintAttachmentSubtitle, which orient and paint
the subtitle (below the title, in blue, smaller than the label).

* fast/attachment/attachment-subtitle.html: Added.
* platform/mac/fast/attachment/attachment-subtitle-expected.png: Added.
* platform/mac/fast/attachment/attachment-subtitle-expected.txt: Added.
Add a test of the rendering of attachment subtitles, and results for Mac.

* platform/mac-mavericks/fast/attachment/attachment-subtitle-expected.txt: Added.
Add Mavericks baselines.

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

4 years ago[Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining...
ddkilzer@apple.com [Thu, 5 Mar 2015 01:19:57 +0000 (01:19 +0000)]
[Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining CMSampleBuffer

More fallout from:

Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
<http://webkit.org/b/141870>

* platform/cf/CoreMediaSoftLink.cpp:
* platform/cf/CoreMediaSoftLink.h:
- Remove include of <CoreMedia/CoreMedia.h> here.  These already
  include CoreMediaSPI.h.
* platform/spi/cf/CoreMediaSPI.h:
- Add include of <CoreMedia/CoreMedia.h> here.
- Remove redundant include of <CoreMedia/CMTime.h> for Windows.

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

4 years agoFix linker warnings in TestWebKitAPI.
commit-queue@webkit.org [Thu, 5 Mar 2015 01:18:41 +0000 (01:18 +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-04
Reviewed by David Kilzer.

* TestWebKitAPI/Configurations/Base.xcconfig:
Use GCC_SYMBOLS_PRIVATE_EXTERN like we do in WebCore.

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

4 years ago[Mac] Set SystemUIFontSelect in DRT and WKTR
ap@apple.com [Thu, 5 Mar 2015 00:51:44 +0000 (00:51 +0000)]
[Mac] Set SystemUIFontSelect in DRT and WKTR
https://bugs.webkit.org/show_bug.cgi?id=142303

Reviewed by Myles C. Maxfield.

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

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

4 years agoMac Perf bots should use WebKitTestRunner instead of DumpRenderTree
cdumez@apple.com [Thu, 5 Mar 2015 00:10:44 +0000 (00:10 +0000)]
Mac Perf bots should use WebKitTestRunner instead of DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=142314
<rdar://problem/20046835>

Reviewed by Ryosuke Niwa.

Mac Perf bots should use WebKitTestRunner instead of DumpRenderTree
to get WK2 code coverage.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

4 years ago[iOS] Fix build with newer clang due to duplicate macro definition
ddkilzer@apple.com [Thu, 5 Mar 2015 00:09:25 +0000 (00:09 +0000)]
[iOS] Fix build with newer clang due to duplicate macro definition

Fallout from:

Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
<http://webkit.org/b/141870>

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
Remove duplicate kCMTimeIndefinite macro.

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

4 years agoUpdate inline media control icons for OSX.
roger_fong@apple.com [Thu, 5 Mar 2015 00:03:39 +0000 (00:03 +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

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

4 years ago[Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
aestes@apple.com [Wed, 4 Mar 2015 23:52:31 +0000 (23:52 +0000)]
[Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
https://bugs.webkit.org/show_bug.cgi?id=142313

Reviewed by Anders Carlsson.

ContentFilterMac.mm no longer contains any Objective-C code, so rename it to ContentFilter.cpp. It is also no longer Mac-specific, so move it up to platform/.

* WebCore.xcodeproj/project.pbxproj:
* platform/ContentFilter.cpp: Renamed from Source/WebCore/platform/mac/ContentFilterMac.mm.
* platform/cocoa/NetworkExtensionContentFilter.h: Replaced NSInteger with long.

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

4 years agoUnreviewed gardening.
achristensen@apple.com [Wed, 4 Mar 2015 23:39:24 +0000 (23:39 +0000)]
Unreviewed gardening.

* http/tests/contentextensions/basic-filter.html.hson: Removed.
* http/tests/contentextensions/basic-filter.html.json: Copied from http/tests/contentextensions/basic-filter.html.hson.
Spell json correctly.  Does not start with h.

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

4 years agoAttempted build fix.
bdakin@apple.com [Wed, 4 Mar 2015 23:25:22 +0000 (23:25 +0000)]
Attempted build fix.

* UIProcess/API/Cocoa/WKViewPrivate.h:

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

4 years agoREGRESSION (r179597): Can't see power saver banner for plugins
dino@apple.com [Wed, 4 Mar 2015 23:18:36 +0000 (23:18 +0000)]
REGRESSION (r179597): Can't see power saver banner for plugins
https://bugs.webkit.org/show_bug.cgi?id=142312
<rdar://problem/20040517>

Reviewed by Brent Fulgham.

We were being a bit too restrictive when deciding a child
should not create a renderer. All shadow root children
of the snapshotted plugin need one.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
Test if we're part of the shadow tree.

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

4 years ago[Content Filtering] Make it easier to add new content filters
aestes@apple.com [Wed, 4 Mar 2015 22:43:35 +0000 (22:43 +0000)]
[Content Filtering] Make it easier to add new content filters
https://bugs.webkit.org/show_bug.cgi?id=142255

Reviewed by Sam Weinig.

ContentFilter was becoming a bit of a mess, with both the WebFilterEvaluator and NEFilterSource implementations
awkwardly living side-by-side. This patch cleans things up by moving these implementations into two separate
classes and turning ContentFilter itself into an abstract interface that each implements. A new class called
ContentFilterCollection, which also inherits from ContentFilter, manages the collection of individual content
filters and is vended to the rest of the system by ContentFilter::createIfNeeded().

This refactoring will make it easier to add a third type of content filter in a follow-on patch, namely a mock
content filter for testing purposes.

* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): Called ContentFilter::createIfNeeded() instead of instantiating a ContentFilter directly.
* platform/ContentFilter.h:
(WebCore::ContentFilter::~ContentFilter):
* platform/cocoa/NetworkExtensionContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
* platform/cocoa/NetworkExtensionContentFilter.mm: Added.
(WebCore::NetworkExtensionContentFilter::canHandleResponse): Moved NEFilterSource code from ContentFilterMac.mm to here.
(WebCore::NetworkExtensionContentFilter::create): Ditto.
(WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Ditto.
(WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Ditto.
(WebCore::NetworkExtensionContentFilter::addData): Ditto.
(WebCore::NetworkExtensionContentFilter::finishedAddingData): Ditto.
(WebCore::NetworkExtensionContentFilter::needsMoreData): Ditto.
(WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
(WebCore::NetworkExtensionContentFilter::getReplacementData): Ditto.
(WebCore::NetworkExtensionContentFilter::unblockHandler): Ditto.
* platform/cocoa/ParentalControlsContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
* platform/cocoa/ParentalControlsContentFilter.mm: Added.
(WebCore::ParentalControlsContentFilter::canHandleResponse): Moved WebFilterEvaluator code from ContentFilterMac.mm to here.
(WebCore::ParentalControlsContentFilter::create): Ditto.
(WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Ditto.
(WebCore::ParentalControlsContentFilter::addData): Ditto.
(WebCore::ParentalControlsContentFilter::finishedAddingData): Ditto.
(WebCore::ParentalControlsContentFilter::needsMoreData): Ditto.
(WebCore::ParentalControlsContentFilter::didBlockData): Ditto.
(WebCore::ParentalControlsContentFilter::getReplacementData): Ditto.
(WebCore::ParentalControlsContentFilter::unblockHandler): Ditto.
* platform/mac/ContentFilterMac.mm:
(WebCore::contentFilterType): Added a helper function template that creates a new ContentFilterType.
(WebCore::contentFilterTypes): Registered a ContentFilterType for each type of content filter.
(WebCore::ContentFilter::createIfNeeded): Created a ContentFilterCollection containing each content filter that can handle the given response.
(WebCore::ContentFilterCollection::ContentFilterCollection): Constructs a ContentFilterCollection given a Vector of content filters.
(WebCore::ContentFilterCollection::addData): Forwarded the call to each content filter in m_contentFilters.
(WebCore::ContentFilterCollection::finishedAddingData): Ditto.
(WebCore::ContentFilterCollection::needsMoreData): Ditto.
(WebCore::ContentFilterCollection::didBlockData): Ditto.
(WebCore::ContentFilterCollection::getReplacementData): Returned replacement data for the first filter that blocked the load.
If no filter blocked the load, returned the first filter's replacement data.
(WebCore::ContentFilterCollection::unblockHandler): Returned the unblock handler for the first filter that blocked the load.
(WebCore::ContentFilter::ContentFilter): Deleted.
(WebCore::ContentFilter::~ContentFilter): Deleted.
(WebCore::ContentFilter::canHandleResponse): Deleted.
(WebCore::ContentFilter::addData): Deleted.
(WebCore::ContentFilter::finishedAddingData): Deleted.
(WebCore::ContentFilter::needsMoreData): Deleted.
(WebCore::ContentFilter::didBlockData): Deleted.
(WebCore::ContentFilter::getReplacementData): Deleted.
(WebCore::ContentFilter::unblockHandler): Deleted.

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

4 years agoSwitch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
ddkilzer@apple.com [Wed, 4 Mar 2015 22:41:24 +0000 (22:41 +0000)]
Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
<http://webkit.org/b/141870>

Reviewed by Alex Christensen.

* Configurations/WebCore.unexp:
- Remove all weak symbols for CoreMedia.framework as they should
  no longer appear.

* Modules/plugins/QuickTimePluginReplacement.mm:
* platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
- Clean up headers.

* platform/cf/CoreMediaSoftLink.cpp:
* platform/cf/CoreMediaSoftLink.h:
- Add soft-link functions and constants from remaining source
  files.

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
* platform/mac/PlatformClockCM.mm:
* platform/mediastream/mac/AVMediaCaptureSource.mm:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
- Switch to using CoreMediaSoftLink.h.

* platform/mac/SoftLinking.h:
* platform/win/SoftLinking.h:
- Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}()
  macros since it won't work with const structs.

* platform/spi/cf/CoreMediaSPI.h:
- Add SPI declarations for Windows originally from
  InbandTextTrackPrivateAVF.cpp.

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

4 years ago[JSC] Add a node for Math.log()
benjamin@webkit.org [Wed, 4 Mar 2015 22:39:28 +0000 (22:39 +0000)]
[JSC] Add a node for Math.log()
https://bugs.webkit.org/show_bug.cgi?id=142126

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-04
Reviewed by Geoffrey Garen.

This patch adds the DFG node ArithLog for LogIntrinsic.

Having a direct call to log has very little value by itself, the implementation
in DFG and FTL is a simple function call.

What is useful in ArithLog is that we know the operation is pure.
This allow us to hoist it out of loops when the argument is independent
is an invariant of the loop.

Perf wise, this patch gives:
-Kraken's imaging-darkroom: definitely 1.2372x faster.
-AsmBench's Towers.c: definitely 1.0261x faster.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
(JSC::DFG::PredictionPropagationPhase::doDoubleVoting):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithLog):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileArithLog):
* ftl/FTLOutput.h:
(JSC::FTL::Output::doubleLog):
* tests/stress/math-log-basics.js: Added.
* tests/stress/math-log-with-constants.js: Added.

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

4 years agoMove content extensions test to properly named directory.
achristensen@apple.com [Wed, 4 Mar 2015 22:10:21 +0000 (22:10 +0000)]
Move content extensions test to properly named directory.
https://bugs.webkit.org/show_bug.cgi?id=142299

Reviewed by Tim Horton.

Tools:

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest):

LayoutTests:

* TestExpectations:
* http/tests/contentextensions: Added.
* http/tests/contentextensions/basic-filter-expected.txt: Copied from platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt.
* http/tests/contentextensions/basic-filter.html: Copied from http/tests/usercontentfilter/basic-filter.html.
* http/tests/contentextensions/basic-filter.html.hson: Copied from http/tests/usercontentfilter/basic-filter.html.json.
* http/tests/contentextensions/block-cookies-basic-expected.txt: Copied from http/tests/usercontentfilter/block-cookies-basic-expected.txt.
* http/tests/contentextensions/block-cookies-basic.html: Copied from http/tests/usercontentfilter/block-cookies-basic.html.
* http/tests/contentextensions/block-cookies-basic.html.json: Copied from http/tests/usercontentfilter/block-cookies-basic.html.json.
* http/tests/contentextensions/block-cookies-send-expected.txt: Copied from http/tests/usercontentfilter/block-cookies-send-expected.txt.
* http/tests/contentextensions/block-cookies-send.html: Copied from http/tests/usercontentfilter/block-cookies-send.html.
* http/tests/contentextensions/block-cookies-send.html.json: Copied from http/tests/usercontentfilter/block-cookies-send.html.json.
* http/tests/contentextensions/css-display-none-expected.txt: Copied from http/tests/usercontentfilter/css-display-none-expected.txt.
* http/tests/contentextensions/css-display-none.html: Copied from http/tests/usercontentfilter/css-display-none.html.
* http/tests/contentextensions/css-display-none.html.json: Copied from http/tests/usercontentfilter/css-display-none.html.json.
* http/tests/usercontentfilter/basic-filter.html: Removed.
* http/tests/usercontentfilter/basic-filter.html.json: Removed.
* http/tests/usercontentfilter/block-cookies-basic-expected.txt: Removed.
* http/tests/usercontentfilter/block-cookies-basic.html: Removed.
* http/tests/usercontentfilter/block-cookies-basic.html.json: Removed.
* http/tests/usercontentfilter/block-cookies-send-expected.txt: Removed.
* http/tests/usercontentfilter/block-cookies-send.html: Removed.
* http/tests/usercontentfilter/block-cookies-send.html.json: Removed.
* http/tests/usercontentfilter/css-display-none-expected.txt: Removed.
* http/tests/usercontentfilter/css-display-none.html: Removed.
* http/tests/usercontentfilter/css-display-none.html.json: Removed.
* platform/mac-wk2/TestExpectations:
* platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt: Removed.

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

4 years agoUnreviewed, rolling out r181001 and r181003.
commit-queue@webkit.org [Wed, 4 Mar 2015 21:47:30 +0000 (21:47 +0000)]
Unreviewed, rolling out r181001 and r181003.
https://bugs.webkit.org/show_bug.cgi?id=142307

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

Reverted changesets:

"Make JavaScript binding get and set legacy event listener
attributes directly"
https://bugs.webkit.org/show_bug.cgi?id=142282
http://trac.webkit.org/changeset/181001

"Update bindings tests after r181001."
http://trac.webkit.org/changeset/181003

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

4 years agoMessage UI process when contentSize changes
bdakin@apple.com [Wed, 4 Mar 2015 21:45:36 +0000 (21:45 +0000)]
Message UI process when contentSize changes
https://bugs.webkit.org/show_bug.cgi?id=142294
-and corresponding-
rdar://problem/19963165

Reviewed by Andreas Kling.

This patch un-ifdefs the didChangeContentSize message so that we can use it on Mac
as well.

New private method that subclasses can override when they need to do something
with contentSize changes.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _didChangeContentSize:]):
* UIProcess/PageClient.h:

Un-ifdef.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeContentSize):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didChangeContentSize):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):

Stubs for other platforms now that the pure-virtual is un-masked.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didChangeContentSize):
* UIProcess/API/gtk/PageClientImpl.h:

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

4 years ago[Win] Rebaseline a few tests. Mark some failures.
bfulgham@apple.com [Wed, 4 Mar 2015 21:41:00 +0000 (21:41 +0000)]
[Win] Rebaseline a few tests. Mark some failures.

* platform/win/TestExpectations:
* platform/win/fast/attachment/attachment-disabled-rendering-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoFactor platform I/O out from NetworkCacheStorage
antti@apple.com [Wed, 4 Mar 2015 21:35:11 +0000 (21:35 +0000)]
Factor platform I/O out from NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=142279

Reviewed by Chris Dumez.

* NetworkProcess/cache/NetworkCacheData.h: Added.
* NetworkProcess/cache/NetworkCacheDataCocoa.mm: Added.

    NetworkCacheStorage::Data -> NetworkCacheData
    Move to files of its own.

* NetworkProcess/cache/NetworkCacheIOChannel.h: Added.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm: Added.

    Add abstraction for dispatch IO channels.

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

4 years agoOnly Heap should be in charge of deciding how to select a subspace for a type
fpizlo@apple.com [Wed, 4 Mar 2015 21:32:27 +0000 (21:32 +0000)]
Only Heap should be in charge of deciding how to select a subspace for a type
https://bugs.webkit.org/show_bug.cgi?id=142304

Reviewed by Mark Lam.

This slightly reduces the code duplication for selecting subspace based on type, and what
duplication is left is at least localized in HeapInlines.h. The immediate effect is that
the DFG and FTL don't have to duplicate this pattern.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::emitAllocateJSObject):
(JSC::DFG::SpeculativeJIT::emitAllocateVariableSizedJSObject):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::allocateObject):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::allocateObjectOfType):
(JSC::Heap::subspaceForObjectOfType):
(JSC::Heap::allocatorForObjectOfType):
* runtime/JSCellInlines.h:
(JSC::allocateCell):

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

4 years agoUpdate elapsed/remaining time displays on media inline controls on OSX.
roger_fong@apple.com [Wed, 4 Mar 2015 21:12:50 +0000 (21:12 +0000)]
Update elapsed/remaining time displays on media inline controls on OSX.
https://bugs.webkit.org/show_bug.cgi?id=142264.
<rdar://problem/19997487>
Reviewed by Dean Jackson.
Div surrounding times are set widths. A larger width is used for times that are
an hour or longer. Time elapsed is right justified. Time remaining is left justified.
Times are displayed in 11pt Helvetica Neue.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-time-remaining-display):
(audio::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-time-remaining-display.hour-long-time):
(audio::-webkit-media-controls-current-time-display.hour-long-time):
(audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time):
(audio::-webkit-media-controls-current-time-display.ten-hour-long-time):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateDuration):

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

4 years agoW3C test importer should use filesystem instead of os.walk
youenn.fablet@crf.canon.fr [Wed, 4 Mar 2015 21:02:33 +0000 (21:02 +0000)]
W3C test importer should use filesystem instead of os.walk
https://bugs.webkit.org/show_bug.cgi?id=142085

Reviewed by Bem Jones-Bey.

Added FileSystem.dirs_under to remove the use of os.walk in test importer.
Added MockFileSystem.dirs_under and MockFileSystem.getsize to enable unit testing of test importer.
Added unit test for FileSystem.dirs_under and MockFileSystem.dirs_under.

Made use of FileSystem.dirs_under within TestImporter.find_importable_tests.
Added a unit test to check that test importer is now black-box testable using a Mock system.

* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.dirs_under): Returns a list of filtered sub-directories.
(FileSystem.dirs_under.filter_all):
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.dirs_under):
(MockFileSystem.dirs_under.filter_all):
(MockFileSystem.getsize):
* Scripts/webkitpy/common/system/filesystem_mock_unittest.py:
(MockFileSystemTest.test_dirs_under):
(MockFileSystemTest.test_dirs_under.filter_dir):
* Scripts/webkitpy/common/system/filesystem_unittest.py:
(RealFileSystemTest.test_sep):
(RealFileSystemTest):
(RealFileSystemTest.test_dirs_under):
(RealFileSystemTest.test_dirs_under.filter_this_dir):
* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.do_import):
(TestImporter.find_importable_tests.should_keep_subdir):
(TestImporter.find_importable_tests):
(TestImporter.should_keep_subdir): Deleted.
(TestImporter.should_skip_file): Deleted.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_import_dir_with_empty_init_py): Added test to ensure empty __init__.py are no longer empty once imported.

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

4 years agoImplement -apple-trailing-word: -apple-partially-balanced
mmaxfield@apple.com [Wed, 4 Mar 2015 20:48:04 +0000 (20:48 +0000)]
Implement -apple-trailing-word: -apple-partially-balanced
https://bugs.webkit.org/show_bug.cgi?id=142253

Reviewed by David Hyatt.

Source/WebCore:

This patch implements a history mechanism for line breaking. In particular, this patch partitions
the updates to the current line breaking location into two kinds: conceptually new breaking locations,
and fixups to existing locations. Then, this patch remembers all the fixed up breaking locations, up
to a maximum number of remembered locations.

The patch then uses this memory to change the line-breaking selection based on the rules of
-apple-trailing-word.

Test: fast/text/trailing-word.html

* rendering/line/BreakingContextInlineHeaders.h:
Use InlineIteratorHistory as a proxy for the current breaking location. Note that all these functions
are inlined, so the overhead should be next to nothing when -apple-trailing-word is not in use.
(WebCore::BreakingContext::BreakingContext): Use InlineIteratorHistory instead of InlineIterator
(WebCore::BreakingContext::lineBreak): Ditto.
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine): Ditto
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Ditto
(WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Keeps track of historical
breaking locations
(WebCore::BreakingContext::InlineIteratorHistory::push): Remember a new breaking location
(WebCore::BreakingContext::InlineIteratorHistory::update): Update an existing breaking location
(WebCore::BreakingContext::InlineIteratorHistory::renderer): Forwarded to the current breaking location
(WebCore::BreakingContext::InlineIteratorHistory::offset): Ditto
(WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):  Ditto
(WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode): Ditto
(WebCore::BreakingContext::InlineIteratorHistory::get): Get one of the remembered breaking locations
(WebCore::BreakingContext::InlineIteratorHistory::current): Get the current breaking location
(WebCore::BreakingContext::InlineIteratorHistory::historyLength):
(WebCore::BreakingContext::InlineIteratorHistory::moveTo): Forwarded to the current breaking location.
(WebCore::BreakingContext::InlineIteratorHistory::increment): Ditto
(WebCore::BreakingContext::InlineIteratorHistory::clear): Ditto
(WebCore::BreakingContext::handleBR): Use InlineIteratorHistory instead of InlineIterator
(WebCore::BreakingContext::handleFloat): Ditto
(WebCore::BreakingContext::handleText): Use InlineIteratorHistory instead of InlineIterator
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Style
(WebCore::checkMidpoints): Use InlineIteratorHistory instead of InlineIterator
(WebCore::BreakingContext::handleEndOfLine): If -apple-trailing-word is in effect, use
optimalLineBreakLocationForTrailingWord().
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Use the remembered breaking
locations and choose the optimal one.
(WebCore::BreakingContext::lineBreakRef): Deleted.

LayoutTests:

* fast/text/trailing-word-expected.html: Added.
* fast/text/trailing-word.html: Added.

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

4 years agoUnreviewed Gardening 4th March
commit-queue@webkit.org [Wed, 4 Mar 2015 20:30:09 +0000 (20:30 +0000)]
Unreviewed Gardening 4th March

https://bugs.webkit.org/show_bug.cgi?id=142271

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-04

* platform/gtk/TestExpectations:

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

4 years agoWeb Inspector: TimelineViews should be displayed in a ContentViewContainer
burg@cs.washington.edu [Wed, 4 Mar 2015 20:24:03 +0000 (20:24 +0000)]
Web Inspector: TimelineViews should be displayed in a ContentViewContainer
https://bugs.webkit.org/show_bug.cgi?id=142290

Reviewed by Timothy Hatcher.

TimelineRecordingContentView has a bunch of logic to manage the currently visible TimelineView.
This could be delegated to a ContentViewContainer to simplify the logic. It also opens the possibility
for other views to be displayed beneath the timeline overview graphs when it makes sense to do so.

In order to be displayable in the container, TimelineView and its subclasses have been upgraded to
be ContentView subclasses. This also reduces some code duplication for basic view management.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView): Move base class instantiation pattern from TimelineView to here.
(WebInspector.ContentView.isViewable):
* UserInterface/Views/LayoutTimelineView.js: Use ContentView events and base methods.
(WebInspector.LayoutTimelineView.prototype.shown):
(WebInspector.LayoutTimelineView.prototype.hidden):
(WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/NetworkTimelineView.js: Use ContentView events and base methods.
(WebInspector.NetworkTimelineView.prototype.shown):
(WebInspector.NetworkTimelineView.prototype.hidden):
(WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/OverviewTimelineView.js: Use ContentView events and base methods.
(WebInspector.OverviewTimelineView.prototype.shown):
(WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected):
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
* UserInterface/Views/ScriptTimelineView.js: Use ContentView events and base methods.
(WebInspector.ScriptTimelineView.prototype.shown):
(WebInspector.ScriptTimelineView.prototype.hidden):
(WebInspector.ScriptTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/TimelineRecordingContentView.css: Use WebInspector.ContentViewContainer class.
(.content-view.timeline-recording > .content-view-container):
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid td):
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid table.data):
(.content-view.timeline-recording > .view-container): Deleted.
(.content-view.timeline-recording > .view-container > .timeline-view > .data-grid td): Deleted.
(.content-view.timeline-recording > .view-container > .timeline-view > .data-grid table.data): Deleted.

* UserInterface/Views/TimelineRecordingContentView.js:
Many of the changes here mirror the implementation of ClusterContentView. Searching is disabled since
none of the timeline views are currently searchable using ContentViewContainer's full-text search.

In cases where we update the current timeline view, the currentTimelineView accessor returns the
content view if a TimelineView is shown in the content view container, otherwise null.

(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
(WebInspector.TimelineRecordingContentView.prototype.get supplementalRepresentedObjects):
(WebInspector.TimelineRecordingContentView.prototype.get handleCopyEvent):
(WebInspector.TimelineRecordingContentView.prototype.get supportsSave):
(WebInspector.TimelineRecordingContentView.prototype.get saveData):
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.closed):
(WebInspector.TimelineRecordingContentView.prototype.canGoBack):
(WebInspector.TimelineRecordingContentView.prototype.canGoForward):
(WebInspector.TimelineRecordingContentView.prototype.goBack):
(WebInspector.TimelineRecordingContentView.prototype.goForward):
(WebInspector.TimelineRecordingContentView.prototype.updateLayout):
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
(WebInspector.TimelineRecordingContentView.prototype.get filterDidChange):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._timelineRemoved):
(WebInspector.TimelineRecordingContentView.prototype._timelineCountChanged):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
(WebInspector.TimelineRecordingContentView.prototype.filterDidChange): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._timelineViewSelectionPathComponentsDidChange): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._showTimelineView): Deleted.
* UserInterface/Views/TimelineView.js: Remove duplicated functionality and use ContentView equivalents instead.
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.filterUpdated):
(WebInspector.TimelineView.prototype.needsLayout):
(WebInspector.TimelineView.prototype.get representedObject): Deleted.
(WebInspector.TimelineView.prototype.get visible): Deleted.
(WebInspector.TimelineView.prototype.shown): Deleted.
(WebInspector.TimelineView.prototype.hidden): Deleted.

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

4 years agoStale entries in WeakGCMaps are keeping tons of WeakBlocks alive unnecessarily.
akling@apple.com [Wed, 4 Mar 2015 20:00:00 +0000 (20:00 +0000)]
Stale entries in WeakGCMaps are keeping tons of WeakBlocks alive unnecessarily.
<https://webkit.org/b/142115>
<rdar://problem/19992268>

Reviewed by Geoffrey Garen.

Prune stale entries from WeakGCMaps as part of every full garbage collection.
This frees up tons of previously-stuck WeakBlocks that were only sitting around
with finalized handles waiting to die.

Note that WeakGCMaps register/unregister themselves with the GC heap in their
ctor/dtor, so creating one now requires passing the VM.

Average time spent in the PruningStaleEntriesFromWeakGCMaps GC phase appears
to be between 0.01ms and 0.3ms, though I've seen a few longer ones at ~1.2ms.
It seems somewhat excessive to do this on every Eden collection, so it's only
doing work in full collections for now.

* API/JSWeakObjectMapRefInternal.h:
(OpaqueJSWeakObjectMap::create):
(OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap):
* API/JSWeakObjectMapRefPrivate.cpp:
* API/JSWrapperMap.mm:
(-[JSWrapperMap initWithContext:]):
(-[JSWrapperMap jsWrapperForObject:]): Pass VM to WeakGCMap constructor.

* JavaScriptCore.xcodeproj/project.pbxproj: Add WeakGCMapInlines.h and make
it project-private so WebCore clients can access it.

* heap/Heap.cpp:
(JSC::Heap::collect):
(JSC::Heap::pruneStaleEntriesFromWeakGCMaps): Added a new GC phase for pruning
stale entries from WeakGCMaps. This is only executed during full collections.

* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::registerWeakGCMap):
(JSC::Heap::unregisterWeakGCMap): Added a mechanism for WeakGCMaps to register
themselves with the Heap and provide a pruning callback.

* runtime/PrototypeMap.h:
(JSC::PrototypeMap::PrototypeMap):
* runtime/Structure.cpp:
(JSC::StructureTransitionTable::add): Pass VM to WeakGCMap constructor.

* runtime/JSCInlines.h: Add "WeakGCMapInlines.h"

* runtime/JSGlobalObject.cpp: Include "WeakGCMapInlines.h" so this builds.

* runtime/VM.cpp:
(JSC::VM::VM): Pass VM to WeakGCMap constructor.

* runtime/WeakGCMap.h:
(JSC::WeakGCMap::set):
(JSC::WeakGCMap::add):
(JSC::WeakGCMap::WeakGCMap): Deleted.
(JSC::WeakGCMap::gcMap): Deleted.
(JSC::WeakGCMap::gcMapIfNeeded): Deleted.
* runtime/WeakGCMapInlines.h: Added.
(JSC::WeakGCMap::WeakGCMap):
(JSC::WeakGCMap::~WeakGCMap):
(JSC::WeakGCMap::pruneStaleEntries): Moved ctor, dtor and pruning callback
to WeakGCMapInlines.h to fix interdependent header issues. Removed code that
prunes WeakGCMap at certain growth milestones and instead rely on the GC
callback for housekeeping.

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

4 years ago<attachment> title text disappears when dragging
timothy_horton@apple.com [Wed, 4 Mar 2015 19:33:46 +0000 (19:33 +0000)]
<attachment> title text disappears when dragging
https://bugs.webkit.org/show_bug.cgi?id=142263
<rdar://problem/20035515>

Reviewed by Sam Weinig.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintAttachment):
We use NSColors with CoreText, which requires that Cocoa knows the current
CGContext out-of-band (through the NSGraphicsContext currentContext mechanism).
Otherwise, sometimes (especially when dragging), it will try to apply the
text foreground color to a null context, complain to the system log, and fail
to render the text.

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

4 years ago[WebEditingTester] Add support for the find and replace bar
timothy_horton@apple.com [Wed, 4 Mar 2015 19:27:39 +0000 (19:27 +0000)]
[WebEditingTester] Add support for the find and replace bar
https://bugs.webkit.org/show_bug.cgi?id=142247

Reviewed by Enrica Casucci.

While it's not hooked up yet in WKWebView, adding support for the
find bar to WebEditingTester will help us implement that functionality.

* WebEditingTester/AppDelegate.h:
* WebEditingTester/AppDelegate.m:
(-[WebEditingAppDelegate performTextFinderAction:]):
* WebEditingTester/MainMenu.xib:
Receive performTextFinderAction: and forward it to the frontmost WebDocumentController.

* WebEditingTester/WK2WebDocumentController.m:
(-[WK2WebDocumentController awakeFromNib]):
(-[WK2WebDocumentController performTextFinderAction:]):
(-[WK2WebDocumentController findBarView]):
(-[WK2WebDocumentController setFindBarView:]):
(-[WK2WebDocumentController isFindBarVisible]):
(-[WK2WebDocumentController setFindBarVisible:]):
(-[WK2WebDocumentController findBarViewDidChangeHeight]):
(-[WK2WebDocumentController layout]):
Implement performTextFinderAction: for WebKit2, and have a NSTextFinder
pointing at the WKWebView (currently nothing will work, but the bar will
show up). Install and uninstall the bar as needed.

* WebEditingTester/WebDocument.xib:
Don't use a full-size content view. There's no need, and it makes find
bar layout harder.

* WebEditingTester/WebDocumentController.h:
* WebEditingTester/WebDocumentController.m:
(-[WebDocumentController performTextFinderAction:]):

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

4 years ago[Mac] YouTube playback at 1.5x speed has audible distortion
jer.noble@apple.com [Wed, 4 Mar 2015 19:26:22 +0000 (19:26 +0000)]
[Mac] YouTube playback at 1.5x speed has audible distortion
https://bugs.webkit.org/show_bug.cgi?id=142280

Reviewed by Eric Carlson.

Use the high-quality AVAudioTimePitchAlgorithmSpectral algorithm for the
AVSampleBufferAudioRenderer rather than its default value of
AVAudioTimePitchAlgorithmTimeDomain.

Drive-by fix:

Might as well add support for MediaPlayer::setPreservesPitch() while we're
changing the audio pitch algorithm. If preservesPitch() is false use the
AVAudioTimePitchAlgorithmVarispeed algorithm in both AVFObjC-based media players
(MediaPlayerPrivateAVFoundationObjC & MediaPlayerPrivateMediaSourceAVFObjC).

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):

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

4 years ago[MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors...
jer.noble@apple.com [Wed, 4 Mar 2015 19:22:59 +0000 (19:22 +0000)]
[MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
https://bugs.webkit.org/show_bug.cgi?id=142285

Reviewed by Eric Carlson.

When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
underlying AVStreamSession is invalidated, the decryption context for in-flight
CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
asynchronously the next time the layer needs new samples.

Add a workaround until framework-level support lands to fully flush enqueued and
encrypted frames.

When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
check to see if the session has been stopped. If so, and if the error in question is
one that indicates that the samples decryption context has been invalidated, suppress
the error and instruct the sender to suppress the error as well. This workaround will
be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>

Still, we'll make our best effort to flush undisplayed frames when our CDM session is
invalidated. Move away from std::map and instead use HashMap to store the set of
AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
the HashMap's set of values.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
    error code and bail before issuing the error.
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
    the layer is in the set of listened-to layers only back in the main thread; the
    listnener may have been unregistered by the time the main thread was called.
(WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
    layers and audio renderers.
(WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
    asked to ignore the error, and if so, bail.
(WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.

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