[soup] Fix build warning in ResourceHandleSoup.cpp
https://bugs.webkit.org/show_bug.cgi?id=107063

Patch by Donghyun Kim <dhkim715@hotmail.com> on 2013-01-16
Reviewed by Martin Robinson.

The restartedCallback has unused parameter 'message',
remove the parameter name to fix 'unused parameter' build warning.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::restartedCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused AddLoadInProgress message
https://bugs.webkit.org/show_bug.cgi?id=107077

Reviewed by Dan Bernstein.

Dead code is dead.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update Owners file.

* Owners:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG 32_64 backend doesn't check for hasArrayStorage() in NewArrayWithSize
https://bugs.webkit.org/show_bug.cgi?id=107081

Reviewed by Michael Saboff.

This bug led to the 32_64 backend emitting contiguous allocation code to allocate
ArrayStorage arrays. This then led to all manner of heap corruption, since
subsequent array accesses would be accessing the contiguous array "as if" it was
an arraystorage array.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce BackgroundHTMLParser for parsing HTML on a background thread
https://bugs.webkit.org/show_bug.cgi?id=107083

Reviewed by Eric Seidel.

This patch contains a basic version of an HTML parser that runs on a
background thread. The parser passes the majority of the tests in
fast/parser and a large number of the subtests in html5lib.

Notably absent from this early version of the parser is speculation
(which will eventually replace preload scanning) and atomization (which
we suspect will be important for performance). Our plan is to introduce
those elements in subsequent patches.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/parser/BackgroundHTMLParser.cpp: Added.
(WebCore):
(WebCore::checkThatTokensAreSafeToSendToAnotherThread):
(WebCore::parserMap):
(WebCore::ParserMap::backgroundParsers):
(WebCore::ParserMap::mainThreadParsers):
(WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::append):
(WebCore::BackgroundHTMLParser::continueParsing):
(WebCore::BackgroundHTMLParser::finish):
(WebCore::BackgroundHTMLParser::pumpTokenizer):
(TokenDelivery):
(WebCore::TokenDelivery::execute):
(WebCore::BackgroundHTMLParser::sendTokensToMainThread):
(WebCore::BackgroundHTMLParser::createPartial):
(WebCore::BackgroundHTMLParser::stopPartial):
(WebCore::BackgroundHTMLParser::appendPartial):
(WebCore::BackgroundHTMLParser::continuePartial):
(WebCore::BackgroundHTMLParser::finishPartial):
* html/parser/BackgroundHTMLParser.h: Added.
(WebCore):
(BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::create):
(ParserMap):
(WebCore::ParserMap::identifierForParser):
* html/parser/HTMLDocumentParser.cpp:
(WebCore):
(WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
* html/parser/HTMLDocumentParser.h:
(WebCore):
(HTMLDocumentParser):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Switch AudioDestinationChromium over to new createAudioDevice() method
https://bugs.webkit.org/show_bug.cgi?id=106816

Reviewed by James Robinson.

* platform/audio/chromium/AudioDestinationChromium.cpp:
(WebCore::AudioDestinationChromium::AudioDestinationChromium):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix following r139918.
Add speech synthesis to include path and WebCore vcproj file.

* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcproj/WebCoreCommon.vsprops:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce a method to build the tree from a CompactHTMLToken
https://bugs.webkit.org/show_bug.cgi?id=107082

Reviewed by Adam Barth.

No new tests because covered by existing fast/parser tests.

* html/parser/HTMLDocumentParser.cpp:
(WebCore):
(WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLToken.h:
(AtomicHTMLToken):
(WebCore::AtomicHTMLToken::create):
(WebCore::AtomicHTMLToken::AtomicHTMLToken):
* xml/parser/MarkupTokenBase.h:
(WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
(AtomicMarkupTokenBase):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Address tonyg's feedback on BackgroundHTMLParser
https://bugs.webkit.org/show_bug.cgi?id=107086

Reviewed by Tony Gentilcore.

As requested in https://bugs.webkit.org/show_bug.cgi?id=107083#c5

* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::pumpTokenizer):
(TokenDelivery):
(WebCore::TokenDelivery::TokenDelivery):
(WebCore::TokenDelivery::execute):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Need to adjust the scale and scroll position after leaving fullscreen mode if there's
device rotation in fullscreen mode
https://bugs.webkit.org/show_bug.cgi?id=107085

Reviewed by George STaikos.
Also internally reviewed by Jacky Jiang.

We saved the scale and scroll position before entering full screen mode, so that we can restore
them after leaving fullscreen mode, because entering fullscreen mode automatically changes the
       scale to make the video to fit to the viewport. But if there's device rotation during the fullscreen,
       the scale and scroll position saved before may or may not apply anymore, we need to adjust the
       scale and/or scroll position if needed to make sure no over-scale or over-scroll in the new orientation.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
(BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
* Api/WebPage_p.h:
(WebPagePrivate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

Roll Chromium to 177310.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GCE build scripts don't take working directory into account when calling findzone.sh
https://bugs.webkit.org/show_bug.cgi?id=106962

Patch by Alan Cutter <alancutter@chromium.org> on 2013-01-16
Reviewed by Adam Barth.

* EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
* EWSTools/GoogleComputeEngine/build-commit-queue.sh:
* EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attr.ownerDocument should change if its parent's owner did
https://bugs.webkit.org/show_bug.cgi?id=97644

Reviewed by Darin Adler.

Source/WebCore:

moveTreeToNewScope() didn't traverse its Attr instances. But it should.

Test: fast/dom/Attr/parent-adopt-node.html

* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::getExistingAttrs):
(WebCore):
* dom/ElementAttributeData.h:
(ElementAttributeData):
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope):

LayoutTests:

* fast/dom/Attr/parent-adopt-node-expected.txt: Added.
* fast/dom/Attr/parent-adopt-node.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disable an ASSERT for the threaded parser
https://bugs.webkit.org/show_bug.cgi?id=107087

Reviewed by Adam Barth.

Since tokenizing happens on the background thread, when the tree builder runs there isn't a valid tokenizer for which to check the state.
The background parser has minimal code to update its tokenizer's state properly.

No new tests because covered by existing fast/parser tests.

* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/parser/HTMLParserOptions.h:
(HTMLParserOptions):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processEndTag):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crashes on the bots.

The WebKit LoaderStrategy for loading synchronously was only implemented
for the case where you have a network process. When you don't, we should
be using the base implementation.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make debug-safari --target-web-process work again
https://bugs.webkit.org/show_bug.cgi?id=107088

Reviewed by Anders Carlsson.

Source/WebKit2: 

--target-web-process was made harder to use during recent refactoring
by requiring users to pass a -ui-process-name parameter in addition to
the -client-executable. Instead, we should conjure up that name from
the information we already have at our disposal.

* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMainDelegate::getConnectionIdentifier):
Simplify by making the non-client-executable path use the base
class implementation.

