Bug 655877 - Part 32: Allow nsCharClipDisplayItems to be constructed without an nsDisplayListBuilder. r=roc
authorCameron McCormack <cam@mcc.id.au>
Wed, 08 Aug 2012 21:37:14 +1000
changeset 101815 5cd1bb53c262021846e607f6478591a3cfa06f2a
parent 101814 342718ea6734aa5c459adf4a1474a4a46eddd6a1
child 101816 9f477f32c157eb2818e0ad98c4c0157a87f3e3b1
push id23250
push useremorley@mozilla.com
push dateWed, 08 Aug 2012 16:23:03 +0000
treeherdermozilla-central@b99a81e70b06 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs655877
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 655877 - Part 32: Allow nsCharClipDisplayItems to be constructed without an nsDisplayListBuilder. r=roc
layout/base/nsDisplayList.h
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -2423,16 +2423,19 @@ private:
  * The values must be non-negative.
  * The default value for both edges is zero, which means everything is painted.
  */
 class nsCharClipDisplayItem : public nsDisplayItem {
 public:
   nsCharClipDisplayItem(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
     : nsDisplayItem(aBuilder, aFrame), mLeftEdge(0), mRightEdge(0) {}
 
+  nsCharClipDisplayItem(nsIFrame* aFrame)
+    : nsDisplayItem(nsnull, aFrame, nsPoint()) {}
+
   struct ClipEdges {
     ClipEdges(const nsDisplayItem& aItem,
               nscoord aLeftEdge, nscoord aRightEdge) {
       nsRect r = aItem.GetUnderlyingFrame()->GetScrollableOverflowRect() +
                  aItem.ToReferenceFrame();
       mX = aLeftEdge > 0 ? r.x + aLeftEdge : nscoord_MIN;
       mXMost = aRightEdge > 0 ? NS_MAX(r.XMost() - aRightEdge, mX) : nscoord_MAX;
     }