WebKit-https.git
6 years agoLast gardening after r177774
mmaxfield@apple.com [Mon, 2 Mar 2015 23:51:23 +0000 (23:51 +0000)]
Last gardening after r177774

Unreviewed.

* fast/text/font-kerning-expected.html:
* fast/text/font-variant-ligatures-expected.html:
* fast/text/whitespace/inline-whitespace-wrapping-7-expected.html:
* fast/text/whitespace/inline-whitespace-wrapping-7.html:
* mathml/presentation/scripts-subsup-expected.html:
* mathml/presentation/scripts-subsup.html:
* platform/mac/TestExpectations:
* platform/mac/fast/text/multiple-codeunit-vertical-upright-expected.html:
* platform/mac/fast/text/multiple-codeunit-vertical-upright.html:
* platform/mac/fast/text/resources/multiple-codeunit-vertical-upright.otf: Removed.
* svg/text/svg-font-word-rounding-hacks-spaces-expected.html:
* svg/text/svg-font-word-rounding-hacks-spaces.html:
* svg/text/tspan-outline-expected.svg:
* svg/text/tspan-outline.html:

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

6 years agoFTL should correctly document where it puts the argument count for inlined varargs...
fpizlo@apple.com [Mon, 2 Mar 2015 23:49:29 +0000 (23:49 +0000)]
FTL should correctly document where it puts the argument count for inlined varargs frames
https://bugs.webkit.org/show_bug.cgi?id=142187

Reviewed by Geoffrey Garn.

After LLVM tells us where the captured variables alloca landed in the frame, we need to
tell all of our meta-data about it. We were forgetting to do so for the argument count
register, which is used by inlined varargs calls.

* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* tests/stress/inline-varargs-get-arguments.js: Added.
(foo):
(bar):
(baz):

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

6 years agoMove scroll animating functions from ScrollAnimator to ScrollController
bfulgham@apple.com [Mon, 2 Mar 2015 23:49:24 +0000 (23:49 +0000)]
Move scroll animating functions from ScrollAnimator to ScrollController
https://bugs.webkit.org/show_bug.cgi?id=142102
<rdar://problem/20007161>

Reviewed by Simon Fraser.

No change in functionality.

Do some refactoring of the various scrolling classes:
1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
   and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
3. Move code from ScrollAnimator{Mac} -> ScrollController.
4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
5. Rename immediateScrollInAxis -> immediateScrollOnAxis

* WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
* page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
events, just as is done for the "event not handled" case in EventHandler.cpp.
(WebCore::EventHandler::platformCompleteWheelEvent):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
methods, now that ScrollController is controlling this state.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
need to clean up the CFRunLoopTimer.
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
until Bug 141973 is completed.).
(WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
(WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::ScrollAnimator):
(WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
(WebCore::ScrollAnimator::handleWheelEvent): Ditto.
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
(WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
(WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
(WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
(WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
(WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
(WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
(WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
(WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
* platform/ScrollAnimator.h:
* platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
* platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
(WebCore::ScrollController::ScrollController): Update to initialize new timers.
(WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
(WebCore::ScrollController::startSnapRubberbandTimer): Added.
(WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
require client to maintain timers.
(WebCore::ScrollController::snapRubberBand): Ditto.
(WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
(WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
(WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
(WebCore::ScrollController::stopScrollSnapTimer):  Ditto. Also updated to use RunLoop::Timer.
(WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
(WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
(WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
(WebCore::ScrollController::immediateScrollOnAxis): Ditto.
* platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
* platform/mac/AxisScrollSnapAnimator.mm: Ditto.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
controlled in the ScrollController)
(WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
(WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
* platform/mac/ScrollController.h: Removed.
* platform/mac/ScrollController.mm: Removed.

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

6 years agoThe InspectorTimelineAgent should gracefully handle attempts to start more than once.
mark.lam@apple.com [Mon, 2 Mar 2015 23:39:47 +0000 (23:39 +0000)]
The InspectorTimelineAgent should gracefully handle attempts to start more than once.
<https://webkit.org/b/142189>

Reviewed by Joseph Pecoraro.

Source/WebCore:

No new tests.  Unskipped an existing test that already asserts this.

InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
case the InspectorTimelineAgent is already disabled. Similarly,
InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
is already enabled before proceeding to do work to enable it. Though wasteful,
it is legal for clients of the InspectorTimelineAgent to invoke start on it more
than once. Hence, this check is needed.

This check fixes the debug assertion failure when running the
inspector/timeline/debugger-paused-while-recording.html test. The test can now
be unskipped.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart):

LayoutTests:

* TestExpectations:
- Unskipped inspector/timeline tests.

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

6 years ago[Win] Skip media control test after r180893.
bfulgham@apple.com [Mon, 2 Mar 2015 23:35:53 +0000 (23:35 +0000)]
[Win] Skip media control test after r180893.

* platform/win/TestExpectations:

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

6 years agoReturn disk cache entries from the new disk cache
andersca@apple.com [Mon, 2 Mar 2015 23:25:07 +0000 (23:25 +0000)]
Return disk cache entries from the new disk cache
https://bugs.webkit.org/show_bug.cgi?id=142190

Reviewed by Antti Koivisto.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
Call NetworkCache::traverse() to get all the cache entries, unique their origins and pass them back with the completion handler.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::traverse):
New helper function that traverses network cache entries.

* NetworkProcess/cache/NetworkCache.h:

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

6 years agoUpdate backgrounds of sliders for inline media controls on OS X.
roger_fong@apple.com [Mon, 2 Mar 2015 22:54:50 +0000 (22:54 +0000)]
Update backgrounds of sliders for inline media controls on OS X.
https://bugs.webkit.org/show_bug.cgi?id=142188.
<rdar://problem/20012413>
Reviewed by Dean Jackson.
Don’t use CSS to draw volume and timeline slider backgrounds.
* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
(audio::-webkit-media-controls-panel .thumbnail-track):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): Deleted.
(audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): Deleted.
Draw volume and timeline slider backgrounds using 2d canvases.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleVolumeSliderInput):
(Controller.prototype.addRoundedRect):
(Controller.prototype.drawTimelineBackground):
(Controller.prototype.drawVolumeBackground):
(Controller.prototype.showControls):
* Modules/mediacontrols/mediaControlsiOS.js:

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

6 years agoDeduplicate slow path calling code in JITOpcodes.cpp/JITOpcodes32_64.cpp
fpizlo@apple.com [Mon, 2 Mar 2015 22:52:56 +0000 (22:52 +0000)]
Deduplicate slow path calling code in JITOpcodes.cpp/JITOpcodes32_64.cpp
https://bugs.webkit.org/show_bug.cgi?id=142184

Reviewed by Michael Saboff.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_enumerable_length):
(JSC::JIT::emitSlow_op_has_structure_property):
(JSC::JIT::emit_op_has_generic_property):
(JSC::JIT::emit_op_get_structure_property_enumerator):
(JSC::JIT::emit_op_get_generic_property_enumerator):
(JSC::JIT::emit_op_to_index_string):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_enumerable_length): Deleted.
(JSC::JIT::emitSlow_op_has_structure_property): Deleted.
(JSC::JIT::emit_op_has_generic_property): Deleted.
(JSC::JIT::emit_op_get_structure_property_enumerator): Deleted.
(JSC::JIT::emit_op_get_generic_property_enumerator): Deleted.
(JSC::JIT::emit_op_to_index_string): Deleted.
(JSC::JIT::emit_op_profile_control_flow): Deleted.

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

6 years ago[Win] Document more debug assertions.
bfulgham@apple.com [Mon, 2 Mar 2015 22:28:34 +0000 (22:28 +0000)]
[Win] Document more debug assertions.

* platform/win/TestExpectations:

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

6 years agoSkip media control tests for now while new look is being finalized.
bfulgham@apple.com [Mon, 2 Mar 2015 22:10:55 +0000 (22:10 +0000)]
Skip media control tests for now while new look is being finalized.
https://bugs.webkit.org/show_bug.cgi?id=142138.

Patch by Roger Fong <roger_fong@apple.com> on 2015-02-28
Reviewed by Dean Jackson.

* platform/mac/TestExpectations:

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

6 years agoAdd way to dump cache meta data to file
antti@apple.com [Mon, 2 Mar 2015 21:51:13 +0000 (21:51 +0000)]
Add way to dump cache meta data to file
https://bugs.webkit.org/show_bug.cgi?id=142183

Reviewed by Andreas Kling.

Source/JavaScriptCore:

Export appendQuotedJSONStringToBuilder.

* bytecompiler/NodesCodegen.cpp:
(JSC::ObjectPatternNode::toString):
* runtime/JSONObject.cpp:
(JSC::appendQuotedJSONStringToBuilder):
(JSC::Stringifier::appendQuotedString):
(JSC::escapeStringToBuilder): Deleted.
* runtime/JSONObject.h:

Source/WebKit2:

Dump goes to WebKitCache/dump.json. On OSX it can be triggered with

notifyutil -p com.apple.WebKit.Cache.dump

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::initialize):
(WebKit::NetworkCache::dumpFilePath):
(WebKit::entryAsJSON):
(WebKit::NetworkCache::dumpContentsToFile):
(WebKit::NetworkCache::clear):

    Also clear any dumps.

* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCacheStorage::baseDirectoryPath):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::fileNameForKey):
(WebKit::filePathForKey):
(WebKit::openFile):
(WebKit::openFileForKey):
(WebKit::decodeEntryHeader):

    Separate header decoding.

(WebKit::decodeEntry):
(WebKit::NetworkCacheStorage::traverse):

    Add asynchronous cache traversal inteface.

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

6 years agoUpdate inline media element controls appearance Part 1.
roger_fong@apple.com [Mon, 2 Mar 2015 21:07:33 +0000 (21:07 +0000)]
Update inline media element controls appearance Part 1.
https://bugs.webkit.org/show_bug.cgi?id=142138.
<rdar://problem/19997384>

Reviewed by Dean Jackson.

Update positioning, sizes, and background colors media control elements.
Volume and timeline sliders will be drawn in a separate patch via 2d canvases.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel):
(video::-webkit-media-controls-panel):
(audio::-webkit-media-controls-rewind-button):
(audio::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-panel .mute-box):
(video::-webkit-media-controls-volume-max-button):
(audio::-webkit-media-controls-panel .volume-box):
(audio::-webkit-media-controls-panel .volume-box:active):
(video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-fullscreen-button):
(audio::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-time-remaining-display):
(audio::-webkit-media-controls-timeline-container .hour-long-time): Deleted.

Skip media control tests for now while new look is being finalized.
* platform/mac/TestExpectations:

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

6 years agoWebsiteDataStore should handle deleting cookies
andersca@apple.com [Mon, 2 Mar 2015 20:45:18 +0000 (20:45 +0000)]
WebsiteDataStore should handle deleting cookies
https://bugs.webkit.org/show_bug.cgi?id=142185

Reviewed by Beth Dakin.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
When asked to delete cookies, do so.

* NetworkProcess/NetworkProcess.h:
Update the deleteWebsiteDataForOrigins signature.

* NetworkProcess/NetworkProcess.messages.in:
Add cookieHostNames to DeleteWebsiteDataForOrigins.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/Network/NetworkProcessProxy.h:
Update to take a vector of cookie host names.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
Figure out if we need to ask the network process to delete data.

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

6 years agoWeb Inspector: Add Context Menus to Object Tree properties
joepeck@webkit.org [Mon, 2 Mar 2015 19:32:49 +0000 (19:32 +0000)]
Web Inspector: Add Context Menus to Object Tree properties
https://bugs.webkit.org/show_bug.cgi?id=142125

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::functionDetails):
Update to include columnNumber.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired):
(WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired.revealFunction):
Fix legacy implementation.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
Give prototype buttons a tooltip.

(WebInspector.ObjectTreePropertyTreeElement.prototype.oncontextmenu):
(WebInspector.ObjectTreePropertyTreeElement.prototype._contextMenuHandler):
(WebInspector.ObjectTreePropertyTreeElement.prototype._appendMenusItemsForObject):
Context Menus based on the selected object.

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

6 years ago[Win] Document more debug assertions.
bfulgham@apple.com [Mon, 2 Mar 2015 19:08:06 +0000 (19:08 +0000)]
[Win] Document more debug assertions.

* platform/win/TestExpectations:

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

6 years agoWebsiteDataStore should support getting cookie host names
andersca@apple.com [Mon, 2 Mar 2015 18:42:12 +0000 (18:42 +0000)]
WebsiteDataStore should support getting cookie host names
https://bugs.webkit.org/show_bug.cgi?id=142178

Reviewed by Dan Bernstein.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::fetchWebsiteData):
Assert that we're destroyed from the main thread since we end up copying the website data struct.

* Shared/WebsiteData/WebsiteData.cpp:
(WebKit::WebsiteData::encode):
(WebKit::WebsiteData::decode):
* Shared/WebsiteData/WebsiteData.h:
Add a hostnamesWithCookies member.

* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(WebKit::WebsiteDataRecord::displayNameForCookieHostName):
Add a new function that will return the display name for a cookie host name.

(WebKit::WebsiteDataRecord::addCookieHostName):
* UIProcess/WebsiteData/WebsiteDataRecord.h:
Add a hash set of cookie host names.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Create data records for each host name with cookies.

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

6 years agoFix a typo in TestExpectations.
ap@apple.com [Mon, 2 Mar 2015 18:18:16 +0000 (18:18 +0000)]
Fix a typo in TestExpectations.

* platform/mac/TestExpectations: Faiure - > Failure.

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

6 years agojs/promises-tests/promises-tests-2-1-2.html sometimes times out
ap@apple.com [Mon, 2 Mar 2015 17:52:02 +0000 (17:52 +0000)]
js/promises-tests/promises-tests-2-1-2.html sometimes times out
https://bugs.webkit.org/show_bug.cgi?id=142175

* TestExpectations: Marking as flaky.

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

6 years ago[WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
jer.noble@apple.com [Mon, 2 Mar 2015 17:39:10 +0000 (17:39 +0000)]
[WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
https://bugs.webkit.org/show_bug.cgi?id=141907

Reviewed by Tim Horton.

At some point, the window/view/page visibility update code was refactored such that setting
WebPageProxy::setSuppressVisibilityUpdate() no longer suppressed visibility updates. This causes
full screen animations to become "flashy" when moving the WebView between the regular and full
screen window, as a HTMLMediaElement in the full screen animation will receive a "!visible"
notification and disconnect its rendering pipeline.

In WebPageProxy::viewStateDidChange(), respect m_suppressVisibilityUpdates and bail out early
if set. In WebPageProxy::setSuppressVisibilityUpdates(), trigger an explicit update after
clearing m_suppressVisibilityUpdates.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSuppressVisibilityUpdates):
(WebKit::WebPageProxy::viewStateDidChange):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::setSuppressVisibilityUpdates): Deleted.

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

6 years ago[WK1][WK2][Mac] Fullscreen animation is incorrect when page is scaled.
jer.noble@apple.com [Mon, 2 Mar 2015 17:37:14 +0000 (17:37 +0000)]
[WK1][WK2][Mac] Fullscreen animation is incorrect when page is scaled.
https://bugs.webkit.org/show_bug.cgi?id=142121

Reviewed by Simon Fraser.

Source/WebKit/mac:

Fullscreening a page with a non-1 scale would result in that scale being applied to the
fullscreen content, breaking fullscreen mode. Set the page scale to 1 when entering
fullscreen and reset it to the original value when exiting fullscreen.

* WebView/WebFullScreenController.h:
* WebView/WebFullScreenController.mm:
(-[WebFullScreenController enterFullScreen:]): Set the page scale to 1.
(-[WebFullScreenController finishedExitFullScreenAnimation:]): Reset the page
        scale to the original value.
* WebView/WebView.mm:
(-[WebView _supportsFullScreenForElement:withKeyboard:]): Drive-by fix. Check the
        WebView's own preferences to see if fullscreen mode is enabled, rather than
        the global object's.

Source/WebKit2:

Change the order of operations when entering or exiting fullscreen. Change the page scale to
1 before entering, so the final screen rect takes that scale into account, and vice-versa on
exiting.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController exitFullScreen]):

Tools:

Add a test which changes the WebView's page scale, then enters fullscreen mode, and verifies
that the initial and final screen rects for the web content are as expected.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.html: Added.
* TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm: Added.
(-[FullscreenStateDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
(runJavaScriptAlert):
(TestWebKitAPI::FullscreenZoomInitialFrame::initializeView):
(TestWebKitAPI::FullscreenZoomInitialFrame::teardownView):
(TestWebKitAPI::FullscreenZoomInitialFrame::setPageScale):
(TestWebKitAPI::FullscreenZoomInitialFrame::sendMouseDownEvent):
(TestWebKitAPI::FullscreenZoomInitialFrame::runTest):
(TestWebKitAPI::TEST_F):

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

6 years agoREGRESSION(r179409): [GTK] Undefined symbol prevents web extensions from being loaded
commit-queue@webkit.org [Mon, 2 Mar 2015 15:34:25 +0000 (15:34 +0000)]
REGRESSION(r179409): [GTK] Undefined symbol prevents web extensions from being loaded
https://bugs.webkit.org/show_bug.cgi?id=142165

Patch by Debarshi Ray <debarshir@gnome.org> on 2015-03-02
Reviewed by Carlos Garcia Campos.

* Source/cmake/gtksymbols.filter:

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

6 years agoREGRESSION (r180882): Build failure: Methods not marked override in GraphicsLayerCA.h
ddkilzer@apple.com [Mon, 2 Mar 2015 15:30:12 +0000 (15:30 +0000)]
REGRESSION (r180882): Build failure: Methods not marked override in GraphicsLayerCA.h
<http://webkit.org/b/138684>

Fixes the following build failures:

    In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
    In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
    In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
    WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:123:33: error: 'setShapeLayerPath' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
        WEBCORE_EXPORT virtual void setShapeLayerPath(const Path&);
                                    ^
    In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
    In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
    In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
    WebCore.framework/PrivateHeaders/GraphicsLayer.h:390:18: note: overridden virtual function is here
        virtual void setShapeLayerPath(const Path&);
                     ^
    In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
    In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
    In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
    WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:124:33: error: 'setShapeLayerWindRule' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
        WEBCORE_EXPORT virtual void setShapeLayerWindRule(WindRule);
                                    ^
    In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
    In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
    In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
    WebCore.framework/PrivateHeaders/GraphicsLayer.h:393:18: note: overridden virtual function is here
        virtual void setShapeLayerWindRule(WindRule);
                     ^
    2 errors generated.

* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayer::setShapeLayerPath): Mark as override.
(WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.

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

6 years agoMake clip-path work on <video>, <canvas> etc.
simon.fraser@apple.com [Mon, 2 Mar 2015 06:35:20 +0000 (06:35 +0000)]
Make clip-path work on <video>, <canvas> etc.
https://bugs.webkit.org/show_bug.cgi?id=138684

Reviewed by Darin Adler.

Source/WebCore:

clip-path only worked in compositing layers on the painted contents of the layer,
and failed to clip children. Fix this by translating the clip path into a Path
which is set on a CA shape layer (for Mac and iOS), or painted into the
RenderLayerBacking's mask layer. There are two code paths:

1. clip-path which is a <basic-shape> or <geometry-box>, and no mask.
    Here we can use the optimal code path of converting the clip into a path
    that is put onto a CAShapeLayer, which is then used as a mask. There is no
    additional backing store.
2. clip-path with an SVG reference, or clip-path combined with -webkit-mask:
    Here we have to allocate backing store for the mask layer, and paint the
    clip path (possibly with the mask).

We add GraphicsLayer::Type::Shape, and add a getter for the layer type.

Tests: compositing/masks/compositing-clip-path-and-mask.html
       compositing/masks/compositing-clip-path-mask-change.html
       compositing/masks/compositing-clip-path.html
       compositing/masks/reference-clip-path-on-composited.html

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer): Store the type in the layer so the getter can return it.
(WebCore::GraphicsLayer::shapeLayerPath): Get and set the shape layer path.
(WebCore::GraphicsLayer::setShapeLayerPath): Ditto.
(WebCore::GraphicsLayer::shapeLayerWindRule): Get and set the shape layer wind rule.
(WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::type): Expose the type.
(WebCore::GraphicsLayer::supportsLayerType): Allow the cross-platform code to use
shape layers when it knows they are available.
(WebCore::GraphicsLayer::needsClippingMaskLayer): Deleted. This was never used.
* platform/graphics/GraphicsLayerClient.h: Align the bits (helps avoid typos). Add a
GraphicsLayerPaintClipPath phase.
* platform/graphics/Path.h: Some exports since WK2 needs to encode Paths now.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::initialize): Make shape layers.
(WebCore::GraphicsLayerCA::setShapeLayerPath): Setter for the shape path. Sadly we
can't early return on unchanged paths yet.
(WebCore::GraphicsLayerCA::setShapeLayerWindRule):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Updates for shape path
and wind rule.
(WebCore::GraphicsLayerCA::updateShape):
(WebCore::GraphicsLayerCA::updateWindRule):
* platform/graphics/ca/GraphicsLayerCA.h: Some new dirty bits for shape path and wind rule.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Got rid of lots of m_layer.get().
(PlatformCALayerMac::~PlatformCALayerMac):
(PlatformCALayerMac::setNeedsDisplay):
(PlatformCALayerMac::setNeedsDisplayInRect):
(PlatformCALayerMac::removeFromSuperlayer):
(PlatformCALayerMac::setSublayers):
(PlatformCALayerMac::removeAllSublayers):
(PlatformCALayerMac::appendSublayer):
(PlatformCALayerMac::insertSublayer):
(PlatformCALayerMac::replaceSublayer):
(PlatformCALayerMac::adoptSublayers):
(PlatformCALayerMac::addAnimationForKey):
(PlatformCALayerMac::removeAnimationForKey):
(PlatformCALayerMac::animationForKey):
(PlatformCALayerMac::setMask):
(PlatformCALayerMac::isOpaque):
(PlatformCALayerMac::setOpaque):
(PlatformCALayerMac::bounds):
(PlatformCALayerMac::setBounds):
(PlatformCALayerMac::position):
(PlatformCALayerMac::setPosition):
(PlatformCALayerMac::anchorPoint):
(PlatformCALayerMac::setAnchorPoint):
(PlatformCALayerMac::transform):
(PlatformCALayerMac::setTransform):
(PlatformCALayerMac::sublayerTransform):
(PlatformCALayerMac::setSublayerTransform):
(PlatformCALayerMac::setHidden):
(PlatformCALayerMac::setGeometryFlipped):
(PlatformCALayerMac::isDoubleSided):
(PlatformCALayerMac::setDoubleSided):
(PlatformCALayerMac::masksToBounds):
(PlatformCALayerMac::setMasksToBounds):
(PlatformCALayerMac::acceleratesDrawing):
(PlatformCALayerMac::setAcceleratesDrawing):
(PlatformCALayerMac::contents):
(PlatformCALayerMac::setContents):
(PlatformCALayerMac::setContentsRect):
(PlatformCALayerMac::setMinificationFilter):
(PlatformCALayerMac::setMagnificationFilter):
(PlatformCALayerMac::backgroundColor):
(PlatformCALayerMac::setBackgroundColor):
(PlatformCALayerMac::setBorderWidth):
(PlatformCALayerMac::setBorderColor):
(PlatformCALayerMac::opacity):
(PlatformCALayerMac::setOpacity):
(PlatformCALayerMac::copyFiltersFrom):
(PlatformCALayerMac::setName):
(PlatformCALayerMac::setSpeed):
(PlatformCALayerMac::setTimeOffset):
(PlatformCALayerMac::contentsScale):
(PlatformCALayerMac::setContentsScale):
(PlatformCALayerMac::cornerRadius):
(PlatformCALayerMac::setCornerRadius):
(PlatformCALayerMac::setEdgeAntialiasingMask):
(PlatformCALayerMac::shapeWindRule): New function.
(PlatformCALayerMac::setShapeWindRule): Ditto.
(PlatformCALayerMac::shapePath): Ditto.
(PlatformCALayerMac::setShapePath): Ditto.
(PlatformCALayer::isWebLayer):
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::Path): nullptr.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintsWithClipPath): Return true if the clip path is painted.
(WebCore::RenderLayer::computeClipPath): Factor code that computes the clip path into this
function, so we can call it from RenderLayerBacking too.
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::paintLayerContents): We only want to apply the clip path
for painting when we're either painting a non-composited layer, or we're painting the
mask layer of a composited layer. We in the latter case, we just want to fill the clip
path with black, so re-use the paintChildClippingMaskForFragments() which does this.
* rendering/RenderLayer.h: Align the bits, add PaintLayerPaintingCompositingClipPathPhase.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateGeometry): Move mask updating into its own function.
(WebCore::RenderLayerBacking::updateMaskingLayerGeometry): If we're using the shape layer
code path, compute the Path and set it and the wind rule on the mask layer.
(WebCore::RenderLayerBacking::updateMaskingLayer): This is now more complex, as it has
to deal with combinations of clip-path and mask, some of which allow for the shape layer
mask, and we handle dynamic changes between these and painted masks.
(WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer): Include the GraphicsLayerPaintClipPath phase.
(WebCore::RenderLayerBacking::paintIntoLayer): Map GraphicsLayerPaintClipPath to PaintLayerPaintingCompositingClipPathPhase.
(WebCore::RenderLayerBacking::updateMaskLayer): Deleted.
* rendering/RenderLayerBacking.h:

