mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 668319 - Allow to set opacity on ::-moz-tree-cell-text.
r=roc
This commit is contained in:
parent
68be621524
commit
b9b2ded530
20
layout/reftests/bugs/668319-1.xul
Normal file
20
layout/reftests/bugs/668319-1.xul
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?xml-stylesheet type="text/css" href="data:text/css,
|
||||||
|
tree { height: 100px; -moz-appearance: none; border: none; }
|
||||||
|
treecol, treecolpicker { visibility: hidden; }
|
||||||
|
treechildren::-moz-tree-cell-text { opacity: 0; }
|
||||||
|
"?>
|
||||||
|
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
<tree>
|
||||||
|
<treecols>
|
||||||
|
<treecol flex="1"/>
|
||||||
|
</treecols>
|
||||||
|
<treechildren>
|
||||||
|
<treeitem>
|
||||||
|
<treerow>
|
||||||
|
<treecell label="test"/>
|
||||||
|
</treerow>
|
||||||
|
</treeitem>
|
||||||
|
</treechildren>
|
||||||
|
</tree>
|
||||||
|
</window>
|
@ -1646,3 +1646,4 @@ fails-if(layersGPUAccelerated&&cocoaWidget) == 654950-1.html 654950-1-ref.html #
|
|||||||
== 658952.html 658952-ref.html
|
== 658952.html 658952-ref.html
|
||||||
== 664127-1.xul 664127-1-ref.xul
|
== 664127-1.xul 664127-1-ref.xul
|
||||||
== 660682-1.html 660682-1-ref.html
|
== 660682-1.html 660682-1-ref.html
|
||||||
|
== 668319-1.xul about:blank
|
||||||
|
@ -3553,6 +3553,9 @@ nsTreeBodyFrame::PaintText(PRInt32 aRowIndex,
|
|||||||
// out and to paint.
|
// out and to paint.
|
||||||
nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecelltext);
|
nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecelltext);
|
||||||
|
|
||||||
|
// Obtain opacity value for the image.
|
||||||
|
float opacity = textContext->GetStyleDisplay()->mOpacity;
|
||||||
|
|
||||||
// Obtain the margins for the text and then deflate our rect by that
|
// Obtain the margins for the text and then deflate our rect by that
|
||||||
// amount. The text is assumed to be contained within the deflated rect.
|
// amount. The text is assumed to be contained within the deflated rect.
|
||||||
nsRect textRect(aTextRect);
|
nsRect textRect(aTextRect);
|
||||||
@ -3619,8 +3622,19 @@ nsTreeBodyFrame::PaintText(PRInt32 aRowIndex,
|
|||||||
PRUint8 direction = aTextRTL ? NS_STYLE_DIRECTION_RTL :
|
PRUint8 direction = aTextRTL ? NS_STYLE_DIRECTION_RTL :
|
||||||
NS_STYLE_DIRECTION_LTR;
|
NS_STYLE_DIRECTION_LTR;
|
||||||
|
|
||||||
|
gfxContext* ctx = aRenderingContext.ThebesContext();
|
||||||
|
if (opacity != 1.0f) {
|
||||||
|
ctx->PushGroup(gfxASurface::CONTENT_COLOR_ALPHA);
|
||||||
|
}
|
||||||
|
|
||||||
nsLayoutUtils::DrawString(this, &aRenderingContext, text.get(), text.Length(),
|
nsLayoutUtils::DrawString(this, &aRenderingContext, text.get(), text.Length(),
|
||||||
textRect.TopLeft() + nsPoint(0, baseline), direction);
|
textRect.TopLeft() + nsPoint(0, baseline), direction);
|
||||||
|
|
||||||
|
if (opacity != 1.0f) {
|
||||||
|
ctx->PopGroupToSource();
|
||||||
|
ctx->Paint(opacity);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MOZ_TIMELINE
|
#ifdef MOZ_TIMELINE
|
||||||
NS_TIMELINE_STOP_TIMER("Render Outline Text");
|
NS_TIMELINE_STOP_TIMER("Render Outline Text");
|
||||||
NS_TIMELINE_MARK_TIMER("Render Outline Text");
|
NS_TIMELINE_MARK_TIMER("Render Outline Text");
|
||||||
|
Loading…
Reference in New Issue
Block a user