Keilim, Chapter 19, Mishnah 9. Our mishnah takes up a wooden chest built with its opening not on top but on the side, and asks which kinds of tum'ah such a chest is able to receive.
Now to the ruling itself. "Teivah shepitchah mitzidah" - a chest whose mouth has been set into its side wall - is, the mishnah teaches, "tmei'ah midras," and no less "tmei'at met": both the tum'ah of treading and the tum'ah of a corpse can take hold of it. Contrast this with a chest whose mouth faces upward. There only corpse tum'ah is possible, because the upper panel is the very lid that must be raised whenever one wants to reach the contents, and a panel of that sort was never meant to bear a person's weight. Our chest is another matter. Since one enters it from the wall, a person may sit himself down on the upper surface while the chest goes right on functioning as a receptacle. Doing double duty as seat and as container, it ranks as a keli fashioned for sitting, and midras tum'ah therefore applies to it as well.
Rabbi Yosei sets limits on this. "Amar Rabbi Yosei, eimatai?" Under what conditions does a chest of this design pick up midras tum'ah alongside corpse tum'ah? Only "bizman she'eina gevohah asarah tefachim," so long as it does not stand a full ten tefachim high, "o she'ein lah lizbaz" of a tefach, or when no border of a tefach runs along its top edge. Reasoning: a chest that reaches ten tefachim is uncomfortably high for a seat, and people are not in the habit of sitting on such a thing. And a border of a tefach around the upper edge jabs into whoever tries to sit there, so the surface is unfit for the purpose. In both situations the chest is not an article intended for sitting, and midras tum'ah has no hold on it.
The mishnah continues with two cases of a chest that has broken. "Nifhatah milma'alah" - if it broke above, meaning the covering surface gave way, then "tmei'ah tmat met": it remains susceptible to corpse tum'ah, since it can still hold and store objects, but it can no longer receive tum'at midras, because there is nothing left to sit upon.
"Nifhatah milmatah" - if it broke below, in the floor of the chest, there is a dispute. "Rabbi Meir metamei": Rabbi Meir holds it can still receive tum'at midras, since its upper surface is intact and a person can sit on it. It can no longer receive corpse tum'ah, though, because with a broken bottom it can no longer serve as a container to store things in.
"Vachachamim metaherin" - the Chachamim rule that it is tahor altogether, not even susceptible to tum'at midras. Their reasoning: "mipnei shebatlah ha'ikar batlah hatefeilah," once the primary function has fallen away, the secondary function falls away with it. Storage is what this chest was essentially built for, and sitting on it is only a secondary use that rides along with the primary one. Once the broken floor has stripped the chest of its main purpose, the subordinate purpose cannot stand on its own, and the chest is left with no susceptibility to tum'ah at all.