Web Inspector: CPU profile view select overlaps with status bar buttons
https://bugs.webkit.org/show_bug.cgi?id=94243

Reviewed by Pavel Feldman.

- use StatusBarComboBox inated of plain select element in the status bar of CPU profile view;
- add StatusBarComboBox.select()

* inspector/front-end/CPUProfileView.js:
(WebInspector.CPUProfileView.prototype.get statusBarItems):
* inspector/front-end/StatusBarButton.js:
(WebInspector.StatusBarComboBox.prototype.selectedOption):
(WebInspector.StatusBarComboBox.prototype.select):
* inspector/front-end/externs.js: drive-by fix: add declaration to suppress compilation error;
(Array.prototype.select):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: mark two accessibility tests as failing on GTK. Bug 94200.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement UndoManager's V8 bindings
https://bugs.webkit.org/show_bug.cgi?id=93912

Patch by Sukolsak Sakshuwong <sukolsak@google.com> on 2012-08-17
Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch implements V8 bindings for UndoManager's transact() method.
We keep alive the user objects passed to transact() by storing them in
a hidden property of DOMTransaction's wrapper and registering implicit
references from UndoManager to DOMTransaction.

Tests: editing/undomanager/domtransaction-survives-gc.html
       editing/undomanager/undomanager-isolated-world.html
       editing/undomanager/undomanager-transact.html
       editing/undomanager/undomanager-undo-redo.html
       editing/undomanager/undomanager-use-after-free.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMTransaction.cpp: Added.
(WebCore):
(WebCore::DOMTransaction::DOMTransaction):
(WebCore::DOMTransaction::create):
(WebCore::DOMTransaction::apply):
(WebCore::DOMTransaction::unapply):
(WebCore::DOMTransaction::reapply):
* bindings/js/DOMTransaction.h: Added.
(WebCore):
(DOMTransaction):
(WebCore::DOMTransaction::undoManager):
(WebCore::DOMTransaction::setUndoManager):
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSUndoManagerCustom.cpp: Added.
(WebCore):
(WebCore::JSUndoManager::transact):
* bindings/v8/DOMTransaction.cpp: Added.
(WebCore):
(WebCore::DOMTransaction::DOMTransaction):
(WebCore::DOMTransaction::create):
(WebCore::DOMTransaction::apply):
(WebCore::DOMTransaction::unapply):
(WebCore::DOMTransaction::reapply):
(WebCore::DOMTransaction::getFunction):
(WebCore::DOMTransaction::callFunction):
* bindings/v8/DOMTransaction.h: Added.
(WebCore):
(DOMTransaction):
(WebCore::DOMTransaction::undoManager):
(WebCore::DOMTransaction::setUndoManager):
* bindings/v8/V8HiddenPropertyName.h:
(WebCore):
* bindings/v8/custom/V8DOMTransactionCustom.cpp: Added.
(WebCore):
(WebCore::V8DOMTransaction::visitDOMWrapper):
* bindings/v8/custom/V8UndoManagerCustom.cpp: Added.
(WebCore):
(WebCore::V8UndoManager::transactCallback):
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::undoManager):
* dom/Element.cpp:
(WebCore::Element::undoManager):
(WebCore::Element::disconnectUndoManager):
* editing/CompositeEditCommand.h:
* editing/DOMTransaction.idl: Added.
* editing/Editor.cpp:
(WebCore::Editor::appliedEditing):
(WebCore::Editor::unappliedEditing):
(WebCore::Editor::reappliedEditing):
(WebCore::Editor::canUndo):
(WebCore::Editor::undo):
(WebCore::Editor::canRedo):
(WebCore::Editor::redo):
* editing/UndoManager.cpp:
(WebCore::UndoManager::create):
(WebCore::UndoManager::UndoManager):
(WebCore::clearStack):
(WebCore):
(WebCore::UndoManager::disconnect):
(WebCore::UndoManager::stop):
(WebCore::UndoManager::~UndoManager):
(WebCore::createUndoManagerEntry):
(WebCore::UndoManager::transact):
(WebCore::UndoManager::undo):
(WebCore::UndoManager::redo):
(WebCore::UndoManager::registerUndoStep):
(WebCore::UndoManager::registerRedoStep):
(WebCore::UndoManager::clearUndo):
(WebCore::UndoManager::clearRedo):
* editing/UndoManager.h:
(WebCore):
(UndoManager):
(WebCore::UndoManager::position):
(WebCore::UndoManager::canUndo):
(WebCore::UndoManager::canRedo):
(WebCore::UndoManager::undoScopeHost):
(WebCore::UndoManager::ownerNode):
* editing/UndoManager.idl:
* editing/UndoStep.h:
(UndoStep):

LayoutTests:

* editing/undomanager/domtransaction-survives-gc-expected.txt: Added.
* editing/undomanager/domtransaction-survives-gc.html: Added.
* editing/undomanager/undomanager-isolated-world-expected.txt: Added.
* editing/undomanager/undomanager-isolated-world.html: Added.
* editing/undomanager/undomanager-transact-expected.txt: Added.
* editing/undomanager/undomanager-transact.html: Added.
* editing/undomanager/undomanager-undo-redo-expected.txt: Added.
* editing/undomanager/undomanager-undo-redo.html: Added.
* editing/undomanager/undomanager-use-after-free-expected.txt: Added.
* editing/undomanager/undomanager-use-after-free.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Introduce SpinButtonElement.{cpp,h} into build
https://bugs.webkit.org/show_bug.cgi?id=94289

Reviewed by Kent Tamura.

This patch introduces html/shadow/SpinButtonElement.{cpp,h} into
build, files were copied from TextControlInnerElements.{cpp,h} by
bug 93943.

No new tests. This patch doesn't changes behavior.

* CMakeLists.txt: Added SpinButtonElement.cpp
* GNUmakefile.list.am: Added SpinButtonElement.{cpp,h}
* Target.pri: Added SpinButtonElement.cpp
* WebCore.gypi: Added SpinButtonElement.{cpp,h}
* WebCore.vcproj/WebCore.vcproj: Added SpinButtonElement.{cpp,h}
* WebCore.xcodeproj/project.pbxproj: Added SpinButtonElement.{cpp,h}
* accessibility/AccessibilitySpinButton.h: Replaced include file to SpinButtonElement.h from TextControlInnerElements.h
* html/TextFieldInputType.h: Added include file SpinButtonElement.h
* html/shadow/DateTimeEditElement.h: Replaced include file to SpinButtonElement.h from TextControlInnerElements.h
* html/shadow/SpinButtonElement.cpp: Removed code other than SpinButtonElement.
* html/shadow/SpinButtonElement.h: Removed code other than SpinButtonElement.
* html/shadow/TextControlInnerElements.cpp: Removed code of SpinButtonElement.
* html/shadow/TextControlInnerElements.h: Removed SpinButtonElement.
* rendering/RenderTheme.cpp: Added include file SpinButtonElement.h

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Tests] Adding tests for multiple fields time input UI
https://bugs.webkit.org/show_bug.cgi?id=94196

Reviewed by Kent Tamura.

This patch introduces functional testing for multiple fields time input
UI when both ENABLE_INPUT_TYPE_TIME and ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS
are enabled.

* fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-step-attribute-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-step-attribute.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Enable multiple fields time input UI for Chromium except Android
https://bugs.webkit.org/show_bug.cgi?id=94195

Reviewed by Kent Tamura.

This patch enables multiple fields time input UI for Chromium except
for Android.

No new tests. Existing tests in fast/forms/time-multiple-fields/
covers appearance and functionality of multiple fields time UI.

A manual checking for browser displays multiple fields time input UI
is needed.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore): Changed RuntimeEnabledFeatures::isInputTypeTimeEnabled to true
if ENABLE_INPUT_TYPE_TIME is enabled.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: libwebp-0.2.0: handle alpha channel if present

https://bugs.webkit.org/show_bug.cgi?id=93430

Patch by Pascal Massimino <pascal.massimino@gmail.com> on 2012-08-17
Reviewed by Adam Barth.

updated the Layout test webp-image-decoding.html

* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(outputMode):
        switch to premultiplied-RGB if needed
(WebCore::WEBPImageDecoder::WEBPImageDecoder):
(WebCore::WEBPImageDecoder::decode):
        use WebPGetFeatures() instead of WebPGetInfo(),
        to detect presence of alpha channel
* platform/image-decoders/webp/WEBPImageDecoder.h:
(WEBPImageDecoder):
        add a m_hasAlpha field

LayoutTests: update layout test for new libwebp-0.2.0
https://bugs.webkit.org/show_bug.cgi?id=93430

Patch by Pascal Massimino <pascal.massimino@gmail.com> on 2012-08-17
Reviewed by Adam Barth.

* fast/images/resources/test2.webp: Added.
        lossy+alpha example
* fast/images/resources/test3.webp: Added.
        lossless with alpha example
* fast/images/webp-image-decoding-expected.txt:
* fast/images/webp-image-decoding.html:
        Updated test. Will now decode test2.webp and test3.webp too.

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

Add two more crash expectations for a couple of tests that started crashing
after r125710.

Update stale test expectations, removing or adding build type modifiers
or updating the expected failure type.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: build Elements, Resources, Timeline, Audits and Console panels lazily.
https://bugs.webkit.org/show_bug.cgi?id=94222

Reviewed by Vsevolod Vlasov.

Source/WebCore:

There is no need to construct these panels on inspector startup - we can do that lazily.
This change introduces the concept of PanelDescriptor that is sufficient for the panel
representation before it has been selected. It also makes selected panels build lazily.

The next step is to migrate rest of the panels and load the panel code lazily as well.
That should speed up startup time significantly.

* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditsPanel):
(WebInspector.AuditsPanel.prototype._auditFinishedCallback):
(WebInspector.AuditsSidebarTreeElement):
(WebInspector.AuditsSidebarTreeElement.prototype.onselect):
(WebInspector.AuditResultSidebarTreeElement):
(WebInspector.AuditResultSidebarTreeElement.prototype.onselect):
* inspector/front-end/ConsolePanel.js:
* inspector/front-end/DOMStorage.js:
(WebInspector.DOMStorageDispatcher.prototype.addDOMStorage):
(WebInspector.DOMStorageDispatcher.prototype.domStorageUpdated):
* inspector/front-end/Database.js:
(WebInspector.DatabaseDispatcher.prototype.addDatabase):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel):
(WebInspector.ElementsPanel.prototype.revealAndSelectNode):
(WebInspector.ElementsPanel.prototype.setSearchingForNode):
(WebInspector.ElementsPanel.prototype.toggleSearchingForNode):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._populateForcedPseudoStateItems):
* inspector/front-end/ExtensionPanel.js:
(WebInspector.ExtensionPanel):
(WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onCreatePanel):
(WebInspector.ExtensionServer.prototype._onAddAuditCategory):
* inspector/front-end/InspectorFrontendAPI.js:
(InspectorFrontendAPI.isTimelineProfilingEnabled):
(InspectorFrontendAPI.setTimelineProfilingEnabled):
(InspectorFrontendAPI.showConsole):
(InspectorFrontendAPI.showResources):
(InspectorFrontendAPI.enterInspectElementMode):
* inspector/front-end/InspectorView.js:
(WebInspector.InspectorView):
(WebInspector.InspectorView.prototype.addPanel):
(WebInspector.InspectorView.prototype.panel):
(WebInspector.InspectorView.prototype.showPanel):
(WebInspector.InspectorView.prototype._keyDownInternal):
* inspector/front-end/NetworkPanel.js:
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.wasShown):
(WebInspector.Panel.prototype.willHide):
(WebInspector.PanelDescriptor):
(WebInspector.PanelDescriptor.prototype.name):
(WebInspector.PanelDescriptor.prototype.title):
(WebInspector.PanelDescriptor.prototype.iconURL):
(WebInspector.PanelDescriptor.prototype.setIconURL):
(WebInspector.PanelDescriptor.prototype.panel):
(WebInspector.PanelDescriptor.prototype.lazy):
* inspector/front-end/ProfilesPanel.js:
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype.cachedResourcesLoaded):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel):
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
(WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL):
* inspector/front-end/TimelinePanel.js:
* inspector/front-end/Toolbar.js:
(WebInspector.Toolbar.prototype.addPanel):
(WebInspector.Toolbar.prototype._createPanelToolbarItem.onToolbarItemClicked):
(WebInspector.Toolbar.prototype._createPanelToolbarItem.panelSelected):
(WebInspector.Toolbar.prototype._createPanelToolbarItem):
(WebInspector.Toolbar.prototype._panelSelected):
(WebInspector.Toolbar.prototype._setDropdownVisible):
(WebInspector.ToolbarDropdown):
(WebInspector.ToolbarDropdown.prototype.show):
(WebInspector.ToolbarDropdown.prototype._populate):
* inspector/front-end/inspector.css:
(.toolbar-small .toolbar-icon.custom-toolbar-icon):
* inspector/front-end/inspector.js:
(WebInspector._panelDescriptors):
(WebInspector._panelSelected):
(WebInspector._createGlobalStatusBarItems):
(WebInspector.documentClick.followLink):
(WebInspector.documentClick):
(WebInspector.openResource):
(WebInspector.showPanel):
(WebInspector.panel):
(WebInspector.inspect.):
(WebInspector.inspect):
(WebInspector._showAnchorLocation):
(WebInspector.showProfileForURL):
(WebInspector.frontendReused):