Source/WebKit2:

Support encode/decode for WebCore Path objects, which is done by traversing
the path.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::pathPointCountApplierFunction):
(IPC::pathEncodeApplierFunction):
(IPC::ArgumentCoder<Path>::encode):
(IPC::ArgumentCoder<Path>::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer): Actually apply the path and wind rule to the shape layer.
* Shared/mac/RemoteLayerTreeTransaction.h: Include path and wind rule in the layer properties.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode): Encode shape and wind rule.
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Decode shape and wind rule.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::shapePath):
(WebKit::PlatformCALayerRemote::setShapePath):
(WebKit::PlatformCALayerRemote::shapeWindRule):
(WebKit::PlatformCALayerRemote::setShapeWindRule):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:

LayoutTests:

Tests for various combinations of clip-path and mask, and dynamic changes
thereof.

* compositing/masks/compositing-clip-path-and-mask-expected.html: Added.
* compositing/masks/compositing-clip-path-and-mask.html: Added.
* compositing/masks/compositing-clip-path-expected.html: Added.
* compositing/masks/compositing-clip-path-mask-change-expected.html: Added.
* compositing/masks/compositing-clip-path-mask-change.html: Added.
* compositing/masks/compositing-clip-path.html: Added.
* compositing/masks/reference-clip-path-on-composited-expected.html: Added.
* compositing/masks/reference-clip-path-on-composited.html: Added.

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

6 years ago[Cairo] Implement Path::addEllipse
commit-queue@webkit.org [Mon, 2 Mar 2015 04:33:06 +0000 (04:33 +0000)]
[Cairo] Implement Path::addEllipse
https://bugs.webkit.org/show_bug.cgi?id=142144

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-03-01
Reviewed by Gyuyoung Kim.

Add support for addEllipse method for platforms using cairo.

* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::addEllipse):

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

6 years agoUnreviewed EFL gardening. Mark crash tests of webgl to CRASH.
gyuyoung.kim@samsung.com [Mon, 2 Mar 2015 03:56:45 +0000 (03:56 +0000)]
Unreviewed EFL gardening. Mark crash tests of webgl to CRASH.
WebGL isn't supported by EFL port now.

* platform/efl/TestExpectations:

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

6 years agoSilence non-fatal errors about failing to create WebKitPluginHost.app and WebKitPlugi...
mitz@apple.com [Mon, 2 Mar 2015 02:59:31 +0000 (02:59 +0000)]
Silence non-fatal errors about failing to create WebKitPluginHost.app and WebKitPluginAgent symlinks.

Rubber-stamped by Alexey Proskuryakov.

* WebKit.xcodeproj/project.pbxproj: If a link already exist, don’t try to create it.

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

6 years agoBytecodeGenerator shouldn't emit op_resolve_scope as a roundabout way of returning...
fpizlo@apple.com [Mon, 2 Mar 2015 02:08:26 +0000 (02:08 +0000)]
BytecodeGenerator shouldn't emit op_resolve_scope as a roundabout way of returning the scopeRegister
https://bugs.webkit.org/show_bug.cgi?id=142153

Reviewed by Michael Saboff.

We don't need a op_resolve_scope if we know that it will simply return the scope register.
This changes the BytecodeGenerator to use the scope register directly in those cases where
we know statically that we would just have returned that from op_resolve_scope.

This doesn't appear to have a significant impact on performance.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitResolveScope):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::emitGetOwnScope): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ResolveNode::emitBytecode):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::PostfixNode::emitResolve):
(JSC::DeleteResolveNode::emitBytecode):
(JSC::TypeOfResolveNode::emitBytecode):
(JSC::PrefixNode::emitResolve):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::AssignResolveNode::emitBytecode):
(JSC::ConstDeclNode::emitCodeSingle):
(JSC::EmptyVarExpression::emitBytecode):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::BindingNode::bindValue):

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

6 years agoUnreviewed EFL gardening on 2nd March.
gyuyoung.kim@samsung.com [Mon, 2 Mar 2015 01:53:46 +0000 (01:53 +0000)]
Unreviewed EFL gardening on 2nd March.

Mark css3 shape tests to flaky. Unskip passing tests and so on.

* platform/efl/TestExpectations:

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

6 years agoUse std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
commit-queue@webkit.org [Mon, 2 Mar 2015 01:48:54 +0000 (01:48 +0000)]
Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=142143

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

No new tests, no behavior changes.

* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::create):
* platform/ScrollAnimator.h:
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimator::create):
* platform/ScrollableArea.h:
* platform/ios/ScrollAnimatorIOS.mm:
(WebCore::ScrollAnimator::create):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimator::create):

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

6 years ago[Content Filtering] Move another declaration to WebFilterEvaluatorSPI.h
aestes@apple.com [Mon, 2 Mar 2015 01:46:22 +0000 (01:46 +0000)]
[Content Filtering] Move another declaration to WebFilterEvaluatorSPI.h
https://bugs.webkit.org/show_bug.cgi?id=142066

Reviewed by Andreas Kling.

* platform/ios/ContentFilterIOS.mm:
* platform/spi/cocoa/WebFilterEvaluatorSPI.h:

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

6 years agoMake NotificationCenter / Notification suspendable
cdumez@apple.com [Mon, 2 Mar 2015 00:08:03 +0000 (00:08 +0000)]
Make NotificationCenter / Notification suspendable
https://bugs.webkit.org/show_bug.cgi?id=142117
<rdar://problem/19923085>

Reviewed by Andreas Kling.

Source/WebCore:

Make NotificationCenter / Notification suspendable so that pages using
them can enter the PageCache.

NotificationCenter can safely be suspended if there are no pending
permission requests. This required adding an
"hasPendingPermissionRequests()" callback to the NotificationClient.

Notification can safely be suspended if it is either idle (not showing
yet) or closed.

Tests: fast/history/page-cache-notification-non-suspendable.html
       fast/history/page-cache-notification-suspendable.html

* Modules/notifications/Notification.cpp:
(WebCore::Notification::canSuspend):
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::canSuspend):
* Modules/notifications/NotificationClient.h:

Source/WebKit/mac:

Provide implementation for NotificationClient::hasPendingPermissionRequests().
The implementation is very simplistic. it will only return false if no
request for permission for ever made. This is because there is currently no
easy way to figure out if a permission request is pending or not.

* WebCoreSupport/WebNotificationClient.h:
* WebCoreSupport/WebNotificationClient.mm:
(WebNotificationClient::requestPermission):
(WebNotificationClient::hasPendingPermissionRequests):

Source/WebKit/win:

Provide implementation for NotificationClient::hasPendingPermissionRequests().

* WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
(WebDesktopNotificationsDelegate::requestPermission):
(hasPendingPermissionRequests):
* WebCoreSupport/WebDesktopNotificationsDelegate.h:

Source/WebKit2:

Provide implementation for NotificationClient::hasPendingPermissionRequests().

* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::hasPendingPermissionRequests):
* WebProcess/Notifications/NotificationPermissionRequestManager.h:
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::hasPendingPermissionRequests):
* WebProcess/WebCoreSupport/WebNotificationClient.h:

LayoutTests:

Add layout tests to cover cases where notifications should prevent
entering the PageCache or not.

* fast/history/page-cache-notification-non-suspendable-expected.txt: Added.
* fast/history/page-cache-notification-non-suspendable.html: Added.
* fast/history/page-cache-notification-suspendable-expected.txt: Added.
* fast/history/page-cache-notification-suspendable.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 years agoEFL, GTK+, and Windows rebaselines after r180867.
rniwa@webkit.org [Sun, 1 Mar 2015 22:34:12 +0000 (22:34 +0000)]
EFL, GTK+, and Windows rebaselines after r180867.

* platform/efl/TestExpectations:
* platform/efl/editing/execCommand/5142012-1-expected.txt:
* platform/efl/editing/execCommand/nsresponder-outdent-expected.txt:
* platform/efl/editing/inserting/insert-at-end-02-expected.txt:
* platform/gtk/editing/execCommand/5142012-1-expected.txt:
* platform/gtk/editing/execCommand/nsresponder-outdent-expected.txt:
* platform/gtk/editing/inserting/insert-at-end-02-expected.txt:
* platform/gtk/editing/pasteboard/4989774-expected.txt:
* platform/win/editing/execCommand/5142012-1-expected.txt:
* platform/win/editing/execCommand/nsresponder-outdent-expected.txt:
* platform/win/editing/inserting/insert-at-end-02-expected.txt:

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

6 years agoEnable new disk cache on iOS
antti@apple.com [Sun, 1 Mar 2015 21:56:14 +0000 (21:56 +0000)]
Enable new disk cache on iOS
https://bugs.webkit.org/show_bug.cgi?id=142148

Reviewed by Sam Weinig.

* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:

    iOS build fix.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):

    Disable the efficacy logging by default for now. It has significant performance impact.

* config.h:

    Enable it.

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

6 years agomedia/track/track-in-band-cues-added-once.html flakily fails
ap@apple.com [Sun, 1 Mar 2015 20:43:22 +0000 (20:43 +0000)]
media/track/track-in-band-cues-added-once.html flakily fails
https://bugs.webkit.org/show_bug.cgi?id=142152

* platform/mac/TestExpectations: Marked it as such.

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

6 years agoisContentEditable shouldn't trigger synchronous style recalc in most cases
rniwa@webkit.org [Sun, 1 Mar 2015 19:52:21 +0000 (19:52 +0000)]
isContentEditable shouldn't trigger synchronous style recalc in most cases
https://bugs.webkit.org/show_bug.cgi?id=129034

Reviewed by Antti Koivisto.

Source/WebCore:

Avoid style recalc inside isContentEditable when the document doesn't contain -webkit-user-modify or
-webkit-user-select: all. Instead, compute the value from contenteditable attributes in ancestors.
However, still compute the editability from the style tree when it's up-to-date in order to avoid
repeatedly walking up the DOM tree in a hot code path inside editing.

Test: fast/dom/HTMLElement/dynamic-editability-change.html

* css/CSSGrammar.y.in: No need to pass in "true" as we never call this function with false.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Calls parserSetUsesStyleBasedEditability as needed.
(WebCore::parseKeywordValue): Passes around StyleSheetContents*.
(WebCore::CSSParser::parseValue): Ditto.
(WebCore::CSSParser::parseFont): Ditto.

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::StyleSheetContents): Initializes and copies m_usesStyleBasedEditability.

* css/StyleSheetContents.h:
(WebCore::StyleSheetContents::parserSetUsesRemUnits): Removed the argument since it was always true.
(WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability): Added.
(WebCore::StyleSheetContents::usesStyleBasedEditability): Added.

* dom/Document.cpp:
(WebCore::Document::recalcStyle): Added a FIXME as well as a comment explaining why we don't call
setUsesStyleBasedEditability. Since Node::computeEditability triggers style recalc only when the flag
is set to true, it's too late to update the flag here.
(WebCore::Document::updateStyleIfNeeded): Uses a newly extracted needsStyleRecalc.
(WebCore::Document::updateBaseURL): Preserves m_usesStyleBasedEditability as well as m_usesRemUnit.
(WebCore::Document::usesStyleBasedEditability): Added. Returns true when inline style declarations or
any active stylesheet uses -webkit-user-modify or -webkit-user-select: all. Flushing pending stylesheet
changes here is fine because the alternative is to trigger a full blown style recalc.

* dom/Document.h:
(WebCore::Document::needsStyleRecalc): Added. Extracted from updateStyleIfNeeded.

* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::styleSheetsUseRemUnits): Deleted.
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Updates m_usesStyleBasedEditability
as well as m_usesRemUnit.

* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Added.
(WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Added.

* dom/Node.cpp:
(WebCore::computeEditabilityFromComputedStyle): Extracted from computeEditability.
(WebCore::Node::computeEditability): When the style recalc is requested and the render tree is dirty,
check if the document uses any CSS property that can affect the editability of elements. If it doesn't,
compute the editability from contenteditable attributes in the anchors via matchesReadWritePseudoClass.
Continue to use the style-based computation when the render tree isn't dirty to avoid the tree walk.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::editabilityFromContentEditableAttr): Extracted from matchesReadWritePseudoClass
to be called in Node::computeEditability. Also made it return Editability instead of boolean.
(WebCore::HTMLElement::matchesReadWritePseudoClass):
* html/HTMLElement.h:

LayoutTests:

Added a regression test to update the editability of elements dynamically. Also rebaselined
tests per style recalc timing changes.

* fast/dom/HTMLElement/dynamic-editability-change-expected.txt: Added.
* fast/dom/HTMLElement/dynamic-editability-change.html: Added.
* platform/mac/editing/execCommand/5142012-1-expected.txt: anonymous render block differences.
* platform/mac/editing/execCommand/nsresponder-outdent-expected.txt: Ditto.
* platform/mac/editing/inserting/insert-at-end-02-expected.txt: Empty render text differences.
* platform/mac/editing/pasteboard/4989774-expected.txt: Ditto.

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

6 years agoLayoutTestRealy: Prepend __XPC_ to the key, not the value!
ddkilzer@apple.com [Sun, 1 Mar 2015 19:48:55 +0000 (19:48 +0000)]
LayoutTestRealy: Prepend __XPC_ to the key, not the value!

Follow-up fix for:

LayoutTestRelay: App environment variables not set for --guard-malloc or --leaks
<http://webkit.org/b/142145>

* LayoutTestRelay/LayoutTestRelay/LTRelayController.m:
(-[LTRelayController _environmentVariables]): Fix think-o.

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

6 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Sun, 1 Mar 2015 19:12:53 +0000 (19:12 +0000)]
[Win] Unreviewed build fix.

* WebCorePrefix.h: Provide some default definitions to help build on Windows
machines with different application support libraries.

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

6 years agoLayoutTestRelay: App environment variables not set for --guard-malloc or --leaks
ddkilzer@apple.com [Sun, 1 Mar 2015 18:57:01 +0000 (18:57 +0000)]
LayoutTestRelay: App environment variables not set for --guard-malloc or --leaks
<http://webkit.org/b/142145>

Reviewed by Simon Fraser.

* LayoutTestRelay/LayoutTestRelay/LTRelayController.m:
(-[LTRelayController _environmentVariables]): Add.
(-[LTRelayController launchApp]): Use -_environmentVariables.

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

6 years ago[Win] Document some more debug assertions.
bfulgham@apple.com [Sun, 1 Mar 2015 18:28:58 +0000 (18:28 +0000)]
[Win] Document some more debug assertions.

* platform/win/TestExpectations:

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

6 years agoViewport units should not dirty style just before we do layout
simon.fraser@apple.com [Sun, 1 Mar 2015 04:36:39 +0000 (04:36 +0000)]
Viewport units should not dirty style just before we do layout
https://bugs.webkit.org/show_bug.cgi?id=141682

Reviewed by Zalan Bujtas.
Source/WebCore:

In documents using viewport units, we dirtied style every time layout changed
the size of the document. This is nonsensical, because viewport units depend on the
viewport size, not the document size.

Move the style dirtying from layout() into availableContentSizeChanged(). Hook
this up for WebKit1 by calling from -[WebFrameView _frameSizeChanged], and,
since that causes availableContentSizeChanged() to be called for WK1 for the first
time, protect the call to updateScrollbars() with a !platformWidget check.

Covered by existing viewport unit tests.

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::availableContentSizeChanged):
(WebCore::FrameView::viewportSizeForCSSViewportUnits): Add a FIXME comment. Whether
scrollbars are ignored depends on the value of the overflow property on the root element.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::availableContentSizeChanged):

Source/WebKit/mac:

* WebView/WebFrameView.mm:
(-[WebFrameView _frameSizeChanged]):

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

6 years ago[Cocoa] Purge SQLite page cache when under memory pressure.
akling@apple.com [Sun, 1 Mar 2015 02:31:16 +0000 (02:31 +0000)]
[Cocoa] Purge SQLite page cache when under memory pressure.
<https://webkit.org/b/142139>
<rdar://problem/19997739>

Reviewed by Pratik Solanki.

Call out to sqlite3 cache purging SPI on Cocoa platforms when
we need to free up some extra memory.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory):

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

6 years agoFrameView::layoutTimerFired() should update style if needed before doing layout
simon.fraser@apple.com [Sun, 1 Mar 2015 01:04:05 +0000 (01:04 +0000)]
FrameView::layoutTimerFired() should update style if needed before doing layout
https://bugs.webkit.org/show_bug.cgi?id=141688

Reviewed by Andreas Kling.

If the style recalc timer has been scheduled to fire after the layout timer,
when the layout timer fires, we might as well just do the style recalc
too. The call to updateStyleIfNeeded() will cancel the pending style
recalc timer.

This doesn't have much impact on the number of layouts (measured via PLT)
but seems like a reasonable thing to do.

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

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

6 years ago[iOS] Stop running webkit-build-directory on every layout test
ddkilzer@apple.com [Sat, 28 Feb 2015 23:06:20 +0000 (23:06 +0000)]
[iOS] Stop running webkit-build-directory on every layout test

This was originally fixed by David Farler for Bug 135409 in
r172602.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.relay_path): Mark as @memoized so it doesn't
run webkit-build-directory every time it's called.

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

6 years agoW3C importer should use filesystem instead of shutil/host
youenn.fablet@crf.canon.fr [Sat, 28 Feb 2015 22:47:40 +0000 (22:47 +0000)]
W3C importer should use filesystem instead of shutil/host
https://bugs.webkit.org/show_bug.cgi?id=142012

Reviewed by Bem Jones-Bey.

Removed direct use of python shutil and os, except for os.walk which will require its own fix.

* Scripts/webkitpy/w3c/test_importer.py:
(main):
(TestImporter.do_import):
(TestImporter.find_importable_tests):
(TestImporter.import_tests):
(TestImporter.remove_deleted_files):
(TestImporter.write_import_log):

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

6 years agoREGRESSION(r85798): Lists of crashing/timeouting/stderr tests aren't sorted
ossy@webkit.org [Sat, 28 Feb 2015 22:33:34 +0000 (22:33 +0000)]
REGRESSION(r85798): Lists of crashing/timeouting/stderr tests aren't sorted
https://bugs.webkit.org/show_bug.cgi?id=142081

Reviewed by Ryosuke Niwa.

* fast/harness/results.html:

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

6 years agoWebsiteDataStore should handle fetching and deleting local storage data
andersca@apple.com [Sat, 28 Feb 2015 22:20:17 +0000 (22:20 +0000)]
WebsiteDataStore should handle fetching and deleting local storage data
https://bugs.webkit.org/show_bug.cgi?id=142137

Reviewed by Sam Weinig.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteEntriesForOrigins):
Add a new function that deletes entries from multiple origins.

* UIProcess/Storage/StorageManager.h:
Add new members.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Fetch local storage data as well.

(WebKit::WebsiteDataStore::removeData):
Delete local storage data as well.

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

6 years agoFetch cache origins from the network process
andersca@apple.com [Sat, 28 Feb 2015 21:52:59 +0000 (21:52 +0000)]
Fetch cache origins from the network process
https://bugs.webkit.org/show_bug.cgi?id=142135

Reviewed by Dan Bernstein.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::cfURLCacheOrigins):
Add a new helper function that returns a vector of CFURL cache origins.

(WebKit::fetchDiskCacheOrigins):
Fetch the disk cache origins and pass them along to the completion handler. Currently we don't handle the new disk cache.

(WebKit::NetworkProcess::fetchWebsiteData):
Create a callback aggregator and fetch disk cache origins if we're asked for it.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessTypeForDataFetch):
New helper function that computes if we need to launch the network process in order to fetch data.

(WebKit::WebsiteDataStore::fetchData):
Fetch website data from the network process as well.

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

6 years agoUnreviewed - set svn:ignore for generated web-platform-tests files - see bug 142110
youenn.fablet@crf.canon.fr [Sat, 28 Feb 2015 21:41:42 +0000 (21:41 +0000)]
Unreviewed - set svn:ignore for generated web-platform-tests files - see bug 142110

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

6 years agoFullscreen video layers are off by one sometimes
simon.fraser@apple.com [Sat, 28 Feb 2015 20:58:51 +0000 (20:58 +0000)]
Fullscreen video layers are off by one sometimes
https://bugs.webkit.org/show_bug.cgi?id=142122
rdar://problem/19878821

Reviewed by Eric Carlson.

Convert MediaPlayer::naturalSize() to return a FloatSize, since the natural size
isn't always integral (because of preserving pixel aspect ratio etc). Fix all the media
backends to use FloatSizes for natural size. Convert the video image drawing code
paths to FloatSize, since naturalSize is used on the destination rect computation,
and painting should be floating point anyway.

Give the layer created by SourceBufferPrivateAVFObjC a name in debug builds.

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::videoWidth):
(WebCore::HTMLVideoElement::videoHeight):
(WebCore::HTMLVideoElement::paintCurrentFrameInContext):
* html/HTMLVideoElement.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::size):
(WebCore::CanvasRenderingContext2D::drawImage):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::videoFrameToImage):
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::naturalSize):
(WebCore::MediaPlayer::naturalSize):
(WebCore::MediaPlayer::paint):
(WebCore::MediaPlayer::paintCurrentFrameInContext):
(WebCore::NullMediaPlayerPrivate::paint): Deleted.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::naturalSize):
(WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::naturalSize):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::naturalSize):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::naturalSize):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::naturalSize):
(WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateQTKit::paint):
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::naturalSize):
(WebCore::MockMediaPlayerMediaSource::paint):
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::calculateIntrinsicSize):
(WebCore::RenderVideo::paintReplaced):

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

6 years agoSimplify WebResourceCacheManagerCFNet.mm code
andersca@apple.com [Sat, 28 Feb 2015 20:20:31 +0000 (20:20 +0000)]
Simplify WebResourceCacheManagerCFNet.mm code
https://bugs.webkit.org/show_bug.cgi?id=142134

Reviewed by Dan Bernstein.

- ENABLE(CACHE_PARTITIONING) is always true on Mac and iOS, so remove those #ifdefs.
- Make cfURLCacheHostNamesWithCallback and clearCFURLCacheForHostNames public
  so they can be used by the new WebsiteDataStore code in an upcoming patch.
- Change cfURLCacheHostNamesWithCallback to take an std::function instead of a block.

* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::getCacheOrigins):
* WebProcess/ResourceCache/WebResourceCacheManager.h:
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm:
(WebKit::partitionName):
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
(WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
(WebKit::WebResourceCacheManager::cfURLCacheHostNames): Deleted.

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

6 years agoUnreviewed, rolling out r180804.
commit-queue@webkit.org [Sat, 28 Feb 2015 18:45:42 +0000 (18:45 +0000)]
Unreviewed, rolling out r180804.
https://bugs.webkit.org/show_bug.cgi?id=142131

Broke nightlies (Requested by ap on #webkit).

Reverted changeset:

"[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API"
https://bugs.webkit.org/show_bug.cgi?id=141176
http://trac.webkit.org/changeset/180804

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

6 years agoUnreviewed EFL gardening 1st Mar.
gyuyoung.kim@samsung.com [Sat, 28 Feb 2015 15:05:51 +0000 (15:05 +0000)]
Unreviewed EFL gardening 1st Mar.

* platform/efl/TestExpectations:
- Unskip tests which have been passed since r180672.
- Skip compositing/webgl.

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

6 years agoW3C test importer should use filesystem to read and write files
youenn.fablet@crf.canon.fr [Sat, 28 Feb 2015 11:49:20 +0000 (11:49 +0000)]
W3C test importer should use filesystem to read and write files
https://bugs.webkit.org/show_bug.cgi?id=142084

Reviewed by Bem Jones-Bey.

Use of FileSystem.write_binary_file, read_text_file and write_text_file in lieu of open().

* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.import_tests):
(TestImporter.remove_deleted_files):
(TestImporter.write_import_log):

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

6 years agoSource/WebCore:
ossy@webkit.org [Sat, 28 Feb 2015 07:26:02 +0000 (07:26 +0000)]
Source/WebCore:
[EFL][GTK] Fix build break after r180790,180798
https://bugs.webkit.org/show_bug.cgi?id=142127

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-02-27
Reviewed by Gyuyoung Kim.

* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::addEllipse):

Source/WebKit2:
[EFL][GTK] Fix build break after r180790,180798
https://bugs.webkit.org/show_bug.cgi?id=142127

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-02-27
Reviewed by Gyuyoung Kim.

* CMakeLists.txt:

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

6 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Sat, 28 Feb 2015 07:12:47 +0000 (07:12 +0000)]
[Win] Unreviewed build fix.

Adjust project dependencies to ensure a consistent build order.

* WebKit.vcxproj/WebKit.sln:

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

6 years agoSubpixel-layout: width: max-content; property might cause unnecessary scrollbar.
zalan@apple.com [Sat, 28 Feb 2015 06:21:05 +0000 (06:21 +0000)]
Subpixel-layout: width: max-content; property might cause unnecessary scrollbar.
https://bugs.webkit.org/show_bug.cgi?id=142065

Reviewed by Simon Fraser.

Source/WebCore:

We should not pixelsnap (ceil in this case) logical coordinates during layout.
Should this cause content to be partially cut off, we need to
find the broken piece in the computation logic.

Covered by the unskipped test.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paddedLayoutOverflowRect):

LayoutTests:

Rebaseline. Scroll layer shrinks in certain cases.

* platform/mac-mavericks/editing/input/caret-at-the-edge-of-input-expected.txt:
* platform/mac-mavericks/fast/css/text-overflow-input-expected.txt:
* platform/mac-mavericks/fast/forms/basic-inputs-expected.txt:
* platform/mac-mavericks/fast/forms/control-restrict-line-height-expected.txt:
* platform/mac-mavericks/fast/forms/input-disabled-color-expected.txt:
* platform/mac-mavericks/fast/forms/search/search-size-with-decorations-expected.txt:
* platform/mac-mavericks/http/tests/navigation/javascriptlink-frames-expected.txt:
* platform/mac/TestExpectations:
* platform/mac/fast/forms/control-restrict-line-height-expected.txt:
* platform/mac/fast/forms/input-appearance-selection-expected.txt:
* platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt:
* platform/mac/fast/forms/input-type-text-min-width-expected.txt:
* platform/mac/fast/forms/minWidthPercent-expected.txt:
* platform/mac/fast/forms/search/search-size-with-decorations-expected.txt:
* platform/mac/tables/mozilla/bugs/bug96334-expected.txt:

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

6 years agoRemove unused PossiblyNull
darin@apple.com [Sat, 28 Feb 2015 06:02:30 +0000 (06:02 +0000)]
Remove unused PossiblyNull
https://bugs.webkit.org/show_bug.cgi?id=142124

Reviewed by Andreas Kling.

* WTF.vcxproj/WTF.vcxproj: Removed the file.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/PossiblyNull.h: Removed.

* wtf/FastMalloc.h: Moved everything to the left.
Moved member functions out of the TryMallocReturnValue class definition.
(WTF::TryMallocReturnValue::operator PossiblyNull<T>): Deleted.
(WTF::TryMallocReturnValue::getValue): Marked inline, changed to work
only with pointer types, not arbitrary non-pointer types.

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

6 years ago[JSC] Use the way number constants are written to help type speculation
benjamin@webkit.org [Sat, 28 Feb 2015 03:21:37 +0000 (03:21 +0000)]
[JSC] Use the way number constants are written to help type speculation
https://bugs.webkit.org/show_bug.cgi?id=142072

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-02-27
Reviewed by Filip Pizlo.

This patch changes how we interpret numeric constant based on how they appear
in the source.

Constants that are integers but written with a decimal point now carry that information
to the optimizating tiers. From there, we use that to be more aggressive about typing
math operations toward double operations.

For example, in:
    var a = x + 1.0;
    var b = y + 1;
The Add for a would be biased toward doubles, the Add for b would speculate
integer as usual.

The gains are tiny but this is a prerequisite to make my next patch useful:
-SunSpider's access-fannkuch: definitely 1.0661x faster
-SunSpider's math-cordic: definitely 1.0266x slower
    overal: might be 1.0066x slower.
-Kraken's imaging-darkroom: definitely 1.0333x faster.

* parser/Lexer.cpp:
(JSC::tokenTypeForIntegerLikeToken):
(JSC::Lexer<T>::lex):
The lexer now create two types of tokens for number: INTEGER and DOUBLE.
Those token types only carry information about how the values were
entered, an INTEGER does not have to be an integer, it is only written like one.
Large integer still end up represented as double in memory.

One trap I fell into was typing numbers like 12e3 as double. This kind of literal
is frequently used in integer-typed code, while 12.e3 would appear in double-typed
code.
Because of that, the only signals for double are: decimal point, negative zero,
and ridiculously large values.

* parser/NodeConstructors.h:
(JSC::DoubleNode::DoubleNode):
(JSC::IntegerNode::IntegerNode):
* parser/Nodes.h:
(JSC::NumberNode::value):
(JSC::NumberNode::setValue): Deleted.
Number get specialized in two new kind of nodes in the AST: IntegerNode and DoubleNode.

* bytecompiler/NodesCodegen.cpp:
(JSC::NumberNode::emitBytecode):

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createDoubleExpr):
(JSC::ASTBuilder::createIntegerExpr):
(JSC::ASTBuilder::createIntegerLikeNumber):
(JSC::ASTBuilder::createDoubleLikeNumber):
(JSC::ASTBuilder::createNumberFromBinaryOperation):
(JSC::ASTBuilder::createNumberFromUnaryOperation):
(JSC::ASTBuilder::makeNegateNode):
(JSC::ASTBuilder::makeBitwiseNotNode):
(JSC::ASTBuilder::makeMultNode):
(JSC::ASTBuilder::makeDivNode):
(JSC::ASTBuilder::makeModNode):
(JSC::ASTBuilder::makeAddNode):
(JSC::ASTBuilder::makeSubNode):
(JSC::ASTBuilder::makeLeftShiftNode):
(JSC::ASTBuilder::makeRightShiftNode):
(JSC::ASTBuilder::makeURightShiftNode):
(JSC::ASTBuilder::makeBitOrNode):
(JSC::ASTBuilder::makeBitAndNode):
(JSC::ASTBuilder::makeBitXOrNode):
(JSC::ASTBuilder::createNumberExpr): Deleted.
(JSC::ASTBuilder::createNumber): Deleted.
The AST has some optimization to resolve constants before emitting bytecode.
In the new code, the intger representation is kept if both operands where
also represented as integers.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseDeconstructionPattern):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseGetterSetter):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::printUnexpectedTokenText):
* parser/ParserTokens.h:
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createDoubleExpr):
(JSC::SyntaxChecker::createIntegerExpr):
(JSC::SyntaxChecker::createNumberExpr): Deleted.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::registerName):
(JSC::CodeBlock::constantName):
Change constantName(r, getConstant(r)) -> constantName(r) to simplify
the dump code.

(JSC::CodeBlock::dumpBytecode):
Dump thre soure representation information we have with each constant.

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::shrinkToFit):
(JSC::constantName): Deleted.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::constantsSourceCodeRepresentation):
(JSC::CodeBlock::addConstant):
(JSC::CodeBlock::addConstantLazily):
(JSC::CodeBlock::constantSourceCodeRepresentation):
(JSC::CodeBlock::setConstantRegisters):

* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::addConstant):
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation):
(JSC::UnlinkedCodeBlock::shrinkToFit):

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addConstantValue):
(JSC::BytecodeGenerator::emitLoad):
* bytecompiler/BytecodeGenerator.h:
We have to differentiate between constants that have the same values but are
represented differently in the source. Values like 1.0 and 1 now end up
as different constants.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::get):
(JSC::DFG::ByteCodeParser::addConstantToGraph):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::registerFrozenValues):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::addSpeculationMode):
(JSC::DFG::Graph::addImmediateShouldSpeculateInt32):
ArithAdd is very aggressive toward using Int52, which is quite useful
in many benchmarks.

Here we need to specialize to make sure we don't force our literals
to Int52 if there were represented as double.

There is one exception to that rule: when the other operand is guaranteed
to come from a NodeResultInt32. This is because there is some weird code
doing stuff like:
    var b = a|0;
    var c = b*2.0;

* dfg/DFGNode.h:
(JSC::DFG::Node::Node):
(JSC::DFG::Node::setOpAndDefaultFlags):
(JSC::DFG::Node::sourceCodeRepresentation):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* runtime/JSCJSValue.h:
(JSC::EncodedJSValueWithRepresentationHashTraits::emptyValue):
(JSC::EncodedJSValueWithRepresentationHashTraits::constructDeletedValue):
(JSC::EncodedJSValueWithRepresentationHashTraits::isDeletedValue):
(JSC::EncodedJSValueWithRepresentationHash::hash):
(JSC::EncodedJSValueWithRepresentationHash::equal):
* tests/stress/arith-add-with-constants.js: Added.
* tests/stress/arith-mul-with-constants.js: Added.

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

6 years ago[iOS] Gardening: rebaseline fast/attachment results
ddkilzer@apple.com [Sat, 28 Feb 2015 03:16:25 +0000 (03:16 +0000)]
[iOS] Gardening: rebaseline fast/attachment results

* platform/ios-simulator/fast/attachment/attachment-disabled-dom-expected.txt: Add.
* platform/ios-simulator/fast/attachment/attachment-disabled-rendering-expected.txt: Update.
* platform/ios-simulator/fast/attachment/attachment-dom-expected.txt: Add.
* platform/ios-simulator/fast/attachment/attachment-rendering-expected.txt: Update.

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

6 years ago[iOS] Gardening: Unskip fast/history/page-cache-webdatabase-opened-db.html
ddkilzer@apple.com [Sat, 28 Feb 2015 02:51:18 +0000 (02:51 +0000)]
[iOS] Gardening: Unskip fast/history/page-cache-webdatabase-opened-db.html

* platform/ios-simulator/TestExpectations: Unskip test.  It
passes on iOS WK1 and WK2 because WebSQL != IndexedDB.

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

6 years ago[iOS] Gardening: Skip some new page-cache tests
ddkilzer@apple.com [Sat, 28 Feb 2015 02:51:14 +0000 (02:51 +0000)]
[iOS] Gardening: Skip some new page-cache tests

* platform/ios-simulator/TestExpectations:
- Skip MediaSource tests:
  fast/history/page-cache-media-source-closed-2.html
  fast/history/page-cache-media-source-closed.html
  fast/history/page-cache-media-source-opened.html
- Skip test that uses drag-and-drop:
  fast/history/page-cache-createObjectURL.html

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

6 years agoNode::hasEditableStyle and isEditablePosition have too many options
rniwa@webkit.org [Sat, 28 Feb 2015 02:41:12 +0000 (02:41 +0000)]
Node::hasEditableStyle and isEditablePosition have too many options
https://bugs.webkit.org/show_bug.cgi?id=142078

Reviewed by Andreas Kling.

Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
new editing helper functions hasEditableStyle and isEditableNode for this purpose.

Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
newly extracted computeEditability in call sites that specify this option since isContentEditable
is a public DOM API.

No new tests since there should be no observable behavior changes.

* accessibility/AXObjectCache.h: Removed the declaration of an undefined function.

* dom/Element.cpp:
(WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.

* dom/Node.cpp:
(WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
(WebCore::Node::isContentRichlyEditable): Ditto.
(WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
style tree. Also returns tri-state Editability enum instead of returning a boolean based on
the value of EditableLevel argument.
(WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
(WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
(WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.

* dom/Node.h: No longer includes EditingBoundary.h.
(WebCore::Node::isContentEditable):
(WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
(WebCore::Node::hasRichlyEditableStyle): Ditto.

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
* editing/FrameSelection.cpp:
(WebCore::CaretBase::invalidateCaretRect): Ditto.
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::doApply): Ditto.
(WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
* editing/RemoveNodeCommand.cpp:
(WebCore::RemoveNodeCommand::doApply): Ditto.

* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
not possible prior to r180726 because isEditablePosition had to move out of tables.

* editing/VisibleUnits.cpp:
(WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
(WebCore::nextLeafWithSameEditability): Ditto.
(WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

* editing/htmlediting.cpp:
(WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
(WebCore::isEditableToAccessibility): Moved from Node.
(WebCore::computeEditability): Extracted from isEditablePosition.
(WebCore::hasEditableStyle): Added.
(WebCore::isEditableNode): Added.
(WebCore::isEditablePosition): Now calls computeEditability.
(WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
(WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.

* editing/htmlediting.h:

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

6 years agoTest gardening for Windows after r180796.
mmaxfield@apple.com [Sat, 28 Feb 2015 02:14:24 +0000 (02:14 +0000)]
Test gardening for Windows after r180796.

Unreviewed.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-02-27

* platform/win/TestExpectations:

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

6 years agohttps://bugs.webkit.org/show_bug.cgi?id=142119
dino@apple.com [Sat, 28 Feb 2015 01:57:46 +0000 (01:57 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=142119

Unreviewed. Add fast/canvas/canvas-ellipse-zero-lineto.html
to list of failing tests on Windows.

* platform/win/TestExpectations:

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

6 years agoFixed a typo in the previous commit.
rniwa@webkit.org [Sat, 28 Feb 2015 01:52:48 +0000 (01:52 +0000)]
Fixed a typo in the previous commit.

* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::setOwner):

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

6 years agoEFL build fix after r180797.
rniwa@webkit.org [Sat, 28 Feb 2015 01:46:05 +0000 (01:46 +0000)]
EFL build fix after r180797.

* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::owner):
(bmalloc::BoundaryTag::setOwner):

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

6 years ago[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
cdumez@apple.com [Sat, 28 Feb 2015 01:43:24 +0000 (01:43 +0000)]
[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
https://bugs.webkit.org/show_bug.cgi?id=141176

Reviewed by Sam Weinig.

Drop legacy WKBundlePageDiagnosticLoggingClient WK2 API as we are now
exposing this functionality via WKPageDiagnosticLoggingClient.h on
UIProcess side. The client-side has already been ported over.

* CMakeLists.txt:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI): Deleted.
(WebKit::toDiagnosticLoggingResultType): Deleted.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toAPI):
* UIProcess/API/C/WKDiagnosticLoggingResultType.h: Renamed from Source/WebKit2/Shared/API/c/WKDiagnosticLoggingResultType.h.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetDiagnosticLoggingClient): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Removed.
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Removed.
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Removed.
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::close):
(WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleDiagnosticLoggingClient): Deleted.

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

6 years agoRename WebResourceCacheManagerCFNet.cpp to WebResourceCacheManagerCFNet.mm
andersca@apple.com [Sat, 28 Feb 2015 01:19:06 +0000 (01:19 +0000)]
Rename WebResourceCacheManagerCFNet.cpp to WebResourceCacheManagerCFNet.mm

Rubber-stamped by Dan Bernstein.

This will let us use lambda to block conversion in a subsequent patch.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Renamed from Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp.

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

6 years agoMake ActiveDOMObject::canSuspend() pure virtual
cdumez@apple.com [Sat, 28 Feb 2015 01:05:21 +0000 (01:05 +0000)]
Make ActiveDOMObject::canSuspend() pure virtual
https://bugs.webkit.org/show_bug.cgi?id=142096
<rdar://problem/19923085>

Reviewed by Andreas Kling.

Make ActiveDOMObject::canSuspend() pure virtual so that people at least
try to provide an implementation for it. The default implementation was
returning false unconditionally and thus was preventing pages from
entering the PageCache.

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

6 years agoUnreviewed, rolling out r180203 and r180210.
commit-queue@webkit.org [Sat, 28 Feb 2015 00:46:33 +0000 (00:46 +0000)]
Unreviewed, rolling out r180203 and r180210.
https://bugs.webkit.org/show_bug.cgi?id=142116

broke process suspension and tile map (Requested by thorton on
#webkit).

Reverted changesets:

"Adopt CAMachPort-as-layer-contents"
https://bugs.webkit.org/show_bug.cgi?id=141687
http://trac.webkit.org/changeset/180203

"Fix the !USE(IOSURFACE) build"
http://trac.webkit.org/changeset/180210

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

6 years agoAdd WebKit2 SPI to create a DOM File object
commit-queue@webkit.org [Sat, 28 Feb 2015 00:42:26 +0000 (00:42 +0000)]
Add WebKit2 SPI to create a DOM File object
https://bugs.webkit.org/show_bug.cgi?id=142109

Patch by Sam Weinig <sam@webkit.org> on 2015-02-27
Reviewed by Tim Horton.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
Make <WebCore/File.h> (and associated files) available to WebKit2.

Source/WebKit2:

Add a new handle type for exposing a DOM File object to script. Follow
the pattern of WKBundleNodeHandleRef and WKBundleRangeHandleRef with the
new class WKBundleFileHandleRef. It can be created for a specific path,
and then the JS wrapper can be obtained via WKBundleFrameGetJavaScriptWrapperForFileForWorld.

* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.cpp: Added.
(WKBundleFileHandleGetTypeID):
(WKBundleFileHandleCreateWithPath):
* WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h: Added.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetJavaScriptWrapperForFileForWorld):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp: Added.
(WebKit::domHandleCache):
(WebKit::InjectedBundleFileHandle::create):
(WebKit::InjectedBundleFileHandle::getOrCreate):
(WebKit::InjectedBundleFileHandle::InjectedBundleFileHandle):
(WebKit::InjectedBundleFileHandle::~InjectedBundleFileHandle):
(WebKit::InjectedBundleFileHandle::coreFile):
* WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.h: Added.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::jsWrapperForWorld):
* WebProcess/WebPage/WebFrame.h:

Tools:

Add a test for WKBundleFileHandleRef.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKBundleFileHandle.cpp: Added.
(TestWebKitAPI::didReceiveMessageFromInjectedBundle):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/WKBundleFileHandle_Bundle.cpp: Added.
(TestWebKitAPI::WKBundleFileHandleTest::WKBundleFileHandleTest):
* TestWebKitAPI/Tests/WebKit2/bundle-file.html: Added.

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

6 years agobmalloc: Pathological madvise churn on the free(malloc(x)) benchmark
ggaren@apple.com [Sat, 28 Feb 2015 00:29:22 +0000 (00:29 +0000)]
bmalloc: Pathological madvise churn on the free(malloc(x)) benchmark
https://bugs.webkit.org/show_bug.cgi?id=142058

Reviewed by Andreas Kling.

The churn was caused by repeatedly splitting an object with physical
pages from an object without, and then merging them back together again.
The merge would conservatively forget that we had physical pages, forcing
a new call to madvise on the next allocation.

This patch more strictly segregates objects in the heap from objects in
the VM heap, with these changes:

(1) Objects in the heap are not allowed to merge with objects in the VM
heap, and vice versa -- since that would erase our precise knowledge of
which physical pages had been allocated.

(2) The VM heap is exclusively responsible for allocating and deallocating
physical pages.

(3) The heap free list must consider entries for objects that are in the
VM heap to be invalid, and vice versa. (This condition can arise
because the free list does not eagerly remove items.)

With these changes, we can know that any valid object in the heap's free
list already has physical pages, and does not need to call madvise.

Note that the VM heap -- as before -- might sometimes contain ranges
or pieces of ranges that have physical pages, since we allow splitting
of ranges at granularities smaller than the VM page size. These ranges
can eventually merge with ranges in the heap during scavenging.

* bmalloc.xcodeproj/project.pbxproj:

* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::owner):
(bmalloc::BoundaryTag::setOwner):
(bmalloc::BoundaryTag::initSentinel):
(bmalloc::BoundaryTag::hasPhysicalPages): Deleted.
(bmalloc::BoundaryTag::setHasPhysicalPages): Deleted. Replaced the concept
of "has physical pages" with a bit indicating which heap owns the large
object. This is a more precise concept, since the old bit was really a
Yes / Maybe bit.

* bmalloc/Deallocator.cpp:

* bmalloc/FreeList.cpp: Adopt
(bmalloc::FreeList::takeGreedy):
(bmalloc::FreeList::take):
(bmalloc::FreeList::removeInvalidAndDuplicateEntries):
* bmalloc/FreeList.h:
(bmalloc::FreeList::push): Added API for considering the owner when
deciding if a free list entry is valid.

* bmalloc/Heap.cpp:
(bmalloc::Heap::Heap): Adopt new API.

(bmalloc::Heap::scavengeLargeRanges): Scavenge all ranges with no minimum,
since some ranges might be able to merge with ranges in the VM heap, and
they won't be allowed to until we scavenge them.

(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateMediumPage):
(bmalloc::Heap::allocateLarge): New VM heap API makes this function
simpler, since we always get back physical pages now.

* bmalloc/Heap.h:
* bmalloc/LargeObject.h:
(bmalloc::LargeObject::end):
(bmalloc::LargeObject::owner):
(bmalloc::LargeObject::setOwner):
(bmalloc::LargeObject::isValidAndFree):
(bmalloc::LargeObject::merge): Do not merge objects across heaps since
that causes madvise churn.
(bmalloc::LargeObject::validateSelf):
(bmalloc::LargeObject::init):
(bmalloc::LargeObject::hasPhysicalPages): Deleted.
(bmalloc::LargeObject::setHasPhysicalPages): Deleted. Propogate the Owner API.

* bmalloc/Owner.h: Added.

* bmalloc/SegregatedFreeList.cpp:
(bmalloc::SegregatedFreeList::SegregatedFreeList):
(bmalloc::SegregatedFreeList::insert):
(bmalloc::SegregatedFreeList::takeGreedy):
(bmalloc::SegregatedFreeList::take):
* bmalloc/SegregatedFreeList.h: Propogate the owner API.

* bmalloc/VMAllocate.h:
(bmalloc::vmDeallocatePhysicalPagesSloppy):
(bmalloc::vmAllocatePhysicalPagesSloppy): Clarified these functions and
removed an edge case.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::VMHeap):
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateSmallPage):
(bmalloc::VMHeap::allocateMediumPage):
(bmalloc::VMHeap::allocateLargeObject):
(bmalloc::VMHeap::deallocateLargeObject): Be sure to give each object
a new chance to merge, since it might have been prohibited from merging
before by virtue of not being in the VM heap.

(bmalloc::VMHeap::allocateLargeRange): Deleted.
(bmalloc::VMHeap::deallocateLargeRange): Deleted.

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

6 years agoUpdating more tests after r177774
mmaxfield@apple.com [Sat, 28 Feb 2015 00:28:12 +0000 (00:28 +0000)]
Updating more tests after r177774

Unreviewed.

Most of these tests simply need to be updated. However, I found two real bugs while
going through these!

* fast/css-generated-content/after-with-inline-continuation-expected.html:
* fast/css-generated-content/after-with-inline-continuation.html:
* fast/inline/hidpi-pixel-gap-between-adjacent-selection-inlines-expected.html:
* fast/inline/hidpi-select-inline-on-subpixel-position-expected.html:
* fast/inline/hidpi-select-inline-on-subpixel-position.html:
* fast/lists/rtl-marker-expected.html:
* fast/lists/rtl-marker.html:
* fast/multicol/cell-shrinkback-expected.html:
* fast/multicol/cell-shrinkback.html:
* fast/multicol/newmulticol/breaks-3-columns-3-expected.html:
* fast/multicol/newmulticol/breaks-3-columns-3.html:
* fast/regions/last-region-border-radius-expected.html:
* fast/regions/last-region-border-radius.html:
* fast/regions/overflow/overflow-first-and-last-regions.html:
* fast/regions/overflow/overflow-in-uniform-regions-dynamic-expected.html:
* fast/regions/overflow/overflow-in-uniform-regions-dynamic.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-large-radius-expected.html:
* fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-large-radius.html:
* fast/shapes/shape-outside-floats/shape-outside-rounded-inset-expected.html:
* fast/shapes/shape-outside-floats/shape-outside-rounded-inset.html:
* fast/table/td-width-fifty-percent-regression-expected.html:
* fast/table/td-width-fifty-percent-regression.html:
* fast/text/complex-initial-advance-expected.html:
* fast/text/complex-initial-advance.html:
* platform/mac/TestExpectations:

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

6 years ago[Subpixel] Subpixelize RenderListMarker
mmaxfield@apple.com [Sat, 28 Feb 2015 00:23:15 +0000 (00:23 +0000)]
[Subpixel] Subpixelize RenderListMarker
https://bugs.webkit.org/show_bug.cgi?id=142093

Reviewed by Zalan Bujtas.

Source/WebCore:

Use floats instead of ints.

Test: fast/lists/rtl-marker.html

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/RenderListMarker.h:

LayoutTests:

* platform/mac/TestExpectations: Unskip fast/lists/rtl-marker.html

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

6 years ago<attachment> should be selected immediately upon click, and be drag/copyable upon...
timothy_horton@apple.com [Sat, 28 Feb 2015 00:09:09 +0000 (00:09 +0000)]
<attachment> should be selected immediately upon click, and be drag/copyable upon click
https://bugs.webkit.org/show_bug.cgi?id=142114
<rdar://problem/19982520>

Reviewed by Enrica Casucci.

* css/html.css:
(attachment):
Make attachment use 'user-select: all' to act as a single click-to-select unit.

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFocus): Deleted.
* html/HTMLAttachmentElement.h:
* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::isFocused): Deleted.
(WebCore::RenderAttachment::focusChanged): Deleted.
* rendering/RenderAttachment.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintAttachment):
Remove focus-related code; instead of focusing the element upon click,
we get a selection including just the <attachment>, and everything
behaves much more consistently (copy works, drag works, etc.).

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

6 years agoTest gardening, unmark now passing tests.
ap@apple.com [Sat, 28 Feb 2015 00:06:48 +0000 (00:06 +0000)]
Test gardening, unmark now passing tests.

* TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

6 years ago[iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsFor...
mmaxfield@apple.com [Sat, 28 Feb 2015 00:02:53 +0000 (00:02 +0000)]
[iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsForGlyph()
https://bugs.webkit.org/show_bug.cgi?id=141371

Reviewed by David Kilzer.

Source/WebCore:

Null checks.

Covered by existing mathml tests.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::boundsForGlyph):
(WebCore::RenderMathMLOperator::advanceForGlyph):
(WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):

LayoutTests:

Updating expected results and TestExpectations

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/mathml/opentype/horizontal-munderover-expected.txt:
* platform/ios-simulator/mathml/opentype/large-operators-expected.txt:
* platform/ios-simulator/mathml/opentype/vertical-expected.txt:

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

6 years agoMake SourceBuffer ActiveDOMObject suspendable
cdumez@apple.com [Fri, 27 Feb 2015 23:46:01 +0000 (23:46 +0000)]
Make SourceBuffer ActiveDOMObject suspendable
https://bugs.webkit.org/show_bug.cgi?id=142108
<rdar://problem/19923085>

Reviewed by Jer Noble.

Source/WebCore:

Make SourceBuffer ActiveDOMObject suspendable if it is removed from its
MediaSource and does not have any pending events. This makes it more
likely for pages using SourceBuffer objects to go into the PageCache.

Test: fast/history/page-cache-removed-source-buffer.html

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::canSuspend):
* Modules/mediasource/SourceBuffer.h:

LayoutTests:

Add a layout tests to check that a SourceBuffer removed from its
MediaSource does not prevent a Page from entering PageCache.

* fast/history/page-cache-removed-source-buffer-expected.txt: Added.
* fast/history/page-cache-removed-source-buffer.html: Added.

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

6 years agoAdd support for canvas ellipse method
dino@apple.com [Fri, 27 Feb 2015 23:40:35 +0000 (23:40 +0000)]
Add support for canvas ellipse method
https://bugs.webkit.org/show_bug.cgi?id=82791
<rdar://problem/11159172>

Patch by Sam Weinig <sam@webkit.org> on 2015-02-26
Reviewed by Dirk Schulze.

Source/WebCore:

Tests: fast/canvas/canvas-ellipse-360-winding.html
       fast/canvas/canvas-ellipse-circumference-fill.html
       fast/canvas/canvas-ellipse-circumference.html
       fast/canvas/canvas-ellipse-connecting-line.html
       fast/canvas/canvas-ellipse-negative-radius.html
       fast/canvas/canvas-ellipse-zero-lineto.html
       fast/canvas/canvas-ellipse.html

* html/canvas/CanvasPathMethods.h:
* html/canvas/CanvasPathMethods.cpp:
(WebCore::CanvasPathMethods::lineTo):
Convenience for passing a FloatPoint instead of two floats.

(WebCore::normalizeAngles):
Normalizes the angles as described in the HTML spec. Ensuring the startAngle
is greater than 0 and less than 2pi, and the the endAngle is at most 2pi
from the start angle.

(WebCore::CanvasPathMethods::arc):
- Renames some of the parameters to be clearer.
- Normalizes the angles for consistency with ellipse.
- Moves hasInvertibleTransform() higher in the function for consistency.

(WebCore::CanvasPathMethods::ellipse): Added.

* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
Add ellipse(...).

* platform/graphics/Path.h:
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::addArc):
Rename parameters for clarity and use a nullptr.

(WebCore::Path::addEllipse):
Added. Constructs an ellipse via a transformed arc.

LayoutTests:

* fast/canvas/canvas-ellipse-360-winding-expected.txt: Added.
* fast/canvas/canvas-ellipse-360-winding.html: Added.
* fast/canvas/canvas-ellipse-circumference-expected.txt: Added.
* fast/canvas/canvas-ellipse-circumference-fill-expected.txt: Added.
* fast/canvas/canvas-ellipse-circumference-fill.html: Added.
* fast/canvas/canvas-ellipse-circumference.html: Added.
* fast/canvas/canvas-ellipse-connecting-line-expected.html: Added.
* fast/canvas/canvas-ellipse-connecting-line.html: Added.
* fast/canvas/canvas-ellipse-expected.txt: Added.
* fast/canvas/canvas-ellipse-negative-radius-expected.txt: Added.
* fast/canvas/canvas-ellipse-negative-radius.html: Added.
* fast/canvas/canvas-ellipse-zero-lineto-expected.txt: Added.
* fast/canvas/canvas-ellipse-zero-lineto.html: Added.
* fast/canvas/canvas-ellipse.html: Added.
* fast/canvas/script-tests/canvas-ellipse-360-winding.js: Added.
* fast/canvas/script-tests/canvas-ellipse.js: Added.
* fast/canvas/script-tests/js-ellipse-implementation.js: Added.
* platform/mac/fast/canvas/canvas-ellipse-circumference-expected.png: Added.
* platform/mac/fast/canvas/canvas-ellipse-circumference-fill-expected.png: Added.

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

6 years agoTest more features of content extensions.
commit-queue@webkit.org [Fri, 27 Feb 2015 23:37:07 +0000 (23:37 +0000)]
Test more features of content extensions.
https://bugs.webkit.org/show_bug.cgi?id=142100

Patch by Alex Christensen <achristensen@webkit.org> on 2015-02-27
Reviewed by Brady Eidson.

* http/tests/usercontentfilter/basic-filter.html:
* http/tests/usercontentfilter/basic-filter.html.json:
* platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt:

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

6 years agoWeb Inspector: Use Maps in ResourceCollection instead of objects
commit-queue@webkit.org [Fri, 27 Feb 2015 23:35:12 +0000 (23:35 +0000)]
Web Inspector: Use Maps in ResourceCollection instead of objects
https://bugs.webkit.org/show_bug.cgi?id=142101

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

* UserInterface/Models/ResourceCollection.js:
(WebInspector.ResourceCollection):
(WebInspector.ResourceCollection.prototype.resourcesWithType):
(WebInspector.ResourceCollection.prototype.removeAllResources):
(WebInspector.ResourceCollection.prototype.resourceForURL):
(WebInspector.ResourceCollection.prototype._associateWithResource):
(WebInspector.ResourceCollection.prototype._disassociateWithResource):
(WebInspector.ResourceCollection.prototype._resourceURLDidChange):
(WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
Use Maps instead of objects.

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

6 years agoAdd ability for run-jsc-benchmarks to set library path from test binary when run...
msaboff@apple.com [Fri, 27 Feb 2015 23:32:03 +0000 (23:32 +0000)]
Add ability for run-jsc-benchmarks to set library path from test binary when run on a build bot
https://bugs.webkit.org/show_bug.cgi?id=142112

Reviewed by Filip Pizlo.

Added check for VMs in the form of <someDir>/{DumpRenderTree,webkitTestRunner,jsc} and use
<someDir> as the library path.

* Scripts/run-jsc-benchmarks:

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

6 years agoSome WebGL tests fail on ATI hardware
ap@apple.com [Fri, 27 Feb 2015 23:31:57 +0000 (23:31 +0000)]
Some WebGL tests fail on ATI hardware
https://bugs.webkit.org/show_bug.cgi?id=93560
rdar://problem/19991477

* platform/mac/TestExpectations: Updating expectations, as this is not limited to
Mavericks.

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

6 years agoAdding support for serializing HTMLAttachment elements.
enrica@apple.com [Fri, 27 Feb 2015 23:07:03 +0000 (23:07 +0000)]
Adding support for serializing HTMLAttachment elements.
https://bugs.webkit.org/show_bug.cgi?id=142026

Reviewed by Tim Horton.

Source/WebCore:

Test: editing/pasteboard/copy-paste-attachment.html

Adding support to serialize the attachment element
and properly handle it when converting a DOM range
to NSAttributedString.

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processElement):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendCustomAttributes): Create new attribute
for attachment element when serializating.
(WebCore::StyledMarkupAccumulator::appendElement):
(WebCore::createFragmentFromMarkup): Remove the attribute from the attachment element
when creating the fragment.
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::file): Added const to file() to
use it in appendCustonAttributes where the element is a const reference.
* html/HTMLAttachmentElement.h:
* html/HTMLAttributeNames.in:

LayoutTests:

* editing/pasteboard/copy-paste-attachment-expected.txt: Added.
* editing/pasteboard/copy-paste-attachment.html: Added.

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

6 years ago<attachment> should have an inactive style (gray in background)
timothy_horton@apple.com [Fri, 27 Feb 2015 23:00:03 +0000 (23:00 +0000)]
<attachment> should have an inactive style (gray in background)
https://bugs.webkit.org/show_bug.cgi?id=142103
<rdar://problem/19982486>

Reviewed by Dan Bernstein.

* rendering/RenderThemeMac.mm:
(WebCore::attachmentLabelInactiveBackgroundColor):
(WebCore::attachmentLabelInactiveTextColor):
(WebCore::RenderThemeMac::paintAttachmentLabelBackground):
(WebCore::RenderThemeMac::paintAttachmentLabel):
Use a gray background and gray text when the selection containing the
attachment isn't focused and active.

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

6 years agoAdd a "block-cookies" rule to the user content filter.
beidson@apple.com [Fri, 27 Feb 2015 22:50:03 +0000 (22:50 +0000)]
Add a "block-cookies" rule to the user content filter.
https://bugs.webkit.org/show_bug.cgi?id=142105

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/usercontentfilter/block-cookies-basic.html
       http/tests/usercontentfilter/block-cookies-send.html

