[chromium] fast/text/international/danda-space.html is failing
https://bugs.webkit.org/show_bug.cgi?id=113169

Unreviewed test expectations update.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Mark canvas-toDataURL-webp.html imageOnlyFailure
https://bugs.webkit.org/show_bug.cgi?id=113169

Unreviewed test expectations update.

Start generating test images on the bots now that libwebp 0.3.0
has landed in chromium webkit.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactoring: Pull Node::disabled() and Node::isInert() down to Element.
https://bugs.webkit.org/show_bug.cgi?id=112085

Reviewed by Hajime Morrita.

Node is too low a level for these methods. The plan is to rename
Element::disabled to isDisabledFormControl and to remove
Element::isEnabledFormControl.

No new tests, just refactoring.

* dom/Element.cpp:
(WebCore::Element::disabled):
(WebCore):
(WebCore::Element::isInert):
* dom/Element.h:
(Element):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
* dom/GestureEvent.cpp:
(WebCore::GestureEventDispatchMediator::dispatchEvent):
* dom/MouseEvent.cpp:
(WebCore::MouseEventDispatchMediator::dispatchEvent):
* dom/Node.cpp:
(WebCore::Node::handleLocalEvents):
(WebCore::Node::willRespondToMouseMoveEvents):
(WebCore::Node::willRespondToMouseClickEvents):
(WebCore::Node::willRespondToTouchEvents):
* dom/Node.h:
(Node):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Settings] Use registry to track settings objects.
https://bugs.webkit.org/show_bug.cgi?id=113008

Reviewed by Pavel Feldman.

Currently .createSetting creates new instance any time it is invoked.
When one instance saves value, the other instance do not know about it.

To resolve this issue we can use registry to make .createSetting return
same object for specific key.

* inspector/front-end/Settings.js:
(WebInspector.Settings.prototype.createSetting): Use registry.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clear button visibility is not updated when restoring form state
https://bugs.webkit.org/show_bug.cgi?id=113172

Source/WebCore:

Clear button wasn't showing up when restoring form state.

Reviewed by Kent Tamura.

Tests: fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-visibility-after-restore.html
       fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-visibility-after-restore.html
       fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-visibility-after-restore.html
       fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-visibility-after-restore.html
       fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-visibility-after-restore.html

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState):

LayoutTests:

Reviewed by Kent Tamura.

* fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-visibility-after-restore-expected.html: Added.
* fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-visibility-after-restore.html: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-visibility-after-restore-expected.html: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-visibility-after-restore.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-visibility-after-restore-expected.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-visibility-after-restore.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-visibility-after-restore-expected.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-visibility-after-restore.html: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-visibility-after-restore-expected.html: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-visibility-after-restore.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Memory leak when closing a tab
https://bugs.webkit.org/show_bug.cgi?id=112127

Patch by Hurnjoo Lee <hurnjoo.lee@samsung.com> on 2013-03-25
Reviewed by Noam Rosenthal.

When closing a tab, if there are any updates pending in CoordinatedGraphicsScene's
render queue, the scene is not freed because reference count of m_scene is not zero.

No new tests.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::detach): When bind updates in CoordinatedGraphicsScene,
the reference count of m_scene is increasing, if m_renderQueue is not empty
before closing tab, then m_scene is never freed.
Hence, when closing tab, need to clear m_renderQueue explicitly in order to
destroy m_scene.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Remove RenderRegion::printRegionObjectsStyles
https://bugs.webkit.org/show_bug.cgi?id=113081

Reviewed by Tony Chang.

No change in functionality, remove unused function..

* rendering/RenderRegion.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Exception when turning on pretty print without any displayed source in the editor
https://bugs.webkit.org/show_bug.cgi?id=113136

Patch by PhistucK <phistuck@chromium.org> on 2013-03-25
Reviewed by Vsevolod Vlasov.

No new tests.
Added a check for the existence of currently edited document.

* inspector/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._toggleFormatSource):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mark fast/css/font-family-pictograph.html as flaky on Linux

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardneing. Skip two tests, because they are failing with timed out.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Profiles] Remove unused private member.
https://bugs.webkit.org/show_bug.cgi?id=113015

Reviewed by Pavel Feldman.

_profileGroupsForLinks is not used anymore.

* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._reset): Removed unused member.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Overview] Make "drag-to-move" feature more discoverable.
https://bugs.webkit.org/show_bug.cgi?id=113032

Reviewed by Pavel Feldman.

To move overview window user could drag-n-drop over
time "ribbon" on OverviewGrid.

This feature is hard to discover.

Setting "move" cursor will make this feature more discoverable.

* inspector/front-end/inspectorCommon.css:
Set "move" cursor to draggable area.
* inspector/front-end/OverviewGrid.js: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup: Tiny nits in ContentSecurityPolicy::reportViolation.
https://bugs.webkit.org/show_bug.cgi?id=112784

Reviewed by Jochen Eisinger.

Just cleanup of three tiny nits I ran across in
ContentSecurityPolicy::reportViolation while doing other work.

- 'directiveText' and 'effectiveDirective' can't be empty; we pass in
  values at every callsite. We can safely remove the 'isEmpty()' checks.
  Moreover, even if they could possibly somehow be empty, we should
  still include those empty strings in the report, rather than
  dropping the values entirely.

- We don't need to hold 'document->referrer()' in a temp variable.

* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Making pixel test bot happier after r146206.

