Attachment #8823361: Interdiff for part 3 to "fix" the crashtest asserts. for bug #1298588

View | Details | Raw Unified | Return to bug 1298588
Collapse All | Expand All

(-)a/layout/base/nsPresContext.h (-1 / +1 lines)
Line     Link Here 
 Lines 227-243   public: Link Here 
227
  {
227
  {
228
      NS_ASSERTION(!mShell || !mShell->GetDocument() ||
228
      NS_ASSERTION(!mShell || !mShell->GetDocument() ||
229
                   mShell->GetDocument() == mDocument,
229
                   mShell->GetDocument() == mDocument,
230
                   "nsPresContext doesn't have the same document as nsPresShell!");
230
                   "nsPresContext doesn't have the same document as nsPresShell!");
231
      return mDocument;
231
      return mDocument;
232
  }
232
  }
233
233
234
#ifdef MOZILLA_INTERNAL_API
234
#ifdef MOZILLA_INTERNAL_API
235
  mozilla::StyleSetHandle StyleSet() { return GetPresShell()->StyleSet(); }
235
  mozilla::StyleSetHandle StyleSet() const { return GetPresShell()->StyleSet(); }
236
236
237
  nsFrameManager* FrameManager()
237
  nsFrameManager* FrameManager()
238
    { return PresShell()->FrameManager(); }
238
    { return PresShell()->FrameManager(); }
239
239
240
  nsCSSFrameConstructor* FrameConstructor()
240
  nsCSSFrameConstructor* FrameConstructor()
241
    { return PresShell()->FrameConstructor(); }
241
    { return PresShell()->FrameConstructor(); }
242
242
243
  mozilla::EffectCompositor* EffectCompositor() { return mEffectCompositor; }
243
  mozilla::EffectCompositor* EffectCompositor() { return mEffectCompositor; }
(-)a/layout/style/StyleStructContext.h (+7 lines)
Line     Link Here 
 Lines 4-19    Link Here 
4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
5
6
#ifndef mozilla_StyleStructContext_h
6
#ifndef mozilla_StyleStructContext_h
7
#define mozilla_StyleStructContext_h
7
#define mozilla_StyleStructContext_h
8
8
9
#include "CounterStyleManager.h"
9
#include "CounterStyleManager.h"
10
#include "mozilla/LookAndFeel.h"
10
#include "mozilla/LookAndFeel.h"
11
#include "nsPresContext.h"
11
#include "nsPresContext.h"
12
#include "mozilla/StyleSetHandle.h"
12
13
13
class nsDeviceContext;
14
class nsDeviceContext;
14
15
15
/**
16
/**
16
 * Construction context for style structs.
17
 * Construction context for style structs.
17
 *
18
 *
18
 * Certain Gecko style structs have historically taken an nsPresContext
19
 * Certain Gecko style structs have historically taken an nsPresContext
19
 * argument in their constructor, which is used to compute various things. This
20
 * argument in their constructor, which is used to compute various things. This
 Lines 83-98   public: Link Here 
83
    // Workaround Bug 1323404
84
    // Workaround Bug 1323404
84
    SERVO_DEFAULT(NS_RGB(0x00, 0x00, 0x00));
85
    SERVO_DEFAULT(NS_RGB(0x00, 0x00, 0x00));
85
    return mPresContext->DefaultColor();
86
    return mPresContext->DefaultColor();
86
  }
87
  }
87
88
88
  mozilla::CounterStyle* BuildCounterStyle(const nsSubstring& aName)
89
  mozilla::CounterStyle* BuildCounterStyle(const nsSubstring& aName)
89
  {
90
  {
90
    SERVO_DEFAULT(mozilla::CounterStyleManager::GetBuiltinStyle(NS_STYLE_LIST_STYLE_DISC));
91
    SERVO_DEFAULT(mozilla::CounterStyleManager::GetBuiltinStyle(NS_STYLE_LIST_STYLE_DISC));
92
    // For the servo case we want to keep not calling into the counter style
93
    // manager even if we have a prescontext, because we haven't made that work
94
    // with servo yet.
95
    if (mPresContext->StyleSet()->IsServo()) {
96
      return mozilla::CounterStyleManager::GetBuiltinStyle(NS_STYLE_LIST_STYLE_DISC);
97
    }
91
    return mPresContext->CounterStyleManager()->BuildCounterStyle(aName);
98
    return mPresContext->CounterStyleManager()->BuildCounterStyle(aName);
92
  }
99
  }
93
100
94
  nsIAtom* GetLanguageFromCharset() const
101
  nsIAtom* GetLanguageFromCharset() const
95
  {
102
  {
96
    SERVO_DEFAULT(nsGkAtoms::x_western);
103
    SERVO_DEFAULT(nsGkAtoms::x_western);
97
    return mPresContext->GetLanguageFromCharset();
104
    return mPresContext->GetLanguageFromCharset();
98
  }
105
  }

Return to bug 1298588