* contentextensions/ContentExtensionRule.h:

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
(WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
* contentextensions/ContentExtensionsBackend.h:

* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadAction):

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):

* page/UserContentController.cpp:
(WebCore::UserContentController::actionForURL):
(WebCore::UserContentController::contentFilterBlocksURL): Deleted.
* page/UserContentController.h:

LayoutTests:

* http/tests/cookies/resources/echo-cookies.php: Added.
* http/tests/usercontentfilter/block-cookies-basic-expected.txt: Added.
* http/tests/usercontentfilter/block-cookies-basic.html: Added.
* http/tests/usercontentfilter/block-cookies-basic.html.json: Added.
* http/tests/usercontentfilter/block-cookies-send-expected.txt: Added.
* http/tests/usercontentfilter/block-cookies-send.html: Added.
* http/tests/usercontentfilter/block-cookies-send.html.json: Added.

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

6 years agoLookup panel dismisses when pages are loading in other tabs/windows
bdakin@apple.com [Fri, 27 Feb 2015 22:45:33 +0000 (22:45 +0000)]
Lookup panel dismisses when pages are loading in other tabs/windows
https://bugs.webkit.org/show_bug.cgi?id=142104
-and corresponding-
rdar://problem/19882137

Reviewed by Tim Horton.

Until rdar://problem/13875766 is resolved, we should only call into Lookup and
DataDetectors for key windows.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):

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

6 years ago[WinCairo] Unreviewed build fix.
achristensen@apple.com [Fri, 27 Feb 2015 22:17:09 +0000 (22:17 +0000)]
[WinCairo] Unreviewed build fix.

Source/WebCore:

* platform/graphics/BitmapImage.h:
* platform/win/BitmapInfo.h:
Added WEBCORE_EXPORT.

Tools:

* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props:
Use TestWebKitAPIPrefix.h like in TestWebKitAPICommon.props.

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

6 years ago<attachment>'s label baseline should match that of the surrounding text
timothy_horton@apple.com [Fri, 27 Feb 2015 21:56:43 +0000 (21:56 +0000)]
<attachment>'s label baseline should match that of the surrounding text
https://bugs.webkit.org/show_bug.cgi?id=142099
rdar://problem/19982495

Reviewed by Dan Bernstein.

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::baselinePosition):
* rendering/RenderAttachment.h:
Override baselinePosition and retrieve it from RenderTheme.

* rendering/RenderTheme.h:
(WebCore::RenderTheme::attachmentBaseline):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::AttachmentLayout::AttachmentLayout):
(WebCore::RenderThemeMac::attachmentBaseline):
Plumb the label baseline from AttachmentLayout to RenderAttachment.

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

6 years agoUnreviewed, rolling out r180752.
commit-queue@webkit.org [Fri, 27 Feb 2015 21:42:31 +0000 (21:42 +0000)]
Unreviewed, rolling out r180752.
https://bugs.webkit.org/show_bug.cgi?id=142098

Causes 10 SVG test failures on Windows. (Requested by
bfulgham_ on #webkit).

Reverted changeset:

"Cache glyph widths to GlyphPages"
https://bugs.webkit.org/show_bug.cgi?id=142028
http://trac.webkit.org/changeset/180752

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

6 years agoiOS, GTK, and EFL rebaselines after r180726.
rniwa@webkit.org [Fri, 27 Feb 2015 21:40:05 +0000 (21:40 +0000)]
iOS, GTK, and EFL rebaselines after r180726.

* platform/efl/editing/inserting/5058163-1-expected.txt:
* platform/gtk/editing/inserting/5058163-1-expected.txt:
* platform/ios-simulator-wk2/editing/inserting/5058163-1-expected.txt:

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

6 years ago[iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPriva...
ddkilzer@apple.com [Fri, 27 Feb 2015 21:39:31 +0000 (21:39 +0000)]
[iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>

* platform/spi/ios/OpenGLESSPI.h:  Define EAGL_IOSURFACE macro
until header refactoring is completed.

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

6 years agoUnreviewed, skip tests added in r180771 on platforms that don't support IndexedDB.
cdumez@apple.com [Fri, 27 Feb 2015 21:34:51 +0000 (21:34 +0000)]
Unreviewed, skip tests added in r180771 on platforms that don't support IndexedDB.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 years ago[Win] Skip IndexDB tests on Windows since it's not implemented.
bfulgham@apple.com [Fri, 27 Feb 2015 21:27:58 +0000 (21:27 +0000)]
[Win] Skip IndexDB tests on Windows since it's not implemented.

* platform/win/TestExpectations:

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

6 years agoMediaSource should be suspendable when closed
cdumez@apple.com [Fri, 27 Feb 2015 21:18:39 +0000 (21:18 +0000)]
MediaSource should be suspendable when closed
https://bugs.webkit.org/show_bug.cgi?id=142089
<rdar://problem/19923085>

Reviewed by Jer Noble.

Source/WebCore:

Make MediaSource ActiveDOMObject suspendable when it is in closed state
and it has no pending events. This increases the likelihood of pages
using MediaSource to enter the PageCache.

Tests: fast/history/page-cache-media-source-closed-2.html
       fast/history/page-cache-media-source-closed.html
       fast/history/page-cache-media-source-opened.html

LayoutTests:

Add layout tests to check that:
- Pages with an open MediaSource do not enter the PageCache
- Pages with an initially closed MediaSource enter the PageCache
- Pages with a MediaSource that changed state from opened to closed
  enter the PageCache.

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

6 years agoAdd infrastructure for handling website data in the network process
andersca@apple.com [Fri, 27 Feb 2015 20:14:22 +0000 (20:14 +0000)]
Add infrastructure for handling website data in the network process
https://bugs.webkit.org/show_bug.cgi?id=142092

Reviewed by Andreas Kling.

Source/WebKit2:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
Send back "Did" messages without actually doing anything for now.

* NetworkProcess/NetworkProcess.h:
Add new members.

* NetworkProcess/NetworkProcess.messages.in:
Add FetchWebsiteData and DeleteWebsiteDataForOrigins messages.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
Assert that all maps are empty.

(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
Add callbacks and send fetch and delete messages respectively.

(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
Make sure to invoke all callbacks.

(WebKit::NetworkProcessProxy::didFetchWebsiteData):
Find the callback and invoke it.

(WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins):
Ditto.

* UIProcess/Network/NetworkProcessProxy.h:
Add new members.

* UIProcess/Network/NetworkProcessProxy.messages.in:
Add DidFetchWebsiteData and DidDeleteWebsiteDataForOrigins messages.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionDidClose):
Just pass an empty WebsiteData object.

Tools:

Add a menu item that will fetch all website data, delete the returned data records, and
fetch all website data again so we can confirm that it's all empty.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController fetchAndClearWebsiteData:]):

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

6 years agoUse NeverDestroyed for JS wrapper owners.
akling@apple.com [Fri, 27 Feb 2015 19:52:11 +0000 (19:52 +0000)]
Use NeverDestroyed for JS wrapper owners.
<https://webkit.org/b/142090>

Reviewed by Chris Dumez.

Using NeverDestroyed puts these objects in BSS which is preferable
since that prevents them from pinning down entire malloc pages forever.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.

* bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.

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

6 years agoMake IDBDatabase / IDBRequest suspendable
cdumez@apple.com [Fri, 27 Feb 2015 19:24:25 +0000 (19:24 +0000)]
Make IDBDatabase / IDBRequest suspendable
https://bugs.webkit.org/show_bug.cgi?id=142076
<rdar://problem/19923085>

Reviewed by Andreas Kling.

Source/WebCore:

Make IDBDatabase / IDBRequest suspendable under certain conditions to
make it more likely for pages using indexeddb to enter the PageCache.

IDBDatabase is safely suspendable if the database is closed. IDBRequest
is safely suspendable if the request no longer has any pending activity
(i.e. state is DONE and success / failure handler was called). We may
be able to do better later but this is the bare minimum for now.

Tests: fast/history/page-cache-indexed-closed-db.html
       fast/history/page-cache-indexed-opened-db.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::IDBDatabase):
(WebCore::IDBDatabase::closeConnection):
(WebCore::IDBDatabase::enqueueEvent):
(WebCore::IDBDatabase::canSuspend):
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::canSuspend):
* Modules/indexeddb/IDBRequest.h:

LayoutTests:

Add layout tests to make sure that:
- A page with an open indexeddb database is not page-cacheable
- A page with a closed indexeddb database is page-cacheable

* fast/history/page-cache-indexed-closed-db-expected.txt: Added.
* fast/history/page-cache-indexed-closed-db.html: Added.
* fast/history/page-cache-indexed-opened-db-expected.txt: Added.
* fast/history/page-cache-indexed-opened-db.html: Added.

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

6 years agoDrop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContai...
cdumez@apple.com [Fri, 27 Feb 2015 19:22:10 +0000 (19:22 +0000)]
Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
https://bugs.webkit.org/show_bug.cgi?id=142052

Reviewed by Andreas Kling.

Source/WebCore:

Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
returning false so pages using WebDatabase would never enter the PageCache anyway.

This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
return false when there are open databases. This check is now equivalent to the one
that was in PageCache.

An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
to false so once a page opened a database, it will never be page-cacheable. This
will be taken care of separately though.

Test: fast/history/page-cache-webdatabase-opened-db.html

* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::canSuspend):
* Modules/webdatabase/DatabaseContext.h:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
* page/DiagnosticLoggingKeys.h:

LayoutTests:

Add a layout test to check that a page with an open WebDatabase does
not enter the PageCache.

* fast/history/page-cache-webdatabase-opened-db-expected.txt: Added.
* fast/history/page-cache-webdatabase-opened-db.html: Added.

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

6 years agoCompile DFA to bytecode.
achristensen@apple.com [Fri, 27 Feb 2015 19:20:27 +0000 (19:20 +0000)]
Compile DFA to bytecode.
https://bugs.webkit.org/show_bug.cgi?id=142031

Reviewed by Benjamin Poulain.

* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
(WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
* contentextensions/ContentExtensionsBackend.h:
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::nextState): Deleted.
(WebCore::ContentExtensions::DFA::actions): Deleted.
* contentextensions/DFA.h:
(WebCore::ContentExtensions::DFA::size):
(WebCore::ContentExtensions::DFA::nodeAt):
* contentextensions/DFABytecode.h: Added.
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp: Added.
(WebCore::ContentExtensions::append):
(WebCore::ContentExtensions::set32Bits):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
(WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
(WebCore::ContentExtensions::DFABytecodeCompiler::compile):
* contentextensions/DFABytecodeCompiler.h: Added.
(WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
* contentextensions/DFABytecodeInterpreter.cpp: Added.
(WebCore::ContentExtensions::getBits):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h: Added.
(WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):

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