* platform/qt/fast/frames/flattening/frameset-flattening-grid-expected.png:
* platform/qt/fast/frames/flattening/frameset-flattening-simple-expected.png:
* platform/qt/fast/frames/flattening/frameset-flattening-subframe-resize-expected.png:
* platform/qt/fast/frames/flattening/iframe-flattening-fixed-height-expected.png:
* platform/qt/fast/frames/flattening/iframe-flattening-fixed-width-and-height-expected.png:
* platform/qt/fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-expected.png:
* platform/qt/fast/frames/flattening/iframe-flattening-fixed-width-expected.png:
* platform/qt/fast/frames/flattening/iframe-flattening-offscreen-expected.png:
* platform/qt/fast/frames/flattening/iframe-flattening-out-of-view-expected.png:
* platform/qt/fast/frames/flattening/iframe-flattening-simple-expected.png:
* platform/qt/fast/frames/frame-scrolling-attribute-expected.png:
* platform/qt/fast/frames/frameset-style-recalc-expected.png:
* platform/qt/fast/frames/iframe-scrolling-attribute-expected.png:
* platform/qt/fast/frames/iframe-with-frameborder-expected.png:
* platform/qt/fast/frames/viewsource-attribute-expected.png:
* platform/qt/fast/gradients/background-clipped-expected.png:
* platform/qt/fast/gradients/border-image-gradient-sides-and-corners-expected.png:
* platform/qt/fast/gradients/crash-on-zero-radius-expected.png:
* platform/qt/fast/gradients/radial-centered-expected.png:
* platform/qt/fast/html/details-nested-1-expected.png:
* platform/qt/fast/html/details-nested-2-expected.png:
* platform/qt/fast/html/details-writing-mode-expected.png:
* platform/qt/fast/html/font-weight-bold-for-b-and-strong-expected.png:
* platform/qt/fast/html/link-rel-stylesheet-expected.png:
* platform/qt/fast/html/listing-expected.png:
* platform/qt/fast/html/marquee-scroll-expected.png:
* platform/qt/fast/html/marquee-scrollamount-expected.png:
* platform/qt/fast/images/image-map-anchor-children-expected.png:
* platform/qt/fast/images/imagemap-circle-focus-ring-expected.png:
* platform/qt/fast/images/imagemap-focus-ring-expected.png:
* platform/qt/fast/images/imagemap-focus-ring-outline-color-expected.png:
* platform/qt/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png:
* platform/qt/fast/images/imagemap-focus-ring-zoom-expected.png:
* platform/qt/fast/images/imagemap-polygon-focus-ring-expected.png:
* platform/qt/fast/inline-block/001-expected.png:
* platform/qt/fast/inline-block/002-expected.png:
* platform/qt/fast/inline-block/003-expected.png:
* platform/qt/fast/inline-block/006-expected.png:
* platform/qt/fast/inline-block/14498-positionForCoordinates-expected.png:
* platform/qt/fast/inline-block/contenteditable-baseline-expected.png:
* platform/qt/fast/inline-block/tricky-baseline-expected.png:
* platform/qt/fast/inline/25277-2-expected.png:
* platform/qt/fast/inline/25277-expected.png:
* platform/qt/fast/inline/continuation-outlines-with-layers-2-expected.png:
* platform/qt/fast/inline/drawStyledEmptyInlines-expected.png:
* platform/qt/fast/inline/drawStyledEmptyInlinesWithWS-expected.png:
* platform/qt/fast/inline/emptyInlinesWithinLists-expected.png:
* platform/qt/fast/inline/inline-continuation-borders-expected.png:
* platform/qt/fast/inline/inline-focus-ring-expected.png:
* platform/qt/fast/inline/inline-text-quirk-bpm-expected.png:
* platform/qt/fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks-expected.png:
* platform/qt/fast/inline/long-wrapped-line-expected.png:
* platform/qt/fast/inline/nested-top-alignment-expected.png:
* platform/qt/fast/inline/vertical-align-text-bottom-expected.png:
* platform/qt/fast/invalid/003-expected.png:
* platform/qt/fast/invalid/004-expected.png:
* platform/qt/fast/invalid/010-expected.png:
* platform/qt/fast/invalid/014-expected.png:
* platform/qt/fast/invalid/016-expected.png:
* platform/qt/fast/invalid/019-expected.png:
* platform/qt/fast/invalid/021-expected.png:
* platform/qt/fast/invalid/missing-address-end-tag-expected.png:
* platform/qt/fast/invalid/missing-dl-end-tag-expected.png:
* platform/qt/fast/invalid/missing-dt-end-tag-expected.png:
* platform/qt/fast/invalid/missing-font-end-tag-expected.png:
* platform/qt/fast/invalid/nestedh3s-expected.png:
* platform/qt/fast/invalid/td-inside-object-expected.png:
* platform/qt/fast/layers/inline-dirty-z-order-lists-expected.png:
* platform/qt/fast/layers/opacity-transforms-expected.png:
* platform/qt/fast/layers/remove-only-this-layer-update-expected.png:
* platform/qt/fast/line-grid/line-align-left-edges-expected.png:
* platform/qt/fast/line-grid/line-align-right-edges-expected.png:
* platform/qt/fast/line-grid/line-grid-floating-expected.png:
* platform/qt/fast/line-grid/line-grid-into-floats-expected.png:
* platform/qt/fast/line-grid/line-grid-positioned-expected.png:
* platform/qt/fast/lists/001-expected.png:
* platform/qt/fast/lists/001-vertical-expected.png:
* platform/qt/fast/lists/002-expected.png:
* platform/qt/fast/lists/002-vertical-expected.png:
* platform/qt/fast/lists/007-expected.png:
* platform/qt/fast/lists/007-vertical-expected.png:
* platform/qt/fast/lists/008-expected.png:
* platform/qt/fast/lists/008-vertical-expected.png:
* platform/qt/fast/lists/anonymous-items-expected.png:
* platform/qt/fast/lists/big-list-marker-expected.png:
* platform/qt/fast/lists/li-br-expected.png:
* platform/qt/fast/lists/li-style-alpha-huge-value-crash-expected.png:
* platform/qt/fast/lists/list-item-line-height-expected.png:
* platform/qt/fast/lists/list-style-none-crash-expected.png:
* platform/qt/fast/lists/ol-display-types-expected.png:
* platform/qt/fast/lists/ol-start-parsing-expected.png:
* platform/qt/fast/lists/olstart-expected.png:
* platform/qt/fast/multicol/block-axis-horizontal-bt-expected.png:
* platform/qt/fast/multicol/block-axis-horizontal-tb-expected.png:
* platform/qt/fast/multicol/block-axis-vertical-lr-expected.png:
* platform/qt/fast/multicol/block-axis-vertical-rl-expected.png:
* platform/qt/fast/multicol/client-rects-expected.png:
* platform/qt/fast/multicol/column-break-with-balancing-expected.png:
* platform/qt/fast/multicol/column-count-with-rules-expected.png:
* platform/qt/fast/multicol/float-avoidance-expected.png:
* platform/qt/fast/multicol/float-paginate-complex-expected.png:
* platform/qt/fast/multicol/float-paginate-expected.png:
* platform/qt/fast/multicol/layers-in-multicol-expected.png:
* platform/qt/fast/multicol/margin-collapse-expected.png:
* platform/qt/fast/multicol/max-height-columns-block-expected.png:
* platform/qt/fast/multicol/overflow-across-columns-expected.png:
* platform/qt/fast/multicol/overflow-unsplittable-expected.png:
* platform/qt/fast/multicol/paginate-block-replaced-expected.png:
* platform/qt/fast/multicol/positioned-split-expected.png:
* platform/qt/fast/multicol/positive-leading-expected.png:
* platform/qt/fast/multicol/progression-reverse-expected.png:
* platform/qt/fast/multicol/shadow-breaking-expected.png:
* platform/qt/fast/multicol/span/anonymous-before-child-parent-crash-expected.png:
* platform/qt/fast/multicol/span/anonymous-split-block-crash-expected.png:
* platform/qt/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png:
* platform/qt/fast/multicol/span/span-as-nested-inline-block-child-expected.png:
* platform/qt/fast/multicol/table-margin-collapse-expected.png:
* platform/qt/fast/multicol/table-vertical-align-expected.png:
* platform/qt/fast/multicol/unsplittable-inline-block-expected.png:
* platform/qt/fast/multicol/vertical-lr/column-break-with-balancing-expected.png:
* platform/qt/fast/multicol/vertical-lr/column-count-with-rules-expected.png:
* platform/qt/fast/multicol/vertical-lr/float-multicol-expected.png:
* platform/qt/fast/multicol/vertical-lr/float-paginate-expected.png:
* platform/qt/fast/multicol/vertical-lr/unsplittable-inline-block-expected.png:
* platform/qt/fast/multicol/vertical-rl/column-break-with-balancing-expected.png:
* platform/qt/fast/multicol/vertical-rl/column-count-with-rules-expected.png:
* platform/qt/fast/multicol/vertical-rl/float-multicol-expected.png:
* platform/qt/fast/multicol/vertical-rl/float-paginate-expected.png:
* platform/qt/fast/multicol/vertical-rl/unsplittable-inline-block-expected.png:
* platform/qt/fast/overflow/001-expected.png:
* platform/qt/fast/overflow/002-expected.png:
* platform/qt/fast/overflow/003-expected.png:
* platform/qt/fast/overflow/004-expected.png:
* platform/qt/fast/overflow/007-expected.png:
* platform/qt/fast/overflow/008-expected.png:
* platform/qt/fast/overflow/dynamic-hidden-expected.png:
* platform/qt/fast/overflow/float-in-relpositioned-expected.png:
* platform/qt/fast/overflow/hidden-scrollbar-resize-expected.png:
* platform/qt/fast/overflow/line-clamp-expected.png:
* platform/qt/fast/overflow/overflow-auto-table-expected.png:
* platform/qt/fast/overflow/overflow-float-stacking-expected.png:
* platform/qt/fast/overflow/overflow-focus-ring-expected.png:
* platform/qt/fast/overflow/overflow-rtl-vertical-expected.png:
* platform/qt/fast/overflow/overflow-stacking-expected.png:
* platform/qt/fast/overflow/paged-x-div-with-column-gap-expected.png:
* platform/qt/fast/overflow/position-fixed-transform-clipping-expected.png:
* platform/qt/fast/overflow/scrollbar-position-update-expected.png:
* platform/qt/fast/overflow/table-overflow-float-expected.png:
* platform/qt/fast/overflow/trailing-float-linebox-expected.png:
* platform/qt/fast/parser/001-expected.png:
* platform/qt/fast/parser/broken-comments-vs-parsing-mode-expected.png:
* platform/qt/fast/parser/entity-comment-in-style-expected.png:
* platform/qt/fast/parser/nofoo-tags-inside-paragraph-expected.png:
* platform/qt/fast/parser/open-comment-in-style-expected.png:
* platform/qt/fast/reflections/inline-crash-expected.png:
* platform/qt/fast/reflections/opacity-reflection-transform-expected.png:
* platform/qt/fast/reflections/reflection-masks-expected.png:
* platform/qt/fast/reflections/reflection-masks-opacity-expected.png:
* platform/qt/fast/reflections/reflection-masks-outset-expected.png:
* platform/qt/fast/reflections/reflection-nesting-expected.png:
* platform/qt/fast/reflections/reflection-overflow-hidden-expected.png:
* platform/qt/fast/regions/flow-content-basic-expected.png:
* platform/qt/fast/regions/flow-content-basic-vertical-expected.png:
* platform/qt/fast/regions/flow-content-basic-vertical-rl-expected.png:
* platform/qt/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.png:
* platform/qt/fast/regions/overflow-in-uniform-regions-dynamic-expected.png:
* platform/qt/fast/regions/overflow-in-variable-width-regions-expected.png:
* platform/qt/fast/regions/overflow-moving-below-floats-in-variable-width-regions-expected.png:
* platform/qt/fast/regions/overflow-not-moving-below-floats-in-variable-width-regions-expected.png:
* platform/qt/fast/regions/overflow-rtl-in-variable-width-regions-expected.png:
* platform/qt/fast/regions/overflow-size-change-in-variable-width-regions-expected.png:
* platform/qt/fast/regions/overflow-size-change-with-stacking-context-rtl-expected.png:
* platform/qt/fast/regions/region-style-block-background-color-expected.png:
* platform/qt/fast/regions/region-style-block-background-color2-expected.png:
* platform/qt/fast/regions/text-region-split-small-pagination-expected.png:
* platform/qt/fast/regions/top-overflow-out-of-second-region-expected.png:
* platform/qt/fast/regions/webkit-flow-double-pagination-float-push-expected.png:
* platform/qt/fast/regions/webkit-flow-float-pushed-to-last-region-expected.png:
* platform/qt/fast/regions/webkit-flow-float-unable-to-push-expected.png:
* platform/qt/fast/regions/webkit-flow-floats-inside-regions-bounds-expected.png:
* platform/qt/fast/regions/webkit-flow-inlines-inside-regions-bounds-expected.png:
* platform/qt/fast/repaint/background-misaligned-expected.png:
* platform/qt/fast/repaint/block-layout-inline-children-replaced-expected.png:
* platform/qt/fast/repaint/focus-layers-expected.png:
* platform/qt/fast/repaint/scale-page-shrink-expected.png:
* platform/qt/fast/repaint/transform-absolute-child-expected.png:
* platform/qt/fast/repaint/transform-absolute-in-positioned-container-expected.png:
* platform/qt/fast/repaint/transform-relative-position-expected.png:
* platform/qt/fast/repaint/transform-replaced-shadows-expected.png:
* platform/qt/fast/replaced/004-expected.png:
* platform/qt/fast/replaced/absolute-position-percentage-height-expected.png:
* platform/qt/fast/replaced/absolute-position-with-auto-height-and-top-and-bottom-expected.png:
* platform/qt/fast/replaced/absolute-position-with-auto-width-and-left-and-right-expected.png:
* platform/qt/fast/replaced/applet-display-none-expected.png:
* platform/qt/fast/replaced/image-resize-width-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix JSDocs.
https://bugs.webkit.org/show_bug.cgi?id=113025

