aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko/traversal.rs
diff options
context:
space:
mode:
authorDelan Azabani <dazabani@igalia.com>2024-02-27 23:39:06 +0800
committerGitHub <noreply@github.com>2024-02-27 15:39:06 +0000
commitfaf754dfa655f0b9a28f62bc47a78fbf78ebcaf4 (patch)
tree4725e1446680d036797b1fc258733ae6b2c9f354 /components/style/gecko/traversal.rs
parentb07505417e629bbb081be9683630f2d7a5f50544 (diff)
downloadservo-faf754dfa655f0b9a28f62bc47a78fbf78ebcaf4.tar.gz
servo-faf754dfa655f0b9a28f62bc47a78fbf78ebcaf4.zip
Move Stylo to its own repo (#31350)
* Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
Diffstat (limited to 'components/style/gecko/traversal.rs')
-rw-r--r--components/style/gecko/traversal.rs53
1 files changed, 0 insertions, 53 deletions
diff --git a/components/style/gecko/traversal.rs b/components/style/gecko/traversal.rs
deleted file mode 100644
index 71d1a2f949b..00000000000
--- a/components/style/gecko/traversal.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-//! Gecko-specific bits for the styling DOM traversal.
-
-use crate::context::{SharedStyleContext, StyleContext};
-use crate::dom::{TElement, TNode};
-use crate::gecko::wrapper::{GeckoElement, GeckoNode};
-use crate::traversal::{recalc_style_at, DomTraversal, PerLevelTraversalData};
-
-/// This is the simple struct that Gecko uses to encapsulate a DOM traversal for
-/// styling.
-pub struct RecalcStyleOnly<'a> {
- shared: SharedStyleContext<'a>,
-}
-
-impl<'a> RecalcStyleOnly<'a> {
- /// Create a `RecalcStyleOnly` traversal from a `SharedStyleContext`.
- pub fn new(shared: SharedStyleContext<'a>) -> Self {
- RecalcStyleOnly { shared: shared }
- }
-}
-
-impl<'recalc, 'le> DomTraversal<GeckoElement<'le>> for RecalcStyleOnly<'recalc> {
- fn process_preorder<F>(
- &self,
- traversal_data: &PerLevelTraversalData,
- context: &mut StyleContext<GeckoElement<'le>>,
- node: GeckoNode<'le>,
- note_child: F,
- ) where
- F: FnMut(GeckoNode<'le>),
- {
- if let Some(el) = node.as_element() {
- let mut data = unsafe { el.ensure_data() };
- recalc_style_at(self, traversal_data, context, el, &mut data, note_child);
- }
- }
-
- fn process_postorder(&self, _: &mut StyleContext<GeckoElement<'le>>, _: GeckoNode<'le>) {
- unreachable!();
- }
-
- /// We don't use the post-order traversal for anything.
- fn needs_postorder_traversal() -> bool {
- false
- }
-
- fn shared_context(&self) -> &SharedStyleContext {
- &self.shared
- }
-}