mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #17447 - emilio:root-disconnected-subtree, r=heycam,Manishearth
style: Be more strict when setting the root font size. Before this commit, we assumed that if the element had no parent element, it was the root of the document, which is plain false, since we can arrive there from, let's say, getComputedStyle on a detached node. Bug: 1374062 Reviewed-By: heycam MozReview-Commit-ID: 65DxdzXgd0J <!-- 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/17447) <!-- Reviewable:end -->
This commit is contained in:
commit
7d785e75cd
16 changed files with 78 additions and 59 deletions
|
@ -1546,7 +1546,7 @@ pub extern "C" fn Servo_ComputedValues_Inherit(
|
|||
StyleBuilder::for_inheritance(reference,
|
||||
&data.default_computed_values());
|
||||
if for_text {
|
||||
StyleAdjuster::new(&mut style, /* is_root = */ false)
|
||||
StyleAdjuster::new(&mut style)
|
||||
.adjust_for_text();
|
||||
}
|
||||
|
||||
|
@ -1608,8 +1608,8 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) {
|
|||
pub extern "C" fn Servo_StyleSet_CompatModeChanged(raw_data: RawServoStyleSetBorrowed) {
|
||||
let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
|
||||
let quirks_mode = unsafe {
|
||||
(*(*data.stylist.device().pres_context).mDocument
|
||||
.raw::<nsIDocument>()).mCompatMode
|
||||
(*data.stylist.device().pres_context().mDocument.raw::<nsIDocument>())
|
||||
.mCompatMode
|
||||
};
|
||||
|
||||
data.stylist.set_quirks_mode(quirks_mode.into());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue