mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Bug 1425769 - Base class for ShadowRoot and Document to manage style state
Tag #1375
This commit is contained in:
parent
9fdf69e567
commit
b8260c664a
16 changed files with 250 additions and 296 deletions
|
|
@ -20,19 +20,19 @@ template<typename T>
|
|||
size_t
|
||||
nsIDocument::FindDocStyleSheetInsertionPoint(
|
||||
const nsTArray<T>& aDocSheets,
|
||||
mozilla::StyleSheet* aSheet)
|
||||
const mozilla::StyleSheet& aSheet)
|
||||
{
|
||||
nsStyleSheetService* sheetService = nsStyleSheetService::GetInstance();
|
||||
|
||||
// lowest index first
|
||||
int32_t newDocIndex = GetIndexOfStyleSheet(aSheet);
|
||||
int32_t newDocIndex = IndexOfSheet(aSheet);
|
||||
|
||||
int32_t count = aDocSheets.Length();
|
||||
int32_t index;
|
||||
for (index = 0; index < count; index++) {
|
||||
mozilla::StyleSheet* sheet = static_cast<mozilla::StyleSheet*>(
|
||||
aDocSheets[index]);
|
||||
int32_t sheetDocIndex = GetIndexOfStyleSheet(sheet);
|
||||
size_t count = aDocSheets.Length();
|
||||
size_t index = 0;
|
||||
for (; index < count; index++) {
|
||||
auto* sheet = static_cast<mozilla::StyleSheet*>(aDocSheets[index]);
|
||||
MOZ_ASSERT(sheet);
|
||||
int32_t sheetDocIndex = IndexOfSheet(*sheet);
|
||||
if (sheetDocIndex > newDocIndex)
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue