WebKit.git
6 years ago[EFL] Build error due to changed path of generated js files.
tgergely.u-szeged@partner.samsung.com [Fri, 4 Apr 2014 10:24:59 +0000 (10:24 +0000)]
[EFL] Build error due to changed path of generated js files.
https://bugs.webkit.org/show_bug.cgi?id=131215

Reviewed by Gyuyoung Kim.

r166648 fixed the generation of some .js files on GTK. Due to some
changes in the paths it causes a build error on EFL.

* Source/PlatformEfl.cmake:
  Replaced path for two derived source files.

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

6 years ago[Win] Update obsolete packages in cygwin
agomez@igalia.com [Fri, 4 Apr 2014 08:11:34 +0000 (08:11 +0000)]
[Win] Update obsolete packages in cygwin
https://bugs.webkit.org/show_bug.cgi?id=126264

Reviewed by Brent Fulgham.

Removed "apache" and "minires" as the first has been replaced by
"lighttpd" and the second is now integrated into
"cygwin". Replaced the transitional and now obsolete "gcc" package
with "gcc-g++" and ensure that "python" stays at version "2.6.8"
since the newer version available is "2.7.3" which breaks the
build due to some funniness with environment variable handling.

* CygwinDownloader/cygwin-downloader.py:
* CygwinDownloader/cygwin-downloader.zip:

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

6 years agoAX: iOS does not need to spin the run loop on synchronous message calls
cfleizach@apple.com [Fri, 4 Apr 2014 06:52:22 +0000 (06:52 +0000)]
AX: iOS does not need to spin the run loop on synchronous message calls
https://bugs.webkit.org/show_bug.cgi?id=131195

Reviewed by Dan Bernstein.

On the Mac platform, we need to spin the run loop while making synchronous calls to avoid VoiceOver hanging.
On iOS, this not needed due to architectural differences.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::synchronousMessagesShouldSpinRunLoop):
* WebProcess/WebPage/WebPage.h:

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

6 years ago[EFL] Should flush and render layers after the root layer is changed.
commit-queue@webkit.org [Fri, 4 Apr 2014 06:26:54 +0000 (06:26 +0000)]
[EFL] Should flush and render layers after the root layer is changed.
https://bugs.webkit.org/show_bug.cgi?id=131108

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-04-03
Reviewed by Gyuyoung Kim.

If there is no update event after root layer is changed, old webview can be shown.
Because the syncTimer is not being triggered by root layer change.
We should flush and render layers by starting syncTimer when the root layer is changed.

* WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
(WebCore::AcceleratedCompositingContext::setRootGraphicsLayer): Add m_syncTimer.startOneShot(0);
* WebCoreSupport/AcceleratedCompositingContextEfl.h:
(WebCore::AcceleratedCompositingContext::setRootGraphicsLayer): Move implementation from header to source.

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

6 years ago[Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
aestes@apple.com [Fri, 4 Apr 2014 05:23:52 +0000 (05:23 +0000)]
[Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
https://bugs.webkit.org/show_bug.cgi?id=131206

Reviewed by Dan Bernstein.

Add _dataForDisplayedPDF and _suggestedFilenameForDisplayedPDF to
support clients that wish to save a copy of the currently displayed PDF
to disk. Ultimately we should support this use case by exposing something
like WKWebViewContentProvider, but for now let's do something simple.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
(-[WKWebView _dataForDisplayedPDF]):
(-[WKWebView _suggestedFilenameForDisplayedPDF]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/WKWebViewContentProvider.h:
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView documentData]):
(-[WKPDFView suggestedFilename]):
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):

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

6 years ago[EFL][WK2] Add API to get contents size of current web page.
eunmi15.lee@samsung.com [Fri, 4 Apr 2014 05:04:56 +0000 (05:04 +0000)]
[EFL][WK2] Add API to get contents size of current web page.
https://bugs.webkit.org/show_bug.cgi?id=131148

Reviewed by Gyuyoung Kim.

Application can want to get contents size of current web page without
monitoring "contents,size,changed" signal, so I add API to get contents
size directly.

* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewGetContentsSize): WK API to get contents size from WebView.
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_contents_size_get): new API to get contents size.
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

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

6 years agoFast-path for casting JS wrappers to JSElement.
akling@apple.com [Fri, 4 Apr 2014 04:42:21 +0000 (04:42 +0000)]
Fast-path for casting JS wrappers to JSElement.
<https://webkit.org/b/131210>

Add an extended JSType for Element wrappers so we can avoid walking
the ClassInfo chain in those bindings as well.

Generalized the code to select a casting helper in the bindings
generator into a function (GetCastingHelperForThisObject.)
Updated all the jsDynamicCast call sites to go through this, in case
there's an optimized cast available for the desired type.

Reviewed by Benjamin Poulain.

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWrapper.h:
* bindings/js/JSElementCustom.h: Added.
(WebCore::jsElementCast):
* bindings/js/JSNodeCustom.h:
(WebCore::jsNodeCast):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GetCastingHelperForThisObject):
(GenerateImplementation):
* dom/Element.idl:

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

6 years agoUnreviewed build fix.
bfulgham@apple.com [Fri, 4 Apr 2014 04:23:11 +0000 (04:23 +0000)]
Unreviewed build fix.

* WebKit.vcxproj/WebKit.sln: Make sure we don't generate the
WebInspectorUI before the generated JS is ready.

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

6 years ago[WK2][EFL] Use template method in creating NativeWebMouseEvent
jinwoo7.song@samsung.com [Fri, 4 Apr 2014 04:11:56 +0000 (04:11 +0000)]
[WK2][EFL] Use template method in creating NativeWebMouseEvent
https://bugs.webkit.org/show_bug.cgi?id=131152

Reviewed by Anders Carlsson.

There are three EFL mouse events, such as Evas_Event_Mouse_Down, Evas_Event_Mouse_Up,
and Evas_Event_Mouse_Move. They can be defined as a template method.

* PlatformEfl.cmake: Remove NativeWebMouseEventEfl.cpp
* Shared/NativeWebMouseEvent.h:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Add a template method.
* Shared/efl/NativeWebMouseEventEfl.cpp: Removed.

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

6 years agocompositing/tiling/rotated-tiled-* tests failing on bots
joepeck@webkit.org [Fri, 4 Apr 2014 04:08:02 +0000 (04:08 +0000)]
compositing/tiling/rotated-tiled-* tests failing on bots
https://bugs.webkit.org/show_bug.cgi?id=131207

Unreviewed rebaseline of tests after r166748.

* platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:

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

6 years agoRebaseline a bindings test.
akling@apple.com [Fri, 4 Apr 2014 03:24:53 +0000 (03:24 +0000)]
Rebaseline a bindings test.

* bindings/scripts/test/JS/JSTestNode.h:
(WebCore::JSTestNode::createStructure):

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

6 years agoFast-path for casting JS wrappers to JSNode.
akling@apple.com [Fri, 4 Apr 2014 02:29:15 +0000 (02:29 +0000)]
Fast-path for casting JS wrappers to JSNode.
<https://webkit.org/b/131196>

Source/JavaScriptCore:

Allow code outside of JSC (well, WebCore) to extend the JSType spectrum
a little bit. We do this by exposing a LastJSCObjectType constant so
WebCore can encode its own wrapper types after that.

Reviewed by Mark Hahnenberg and Geoff Garen.

* runtime/JSType.h:

    Added LastJSCObjectType for use by WebCore.

* runtime/JSObject.h:
(JSC::JSObject::isVariableObject):

    Updated since this can no longer assume that types >= VariableObjectType
    are all variable objects.

Source/WebCore:

Add a way to quickly determine that a given JSObject is a JSNode.
This lets us avoid walking the ClassInfo chain in the DOM bindings
for WebCore::Node.

Reviewed by Mark Hahnenberg and Geoff Garen.

* bindings/js/JSDOMWrapper.h:

    Added a JSNodeType constant that extends beyond JSC::JSType.

* bindings/js/JSNodeCustom.h:
(WebCore::jsNodeCast):

    Added. Fast cast from JSValue to JSNode.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):

    Generate code that uses jsNodeCast in Node interfaces.

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

6 years agoAll Heap::writeBarriers should be inline
mhahnenberg@apple.com [Fri, 4 Apr 2014 02:24:28 +0000 (02:24 +0000)]
All Heap::writeBarriers should be inline
https://bugs.webkit.org/show_bug.cgi?id=131197

Reviewed by Mark Lam.

One is in a JSCellInlines.h, another is in Heap.cpp. These are all critical
enough and small enough to belong in HeapInlines.h. Also added the proper
ENABLE(GGC) ifdefs to minimize the cost of C++ barriers for !ENABLE(GGC) builds.

* heap/Heap.cpp:
(JSC::Heap::writeBarrier): Deleted.
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::writeBarrier):
* runtime/JSCellInlines.h:
(JSC::Heap::writeBarrier): Deleted.

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

6 years agocheck-webkit-style: Improve warnings on Objective-C @property syntax
commit-queue@webkit.org [Fri, 4 Apr 2014 01:56:47 +0000 (01:56 +0000)]
check-webkit-style: Improve warnings on Objective-C @property syntax
https://bugs.webkit.org/show_bug.cgi?id=131200

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-03
Reviewed by Dan Bernstein.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_spacing_in_objective_c_properties):

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

6 years agoRebaseline some tests after r166748. These tests now correctly
simon.fraser@apple.com [Fri, 4 Apr 2014 01:24:57 +0000 (01:24 +0000)]
Rebaseline some tests after r166748. These tests now correctly
report a contentsScale.

* platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt:

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

6 years agoWeb Inspector: JSContext inspection provide a way to opt-out of including Native...
commit-queue@webkit.org [Fri, 4 Apr 2014 00:50:49 +0000 (00:50 +0000)]
Web Inspector: JSContext inspection provide a way to opt-out of including Native Call Stacks in Exception traces reported to Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=131186

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

* API/JSContextPrivate.h:
* API/JSContext.mm:
(-[JSContext _includesNativeCallStackWhenReportingExceptions]):
(-[JSContext _setIncludesNativeCallStackWhenReportingExceptions:]):
JSContext ObjC SPI to opt-out of including native call stacks in exceptions.

* API/JSContextRefPrivate.h:
* API/JSContextRef.cpp:
(JSGlobalContextGetIncludesNativeCallStackWhenReportingExceptions):
(JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions):
JSContext C SPI to opt-out of including native call stacks in exceptions.

* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::reportAPIException):
Only include the native call stack if the setting is enabled. It is enabled by default.

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

6 years agoAdd WKWebView documentation
andersca@apple.com [Thu, 3 Apr 2014 23:55:31 +0000 (23:55 +0000)]
Add WKWebView documentation
https://bugs.webkit.org/show_bug.cgi?id=131190

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKWebView.h:

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

6 years agoREGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
msaboff@apple.com [Thu, 3 Apr 2014 23:51:47 +0000 (23:51 +0000)]
REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
https://bugs.webkit.org/show_bug.cgi?id=131189

Reviewed by Geoffrey Garen.

Elevate the priority of all WebKit2 service processes on iOS, not just the network process.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):

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

6 years agoASSERT(m_children.isEmpty()) in PlatformCALayerRemote::removeAllSublayers() on time.com
simon.fraser@apple.com [Thu, 3 Apr 2014 23:28:42 +0000 (23:28 +0000)]
ASSERT(m_children.isEmpty()) in PlatformCALayerRemote::removeAllSublayers() on time.com
https://bugs.webkit.org/show_bug.cgi?id=131187

Reviewed by Maciej Stachowiak.

After a call to PlatformCALayerRemote::adoptSublayers() when a layer
toggles between tiled and non-tiled, we'd assert in PlatformCALayerRemote::removeAllSublayers()
that not all sublayers had been removed (there was one with a null superlayer).

Fix by ensuring that we don't copy over custom subviews when adoptSublayers()
is called; they'll get added as we update children anyway.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::adoptSublayers):

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

6 years agoMerge ShapeInfo & ShapeOutsideInfo now that ShapeInsideInfo is no more
bjonesbe@adobe.com [Thu, 3 Apr 2014 23:04:49 +0000 (23:04 +0000)]
Merge ShapeInfo & ShapeOutsideInfo now that ShapeInsideInfo is no more
https://bugs.webkit.org/show_bug.cgi?id=131180

Reviewed by Andreas Kling.

Now that ShapeInsideInfo is gone, having a class hiearachy and
templates doesn't make any sense. As a first step to cleaning up the
code, this remove ShapeInfo and puts all of its functionality into
ShapeOutsideInfo.

No new tests, no behavior change.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/shapes/ShapeInfo.cpp: Removed.
* rendering/shapes/ShapeInfo.h: Removed.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShapePhysicalBoundingBox):
(WebCore::ShapeOutsideInfo::shapeToRendererPoint):
(WebCore::ShapeOutsideInfo::shapeToRendererSize):
(WebCore::referenceBox):
(WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
(WebCore::checkShapeImageOrigin):
(WebCore::getShapeImageAndRect):
(WebCore::getShapeImageMarginRect):
(WebCore::ShapeOutsideInfo::computedShape):
(WebCore::borderBeforeInWritingMode):
(WebCore::borderAndPaddingBeforeInWritingMode):
(WebCore::ShapeOutsideInfo::logicalTopOffset):
(WebCore::borderStartWithStyleForWritingMode):
(WebCore::borderAndPaddingStartWithStyleForWritingMode):
(WebCore::ShapeOutsideInfo::logicalLeftOffset):
(WebCore::ShapeOutsideInfo::computeSegmentsForLine):
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
(WebCore::ShapeOutsideInfo::shapeValue): Deleted.
(WebCore::ShapeOutsideInfo::styleForWritingMode): Deleted.
* rendering/shapes/ShapeOutsideInfo.h:

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

6 years agoFix over-retain in SharedBufferCF's createCFData().
akling@apple.com [Thu, 3 Apr 2014 22:56:47 +0000 (22:56 +0000)]
Fix over-retain in SharedBufferCF's createCFData().
<https://webkit.org/b/131139>

Constructing the return type (RetainPtr<CFDataRef>) will also retain
the pointee, so this would end up leaking.

Reviewed by Anders Carlsson.

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::createCFData):

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

6 years ago[iOS][WK2] Add SPI to handle animated resize
benjamin@webkit.org [Thu, 3 Apr 2014 22:55:39 +0000 (22:55 +0000)]
[iOS][WK2] Add SPI to handle animated resize
https://bugs.webkit.org/show_bug.cgi?id=131141

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-03
Reviewed by Simon Fraser.

Set up a basic API to handle animated resize. The code does not do much at the moment,
it is mostly to have an interface we can implement later.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView setFrame:]):
(-[WKWebView setBounds:]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _frameOrBoundsChangedFrom:]):
(-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _frameOrBoundsChanged]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

6 years agoSource/WebCore: [Win] Turn on ENABLE_CSS_GRID_LAYOUT
bfulgham@apple.com [Thu, 3 Apr 2014 22:47:22 +0000 (22:47 +0000)]
Source/WebCore: [Win] Turn on ENABLE_CSS_GRID_LAYOUT
https://bugs.webkit.org/show_bug.cgi?id=131147

Reviewed by Simon Fraser.

Covered by existing fast/css/getComputedStyle tests.

* css/CSSAllInOne.cpp: Add CSSGridLineNamesValue.cpp when building
with ENABLE(CSS_GRID_LAYOUT)

WebKitLibraries: [Win] Enable the CSS_GRID_LAYOUT feature.
https://bugs.webkit.org/show_bug.cgi?id=131147

Reviewed by Simon Fraser.

Just like the CANVAS_PATH feature, this seems to have been
overlooked when it was turned on for other ports.

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

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

6 years agoSource/WebCore: Pixelated WebView when display is changed from hiDPI to regularDPI
simon.fraser@apple.com [Thu, 3 Apr 2014 22:44:58 +0000 (22:44 +0000)]
Source/WebCore: Pixelated WebView when display is changed from hiDPI to regularDPI
https://bugs.webkit.org/show_bug.cgi?id=131185

Reviewed by Tim Horton.

r166309 added a short circuit in GraphicsLayerCA::updateContentsScale()
when the scale didn't change. This broke layers which expected to
unconditionally receive a setContentsScale(), namely the WebTiledBackingLayer
which owns the TileController. WebTiledBackingLayer overrode -setContentsScale:
to pass the scale down to the TileController; however, it didn't override
-contentsScale, and it mucked with the scale passed in.

Fix by having setting and fetching contentsScale on a WebTiledBackingLayer
work as expected. Also rename the TileController functions to mirror the
CALayer functions better.

* WebCore.exp.in:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateContentsScale):
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::contentsScale):
(WebCore::TileController::setContentsScale):
(WebCore::TileController::scale): Deleted.
(WebCore::TileController::setScale): Deleted.
* platform/graphics/ca/mac/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer setContentsScale:]):
(-[WebTiledBackingLayer contentsScale]):

Source/WebKit2: Pixelated WebView when display is changed from hiDPI to regularDPI
https://bugs.webkit.org/show_bug.cgi?id=131185
<rdar://problem/16512184&16503714>

Reviewed by Tim Horton.

TileController function was renamed.

* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::setContentsScale):

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

6 years ago[CSS Shapes] LineSegment logicalLeft and logicalRight members should be floats
zoltan@webkit.org [Thu, 3 Apr 2014 22:34:34 +0000 (22:34 +0000)]
[CSS Shapes] LineSegment logicalLeft and logicalRight members should be floats
https://bugs.webkit.org/show_bug.cgi?id=116160

Reviewed by Andreas Kling.

LineSegment edges should not have been changed to LayoutUnit. These are
used only as floats. I modified them back to floats.

No new tests are needed, no behavior change.

* rendering/shapes/Shape.h:

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

6 years ago[CG] Canvas lineDashOffset does not handle negative numbers correctly
krit@webkit.org [Thu, 3 Apr 2014 21:44:54 +0000 (21:44 +0000)]
[CG] Canvas lineDashOffset does not handle negative numbers correctly
https://bugs.webkit.org/show_bug.cgi?id=80560

Reviewed by Dean Jackson.

Source/WebCore:

CG ignores negative dash array offsets. Check if we have a negative offset, if yes
then calculate the length of the dash array and modulo the dash array offset with
the dash array length.

Test: fast/canvas/canvas-negative-lineDashOffset.html

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setLineDash):

LayoutTests:

Test correct rendering of negative offset for Canvas dash arrays.

* fast/canvas/canvas-negative-lineDashOffset-expected.txt: Added.
* fast/canvas/canvas-negative-lineDashOffset.html: Added.
* fast/canvas/script-tests/canvas-negative-lineDashOffset.js: Added.
(dataToArray):
(getPixel):
(pixelShouldBe):

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

6 years agoREGRESSION: fast/css/relative-positioned-block-nested-with-inline-parent-multiple...
hyatt@apple.com [Thu, 3 Apr 2014 21:40:49 +0000 (21:40 +0000)]
REGRESSION: fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html broken
https://bugs.webkit.org/show_bug.cgi?id=131183

Reviewed by Simon Fraser.

Revert the loop to continue rather than breaking when an invalid block is encountered.
This is what it used to do if it encountered a non-continuation block.

* rendering/RenderInline.cpp:
(WebCore::updateStyleOfAnonymousBlockContinuations):

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

6 years ago[WebKit2] Promote user script SPI to API
weinig@apple.com [Thu, 3 Apr 2014 21:36:32 +0000 (21:36 +0000)]
[WebKit2] Promote user script SPI to API
https://bugs.webkit.org/show_bug.cgi?id=131181

Reviewed by Anders Carlsson.

Source/WebKit/mac:

* MigrateHeaders.make:

Source/WebKit2:

