Clean up use of Visibility and View.
In general, Visibility should not be directly compared, but checked against a View. This was only used sparsely through the code, leaving the methods of checking visibility both fragile (if a new Visibility was added) and confusing to new developers.
Trunk: Committed revision 23287.
Keeping Formula Parser in sync: Committed revision 23288.