Mac-ews logs are huge
https://bugs.webkit.org/show_bug.cgi?id=77045

Reviewed by Eric Seidel.

In order to get the cr-linux-ews bot to run tests on EC2, we created
the chromium-xvfb port, which contained a number of tweaks to the
Chromium port's behavior.  This patch refactors those tweaks so they
can be shared with the mac-ews, mostly by moving them into the
non-interactive mode of RunTests.

* Scripts/webkitpy/common/config/ports.py:
(WebKitPort):
(WebKitPort.layout_tests_results_path):
(ChromiumPort.run_javascriptcore_tests_command):
(ChromiumXVFBPort):
(ChromiumXVFBPort.run_webkit_tests_command):
* Scripts/webkitpy/common/config/ports_mock.py:
(MockPort):
(MockPort.layout_tests_results_path):
* Scripts/webkitpy/common/config/ports_unittest.py:
(WebKitPortTest.test_chromium_xvfb_port):
* Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
(LayoutTestResultsReaderTest.test_missing_layout_test_results):
* Scripts/webkitpy/tool/commands/queues_unittest.py:
(CommitQueueTest.test_commit_queue):
(test_rollout):
(test_manual_reject_during_processing):
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run):
* Scripts/webkitpy/tool/steps/runtests_unittest.py:
(RunTestsTest.test_no_unit_tests):
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest.test_runtests_args):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update the tests to show that the mac-ews processes patches from
non-committers.

* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(EarlyWarningSytemTest.test_committer_only_ewses):
(EarlyWarningSytemTest.test_builder_ewses):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Yarr crash with regexp replace
https://bugs.webkit.org/show_bug.cgi?id=67454

Reviewed by Gavin Barraclough.

Source/JavaScriptCore: 

Properly handle the case of a back reference to an unmatched
subpattern by always matching without consuming any characters.

* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::matchBackReference):
(JSC::Yarr::Interpreter::backtrackBackReference):

LayoutTests: 

New tests to check for proper handling of back references to
unmatched subpatterns.

* fast/js/regexp-backreferences-expected.txt:
* fast/js/script-tests/regexp-backreferences.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove [ObjCPrefix], [V8ConstructorTemplate], [allowAccessToNode],
[v8implname] and [v8referenceattr] from code generators
https://bugs.webkit.org/show_bug.cgi?id=77588

Reviewed by Adam Barth.

This patch removes [ObjCPrefix], [V8ConstructorTemplate], [allowAccessToNode],
[v8implname] and [v8referenceattr] from code generators, since they are not used
by any IDL files.

No tests. No changes in behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(IsConstructable):
(IsConstructorTemplate):
(GenerateNormalAttrGetter):
(GenerateFunctionCallString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move the scrolling coordinator to page/scrolling
https://bugs.webkit.org/show_bug.cgi?id=77590

Reviewed by Dan Bernstein.

Put scrolling related files in page/scrolling to avoid cluttering the page directory.

* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingCoordinator.cpp: Renamed from Source/WebCore/page/ScrollingCoordinator.cpp.
* page/scrolling/ScrollingCoordinator.h: Renamed from Source/WebCore/page/ScrollingCoordinator.h.
* page/scrolling/mac/ScrollingCoordinatorMac.mm: Renamed from Source/WebCore/page/mac/ScrollingCoordinatorMac.mm.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Use glScissors for clipping in TextureMapperGL when possible
https://bugs.webkit.org/show_bug.cgi?id=77575

Reviewed by Martin Robinson.

Source/WebCore:

Maintain a clipping stack, that helps us use stencils in conjunction with scissors.
We apply scissors when the clip region is rectalinear, and stencil when it's not.

No behavior changes so no new tests.

* platform/graphics/opengl/TextureMapperGL.cpp:
(SharedGLData):
(WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::bindSurface):
(WebCore):
(WebCore::scissorClip):
(WebCore::TextureMapperGL::beginScissorClip):
(WebCore::TextureMapperGL::endScissorClip):
(WebCore::TextureMapperGL::beginClip):
(WebCore::TextureMapperGL::endClip):
* platform/graphics/opengl/TextureMapperGL.h:
(TextureMapperGL):

Source/WebKit2:

Instead of applying the scissor clip in QQuickWebPage, we trickle it down to
TextureMapperGL, and apply it there as part of beginClip(). All direct GL operations are
now cleaned out of QQuickWebPage.

* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r106408.
http://trac.webkit.org/changeset/106408
https://bugs.webkit.org/show_bug.cgi?id=77592

crashes in chromium mac release tests (Requested by japhet on
#webkit).

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

* platform/graphics/Region.cpp:
* platform/graphics/Region.h:
(Region):
(Shape):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove [ImplementationUUID] and [InterfaceUUID] from html/canvas/*.idl
https://bugs.webkit.org/show_bug.cgi?id=77589

Reviewed by Adam Barth.

[ImplementationUUID] and [InterfaceUUID] are used in html/canvas/*.idl,
but they are not implemented in code generators and thus have no meaning.
This patch removes them.

No tests. No change in behavior.

* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasPattern.idl: The file is now empty though.
* html/canvas/CanvasRenderingContext.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/WebGLRenderingContext.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Select attribute of HTMLContentElement should be able be changed dynamically.
https://bugs.webkit.org/show_bug.cgi?id=76261

Patch by Shinya Kawanaka <shinyak@google.com> on 2012-02-01
Reviewed by Hajime Morita.

Source/WebCore:

When select attribute is changed, the flag to recalc style is set.

Test: fast/dom/shadow/content-element-select-dynamic.html

* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::parseMappedAttribute):
  Sets recalc style when select is changed.
* html/shadow/HTMLContentElement.h:
(HTMLContentElement):

LayoutTests:

Test cases for changing select attribute dynamically.

* fast/dom/shadow/content-element-select-dynamic-expected.txt: Added.
* fast/dom/shadow/content-element-select-dynamic.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove [DelegatingPrototypeGetOwnPropertySlot], [HasCustomIndexGetter],
[HasIndexSetter], [JSConstructorTemplate] and [NonEmpty] from code generators
https://bugs.webkit.org/show_bug.cgi?id=77585

Reviewed by Adam Barth.

This patch removes [DelegatingPrototypeGetOwnPropertySlot], [HasCustomIndexGetter],
[HasIndexSetter], [JSConstructorTemplate] and [NonEmpty] from code generators,
since they are not used by no IDL files.

No tests. No change in behavior.

* bindings/scripts/CodeGenerator.pm:
(GetterExpression):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GenerateHeader):
(GenerateImplementation):
(IsConstructable):
(IsConstructorTemplate):

* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated the run-bindings-tests results.
* bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_get_property):
(webkit_dom_test_obj_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
(WebCore):
* bindings/scripts/test/JS/JSTestObj.h: Ditto.
(WebCore):
* bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
* bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WorkerScriptController::evaluate() should not return anything
https://bugs.webkit.org/show_bug.cgi?id=77587

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-02-01
Reviewed by Adam Barth.

Remove the return value from WorkerScriptController as it is
(and should be) unused.

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* bindings/js/WorkerScriptController.h:
(WorkerScriptController):
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* bindings/v8/WorkerScriptController.h:
(WorkerScriptController):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change class hierarycy so that ShadowRoot can inherit DocumentFragment.
https://bugs.webkit.org/show_bug.cgi?id=76693

Reviewed by Darin Adler.

Make ShadowRoot inherit DocumentFragment so that it matches the class hierarchy of IDL in the spec.
TreeScope becomes a separated class, which is now inherited by Document and ShadowRoot using multiple-inheritance.
This patch is pre-requirement for coming IDL change.

No tests. No change in behavior.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::buildAccessKeyMap):
(WebCore::Document::childrenChanged):
(WebCore::Document::attach):
(WebCore::Document::detach):
* dom/Document.h:
(Document):
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::DocumentFragment):
* dom/DocumentFragment.h:
(DocumentFragment):
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::get):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::~ShadowRoot):
(WebCore::ShadowRoot::attach):
* dom/ShadowRoot.h:
* dom/TreeScope.cpp:
(WebCore::TreeScope::TreeScope):
(WebCore::TreeScope::~TreeScope):
(WebCore::TreeScope::setParentTreeScope):
(WebCore::TreeScope::getImageMap):
(WebCore::TreeScope::findAnchor):
* dom/TreeScope.h:
(WebCore):
(WebCore::TreeScope::rootNode):
(TreeScope):
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
* page/DragController.cpp:
(WebCore::asFileInput):
* page/FocusController.cpp:
(WebCore::ownerOfTreeScope):
(WebCore::FocusController::nextFocusableNode):
(WebCore::FocusController::previousFocusableNode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Consider user's preferred language when choosing text tracks
https://bugs.webkit.org/show_bug.cgi?id=74121

Reviewed by Alexey Proskuryakov.

Source/WebCore: 

Tests: media/track/track-language-preference.html
       media/track/track-prefer-captions.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadTimerFired): configureTextTracks -> configureNewTextTracks.
(WebCore::HTMLMediaElement::textTracksAreReady): Add more comments.
(WebCore::HTMLMediaElement::textTrackModeChanged): Ditto.
(WebCore::HTMLMediaElement::showingTrackWithSameKind): Minor restructuring.
(WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Renamed from userIsInterestedInThisTrack,
    don't consider user's language preference.
(WebCore::HTMLMediaElement::configureTextTrackGroup): New, configure all tracks in a group, 
    considering user's kind and language preferences.
(WebCore::HTMLMediaElement::configureNewTextTracks): New, configure all newly added tracks.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::TrackGroup::TrackGroup):
(TrackGroup):

* platform/Language.cpp:
(WebCore::canonicalLanguageIdentifier): New, create a canonicalized version of a language string.
(WebCore::bestMatchingLanguage): New, return the language from the list that best matches the 
    specified language.
(WebCore::preferredLanguageFromList): New, return the language in the specified list that best
    matches the user's language preference.
* platform/Language.h:

* testing/Internals.cpp:
(WebCore::Internals::setShouldDisplayTrackType): New, allow DRT to set the track type preference.
(WebCore::Internals::shouldDisplayTrackType): New, allow DRT to read the track type preference.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests: 

* media/track/track-language-preference-expected.txt: Added.
* media/track/track-language-preference.html: Added.
* media/track/track-prefer-captions-expected.txt: Added.
* media/track/track-prefer-captions.html: Added.
* platform/mac/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove [GenerateConstructor] from IDL files
https://bugs.webkit.org/show_bug.cgi?id=77598

Reviewed by Adam Barth.

[GenerateConstructor] is used in some IDL files but it is not implemented
in code generators. I could not find any history about [GenerateConstructor]
in code generators. This patch removes them from IDL files.

Maybe we want to replace [GenerateConstructor] with [Constructor] eventually,
but currently no tests are written for their constructors (e.g. "new DOMTokenList()").
So simply removing them would make sense.

No new tests. No change in behavior.

* dom/DOMStringList.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* svg/SVGFEConvolveMatrixElement.idl:
* webaudio/AudioPannerNode.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Webkit generate-coverage-data script needs update to use new test script
https://bugs.webkit.org/show_bug.cgi?id=77597

Patch by Jacob Goldstein <jacobg@adobe.com> on 2012-02-01
Reviewed by Dirk Schulze.

* Scripts/generate-coverage-data:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename [ConvertNullToNullString] to [TreatNullAs=EmptyString]
https://bugs.webkit.org/show_bug.cgi?id=77602

Reviewed by Adam Barth.

This patch renames [ConvertNullToNullString] to [TreatNullAs=EmptyString],
according to the spec (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs).

No tests. No changes in behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(JSValueToNative):
* bindings/scripts/CodeGeneratorV8.pm:
(GetNativeTypeFromSignature):

* css/CSSCharsetRule.idl:
* css/CSSPageRule.idl:
* css/CSSRule.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleRule.idl:
* css/CSSValue.idl:
* css/MediaList.idl:
* css/WebKitCSSKeyframesRule.idl:
* dom/Attr.idl:
* dom/CharacterData.idl:
* dom/DOMImplementation.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/ProcessingInstruction.idl:
* dom/ShadowRoot.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLScriptElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLTitleElement.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* page/DOMWindow.idl:
* storage/StorageEvent.idl:
* svg/SVGAngle.idl:
* svg/SVGElement.idl:
* svg/SVGLength.idl:
* svg/SVGScriptElement.idl:

* bindings/scripts/test/TestObj.idl: No change in the run-bindings-tests results.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename [V8DisallowShadowing] to [V8Unforgeable]
https://bugs.webkit.org/show_bug.cgi?id=77599

Reviewed by Adam Barth.

This patch renames [V8DisallowShadowing] to [V8Unforgeable], following the Web IDL
spec (http://dev.w3.org/2006/webapi/WebIDL/#Unforgeable).

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateSingleBatchedAttribute):
(GenerateImplementation):
* page/DOMWindow.idl:
* page/Location.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename [CheckFrameSecurity] and [SVGCheckSecurity] to [CheckAccessToNode]
https://bugs.webkit.org/show_bug.cgi?id=77601

Reviewed by Adam Barth.

[CheckFrameSecurity] and [SVGCheckSecurity] have the same meaning; i.e. generate code
to check allowAccessToNode() for a given attribute or method. This patch renames them
to [CheckAccessToNode].

No tests. No changes in behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateFunctionCallback):
* html/HTMLEmbedElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLObjectElement.idl:

* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/V8/V8TestObj.cpp: Updated the test results.
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] FFTFrame implementation
https://bugs.webkit.org/show_bug.cgi?id=73545

Reviewed by Chris Rogers.

.:

* configure.ac: Enable the WebAudio option again and remove
libfftw checks.

Source/WebCore:

FFTFrame implementation based on GStreamer's FFT processing
library.

No new tests, existing WebAudio tests cover this.

* GNUmakefile.am:
* GNUmakefile.list.am:
* platform/audio/FFTFrame.h:
* platform/audio/FFTFrameStub.cpp:
* platform/audio/gstreamer/FFTFrameGStreamer.cpp: Added.
(WebCore::FFTFrame::FFTFrame):
(WebCore::FFTFrame::initialize):
(WebCore::FFTFrame::cleanup):
(WebCore::FFTFrame::~FFTFrame):
(WebCore::FFTFrame::multiply):
(WebCore::FFTFrame::doFFT):
(WebCore::FFTFrame::doInverseFFT):
(WebCore::FFTFrame::realData):
(WebCore::FFTFrame::imagData):

Source/WebKit/gtk:

* GNUmakefile.am: Remove libfftw compilation flags.

Source/WebKit2:

* GNUmakefile.am: Remove libfftw compilation flags.

LayoutTests:

* webaudio/resources/convolution-testing.js:
(checkTail1): Adapt convolution threshold for GStreamerFFTFrame
implementation, as advised by Chris Rogers.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
hidden attribute on <input type=file /> suppresses the file selection dialog
https://bugs.webkit.org/show_bug.cgi?id=58208

Patch by Rakesh KN <rakesh.kn@motorola.com> on 2012-02-02
Reviewed by Ryosuke Niwa.

.:

* ManualTests/input-file-hidden-open-dialog-on-click.html: Added.
Adding manual test as the file dialog opens only in User gesture.

Source/WebCore:

We want to allow opening file dialog on hidden element when click() is called
on the element. The behaviour is similar to Firefox and IE.

Added manual test as the file dialog opens only on user gesture.

* html/FileInputType.cpp:
(WebCore::FileInputType::handleDOMActivateEvent):
Removed renderer check as input can be hidden.

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