Dropping JSC references from InspectorInstrumentation.h by including 'ScriptState.h'
https://bugs.webkit.org/show_bug.cgi?id=97759

Reviewed by Adam Barth.

InspectorInstrumentation.h includes two '#if USE(JSC)' blocks, which
I've been reliably informed should not appear in WebCore[1]. This patch
drops both blocks, and includes 'ScriptState.h' instead, which should
have the same practical effect.

There's no functional change, so this should be covered by existing tests.

[1]: https://bugs.webkit.org/show_bug.cgi?id=94433#c55

* inspector/InspectorInstrumentation.h:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Page overlays are not updated when WebView is resized
https://bugs.webkit.org/show_bug.cgi?id=97789

Reviewed by Vsevolod Vlasov.

Invalidate page overlays when view is resized.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::sendResizeEventAndRepaint):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3.20MB below FunctionParameters::create() on Membuster3.
<http://webkit.org/b/97730>

Reviewed by Anders Carlsson.

Figure out the exact space needed for parameter identifiers and use reserveInitialCapacity().
Reduces memory consumption on Membuster3 by ~1.60 MB.

* parser/Nodes.cpp:
(JSC::FunctionParameters::FunctionParameters):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix usage of COMPILER() macros
https://bugs.webkit.org/show_bug.cgi?id=97642

Reviewed by Geoffrey Garen.

Add COMPILER(GCC) around compiler specific code and remove it from generic code.
This allows us to implement the DFG code for other compilers to in a next step.

* dfg/DFGOperations.cpp:
* jit/HostCallReturnValue.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [REGRESSION] Breakpoints are not always shown in breakpoints sidebar pane.
https://bugs.webkit.org/show_bug.cgi?id=97783

Reviewed by Pavel Feldman.

BreakpointSidebarPane now explicitly adds all breakpoints that are available at the moment of its creation.

* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype._filteredBreakpointLocations):
(WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
(WebInspector.BreakpointManager.prototype.allBreakpointLocations):
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.JavaScriptBreakpointsSidebarPane):
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
332kB below DocumentEventQueue::create() on Membuster3.
<http://webkit.org/b/97712>

Reviewed by Anders Carlsson.

Give DocumentEventQueue::m_queuedEvents an inline capacity of 16 (the default is 256.)
312kB progression on Membuster3.

* dom/DocumentEventQueue.h:
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueue::pendingEventTimerFired):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rebaseline several test directories for Android/.

Unreviewed rebaselining.

Most of these changes were caused by our different scrollbars and minor
positioning issues, and therefore are safe to rebase. With Xianzhu's
patch in the tree that adds additional fonts, more pass there as well.
Actual failures include more form items. Bugs will be filed.

* platform/chromium-android/animations/: 4 new results.
* platform/chromium-android/compositing/: 72 new results.
* platform/chromium-android/css2.1/: 52 new results.
* platform/chromium-android/css3/: 5 new results.
* platform/chromium-android/editing/: 46 new results.
* platform/chromium-android/fast/: 42 new results.
* platform/chromium-android/fonts/: 12 new results.
* platform/chromium-android/http/: 5 new results.
* platform/chromium-android/ietestcenter/: 4 new results.
* platform/chromium-android/platform/: 13 new results.
* platform/chromium-android/printing/: 2 new results.
* platform/chromium-android/scrollbars/: 2 new results.
* platform/chromium-android/svg/: 4 new results.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rebaseline more test directories for Android.

Unreviewed rebaselining.

Same as previous commits. Most changes are caused by the scrollbar, text selection
color and quality differences in image quality, causing minor (but acceptable)
differences. More information is available in bug 96398.

* platform/chromium-android/svg/: 71 new results.
* platform/chromium-android/tables/: 250 new results.
* platform/chromium-android/transforms/: 5 new results.
* platform/chromium-android/transitions/: 1 new result.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DOM4: Add support for rest parameters to DOMTokenList
https://bugs.webkit.org/show_bug.cgi?id=97335

Reviewed by Ojan Vafai.

This adds support for rest paramaters to DOMTokenList add and remove.
http://dom.spec.whatwg.org/#domtokenlist

The code generator has been updated to understand variadic methods.
When a method has a rest parameter the remaining arguments are collected
into a WTF::Vector.

DOMTokenList, DOMSettableTokenList and ClassList were restructured a bit to
allow code to be shared better.

