mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Issue #80 - De-unify layout/style
This commit is contained in:
parent
1b39899185
commit
f7493bacb5
20 changed files with 39 additions and 15 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include "mozilla/UniquePtr.h"
|
||||
#include "nsCSSScanner.h"
|
||||
#include "mozilla/dom/CSSLexerBinding.h"
|
||||
#include "mozilla/dom/NonRefcountedDOMObject.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "mozilla/RuleProcessorCache.h"
|
||||
#include "nsIStyleSheetLinkingElement.h"
|
||||
#include "nsDOMWindowUtils.h"
|
||||
#include "nsStyleSet.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#define DocumentStyleRootIterator_h
|
||||
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
||||
class nsIContent;
|
||||
class nsIDocument;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <algorithm>
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "CSSStyleSheet.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
|
||||
#include "ServoBindings.h"
|
||||
#include "mozilla/ServoRestyleManager.h"
|
||||
#include "mozilla/dom/ChildIterator.h"
|
||||
#include "nsCSSAnonBoxes.h"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ServoBindings.h"
|
||||
#include "mozilla/ServoStyleSheet.h"
|
||||
#include "mozilla/StyleBackendType.h"
|
||||
#include "CSSRuleList.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ class nsIDOMCSSStyleDeclaration;
|
|||
class nsIDOMCSSStyleSheet;
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
#define NS_IF_CLONE(member_) \
|
||||
PR_BEGIN_MACRO \
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "mozilla/StyleSheet.h"
|
||||
|
||||
#include "mozilla/dom/BindingDeclarations.h" // for Optional<>
|
||||
#include "mozilla/dom/CSSRuleList.h"
|
||||
#include "mozilla/dom/ShadowRoot.h"
|
||||
#include "mozilla/ServoStyleSheet.h"
|
||||
|
|
@ -16,6 +17,8 @@
|
|||
#include "nsIMediaList.h"
|
||||
#include "nsNullPrincipal.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
StyleSheet::StyleSheet(StyleBackendType aType, css::SheetParsingMode aParsingMode)
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ EXPORTS.mozilla.css += [
|
|||
'StyleRule.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'AnimationCollection.cpp',
|
||||
'AnimationCommon.cpp',
|
||||
'CounterStyleManager.cpp',
|
||||
|
|
@ -171,6 +171,7 @@ UNIFIED_SOURCES += [
|
|||
'nsCSSProps.cpp',
|
||||
'nsCSSPseudoClasses.cpp',
|
||||
'nsCSSPseudoElements.cpp',
|
||||
'nsCSSRuleProcessor.cpp',
|
||||
'nsCSSRules.cpp',
|
||||
'nsCSSScanner.cpp',
|
||||
'nsCSSValue.cpp',
|
||||
|
|
@ -183,6 +184,7 @@ UNIFIED_SOURCES += [
|
|||
'nsFontFaceUtils.cpp',
|
||||
'nsHTMLCSSStyleSheet.cpp',
|
||||
'nsHTMLStyleSheet.cpp',
|
||||
'nsLayoutStylesheetCache.cpp',
|
||||
'nsMediaFeatures.cpp',
|
||||
'nsNthIndexCache.cpp',
|
||||
'nsROCSSPrimitiveValue.cpp',
|
||||
|
|
@ -208,14 +210,6 @@ UNIFIED_SOURCES += [
|
|||
'SVGAttrAnimationRuleProcessor.cpp',
|
||||
]
|
||||
|
||||
# nsCSSRuleProcessor.cpp needs to be built separately because it uses plarena.h.
|
||||
# nsLayoutStylesheetCache.cpp needs to be built separately because it uses
|
||||
# nsExceptionHandler.h, which includes windows.h.
|
||||
SOURCES += [
|
||||
'nsCSSRuleProcessor.cpp',
|
||||
'nsLayoutStylesheetCache.cpp',
|
||||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'CSSUnprefixingService.js',
|
||||
'CSSUnprefixingService.manifest',
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ public:
|
|||
// KTableEntry objects can be initialized either with an int16_t value
|
||||
// or a value of an enumeration type that can fit within an int16_t.
|
||||
|
||||
constexpr KTableEntry(nsCSSKeyword aKeyword, int16_t aValue)
|
||||
KTableEntry(nsCSSKeyword aKeyword, int16_t aValue)
|
||||
: mKeyword(aKeyword)
|
||||
, mValue(aValue)
|
||||
{
|
||||
|
|
@ -353,7 +353,7 @@ public:
|
|||
|
||||
template<typename T,
|
||||
typename = typename std::enable_if<std::is_enum<T>::value>::type>
|
||||
constexpr KTableEntry(nsCSSKeyword aKeyword, T aValue)
|
||||
KTableEntry(nsCSSKeyword aKeyword, T aValue)
|
||||
: mKeyword(aKeyword)
|
||||
, mValue(static_cast<int16_t>(aValue))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@
|
|||
* automatically defined to CSS_PSEUDO_CLASS.
|
||||
*/
|
||||
|
||||
#include "nsCSSPseudoElements.h"
|
||||
|
||||
// OUTPUT_CLASS=nsCSSPseudoClasses
|
||||
// MACRO_NAME=CSS_PSEUDO_CLASS
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsString.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::css;
|
||||
|
||||
// define storage for all atoms
|
||||
#define CSS_PSEUDO_CLASS(_name, _value, _flags, _pref) \
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
#define nsCSSPseudoClasses_h___
|
||||
|
||||
#include "nsStringFwd.h"
|
||||
#include "mozilla/CSSEnabledState.h"
|
||||
#include "nsStyleStruct.h"
|
||||
|
||||
// The following two flags along with the pref defines where this pseudo
|
||||
// class can be used:
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ namespace mozilla {
|
|||
|
||||
namespace dom {
|
||||
class DocGroup;
|
||||
class DocGroup;
|
||||
} // namespace dom
|
||||
|
||||
class ErrorResult;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,12 @@
|
|||
|
||||
/* representation of simple property values within CSS declarations */
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
|
||||
#include "nsCSSValue.h"
|
||||
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/css/ImageLoader.h"
|
||||
#include "CSSCalc.h"
|
||||
|
|
@ -18,8 +19,6 @@
|
|||
#include "imgIRequest.h"
|
||||
#include "imgRequestProxy.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsCSSProps.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsStyleUtil.h"
|
||||
|
|
@ -27,7 +26,9 @@
|
|||
#include "nsStyleSet.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::css;
|
||||
|
||||
static bool
|
||||
IsLocalRefURL(nsStringBuffer* aString)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@
|
|||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
typedef nsCSSProps::KTableEntry KTableEntry;
|
||||
|
||||
#if defined(DEBUG_bzbarsky) || defined(DEBUG_caillon)
|
||||
#define DEBUG_ComputedDOMStyle
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "mozilla/css/Declaration.h"
|
||||
#include "mozilla/css/StyleRule.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/DocGroup.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMMutationEvent.h"
|
||||
#include "nsIURI.h"
|
||||
|
|
@ -17,8 +18,12 @@
|
|||
#include "nsWrapperCacheInlines.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "ActiveLayerTracker.h"
|
||||
#include "ServoDeclarationBlock.h"
|
||||
#include "StyleSetHandle.h"
|
||||
#include "DeclarationBlockInlines.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(dom::Element* aElement,
|
||||
bool aIsSMILOverride)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "nsDeviceContext.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/StyleSheet.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#include "nsCSSAnonBoxes.h"
|
||||
#include "nsCSSPseudoElements.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsStyleStruct.h"
|
||||
#include "nsStyleStructInlines.h"
|
||||
#include "nsString.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIStyleRule.h"
|
||||
|
|
@ -35,6 +37,7 @@
|
|||
#include "mozilla/ReflowInput.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsCoord.h"
|
||||
#include "nsFontMetrics.h"
|
||||
|
||||
// Ensure the binding function declarations in nsStyleContext.h matches
|
||||
// those in ServoBindings.h.
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include <algorithm>
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
static_assert((((1 << nsStyleStructID_Length) - 1) &
|
||||
~(NS_STYLE_INHERIT_MASK)) == 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue