[chromium] Unreviewed gardening. Skipping calendar-picker-datetime-with-step.html.

It looks like platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime-with-step.html
started failing at midnight PST, December 1st. I don't think it handled
the month change correctly. Filed https://bugs.webkit.org/show_bug.cgi?id=103817
to cover the fix.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed gardening. Skipping crashing tests.

The DEPS roll containing r170422 is causing three crashes cross-platform
in the Chromium port. Skipping them here, filed crbug.com/163785 to fix.

* platform/chromium/TestExpectations:
    Marked media/encrypted-media/encrypted-media-events.html,
    media/encrypted-media/encrypted-media-not-loaded.html, and
    media/encrypted-media/encrypted-media-syntax.html as crashing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r136015.
http://trac.webkit.org/changeset/136015
https://bugs.webkit.org/show_bug.cgi?id=103821

Did not heal performance bot and caused other performance
regressions (Requested by abarth on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-01

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[XvfbDriver] XvfbDriverTest.test_next_free_display is flaky on builders using XvfbDriver
https://bugs.webkit.org/show_bug.cgi?id=103806

Reviewed by Dirk Pranke.

There are occasional mishaps on builders where XvfbDriver doesn't properly
clean up the Xvfb instance it was managing so the related guard lock files
are still existing when the webkitpy unit tests are run. This can cause failures
in XvfbDriverTest.test_next_free_display as the test tries to acquire displays
with a specific number but is unable to due to the stale locks.

The solution to this is to use MockFileLock when inside unit test. This is achievable
by creating a file lock through the SystemHost instance connected to the Port object,
the latter available to the Driver.

* Scripts/webkitpy/common/system/file_lock_mock.py:
(MockFileLock.acquire_lock): Return True to signal lock acquiring succeeded.
(MockFileLock.release_lock): Return True to signal lock releasing succeeded.
* Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
(XvfbDriver._next_free_display): Create the file lock through a mockable way.
* Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
(XvfbDriverTest.test_next_free_display): Enable back the unit test.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wk2] Use spoolRect instead of snapshots for print preview
https://bugs.webkit.org/show_bug.cgi?id=103798
<rdar://problem/12686749>

Reviewed by Sam Weinig.

Revert to using spoolRect instead of snapshotting for printing; this was a bogus
change I made in http://trac.webkit.org/changeset/133935 which was irrelevant to
the core of that change, and incorrectly disregards the Frame parameter passed to
beginPrinting, instead using the WebPage's current Frame.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRectToImage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PDFPlugin: <embed> and <object> PDFs affect their parent frame's page scale
https://bugs.webkit.org/show_bug.cgi?id=103286
<rdar://problem/12752315>

Reviewed by Dan Bernstein.

Detecting whether or not a PDFPlugin is a full-page plugin or not is not
as simple as checking isMainFrame(), because <embed> and <object> will
cause PDFPlugin to live in the main frame, while still not being full-page.
We also have to check that the main frame's document is a PluginDocument,
and whether that PluginDocument's PluginWidget is our PDFPlugin's PluginView.

* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin): Add isFullFramePlugin.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::isFullFramePlugin): Check whether the main frame is
backed by a PluginDocument, and that that PluginDocument corresponds
to this PDFPlugin.
(WebKit::PDFPlugin::handlesPageScaleFactor): Use isFullFramePlugin.
(WebKit::PDFPlugin::supportsForms): Use isFullFramePlugin.




git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PDFPlugin: Support PDF form editing in <iframe>s
https://bugs.webkit.org/show_bug.cgi?id=103287
<rdar://problem/10326917>

Reviewed by Dan Bernstein.

PDFPlugin form editing depends on having a Document that has the same
size and position as the plugin; this is true not only in the full-main-frame
case, but also in the <iframe> case. Therefore, we can enable form editing
for <iframe> PDFPlugins.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::supportsForms): Support form editing whenever
our Document's widget is our PluginView (which will only be true in the
full-main-frame or <iframe> case).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeBlock should be able to dump bytecode to something other than WTF::dataFile()
https://bugs.webkit.org/show_bug.cgi?id=103832

Reviewed by Oliver Hunt.

Add a PrintStream& argument to all of the CodeBlock bytecode dumping methods.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecodeCommentAndNewLine):
(JSC::CodeBlock::printUnaryOp):
(JSC::CodeBlock::printBinaryOp):
(JSC::CodeBlock::printConditionalJump):
(JSC::CodeBlock::printGetByIdOp):
(JSC::dumpStructure):
(JSC::dumpChain):
(JSC::CodeBlock::printGetByIdCacheStatus):
(JSC::CodeBlock::printCallOp):
(JSC::CodeBlock::printPutByIdOp):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
(JSC::CodeBlock::dumpBytecode):
* bytecode/CodeBlock.h:
(CodeBlock):
* jit/JITDisassembler.cpp:
(JSC::JITDisassembler::dumpForInstructions):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r136236.
http://trac.webkit.org/changeset/136236
https://bugs.webkit.org/show_bug.cgi?id=103833

[chromium] Flakey crashes in SpeechRecognitionEvent::emma
during GC. (Requested by mkwst on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-02

Source/WebCore:

* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::start):
* Modules/speech/SpeechRecognition.h:
(SpeechRecognition):
* Modules/speech/SpeechRecognitionEvent.cpp:
(WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
* Modules/speech/SpeechRecognitionEvent.h:
(SpeechRecognitionEventInit):
(SpeechRecognitionEvent):
(WebCore::SpeechRecognitionEvent::resultIndex):
* Modules/speech/SpeechRecognitionEvent.idl:
* Modules/speech/SpeechRecognitionResult.cpp:
(WebCore::emmaQualifiedName):
(WebCore):
(WebCore::SpeechRecognitionResult::emma):
* Modules/speech/SpeechRecognitionResult.h:
(WebCore):
(WebCore::SpeechRecognitionResult::final):
(SpeechRecognitionResult):
* Modules/speech/SpeechRecognitionResult.idl:
* WebCore.gypi:
* bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8SpeechRecognitionEventCustom.cpp.
(WebCore):
(WebCore::V8SpeechRecognitionResult::opaqueRootForGC):

Source/WebKit/chromium:

* public/WebSpeechRecognizerClient.h:
* src/SpeechRecognitionClientProxy.cpp:
* src/SpeechRecognitionClientProxy.h:
(SpeechRecognitionClientProxy):

Tools:

* DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:

LayoutTests:

* fast/speech/scripted/emma-expected.txt:
* fast/speech/scripted/emma.html:
* fast/speech/scripted/speechrecognition-basics-expected.txt:
* fast/speech/scripted/speechrecognition-basics.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] MiniBrowser should have a legacy mode
https://bugs.webkit.org/show_bug.cgi?id=103679

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-12-02
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

We need a way to create a web view in legacy mode, while still using the default context.
WKViewCreate creates a legacy view, so change it to create a default context if a context
was not passed.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_base_add):

Tools:

Add an option to start MiniBrowser in legacy mode.

* MiniBrowser/efl/main.c:
(window_create):
(elm_main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Adding checks for null when checking cookie status in CookieJarBlackBerry
https://bugs.webkit.org/show_bug.cgi?id=103748

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-12-02
Reviewed by Rob Buis.

Updating CookieJarBlackBerry::cookieEnabled and have other methods in the class call that
method. Also, adding null checks for document->settings().

No change in behaviour.

* loader/blackberry/CookieJarBlackBerry.cpp:
(WebCore::cookies):
(WebCore::setCookies):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::cookieRequestHeaderFieldValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CoordinatedGraphics] Crash in TextureMapperLayer::setBackingStore()
https://bugs.webkit.org/show_bug.cgi?id=103714

Patch by No'am Rosenthal <noam@webkit.org> on 2012-12-02
Reviewed by Kenneth Rohde Christiansen.

Remove a layer from the m_pendingSyncBackingStores map when it is deleted.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::deleteLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need a method to close all idle localstorage databases immediately.
https://bugs.webkit.org/show_bug.cgi?id=103469

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2012-12-02
Reviewed by David Kilzer.

Source/WebCore:

Add a new PageGroup method closeIdleLocalStorageDatabases, which walks through
all local storage areas that don't have document referencing to them and closes
their underlying databases.

Test: storage/domstorage/localstorage/close-idle-localstorage-databases-immediately.html

* WebCore.exp.in:
* page/PageGroup.cpp:
(WebCore::PageGroup::clearLocalStorageForOrigin):
(WebCore):
(WebCore::PageGroup::closeIdleLocalStorageDatabases): walking through all idle local storages and
    closing their databases.
* page/PageGroup.h:
(PageGroup):
* storage/StorageArea.h:
(WebCore::StorageArea::closeDatabaseIfIdle):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::closeDatabaseIfIdle): close the database if it is idle.
(WebCore):
* storage/StorageAreaImpl.h:
(StorageAreaImpl):
* storage/StorageNamespace.h:
(StorageNamespace):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::closeIdleLocalStorageDatabases):
(WebCore):
* storage/StorageNamespaceImpl.h:
(StorageNamespaceImpl):

Source/WebKit/mac:

Add a new method to WebStorageManager that we can call to close all
idle local storage databases.

* Storage/WebStorageManager.mm:
(+[WebStorageManager closeIdleLocalStorageDatabases]):
* Storage/WebStorageManagerPrivate.h:

Tools:

Add an JS method to TestRunner, to enable testing closing idle local storage databases in
DumpRenderTree layout tests.

* DumpRenderTree/TestRunner.cpp:
(closeIdleLocalStorageDatabasesCallback):
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner):
* DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
(TestRunner::closeIdleLocalStorageDatabases):
* DumpRenderTree/efl/TestRunnerEfl.cpp:
(TestRunner::closeIdleLocalStorageDatabases):
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
(TestRunner::closeIdleLocalStorageDatabases):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::closeIdleLocalStorageDatabases):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::closeIdleLocalStorageDatabases):
* DumpRenderTree/wx/TestRunnerWx.cpp:
(TestRunner::closeIdleLocalStorageDatabases):

LayoutTests:

* storage/domstorage/localstorage/close-idle-localstorage-databases-immediately-expected.txt: Added.
* storage/domstorage/localstorage/close-idle-localstorage-databases-immediately.html: Added.
* storage/resources/storage-close-idle-localstorage-databases-immediately.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid a second layout of flex items in layoutAndPlaceChildren()
https://bugs.webkit.org/show_bug.cgi?id=102352

Reviewed by Ojan Vafai.

Source/WebCore:

Avoid doing a second layout if we're going to get the same size as before.
This prevents us from doing an exponential number of layouts in some
common cases.

Test: css3/flexbox/stretch-after-sibling-size-change.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderContainer::layout): Force a layout of the track, which positions the thumb.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::needToStretchChild): Determine if a child is going to stretch.
(WebCore::RenderFlexibleBox::resetAutoMarginsAndLogicalTopInCrossAxis): Makes sure we're in a consistent state before
we apply auto margins.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
* rendering/RenderFlexibleBox.h: Add needToStretchChild.

LayoutTests:

Add a test case to make sure we relayout when a sibling is stretching.

* css3/flexbox/stretch-after-sibling-size-change-expected.txt: Added.
* css3/flexbox/stretch-after-sibling-size-change.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] make sourceDevice available to more WebGestureEvent subtypes
https://bugs.webkit.org/show_bug.cgi?id=103551

Reviewed by James Robinson.

Added an additional data payload to WebGestureEvent that can
contain the source device (touchpad or touchscreen).

* public/WebInputEvent.h:
* src/WebInputEvent.cpp:
(SameSizeAsWebGestureEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix occlusion culling logic to handle css background layer clipping
https://bugs.webkit.org/show_bug.cgi?id=103276

Reviewed by Simon Fraser.

Source/WebCore:

Bug was introduced by r135629
This patch fixes it by verifying layer clip.  A fill layer must
not be treated as if it occludes the layers under it unless it has
a larger or equal clip setting than the layers under it.

Test: fast/backgrounds/background-opaque-clipped-gradients.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
* rendering/style/FillLayer.cpp:
(WebCore::clipMax):
(WebCore::FillLayer::computeClipMax):
(WebCore::FillLayer::clipOccludesNextLayers):
* rendering/style/FillLayer.h:
(FillLayer):

LayoutTests:

New ref test that verifies the superposition of background layers with
the layers having smaller clip regions than the layers beneath them.
This test ensures the bottom layers are not removed by culling
optimizations.

* fast/backgrounds/background-opaque-clipped-gradients-expected.html: Added.
* fast/backgrounds/background-opaque-clipped-gradients.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-perf-tests --profile should use iprofiler instead of instruments on Mac
https://bugs.webkit.org/show_bug.cgi?id=103765

Reviewed by Ryosuke Niwa.

Stephanie pointed out that iprofiler is the newer command-line interface
to replace /usr/bin/instruments in Instruments 4 (which according to the
interblags is supported on everything since 10.6.6), so I've moved --profile
to use iprofiler on Mac.

I also made the IProfiler class wait for iprofiler to complete so that
iprofiler won't continue running after run-perf-tests is complete (and
spam over the top of your shell output).

