зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #16285 - layout: Use the margin box of an inline block when computing the inline size (from stshine:inline-block-margin); r=emilio
<!-- Please describe your changes on the following line: --> When computing the inline size of an inline block in inline formating context, use the margin box of the underling block. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12413 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 4013e9d7a0be666343ef9d806408af5c0a852d91 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : a3e0b41862e06b9bc419207ea74be4ba5edcaa11
This commit is contained in:
Родитель
6d54a87bb1
Коммит
eab8ab133d
|
@ -2380,10 +2380,7 @@ impl Fragment {
|
||||||
pub fn update_late_computed_replaced_inline_size_if_necessary(&mut self) {
|
pub fn update_late_computed_replaced_inline_size_if_necessary(&mut self) {
|
||||||
if let SpecificFragmentInfo::InlineBlock(ref mut inline_block_info) = self.specific {
|
if let SpecificFragmentInfo::InlineBlock(ref mut inline_block_info) = self.specific {
|
||||||
let block_flow = FlowRef::deref_mut(&mut inline_block_info.flow_ref).as_block();
|
let block_flow = FlowRef::deref_mut(&mut inline_block_info.flow_ref).as_block();
|
||||||
let margin = block_flow.fragment.style.logical_margin();
|
self.border_box.size.inline = block_flow.fragment.margin_box_inline_size();
|
||||||
self.border_box.size.inline = block_flow.fragment.border_box.size.inline +
|
|
||||||
MaybeAuto::from_style(margin.inline_start, Au(0)).specified_or_zero() +
|
|
||||||
MaybeAuto::from_style(margin.inline_end, Au(0)).specified_or_zero()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче