[GTK] Enable DOM4 events constructors in development builds
https://bugs.webkit.org/show_bug.cgi?id=109471

Reviewed by Martin Robinson.

Source/WebCore: 

No new tests - the related tests now pass.

* GNUmakefile.features.am.in: Add the feature define for the DOM4 events
constructors feature, its value defaulting to 0. This value is overridden
with 1 in development builds, effectively enabling the feature.

Tools: 

* Scripts/webkitperl/FeatureList.pm: Enable the feature for the GTK port as well.

LayoutTests: 

* platform/gtk/TestExpectations: Remove the failure expectations, the related
tests now pass.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Enable CSS image-set support in development builds
https://bugs.webkit.org/show_bug.cgi?id=109475

Reviewed by Martin Robinson.

Source/WebCore: 

No new tests - majority of the related tests now passes.

* GNUmakefile.features.am.in: Add the feature define for the CSS image-set feature
with the define value defaulting to 0. The value gets overridden with 1 in development
builds, meaning the feature is enabled under that configuration.

Tools: 

* Scripts/webkitperl/FeatureList.pm: Add the configuration option for the feature.
Note that the Mac port also enables the feature but does so in Platform.h as the feature
is also enabled for the iOS port which can't at the moment be detected via webkitperl.

LayoutTests: 

* platform/gtk/TestExpectations: Reclassify two failures that now fail due to
cursor images not loading while the other expectations are removed as the tests
now pass.
* platform/gtk/fast/css/image-set-value-not-removed-crash-expected.txt: Removed. The generic
expectation now matches the test output.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r142531.
http://trac.webkit.org/changeset/142531
https://bugs.webkit.org/show_bug.cgi?id=109569

Causes html5lib/run-template layout test to crash. (Requested
by atwilson_ on #webkit).

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

Source/WebCore:

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processTemplateEndTag):
(WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
(WebCore::HTMLTreeBuilder::processEndOfFile):
* html/parser/HTMLTreeBuilder.h:
(HTMLTreeBuilder):

LayoutTests:

* html5lib/resources/template.dat:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[TexMap] Apply frames-per-second debug counter to WK1.
https://bugs.webkit.org/show_bug.cgi?id=109540

Reviewed by Noam Rosenthal.

Adds basysKom copyright info to TextureMapperFPSCounter header.

* platform/graphics/texmap/TextureMapperFPSCounter.cpp:
* platform/graphics/texmap/TextureMapperFPSCounter.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Enable CSS Variables feature in development builds
https://bugs.webkit.org/show_bug.cgi?id=109474

Reviewed by Martin Robinson.

Tools: 

* Scripts/webkitperl/FeatureList.pm: Enable the feature on development
builds of the GTK port.

LayoutTests: 

* platform/gtk/TestExpectations: Remove the expectations for tests that now pass.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: separate SuggestBox from TextPrompt
https://bugs.webkit.org/show_bug.cgi?id=109430

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-02-12
Reviewed by Alexander Pavlov.

Create WebInspector.SuggestBoxDelegate interface and
refactor TextPrompt to use this interface. Separate SuggestBox into
WebInspector.SuggestBox namespace and put it into its own file.

No new tests: no change in behaviour.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/SuggestBox.js: Added.
(WebInspector.SuggestBoxDelegate):
(WebInspector.SuggestBoxDelegate.prototype.applySuggestion):
(WebInspector.SuggestBoxDelegate.prototype.acceptSuggestion):
(WebInspector.SuggestBoxDelegate.prototype.userEnteredText):
(WebInspector.SuggestBox):
(WebInspector.SuggestBox.prototype.get visible):
(WebInspector.SuggestBox.prototype.get hasSelection):
(WebInspector.SuggestBox.prototype._onscrollresize):
(WebInspector.SuggestBox.prototype._updateBoxPositionWithExistingAnchor):
(WebInspector.SuggestBox.prototype._updateBoxPosition):
(WebInspector.SuggestBox.prototype._onboxmousedown):
(WebInspector.SuggestBox.prototype.hide):
(WebInspector.SuggestBox.prototype.removeFromElement):
(WebInspector.SuggestBox.prototype._applySuggestion):
(WebInspector.SuggestBox.prototype.acceptSuggestion):
(WebInspector.SuggestBox.prototype._selectClosest):
(WebInspector.SuggestBox.prototype.updateSuggestions):
(WebInspector.SuggestBox.prototype._onItemMouseDown):
(WebInspector.SuggestBox.prototype._createItemElement):
(WebInspector.SuggestBox.prototype._updateItems):
(WebInspector.SuggestBox.prototype._selectItem):
(WebInspector.SuggestBox.prototype._canShowBox):
(WebInspector.SuggestBox.prototype._rememberRowCountPerViewport):
(WebInspector.SuggestBox.prototype._completionsReady):
(WebInspector.SuggestBox.prototype.upKeyPressed):
(WebInspector.SuggestBox.prototype.downKeyPressed):
(WebInspector.SuggestBox.prototype.pageUpKeyPressed):
(WebInspector.SuggestBox.prototype.pageDownKeyPressed):
(WebInspector.SuggestBox.prototype.enterKeyPressed):
(WebInspector.SuggestBox.prototype.tabKeyPressed):
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.userEnteredText):
(WebInspector.TextPrompt.prototype._attachInternal):
(WebInspector.TextPrompt.prototype._completionsReady):
(WebInspector.TextPrompt.prototype.applySuggestion):
(WebInspector.TextPrompt.prototype._applySuggestion):
(WebInspector.TextPrompt.prototype.enterKeyPressed):
(WebInspector.TextPrompt.prototype.upKeyPressed):
(WebInspector.TextPrompt.prototype.downKeyPressed):
(WebInspector.TextPrompt.prototype.pageUpKeyPressed):
(WebInspector.TextPrompt.prototype.pageDownKeyPressed):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [SuggestBox] SuggestBox not hidden when prefix is empty and there is preceding input
https://bugs.webkit.org/show_bug.cgi?id=109568

