[Curl] Session cookies should not be persistent.
https://bugs.webkit.org/show_bug.cgi?id=111060

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-03-01
Reviewed by Brent Fulgham.

Curl saves both persistent cookies, and session cookies to the cookie file.
The session cookies should be deleted before starting a new session.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::ResourceHandleManager): Call method to initialize cookie session.
(WebCore::ResourceHandleManager::initCookieSession): Added method to initialize cookie session.
* platform/network/curl/ResourceHandleManager.h: Added method to initialize cookie session.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Build fix for builds with BLOB disabled. This fixes it for me on Mac at least.

        * platform/network/BlobRegistryImpl.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Mark rtl-iframe-absolute-overflow-scrolled as flaky.
https://bugs.webkit.org/show_bug.cgi?id=111199

Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename MovHint to MovHintEvent so I can create a NodeType called MovHint

Rubber stamped by Mark Hahnenberg.
        
This is similar to the SetLocal/SetLocalEvent naming scheme, where SetLocal is the
NodeType and SetLocalEvent is the VariableEventKind.

* dfg/DFGVariableEvent.cpp:
(JSC::DFG::VariableEvent::dump):
* dfg/DFGVariableEvent.h:
(JSC::DFG::VariableEvent::movHint):
(JSC::DFG::VariableEvent::id):
(JSC::DFG::VariableEvent::operand):
(VariableEvent):
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::reconstruct):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't return statistics in PerfTest.run
https://bugs.webkit.org/show_bug.cgi?id=111145

Reviewed by Dirk Pranke.

Simply return a list of values obtained in each iteration from PerfTest.run.
Also simplify various methods as needed.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTestMetric.__init__): Moved the code to convert 'Time' metric to 'FrameRate' and 'Runs'
as needed from PerfTestsRunner._generate_results_dict.

(PerfTestMetric.legacy_chromium_bot_compatible_test_name): Always append the metric name now
that we don't have to worry about the backward compatibility here.

(PerfTestMetric.iteration_values): Added.
(PerfTestMetric.unit): Added.
(PerfTestMetric.metric_to_unit):
(PerfTestMetric.time_unit_to_metric): Extracted from PerfTestsRunner._generate_results_dict.

(PerfTest.run):
(PerfTest.log_statistics): Merged compute_statistics and self.output_statistics.

* Scripts/webkitpy/performance_tests/perftest_unittest.py:
(TestPerfTestMetric.test_init_set_missing_unit):
(TestPerfTestMetric.test_init_set_time_metric): Added.
(TestPerfTestMetric.test_legacy_chromium_bot_compatible_test_name):
(TestPerfTestMetric.test_append):
(TestPerfTestMetric.test_compute_statistics): Removed. Integration tests check some of these
test cases and it's not critical to keep math right as they're not used in output JSON anymore.
(TestPerfTest._assert_results_are_correct):
(TestReplayPerfTest.test_run_with_driver_accumulates_results):
(TestReplayPerfTest.test_run_with_driver_accumulates_memory_results):

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._generate_results_dict):

* Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
(EventTargetWrapperTestData): The metric name shows up at the end of the test name as expected.
(SomeParserTestData): Ditto.
(MemoryTestData): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash at WebCore::SharedBuffer::hasPlatformData during paste.
https://bugs.webkit.org/show_bug.cgi?id=111207.
<rdar://problem/13024528>

Reviewed by Ryosuke Niwa.

This is a speculative fix since we don't have a solid repro case.
Adding null check every time we get a SharedBuffer from the pasteboard.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::plainText):
(WebCore::documentFragmentWithRTF):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG CSE phase shouldn't rely on ref count of nodes, since it doesn't have to
https://bugs.webkit.org/show_bug.cgi?id=111205

Reviewed by Oliver Hunt.
        
I don't understand the intuition behind setLocalStoreElimination() validating that the SetLocal's ref count
is 1. I believe this is a hold-over from when setLocalStoreElimination() would match one SetLocal to another,
and then try to eliminate the first SetLocal. But that's not how it works now. Now, setLocalStoreElimination()
is actually Flush elimination: it eliminates any Flush that anchors a SetLocal if it proves that every path
from the SetLocal to the Flush is devoid of operations that may observe the local. It doesn't actually kill
the SetLocal itself: if the SetLocal is live because of other things (other Flushes or GetLocals in other
basic blocks), then the SetLocal will naturally still be alive because th Flush was only keeping the SetLocal
alive by one count rather than being solely responsible for its liveness.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::setLocalStoreElimination):
(JSC::DFG::CSEPhase::eliminate):
(JSC::DFG::CSEPhase::performNodeCSE):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash at WebCore::SharedBuffer::hasPlatformData writing an image to the pasteboard.
https://bugs.webkit.org/show_bug.cgi?id=111211.
<rdar://problem/8772758>

Reviewed by Ryosuke Niwa.

This is a speculative fix since we don't have a solid repro case.
Adding null check every time we build a SharedBuffer from an NSData
we have obtained manipulating data from the pasteboard.

* platform/mac/PasteboardMac.mm:
(WebCore::writeFileWrapperAsRTFDAttachment):
(WebCore::Pasteboard::writeImage):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r144318) 1-7% perf. regression on SVG/SvgHitTesting
https://bugs.webkit.org/show_bug.cgi?id=111117

Make sure the allocated vector has a capacity of 1, since that is
far and away the most common case.

Reviewed by Andreas Kling.

* rendering/RenderFlowThread.h:
(WebCore):
* rendering/RenderLayer.h:
(WebCore):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::collectLayerFragments):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.h:
(WebCore):
(WebCore::RenderRegion::collectLayerFragments):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
getComputedStyle not implemented for -webkit-column-rule shorthand
https://bugs.webkit.org/show_bug.cgi?id=111203

Patch by Uday Kiran <udaykiran@motorola.com> on 2013-03-01
Reviewed by Alexis Menard.

Source/WebCore:

Implement getComputedStyle for -webkit-column-rule property.

Test: fast/css/getComputedStyle/getComputedStyle-column-rule.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

LayoutTests:

Add test to check getComputedStyle for -webkit-column-rule.

* fast/css/getComputedStyle/getComputedStyle-column-rule-expected.txt: Added.
* fast/css/getComputedStyle/getComputedStyle-column-rule.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG Branch(LogicalNot) peephole should not try to optimize and work-around the case where LogicalNot may be otherwise live
https://bugs.webkit.org/show_bug.cgi?id=111209

Reviewed by Oliver Hunt.
        
Even if it is then everything will work just fine. It's not necessary to check the ref count here.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[css exclusions] setting shape-inside on a parent does not relayout child blocks' inline content
https://bugs.webkit.org/show_bug.cgi?id=108128

Reviewed by David Hyatt.

Source/WebCore:

Ensure that blocks lay out when their parent's shape-inside changes.
ExclusionShapeInsideInfo now stores an additional flag indicating whether
the shape has changed and its block's children require layout. Each block
can look up the flag via LayoutState to determine whether it needs to lay
out its children.

Test: fast/exclusions/shape-inside/shape-inside-dynamic-nested.html

* rendering/ExclusionShapeInfo.h:
(WebCore::ExclusionShapeInfo::shapeSizeDirty): Add a method to determine
if the shape has changed.
(ExclusionShapeInfo):
* rendering/ExclusionShapeInsideInfo.h:
(WebCore::ExclusionShapeInsideInfo::setNeedsLayout): Set the flag indicating
layout is necessary.
(WebCore::ExclusionShapeInsideInfo::needsLayout): Retrieve the layout flag.
(ExclusionShapeInsideInfo):
(WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Initialize
the layout flag.
* rendering/RenderBlock.cpp:
(WebCore::exclusionInfoRequiresRelayout): Return true if the shape info should
cause a relayout. Also update the needsLayout flag on the ExclusionShapeInsideInfo.
(WebCore):
(WebCore::RenderBlock::updateRegionsAndExclusionsLogicalSize): Return a boolean
indicating whether regions or exclusions updates should cause a relayout.
(WebCore::RenderBlock::layoutBlock): Relayout children if the shape inside has
changed.
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Changing to be a
class method.
(WebCore::LineWidth::LineWidth): Changing to use class method.
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.
(WebCore::constructBidiRunsForLine): Ditto.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): Ditto.

LayoutTests:

Test that setting and resetting shape-inside and shape-outside correctly lay out
content inside of child blocks.

* fast/exclusions/shape-inside/shape-inside-dynamic-nested-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-dynamic-nested.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Improve input bounds clipping for search fields.
https://bugs.webkit.org/show_bug.cgi?id=111204

Reviewed by Rob Buis.

PR 292673.

Use the standardized InputHandler function to get the
bounds of an input field so that search fields are
truncated smaller to account for the X.

Reviewed Internally by Gen Mak.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::setCaretPosition):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Objective-C API: Passing JS functions to Objective-C callbacks causes JSValue to leak
https://bugs.webkit.org/show_bug.cgi?id=107836

Reviewed by Oliver Hunt.

We've decided to remove support for this feature from the API because there's no way to automatically manage
the memory for clients in a satisfactory manner. Clients can still pass JS functions to Objective-C methods,
but the methods must accept plain JSValues instead of Objective-C blocks.

We now ignore functions that are part of a protocol that inherits from JSExport that accept blocks as arguments.

* API/JSBlockAdaptor.h: Removed.
* API/JSBlockAdaptor.mm: Removed.
* API/ObjCCallbackFunction.mm:
(ArgumentTypeDelegate::typeBlock): Return nil to signal that we want to ignore this function when copying it
to the object from the protocol.
* API/tests/testapi.mm: Added a test to make sure that we ignore methods declared as part of a JSExport-ed protocol
that have block arguments.
(-[TestObject bogusCallback:]):
* JavaScriptCore.gypi: Updated build files.
* JavaScriptCore.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add ANGLE to the GTK+ gyp build
https://bugs.webkit.org/show_bug.cgi?id=111128

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-03-01
Reviewed by Dirk Pranke.

Add files that build an ANGLE static library for GTK+ using gyp.

* ANGLE.gyp/ANGLE.gyp: Added.
* ANGLE.gypi: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed VS2010 build fix.

* WebCore.vcxproj/WebCore.vcxproj: Add missing TimelineTraceEventProcessor
  files to the project.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Increase number of patches processed before clean building on WinEWS bots.

* EWSTools/start-queue-win.sh:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Screen went black while navigating back/forward on the reddit.com page
https://bugs.webkit.org/show_bug.cgi?id=111192

Patch by Jacky Jiang <zhajiang@rim.com>.
Reviewed by Rob Buis.
Internally reviewed by Jakob Petsovits.

PR: 299783
When going back to the previous reddit.com page, the actual contents
size was much less than the history contents size. However, we expanded
the actual contents size to history contents size which caused a huge
black area below the actual contents.
To fix that, don't restore the contents size from history contents size
and scroll back to the valid contents area if we are about to overscroll.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add SPI for marking a WebView as doing things on behalf of another process
https://bugs.webkit.org/show_bug.cgi?id=111125

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* platform/network/NetworkingContext.h:
(NetworkingContext):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
Set the sourceApplicationAuditData on the URL connection if available.

Source/WebKit/mac:

* WebCoreSupport/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext):
* WebCoreSupport/WebFrameNetworkingContext.mm:
(WebFrameNetworkingContext::sourceApplicationAuditData):
* WebView/WebView.mm:
(-[WebView _setSourceApplicationAuditData:]):
(-[WebView _sourceApplicationAuditData]):
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
(-[WebViewPrivate dealloc]):
* WebView/WebViewPrivate.h:
Add SPI for setting a source application for a WebView.

Source/WebKit2:

* NetworkProcess/mac/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
Stub out sourceApplicationAuditData() client function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Uncomment ENABLE_SVG guards to avoid having WebKitPluginProcess link
against libWebCoreSVG.la when SVG is disabled.

Rubber-stamped by Gustavo Noronha.

* GNUmakefile.am:


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