Bug 1380133 - Part 3: Remove nsPresContext argument to ServoStyleContext::ResolveSameStructsAs. r=emilio

We have it in mPresContext already.

MozReview-Commit-ID: G1kKHGFOXTp
---
 layout/base/ServoRestyleManager.cpp     | 2 +-
 layout/generic/ViewportFrame.cpp        | 2 +-
 layout/style/ServoStyleContext.h        | 3 +--
 layout/style/ServoStyleContextInlines.h | 6 +++---
 4 files changed, 6 insertions(+), 7 deletions(-)

--HG--
extra : rebase_source : 63e1e4fba69c587f7eb403efd7d8dd98214c86ac
This commit is contained in:
Cameron McCormack 2017-07-21 11:42:43 +08:00
parent 1580e4a025
commit d77c5d77d8
4 changed files with 6 additions and 7 deletions

View File

@ -558,7 +558,7 @@ ServoRestyleManager::ProcessPostTraversal(
newContext = currentContext;
newContext->UpdateWithElementState(aElement);
newContext->ResolveSameStructsAs(PresContext(), oldStyleContext);
newContext->ResolveSameStructsAs(oldStyleContext);
// We want to walk all the continuations here, even the ones with different
// styles. In practice, the only reason we get continuations with different

View File

@ -428,7 +428,7 @@ ViewportFrame::UpdateStyle(ServoRestyleState& aRestyleState)
// like UpdateStyleOfOwnedChildFrame that try to append changes for the
// content to the change list. Nor do we computed a changehint, since we have
// no way to apply it anyway.
newContext->ResolveSameStructsAs(PresContext(), oldContext);
newContext->ResolveSameStructsAs(oldContext);
MOZ_ASSERT(!GetNextContinuation(), "Viewport has continuations?");
SetStyleContext(newContext);

View File

@ -43,8 +43,7 @@ public:
* Makes this context match |aOther| in terms of which style structs have
* been resolved.
*/
inline void ResolveSameStructsAs(nsPresContext* aPresContext,
const ServoStyleContext* aOther);
inline void ResolveSameStructsAs(const ServoStyleContext* aOther);
private:
nsPresContext* mPresContext;

View File

@ -15,7 +15,7 @@
namespace mozilla {
void
ServoStyleContext::ResolveSameStructsAs(nsPresContext* aPresContext, const ServoStyleContext* aOther)
ServoStyleContext::ResolveSameStructsAs(const ServoStyleContext* aOther)
{
// Only resolve structs that are not already resolved in this struct.
uint64_t ourBits = mBits & NS_STYLE_INHERIT_MASK;
@ -25,7 +25,7 @@ ServoStyleContext::ResolveSameStructsAs(nsPresContext* aPresContext, const Servo
#define STYLE_STRUCT(name_, checkdata_cb) \
if (nsStyle##name_::kHasFinishStyle && newBits & NS_STYLE_INHERIT_BIT(name_)) { \
const nsStyle##name_* data = ComputedValues()->GetStyle##name_(); \
const_cast<nsStyle##name_*>(data)->FinishStyle(aPresContext); \
const_cast<nsStyle##name_*>(data)->FinishStyle(mPresContext); \
}
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
@ -35,4 +35,4 @@ ServoStyleContext::ResolveSameStructsAs(nsPresContext* aPresContext, const Servo
} // namespace mozilla
#endif // mozilla_ContextInlines_h
#endif // mozilla_ContextInlines_h