[V8] Add ASSERT() to guarantee that we don't store NULL pointers to V8 internal fields
https://bugs.webkit.org/show_bug.cgi?id=101054

Reviewed by Adam Barth.

I'm investigating a Chromium crash bug:
http://code.google.com/p/chromium/issues/detail?id=155942

I've not yet identified the root cause (because I can't reproduce
the crash), but it looks like we are storing NULL pointers to
V8 internal fields. Just in case, we can add an ASSERT() to
guarantee that NULL pointers are never stored. (Also I'm hoping
that this ASSERT() will give me more debug information.)

No tests. No change in behavior.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Adding window.external to our port
https://bugs.webkit.org/show_bug.cgi?id=100868

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-11-02
Reviewed by Rob Buis.
PR 158809

Patch up an error where we were dereferencing a null pointer.

* WebCoreSupport/ExternalExtension.cpp:
(addSearchProviderMethod):
(IsSearchProviderInstalledMethod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move m_element checks out of canShareStyle into locateSharedStyle
https://bugs.webkit.org/show_bug.cgi?id=101070

Reviewed by Darin Adler.

Can shareStyleWithElement is called for each sibling as we look for a
shareElement. locateSharedStyle is called once for the element we're
trying to find a style for. Checks that only depend on the latter
element should, thus be in locateSharedStyle.

No new tests. There should be no change in behavior, except possibly
a performance improvement in some cases.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build warning [-Wswitch]
https://bugs.webkit.org/show_bug.cgi?id=101029

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-11-02
Reviewed by Alexey Proskuryakov.

Fix build warning message: enumeration value ‘Viewport’ not handled in switch [-Wswitch]
in Source/WebCore/css/StyleSheetContents.cpp.
Add case statement for 'Viewport' with the CSS_DEVICE_ADAPTATION macro.

* css/StyleSheetContents.cpp:
(WebCore::childRulesHaveFailedOrCanceledSubresources):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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
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
Support invalidation tracking for composited layers
https://bugs.webkit.org/show_bug.cgi?id=97801

Reviewed by Simon Fraser.

GraphicsLayers now store invalidated rects and can include them in
the layer tree dump.

Source/WebCore:

Test: compositing/repaint/invalidations-on-composited-layers.html

* WebCore.exp.in:
  Exports FrameView::resetTrackedRepaints()
* page/FrameView.cpp:
(WebCore::FrameView::setTracksRepaints):
  Notifies each compositor that we are starting/stopping repaints.
(WebCore::FrameView::resetTrackedRepaints):
  Moved implementation to the cpp file.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::~GraphicsLayer):
  Clears the repaint rects associated with this layer.
(WebCore::GraphicsLayer::resetTrackedRepaints):
  Clears the repaint rects associated with this layer.
  Note that the repaint rects are stored in a statically allocated
  HashMap to avoid using space on the graphics layers.
(WebCore::GraphicsLayer::addRepaintRect):
  Adds a repaint rect to list associated with this layer in the
  hash map mentioned above.
(WebCore::GraphicsLayer::dumpProperties):
  This has been modified to include the repaint rects in the dump
  if they've been requested.
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::isTrackingRepaints):
  This is how graphics layers check if repaint tracking is happening.
  Returns false by default.
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::setContentsNeedsDisplay):
(WebCore::GraphicsLayerBlackBerry::setNeedsDisplay):
(WebCore::GraphicsLayerBlackBerry::setNeedsDisplayInRect):
  These now call GraphicsLayer::addRepaintRect as necessary.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
  Now calls GraphicsLayer::addRepaintRect as necessary.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsNeedsDisplay):
(WebCore::GraphicsLayerChromium::setNeedsDisplay):
(WebCore::GraphicsLayerChromium::setNeedsDisplayInRect):
  These now call GraphicsLayer::addRepaintRect as necessary.
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::setNeedsDisplay):
(WebCore::GraphicsLayerClutter::setNeedsDisplayInRect):
  These now call GraphicsLayer::addRepaintRect as necessary.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
(WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
  These now call GraphicsLayer::addRepaintRect as necessary.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isTrackingRepaints):
  Required since this is a GraphicsLayerClient.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerTreeAsText):
  Now accepts a flag to include the repaint rects in the layer tree
  dump.
(WebCore::resetTrackedRepaintRectsRecursive):
  Clears the repaint rects on all graphics layers.
(WebCore::RenderLayerCompositor::resetTrackedRepaintRects):
  Clears the repaint rects on all graphics layers.
(WebCore::RenderLayerCompositor::isTrackingRepaints):
  Required since this is a GraphicsLayerClient.
* testing/Internals.cpp:
(WebCore::Internals::layerTreeAsText):
* testing/Internals.h:
* testing/Internals.idl:
  The internals changes plumb the new flag for including the repaint
  rects in the layer tree dump.

Source/WebKit/chromium:

(WebKit::WebWidget::isTrackingRepaints):
  Used by the NonCompositedContentHost to determine if we are tracking
  repaint rects.
(WebKit::WebWidget::isTrackingRepaints):
* src/LinkHighlight.cpp:
(WebKit::LinkHighlight::updateGeometry):
  Now calls GraphicsLayer::addRepaintRect when invalidated.
* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::isTrackingRepaints):
  Required as this is a GraphicsLayerClient.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::isTrackingRepaints):
  Implementation of WebWidget::isTrackingRepaints.

LayoutTests:

* compositing/repaint/invalidations-on-composited-layers-expected.txt: Added.
* compositing/repaint/invalidations-on-composited-layers.html: Added.
* platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt: Added.


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