Changed debug-safari, debug-minibrowser and debug-test-runner to use LLDB by default when
using Xcode 4.5 or later.

Reviewed by Anders Carlsson.

* Scripts/webkitdirs.pm:
(determineDebugger): Changed the default debugger from GDB to LLDB when the Xcode version
is 4.5 or later. Added a --use-gdb switch for overriding this.
(printHelpAndExitForRunAndDebugWebKitAppIfNeeded): Updated to mention --use-gdb and the
how the default debugger choice depends on the Xcode version. Also changed the description
of --no-saved-state to use the same terminology Xcode’s scheme editor uses to describe this
option, and clarified to which OS X versions it applies.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium]Android x86 content shell debug build warning for uninitialized value used as error with gcc 4.6
https://bugs.webkit.org/show_bug.cgi?id=98629

Patch by Wei James <james.wei@intel.com> on 2012-10-10
Reviewed by Adam Barth.

Warning was taken as error for uninitialized value being used when
building content shell for Android x86 with gcc 4.6.

* WebCore.gyp/WebCore.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Needs internal API to return distributed nodes for InsertionPoint
https://bugs.webkit.org/show_bug.cgi?id=98868

Reviewed by Hajime Morita.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

When testing insertion points, we would like to have an internal API which returns a node list
distributed to an insertion point.

We've added the API in Internals.

Test: fast/dom/shadow/distributed-nodes.html

* WebCore.exp.in:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::distributedNodes): Returns the distributed nodes. When InsertionPoint is not
attached, the result will be null, since the distribution is not calculated correctly.
(WebCore):
* html/shadow/InsertionPoint.h:
(InsertionPoint):
* testing/Internals.cpp:
(WebCore::Internals::distributedNodes):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit2:

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

* fast/dom/shadow/distributed-nodes-expected.txt: Added.
* fast/dom/shadow/distributed-nodes.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Store a visible rect in GraphicsLayers, and optionally dump it in layerTreeAsText
https://bugs.webkit.org/show_bug.cgi?id=98839

Reviewed by Sam Weinig.

Source/WebCore:

To replace CATiledLayer with TileCaches, we need to be able to compute the visible part of a GraphicsLayer,
in order to limit the extent of TileCache tiles. Reuse the existing code in GraphicsLayerCA for this,
but store the computed rect in m_visibleRect.

Add a flag to layerTreeAsText() so that tests can optionally include this visible rect in
layer tree dumps. This output will be platform-specific, so we don't want to do it unconditionally.

* WebCore.exp.in: Signature of Frame::layerTreeAsText() changed.
* page/Frame.cpp:
(WebCore::Frame::layerTreeAsText): Change to take some enum flags rather than just a bool.
* page/Frame.h:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::writeIndent): Make into a static class method so subclasses can use it.
(WebCore::GraphicsLayer::dumpProperties): Call a virtual dumpAdditionalProperties() for subclasses.
(showGraphicsLayerTree):
* platform/graphics/GraphicsLayer.h:
(GraphicsLayer): New LayerTreeAsTextIncludeVisibleRects flag.
(WebCore::GraphicsLayer::dumpAdditionalProperties): New virtual method.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveCommitChanges): clipRectForChildren and clipRectForSelf
were previously unused and buggy. Fix to correctly compute clipRectForSelf, to assign
to m_visibleRect.
(WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump m_visibleRect.
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerTreeAsText): Convert the flags from Frame flags
to GraphicsLayerFlags and pass them along.
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
* testing/Internals.cpp:
(WebCore::Internals::layerTreeAsText): Overloaded method to handle the optional IDL arguments.
* testing/Internals.h: Add enum.
* testing/Internals.idl: Add optional flags, and a const short to describe the flags.

Source/WebKit/chromium:

Add a flag to layerTreeAsText() so that tests can optionally include this visible rect in
layer tree dumps. This output will be platform-specific, so we don't want to do it unconditionally.

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::layerTreeAsText):

Source/WebKit/mac:

To replace CATiledLayer with TileCaches, we need to be able to compute the visible part of a GraphicsLayer,
in order to limit the extent of TileCache tiles. Reuse the existing code in GraphicsLayerCA for this,
but store the computed rect in m_visibleRect.

Add a flag to layerTreeAsText() so that tests can optionally include this visible rect in
layer tree dumps. This output will be platform-specific, so we don't want to do it unconditionally.

* WebView/WebFrame.mm:
(-[WebFrame _layerTreeAsText]):

