Extend platform layer so it can pass blend modes to the compositing calls
https://bugs.webkit.org/show_bug.cgi?id=104176

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-12-07
Reviewed by Dirk Schulze.

Source/WebCore:

Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context

No new tests, no new functionality.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::draw):
* platform/graphics/CrossfadeGeneratedImage.h:
(CrossfadeGeneratedImage):
* platform/graphics/GeneratedImage.h:
(GeneratedImage):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
* platform/graphics/GeneratorGeneratedImage.h:
(GeneratorGeneratedImage):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
(WebCore):
(WebCore::GraphicsContext::drawImageBuffer):
(WebCore::GraphicsContext::setCompositeOperation):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContextState::GraphicsContextState):
(GraphicsContextState):
(GraphicsContext):
* platform/graphics/Image.cpp:
(WebCore::Image::draw):
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
(Image):
* platform/graphics/ImageBuffer.h:
(ImageBuffer):
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::setPlatformCompositeOperation):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::draw):
* platform/graphics/cg/PDFDocumentImage.h:
(PDFDocumentImage):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/qt/StillImageQt.cpp:
(WebCore::StillImage::draw):
* platform/graphics/qt/StillImageQt.h:
(StillImage):
* platform/graphics/skia/BitmapImageSingleFrameSkia.h:
(BitmapImageSingleFrameSkia):
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::BitmapImage::draw):
(WebCore::BitmapImageSingleFrameSkia::draw):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawSVGToImageBuffer):
(WebCore::SVGImage::draw):
(WebCore::SVGImage::nativeImageForCurrentFrame):
* svg/graphics/SVGImage.h:
(SVGImage):

Source/WebKit/chromium:

Adding blend mode enumeration to draw functions

* tests/DragImageTest.cpp:
(WebCore::TestImage::draw):
* tests/ImageLayerChromiumTest.cpp:
(WebCore::TestImage::draw):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium-linux/fast/text/hyphenate-character-expected.png: Added.
* platform/chromium-linux/fast/text/hyphenate-character-expected.txt: Added.
* platform/chromium-linux/fast/text/hyphenate-first-word-expected.png: Added.
* platform/chromium-linux/fast/text/hyphenate-limit-before-after-expected.png: Added.
* platform/chromium-linux/fast/text/hyphenate-limit-lines-expected.png: Added.
* platform/chromium-linux/fast/text/hyphenate-locale-expected.png: Added.
* platform/chromium-linux/fast/text/hyphens-expected.png: Added.
* platform/chromium-linux/fast/text/international/hindi-whitespace-expected.png: Added.
* platform/chromium-linux/fast/text/international/hindi-whitespace-expected.txt: Added.
* platform/chromium-mac-lion/fast/text/hyphenate-limit-before-after-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium-mac-lion/css3/flexbox/repaint-column-reverse-expected.png: Added.
* platform/chromium-mac-snowleopard/css3/flexbox/repaint-column-reverse-expected.png: Added.
* platform/chromium-mac/css3/flexbox/repaint-column-reverse-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.  Remove some incorrect baselines.

* platform/chromium-linux/compositing/backface-visibility/backface-visibility-webgl-expected.png: Removed.
* platform/chromium-mac/compositing/backface-visibility/backface-visibility-webgl-expected.png: Removed.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium-mac/compositing/background-color/background-color-change-to-text-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/background-color/background-color-change-to-text-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium-mac-lion/css3/flexbox/repaint-column-reverse-expected.png: Removed.
* platform/chromium-mac-snowleopard/css3/flexbox/repaint-column-reverse-expected.png: Removed.
* platform/chromium-win-xp/css3/flexbox/repaint-column-reverse-expected.png: Removed.
* platform/chromium-win/css3/flexbox/repaint-column-reverse-expected.png: Renamed from LayoutTests/platform/chromium-linux/css3/flexbox/repaint-column-reverse-expected.png.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add missing forward declaration for JSC::ArrayAllocationProfile
https://bugs.webkit.org/show_bug.cgi?id=104425

Patch by Jonathan Liu <net147@gmail.com> on 2012-12-07
Reviewed by Kentaro Hara.

The header for the JSC::ArrayConstructor class is missing a forward
declaration for the JSC::ArrayAllocationProfile class which causes
compilation to fail when compiling with MinGW-w64.

* runtime/ArrayConstructor.h:
(JSC):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium-win-xp/fast/text/hyphenate-character-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Remove unused source file from PlatformEfl.cmake
https://bugs.webkit.org/show_bug.cgi?id=104430

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-12-07
Reviewed by Kentaro Hara.

Shared/API/c/gtk/WKGraphicsContextGtk.cpp is not used for building WebKit2/EFL.

* PlatformEfl.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion failed at WebCore::RedirectedXCompositeWindow::context()
https://bugs.webkit.org/show_bug.cgi?id=104349

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2012-12-08
Reviewed by Martin Robinson.

We should return GLContext if m_needsContext is CreateGLContext. By the way
CreateGLContext is a enum value and its default value is 0. So checking
ASSERT(m_needsContext) causes a crash on debug build.
ASSERT(m_needsContext == CreateGLContext) is better here.

No new tests since we can verify this with already existing AC tests.

* platform/gtk/RedirectedXCompositeWindow.cpp:
(WebCore::RedirectedXCompositeWindow::context):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLTemplateElement.innerHTML should be parsed into the template contents owner document
https://bugs.webkit.org/show_bug.cgi?id=104407

Reviewed by Eric Seidel.

Source/WebCore:

When parsing via innerHTML, ensure that all operations (including the
initial fragment creation) occur in the proper document to avoid,
e.g., images loading while being parsed into the template contents.
This matches the parsing behavior during page load.

Test: fast/dom/HTMLTemplateElement/innerHTML-inert.html

* editing/markup.cpp:
(WebCore::createFragmentForInnerOuterHTML):

LayoutTests:

* fast/dom/HTMLTemplateElement/innerHTML-inert-expected.txt: Added.
* fast/dom/HTMLTemplateElement/innerHTML-inert.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r136975.

* rendering/svg/SVGResources.cpp:
(WebCore::SVGResources::buildCachedResources):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused headers
https://bugs.webkit.org/show_bug.cgi?id=104428

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2012-12-08
Reviewed by Kentaro Hara.

Header inclusion cleanup.
Remove <WebCore/NotImplement.h>.

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
* WebMutableURLRequest.cpp:

Source/WebKit2:

* Platform/qt/WorkQueueQt.cpp:
* Platform/win/WorkQueueWin.cpp:
* Shared/qt/ShareableBitmapQt.cpp:
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
* UIProcess/win/TextCheckerWin.cpp:
* UIProcess/win/WebContextMenuProxyWin.cpp:
* WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r137003. Wrap NodeMutationObserverData with ENABLE(MUTATION_OBSERVERS).

* dom/NodeRareData.h:
(NodeRareData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r137003. Wrap Microdata only sections with ENABLE(MICRODATA).

* dom/NodeRareData.h:
(NodeRareData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Qt Linux Minimal build fix attempt after r136959.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::layerTreeDidChange):
(WebCore::InspectorInstrumentation::renderLayerDestroyed):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Qt Linux Minimal build fix after r136975.

* dom/ElementRareData.h:
(ElementRareData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove incorrect ASSERT for m_error in CachedResource
https://bugs.webkit.org/show_bug.cgi?id=104333

Reviewed by Nate Chapin.

This assertion was brought in https://bugs.webkit.org/show_bug.cgi?id=100901
When the request is canceled, m_error.isNull() should be true.

run webkit_unit_tests Debug build.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::stopLoading):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium/TestExpectations:

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