From ef616f8857bbb7031ca8ca6a718bf0c8a0c42de3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 28 Jun 2019 23:31:57 +0000 Subject: [PATCH] Bug 1562257 part 1. Remove pointless parsing of "charoff" attributes. r=mccr8 "charoff" isn't parsed specially in the spec, and nothing in our code uses the parsed value. Differential Revision: https://phabricator.services.mozilla.com/D36369 --HG-- extra : moz-landing-system : lando --- dom/html/HTMLTableCellElement.cpp | 4 ---- dom/html/HTMLTableRowElement.cpp | 3 --- dom/html/HTMLTableSectionElement.cpp | 3 --- 3 files changed, 10 deletions(-) diff --git a/dom/html/HTMLTableCellElement.cpp b/dom/html/HTMLTableCellElement.cpp index 014389921a0c..12f7b4a998f4 100644 --- a/dom/html/HTMLTableCellElement.cpp +++ b/dom/html/HTMLTableCellElement.cpp @@ -119,10 +119,6 @@ bool HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID, /* ignore these attributes, stored simply as strings abbr, axis, ch, headers */ - if (aAttribute == nsGkAtoms::charoff) { - /* attributes that resolve to integers with a min of 0 */ - return aResult.ParseIntWithBounds(aValue, 0); - } if (aAttribute == nsGkAtoms::colspan) { aResult.ParseClampedNonNegativeInt(aValue, 1, 1, MAX_COLSPAN); return true; diff --git a/dom/html/HTMLTableRowElement.cpp b/dom/html/HTMLTableRowElement.cpp index 50d737b98556..a31c603dee24 100644 --- a/dom/html/HTMLTableRowElement.cpp +++ b/dom/html/HTMLTableRowElement.cpp @@ -202,9 +202,6 @@ bool HTMLTableRowElement::ParseAttribute(int32_t aNamespaceID, */ if (aNamespaceID == kNameSpaceID_None) { - if (aAttribute == nsGkAtoms::charoff) { - return aResult.ParseIntWithBounds(aValue, 0); - } if (aAttribute == nsGkAtoms::height) { // Per spec should be ParseNonzeroHTMLDimension, but no browsers do that. // See https://github.com/whatwg/html/issues/4716 diff --git a/dom/html/HTMLTableSectionElement.cpp b/dom/html/HTMLTableSectionElement.cpp index 413dd93c2993..65803113684e 100644 --- a/dom/html/HTMLTableSectionElement.cpp +++ b/dom/html/HTMLTableSectionElement.cpp @@ -121,9 +121,6 @@ bool HTMLTableSectionElement::ParseAttribute( /* ignore these attributes, stored simply as strings ch */ - if (aAttribute == nsGkAtoms::charoff) { - return aResult.ParseIntWithBounds(aValue, 0); - } if (aAttribute == nsGkAtoms::height) { // Per HTML spec there should be nothing special here, but all browsers // implement height mapping to style. See