[Qt] Implement CompositeDifference
https://bugs.webkit.org/show_bug.cgi?id=77355

Patch by Martin Leutelt <martin.leutelt@basyskom.com> on 2012-08-29
Reviewed by Noam Rosenthal.

Add mapping for difference composite mode for
future use.

* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::toQtCompositionMode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[TexMap][cairo] Add GC3D::RenderToCurrentGLContext support
https://bugs.webkit.org/show_bug.cgi?id=92441

Reviewed by Noam Rosenthal.

Add a RenderToCurrentGLContext for the Cairo GraphicsContext3D. This will allow
TextureMapperGL to be rewritten on top of GraphicsContext3D by exposing the GC3D
interface for the widget's GL context.

No new tests. This will be covered by the existing AC tests after the patch on
bug 78672 lands.

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D): Only create the offscreen
rendering buffers if we are rendering offscreen. Pass the rendering style to
the private data factory.
(WebCore::GraphicsContext3D::~GraphicsContext3D): Only destroy the offscreen
rendering buffers if we are rendering offscreen.
* platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::create): Pass the rendering style through.
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): If we are using
a "current GL context" rendering style, we don't need to create a GL context.
We'll always just use the one that's currently active.
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper): Assert that we only
do this with the offscreen rendering style.
* platform/graphics/cairo/GraphicsContext3DPrivate.h: Update method definitions
and expose the rendering style member GraphicsContext3D.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use Animation::IterationCountInfinite instead of -1 when setting iteration count
https://bugs.webkit.org/show_bug.cgi?id=95339

Reviewed by Andreas Kling.

* css/CSSToStyleMap.cpp: Replace -1 for the proper enum.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Use CSS transform parsing code within CSS Shader
https://bugs.webkit.org/show_bug.cgi?id=71401

Reviewed by Dean Jackson.

Source/WebCore:

Added computed style for the transform parameters of the custom() filter function.
Implemented the FECustomFilter bindings needed to push the value to an actual matrix for the CSS Shader.

Note that transform parameters animations support will come in a different patch:
https://bugs.webkit.org/show_bug.cgi?id=94980.

Test: css3/filters/custom/effect-custom-transform-parameters.html

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::matrixTransformValue): Extracted code from computedTransform into a function, so that we
can reuse it.
(WebCore):
(WebCore::computedTransform):
(WebCore::valueForCustomFilterNumberParameter): Made all the custom filter related functions static to match
most of the other functions in this file.
(WebCore::valueForCustomFilterTransformParameter):
(WebCore::valueForCustomFilterParameter):
(WebCore::CSSComputedStyleDeclaration::valueForFilter): Needed the object size to compute the transform.
(WebCore::CSSComputedStyleDeclaration::valueForShadow): Added the const keyword.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Passed in the object to the valueForFilter.
* css/CSSComputedStyleDeclaration.h:
(WebCore):
(CSSComputedStyleDeclaration):
* css/StyleResolver.cpp:
(StyleResolver::parseCustomFilterTransformParameter):
(StyleResolver::parseCustomFilterParameter):
(StyleResolver::parseCustomFilterParameterList):
* css/StyleResolver.h:
(StyleResolver):
* platform/graphics/filters/CustomFilterParameter.h:
* platform/graphics/filters/CustomFilterTransformParameter.h: Filter parameter wrapper for the FilterOperations.
(WebCore):
(CustomFilterTransformParameter):
(WebCore::CustomFilterTransformParameter::create):
(WebCore::CustomFilterTransformParameter::blend): Animations will come in future patch.
(WebCore::CustomFilterTransformParameter::operator==):
(WebCore::CustomFilterTransformParameter::applyTransform):
(WebCore::CustomFilterTransformParameter::operations):
(WebCore::CustomFilterTransformParameter::setOperations):
(WebCore::CustomFilterTransformParameter::CustomFilterTransformParameter):
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::bindProgramTransformParameter):
(WebCore):
(WebCore::FECustomFilter::bindProgramParameters):
* platform/graphics/filters/FECustomFilter.h:
(WebCore):
(FECustomFilter):

LayoutTests:

Added test to check for the computed style of the transform parameters of the
custom() function. Also, added a test file to compare the result of applying the transform
using CSS Custom Filters and using CSS 3D Transforms.

* css3/filters/custom/custom-filter-property-computed-style-expected.txt:
* css3/filters/custom/effect-custom-transform-parameters-expected.html: Added.
* css3/filters/custom/effect-custom-transform-parameters.html: Added.
* css3/filters/resources/vertex-transform-parameter.vs: Added.
* css3/filters/script-tests/custom-filter-property-computed-style.js:
(description):
* platform/chromium/css3/filters/custom/custom-filter-property-computed-style-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Not sending NPP_SetWindow is causing Flash to not throttle itself
<rdar://problem/12133021> and https://bugs.webkit.org/show_bug.cgi?id=95274

Reviewed by Sam Weinig.

Source/WebKit2:

* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]): Previously we'd only update window visibility when the window is hidden.
  Now we also update window visibility when the window is shown.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::callSetWindowInvisible): Call set window with a manufactured empty clip rect to tell
  the plug-in that it is complete hidden.
(WebKit):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(NetscapePlugin):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::windowVisibilityChanged): Call "callSetWindow" or "callSetWindowInvisible" as appropriate.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setWindowIsVisible): Tell the plugin that its visibility changed.
(WebKit::PluginView::viewGeometryDidChange): Grab a clip rect that - although incorrect - at least is correct if
  the PluginView is completely hidden.

