Re: riched20: add tests for EM_FORMATRANGE

2009-03-16 Thread Paul Vriens

Paul Vriens wrote:

James McKenzie wrote:

Lei Zhang wrote:

On Fri, Mar 13, 2009 at 12:01 PM, Paul Vriens
paul.vriens.w...@gmail.com wrote:
 

Lei Zhang wrote:
   

Hi,

In my last attempt, I submitted Troy Rollo's EM_FORMATRANGE
implementation and with my test cases. I'm not sure what was wrong
with the implementation, but the test cases should be ok.


 




  

Hi Lei,

Pretty old patch. (June 2007)

I just moved some of my VMware 'boxes' to my new laptop (laptop 
resolution
1024x800) and I suddenly had some failures. The resolution that 
VMware can
use (with all those borders and the sidebar) is 1044x574. Running 
the tests

fullscreen makes them pass again.

You can replicate this by playing with the screen resolution. The 
smaller

the resolution the more test failures.

Any idea where I need to look?

--
Cheers,

Paul.



Is this on Windows in VMWare? I'm not getting any riched20 crosstest
failures here at 800x600.



  

Interesting that this should fail on a VMWare workstation setup.  The
tests are pretty straightfoward.

Also, I have not worked on this due to other pressures of life.  Would
someone like to take this over and finish it?  This would solve a couple
of open bug reports and fix some complaints about text rendering.

James McKenzie



As said before, this issue can be seen on both VMware and real boxes. 
It's much easier of course to play around with resolutions on VMware.


I'm currently trying loads of different resolutions to see if there is 
some logic. I do see that when I'm reducing just the horizontal 
resolution for example that the result of the EM_FORMATRANGE message 
changes at certain intervals (no logic found yet though).


The number that keeps coming back is '15' :

HorVertEM_FORMATRANGE

104080020
93780016
83280015
71280014
65280013
54780012
5178009
4128007
3828006

The difference between the horizontal resolution when the results change 
is always a multiple of 15 (can't check the first one as 20 is the 
maximum returned).


The same behavior can be seen with a vertical resolution of 600:

HorVertEM_FORMATRANGE

123860020
122260018
105760016
101260015
9376009
5476007
5176006

And with a horizontal resolution of 979 (yeah I know):

HorVertEM_FORMATRANGE

97972420
97971215
9794727

So any idea about that number '15'? Maybe once I've figured out where 
that comes from the logic makes more sense.


The magic number '15' is 1440/96(dpi). And sure enough the magic number changes 
to '12' on 120dpi.


If I read MSDN correctly 
(http://msdn.microsoft.com/en-us/library/bb787911(VS.85).aspx) the rc and rcPage 
area should be in twips not pixels.


If I change the code to do exactly that (multiply by 1440/dpi) the tests succeed 
on all resolutions I've checked.


Another thing I found but I'm not sure it's relevant here is that fr.rc.bottom 
is changed after a EM_FORMATRANGE message.


--
Cheers,

Paul.




Re: riched20: add tests for EM_FORMATRANGE

2009-03-15 Thread Paul Vriens

James McKenzie wrote:

Lei Zhang wrote:

On Fri, Mar 13, 2009 at 12:01 PM, Paul Vriens
paul.vriens.w...@gmail.com wrote:
  

Lei Zhang wrote:


Hi,

In my last attempt, I submitted Troy Rollo's EM_FORMATRANGE
implementation and with my test cases. I'm not sure what was wrong
with the implementation, but the test cases should be ok.





  

Hi Lei,

Pretty old patch. (June 2007)

I just moved some of my VMware 'boxes' to my new laptop (laptop resolution
1024x800) and I suddenly had some failures. The resolution that VMware can
use (with all those borders and the sidebar) is 1044x574. Running the tests
fullscreen makes them pass again.

You can replicate this by playing with the screen resolution. The smaller
the resolution the more test failures.

Any idea where I need to look?

--
Cheers,

Paul.



Is this on Windows in VMWare? I'm not getting any riched20 crosstest
failures here at 800x600.



  

Interesting that this should fail on a VMWare workstation setup.  The
tests are pretty straightfoward.

Also, I have not worked on this due to other pressures of life.  Would
someone like to take this over and finish it?  This would solve a couple
of open bug reports and fix some complaints about text rendering.

James McKenzie



As said before, this issue can be seen on both VMware and real boxes. It's much 
easier of course to play around with resolutions on VMware.


I'm currently trying loads of different resolutions to see if there is some 
logic. I do see that when I'm reducing just the horizontal resolution for 
example that the result of the EM_FORMATRANGE message changes at certain 
intervals (no logic found yet though).


The number that keeps coming back is '15' :

Hor VertEM_FORMATRANGE

1040800 20
937 800 16
832 800 15
712 800 14
652 800 13
547 800 12
517 800 9
412 800 7
382 800 6

The difference between the horizontal resolution when the results change is 
always a multiple of 15 (can't check the first one as 20 is the maximum returned).


The same behavior can be seen with a vertical resolution of 600:

Hor VertEM_FORMATRANGE

1238600 20
1222600 18
1057600 16
1012600 15
937 600 9
547 600 7
517 600 6

And with a horizontal resolution of 979 (yeah I know):

Hor VertEM_FORMATRANGE

979 724 20
979 712 15
979 472 7

So any idea about that number '15'? Maybe once I've figured out where that comes 
from the logic makes more sense.


--
Cheers,

Paul.




Re: riched20: add tests for EM_FORMATRANGE

2009-03-14 Thread Paul Vriens

Lei Zhang wrote:

On Fri, Mar 13, 2009 at 12:01 PM, Paul Vriens
paul.vriens.w...@gmail.com wrote:

Lei Zhang wrote:

Hi,

In my last attempt, I submitted Troy Rollo's EM_FORMATRANGE
implementation and with my test cases. I'm not sure what was wrong
with the implementation, but the test cases should be ok.






Hi Lei,

Pretty old patch. (June 2007)

I just moved some of my VMware 'boxes' to my new laptop (laptop resolution
1024x800) and I suddenly had some failures. The resolution that VMware can
use (with all those borders and the sidebar) is 1044x574. Running the tests
fullscreen makes them pass again.

You can replicate this by playing with the screen resolution. The smaller
the resolution the more test failures.

Any idea where I need to look?

--
Cheers,

Paul.



Is this on Windows in VMWare? I'm not getting any riched20 crosstest
failures here at 800x600.

I can also see errors on my native XP Professional box when running at a 
resolution of 640x480.


--
Cheers,

Paul.




Re: riched20: add tests for EM_FORMATRANGE

2009-03-14 Thread James McKenzie
Lei Zhang wrote:
 On Fri, Mar 13, 2009 at 12:01 PM, Paul Vriens
 paul.vriens.w...@gmail.com wrote:
   
 Lei Zhang wrote:
 
 Hi,

 In my last attempt, I submitted Troy Rollo's EM_FORMATRANGE
 implementation and with my test cases. I'm not sure what was wrong
 with the implementation, but the test cases should be ok.


 


   
 Hi Lei,

 Pretty old patch. (June 2007)

 I just moved some of my VMware 'boxes' to my new laptop (laptop resolution
 1024x800) and I suddenly had some failures. The resolution that VMware can
 use (with all those borders and the sidebar) is 1044x574. Running the tests
 fullscreen makes them pass again.

 You can replicate this by playing with the screen resolution. The smaller
 the resolution the more test failures.

 Any idea where I need to look?

 --
 Cheers,

 Paul.

 

 Is this on Windows in VMWare? I'm not getting any riched20 crosstest
 failures here at 800x600.



   
Interesting that this should fail on a VMWare workstation setup.  The
tests are pretty straightfoward.

Also, I have not worked on this due to other pressures of life.  Would
someone like to take this over and finish it?  This would solve a couple
of open bug reports and fix some complaints about text rendering.

James McKenzie






Re: riched20: add tests for EM_FORMATRANGE

2009-03-13 Thread Paul Vriens

Lei Zhang wrote:

Hi,

In my last attempt, I submitted Troy Rollo's EM_FORMATRANGE
implementation and with my test cases. I'm not sure what was wrong
with the implementation, but the test cases should be ok.






Hi Lei,

Pretty old patch. (June 2007)

I just moved some of my VMware 'boxes' to my new laptop (laptop resolution 
1024x800) and I suddenly had some failures. The resolution that VMware can use 
(with all those borders and the sidebar) is 1044x574. Running the tests 
fullscreen makes them pass again.


You can replicate this by playing with the screen resolution. The smaller the 
resolution the more test failures.


Any idea where I need to look?

--
Cheers,

Paul.




Re: riched20: add tests for EM_FORMATRANGE

2009-03-13 Thread Lei Zhang
On Fri, Mar 13, 2009 at 12:01 PM, Paul Vriens
paul.vriens.w...@gmail.com wrote:
 Lei Zhang wrote:

 Hi,

 In my last attempt, I submitted Troy Rollo's EM_FORMATRANGE
 implementation and with my test cases. I'm not sure what was wrong
 with the implementation, but the test cases should be ok.


 


 Hi Lei,

 Pretty old patch. (June 2007)

 I just moved some of my VMware 'boxes' to my new laptop (laptop resolution
 1024x800) and I suddenly had some failures. The resolution that VMware can
 use (with all those borders and the sidebar) is 1044x574. Running the tests
 fullscreen makes them pass again.

 You can replicate this by playing with the screen resolution. The smaller
 the resolution the more test failures.

 Any idea where I need to look?

 --
 Cheers,

 Paul.


Is this on Windows in VMWare? I'm not getting any riched20 crosstest
failures here at 800x600.




Re: riched20: add tests for EM_FORMATRANGE

2009-03-13 Thread Paul Vriens

On Mar 13, 2009, at 23:17, Lei Zhang thes...@google.com wrote:


On Fri, Mar 13, 2009 at 12:01 PM, Paul Vriens
paul.vriens.w...@gmail.com wrote:

Lei Zhang wrote:


Hi,

In my last attempt, I submitted Troy Rollo's EM_FORMATRANGE
implementation and with my test cases. I'm not sure what was wrong
with the implementation, but the test cases should be ok.


---
---
--



Hi Lei,

Pretty old patch. (June 2007)

I just moved some of my VMware 'boxes' to my new laptop (laptop  
resolution
1024x800) and I suddenly had some failures. The resolution that  
VMware can
use (with all those borders and the sidebar) is 1044x574. Running  
the tests

fullscreen makes them pass again.

You can replicate this by playing with the screen resolution. The  
smaller

the resolution the more test failures.

Any idea where I need to look?

--
Cheers,

Paul.



Is this on Windows in VMWare? I'm not getting any riched20 crosstest
failures here at 800x600.

On VMware. I'm not at my box, but can you try a smaller resolution?

Paul