[shadow] styleForText should consider the case where parent node has no style
https://bugs.webkit.org/show_bug.cgi?id=113275

Source/WebCore:

If a text node is distributed, its parent node for rendering and
styling might have no style. In the case, styleForText should return
default style.

Reviewed by Hajime Morrita.

Test: fast/dom/shadow/text-node-distributed-crash.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForText):
Check whether a parent node has any style or not. If not, return
default style. This is the same behavior as styleForElement.

LayoutTests:

Reviewed by Hajime Morrita.

* fast/dom/shadow/text-node-distributed-crash-expected.txt: Added.
* fast/dom/shadow/text-node-distributed-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CoordGfx] Support to share GraphicsSurface flags with client.
https://bugs.webkit.org/show_bug.cgi?id=112982

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2013-03-27
Reviewed by Noam Rosenthal.

Covered by existing WebGL tests.

Source/WebCore:

This patch adds support to pass GraphicsSurface flags during it's client creation.
This would be helpful to determine cases when blending can be disabled on client
side i.e When AlphaSupport is disabled during Graphics Surface creation.
With GLX, we rely on Window to provide us with necessary information on client side.
This might not be the case on other platforms or when not using Window on X.
This patch doesn't change original behaviour of creating GraphicsSurface client
with default flags GraphicsSurface::SupportsTextureTarget and GraphicsSurface::SupportsSharing.

* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(WebCore::TextureMapperPlatformLayer::graphicsSurfaceFlags):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(CoordinatedGraphicsLayerState):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore):
(WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
* platform/graphics/efl/GraphicsContext3DPrivate.h:
(GraphicsContext3DPrivate):
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::initializeClient):

Source/WebKit2:

This patch adds support to pass GraphicsSurface flags
during it's client creation.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):

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