* UIProcess/API/Cocoa/WKScriptMessage.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessage.h.
* UIProcess/API/Cocoa/WKScriptMessage.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessage.mm.
(-[WKScriptMessage scriptWorld]):
(-[_WKScriptMessage scriptWorld]): Deleted.
* UIProcess/API/Cocoa/WKScriptMessageHandler.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessageHandler.h.
* UIProcess/API/Cocoa/WKScriptWorld.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
* UIProcess/API/Cocoa/WKScriptWorld.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.mm.
(+[WKScriptWorld defaultWorld]):
(+[_WKScriptWorld defaultWorld]): Deleted.
* UIProcess/API/Cocoa/WKUserContentController.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentController.h.
* UIProcess/API/Cocoa/WKUserContentController.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentController.mm.
(-[WKUserContentController addScriptMessageHandler:name:world:]):
(-[WKUserContentController removeScriptMessageHandlerForName:world:]):
(-[_WKUserContentController addScriptMessageHandler:name:world:]): Deleted.
(-[_WKUserContentController removeScriptMessageHandlerForName:world:]): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration userContentController]):
(-[WKWebViewConfiguration setUserContentController:]):
(-[WKWebViewConfiguration _userContentController]): Deleted.
(-[WKWebViewConfiguration _setUserContentController:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKScriptMessage.h: Removed.
* UIProcess/API/Cocoa/_WKScriptMessage.mm: Removed.
* UIProcess/API/Cocoa/_WKScriptMessageHandler.h: Removed.
* UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
* UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
* UIProcess/API/Cocoa/_WKUserContentController.h: Removed.
* UIProcess/API/Cocoa/_WKUserContentController.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

6 years ago Unreviewed. Moving my name to committer section accidently
santoshbit2007@gmail.com [Thu, 3 Apr 2014 21:11:01 +0000 (21:11 +0000)]
  Unreviewed. Moving my name to committer section accidently
              added in reviewer section.
     * Scripts/webkitpy/common/config/contributors.json:

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

6 years agoMake download policy decisions SPI for now
andersca@apple.com [Thu, 3 Apr 2014 21:03:48 +0000 (21:03 +0000)]
Make download policy decisions SPI for now
https://bugs.webkit.org/show_bug.cgi?id=131179

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
(NS_ENUM):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):

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

6 years agoHarden FilterOperation type casting
simon.fraser@apple.com [Thu, 3 Apr 2014 20:57:48 +0000 (20:57 +0000)]
Harden FilterOperation type casting
https://bugs.webkit.org/show_bug.cgi?id=131142

Reviewed by Sam Weinig.

DefaultFilterOperation had an error-prone behavior where it set the base class
OperationType to the type of some other filter class, but overrode isDefault().
This made it very easy to write incorrect code that casted incorrectly based on type().

Fix by making adding a DEFAULT filter operation type, and storing the represented
type on DefaultFilterOperation().

Also remove the OperationType argument for constructors of FilterOperations that
can only be of one type, to avoid possible mistakes.

Make the type cast macros a bit more normal, and use them in a few places.

Fixed PlatformCAFiltersMac to handle the default filter case more cleanly.

Source/WebCore:

* WebCore.exp.in:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
* platform/graphics/ca/PlatformCAFilters.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::DefaultFilterOperation::operator==):
(WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
(WebCore::ReferenceFilterOperation::operator==):
(WebCore::BlurFilterOperation::operator==):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::operator==):
(WebCore::DropShadowFilterOperation::blend):
* platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::blend):
(WebCore::FilterOperation::type):
(WebCore::FilterOperation::isBasicColorMatrixFilterOperation):
(WebCore::FilterOperation::isBasicComponentTransferFilterOperation):
(WebCore::FilterOperation::isSameType):
(WebCore::DefaultFilterOperation::create):
(WebCore::DefaultFilterOperation::representedType):
(WebCore::DefaultFilterOperation::DefaultFilterOperation):
(WebCore::ReferenceFilterOperation::create):
(WebCore::BlurFilterOperation::create):
(WebCore::BlurFilterOperation::BlurFilterOperation):
(WebCore::DropShadowFilterOperation::create):
(WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
(WebCore::FilterOperation::isDefault): Deleted.
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::outsets):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeFilterOperation):
(IPC::decodeFilterOperation):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):

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

6 years agoStop throwing away the Document's StyleResolver on a timer.
akling@apple.com [Thu, 3 Apr 2014 20:56:33 +0000 (20:56 +0000)]
Stop throwing away the Document's StyleResolver on a timer.
<https://webkit.org/b/131168>
<rdar://problem/15227045>

This was causing some unfortunate pauses when returning to idle pages
after a long-ish time. There's already a mechanism in place that will
throw these away if the system comes under memory pressure.

Reviewed by Sam Weinig.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didAccessStyleResolver): Deleted.
(WebCore::Document::styleResolverThrowawayTimerFired): Deleted.
* dom/Document.h:

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

6 years agoAssertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
simon.fraser@apple.com [Thu, 3 Apr 2014 20:46:03 +0000 (20:46 +0000)]
Assertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
https://bugs.webkit.org/show_bug.cgi?id=131150

Reviewed by Beth Dakin.

When calling updateScrollCoordinatedLayer() under styleChanged, we haven't done
layout yet so our composting layers haven't been hooked together. Don't try
to add a zero nodeID to the map in this case.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

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

6 years agogit-svn-id: http://svn.webkit.org/repository/webkit/trunk@166738 268f45cc-cd09-0410...
santoshbit2007@gmail.com [Thu, 3 Apr 2014 20:14:29 +0000 (20:14 +0000)]
git-svn-id: svn.webkit.org/repository/webkit/trunk@166738 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoContinuations casting issue.
hyatt@apple.com [Thu, 3 Apr 2014 19:22:48 +0000 (19:22 +0000)]
Continuations casting issue.
https://bugs.webkit.org/show_bug.cgi?id=130057
<rdar://problem/16283406>

Reviewed by Simon Fraser.

Source/WebCore:

The code to update relative positioned anonymous block continuations should not
have assumed that all siblings were RenderBlocks. Make the code smarter and
make it bail when it hits something that isn't part of the block continuation
chain.

Added fast/block/continuation-crash.html

* rendering/RenderInline.cpp:
(WebCore::updateStyleOfAnonymousBlockContinuations):

LayoutTests:

* fast/block/continuation-crash-expected.txt: Added.
* fast/block/continuation-crash.html: Added.

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

6 years agoREGRESSION (Async text input): Controls become unresponsive to mouse events
ap@apple.com [Thu, 3 Apr 2014 19:01:28 +0000 (19:01 +0000)]
REGRESSION (Async text input): Controls become unresponsive to mouse events
https://bugs.webkit.org/show_bug.cgi?id=131176
<rdar://problem/16507932>

Reviewed by Tim Horton.

* UIProcess/API/mac/WKView.mm: (NATIVE_MOUSE_EVENT_HANDLER):
Don't confuse event handling machinery by sending events to WebProcess twice.

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

6 years agoWKWebView should always have a UIDelegate, even when closed
andersca@apple.com [Thu, 3 Apr 2014 18:34:18 +0000 (18:34 +0000)]
WKWebView should always have a UIDelegate, even when closed
https://bugs.webkit.org/show_bug.cgi?id=131174
<rdar://problem/16389248>

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView UIDelegate]):
(-[WKWebView setUIDelegate:]):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIDelegate):
(WebKit::UIDelegate::~UIDelegate):
(WebKit::UIDelegate::createUIClient):
(WebKit::UIDelegate::delegate):
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::UIClient):
(WebKit::UIDelegate::UIClient::~UIClient):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::actionsForElement):
(WebKit::UIClient::UIClient): Deleted.
(WebKit::UIClient::~UIClient): Deleted.
(WebKit::UIClient::delegate): Deleted.
(WebKit::UIClient::setDelegate): Deleted.
(WebKit::UIClient::createNewPage): Deleted.
(WebKit::UIClient::runJavaScriptAlert): Deleted.
(WebKit::UIClient::runJavaScriptConfirm): Deleted.
(WebKit::UIClient::runJavaScriptPrompt): Deleted.
(WebKit::UIClient::actionsForElement): Deleted.
* UIProcess/ios/WKActionSheetAssistant.mm:

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

6 years agoFix bit rot in ARMv7 JIT probe mechanism.
mark.lam@apple.com [Thu, 3 Apr 2014 18:25:26 +0000 (18:25 +0000)]
Fix bit rot in ARMv7 JIT probe mechanism.
<https://webkit.org/b/131167>

Reviewed by Geoffrey Garen.

1. The macro assembler does not support pushing the SP register.  Worked
   around this by pushing the LR register as a placeholder, and then
   writing the original SP value to that slot.
2. The CPUState field in the ProbeContext needs to be aligned on a 4
   byte boundary, not an 8 byte boundary.

* assembler/MacroAssemblerARMv7.cpp:
(JSC::MacroAssemblerARMv7::probe):
* jit/JITStubsARMv7.h:

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

6 years agoDocument WKNavigationAction and WKNavigationResponse
andersca@apple.com [Thu, 3 Apr 2014 18:06:50 +0000 (18:06 +0000)]
Document WKNavigationAction and WKNavigationResponse
https://bugs.webkit.org/show_bug.cgi?id=131138

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:

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

6 years agoMake actionsForElement a proper API::UIClient member function
andersca@apple.com [Thu, 3 Apr 2014 17:56:03 +0000 (17:56 +0000)]
Make actionsForElement a proper API::UIClient member function
https://bugs.webkit.org/show_bug.cgi?id=131171

Reviewed by Sam Weinig.

* UIProcess/API/APIUIClient.h:
(API::UIClient::actionsForElement):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIClient::actionsForElement):
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):

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

6 years agoconfig.json fix.
lforschler@apple.com [Thu, 3 Apr 2014 17:54:45 +0000 (17:54 +0000)]
config.json fix.

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

6 years ago[WK2] Fix !ENABLE(BLOB) build
commit-queue@webkit.org [Thu, 3 Apr 2014 16:55:46 +0000 (16:55 +0000)]
[WK2] Fix !ENABLE(BLOB) build
https://bugs.webkit.org/show_bug.cgi?id=131164

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-04-03
Reviewed by Alexey Proskuryakov.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

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

