From 632c99676b15a810298cb8409b4c3878760e7b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 2 Jan 2017 04:56:18 +0100 Subject: [PATCH] style: Document Gecko's traversal code. Actually, I think most of the functions in DOMTraversalContext deserve a nice comment, but that's probably fine as a followup, I want to land the require-docs thing now. --- components/style/gecko/traversal.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/style/gecko/traversal.rs b/components/style/gecko/traversal.rs index 7f83fbe5426..13c9ddabddf 100644 --- a/components/style/gecko/traversal.rs +++ b/components/style/gecko/traversal.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +//! Gecko-specific bits for the styling DOM traversal. + use atomic_refcell::AtomicRefCell; use context::{SharedStyleContext, StyleContext, ThreadLocalStyleContext}; use data::ElementData; @@ -9,11 +11,14 @@ use dom::{NodeInfo, TNode}; use gecko::wrapper::{GeckoElement, GeckoNode}; use traversal::{DomTraversal, PerLevelTraversalData, recalc_style_at}; +/// This is the simple struct that Gecko uses to encapsulate a DOM traversal for +/// styling. pub struct RecalcStyleOnly { shared: SharedStyleContext, } impl RecalcStyleOnly { + /// Create a `RecalcStyleOnly` traversal from a `SharedStyleContext`. pub fn new(shared: SharedStyleContext) -> Self { RecalcStyleOnly { shared: shared,