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
RegExp.prototype.toString Should Produce an 8 bit JSString if possible.
https://bugs.webkit.org/show_bug.cgi?id=101003

Reviewed by Geoffrey Garen.

Took the logic of regExpObjectSource() and created two templated helpers that uses the
source character type when appending to the StringBuilder.

* runtime/RegExpObject.cpp:
(JSC::appendLineTerminatorEscape): Checks line terminate type to come up with escaped version.
(JSC::regExpObjectSourceInternal): Templated version of original.
(JSC::regExpObjectSource): Wrapper function.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
visitedHashLink() converts 8 bit URLs and attributes to 16 bits.
https://bugs.webkit.org/show_bug.cgi?id=101014

Reviewed by Geoffrey Garen.

Converted most of the static methods to templated based on character type.  Changed visitedHashLink to
check bitness of both the base URL and attribute.  If both are 8 bit, then we process using the LChar
version of the templated methods.  Otherwise we use the 16 bit flavor.

Changes covered by existing tests.

* platform/LinkHash.cpp:
(WebCore::findSlashDotDotSlash):
(WebCore::findSlashSlash):
(WebCore::findSlashDotSlash):
(WebCore::containsColonSlashSlash):
(WebCore::squeezeOutNullCharacters):
(WebCore::cleanSlashDotDotSlashes):
(WebCore::mergeDoubleSlashes):
(WebCore::cleanSlashDotSlashes):
(WebCore::cleanPath):
(WebCore::matchLetter):
(WebCore::needsTrailingSlash):
(WebCore::visitedURLInline):
(WebCore::visitedURL):
(WebCore::visitedLinkHash):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMAKE] Remove QNX specific section
https://bugs.webkit.org/show_bug.cgi?id=101063

Reviewed by Daniel Bates.

We do not need the QNX section anymore, so also remove the FEATURE_DEFINES_CSS variable as it
equals FEATURE_DEFINES_WITH_SPACE_SEPARATOR.

* CMakeLists.txt:

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