BTW, beware this situation, it is sometimes tricky.
The trouble is that if you use view width for computation of sb layout, you will end in "flip-flop" situation, as presence of sb will affect its layout (size is reduced).
In this case it leads in relatively harmless condition, but with both scrollbars present, it can lead into "scrollbar oscillation" which results in stack-overflow crash. That is why it is advisible to provide always the size that does not depend whether scrollbar is visible.
However, in RichTextView, the bug was that this size was used for both sb calulaction and painting. This is now fixed.