зеркало из https://github.com/mozilla/gecko-dev.git
Bug 739972 - Stop using GetChildAt in svg layout code. r=dholbert
This commit is contained in:
Родитель
c3c6b8c99e
Коммит
bf6be5e14a
|
@ -303,9 +303,9 @@ nsSVGFilterFrame::GetLengthValue(PRUint32 aIndex, nsIContent *aDefault)
|
|||
const nsSVGFilterElement *
|
||||
nsSVGFilterFrame::GetFilterContent(nsIContent *aDefault)
|
||||
{
|
||||
PRUint32 count = mContent->GetChildCount();
|
||||
for (PRUint32 i = 0; i < count; ++i) {
|
||||
nsIContent* child = mContent->GetChildAt(i);
|
||||
for (nsIContent* child = mContent->GetFirstChild();
|
||||
child;
|
||||
child = child->GetNextSibling()) {
|
||||
nsRefPtr<nsSVGFE> primitive;
|
||||
CallQueryInterface(child, (nsSVGFE**)getter_AddRefs(primitive));
|
||||
if (primitive) {
|
||||
|
|
|
@ -199,10 +199,9 @@ nsSVGFilterInstance::BuildPrimitives()
|
|||
{
|
||||
// First build mFilterInfo. It's important that we don't change that
|
||||
// array after we start storing pointers to its elements!
|
||||
PRUint32 count = mFilterElement->GetChildCount();
|
||||
PRUint32 i;
|
||||
for (i = 0; i < count; ++i) {
|
||||
nsIContent* child = mFilterElement->GetChildAt(i);
|
||||
for (nsIContent* child = mFilterElement->nsINode::GetFirstChild();
|
||||
child;
|
||||
child = child->GetNextSibling()) {
|
||||
nsRefPtr<nsSVGFE> primitive;
|
||||
CallQueryInterface(child, (nsSVGFE**)getter_AddRefs(primitive));
|
||||
if (!primitive)
|
||||
|
@ -216,7 +215,7 @@ nsSVGFilterInstance::BuildPrimitives()
|
|||
nsTHashtable<ImageAnalysisEntry> imageTable;
|
||||
imageTable.Init(10);
|
||||
|
||||
for (i = 0; i < mPrimitives.Length(); ++i) {
|
||||
for (PRUint32 i = 0; i < mPrimitives.Length(); ++i) {
|
||||
PrimitiveInfo* info = &mPrimitives[i];
|
||||
nsSVGFE* filter = info->mFE;
|
||||
nsAutoTArray<nsSVGStringInfo,2> sources;
|
||||
|
|
Загрузка…
Ссылка в новой задаче