Crash tapping on play button on video on iOS
https://bugs.webkit.org/show_bug.cgi?id=129452

Reviewed by Benjamin Poulain.

node->computedStyle() can return null. Just use
renderer->style() to get the tap highlight color.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify WebProcessProxy state accessors
https://bugs.webkit.org/show_bug.cgi?id=129453

Reviewed by Andreas Kling.

Replace WebProcessProxy::isLaunching() and WebProcessProxy::isValid() with a single
WebProcessProxy::state() that return one of three values: Launching, Running or Terminated.

* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::state):
(WebKit::ChildProcessProxy::sendMessage):
(WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::canSendMessage):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::setProcessSuppressionEnabled):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::getPluginProcessConnection):
(WebKit::PluginProcessProxy::getSitesWithData):
(WebKit::PluginProcessProxy::clearSiteData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::waitForDidUpdateViewState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::requestTermination):
(WebKit::WebProcessProxy::enableSuddenTermination):
(WebKit::WebProcessProxy::disableSuddenTermination):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::WebProcessProxy::updateProcessSuppressionState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Micro-optimize elementAffectsDirectionality().
<https://webkit.org/b/129444>

Tweak this function to skip an unnecessary bit check and use
fastHasAttribute() instead of hasAttribute() for looking up dirAttr.

~1% speedup on DYEB/AngularJS.

Reviewed by Ryosuke Niwa.

* html/HTMLElement.cpp:
(WebCore::elementAffectsDirectionality):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid calling logicalLeftOffsetForLine 2 times in LineWidth::fitBelowFloats
https://bugs.webkit.org/show_bug.cgi?id=129433

Reviewed by Darin Adler.

This change updates fitBelowFloats and its helpers to call RenderBlock::logicalLeftOffsetForLine only once.

No new tests, no behavior change.

* rendering/line/LineWidth.cpp:
(WebCore::availableWidthAtOffset):
(WebCore::LineWidth::updateLineDimension):
(WebCore::LineWidth::wrapNextToShapeOutside):
(WebCore::LineWidth::fitBelowFloats):
* rendering/line/LineWidth.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Slow cases for function.apply and function.call should not require vm re-entry
https://bugs.webkit.org/show_bug.cgi?id=129454

Reviewed by Geoffrey Garen.

Implement call and apply using builtins. Happily the use
of @call and @apply don't perform function equality checks
and just plant direct var_args calls. This did expose a few
codegen issues, but they're all covered by existing tests
once call and apply are implemented in JS.

* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/Function.prototype.js: Added.
(call):
(apply):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* interpreter/Interpreter.cpp:
(JSC::sizeFrameForVarargs):
(JSC::loadVarargs):
* interpreter/Interpreter.h:
* jit/JITCall.cpp:
(JSC::JIT::compileLoadVarargs):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeFunctionCallNode):
* parser/Lexer.cpp:
(JSC::isSafeBuiltinIdentifier):
* runtime/CommonIdentifiers.h:
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::addFunctionProperties):
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectBuiltinFunction):
(JSC::JSObject::putDirectBuiltinFunctionWithoutTransition):
* runtime/JSObject.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Whoops, include all of last patch.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Move named-flow specific method decorationsClipRectForBoxInRegion to RenderNamedFlowThread
https://bugs.webkit.org/show_bug.cgi?id=129428

Reviewed by Andreas Kling.

Since the decorationsClipRectForBoxInRegion method is a named flow specific method, it makes
sense to be in the named flow specific class, RenderNamedFlowThread, instead of the more
generic RenderFlowThread.

No new tests required. No new functionality.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderFlowThread.cpp:
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
* rendering/RenderNamedFlowThread.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Warning: Multiple build commands for output file GCSegmentedArray and InspectorAgent
https://bugs.webkit.org/show_bug.cgi?id=129446

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-02-27
Reviewed by Timothy Hatcher.

Remove duplicate header entries in Copy Header build phase.

* JavaScriptCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebRTC] Removing MediaConstraints argument from RTCPeerConnection addStream, updateIce methods and constructor
https://bugs.webkit.org/show_bug.cgi?id=129449

Reviewed by Eric Carlson.

According to WebRTC editor's draft, MediaConstraints will no longer be an argument of those methods and
constructor.

Source/WebCore:

Existing tests were updated.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::create):
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::updateIce):
(WebCore::RTCPeerConnection::addStream):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* bindings/js/JSRTCPeerConnectionCustom.cpp:
(WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mock/RTCPeerConnectionHandlerMock.cpp:
(WebCore::RTCPeerConnectionHandlerMock::initialize):
(WebCore::RTCPeerConnectionHandlerMock::updateIce):
(WebCore::RTCPeerConnectionHandlerMock::addStream):
* platform/mock/RTCPeerConnectionHandlerMock.h:

LayoutTests:

* fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt:
* fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCPeerConnection.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in RemoteLayerTreePropertyApplier::applyPropertiesToLayer
https://bugs.webkit.org/show_bug.cgi?id=129456
<rdar://problem/16182676>

Reviewed by Simon Fraser.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
We were dereferencing the RemoteLayerBackingStore without checking if it exists,
in the accelerated drawing codepath. This case will occur if a layer
previously drew contents, but now does not.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build after r164832

* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): WebProcessProxy::isLaunching() has been replaced
by WebProcessProxy::state().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
text-decoration-skip: ink does not skip over SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=128936

Reviewed by Darin Adler.

Source/WebCore:

When drawing glyphs in an SVG font, the glyphs are converted to paths and then filled. This patch moves
the glyph -> path conversion into a helper class, GlyphToPathTranslator, and creates an implementation
for the SVG drawing code. Once this helper class is created, it can be used to trace paths in order
to make underlines skip over SVG glyphs. This helper class also has an implementation for non-SVG glyphs,
which allows for the glyph tracing code to be paramaterized over the implementation of the helper class
rather than if the FontData itself is SVG or not.

Tests: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg.html

* platform/graphics/Font.h:
(WebCore::GlyphToPathTranslator::~GlyphToPathTranslator): Virtual implementation of helper class
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::Path): Created constructor that takes a RefPtr<CGMutablePathRef>
* platform/graphics/Path.h:
* platform/graphics/TextRun.h: Give RenderingContext a factory function to create the helper class
instance
* platform/graphics/mac/FontMac.mm: Implementation of helper class used for skipping underlines on
regular (CoreText) glyphs
(WebCore::MacGlyphToPathTranslator::MacGlyphToPathTranslator):
(WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph):
(WebCore::MacGlyphToPathTranslator::incrementIndex):
(WebCore::Font::dashesForIntersectionsWithRect): Call the relevant factory function, and use it
to successively generate Paths
* rendering/svg/SVGTextRunRenderingContext.cpp: Implementation of helper class used for SVG fonts
(WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
(WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph):
(WebCore::SVGGlyphToPathTranslator::incrementIndex):
(WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
(WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Use the above implementation
* rendering/svg/SVGTextRunRenderingContext.h: Factory function declaration

LayoutTests:

This font simply draws some underlined text with a SVG font and makes sure the underline skips.

* fast/css3-text/css3-text-decoration/text-decoration-skip/resources/Litherum.svg: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, update test expectations after r164830.

Inspector test dom/dom-search-crash.html times out in release builds
https://bugs.webkit.org/show_bug.cgi?id=129462

Web Inspector model tests load wrong inspector page under WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=129460

* TestExpectations: Updating test expectations.
* platform/wk2/TestExpectations: Updating test expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix build after r164832

* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
(WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):

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