Commit 9ac278df authored by L. David Baron's avatar L. David Baron
Browse files

nsCSSDeclaration::ValueAppended is never called on shorthands, so it doesn't...

nsCSSDeclaration::ValueAppended is never called on shorthands, so it doesn't need code to handle them.  (Bug 481594)  r+sr=bzbarsky
parent 8bdcbd0b
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -94,16 +94,11 @@ nsCSSDeclaration::~nsCSSDeclaration(void)
nsresult
nsCSSDeclaration::ValueAppended(nsCSSProperty aProperty)
{
  NS_ABORT_IF_FALSE(!nsCSSProps::IsShorthand(aProperty),
                    "shorthands forbidden");
  // order IS important for CSS, so remove and add to the end
  if (nsCSSProps::IsShorthand(aProperty)) {
    CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aProperty) {
      mOrder.RemoveElement(*p);
      mOrder.AppendElement(*p);
    }
  } else {
  mOrder.RemoveElement(aProperty);
  mOrder.AppendElement(aProperty);
  }
  return NS_OK;
}

+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ public:
  /**
   * |ValueAppended| must be called to maintain this declaration's
   * |mOrder| whenever a property is parsed into an expanded data block
   * for this declaration.
   * for this declaration.  aProperty must not be a shorthand.
   */
  nsresult ValueAppended(nsCSSProperty aProperty);