(WebKit::WebProcessMainDelegate::getClientIdentifier):
Ditto.

(WebKit::WebProcessMainDelegate::getClientProcessName):
Added. Create a client process name (its actually not too important what it is, as it
is only used to show a name in Activity Monitor) from the passed in client executable
path.

Tools: 

* Scripts/webkitdirs.pm:
(execMacWebKitAppForDebugging):
The shim is now called SecItemShim.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Refactoring] HTMLTextFormControlElement should use shadowHost instead of shadowAncestorNode
https://bugs.webkit.org/show_bug.cgi?id=106533

Reviewed by Kent Tamura.

Since Node::shadowAncestorNode() is deprecated, we would like to use Node::shadowHost().

No new tests, simple refactoring.

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange): Here, startPosition and endPosition is in ShadowDOM,
converting shadowAncestorNode to shadowHost is safe.
(WebCore::enclosingTextFormControl): Actually ASSERT in this method is wrong since shadowAncestorNode() does not
return NULL. This should be shadowHost().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build break for Android webview.
https://bugs.webkit.org/show_bug.cgi?id=107072

Patch by Kristian Monsen <kristianm@google.com> on 2013-01-16
Reviewed by Steve Block.

Add extra guards when checking for OS=="Android" to make sure it is not included
for webview.

* WebKitUnitTests.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NoEventDispatchAssertion in ContainerNode::removeChildren is too strict
https://bugs.webkit.org/show_bug.cgi?id=106985

Reviewed by Ryosuke Niwa.

Source/WebCore:

This change narrowed the lifetime of NoEventDispatchAssertion in removeChildren().
It is as safe as other mutation method even after this change: childrenChanged() and
ChildNodeRemovalNotifier are used outside the assertion scope.

Test: svg/custom/use-mutation-crash.xhtml

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChildren):

LayoutTests:

* svg/custom/use-mutation-crash-expected.txt: Added.
* svg/custom/use-mutation-crash.xhtml: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use xcrun to find path to make for Mac port
<http://webkit.org/b/107091>

Reviewed by Dan Bernstein.

* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort._build_java_test_support): Call self.make_command().
(MacPort.make_command): Add.  Call xcrun_find().
(MacPort.nm_command): Use self.xcrun_find().
(MacPort.xcrun_find): Add.  Extract from nm_command().

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