config.json fix.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make actionsForElement a proper API::UIClient member function
https://bugs.webkit.org/show_bug.cgi?id=131171

Reviewed by Sam Weinig.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Document WKNavigationAction and WKNavigationResponse
https://bugs.webkit.org/show_bug.cgi?id=131138

Reviewed by Sam Weinig.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix bit rot in ARMv7 JIT probe mechanism.
<https://webkit.org/b/131167>

Reviewed by Geoffrey Garen.

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKWebView should always have a UIDelegate, even when closed
https://bugs.webkit.org/show_bug.cgi?id=131174
<rdar://problem/16389248>

Reviewed by Sam Weinig.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (Async text input): Controls become unresponsive to mouse events
https://bugs.webkit.org/show_bug.cgi?id=131176
<rdar://problem/16507932>

Reviewed by Tim Horton.

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Continuations casting issue.
https://bugs.webkit.org/show_bug.cgi?id=130057
<rdar://problem/16283406>

Reviewed by Simon Fraser.

Source/WebCore: 

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

Added fast/block/continuation-crash.html

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

LayoutTests: 

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[CSS Shapes] LineSegment logicalLeft and logicalRight members should be floats
https://bugs.webkit.org/show_bug.cgi?id=116160

Reviewed by Andreas Kling.

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

No new tests are needed, no behavior change.

* rendering/shapes/Shape.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Pixelated WebView when display is changed from hiDPI to regularDPI
https://bugs.webkit.org/show_bug.cgi?id=131185

Reviewed by Tim Horton.

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

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

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

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

Reviewed by Tim Horton.

TileController function was renamed.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [Win] Turn on ENABLE_CSS_GRID_LAYOUT
https://bugs.webkit.org/show_bug.cgi?id=131147

Reviewed by Simon Fraser.

Covered by existing fast/css/getComputedStyle tests.

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

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

Reviewed by Simon Fraser.

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Add SPI to handle animated resize
https://bugs.webkit.org/show_bug.cgi?id=131141

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

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

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


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