I guess by Gram matrix you mean the kernel matrix. Using metric="precomputed" would make a grid search over kernel parameters much more complicated though.

In sklearn/svm/base.py _compute_kernel method the behavior is different from this commit. I couldn't find any method that implements it like in this commit. Anyhow, the behavior "should" be consistent for all kernel methods.