Layer for bottom overhang area needs to be offset by the topContentInset
https://bugs.webkit.org/show_bug.cgi?id=132835
-and corresponding-
<rdar://problem/16641115>

Reviewed by Simon Fraser.

Push this layer down by the topContentInset in addition to the root layer height, 
footer height, and header height.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SVG outline property is broken and inefficient
https://bugs.webkit.org/show_bug.cgi?id=113666

Reviewed by Dean Jackson.


Source/WebCore:
"[SVG2] css 'outline' property should apply to svg elements

The 'outline' property was only partially working in SVG before
this patch, this makes it work on text and text content child
elements too.

This makes SVG render the outlines as part of the foreground paint
phase.

Partly based on Florin Malita's webkit patch https://bugs.webkit.org/show_bug.cgi?id=113666#c12."

Tests: svg/custom/outline-stacking-expected.svg
       svg/custom/outline-stacking.svg
       svg/custom/rgba-color-outline.svg
       svg/text/text-outline-expected.svg
       svg/text/text-outline-rgba.html
       svg/text/text-outline.html
       svg/text/textpath-outline-expected.svg
       svg/text/textpath-outline.svg
       svg/text/tspan-multiple-outline.svg
       svg/text/tspan-outline-2-expected.svg
       svg/text/tspan-outline-2.svg
       svg/text/tspan-outline-expected.svg
       svg/text/tspan-outline.html

* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint): Draw outline in forground
    paint phase.
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint): Draw outline in forground
    paint phase.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced): Pass paint offset.
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::paint): Draw outline in forground
    paint phase.
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::paint): Draw outline in forground
    paint phase.
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paint): Pass paint offset.
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint): Draw outline in forground
    paint phase.
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint): Pass paint offset.

LayoutTests:
Test stacking for outline properties. 'outline' should
not draw above overlapping content anymore.
Test outline drawing for text elements.

* svg/custom/outline-stacking-expected.svg: Added.
* svg/custom/outline-stacking.svg: Added.
* svg/custom/rgba-color-outline-expected.html: Added.
* svg/custom/rgba-color-outline.svg: Added.
* svg/text/text-outline-expected.svg: Added.
* svg/text/text-outline-rgba-expected.html: Added.
* svg/text/text-outline-rgba.html: Added.
* svg/text/text-outline.html: Added.
* svg/text/textpath-outline-expected.svg: Added.
* svg/text/textpath-outline.svg: Added.
* svg/text/tspan-multiple-outline-expected.html: Added.
* svg/text/tspan-multiple-outline.svg: Added.
* svg/text/tspan-outline-2-expected.svg: Added.
* svg/text/tspan-outline-2.svg: Added.
* svg/text/tspan-outline-expected.svg: Added.
* svg/text/tspan-outline.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Expose WebPage::usesEphemeralSession to the bundle
https://bugs.webkit.org/show_bug.cgi?id=132836

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Progress on web timing.
https://bugs.webkit.org/show_bug.cgi?id=132574

Reviewed by Alexey Proskuryakov.


Source/WebCore: 
* CMakeLists.txt:
Removed ResourceLoadTiming.cpp.
* WebCore.exp.in:
Added linker symbols for ResourceLoadTiming.
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Removed ResourceLoadTiming.cpp.
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForTiming):
* inspector/protocol/Network.json:
Updated ResourceTiming structure.
* loader/DocumentLoadTiming.cpp:
(WebCore::DocumentLoadTiming::setNavigationStart):
* loader/DocumentLoadTiming.h:
 Deleted unused setNavigationStart function.
* page/Performance.idl:
Updated spec URL.
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::responseEnd):
Updated ResourceLoadTiming member variable names.
(WebCore::PerformanceResourceTiming::responseStart):
* page/PerformanceResourceTiming.h:
* page/PerformanceResourceTiming.idl:
Deleted responseStart because it is not in the spec.
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::domainLookupStart):
(WebCore::PerformanceTiming::domainLookupEnd):
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::secureConnectionStart):
(WebCore::PerformanceTiming::requestStart):
(WebCore::PerformanceTiming::responseStart):
Updated ResourceLoadTiming member variable names.
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
Use navigationStart as base for resource load times.
* page/PerformanceTiming.idl:
Updated spec URL.
* platform/network/HTTPParsers.h:
Removed unused class declarations.
* platform/network/ResourceHandle.h:
Moved soup request time from ResourceLoadTiming to ResourceHandle.
* platform/network/ResourceLoadTiming.cpp: Removed.
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::deepCopy):
(WebCore::ResourceLoadTiming::operator==):
(WebCore::ResourceLoadTiming::ResourceLoadTiming):
Updated ResourceLoadTiming member variable names.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
Collect timing data.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
Save timing data to a ResourceLoadTiming on the ResourceResponse.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::gotHeadersCallback):
(WebCore::restartedCallback):
(WebCore::milisecondsSinceRequest):
(WebCore::ResourceHandle::didStartRequest):
(WebCore::networkEventCallback):
(WebCore::createSoupMessageForHandleAndRequest):
(WebCore::ResourceHandle::sendPendingRequest):
Updated ResourceLoadTiming member variable names.
(WebCore::wroteBodyCallback): Deleted.

Source/WebKit2: 
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
Transfer ResourceLoadTiming values if they exist.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Correct Cygwin Path Confusion in WebInspectorUI Build
https://bugs.webkit.org/show_bug.cgi?id=132826

Reviewed by Joseph Pecoraro.

* Scripts/copy-user-interface-resources.pl: If the build is running
under Cygwin, be sure to use '/usr/bin/python', instead of just
'python' to avoid build errors.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r168642.
https://bugs.webkit.org/show_bug.cgi?id=132839

Broke ARM build (Requested by jpfau on #webkit).

Reverted changeset:

"[Win] Enum type with value zero is compatible with void*,
potential cause of crashes."
https://bugs.webkit.org/show_bug.cgi?id=132772
http://trac.webkit.org/changeset/168642

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Teach Editor to support more direct replacement of a Node
<rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834

Reviewed by Enrica Casucci.

The new method "Editor::replaceNodeFromPasteboard" has the intent that the new DocumentFragment
from the pasteboard is as similar to the old Node as possible.

In practice, the new DocumentFragment:
1 - Can represent a single node that's missing various attributes the original Node had.
2 - Can be an unwanted fragment of arbitrary depth when the replacement happens inside Mail.app

This fixes both of these issues.

Add a MailBlockquoteHandling enum class for various Editor operations to pass through to the
ReplaceSelectionCommand:
* editing/Editor.cpp:
(WebCore::Editor::handleTextEvent):
(WebCore::Editor::pasteAsFragment):
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::replaceSelectionWithFragment):
* editing/Editor.h:

* dom/TextEvent.cpp:
(WebCore::TextEvent::createForPlainTextPaste):
(WebCore::TextEvent::createForFragmentPaste):
(WebCore::TextEvent::TextEvent):
* dom/TextEvent.h:
(WebCore::TextEvent::mailBlockquoteHandling):

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
(WebCore::ReplaceSelectionCommand::doApply): Consider whether or not this particular Editor
  operation was meant to give special consideration to Mail's Blockquotes.
* editing/ReplaceSelectionCommand.h:

* editing/efl/EditorEfl.cpp:
(WebCore::Editor::pasteWithPasteboard):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::pasteWithPasteboard):

* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::readSelectionFromPasteboard):
(WebCore::maybeCopyNodeAttributesToFragment): If the new DocumentFragment represents a single HTML node
  with the same tag name is the original HTML node, copy over most attributes from the original node.
(WebCore::Editor::replaceNodeFromPasteboard): Create the fragment, run it through maybeCopyNodeAttributesToFragment.

* WebCore.exp.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<svg> with opacity and compositing double-applies its opacity
https://bugs.webkit.org/show_bug.cgi?id=116856

Reviewed by Simon Fraser.

Source/WebCore:
The opacity is applied by the compositor. However, all SVG elements
create transparency layers on their own to apply opacity. So did
SVGSVGElement.

Added a check if the current element has a compositing layer and skip
creating transparency layer if it has.

Test: svg/custom/composited-svg-with-opacity.html

* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

LayoutTests:
Test that opacity is not applied twice for composited inline SVG.

* svg/custom/composited-svg-with-opacity-expected.html: Added.
* svg/custom/composited-svg-with-opacity.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: .js dialogs shown in unload while AX is running crash WebKit.
https://bugs.webkit.org/show_bug.cgi?id=123828

Reviewed by Anders Carlsson.

Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
This allows us to avoid having special behavior for accessibility when the WebProcess needs
to wait on a reply.

* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForSyncReply):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::willSendSyncMessage):
(IPC::Connection::didReceiveSyncReply):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):



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