VCSUtils.pm doesn't support SVN 1.7 diff files
<https://bugs.webkit.org/show_bug.cgi?id=80762>

Reviewed by Eric Seidel.

Implement support for the SVN 1.7 diff format.

* Scripts/VCSUtils.pm:
(parseChunkRange): Modified to support parsing an SVN 1.7 chunk range
that begins and ends with "##" (e.g. ## -0,0 +1,7 ##). For comparison,
earlier versions of SVN parsed chunk ranges of the form "@@ -0,0 +1,7 @@".

(parseSvnDiffHeader): Modified to parse an SVN 1.7 binary diff; SVN 1.7
has an unusual display format for a binary diff. It repeats the first
two lines of the diff header.

(parseSvnProperty): Modified to ignore both an SVN 1.7 chunk range and
lines of the form "\ No newline at end of property". SVN 1.7 emits the latter
message after a property value that doesn't end in a newline.

(parseSvnPropertyValue): Stop parsing an SVN property value when we encounter
a line of the form "\ No newline at end of property" (emitted by svn diff as of
SVN 1.7).

* Scripts/webkitperl/VCSUtils_unittest/parseChunkRange.pl:
  - Added the following unit tests:
  "Line count is 0"
  "New line count is 1"

* Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffFooter.pl:
  - Added the following unit tests:
  "svn:executable followed by custom property using SVN 1.7 syntax"
  "svn:executable followed by custom property without newline using SVN 1.7 syntax"

* Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffHeader.pl:
  - Updated test results for test "binary file".
  - Added unit test "binary file using SVN 1.7 syntax".

* Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl:
  - Added the following unit tests:
  "simple: add svn:executable using SVN 1.7 syntax"
  "simple: delete svn:executable using SVN 1.7 syntax"
  "add svn:mime-type and add svn:executable using SVN 1.7 syntax"

* Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl:
  - Added the following unit tests:
  "singe-line '+' change using SVN 1.7 syntax"
  "single-line '-' change using SVN 1.7 syntax"


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use computeLogical* methods instead of updateLogical* methods in RenderImage
https://bugs.webkit.org/show_bug.cgi?id=98802

Reviewed by Eric Seidel.

We were storing the old values of width/height, calling updateLogical{Width,Height}, then restoring
the old values.  Instead, use the computeLogical{Width,Height} methods so we don't have to overwrite
the current values.

No new tests, this is just a refactoring.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageDimensionsChanged):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Move this file to where the build systems think it should
be. See https://bugs.webkit.org/show_bug.cgi?id=94755

* platform/graphics/CustomFilterConstants.h: Removed.
* platform/graphics/filters/CustomFilterConstants.h: Copied from Source/WebCore/platform/graphics/CustomFilterConstants.h.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
This test now appears to fail on the bots because
http://trac.webkit.org/changeset/130799 removed the ImageOnlyFailure
attribute.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
These tests also fail with ImageOnlyFailures.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Have plugins render offscreen to capture snapshot
https://bugs.webkit.org/show_bug.cgi?id=98326
<rdar://problem/12426658>

Reviewed by Simon Fraser.

Source/WebCore:

Change updateSnapshot() to use a PassRefPtr<Image> instead of Image*. WebKit2 ultimately
hands the image off to RenderSnapshottedPlugin. A CachedImage instance then manages the
lifetime of the Image.

* html/HTMLPlugInElement.h:
(WebCore::HTMLPlugInElement::updateSnapshot):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateSnapshot):
* html/HTMLPlugInImageElement.h:
(HTMLPlugInImageElement):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::updateSnapshot): Updated to use the PassRefPtr<Image>
pointer.
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):

Source/WebKit2:

Keep the plugin rendering without compositing to easily grab the snapshot.

PluginView now has two variables referring to snapshots, but are unrelated. The timer
is used to capture a snapshot that acts as a poster for a plugin. The ShareableBitmap
variable m_snapshot is used whenever the plugin paints in software, to avoid side effects
should the plugin run JS during painting.

* WebProcess/Plugins/PluginView.cpp:
(WebKit): Add a named constant for the time delay before a snapshot is taken.
(WebKit::PluginView::PluginView): Initialize a 3-second timer to get the snapshot.
(WebKit::PluginView::~PluginView): Refactor part of the destructor code out into
destroyPluginAndReset() for reuse.
(WebKit::PluginView::destroyPluginAndReset): Contains part of the destructor code.
In addition to destroying the plugin, the destructor cancels pending loads and streams.
(WebKit::PluginView::didInitializePlugin): If the plugin is in a state where it needs
to generate or display a poster, don't setup the compositing layer and start the timer.
(WebKit::PluginView::paint): Avoid painting if the plugin is not running.
(WebKit::PluginView::invalidateRect): Avoid painting if the plugin is not running.
(WebKit::PluginView::isAcceleratedCompositingEnabled): Don't enable accelerated compositing
until the plugin is running.
(WebKit::PluginView::pluginSnapshotTimerFired): When the timer fires, get a snapshot, generate
an Image that WebCore can render, and destroy the plugin.

