1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 #ifndef mozilla_RestyleManagerInlines_h
8 #define mozilla_RestyleManagerInlines_h
9 
10 #ifdef MOZ_OLD_STYLE
11 #include "mozilla/GeckoRestyleManager.h"
12 #endif
13 #include "mozilla/ServoRestyleManager.h"
14 #include "mozilla/ServoUtils.h"
15 
16 namespace mozilla {
17 
MOZ_DEFINE_STYLO_METHODS(RestyleManager,GeckoRestyleManager,ServoRestyleManager)18 MOZ_DEFINE_STYLO_METHODS(RestyleManager, GeckoRestyleManager,
19                          ServoRestyleManager)
20 
21 void RestyleManager::PostRestyleEvent(dom::Element* aElement,
22                                       nsRestyleHint aRestyleHint,
23                                       nsChangeHint aMinChangeHint) {
24   MOZ_STYLO_FORWARD(PostRestyleEvent, (aElement, aRestyleHint, aMinChangeHint));
25 }
26 
RebuildAllStyleData(nsChangeHint aExtraHint,nsRestyleHint aRestyleHint)27 void RestyleManager::RebuildAllStyleData(nsChangeHint aExtraHint,
28                                          nsRestyleHint aRestyleHint) {
29   MOZ_STYLO_FORWARD(RebuildAllStyleData, (aExtraHint, aRestyleHint));
30 }
31 
PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint,nsRestyleHint aRestyleHint)32 void RestyleManager::PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint,
33                                                   nsRestyleHint aRestyleHint) {
34   MOZ_STYLO_FORWARD(PostRebuildAllStyleDataEvent, (aExtraHint, aRestyleHint));
35 }
36 
ProcessPendingRestyles()37 void RestyleManager::ProcessPendingRestyles() {
38   MOZ_STYLO_FORWARD(ProcessPendingRestyles, ());
39 }
40 
ContentStateChanged(nsIContent * aContent,EventStates aStateMask)41 void RestyleManager::ContentStateChanged(nsIContent* aContent,
42                                          EventStates aStateMask) {
43   MOZ_STYLO_FORWARD(ContentStateChanged, (aContent, aStateMask));
44 }
45 
AttributeWillChange(dom::Element * aElement,int32_t aNameSpaceID,nsAtom * aAttribute,int32_t aModType,const nsAttrValue * aNewValue)46 void RestyleManager::AttributeWillChange(dom::Element* aElement,
47                                          int32_t aNameSpaceID,
48                                          nsAtom* aAttribute, int32_t aModType,
49                                          const nsAttrValue* aNewValue) {
50   MOZ_STYLO_FORWARD(AttributeWillChange,
51                     (aElement, aNameSpaceID, aAttribute, aModType, aNewValue));
52 }
53 
AttributeChanged(dom::Element * aElement,int32_t aNameSpaceID,nsAtom * aAttribute,int32_t aModType,const nsAttrValue * aOldValue)54 void RestyleManager::AttributeChanged(dom::Element* aElement,
55                                       int32_t aNameSpaceID, nsAtom* aAttribute,
56                                       int32_t aModType,
57                                       const nsAttrValue* aOldValue) {
58   MOZ_STYLO_FORWARD(AttributeChanged,
59                     (aElement, aNameSpaceID, aAttribute, aModType, aOldValue));
60 }
61 
ReparentStyleContext(nsIFrame * aFrame)62 nsresult RestyleManager::ReparentStyleContext(nsIFrame* aFrame) {
63   MOZ_STYLO_FORWARD(ReparentStyleContext, (aFrame));
64 }
65 
UpdateOnlyAnimationStyles()66 void RestyleManager::UpdateOnlyAnimationStyles() {
67   MOZ_STYLO_FORWARD(UpdateOnlyAnimationStyles, ());
68 }
69 
70 }  // namespace mozilla
71 
72 #endif  // mozilla_RestyleManagerInlines_h
73