mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Backed out changeset 4af3a83487c7 (bug 1804772) for causing build bustages at nsCSSFrameConstructor.cpp. CLOSED TREE
This commit is contained in:
parent
11a4da715e
commit
d2cbc72bd6
@ -8095,23 +8095,6 @@ nsIFrame* nsCSSFrameConstructor::CreateContinuingFrame(
|
||||
// aFrame cannot be a dynamic reflow root because it has a continuation now.
|
||||
aFrame->RemoveStateBits(NS_FRAME_DYNAMIC_REFLOW_ROOT);
|
||||
|
||||
// XXXalaskanemily: This avoids linear-time FirstContinuation lookups during
|
||||
// paginated reflow, but there are a lot of smarter ways to manage this. We
|
||||
// might also want to share the struct (refcount or some guarantee the struct
|
||||
// will remain valid during reflow).
|
||||
if (nsIFrame::PageValues* pageValues =
|
||||
aFrame->GetProperty(nsIFrame::PageValuesProperty())) {
|
||||
// It is possible that both values of a PageValues struct can be
|
||||
// overwritten with null. If that's the case, then as a minor optimization
|
||||
// we don't need to create a copy of the struct since this property being
|
||||
// missing is equivalent to having null start/end values.
|
||||
if (pageValues->mStartPageValue || pageValues->mEndPageValue) {
|
||||
nsIFrame::PageValues* const newPageValues =
|
||||
new nsIFrame::PageValues(*pageValues);
|
||||
newFrame->SetProperty(nsIFrame::PageValuesProperty(), newPageValues);
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!newFrame->GetNextSibling(), "unexpected sibling");
|
||||
return newFrame;
|
||||
}
|
||||
|
@ -1301,8 +1301,6 @@ class nsIFrame : public nsQueryFrame {
|
||||
// frame construction, we insert page breaks when we begin a new page box and
|
||||
// the previous page box had a different name.
|
||||
struct PageValues {
|
||||
PageValues() = default;
|
||||
PageValues(const PageValues& other) = default;
|
||||
// A value of null indicates that the value is equal to what auto resolves
|
||||
// to for this frame.
|
||||
RefPtr<const nsAtom> mStartPageValue = nullptr;
|
||||
@ -1311,14 +1309,16 @@ class nsIFrame : public nsQueryFrame {
|
||||
NS_DECLARE_FRAME_PROPERTY_DELETABLE(PageValuesProperty, PageValues)
|
||||
|
||||
const nsAtom* GetStartPageValue() const {
|
||||
if (const PageValues* const values = GetProperty(PageValuesProperty())) {
|
||||
if (const PageValues* const values =
|
||||
FirstInFlow()->GetProperty(PageValuesProperty())) {
|
||||
return values->mStartPageValue;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const nsAtom* GetEndPageValue() const {
|
||||
if (const PageValues* const values = GetProperty(PageValuesProperty())) {
|
||||
if (const PageValues* const values =
|
||||
FirstInFlow()->GetProperty(PageValuesProperty())) {
|
||||
return values->mEndPageValue;
|
||||
}
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user