Unreviewed. Temporary change to DRT for debugging purposes.

* DumpRenderTree/win/DumpRenderTree.cpp:
(dump):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Removed temporary debugging change from DRT (r136300).

* DumpRenderTree/win/DumpRenderTree.cpp:
(dump):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Always listen for the DidFirstLayout layout milestone
https://bugs.webkit.org/show_bug.cgi?id=103795
<rdar://problem/12790268>

Reviewed by Dan Bernstein.

The DidFirstLayout layout milestone is used to determine when to unfreeze the layer tree, so we always want to listen for it.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid calling into NSUserDefaults every time we start a scroll
https://bugs.webkit.org/show_bug.cgi?id=103804

Reviewed by Dan Bernstein.

Cache the NSScrollAnimationEnabled preference to avoid
hitting NSUserDefaults every time we start scrolling.

* platform/mac/ScrollAnimatorMac.mm:
(WebCore::scrollAnimationEnabledForSystem):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK1] Gardening test cases which are not crashed after r135662
https://bugs.webkit.org/show_bug.cgi?id=103803

Unreviewed, EFL gardening.

Patch by Sujin Park <sujjin.park@gmail.com> on 2012-11-30

* platform/efl-wk1/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSP 1.1: Make the CSP_NEXT flag runtime enabled.
https://bugs.webkit.org/show_bug.cgi?id=103652

Reviewed by Adam Barth.

Source/WebCore:

Content Security Policy 1.1 continues to live behind the CSP_NEXT flag,
this patch adds another layer on top of that in order to enable runtime
decisions about whether it should be active.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
(WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
    Adds methods in order to correctly handle enabling and disabling
    CSP 1.1 features.
* dom/Document.idl:
    Gate the 'document.securityPolicy' object on the runtime flag.
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::addDirective):
    Check that experimental features are runtime enabled before
    processing 1.1 directives.
(WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled):
(WebCore):
* page/ContentSecurityPolicy.h:
    Adds a new method which checks against the runtime flag to determine
    whether CSP 1.1 features are enabled.

Source/WebKit/chromium:

The CSP_NEXT flag continues to be enabled on the Chromium port, but this
patch now locks the features away behind the securityPolicy runtime
flag.

* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableExperimentalContentSecurityPolicyFeatures):
(WebKit):
(WebKit::WebRuntimeFeatures::isExperimentalContentSecurityPolicyFeaturesEnabled):
    Adds the feature to WebRuntimeFeatures so it can be toggled from
    inside Chromium.

Tools:

Ensures that the new SecurityPolicy runtime flag is enabled for Chromium's tests.

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Shorten a file name as the test renamed in r136122 is still hosing Chromium Win perf. bot.

* http/tests/inspector/network/resources/script-as-text-with-a-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-url.php: Renamed.
* http/tests/inspector/network/resources/script-as-text-with-a-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-url.php: Removed.
* http/tests/inspector/network/script-as-text-loading-long-url.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[gtk] Unreviewed gardening. Skipping CSP 1.1 tests.

The CSP 1.1 tests are failing under GTK after r136305 made the CSP_NEXT
flag runtime enabled. Will fix in webkit.org/b/103810, skipping for now.

* platform/gtk/TestExpectations:
    Skipping CSP 1.1 tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] A11y tests in WK2 report badly-formatted AX roles
https://bugs.webkit.org/show_bug.cgi?id=102947

Reviewed by Xan Lopez.

As in DRT, convert the ATK accessibility roles to corresponding AXRoles.
These are expected in both tests and their baselines.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::roleToString):
(WTR):
(WTR::AccessibilityUIElement::role):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DRT - crashed in WebCore::SearchFieldCancelButtonElement::defaultEventHandler
https://bugs.webkit.org/show_bug.cgi?id=103592

Patch by Xiaobo Wang <xiaobo.wang@torchmobile.com.cn> on 2012-12-01
Reviewed by Kent Tamura.

The crash happened when the search field cancel button handles mouseout
event after the search input was detached. When it happens the input
element returned from shadowHost() is null, need to check the pointer
before dereferencing.
InputFieldSpeechButton and SearchFieldResultsButtonElement have the
similar issue.

No new tests. The patch fixes the following test on BlackBerry platform.
Test: fast/forms/search-delete-while-cancel-button-clicked.html

* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::setRecognitionResult):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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