6 years ago[WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing
zoltan@webkit.org [Thu, 3 Apr 2014 16:49:28 +0000 (16:49 +0000)]
[WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing
https://bugs.webkit.org/show_bug.cgi?id=131126

Reviewed by Timothy Hatcher.

I updated the test, so it works with the new testing framework. I included the shape path results in the test,
so we won't run into rounding problems, and we don't have that big test set, which would require an expected
result generation. We can add it later, if we extend the test set. The logic is similar to the non margin test case.

* TestExpectations:
* inspector/dom/highlight-shape-outside-margin-expected.txt:
* inspector/dom/highlight-shape-outside-margin.html:

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

6 years ago[CSS Shapes] CRASH with calc() value args in inset round
bjonesbe@adobe.com [Thu, 3 Apr 2014 16:48:23 +0000 (16:48 +0000)]
[CSS Shapes] CRASH with calc() value args in inset round
https://bugs.webkit.org/show_bug.cgi?id=129816

Reviewed by Andreas Kling.

Source/WebCore:

The code to parse the inset rounded corners was adding the parser
value arguments to a temporary CSSParserValueList. Unfortunately,
CSSParserValueList expects to own the values it contains, and it frees
the values it contains when the list is destroyed. This was a problem
because the values are owned by the CSSParserValueList passed in to
parseInsetRoundedCorners, and thus the calc's argument list would get
double freed, resulting in a crash. This patch fixes this by using a
Vector to hold the pointers instead.

Test: fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseInsetRoundedCorners):

LayoutTests:

Simple test to make sure that using calc in the round argument of an
inset doesn't cause a crash.

* fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html: Added.

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

6 years agoFix iOS build.
andersca@apple.com [Thu, 3 Apr 2014 16:47:48 +0000 (16:47 +0000)]
Fix iOS build.

* UIProcess/ios/WKActionSheetAssistant.mm:

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

6 years agoWebKitPerfMonitor: There should be a way to add all metrics of a suite without also...
rniwa@webkit.org [Thu, 3 Apr 2014 16:39:11 +0000 (16:39 +0000)]
WebKitPerfMonitor: There should be a way to add all metrics of a suite without also adding subtests
https://bugs.webkit.org/show_bug.cgi?id=131157

Reviewed by Andreas Kling.

Split "all metrics" into all metrics of a test suite and all subtests of the suite.
This allows, for example, adding all metrics such as Arithmetic and Geometric for
a given test suite without also adding its subtests.

* public/index.html:
(init.showCharts):
(init):

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

6 years agoWebKitPerfMonitor: Tooltips cannot be pinned after using browser's back button
rniwa@webkit.org [Thu, 3 Apr 2014 16:36:18 +0000 (16:36 +0000)]
WebKitPerfMonitor: Tooltips cannot be pinned after using browser's back button
https://bugs.webkit.org/show_bug.cgi?id=131155

Reviewed by Andreas Kling.

The bug was caused by Chart.attach binding event listeners on plot container on each call.
This resulted in the click event handler toggling the visiblity of the tooltip twice upon
click when attach() has been called even number of times, keeping the tooltip invisible.

Fixed the bug by extracting the code to bind event listeners outside of Chart.attach as
a separate function, bindPlotEventHandlers, and calling it exactly once when Chart.attach
is called for the first time.

* public/index.html:
(Chart.attach):
(Chart..bindPlotEventHandlers):

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

6 years agoLeaving a streaming movie by going "Back" keeps playing the audio
jer.noble@apple.com [Thu, 3 Apr 2014 16:29:32 +0000 (16:29 +0000)]
Leaving a streaming movie by going "Back" keeps playing the audio
https://bugs.webkit.org/show_bug.cgi?id=131149

Reviewed by Eric Carlson.

When stopping a HTMLMediaElement, call userCancelledLoad() (which clears the
MediaPlayer) only after calling setPausedInternal() (which pauses the MediaPlayer).
Previously, and in the reverse order, the MediaPlayer would never get a chance to pause
before being cleared. There is an underlying error with the QTKit media engine which
is causing it to continue playing even after its last reference is released, but this
does fix the symptom of playback continuing even after stopping.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stop):

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

6 years ago[EME] Crash when passing a NULL initData to MediaKeys.createSession()
jer.noble@apple.com [Thu, 3 Apr 2014 16:26:33 +0000 (16:26 +0000)]
[EME] Crash when passing a NULL initData to MediaKeys.createSession()
https://bugs.webkit.org/show_bug.cgi?id=131156

Reviewed by Eric Carlson.

Update the checks at the start of createSession() to match the current spec, notably
bailing early if the initData parameter is NULL or empty.

* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::createSession):

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

6 years agoRename UIClient.{h, mm} to UIDelegate.{h, mm}.
andersca@apple.com [Thu, 3 Apr 2014 16:03:46 +0000 (16:03 +0000)]
Rename UIClient.{h, mm} to UIDelegate.{h, mm}.

Rubber-stamped by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/Cocoa/UIDelegate.h: Renamed from Source/WebKit2/UIProcess/Cocoa/UIClient.h.
* UIProcess/Cocoa/UIDelegate.mm: Renamed from Source/WebKit2/UIProcess/Cocoa/UIClient.mm.
* WebKit2.xcodeproj/project.pbxproj:

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

6 years ago[iOS] add missing QuickTime plug-in replacement API
eric.carlson@apple.com [Thu, 3 Apr 2014 15:46:05 +0000 (15:46 +0000)]
[iOS] add missing QuickTime plug-in replacement API
https://bugs.webkit.org/show_bug.cgi?id=131042

Reviewed by Dean Jackson.

Rename QuickTimePluginReplacement.cpp to QuickTimePluginReplacement.mm to make it possible
to use the ObjC JSC API.
* Modules/plugins/QuickTimePluginReplacement.cpp:
* Modules/plugins/QuickTimePluginReplacement.h:
(WebCore::QuickTimePluginReplacement::parentElement):
* Modules/plugins/QuickTimePluginReplacement.idl:

* Modules/plugins/QuickTimePluginReplacement.js:
(Replacement.prototype.timedMetadataUpdates): Implement.
(Replacement.prototype.accessLog): Ditto.
(Replacement.prototype.errorLog): Ditto.

Use the JSC ObjC API to create a JavaScript object from an array of AVMetadataItems. The
JSC ObjC API supports basic NSTypes, but an AVMetadataItem can also contain NSData which
the existing plug-in returns as base-64 encoded data, so create wrappers for NSDictionary
and NSArray.
* Modules/plugins/QuickTimePluginReplacement.mm: Copied from Source/WebCore/Modules/plugins/QuickTimePluginReplacement.cpp.
(WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): Disambiguate with "JSC::"
(WebCore::QuickTimePluginReplacement::installReplacement): Ditto.
(WebCore::jsValueWithDataInContext): Create JSValue* from NSData.
(WebCore::jsValueWithArrayInContext): Create JSValue* from NSArray.
(WebCore::jsValueWithDictionaryInContext): Create JSValue* from NSDictionary.
(WebCore::jsValueWithValueInContext): Create JSValue* from basic NSTypes plus AVMetadataItem
    and NSData.
(WebCore::jsValueWithAVMetadataItemInContext): Create JSValue* from AVMetadataItem.
(WebCore::JSQuickTimePluginReplacement::timedMetaData): Script interface.
(WebCore::JSQuickTimePluginReplacement::accessLog): Ditto.
(WebCore::JSQuickTimePluginReplacement::errorLog): Ditto.

* WebCore.xcodeproj/project.pbxproj: QuickTimePluginReplacement.cpp -> QuickTimePluginReplacement.mm.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::timedMetadata): iOS only accessor.
(WebCore::MediaPlayer::accessLog): Ditto.
(WebCore::MediaPlayer::errorLog): Ditto.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::timedMetadata):
(WebCore::MediaPlayerPrivateAVFoundationObjC::accessLog):
(WebCore::MediaPlayerPrivateAVFoundationObjC::errorLog):
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
(WebCore::itemKVOProperties):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

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

6 years ago[EFL][WK2] Replacing zoom functionality of MiniBrowser from scale_set to page_zoom_set.
commit-queue@webkit.org [Thu, 3 Apr 2014 15:33:11 +0000 (15:33 +0000)]
[EFL][WK2] Replacing zoom functionality of MiniBrowser from scale_set to page_zoom_set.
https://bugs.webkit.org/show_bug.cgi?id=130391

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-04-03
Reviewed by Gyuyoung Kim.

Source/WebKit2:

Change the implementation of the zoom functionality from ewk_view_scale_set
to ewk_view_page_zoom_set. Adding to the API functions: ewk_view_page_zoom_set and
ewk_view_page_zoom_get to call appropriate WK functions.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_page_zoom_set):
(ewk_view_page_zoom_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

Tools:

Change the implementation of the zoom functionality from ewk_view_scale_set
to ewk_view_page_zoom_set.

* MiniBrowser/efl/main.c:

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

6 years ago[CSS Grid Layout] Make sure grid element's shrink-to-fit behavior is correct
commit-queue@webkit.org [Thu, 3 Apr 2014 14:50:55 +0000 (14:50 +0000)]
[CSS Grid Layout] Make sure grid element's shrink-to-fit behavior is correct
https://bugs.webkit.org/show_bug.cgi?id=103473

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-04-03
Reviewed by Sergio Villar Senin.

Added a new Layout Test to verify the shrink-to-fit behavior works as expected
for out-of-flow positioned grid elements.

* fast/css-grid-layout/grid-element-shrink-to-fit-expected.html: Added.
* fast/css-grid-layout/grid-element-shrink-to-fit.html: Added.

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

6 years agoARMv7 compare32() should not use TST to do CMP's job.
mark.lam@apple.com [Thu, 3 Apr 2014 14:37:32 +0000 (14:37 +0000)]
ARMv7 compare32() should not use TST to do CMP's job.
<https://webkit.org/b/131146>

Reviewed by Geoffrey Garen.

The ARMv7 implementation of "compare32(RegisterID left, TrustedImm32 right)"
was using "tst reg, reg" to implement "cmp reg, #0".  Unfortunately, the tst
instruction doesn't set the Overflow (V) flag and this results in random
results depending on whether there was a preceeding instruction that did set
the Overflow (V) flag.  This issue was causing emscripten-cube2hash to run
with a lot of OSR exits where not expected as well as producing wrong results.

The fix is to use "cmp reg, #0" to do the job properly.

* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::compare32):

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

6 years ago[CSS Regions] Include region range information when printing the render tree
abucur@adobe.com [Thu, 3 Apr 2014 13:27:53 +0000 (13:27 +0000)]
[CSS Regions] Include region range information when printing the render tree
https://bugs.webkit.org/show_bug.cgi?id=131159

Reviewed by Mihnea Ovidenie.

With this change showRenderObject() will print the region range for objects inside
a flow thread. The format is:
Rs: <startRegion> Re: <endRegion>

Because this can be called anytime during debugging, it's necessary to disable the
current flow thread caching to prevent using the wrong flow thread for an object.

Tests: No new tests, no functional change.

* rendering/RenderFlowThread.cpp:
(WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler):
(WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler):
* rendering/RenderFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRegionsInformation): Added.
(WebCore::RenderObject::showRenderObject):
* rendering/RenderObject.h:

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

6 years agoRenderSnapshottedPlugIn::paint should use iterator for traversal.
antti@apple.com [Thu, 3 Apr 2014 10:46:51 +0000 (10:46 +0000)]
RenderSnapshottedPlugIn::paint should use iterator for traversal.
https://bugs.webkit.org/show_bug.cgi?id=131158

Reviewed by Dean Jackson.

* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paint):

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