LayoutTests:

* http/tests/inspector/elements-test.js:
(initialize_ElementTest.InspectorTest.selectNodeWithId.onNodeFound):
(initialize_ElementTest.InspectorTest.selectNodeWithId):
(initialize_ElementTest.InspectorTest.expandElementsTree):
* http/tests/inspector/extensions-test.js:
(initialize_ExtensionsTest.InspectorTest.showPanel):
* http/tests/inspector/inspect-element.html:
* http/tests/inspector/resource-har-pages.html:
* http/tests/inspector/resource-tree/resource-tree-frame-add.html:
* http/tests/inspector/resource-tree/resource-tree-non-unique-url.html:
* http/tests/inspector/resource-tree/resource-tree-reload.html:
* http/tests/inspector/resource-tree/resource-tree-test.js:
(initialize_ResourceTreeTest.InspectorTest.dumpResourcesTree):
* inspector/console/command-line-api-inspect.html:
* inspector/debugger/dom-breakpoints.html:
* inspector/debugger/source-frame.html:
* inspector/elements/edit-dom-actions.html:
* inspector/elements/elements-img-tooltip.html:
* inspector/elements/elements-panel-limited-children.html:
* inspector/elements/highlight-node-scaled.html:
* inspector/extensions/extensions-panel.html:
* inspector/extensions/extensions-sidebar.html:
* inspector/styles/force-pseudo-state.html:
* inspector/styles/set-property-boundaries.html:
* inspector/styles/styles-new-API.html:
* inspector/timeline/timeline-test.js:
(initialize_Timeline.InspectorTest.stopTimeline):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Getting unnecessary  EINA_SAFETY_ON_NULL_RETURN_VAL warnings while page navigation
https://bugs.webkit.org/show_bug.cgi?id=94308

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-08-17
Reviewed by Kenneth Rohde Christiansen.

The reason is that loadClient.didChangeBackForwardList callback is invoked with zero
arguments which is valid case while page back-forward navigation and means basically
that the back-froward list has changed but items were not added or deleted.

* UIProcess/API/efl/ewk_back_forward_list.cpp:
(ewk_back_forward_list_changed):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Replace use of internal Weak smart pointer with JSWeakObjectMap
https://bugs.webkit.org/show_bug.cgi?id=93872

Reviewed by Kenneth Rohde Christiansen.

Source/JavaScriptCore:

* Target.pri: Add missing JSWeakObjectMap file to build.

Source/WebCore:

The intention of this patch series is to replace use of internal JSC
API with use of the stable and public C API.

The JSC::Weak template is internal API and the only part of the C API
that exposes similar functionality is the JSWeakObjectMap. It is
special in the sense that its life-time is tied to the life-time of the
JS global object, which in turn is subject to garbage collection. In
order to maximize re-use of the same map across different JSContextRef
instances, we use one JSWeakObjectMap per context group and store the
map in a separate context.

* bridge/qt/qt_instance.cpp:
(JSC::Bindings::unusedWeakObjectMapCallback):
(Bindings):
(JSC::Bindings::WeakMapImpl::WeakMapImpl):
(JSC::Bindings::WeakMapImpl::~WeakMapImpl):
(JSC::Bindings::WeakMap::~WeakMap):
(JSC::Bindings::WeakMap::set):
(JSC::Bindings::WeakMap::get):
(JSC::Bindings::WeakMap::remove):
* bridge/qt/qt_instance.h:
(WeakMapImpl):
(Bindings):
(WeakMap):
(QtInstance):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod):
(JSC::Bindings::QtRuntimeMethod::jsObjectRef):
* bridge/qt/qt_runtime.h:
(QtRuntimeMethod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Rename SpinButtonElement::StepActionHandler to SpinButtonOwner
https://bugs.webkit.org/show_bug.cgi?id=94311

Reviewed by Kent Tamura.

This patch renames SpinButtonElement::StepActionHandler class to
SpinButtonOwner for adding functions to it for communicating spin
button and its owner.

No new tests. This patch doesn't change behavior.

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::~TextFieldInputType):
(WebCore::TextFieldInputType::destroyShadowSubtree):
* html/TextFieldInputType.h:
(TextFieldInputType):
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::~DateTimeEditElement):
* html/shadow/DateTimeEditElement.h:
(DateTimeEditElement):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::create):
(WebCore::SpinButtonElement::doStepAction):
* html/shadow/SpinButtonElement.h:
(WebCore::SpinButtonElement::SpinButtonOwner::~SpinButtonOwner):
(SpinButtonElement):
(WebCore::SpinButtonElement::removeSpinButtonOwner):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed fast/forms/file/selected-files-from-history-state.html on Windows
https://bugs.webkit.org/show_bug.cgi?id=94278

Patch by Marja Hölttä <marja@chromium.org> on 2012-08-17
Reviewed by Jochen Eisinger.

* fast/forms/file/selected-files-from-history-state.html: Fixed the test.
* platform/chromium/TestExpectations: Removed the expectation to fail.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Tests] time-multiple-fields-appearance-basic.html and time-multiple-fields-appearance-pseudo-elements.html are failed on Chromium Windows
https://bugs.webkit.org/show_bug.cgi?id=94297

Unreviewd. Temporary disable these tests.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] QNX build fails due to missing timegm declaration
https://bugs.webkit.org/show_bug.cgi?id=93842

Patch by Milian Wolff <milian.wolff@kdab.com> on 2012-08-17
Reviewed by Simon Hausmann.

On QNX, timegm is declared in nbutils.h and one must link against
nbutils to use it.

* WTF.pri:
* wtf/DateMath.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
View source doesn't interpret escape characters in hrefs.
https://bugs.webkit.org/show_bug.cgi?id=94216

Patch by Anthony Berent <aberent@chromium.org> on 2012-08-17
Reviewed by Adam Barth.

Source/WebCore:

The cause was that HTMLViewSourceDocument was passing the unparsed content of the href attribute to the DOM as the URL for the link.
The fix is to pass the parsed content of the href attribute to the DOM.

Test: fast/forms/frames/viewsource-link-on-href-value.html extended to test this case.

* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::processTagToken): Pass parsed URL to AddRange.
(WebCore::HTMLViewSourceDocument::addRange):Added argument for parsed URL, and used this instead of text, to create link.
* html/HTMLViewSourceDocument.h:
(HTMLViewSourceDocument): Add new link argument to addRange for parsed URL, defaulting to "".

LayoutTests:

Extra href added to test containing escape characters

* fast/frames/resources/viewsource-frame-3.html: Added href containing escape characters to test
* fast/frames/resources/viewsource-frame-4.html: Added href containing escape characters to test
* fast/frames/viewsource-link-on-href-value.html: Check escape characters are correctly interpreted in href.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: requests filtering in network tab
https://bugs.webkit.org/show_bug.cgi?id=93090

Patch by Pavel Chadnov <chadnov@google.com> on 2012-08-17
Reviewed by Vsevolod Vlasov.

Added filtering support to search panel.
Implemented filtering for network panel.

* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._clearSearchMatchedList):
(WebInspector.NetworkLogView.prototype._updateHighlightIfMatched):
(WebInspector.NetworkLogView.prototype._highlightMatchedRequests):
(WebInspector.NetworkLogView.prototype._highlightNthMatchedRequestForSearch):
(WebInspector.NetworkLogView.prototype.performSearch):
(WebInspector.NetworkLogView.prototype.performFilter):
(WebInspector.NetworkLogView.prototype.jumpToPreviousSearchResult):
(WebInspector.NetworkLogView.prototype.jumpToNextSearchResult):
(WebInspector.NetworkPanel.prototype.performFilter):
(WebInspector.NetworkDataGridNode.prototype._highlightMatchedSubstring):
* inspector/front-end/SearchController.js:
(WebInspector.SearchController):
(WebInspector.SearchController.prototype.cancelSearch):
(WebInspector.SearchController.prototype.showSearchField):
(WebInspector.SearchController.prototype._switchFilterToSearch):
(WebInspector.SearchController.prototype._switchSearchToFilter):
(WebInspector.SearchController.prototype._updateFilterVisibility):
(WebInspector.SearchController.prototype._replaceAll):
(WebInspector.SearchController.prototype._filterCheckboxClick):
(WebInspector.SearchController.prototype._performFilter):
(WebInspector.SearchController.prototype._onFilterInput):
(WebInspector.SearchController.prototype._onSearchInput):
(WebInspector.SearchController.prototype.resetFilter):
* inspector/front-end/inspector.css:
(.filter):
* inspector/front-end/networkLogView.css:
(.network-log-grid.data-grid.filter-other table.data tr.revealed.network-type-other:not(.filtered-out)):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: SourceFrame shouldn't be a View
https://bugs.webkit.org/show_bug.cgi?id=93444

Patch by Jan Keromnes <janx@linux.com> on 2012-08-17
Reviewed by Pavel Feldman.

Source/WebCore:

Move SourceFrame from being a View to being an Object. This will allow
future ExtensionSourceFrames to share a single iframe ExtensionView.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor.prototype.wasShown):
(WebInspector.CodeMirrorTextEditor.prototype.willHide):
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype.wasShown):
(WebInspector.DefaultTextEditor.prototype.willHide):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame):
(WebInspector.SourceFrame.prototype.show):
(WebInspector.SourceFrame.prototype.detach):
(WebInspector.SourceFrame.prototype.focus):
(WebInspector.SourceFrame.prototype._onTextEditorWasShown):
(WebInspector.SourceFrame.prototype._onTextEditorWillHide):
* inspector/front-end/TextEditor.js:
* inspector/front-end/scriptsPanel.css:

LayoutTests:

Use TextEditor as a View instead of SourceFrame.

* inspector/debugger/reveal-execution-line.html:
* inspector/debugger/source-frame-count.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: decouple extension server from the Elements panel
https://bugs.webkit.org/show_bug.cgi?id=94322

Reviewed by Pavel Feldman.

- relay WebInspector.ElementsTreeOutline.Events.SelectedNodeChanged received in ElementsPanel on WebInspector.notifications;

* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._selectedNodeChanged):
* inspector/front-end/ExtensionServer.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: hovering over an image link in Timeline popup kills popup
https://bugs.webkit.org/show_bug.cgi?id=94213

Reviewed by Pavel Feldman.

- Fixed bug with ElementsPanel PopoverHelper acting on the TimelinePanel (due to which the original issue occurs).
- Image preview added to resource entries popover in the timeline.
- Extracted the core image preview building code into UIUtils.js.
- Drive-by: fixed image centering in the preview element.

* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel):
(WebInspector.ElementsPanel.prototype._showPopover.showPopover):
(WebInspector.ElementsPanel.prototype._showPopover):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._showPopover.showCallback):
(WebInspector.TimelinePanel.prototype._showPopover):
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.needsPreviewElement):
(WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
First build the image preview element if necessary, then do everything else.
(WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
Original generatePopupContent() code plus the preview generation when necessary.
* inspector/front-end/UIUtils.js:
(WebInspector.buildImagePreviewContents.errorCallback):
(WebInspector.buildImagePreviewContents.buildContent):
(WebInspector.buildImagePreviewContents): Extracted from ElementsPanel. Enabled building of preview elements without the dimensions text data.
* inspector/front-end/elementsPanel.css:
(.image-preview-container):
(.image-preview-container img):
* inspector/front-end/timelinePanel.css:
(.image-preview-container): Fixed centering of the preview container contents.
(.image-preview-container img):
(.image-container):

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