git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
https://bugs.webkit.org/show_bug.cgi?id=131150

Reviewed by Beth Dakin.

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop throwing away the Document's StyleResolver on a timer.
<https://webkit.org/b/131168>
<rdar://problem/15227045>

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

Reviewed by Sam Weinig.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Harden FilterOperation type casting
https://bugs.webkit.org/show_bug.cgi?id=131142

Reviewed by Sam Weinig.

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

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

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

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

Fixed PlatformCAFiltersMac to handle the default filter case more cleanly.

Source/WebCore:

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

Source/WebKit2:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make download policy decisions SPI for now
https://bugs.webkit.org/show_bug.cgi?id=131179

Reviewed by Sam Weinig.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  Unreviewed. Moving my name to committer section accidently 
              added in reviewer section. 
     * Scripts/webkitpy/common/config/contributors.json:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebKit2] Promote user script SPI to API
https://bugs.webkit.org/show_bug.cgi?id=131181

Reviewed by Anders Carlsson.

Source/WebKit/mac: 

* MigrateHeaders.make:

Source/WebKit2: 

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html broken
https://bugs.webkit.org/show_bug.cgi?id=131183

Reviewed by Simon Fraser.

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

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CG] Canvas lineDashOffset does not handle negative numbers correctly
https://bugs.webkit.org/show_bug.cgi?id=80560

Reviewed by Dean Jackson.

Source/WebCore:

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

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

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

LayoutTests:

Test correct rendering of negative offset for Canvas dash arrays.

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


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