Reviewed by Vsevolod Vlasov.

The suggestbox would get hidden in the case of empty input, yet it should get hidden
in the case of empty user-entered prefix (which is a wider notion.)

* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.complete):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Get rid of unnecessary complexity in FileSystemUtil: remove _getDirectory() method.
https://bugs.webkit.org/show_bug.cgi?id=109567

Reviewed by Alexander Pavlov.

The code in this method was redundant as the same result could be achieved by using File System API directly.

* inspector/front-end/FileSystemProjectDelegate.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: File system should produce more verbose error messages and recover from errors
https://bugs.webkit.org/show_bug.cgi?id=109571

Reviewed by Alexander Pavlov.

Error handler prints original file system call params now.
Added callbacks to error handler to recover from errors.

* inspector/front-end/FileSystemProjectDelegate.js:
(WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
(WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
(WebInspector.FileSystemUtils.errorMessage):
(.fileSystemLoaded):
(.fileEntryLoaded):
(.errorHandler):
(WebInspector.FileSystemUtils.requestFileContent):
(WebInspector.FileSystemUtils.setFileContent):
(WebInspector.FileSystemUtils._readDirectory):
(.innerCallback):
(WebInspector.FileSystemUtils._requestEntries):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Introduce version controller to migrate settings versions.
https://bugs.webkit.org/show_bug.cgi?id=109553

Reviewed by Yury Semikhatsky.

Source/WebCore:

This patch introduces version controller that could be used to migrate inspector settings.

Test: inspector/version-controller.html

* inspector/front-end/Settings.js:
(WebInspector.Settings):
(WebInspector.VersionController):
(WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
(WebInspector.VersionController.prototype._updateVersionFrom0To1):
* inspector/front-end/inspector.js:

LayoutTests:

* inspector/version-controller-expected.txt: Added.
* inspector/version-controller.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium rebaselines after r142586.

* platform/chromium-mac/fast/canvas/webgl/webgl-layer-update-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC asserting with long parameter list functions in debug mode on ARM traditional
https://bugs.webkit.org/show_bug.cgi?id=109565

Reviewed by Zoltan Herczeg.

Increase the value of sequenceGetByIdSlowCaseInstructionSpace to 80.

* jit/JIT.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed followup to r142606, the EFL port also enables the CSS image-set
feature so the new configuration option's default value should reflect that.

* Scripts/webkitperl/FeatureList.pm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
https://bugs.webkit.org/show_bug.cgi?id=109554

Source/WebCore:

In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.

Drive by fix: I introduced a client interface for the HeapGraphSerializer.
It helps me to do the tests for the serializer.

Reviewed by Yury Semikhatsky.

It is covered by newly added tests in TestWebKitAPI.

* inspector/HeapGraphSerializer.cpp:
(WebCore::HeapGraphSerializer::HeapGraphSerializer):
(WebCore::HeapGraphSerializer::pushUpdate):
(WebCore::HeapGraphSerializer::reportNode):
(WebCore::HeapGraphSerializer::toNodeId):
(WebCore::HeapGraphSerializer::addRootNode):
* inspector/HeapGraphSerializer.h:
(HeapGraphSerializerClient):
(WebCore::HeapGraphSerializerClient::~HeapGraphSerializerClient):
(HeapGraphSerializer):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):

Tools:

In some cases leaves have no pointer. As example when we report a leaf via addPrivateBuffer.
This patch has new set of tests for HeapGraphSerializer.

Reviewed by Yury Semikhatsky.

* TestWebKitAPI/TestWebKitAPI.gypi:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp: Added.
* TestWebKitAPI/win/TestWebKitAPI.vcproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium expectation update.
https://bugs.webkit.org/show_bug.cgi?id=109581

* platform/chromium/TestExpectations: mark debugger-script-preprocessor.html as crashy.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add an optional moduleset with hard to get packages (including libsecret)
https://bugs.webkit.org/show_bug.cgi?id=109195

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-02-12
Reviewed by Philippe Normand.

Add an optional moduleset that includes libsecret. This moduleset will
be used to install some annoyingly hard to obtain dependencies on older
distributions.

* gtk/jhbuild-optional.modules: Added.
* gtk/jhbuild.modules: Add a reference to the new moduleset file.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: refactor some reusable functionality from BraceHighlighter
https://bugs.webkit.org/show_bug.cgi?id=109574

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-02-12
Reviewed by Pavel Feldman.

Source/WebCore:

New test: inspector/editor/text-editor-brace-highlighter.html

Extract functionality which, for given line and cursor position, will
return position for a brace that should be highlighted. Add a layout
test to verify brace highlighter funcionality.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.activeBraceColumnForCursorPosition):
(WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
* inspector/front-end/TextUtils.js:
(WebInspector.TextUtils.isOpeningBraceChar):
(WebInspector.TextUtils.isClosingBraceChar):
(WebInspector.TextUtils.isBraceChar):

LayoutTests:

Add layout test to verify brace highlighter functionality.

* inspector/editor/text-editor-brace-highlighter-expected.txt: Added.
* inspector/editor/text-editor-brace-highlighter.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix Chromium compilation after r142618.

* TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp:
(TestWebKitAPI::HeapGraphReceiver::printNode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: add initial implementation of native memory graph to Timeline
https://bugs.webkit.org/show_bug.cgi?id=109578

Reviewed by Alexander Pavlov.

This change adds inital implementation of native memory graph UI. The graph
will be shown in the same place as DOM counters graph on the Timeline panel.

Added NativeMemoryGraph.js that reuses parts of DOM counters graph
implementation. MemoryStatistics.js was refactor to allow sharing
more code between DOM counters and native memory graph.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/MemoryStatistics.js:
(WebInspector.MemoryStatistics):
(WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
(WebInspector.MemoryStatistics.prototype._createCounterUIList):
(WebInspector.MemoryStatistics.prototype._createCounterUIList.getNodeCount):
(WebInspector.MemoryStatistics.prototype._createCounterUIList.getListenerCount):
(WebInspector.MemoryStatistics.prototype._canvasHeight):
(WebInspector.MemoryStatistics.prototype._updateSize):
(WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
(WebInspector.MemoryStatistics.prototype._drawMarker):
* inspector/front-end/NativeMemoryGraph.js: Added.
(WebInspector.NativeMemoryGraph):
(WebInspector.NativeMemoryCounterUI):
(WebInspector.NativeMemoryCounterUI.prototype._hslToString):
(WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue):
(WebInspector.NativeMemoryCounterUI.prototype.clearCurrentValueAndMarker):
(WebInspector.NativeMemoryGraph.prototype._createCurrentValuesBar):
(WebInspector.NativeMemoryGraph.prototype._createCounterUIList.getCounterValue):
(WebInspector.NativeMemoryGraph.prototype._createCounterUIList):
(WebInspector.NativeMemoryGraph.prototype._canvasHeight):
(WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
(WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
(WebInspector.NativeMemoryGraph.prototype._draw):
(WebInspector.NativeMemoryGraph.prototype._clearCurrentValueAndMarker):
(WebInspector.NativeMemoryGraph.prototype._updateCurrentValue):
(WebInspector.NativeMemoryGraph.prototype._restoreImageUnderMarker):
(WebInspector.NativeMemoryGraph.prototype._saveImageUnderMarker):
(WebInspector.NativeMemoryGraph.prototype._drawMarker):
(WebInspector.NativeMemoryGraph.prototype._maxCounterValue):
(WebInspector.NativeMemoryGraph.prototype._resetTotalValues):
(WebInspector.NativeMemoryGraph.prototype.valueGetter):
(WebInspector.NativeMemoryGraph.prototype._drawGraph):
(WebInspector.NativeMemoryGraph.prototype._discardImageUnderMarker):
* inspector/front-end/TimelinePanel.js:
* inspector/front-end/WebKit.qrc:
* inspector/front-end/timelinePanel.css:
(#memory-graphs-canvas-container.dom-counters .resources-dividers):
(.memory-category-value):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: for event listener provide handler function value in protocol and in UI
https://bugs.webkit.org/show_bug.cgi?id=109284

Patch by Peter Rybin <prybin@chromium.org> on 2013-02-12
Reviewed by Yury Semikhatsky.

Source/WebCore:

The feature implies that we include a real handler function value into event listener description.
Protocol description, inspector DOM agent (with V8 and JSC backends) and front-end is patched accordingly.

* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandler):
(WebCore):
(WebCore::eventListenerHandlerScriptState):
* bindings/js/ScriptEventListener.h:
(WebCore):
* bindings/v8/ScriptEventListener.cpp:
(WebCore::eventListenerHandler):
(WebCore):
(WebCore::eventListenerHandlerScriptState):
* bindings/v8/ScriptEventListener.h:
(WebCore):
* inspector/Inspector.json:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
* inspector/InspectorDOMAgent.h:
(InspectorDOMAgent):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMNode.prototype.eventListeners):
* inspector/front-end/EventListenersSidebarPane.js:
(WebInspector.EventListenersSidebarPane.prototype.update):
(.):

LayoutTests:

Test is rebased.

* inspector/elements/event-listener-sidebar-expected.txt:
* inspector/elements/event-listeners-about-blank-expected.txt:

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