Source/WebCore:

Updated existing tests and includes new binding tests.

* bindings/js/JSDOMBinding.h:
(WebCore::toNativeArray):
(WebCore):
(WebCore::toNativeArguments): Similar to toNativeArray but extracts the arguments instead.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateArgumentsCountCheck): Updated to treat rest paramaters as optional.
(GenerateParametersCheck): Generate code for rest params.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionParametersCheck): Updated to treat rest paramaters as optional.
(GenerateArgumentsCountCheck): Ditto.
(GenerateParametersCheck):  Generate code for rest params.
* bindings/scripts/IDLParser.pm:
(parseOptionalOrRequiredArgument):
* bindings/scripts/IDLStructure.pm:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::variadicStringMethod):
(WebDOMTestObj::variadicDoubleMethod):
(WebDOMTestObj::variadicNodeMethod):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_variadic_string_method):
(webkit_dom_test_obj_variadic_double_method):
(webkit_dom_test_obj_variadic_node_method):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj variadicStringMethod:tail:]):
(-[DOMTestObj variadicDoubleMethod:tail:]):
(-[DOMTestObj variadicNodeMethod:tail:]):
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::variadicStringMethodCallback):
(TestObjV8Internal):
(WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
(WebCore::TestObjV8Internal::variadicNodeMethodCallback):
(WebCore):
(WebCore::ConfigureV8TestObjTemplate):
* bindings/v8/V8Binding.h:
(WebCore::toNativeArray):
(WebCore):
(WebCore::toNativeArguments): Similar to toNativeArray but extracts the arguments instead.
* html/ClassList.cpp:
(WebCore::ClassList::ClassList):
* html/ClassList.h:
(WebCore):
(ClassList):
* html/DOMSettableTokenList.cpp:
(WebCore::DOMSettableTokenList::containsInternal):
(WebCore::DOMSettableTokenList::add):
(WebCore::DOMSettableTokenList::addInternal):
(WebCore::DOMSettableTokenList::remove):
(WebCore::DOMSettableTokenList::removeInternal):
(WebCore::DOMSettableTokenList::setValue):
* html/DOMSettableTokenList.h:
(DOMSettableTokenList):
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::validateTokens):
(WebCore):
(WebCore::DOMTokenList::contains): Moved implementation to base class to allow code sharing.
(WebCore::DOMTokenList::add): Ditto.
(WebCore::DOMTokenList::remove): Ditto.
(WebCore::DOMTokenList::toggle): Ditto.
(WebCore::DOMTokenList::addInternal): Ditto.
(WebCore::DOMTokenList::removeInternal): Ditto.
(WebCore::DOMTokenList::addToken): Ditto.
(WebCore::DOMTokenList::addTokens):
(WebCore::DOMTokenList::removeToken): Ditto.
(WebCore::DOMTokenList::removeTokens):
* html/DOMTokenList.h:
(DOMTokenList):
(WebCore::DOMTokenList::toString):
* html/DOMTokenList.idl:

LayoutTests:

* fast/dom/HTMLElement/class-list-expected.txt:
* fast/dom/HTMLElement/class-list-quirks-expected.txt:
* fast/dom/HTMLElement/script-tests/class-list.js:
(element.classList.add):
(createElement):
(shouldBeEqualToString):
(element.classList.remove):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up HasTrivialConstructor/Destructor
https://bugs.webkit.org/show_bug.cgi?id=97754

Reviewed by Darin Adler.

Cleaned up HasTrivialConstructor and HasTrivialDestructor by defining them in terms of 
other type traits we have. Also moved some ifdefs and comments to make things more clear.

* wtf/TypeTraits.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify and clarify MutationObserverRegistration interface and usage
https://bugs.webkit.org/show_bug.cgi?id=97742

Reviewed by Ojan Vafai.

Minor cleanups in MutationObserverRegistration: make const methods explicitly const,
use C++ templates to avoid duplicating logic, improve usage of raw pointers vs PassRefPtr,
remove the declaration of a no-longer-existing method.

No change in behavior.

* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): Take a raw pointer because we don't always ref the node.
(WebCore::MutationObserverRegistration::shouldReceiveMutationFrom): Make this a const method.
* dom/MutationObserverRegistration.h:
(MutationObserverRegistration): Removed declaration of non-existent caseInsensitiveAttributeFilter method.
(WebCore::MutationObserverRegistration::hasTransientRegistrations): const method.
(WebCore::MutationObserverRegistration::isSubtree): Remove superfluous "inline" keyword.
(WebCore::MutationObserverRegistration::observer): const method.
* dom/Node.cpp:
(WebCore):
(WebCore::collectMatchingObserversForMutation): Add a templatized function to reduce duplicated code.
(WebCore::Node::getRegisteredMutationObserversOfType):
(WebCore::Node::registerMutationObserver): Take a raw pointer because we don't always ref the observer.
* dom/Node.h:
(Node): Remove old method, replaced by templatized static function.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] REGRESSION(r128980): It broke all QRawWebView API test
https://bugs.webkit.org/show_bug.cgi?id=97561

Reviewed by Noam Rosenthal.

Make sure we always send the very first RenderNextFrame message.
Before r128980 it was working accidentally because in the common
case the web process sent a DeleteCompositingLayer message at some
point before the forced repaint would time out and we was sending
the first RenderNextFrame when reacting to that.

* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebView::setActive): Set the LayerTreeRenderer to active
as well. In the QQuickWebView case it is handled by the QtWebPageSGNode.
(QRawWebView::layerTreeRenderer): Added a convenience getter
for the LayerTreeRenderer.
(QRawWebView::paint):
* UIProcess/API/qt/raw/qrawwebview_p.h:
(WebKit):
* UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp:
(tst_qrawwebview::tst_qrawwebview): Added a call to addQtWebProcessToPath
to make my and the follower users of this test easier.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Android] Push more fonts for layout tests to match chromium-linux
https://bugs.webkit.org/show_bug.cgi?id=97746

Tools:

Reviewed by Dirk Pranke.

* DumpRenderTree/chromium/android_fallback_fonts.xml: Added the new fonts into fallback list. Removed the Android system fallback font DroidSansFallback.ttf.
* Scripts/webkitpy/layout_tests/port/builders.py: Add chromium-android to pass style check.
* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidPort.check_build): Added check for md5sum and forwarder utilities to give better error message when they are missing.
(ChromiumAndroidPort.check_sys_deps): Allow host font files to come from one of multiple directories.
(ChromiumAndroidPort._path_to_md5sum):
(ChromiumAndroidDriver._setup_md5sum_and_push_data_if_needed):
(ChromiumAndroidDriver._push_fonts):
(ChromiumAndroidDriver._push_test_resources):

LayoutTests:

Some original rebaselines will be unnecessary after this change.
Checked some rebaselines of chromium-android under fast/text,
but there should be more. Leave them to gardening.

Reviewed by Dirk Pranke.

* platform/chromium-android/TestExpectations: Enabled some skipped tests because now we have the fonts.
* platform/chromium-android/fast/text/complex-text-opacity-expected.txt: Removed. No more need rebaselining.
* platform/chromium-android/fast/text/international/hindi-spacing-expected.txt: Removed. No more need rebaselining.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: make warning about missing BUG identifiers per-port configurable
https://bugs.webkit.org/show_bug.cgi?id=97751

Reviewed by Ojan Vafai.

Prior to this change linting TestExpectations files (checking their style)
would raise warnings if lines were missing a BUG modifier, even
though such a modifier is actually optional in the syntax. As we
migrate the entries over from the Skipped files, these warnings
will generate a lot of noise, and it's not yet clear that we
actually want to require the modifiers on all ports.

So, this change makes this per-port configurable so that they
will generate warnings in the Chromium TestExpectations and not
anywhere else.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser._parse_modifiers):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(MiscTests.test_parse_warning):
(SemanticTests.test_missing_bugid):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.warn_if_bug_missing_in_test_expectations):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.warn_if_bug_missing_in_test_expectations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Chromium debug build fix.

ASSERT contains an inequality of unmatched types. A cast should do the trick.

* bindings/v8/V8Binding.h:
(WebCore::toNativeArguments):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ApplicationCacheStorage does not optimally handle 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=97733

Reviewed by Alexey Proskuryakov.

Added 8 bit string paths.

No functional change, therefore no new tests.

* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::urlHostHash):
(WebCore::ApplicationCacheStorage::store):
(WebCore::parseHeader):
(WebCore::parseHeaders):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Rename RenderStyle::wrapShapeInside/Outside to shapeInside/Outside
https://bugs.webkit.org/show_bug.cgi?id=97707

Patch by Bear Travis <betravis@adobe.com> on 2012-09-27
Reviewed by Antti Koivisto.

The exclusions specification has renamed wrap-shape-inside and wrap-shape-outside
to shape-inside and shape-outside. We should rename the getter/setter functions
in RenderStyle, and update the derived variable and function names accordingly.
For more information, see: http://dev.w3.org/csswg/css3-exclusions/#declaring-shapes

Covered by existing tests. No new functionality.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyExclusionShape::applyValue):
(WebCore::StyleBuilder::StyleBuilder):
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::exclusionShapeInsideInfoForRenderBlock):
(WebCore::ExclusionShapeInsideInfo::isExclusionShapeInsideInfoEnabledForRenderBlock):
(WebCore::ExclusionShapeInsideInfo::removeExclusionShapeInsideInfoForRenderBlock):
(WebCore::ExclusionShapeInsideInfo::computeShapeSize):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::exclusionShapeInsideInfo):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::reportMemoryUsage):
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
merge Skipped file entries into TestExpectations, remove Skipped files
https://bugs.webkit.org/show_bug.cgi?id=97750

Reviewed by Ojan Vafai.

Now that old-run-webkit-tests will skip any tests listed in
TestExpectations files, there is no need to have both Skipped
files and TestExpectations files. This change merges all of the
entries in the Skipped files into the TestExpectations files and
removes the Skipped files.

Subsequent changes will remove support for Skipped files from
both new-run-webkit-tests and old-run-webkit-tests to
complete the project.

* platform/efl/Skipped: Removed.
* platform/efl/TestExpectations:
* platform/mac-lion/Skipped: Removed.
* platform/mac-lion/TestExpectations:
* platform/mac-snowleopard/Skipped: Removed.
* platform/mac-snowleopard/TestExpectations:
* platform/mac-wk2/Skipped: Removed.
* platform/mac-wk2/TestExpectations:
* platform/mac/Skipped: Removed.
* platform/mac/TestExpectations:
* platform/qt-4.8/Skipped: Removed.
* platform/qt-4.8/TestExpectations:
* platform/qt-5.0-wk1/Skipped: Removed.
* platform/qt-5.0-wk1/TestExpectations:
* platform/qt-5.0-wk2/Skipped: Removed.
* platform/qt-5.0-wk2/TestExpectations:
* platform/qt-5.0/Skipped: Removed.
* platform/qt-5.0/TestExpectations:
* platform/qt-arm/Skipped: Removed.
* platform/qt-arm/TestExpectations:
* platform/qt-linux/Skipped: Removed.
* platform/qt-mac/Skipped: Removed.
* platform/qt-mac/TestExpectations:
* platform/qt-win/Skipped: Removed.
* platform/qt/Skipped: Removed.
* platform/qt/TestExpectations:
* platform/win-wk2/Skipped: Removed.
* platform/win-wk2/TestExpectations:
* platform/win-xp/Skipped: Removed.
* platform/win-xp/TestExpectations:
* platform/win/Skipped: Removed.
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations: Renamed from LayoutTests/platform/wincairo/Skipped.
* platform/wk2/Skipped: Removed.
* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] IconDatabase: Add a way to notify when icon data is available
https://bugs.webkit.org/show_bug.cgi?id=63945

Rubber stamped by Anders Carlsson.

Update version of WKIconDatabaseClient and API traits.

* Shared/APIClientTraits.cpp:
(WebKit):
* Shared/APIClientTraits.h:
* UIProcess/API/C/WKIconDatabase.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using dispatch_get_current_queue
https://bugs.webkit.org/show_bug.cgi?id=97806
<rdar://problem/12379094>

Reviewed by Mark Rowe.

* Platform/mac/WorkQueueMac.cpp:
(WorkQueueAndFunction::WorkQueueAndFunction):
(WorkQueueAndFunction):
(WorkQueue::executeFunction):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfterDelay):
Keep track of the associated work queue so we can get it in WorkQueue::executeFunction.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::setUpTerminationNotificationHandler):
We don't care about which queue the termination notification is delivered on since we only want to call
waitpid on the child pid so we can just use a global queue.

* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]):
Use dispatch_get_main_queue here.

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