mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1173958: convert FixedTableLayoutStrategy to logical coordinates, r=jfkthame (cf2c57043)
- Bug 1173958: whitespace and bracing changes to make FixedTableLayoutStrategy conform to local style, r=jfkthame (0ae378556)
- Bug 1177606 - Correct the row positioning within rowGroups in vertical-rl tables when distributing extra width. r=dholbert (1dffbe5a9)
- Bug 1173958 followup - A few of the tests have a pixel of fuzz on B2G. no_r=orange (314a9208f)
- Bug 1178059: fix a pair of failing reftests from bug 1173958 by forcing a div to align like a td, r=jfkthame (ec2284038)
- Bug 1165168 - Tests from Grard Talbot for border-spacing in vertical writing-modes. r=smontagu (2c3d82d75)
- Bug 1165172 - Tests from Grard Talbot for table row progression in vertical writing-modes. r=smontagu (965828bbe)
- Bug 1165172 followup - Mark tests as fuzzy on OS X in addition to Windows. (9f23dfb3d)
- Bug 1177076 patch 2.1 - Annotate vertical-table-specified-width-2.html because it will assert in FinishReflowChild() due to unconstrained containerWidth. r=dholbert (c43e77d31)
- Bug 1177076 patch 3 - Change the initial value of 'caption-side' from 'top' (physical) to 'block-start' (logical). r=heycam (336bb6726)
- Bug 1177076 - patch 4 - Reftests for logical and physical caption-side placement. r=dholbert (3323b59ed)
- Bug 1177076 followup - Some of the tests are a bit fuzzy on Android. (8fbec9908)
- Bug 1174631 (part 1) - Replace nsRuleNode's uses of PL_DHashTableEnumerate() with PLDHashTable::{,Removing}Iterator. r=dholbert. (265e5c39c)
- Bug 1174631 (part 2) - Replace nsCSSRuleProcessor's uses of PL_DHashTableEnumerate() with PLDHashTable::Iterator. r=dholbert. (583aa6dec)
- Bug 1174631 (part 3) - Replace SpanningCellSorter's uses of PL_DHashTableEnumerate() with PLDHashTable::Iterator. r=dholbert. (dffd16064)
- Bug 1174631 (part 4) - Replace nsFrameManager's uses of PL_DHashTableEnumerate() with PLDHashTable::Iterator. r=dholbert. (5eb697aec)
- Bug 1176159 (part 1) - Remove pref_SaveTypes. r=bsmedberg. (ad62e83d8)
- Bug 1176159 (part 2) - Remove uses of PL_DHashTableEnumerate() from libpref. r=bsmedberg. (dcc05f19a)
- Bug 1175771 (part 1) - Fix indentation in nsHostResolver::FlushCache(). r=michal. (fcfb05c57)
- Bug 1175771 (part 2) - Remove PL_DHashTableEnumerate() use from nsHostResolver. r=michal. (d79e95969)
- Bug 1175771 (part 3) - Replace nsCacheEntryHashable::VisitEntries() with iterators. r=michal. (f79745d9b)
- Bug 1175807 - Remove PL_DHashTableEnumerate() uses from nsNSSShutdown. r=honzab. (b88e91643)
- Bug 1179071 - Merge RemovingIterator into Iterator. r=froydnj. (fb22f5c91)
- Bug 1153426 - Don't crash when doing an off-main-thread animation of a transform to or from the 'none' value. r=birtles (23f9940e3)
This commit is contained in:
@@ -3435,30 +3435,6 @@ static int CompareWeightData(const void* aArg1, const void* aArg2,
|
||||
return arg1->mWeight - arg2->mWeight; // put lower weight first
|
||||
}
|
||||
|
||||
|
||||
struct FillWeightArrayData {
|
||||
explicit FillWeightArrayData(PerWeightData* aArrayData) :
|
||||
mIndex(0),
|
||||
mWeightArray(aArrayData)
|
||||
{
|
||||
}
|
||||
int32_t mIndex;
|
||||
PerWeightData* mWeightArray;
|
||||
};
|
||||
|
||||
|
||||
static PLDHashOperator
|
||||
FillWeightArray(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||
uint32_t number, void *arg)
|
||||
{
|
||||
FillWeightArrayData* data = static_cast<FillWeightArrayData*>(arg);
|
||||
const RuleByWeightEntry *entry = (const RuleByWeightEntry *)hdr;
|
||||
|
||||
data->mWeightArray[data->mIndex++] = entry->data;
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
RuleCascadeData*
|
||||
nsCSSRuleProcessor::GetRuleCascade(nsPresContext* aPresContext)
|
||||
{
|
||||
@@ -3525,8 +3501,11 @@ nsCSSRuleProcessor::RefreshRuleCascade(nsPresContext* aPresContext)
|
||||
// Sort the hash table of per-weight linked lists by weight.
|
||||
uint32_t weightCount = data.mRulesByWeight.EntryCount();
|
||||
nsAutoArrayPtr<PerWeightData> weightArray(new PerWeightData[weightCount]);
|
||||
FillWeightArrayData fwData(weightArray);
|
||||
PL_DHashTableEnumerate(&data.mRulesByWeight, FillWeightArray, &fwData);
|
||||
int32_t j = 0;
|
||||
for (auto iter = data.mRulesByWeight.Iter(); !iter.Done(); iter.Next()) {
|
||||
auto entry = static_cast<const RuleByWeightEntry*>(iter.Get());
|
||||
weightArray[j++] = entry->data;
|
||||
}
|
||||
NS_QuickSort(weightArray, weightCount, sizeof(PerWeightData),
|
||||
CompareWeightData, nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user