Commit Graph

45 Commits

Author SHA1 Message Date
Ehsan Akhgari
5ee21d6d3f Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Mats Palmgren
b6c309ad4c Bug 856243 - Add missing do_QueryFrame support and fix typo that caused most MathML frames to not QueryFrame to nsIMathMLFrame. Add static assertions to prevent those kinds of errors in the future. r=dholbert 2013-04-04 01:35:07 +02:00
Mats Palmgren
5a7645d0da Backout 5104a8653170 (bug 856243). r=me 2013-04-01 19:10:37 +02:00
Mats Palmgren
21f60f38dd Bug 856243 - Add missing do_QueryFrame support. r=dholbert 2013-04-01 18:45:19 +02:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Nathan Froyd
241a5a94c5 Bug 674922 - make frame id lists reusable by other parts of the browser; r=roc 2012-06-05 11:10:28 -04:00
Vincent LAMOTTE
bcc3cf4e81 Bug 657953 (1/2) - Implement the layout part of the meter element. r=roc 2012-05-16 17:47:10 +02:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Mats Palmgren
59250ec053 Bug 750745 - Introduce AllocateByObjectID/FreeByObjectID for allocating non-frame objects from per-type lists in the PresArena. part=2/3 r=roc 2012-05-04 02:14:02 +02:00
Ehren Metcalfe
c449b4f621 Bug 738957 - Remove the nsMathMLForeignFrameWrapper class and related files. r=karlt 2012-03-26 09:59:54 +02:00
Mats Palmgren
9cc6cc3865 Bug 515530 - Remove nsHTMLContainerFrame. r=roc 2011-12-27 21:18:48 +01:00
Robert Longson
581866451b Bug 696078 - Move filter attribute processing to frame classes. r=jwatt
--HG--
rename : layout/svg/base/src/nsSVGLeafFrame.cpp => layout/svg/base/src/SVGFELeafFrame.cpp
extra : rebase_source : 74ac4d84da2f0a99272e83590a9adc1dc8511fce
2011-11-19 17:53:52 +00:00
Ehsan Akhgari
b273fc68d8 Bug 10209 - Part 2: Implement the absolute positioning support for all frames; r=roc 2011-04-29 19:02:33 -04:00
Jonas Sicking
d4380b0d71 Bug 664061: Remove isindex code from layout. r=dbaron 2011-07-19 17:22:01 -07:00
Neil Deakin
f6bd0911ea Bug 670148, remove nsIScrollbarFrame, r=roc 2011-07-11 10:05:09 -04:00
Ehsan Akhgari
c4436101c8 Back out bug 10209 and bug 656875 (its regression fix) from Aurora because the work on this bug has not been finished yet
--HG--
extra : transplant_source : t%9F%EB%2Aa%A4%C0%9Ab%A5%DDQ%3EMD%5E%01h%E7%2A
2011-06-01 16:18:15 -04:00
Simon Montagu
b202223ff2 Bug 263359 part 1.5: remove nsDirectionalFrame. r=roc 2011-04-11 10:59:30 +03:00
Mounir Lamouri
f412df2050 Bug 567872 - Layout part of the progress element. r=roc,dbaron 2011-05-10 14:59:07 +02:00
Shawn Wilsher
259bae0699 Back out bug 514437, bug 567872, bug 568825, bug 633209, bug 633913, bug 634086, bug 634088, bug 634549, bug 634551, bug 638176, bug 641517, bug 641905, bug 641942, bug 642127, and bug 642667 to undo the performance regression tracked by bug 655860. 2011-05-09 15:48:39 -07:00
Mounir Lamouri
dc2475b233 Bug 567872 - Layout part of the progress element. r=roc,dbaron 2011-05-07 10:15:14 +02:00
Ehsan Akhgari
e4c89e2e5d Bug 10209 - Part 2: Implement the absolute positioning support for all frames; r=roc 2011-04-29 19:02:33 -04:00
Craig Topper
424eee8dac Bug 648885 - Part 2: Remove nsIImageFrame. r=roc
--HG--
extra : rebase_source : 3097ee732ab2ba3b7a79253f7f71c09eed22d033
2011-04-25 23:52:19 -07:00
Simon Montagu
ece92e21ce Back out bug 263359 and bug 624798 because of performance regressions (bug 650189) 2011-04-27 11:47:18 +03:00
Simon Montagu
d34ed4f099 Bug 263359 part 1.5: remove nsDirectionalFrame. r=roc 2011-04-11 10:59:30 +03:00
Ehsan Akhgari
ec23591598 Back out bug 263359 because it has caused bug 645119 2011-03-25 18:15:29 -04:00
Simon Montagu
9914a030ec Bug 263359 part 1.5: remove nsDirectionalFrame. 2011-03-24 11:28:44 +02:00
Ms2ger
a2c049c1fc Bug 531030 - Remove support for the spacer element; r=bzbarsky a=blocking-betaN 2010-08-20 08:05:05 +02:00
Craig Topper
fec95b227d Remove QueryFrame support for nsICSSPseudoComparator. (Bug 576794) r=bzbarsky a2.0=bsmedberg 2010-07-30 16:48:57 -07:00
Frederic Wang
9460a70cb6 Bug 556767 - (semantics) Improve/Complete implementation of <semantics/>. r=roc 2010-05-12 12:11:59 +02:00
Zack Weinberg
7fd5fe000b Bug 345681: Remove the vestigial nsICheckboxControlFrame and nsIRadioControlFrame interfaces. r=roc 2010-02-09 14:06:37 -08:00
Timothy Nikkel
375930c3f5 Bug 488771. Stop nsIScrollPositionListener from inheriting from nsISupports. r=roc
--HG--
extra : rebase_source : bb93c56b3347bc8df7fd843f08e2d5dfc4f3071b
2010-01-28 18:03:42 -06:00
Robert O'Callahan
a923083da5 Bug 526394. Part 18: Remove nsIScrollableViewProvider and its implementations, now that we've removed all its users. r=mats 2009-09-09 17:40:01 +12:00
Timothy Nikkel
5321e14840 Bug 520425. (nsI)CanvasFrame related cleanup. r=roc
--HG--
rename : layout/generic/nsHTMLFrame.cpp => layout/generic/nsCanvasFrame.cpp
rename : layout/generic/nsHTMLFrame.h => layout/generic/nsCanvasFrame.h
extra : rebase_source : 4fa62ac7dee06bbdad394eae1ce6aba82853a410
2009-10-08 01:18:18 -05:00
Zack Weinberg
1bbb6caf46 Bug 497495 (frame poisoning) part 4: Change nsPresArena to maintain separate free lists for every frame class, based on its FrameIID. Pass the necessary information in from AllocateFrame and FreeFrame. r=roc sr=dbaron 2009-09-16 10:00:04 +12:00
Justin Dolske
f221ae86bd Backed out changeset a3f33def2dca (bug 497495 part 4) 2009-09-14 17:26:08 -07:00
Boris Zbarsky
efc26f0c70 Bug 497495 (frame poisoning) part 4: Change nsPresArena to maintain separate free lists for every frame class, based on its FrameIID. Pass the necessary information in from AllocateFrame and FreeFrame. r=roc sr=dbaron 2009-09-14 17:29:56 -04:00
Zack Weinberg
17eb5a6efc Bug 497495 part 3: Add methods to every nsFrame subclass that expose the as-allocated identity of every frame object. Also some cleanups to the QueryFrame implementation. r=dbaron sr=roc 2009-09-12 17:49:24 +01:00
Robert O'Callahan
75dc1beb9c Backed out changeset e2927bb26412 2009-08-26 14:49:18 -07:00
Zack Weinberg
18c763f2c5 Bug 497495 part 3a: rationalize the queryframe-implementation macro naming scheme, restructure the implementation to detect duplicate entries, and a couple fixes to the frame ID enumeration. r=dbaron sr=roc
Bug 497495 part 3b: update users of queryframe macros (strictly mechanical change). r=dbaron

--HG--
extra : rebase_source : ee672a17934227b408b83dc6b5cc4e4909652f72
2009-08-26 09:27:42 -07:00
Zack Weinberg
2cd31f70f9 Bug 510651: Fold nsIFrameDebug into nsFrame. r=dbaron sr=mrbkap 2009-08-20 14:52:48 -07:00
Arpad Borsos
be212f351c Bug 495296 - kill nsISVGTextContentMetrics; r+sr=roc 2009-05-29 12:15:40 +02:00
Craig Topper
77f45c4dcd Bug 474954. No frames need to implement nsISVGValue anymore. r+sr=roc
--HG--
extra : rebase_source : edd574369880b1745f0d5c33277fbcd5e5318dd3
2009-01-30 20:17:29 +13:00
Benjamin Smedberg
24e7cb1f78 Bug 396185 - Make nsIFrame derivatives and helper abstract classes use a different dynamic-cast system than nsISupports:
* we know all types frames may be cast to at compile time, so instead of extensible GUID IIDs, use a big enum (see nsQueryFrame::FrameIID)
* eliminate all vestiges of refcounting, since frames aren't refcounted

Some frames (SVG frames in particular) still implement nsISupports-derived interfaces, for example nsISVGValue. There is a FrameIID for nsISVGValue that lets you go from a frame to the XPCOM interface, but you can't query back.

r+sr=roc

nsITextControlFrame didn't have an IID the first time around, but this wasn't a compile error because nsITextControlFrame::kFrameIID inherited from nsIFormControlFrame::kFrameIID. I've added a static analysis pass to verify the correct behavior, since I can't figure out a way to make the compiler do it.

--HG--
extra : rebase_source : 4894a2ca0278e2ab92f27459db77165f8348cf41
2009-01-12 14:20:59 -05:00
Benjamin Smedberg
50621e4f9f Backed out changeset 4c4df6ed1b41 - Bug 396185 - Make nsIFrame not inherit from nsISupports due to mochitest failures... these appear to be crashes in nsGenericHTMLElement::GetEditorInternal. 2009-01-09 11:35:24 -05:00
Benjamin Smedberg
d0b948876f Bug 396185 - Make nsIFrame derivatives and helper abstract classes use a different dynamic-cast system than nsISupports:
* we know all types frames may be cast to at compile time, so instead of extensible GUID IIDs, use a big enum (see nsQueryFrame::FrameIID)
* eliminate all vestiges of refcounting, since frames aren't refcounted

Some frames (SVG frames in particular) still implement nsISupports-derived interfaces, for example nsISVGValue. There is a FrameIID for nsISVGValue that lets you go from a frame to the XPCOM interface, but you can't query back.

r+sr=roc

This patch locally causes two REFTEST-UNEXPECTED-PASS for Bidi stuff. It's possible that I accidentally fixed a bug, but I'm not sure, so I'm going to wait for the tinderboxes to confirm my local results.
2008-11-05 14:25:30 -05:00