зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1560055 part 5. Fix various reflection cases that should be using GetUnsignedIntAttr but are using GetIntAttr. r=mccr8
It mostly works out, because we return an int32_t then just cast it to uint32_t, but it would be better to return the right thing to start with. Differential Revision: https://phabricator.services.mozilla.com/D36129 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7719c7c3c4
Коммит
4530e9a97e
|
@ -48,7 +48,7 @@ class HTMLMarqueeElement final : public nsGenericHTMLElement {
|
|||
void SetHeight(const nsAString& aHeight, ErrorResult& aError) {
|
||||
SetHTMLAttr(nsGkAtoms::height, aHeight, aError);
|
||||
}
|
||||
uint32_t Hspace() { return GetIntAttr(nsGkAtoms::hspace, 0); }
|
||||
uint32_t Hspace() { return GetUnsignedIntAttr(nsGkAtoms::hspace, 0); }
|
||||
void SetHspace(uint32_t aValue, ErrorResult& aError) {
|
||||
SetUnsignedIntAttr(nsGkAtoms::hspace, aValue, 0, aError);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ class HTMLMarqueeElement final : public nsGenericHTMLElement {
|
|||
void SetWidth(const nsAString& aWidth, ErrorResult& aError) {
|
||||
SetHTMLAttr(nsGkAtoms::width, aWidth, aError);
|
||||
}
|
||||
uint32_t Vspace() { return GetIntAttr(nsGkAtoms::vspace, 0); }
|
||||
uint32_t Vspace() { return GetUnsignedIntAttr(nsGkAtoms::vspace, 0); }
|
||||
void SetVspace(uint32_t aValue, ErrorResult& aError) {
|
||||
SetUnsignedIntAttr(nsGkAtoms::vspace, aValue, 0, aError);
|
||||
}
|
||||
|
|
|
@ -26,11 +26,11 @@ class HTMLTableCellElement final : public nsGenericHTMLElement {
|
|||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableCellElement,
|
||||
nsGenericHTMLElement)
|
||||
|
||||
uint32_t ColSpan() const { return GetIntAttr(nsGkAtoms::colspan, 1); }
|
||||
uint32_t ColSpan() const { return GetUnsignedIntAttr(nsGkAtoms::colspan, 1); }
|
||||
void SetColSpan(uint32_t aColSpan, ErrorResult& aError) {
|
||||
SetUnsignedIntAttr(nsGkAtoms::colspan, aColSpan, 1, aError);
|
||||
}
|
||||
uint32_t RowSpan() const { return GetIntAttr(nsGkAtoms::rowspan, 1); }
|
||||
uint32_t RowSpan() const { return GetUnsignedIntAttr(nsGkAtoms::rowspan, 1); }
|
||||
void SetRowSpan(uint32_t aRowSpan, ErrorResult& aError) {
|
||||
SetUnsignedIntAttr(nsGkAtoms::rowspan, aRowSpan, 1, aError);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class HTMLTableColElement final : public nsGenericHTMLElement {
|
|||
SetHasWeirdParserInsertionMode();
|
||||
}
|
||||
|
||||
uint32_t Span() const { return GetIntAttr(nsGkAtoms::span, 1); }
|
||||
uint32_t Span() const { return GetUnsignedIntAttr(nsGkAtoms::span, 1); }
|
||||
void SetSpan(uint32_t aSpan, ErrorResult& aError) {
|
||||
SetUnsignedIntAttr(nsGkAtoms::span, aSpan, 1, aError);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ class HTMLTextAreaElement final : public nsGenericHTMLFormElementWithState,
|
|||
void SetAutofocus(bool aAutoFocus, ErrorResult& aError) {
|
||||
SetHTMLBoolAttr(nsGkAtoms::autofocus, aAutoFocus, aError);
|
||||
}
|
||||
uint32_t Cols() { return GetIntAttr(nsGkAtoms::cols, DEFAULT_COLS); }
|
||||
uint32_t Cols() { return GetUnsignedIntAttr(nsGkAtoms::cols, DEFAULT_COLS); }
|
||||
void SetCols(uint32_t aCols, ErrorResult& aError) {
|
||||
uint32_t cols = aCols ? aCols : DEFAULT_COLS;
|
||||
SetUnsignedIntAttr(nsGkAtoms::cols, cols, DEFAULT_COLS, aError);
|
||||
|
@ -222,7 +222,9 @@ class HTMLTextAreaElement final : public nsGenericHTMLFormElementWithState,
|
|||
void SetRequired(bool aRequired, ErrorResult& aError) {
|
||||
SetHTMLBoolAttr(nsGkAtoms::required, aRequired, aError);
|
||||
}
|
||||
uint32_t Rows() { return GetIntAttr(nsGkAtoms::rows, DEFAULT_ROWS_TEXTAREA); }
|
||||
uint32_t Rows() {
|
||||
return GetUnsignedIntAttr(nsGkAtoms::rows, DEFAULT_ROWS_TEXTAREA);
|
||||
}
|
||||
void SetRows(uint32_t aRows, ErrorResult& aError) {
|
||||
uint32_t rows = aRows ? aRows : DEFAULT_ROWS_TEXTAREA;
|
||||
SetUnsignedIntAttr(nsGkAtoms::rows, rows, DEFAULT_ROWS_TEXTAREA, aError);
|
||||
|
|
|
@ -66,13 +66,13 @@ class HTMLVideoElement final : public HTMLMediaElement {
|
|||
|
||||
// WebIDL
|
||||
|
||||
uint32_t Width() const { return GetIntAttr(nsGkAtoms::width, 0); }
|
||||
uint32_t Width() const { return GetUnsignedIntAttr(nsGkAtoms::width, 0); }
|
||||
|
||||
void SetWidth(uint32_t aValue, ErrorResult& aRv) {
|
||||
SetUnsignedIntAttr(nsGkAtoms::width, aValue, 0, aRv);
|
||||
}
|
||||
|
||||
uint32_t Height() const { return GetIntAttr(nsGkAtoms::height, 0); }
|
||||
uint32_t Height() const { return GetUnsignedIntAttr(nsGkAtoms::height, 0); }
|
||||
|
||||
void SetHeight(uint32_t aValue, ErrorResult& aRv) {
|
||||
SetUnsignedIntAttr(nsGkAtoms::height, aValue, 0, aRv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче