Index: Source/core/html/HTMLTableCellElement.cpp |
diff --git a/Source/core/html/HTMLTableCellElement.cpp b/Source/core/html/HTMLTableCellElement.cpp |
index 875b6d5b4b681b392fc120510790891c25b7c15e..873a5efcb74aad3208987dfa71b3ffc4fcd7964a 100644 |
--- a/Source/core/html/HTMLTableCellElement.cpp |
+++ b/Source/core/html/HTMLTableCellElement.cpp |
@@ -44,7 +44,7 @@ namespace blink { |
// (FIXME: We should consider increasing this limit (crbug.com/78577). |
// Firefox uses a limit of 1,000 for colspan and resets the value to 1 |
// but we don't discriminate between rowspan / colspan as it is artificial. |
-static const int maxColRowSpan = 8190; |
+static const unsigned maxColRowSpan = 8190; |
using namespace HTMLNames; |
@@ -55,22 +55,22 @@ inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName, |
DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableCellElement) |
-int HTMLTableCellElement::colSpan() const |
+unsigned HTMLTableCellElement::colSpan() const |
{ |
const AtomicString& colSpanValue = fastGetAttribute(colspanAttr); |
- int value = 0; |
- if (colSpanValue.isEmpty() || !parseHTMLInteger(colSpanValue, value)) |
+ unsigned value = 0; |
+ if (colSpanValue.isEmpty() || !parseHTMLNonNegativeInteger(colSpanValue, value)) |
return 1; |
- return max(1, min(value, maxColRowSpan)); |
+ return max(1u, min(value, maxColRowSpan)); |
} |
-int HTMLTableCellElement::rowSpan() const |
+unsigned HTMLTableCellElement::rowSpan() const |
{ |
const AtomicString& rowSpanValue = fastGetAttribute(rowspanAttr); |
- int value = 0; |
- if (rowSpanValue.isEmpty() || !parseHTMLInteger(rowSpanValue, value)) |
+ unsigned value = 0; |
+ if (rowSpanValue.isEmpty() || !parseHTMLNonNegativeInteger(rowSpanValue, value)) |
return 1; |
- return max(1, min(value, maxColRowSpan)); |
+ return max(1u, min(value, maxColRowSpan)); |
} |
int HTMLTableCellElement::cellIndex() const |
@@ -156,9 +156,9 @@ const AtomicString& HTMLTableCellElement::axis() const |
return fastGetAttribute(axisAttr); |
} |
-void HTMLTableCellElement::setColSpan(int n) |
+void HTMLTableCellElement::setColSpan(unsigned n) |
{ |
- setIntegralAttribute(colspanAttr, n); |
+ setUnsignedIntegralAttribute(colspanAttr, n); |
} |
const AtomicString& HTMLTableCellElement::headers() const |
@@ -166,9 +166,9 @@ const AtomicString& HTMLTableCellElement::headers() const |
return fastGetAttribute(headersAttr); |
} |
-void HTMLTableCellElement::setRowSpan(int n) |
+void HTMLTableCellElement::setRowSpan(unsigned n) |
{ |
- setIntegralAttribute(rowspanAttr, n); |
+ setUnsignedIntegralAttribute(rowspanAttr, n); |
} |
const AtomicString& HTMLTableCellElement::scope() const |