mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Add nsPresContext::EnsureSafeToHandOutCSSRules. (Bug 536379) r=bzbarsky
This commit is contained in:
parent
305a488187
commit
005c3d8297
@ -1973,6 +1973,25 @@ nsPresContext::UserFontSetUpdated()
|
||||
PostRebuildAllStyleDataEvent(NS_STYLE_HINT_REFLOW);
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsPresContext::EnsureSafeToHandOutCSSRules()
|
||||
{
|
||||
nsCSSStyleSheet::EnsureUniqueInnerResult res =
|
||||
mShell->StyleSet()->EnsureUniqueInnerOnCSSSheets();
|
||||
if (res == nsCSSStyleSheet::eUniqueInner_AlreadyUnique) {
|
||||
// Nothing to do.
|
||||
return PR_TRUE;
|
||||
}
|
||||
if (res == nsCSSStyleSheet::eUniqueInner_CloneFailed) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
NS_ABORT_IF_FALSE(res == nsCSSStyleSheet::eUniqueInner_ClonedInner,
|
||||
"unexpected result");
|
||||
RebuildAllStyleData(nsChangeHint(0));
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
nsPresContext::FireDOMPaintEvent()
|
||||
{
|
||||
|
@ -824,6 +824,12 @@ public:
|
||||
// user font set is changed and fonts become unavailable).
|
||||
void UserFontSetUpdated();
|
||||
|
||||
// Ensure that it is safe to hand out CSS rules outside the layout
|
||||
// engine by ensuring that all CSS style sheets have unique inners
|
||||
// and, if necessary, synchronously rebuilding all style data.
|
||||
// Returns true on success and false on failure (not safe).
|
||||
PRBool EnsureSafeToHandOutCSSRules();
|
||||
|
||||
PRBool MayHavePaintEventListener();
|
||||
void NotifyInvalidation(const nsRect& aRect, PRUint32 aFlags);
|
||||
void FireDOMPaintEvent();
|
||||
|
Loading…
Reference in New Issue
Block a user