WTR and DRT didReceiveAuthenticationChallengeInFrame should print messages consistently
https://bugs.webkit.org/show_bug.cgi?id=136847

Tools:

Added protection space host and port logging to WTR didReceiveAuthenticationChallengeInFrame.

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-09-19
Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveAuthenticationChallengeInFrame):

LayoutTests:

Updated WK2 expected.txt files according new logging of didReceiveAuthenticationChallengeInFrame.
Factorized efl/gtk platform specific expected files as WK2 expected files.

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-09-19
Reviewed by Alexey Proskuryakov.

* platform/gtk/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt: Removed.
* platform/gtk/http/tests/loading/basic-credentials-sent-automatically-expected.txt: Removed.
* platform/gtk/http/tests/media/video-auth-expected.txt: Removed.
* platform/gtk/http/tests/misc/401-alternative-content-expected.txt: Removed.
* platform/gtk/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt: Removed.
* platform/gtk/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt: Removed.
* platform/gtk/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt: Removed.
* platform/gtk/http/tests/security/401-logout/401-logout-expected.txt: Removed.
* platform/gtk/http/tests/xmlhttprequest/failed-auth-expected.txt: Removed.
* platform/gtk/http/tests/xmlhttprequest/remember-bad-password-expected.txt: Removed.
* platform/wk2/http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials-expected.txt:
* platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
* platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt:
* platform/wk2/http/tests/media/video-auth-expected.txt: Renamed from LayoutTests/platform/efl/http/tests/media/video-auth-expected.txt.
* platform/wk2/http/tests/misc/401-alternative-content-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin-expected.txt:
* platform/wk2/http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt:
* platform/wk2/http/tests/security/401-logout/401-logout-expected.txt:
* platform/wk2/http/tests/xmlhttprequest/failed-auth-expected.txt:
* platform/wk2/http/tests/xmlhttprequest/remember-bad-password-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simple ES6 feature:String prototype additions
https://bugs.webkit.org/show_bug.cgi?id=131704

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-09-19
Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncStartsWith): Added.
(JSC::stringProtoFuncEndsWith): Added.
(JSC::stringProtoFuncContains): Added.

Source/WTF:

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::equalInner): Added.
(WTF::StringImpl::startsWith): Add implementation that supports
'startOffset' parameter.
(WTF::StringImpl::endsWith): Add implementation that supports
'endOffset' parameter.
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
(WTF::String::contains): Modify current implementation to allow
setting a startOffset, 0 by default.
(WTF::String::startsWith):
(WTF::String::endsWith):

LayoutTests:

Test ES6 functions: string.startsWith(), string.endsWith() and
string.contains().

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/string-contains.js: Added.
(stringToSearchIn.toString):
(startOffset.valueOf):
(matchString.toString):
(endOffset.valueOf):
* js/string-contains-expected.txt: Added.
* js/string-contains.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Mac Mavericks build. Only iOS cares about fencing.

* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Always assume internal SDK when building configuration Production
https://bugs.webkit.org/show_bug.cgi?id=136925
<rdar://problem/18362399>

Reviewed by Dan Bernstein.

Source/bmalloc:

* Configurations/Base.xcconfig:

Source/JavaScriptCore:

As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.

* Configurations/Base.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:

Source/WebCore:

As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.

* Configurations/Base.xcconfig:

Source/WebInspectorUI:

* Configurations/DebugRelease.xcconfig: Also move #include of HaveInternalSDK.xcconfig from DebugRelease.xcconfig
to Base.xcconfig so as to be consistent with the format of other Base.xcconfig/DebugRelease.xcconfig files
(e.g. Source/WebCore/Configurations/Base.xcconfig and Source/WebCore/Configurations/DebugRelease.xcconfig).

Source/WebKit/mac:

As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.

* Configurations/Base.xcconfig:

Source/WebKit2:

As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.

* Configurations/Base.xcconfig:

Source/WTF:

* Configurations/Base.xcconfig:

Tools:

* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Videos with controls enabled never receive 'dragstart' events.
https://bugs.webkit.org/show_bug.cgi?id=136837

Reviewed by Sam Weinig.

* media/video-controls-drag-expected.txt: Added.
* media/video-controls-drag.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow DOM methods to return references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=136931

Source/WebCore:

Reviewed by Sam Weinig.

It is common practice in WebKit to have methods return a reference
instead of a pointer if the pointer can never be null. However, this
unfortunately did not work for DOM methods (functions called by JS
bindings). This prevented further refactoring.

This patch brings support for having DOM methods to return references
instead of pointers when the pointer cannot be null. The generated
bindings were calling WTF::getPtr() on the pointer type returned by
the implementation already (in case it was a smart pointer type).
This patch leverages this by having WTF::getPtr() convert reference
arguments into raw pointers.

This patch also updates a few DOM methods on Document and Element
classes to return a reference instead of a pointer, to test the change.
There are likely more DOM methods that can be updated though.

No new tests, no behavior change.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::classList):
* bindings/js/JSDOMBinding.h:
(WTF::getPtr): Deleted.
* dom/Document.cpp:
(WebCore::Document::implementation):
(WebCore::Document::webkitGetNamedFlows):
(WebCore::Document::namedFlows):
(WebCore::Document::setXMLVersion):
(WebCore::Document::setXMLStandalone):
(WebCore::Document::securityPolicy):
(WebCore::Document::styleSheets):
* dom/Document.h:
(WebCore::Document::timing):
* dom/Element.cpp:
(WebCore::Element::classList):
(WebCore::Element::dataset):
* dom/Element.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::setPosition):
(WebCore::MediaControlPanelElement::resetPosition):
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::displayLastTextTrackCueBox):
(WebCore::VTTRegion::willRemoveTextTrackCueBox):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::documentTiming):
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::ensureRenderFlowThreadWithName):

Source/WTF:

Add support for having WTF::getPtr() transform reference arguments
into raw pointers so that DOM methods can now return references when
appropriate and so that the generated bindings code can handle this
via WTF::getPtr().

This patch had to alter the way getPtr() was overloaded for smart
pointer types so that we don't call &p on smart pointers but p.get().
This was needed because the new WTF::getPtr(T&) was being called for
RefPtr<T> arguments instead of the getPtr(const RefPtr<T>&) overload.
This was addressed using traits and template specialization to
distinguish WTF smart pointers from other types.

Reviewed by Sam Weinig.

* wtf/GetPtr.h:
(WTF::getPtr):
* wtf/OwnPtr.h:
(WTF::getPtr): Deleted.
* wtf/PassOwnPtr.h:
(WTF::getPtr): Deleted.
* wtf/PassRefPtr.h:
(WTF::getPtr): Deleted.
* wtf/Ref.h:
* wtf/RefPtr.h:
(WTF::getPtr): Deleted.
* wtf/gobject/GRefPtr.h:
(WTF::getPtr): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Provide a default argument for the most commonly used HitTestRequest variant
https://bugs.webkit.org/show_bug.cgi?id=136653

Reviewed by Darin Adler.

Make the default HitTestRequest flags be ReadOnly | Active | DisallowShadowContent
and change call sites using the default flags to use a HitTestRequest temporary.

Source/WebCore:

* dom/TreeScope.cpp:
(WebCore::nodeFromPoint):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::contains):
* page/DragController.cpp:
(WebCore::elementUnderMouse):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseDraggedEvent):
(WebCore::EventHandler::handleMousePressEvent):
* rendering/HitTestRequest.h:
(WebCore::HitTestRequest::HitTestRequest):

Source/WebKit2:

* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r173464): It broke the !ENABLE(PICTURE_SIZES) build
https://bugs.webkit.org/show_bug.cgi?id=136942

Reviewed by Simon Fraser.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):


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