Unreviewed gardening. Marking some repaint tests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=84720

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r133313.
http://trac.webkit.org/changeset/133313
https://bugs.webkit.org/show_bug.cgi?id=101078

"A lot of tests hit the ASSERTs introduced by this patch"
(Requested by haraken on #webkit).

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

* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::setDOMWrapper):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] REGRESSION (r130411-r130414): fast/images/repaint-subrect-grid.html failing on Apple MountainLion Debug WK2 (Tests)
https://bugs.webkit.org/show_bug.cgi?id=98523

Reviewed by Simon Fraser.

The repaint-subrect-grid.html layout test is now text-based and
doesn't use testRunner.displayInvalidatedRegion().

* fast/images/repaint-subrect-grid-expected.txt:
* fast/images/repaint-subrect-grid.html:
* platform/chromium/fast/images/repaint-subrect-grid-expected.png: Removed.
* platform/efl/fast/images/repaint-subrect-grid-expected.png: Removed.
* platform/mac/TestExpectations:
* platform/mac/fast/images/repaint-subrect-grid-expected.txt: Added.
* platform/qt/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support X-XSS-Protection: report=URL header syntax in XSSAuditor.
https://bugs.webkit.org/show_bug.cgi?id=100892

Reviewed by Adam Barth.

Source/WebCore:

This patch adds a security feature which allows a violation report to be sent back
to a site when the XSSAuditor detects a reflected XSS against it.  It uses the same
reporting mechanism as for CSP violation reports.

Tests: http/tests/security/xssAuditor/malformed-xss-protection-header-5.html
       http/tests/security/xssAuditor/malformed-xss-protection-header-6.html
       http/tests/security/xssAuditor/malformed-xss-protection-header-7.html
       http/tests/security/xssAuditor/malformed-xss-protection-header-8.html
       http/tests/security/xssAuditor/malformed-xss-protection-header-9.html
       http/tests/security/xssAuditor/report-script-tag.html
       http/tests/security/xssAuditor/xss-protection-parsing-03.html
       http/tests/security/xssAuditor/xss-protection-parsing-04.html

* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::XSSAuditor):
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::filterToken):
Invoke Ping loader's violation reporting, if requested, when a reflected
XSS is detected.

* html/parser/XSSAuditor.h:
XSSAuditor class need to store the report URL as well as the undigested versions
of the request URL and request body for reporting.

* loader/MixedContentChecker.cpp:
(WebCore):
* loader/MixedContentChecker.h:
(MixedContentChecker):
Make isMixedContent() method public.

* loader/PingLoader.cpp:
(WebCore::PingLoader::sendViolationReport):
* loader/PingLoader.h:
(PingLoader):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):
Renamed reportContentSecurityPolicyViolation() method to sendViolationReport(),
since this is now used to send more than just CSP violations.

* platform/network/HTTPParsers.cpp:
(WebCore):
(WebCore::skipEquals):
(WebCore::skipValue):
(WebCore::parseXSSProtectionHeader):
* platform/network/HTTPParsers.h:
Parse and return report= directive in X-XSS-Protection header.

LayoutTests:

* http/tests/security/xssAuditor/malformed-xss-protection-header-1-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5-expected.txt: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-5.html: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-6-expected.txt: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-6.html: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-7-expected.txt: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-7.html: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-8-expected.txt: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-8.html: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-9-expected.txt: Added.
* http/tests/security/xssAuditor/malformed-xss-protection-header-9.html: Added.
* http/tests/security/xssAuditor/report-script-tag-expected.txt: Added.
* http/tests/security/xssAuditor/report-script-tag.html: Added.
* http/tests/security/xssAuditor/resources/echo-intertag.pl:
* http/tests/security/xssAuditor/xss-protection-parsing-03-expected.txt: Added.
* http/tests/security/xssAuditor/xss-protection-parsing-03.html: Added.
* http/tests/security/xssAuditor/xss-protection-parsing-04-expected.txt: Added.
* http/tests/security/xssAuditor/xss-protection-parsing-04.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix silly mistake from http://trac.webkit.org/changeset/133315.
Forgot to remove the "!".

* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Measure the usage of the various CSP headers.
https://bugs.webkit.org/show_bug.cgi?id=100974

Reviewed by Adam Barth.

Currently, we're collecting metrics regarding usage of the
'X-WebKit-CSP' and 'X-WebKit-CSP-Report-Only' HTTP headers. We've
recently added support for the canonical 'Content-Security-Policy'
and 'Content-Security-Policy-Report-Only' headers. This patch adds
those headers explicitly into the metrics, giving insight into uptake
of the unprefixed header, and into usage of pure reporting vs.
enforcement.

No visible functionality should change; all Content Security Policy
tests should continue to pass.

* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::didReceiveHeader):
    Convert the CSP header type into a FeatureObserver::Feature, and
    observe it.
* page/FeatureObserver.h:
    Add three new values to the enum to cover the new header types.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ENABLE(UNDO_MANAGER) is disabled everywhere and is not under active development
https://bugs.webkit.org/show_bug.cgi?id=100711

Reviewed by Eric Seidel.

.: 

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore: 

* Configurations/FeatureDefines.xcconfig:

Source/WebCore: 

No one is actively working on ENABLE(UNDO_MANAGER). There are some
tricky lifetime issues in the UndoManager API that are complicating
ongoing work to improve the interaction between WebCore and the garbage
collector. Rather than leave this code in a broken state, we should
remove it for the time being. We can always restore it from the svn
history when there is an active owner for this code.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.features.am:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMTransaction.cpp: Removed.
* bindings/js/DOMTransaction.h: Removed.
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSUndoManagerCustom.cpp: Removed.
* bindings/v8/DOMTransaction.cpp: Removed.
* bindings/v8/DOMTransaction.h: Removed.
* bindings/v8/V8HiddenPropertyName.h:
(WebCore):
* bindings/v8/custom/V8DOMTransactionCustom.cpp: Removed.
* bindings/v8/custom/V8UndoManagerCustom.cpp: Removed.
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::setCssText):
(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::removeProperty):
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
* dom/CharacterData.cpp:
(WebCore::CharacterData::setDataAndUpdate):
* dom/ContainerNode.cpp:
(WebCore::willRemoveChild):
(WebCore::willRemoveChildren):
(WebCore::updateTreeAfterInsertion):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore):
(Document):
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::willModifyAttribute):
* editing/CompositeEditCommand.h:
* editing/DOMTransaction.idl: Removed.
* editing/DOMTransactionStep.cpp: Removed.
* editing/DOMTransactionStep.h: Removed.
* 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: Removed.
* editing/UndoManager.h: Removed.
* editing/UndoManager.idl: Removed.
* editing/UndoStep.h:
(UndoStep):

Source/WebKit/mac: 

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2: 

* Configurations/FeatureDefines.xcconfig:

Tools: 

* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.pri:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Marking object-clip-rects-assertion.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=86909

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkit-patch analyze-baselines output is weak
https://bugs.webkit.org/show_bug.cgi?id=100998

Reviewed by Ojan Vafai.

Currently analyze-baselines prints a list of baselines that have
the same checksum per line, but the format is hard to read;
this patch cleans up the output to print by directory instead
and use the same format I recently added for debugging optimize-baselines,
then refactors the code so that we share and adds tests for
analyze-baselines (which was untested).

Also, I got rid of a couple of unnecessarily-hardcoded port names,
and modified the baseline optimizer to log the current world when
optimize fails.

* Scripts/webkitpy/common/checkout/baselineoptimizer.py:
(BaselineOptimizer.read_results_by_directory):
(BaselineOptimizer.write_by_directory):
(BaselineOptimizer.optimize):
* Scripts/webkitpy/tool/commands/rebaseline.py:
(OptimizeBaselines.execute):
(AnalyzeBaselines.__init__):
(AnalyzeBaselines._write):
(AnalyzeBaselines._analyze_baseline):
(AnalyzeBaselines.execute):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(_FakeOptimizer):
(_FakeOptimizer.read_results_by_directory):
(TestAnalyzeBaselines):
(TestAnalyzeBaselines.setUp):
(TestAnalyzeBaselines.test_default):
(TestAnalyzeBaselines.test_missing_baselines):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prefer 'Content-Security-Policy' to 'X-WebKit-CSP'.
https://bugs.webkit.org/show_bug.cgi?id=101043

Reviewed by Adam Barth.

The canonical 'Content-Security-Policy' header landed in 133095, but we
missed a few tests while updating to the new hotness. We also should
start using the canonical header for the inspector.

This patch should have no visible change; tests should continue to pass
with the new header, just as they did with the old header.

Source/WebCore:

* inspector/front-end/inspector.html:

LayoutTests:

* http/tests/inspector/stacktraces/csp-injected-content-warning-contains-stacktrace.html:
* http/tests/inspector/stacktraces/csp-inline-warning-contains-stacktrace.html:
* http/tests/inspector/stacktraces/csp-setInterval-warning-contains-stacktrace.html:
* http/tests/inspector/stacktraces/csp-setTimeout-warning-contains-stacktrace.html:
* http/tests/security/contentSecurityPolicy/img-blocked-no-gc-crash.html:
* http/tests/security/isolatedWorld/bypass-main-world-csp.html:
* inspector/console/console-eval-blocked.html:
* inspector/debugger/debugger-pause-on-blocked-event-handler.html:
* inspector/debugger/debugger-pause-on-blocked-script-injection.html:
* inspector/debugger/debugger-pause-on-blocked-script-url.html:
* inspector/debugger/eval-on-pause-blocked.html:
* inspector/elements/resolve-node-blocked.html:
* media/csp-blocks-video.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERT in RenderLayer::hitTestContents can fire
https://bugs.webkit.org/show_bug.cgi?id=99656

Reviewed by Eric Seidel.

Source/WebCore:

The issue is that updateHitTestResult and addNodeToRectBasedTestResult
are using two different nodes. Since they aren't consistent, we violate
assertions about only setting the inner node if we're doing a
rect-based hit test. This patch makes the two consistent.

Test: fast/dom/nodesFromRect/nodesFromRect-continuation-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeForHitTest):
(WebCore):
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::updateHitTestResult):
* rendering/RenderBlock.h:
(RenderBlock):

LayoutTests:

This test ensures that we don't trigger the assert.

* fast/dom/nodesFromRect/nodesFromRect-continuation-crash-expected.txt: Added.
* fast/dom/nodesFromRect/nodesFromRect-continuation-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Generalize NodeWrapperMap to be able to handle other sorts of keys
https://bugs.webkit.org/show_bug.cgi?id=100973

Reviewed by Stephen White.

This is the first step towards using intrusive DOM wrapper maps more
widely in WebCore (see
http://lists.webkit.org/pipermail/webkit-dev/2012-November/022686.html
for more context).

* bindings/v8/DOMDataStore.cpp:
(WebCore::DOMDataStore::DOMDataStore):
* bindings/v8/IntrusiveDOMWrapperMap.h:
(WebCore):
(WebCore::IntrusiveDOMWrapperMap::weakCallback):


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