6 years ago[EFL] Enable CSS JIT again, it works fine after r166666.
ossy@webkit.org [Thu, 3 Apr 2014 10:28:30 +0000 (10:28 +0000)]
[EFL] Enable CSS JIT again, it works fine after r166666.

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-03
Reviewed by Csaba Osztrogonác.

* wtf/Platform.h:

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

6 years ago[CSS Grid Layout] <string> not allowed in grid-{area | row | column} syntax
svillar@igalia.com [Thu, 3 Apr 2014 10:15:55 +0000 (10:15 +0000)]
[CSS Grid Layout] <string> not allowed in grid-{area | row | column} syntax
https://bugs.webkit.org/show_bug.cgi?id=129713

Reviewed by Darin Adler.

Source/WebCore:

Grid positioning properties no longer accept <string> values for
named grid lines as they did in previous versions of the specs. They
were first replaced by <ident> and since the beginning of 2014 they
should only accept <custom-ident>.

Updated the parser and the style resolver to this new syntax. Also
updated the tests accordingly.

Test: fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html

* css/CSSParser.cpp:
(WebCore::isValidCustomIdent): New function that checks that the
<custom-ident> is valid.
(WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
(WebCore::CSSParser::parseGridPosition):
(WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
Replaced by WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition.
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::createGridPosition):

LayoutTests:

Replaced <string> by <custom-ident> in the tests. Also added a new
one to check that children are properly layed out after changes in
the grid line names.

* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child-expected.txt: Added.
* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html: Added.
* fast/css-grid-layout/grid-item-area-get-set.html:
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html:
* fast/css-grid-layout/grid-item-bad-resolution-double-span.html:
* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
* fast/css-grid-layout/grid-item-end-after-get-set.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
* fast/css-grid-layout/grid-item-named-grid-line-resolution-expected.txt:
* fast/css-grid-layout/grid-item-named-grid-line-resolution.html:
* fast/css-grid-layout/grid-item-negative-position-resolution.html:
* fast/css-grid-layout/grid-item-position-changed-dynamic.html:
* fast/css-grid-layout/grid-item-start-before-get-set-expected.txt:
* fast/css-grid-layout/grid-item-start-before-get-set.html:

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

6 years ago[webkitpy] perf profiler does not understand --call-graph argument
rego@igalia.com [Thu, 3 Apr 2014 09:55:00 +0000 (09:55 +0000)]
[webkitpy] perf profiler does not understand --call-graph argument
https://bugs.webkit.org/show_bug.cgi?id=131132

Reviewed by Ryosuke Niwa.

New versions of perf profiler have changed the argument from --call-graph to -g.

* Scripts/webkitpy/common/system/profiler.py:
(Perf.wrapper_arguments): Use -g instead of --call-graph.
* Scripts/webkitpy/port/driver_unittest.py:
(DriverTest.test_profiler_as_wrapper): Update test accordingly.

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

6 years agoAdd EFL WK2 performance bot to build.webkit.org
ossy@webkit.org [Thu, 3 Apr 2014 09:39:33 +0000 (09:39 +0000)]
Add EFL WK2 performance bot to build.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=131034

Fix after r166707, use "Perf" instead of "perf" for consistency.

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-03
Reviewed by Csaba Osztrogonác.

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

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

6 years ago[GTK][Cmake] Enable CSS JIT
commit-queue@webkit.org [Thu, 3 Apr 2014 09:23:31 +0000 (09:23 +0000)]
[GTK][Cmake] Enable CSS JIT
https://bugs.webkit.org/show_bug.cgi?id=131022

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-04-03
Reviewed by Martin Robinson.

* wtf/Platform.h: Enable CSS JIT for GTK port.

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

6 years agoAdd EFL WK2 performance bot to build.webkit.org
ossy@webkit.org [Thu, 3 Apr 2014 09:19:26 +0000 (09:19 +0000)]
Add EFL WK2 performance bot to build.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=131034

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-03
Reviewed by Csaba Osztrogonác.

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

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

6 years agoCrash after mutating after pseudo style
antti@apple.com [Thu, 3 Apr 2014 08:51:22 +0000 (08:51 +0000)]
Crash after mutating after pseudo style
https://bugs.webkit.org/show_bug.cgi?id=130881

Reviewed by Andreas Kling.

Source/WebCore:

Test: fast/css/pseudo-after-crash.html

* style/StyleResolveTree.cpp:
(WebCore::Style::updateBeforeOrAfterPseudoElement):

    Invalidate the cached renderer for pseudo elements too.

(WebCore::Style::needsPseudeElement): Deleted.

    Fix spelling.

LayoutTests:

* fast/css/pseudo-after-crash-expected.txt: Added.
* fast/css/pseudo-after-crash.html: Added.

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

6 years agoAX: AccessibilityObject::children() returns invalid results sometimes
cfleizach@apple.com [Thu, 3 Apr 2014 08:17:21 +0000 (08:17 +0000)]
AX: AccessibilityObject::children() returns invalid results sometimes
https://bugs.webkit.org/show_bug.cgi?id=130563

Reviewed by Joseph Pecoraro.

Source/WebCore:

Allow the DOM inspector to handle AX objects that do not have Node equivalents
(e.g. anonymous renderers).

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::processAccessibilityChildren):
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:

LayoutTests:

* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:

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

6 years ago[GTK][CMake] Look for glx.h in OPENGL_INCLUDE_DIR.
rakuco@webkit.org [Thu, 3 Apr 2014 07:27:58 +0000 (07:27 +0000)]
[GTK][CMake] Look for glx.h in OPENGL_INCLUDE_DIR.
https://bugs.webkit.org/show_bug.cgi?id=131095

Reviewed by Martin Robinson.

One needs to take into account OpenGL's include directory found via
find_package() when looking for glx.h, since if the former is a
non-standard location the latter will also be. If this is not it is
possible that OpenGL is found but GLX support is not properly detected.

* Source/cmake/OptionsGTK.cmake:

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

6 years agoWebKitPerfMonitor: Tooltips can be cut off at the top
rniwa@webkit.org [Thu, 3 Apr 2014 07:08:32 +0000 (07:08 +0000)]
WebKitPerfMonitor: Tooltips can be cut off at the top
https://bugs.webkit.org/show_bug.cgi?id=130960

Reviewed by Andreas Kling.

* public/common.css:
(#title): Removed the gradients, box shadows, and border from the header.
(#title h1): Reduce the font size.
(#title ul): Use line-height to vertically align the navigation bar instead of specifying a padding atop.
* public/index.html:
(.tooltop:before): Added. Identical to .tooltop:after except it's upside down (arrow facing up).
(.tooltip.inverted:before): Show the arrow facing up when .inverted is set.
(.tooltip.inverted:before): Hide the arrow facing down when .inverted is set.
* public/js/helper-classes.js:
(Tooltip.show): Show the tooltip below the point if placing it above the point results in the top of the
tooltip extending above y=0.

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

6 years agoWebKitPerfMonitor: Y-axis adjustment is too aggressive
rniwa@webkit.org [Thu, 3 Apr 2014 07:07:02 +0000 (07:07 +0000)]
WebKitPerfMonitor: Y-axis adjustment is too aggressive
https://bugs.webkit.org/show_bug.cgi?id=130937

Reviewed by Andreas Kling.

Previously, adjusted min. and max. were defined as the two standards deviations away from EWMA of measured
results. This had two major problems:
1. Two standard deviations can be too small to show the confidence interval for results.
2. Sometimes baseline and target can be more than two standards deviations away.

Fixed the bug by completely rewriting the algorithm to compute the interval. Instead of blindly using two
standard deviations as margins, we keep adding quarter the standard deviation on each side until more than 90%
of points lie in the interval or we've expanded 4 standard deviations. Once this condition is met, we reduce
the margin on each side separately to reduce the empty space on either side.

A more rigorous approach would involve computing least squared value of results with respect to intervals
but that seems like an overkill for a simple UI problem; it's also computationally expensive.

* public/index.html:
(Chart..adjustedIntervalForRun): Extracted from computeYAxisBoundsToFitLines.
(Chart..computeYAxisBoundsToFitLines): Compute the min. and max. adjusted intervals out of adjusted intervals
for each runs (current, baseline, and target) so that at least one point from each set of results is shown.
We wouldn't see the difference between measured values versus baseline and target values otherwise.
* public/js/helper-classes.js:
(PerfTestResult.unscaledConfidenceIntervalDelta): Returns the default value if the confidence
interval delta cannot be computed.
(PerfTestResult.isInUnscaledInterval): Added. Returns true iff the confidence intervals lies
within the given interval.
(PerfTestRuns..filteredResults): Extracted from unscaledMeansForAllResults now that PerfTestRuns.min and
PerfTestRuns.max need to use both mean and confidence interval delta for each result.
(PerfTestRuns..unscaledMeansForAllResults):
(PerfTestRuns.min): Take the confidence interval delta into account.
(PerfTestRuns.max): Ditto.
(PerfTestRuns.countResults): Returns the number of results in the given time frame (> minTime).
(PerfTestRuns.countResultsInInterval): Returns the number of results whose confidence interval lie within the
given interval.
(PerfTestRuns.exponentialMovingArithmeticMean): Fixed the typo so that it actually computes the EWMA.

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

6 years agoREGRESSION (r166144): fast/preloader/document-write.html is very flaky
ap@apple.com [Thu, 3 Apr 2014 06:21:27 +0000 (06:21 +0000)]
REGRESSION (r166144): fast/preloader/document-write.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=130942

* platform/mac/TestExpectations: Removing test expectation, because the offending
revision was rolled out.

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

6 years ago[EFL][WK1] Use Evas_Touch_Point_State instead of Ewk_Touch_Point_Type
ryuan.choi@samsung.com [Thu, 3 Apr 2014 06:15:51 +0000 (06:15 +0000)]
[EFL][WK1] Use Evas_Touch_Point_State instead of Ewk_Touch_Point_Type
https://bugs.webkit.org/show_bug.cgi?id=131151

Reviewed by Gyuyoung Kim.

Source/WebKit/efl:

Like ewebkit2, we'd beter to use EFL type instead of WebKit specific type
In addition, changed type of id as int to match with ewebkit2.

* ewk/ewk_frame.h: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
* ewk/ewk_touch_event.cpp:
(toPlatformTouchPointState):

Tools:

* DumpRenderTree/efl/EventSender.cpp: Replace Ewk_Touch_Point_Type to Evas_Touch_Point_State.
(TouchEventInfo::TouchEventInfo):
(sendTouchEvent):
(addTouchPointCallback):
(updateTouchPointCallback):
(cancelTouchPointCallback):
(releaseTouchPointCallback):

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

6 years agoSandbox violation in NetworkProcess when uploading a bundle
ap@apple.com [Thu, 3 Apr 2014 05:59:30 +0000 (05:59 +0000)]
Sandbox violation in NetworkProcess when uploading a bundle
https://bugs.webkit.org/show_bug.cgi?id=131133

Reviewed by Brady Eidson.

Source/WebCore:

Track generated file ownership explicitly, so that each copy of FormData would know
whether to delete the file.

This part is needed to prevent asserting in FormData destructor in NetworkProcess,
because it doesn't delete the files. Also, some cleanup.

* WebCore.exp.in: Don't export FormData::removeGeneratedFilesIfNeeded(), WebKit2
doesn't need it any more.
* platform/network/FormData.cpp: Removed m_hasGeneratedFiles. There is no problem
iterating over FormDataElements to compute it, and that's more robust when FormDatas
are passed or stored on disk permanently.
Updated touched functions to use C++ iteration, and renamed "e" to "element".
(WebCore::FormData::encode): Keep encoding a boolean for hasGeneratedFiles, because
the encoded FormData can be stored persitently, and we can't change the format.

* platform/network/FormData.h: (WebCore::FormDataElement::FormDataElement):
Added m_ownsGeneratedFile. FormData will only delete files it owns. Since files
are generated immediately before form submission, it's always the FormData being
submitted that owns the generated files.

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Don't delete the files. It can't work.

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

6 years ago[CSSRegions] Use RenderStyle::hasFlowInto when needed
mihnea@adobe.com [Thu, 3 Apr 2014 05:45:24 +0000 (05:45 +0000)]
[CSSRegions] Use RenderStyle::hasFlowInto when needed
https://bugs.webkit.org/show_bug.cgi?id=131092

Reviewed by Andrei Bucur.

Add hasFlowInto() helper method on RenderStyle to be used
instead of directly checking the presence or absence of flowThread value.
No new functionality, no new tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/Element.cpp:
(WebCore::Element::shouldMoveToFlowThread):
* rendering/style/RenderStyle.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::isRendererReparented):

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

6 years agoCSS JIT: the adjacent position is never reset
benjamin@webkit.org [Thu, 3 Apr 2014 05:28:43 +0000 (05:28 +0000)]
CSS JIT: the adjacent position is never reset
https://bugs.webkit.org/show_bug.cgi?id=131145

Reviewed by Andreas Kling.

Source/WebCore:

Corresponding radar: <rdar://problem/16440036>. The backtracking action would use a tail
when not needed.

Test: fast/selectors/multiple-adjacent-chain-without-adjacent-tail.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::updateChainStates):

LayoutTests:

* fast/selectors/multiple-adjacent-chain-without-adjacent-tail-expected.txt: Added.
* fast/selectors/multiple-adjacent-chain-without-adjacent-tail.html: Added.

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

6 years agoVersioning.
bshafiei@apple.com [Thu, 3 Apr 2014 05:05:25 +0000 (05:05 +0000)]
Versioning.

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

6 years ago[WK2][EFL] Remove unnecessary reinterpret_cast<> in unit testcase
jinwoo7.song@samsung.com [Thu, 3 Apr 2014 04:57:29 +0000 (04:57 +0000)]
[WK2][EFL] Remove unnecessary reinterpret_cast<> in unit testcase
https://bugs.webkit.org/show_bug.cgi?id=131143

Reviewed by Gyuyoung Kim.

Ecore_Timer callback requires *Eina_Bool* return type instead of *bool*.
Also, WebKit/EFL port coding style recommends to use *Eina_Bool* in the
callback function for EFL event handler. Additionally, replaced 0 to nullptr.

* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::CallbackDataTimer::CallbackDataTimer):
(EWK2UnitTest::CallbackDataTimer::setDone):
(EWK2UnitTest::CallbackDataTimer::timeOutCallback):
(EWK2UnitTest::CallbackDataTimer::setTimedOut):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
(EWK2StorageManagerTest::timerCallback):
(TEST_F):

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

6 years ago[iOS] Remove the legacy string drawing code
benjamin@webkit.org [Thu, 3 Apr 2014 02:38:24 +0000 (02:38 +0000)]
[iOS] Remove the legacy string drawing code
https://bugs.webkit.org/show_bug.cgi?id=131088

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-02
Reviewed by Sam Weinig.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/ios:

* Misc/WebNSStringDrawing.h: Removed.
* Misc/WebNSStringDrawing.mm: Removed.
* Misc/WebUIKitSupport.h:

Source/WebKit/mac:

* Configurations/WebKit.xcconfig:

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

6 years agoRemove a FIXME that happened.
timothy_horton@apple.com [Thu, 3 Apr 2014 01:38:53 +0000 (01:38 +0000)]
Remove a FIXME that happened.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):

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

6 years agoSpeculative build fix for Windows.
bfulgham@apple.com [Thu, 3 Apr 2014 01:37:24 +0000 (01:37 +0000)]
Speculative build fix for Windows.

* DerivedSources.make: Make sure we generate our media control
scripts for Apple Windows (but not WinCairo)

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

6 years agoBuild fix after r166684.
mrowe@apple.com [Thu, 3 Apr 2014 01:36:58 +0000 (01:36 +0000)]
Build fix after r166684.

Source/WebKit/ios:

* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

Source/WebKit/win:

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::searchWithGoogle):

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

6 years agoFix the !USE(IOSURFACE) build... again.
timothy_horton@apple.com [Thu, 3 Apr 2014 01:34:57 +0000 (01:34 +0000)]
Fix the !USE(IOSURFACE) build... again.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):

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

6 years agoFix the !USE(IOSURFACE) iOS build.
timothy_horton@apple.com [Thu, 3 Apr 2014 01:09:40 +0000 (01:09 +0000)]
Fix the !USE(IOSURFACE) iOS build.

* platform/ios/MemoryPressureHandlerIOS.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory):

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

6 years ago<https://webkit.org/b/131136> Remove FrameLoadRequest's m_lockHistory member since...
mrowe@apple.com [Thu, 3 Apr 2014 00:56:09 +0000 (00:56 +0000)]
<https://webkit.org/b/131136> Remove FrameLoadRequest's m_lockHistory member since it's always false.

Reviewed by Andreas Kling.

* loader/FrameLoadRequest.cpp:
(WebCore::FrameLoadRequest::FrameLoadRequest):
* loader/FrameLoadRequest.h:
(WebCore::FrameLoadRequest::FrameLoadRequest):
(WebCore::FrameLoadRequest::lockHistory): Deleted.
(WebCore::FrameLoadRequest::setLockHistory): Deleted.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::load): Remove an if whose body was never executed.

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

6 years ago<https://webkit.org/b/131135> Introduce LockHistory and LockBackForwardList enums...
mrowe@apple.com [Thu, 3 Apr 2014 00:51:04 +0000 (00:51 +0000)]
<https://webkit.org/b/131135> Introduce LockHistory and LockBackForwardList enums to use in place of bools.

These arguments are often passed using literals at the call site, where the use of bools severely hinders
the readability of the code.

Reviewed by Andreas Kling.

Source/WebCore:

* WebCore.exp.in:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submit):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::openURL):
(WebCore::HTMLFrameElementBase::setLocation):
* html/HTMLFrameElementBase.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::navigate):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::FormSubmission):
(WebCore::FormSubmission::create):
* loader/FormSubmission.h:
(WebCore::FormSubmission::lockHistory):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::changeLocation):
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::clientRedirected):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/FrameLoader.h:
* loader/FrameLoaderTypes.h:
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledNavigation::ScheduledNavigation):
(WebCore::ScheduledNavigation::lockHistory):
(WebCore::ScheduledNavigation::lockBackForwardList):
(WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
(WebCore::ScheduledRedirect::ScheduledRedirect):
(WebCore::ScheduledLocationChange::ScheduledLocationChange):
(WebCore::ScheduledRefresh::ScheduledRefresh):
(WebCore::ScheduledHistoryNavigation::ScheduledHistoryNavigation):
(WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
(WebCore::NavigationScheduler::scheduleRedirect):
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleLocationChange):
(WebCore::NavigationScheduler::scheduleFormSubmission):
* loader/NavigationScheduler.h:
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestFrame):
(WebCore::SubframeLoader::requestObject):
(WebCore::SubframeLoader::loadOrRedirectSubframe):
* loader/SubframeLoader.h:
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):

Source/WebKit/mac:

* WebView/WebPDFView.mm:
(-[WebPDFView PDFViewWillClickOnLink:withURL:]):

Source/WebKit2:

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):

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

6 years agoUpdate WKSI.
dino@apple.com [Thu, 3 Apr 2014 00:44:19 +0000 (00:44 +0000)]
Update WKSI.
<rdar://problem/16321286>

* libWebKitSystemInterfaceMavericks.a:
* libWebKitSystemInterfaceMountainLion.a:

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

6 years agoPool IOSurfaces to help with allocation cost
timothy_horton@apple.com [Thu, 3 Apr 2014 00:33:02 +0000 (00:33 +0000)]
Pool IOSurfaces to help with allocation cost
https://bugs.webkit.org/show_bug.cgi?id=131096
<rdar://problem/15373942>

Reviewed by Simon Fraser.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

* platform/Timer.h:
(WebCore::TimerBase::startRepeating): Add a std::chrono startRepeating.

* platform/graphics/cg/IOSurfacePool.h: Added.
(WebCore::IOSurfacePool::CachedSurfaceDetails::CachedSurfaceDetails):
(WebCore::IOSurfacePool::CachedSurfaceDetails::resetLastUseTime):
* platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Removed.
* platform/graphics/cg/ImageBufferBackingStoreCache.h: Removed.
* platform/graphics/cg/IOSurfacePool.cpp: Added.
(WebCore::IOSurfacePool::IOSurfacePool):
(WebCore::IOSurfacePool::sharedPool):
(WebCore::surfaceMatchesParameters):
(WebCore::IOSurfacePool::willAddSurface):
(WebCore::IOSurfacePool::didRemoveSurface):
(WebCore::IOSurfacePool::didUseSurfaceOfSize):
(WebCore::IOSurfacePool::takeSurface):
(WebCore::IOSurfacePool::addSurface):
(WebCore::IOSurfacePool::insertSurfaceIntoPool):
(WebCore::IOSurfacePool::setPoolSize):
(WebCore::IOSurfacePool::tryEvictInUseSurface):
(WebCore::IOSurfacePool::tryEvictOldestCachedSurface):
(WebCore::IOSurfacePool::evict):
(WebCore::IOSurfacePool::collectInUseSurfaces):
(WebCore::IOSurfacePool::markOlderSurfacesPurgeable):
(WebCore::IOSurfacePool::collectionTimerFired):
(WebCore::IOSurfacePool::scheduleCollectionTimer):
(WebCore::IOSurfacePool::discardAllSurfaces):
(WebCore::IOSurfacePool::showPoolStatistics):
Add a pool of IOSurfaces. It behaves as such:

    - Keeps up to 64MB of surfaces.
    - Keeps unused and in-use surfaces (but never gets more than 1/2 full with the latter)
    - Marks surfaces purgeable after they've been unused for 2 seconds.
    - Tries to move surfaces from the in-use pool to the unused pool every 500ms.
    - Evicts in an LRU-ish fashion, interleaving eviction of the oldest
      surfaces and the in-use surfaces (since in-use surfaces are not immediately
      useful for the pool, but they are desirous because they were recently used).
    - Throws everything away under memory pressure.

* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::create):
Try to grab a surface from the IOSurfacePool.

* platform/ios/MemoryPressureHandlerIOS.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory):
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::platformReleaseMemory):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::platformReleaseMemory):
Fix some includes, and throw away all surfaces when we're under memory pressure.

* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::clearBackingStore):
(WebKit::RemoteLayerBackingStore::display):
When RemoteLayerBackingStore discards a layer, throw it into the pool.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
Disable the pool in the UI process.

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

6 years agoFix a typo causing TestWebKitAPI to timeout when testing Find.
alice.liu@apple.com [Thu, 3 Apr 2014 00:07:03 +0000 (00:07 +0000)]
Fix a typo causing TestWebKitAPI to timeout when testing Find.

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient): Test for !functionPointer like
all the other implementations do.

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

6 years agoSource/WebCore: Roll out http://trac.webkit.org/changeset/166144
slewis@apple.com [Wed, 2 Apr 2014 23:53:30 +0000 (23:53 +0000)]
Source/WebCore: Roll out trac.webkit.org/changeset/166144
<rdar://problem/16481284> PLT stops loading on news.google.com

Unreviewed rollout.

Rollout 166144 since it prevents the PLT from completing.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::suspendPostAttachCallbacks):
(WebCore::ContainerNode::resumePostAttachCallbacks):
(WebCore::ContainerNode::queuePostAttachCallback):
(WebCore::ContainerNode::postAttachCallbacksAreSuspended):
(WebCore::ContainerNode::dispatchPostAttachCallbacks):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* dom/Element.h:
(WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
(WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute):
* html/HTMLFormControlElement.cpp:
(WebCore::focusPostAttach):
(WebCore::HTMLFormControlElement::didAttachRenderers):
(WebCore::updateFromElementCallback):
(WebCore::HTMLFormControlElement::didRecalcStyle):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::needsStyleRecalcCallback):
(WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
(WebCore::HTMLObjectElement::hasValidClassId):
(WebCore::HTMLObjectElement::renderFallbackContent):
* html/HTMLObjectElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::createElementRenderer):
(WebCore::HTMLPlugInImageElement::didAttachRenderers):
(WebCore::HTMLPlugInImageElement::willDetachRenderers):
(WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
(WebCore::HTMLPlugInImageElement::updateWidgetCallback):
(WebCore::HTMLPlugInImageElement::startLoadingImage):
(WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
(WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree):
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
(WebCore::HTMLPlugInImageElement::didRecalcStyle): Deleted.
(WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Deleted.
(WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Deleted.
(WebCore::HTMLPlugInImageElement::removedFrom): Deleted.
(WebCore::is100Percent): Deleted.
(WebCore::HTMLPlugInImageElement::setNeedsImageReload): Deleted.
* html/HTMLPlugInImageElement.h:
(WebCore::HTMLPlugInImageElement::imageLoader): Deleted.
(WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Deleted.
* style/StyleResolveTree.cpp:
(WebCore::Style::needsPseudeElement):
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
(WebCore::Style::attachRenderTree):
(WebCore::Style::updateBeforeOrAfterPseudoElement):
(WebCore::Style::needsPseudoElement): Deleted.
(WebCore::Style::postResolutionCallbackQueue): Deleted.
(WebCore::Style::queuePostResolutionCallback): Deleted.
(WebCore::Style::suspendMemoryCacheClientCalls): Deleted.
(WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Deleted.
(WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Deleted.
(WebCore::Style::postResolutionCallbacksAreSuspended): Deleted.
* style/StyleResolveTree.h:

Source/WebKit/mac: Roll out http://trac.webkit.org/changeset/166144
<rdar://problem/16481284> PLT stops loading on news.google.com

Unreviewed rollout.

Rollout 166144 since it prevents the PLT from completing.

* WebCoreSupport/WebFrameLoaderClient.mm:

LayoutTests: Roll out http://trac.webkit.org/changeset/166144
<rdar://problem/16481284> PLT stops loading on news.google.com

Unreviewed rollout.

Rollout 166144 since it prevents the PLT from completing.

* plugins/plugin-remove-readystatechange-expected.txt:
* plugins/plugin-remove-readystatechange.html:
* svg/custom/object-no-size-attributes-expected.txt:
* svg/custom/object-no-size-attributes.xhtml:

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

6 years agoPage should use std::unique_ptr for PointerLockController
jinwoo7.song@samsung.com [Wed, 2 Apr 2014 23:51:37 +0000 (23:51 +0000)]
Page should use std::unique_ptr for PointerLockController
https://bugs.webkit.org/show_bug.cgi?id=131098

Reviewed by Anders Carlsson.

Make Page keep a std::unique_ptr to PointerLockController. Store page
references and return controller references where possible.

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
(WebCore::Document::webkitExitPointerLock):
(WebCore::Document::webkitPointerLockElement):
* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore::Element::webkitRequestPointerLock):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::pointerLockController):
* page/PointerLockController.cpp:
(WebCore::PointerLockController::PointerLockController):
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):
(WebCore::PointerLockController::create): Deleted.
* page/PointerLockController.h:

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

6 years agoCodeBlockSet should be generational
mhahnenberg@apple.com [Wed, 2 Apr 2014 23:50:25 +0000 (23:50 +0000)]
CodeBlockSet should be generational
https://bugs.webkit.org/show_bug.cgi?id=127152

Reviewed by Geoffrey Garen.

During EdenCollections we now only visit those CodeBlocks that:
a) Are new since the last collection if they were somehow otherwise reachable.
b) Are reachable from an Executable that is part of the remembered set.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Initialize uninitialized variables.
(JSC::CodeBlock::visitAggregate): Move the addition of the weak reference harvester after the
shouldImmediatelyAssumeLivenessDuringScan check since it's redundant if we assume liveness.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::forEachRelatedCodeBlock): Executes a functor for each CodeBlock reachable from the current CodeBlock (including this).
We use this to clear marks for the CodeBlocks of remembered Executables (see: CodeBlockSet::clearMarksForEdenCollection).
(JSC::CodeBlockSet::mark): Also check the set of new CodeBlocks for memebership when doing conservative scanning.
(JSC::ScriptExecutable::forEachCodeBlock): Executes a functor for each of this Executable's CodeBlocks.
* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::~CodeBlockSet):
(JSC::CodeBlockSet::add):
(JSC::CodeBlockSet::promoteYoungCodeBlocks): Moves all CodeBlocks currently in the set of new CodeBlocks into
the set of old CodeBlocks.
(JSC::CodeBlockSet::clearMarksForFullCollection): Clears the marks for all CodeBlocks.
(JSC::CodeBlockSet::clearMarksForEdenCollection): Clears the marks for CodeBlocks owned by Executables in the
remembered set. When an Executable is added to the remembered set it's typically because we need to do something
with its CodeBlock.
(JSC::CodeBlockSet::clearMarks):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced): Fixpoints over either just the new CodeBlocks or all CodeBlocks
to determine which CodeBlocks are dead and eagerly finalizes/deletes them.
(JSC::CodeBlockSet::remove):
(JSC::CodeBlockSet::traceMarked): Iterate only the currently executing CodeBlocks instead of all CodeBlocks.
(JSC::CodeBlockSet::rememberCurrentlyExecutingCodeBlocks): Clear m_mayBeExecuting for all currently executing
CodeBlocks because we no longer always do this at the beginning of EdenCollections.
* heap/CodeBlockSet.h:
(JSC::CodeBlockSet::iterate):
* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::deleteAllCompiledCode):
(JSC::Heap::deleteUnmarkedCompiledCode):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode): Write barrier code on installation. We do this due to the following situation:
a) A CodeBlock is created and is compiled on a DFG worker thread.
b) No GC happens.
c) The CodeBlock has finished being compiled and is installed in the Executable.
d) The function never executes before the next GC.
e) The next GC needs needs to visit the new CodeBlock but the Executable won't be revisited unless
    it's added to the remembered set.

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

6 years ago[iOS] Expose geolocation provider on the process pool
dino@apple.com [Wed, 2 Apr 2014 23:41:04 +0000 (23:41 +0000)]
[iOS] Expose geolocation provider on the process pool
https://bugs.webkit.org/show_bug.cgi?id=131125

Reviewed by Dan Bernstein.

Followup comments from Dan Bernstein. Use a class
extension rather than a new category.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _geolocationProvider]):
* UIProcess/API/Cocoa/WKProcessPoolInternal.h:

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

6 years agoLoad Media Controls js/css from bundle
dino@apple.com [Wed, 2 Apr 2014 23:40:41 +0000 (23:40 +0000)]
Load Media Controls js/css from bundle
https://bugs.webkit.org/show_bug.cgi?id=131086

Followup comments from Eric Carlson.

Remove the booleans that were guarding loading the resources.

* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsStyleSheet):
(WebCore::RenderThemeIOS::mediaControlsScript):
(WebCore::RenderThemeIOS::RenderThemeIOS):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::RenderThemeMac):
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):

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

6 years agoRemoteLayerBackingStore doesn't need to clear opaque layers
timothy_horton@apple.com [Wed, 2 Apr 2014 23:29:12 +0000 (23:29 +0000)]
RemoteLayerBackingStore doesn't need to clear opaque layers
https://bugs.webkit.org/show_bug.cgi?id=131134

