Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: third_party/WebKit/Source/core/html/HTMLTableColElement.cpp

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLTableColElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTableColElement.cpp b/third_party/WebKit/Source/core/html/HTMLTableColElement.cpp
index 24c079ef2d52b0f8a37e51dcd5e7a07e7a479ffd..ff1ab7e70d04ae62560c47100627c8dd0ed203de 100644
--- a/third_party/WebKit/Source/core/html/HTMLTableColElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTableColElement.cpp
@@ -60,13 +60,12 @@ void HTMLTableColElement::collectStyleForPresentationAttribute(
style);
}
-void HTMLTableColElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
- if (name == spanAttr) {
+void HTMLTableColElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ if (params.name == spanAttr) {
unsigned newSpan = 0;
- if (value.isEmpty() || !parseHTMLNonNegativeInteger(value, newSpan) ||
- newSpan < 1) {
+ if (params.newValue.isEmpty() ||
+ !parseHTMLNonNegativeInteger(params.newValue, newSpan) || newSpan < 1) {
// If the value of span is not a valid non-negative integer greater than
// zero, set it to 1.
newSpan = 1;
@@ -75,8 +74,8 @@ void HTMLTableColElement::parseAttribute(const QualifiedName& name,
m_span = newSpan;
if (layoutObject() && layoutObject()->isLayoutTableCol())
layoutObject()->updateFromElement();
- } else if (name == widthAttr) {
- if (!value.isEmpty()) {
+ } else if (params.name == widthAttr) {
+ if (!params.newValue.isEmpty()) {
if (layoutObject() && layoutObject()->isLayoutTableCol()) {
LayoutTableCol* col = toLayoutTableCol(layoutObject());
int newWidth = width().toInt();
@@ -86,7 +85,7 @@ void HTMLTableColElement::parseAttribute(const QualifiedName& name,
}
}
} else {
- HTMLTablePartElement::parseAttribute(name, oldValue, value);
+ HTMLTablePartElement::parseAttribute(params);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTableColElement.h ('k') | third_party/WebKit/Source/core/html/HTMLTableElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698