Bug 1285474: stylo: Add dirtiness-tracking hooks for Servo and convenient methods. r=bholley

Also, guard with asserts the access to the new shared flags.

MozReview-Commit-ID: H9UFFHRPmiu
This commit is contained in:
Emilio Cobos Álvarez
2016-07-08 00:07:06 -07:00
parent 6fdfeb30ce
commit 948a479bad
9 changed files with 77 additions and 36 deletions

View File

@@ -279,9 +279,7 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
for (uint32_t i = childX; i < numChildren; i++) {
nsIContent *child = mContent->GetChildAt(i);
child->UnsetFlags(NODE_DESCENDANTS_NEED_FRAMES | NODE_NEEDS_FRAME);
if (child->IsElement()) {
child->UnsetFlags(ELEMENT_ALL_RESTYLE_FLAGS);
}
child->UnsetRestyleFlagsIfGecko();
}
break;
}
@@ -289,9 +287,7 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
child->UnsetFlags(NODE_DESCENDANTS_NEED_FRAMES | NODE_NEEDS_FRAME);
// Also clear the restyle flags in the child like
// nsCSSFrameConstructor::ProcessChildren does.
if (child->IsElement()) {
child->UnsetFlags(ELEMENT_ALL_RESTYLE_FLAGS);
}
child->UnsetRestyleFlagsIfGecko();
// IMPORTANT: This must match the conditions in
// nsCSSFrameConstructor::ContentAppended/Inserted/Removed
@@ -642,12 +638,12 @@ nsresult nsHTMLFramesetFrame::HandleEvent(nsPresContext* aPresContext,
switch (aEvent->mMessage) {
case eMouseMove:
MouseDrag(aPresContext, aEvent);
break;
break;
case eMouseUp:
if (aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) {
EndMouseDrag(aPresContext);
}
break;
break;
default:
break;
}