WebKit-https.git
7 years agoOnly define MAX_GRID_TRACK_REPETITIONS if CSS_GRID_LAYOUT is enabled.
matthew_hanson@apple.com [Thu, 15 May 2014 00:13:15 +0000 (00:13 +0000)]
Only define MAX_GRID_TRACK_REPETITIONS if CSS_GRID_LAYOUT is enabled.

This was causing -Wunused-const-variable errors.

* css/CSSParser.cpp: Add include guard.

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

7 years agoTile cache has way too many tiles when pinch-zoomed in
bdakin@apple.com [Wed, 14 May 2014 23:58:06 +0000 (23:58 +0000)]
Tile cache has way too many tiles when pinch-zoomed in
https://bugs.webkit.org/show_bug.cgi?id=132929
-and corresponding-
<rdar://problem/16527172>

Reviewed by Benjamin Poulain.

This patch makes the margin sizing functions return the set margin size scaled by
the TileGrid's scale. We also need to get rid of the old notion we used to have
that margin tiles might be allowed to have a different size than the other tiles.
We don't want that. They should have the normal margin size, but they should
affect the overall coverage area.

Scale by the TileGrid's scale.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::topMarginHeight):
(WebCore::TileController::bottomMarginHeight):
(WebCore::TileController::leftMarginWidth):
(WebCore::TileController::rightMarginWidth):

Get rid of adjustRectAtTileIndexForMargin() since we do not want to ever do this
adjustment. Use tileSize instead of margin size for all sizing computations.
* platform/graphics/ca/mac/TileGrid.h:
* platform/graphics/ca/mac/TileGrid.mm:
(WebCore::TileGrid::rectForTileIndex):
(WebCore::TileGrid::getTileIndexRangeForRect):
(WebCore::TileGrid::adjustRectAtTileIndexForMargin): Deleted.

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

7 years ago[Mac] Search fields should not use centered look
dino@apple.com [Wed, 14 May 2014 23:36:34 +0000 (23:36 +0000)]
[Mac] Search fields should not use centered look
https://bugs.webkit.org/show_bug.cgi?id=132930
<rdar://problem/16825842>

Reviewed by Beth Dakin.

We need to explicitly set the centeredLook property
to NO on modern releases of Mac.

* rendering/RenderThemeMac.mm: Declare a new private property and set it to NO.
(WebCore::RenderThemeMac::search):

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

7 years agoUse the correct client in WebPageProxy::unwrapCryptoKey
ap@apple.com [Wed, 14 May 2014 23:20:56 +0000 (23:20 +0000)]
Use the correct client in WebPageProxy::unwrapCryptoKey
https://bugs.webkit.org/show_bug.cgi?id=132924

Reviewed by Darin Adler.

* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unwrapCryptoKey): Match what
we now do in wrapCryptoKey().

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

7 years agoSubpixel layout: Change Element.offset* client* scroll* return type to double.
zalan@apple.com [Wed, 14 May 2014 23:13:52 +0000 (23:13 +0000)]
Subpixel layout: Change Element.offset* client* scroll* return type to double.
https://bugs.webkit.org/show_bug.cgi?id=132895

Reviewed by Simon Fraser.

Source/WebCore:
This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
type from long to double to match the latest CSSOM View Module spec[1].
Element.offset* and Element.client* do return subpixel values from now on.
Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.

subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
from WK2 preferences. It toggles the return value from subpixel to floored integral.
It does not change layout/rendering behavior.

Reference list of what other browsers do:
IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
Blink: http://www.chromestatus.com/features/5497402177880064
Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607

[1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/

Test: cssom/subpixel-offsetleft-top-width-height-values.html

* dom/Element.cpp:
(WebCore::localZoomForRenderer):
(WebCore::adjustForLocalZoom):
(WebCore::convertToNonSubpixelValueIfNeeded):
(WebCore::Element::offsetLeft):
(WebCore::Element::offsetTop):
(WebCore::Element::offsetWidth):
(WebCore::Element::offsetHeight):
(WebCore::Element::clientLeft):
(WebCore::Element::clientTop):
(WebCore::Element::clientWidth):
(WebCore::Element::clientHeight):
(WebCore::Element::scrollLeft):
(WebCore::Element::scrollTop):
(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):
(WebCore::Element::scrollWidth):
(WebCore::Element::scrollHeight):
* dom/Element.h:
* dom/Element.idl:
* html/HTMLBodyElement.cpp:
(WebCore::adjustForZoom):
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
(WebCore::HTMLBodyElement::setScrollTop):
(WebCore::HTMLBodyElement::scrollHeight):
(WebCore::HTMLBodyElement::scrollWidth):
* html/HTMLBodyElement.h:
* page/Settings.in:

Source/WebKit2:
This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
type from long to double to match the latest CSSOM View Module spec[1].
Element.offset* and Element.client* do return subpixel values from now on.
Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.

subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
from WK2 preferences. It toggles the return value from subpixel to floored integral.
It does not change layout/rendering behavior.

Reference list of what other browsers do:
IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
Blink: http://www.chromestatus.com/features/5497402177880064
Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607

[1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSubpixelCSSOMElementMetricsEnabled):
(WKPreferencesGetSubpixelCSSOMElementMetricsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests:
Some test cases expect integral values, so the test content is updated accordingly.
It mostly means adding Math.round() before comparing values in order to match pixelSnappedIntRect()
functionality.

* css3/calc/simple-calcs-prefixed.html: changed file format from Windows to Unix.
* css3/calc/simple-calcs.html: changed file format from Windows to Unix.
* cssom/subpixel-offsetleft-top-width-height-values-expected.txt: Added.
* cssom/subpixel-offsetleft-top-width-height-values.html: Added.
* editing/selection/drag-start-event-client-x-y.html: use floor as we compare the return value to a truncated integer.
* editing/selection/mixed-editability-10.html:
* fast/css/zoom-in-length-round-trip.html:
* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
* fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
* fast/forms/basic-buttons.html:
* js/dom/dom-static-property-for-in-iteration-expected.txt:
* platform/mac/fast/scrolling/scroll-div-latched-div.html:
* platform/mac/fast/scrolling/scroll-div-latched-mainframe.html:
* platform/mac/fast/scrolling/scroll-select-bottom-test.html:
* platform/mac/fast/scrolling/scroll-select-latched-mainframe.html:
* platform/mac/fast/scrolling/scroll-select-latched-select.html:
* resources/check-layout.js:

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

7 years ago[iOS][WK2] Expose the viewport meta tag width on the UIProcess
benjamin@webkit.org [Wed, 14 May 2014 22:55:26 +0000 (22:55 +0000)]
[iOS][WK2] Expose the viewport meta tag width on the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=132926
<rdar://problem/16892115>

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

Safari requires the viewport meta tag width for legacy stuff on WebApps. Just send it
over to the UIProcess when it changes.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _setViewportMetaTagWidth:]):
(-[WKWebView _viewportMetaTagWidth]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didChangeViewportMetaTagWidth):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::viewportMetaTagWidthDidChange):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange):

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

7 years ago[GTK] Unreviewed GTK gardening.
commit-queue@webkit.org [Wed, 14 May 2014 22:50:29 +0000 (22:50 +0000)]
[GTK] Unreviewed GTK gardening.

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-05-14

* platform/gtk/TestExpectations: Report and mark new tests failing.
* platform/gtk/editing/apply-style-iframe-crash-expected.txt: Added.
Rebaseline after r168641.
* platform/gtk/svg/W3C-SVG-1.1-SE/painting-marker-05-f-expected.txt: Added.
Rebaseline after r168543.
* platform/gtk/svg/W3C-SVG-1.1-SE/painting-marker-06-f-expected.txt: Added.
Rebaseline after r168543.
* platform/gtk/svg/hixie/mixed/010-expected.txt: Rebaseline after r168674.
* platform/gtk/svg/zoom/page/zoom-svg-as-relative-image-expected.txt: Added.
Rebaseline after r168350.
* platform/gtk/svg/zoom/text/zoom-svg-float-border-padding-expected.txt: Added.
Rebaseline after r168674.

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

7 years ago[iOS WK2] Make view debugging easier
simon.fraser@apple.com [Wed, 14 May 2014 22:39:02 +0000 (22:39 +0000)]
[iOS WK2] Make view debugging easier
https://bugs.webkit.org/show_bug.cgi?id=132892

Reviewed by Tim Horton.

Enhance -[WKCompositingView description] to show WebKit-related information
which is useful when dumping a window's UIView hierarchy.

Also have WKTransformView and WKRemoteView inherit from WKCompositingView,
and thereby get the hitTest:withEvent: override for free, as well as better dumping.

* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(-[WKCompositingView description]):
(-[WKTransformView hitTest:withEvent:]): Deleted.
(-[WKRemoteView hitTest:withEvent:]): Deleted.

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

7 years ago[iOS][WK2] Fixed positioned element must relayout correctly before sending resize...
benjamin@webkit.org [Wed, 14 May 2014 21:13:00 +0000 (21:13 +0000)]
[iOS][WK2] Fixed positioned element must relayout correctly before sending resize events to the page
https://bugs.webkit.org/show_bug.cgi?id=132920
<rdar://problem/16836866>

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

During the dynamic resize operation, we do not update the fixed position elements because
it is a very hard problem on the UI Process side.

When the animation finishes, the fixed positioned rect is recomputed on the UIProcess and pushed
to the WebProcess.

The problem is sending the rect after the animation is too late, the content can observe the fixed
elements layout through JavaScript and would get the old size.

This patch fixes the issue updating the CustomFixedPositionLayoutRect on the WebProcess before
notifying the content of the resize.
First, we layout the content to the new fixed layout size to get the new content size.
Then, we compute the new FixedPositionedLayoutRect with FrameView's viewportConstrainedObjectsRect(),
this use the real content size and our estimated unobscured content rect.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):

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

7 years agoInline caching for proxies clobbers baseGPR too early
mhahnenberg@apple.com [Wed, 14 May 2014 20:48:55 +0000 (20:48 +0000)]
Inline caching for proxies clobbers baseGPR too early
https://bugs.webkit.org/show_bug.cgi?id=132916

Reviewed by Filip Pizlo.

We clobber baseGPR prior to the Structure checks, so if any of the checks fail then the slow path
gets the target of the proxy rather than the proxy itself. We need to delay the clobbering of baseGPR
until we know the inline cache is going to succeed.

* jit/Repatch.cpp:
(JSC::generateByIdStub):

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

7 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Wed, 14 May 2014 20:17:24 +0000 (20:17 +0000)]
[Win] Unreviewed build fix.

* JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: This solution
was missing commands to build LLInt portions of JSC.
* llint/LLIntData.cpp: 64-bit build fix.

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

7 years agoImplement NSSharingServiceDelegate method "transitionImageForShareItem"
beidson@apple.com [Wed, 14 May 2014 20:12:14 +0000 (20:12 +0000)]
Implement NSSharingServiceDelegate method "transitionImageForShareItem"
<rdar://problem/16878020> and https://bugs.webkit.org/show_bug.cgi?id=132911

Reviewed by Tim Horton.

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

Source/WebKit/mac:
* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController sharingService:transitionImageForShareItem:contentRect:]):

* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::renderedImageForControlledImage): Paint the entire content rect for the controlled image
  into an ImageBuffer, then return the resulting NSImage. This only paints the image itself and not any
  overlapping content by setting the selection and appropriate painting mode.

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

7 years agoAnother unreviewed build fix.
achristensen@apple.com [Wed, 14 May 2014 20:11:12 +0000 (20:11 +0000)]
Another unreviewed build fix.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getTimingData):
Added necessary UNUSED_PARAMs.

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

7 years agoUnreviewed build fix after r168849.
achristensen@apple.com [Wed, 14 May 2014 20:03:40 +0000 (20:03 +0000)]
Unreviewed build fix after r168849.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getTimingData):
Protect use of timing data with ENABLE(WEB_TIMING).

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

7 years agoRefactor duplicate code in web timing.
achristensen@apple.com [Wed, 14 May 2014 18:28:58 +0000 (18:28 +0000)]
Refactor duplicate code in web timing.
https://bugs.webkit.org/show_bug.cgi?id=132917

Reviewed by Alexey Proskuryakov.

* platform/network/ResourceHandle.h:
Added getTimingData declaration.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getTimingData):
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
Moved duplicate code to ResourceHandle.

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

7 years agoREGRESSION(WK2): Many pages have very wrong text size after rotating.
enrica@apple.com [Wed, 14 May 2014 18:02:58 +0000 (18:02 +0000)]
REGRESSION(WK2): Many pages have very wrong text size after rotating.
https://bugs.webkit.org/show_bug.cgi?id=132893
<rdar://problem/16806958>

Reviewed by Benjamin Poulain.

Whenever our viewport width changes we must reset text autosizing
on the renderer.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
(WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded):
(WebKit::WebPage::dynamicViewportSizeUpdate):

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

7 years agosourceFrameOnScreenForShareItem: can be off by a pixel
beidson@apple.com [Wed, 14 May 2014 18:02:40 +0000 (18:02 +0000)]
sourceFrameOnScreenForShareItem: can be off by a pixel
<rdar://problem/16878020> and https://bugs.webkit.org/show_bug.cgi?id=132911

Reviewed by Simon Fraser.

In a land of LayoutUnits and sub-pixel rendering, converting between IntRects and
FloatRects can be error prone. So we now try to minimize such conversions.

* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController sharingService:sourceFrameOnScreenForShareItem:]):

* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::clientFloatRectForNode): Split this into a separate utility method
  as it will be shared with other code very soon. Instead of using absoluteBoundingBoxRect()
  which does lossy float->int conversions, try to keep things in terms of FloatRects as
  much as possible.
(WebContextMenuClient::screenRectForHitTestNode): Call clientFloatRectForNode to get the
  FloatRect, then perform the lossy rounding conversion to an IntRect only once.

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

7 years ago2014-05-14 Zalan Bujtas <zalan@apple.com>
zalan@apple.com [Wed, 14 May 2014 17:47:10 +0000 (17:47 +0000)]
2014-05-14  Zalan Bujtas  <zalan@apple.com>

    Fix line ending style for the test.

    * editing/selection/drag-start-event-client-x-y.html:

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

7 years agoUse references instead of pointers with ResourceLoadTiming.
achristensen@apple.com [Wed, 14 May 2014 17:44:18 +0000 (17:44 +0000)]
Use references instead of pointers with ResourceLoadTiming.
https://bugs.webkit.org/show_bug.cgi?id=132846

Reviewed by Alexey Proskuryakov.

Source/WebCore:
* WebCore.exp.in:
Removed ResourceResponseBase::setResourceLoadTiming linker symbol.
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::requestStart):
Use references instead of pointers.
* page/PerformanceResourceTiming.h:
Make an instance instead of a RefPtr.
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::domainLookupStart):
(WebCore::PerformanceTiming::domainLookupEnd):
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::connectEnd):
(WebCore::PerformanceTiming::secureConnectionStart):
(WebCore::PerformanceTiming::requestStart):
(WebCore::PerformanceTiming::responseStart):
Check to see if the loader exists, then use ResourceLoadTiming reference.
(WebCore::PerformanceTiming::resourceLoadTiming): Deleted.
* page/PerformanceTiming.h:
Removed resourceLoadTiming declaration.
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::ResourceLoadTiming):
(WebCore::ResourceLoadTiming::operator=):
Replaced reference counting with copy constructors.
(WebCore::ResourceLoadTiming::create): Deleted.
(WebCore::ResourceLoadTiming::deepCopy): Deleted.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
(WebCore::ResourceResponseBase::resourceLoadTiming):
(WebCore::ResourceResponseBase::setResourceLoadTiming):
(WebCore::ResourceResponseBase::compare):
* platform/network/ResourceResponseBase.h:
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::didStartRequest):
(WebCore::networkEventCallback):
Use references instead of pointers.

Source/WebKit2:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
Use references instead of pointers and null checks.

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

7 years agoUnreviewed, rolling out r168837.
commit-queue@webkit.org [Wed, 14 May 2014 17:29:46 +0000 (17:29 +0000)]
Unreviewed, rolling out r168837.
https://bugs.webkit.org/show_bug.cgi?id=132913

The patch added an assertion which fires on 6 tests (Requested
by ap on #webkit).

Reverted changeset:

"[CSS Regions] Add ASSERT to make sure using the flowThread
cache does not return incorrect results"
https://bugs.webkit.org/show_bug.cgi?id=132906
http://trac.webkit.org/changeset/168837

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

7 years agoRevert "Don't dispatch 'beforeload' event inside FrameView::layout()",
jhoneycutt@apple.com [Wed, 14 May 2014 17:24:47 +0000 (17:24 +0000)]
Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
follow-up fixes:

    "platform/mac/plugins/testplugin-onnew-onpaint.html failing after
        r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4
    "[Win] Unreviewed build fix after r168668.", commit
        4fa470ad12c38ee7d4c114541b6dd321181a8bc9

The original merged patch appears to have caused a regression in
fast/dom/HTMLObjectElement/object-as-frame.html.

<https://bugs.webkit.org/show_bug.cgi?id=132886>

Reviewed by Alexey Proskuryakov.

Source/WebCore:
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
* dom/Document.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::renderWidgetForJSBindings):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderWidgetForJSBindings):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired): Deleted.
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

LayoutTests:
* compositing/plugins/composited-plugin.html:
* compositing/plugins/no-backing-store.html:
* fast/dom/beforeload/flash-before-load.html:
* fast/events/beforeload-assertion-expected.txt: Removed.
* fast/events/beforeload-assertion.html: Removed.
* fast/events/beforeload-iframe-crash-expected.txt: Removed.
* fast/events/beforeload-iframe-crash.html: Removed.
* fast/events/beforeload-input-time-crash-expected.txt: Removed.
* fast/events/beforeload-input-time-crash.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
(testImpl.iframe.onload):
(testImpl):
* http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
* platform/mac/plugins/supports-carbon-event-model.html:
* platform/mac/plugins/testplugin-onnew-onpaint.html:
* plugins/get-user-agent-with-null-npp-from-npp-new.html:
* plugins/mouse-click-plugin-clears-selection.html:
* plugins/netscape-plugin-map-data-to-src.html:
* plugins/no-mime-with-valid-extension.html:
* plugins/plugin-initiate-popup-window.html:
* plugins/windowless_plugin_paint_test.html:
* resources/plugin.js: Removed.

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

7 years agoalidation for getUserMedia() errorCallback is missing.
commit-queue@webkit.org [Wed, 14 May 2014 16:59:12 +0000 (16:59 +0000)]
alidation for getUserMedia() errorCallback is missing.
https://bugs.webkit.org/show_bug.cgi?id=132901

Patch by Kiran <kiran.guduru@samsung.com> on 2014-05-14
Reviewed by Darin Adler.

Source/WebCore:
The patch adds the validation for getUserMedia errorCallBack
and throws TypeMismatchError.

Test: fast/mediastream/getusermedia.html

* Modules/mediastream/NavigatorUserMedia.cpp:
(WebCore::NavigatorUserMedia::webkitGetUserMedia):

LayoutTests:
This test checks for null values in getUserMedia errorCallback.

* fast/mediastream/getusermedia.html:

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

7 years agoARM Traditional buildfix after r168776.
commit-queue@webkit.org [Wed, 14 May 2014 16:57:01 +0000 (16:57 +0000)]
ARM Traditional buildfix after r168776.
https://bugs.webkit.org/show_bug.cgi?id=132903

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-14
Reviewed by Darin Adler.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::abortWithReason): Added.

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

7 years agoChange line endings of some test files to LF to make it easier to commit and test...
ap@apple.com [Wed, 14 May 2014 16:48:07 +0000 (16:48 +0000)]
Change line endings of some test files to LF to make it easier to commit and test changes.

* css3/calc/simple-calcs.html:
* css3/calc/simple-minmax.html:
* css3/calc/transforms-scale-expected.html:
* css3/calc/transforms-scale.html:
* css3/calc/transforms-translate-expected.html:
* css3/calc/transforms-translate.html:

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

7 years agoRemove CSS_STICKY_POSITION guards
commit-queue@webkit.org [Wed, 14 May 2014 16:44:55 +0000 (16:44 +0000)]
Remove CSS_STICKY_POSITION guards
https://bugs.webkit.org/show_bug.cgi?id=132676

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-05-14
Reviewed by Simon Fraser.

.:
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
* Configurations/FeatureDefines.xcconfig:
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EPosition):
* css/CSSValueKeywords.in:
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::convertPositionStyle):

Source/WebKit/mac:
* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
* Configurations/FeatureDefines.xcconfig:

Source/WTF:
* wtf/FeatureDefines.h:

Tools:
* Scripts/webkitperl/FeatureList.pm:

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

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

7 years agoFix line ending style for the test (as an experiment).
ap@apple.com [Wed, 14 May 2014 16:41:46 +0000 (16:41 +0000)]
Fix line ending style for the test (as an experiment).

* css3/calc/simple-calcs-prefixed.html:

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

7 years ago[CSS Regions] Add ASSERT to make sure using the flowThread cache does not return...
stavila@adobe.com [Wed, 14 May 2014 15:38:34 +0000 (15:38 +0000)]
[CSS Regions] Add ASSERT to make sure using the flowThread cache does not return incorrect results
https://bugs.webkit.org/show_bug.cgi?id=132906

Reviewed by Andrei Bucur.

If flowThreadContainingBlock() is called on an object which is in a different
flow thread than the one currently being laid out, this method will return an incorrect
result. I added an assertion for that to make sure we catch and treat any such scenarios.

No new tests required.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::locateFlowThreadContainingBlockNoCache):
(WebCore::RenderObject::locateFlowThreadContainingBlock):
* rendering/RenderObject.h:

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

7 years ago[CSS Regions] Don't relayout when updating the region range unless necessary
abucur@adobe.com [Wed, 14 May 2014 14:35:07 +0000 (14:35 +0000)]
[CSS Regions] Don't relayout when updating the region range unless necessary
https://bugs.webkit.org/show_bug.cgi?id=132120

Reviewed by Antti Koivisto.

The patch reduces the cases when a relayout is made for boxes that change the region range.
This lowers the amount of nested layouts in most cases and produces big layout speedups for trees
without overhanging floats.

Tests: Major performance improvement with speedups of 50-60% on:
Layout/RegionsAuto.html, Layout/RegionsAutoMaxHeight.html and Layout/RegionsFixed.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionRangeForBoxChild): Ask the child box if it needs a relayout
in case its region range changes.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild): It's not necessary to do two layouts here because
there's no block direction position change between them for the child.
(WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange): If the block doesn't have floats
or if it expands to enclose the floats it doesn't need to relayout after a region range chage.
It's not possible for it to have a float inside overflow that must be repositioned using the new
range.
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.h:
(WebCore::RenderBox::needsLayoutAfterRegionRangeChange): By default don't relayout after a region
range change.

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

7 years agoRuleData should ref the StyleRule
antti@apple.com [Wed, 14 May 2014 13:43:30 +0000 (13:43 +0000)]
RuleData should ref the StyleRule
https://bugs.webkit.org/show_bug.cgi?id=132865

Reviewed by Andreas Kling.

As a defensive move make RuleData ref the StyleRule.
This adds some ref churn but the overall performance impact should be minimal.

* css/RuleSet.h:
(WebCore::RuleData::rule):

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

7 years agoREGRESSION(CMAKE): [GTK] InputMethodFilter unit test is not built
carlosgc@webkit.org [Wed, 14 May 2014 12:48:45 +0000 (12:48 +0000)]
REGRESSION(CMAKE): [GTK] InputMethodFilter unit test is not built
https://bugs.webkit.org/show_bug.cgi?id=132686

Reviewed by Philippe Normand.

Bring back InputMethodFilter test to the build and compile it into
a single binary TestWebCore with the other WebCore tests. Also
move it from TestWebKitAPI/gtk/ to TestWebKitAPI/Tests/WebCore/gtk/.

* Scripts/run-gtk-tests:
(TestRunner): Remove WebCoreGtk from the list of test directories.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebCore/gtk/InputMethodFilter.cpp: Renamed from Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp.

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

7 years ago[EFL] Make XVFBDriver optional
ossy@webkit.org [Wed, 14 May 2014 12:44:13 +0000 (12:44 +0000)]
[EFL] Make XVFBDriver optional
https://bugs.webkit.org/show_bug.cgi?id=131036

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-05-14
Reviewed by Gyuyoung Kim.

* Scripts/webkitpy/port/efl.py:
(EflPort._driver_class):

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

7 years agoVersioning.
lforschler@apple.com [Wed, 14 May 2014 09:52:10 +0000 (09:52 +0000)]
Versioning.

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

7 years agoSource/WebCore: GIF animations don't restart after scrolling on iOS WebKit1
antti@apple.com [Wed, 14 May 2014 09:47:59 +0000 (09:47 +0000)]
Source/WebCore: GIF animations don't restart after scrolling on iOS WebKit1
https://bugs.webkit.org/show_bug.cgi?id=132900

Reviewed by Andreas Kling.

* WebCore.exp.in:

Source/WebKit/mac: GIF animations don't restart after scrolling with iOS WebKit1
https://bugs.webkit.org/show_bug.cgi?id=132900
<rdar://problem/16490858>

Reviewed by Andreas Kling.

* WebView/WebView.mm:
(-[WebView _didFinishScrollingOrZooming]):

    Check if the animations need to be restarted after scrolling finishes.

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

7 years ago[CSS Regions] Assertion failure in some cases with inline blocks
abucur@adobe.com [Wed, 14 May 2014 06:33:48 +0000 (06:33 +0000)]
[CSS Regions] Assertion failure in some cases with inline blocks
https://bugs.webkit.org/show_bug.cgi?id=132859

Reviewed by Mihnea Ovidenie.

Source/WebCore:
The patch hardens the conditions when the region range caches are
populated to avoid desynchronizations when objects move during layout.
This is true especially in the case of the boxes found inside
inline blocks, that get their range from the containing line.

There is a new function |computedRegionRangeForBox| that will always
return a region range for a box using a best effort algorithm. This should
be used only when there's no need to cache region information.

This change also allows better control over the lifecycle of the
|RenderBoxRegionInfo| objects stored on the regions. We can now iterate
over the full range of the box when cleaning up the region box info. The
same applies for the width change detection function.

Test: fast/regions/inline-block-shifted-region.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateRegionForLine): Don't set the containing
region if the block doesn't have a range. The returned value would not
be correctly clamped.
* rendering/RenderBox.cpp:
(WebCore::RenderBlock::hasRegionRangeInFlowThread):
* rendering/RenderBox.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Iterate only over
the range of the box, not from the start of the region chain.
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock): Same as
above.
(WebCore::RenderFlowThread::hasCachedRegionRangeForBox):
(WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
(WebCore::RenderFlowThread::getRegionRangeForBox):
(WebCore::RenderFlowThread::computedRegionRangeForBox): Best effort function
to determine the range of a box. It will always return something as long
as the flow thread has regions.
(WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion): Use the new function
to determine the range.
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Use the new function to determine
the range.

LayoutTests:
Test that moving lines with inline blocks doesn't cause an assertion.

* fast/regions/inline-block-shifted-region-expected.txt: Added.
* fast/regions/inline-block-shifted-region.html: Added.

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

7 years ago[EFL][WK2] Add ewk_view_fixed_layout_size_set|get()
gyuyoung.kim@samsung.com [Wed, 14 May 2014 06:20:28 +0000 (06:20 +0000)]
[EFL][WK2] Add ewk_view_fixed_layout_size_set|get()
https://bugs.webkit.org/show_bug.cgi?id=132811

Reviewed by Christophe Dumez.

Some EFL applications need to set size of fixed layout when enabling fixed layout.
This APIs can pass ownership regarding the size of fixed layout to application side.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_layout_fixed_size_set):
(ewk_view_layout_fixed_size_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

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

7 years agoFlakiness dashboard contains outdated list of bots on builders.jsonp
commit-queue@webkit.org [Wed, 14 May 2014 05:56:53 +0000 (05:56 +0000)]
Flakiness dashboard contains outdated list of bots on builders.jsonp
https://bugs.webkit.org/show_bug.cgi?id=132874

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-05-13
Reviewed by Darin Adler.

* TestResultServer/static-dashboards/builders.jsonp: Regenerate this
file by changing to the directory Tools/TestResultServer and executing
the script generate_builders_json.py

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

7 years agoFix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side...
simon.fraser@apple.com [Wed, 14 May 2014 04:15:16 +0000 (04:15 +0000)]
Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=132899

Reviewed by Beth Dakin.

Source/WebCore:

Export some things

* WebCore.exp.in:

Source/WebKit2:

The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
need to be correctly encoded/decoded for UI-side compositing, and dumped
correctly.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

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

7 years ago[CSS Shapes] line height grows around polygon and incorrectly causes text to wrap...
hmuller@adobe.com [Wed, 14 May 2014 04:13:47 +0000 (04:13 +0000)]
[CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line
https://bugs.webkit.org/show_bug.cgi?id=131622

Reviewed by Bem Jones-Bey.

Source/WebCore:
Corrected an earlier PolygonShape fix https://bugs.webkit.org/show_bug.cgi?id=132132
When the top or bottom of a layout line is coincident with a polygon edge vertex, we
only consider it an intersection if the edge extends into the line.

Test: fast/shapes/shape-outside-floats/shape-outside-edge-case.html

* rendering/shapes/PolygonShape.cpp:
(WebCore::OffsetPolygonEdge::clippedEdgeXRange):

LayoutTests:
* fast/shapes/shape-outside-floats/shape-outside-edge-case-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-edge-case.html: Added.

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

7 years agom_layerForOverhangAreas is sometimes not positioned correctly when topContentInset
bdakin@apple.com [Wed, 14 May 2014 03:58:43 +0000 (03:58 +0000)]
m_layerForOverhangAreas is sometimes not positioned correctly when topContentInset
has changed
https://bugs.webkit.org/show_bug.cgi?id=132898
-and corresponding-
<rdar://problem/16644710>

Reviewed by Anders Carlsson.

This function is called whenever the topContentInset changes, so use it as an
opportunity to ensure that m_layerForOverhangAreas has been positioned correctly.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):

Everyone gets an anchor point!
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

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

7 years agoJIT breakpoints should be more informative
fpizlo@apple.com [Wed, 14 May 2014 03:57:18 +0000 (03:57 +0000)]
JIT breakpoints should be more informative
https://bugs.webkit.org/show_bug.cgi?id=132882

Reviewed by Oliver Hunt.

Introduce the notion of an AbortReason, which is a nice enumeration of coded assertion
failure names. This means that all you need to figure out why the JIT SIGTRAP'd is to look
at that platform's abort reason register (r11 on X86-64 for example).

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbortReason.h: Added.
* assembler/AbstractMacroAssembler.h:
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::abortWithReason):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::abortWithReason):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::abortWithReason):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::abortWithReason):
* dfg/DFGSlowPathGenerator.h:
(JSC::DFG::SlowPathGenerator::generate):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::bail):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::compileMakeRope):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGThunks.cpp:
(JSC::DFG::osrEntryThunkGenerator):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::jitAssertIsInt32):
(JSC::AssemblyHelpers::jitAssertIsJSInt32):
(JSC::AssemblyHelpers::jitAssertIsJSNumber):
(JSC::AssemblyHelpers::jitAssertIsJSDouble):
(JSC::AssemblyHelpers::jitAssertIsCell):
(JSC::AssemblyHelpers::jitAssertTagsInPlace):
(JSC::AssemblyHelpers::jitAssertHasValidCallFrame):
(JSC::AssemblyHelpers::jitAssertIsNull):
(JSC::AssemblyHelpers::jitAssertArgumentCountSane):
(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::checkStackPointerAlignment):
(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo): Deleted.
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emitSlow_op_div):
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_loop_hint):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::addStructureTransitionCheck): Deleted.
(JSC::JIT::testPrototype): Deleted.
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::compileGetDirectOffset):
* jit/RegisterPreservationWrapperGenerator.cpp:
(JSC::generateRegisterRestoration):
* jit/Repatch.cpp:
(JSC::addStructureTransitionCheck):
(JSC::linkClosureCall):
* jit/ThunkGenerators.cpp:
(JSC::emitPointerValidation):
(JSC::nativeForGenerator):
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::generate):

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

7 years agoAnother build fix.
andersca@apple.com [Wed, 14 May 2014 01:09:38 +0000 (01:09 +0000)]
Another build fix.

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKFoundation.h:
Make sure to include Availability.h

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

7 years agoAttempted build fix after https://bugs.webkit.org/show_bug.cgi?id=132891
dino@apple.com [Wed, 14 May 2014 00:59:52 +0000 (00:59 +0000)]
Attempted build fix after https://bugs.webkit.org/show_bug.cgi?id=132891

* page/PageDebuggable.cpp:

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

7 years agoStep 2 (of 2) fixing the Windows build. Add new setPageScaleFactor.
dino@apple.com [Wed, 14 May 2014 00:35:01 +0000 (00:35 +0000)]
Step 2 (of 2) fixing the Windows build. Add new setPageScaleFactor.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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

7 years agoStep 1 of fixing the windows build. Remove setPageScaleFactor.
dino@apple.com [Wed, 14 May 2014 00:28:08 +0000 (00:28 +0000)]
Step 1 of fixing the windows build. Remove setPageScaleFactor.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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

7 years agoForce developerExtrasEnabled when a remote Inspector client connects.
timothy@apple.com [Wed, 14 May 2014 00:21:40 +0000 (00:21 +0000)]
Force developerExtrasEnabled when a remote Inspector client connects.

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

Reviewed by Joseph Pecoraro.

* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::PageDebuggable): Initialize m_forcedDeveloperExtrasEnabled to false.
(WebCore::PageDebuggable::connect): Set m_forcedDeveloperExtrasEnabled if the setting is changed.
(WebCore::PageDebuggable::disconnect): Switch developerExtrasEnabled back to false
if m_forcedDeveloperExtrasEnabled is true.
* page/PageDebuggable.h: Added m_forcedDeveloperExtrasEnabled.

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

7 years agoREGRESSION (topContentInset): Searching through Facebook Messenger's chat causes
bdakin@apple.com [Wed, 14 May 2014 00:13:56 +0000 (00:13 +0000)]
REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes
scrolling in News Feed
https://bugs.webkit.org/show_bug.cgi?id=132889
-and corresponding-
<rdar://problem/16715716>

Reviewed by Simon Fraser.

Source/WebCore:
First of all, scrollOffsetRelativeToDocument() was very poorly named. This patch
re-names it to the much more accurate documentScrollOffsetRelativeToViewOrigin().
Re-naming it makes it clear that ONE call site was not getting the right offset.
That call site does not want to know the document’s position relative to the view
origin, but rather it wants to know the Document’s position relative to the
scrolling origin.

Export new name.
* WebCore.exp.in:

Use newly re-named documentScrollPositionRelativeToViewOrigin().
* page/FrameView.cpp:
(WebCore::FrameView::convertToRenderer):
* platform/ScrollView.cpp:
(WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
(WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
(WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin):
(WebCore::ScrollView::rootViewToContents):
(WebCore::ScrollView::windowToContents):
(WebCore::ScrollView::scrollOffsetRelativeToDocument): Deleted.
(WebCore::ScrollView::scrollPositionRelativeToDocument): Deleted.
* platform/ScrollView.h:

THIS is the spot that needs the new function,
documentScrollOffsetRelativeToScrollableAreaOrigin()()
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):

Source/WebKit2:
Re-name scrollOffsetRelativeToDocument() to
documentScrollPositionRelativeToViewOrigin().
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::rectsForTextMatches):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):

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

7 years ago[iOS] Page scale update messages for media controls should only fire at the end of...
dino@apple.com [Wed, 14 May 2014 00:09:28 +0000 (00:09 +0000)]
[iOS] Page scale update messages for media controls should only fire at the end of zooming
https://bugs.webkit.org/show_bug.cgi?id=132857
<rdar://problem/16631009>

Reviewed by Simon Fraser.

As the user was zooming, the media controls that responded
to the page scale (and resized themselves) would do so
slightly out of sync with the screen refreshes, and it looked

Source/WebCore:
terrible. They really only need to get told at the end
of the zoom that they need to relayout.

Allow setPageScaleFactor to accept another parameter
that indicates if the change is stable. That way, changes
during a user triggers zoom gesture can be ignored for
media controls.

* WebCore.exp.in: Page::setPageScaleFactor takes a new parameter.
* dom/Document.cpp:
(WebCore::Document::pageScaleFactorChangedAndStable): Renamed from pageScaleFactorChanged.
(WebCore::Document::pageScaleFactorChanged): Deleted.
* dom/Document.h:
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor): Accepts a new inStableState parameter,
and tells the main frame that the scale factor has changed if it's stable.
* page/Page.h:

Source/WebKit2:
terrible.

We already know if a pageScale change is happening inside
a gesture using the inStableState property of the visibleContentRectUpdateInfo.
Simply pass this along to WebCore::Page.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): Pass inStableState onto the
WebCore::Page. Note that we have to send this message even if the
scale has not changed, since the last changing update might not have
been stable.

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

7 years agoUnreviewed build fix after r168755.
eric.carlson@apple.com [Wed, 14 May 2014 00:00:46 +0000 (00:00 +0000)]
Unreviewed build fix after r168755.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):

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

7 years ago[Mac] hasVideo should return true when video is ready to display
eric.carlson@apple.com [Tue, 13 May 2014 23:47:16 +0000 (23:47 +0000)]
[Mac] hasVideo should return true when video is ready to display
https://bugs.webkit.org/show_bug.cgi?id=132885

Reviewed by Jer Noble.

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

* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Don't change the
    enabled state of the AVPlayerItemTrack during setup.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
    m_cachedIsReadyForDisplay.
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Remove "enabled" KVO observers.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Observe "readyForDisplay"
    change notifications.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Remove for "readyForDisplay"
    observer.
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Return cached readyForDisplay
    state instead of polling every time.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Call setHasVideo(true) if the
    player layer is ready for display.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Update logging.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::firstFrameAvailableDidChange): Cache readyForDisplay
    state, call tracksChanged() if we haven't seen a video track yet.
(WebCore::MediaPlayerPrivateAVFoundationObjC::trackEnabledDidChange): New.
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Correct logging.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Remove old "enabled" listeners
    before release tracks, add new ones to new tracks.
(WebCore::assetTrackMetadataKeyNames): Add "enabled" to the list of properties we require to
    be loaded before announcing that metadata has loaded.
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Observe
    "readyForDisplay" and "enabled".

* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
(WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack): Don't change the
    enabled state of the AVPlayerItemTrack during setup.

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

7 years agoText decorations do not contribute to visual overflow https://bugs.webkit.org/show_bu...
mmaxfield@apple.com [Tue, 13 May 2014 23:25:34 +0000 (23:25 +0000)]
Text decorations do not contribute to visual overflow https://bugs.webkit.org/show_bug.cgi?id=132773

Patch by Myles C. Maxfield <litherum@gmail.com> on 2014-05-13
Reviewed by Darin Adler.

Source/WebCore:
Tests: fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html

* rendering/InlineTextBox.cpp:
(WebCore::textDecorationStrokeThickness): Refactor into a common function
(WebCore::wavyOffsetFromDecoration): Ditto
(WebCore::InlineTextBox::extendVerticalVisualOverflowForDecorations): Given
vertical overflow bounds, possibly extend those to include location of
decorations.
(WebCore::InlineTextBox::paintDecoration): Use refactored functions.
* rendering/InlineTextBox.h: Function signature
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Call extendVerticalVisualOverflowForDecorations()
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeAffectsVisualOverflow): Inspects shadows and text decorations
(WebCore::RenderStyle::changeRequiresLayout): Calls changeAffectsVisualOverflow()
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Moved code from here
to changeAffectsVisualOverflow().
* rendering/style/RenderStyle.h: Function signature

LayoutTests:
This test makes sure that repaint rects are extended to include text decorations that may
lie outside of the text layout rects. It compares text with an underline to text that has
had underline applied to it in a timer.

* fast/css3-text/css3-text-decoration/repaint/resources/Litherum.svg: Added. This font has a
descent of 0 (so it will not intersect underlines)
* fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect-expected.html: Added.
Apply the underline without any timeout
* fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html: Added.
Apply the underline with a timeout.

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

7 years ago[iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay...
benjamin@webkit.org [Tue, 13 May 2014 22:47:55 +0000 (22:47 +0000)]
[iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay the state change until both delegates have finished
https://bugs.webkit.org/show_bug.cgi?id=132849
<rdar://problem/16863716>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-05-13
Reviewed by Anders Carlsson.

When there are two delegates responding to UIScrollView changes, there was often an intermediate invalid
state forwarded to the UIProcess.

For example, on scroll, WKWebView would update the state based on the current obscured insets in response to
delegate callbacks.
After that update, Safari would modify the insets, thus updating the state again.
The first state changed by WKWebView is incomplete, and should never have been set.

This patch works around the issue by delaying visible update rect in those cases.

When the two delegates of WKScrollView respond to the same selector, WKScrollView invokes
[UIWebView _willInvokeUIScrollViewDelegateCallback] on entry, and
[UIWebView _didInvokeUIScrollViewDelegateCallback] on exit.

Between those two calls, WKWebView does not forward the new UI state to the WebProcess.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
(-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
(-[WKWebView _updateVisibleContentRects]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
* UIProcess/ios/WKScrollView.h:
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
(-[WKScrollViewDelegateForwarder forwardInvocation:]):
(-[WKScrollView setInternalDelegate:]):

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

7 years ago[iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
benjamin@webkit.org [Tue, 13 May 2014 22:34:21 +0000 (22:34 +0000)]
[iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
https://bugs.webkit.org/show_bug.cgi?id=132848
<rdar://problem/16875093>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-05-13
Reviewed by Darin Adler.

The SPI is no longer needed by Safari.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _endAnimatedResize]):
(updateTopAndBottomExtendedBackgroundExclusionIfNecessary): Deleted.
(-[WKWebView _setExtendedBackgroundExclusionInsets:]): Deleted.
(-[WKWebView _extendedBackgroundExclusionInsets]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

7 years agoAX: Hit testing not accounting for top content inset.
samuel_white@apple.com [Tue, 13 May 2014 22:26:43 +0000 (22:26 +0000)]
AX: Hit testing not accounting for top content inset.
https://bugs.webkit.org/show_bug.cgi?id=132876

Reviewed by Chris Fleizach.

Updated accessibilityHitTest: to account for top content inset when converting from screen coords to WebKit coords.

* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):

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

7 years agoREGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form...
enrica@apple.com [Tue, 13 May 2014 22:13:03 +0000 (22:13 +0000)]
REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
https://bugs.webkit.org/show_bug.cgi?id=132879
<rdar://problem/16318049>

Reviewed by Benjamin Poulain.

Source/WebCore:
Adding some exports. The fix to setScrollPosition is to avoid clamping the scroll
position when using delegate scrolling.

* WebCore.exp.in:
* platform/ScrollView.cpp:
(WebCore::ScrollView::setScrollPosition):

Source/WebKit2:
Adds the heuristics to zoom and scroll to ensure the element being focused
is fully visible and its text readable.

* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):

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

7 years agoplatform/mac/plugins/testplugin-onnew-onpaint.html failing after r168668
jhoneycutt@apple.com [Tue, 13 May 2014 21:51:29 +0000 (21:51 +0000)]
platform/mac/plugins/testplugin-onnew-onpaint.html failing after r168668
<https://bugs.webkit.org/show_bug.cgi?id=132877>

Reviewed by Brent Fulgham.

* platform/mac/plugins/testplugin-onnew-onpaint.html:
Make the test wait until plug-ins have loaded before finishing.

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

7 years agoFollowup to: Update positioning/drawing of the image controls button.
beidson@apple.com [Tue, 13 May 2014 21:45:39 +0000 (21:45 +0000)]
Followup to: Update positioning/drawing of the image controls button.
<rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883

Reviewed by Tim Horton.

Cleared up the actual intent behind review feedback on the original patch.

* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::maybeCreate):

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

7 years agoUpdated the files to have the right width.
fpizlo@apple.com [Tue, 13 May 2014 21:38:52 +0000 (21:38 +0000)]
Updated the files to have the right width.

* blog-files/ftl-jit/dfg_pipeline.png:
* blog-files/ftl-jit/four_tier_performance.png:
* blog-files/ftl-jit/ftl_asm_bench_performance.png:
* blog-files/ftl-jit/ftl_pipeline.png:
* blog-files/ftl-jit/ftl_timeline.png:
* blog-files/ftl-jit/polymorphic_inlining_performance.png:
* blog-files/ftl-jit/polyvariance.png:
* blog-files/ftl-jit/polyvariant_devirtualization_performance.png:
* blog-files/ftl-jit/three_tier_performance.png:

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

7 years agoFix the iOS Simulator build.
simon.fraser@apple.com [Tue, 13 May 2014 21:34:01 +0000 (21:34 +0000)]
Fix the iOS Simulator build.

* UIProcess/mac/ViewSnapshotStore.h:

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

7 years agoSpeculative build fix for iOS.
timothy_horton@apple.com [Tue, 13 May 2014 21:27:16 +0000 (21:27 +0000)]
Speculative build fix for iOS.

* UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
(WebKit::WebMemoryPressureHandler::shared):
(WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
* WebKit2.xcodeproj/project.pbxproj:
Make WebMemoryPressureHandlerIOS Obj-C.

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

7 years agoAdd some illustrations about how JSC works.
fpizlo@apple.com [Tue, 13 May 2014 21:11:48 +0000 (21:11 +0000)]
Add some illustrations about how JSC works.

* blog-files/ftl-jit: Added.
* blog-files/ftl-jit/dfg_pipeline.png: Added.
* blog-files/ftl-jit/four_tier_performance.png: Added.
* blog-files/ftl-jit/ftl_asm_bench_performance.png: Added.
* blog-files/ftl-jit/ftl_pipeline.png: Added.
* blog-files/ftl-jit/ftl_timeline.png: Added.
* blog-files/ftl-jit/object_model.png: Added.
* blog-files/ftl-jit/polymorphic_inlining_performance.png: Added.
* blog-files/ftl-jit/polyvariance.png: Added.
* blog-files/ftl-jit/polyvariant_devirtualization_performance.png: Added.
* blog-files/ftl-jit/three_tier_performance.png: Added.
* blog-files/ftl-jit/three_tiers.png: Added.

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

7 years agoDYEBench should run 20 iterations in browser
rniwa@webkit.org [Tue, 13 May 2014 21:08:10 +0000 (21:08 +0000)]
DYEBench should run 20 iterations in browser
https://bugs.webkit.org/show_bug.cgi?id=132795

Reviewed by Gavin Barraclough.

Right now, run-perf-tests runs BYEBench 4 times with different instances of DRT/WTR to get
a more stable time and account for differences in the runtime environment, particularly,
ASLR (Address Space Layout Randomization).

While we can't account for the latter effect when the benchmark is ran inside a browser,
we can at least run 20 iterations to get a more stable (but perhaps biased by ALSR) number.

While the sample size of 20 is statistically unsound to compute the arithmetic mean from,
it's MUCH better than the current sample size of 5.

* DoYouEvenBench/Full.html:
(benchmarkClient.iterationCount): Set the default iteration count to 20.
(startTest): Use benchmarkClient.iterationCount as the iteration count.
* DoYouEvenBench/resources/benchmark-report.js:
(benchmarkClient.iterationCount): Continue to use the old iteration count of 5 when ran
inside run-perf-tests.

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

7 years ago[Win] Enum type with value zero is compatible with void*, potential cause of crashes.
commit-queue@webkit.org [Tue, 13 May 2014 20:57:07 +0000 (20:57 +0000)]
[Win] Enum type with value zero is compatible with void*, potential cause of crashes.
https://bugs.webkit.org/show_bug.cgi?id=132772

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-05-13
Reviewed by Geoffrey Garen.

Using the MSVC compiler, an instance of an enum type with value zero, is compatible with void* (see bug 132683 for a code example).
This has caused crashes on Windows on two occasions (bug 132683, and bug 121001).
This patch tries to prevent these type of crashes by using a type with explicit constructors instead of void*.
The void* parameter in the loadDouble and storeDouble methods are replaced with TrustedImmPtr.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::loadDouble):
(JSC::MacroAssemblerARM::storeDouble):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::loadDouble):
(JSC::MacroAssemblerARM64::storeDouble):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::loadDouble):
(JSC::MacroAssemblerARMv7::storeDouble):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::loadDouble):
(JSC::MacroAssemblerMIPS::storeDouble):
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::loadDouble):
(JSC::MacroAssemblerSH4::storeDouble):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::storeDouble):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::absDouble):
(JSC::MacroAssemblerX86Common::negateDouble):
(JSC::MacroAssemblerX86Common::loadDouble):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::silentFill):
(JSC::DFG::compileClampDoubleToByte):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::compile):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::purifyNaN):
* jit/JITInlines.h:
(JSC::JIT::emitLoadDouble):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitFloatTypedArrayGetByVal):
* jit/ThunkGenerators.cpp:
(JSC::floorThunkGenerator):
(JSC::roundThunkGenerator):
(JSC::powThunkGenerator):

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

7 years agoUpdate positioning/drawing of the image controls button.
beidson@apple.com [Tue, 13 May 2014 20:43:36 +0000 (20:43 +0000)]
Update positioning/drawing of the image controls button.
<rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883

Reviewed by Tim Horton.

* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::maybeCreate): Add inline style for top/right
  positioning based on the metrics from the render theme.

* html/shadow/mac/imageControlsMac.css:
(.x-webkit-image-controls-button): Can’t hard code any positioning.

* rendering/RenderTheme.h:
(WebCore::RenderTheme::imageControlsButtonPositionOffset):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::servicesRolloverButtonCell):
(WebCore::RenderThemeMac::imageControlsButtonPositionOffset):

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

7 years ago[iOS WK2] background-attachment:fixed behaves very poorly
simon.fraser@apple.com [Tue, 13 May 2014 19:32:37 +0000 (19:32 +0000)]
[iOS WK2] background-attachment:fixed behaves very poorly
https://bugs.webkit.org/show_bug.cgi?id=132881
<rdar://problem/16789526>

Reviewed by Beth Dakin.

Source/WebCore:

Remove the old ENABLE_FAST_MOBILE_SCROLLING code, and add a setting that
controls whether fixed backgrounds paint relative to the document, which
is enabled for iOS (WK1 and WK2). This setting is consulted when we repaint
fixed backgrounds on scrolling, when we paint them, and when we decide to make
a layer for fixed backgrounds.

* page/Settings.cpp:
* page/Settings.in:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::willBeRemovedFromTree):
(WebCore::shouldRepaintFixedBackgroundsOnScroll): Deleted.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):

Source/WTF:

Remove ENABLE_FAST_MOBILE_SCROLLING. Ports can use the fixedBackgroundsPaintRelativeToDocument
setting now.

* wtf/FeatureDefines.h:

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

7 years agoAnother follow-up build fix.
andersca@apple.com [Tue, 13 May 2014 19:32:26 +0000 (19:32 +0000)]
Another follow-up build fix.

* Shared/API/Cocoa/WKFoundation.h:

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

7 years agoAnother follow-up build fix.
andersca@apple.com [Tue, 13 May 2014 19:25:43 +0000 (19:25 +0000)]
Another follow-up build fix.

* Shared/API/Cocoa/WKFoundation.h:

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

7 years agoFollow-up fix.
andersca@apple.com [Tue, 13 May 2014 19:22:30 +0000 (19:22 +0000)]
Follow-up fix.

* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
(-[WKNavigationAction _isUserInitiated]):

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

7 years agoAdd -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
andersca@apple.com [Tue, 13 May 2014 19:20:35 +0000 (19:20 +0000)]
Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
https://bugs.webkit.org/show_bug.cgi?id=132880
<rdar://problem/16901354>

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKFoundation.h:
Add typedef for older systems.

