зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1867789 - Use the reference to a pointer to avoid recreating a new ImplicitNamedAreas in each iteration. r=emilio
I forgot to use a reference when doing the refactoring. We should use a reference to a pointer because we rely on the information from the previous iteration, in the private function, `AddImplicitNamedAreasInternal()`. Note: I don't have a test for this. This bug is from a real website: https://www.oddbird.net/tools/, and it's not easy to reduce the testcase, so we may need a QA to verify this by the real website. Differential Revision: https://phabricator.services.mozilla.com/D195388
This commit is contained in:
Родитель
747875e612
Коммит
4f701f918d
|
@ -3959,7 +3959,8 @@ nsContainerFrame* NS_NewGridContainerFrame(PresShell* aPresShell,
|
|||
}
|
||||
|
||||
void nsGridContainerFrame::AddImplicitNamedAreasInternal(
|
||||
LineNameList& aNameList, nsGridContainerFrame::ImplicitNamedAreas* aAreas) {
|
||||
LineNameList& aNameList,
|
||||
nsGridContainerFrame::ImplicitNamedAreas*& aAreas) {
|
||||
for (const auto& nameIdent : aNameList.AsSpan()) {
|
||||
nsAtom* name = nameIdent.AsAtom();
|
||||
uint32_t indexOfSuffix;
|
||||
|
|
|
@ -513,7 +513,7 @@ class nsGridContainerFrame final : public nsContainerFrame,
|
|||
|
||||
// The internal implementation for AddImplicitNamedAreas().
|
||||
void AddImplicitNamedAreasInternal(LineNameList& aNameList,
|
||||
ImplicitNamedAreas* aAreas);
|
||||
ImplicitNamedAreas*& aAreas);
|
||||
|
||||
/**
|
||||
* Cached values to optimize GetMinISize/GetPrefISize.
|
||||
|
|
Загрузка…
Ссылка в новой задаче