  In this paper, we analyze the variation of the gravitational action on a
bounded region of spacetime whose boundary contains segments with various
characters, including null. We develop a systematic approach to decompose the
derivative of metric variations into orthogonal and tangential components with
respect to the boundary and express them in terms of variations of geometric
objects associated with the boundary hypersurface. We suggest that a
double-foliation of spacetime provides a natural and useful set-up for treating
the general problem and clarifies the assumptions and results in specialized
ones. In this set-up, we are able to obtain the boundary action necessary for
the variational principle to become well-posed, beside the canonical structure
of the theory, while keeping the variations quite general. Especially, we show
how one can remove the restrictions imposed on the metric variations in
previous works due to the assumption that the boundary character is kept
unaltered. As a result, we find that on null boundaries a new canonical pair
which is related to the change in character of the boundary. This set-up and
the calculation procedure are stated in a way that can be applied to other more
generalized theories of gravity.
