[EFL] Make XVFBDriver optional
https://bugs.webkit.org/show_bug.cgi?id=131036

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-05-14
Reviewed by Gyuyoung Kim.

* Scripts/webkitpy/port/efl.py:
(EflPort._driver_class):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(CMAKE): [GTK] InputMethodFilter unit test is not built
https://bugs.webkit.org/show_bug.cgi?id=132686

Reviewed by Philippe Normand.

Bring back InputMethodFilter test to the build and compile it into
a single binary TestWebCore with the other WebCore tests. Also
move it from TestWebKitAPI/gtk/ to TestWebKitAPI/Tests/WebCore/gtk/.

* Scripts/run-gtk-tests:
(TestRunner): Remove WebCoreGtk from the list of test directories.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebCore/gtk/InputMethodFilter.cpp: Renamed from Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RuleData should ref the StyleRule
https://bugs.webkit.org/show_bug.cgi?id=132865

Reviewed by Andreas Kling.

As a defensive move make RuleData ref the StyleRule. 
This adds some ref churn but the overall performance impact should be minimal.

* css/RuleSet.h:
(WebCore::RuleData::rule):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Don't relayout when updating the region range unless necessary
https://bugs.webkit.org/show_bug.cgi?id=132120

Reviewed by Antti Koivisto.

The patch reduces the cases when a relayout is made for boxes that change the region range.
This lowers the amount of nested layouts in most cases and produces big layout speedups for trees
without overhanging floats.

Tests: Major performance improvement with speedups of 50-60% on:
Layout/RegionsAuto.html, Layout/RegionsAutoMaxHeight.html and Layout/RegionsFixed.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionRangeForBoxChild): Ask the child box if it needs a relayout
in case its region range changes.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild): It's not necessary to do two layouts here because
there's no block direction position change between them for the child.
(WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange): If the block doesn't have floats
or if it expands to enclose the floats it doesn't need to relayout after a region range chage.
It's not possible for it to have a float inside overflow that must be repositioned using the new
range.
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.h:
(WebCore::RenderBox::needsLayoutAfterRegionRangeChange): By default don't relayout after a region
range change.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Add ASSERT to make sure using the flowThread cache does not return incorrect results
https://bugs.webkit.org/show_bug.cgi?id=132906

Reviewed by Andrei Bucur.

If flowThreadContainingBlock() is called on an object which is in a different
flow thread than the one currently being laid out, this method will return an incorrect
result. I added an assertion for that to make sure we catch and treat any such scenarios.

No new tests required.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::locateFlowThreadContainingBlockNoCache):
(WebCore::RenderObject::locateFlowThreadContainingBlock):
* rendering/RenderObject.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix line ending style for the test (as an experiment).

* css3/calc/simple-calcs-prefixed.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove CSS_STICKY_POSITION guards
https://bugs.webkit.org/show_bug.cgi?id=132676

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-05-14
Reviewed by Simon Fraser.

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

Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
* Configurations/FeatureDefines.xcconfig:
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EPosition):
* css/CSSValueKeywords.in:
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::convertPositionStyle):

Source/WebKit/mac:
* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
* Configurations/FeatureDefines.xcconfig:

Source/WTF:
* wtf/FeatureDefines.h:

Tools:
* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:
* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change line endings of some test files to LF to make it easier to commit and test changes.

* css3/calc/simple-calcs.html:
* css3/calc/simple-minmax.html:
* css3/calc/transforms-scale-expected.html:
* css3/calc/transforms-scale.html:
* css3/calc/transforms-translate-expected.html:
* css3/calc/transforms-translate.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ARM Traditional buildfix after r168776.
https://bugs.webkit.org/show_bug.cgi?id=132903

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-14
Reviewed by Darin Adler.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::abortWithReason): Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
alidation for getUserMedia() errorCallback is missing.
https://bugs.webkit.org/show_bug.cgi?id=132901

Patch by Kiran <kiran.guduru@samsung.com> on 2014-05-14
Reviewed by Darin Adler.

Source/WebCore:
The patch adds the validation for getUserMedia errorCallBack
and throws TypeMismatchError.

Test: fast/mediastream/getusermedia.html

* Modules/mediastream/NavigatorUserMedia.cpp:
(WebCore::NavigatorUserMedia::webkitGetUserMedia):

LayoutTests:
This test checks for null values in getUserMedia errorCallback.

* fast/mediastream/getusermedia.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
follow-up fixes:

    "platform/mac/plugins/testplugin-onnew-onpaint.html failing after
        r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4
    "[Win] Unreviewed build fix after r168668.", commit
        4fa470ad12c38ee7d4c114541b6dd321181a8bc9

The original merged patch appears to have caused a regression in
fast/dom/HTMLObjectElement/object-as-frame.html.

<https://bugs.webkit.org/show_bug.cgi?id=132886>

Reviewed by Alexey Proskuryakov.

Source/WebCore:
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
* dom/Document.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::renderWidgetForJSBindings):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderWidgetForJSBindings):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired): Deleted.
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

LayoutTests:
* compositing/plugins/composited-plugin.html:
* compositing/plugins/no-backing-store.html:
* fast/dom/beforeload/flash-before-load.html:
* fast/events/beforeload-assertion-expected.txt: Removed.
* fast/events/beforeload-assertion.html: Removed.
* fast/events/beforeload-iframe-crash-expected.txt: Removed.
* fast/events/beforeload-iframe-crash.html: Removed.
* fast/events/beforeload-input-time-crash-expected.txt: Removed.
* fast/events/beforeload-input-time-crash.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
(testImpl.iframe.onload):
(testImpl):
* http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
* platform/mac/plugins/supports-carbon-event-model.html:
* platform/mac/plugins/testplugin-onnew-onpaint.html:
* plugins/get-user-agent-with-null-npp-from-npp-new.html:
* plugins/mouse-click-plugin-clears-selection.html:
* plugins/netscape-plugin-map-data-to-src.html:
* plugins/no-mime-with-valid-extension.html:
* plugins/plugin-initiate-popup-window.html:
* plugins/windowless_plugin_paint_test.html:
* resources/plugin.js: Removed.

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

The patch added an assertion which fires on 6 tests (Requested
by ap on #webkit).

Reverted changeset:

"[CSS Regions] Add ASSERT to make sure using the flowThread
cache does not return incorrect results"
https://bugs.webkit.org/show_bug.cgi?id=132906
http://trac.webkit.org/changeset/168837

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use references instead of pointers with ResourceLoadTiming.
https://bugs.webkit.org/show_bug.cgi?id=132846

Reviewed by Alexey Proskuryakov.


Source/WebCore: 
* WebCore.exp.in:
Removed ResourceResponseBase::setResourceLoadTiming linker symbol.
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::requestStart):
Use references instead of pointers.
* page/PerformanceResourceTiming.h:
Make an instance instead of a RefPtr.
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::domainLookupStart):
(WebCore::PerformanceTiming::domainLookupEnd):
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::connectEnd):
(WebCore::PerformanceTiming::secureConnectionStart):
(WebCore::PerformanceTiming::requestStart):
(WebCore::PerformanceTiming::responseStart):
Check to see if the loader exists, then use ResourceLoadTiming reference.
(WebCore::PerformanceTiming::resourceLoadTiming): Deleted.
* page/PerformanceTiming.h:
Removed resourceLoadTiming declaration.
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::ResourceLoadTiming):
(WebCore::ResourceLoadTiming::operator=):
Replaced reference counting with copy constructors.
(WebCore::ResourceLoadTiming::create): Deleted.
(WebCore::ResourceLoadTiming::deepCopy): Deleted.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
(WebCore::ResourceResponseBase::resourceLoadTiming):
(WebCore::ResourceResponseBase::setResourceLoadTiming):
(WebCore::ResourceResponseBase::compare):
* platform/network/ResourceResponseBase.h:
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::didStartRequest):
(WebCore::networkEventCallback):
Use references instead of pointers.

Source/WebKit2: 
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
Use references instead of pointers and null checks.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-05-14  Zalan Bujtas  <zalan@apple.com>

    Fix line ending style for the test.

    * editing/selection/drag-start-event-client-x-y.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
sourceFrameOnScreenForShareItem: can be off by a pixel
<rdar://problem/16878020> and https://bugs.webkit.org/show_bug.cgi?id=132911

Reviewed by Simon Fraser.

In a land of LayoutUnits and sub-pixel rendering, converting between IntRects and
FloatRects can be error prone. So we now try to minimize such conversions.

* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController sharingService:sourceFrameOnScreenForShareItem:]):

* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::clientFloatRectForNode): Split this into a separate utility method
  as it will be shared with other code very soon. Instead of using absoluteBoundingBoxRect()
  which does lossy float->int conversions, try to keep things in terms of FloatRects as
  much as possible.
(WebContextMenuClient::screenRectForHitTestNode): Call clientFloatRectForNode to get the
  FloatRect, then perform the lossy rounding conversion to an IntRect only once.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(WK2): Many pages have very wrong text size after rotating.
https://bugs.webkit.org/show_bug.cgi?id=132893
<rdar://problem/16806958>

Reviewed by Benjamin Poulain.

Whenever our viewport width changes we must reset text autosizing
on the renderer.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
(WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded):
(WebKit::WebPage::dynamicViewportSizeUpdate):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor duplicate code in web timing.
https://bugs.webkit.org/show_bug.cgi?id=132917

Reviewed by Alexey Proskuryakov.

* platform/network/ResourceHandle.h:
Added getTimingData declaration.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getTimingData):
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
Moved duplicate code to ResourceHandle.



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

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getTimingData):
Protect use of timing data with ENABLE(WEB_TIMING).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another unreviewed build fix.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getTimingData):
Added necessary UNUSED_PARAMs.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement NSSharingServiceDelegate method "transitionImageForShareItem"
<rdar://problem/16878020> and https://bugs.webkit.org/show_bug.cgi?id=132911

Reviewed by Tim Horton.

Source/WebCore:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit/mac:
* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController sharingService:transitionImageForShareItem:contentRect:]):

* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::renderedImageForControlledImage): Paint the entire content rect for the controlled image
  into an ImageBuffer, then return the resulting NSImage. This only paints the image itself and not any
  overlapping content by setting the selection and appropriate painting mode.

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