Reviewed by Pavel Feldman.

Next version of JS compiler finds more inconsistencies
and ambiguous declarations.
Some of them are resolved in this patch.

* inspector/InjectedScriptSource.js: Fix JSDocs.
* inspector/front-end/ConsoleModel.js: Ditto.
* inspector/front-end/CookieParser.js: Ditto.
* inspector/front-end/FileContentView.js: Ditto.
* inspector/front-end/HeapSnapshotView.js: Ditto.
* inspector/front-end/IndexedDBModel.js: Ditto.
* inspector/front-end/ProfilesPanelDescriptor.js: Ditto.
* inspector/front-end/utilities.js: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSP 1.1: Strip URLs in SecurityPolicyViolationEvents, just as we do for POSTed violation reports.
https://bugs.webkit.org/show_bug.cgi?id=113039

Reviewed by Jochen Eisinger.

Source/WebCore:

I'd originally assumed that we didn't need to be quite so careful when
handing URLs to JavaScript via SecurityPolicyViolationEvents. This was
a mistake. Cross-origin URLs aren't accessible to JavaScript currently
and there's no reason that we should begin exposing them via an event.

This patch extracts the stripping logic from the existing reports into
stripURLForUseInReport(), and uses that new method when populating the
event and report objects.

Relatedly, we were doing the wrong thing with 'file:' URLs, which this
patch made clear. Now they're treated the same as 'data:' et al.

Spec: https://dvcs.w3.org/hg/content-security-policy/rev/45f6ccaba0ef

Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script.html
       http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image.html
       http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script.html
       http/tests/security/contentSecurityPolicy/report-blocked-file-uri.html

* page/ContentSecurityPolicy.cpp:
(WebCore::stripURLForUseInReport):
    Extract the logic from blockedURI out into a reusable method:
    cross-origin URLs are stripped down to the ASCII serialization of
    their origin, and non-heirarchical (and 'file:') URLs are stripped
    down to the ASCII serialization of their protocol.
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
    Use ::stripURLForUseInReport for blockedURL and sourceFile
    attributes in these two methods.

LayoutTests:

* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-expected.txt.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-expected.txt.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script-expected.txt: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-expected.txt.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image.html:
* http/tests/security/contentSecurityPolicy/resources/securitypolicyviolation-test.js: Added.
    Updating tests to cover cross-origin scenarios: load cross-origin
    images, and cross-origin scripts that inject images. The former
    should strip the image URL down to the origin, the latter the
    script URL.
* http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-blocked-file-uri.html: Added.
* platform/chromium/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt: Added.
* platform/gtk/http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt: Added.
    This patch changes the behavior of 'file:' URLs to behave similarly
    to 'data:'/'blob:', etc. We weren't previously testing this, now we
    are. We need platform-specific results for Chromium and GTK, since
    those ports have enabled CSP_NEXT, which adds a field to the report.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: support changing local variables in frontend
https://bugs.webkit.org/show_bug.cgi?id=112470

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

Source/WebCore:

ScopeRef type is added to RemoteObject and setPropertyValue is patched accordingly.

Test: inspector/debugger/debugger-change-variable.html

* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.CallFrame.prototype.get id):
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
(WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromScopePayload):
(WebInspector.RemoteObject.prototype.):
(WebInspector.RemoteObject.prototype.setPropertyValue):
(WebInspector.RemoteObject.prototype.setVariableValueCallback):
(WebInspector.RemoteObject.prototype._setDeclarativeVariableValue):
(WebInspector.ScopeRef):
* inspector/front-end/ScopeChainSidebarPane.js:
(WebInspector.ScopeChainSidebarPane.prototype.update):

LayoutTests:

* inspector/debugger/debugger-change-variable-expected.txt: Added.
* inspector/debugger/debugger-change-variable.html: Added.
* platform/chromium/inspector/debugger/debugger-change-variable-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Properly handle the rule addition to an XML or SVG document.
https://bugs.webkit.org/show_bug.cgi?id=113185

Reviewed by Pavel Feldman.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION(r146630): 8 text related test asserts on debug builds
https://bugs.webkit.org/show_bug.cgi?id=113179

Reviewed by Jocelyn Turcotte.

Test if range.start is within the valid range before testing the value at that point.

* platform/graphics/qt/FontQt.cpp:
(WebCore::Font::initFormatForTextLayout):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Filters] Using negative drop-shadow radius values has slow performance
https://bugs.webkit.org/show_bug.cgi?id=107848

Source/WebCore:

Setting negative blur radius values in drop-shadow() and box-shadow() led to
significant rendering performance loss. The invalid value overflowed and the
embedder became unresponsive for few seconds.
This impacted SVG too (SVGFEDropShadow and SVGFEGaussianBlur).

Reviewed by Dirk Schulze.

Tests: css3/filters/effect-drop-shadow-negative-radius.html
       fast/box-shadow/box-shadow-parsing-invalid.html
       svg/filters/feDropShadow-negative-deviation-expected.svg
       svg/filters/feDropShadow-negative-deviation.svg
       svg/filters/feDropShadow-zero-deviation.svg
       svg/filters/feGaussianBlur-negative-deviation-expected.svg
       svg/filters/feGaussianBlur-negative-deviation.svg
       svg/filters/feGaussianBlur-zero-deviation.svg

* css/CSSParser.cpp:
(WebCore::CSSParser::parseShadow): Negative values are skipped during parsing: as per
CSS Background and Borders specs, negative values shall not be allowed.
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::calculateUnscaledKernelSize): Added "non-negative" assertion for
negative deviations.
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::build): If a negative standard deviation is encountered, don't
build the filter and returns earlier, this avoids unnecessary calls: FEGaussianBlur is not being
created with wrong and potentially overflowing values.
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::build): Ditto.

LayoutTests:

Added a whole set of new tests for both CSS and SVG to assess the correctness of
blur(), drop-shadow() and box-shadow() blur radius values.

Reviewed by Dirk Schulze.

* css3/filters/effect-drop-shadow-negative-radius-expected.html: Added.
* css3/filters/effect-drop-shadow-negative-radius.html: Added.
* css3/filters/filter-property-parsing-invalid-expected.txt:
* css3/filters/script-tests/filter-property-parsing-invalid.js:
* fast/box-shadow/box-shadow-parsing-invalid-expected.txt: Added.
* fast/box-shadow/box-shadow-parsing-invalid.html: Added.
* fast/box-shadow/script-tests/box-shadow-parsing-invalid.js: Added.
(testInvalidFilterRule):
* platform/chromium/svg/filters/feDropShadow-zero-deviation-expected.png: Added.
* platform/chromium/svg/filters/feDropShadow-zero-deviation-expected.txt: Added.
* platform/chromium/svg/filters/feGaussianBlur-zero-deviation-expected.png: Added.
* platform/chromium/svg/filters/feGaussianBlur-zero-deviation-expected.txt: Added.
* platform/mac/svg/filters/feDropShadow-zero-deviation-expected.png: Added.
* platform/mac/svg/filters/feDropShadow-zero-deviation-expected.txt: Added.
* platform/mac/svg/filters/feGaussianBlur-zero-deviation-expected.png: Added.
* platform/mac/svg/filters/feGaussianBlur-zero-deviation-expected.txt: Added.
* svg/filters/feDropShadow-negative-deviation-expected.svg: Added.
* svg/filters/feDropShadow-negative-deviation.svg: Added.
* svg/filters/feDropShadow-zero-deviation.svg: Added.
* svg/filters/feGaussianBlur-negative-deviation-expected.svg: Added.
* svg/filters/feGaussianBlur-negative-deviation.svg: Added.
* svg/filters/feGaussianBlur-zero-deviation.svg: Added.


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