User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 Build ID: 20120420145725 Steps to reproduce: I selected right-to-left text with a text-shadow CSS rule. Actual results: The shadow disappeared on each line on which a selection was active except for a tiny area on the right-most side. Expected results: The shadow should have rendered as it would in selecting left-to-right text.
Created attachment 624697 [details] [diff] [review] Patch This is essentially a one-line patch: for RTL we need to calculate the left edge of the selection as xoffset - width in the call to PaintOneShadow, just as we do in the call to FillClippedRect a few lines above. In practice it's a bit more complicated: to get at the width for the calculation, I've had to pull the call to MeasureText out of PaintOneShadow to the callers. Measuring the text only once when there are multiple shadows should also be a modest performance win.
Created attachment 624699 [details] [diff] [review] Reftests These are just copies of the existing text-shadow-selected-1* tests with RTL text.
Created attachment 624700 [details] [diff] [review] Corrected reftests Updated reftests using <bdo> -- using Hebrew has font issues.
This is a regression from the range http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b4da2d439cbc&tochange=e9c620a5c85f -- presumably bug 692752.