WebKit-https.git
5 years agoWebKit delegate methods should document their default behaviors
ggaren@apple.com [Fri, 20 Jun 2014 22:10:37 +0000 (22:10 +0000)]
WebKit delegate methods should document their default behaviors
https://bugs.webkit.org/show_bug.cgi?id=134132

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:

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

5 years agoFix lots of WK2 test crashes.
simon.fraser@apple.com [Fri, 20 Jun 2014 22:06:11 +0000 (22:06 +0000)]
Fix lots of WK2 test crashes.

We don't always have a ScrollingCoordinator.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

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

5 years agoAlways use XPC on iOS
andersca@apple.com [Fri, 20 Jun 2014 22:05:04 +0000 (22:05 +0000)]
Always use XPC on iOS
https://bugs.webkit.org/show_bug.cgi?id=134130

Reviewed by Sam Weinig.

* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::platformGetLaunchOptions):
(WebKit::shouldUseXPC): Deleted.

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

5 years agoFix build.
andersca@apple.com [Fri, 20 Jun 2014 22:00:35 +0000 (22:00 +0000)]
Fix build.

* Shared/SessionState.cpp:

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

5 years agoAdd ArgumentEncoder support to PageState and friends
andersca@apple.com [Fri, 20 Jun 2014 21:55:19 +0000 (21:55 +0000)]
Add ArgumentEncoder support to PageState and friends
https://bugs.webkit.org/show_bug.cgi?id=134128

Reviewed by Andreas Kling.

Change the classes to structs, get rid of the constructors/destructors
and add encode member functions.

* Shared/SessionState.cpp:
(WebKit::HTTPBody::Element::encode):
(WebKit::HTTPBody::encode):
(WebKit::FrameState::encode):
(WebKit::PageState::encode):
(WebKit::HTTPBody::Element::Element): Deleted.
(WebKit::HTTPBody::Element::~Element): Deleted.
(WebKit::FrameState::FrameState): Deleted.
(WebKit::FrameState::~FrameState): Deleted.
(WebKit::PageState::PageState): Deleted.
(WebKit::PageState::~PageState): Deleted.
* Shared/SessionState.h:
(WebKit::HTTPBody::Element::type): Deleted.

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

5 years agoAdd encoding and decoding support for WTF::Optional
andersca@apple.com [Fri, 20 Jun 2014 21:36:36 +0000 (21:36 +0000)]
Add encoding and decoding support for WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=134125

Reviewed by Andreas Kling.

Source/WebKit2:
* Platform/IPC/ArgumentCoders.h:
(IPC::ArgumentCoder<WTF::Optional<T>>::encode):
(IPC::ArgumentCoder<WTF::Optional<T>>::decode):

Source/WTF:
* wtf/Optional.h:
(WTF::Optional::operator=):

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

5 years agoRemoving dead code in platform/graphics/gpu
mmaxfield@apple.com [Fri, 20 Jun 2014 21:21:00 +0000 (21:21 +0000)]
Removing dead code in platform/graphics/gpu
https://bugs.webkit.org/show_bug.cgi?id=134065

Reviewed by Simon Fraser.

No new tests because there is no behavior change.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/gpu/LoopBlinnClassifier.cpp: Removed.
* platform/graphics/gpu/LoopBlinnClassifier.h: Removed.
* platform/graphics/gpu/LoopBlinnConstants.h: Removed.
* platform/graphics/gpu/LoopBlinnLocalTriangulator.cpp: Removed.
* platform/graphics/gpu/LoopBlinnLocalTriangulator.h: Removed.
* platform/graphics/gpu/LoopBlinnMathUtils.cpp: Removed.
* platform/graphics/gpu/LoopBlinnMathUtils.h: Removed.
* platform/graphics/gpu/LoopBlinnPathCache.cpp: Removed.
* platform/graphics/gpu/LoopBlinnPathCache.h: Removed.
* platform/graphics/gpu/LoopBlinnPathProcessor.h: Removed.
* platform/graphics/gpu/LoopBlinnShader.cpp: Removed.
* platform/graphics/gpu/LoopBlinnShader.h: Removed.
* platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: Removed.
* platform/graphics/gpu/LoopBlinnSolidFillShader.h: Removed.
* platform/graphics/gpu/LoopBlinnTextureCoords.cpp: Removed.
* platform/graphics/gpu/LoopBlinnTextureCoords.h: Removed.
* platform/graphics/gpu/Shader.cpp: Removed.
* platform/graphics/gpu/Shader.h: Removed.
* platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
* platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
* platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
* platform/graphics/gpu/opencl/FilterContextOpenCL.cpp: Removed.
* platform/graphics/gpu/opencl/FilterContextOpenCL.h: Removed.
* platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp: Removed.
* platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Removed.
* platform/graphics/gpu/opencl/OpenCLFEImage.cpp: Removed.
* platform/graphics/gpu/opencl/OpenCLFEMerge.cpp: Removed.
* platform/graphics/gpu/opencl/OpenCLFESourceAlpha.cpp: Removed.
* platform/graphics/gpu/opencl/OpenCLFESourceGraphic.cpp: Removed.
* platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp: Removed.
* platform/graphics/gpu/opencl/OpenCLHandle.h: Removed.

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

5 years ago[iOS] Support Khmer and Lao fallback fonts
mmaxfield@apple.com [Fri, 20 Jun 2014 21:17:39 +0000 (21:17 +0000)]
[iOS] Support Khmer and Lao fallback fonts
https://bugs.webkit.org/show_bug.cgi?id=134114

Reviewed by Enrica Casucci.

Source/WebCore:
iOS has fonts which have glyphs for the Khmer and Lao languages.

This patch also does a little refactoring of the language-specific fallback
font path to increase readability.

Test: fast/text/khmer-lao-font.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::languageSpecificFallbackFont):
(WebCore::FontCache::systemFallbackForCharacters):

LayoutTests:
Simply dump the render tree of a page that includes Khmer and Lao text. The success
of this test depends on font font metrics being different than system fallback font
(which just shows rectangles instead of glyphs).

* fast/text/khmer-lao-font.html: Added.
* platform/ios-sim/fast/text/khmer-lao-font-expected.txt: Added.
* platform/mac/fast/text/khmer-lao-font-expected.txt: Added.

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

5 years agoUnreviewed. Adding myself to committers.
jfernandez@igalia.com [Fri, 20 Jun 2014 21:08:37 +0000 (21:08 +0000)]
Unreviewed. Adding myself to committers.

* Scripts/webkitpy/common/config/contributors.json:

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

5 years agoGive NPAPI post requests a default content type
andersca@apple.com [Fri, 20 Jun 2014 21:03:37 +0000 (21:03 +0000)]
Give NPAPI post requests a default content type
https://bugs.webkit.org/show_bug.cgi?id=134120

Reviewed by Andreas Kling.

Source/WebCore:
* WebCore.exp.in:

Source/WebKit2:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):

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

5 years agoAlways commit the scrolling tree when we flush layers
simon.fraser@apple.com [Fri, 20 Jun 2014 21:00:53 +0000 (21:00 +0000)]
Always commit the scrolling tree when we flush layers
https://bugs.webkit.org/show_bug.cgi?id=134115

Reviewed by Beth Dakin.

The scrolling state tree contains bare pointers to GraphicsLayers, which get
converted to CALayers at commit time. To avoid a window of time where those
GraphicsLayer pointers go stale, commit the scrolling tree whenever we flush the
compositing layer tree.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

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

5 years agoREGRESSION (r169972): fix issue when removing masks from compositing layers
simon.fraser@apple.com [Fri, 20 Jun 2014 20:56:16 +0000 (20:56 +0000)]
REGRESSION (r169972): fix issue when removing masks from compositing layers
https://bugs.webkit.org/show_bug.cgi?id=134118
<rdar://problem/17366654>

Reviewed by Dean Jackson.

Source/WebCore:
After r169972 when removing the mask, we could destroy the mask
layer before the call into m_graphicsLayer->setMaskLayer(), which would
try to call functions on the old mask. Fix by clearing the mask layer
on the GraphicsLayer before the mask layer gets destroyed.

Test: compositing/masks/toggle-mask.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateMaskLayer):
* rendering/RenderLayerBacking.h:

LayoutTests:
Test that toggles the mask on a composited element.

* compositing/masks/toggle-mask-expected.txt: Added.
* compositing/masks/toggle-mask.html: Added.

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

5 years agoAdd copy/move constructors and assignment operators to WTF::Optional
andersca@apple.com [Fri, 20 Jun 2014 20:54:57 +0000 (20:54 +0000)]
Add copy/move constructors and assignment operators to WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=134119

Reviewed by Andreas Kling.

* wtf/Optional.h:
(WTF::Optional::Optional):
(WTF::Optional::operator=):

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

5 years ago[Cocoa] Release freed up blocks from the JS heap after simulated memory pressure.
akling@apple.com [Fri, 20 Jun 2014 20:48:13 +0000 (20:48 +0000)]
[Cocoa] Release freed up blocks from the JS heap after simulated memory pressure.
<https://webkit.org/b/134112>

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:
* heap/BlockAllocator.h:

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

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

5 years agoRemove redundant RenderLayer::computeOffsetFromRoot() function.
zalan@apple.com [Fri, 20 Jun 2014 20:36:44 +0000 (20:36 +0000)]
Remove redundant RenderLayer::computeOffsetFromRoot() function.
https://bugs.webkit.org/show_bug.cgi?id=134088

Reviewed by Benjamin Poulain.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::computeOffsetFromRoot): Deleted.
* rendering/RenderLayer.h:

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

5 years agoUnreviewed. Adding myself to committers.
utatane.tea@gmail.com [Fri, 20 Jun 2014 20:22:50 +0000 (20:22 +0000)]
Unreviewed. Adding myself to committers.

* Scripts/webkitpy/common/config/contributors.json:

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

5 years ago[iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord...
simon.fraser@apple.com [Fri, 20 Jun 2014 19:16:30 +0000 (19:16 +0000)]
[iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
https://bugs.webkit.org/show_bug.cgi?id=134085

Source/WebCore:
<rdar://problem/16440586>

Reviewed by Tim Horton.

When nodes were detached from the scrolling tree, we would previously throw away
all descendant nodes, expecting that they would be re-attached as we walk the compositing
layer tree in RenderLayerCompositor.

However, this doesn't work across frame boundaries; the subframe may never update
its compositing layers again, so would lose all its scrolling nodes.

Fix by having ScrollingStateTree::detachNode() by default set aside subframe nodes
into a hash map. On reattach, we'll look in the hash map and pull out an existing node
(with its children intact) if possible.

Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html
       platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html
       platform/mac-wk2/tiled-drawing/scrolling/frames/remove-coordinated-frame.html

* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::detachNode):
(WebCore::ScrollingStateTree::clear):
(WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
(WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
* page/scrolling/ScrollingStateTree.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitNewTreeState): Go back to removing the deleted
nodes from m_nodeMap first.
(WebCore::ScrollingTree::removeDestroyedNodes): There is no need for this to
actually make use of ScrollingTreeNode* any more; the ASSERT(!node->parent())
is bogus because it can fire when whole subtrees are removed, and to clear the
latched node we just need the ID.

Source/WebKit2:
<rdar://problem/16440586>

Reviewed by Tim Horton.

Add some debug-only assertions that check that the number of nodes we encoded is
the expected number.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::encode):

LayoutTests:

Reviewed by Tim Horton.

Tests that add and remove a fixed container of a scroll-coordinated iframe.

* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/remove-coordinated-frame.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/resources/doc-with-sticky.html:

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

5 years agoHandle scrolling tree modifications which remove intermediate nodes
simon.fraser@apple.com [Fri, 20 Jun 2014 19:14:50 +0000 (19:14 +0000)]
Handle scrolling tree modifications which remove intermediate nodes
https://bugs.webkit.org/show_bug.cgi?id=134082

Reviewed by Tim Horton.

When updating the scrolling tree from the state tree, we failed to maintain
the children arrays correctly. Fix by removing all children on scrolling nodes,
and allowing the calls on children to add them back. A temporary hash map
keeps the nodes alive.

The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
to make it easier to handle removal followed by re-insertion.

Source/WebCore:
* WebCore.exp.in:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode): If a node is (possibly re-)added,
remove it from m_nodesRemovedSinceLastCommit.remove.
(WebCore::ScrollingStateTree::willRemoveNode):
(WebCore::ScrollingStateTree::setRemovedNodes):
* page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::removedNodes):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitNewTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNode): Clean up to have only one call
to updateBeforeChildren(), and remove all children from the scrolling node
before visiting state children.
(WebCore::ScrollingTree::removeDestroyedNodes): It was very wrong to assume
that all non-root nodes were parented in the root! Now we don't need to
remove from the parent anyway.
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::children):

Source/WebKit2:
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):

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

5 years agoMake ScrollingTreeNodes refounted, for easier tree reconfiguration
simon.fraser@apple.com [Fri, 20 Jun 2014 19:14:47 +0000 (19:14 +0000)]
Make ScrollingTreeNodes refounted, for easier tree reconfiguration
https://bugs.webkit.org/show_bug.cgi?id=134075

Reviewed by Tim Horton.

Make ScrollingTreeNode be ref-counted.

Source/WebCore:
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::handleWheelEvent):
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::rootNode):
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::appendChild):
* page/scrolling/ScrollingTreeNode.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::createNode):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::createNode):
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::create):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::create):
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::create):

Source/WebKit2:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createNode):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::createScrollingTreeNode):

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

5 years ago[Cocoa] No way to get the MIME type of the main frame
mitz@apple.com [Fri, 20 Jun 2014 19:05:55 +0000 (19:05 +0000)]
[Cocoa] No way to get the MIME type of the main frame
https://bugs.webkit.org/show_bug.cgi?id=134111

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _MIMEType]): Added. Returns the MIME type of the main frame, or nil.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

5 years agoMake WebKit2 more accessible in MiniBrowser
timothy_horton@apple.com [Fri, 20 Jun 2014 18:32:59 +0000 (18:32 +0000)]
Make WebKit2 more accessible in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=134099

Reviewed by Anders Carlsson.

* MiniBrowser/mac/AppDelegate.h:
* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate newWindow:]):
(-[BrowserAppDelegate applicationDidFinishLaunching:]):
(-[BrowserAppDelegate toggleUseWebKit2ByDefault:]):
(-[BrowserAppDelegate _useWebKit2ByDefault]):
(-[BrowserAppDelegate _updateNewWindowKeyEquivalents]):
(-[BrowserAppDelegate validateMenuItem:]):
* MiniBrowser/mac/MainMenu.xib:
Add a "Use WebKit2 By Default" menu item to the top of the Debug menu.
When switched on, Cmd-N will make WebKit2 windows (and the default window will be WebKit2).
Make the non-default new-window menu item always show up, because people often don't find it
when you have to press option to have it show up.

* MiniBrowser/mac/BrowserWindowController.h:
* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController initWithWindow:]):

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController validateMenuItem:]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController validateMenuItem:]):
Use the cached [menuItem action] like the earlier cases do.

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

5 years agoiOS build fix after http://trac.webkit.org/changeset/170167.
enrica@apple.com [Fri, 20 Jun 2014 18:29:20 +0000 (18:29 +0000)]
iOS build fix after trac.webkit.org/changeset/170167.

Reviewed by Geoff Garen.

* bindings/js/JSDeviceMotionEventCustom.cpp:
* bindings/js/JSDeviceOrientationEventCustom.cpp:

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

5 years ago[iOS]: Overrelease of RetainPtr object in file upload
joepeck@webkit.org [Fri, 20 Jun 2014 17:58:13 +0000 (17:58 +0000)]
[iOS]: Overrelease of RetainPtr object in file upload
https://bugs.webkit.org/show_bug.cgi?id=134072

Reviewed by Brady Eidson.

This ivar is a RetainPtr, the release will be done automatically
for us when we assign to nil or destruct.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView fileUploadPanelDidDismiss:]):

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

5 years agoBegin stubbing out new session state classes
andersca@apple.com [Fri, 20 Jun 2014 17:57:45 +0000 (17:57 +0000)]
Begin stubbing out new session state classes
https://bugs.webkit.org/show_bug.cgi?id=134110

Reviewed by Geoffrey Garen.

The basic idea is that these classes will replace the data blobs representing HistoryItems
that we currently send back and forth between the web and UI processes.

* Shared/SessionState.cpp: Added.
(WebKit::HTTPBody::Element::Element):
(WebKit::HTTPBody::Element::~Element):
(WebKit::FrameState::FrameState):
(WebKit::FrameState::~FrameState):
(WebKit::PageState::PageState):
(WebKit::PageState::~PageState):
* Shared/SessionState.h: Added.
(WebKit::HTTPBody::Element::type):
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoEnable synchronous willSendRequest on iOS
psolanki@apple.com [Fri, 20 Jun 2014 17:25:06 +0000 (17:25 +0000)]
Enable synchronous willSendRequest on iOS
https://bugs.webkit.org/show_bug.cgi?id=134081
<rdar://problem/17350927>

Reviewed by Andreas Kling.

We lost the call to make willSendrequest callbacks be synchronous if possible during code
refactoring. The call is present in ResourceHandleMac.mm but that code is not called when
we use the CFNetwork based loader. Call the SPI in setupRequest().

No new tests because existing tests should cover this functionality.

* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):

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

5 years agoTeach run-{safari, webkit-app} about iOS Simulator
dbates@webkit.org [Fri, 20 Jun 2014 17:20:48 +0000 (17:20 +0000)]
Teach run-{safari, webkit-app} about iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=133986

Reviewed by David Kilzer.

Extract the logic from old-run-webkit-tests to install and launch {DumpRenderTree, WebKitTestRunnerApp}.app
into general-purpose routines in webkitdirs.pm so that they can be used both by script old-run-webkit-tests
and run-safari.

* Scripts/old-run-webkit-tests:
(installAndLaunchDumpToolAppUsingNotification): Extracted logic to install and launch {DumpRenderTree,
WebKitTestRunnerApp}.app into webkitdirs::installAndLaunchIOSWebKitAppInSimulator() and modified code
to call it.
(openIPhoneSimulator): Deleted; moved logic to webkitdirs::openIOSSimulator().
(quitIPhoneSimulator): Deleted; moved logic to webkitdirs::quitIOSSimulator().
* Scripts/run-webkit-app: Modified to call runIOSWebKitApp() when the iOS simulator SDK is used
(say, by specifying the optional command-line argument --simulator). For now, die() with an error
when the iOS device SDK is used as we don't support launching an app on the device at this time.
* Scripts/webkitdirs.pm:
(xcodeSDKVersion): Added.
(setupIOSWebKitEnvironment): Added.
(installedMobileSafariBundle): Added.
(mobileSafariBundle): Added.
(plistPathFromBundle): Added.
(appIdentiferFromBundle): Added.
(appDisplayNameFromBundle): Added.
(loadIPhoneSimulatorNotificationIfNeeded): Added.
(openIOSSimulator): Added.
(quitIOSSimulator): Added.
(iosSimulatorDeviceByName): Added.
(iosSimulatorRuntime): Added.
(findOrCreateSimulatorForIOSDevice): Added.
(runIOSWebKitAppInSimulator): Added.
(installAndLaunchIOSWebKitAppInSimulator): Added.
(runIOSWebKitApp): Added.
(runSafari): Modified to call runIOSWebKitAppInSimulator() the iOS simulator SDK is used. For now,
die() with an error when the iOS device SDK is used as we don't support launching Safari on the
device at this time.

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

5 years agoRename SessionState to LegacySessionState
andersca@apple.com [Fri, 20 Jun 2014 17:16:37 +0000 (17:16 +0000)]
Rename SessionState to LegacySessionState
https://bugs.webkit.org/show_bug.cgi?id=134107

Reviewed by Dan Bernstein.

* Shared/LegacySessionState.cpp: Renamed from Source/WebKit2/Shared/SessionState.cpp.
(IPC::ArgumentCoder<RefPtr<T>>::encode):
(IPC::ArgumentCoder<RefPtr<T>>::decode):
(WebKit::LegacySessionState::LegacySessionState):
(WebKit::LegacySessionState::isEmpty):
(WebKit::LegacySessionState::encode):
(WebKit::LegacySessionState::decode):
* Shared/LegacySessionState.h: Renamed from Source/WebKit2/Shared/SessionState.h.
(WebKit::LegacySessionState::list):
(WebKit::LegacySessionState::currentIndex):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):
(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoAdd WTF::Optional class
andersca@apple.com [Fri, 20 Jun 2014 16:35:36 +0000 (16:35 +0000)]
Add WTF::Optional class
https://bugs.webkit.org/show_bug.cgi?id=134083

Reviewed by Andreas Kling.

Source/WTF:
* WTF.xcodeproj/project.pbxproj:
* wtf/Optional.h: Added.
(WTF::Optional::Optional):
(WTF::Optional::~Optional):
(WTF::Optional::operator bool):
(WTF::Optional::value):

Tools:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/Optional.cpp: Added.
(TestWebKitAPI::TEST):

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

5 years agoAdding myself to Commiters list.
rosca@adobe.com [Fri, 20 Jun 2014 15:39:24 +0000 (15:39 +0000)]
Adding myself to Commiters list.

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

5 years agoDocument the underlying types of the WKWindowFeatures rect properties
andersca@apple.com [Fri, 20 Jun 2014 13:47:04 +0000 (13:47 +0000)]
Document the underlying types of the WKWindowFeatures rect properties
https://bugs.webkit.org/show_bug.cgi?id=134103

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWindowFeatures.h:

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

5 years ago[GTK] Do not build quota files when QUOTA is disabled
carlosgc@webkit.org [Fri, 20 Jun 2014 10:24:06 +0000 (10:24 +0000)]
[GTK] Do not build quota files when QUOTA is disabled
https://bugs.webkit.org/show_bug.cgi?id=134101

Reviewed by Philippe Normand.

* CMakeLists.txt: Remove exception for GTK+ that is no longer
required since r170173.
* PlatformGTK.cmake: Generate GObject DOM bindings for Quota when enabled.

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

5 years agoPluginProcessMainUnix should only scan for plugins when X11 plugin architecture is...
zandobersek@gmail.com [Fri, 20 Jun 2014 08:49:31 +0000 (08:49 +0000)]
PluginProcessMainUnix should only scan for plugins when X11 plugin architecture is enabled
https://bugs.webkit.org/show_bug.cgi?id=134098

Reviewed by Carlos Garcia Campos.

* PluginProcess/unix/PluginProcessMainUnix.cpp: Guard the call to NetscapePluginModule::scanPlugin()
with PLUGIN_ARCHITECTURE(X11) since the declaration has the same build guard. In case the X11 plugin
architecture is not enabled the program exits with EXIT_FAILURE.

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

5 years ago[CSS Grid Layout] Add GridSpan::iterator
rego@igalia.com [Fri, 20 Jun 2014 08:28:59 +0000 (08:28 +0000)]
[CSS Grid Layout] Add GridSpan::iterator
https://bugs.webkit.org/show_bug.cgi?id=134058

Reviewed by Bem Jones-Bey.

Once that GridResolvedPosition has been introduced in r169934, this
patch adds a GridSpan::iterator which allows to simplify the loops over
GridResolvedPositions.
From now on we could use range-based for loops.

No new tests as it is already covered by current tests
(fast/css-grid-layout/).

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeNormalizedFractionBreadth): Change loop to
ranged-based for.
(WebCore::RenderGrid::insertItemIntoGrid): Ditto.
(WebCore::RenderGrid::gridAreaBreadthForChild): Ditto.
* rendering/style/GridCoordinate.h: Define GridSpan::iterator.
(WebCore::GridSpan::begin): Return resolved initial position.
(WebCore::GridSpan::end): Return next to resolved final position.
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::operator*): Add operator required by
range-based for loops.
(WebCore::GridResolvedPosition::operator!=): Add not equal operator.

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

5 years ago[EFL] Add gstreamer as dependecy of EFL after r169785
ossy@webkit.org [Fri, 20 Jun 2014 07:55:37 +0000 (07:55 +0000)]
[EFL] Add gstreamer as dependecy of EFL after r169785
https://bugs.webkit.org/show_bug.cgi?id=134066

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-06-20
Reviewed by Gyuyoung Kim.

* efl/jhbuild.modules:

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

5 years agoUnreviewed. Fix GTK+ debug build after r170174.
carlosgc@webkit.org [Fri, 20 Jun 2014 07:35:36 +0000 (07:35 +0000)]
Unreviewed. Fix GTK+ debug build after r170174.

* bindings/gobject/WebKitDOMNodeFilter.cpp:
(WebKit::nodeFilterObjectDestroyedCallback):

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

5 years agoLayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context...
timothy_horton@apple.com [Fri, 20 Jun 2014 07:33:58 +0000 (07:33 +0000)]
LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
https://bugs.webkit.org/show_bug.cgi?id=134050
<rdar://problem/17315114>

Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::layerPool):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
(WebKit::RemoteLayerTreeContext::layerPool):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::buildTransaction):
Ensure that layers being committed are always in the context that is committing them.
Use a LayerPool per RemoteLayerTreeContext, to avoid moving layers between contexts.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory):
Drain all LayerPools upon memory pressure.

* platform/graphics/ca/LayerPool.cpp:
(WebCore::LayerPool::LayerPool):
(WebCore::LayerPool::~LayerPool):
(WebCore::LayerPool::allLayerPools):
(WebCore::LayerPool::sharedPool): Deleted.
* platform/graphics/ca/LayerPool.h:
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::createCompatibleLayerWithSize):
Add createCompatibleLayerWithSize, which optionally tries to take said layer from the LayerPool.

(WebCore::PlatformCALayer::moveToLayerPool):
Add moveToLayerPool, which moves the layer to the LayerPool.

(WebCore::PlatformCALayer::layerPool):
The LayerPool for each layer is obtained via PlatformCALayer::layerPool(), which subclasses can override for special behaviors.
The base class uses a global LayerPool.

* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::createTileLayer):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::removeTiles):

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

5 years agoWKContentViewInteraction isn't cleaned up when the Web Content process crashes
timothy_horton@apple.com [Fri, 20 Jun 2014 07:31:04 +0000 (07:31 +0000)]
WKContentViewInteraction isn't cleaned up when the Web Content process crashes
https://bugs.webkit.org/show_bug.cgi?id=134080
<rdar://problem/17387652> and <rdar://problem/16848360>

Reviewed by Benjamin Poulain.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _processDidExit]):
Tear down WKContentViewInteraction when the process crashes.

(-[WKContentView _didRelaunchProcess]):
Set WKContentViewInteraction back up when the process is relaunched.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
Clear the SmartMagnificationController, which is a message receiver and thus must be re-created with the new page.
Remove all gesture recognizers from the content view.
Clear _fileUploadPanel, else we'll get an assert the next time we try to open one.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Give the PageClient a chance to clean up *before* we clean up internals;
it is at a higher level and some cleanup depends on WebPageProxy members
not having been cleared yet.

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

5 years ago[EFL] Merge url_utils.c to MiniBrowser
ryuan.choi@samsung.com [Fri, 20 Jun 2014 07:10:34 +0000 (07:10 +0000)]
[EFL] Merge url_utils.c to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=134095

Reviewed by Csaba Osztrogonác.

url_utils.c is simple code to share between EWebLauncher and MiniBrowser.
This patch removes the dependency of url_utils.c from MiniBrowser to drop WebKit1 EFL port.

* MiniBrowser/efl/CMakeLists.txt:
Remove the EWebLauncher/ from the includes and url_utils.h from the source lists.
* MiniBrowser/efl/main.c:
(has_scheme): Copied from url_utils.c
(url_from_user_input): Ditto.

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

5 years agoFix webkitpy tests after EFL WK1 buildbot and EWS removal - r170172.
ossy@webkit.org [Fri, 20 Jun 2014 07:00:42 +0000 (07:00 +0000)]
Fix webkitpy tests after EFL WK1 buildbot and EWS removal - r170172.

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-06-19
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_gtk_wk2_port):
(DeprecatedPortTest.test_efl_port): Deleted.
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.test_determine_port_from_expectations_path):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(TestRebaselineExpectations.test_rebaseline_expectations):

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

5 years ago[EFL][CMAKE] Disable WebKit1 build as a default
ryuan.choi@samsung.com [Fri, 20 Jun 2014 06:52:03 +0000 (06:52 +0000)]
[EFL][CMAKE] Disable WebKit1 build as a default
https://bugs.webkit.org/show_bug.cgi?id=134093

Reviewed by Gyuyoung Kim.

.:
Disable WebKit1 build and enable WebKit2 build for the EFL port.

* Source/cmake/OptionsEfl.cmake:

Tools:
* CMakeLists.txt:

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

5 years ago[GTK] webkit_dom_document_create_tree_walker impossible to use due to WebKitDOMNodeFilter
carlosgc@webkit.org [Fri, 20 Jun 2014 06:44:16 +0000 (06:44 +0000)]
[GTK] webkit_dom_document_create_tree_walker impossible to use due to WebKitDOMNodeFilter
https://bugs.webkit.org/show_bug.cgi?id=93002

Reviewed by Gustavo Noronha Silva.

Source/WebCore:
Add custom implementation of WebKitDOMNodeFilter to expose it as
an interface instead of a class.

* PlatformGTK.cmake: Add new files to compilation.
* bindings/gobject/GObjectNodeFilterCondition.cpp: Added.
(WebCore::GObjectNodeFilterCondition::~GObjectNodeFilterCondition):
Reset the NodeFilter WebCore object associated to the
WebKitDOMNodeFilter object.
(WebCore::GObjectNodeFilterCondition::acceptNode): Call webkit_dom_node_filter_accept_node().
* bindings/gobject/GObjectNodeFilterCondition.h: Added.
(WebCore::GObjectNodeFilterCondition::create): Create a new
GObjectNodeFilterCondition for the given WebKitDOMNodeFilter.
(WebCore::GObjectNodeFilterCondition::GObjectNodeFilterCondition):
* bindings/gobject/WebKitDOMNodeFilter.cpp: Added.
(webkit_dom_node_filter_default_init):
(webkit_dom_node_filter_accept_node):
(WebKit::nodeFilterMap): Map NodeFilter WebCore objects to
WebKitDOMNodeFilter objects.
(WebKit::nodeFilterObjectDestroyedCallback): Remove the node
filter form the map when the WebKitDOMNodeFilter objecrt is destroyed.
(WebKit::kit): Return the WebKitDOMNodeFilter object for the given
NodeFilter WebCore object.
(WebKit::core): Get or create a NodeFilter WebCore object
associated to the given WebKitDOMNodeFilter.
* bindings/gobject/WebKitDOMNodeFilter.h: Added.
* bindings/gobject/WebKitDOMNodeFilter.symbols: Added.
* bindings/gobject/WebKitDOMNodeFilterPrivate.h: Added.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Add exceptions for NodeFilter parameters since
the core method returns a PassRefPtr.

Tools:
Add unit tests to check WebKitDOMNodefilter API used from both
TreeWalker and NodeIterator.

* Scripts/webkitpy/style/checker.py: Add exceptions for GTK+
public headers and add WebKitDOMNodeFilter to the list of exceptions.
* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Add new files to compilation.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeFilterTest.cpp: Added.
(webkitNodeFilterAcceptNode):
(webkitNodeFilterDOMNodeFilterIfaceInit):
(webkit_node_filter_init):
(webkit_node_filter_class_init):
(WebKitDOMNodeFilterTest::create):
(WebKitDOMNodeFilterTest::webPageFromArgs):
(WebKitDOMNodeFilterTest::testTreeWalker):
(WebKitDOMNodeFilterTest::testNodeIterator):
(WebKitDOMNodeFilterTest::runTest):
(registerTests):
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNodeFilter.cpp: Added.
(runTest):
(testWebKitDOMNodeFilterTreeWalker):
(testWebKitDOMNodeFilterNodeIterator):
(beforeAll):
(afterAll):
* gtk/webkitdom.py:
(WebKitDOMDocGeneratorSections.__init__):
(WebKitDOMDocGeneratorSections._symbol_list):
(WebKitDOMDocGeneratorSections.write_section):

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

5 years ago[GTK] Limit the amount of API exposed to GObject DOM bindings API
carlosgc@webkit.org [Fri, 20 Jun 2014 06:24:06 +0000 (06:24 +0000)]
[GTK] Limit the amount of API exposed to GObject DOM bindings API
https://bugs.webkit.org/show_bug.cgi?id=133726

Reviewed by Gustavo Noronha Silva.

Source/WebCore:
Split the GObject DOM bindings API into stable and unstable. The
unstable API is not included in the main webkitdom.h file, so that
to use it users have to include the headers individually and
define a macro WEBKIT_DOM_USE_UNSTABLE_API. For unstable methods
of stable classes we generate a {ClassName}Unstable.h header file
containing the unstable API. From now on we only keep backwards
compatibility for the stable API.

* PlatformGTK.cmake: Split GObject DOM bindings related variables
into Stable and Unstable. Add also
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_media_element_set_current_time): Deleted.
(webkit_dom_text_track_get_kind): Deleted.
(webkit_dom_text_track_get_mode): Deleted.
(webkit_dom_text_track_set_mode): Deleted.
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols: Remove custom symbols
added due to API changes.
* bindings/gobject/WebKitDOMPrivate.h: Include webkitdomdefines-unstable.h.
* bindings/gobject/webkitdom.symbols: Remove all unstable symbols.
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Do not skip webkit_dom_html_media_element_set_current_time anymore.
(GenerateHeader): Only force single header include for stable
headers and add WEBKIT_DOM_USE_UNSTABLE_API #ifdef to unstable headers.
(GenerateFunction): Only add stable symbols to the symbols
array. Add function prototypes to main header or unstable header
depending on whether it's an unstable symbol for a stable class or
not. Also add Stability gtk-doc tag to unstable methods.
(GenerateEndHeader): Add required #endifs
(WriteData): Write also an Unstable.h header when appropriate and
only generate a symbols file for stable classes.
(ReadStableSymbols): Read the stable symbols for the current class.
(GenerateInterface): Call ReadStableSymbols.
* bindings/scripts/gobject-generate-headers.pl: Generate webkitdomdefines-unstable.h.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
* bindings/scripts/test/GObject/WebKitDOMTestException.h:
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
* bindings/scripts/test/GObject/WebKitDOMTestNode.h:
* bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/GObject/WebKitDOMattribute.h:
* bindings/scripts/test/GObject/WebKitDOMreadonly.h:

Tools:
Don't make fatal finding files without a .symbols file, since now
only the stable DOM API has .symbols files.

* gtk/webkitdom.py:
(get_all_webkitdom_symbol_files):

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

5 years agoRemove efl wk1 buildbot and ews
gyuyoung.kim@samsung.com [Fri, 20 Jun 2014 02:56:44 +0000 (02:56 +0000)]
Remove efl wk1 buildbot and ews
https://bugs.webkit.org/show_bug.cgi?id=134089

Reviewed by Benjamin Poulain.

EFL WK1 is not supported anymore. Removed all bots for EFL WK1 bots.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* QueueStatusServer/config/queues.py:
* Scripts/webkitpy/common/config/ews.json:
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(QtWK2Port.run_webkit_tests_command):
(EflPort): Deleted.
(EflPort.build_webkit_command): Deleted.
* Scripts/webkitpy/port/builders.py:
* TestResultServer/static-dashboards/flakiness_dashboard.js:
* TestResultServer/static-dashboards/loader_unittests.js:

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

5 years agoUnreviewed fix after r170130.
achristensen@apple.com [Fri, 20 Jun 2014 02:12:48 +0000 (02:12 +0000)]
Unreviewed fix after r170130.

* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.vcxproj:
Corrected directory so it can find common.props when opening Visual Studio.

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

5 years agoRemoved unused SPI -[WKWebView _runJavaScriptInMainFrame:].
mitz@apple.com [Fri, 20 Jun 2014 01:39:18 +0000 (01:39 +0000)]
Removed unused SPI -[WKWebView _runJavaScriptInMainFrame:].

Rubber-stamped by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _runJavaScriptInMainFrame:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

5 years agoWhen simulating memory pressure, GC *after* releasing WebCore resources.
akling@apple.com [Fri, 20 Jun 2014 01:31:25 +0000 (01:31 +0000)]
When simulating memory pressure, GC *after* releasing WebCore resources.

Since clearing the page cache is likely to create lots of garbage, defer the
synchronous GC until after the WebCore pressure relief, so we can see the
effect of clearing out all those pages.

Rubber-stamped by Gavin Barraclough.

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

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

5 years agoUse a single map for all callback types in WebPageProxy
mitz@apple.com [Fri, 20 Jun 2014 00:49:16 +0000 (00:49 +0000)]
Use a single map for all callback types in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=134069

Reviewed by Tim Horton.

* UIProcess/GenericCallback.h:
(WebKit::CallbackMap::take):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::printFinishedCallback):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::drawPagesForPrinting):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):

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

5 years agoMove generate prototype and constructor classes into the generated implementation...
weinig@apple.com [Thu, 19 Jun 2014 23:42:24 +0000 (23:42 +0000)]
Move generate prototype and constructor classes into the generated implementation files
https://bugs.webkit.org/show_bug.cgi?id=134054

Reviewed by Oliver Hunt.

In an effort to reduce the size of the generated bindings headers, which is important
as the generated headers get included in a lot of places, this patch moves the prototype
and constructor declarations from the header to implementation file. This works because,
for the most part, no code cares about the prototype or constructors except the instance.

There are a few exceptions which had to be accounted for:
- The global objects (JSDOMWindow and JSWorkerGlobalScope) need to have their prototypes
  available during initialization, so they remain in the header.
- JSLocation requires customizing some aspects of the prototype behavior, so its prototype,
  and any future class that uses JSCustomNamedGetterOnPrototype or JSCustomDefineOwnPropertyOnPrototype,
  remains in the header.
- A few classes had custom constructor functions. Instead of keeping the entire constructor
  in the header, I opted for pulling just the static constructor function into the header, and
  modifying the custom constructors to use the DOMConstructorObject type as the callee, since the
  more specific type was unnecessary.

As a result of making these changes, I was also able to remove the #include of JSDOMBinding.h from
all the headers, which brought in quite a bit.

* bindings/js/JSAudioContextCustom.cpp:
(WebCore::constructJSAudioContext):
(WebCore::JSAudioContextConstructor::constructJSAudioContext): Deleted.
* bindings/js/JSBlobCustom.cpp:
(WebCore::constructJSBlob):
(WebCore::JSBlobConstructor::constructJSBlob): Deleted.
* bindings/js/JSCryptoCustom.cpp:
* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::constructJSDOMFormData):
(WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): Deleted.
* bindings/js/JSDOMMimeTypeArrayCustom.cpp:
* bindings/js/JSDOMPluginArrayCustom.cpp:
* bindings/js/JSDOMPluginCustom.cpp:
* bindings/js/JSDataCueCustom.cpp:
(WebCore::constructJSDataCue):
(WebCore::JSDataCueConstructor::constructJSDataCue): Deleted.
* bindings/js/JSDataTransferCustom.cpp:
* bindings/js/JSEventCustom.cpp:
* bindings/js/JSFileReaderCustom.cpp:
* bindings/js/JSHistoryCustom.cpp:
* bindings/js/JSIDBAnyCustom.cpp:
* bindings/js/JSIDBDatabaseCustom.cpp:
* bindings/js/JSIDBObjectStoreCustom.cpp:
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::finishCreation):
* bindings/js/JSImageDataCustom.cpp:
* bindings/js/JSInspectorFrontendHostCustom.cpp:
* bindings/js/JSLocationCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::constructJSMutationObserver):
(WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Deleted.
* bindings/js/JSSQLResultSetRowListCustom.cpp:
* bindings/js/JSSQLTransactionSyncCustom.cpp:
* bindings/js/JSSVGLengthCustom.cpp:
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::constructJSSharedWorker):
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Deleted.
* bindings/js/JSStorageCustom.cpp:
* bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
* bindings/js/JSWebKitPointCustom.cpp:
(WebCore::constructJSWebKitPoint):
(WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): Deleted.
* bindings/js/JSWorkerCustom.cpp:
(WebCore::constructJSWorker):
(WebCore::JSWorkerConstructor::constructJSWorker): Deleted.
* bindings/js/SerializedScriptValue.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GeneratePrototypeDeclaration):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
(HeaderNeedsPrototypeDeclaration):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.cpp:
* bindings/scripts/test/JS/JSreadonly.h:

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

5 years agoAnother build fix attempt.
andersca@apple.com [Thu, 19 Jun 2014 22:57:03 +0000 (22:57 +0000)]
Another build fix attempt.

* Shared/API/Cocoa/WKFoundation.h:

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

5 years ago[iOS] Legacy processes are installed inside WebKit.framework
mitz@apple.com [Thu, 19 Jun 2014 22:50:04 +0000 (22:50 +0000)]
[iOS] Legacy processes are installed inside WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=134079

Reviewed by Anders Carlsson.

* Configurations/All.xcconfig: Exclude the legacy processes on iOS so they don’t get copied.
* Configurations/BaseLegacyProcess.xcconfig: Set SKIP_INSTALL to YES on iOS.

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

5 years agoIt's OS X, not OSX...
andersca@apple.com [Thu, 19 Jun 2014 22:23:05 +0000 (22:23 +0000)]
It's OS X, not OSX...

* Shared/API/Cocoa/WKFoundation.h:

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

5 years agoUnfreeze the layer tree on DidFirstVisuallyNonEmptyLayout
antti@apple.com [Thu, 19 Jun 2014 22:15:17 +0000 (22:15 +0000)]
Unfreeze the layer tree on DidFirstVisuallyNonEmptyLayout
https://bugs.webkit.org/show_bug.cgi?id=134073

Reviewed by Simon Fraser.

DidFirstLayout is too early and we usually get a blank page. This doesn't match the existing iOS behavior either.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):

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

5 years agoTry to fix the Mavericks build.
andersca@apple.com [Thu, 19 Jun 2014 22:04:54 +0000 (22:04 +0000)]
Try to fix the Mavericks build.

* Shared/API/Cocoa/WKFoundation.h:

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

5 years ago[Cocoa] Need SPI to determine if the WKWebView is displaying a standalone image
weinig@apple.com [Thu, 19 Jun 2014 20:54:21 +0000 (20:54 +0000)]
[Cocoa] Need SPI to determine if the WKWebView is displaying a standalone image
https://bugs.webkit.org/show_bug.cgi?id=134071

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isDisplayingStandaloneImageDocument]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

5 years agoUse a single map for all callback types in WebPageProxy
mitz@apple.com [Thu, 19 Jun 2014 19:59:14 +0000 (19:59 +0000)]
Use a single map for all callback types in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=134069

Reviewed by Anders Carlsson.

* UIProcess/GenericCallback.h:
(WebKit::CallbackBase::as): Added. Performs a dynamic cast to a specific callback type.
(WebKit::CallbackBase::CallbackBase): Added a type parameter, which is used to initialize
the new m_type member.
(WebKit::GenericCallback::GenericCallback): Pass the type to the base class constructor.
(WebKit::GenericCallback::type): Added. Returns a unique type.
(WebKit::GenericCallback::invalidate): Now virtual.

(WebKit::CallbackMap::put): Adds the callback to the map.
(WebKit::CallbackMap::take): Removes the callback from the map, and dynamically casts it to
the specified type.
(WebKit::CallbackMap::invalidate): Invalidates the map.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::validateCommand):
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
(WebKit::WebPageProxy::getSourceForFrame):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::getBytecodeProfile):
(WebKit::WebPageProxy::getSelectionOrContentsAsString):
(WebKit::WebPageProxy::getSelectionAsWebArchiveData):
(WebKit::WebPageProxy::getMainResourceDataOfFrame):
(WebKit::WebPageProxy::getResourceDataFromFrame):
(WebKit::WebPageProxy::getWebArchiveOfFrame):
(WebKit::WebPageProxy::forceRepaint):
(WebKit::WebPageProxy::clearLoadDependentCallbacks):
(WebKit::WebPageProxy::voidCallback):
(WebKit::WebPageProxy::dataCallback):
(WebKit::WebPageProxy::imageCallback):
(WebKit::WebPageProxy::stringCallback):
(WebKit::WebPageProxy::scriptValueCallback):
(WebKit::WebPageProxy::computedPagesCallback):
(WebKit::WebPageProxy::validateCommandCallback):
(WebKit::WebPageProxy::unsignedCallback):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::computePagesForPrinting):
(WebKit::WebPageProxy::drawRectToImage):
(WebKit::WebPageProxy::drawPagesToPDF):
(WebKit::WebPageProxy::getMarkedRangeAsync):
(WebKit::WebPageProxy::getSelectedRangeAsync):
(WebKit::WebPageProxy::characterIndexForPointAsync):
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
(WebKit::WebPageProxy::takeSnapshot):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::gestureCallback):
(WebKit::WebPageProxy::touchesCallback):
(WebKit::WebPageProxy::autocorrectionDataCallback):
(WebKit::WebPageProxy::dictationContextCallback):
(WebKit::WebPageProxy::autocorrectionContextCallback):
(WebKit::WebPageProxy::selectWithGesture):
(WebKit::WebPageProxy::updateSelectionWithTouches):
(WebKit::WebPageProxy::requestAutocorrectionData):
(WebKit::WebPageProxy::applyAutocorrection):
(WebKit::WebPageProxy::requestDictationContext):
(WebKit::WebPageProxy::requestAutocorrectionContext):
(WebKit::WebPageProxy::selectWithTwoTouches):

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

5 years agoNo way to handle HTTP Authentication with WKWebView
andersca@apple.com [Thu, 19 Jun 2014 19:51:11 +0000 (19:51 +0000)]
No way to handle HTTP Authentication with WKWebView
https://bugs.webkit.org/show_bug.cgi?id=134067
<rdar://problem/17317874>

Reviewed by Dan Bernstein.

Add a public webView:didReceiveAuthenticationChallenge:completionHandler: delegate method and get rid of the SPI.

* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):

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

5 years agoDon't kill the UIProcess until all local storage transactions have been committed.
roger_fong@apple.com [Thu, 19 Jun 2014 19:23:24 +0000 (19:23 +0000)]
Don't kill the UIProcess until all local storage transactions have been committed.
https://bugs.webkit.org/show_bug.cgi?id=134042.
<rdar://problem/16660724>.

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm: Add a listener for the application will terminate notification.
(-[WKView _applicationWillTerminate:]):
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/WebContext.cpp: Calls code in StorageManager to cleanup local storage transactions upon application termination.
(WebKit::WebContext::applicationWillTerminate):
* UIProcess/WebContext.h:

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::applicationWillTerminate):
Dispatch local storage cleanup task to background thread and make sure the UIProcess can't exit early.
* UIProcess/Storage/StorageManager.h:

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

5 years ago2014-06-19 Oliver Hunt <oliver@apple.com>
oliver@apple.com [Thu, 19 Jun 2014 18:56:25 +0000 (18:56 +0000)]
2014-06-19  Oliver Hunt  <oliver@apple.com>

        Switch to using the process parameters during initialisation
        to determine whether we hsould be using the network process.

        RS=Sam Weinig

        * WebProcess/cocoa/WebProcessCocoa.mm:
        (WebKit::WebProcess::platformInitializeWebProcess):

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

5 years agoCopy SharedBuffer data into IPC message directly
psolanki@apple.com [Thu, 19 Jun 2014 18:33:20 +0000 (18:33 +0000)]
Copy SharedBuffer data into IPC message directly
https://bugs.webkit.org/show_bug.cgi?id=133920

Reviewed by Anders Carlsson.

When data array callbacks are enabled, we currently merge all the CFDataRefs in SharedBuffer
into one contiguous memory buffer when creating IPC::DataReference. This patch creates a
subclass of DataReference that uses SharedBuffer::getSomeData() to copy the data directly
into the IPC message.

* NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
(WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::ArgumentEncoder::reserve): Added.
(IPC::ArgumentEncoder::grow):
* Platform/IPC/ArgumentEncoder.h:
* Platform/IPC/DataReference.cpp:
(IPC::SharedBufferDataReference::encode):
* Platform/IPC/DataReference.h:
(IPC::DataReference::~DataReference):

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

5 years ago[Curl] Compile errors related to http header field names.
commit-queue@webkit.org [Thu, 19 Jun 2014 17:53:17 +0000 (17:53 +0000)]
[Curl] Compile errors related to http header field names.
https://bugs.webkit.org/show_bug.cgi?id=134029

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-06-19
Reviewed by Brent Fulgham.

Http header field names should now be specified with an enum, not a string.

* platform/network/curl/MultipartHandle.cpp:
(WebCore::MultipartHandle::didReceiveResponse):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getProtectionSpace):

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

5 years agocheck-webkit-style does not understand Obj-C literal syntax for NSDictionary
ddkilzer@apple.com [Thu, 19 Jun 2014 17:48:25 +0000 (17:48 +0000)]
check-webkit-style does not understand Obj-C literal syntax for NSDictionary
<http://webkit.org/b/134061>

Reviewed by Dan Bernstein.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing): Ignore '@' immediately before '{'.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_spacing_before_braces): Add unit test for
'^{' block syntax and '@{' Objective-C liternal NSDitionary
syntax.

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

5 years agoPut the divider in the right place.
andersca@apple.com [Thu, 19 Jun 2014 17:41:24 +0000 (17:41 +0000)]
Put the divider in the right place.

* DerivedSources.make:

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

5 years agoAddress a review comment from Darin.
andersca@apple.com [Thu, 19 Jun 2014 17:41:21 +0000 (17:41 +0000)]
Address a review comment from Darin.

* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willLoadXHR):

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

5 years agoTry to fix Windows build.
andersca@apple.com [Thu, 19 Jun 2014 17:29:53 +0000 (17:29 +0000)]
Try to fix Windows build.

* WebFrame.h:

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

5 years agoSimplify two HistoryController member functions
andersca@apple.com [Thu, 19 Jun 2014 17:29:14 +0000 (17:29 +0000)]
Simplify two HistoryController member functions
https://bugs.webkit.org/show_bug.cgi?id=134064

Reviewed by Dan Bernstein.

Remove the FrameLoadType parameter from recursiveSetProvisionalItem,
use early returns and modern loops.

* loader/HistoryController.cpp:
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
* loader/HistoryController.h:

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

5 years agoRemove ENABLE(LLINT) and ENABLE(LLINT_C_LOOP) guards
dbatyai.u-szeged@partner.samsung.com [Thu, 19 Jun 2014 16:32:31 +0000 (16:32 +0000)]
Remove ENABLE(LLINT) and ENABLE(LLINT_C_LOOP) guards
https://bugs.webkit.org/show_bug.cgi?id=130389

Reviewed by Mark Lam.

Removed ENABLE(LLINT) since we always build with it, and changed ENABLE(LLINT_C_LOOP)
into !ENABLE(JIT) since they are mutually exclusive.

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

Source/JavaScriptCore:
* CMakeLists.txt:
* assembler/MacroAssemblerCodeRef.h:
(JSC::MacroAssemblerCodePtr::createLLIntCodePtr):
(JSC::MacroAssemblerCodeRef::createLLIntCodeRef):
* assembler/MaxFrameExtentForSlowPathCall.h:
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFromLLInt):
* bytecode/CodeBlock.cpp:
(JSC::dumpStructure):
(JSC::CodeBlock::printGetByIdCacheStatus):
(JSC::CodeBlock::printCallOp):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::unlinkCalls):
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::linkIncomingCall):
(JSC::CodeBlock::frameRegisterCount):
* bytecode/CodeBlock.h:
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
* bytecode/Opcode.h:
(JSC::padOpcodeName):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFromLLInt):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):
* heap/Heap.cpp:
(JSC::Heap::gatherJSStackRoots):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::initialize):
(JSC::Interpreter::isOpcode):
* interpreter/Interpreter.h:
(JSC::Interpreter::getOpcodeID):
* interpreter/JSStack.cpp:
(JSC::JSStack::JSStack):
(JSC::JSStack::committedByteCount):
* interpreter/JSStack.h:
* interpreter/JSStackInlines.h:
(JSC::JSStack::ensureCapacityFor):
(JSC::JSStack::topOfFrameFor):
(JSC::JSStack::setStackLimit):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):
* jit/JIT.h:
(JSC::JIT::compileCTINativeCall):
* jit/JITExceptions.h:
* jit/JITThunks.cpp:
(JSC::JITThunks::ctiNativeCall):
(JSC::JITThunks::ctiNativeConstruct):
* llint/LLIntCLoop.cpp:
* llint/LLIntCLoop.h:
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
(JSC::LLInt::Data::performAssertions):
* llint/LLIntData.h:
(JSC::LLInt::Data::performAssertions): Deleted.
* llint/LLIntEntrypoint.cpp:
* llint/LLIntEntrypoint.h:
* llint/LLIntExceptions.cpp:
* llint/LLIntExceptions.h:
* llint/LLIntOfflineAsmConfig.h:
* llint/LLIntOffsetsExtractor.cpp:
(JSC::LLIntOffsetsExtractor::dummy):
* llint/LLIntOpcode.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LLIntThunks.cpp:
* llint/LLIntThunks.h:
* llint/LowLevelInterpreter.cpp:
* llint/LowLevelInterpreter.h:
* runtime/CommonSlowPaths.cpp:
* runtime/CommonSlowPaths.h:
* runtime/ErrorHandlingScope.cpp:
(JSC::ErrorHandlingScope::ErrorHandlingScope):
(JSC::ErrorHandlingScope::~ErrorHandlingScope):
* runtime/Executable.cpp:
(JSC::setupLLInt):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::sanitizeStackForVM):
* runtime/VM.h:
(JSC::VM::canUseJIT): Deleted.

Source/WTF:
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):
* wtf/Platform.h:

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

5 years agoMediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
ddkilzer@apple.com [Thu, 19 Jun 2014 16:22:51 +0000 (16:22 +0000)]
MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
<http://webkit.org/b/134052>

Reviewed by Eric Carlson.

Fixes the following static analyzer warning:

    WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:688:43: warning: Potential leak of an object stored into 'outOfBandTracks'
            NSMutableArray* outOfBandTracks = [[NSMutableArray alloc] init];
                                              ^

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
Use RetainPtr<NSMutableArray> to prevent a leak.  Use
Objective-C literals to clean up the code.

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

5 years agoUnreviewed GTK gardening.
mario.prada@samsung.com [Thu, 19 Jun 2014 09:14:52 +0000 (09:14 +0000)]
Unreviewed GTK gardening.

Updated text expectations after r170138.

* platform/gtk/accessibility/image-map2-expected.txt: Updated.
* platform/gtk/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt: Updated.

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

5 years ago[EFL] Add expectations for failing svg/wicd/rightsizing-grid.xhtml layout test
commit-queue@webkit.org [Thu, 19 Jun 2014 07:25:18 +0000 (07:25 +0000)]
[EFL] Add expectations for failing svg/wicd/rightsizing-grid.xhtml layout test
https://bugs.webkit.org/show_bug.cgi?id=133982

Unreviewed gardening.

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-06-19

* platform/efl/TestExpectations:

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

5 years agoScriptExecutionContext::Task, FileThread::Task parameters should be values
zandobersek@gmail.com [Thu, 19 Jun 2014 05:54:44 +0000 (05:54 +0000)]
ScriptExecutionContext::Task, FileThread::Task parameters should be values
https://bugs.webkit.org/show_bug.cgi?id=134035

Reviewed by Anders Carlsson.

r170106 and similar previous changesets enforced ScriptExecutionContext::Task and
FileThread::Task parameters as rvalue references. There's technically nothing wrong
with that, but since both classes are move-only it is also not strictly required.
Accepting these parameters as values is more common in C++ value semantics as well.

* dom/Document.cpp:
(WebCore::Document::postTask):
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* fileapi/FileThread.cpp:
(WebCore::FileThread::postTask):
* fileapi/FileThread.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postTaskToLoader):
(WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::postTask):
* workers/WorkerGlobalScope.h:
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postTaskToLoader):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTask):
(WebCore::WorkerRunLoop::postTaskAndTerminate):
(WebCore::WorkerRunLoop::postTaskForMode):
(WebCore::WorkerRunLoop::Task::create):
(WebCore::WorkerRunLoop::Task::Task):
* workers/WorkerRunLoop.h:

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

5 years agoUnreviewed. Fixing the GTK+ build after r170114.
zandobersek@gmail.com [Thu, 19 Jun 2014 05:37:48 +0000 (05:37 +0000)]
Unreviewed. Fixing the GTK+ build after r170114.

* UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
(webkit_authentication_request_get_proposed_credential):
The core() accessor has been renamed to credential().

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

5 years agoTry to fix the Mountain Lion build.
mitz@apple.com [Thu, 19 Jun 2014 04:16:04 +0000 (04:16 +0000)]
Try to fix the Mountain Lion build.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):

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

5 years agoRemove RemoteLayerBackingStore’s RemoteLayerTreeContext pointer
timothy_horton@apple.com [Thu, 19 Jun 2014 03:11:24 +0000 (03:11 +0000)]
Remove RemoteLayerBackingStore’s RemoteLayerTreeContext pointer
https://bugs.webkit.org/show_bug.cgi?id=134055

Reviewed by Simon Fraser.

* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::ensureBackingStore):
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::drawInContext):
Remove RemoteLayerBackingStore's RemoteLayerTreeContext pointer. Instead, use the PlatformCALayer's.
Pass the PlatformCALayer in to the constructor, and remove it from ensureBackingStore();
RemoteLayerBackingStore is (for now) strictly tied to a single layer.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::ensureBackingStore):
(WebKit::PlatformCALayerRemote::updateBackingStore):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
(WebKit::PlatformCALayerRemote::context):

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

5 years agoWeb Inspector: AXI: expose aria-relevant
jcraig@apple.com [Thu, 19 Jun 2014 02:19:18 +0000 (02:19 +0000)]
Web Inspector: AXI: expose aria-relevant
https://bugs.webkit.org/show_bug.cgi?id=130913

Reviewed by Joseph Pecoraro.

Expose ARIA live region relevance in Web Inspector.
E.g. "Live: Assertive (Additions, Text)"

Source/WebCore:
Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): Support for liveRegionRelevant.
* inspector/protocol/DOM.json: Defined enum values and array passed to client.

Source/WebInspectorUI:
* Localizations/en.lproj/localizedStrings.js: New strings.
* UserInterface/Models/DOMNode.js: One additional property passed.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js: UI updates to support new property.

LayoutTests:
* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt: Minor update.
* inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion-expected.txt: Updated with new output.
* inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html: Updated with new elements.

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

5 years ago[Cocoa] Modernize one-method authentication
mitz@apple.com [Thu, 19 Jun 2014 00:30:50 +0000 (00:30 +0000)]
[Cocoa] Modernize one-method authentication
https://bugs.webkit.org/show_bug.cgi?id=134051

Reviewed by Anders Carlsson.

Instead of an NSURLConnection-style delegate method that takes a challenge and responds to
its sender, provide an NSURLSession-style method that takes a challenge and a completion
handler.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method, replacing
old unused method.
* UIProcess/Cocoa/NavigationState.h: Renamed flag in m_navigationDelegateMethods struct.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Check for new delegate method and update
new flag.

(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
the delegate implements the new method, return true (if it cannot handle the protection
space, it can reject it through the completion handler), except for server-trust
authentication, which is not supported yet.
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
delegate implements the new method, call it, passing a completion handler that calls the
right AuthenticationDecisionListener function based on its disposition and credential
parameters.

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

5 years agoAdd rebeccapurple to CSS named color list
simon.fraser@apple.com [Thu, 19 Jun 2014 00:21:41 +0000 (00:21 +0000)]
Add rebeccapurple to CSS named color list
https://bugs.webkit.org/show_bug.cgi?id=133804

Reviewed by Jer Noble.

Source/WebCore:

Add the named color "rebeccapurple" (#639).

* css/SVGCSSValueKeywords.in:
* platform/ColorData.gperf:

Source/WebInspectorUI:

Add the named color "rebeccapurple" (#639).

* UserInterface/External/CodeMirror/css.js:
* UserInterface/Models/CSSKeywordCompletions.js:
* UserInterface/Models/Color.js:

LayoutTests:

Add the named color "rebeccapurple" (#639).

* fast/css/named-colors-expected.txt:
* fast/css/named-colors.html:

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

5 years agoFix flaky beforeload tests
jpfau@apple.com [Thu, 19 Jun 2014 00:20:25 +0000 (00:20 +0000)]
Fix flaky beforeload tests
https://bugs.webkit.org/show_bug.cgi?id=133685

Reviewed by David Kilzer.

Source/WebCore:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):

LayoutTests:
* platform/wk2/TestExpectations: Unskip tests that are no longer flaky

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

5 years agoMake FrameLoadType a strongly typed enum
andersca@apple.com [Thu, 19 Jun 2014 00:13:20 +0000 (00:13 +0000)]
Make FrameLoadType a strongly typed enum
https://bugs.webkit.org/show_bug.cgi?id=134047

Reviewed by Andreas Kling.

Source/WebCore:
* history/BackForwardController.cpp:
(WebCore::BackForwardController::goBackOrForward):
(WebCore::BackForwardController::goBack):
(WebCore::BackForwardController::goForward):
* history/PageCache.cpp:
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCache):
* loader/FrameLoader.cpp:
(WebCore::isBackForwardLoadType):
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
(WebCore::FrameLoader::isReplacing):
(WebCore::FrameLoader::setReplacing):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
(WebCore::FrameLoader::shouldPerformFragmentNavigation):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/FrameLoaderTypes.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::updateForReload):
(WebCore::HistoryController::isReplaceLoadTypeWithProvisionalItem):
(WebCore::HistoryController::isReloadTypeWithProvisionalItem):
* loader/NavigationAction.cpp:
(WebCore::navigationType):
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::PolicyChecker):
(WebCore::PolicyChecker::checkNavigationPolicy):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::cachePolicy):
* loader/icon/IconController.cpp:
(WebCore::IconController::startLoader):

Source/WebKit/mac:
* WebView/WebFrame.mm:
(toWebFrameLoadType):
(-[WebFrame _loadType]):
* WebView/WebView.mm:
(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView goToBackForwardItem:]):

Source/WebKit/win:
* WebView.cpp:
(WebView::goToBackForwardItem):
(WebView::loadBackForwardListFromOtherView):

Source/WebKit2:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):
(WebKit::shouldReuseCommittedSandboxExtension):
(WebKit::WebPage::didCommitLoad):

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

5 years agoSimplify WebSecurityOrigin
andersca@apple.com [Thu, 19 Jun 2014 00:11:56 +0000 (00:11 +0000)]
Simplify WebSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=134049

Reviewed by Andreas Kling.

* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginCreateFromString):
(WKSecurityOriginCreateFromDatabaseIdentifier):
(WKSecurityOriginCopyDatabaseIdentifier):
(WKSecurityOriginCopyToString):
(WKSecurityOriginCopyProtocol):
(WKSecurityOriginCopyHost):
(WKSecurityOriginGetPort):
* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::securityOrigin):
(WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): Deleted.
(WebKit::WebSecurityOrigin::protocol): Deleted.
(WebKit::WebSecurityOrigin::host): Deleted.
(WebKit::WebSecurityOrigin::port): Deleted.
(WebKit::WebSecurityOrigin::databaseIdentifier): Deleted.
(WebKit::WebSecurityOrigin::toString): Deleted.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
(WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteEntriesForOrigin):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyDatabase):
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::didGetStorageDetailsByOrigin):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):

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

5 years ago[curl] Unreviewed speculative build fix after r170021.
achristensen@apple.com [Thu, 19 Jun 2014 00:06:09 +0000 (00:06 +0000)]
[curl] Unreviewed speculative build fix after r170021.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
(WebCore::CurlCacheEntry::parseResponseHeaders):
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::didReceiveHeader):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getProtectionSpace):
(WebCore::headerCallback):
Use HTTPHeaderName constants.

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

5 years agoMove the removeNode() tree walking from ScrollingStateNote into ScrollingStateTree
simon.fraser@apple.com [Wed, 18 Jun 2014 23:49:26 +0000 (23:49 +0000)]
Move the removeNode() tree walking from ScrollingStateNote into ScrollingStateTree
https://bugs.webkit.org/show_bug.cgi?id=134043

Reviewed by Beth Dakin.

It's cleaner if ScrollingStateTree does the descendant walk when removing nodes.
We can simply start the "willBeRemoved" walk at the node in question.

Have willRemoveNode() just remove the node from the m_stateNodeMap directly, rather
than this happening in a separate walk of m_nodesRemovedSinceLastCommit.

* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::removeDescendant): Deleted.
(WebCore::ScrollingStateNode::willBeRemovedFromStateTree): Deleted.
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::detachNode):
(WebCore::ScrollingStateTree::clear):
(WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
(WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
(WebCore::ScrollingStateTree::willRemoveNode):
(WebCore::ScrollingStateTree::removeNode): Deleted.
* page/scrolling/ScrollingStateTree.h:

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

5 years agoAdd FTL to Windows build.
achristensen@apple.com [Wed, 18 Jun 2014 23:42:57 +0000 (23:42 +0000)]
Add FTL to Windows build.
https://bugs.webkit.org/show_bug.cgi?id=134015

Reviewed by Filip Pizlo.

Source/JavaScriptCore:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
Added ftl source files.
* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
Added ftl and llvm directories to include path.
* JavaScriptCore.vcxproj/libllvmForJSC: Added.
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.props: Added.
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.vcxproj: Added.
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.vcxproj.filters: Added.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileArithMinOrMax):
MSVC doesn't like to divide by zero while compiling.  Use std::nan instead.
* llvm/InitializeLLVMWin.cpp: Added.
(JSC::initializeLLVMImpl):
Implemented dynamic loading and linking for Windows.

Source/WebKit:
* WebKit.vcxproj/WebKit.sln:
Added libllvmForJSC with a dependency on JavaScriptCoreGenerated, but don't build it yet.

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

5 years ago[iOS WebGL] Fixed WEBGL_compressed_texture_pvrtc.
achristensen@apple.com [Wed, 18 Jun 2014 23:14:36 +0000 (23:14 +0000)]
[iOS WebGL] Fixed WEBGL_compressed_texture_pvrtc.
https://bugs.webkit.org/show_bug.cgi?id=133561

Based on Blink r153971 by bajones@chromium.org.

Reviewed by Dean Jackson.

No new tests, but this should fix webgl-compressed-texture-pvrtc.html.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
(WebCore::WebGLRenderingContext::validateCompressedTexSubDimensions):
Added checks for pvrtc.

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

5 years agoAdd back WKPageRunJavaScriptInMainFrame_b for now
andersca@apple.com [Wed, 18 Jun 2014 23:04:58 +0000 (23:04 +0000)]
Add back WKPageRunJavaScriptInMainFrame_b for now
https://bugs.webkit.org/show_bug.cgi?id=134045
<rdar://problem/17368879>

Reviewed by Tim Horton.

Reverted changeset:

"Remove WKPageRunJavaScriptInMainFrame_b"
https://bugs.webkit.org/show_bug.cgi?id=133926
http://trac.webkit.org/changeset/169991

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

5 years agoRemove IWebFramePrivate::loadType
andersca@apple.com [Wed, 18 Jun 2014 22:57:29 +0000 (22:57 +0000)]
Remove IWebFramePrivate::loadType
https://bugs.webkit.org/show_bug.cgi?id=134044

Reviewed by Tim Horton.

* Interfaces/IWebFramePrivate.idl:
* WebFrame.cpp:
(WebFrame::loadType): Deleted.
(WebFrame::unused2): Deleted.
* WebFrame.h:

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

5 years agoWork around a Windows compiler crash.
andersca@apple.com [Wed, 18 Jun 2014 22:32:52 +0000 (22:32 +0000)]
Work around a Windows compiler crash.

* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createFromSelection):

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

5 years agoSimplify WebPageProxy::saveRecentSearches and WebPageProxy::loadRecentSearches
andersca@apple.com [Wed, 18 Jun 2014 22:32:09 +0000 (22:32 +0000)]
Simplify WebPageProxy::saveRecentSearches and WebPageProxy::loadRecentSearches
https://bugs.webkit.org/show_bug.cgi?id=134041

Reviewed by Andreas Kling.

* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):

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

5 years agoAll of MiniBrowser's WKWebViews should share a configuration
timothy_horton@apple.com [Wed, 18 Jun 2014 22:19:41 +0000 (22:19 +0000)]
All of MiniBrowser's WKWebViews should share a configuration
https://bugs.webkit.org/show_bug.cgi?id=134017

Reviewed by Anders Carlsson.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
Share a single WKWebViewConfiguration between all of MiniBrowser's views.
This means that they'll share things like preferences, visited links, etc.
It also means that we'll properly share processes once we hit the process limit.

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

5 years agoSubtrees with :first-child and :last-child are not invalidated when siblings are...
benjamin@webkit.org [Wed, 18 Jun 2014 22:10:36 +0000 (22:10 +0000)]
Subtrees with :first-child and :last-child are not invalidated when siblings are added/removed
https://bugs.webkit.org/show_bug.cgi?id=133934

Reviewed by Antti Koivisto.

Source/WebCore:
When adding/removing nodes on an element, we try to invalidate only the elements that are
affected. In the case of :first-child and :last-child, that optimizations is implemented
through two types of flags that are updated during style resolution.

The first flag is childrenAffectedByFirstChildRules (childrenAffectedByLastChildRules),
set on the parent of any element that could be affected by :first-child (:last-child).

The other part of the optimization is marking the style itself with firstChildState (lastChildState)
to further reduce invalidations.

The problem in this case happen with a subtree of element is detached. Since there is no renderer,
the computed style is resolved ad-hoc and stored directly on the element. When the element is moved,
the computed style was never cleared because the invalidation optimizations were not handling
elements without style.

Credit to Yusuke Suzuki for discovering the issue and creating test cases.

Tests: fast/css/getComputedStyle/empty-update-without-renderer.html
       fast/css/getComputedStyle/first-child-update-without-renderer.html
       fast/css/getComputedStyle/last-child-update-without-renderer.html

* dom/Element.cpp:
(WebCore::checkForEmptyStyleChange):
Clean up: pull the style directly from the function instead of expection the call sites to do that.
Refine the checks to avoid invalidation.

(WebCore::checkForSiblingStyleChanges):
Do not early return if the parent is detached, the children may still need invalidation.

When there is no renderer, assume the worst first-child/last-child and force the invalidation.

(WebCore::Element::childrenChanged):

LayoutTests:
* fast/css/getComputedStyle/empty-update-without-renderer-expected.txt: Added.
* fast/css/getComputedStyle/empty-update-without-renderer.html: Added.
* fast/css/getComputedStyle/first-child-update-without-renderer-expected.txt: Added.
* fast/css/getComputedStyle/first-child-update-without-renderer.html: Added.
* fast/css/getComputedStyle/last-child-update-without-renderer-expected.txt: Added.
* fast/css/getComputedStyle/last-child-update-without-renderer.html: Added.

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

5 years agoREGRESSION (r167856): Unable to log into HSBC app
dbates@webkit.org [Wed, 18 Jun 2014 21:52:45 +0000 (21:52 +0000)]
REGRESSION (r167856): Unable to log into HSBC app
https://bugs.webkit.org/show_bug.cgi?id=133991
<rdar://problem/17044839>

Reviewed by David Kilzer.

Source/WebCore:
Following <http://trac.webkit.org/changeset/167856> we disallow "navigation to any URL that is
invalid, except for JavaScript URLs, which need not be valid." A byproduct of this policy
decision is that we no longer notify the WebKit client to about a navigation if the destination
URL is invalid. And some apps, including the HSBC app for iOS, have logic to intercept URLs
as a means to pass data from their WebView-embedded web app to the WebView. We should expose a
setting called allowNavigationToInvalidURL (disabled by default on all ports and conditionally
enabled on iOS) to toggle whether WebCore allows navigation to any URL, even if its invalid,
so as to not break clients that intercept URLs and have custom logic to handle them.

Tests: fast/loader/allow-redirect-to-invalid-url-using-javascript.html
       fast/loader/allow-redirect-to-invalid-url-using-meta-refresh.html
       fast/loader/disallow-redirect-to-invalid-url-using-javascript.html
       fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh.html

* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::shouldScheduleNavigation): Modified to only validate
the URL when the setting allowNavigationToInvalidURL is disabled.
* page/Settings.in: Added setting allowNavigationToInvalidURL (disabled by default).

Source/WebKit/mac:
Only enable the setting allowNavigationToInvalidURL for iOS app linked against WebKit/UIKit before iOS 8.

* Misc/WebKitVersionChecks.h: Added macro constant WEBKIT_FIRST_VERSION_WITH_NAVIGATION_URL_VALIDATION.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Enable or disable the setting allowNavigationToInvalidURL as appropriate.

LayoutTests:
Add tests to ensure that the WebKit client will be notified to service a redirect to an invalid
URL when the setting allowNavigationToInvalidURL is enabled and will not be notified when
the setting is disabled.

* fast/loader/allow-redirect-to-invalid-url-using-javascript-expected.txt: Added.
* fast/loader/allow-redirect-to-invalid-url-using-javascript.html: Added.
* fast/loader/allow-redirect-to-invalid-url-using-meta-refresh-expected.txt: Added.
* fast/loader/allow-redirect-to-invalid-url-using-meta-refresh.html: Added.
* fast/loader/disallow-redirect-to-invalid-url-using-javascript-expected.txt: Added.
* fast/loader/disallow-redirect-to-invalid-url-using-javascript.html: Added.
* fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh-expected.txt: Added.
* fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh.html: Added.
* fast/loader/resources/redirect-to-invalid-url-using-javascript.html: Added.
* fast/loader/resources/redirect-to-invalid-url-using-meta-refresh.html: Added.

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

5 years agoUnreviewed build fix after r170107.
achristensen@apple.com [Wed, 18 Jun 2014 21:50:31 +0000 (21:50 +0000)]
Unreviewed build fix after r170107.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithMod):
Use non-template sub for armv7s.

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

5 years agoMake ScrollingStateNodes refcounted, and other minor cleanup
simon.fraser@apple.com [Wed, 18 Jun 2014 21:43:30 +0000 (21:43 +0000)]
Make ScrollingStateNodes refcounted, and other minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=134040

Reviewed by Beth Dakin.

Source/WebCore:
Prepare for future scrolling frame gyrations by making
ScrollingStateNodes refcounted.

Rename ScrollingStateNode::removeChild() to removeDescendant()
since that's what it does. Also rename didRemoveNode() to willRemoveNode()
to better match the behavior.

Use 'auto' in more places.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::syncChildPositions):
* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::create):
(WebCore::ScrollingStateFixedNode::clone):
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::create):
(WebCore::ScrollingStateFrameScrollingNode::clone):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::cloneAndReset):
(WebCore::ScrollingStateNode::appendChild):
(WebCore::ScrollingStateNode::removeDescendant):
(WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
(WebCore::ScrollingStateNode::removeChild): Deleted.
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::children):
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::create):
(WebCore::ScrollingStateOverflowScrollingNode::clone):
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::create):
(WebCore::ScrollingStateStickyNode::clone):
* page/scrolling/ScrollingStateStickyNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::removeNode):
(WebCore::ScrollingStateTree::willRemoveNode):
(WebCore::ScrollingStateTree::didRemoveNode): Deleted.
* page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::setRootStateNode):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):

Source/WebKit2:
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):

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

5 years ago-[JSContext setName:] leaks NSString
ddkilzer@apple.com [Wed, 18 Jun 2014 21:41:44 +0000 (21:41 +0000)]
-[JSContext setName:] leaks NSString
<http://webkit.org/b/134038>

Reviewed by Joseph Pecoraro.

Fixes the following static analyzer warning:

    JavaScriptCore/API/JSContext.mm:200:73: warning: Potential leak of an object
        JSStringRef nameJS = name ? JSStringCreateWithCFString((CFStringRef)[name copy]) : nullptr;
                                                                            ^

* API/JSContext.mm:
(-[JSContext setName:]): Autorelease the copy of |name|.

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

5 years ago[iOS][WK2] Do not add padding when magnifying replaced elements
benjamin@webkit.org [Wed, 18 Jun 2014 21:40:26 +0000 (21:40 +0000)]
[iOS][WK2] Do not add padding when magnifying replaced elements
https://bugs.webkit.org/show_bug.cgi?id=134019

Reviewed by Tim Horton.

Having margins for regular blocks make sense to improve readability. For replaced elements,
we should follow iOS's UI and display edge to edge.

* UIProcess/ios/SmartMagnificationController.mm:
(WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):

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

5 years ago[iOS][WK2] Re-sync didCommitLoadForMainFrame with its corresponding tile update
benjamin@webkit.org [Wed, 18 Jun 2014 21:38:04 +0000 (21:38 +0000)]
[iOS][WK2] Re-sync didCommitLoadForMainFrame with its corresponding tile update
https://bugs.webkit.org/show_bug.cgi?id=134009

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-18
Reviewed by Tim Horton.

WKWebView assumed the first _didCommitLayerTree: after _didCommitLoadForMainFrame
had the state of the page being loaded.

This is not always true. Sometimes, a set of tiles can be rendering asynchronously while the next
page is loaded, and does not flush the queue until after didCommitLoadForMainFrame is executed.

Tim introduced a transactionID with each layer tree update. This patch uses that to synchronize
WKWebView with the right set of tiles.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _updateVisibleContentRects]):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
(WebKit::RemoteLayerTreeDrawingAreaProxy::nextLayerTreeTransactionID):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

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

5 years agoSimplify WebCredential
andersca@apple.com [Wed, 18 Jun 2014 20:56:12 +0000 (20:56 +0000)]
Simplify WebCredential
https://bugs.webkit.org/show_bug.cgi?id=134036

Reviewed by Andreas Kling.

* UIProcess/API/C/WKCredential.cpp:
(WKCredentialCreate):
(WKCredentialCreateWithCertificateInfo):
(WKCredentialCopyUser):
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::useCredential):
* UIProcess/Authentication/WebCredential.cpp:
(WebKit::WebCredential::credential):
(WebKit::WebCredential::core): Deleted.
(WebKit::WebCredential::user): Deleted.
* UIProcess/Authentication/WebCredential.h:
(WebKit::WebCredential::create): Deleted.

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

5 years agoAdopt modern C++11 loops and fix WebArchive creation functions
andersca@apple.com [Wed, 18 Jun 2014 19:40:25 +0000 (19:40 +0000)]
Adopt modern C++11 loops and fix WebArchive creation functions
https://bugs.webkit.org/show_bug.cgi?id=134032

Reviewed by Andreas Kling.

Source/WebCore:
Use modern loops in a couple of places, fix DocumentLoader::subresources() to return a Vector,
and stop using Vectors of PassRefPtrs.

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::textInserted):
(WebCore::Document::textRemoved):
(WebCore::Document::textNodesMerged):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::subresources):
(WebCore::DocumentLoader::getSubresources): Deleted.
* loader/DocumentLoader.h:
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::dump):
* loader/appcache/ApplicationCache.h:
(WebCore::ApplicationCache::resources):
(WebCore::ApplicationCache::begin): Deleted.
(WebCore::ApplicationCache::end): Deleted.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::fillResourceList):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::empty):
(WebCore::ApplicationCacheStorage::storeCopyOfCache):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
* loader/archive/cf/LegacyWebArchive.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):

Source/WebKit/mac:
* WebView/WebArchive.mm:
(-[WebArchive initWithMainResource:subresources:subframeArchives:]):
* WebView/WebDataSource.mm:
(-[WebDataSource subresources]):

Source/WebKit2:
* Shared/APIWebArchive.cpp:
(API::WebArchive::WebArchive):

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

5 years agoWeb Inspector: REGRESSION: Style declaration editor: placeholder misaligned
jonowells@apple.com [Wed, 18 Jun 2014 19:19:52 +0000 (19:19 +0000)]
Web Inspector: REGRESSION: Style declaration editor: placeholder misaligned
https://bugs.webkit.org/show_bug.cgi?id=134012

Reviewed by Timothy Hatcher.

Removed a rule needed to align the placeholder for selectors in
the style declation text editors with no rules declared in
http://trac.webkit.org/changeset/170077. The necessary
rule has been added back to fix the issue.

* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):

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

5 years agoGive WKWebView on iOS a mobile user agent
andersca@apple.com [Wed, 18 Jun 2014 19:19:51 +0000 (19:19 +0000)]
Give WKWebView on iOS a mobile user agent
https://bugs.webkit.org/show_bug.cgi?id=134034
<rdar://problem/17346489>

Reviewed by Enrica Casucci.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):

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

5 years agoRemove stale include, header was removed in r170101.
joepeck@webkit.org [Wed, 18 Jun 2014 19:14:51 +0000 (19:14 +0000)]
Remove stale include, header was removed in r170101.

Unreviewed build fix.

* Shared/API/Cocoa/WebKitPrivate.h:

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