Source/WebKit2:

Add a flag to layerTreeAsText() so that tests can optionally include this visible rect in
layer tree dumps. This output will be platform-specific, so we don't want to do it unconditionally.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Inspector: display IndexedDB integer versions
https://bugs.webkit.org/show_bug.cgi?id=95816

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Added basic test to database-structure.html

* inspector/Inspector.json:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):
* inspector/front-end/IndexedDBModel.js:
(WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
(WebInspector.IndexedDBModel.prototype._loadDatabase):
(WebInspector.IndexedDBModel.Database):
* inspector/front-end/IndexedDBViews.js:
(WebInspector.IDBDatabaseView):
(WebInspector.IDBDatabaseView.prototype._refreshDatabase):

LayoutTests:

* http/tests/inspector/indexeddb/database-structure-expected.txt:
* http/tests/inspector/indexeddb/database-structure.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix gtk build which controls exports via this mysteriously-named
file.

* Source/autotools/symbols.filter:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
EventHandler::handleGestureLongPress breaks compilation if CONTEXT_MENUS isn't set
https://bugs.webkit.org/show_bug.cgi?id=98890

Patch by Luciano Wolf <luciano.wolf@openbossa.org> on 2012-10-10
Reviewed by Caio Marcelo de Oliveira Filho.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureLongPress):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
After r130344, OpaqueJSString::string() shouldn't directly return the wrapped String
https://bugs.webkit.org/show_bug.cgi?id=98801

Reviewed by Geoffrey Garen.

Return a copy of the wrapped String so that the wrapped string cannot be turned into 
an Identifier.

* API/OpaqueJSString.cpp:
(OpaqueJSString::string):
* API/OpaqueJSString.h:
(OpaqueJSString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the mangled symbol name for Frame::layerTreeAsText() to the confusingly named
Windows export file.

* win/WebKit2.def:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
These tests appear to pass.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add attribute for disabling automatic flushes
https://bugs.webkit.org/show_bug.cgi?id=98834

Patch by John Bauman <jbauman@chromium.org> on 2012-10-10
Reviewed by Kenneth Russell.

This attribute allows the compositor context to specify that it wants
to handle flushing itself.

* chromium/public/WebGraphicsContext3D.h:
(WebKit::WebGraphicsContext3D::Attributes::Attributes):
(Attributes):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RegisterFile to JSStack rename fix for a struct member.

Compilation problem in debug build on MIPS
https://bugs.webkit.org/show_bug.cgi?id=98808

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2012-10-10
Reviewed by Alexey Proskuryakov.

In ASSERT conditions structure field name "registerFile" was replaced
with type name "JSStack" and it should be "stack".

* jit/JITStubs.cpp:
(JSC::JITThunks::JITThunks): structure member name fix.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
These tests appear to pass now.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pre-process CSSGrammar.y before running through bison.
https://bugs.webkit.org/show_bug.cgi?id=94290

Patch by Pablo Flouret <pablof@motorola.com> on 2012-10-10
Reviewed by Tony Chang.

.:

* Source/cmake/WebKitMacros.cmake:
    Use WebCore/css/makegrammar.pl to generate bison grammar files.

Source/WebCore:

Running CSSGrammar.y through a preprocessor allows the use of feature
defines in all places of the yacc file (i.e. not just in C blocks).
Mostly useful to be able to keep every part of a feature under feature
flags for self-documenting purposes.

No new tests, CSSGrammar.y should be generated correctly and everything
should keep working as before.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
    Modify build systems to use makegrammar.pl to generate the .y files
    and run those through bison.

* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_preprocessgrammar.py: Added.
    Add a new action to preprocess the CSSGrammar.y.in file before the
    bison rule is run.

* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
    Add the new .y.in / .y.includes files.

* css/CSSGrammar.y.in: Renamed from Source/WebCore/css/CSSGrammar.y.
    Also moved the top declarations section that has includes, defines,
    etc. to its own file. These shouldn't be touched by the first
    pass of the preprocessor. And changed the existing ENABLE(FEATURE)
    ifdefs to ENABLE_FEATURE since the ENABLE() macro is not available
    yet.
* css/CSSGrammar.y.includes: Added.
    The aforementioned declarations header section. After the .y.in file
    is processed it will be concatenated with this one to make the
    CSSGrammar.y file.

* css/makegrammar.pl:
    Modify the script to handle .y.in files.

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