summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/CSSEditUtils.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-31 05:54:39 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-31 05:54:39 +0000
commita6f632714fcb1be3dd00b0fc76fbf6bfc693155b (patch)
treeb04c82f9af4a0d288a6d4350d774ad8fe6dac903 /editor/libeditor/CSSEditUtils.h
parent2ed0607c747b21cadaf7401d4ba706097578e74d (diff)
parentb28effe2ea93e43e362f7ce263d23b55adcb6da7 (diff)
downloadUXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar
UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.gz
UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.lz
UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.tar.xz
UXP-a6f632714fcb1be3dd00b0fc76fbf6bfc693155b.zip
Merge branch 'redwood' into releaseRELBASE_20200831
Diffstat (limited to 'editor/libeditor/CSSEditUtils.h')
-rw-r--r--editor/libeditor/CSSEditUtils.h65
1 files changed, 36 insertions, 29 deletions
diff --git a/editor/libeditor/CSSEditUtils.h b/editor/libeditor/CSSEditUtils.h
index 0b9a12952..5129ab88d 100644
--- a/editor/libeditor/CSSEditUtils.h
+++ b/editor/libeditor/CSSEditUtils.h
@@ -90,6 +90,8 @@ public:
*/
bool IsCSSEditableProperty(nsINode* aNode, nsIAtom* aProperty,
const nsAString* aAttribute);
+ bool IsCSSEditableProperty(nsINode* aNode, nsIAtom* aProperty,
+ nsIAtom* aAttribute);
/**
* Adds/remove a CSS declaration to the STYLE atrribute carried by a given
@@ -188,14 +190,14 @@ public:
*
* @param aNode [IN] A DOM node.
* @param aHTMLProperty [IN] An atom containing an HTML property.
- * @param aAttribute [IN] A pointer to an attribute name or nullptr if
+ * @param aAttribute [IN] An atom of attribute name or nullptr if
* irrelevant.
* @param aValueString [OUT] The list of CSS values.
* @param aStyleType [IN] eSpecified or eComputed.
*/
nsresult GetCSSEquivalentToHTMLInlineStyleSet(nsINode* aNode,
nsIAtom* aHTMLProperty,
- const nsAString* aAttribute,
+ nsIAtom* aAttribute,
nsAString& aValueString,
StyleType aStyleType);
@@ -205,18 +207,22 @@ public:
*
* @param aNode [IN] A DOM node.
* @param aHTMLProperty [IN] An atom containing an HTML property.
- * @param aAttribute [IN] A pointer to an attribute name or nullptr if
- * irrelevant.
- * @param aIsSet [OUT] A boolean being true if the css properties are
- * set.
+ * @param aAttribute [IN] A pointer/atom to an attribute name or nullptr
+ * if irrelevant.
* @param aValueString [IN/OUT] The attribute value (in) the list of CSS
* values (out).
* @param aStyleType [IN] eSpecified or eComputed.
- *
- * The nsIContent variant returns aIsSet instead of using an out parameter.
+ * @return A boolean being true if the css properties are
+ * set.
*/
bool IsCSSEquivalentToHTMLInlineStyleSet(nsINode* aContent,
nsIAtom* aProperty,
+ nsIAtom* aAttribute,
+ nsAString& aValue,
+ StyleType aStyleType);
+
+ bool IsCSSEquivalentToHTMLInlineStyleSet(nsINode* aContent,
+ nsIAtom* aProperty,
const nsAString* aAttribute,
const nsAString& aValue,
StyleType aStyleType);
@@ -227,12 +233,11 @@ public:
nsAString& aValue,
StyleType aStyleType);
- nsresult IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode* aNode,
- nsIAtom* aHTMLProperty,
- const nsAString* aAttribute,
- bool& aIsSet,
- nsAString& aValueString,
- StyleType aStyleType);
+ bool IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode* aNode,
+ nsIAtom* aProperty,
+ const nsAString* aAttribute,
+ nsAString& aValue,
+ StyleType aStyleType);
/**
* Adds to the node the CSS inline styles equivalent to the HTML style
@@ -240,27 +245,29 @@ public:
*
* @param aNode [IN] A DOM node.
* @param aHTMLProperty [IN] An atom containing an HTML property.
- * @param aAttribute [IN] A pointer to an attribute name or nullptr if
- * irrelevant.
+ * @param aAttribute [IN] A pointer/atom to an attribute name or nullptr
+ * if irrelevant.
* @param aValue [IN] The attribute value.
- * @param aCount [OUT] The number of CSS properties set by the call.
* @param aSuppressTransaction [IN] A boolean indicating, when true,
* that no transaction should be recorded.
*
- * aCount is returned by the dom::Element variant instead of being an out
- * parameter.
+ * @return The number of CSS properties set by the call.
*/
int32_t SetCSSEquivalentToHTMLStyle(dom::Element* aElement,
nsIAtom* aProperty,
+ nsIAtom* aAttribute,
+ const nsAString* aValue,
+ bool aSuppressTransaction);
+ int32_t SetCSSEquivalentToHTMLStyle(dom::Element* aElement,
+ nsIAtom* aProperty,
+ const nsAString* aAttribute,
+ const nsAString* aValue,
+ bool aSuppressTransaction);
+ int32_t SetCSSEquivalentToHTMLStyle(nsIDOMNode* aNode,
+ nsIAtom* aHTMLProperty,
const nsAString* aAttribute,
const nsAString* aValue,
bool aSuppressTransaction);
- nsresult SetCSSEquivalentToHTMLStyle(nsIDOMNode* aNode,
- nsIAtom* aHTMLProperty,
- const nsAString* aAttribute,
- const nsAString* aValue,
- int32_t* aCount,
- bool aSuppressTransaction);
/**
* Removes from the node the CSS inline styles equivalent to the HTML style.
@@ -284,7 +291,7 @@ public:
*
* @param aElement [IN] A DOM Element (must not be null).
* @param aHTMLProperty [IN] An atom containing an HTML property.
- * @param aAttribute [IN] A pointer to an attribute name or nullptr if
+ * @param aAttribute [IN] An atom to an attribute name or nullptr if
* irrelevant.
* @param aValue [IN] The attribute value.
* @param aSuppressTransaction [IN] A boolean indicating, when true,
@@ -292,7 +299,7 @@ public:
*/
nsresult RemoveCSSEquivalentToHTMLStyle(dom::Element* aElement,
nsIAtom* aHTMLProperty,
- const nsAString* aAttribute,
+ nsIAtom* aAttribute,
const nsAString* aValue,
bool aSuppressTransaction);
@@ -409,7 +416,7 @@ private:
*
* @param aNode [IN] The DOM node.
* @param aHTMLProperty [IN] An atom containing an HTML property.
- * @param aAttribute [IN] A pointer to an attribute name or nullptr
+ * @param aAttribute [IN] An atom to an attribute name or nullptr
* if irrelevant
* @param aValue [IN] The attribute value.
* @param aPropertyArray [OUT] The array of CSS properties.
@@ -422,7 +429,7 @@ private:
*/
void GenerateCSSDeclarationsFromHTMLStyle(dom::Element* aNode,
nsIAtom* aHTMLProperty,
- const nsAString* aAttribute,
+ nsIAtom* aAttribute,
const nsAString* aValue,
nsTArray<nsIAtom*>& aPropertyArray,
nsTArray<nsString>& aValueArray,