Tools:

Add a test plug-in that calls back into the page with info on the NPWindow passed
in to NPP_SetWindow.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp: Added.
(LogNPPSetWindow):
(LogNPPSetWindow::LogNPPSetWindow):
(LogNPPSetWindow::NPP_SetWindow):

LayoutTests:

* platform/mac-wk2/plugins/npp-setwindow-called-on-scroll-expected.txt: Added.
* platform/mac-wk2/plugins/npp-setwindow-called-on-scroll.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) : WebCore::FloatRect WebCore::RenderGeometryMap::absoluteRect(const WebCore::FloatRect &) const
https://bugs.webkit.org/show_bug.cgi?id=92464

Saw an instance of fast/events/tabindex-focus-blur-all.html hitting the assertion on Debug
WK1 as well. Since it doesn't always happen on Debug WK1, mark it as flakey.

* platform/mac-wk2/Skipped:
Move handling of the test from here ...
* platform/mac/TestExpectations:
... to here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Throw TypeError for invalid version parameters
https://bugs.webkit.org/show_bug.cgi?id=95143

Reviewed by Tony Chang.

Source/WebCore:

Still need to throw for -1, but developers are running into the string
scenario so handling that is more urgent. See
https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-html5/QvjsPbBdP4M

Test: storage/indexeddb/intversion-bad-parameters.html

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):

LayoutTests:

* http/tests/inspector/indexeddb/indexeddb-test.js:
Remove 0 as a version parameter now that it will throw TypeError. It
should have been a no-op anyway.

* storage/indexeddb/intversion-bad-parameters-expected.txt: Added.
* storage/indexeddb/intversion-bad-parameters.html: Added.
* storage/indexeddb/resources/intversion-bad-parameters.js: Added.
(test):
(deleteSuccess):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
r126257 broke css3/flexbox/flexitem.html
https://bugs.webkit.org/show_bug.cgi?id=94720

Reviewed by Ojan Vafai.

Move the failing test case into a new file so we can re-enable the
rest of the tests. We probably need to add some debugging information
to the failing test case to identify the cause of flakiness.

* css3/flexbox/flexitem-expected.txt: Remove flaky test case.
* css3/flexbox/flexitem-stretch-image-expected.txt: Added.
* css3/flexbox/flexitem-stretch-image.html: Added.
* css3/flexbox/flexitem.html: Remove flaky test case.
* platform/chromium/TestExpectations: Change failure to new test.
* platform/efl/TestExpectations: Change failure to new test.
* platform/mac/Skipped: Remove so we can get flakiness information.
* platform/mac/TestExpectations: Mark new test as flaky.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] Rename methods to prepare for proper pagination of columns
https://bugs.webkit.org/show_bug.cgi?id=95375

Reviewed by Simon Fraser.

This patch is doing some renaming and refactoring to prepare for proper pagination of columns. Most of the renames
involve changing RenderFlowThread functions to exactly match the names of their RenderBlock callers. These names
end up being more accurate once the top of a page and remaining height on a page no longer have a 1:1 mapping to
the RenderRegion's dimensions.
        
The renames/additions include:
    renderRegionForLine -> regionAtBlockOffset
    Justification: The block method is already called regionAtBlockOffset. No lines are involved, so line was
    never the correct term to be passing in.
            
    regionLogicalXXXForLine -> pageLogicalXXXForOffset
    Justification: Matches the RenderBlock callers, and it's more accurate to talk in terms of "pages" now that
    we have RenderRegionSets that can contain multiple "pages" in a single region.
            
    logicalWidthForFlowThreadContent/logicalHeightForFlowThreadContent -> pageLogicalWidth/Height.
    Justification: Makes it more clear we're talking about the width and height of a single page/column rather
    than the width and height of the region itself.
            
    logicalHeightOfAllFlowThreadContent
    This method is new and represents the total flow thread logical height that is consumed by the region.
    It has to be distinguished from the pageLogicalHeight for a region since sets can have multiple pages/columns.

Note with this patch we're essentially adopting the convention used by all of the pagination code besides regions
of referring to anything we paginate as a "page." I continue to believe this is the simplest way to talk about
these objects in code that is generically dealing with all three (like the breaking code in RenderBlock).
 
Eventually we might adopt the fragment terminology in the latest CSS draft, in which case 
RenderRegion would become RenderFragment, RenderFlowThread would become RenderFragmentedBlock, and uses of
the generic "page" would become "fragment" instead, but we'll wait for that draft's terminology to stabilize first
before switching away from the current names.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasNextPage):
(WebCore::RenderBlock::pageLogicalTopForOffset):
(WebCore::RenderBlock::pageLogicalHeightForOffset):
(WebCore::RenderBlock::pageRemainingLogicalHeightForOffset):
(WebCore::RenderBlock::regionAtBlockOffset):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::computeLogicalWidth):
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::regionAtBlockOffset):
(WebCore::RenderFlowThread::pageLogicalTopForOffset):
(WebCore::RenderFlowThread::pageLogicalWidthForOffset):
(WebCore::RenderFlowThread::pageLogicalHeightForOffset):
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
(WebCore::RenderFlowThread::mapFromFlowToRegion):
(WebCore::RenderFlowThread::setRegionRangeForBox):
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::pageLogicalWidth):
(WebCore::RenderRegion::pageLogicalHeight):
(WebCore):
(WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
(WebCore::RenderRegion::layout):
* rendering/RenderRegion.h:
(RenderRegion):



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