mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 595842. When GetHDCWithClip fails, fall through to the fallback rendering path. r=vlad,a=blocking-beta7
This commit is contained in:
parent
501d69cd01
commit
3f29ca47ee
@ -90,25 +90,29 @@ gfxWindowsNativeDrawing::BeginNativeDrawing()
|
||||
(surf->GetContentType() == gfxASurface::CONTENT_COLOR_ALPHA &&
|
||||
(mNativeDrawFlags & CAN_DRAW_TO_COLOR_ALPHA))))
|
||||
{
|
||||
if (mTransformType == TRANSLATION_ONLY) {
|
||||
mRenderState = RENDER_STATE_NATIVE_DRAWING;
|
||||
// grab the DC. This can fail if there is a complex clipping path,
|
||||
// in which case we'll have to fall back.
|
||||
mWinSurface = static_cast<gfxWindowsSurface*>(static_cast<gfxASurface*>(surf.get()));
|
||||
mDC = mWinSurface->GetDCWithClip(mContext);
|
||||
|
||||
mTranslation = m.GetTranslation();
|
||||
if (mDC) {
|
||||
if (mTransformType == TRANSLATION_ONLY) {
|
||||
mRenderState = RENDER_STATE_NATIVE_DRAWING;
|
||||
|
||||
mWinSurface = static_cast<gfxWindowsSurface*>(static_cast<gfxASurface*>(surf.get()));
|
||||
} else if (((mTransformType == AXIS_ALIGNED_SCALE)
|
||||
&& (mNativeDrawFlags & CAN_AXIS_ALIGNED_SCALE)) ||
|
||||
(mNativeDrawFlags & CAN_COMPLEX_TRANSFORM))
|
||||
{
|
||||
mWorldTransform.eM11 = (FLOAT) m.xx;
|
||||
mWorldTransform.eM12 = (FLOAT) m.yx;
|
||||
mWorldTransform.eM21 = (FLOAT) m.xy;
|
||||
mWorldTransform.eM22 = (FLOAT) m.yy;
|
||||
mWorldTransform.eDx = (FLOAT) m.x0;
|
||||
mWorldTransform.eDy = (FLOAT) m.y0;
|
||||
mTranslation = m.GetTranslation();
|
||||
} else if (((mTransformType == AXIS_ALIGNED_SCALE)
|
||||
&& (mNativeDrawFlags & CAN_AXIS_ALIGNED_SCALE)) ||
|
||||
(mNativeDrawFlags & CAN_COMPLEX_TRANSFORM))
|
||||
{
|
||||
mWorldTransform.eM11 = (FLOAT) m.xx;
|
||||
mWorldTransform.eM12 = (FLOAT) m.yx;
|
||||
mWorldTransform.eM21 = (FLOAT) m.xy;
|
||||
mWorldTransform.eM22 = (FLOAT) m.yy;
|
||||
mWorldTransform.eDx = (FLOAT) m.x0;
|
||||
mWorldTransform.eDy = (FLOAT) m.y0;
|
||||
|
||||
mRenderState = RENDER_STATE_NATIVE_DRAWING;
|
||||
mWinSurface = static_cast<gfxWindowsSurface*>(static_cast<gfxASurface*>(surf.get()));
|
||||
mRenderState = RENDER_STATE_NATIVE_DRAWING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,9 +160,6 @@ gfxWindowsNativeDrawing::BeginNativeDrawing()
|
||||
if (mRenderState == RENDER_STATE_NATIVE_DRAWING) {
|
||||
// we can just do native drawing directly to the context's surface
|
||||
|
||||
// grab the DC
|
||||
mDC = mWinSurface->GetDCWithClip(mContext);
|
||||
|
||||
// do we need to use SetWorldTransform?
|
||||
if (mTransformType != TRANSLATION_ONLY) {
|
||||
SetGraphicsMode(mDC, GM_ADVANCED);
|
||||
|
9
layout/reftests/native-theme/border-radius-ref.html
Normal file
9
layout/reftests/native-theme/border-radius-ref.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<div style="padding:50px; border-radius:50px; width:400px; height:400px; border:1px solid black;">
|
||||
<input type="radio">
|
||||
<input type="checkbox">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
9
layout/reftests/native-theme/border-radius.html
Normal file
9
layout/reftests/native-theme/border-radius.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<div style="padding:50px; border-radius:50px; width:400px; height:400px; border:1px solid black; overflow:hidden;">
|
||||
<input type="radio">
|
||||
<input type="checkbox">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -61,4 +61,6 @@ skip-if(gtk2Widget) random-if(d2d) == resizer-bottomend-rtl.xul resizer-bottomen
|
||||
skip-if(!winWidget) == scroll-thumb-minimum-size-notheme.html scroll-thumb-minimum-size-notheme-ref.html
|
||||
# skip-if(!winWidget) == scroll-thumb-minimum-size-theme.html scroll-thumb-minimum-size-theme-ref.html # Bug 512206
|
||||
|
||||
== border-radius.html border-radius-ref.html
|
||||
|
||||
== checkbox-dynamic-1.html checkbox-dynamic-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user