Reviewed by Simon Fraser.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
We don't need to clear opaque layers, because we'll paint
over the whole area. In addition, we should fill opaque layers
with a bright color in debug builds to make it very clear
that we've made a mistake (similar to what FrameView does).

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

6 years agofilter-build-webkit: Ignore xcodebuild warnings when compiling with newer builds...
ddkilzer@apple.com [Wed, 2 Apr 2014 23:09:01 +0000 (23:09 +0000)]
filter-build-webkit: Ignore xcodebuild warnings when compiling with newer builds of clang
<http://webkit.org/b/131045>

Reviewed by Daniel Bates.

* Scripts/filter-build-webkit:
(shouldIgnoreLine): Ignore DVTAssertions related to new builds
of clang, plus debug data for all DVTAssertions.

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

6 years ago[WebInspector] inspector-protocol/model/highlight-shape-outside.html is failing
zoltan@webkit.org [Wed, 2 Apr 2014 23:06:36 +0000 (23:06 +0000)]
[WebInspector] inspector-protocol/model/highlight-shape-outside.html is failing
https://bugs.webkit.org/show_bug.cgi?id=124660

Reviewed by Timothy Hatcher.

I updated the tests syntax to CR, CSS Shapes specification. It's also needed to be updated
to the latest WebInspector testing methods. I added some addidional test cases for the highlighting,
and also fixed some expected test case in the script, and updated the expected file.

* TestExpectations:
* inspector/dom/highlight-shape-outside-expected.txt:
* inspector/dom/highlight-shape-outside.html:
* inspector/dom/shapes-test.js:
(InspectorTestProxy.registerInitializer.):

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

6 years agoDocument WKBackForwardList, WKBackForwardListItem and WKWebViewConfiguration
andersca@apple.com [Wed, 2 Apr 2014 22:48:08 +0000 (22:48 +0000)]
Document WKBackForwardList, WKBackForwardListItem and WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=131131

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:

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

6 years agoAX: Improve ARIA live region reliability by sending notifications when live regions...
cfleizach@apple.com [Wed, 2 Apr 2014 22:32:37 +0000 (22:32 +0000)]
AX: Improve ARIA live region reliability by sending notifications when live regions are created/shown and hidden/destroyed
https://bugs.webkit.org/show_bug.cgi?id=124381

Unreviewed. Forgot to add test expectation.

* platform/mac/accessibility/live-region-creation-notification-expected.txt: Added.

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

6 years agoUnreviewed.
ggaren@apple.com [Wed, 2 Apr 2014 21:50:52 +0000 (21:50 +0000)]
Unreviewed.

Try to ignore some Xcode shmutz in MallocBench.

* MallocBench/MallocBench.xcodeproj: Added property svn:ignore.

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

6 years agoLoad Media Controls js/css from bundle
dino@apple.com [Wed, 2 Apr 2014 21:42:30 +0000 (21:42 +0000)]
Load Media Controls js/css from bundle
https://bugs.webkit.org/show_bug.cgi?id=131086

Reviewed by Eric Carlson.

Source/WebCore:

Rather than embed encoded versions of the JS and CSS files
into C++ source, just load the files directly from the bundle.

* DerivedSources.make: Removed now unnecessary rules.
* WebCore.xcodeproj/project.pbxproj: Copy mediaControls files to the bundle.
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::RenderThemeIOS):
(WebCore::RenderThemeIOS::mediaControlsStyleSheet): Load from the bundle.
(WebCore::RenderThemeIOS::mediaControlsScript): Ditto.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::RenderThemeMac):
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):

Tools:

We're now putting CSS files into the bundle, so remove the test for them.

* Scripts/check-for-inappropriate-files-in-framework:

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

6 years agoMove focus management API from HTMLDocument to Document
dbates@webkit.org [Wed, 2 Apr 2014 21:40:26 +0000 (21:40 +0000)]
Move focus management API from HTMLDocument to Document
https://bugs.webkit.org/show_bug.cgi?id=131079
<rdar://problem/16220103>

Reviewed by Timothy Hatcher.

Source/WebCore:

Merged from Blink (patch by Christophe Dumez):
https://src.chromium.org/viewvc/blink?view=rev&revision=165515

Move hasFocus() and attribute activeElement from interface HTMLDocument
to DOMDocument as per section Focus management APIs of the HTML5 standard:
<http://www.whatwg.org/specs/web-apps/current-work/#focus-management-apis> (1 April 2014).

Test: fast/dom/Document/xml-document-focus.xml

* bindings/objc/PublicDOMInterfaces.h: Moved hasFocus() and property activeElement from
interface DOMHTMLDocument to DOMDocument.
* dom/Document.cpp:
(WebCore::Document::activeElement): Added.
(WebCore::Document::hasFocus): Added.
* dom/Document.h:
* dom/Document.idl:
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::activeElement): Deleted.
(WebCore::HTMLDocument::hasFocus): Deleted.
* html/HTMLDocument.h:
* html/HTMLDocument.idl:

LayoutTests:

Derived from a Blink patch by Christophe Dumez:
https://src.chromium.org/viewvc/blink?view=rev&revision=165515

Made the test in <https://src.chromium.org/viewvc/blink?view=rev&revision=165515> a valid XHTML
document. Additionally taught LayoutTests/resources/{js-test, js-test-pre}.js to create actual
HTML elements so that these scripts can be used to write DRT tests in XML documents.

* fast/dom/Document/xml-document-focus-expected.txt: Added.
* fast/dom/Document/xml-document-focus.xml: Added.
* resources/js-test-pre.js: Added function createHTMLElement() and modified code to use it
instead of document.createElement() so as to work around <https://bugs.webkit.org/show_bug.cgi?id=131074>.
* resources/js-test.js: Ditto.

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

6 years agoLet's benchmark malloc
ggaren@apple.com [Wed, 2 Apr 2014 21:38:49 +0000 (21:38 +0000)]
Let's benchmark malloc
https://bugs.webkit.org/show_bug.cgi?id=131118

Reviewed by Mark Hahnenberg.

I want to replace fastMalloc with something faster (fasterMalloc?).
I wrote these benchmarks to test / drive development.

* MallocBench: Added.
* MallocBench/MallocBench: Added.
* MallocBench/MallocBench.xcodeproj: Added.
* MallocBench/MallocBench.xcodeproj/project.pbxproj: Added.
* MallocBench/MallocBench/Benchmark.cpp: Added.
(allocateHeap):
(deallocateHeap):
(Benchmark::Benchmark):
(Benchmark::printBenchmarks):
(Benchmark::runOnce):
(Benchmark::run):
(Benchmark::printReport):
(Benchmark::currentTimeMS):
(Benchmark::currentMemoryBytes):
* MallocBench/MallocBench/Benchmark.h: Added.
(Benchmark::Memory::Memory):
(Benchmark::Memory::operator-):
(Benchmark::isValid):
* MallocBench/MallocBench/CPUCount.cpp: Added.
(cpuCount):
* MallocBench/MallocBench/CPUCount.h: Added.
* MallocBench/MallocBench/CommandLine.cpp: Added.
(CommandLine::printUsage):
* MallocBench/MallocBench/CommandLine.h: Added.
(CommandLine::isValid):
(CommandLine::benchmarkName):
(CommandLine::isParallel):
(CommandLine::heapSize):
(CommandLine::measureHeap):
* MallocBench/MallocBench/Interpreter.cpp: Added.
(Interpreter::Interpreter):
(Interpreter::~Interpreter):
(Interpreter::run):
* MallocBench/MallocBench/Interpreter.h: Added.
* MallocBench/MallocBench/balloon.cpp: Added.
(benchmark_balloon):
* MallocBench/MallocBench/balloon.h: Added.
* MallocBench/MallocBench/big.cpp: Added.
(benchmark_big):
* MallocBench/MallocBench/big.h: Added.
* MallocBench/MallocBench/churn.cpp: Added.
(HeapDouble::operator new):
(HeapDouble::operator delete):
(HeapDouble::HeapDouble):
(HeapDouble::operator+=):
(benchmark_churn):
* MallocBench/MallocBench/churn.h: Added.
* MallocBench/MallocBench/crash.ops: Added.
* MallocBench/MallocBench/facebook.cpp: Added.
(benchmark_facebook):
* MallocBench/MallocBench/facebook.h: Added.
* MallocBench/MallocBench/facebook.ops: Added.
* MallocBench/MallocBench/fragment.cpp: Added.
(validate):
(benchmark_fragment):
(benchmark_fragment_iterate):
* MallocBench/MallocBench/fragment.h: Added.
* MallocBench/MallocBench/list.cpp: Added.
(benchmark_list_allocate):
(benchmark_list_traverse):
* MallocBench/MallocBench/list.h: Added.
* MallocBench/MallocBench/main.cpp: Added.
(main):
* MallocBench/MallocBench/mbmalloc.cpp: Added.
* MallocBench/MallocBench/mbmalloc.h: Added.
* MallocBench/MallocBench/medium.cpp: Added.
(benchmark_medium):
* MallocBench/MallocBench/medium.h: Added.
* MallocBench/MallocBench/message.cpp: Added.
(benchmark_message_one):
(benchmark_message_many):
* MallocBench/MallocBench/message.h: Added.
* MallocBench/MallocBench/realloc.cpp: Added.
(benchmark_realloc):
* MallocBench/MallocBench/realloc.h: Added.
* MallocBench/MallocBench/tree.cpp: Added.
(benchmark_tree_allocate):
(benchmark_tree_traverse):
(benchmark_tree_churn):
* MallocBench/MallocBench/tree.h: Added.
* MallocBench/run-malloc-benchmarks: Added.

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

6 years agoRefactor the function call generator to take the arguments by value
benjamin@webkit.org [Wed, 2 Apr 2014 21:27:31 +0000 (21:27 +0000)]
Refactor the function call generator to take the arguments by value
https://bugs.webkit.org/show_bug.cgi?id=131129

Reviewed by Andreas Kling.

Nothing forces the pointed address to stay alive between setOneArgument/setTwoArguments
and prepareAndCall.

This patch changes FunctionCall to:
-Keep the register by value instead of using pointers.
-Crash at compile time if a register is invalid.

* cssjit/FunctionCall.h:
(WebCore::FunctionCall::FunctionCall):
(WebCore::FunctionCall::setOneArgument):
(WebCore::FunctionCall::setTwoArguments):
(WebCore::FunctionCall::swapArguments):
(WebCore::FunctionCall::prepareAndCall):
* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::isValidRegister):

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