Web Inspector: [Settings] "previouslyViewedFiles" exceeds local storage quota.
https://bugs.webkit.org/show_bug.cgi?id=113375

Reviewed by Pavel Feldman.

Serialized "previouslyViewedFiles" may make local storage overflow.
Two fixed applied:
- limit number of history log items
- limit length of URIs that get serialized;
  this would affect only data-url URIs.

* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer.HistoryItem.prototype.serializeToObject):
Added length check.
(WebInspector.TabbedEditorContainer.History.prototype.set _serializeToObject):
Added output array length limit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: factor out node search controller from inspector.js
https://bugs.webkit.org/show_bug.cgi?id=112689

Reviewed by Pavel Feldman.

This just extracts the existing logic of toggling node search
from inspector.js into a class of its own, InspectElementModeController.
Drive-by: add CtrlOrMeta+Shift+C to help screen.

* English.lproj/localizedStrings.js:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* inspector/compile-front-end.py:
* inspector/front-end/InspectElementModeController.js: Added.
(WebInspector.InspectElementModeController):
(WebInspector.InspectElementModeController.createShortcut):
(WebInspector.InspectElementModeController.prototype.enabled):
(WebInspector.InspectElementModeController.prototype.disable):
(WebInspector.InspectElementModeController.prototype.toggleSearch.callback):
(WebInspector.InspectElementModeController.prototype.toggleSearch):
(WebInspector.InspectElementModeController.prototype.handleShortcut):
* inspector/front-end/InspectorFrontendAPI.js:
(InspectorFrontendAPI.enterInspectElementMode):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._createGlobalStatusBarItems):
(WebInspector._registerShortcuts):
(WebInspector.documentKeyDown):
(WebInspector._updateFocusedNode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Make JavaScriptSourceFrame work correctly with breakpoints when uiSourceCode does not have a scriptFile.
https://bugs.webkit.org/show_bug.cgi?id=113500

Reviewed by Pavel Feldman.

JavaScriptSourceFrame now listens for uiSourceCode working copy related events and supports muting breakpoints without script file.

* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame):
(WebInspector.JavaScriptSourceFrame.prototype._workingCopyChanged):
(WebInspector.JavaScriptSourceFrame.prototype._workingCopyCommitted):
(WebInspector.JavaScriptSourceFrame.prototype._updateScriptFile):
(WebInspector.JavaScriptSourceFrame.prototype.dispose):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Correct glyph contour winding direction when fake-bolding
https://bugs.webkit.org/show_bug.cgi?id=113411

Patch by Eli Fidler <efidler@blackberry.com> on 2013-03-28
Reviewed by Rob Buis.

* platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
(WebCore::FontPlatformData::applyState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] run-launcher --gtk -2 fails on a WK2-only build
https://bugs.webkit.org/show_bug.cgi?id=113386

Reviewed by Carlos Garcia Campos.

* Scripts/webkitdirs.pm:
(builtDylibPathForName): The WebKit2GTK .so name change from 1.0
version to 3.0. Reflect this change so the builtDylibPathForName
function doesn't fail to report the library as found.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: name timeline overview controls consistently
https://bugs.webkit.org/show_bug.cgi?id=113503

Reviewed by Yury Semikhatsky.

Refactoring, covered by existing tests.

- rename HeapGraph to TimelineMemoryOverview;
- rename TimelineCategoryStrips to TimelineEventOvrview.

* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane):
(WebInspector.TimelineOverviewPane.prototype.setMode):
(WebInspector.TimelineOverviewPane.prototype._setFrameMode):
(WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
(WebInspector.TimelineOverviewPane.prototype._update):
(WebInspector.TimelineOverviewPane.prototype.setMinimumRecordDuration):
(WebInspector.TimelineMemoryOverview):
(WebInspector.TimelineEventOverview):
(WebInspector.TimelineEventOverview.prototype._renderBar):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Handle EXIF orientation for ImageDocuments
https://bugs.webkit.org/show_bug.cgi?id=113423

Internal Bug: PR 293648
Informally Reviewed by Jeff Rogers
Patch by Chris Hutten-Czapski <chutten@blackberry.com> on 2013-03-28
Reviewed by Rob Buis.

Support image orientation in our image draw calls, and advertise
the capability to the calling code. This allows us to respect EXIF
orientation data.

* platform/graphics/BitmapImage.h:
* platform/graphics/blackberry/ImageBlackBerry.cpp:
(WebCore::BitmapImage::draw):
(WebCore):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldRespectImageOrientation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Add support for the simple case of padding a polygonal shape-inside
https://bugs.webkit.org/show_bug.cgi?id=112592

Reviewed by Dirk Schulze.

Source/WebCore:

First pass at computing the padded or inset boundary of a polygon.  This version does not handle
self-intersecting polygons, or values of shape-padding large enough to change the shape of the
original polygon. The implementation computes an offset edge for each polgon edge, where the offset
edge is parallel to the original edge and separated by shape-padding. The padded polygon's vertices
are the intersections of each pair of adjacent offset edges. When adjacent offset edges do not intersect,
because they share a reflex vertex in the original polygon, an approximation to a circular arc
connects the offset edges.

Tests: fast/exclusions/shape-inside/shape-inside-polygon-padding-001.html
       fast/exclusions/shape-inside/shape-inside-polygon-padding-002.html
       fast/exclusions/shape-inside/shape-inside-polygon-padding-003.html

* rendering/ExclusionPolygon.cpp:
(WebCore::isReflexVertex): Just moved this function earlier in the file.
(WebCore::inwardEdgeNormal): Unit vector that's perpindicular to the edge and that points inwards.
(WebCore::outwardEdgeNormal): Unit vector that's perpindicular to the edge and that points outwards.
(WebCore::appendArc): Append a linear approximation to a circular arc to a vector of vertices.
(WebCore::computeShapePaddingBounds): Return a polygon whose edges are all inset by shape-padding from m_polygon.
(WebCore::computeShapeMarginBounds): Just a stub, see bug 112917.
(WebCore::ExclusionPolygon::shapePaddingBounds): Lazily use computeShapePaddingBounds() to initialize m_paddingBounds.
(WebCore::ExclusionPolygon::shapeMarginBounds): Lazily use computeShapeMarginBounds() to initialize m_marginBounds.
(WebCore::ExclusionPolygon::getIncludedIntervals): Now based on the value of shapePaddingBounds().
(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Now based on the value of shapePaddingBounds().
* rendering/ExclusionPolygon.h:
(WebCore::ExclusionPolygon::ExclusionPolygon):

LayoutTests:

Verify that the CSS shape-padding property works correctly for some simple polygonal shapes:
a rectangle, a rectangle rotated 45 degress, and rectangular shape with a single reflex vertex.

* fast/exclusions/shape-inside/shape-inside-polygon-padding-001-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-polygon-padding-001.html: Added.
* fast/exclusions/shape-inside/shape-inside-polygon-padding-002-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-polygon-padding-002.html: Added.
* fast/exclusions/shape-inside/shape-inside-polygon-padding-003-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-polygon-padding-003.html: Added.


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

Add platform specific expectation for http/tests/inspector/console-resource-errors.html.
We get the same result as mac port.

* platform/efl/http/tests/inspector/console-resource-errors-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Custom Elements: should support non-HTML namespaces.
https://bugs.webkit.org/show_bug.cgi?id=111693

Reviewed by Dimitri Glazkov.

Source/WebCore:

Some existing code assumes that the element extends HTMLElements.
This change allow it to extend from Element. Note that the
namespace URI of a custom element is determined by given element
prototype: An element will have XHTML namespace if its prototype
chain includes HTMLElements, SVGElement leads SVG namespace and
null otherwise, respectively.

Test: fast/dom/custom/document-register-namespace.html

* bindings/v8/CustomElementHelpers.cpp:
(WebCore::hasValidPrototypeChainFor): Factored out from isValidPrototypeParameter()
(WebCore::CustomElementHelpers::isValidPrototypeParameter): Extend to support non HTMLElement prototype
(WebCore::CustomElementHelpers::findLocalName): Support non-HTML element names.
* bindings/v8/CustomElementHelpers.h:
(CustomElementHelpers):
* dom/CustomElementConstructor.cpp:
(WebCore::CustomElementConstructor::createElementInternal):
* dom/CustomElementRegistry.cpp:
(WebCore::CustomElementRegistry::registerElement): No longer hard-codes namespace and picks one based on the prototype value.
* dom/CustomElementRegistry.h:
(CustomElementRegistry):

LayoutTests:

* fast/dom/custom/document-register-namespace-expected.txt: Added.
* fast/dom/custom/document-register-namespace.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening of test failures after r147086 and r147090.

* platform/gtk-wk1/TestExpectations:
* platform/gtk/TestExpectations:


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

Rebaseline fast/forms/validationMessage.html after r145024.

* fast/forms/validationMessage-expected.txt:

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

Mark several tests as failing due to missing WKTR / DRT functionality.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Elements] Syntax-highlight the "Edit as HTML" editor
https://bugs.webkit.org/show_bug.cgi?id=113306

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Use CodeMirror as the raw HTML editor for the "Edit as HTML" menu item
(and all multiline editors for WebInspector.startEditing()).
Drive-by fix for handling the editing when the editor has been invoked on the closing tag.

* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype.commit):
(WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
* inspector/front-end/UIUtils.js:
(WebInspector.EditingConfig.prototype.setMultiline):
(WebInspector.startEditing):
(WebInspector.CodeMirrorCSSLoadView): A bogus view to load-unload CodeMirror-related CSS on demand.
* inspector/front-end/elementsPanel.css:
(#elements-content .CodeMirror):
(#elements-content .CodeMirror pre):
(#elements-content .CodeMirror-lines):
* inspector/front-end/elementsPanel.css: CodeMirror styles for the "Edit as HTML" editor.
* inspector/front-end/externs.js: Declare CodeMirror type with some members, as it is third-party code.
* inspector/front-end/inspector.html: Fix script order (UIUtils.js requires View.js).

LayoutTests:

* inspector/elements/edit-dom-actions.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, revert accidentally added line committed in r147117.

* inspector/front-end/ElementsTreeOutline.js:

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

Fix bad rebaseline in r147115.

* fast/forms/validationMessage-expected.txt:
* platform/efl/fast/forms/validationMessage-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Non-painting fixed elements should not cause repaints on scroll
https://bugs.webkit.org/show_bug.cgi?id=110430

Reviewed by Simon Fraser.

Source/WebCore:

Test: compositing/repaint/scroll-fixed-layer-no-content.html
Test: compositing/repaint/scroll-fixed-layer-out-of-view.html

* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath): Check for no-content and out-of-view flag set by RLC.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition): Moved the check for no-content above out-of-view because it's faster.

LayoutTests:

* compositing/repaint/scroll-fixed-layer-no-content.html: Added.
* compositing/repaint/scroll-fixed-layer-no-content-expected.txt: Added.
* compositing/repaint/scroll-fixed-layer-out-of-view.html: Added.
* compositing/repaint/scroll-fixed-layer-out-of-view-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][AC] Animating layer disappears while running with clutter backend
https://bugs.webkit.org/show_bug.cgi?id=110470

Patch by ChangSeok Oh <changseok.oh@collabora.com> on 2013-03-28
Reviewed by Gustavo Noronha Silva.

The reason of this issue is that clutter_actor_remove_child leads to stopping animations
of child actor. ClutterActor's animation could be defined only when it has a parent actor.
So we should avoid the case calling the api as much as we can. At least we don't
need to reset a actor's parent at all if the current parent is same with new one.
If we can't avoid invoking clutter_actor_remove_child for an animating actor, we may apply
a more complicated way to keep the animation. But I haven't faced such a case yet.

Covered by existing animation tests.

* platform/graphics/clutter/GraphicsLayerActor.cpp:
(graphicsLayerActorSetSublayers):
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::recursiveCommitChanges):
(WebCore::GraphicsLayerClutter::updateSublayerList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[jhbuild] GStreamer system plugins conflict with the ones built in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=113508

Reviewed by Martin Robinson.

Prevent the GStreamer plugin scanner to load system-wide
plugins. Only the ones built in JHBuild should be loaded and used
at runtime.

* efl/jhbuildrc:
* gtk/jhbuildrc:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test inspector/console/console-css-warnings.html is failing on debug.
https://bugs.webkit.org/show_bug.cgi?id=113483

Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-28
Reviewed by Alexander Pavlov.

This test is temporatily disabled in TestExpectations. platform/chromium/TestExpectations override this expectation for chromium/debug.
It removed for now.

* platform/chromium/TestExpectations:

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