diff options
author | Moonchild <moonchild@palemoon.org> | 2021-01-19 08:08:18 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-01-19 08:08:18 +0000 |
commit | c76214f0b54cf74b69d0fb4afa0d2eca2e898a98 (patch) | |
tree | 15ee2e9776727ecabcdc52d06de55dfd576485c1 /layout/base/nsLayoutUtils.h | |
parent | 810c2bf8080da2bc8ec4efb05223fea31817944b (diff) | |
parent | 75286e68d703b1d8a4e0a7c72ce45d089024c124 (diff) | |
download | UXP-c76214f0b54cf74b69d0fb4afa0d2eca2e898a98.tar UXP-c76214f0b54cf74b69d0fb4afa0d2eca2e898a98.tar.gz UXP-c76214f0b54cf74b69d0fb4afa0d2eca2e898a98.tar.lz UXP-c76214f0b54cf74b69d0fb4afa0d2eca2e898a98.tar.xz UXP-c76214f0b54cf74b69d0fb4afa0d2eca2e898a98.zip |
Master merge
This merges master into release to replace Redwood.
# Conflicts:
# CLOBBER
# build/moz.configure/old.configure
# config/milestone.txt
# config/moz.build
# config/system-headers
# dom/abort/AbortController.cpp
# dom/abort/AbortController.h
# dom/abort/AbortSignal.cpp
# dom/abort/AbortSignal.h
# dom/abort/moz.build
# dom/abort/tests/moz.build
# dom/animation/KeyframeEffect.cpp
# dom/base/CustomElementRegistry.cpp
# dom/base/DocGroup.cpp
# dom/base/ResizeObserverController.cpp
# dom/base/ResizeObserverController.h
# dom/base/nsContentUtils.cpp
# dom/base/nsContentUtils.h
# dom/base/nsDocument.cpp
# dom/base/nsIDocument.h
# dom/fetch/FetchObserver.cpp
# dom/fetch/FetchObserver.h
# dom/heapsnapshot/AutoMemMap.cpp
# dom/heapsnapshot/AutoMemMap.h
# dom/heapsnapshot/CoreDump.proto
# dom/heapsnapshot/HeapSnapshot.cpp
# dom/heapsnapshot/HeapSnapshotTempFileHelperChild.h
# dom/heapsnapshot/HeapSnapshotTempFileHelperParent.cpp
# dom/heapsnapshot/HeapSnapshotTempFileHelperParent.h
# dom/heapsnapshot/PHeapSnapshotTempFileHelper.ipdl
# dom/heapsnapshot/moz.build
# dom/heapsnapshot/tests/gtest/moz.build
# dom/html/nsGenericHTMLElement.h
# dom/media/platforms/PlatformDecoderModule.h
# dom/media/platforms/moz.build
# dom/script/ModuleLoadRequest.cpp
# dom/script/ModuleLoadRequest.h
# dom/script/ModuleScript.cpp
# dom/script/ModuleScript.h
# dom/script/ScriptElement.cpp
# dom/script/ScriptElement.h
# dom/script/ScriptLoadHandler.cpp
# dom/script/ScriptLoadHandler.h
# dom/script/ScriptLoader.cpp
# dom/script/ScriptLoader.h
# dom/script/ScriptSettings.cpp
# dom/script/ScriptSettings.h
# dom/script/nsIScriptElement.h
# dom/script/nsIScriptLoaderObserver.idl
# dom/webidl/HTMLLinkElement.webidl
# gfx/gl/moz.build
# gfx/graphite2/src/moz.build
# gfx/layers/moz.build
# js/ductwork/inspector/moz.build
# js/ductwork/moz.build
# js/src/gc/Heap.h
# js/src/moz.build
# js/src/vm/UnboxedObject-inl.h
# js/src/vm/UnboxedObject.cpp
# js/src/vm/UnboxedObject.h
# layout/base/crashtests/crashtests.list
# layout/build/moz.build
# layout/generic/AspectRatio.h
# layout/generic/crashtests/crashtests.list
# layout/reftests/bidi/reftest-stylo.list
# layout/reftests/reftest-stylo.list
# layout/reftests/table-bordercollapse/reftest.list
# layout/reftests/writing-mode/reftest-stylo.list
# layout/style/StyleSheet.cpp
# layout/style/nsRuleNode.cpp
# layout/style/nsStyleStruct.cpp
# layout/style/nsStyleStruct.h
# modules/libpref/init/all.js
# nsprpub/pr/src/linking/prlink.c
# parser/html/java/htmlparser/src/nu/validator/htmlparser/impl/AttributeName.java
# parser/html/java/htmlparser/src/nu/validator/htmlparser/impl/ElementName.java
# parser/html/nsHtml5AtomList.h
# parser/html/nsHtml5AttributeName.cpp
# parser/html/nsHtml5AttributeName.h
# parser/html/nsHtml5ElementName.cpp
# parser/html/nsHtml5ElementName.h
# parser/html/nsHtml5TreeBuilderCppSupplement.h
# parser/htmlparser/nsElementTable.cpp
# parser/htmlparser/nsHTMLTagList.h
# security/nss/lib/nss/nss.h
# security/nss/lib/softoken/pkcs11.c
# security/nss/lib/softoken/softkver.h
# security/nss/lib/util/nssutil.h
# testing/web-platform/tests/tools/html5lib/html5lib/html5parser.py
# testing/web-platform/tests/tools/html5lib/html5lib/treebuilders/_base.py
# toolkit/modules/AppConstants.jsm
Diffstat (limited to 'layout/base/nsLayoutUtils.h')
-rw-r--r-- | layout/base/nsLayoutUtils.h | 61 |
1 files changed, 10 insertions, 51 deletions
diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h index f4471ce74..21407511a 100644 --- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -278,50 +278,26 @@ public: static mozilla::layout::FrameChildListID GetChildListNameFor(nsIFrame* aChildFrame); /** - * GetBeforeFrameForContent returns the ::before frame for aContent, if - * one exists. This is typically O(1). The frame passed in must be - * the first-in-flow. - * - * @param aGenConParentFrame an ancestor of the ::before frame - * @param aContent the content whose ::before is wanted - * @return the ::before frame or nullptr if there isn't one + * Returns the ::before pseudo-element for aContent, if any. */ - static nsIFrame* GetBeforeFrameForContent(nsIFrame* aGenConParentFrame, - const nsIContent* aContent); + static mozilla::dom::Element* GetBeforePseudo(const nsIContent* aContent); /** - * GetBeforeFrame returns the outermost ::before frame of the given frame, if - * one exists. This is typically O(1). The frame passed in must be - * the first-in-flow. - * - * @param aFrame the frame whose ::before is wanted - * @return the :before frame or nullptr if there isn't one + * Returns the frame corresponding to the ::before pseudo-element for + * aContent, if any. */ - static nsIFrame* GetBeforeFrame(nsIFrame* aFrame); + static nsIFrame* GetBeforeFrame(const nsIContent* aContent); /** - * GetAfterFrameForContent returns the ::after frame for aContent, if one - * exists. This will walk the in-flow chain of aGenConParentFrame to the - * last-in-flow if needed. This function is typically O(N) in the number - * of child frames, following in-flows, etc. - * - * @param aGenConParentFrame an ancestor of the ::after frame - * @param aContent the content whose ::after is wanted - * @return the ::after frame or nullptr if there isn't one + * Returns the ::after pseudo-element for aContent, if any. */ - static nsIFrame* GetAfterFrameForContent(nsIFrame* aGenConParentFrame, - const nsIContent* aContent); + static mozilla::dom::Element* GetAfterPseudo(const nsIContent* aContent); /** - * GetAfterFrame returns the outermost ::after frame of the given frame, if one - * exists. This will walk the in-flow chain to the last-in-flow if - * needed. This function is typically O(N) in the number of child - * frames, following in-flows, etc. - * - * @param aFrame the frame whose ::after is wanted - * @return the :after frame or nullptr if there isn't one + * Returns the frame corresponding to the ::after pseudo-element for aContent, + * if any. */ - static nsIFrame* GetAfterFrame(nsIFrame* aFrame); + static nsIFrame* GetAfterFrame(const nsIContent* aContent); /** * Given a frame, search up the frame tree until we find an @@ -379,23 +355,6 @@ public: */ static nsIFrame* GetRealPrimaryFrameFor(const nsIContent* aContent); - /** - * IsGeneratedContentFor returns true if aFrame is the outermost - * frame for generated content of type aPseudoElement for aContent. - * aFrame *might not* have the aPseudoElement pseudo-style! For example - * it might be a table wrapper frame and the inner table frame might - * have the pseudo-style. - * - * @param aContent the content node we're looking at. If this is - * null, then we just assume that aFrame has the right content - * pointer. - * @param aFrame the frame we're looking at - * @param aPseudoElement the pseudo type we're interested in - * @return whether aFrame is the generated aPseudoElement frame for aContent - */ - static bool IsGeneratedContentFor(nsIContent* aContent, nsIFrame* aFrame, - nsIAtom* aPseudoElement); - #ifdef DEBUG // TODO: remove, see bug 598468. static bool gPreventAssertInCompareTreePosition; |