[GTK] Remove dependency on SoupPasswordManager
https://bugs.webkit.org/show_bug.cgi?id=100775

Patch by Martin Robinson <mrobinson@igalia.com> on 2012-11-02
Reviewed by Carlos Garcia Campos.

.:

Add a libsecret dependency to the build. This is necessary so that we can remove
a dependency on SoupPasswordManager.

* configure.ac: Look for libsecret using the pkg-config configuration macro.

Source/WebCore:

Remember passwords using libsecret instead of SoupPasswordManager. We accomplish this using
a new class, CredentialBackingStore. CredentialBackingStore will soon be the thing that backs
CredentialStoreGtk. The name is based on the name of a similar class from the BlackBerry port.

No new tests. This does not change behavior.

* GNUmakefile.am: Add libsecret flags to the build and the new directory to the include list.
* GNUmakefile.list.am: Add new files to the source list.
* platform/gtk/GRefPtrGtk.cpp: Add support for SecretValue to GRefPtrGtk.
* platform/gtk/GtkAuthenticationDialog.cpp: Replace interaction with SoupPasswordManger with
interaction with the CredentialBackingStore. Remove all conditional SoupPasswordManager guards.
* platform/gtk/GtkAuthenticationDialog.h: Ditto.
* platform/network/gtk/CredentialBackingStore.cpp: Added.
* platform/network/gtk/CredentialBackingStore.h: Added.

Source/WebKit/gtk:

Add a libsecret dependency to the build. This is necessary so that we can remove
a dependency on SoupPasswordManager.

* GNUmakefile.am: Use libsecret libs during WebKit1 library compilation.

Source/WebKit2:

Add a libsecret dependency to the build. This is necessary so that we can remove
a dependency on SoupPasswordManager.

* GNUmakefile.am: Add libsecret CFLAGS to the WebKit2 build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][EFL] Crash when calling WebOpenPanelResultListenerProxy::cancel() after PageClient is destroyed
https://bugs.webkit.org/show_bug.cgi?id=100977

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-11-02
Reviewed by Alexey Proskuryakov.

Call WebPageProxy::close() in EwkViewImpl's destructor to avoid crashes
if other objects keep a reference to the WebPageProxy and try to use
it after the view (and therefore the PageClient) is destroyed.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::~EwkViewImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r132913.
http://trac.webkit.org/changeset/132913
https://bugs.webkit.org/show_bug.cgi?id=91850

Caused performance regressions.
See https://bugs.webkit.org/show_bug.cgi?id=100872 for details.


* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::visitExternalStrings):
* bindings/v8/V8StringResource.cpp:
(StringTraits):
(WebCore::v8StringToWebCoreString):
* bindings/v8/V8ValueCache.cpp:
(WebCore::makeExternalString):
(WebCore::WebCoreStringResource::visitStrings):
* bindings/v8/V8ValueCache.h:
(WebCore::WebCoreStringResource::WebCoreStringResource):
(WebCore::WebCoreStringResource::~WebCoreStringResource):
(WebCore::WebCoreStringResource::data):
(WebCoreStringResource):
(WebCore::WebCoreStringResource::length):
(WebCore::WebCoreStringResource::atomicString):
(WebCore::WebCoreStringResource::toStringResource):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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