There are a couple of "got-chas" to this approach:
1.  iprofiler will ask for your password the first time you run it, which may
    cause your first test to fail.  /usr/bin/instruments doesn't seem to do that.
2.  iprofiler has nice (but kinda awkward for our purposes) support for separate
    directory and basename arguments, making IProfiler a somewhat awkward
    baseclass of SingleFileOutputProfiler

I suspect we'll iterate from here.  It does seem slightly faster than
/usr/bin/instruments was.

* Scripts/webkitpy/common/system/profiler.py:
(ProfilerFactory.create_profiler):
(IProfiler):
(IProfiler.__init__):
(IProfiler.attach_to_pid):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify treeScope and setTreeScope
https://bugs.webkit.org/show_bug.cgi?id=103708

Patch by Elliott Sprehn <esprehn@gmail.com> on 2012-12-02
Reviewed by Hajime Morita.

By making the default treeScope in NodeRareData the document and then
moving the m_treeScope field to NodeRareDataBase we can make treeScope
inline and make setTreeScope much simpler.

There's also no reason to save calls to rareData() now that the map has
been eliminated by r133372 so we can eliminate the return value from
setTreeScope.

No new tests, just refactoring.

* WebCore.exp.in:
* dom/Document.h:
(WebCore::Node::treeScope):
(WebCore):
* dom/Element.cpp:
(WebCore::Element::createRareData):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::ElementRareData):
* dom/Node.cpp:
(WebCore::Node::setTreeScope):
(WebCore::Node::createRareData):
* dom/Node.h:
(NodeRareDataBase):
(WebCore::NodeRareDataBase::treeScope):
(WebCore::NodeRareDataBase::setTreeScope):
(WebCore::NodeRareDataBase::NodeRareDataBase):
(Node):
* dom/NodeRareData.cpp:
(WebCore::NodeRareData::reportMemoryUsage):
* dom/NodeRareData.h:
(WebCore::NodeRareData::NodeRareData):
(NodeRareData):
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [Resource Timing] implementation of cross origin resouce timing restrictions.
https://bugs.webkit.org/show_bug.cgi?id=84886.

Patch by Pan Deng <pan.deng@intel.com> on 2012-12-02
Reviewed by Tony Gentilcore.

This patch implemented resource timing behaviors of cross origin. By default, detailed timing info is hided in cross origin resource timing, only startTime, duration, fetchStart and responseEnd can be observed. Exceptions are, server side allow its origin can be timing by another through a header with "timing-allow-origin" field.

Tests: http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html
       http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html

* page/Performance.cpp:
(WebCore::passesTimingAllowCheck):
(WebCore):
(WebCore::Performance::addResourceTiming):
* page/Performance.h:
(WebCore):
(Performance):
* page/PerformanceResourceTiming.cpp:
(WebCore):
* page/PerformanceResourceTiming.h:
(WebCore::PerformanceResourceTiming::create):
(PerformanceResourceTiming):

LayoutTests: [Resource Timing]Test cases of cross origin resource timing.
https://bugs.webkit.org/show_bug.cgi?id=84886.

Patch by Pan Deng <pan.deng@intel.com> on 2012-12-02
Reviewed by Tony Gentilcore.

Test cases in this patch validate resource timing behavior when cross origin request with/without "allow-timing-origin" response header.

* http/tests/w3c/webperf/resources/blank_page_green_with_allow_timing.php: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request-expected.txt: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request-expected.txt: Added.
* http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry]Tap highlight
https://bugs.webkit.org/show_bug.cgi?id=103787

Patch by Tiancheng Jiang <tijiang@rim.com> on 2012-12-02
Reviewed by Rob Buis.

RIM PR 248626
Internally Reviewed by Genevieve Mak.

Draw tap highlight as soon as tap on element.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::touchEvent):
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
* WebKitSupport/TouchEventHandler.h:
(TouchEventHandler):

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