* UIProcess/API/Cocoa/WKNavigationAction.h:
Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]

* UIProcess/API/Cocoa/WKNavigationAction.mm:
(toWKNavigationType):
This can be static now.

(toNSEventModifierFlags):
Helper to convert WebEvent::Modifiers to NSEventModifierFlags.

(toNSButtonNumber):
Helper to convert WebMouseEvent::Button to an AppKit button number.

(-[WKNavigationAction initWithNavigationActionData:WebKit::]):
New initializer that takes a NavigationActionData and fills in the relevant ivars from it.

(-[WKNavigationAction _isUserInitiated]):
Return the new ivar.

* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
Remove readwrite overrides.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Use initWithNavigationActionData:

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
Use initWithNavigationActionData:

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

7 years agoWebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
timothy_horton@apple.com [Tue, 13 May 2014 18:11:46 +0000 (18:11 +0000)]
WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
https://bugs.webkit.org/show_bug.cgi?id=127788
<rdar://problem/15928241>

Reviewed by Anders Carlsson.

Allow JPEG snapshots. Compression is done asynchronously.
Enable JPEG snapshots (for now) on all PLATFORM(MAC).
We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Store the image size on the ViewSnapshot.
Move IOSurface-related code to ViewSnapshotStore.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Adopt asLayerContents().

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::retrieveSnapshotForItem):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Adopt asLayerContents().
Put the snapshot on the right layer (the parent of the snapshot image layer);
if it's on the snapshot image layer itself, if there is no image, the shadow
is displayed on top of the white placeholder.
Only reset snapshot purgeability if we're using IOSurface snapshots.

* UIProcess/mac/ViewSnapshotStore.h:
Add a bunch of macros to allow us to switch the snapshot backing store implementation.

* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::recordSnapshot):
If takeViewSnapshot() fails, don't remove the existing snapshot.

(WebKit::createIOSurfaceFromImage):
(WebKit::compressImageAsJPEG):
(WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
(WebKit::ViewSnapshotStore::didCompressSnapshot):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
Asynchronously compress snapshots - if we're using JPEG snapshots - for a
very large memory win (~20-30x).

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

7 years ago[GTK] Unreviewed GTK gardening
commit-queue@webkit.org [Tue, 13 May 2014 18:01:29 +0000 (18:01 +0000)]
[GTK] Unreviewed GTK gardening

Rebaseline affected tests after svg root element background repaint changes
introduced in r168674.

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-05-13

* platform/gtk/http/tests/misc/slow-loading-image-in-pattern-expected.txt:
* platform/gtk/svg/custom/circle-move-invalidation-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-container-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-container-standalone-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-root-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-root-standalone-expected.txt:
* platform/gtk/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt:
* platform/gtk/svg/custom/svg-float-border-padding-expected.txt:
* platform/gtk/svg/text/small-fonts-in-html5-expected.txt:

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

7 years agoREGRESSSION(r168528) Subpixel rendering: Selection rect is not positioned properly...
zalan@apple.com [Tue, 13 May 2014 17:56:55 +0000 (17:56 +0000)]
REGRESSSION(r168528) Subpixel rendering: Selection rect is not positioned properly when SVG text is selected.
https://bugs.webkit.org/show_bug.cgi?id=132868

Reviewed by Dirk Schulze.

Scale the selection rect. r168528 missed applying this final transform on the selection/painting rect.

Source/WebCore:
Test: svg/text/hidpi-text-selection-rect-position.html

* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):

LayoutTests:
* svg/text/hidpi-text-selection-rect-position-expected.html: Added.
* svg/text/hidpi-text-selection-rect-position.html: Added.

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

7 years ago[CSS Regions] Add basic tests for inset flows into regions
zoltan@webkit.org [Tue, 13 May 2014 17:30:45 +0000 (17:30 +0000)]
[CSS Regions] Add basic tests for inset flows into regions
https://bugs.webkit.org/show_bug.cgi?id=132871

Reviewed by Mihnea Ovidenie.

* fast/regions/shape-outside-floats/regions-shape-outside-floats-inset-expected.html: Added.
* fast/regions/shape-outside-floats/regions-shape-outside-floats-inset.html: Added.

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

7 years agoASSERTION FAILED: leftCategory != CalcOther && rightCategory != CalcOther
commit-queue@webkit.org [Tue, 13 May 2014 17:08:43 +0000 (17:08 +0000)]
ASSERTION FAILED: leftCategory != CalcOther && rightCategory != CalcOther
in WebCore::CSSCalcBinaryOperation::createSimplified
https://bugs.webkit.org/show_bug.cgi?id=132870

Source/WebCore:
According to the standard, calc() should be able to handle angle, time
and frequency values as well: http://www.w3.org/TR/css3-values/#calc

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-13
Reviewed by Darin Adler.

Test: fast/css/calc-with-angle-time-frequency.html

* css/CSSCalculationValue.cpp:
(WebCore::unitCategory):
(WebCore::CSSCalcPrimitiveValue::createCalcExpression):
(WebCore::CSSCalcPrimitiveValue::computeLengthPx):
(WebCore::CSSCalcPrimitiveValue::addSubtractResult):
(WebCore::CSSCalcPrimitiveValue::determineCategory):
(WebCore::CSSCalcBinaryOperation::primitiveType)
* css/CSSCalculationValue.h: extending CalculationCategory
* css/CSSParser.cpp:
(WebCore::CSSParser::validCalculationUnit):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::primitiveType):

LayoutTests:
Added test contains calc() expressions with angle, time and frequency values,
covering all the newly introduced unit types, each of which used to fail.

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-13
Reviewed by Darin Adler.

* fast/css/calc-with-angle-time-frequency-expected.txt: Added.
* fast/css/calc-with-angle-time-frequency.html: Added.

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

7 years agoTry to fix the !ENABLE(ICONDATABASE) build
darin@apple.com [Tue, 13 May 2014 16:26:16 +0000 (16:26 +0000)]
Try to fix the !ENABLE(ICONDATABASE) build

* loader/icon/IconDatabase.h: Include WTFString.h.

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

7 years agoREGRESSION(r167771): [GTK] Text fields and areas are rendered unthemed
carlosgc@webkit.org [Tue, 13 May 2014 15:34:00 +0000 (15:34 +0000)]
REGRESSION(r167771): [GTK] Text fields and areas are rendered unthemed
https://bugs.webkit.org/show_bug.cgi?id=132864

Reviewed by Philippe Normand.

This is because the virtual methods changed the API in the parent,
and since we don't have the methods marked as override we didn't
noticed it. After using override keyword for all virtual methods
in the derived class another problem showed up, the ActiveListBox
selection methods were incorrectly named.

* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintTextArea): Update to API changes in the
parent class.
* platform/gtk/RenderThemeGtk.h: Mark all virtual methods as
override and the class as final.
* platform/gtk/RenderThemeGtk2.cpp:
(WebCore::RenderThemeGtk::paintTextField): Update to API changes
in the parent class.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
(WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
(WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
(WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::paintTextField): Update to API changes
in the parent class.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
(WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
(WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
(WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.

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

7 years ago[EFL] Rebaseline after r168575
commit-queue@webkit.org [Tue, 13 May 2014 15:30:29 +0000 (15:30 +0000)]
[EFL] Rebaseline after r168575
https://bugs.webkit.org/show_bug.cgi?id=132867

Unreviewed gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-05-13

* platform/efl-wk2/fast/css/input-search-padding-expected.png:
* platform/efl/fast/css/css1_forward_compatible_parsing-expected.txt:
* platform/efl/fast/css/first-line-text-decoration-expected.txt:
* platform/efl/fast/css/h1-in-section-elements-expected.png:
* platform/efl/fast/css/h1-in-section-elements-expected.txt:
* platform/efl/fast/css/input-search-padding-expected.txt:
* platform/efl/fast/css/word-space-extra-expected.txt:
* platform/efl/fast/encoding/utf-16-big-endian-expected.txt:
* platform/efl/fast/encoding/utf-16-little-endian-expected.txt:
* platform/efl/fast/forms/searchfield-heights-expected.txt:
* platform/efl/fast/forms/textAreaLineHeight-expected.txt:
* platform/efl/fast/inline/continuation-outlines-expected.txt:
* platform/efl/fast/inline/outline-continuations-expected.txt:
* platform/efl/fast/invalid/nestedh3s-expected.txt:
* platform/efl/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
* platform/efl/fast/table/014-expected.txt:
* platform/efl/fast/table/dynamic-caption-add-remove-before-child-expected.txt:
* platform/efl/fast/text/international/bidi-LDB-2-HTML-expected.txt:
* platform/efl/mathml/presentation/mo-stretch-expected.png:
* platform/efl/mathml/presentation/mo-stretch-expected.txt:
* platform/efl/scrollbars/custom-scrollbar-with-incomplete-style-expected.txt:
* platform/efl/svg/hixie/error/012-expected.png:
* platform/efl/svg/hixie/error/012-expected.txt:
* platform/efl/svg/hixie/mixed/010-expected.txt:
* platform/efl/svg/in-html/circle-expected.txt:
* platform/efl/svg/wicd/rightsizing-grid-expected.txt:
* platform/efl/svg/wicd/test-rightsizing-b-expected.txt:
* platform/efl/tables/mozilla/bugs/bug113235-1-expected.txt:
* platform/efl/tables/mozilla/bugs/bug113235-2-expected.txt:
* platform/efl/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
* platform/efl/tables/mozilla/other/wa_table_tr_align-expected.txt:

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

7 years ago[GStreamer] Move toGstClockTime to utilities
calvaris@igalia.com [Tue, 13 May 2014 15:20:19 +0000 (15:20 +0000)]
[GStreamer] Move toGstClockTime to utilities
https://bugs.webkit.org/show_bug.cgi?id=132702

Reviewed by Philippe Normand.

toGstClockTime should be in GStreamerUtilities and corrected typo
in getGstPlayFlag.

No new tests needed.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::getGstPlayFlag): Renamed from getGstPlaysFlag.
(WebCore::toGstClockTime): Moved from MediaPlayerPrivateGStreamer.
(WebCore::getGstPlaysFlag): Deleted.
* platform/graphics/gstreamer/GStreamerUtilities.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
Corrected getGstPlayFlag typo.
(WebCore::toGstClockTime): Deleted.

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

7 years agoMake a few icon database improvements
darin@apple.com [Tue, 13 May 2014 14:44:50 +0000 (14:44 +0000)]
Make a few icon database improvements
https://bugs.webkit.org/show_bug.cgi?id=132812

Reviewed by Brady Eidson.

Source/WebCore:
* WebCore.exp.in: Export more IconDatabase functions, since they are now called
by WebKit2 through pointers to a class marked final.

* loader/icon/IconDatabase.cpp: Removed unneeded includes. Use override for
virtual functions.

* loader/icon/IconDatabase.h: Removed unneeded includes. Marked the class final.
Use override for virtual functions. Use a public constructor instead of a create
function.

* loader/icon/IconDatabaseBase.h: Removed unneeded includes.

Source/WebKit2:
* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
out of the bindings into the WebIconDatabase class.

* UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.

* UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
(WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
(WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
(WebKit::WebIconDatabase::invalidate): Use nullptr.
(WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
(WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
(WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
(WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
(WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
(WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
another copy of the data for each icon.

* UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
function. Use a reference for the constructor argument. Use override for
virtual functions. Use unique_ptr instead of OwnPtr.

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

7 years ago[MediaStream] MediaStream.addTrack Should not check for active state.
berto@igalia.com [Tue, 13 May 2014 13:56:15 +0000 (13:56 +0000)]
[MediaStream] MediaStream.addTrack Should not check for active state.

Source/WebCore:
https://bugs.webkit.org/show_bug.cgi?id=132558

Patch by Kiran <kiran.guduru@samsung.com> on 2014-05-13
Reviewed by Eric Carlson.

MediaStream.addTrack method is checking for active state of a
MediaStream, but it should not check for active state while adding a Track.

Test: fast/mediastream/MediaStream-add-tracks-to-inactive-stream.html

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack):

LayoutTests:
Nhttps://bugs.webkit.org/show_bug.cgi?id=132558.

Patch by Kiran <kiran.guduru@samsung.com> on 2014-05-13
Reviewed by Eric Carlson.

MediaStream.addTrack method is checking for active state of a
MediaStream, but it should not check for active state while adding a Track

Removed check not to add tracks to ended stream:relative which forced tests to avoid this bug.
* fast/mediastream/MediaStream-add-remove-tracks-expected.txt:
* fast/mediastream/MediaStream-add-remove-tracks.html:

New tests:
* fast/mediastream/MediaStream-add-tracks-to-inactive-stream-expected.txt: Added.
* fast/mediastream/MediaStream-add-tracks-to-inactive-stream.html: Added.

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

7 years agoWeb Inspector: Restore regionLayoutUpdated event in iOS7 inspector and remove regionO...
stavila@adobe.com [Tue, 13 May 2014 13:11:25 +0000 (13:11 +0000)]
Web Inspector: Restore regionLayoutUpdated event in iOS7 inspector and remove regionOversetChanged
https://bugs.webkit.org/show_bug.cgi?id=132731

Reviewed by Joseph Pecoraro.

Added the regionLayoutUpdated event back into the inspector for compatibility with iOS 7
and removed regionOversetChanged from the iOS7 inspector as iOS 7 does not implement that event.

* UserInterface/Models/ScriptTimelineRecord.js:
* UserInterface/Protocol/CSSObserver.js:
(WebInspector.CSSObserver.prototype.regionLayoutUpdated):
* UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:

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

7 years ago[GTK] Unreviewed GTK gardening
commit-queue@webkit.org [Tue, 13 May 2014 10:21:07 +0000 (10:21 +0000)]
[GTK] Unreviewed GTK gardening

Rebaseline affected tests by changes to avoid increasing empty
LayoutRects introduced at r168575.

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-05-13

* platform/gtk/fast/css/css1_forward_compatible_parsing-expected.txt:
* platform/gtk/fast/css/first-line-text-decoration-expected.txt:
* platform/gtk/fast/css/h1-in-section-elements-expected.txt:
* platform/gtk/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/gtk/fast/css/text-overflow-input-expected.txt:
* platform/gtk/fast/css/word-space-extra-expected.txt:
* platform/gtk/fast/encoding/utf-16-big-endian-expected.txt:
* platform/gtk/fast/encoding/utf-16-little-endian-expected.txt:
* platform/gtk/fast/forms/box-shadow-override-expected.txt:
* platform/gtk/fast/forms/control-restrict-line-height-expected.txt:
* platform/gtk/fast/forms/fieldset-align-expected.txt:
* platform/gtk/fast/forms/input-appearance-height-expected.txt:
* platform/gtk/fast/forms/placeholder-position-expected.txt:
* platform/gtk/fast/forms/placeholder-pseudo-style-expected.txt:
* platform/gtk/fast/forms/search-cancel-button-style-sharing-expected.txt:
* platform/gtk/fast/forms/search-display-none-cancel-button-expected.txt:
* platform/gtk/fast/forms/search/search-size-with-decorations-expected.txt:
* platform/gtk/fast/forms/textAreaLineHeight-expected.txt:
* platform/gtk/fast/inline/continuation-outlines-expected.txt:
* platform/gtk/fast/inline/continuation-outlines-with-layers-expected.txt:
* platform/gtk/fast/inline/outline-continuations-expected.txt:
* platform/gtk/fast/invalid/nestedh3s-expected.txt:
* platform/gtk/fast/multicol/client-rects-expected.txt:
* platform/gtk/fast/multicol/client-rects-spanners-complex-expected.txt:
* platform/gtk/fast/multicol/client-rects-spanners-expected.txt:
* platform/gtk/fast/multicol/newmulticol/client-rects-expected.txt:
* platform/gtk/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/gtk/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/gtk/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
* platform/gtk/fast/regions/repaint/repaint-regions-overflow-expected.txt:
* platform/gtk/fast/repaint/search-field-cancel-expected.txt:
* platform/gtk/fast/replaced/width100percent-searchfield-expected.txt:
* platform/gtk/fast/table/014-expected.txt:
* platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.txt:
* platform/gtk/mathml/presentation/mo-stretch-expected.txt:
* platform/gtk/scrollbars/custom-scrollbar-with-incomplete-style-expected.txt:
* platform/gtk/svg/custom/use-font-face-crash-expected.txt:
* platform/gtk/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt:
* platform/gtk/svg/wicd/rightsizing-grid-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug113235-1-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug113235-2-expected.txt:
* platform/gtk/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
* platform/gtk/tables/mozilla/other/wa_table_tr_align-expected.txt:

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

7 years agoWebKit2 on iOS needs to capture the main thread's floating point environment.
mark.lam@apple.com [Tue, 13 May 2014 06:40:08 +0000 (06:40 +0000)]
WebKit2 on iOS needs to capture the main thread's floating point environment.
<https://webkit.org/b/132755>

Reviewed by Geoffrey Garen.

Source/WebCore:
For iOS, WorkerThread::workerThread() expects to be able to initialize the
worker thread's floating point environment to be the same as the one in the
main thread.  The FP env of the main thread is expected to have been captured
in the mainThreadFEnv global.  On WebKit2 for iOS, we neglected to initialize
mainThreadFEnv.

We now introduce a FloatingPointEnvironment class that will encapsulate the main
thread (aka "UIThread") fenv, and we'll call FloatingPointEnv::saveMainThreadEnvironment()
from ChildProcess::platformInitialize() to ensure that the FloatingPointEnvironment
singleton instance is initialized properly for WebKit2.

In the ChildProcess::platformInitialize(), we also need to initialize the ARMv7
FP env to support denormalized numbers.  We'll do this before calling
saveMainThreadEnvironment().

Tests: fast/workers/worker-floating-point.html
       js/floating-point-denormalized.html

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/wak/FloatingPointEnvironment.cpp: Added.
(WebCore::FloatingPointEnvironment::env):
(WebCore::FloatingPointEnvironment::FloatingPointEnvironment):
(WebCore::FloatingPointEnvironment::enableDenormalSupport):
(WebCore::FloatingPointEnvironment::saveMainThreadEnvironment):
(WebCore::FloatingPointEnvironment::propagateMainThreadEnvironment):
* platform/ios/wak/FloatingPointEnvironment.h: Added.
* platform/ios/wak/WebCoreThread.h:
* platform/ios/wak/WebCoreThread.mm:
(RunWebThread):
(StartWebThread):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):

Source/WebKit2:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::platformInitialize):
- Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
  the ARMv7 FP env to support denormalized numbers.
- Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
  fp env.

LayoutTests:
* fast/workers/resources/worker-floating-point.js: Added.
(runTest1):
(doDiv):
(runTest2):
* fast/workers/worker-floating-point-expected.txt: Added.
* fast/workers/worker-floating-point.html: Added.
* js/floating-point-denormalized-expected.txt: Added.
* js/floating-point-denormalized.html: Added.
* js/script-tests/floating-point-denormalized.js: Added.

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

7 years ago[EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest
gyuyoung.kim@samsung.com [Tue, 13 May 2014 06:14:17 +0000 (06:14 +0000)]
[EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest
https://bugs.webkit.org/show_bug.cgi?id=132817

Reviewed by Dirk Schulze.

To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
Besides this patch adds test html page for ewk_view_navigation unit test.

* UIProcess/API/efl/tests/resources/Page1.html: Added.
* UIProcess/API/efl/tests/resources/Page2.html: Added.
* UIProcess/API/efl/tests/resources/Page3.html: Added.
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

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

7 years agoSVG root element accepts background color but fails to repaint it
krit@webkit.org [Tue, 13 May 2014 06:04:58 +0000 (06:04 +0000)]
SVG root element accepts background color but fails to repaint it
https://bugs.webkit.org/show_bug.cgi?id=63153

Reviewed by Dean Jackson.

Source/WebCore:
This is back ported from Blink. Don't know the exact commit though.
The patch checks if the SVGSVGElement is an outermost root element.
If it is, mark the whole element for repaint.

Test: svg/custom/svg-root-background.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateHasBoxDecorations):
(WebCore::RenderBoxModelObject::updateFromStyle):
* rendering/RenderBoxModelObject.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::RenderSVGRoot):
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::paintReplaced):
(WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
    This is a simple optimization by taking the necessary parts
    from RenderReplaced and SVGRenderSupport.
* rendering/svg/RenderSVGRoot.h:

LayoutTests:
Check that background color updates if the size of an outermost
root SVG element changes.

* svg/custom/svg-root-background-expected.png: Added.
* svg/custom/svg-root-background-expected.txt: Added.
* svg/custom/svg-root-background.html: Added.

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

7 years ago[Win] Unreviewed build fix after r168668.
bfulgham@apple.com [Tue, 13 May 2014 04:53:57 +0000 (04:53 +0000)]
[Win] Unreviewed build fix after r168668.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add
missing export symbols.

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

7 years ago[iOS] Fixed items are sometimes clipped after rubber-banding
simon.fraser@apple.com [Tue, 13 May 2014 04:32:09 +0000 (04:32 +0000)]
[iOS] Fixed items are sometimes clipped after rubber-banding
https://bugs.webkit.org/show_bug.cgi?id=132851
<rdar://problem/16870790>

Reviewed by Benjamin Poulain.

On iOS fixed-position layers would get clipped to the document rect,
but with rubber-banding, we can now have a custom fixed postion rect
that extends outside the document rect.

Another issue was that we would un-composite fixed elements sometimes
when scrolling fast, again because they could fall outside of the document rect.

A final issue was that pinching could reveal parts of fixed elements that should
lie outside the viewport, rather than clipping the layers.

Fix by converting both call points to use viewportConstrainedVisibleContentRect()
rather than viewportConstrainedExtentRect(). On non-iOS platforms these are
the same, but on iOS viewportConstrainedVisibleContentRect() uses the
custom fixed position rect, which is the correct rect to intersect with.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

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

7 years agoUnreviewed, fix mismatched test expectation.
jpfau@apple.com [Tue, 13 May 2014 03:19:29 +0000 (03:19 +0000)]
Unreviewed, fix mismatched test expectation.

* webgl/many-contexts-expected.txt:

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

7 years agoDon't dispatch 'beforeload' event inside FrameView::layout()
jhoneycutt@apple.com [Tue, 13 May 2014 02:25:28 +0000 (02:25 +0000)]
Don't dispatch 'beforeload' event inside FrameView::layout()

https://bugs.webkit.org/show_bug.cgi?id=132621
<rdar://problem/15661470>

This merges Blink revision 162073 with minor renaming and style
changes. From that commit:

Executing JavaScript code inside FrameView::layout() is problematic.
e.g. an assertion failure tested in fast/events/beforeload-assertion.html.
We should avoid it.

This CL makes 'beforeload' event dispatching for plugins and iframes asynchronous,
except plugin access from JavaScript code (HTMLPlugInElement::
renderWidgetForJSBindings).

Reviewed by Brent Fulgham.

Source/WebCore:
Tests: fast/events/beforeload-assertion.html
       fast/events/beforeload-iframe-crash.html
       fast/events/beforeload-input-time-crash.html

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
* dom/Document.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::renderWidgetForJSBindings):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderWidgetForJSBindings):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::performPostLayoutTasks):
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:
* compositing/plugins/composited-plugin.html:
* compositing/plugins/no-backing-store.html:
* fast/dom/beforeload/flash-before-load.html:
* fast/events/beforeload-assertion-expected.txt: Added.
* fast/events/beforeload-assertion.html: Added.
* fast/events/beforeload-iframe-crash-expected.txt: Added.
* fast/events/beforeload-iframe-crash.html: Added.
* fast/events/beforeload-input-time-crash-expected.txt: Added.
* fast/events/beforeload-input-time-crash.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
(testImpl.iframe.onload):
(testImpl):
* http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
* platform/mac/plugins/supports-carbon-event-model.html:
* plugins/get-user-agent-with-null-npp-from-npp-new.html:
* plugins/mouse-click-plugin-clears-selection.html:
* plugins/netscape-plugin-map-data-to-src.html:
* plugins/no-mime-with-valid-extension.html:
* plugins/plugin-initiate-popup-window.html:
* plugins/windowless_plugin_paint_test.html:
* resources/plugin.js: Added.
(runAfterPluginLoad):

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

7 years agoUnreviewed. Adjust expected result for test added in r168666.
roger_fong@apple.com [Tue, 13 May 2014 01:29:05 +0000 (01:29 +0000)]
Unreviewed. Adjust expected result for test added in r168666.
* webgl/many-contexts-expected.txt:

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

7 years agoLimit number of active graphics contexts per web process.
roger_fong@apple.com [Tue, 13 May 2014 01:07:52 +0000 (01:07 +0000)]
Limit number of active graphics contexts per web process.
https://bugs.webkit.org/show_bug.cgi?id=132833.
<rdar://problem/16888459>

Reviewed by Dean Jackson.

Test: webgl/many-contexts.html

* platform/graphics/GraphicsContext3D.h:
* platform/graphics/mac/GraphicsContext3DMac.mm: Limit number of active contexts to 16.
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* webgl/many-contexts-expected.txt: Added.
* webgl/many-contexts.html: Added.

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

7 years agoBuild fix fix.
simon.fraser@apple.com [Tue, 13 May 2014 00:32:24 +0000 (00:32 +0000)]
Build fix fix.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):

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

7 years agoDataDetectorUI doesn't update with resize
bfulgham@apple.com [Tue, 13 May 2014 00:29:30 +0000 (00:29 +0000)]
DataDetectorUI doesn't update with resize
https://bugs.webkit.org/show_bug.cgi?id=132830
<rdar://problem/16871179>

Reviewed by Simon Fraser.

* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers): Add public, no-argument
version that can be called after layout changes.
(WebCore::Editor::didLayout): Reprocess telephone number data
since Ranges will have changed.
* editing/Editor.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateDataDetectorsForSelection): Added.
* editing/FrameSelection.h:
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Ask the FrameSelection to update the
Range information for selected phone numbers.

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

7 years agoUnreviewed, EFL build fix since r168625.
gyuyoung.kim@samsung.com [Tue, 13 May 2014 00:27:36 +0000 (00:27 +0000)]
Unreviewed, EFL build fix since r168625.

* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.

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

7 years agoFix the iOS build.
simon.fraser@apple.com [Tue, 13 May 2014 00:21:04 +0000 (00:21 +0000)]
Fix the iOS build.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):

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

7 years ago[iOS WK2] Fuzzy tiles on some sites on loading
simon.fraser@apple.com [Tue, 13 May 2014 00:14:01 +0000 (00:14 +0000)]
[iOS WK2] Fuzzy tiles on some sites on loading
https://bugs.webkit.org/show_bug.cgi?id=132847
<rdar://problem/16816178>

Reviewed by Benjamin Poulain.

Source/WebCore:

Export WebCore::TileController::contentsScale() const

* WebCore.exp.in:

Source/WebKit2:

PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
scale wrong. Fix by overriding contentsScale() also.

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

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

7 years agoAdd debug dumping for ViewportConfiguration
simon.fraser@apple.com [Tue, 13 May 2014 00:13:58 +0000 (00:13 +0000)]
Add debug dumping for ViewportConfiguration
https://bugs.webkit.org/show_bug.cgi?id=132843

Reviewed by Benjamin Poulain.

Add some TextStream-based dumping for ViewportConfiguration.

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::ViewportConfigurationTextStream::ViewportConfigurationTextStream):
(WebCore::ViewportConfigurationTextStream::increaseIndent):
(WebCore::ViewportConfigurationTextStream::decreaseIndent):
(WebCore::dumpProperty):
(WebCore::ViewportConfigurationTextStream::writeIndent):
(WebCore::ViewportConfigurationTextStream::operator<<):
(WebCore::ViewportConfiguration::description):
(WebCore::ViewportConfiguration::dump):
* page/ViewportConfiguration.h:

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

7 years agoFollowup to "Teach Editor to support more direct replacement of a Node"
beidson@apple.com [Tue, 13 May 2014 00:05:55 +0000 (00:05 +0000)]
Followup to "Teach Editor to support more direct replacement of a Node"
<rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834

Pair programmed and pair reviewed by Brady Eidson and Darin Adler.

* editing/mac/EditorMac.mm:
(WebCore::maybeCopyNodeAttributesToFragment):
(WebCore::Editor::replaceNodeFromPasteboard):

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

7 years agoTriple-buffer RemoteLayerBackingStore
timothy_horton@apple.com [Mon, 12 May 2014 23:31:56 +0000 (23:31 +0000)]
Triple-buffer RemoteLayerBackingStore
https://bugs.webkit.org/show_bug.cgi?id=132786
<rdar://problem/16877498>

Reviewed by Simon Fraser.

We need three buffers because we're currently unable to synchronize
with the render server to swap when they're not in use, so we were
throwing surfaces away far too frequently.

This hugely reduces time spent in IOSurface::create on various repaint benchmarks.

* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::hasFrontBuffer):
(WebKit::RemoteLayerBackingStore::volatility): Deleted.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::clearBackingStore):
(WebKit::RemoteLayerBackingStore::encode):
(WebKit::RemoteLayerBackingStore::decode):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
(WebKit::RemoteLayerBackingStore::setBufferVolatility):
(WebKit::RemoteLayerBackingStore::Buffer::discard):
(WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
We keep a volatility bit because querying IOSurface purgeability is expensive,
and we have a guarantee that any changes will happen in the Web process
and go through this class (the lack of this guarantee in most cases is why I'm not
putting this bit in WebCore::IOSurface itself).

Make it so that each buffer's volatility can be adjusted individually
by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.

Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
before swapping front and back if the back buffer (soon to be the front buffer)
is still in use by the render server. This means that we will almost never
have to throw away a surface because it's in use (and conversely never need
to make a new surface).

Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
more aggressively than others.

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

7 years agoDon't make a Frameworks symlink inside WebKitLegacy.framework
andersca@apple.com [Mon, 12 May 2014 23:29:18 +0000 (23:29 +0000)]
Don't make a Frameworks symlink inside WebKitLegacy.framework
https://bugs.webkit.org/show_bug.cgi?id=132842
<rdar://problem/16886939>

Reviewed by Dan Bernstein.

* WebKit.xcodeproj/project.pbxproj:

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

7 years agoContent shadow layer needs to move in sync with the content layer
bdakin@apple.com [Mon, 12 May 2014 23:21:51 +0000 (23:21 +0000)]
Content shadow layer needs to move in sync with the content layer
https://bugs.webkit.org/show_bug.cgi?id=132841
-and corresponding-
<rdar://problem/16641115>

Reviewed by Simon Fraser.

Now that the root content layer moves a little bit (for y scroll positions between
0 and topContentInset), the shadow layer needs to move along with it since the
shadow layer should always have the same position as the root content layer.

Set the root state node’s shadow layer, and update the position whenever the root
content layer’s position is updated.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

Fetch the compositor’s layerForContentShadow().
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
* page/scrolling/ScrollingCoordinator.h:

Hook up the contentShadowLayer in the state node.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setContentShadowLayer):

Hook it up in the ScrollingTreeNode as well. Move the layer whenever the m
_scrolledContentsLayer is moved.
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

The shadow layer needs an anchor point now that we are moving it around.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

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