Rename m_snapshot to m_transientPaintingSnapshot.
* WebProcess/Plugins/PluginView.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::paint):
(WebKit::PluginView::notifyWidget):
(WebKit::PluginView::pluginSnapshotTimerFired):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Sub pixel layout] Fast-path iframe scrolling can picks up an extra pixel
https://bugs.webkit.org/show_bug.cgi?id=98571

Reviewed by Emil A Eklund.

Source/WebCore:

Refactoring all coordinate-switching functionality to use a single "mode" flag
as opposed to having a bunch of boolean values. This enables the same set of
options across the board, and a consistent interface. This was previously
done for mapLocalToContainer.

The imptetus for this for this stems from the one logical change in this patch
which only effects sub-pixel layout. FrameView::convertToRenderer and
convertFromRenderer return IntPoint coordinates, and need to also snap transform
offsets to determine proper rects for scrolling.

Unlabeled functions below are simply being updated to these new interfaces.

Test: fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html

* WebCore.exp.in:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
(WebCore::ContainerNode::getLowerRightCorner):
* dom/Element.cpp:
(WebCore::Element::boundsInRootViewSpace):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::computeRelativePosition):
* dom/Node.cpp:
(WebCore::Node::convertToPage):
(WebCore::Node::convertFromPage):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::convertToRenderer): Now pixel-snaps offsets before passing
them to TransformState, which transforms the coordinates.
(WebCore::FrameView::convertFromRenderer): Ditto.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::absoluteQuads):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absoluteQuads):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::mapAbsoluteToLocalPoint):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderBoxModelObject.h:
(RenderBoxModelObject):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::userResize):
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::absolutePoint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::mapLocalToContainer):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::absoluteToContents):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::localToAbsolute):
(WebCore::RenderObject::absoluteToLocal):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::localToContainerQuad):
(WebCore::RenderObject::localToContainerPoint):
* rendering/RenderObject.h:
(RenderObject): MapLocalToContainerFlags is now MapCoordinatesFlags since it's
now used for other conversion methods.
(WebCore::RenderObject::localToAbsoluteQuad):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
* rendering/RenderView.h:
(RenderView):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::mapLocalToContainer):
* rendering/svg/RenderSVGForeignObject.h:
(RenderSVGForeignObject):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::mapLocalToContainer):
* rendering/svg/RenderSVGInline.h:
(RenderSVGInline):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::mapLocalToContainer):
* rendering/svg/RenderSVGModelObject.h:
(RenderSVGModelObject):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::mapLocalToContainer):
* rendering/svg/RenderSVGText.h:
(RenderSVGText):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):

LayoutTests:

Tests scrolling of sub-pixel layers on sub-pixel platforms (Chromium).

* fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html: Added.
* platform/chromium-linux/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png: Added.
* platform/chromium-linux/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.txt: Added.
* platform/chromium-linux/fast/repaint/repaint-across-writing-mode-boundary-expected.png:
The repaint rect shrinks safely by one pixel.
* platform/chromium/TestExpectations:
* platform/mac-lion/TestExpectations:
* platform/mac-snowleopard/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-4.8/TestExpectations:
* platform/qt/TestExpectations:
* platform/win-wk2/TestExpectations:
* platform/win-xp/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only measure text once instead of twice when performing line layout.
https://bugs.webkit.org/show_bug.cgi?id=98317
<rdar://problem/12080821>

Reviewed by Dan Bernstein.

Since we are measuring each word to find out where the line break should occur,
we should cache that information to avoid measuring the run again when
creating the line box. The bulk of the change is in nextLineBreak, where
the measurements are collected and placed in a vector so that they can
be consumed in setLogicalWidthForTextRun where we used to measure the
text one more time.
Each entry in the vector is a WordMeasurement object that contains information
about the start and end offset in the run, the renderer, the measured width
and, possibly, a list of fallback fonts.
When we need to compute the width of the run to create the line box, we add
all the measurements for the given renderer in the run to get the total width.

* platform/graphics/Font.cpp:
(WebCore::Font::width): Added fallback fonts parameter.
* platform/graphics/Font.h:
(Font): Added fallback fonts parameter to the width static member function.
This method is called when we compute the width using TextLayout.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::width): Added fallback fonts parameter.
(WebCore::Font::width):
(WebCore::ComplexTextController::advance):
* platform/graphics/mac/ComplexTextController.h:
(ComplexTextController): Added fallback fonts parameter to advance method.
* rendering/RenderBlock.h: Added WordMeasures parameter to few methods.
* rendering/RenderBlockLineLayout.cpp:
(WordMeasurement): Added new class to hold measurement information.
(WebCore::setLogicalWidthForTextRun): This is where we compute the run width using the
cached information.
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added wordMeasures parameter.
(WebCore::RenderBlock::createLineBoxesFromBidiRuns): Added wordMeasures parameter.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added declaration of the WordMeasures
vector and its use.
(WebCore::textWidth): Added fallbackFonts parameter, since now we only measure once.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): This method has been modified to collect
the measurements of the individual words and add them to the vector.



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