mozilla/servo — pull request #1066 by Ms2ger (2013-10-15 17:47:07+00:00)
Title: Make Node.owner_doc private.

When `Document` is a `Node`, we can only set its `owner_doc` after creating the `AbstractDocument`, and thus the `Document`, and thus the `Node`; i.e., when creating the `Node`, the `AbstractDocument` can't exist yet. That means that we'll need to turn `owner_doc` back into an `Option`. We don't want to expose that to everyone, though, so this adds encapsulation so we'll be able to just `unwrap` in the `owner_doc()` function rather than at all call sites.