mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #14801 - emilio:no-missing-docs, r=mbrubeck,Manishearth,Wafflespeanut
style: Document and force documentation in a big chunk of the style crate. Style no forced docs for the properties code and similar, but I ran out of time, and I think it's a nice improvement. I'd appreciate a fast-ish turn-around time because this is pretty much prone to bitrot. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14801) <!-- Reviewable:end -->
This commit is contained in:
commit
bd67163438
44 changed files with 1216 additions and 462 deletions
|
@ -88,7 +88,7 @@ pub fn update_animation_state(constellation_chan: &IpcSender<ConstellationMsg>,
|
|||
if let Animation::Transition(_, unsafe_node, _, ref frame, _) = running_animation {
|
||||
script_chan.send(ConstellationControlMsg::TransitionEnd(unsafe_node,
|
||||
frame.property_animation
|
||||
.property_name(),
|
||||
.property_name().into(),
|
||||
frame.duration))
|
||||
.unwrap();
|
||||
}
|
||||
|
|
|
@ -2005,7 +2005,7 @@ impl Fragment {
|
|||
}
|
||||
// See CSS 2.1 § 10.8.1.
|
||||
let font_metrics = text::font_metrics_for_style(&mut layout_context.font_context(),
|
||||
self.style.get_font_arc());
|
||||
self.style.clone_font());
|
||||
let line_height = text::line_height_from_style(&*self.style, &font_metrics);
|
||||
InlineMetrics::from_font_metrics(&info.run.font_metrics, line_height)
|
||||
}
|
||||
|
@ -2085,7 +2085,7 @@ impl Fragment {
|
|||
vertical_align::T::middle => {
|
||||
let font_metrics =
|
||||
text::font_metrics_for_style(&mut layout_context.font_context(),
|
||||
style.get_font_arc());
|
||||
style.clone_font());
|
||||
offset += (content_inline_metrics.ascent -
|
||||
content_inline_metrics.space_below_baseline -
|
||||
font_metrics.x_height).scale_by(0.5)
|
||||
|
|
|
@ -1089,7 +1089,7 @@ impl InlineFlow {
|
|||
return LineMetrics::new(Au(0), Au(0))
|
||||
}
|
||||
|
||||
let font_style = style.get_font_arc();
|
||||
let font_style = style.clone_font();
|
||||
let font_metrics = text::font_metrics_for_style(font_context, font_style);
|
||||
let line_height = text::line_height_from_style(style, &font_metrics);
|
||||
let inline_metrics = InlineMetrics::from_font_metrics(&font_metrics, line_height);
|
||||
|
@ -1112,7 +1112,7 @@ impl InlineFlow {
|
|||
for inline_context in fragments.iter()
|
||||
.filter_map(|fragment| fragment.inline_context.as_ref()) {
|
||||
for node in &inline_context.nodes {
|
||||
let font_style = node.style.get_font_arc();
|
||||
let font_style = node.style.clone_font();
|
||||
let font_metrics = text::font_metrics_for_style(font_context, font_style);
|
||||
let line_height = text::line_height_from_style(&*node.style, &font_metrics);
|
||||
let inline_metrics = InlineMetrics::from_font_metrics(&font_metrics, line_height);
|
||||
|
|
|
@ -154,7 +154,7 @@ impl TextRunScanner {
|
|||
let word_break;
|
||||
{
|
||||
let in_fragment = self.clump.front().unwrap();
|
||||
let font_style = in_fragment.style().get_font_arc();
|
||||
let font_style = in_fragment.style().clone_font();
|
||||
let inherited_text_style = in_fragment.style().get_inheritedtext();
|
||||
fontgroup = font_context.layout_font_group_for_style(font_style);
|
||||
compression = match in_fragment.white_space() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue