Commit Graph

81 Commits

Author SHA1 Message Date
Cameron McCormack
57f44ef17b Bug 1120300 - Export WritingModes.h as mozilla/WritingModes.h. r=jfkthame 2015-03-26 18:29:31 +11:00
Nicholas Nethercote
ee41df7dc2 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo. 2015-02-09 14:34:50 -08:00
Andrew McCreight
1ee96e7527 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote
0a02b5d31c Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo. 2015-02-04 20:05:36 -08:00
Jonathan Kew
f41b80ee58 Bug 1111525 - Remove unused lineFlags returned by nsILineIterator. r=roc 2014-12-19 14:55:30 +00:00
Jonathan Kew
c62bf329cd Bug 1111517 - Use new method UpdateLineContainerWidth instead of SlideLine when finalizing the width of a vertical-rl block. r=smontagu 2014-12-16 09:45:41 +00:00
Jonathan Kew
ad52f329e8 Bug 1077515 - part 3 - Change desiredX (nscoord) to desiredPos (nsPoint) in nsPeekOffsetStruct, to support maintaining either vertical or horizontal position on inter-line moves. r=roc 2014-11-22 14:39:03 +00:00
Simon Montagu
64e7db84ac Bug 789096 patch 8: use logical coordinates in nsBlockReflowState. r=jfkthame 2014-06-20 02:55:35 -07:00
Ehsan Akhgari
164e703836 Bug 491863 - Remove IBMBIDI; r=roc 2014-04-23 21:15:29 -04:00
Simon Montagu
f84bfb284b Make nsLineBox.mBounds a LogicalRect. Bug 789096, r=jfkthame 2014-04-16 01:03:28 -07:00
Mats Palmgren
5bd85e6c56 Bug 978443 - Rename NS_STYLE_CLEAR_LEFT_AND_RIGHT to NS_STYLE_CLEAR_BOTH. r=dholbert
Rename NS_STYLE_CLEAR_LEFT_AND_RIGHT to NS_STYLE_CLEAR_BOTH.  Also fix whitespace and remove unnecessary parens in a few places and enumerate the possible break types in an assertion so that it doesn't make assumptions on the actual property values.
2014-03-02 17:42:16 +00:00
Mats Palmgren
42841bae56 Bug 513110 - Adjust the maximum break type (only used in assertions) to reflect reality. r=dholbert 2014-03-01 10:36:39 +00:00
Timothy Nikkel
c323a2dea7 Bug 962443. Make layout frame tree dumping code work better for Fennec and b2g. r=mats 2014-01-26 16:07:02 -06:00
Mats Palmgren
1a854bc937 Bug 956447 - Make it possible to get frame dumps in non-DEBUG builds. r=roc 2014-01-05 23:31:14 +00:00
Ehsan Akhgari
27c999b3b4 Bug 921753 - Part 1: Avoid #including nsStyleStructInlines.h in nsIFrame.h; r=roc
This patch reduces the number of files that transitively #include
gfx/2d.h from 1782 to 1582.
2013-10-01 17:00:38 -04:00
Ehsan Akhgari
f56168072d Bug 907883 - Minimize #includes in layout/generic; r=roc
--HG--
extra : rebase_source : 5e87b764a12b05aff477c71547e2131be67ca93b
2013-08-22 14:32:52 -04:00
Ehsan Akhgari
085494b95d 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
Daniel Holbert
cdf2e95325 Bug 855841: Remove unused constants NS_STYLE_CLEAR_BLOCK, NS_STYLE_CLEAR_COLUMN, NS_STYLE_CLEAR_PAGE. r=mats r=fantasai 2013-05-02 16:01:11 -07:00
Mats Palmgren
cd2a9144a4 Bug 866785 - Move repeated nsIFrame::List implementations code to a new method, ListGeneric, for re-use. Cleanup and improve the code a bit. r=roc
Specifically:
* move all the frame dump methods to nsIFrame. Especially nsFrame::ListTag
  was annoying, often requiring a cast to nsFrame*.
* print common values in the same order for all types of frames
* print fluid continuations as "next-in-flow=%p" and non-fluid as
  "next-continuation=%p" (as before)
* print the style-context more compactly, e.g.
  "[sc=0x7faa6b60e0a0] pst=:first-line" becomes
  "[sc=0x7faa6b60e0a0:first-line]"
* suppress printing visual/scroll-overflow rects when they are identical
  to mRect and do the same for nsLineBox::List where it was especially
  hard to see which lines actually had real overflow
* fix a bug that printed the child list name at the far right when the
  principal list was empty (making it hard to see)
* print the address of child lists (other than the principal list) to
  help debug frame list property bugs
* s/NS_IMETHODIMP/void/
2013-04-30 20:38:52 +02:00
Daniel Holbert
66fc6d2dbc Bug 855850: Use MOZ_STATIC_ASSERT instead of #if, to verify that "break type" values are representable in 4 bits. r=mats 2013-03-28 16:27:31 -07:00
L. David Baron
7c9e487c8c Bug 809533, patch 2: Don't null-check inside NS_New*Frame. r=roc 2012-11-07 11:55:53 -08:00
Jacek Szpot
bea8356b2c Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan 2012-10-26 15:32:10 +02:00
Robert O'Callahan
94b052ee0c Bug 786740. When destroying all the frames in a line list, keep the line list and frame list valid at each step in case someone tries to walk the frame tree during frame destruction. r=mats
--HG--
extra : rebase_source : 7045daffc35fdaca02a74caa52a93a270c94cf74
2012-10-15 14:34:23 +13:00
Ehsan Akhgari
1b5ab09074 Remove some unused variables, no bug 2012-10-11 09:19:35 -04:00
Daniel Holbert
6275701898 Bug 799199: Use IndentBy() instead of looped "fputs" in nsHTMLFramesetBlankFrame's and nsLineBox's List() methods. r=bz 2012-10-08 13:06:04 -07:00
Chris Lord
2e05174430 Bug 788202 - Add optional subdocument traversal to nsIFrame::List. r=bz
Add subdocument frame traversal to nsIFrame::List, controlled via an optional
flag.
2012-09-19 15:36:35 +01:00
Chris Lord
47481277ba Backout bug 788202 for build failures. 2012-09-19 14:05:26 +01:00
Chris Lord
2e7ad14aa1 Bug 788202 - Add optional subdocument traversal to nsIFrame::List. r=bz
Add subdocument frame traversal to nsIFrame::List, controlled via an optional
flag.
2012-09-19 12:39:53 +01:00
Ehsan Akhgari
8c296bbcd4 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

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 "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Cameron McCormack
45a49ac210 Bug 655877 - Part 16: Treat all values of display other than 'none' as 'inline' in SVG text frames. r=roc 2012-08-02 21:38:51 +10:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Mats Palmgren
dbb5859abd Bug 750745 - Allocate nsLineBoxes from their own presshell arena list. part=3/3 r=roc 2012-05-04 02:14:02 +02:00
Mats Palmgren
b0ca471a79 Bug 730769 - Make nsLineBox use a frame hash table for lines with many frames. part=2/2 r=bz 2012-03-11 03:32:27 +01:00
Mats Palmgren
e446a70a30 Bug 728908 - Make nsLineBox::LastChild() DEBUG-only, since it's not used anymore to find the last frame of a line. part 2/2 r=bz 2012-03-08 02:57:37 +01:00
Boris Zbarsky
d2943d1fbf Merge backout of bug 641341. 2011-11-07 00:27:17 -05:00
Boris Zbarsky
2cd4ac232f Backed out changeset 0cd9ed297f73 (bug 641341) to fix bug 696175. r=roc 2011-11-07 00:25:56 -05:00
Boris Zbarsky
5159a4843a Bug 641341. Speed up CalculateHypotheticalBox for the case of a block containing a bunch of lines but absolutely no in-flows anywhere. r=roc 2011-10-04 23:47:08 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Boris Zbarsky
f4f8fa2085 Bug 683952. Speed up iterating over the continuations of the frame when scrolling to it. r=roc 2011-09-06 22:57:46 -04:00
Phil Ringnalda
74787fa14f Back out fc945dec50bb and de06684dabc4 (bug 642551), 64c328251a24 (bug 683952) and 9d0d13998ebb (bug 684544) for orange on a CLOSED TREE 2011-09-06 21:42:54 -07:00
Boris Zbarsky
5ee508215f Bug 683952. Speed up iterating over the continuations of the frame when scrolling to it. r=roc 2011-09-06 22:57:46 -04:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Simon Montagu
672d772074 Make all nsBidiPresUtils methods static. Bug 624798, r=roc 2011-04-13 12:23:49 +03:00
Craig Topper
43c8429d0c Bug 654369 - Part 9: Remove OOM checks from layout/generic r=bz
--HG--
extra : rebase_source : b828e73151ceb8cb59e1d8f7c0671dc88397057c
2011-04-28 22:02:16 -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
Daniel Holbert
e142472f0a Bug 651229: Remove unused variable from nsLineBox. r=smontagu 2011-04-21 10:08:05 -07:00
Robert O'Callahan
c957ae039e Bug 641426. Part 5: Avoid operator== where possible to distinguish between 'equal edges' and 'equal areas' for rectangles. r=dbaron,sr=cjones 2011-04-19 15:07:23 +12:00
Simon Montagu
8ade1e195e Make all nsBidiPresUtils methods static. Bug 624798, r=roc 2011-04-13 12:23:49 +03:00
L. David Baron
178a968ed2 Make nsLineBox track two separate overflow areas. (Bug 542595, patch 6) r=roc a2.0=blocking2.0:beta8 2010-10-06 21:25:45 -07:00