Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement CanvasRenderingContext2D.font property #26176

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Add new layout QueryMsg::CanvasFontQuery

  • Loading branch information
pylbrecht committed May 11, 2020
commit 5098b267f6c2916797b1163104f21bba44f8111c
@@ -1255,6 +1255,9 @@ impl LayoutThread {
&QueryMsg::InnerWindowDimensionsQuery(_) => {
rw_data.inner_window_dimensions_response = None;
},
&QueryMsg::CanvasFontQuery(..) => {
unimplemented!();
},
},
ReflowGoal::Full | ReflowGoal::TickAnimations => {},
}
@@ -1597,6 +1600,9 @@ impl LayoutThread {
.get(&browsing_context_id)
.cloned();
},
&QueryMsg::CanvasFontQuery(_node, ref _font) => {
unimplemented!();
},
},
ReflowGoal::Full | ReflowGoal::TickAnimations => {},
}
@@ -2460,6 +2460,7 @@ fn debug_reflow_events(id: PipelineId, reflow_goal: &ReflowGoal, reason: &Reflow
&QueryMsg::TextIndexQuery(..) => "\tTextIndexQuery",
&QueryMsg::ElementInnerTextQuery(_) => "\tElementInnerTextQuery",
&QueryMsg::InnerWindowDimensionsQuery(_) => "\tInnerWindowDimensionsQuery",
&QueryMsg::CanvasFontQuery(..) => "\tCanvasFontQuery",
},
};

@@ -107,6 +107,7 @@ pub enum QueryMsg {
OffsetParentQuery(OpaqueNode),
TextIndexQuery(OpaqueNode, Point2D<f32>),
NodesFromPointQuery(Point2D<f32>, NodesFromPointQueryType),
CanvasFontQuery(OpaqueNode, String),

// FIXME(nox): The following queries use the TrustedNodeAddress to
// access actual DOM nodes, but those values can be constructed from
@@ -144,6 +145,7 @@ impl ReflowGoal {
QueryMsg::NodeScrollIdQuery(_) |
QueryMsg::ResolvedStyleQuery(..) |
QueryMsg::OffsetParentQuery(_) |
QueryMsg::CanvasFontQuery(..) |
QueryMsg::StyleQuery => false,
},
}
@@ -166,6 +168,7 @@ impl ReflowGoal {
QueryMsg::ResolvedStyleQuery(..) |
QueryMsg::OffsetParentQuery(_) |
QueryMsg::InnerWindowDimensionsQuery(_) |
QueryMsg::CanvasFontQuery(..) |
QueryMsg::StyleQuery => false,
},
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.