Commit 289f739f authored by zandobersek@gmail.com's avatar zandobersek@gmail.com

Prettify generated build guards in HTMLElementFactory.cpp

https://bugs.webkit.org/show_bug.cgi?id=120310

Reviewed by Darin Adler.

Build guards should wrap the constructor definitions without empty lines between
the guards and the constructor code. Similarly, build guards for addTag calls
shouldn't put an empty line after the build guard closure.

* dom/make_names.pl:
(printConstructorInterior):
(printConstructors):
(printFunctionInits):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent db937eab
2013-08-26 Zan Dobersek <zdobersek@igalia.com>
Prettify generated build guards in HTMLElementFactory.cpp
https://bugs.webkit.org/show_bug.cgi?id=120310
Reviewed by Darin Adler.
Build guards should wrap the constructor definitions without empty lines between
the guards and the constructor code. Similarly, build guards for addTag calls
shouldn't put an empty line after the build guard closure.
* dom/make_names.pl:
(printConstructorInterior):
(printConstructors):
(printFunctionInits):
2013-08-26 Robert Hogan <robert@webkit.org>
Avoid painting every non-edge collapsed border twice over
......@@ -424,7 +424,7 @@ END
print F " return ${interfaceName}::create($constructorTagName, document";
print F ", formElement" if $enabledTags{$tagName}{constructorNeedsFormElement};
print F ", createdByParser" if $enabledTags{$tagName}{constructorNeedsCreatedByParser};
print F ");\n}\n\n";
print F ");\n}\n";
}
sub printConstructors
......@@ -450,7 +450,7 @@ sub printConstructors
my $conditional = $enabledTags{$tagName}{conditional};
if ($conditional) {
my $conditionalString = "ENABLE(" . join(") && ENABLE(", split(/&/, $conditional)) . ")";
print F "#if ${conditionalString}\n\n";
print F "#if ${conditionalString}\n";
}
printConstructorSignature($F, $tagName, $tagConstructorMap{$tagName}, "tagName");
......@@ -459,6 +459,8 @@ sub printConstructors
if ($conditional) {
print F "#endif\n";
}
print F "\n";
}
# Mapped tag name uses a special wrapper to keep their prefix and namespaceURI while using the mapped localname.
......@@ -492,7 +494,7 @@ sub printFunctionInits
}
if ($conditional) {
print F "#endif\n\n";
print F "#endif\n";
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment