Collect web timing data on iOS.
https://bugs.webkit.org/show_bug.cgi?id=133075

Reviewed by Sam Weinig.

* platform/network/ResourceHandle.h:
Added setCollectsTimingData wrapper and getConnectionTimingData declarations.
getConnectionTimingData with a dictionary parameter is a private helper function.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::start):
Call setCollectsTimingData wrapper when creating a connection to ensure that timing data is collected.
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
Pass the CFURLConnectionRef to didReceiveResponse to get timing data from.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getConnectionTimingData):
Moved from getTimingData to compile regardless of using CFNetwork and added wrapper with CFDictionaryRef.
(WebCore::ResourceHandle::setCollectsTimingData):
Added wrapper to call objc function from c++.
(WebCore::ResourceHandle::getTimingData):
Renamed to getConnectionTimingData.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
Updated function name from getTimingData to getConnectionTimingData.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Standalone images need to take topContentInset into account
https://bugs.webkit.org/show_bug.cgi?id=133092
-and corresponding-
<rdar://problem/16945791>

Reviewed by Darin Adler.

The FrameView’s size is accurate in terms of the NSWindow size, but that is not 
really what the ImageDocument code is looking for here. The ImageDocument wants to 
know the size of the unobscured viewport area. We should use visibleSize() for 
that.
* html/ImageDocument.cpp:
(WebCore::ImageDocument::scale):
(WebCore::ImageDocument::imageFitsInWindow):
(WebCore::ImageDocument::imageClicked):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r169082

* platform/network/ResourceHandle.h:
Added NSDictionary declaration.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
https://bugs.webkit.org/show_bug.cgi?id=133025

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-05-19
Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
Initialize PlatformCALayerRemote properties from the PlatformLayer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TelephoneNumberOverlayController should use a modern loop for text quad bounding 
boxes
https://bugs.webkit.org/show_bug.cgi?id=133096

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::textQuadsToBoundingRectForRange):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] REGRESSION (r168910): webkitdirs.pm: Be more forgiving when parsing --sdk, --device and --sim
<http://webkit.org/b/133089>

Reviewed by Darin Adler.

* Scripts/webkitdirs.pm:
(determineXcodeSDK): If both '--sdk SDKROOT' and '--sim' are
specified on the command line, we would remove the '--sdk'
arguments, but leave '--sim', potentially passing it along to
xcodebuild causing a build failure.  This happens when
'old-run-webkit-tests --release --sim' invokes
build-dumprendertree when DumpRenderTree hasn't been built yet.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Text decorations do not contribute to visual overflow
https://bugs.webkit.org/show_bug.cgi?id=132773

Patch by Myles C. Maxfield <litherum@gmail.com> on 2014-05-19
Reviewed by Antti Koivisto.

Source/WebCore:
This patch creates a function, visualOverflowForDecorations, which computes
how much visual overflow to add around a text box due to text decorations. Most of the time,
text decorations are fully contained within the text box, so the result is usually 0.

This function exists within style/InlineTextBoxStyle.cpp, which is an added file. This is
so that it can be called from setLogicalWidthForTextRun() inside RenderBlockLineLayout.cpp
and from RenderStyle::changeAffectsVisualOverflow(). The former case passes in the full
InlineTextBox and the latter case just passes in a RenderStyle (because the InlineTextBox
is unavailable.)

This patch also modifies RenderTableSection::spannedColumns() to fix an off-by-one error
that was causing table borders to not be drawn when they existed right on the edge of
a repaint rect.

Tests: fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html
Tests: fast/repaint/border-collapse-table-off-by-one-expected.html

* WebCore.vcxproj/WebCore.vcxproj: Adding reference to new InlineTextBoxStyle.cpp file
* WebCore.vcxproj/WebCore.vcxproj.filters: Adding reference to new InlineTextBoxStyle files
* WebCore.xcodeproj/project.pbxproj: Adding reference to new InlineTextBoxStyle files
* rendering/InlineTextBox.cpp:
(WebCore::computeUnderlineOffset): Moved to InlineTextBox.cpp
(WebCore::getWavyStrokeParameters): Moved to InlineTextBox.cpp
(WebCore::InlineTextBox::paintDecoration): Update to use newly refactored functions
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Call visualOverflowForDecorations()
* rendering/RenderTableSection.cpp:
* rendering/RenderTableSelection.cpp: Fix off-by-one error when the boundary of a repaint
rect lies exactly on top of a table column position
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeAffectsVisualOverflow): Inspects shadows and text decorations
(WebCore::RenderStyle::changeRequiresLayout): Calls changeAffectsVisualOverflow()
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Moved code from here
to changeAffectsVisualOverflow().
* rendering/style/RenderStyle.h: Function signature
* style/InlineTextBoxStyle.cpp: Added.
(WebCore::computeUnderlineOffset): Moved from InlineTextBox.cpp
(WebCore::getWavyStrokeParameters): Moved from InlineTextBox.cpp
(WebCore::extendIntToFloat): Convenience function for dealing with the fact that
underline bounding boxes use floats and GlyphOverflow uses ints
(WebCore::visualOverflowForDecorations): Given
vertical overflow bounds, possibly extend those to include location of
decorations.
* style/InlineTextBoxStyle.h: Added. Function signatures.
(WebCore::textDecorationStrokeThickness): Refactored from InlineTextBox.cpp
(WebCore::wavyOffsetFromDecoration): Refactored from InlineTextBox.cpp
* platform/graphics/Font.h:
(WebCore::GlyphOverflow::isEmpty): Convenience function
(WebCore::GlyphOverflow::extendTo): Convenience function

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

The second test triggers an off-by-one error in collapsed table borders where a border was not
being drawn if it lay right on top of a repaint rect.

* fast/css3-text/css3-text-decoration/repaint/resources/Litherum.svg: Added. This font has a
descent of 0 (so it will not intersect underlines).
* fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect-expected.html: Added.
Apply the underline without any timeout.
* fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html: Added.
Apply the underline with a timeout.
* fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect-removed-expected.html: Added.
Draw text without decorations.
* fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect-removed.html: Added.
Draw text with decorations which contribute to overflow, then remove those decorations on a timer.
* fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect-altered-expected.html: Added.
Draw text as if the final state of the decorations had always existed.
* fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect-altered.html: Added.
Make sure that modifying decorations that contribute to overflow redraw properly.
* fast/repaint/border-collapse-table-off-by-one-expected.html: Added.
* fast/repaint/border-collapse-table-off-by-one.html: Added. Trigger the off-by-one error in
RenderTableSection.cpp

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Use status display for live streams
https://bugs.webkit.org/show_bug.cgi?id=133097

Reviewed by Sam Weinig.

Follow-on from https://bugs.webkit.org/show_bug.cgi?id=131390
Allow the iOS controls to use the status display field.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.configureInlineControls): Live streams should
not have a timeline or rewind button.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WK2 iOS: Pressing the form navigation button causes the keyboard to be dismissed.
https://bugs.webkit.org/show_bug.cgi?id=133100
<rdar://problem/16808673>

Reviewed by Benjamin Poulain.

The call to focusNextAssistedNode is the result of a user action, since
it is called when the user pressed the form navigation buttons.
Therefore we must set m_userIsInteracting to true before changing the focus
to make sure the focus change is honored.

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



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