prepare-Changelog should support updating the list of changed files
https://bugs.webkit.org/show_bug.cgi?id=74358

Patch by Timothy Loh <timloh@chromium.com> on 2013-01-22
Reviewed by Eric Seidel.

Needing to re-make ChangeLog entries when the list of files/functions
changes is a bit annoying, it'd be nice to have this more automated.
This patch makes `webkit-patch update' update the date line and bug
description if needed, and if the list of changed files/functions has
changed, either updates the list (if there are no annotations), or
otherwise appends the new list below.

* Scripts/webkitpy/tool/steps/preparechangelog.py:
(PrepareChangeLog._resolve_existing_entry):
(PrepareChangeLog):
(PrepareChangeLog._merge_entries):
(PrepareChangeLog.run):
* Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
(PrepareChangeLogTest.test_resolve_existing_entry):
(make_entry):
(test_ensure_bug_url):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20% regression on dom_perf/DomDivWalk
https://bugs.webkit.org/show_bug.cgi?id=106726

Reviewed by Hajime Morita.

This patch moves the checks in Element::removedFrom for Fullscreen and top layer flags
into a slow path. The idea is for the two checks for Fullscreen and top layer
to be replaced by one faster check in the fast path.

The plan is to migrate the Fullscreen implementation to use top layer, so this is just a
short-term fix for the perf regression.

No new tests: no functionality change

* dom/Element.cpp:
(WebCore::Element::removedFrom): Create a slow path to move the Fullscreen and top layer checks into.
* dom/Node.cpp:
(WebCore::Node::setIsInTopLayer): To allow for cleaner code in Element::removedFrom, define
setIsInTopLayer and isInTopLayer even when the feature flag is off.
* dom/Node.h:
(WebCore::Node::isInTopLayer): Ditto.
(Node):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add monitoring of patches and queues to the QueueStatusServer
https://bugs.webkit.org/show_bug.cgi?id=107612

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

Created classes for recording events into the datastore and integrated them into the existing handlers.
Code for presenting the recorded data will come in a separate patch.

* QueueStatusServer/app.yaml:
* QueueStatusServer/config/__init__.py: Added.
* QueueStatusServer/config/logging.py: Copied from Tools/QueueStatusServer/model/queuestatus.py.
* QueueStatusServer/config/messages.py: Copied from Tools/QueueStatusServer/model/queuestatus.py.
* QueueStatusServer/handlers/nextpatch.py:
(NextPatch.get):
(NextPatch._assign_patch):
* QueueStatusServer/handlers/releasepatch.py:
(ReleasePatch.post):
* QueueStatusServer/handlers/updatestatus.py:
(UpdateStatus.post):
* QueueStatusServer/handlers/updateworkitems.py:
(UpdateWorkItems._parse_work_items_string):
(UpdateWorkItems):
(UpdateWorkItems._update_work_items_from_request):
(UpdateWorkItems._queue_from_request):
(UpdateWorkItems.post):
* QueueStatusServer/loggers/__init__.py: Added.
* QueueStatusServer/loggers/recordbotevent.py: Copied from Tools/QueueStatusServer/model/queuestatus.py.
(RecordBotEvent):
(RecordBotEvent.activity):
* QueueStatusServer/loggers/recordpatchevent.py: Added.
(RecordPatchEvent):
(RecordPatchEvent.added):
(RecordPatchEvent.retrying):
(RecordPatchEvent.started):
(RecordPatchEvent.stopped):
(RecordPatchEvent.updated):
(RecordPatchEvent._get_patches_waiting):
* QueueStatusServer/model/patchlog.py: Copied from Tools/QueueStatusServer/model/queuestatus.py.
(PatchLog):
(PatchLog.lookup):
(PatchLog.calculate_wait_duration):
(PatchLog.calculate_process_duration):
* QueueStatusServer/model/queuelog.py: Copied from Tools/QueueStatusServer/handlers/nextpatch.py.
(QueueLog):
(QueueLog.get_current):
(QueueLog.create_key):
* QueueStatusServer/model/queuestatus.py:
(QueueStatus.is_retry_request):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Make an Isolate parameter mandatory in throwTypeError()
https://bugs.webkit.org/show_bug.cgi?id=107632

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateParametersCheck):
(GenerateConstructorHeader):
(JSValueToNative):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::constructorCallback):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::constructorCallback):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructorConstructorCallback):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::constructorCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
(WebCore::V8TestObj::constructorCallback):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
(WebCore::V8TestOverloadedConstructors::constructorCallback):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::multiTransferListCallback):
(WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
* bindings/v8/V8Binding.h:
(WebCore):
(WebCore::toRefPtrNativeArray):
(WebCore::toV8Sequence):
* bindings/v8/V8NodeFilterCondition.cpp:
(WebCore::V8NodeFilterCondition::acceptNode):
* bindings/v8/V8Utilities.cpp:
(WebCore::extractTransferables):
(WebCore::getMessagePortArray):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Rebaselining after r140448, r140459 and r140493.

* platform/gtk/fast/dom/constructed-objects-prototypes-expected.txt: Added.
* platform/gtk/fast/js/global-constructors-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Make an Isolate parameter mandatory in throwError()
https://bugs.webkit.org/show_bug.cgi?id=107636

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/v8/NPV8Object.cpp:
(_NPN_SetException):
* bindings/v8/V8Binding.cpp:
(WebCore::handleMaxRecursionDepthExceeded):
* bindings/v8/V8Binding.h:
(WebCore):
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening for some inspector tests
https://bugs.webkit.org/show_bug.cgi?id=107516

Unreviewed gardening.

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-01-23

* platform/efl/TestExpectations: Add bug numbers.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Rename TextureMapperShaderManager.* TextureMapperShaderProgram.*
https://bugs.webkit.org/show_bug.cgi?id=105847

TextureMapperShaderManager contains very little "manager" code.
Moved the map of shaders to TextureMapperGL, and renamed the files containing
the shader implementation TextureMapperShaderProgram.cpp|h.

Patch by No'am Rosenthal <noam@webkit.org> on 2013-01-23
Reviewed by Kenneth Rohde Christiansen.

No new tests - renames/refactors only.

* GNUmakefile.list.am:
* PlatformEfl.cmake:
* Target.pri:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::SharedGLData::getShaderProgram):
        This function is copied from TextureMapperShaderManager.
(SharedGLData):
(WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
(WebCore::TextureMapperGL::drawBorder):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawSolidColor):
(WebCore::optionsForFilterType):
(WebCore::TextureMapperGL::drawFiltered):
(WebCore::TextureMapperGL::beginClip):
* platform/graphics/texmap/TextureMapperShaderProgram.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.cpp.
(WebCore):
(WebCore::compositingLogEnabled):
(WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::setMatrix):
(WebCore::TextureMapperShaderProgram::getLocation):
(WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::create):
* platform/graphics/texmap/TextureMapperShaderProgram.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h.
(WebCore):
(TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::programID):
(WebCore::TextureMapperShaderProgram::context):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[TexMap] Don't call GraphicsLayer::setNeedsDisplay() from TextureMapperLayer.
https://bugs.webkit.org/show_bug.cgi?id=107629

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-23
Reviewed by Noam Rosenthal.

We are removing the dependency on GraphicsLayer from TextureMapperLayer.

This is in preparation for refactoring TextureMapper to work in an actor
model (http://webkit.org/b/103854).

No new tests, refactoring only.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setDrawsContent):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Invalidated SVG shadow tree should be always detached.
https://bugs.webkit.org/show_bug.cgi?id=107634

Reviewed by Ryosuke Niwa.

Source/WebCore:

SVGUseElement::clearResourceReferences() uses removeAllChildren() for
clearing its shadow DOM, but this is wrong.
removeAllChildren() is designed for removing children of an out-of-document Node.
For efficiency, it skips a series of cleanup sequences like detach().

For removing SVG shadow tree which is in Document, removeChildren() should be used.
It does proper cleanup for the chilren.

Test: svg/custom/use-invalidate-click-crash.xhtml

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::clearResourceReferences):

LayoutTests:

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove if(isolate) checks from v8String() and v8Integer()
https://bugs.webkit.org/show_bug.cgi?id=107540

Reviewed by Adam Barth.

Now there is no optional Isolate parameter in the code base
(except for throwError()). We can safely remove if(isolate) checks
from v8String() and v8Integer().

div.id:       17.8 ns => 17.8 ns (no performance change)
div.nodeType:  9.7 ns =>  8.9 ns (+8.9% performance improvement)

No tests. No change in behavior.

* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::handleV8DebugEvent):
* bindings/v8/V8Binding.h:
(WebCore::v8String):
(WebCore::v8Integer):
* bindings/v8/V8WindowErrorHandler.cpp:
(WebCore::V8WindowErrorHandler::callListenerFunction):
* bindings/v8/V8WorkerContextErrorHandler.cpp:
(WebCore::V8WorkerContextErrorHandler::callListenerFunction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
xml-stylesheet XSL is not requested with JavaScript disabled
https://bugs.webkit.org/show_bug.cgi?id=103902

Reviewed by Adam Barth.

Source/WebCore:

Currently CachedResourceLoader::canRequest() calls allowScriptFromSource() on
ContentSecurityPolicy and FrameLoaderClient for the given XSLStyleSheet. This
should be restricted to only calling allowScriptFromSource() for the
ContentSecurityPolicy.

Test: http/tests/xsl/xslt-transform-with-javascript-disabled.html

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):

LayoutTests:

Add a test to perform XSL transformation when the Javascript is disabled.

* http/tests/xsl/resources/xslt-transform-with-javascript-disabled.xml:
* http/tests/xsl/resources/xslt-transform-with-javascript-disabled.xsl:
* http/tests/xsl/xslt-transform-with-javascript-disabled-expected.txt:
* http/tests/xsl/xslt-transform-with-javascript-disabled.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: use inspectedWindow.document instead of document in InjectedScript
https://bugs.webkit.org/show_bug.cgi?id=107642

Reviewed by Pavel Feldman.

* inspector/InjectedScriptSource.js:
(.):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r140338): WebKitGtk+ trying to allocate a buffer too big
https://bugs.webkit.org/show_bug.cgi?id=107646

Reviewed by Carlos Garcia Campos.

g_input_stream_skip_async() was replaced in r140338 by
g_input_stream_read_async() to workaround a glib buffer. The former
was using G_MAXSSIZE to skip the whole redirect message but we
cannot use it for the latter because it will try to
allocate a buffer of that size. Replaced it by READ_BUFFER_SIZE. No
new tests required, functionality already covered by network tests..

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r139044): Pan icon remains on screen on Chromium-WinXP
https://bugs.webkit.org/show_bug.cgi?id=107623

Reviewed by Hajime Morita.

Source/WebCore:

The issue is caused by AutoscrollController::stopAutoscrollTimer()
doesn't call View::removePanScrollIcon() because m_autoscrollType
is reset before checking it.

This patch changes to reset m_autoscrollType after all references.

Test: platform/chromium-win/fast/events/panScroll-panIcon.html

* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::stopAutoscrollTimer):

LayoutTests:

This test checks no pan icon after pan scroll.

* platform/chromium-win/fast/events/panScroll-panIcon-expected.png: Added.
* platform/chromium-win/fast/events/panScroll-panIcon-expected.txt: Added.
* platform/chromium-win/fast/events/panScroll-panIcon.html: Added.
* platform/chromium/TestExpectations: Changed to skip entry for panScroll-panIcon.html for Android, Linux and Mac.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adding myself as contributor in committers.py (as requested by eseidel).
https://bugs.webkit.org/show_bug.cgi?id=107647

Patch by Tim 'mithro' Ansell <mithro@mithis.com> on 2013-01-23
Reviewed by Eric Seidel.

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removing command line shortening as it makes it difficult to see the command during errors.
https://bugs.webkit.org/show_bug.cgi?id=107643

Patch by Tim 'mithro' Ansell <mithro@mithis.com> on 2013-01-23
Reviewed by Eric Seidel.

* Scripts/webkitpy/common/system/executive.py:
(ScriptError):
(ScriptError.__init__):
* Scripts/webkitpy/common/system/executive_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Unreviewed build fix after r140518.

* GNUmakefile.list.am: rename TextureMapperShaderManager to
TextureMapperShaderProgram.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass CSSSelector pointers around as const after parsing stage.
<http://webkit.org/b/107645>

Reviewed by Antti Koivisto.

Have CSSSelectorList vend const CSSSelector* and make the style resolution code
operate on const pointers instead.

This gives us some compile-time confidence that nobody is changing the selectors
after we've parsed them.

* css/CSSSelector.cpp:
(WebCore::CSSSelector::operator==):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::parseNth):
(WebCore::CSSSelector::matchNth):
* css/CSSSelector.h:
(CSSSelector):
(WebCore::CSSSelector::tagHistory):
(WebCore::CSSSelector::selectorList):
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::selectorsText):
(WebCore::forEachTagSelector):
(WebCore::forEachSelector):
(WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
(WebCore::SelectorHasInvalidSelectorFunctor::operator()):
* css/CSSSelectorList.h:
(WebCore::CSSSelectorList::first):
(CSSSelectorList):
(WebCore::CSSSelectorList::selectorAt):
(WebCore::CSSSelectorList::indexOfNextSelectorAfter):
(WebCore::CSSSelectorList::next):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::generateSelectorText):
* css/RuleSet.cpp:
(WebCore::selectorListContainsUncommonAttributeSelector):
(WebCore::collectFeaturesFromRuleData):
* css/RuleSet.h:
(WebCore::RuleData::selector):
(WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
(RuleSetSelectorPair):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matches):
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::checkScrollbarPseudoClass):
(WebCore::SelectorChecker::determineLinkMatchType):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
(SelectorCheckingContext):
(SelectorChecker):
* css/StyleInvalidationAnalysis.cpp:
(WebCore::determineSelectorScopes):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForRegion):
(WebCore::StyleResolver::checkRegionSelector):
* css/StyleResolver.h:
(StyleResolver):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::initialize):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
(WebCore::SelectorDataList::SelectorData::SelectorData):
(SelectorData):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::collectSelectFeatureSetFrom):
* html/shadow/ContentSelectorQuery.cpp:
(WebCore::ContentSelectorChecker::checkContentSelector):
(WebCore::ContentSelectorDataList::initialize):
* html/shadow/ContentSelectorQuery.h:
(ContentSelectorChecker):
(ContentSelectorDataList):
* html/shadow/HTMLContentElement.cpp:
(WebCore::validateSubSelector):
(WebCore::validateSelector):
(WebCore::HTMLContentElement::validateSelect):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Refactoring] Remove elementParentStyle from SelectorCheckerContext
https://bugs.webkit.org/show_bug.cgi?id=107496

Reviewed by Darin Adler.

Since childrenAffectedBy bits were moved from RenderStyle to element,
now elementParentStyle is not used in SelectorChecker and
StyleResolver. We should remove the member varaiable from
SelectorCheckerContext.

No new tests, because just refactoring.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
(SelectorCheckingContext):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::ruleMatches):
Removed elementParentStyle.


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