Commit 58912bd4 authored by ddkilzer@apple.com's avatar ddkilzer@apple.com

BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.

WebCore:

        BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.

        Apparently older versions of gcc have issues with this patch.
        Backing out a second time until the issues are resolved.

WebKit/mac:

        BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.

        Apparently older versions of gcc have issues with this patch.
        Backing out a second time until the issues are resolved.

WebKitTools:

        BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.

        Apparently older versions of gcc have issues with this patch.
        Backing out a second time until the issues are resolved.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 95833728
2008-11-06 David Kilzer <ddkilzer@apple.com>
BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
Apparently older versions of gcc have issues with this patch.
Backing out a second time until the issues are resolved.
2008-11-06 Julien Chaffraix <jchaffraix@pleyo.com>
Reviewed by Maciej Stachowiak.
......@@ -52,7 +52,7 @@ static void* collect(void*)
GCController& gcController()
{
static GCController& staticGCController = *new GCController;
static GCController staticGCController;
return staticGCController;
}
......
......@@ -97,10 +97,10 @@ static inline void removeWrappers(const JSWrapperCache&)
static HashSet<DOMObject*>& wrapperSet()
{
#if ENABLE(WORKERS)
static ThreadSpecific<HashSet<DOMObject*> >& staticWrapperSet = *new ThreadSpecific<HashSet<DOMObject*> >;
static ThreadSpecific<HashSet<DOMObject*> > staticWrapperSet;
return *staticWrapperSet;
#else
static HashSet<DOMObject*>& staticWrapperSet = *new HashSet<DOMObject*>;
static HashSet<DOMObject*> staticWrapperSet;
return staticWrapperSet;
#endif
}
......
......@@ -40,7 +40,7 @@ typedef HashMap<JSGlobalObject*, WrapperMap*> GlobalObjectWrapperMap;
static GlobalObjectWrapperMap& wrappers()
{
static GlobalObjectWrapperMap& map = *new GlobalObjectWrapperMap;
static GlobalObjectWrapperMap map;
return map;
}
......
......@@ -38,7 +38,7 @@ typedef HashMap<JSObject*, JSInspectorCallbackWrapper*> WrapperMap;
static WrapperMap& wrappers()
{
static WrapperMap& map = *new WrapperMap;
static WrapperMap map;
return map;
}
......
......@@ -42,7 +42,7 @@ typedef HashSet<RootObject*> RootObjectSet;
static RootObjectSet* rootObjectSet()
{
static RootObjectSet& staticRootObjectSet = *new RootObjectSet;
static RootObjectSet staticRootObjectSet;
return &staticRootObjectSet;
}
......
......@@ -501,7 +501,7 @@ String CSSMutableStyleDeclaration::removeProperty(int propertyID, bool notifyCha
{
ec = 0;
static HashMap<int, PropertyLonghand>& shorthandMap = *new HashMap<int, PropertyLonghand>;
static HashMap<int, PropertyLonghand> shorthandMap;
if (shorthandMap.isEmpty())
initShorthandMap(shorthandMap);
......
......@@ -686,7 +686,7 @@ String CSSPrimitiveValue::cssText() const
// FIXME: Add list-style and separator
break;
case CSS_RECT: {
static const String& rectParen = *new String("rect(");
static const String rectParen("rect(");
Rect* rectVal = getRectValue();
Vector<UChar> result;
......@@ -709,9 +709,9 @@ String CSSPrimitiveValue::cssText() const
}
case CSS_RGBCOLOR:
case CSS_PARSER_HEXCOLOR: {
static const String& commaSpace = *new String(", ");
static const String& rgbParen = *new String("rgb(");
static const String& rgbaParen = *new String("rgba(");
static const String commaSpace(", ");
static const String rgbParen("rgb(");
static const String rgbaParen("rgba(");
RGBA32 rgbColor = m_value.rgbcolor;
if (m_type == CSS_PARSER_HEXCOLOR)
......
......@@ -62,75 +62,75 @@ void CSSSelector::extractPseudoType() const
if (m_match != PseudoClass && m_match != PseudoElement)
return;
static AtomicString& active = *new AtomicString("active");
static AtomicString& after = *new AtomicString("after");
static AtomicString& anyLink = *new AtomicString("-webkit-any-link");
static AtomicString& autofill = *new AtomicString("-webkit-autofill");
static AtomicString& before = *new AtomicString("before");
static AtomicString& checked = *new AtomicString("checked");
static AtomicString& fileUploadButton = *new AtomicString("-webkit-file-upload-button");
static AtomicString& disabled = *new AtomicString("disabled");
static AtomicString& readOnly = *new AtomicString("read-only");
static AtomicString& readWrite = *new AtomicString("read-write");
static AtomicString& drag = *new AtomicString("-webkit-drag");
static AtomicString& dragAlias = *new AtomicString("-khtml-drag"); // was documented with this name in Apple documentation, so keep an alias
static AtomicString& empty = *new AtomicString("empty");
static AtomicString& enabled = *new AtomicString("enabled");
static AtomicString& firstChild = *new AtomicString("first-child");
static AtomicString& firstLetter = *new AtomicString("first-letter");
static AtomicString& firstLine = *new AtomicString("first-line");
static AtomicString& firstOfType = *new AtomicString("first-of-type");
static AtomicString& fullPageMedia = *new AtomicString("-webkit-full-page-media");
static AtomicString& nthChild = *new AtomicString("nth-child(");
static AtomicString& nthOfType = *new AtomicString("nth-of-type(");
static AtomicString& nthLastChild = *new AtomicString("nth-last-child(");
static AtomicString& nthLastOfType = *new AtomicString("nth-last-of-type(");
static AtomicString& focus = *new AtomicString("focus");
static AtomicString& hover = *new AtomicString("hover");
static AtomicString& indeterminate = *new AtomicString("indeterminate");
static AtomicString& inputPlaceholder = *new AtomicString("-webkit-input-placeholder");
static AtomicString& lastChild = *new AtomicString("last-child");
static AtomicString& lastOfType = *new AtomicString("last-of-type");
static AtomicString& link = *new AtomicString("link");
static AtomicString& lang = *new AtomicString("lang(");
static AtomicString& mediaControlsPanel = *new AtomicString("-webkit-media-controls-panel");
static AtomicString& mediaControlsMuteButton = *new AtomicString("-webkit-media-controls-mute-button");
static AtomicString& mediaControlsPlayButton = *new AtomicString("-webkit-media-controls-play-button");
static AtomicString& mediaControlsTimeDisplay = *new AtomicString("-webkit-media-controls-time-display");
static AtomicString& mediaControlsTimeline = *new AtomicString("-webkit-media-controls-timeline");
static AtomicString& mediaControlsSeekBackButton = *new AtomicString("-webkit-media-controls-seek-back-button");
static AtomicString& mediaControlsSeekForwardButton = *new AtomicString("-webkit-media-controls-seek-forward-button");
static AtomicString& mediaControlsFullscreenButton = *new AtomicString("-webkit-media-controls-fullscreen-button");
static AtomicString& notStr = *new AtomicString("not(");
static AtomicString& onlyChild = *new AtomicString("only-child");
static AtomicString& onlyOfType = *new AtomicString("only-of-type");
static AtomicString& resizer = *new AtomicString("-webkit-resizer");
static AtomicString& root = *new AtomicString("root");
static AtomicString& scrollbar = *new AtomicString("-webkit-scrollbar");
static AtomicString& scrollbarButton = *new AtomicString("-webkit-scrollbar-button");
static AtomicString& scrollbarCorner = *new AtomicString("-webkit-scrollbar-corner");
static AtomicString& scrollbarThumb = *new AtomicString("-webkit-scrollbar-thumb");
static AtomicString& scrollbarTrack = *new AtomicString("-webkit-scrollbar-track");
static AtomicString& scrollbarTrackPiece = *new AtomicString("-webkit-scrollbar-track-piece");
static AtomicString& searchCancelButton = *new AtomicString("-webkit-search-cancel-button");
static AtomicString& searchDecoration = *new AtomicString("-webkit-search-decoration");
static AtomicString& searchResultsDecoration = *new AtomicString("-webkit-search-results-decoration");
static AtomicString& searchResultsButton = *new AtomicString("-webkit-search-results-button");
static AtomicString& selection = *new AtomicString("selection");
static AtomicString& sliderThumb = *new AtomicString("-webkit-slider-thumb");
static AtomicString& target = *new AtomicString("target");
static AtomicString& visited = *new AtomicString("visited");
static AtomicString& windowInactive = *new AtomicString("window-inactive");
static AtomicString& decrement = *new AtomicString("decrement");
static AtomicString& increment = *new AtomicString("increment");
static AtomicString& start = *new AtomicString("start");
static AtomicString& end = *new AtomicString("end");
static AtomicString& horizontal = *new AtomicString("horizontal");
static AtomicString& vertical = *new AtomicString("vertical");
static AtomicString& doubleButton = *new AtomicString("double-button");
static AtomicString& singleButton = *new AtomicString("single-button");
static AtomicString& noButton = *new AtomicString("no-button");
static AtomicString& cornerPresent = *new AtomicString("corner-present");
static AtomicString active("active");
static AtomicString after("after");
static AtomicString anyLink("-webkit-any-link");
static AtomicString autofill("-webkit-autofill");
static AtomicString before("before");
static AtomicString checked("checked");
static AtomicString fileUploadButton("-webkit-file-upload-button");
static AtomicString disabled("disabled");
static AtomicString readOnly("read-only");
static AtomicString readWrite("read-write");
static AtomicString drag("-webkit-drag");
static AtomicString dragAlias("-khtml-drag"); // was documented with this name in Apple documentation, so keep an alias
static AtomicString empty("empty");
static AtomicString enabled("enabled");
static AtomicString firstChild("first-child");
static AtomicString firstLetter("first-letter");
static AtomicString firstLine("first-line");
static AtomicString firstOfType("first-of-type");
static AtomicString fullPageMedia("-webkit-full-page-media");
static AtomicString nthChild("nth-child(");
static AtomicString nthOfType("nth-of-type(");
static AtomicString nthLastChild("nth-last-child(");
static AtomicString nthLastOfType("nth-last-of-type(");
static AtomicString focus("focus");
static AtomicString hover("hover");
static AtomicString indeterminate("indeterminate");
static AtomicString inputPlaceholder("-webkit-input-placeholder");
static AtomicString lastChild("last-child");
static AtomicString lastOfType("last-of-type");
static AtomicString link("link");
static AtomicString lang("lang(");
static AtomicString mediaControlsPanel("-webkit-media-controls-panel");
static AtomicString mediaControlsMuteButton("-webkit-media-controls-mute-button");
static AtomicString mediaControlsPlayButton("-webkit-media-controls-play-button");
static AtomicString mediaControlsTimeDisplay("-webkit-media-controls-time-display");
static AtomicString mediaControlsTimeline("-webkit-media-controls-timeline");
static AtomicString mediaControlsSeekBackButton("-webkit-media-controls-seek-back-button");
static AtomicString mediaControlsSeekForwardButton("-webkit-media-controls-seek-forward-button");
static AtomicString mediaControlsFullscreenButton("-webkit-media-controls-fullscreen-button");
static AtomicString notStr("not(");
static AtomicString onlyChild("only-child");
static AtomicString onlyOfType("only-of-type");
static AtomicString resizer("-webkit-resizer");
static AtomicString root("root");
static AtomicString scrollbar("-webkit-scrollbar");
static AtomicString scrollbarButton("-webkit-scrollbar-button");
static AtomicString scrollbarCorner("-webkit-scrollbar-corner");
static AtomicString scrollbarThumb("-webkit-scrollbar-thumb");
static AtomicString scrollbarTrack("-webkit-scrollbar-track");
static AtomicString scrollbarTrackPiece("-webkit-scrollbar-track-piece");
static AtomicString searchCancelButton("-webkit-search-cancel-button");
static AtomicString searchDecoration("-webkit-search-decoration");
static AtomicString searchResultsDecoration("-webkit-search-results-decoration");
static AtomicString searchResultsButton("-webkit-search-results-button");
static AtomicString selection("selection");
static AtomicString sliderThumb("-webkit-slider-thumb");
static AtomicString target("target");
static AtomicString visited("visited");
static AtomicString windowInactive("window-inactive");
static AtomicString decrement("decrement");
static AtomicString increment("increment");
static AtomicString start("start");
static AtomicString end("end");
static AtomicString horizontal("horizontal");
static AtomicString vertical("vertical");
static AtomicString doubleButton("double-button");
static AtomicString singleButton("single-button");
static AtomicString noButton("no-button");
static AtomicString cornerPresent("corner-present");
bool element = false; // pseudo-element
bool compat = false; // single colon compatbility mode
......
......@@ -372,13 +372,13 @@ static bool elementCanUseSimpleDefaultStyle(Element* e)
static const MediaQueryEvaluator& screenEval()
{
static const MediaQueryEvaluator& staticScreenEval = *new MediaQueryEvaluator("screen");
static const MediaQueryEvaluator staticScreenEval("screen");
return staticScreenEval;
}
static const MediaQueryEvaluator& printEval()
{
static const MediaQueryEvaluator& staticPrintEval = *new MediaQueryEvaluator("print");
static const MediaQueryEvaluator staticPrintEval("print");
return staticPrintEval;
}
......
......@@ -64,7 +64,7 @@ static void addString(HashSet<String, CaseFoldingHash>& set, const char* string)
static bool isSVG10Feature(const String &feature)
{
static bool initialized = false;
static HashSet<String, CaseFoldingHash>& svgFeatures = *new HashSet<String, CaseFoldingHash>;
static HashSet<String, CaseFoldingHash> svgFeatures;
if (!initialized) {
#if ENABLE(SVG_USE) && ENABLE(SVG_FOREIGN_OBJECT) && ENABLE(SVG_FILTER) && ENABLE(SVG_FONTS)
addString(svgFeatures, "svg");
......@@ -89,7 +89,7 @@ static bool isSVG10Feature(const String &feature)
static bool isSVG11Feature(const String &feature)
{
static bool initialized = false;
static HashSet<String, CaseFoldingHash>& svgFeatures = *new HashSet<String, CaseFoldingHash>;
static HashSet<String, CaseFoldingHash> svgFeatures;
if (!initialized) {
// Sadly, we cannot claim to implement any of the SVG 1.1 generic feature sets
// lack of Font and Filter support.
......@@ -274,7 +274,7 @@ bool DOMImplementation::isXMLMIMEType(const String& mimeType)
if (mimeType == "text/xml" || mimeType == "application/xml" || mimeType == "text/xsl")
return true;
static const char* validChars = "[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]"; // per RFCs: 3023, 2045
static RegularExpression& xmlTypeRegExp = *new RegularExpression(String("^") + validChars + "+/" + validChars + "+\\+xml$");
static RegularExpression xmlTypeRegExp(String("^") + validChars + "+/" + validChars + "+\\+xml$");
return xmlTypeRegExp.match(mimeType) > -1;
}
......
......@@ -713,9 +713,9 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionCode& ec)
bool Document::hasPrefixNamespaceMismatch(const QualifiedName& qName)
{
static const AtomicString& xmlnsNamespaceURI = *new AtomicString("http://www.w3.org/2000/xmlns/");
static const AtomicString& xmlns = *new AtomicString("xmlns");
static const AtomicString& xml = *new AtomicString("xml");
static const AtomicString xmlnsNamespaceURI("http://www.w3.org/2000/xmlns/");
static const AtomicString xmlns("xmlns");
static const AtomicString xml("xml");
// These checks are from DOM Core Level 2, createElementNS
// http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-DocCrElNS
......
......@@ -91,7 +91,7 @@ void ScriptElement::handleSourceAttribute(ScriptElementData& data, const String&
// Helper function
static bool isSupportedJavaScriptLanguage(const String& language)
{
static HashSet<String, CaseFoldingHash>& languages = *new HashSet<String, CaseFoldingHash>;
static HashSet<String, CaseFoldingHash> languages;
if (languages.isEmpty()) {
languages.add("javascript");
languages.add("javascript");
......
......@@ -216,7 +216,7 @@ bool StyleChange::currentlyHasStyle(const Position &pos, const CSSProperty *prop
static String &styleSpanClassString()
{
static String& styleSpanClassString = *new String(AppleStyleSpanClass);
static String styleSpanClassString = AppleStyleSpanClass;
return styleSpanClassString;
}
......
......@@ -36,7 +36,7 @@ namespace {
String convertedSpaceString()
{
static String& convertedSpaceString = *new String;
static String convertedSpaceString;
if (convertedSpaceString.isNull()) {
convertedSpaceString = "<span class=\"";
convertedSpaceString += AppleConvertedSpace;
......
......@@ -43,7 +43,7 @@ using namespace HTMLNames;
static String indentBlockquoteString()
{
static String& string = *new String("webkit-indent-blockquote");
static String string = "webkit-indent-blockquote";
return string;
}
......
......@@ -89,14 +89,14 @@ private:
static bool isInterchangeNewlineNode(const Node *node)
{
static String& interchangeNewlineClassString = *new String(AppleInterchangeNewline);
static String interchangeNewlineClassString(AppleInterchangeNewline);
return node && node->hasTagName(brTag) &&
static_cast<const Element *>(node)->getAttribute(classAttr) == interchangeNewlineClassString;
}
static bool isInterchangeConvertedSpaceSpan(const Node *node)
{
static String& convertedSpaceSpanClassString = *new String(AppleConvertedSpace);
static String convertedSpaceSpanClassString(AppleConvertedSpace);
return node->isHTMLElement() &&
static_cast<const HTMLElement *>(node)->getAttribute(classAttr) == convertedSpaceSpanClassString;
}
......
......@@ -364,9 +364,9 @@ int maxDeepOffset(const Node *node)
String stringWithRebalancedWhitespace(const String& string, bool startIsStartOfParagraph, bool endIsEndOfParagraph)
{
static String& twoSpaces = *new String(" ");
static String& nbsp = *new String("\xa0");
static String& pattern = *new String(" \xa0");
static String twoSpaces(" ");
static String nbsp("\xa0");
static String pattern(" \xa0");
String rebalancedString = string;
......@@ -393,7 +393,7 @@ bool isTableStructureNode(const Node *node)
const String& nonBreakingSpaceString()
{
static String& nonBreakingSpaceString = *new String(&noBreakSpace, 1);
static String nonBreakingSpaceString = String(&noBreakSpace, 1);
return nonBreakingSpaceString;
}
......
......@@ -94,11 +94,11 @@ static void appendAttributeValue(Vector<UChar>& result, const String& attr, bool
unsigned len = attr.length();
unsigned lastCopiedFrom = 0;
static const String& ampEntity = *new String("&amp;");
static const String& gtEntity = *new String("&gt;");
static const String& ltEntity = *new String("&lt;");
static const String& quotEntity = *new String("&quot;");
static const String& nbspEntity = *new String("&nbsp;");
static const String ampEntity("&amp;");
static const String gtEntity("&gt;");
static const String ltEntity("&lt;");
static const String quotEntity("&quot;");
static const String nbspEntity("&nbsp;");
for (unsigned i = 0; i < len; ++i) {
UChar c = uchars[i];
......@@ -142,10 +142,10 @@ static void appendEscapedContent(Vector<UChar>& result, pair<const UChar*, size_
unsigned len = range.second;
unsigned lastCopiedFrom = 0;
static const String& ampEntity = *new String("&amp;");
static const String& gtEntity = *new String("&gt;");
static const String& ltEntity = *new String("&lt;");
static const String& nbspEntity = *new String("&nbsp;");
static const String ampEntity("&amp;");
static const String gtEntity("&gt;");
static const String ltEntity("&lt;");
static const String nbspEntity("&nbsp;");
for (unsigned i = 0; i < len; ++i) {
UChar c = uchars[i];
......@@ -316,8 +316,8 @@ static bool shouldAddNamespaceElem(const Element* elem)
static bool shouldAddNamespaceAttr(const Attribute* attr, HashMap<AtomicStringImpl*, AtomicStringImpl*>& namespaces)
{
// Don't add namespace attributes twice
static const AtomicString& xmlnsURI = *new AtomicString("http://www.w3.org/2000/xmlns/");
static const QualifiedName& xmlnsAttr = *new QualifiedName(nullAtom, "xmlns", xmlnsURI);
static const AtomicString xmlnsURI = "http://www.w3.org/2000/xmlns/";
static const QualifiedName xmlnsAttr(nullAtom, "xmlns", xmlnsURI);
if (attr->name() == xmlnsAttr) {
namespaces.set(emptyAtom.impl(), attr->value().impl());
return false;
......@@ -342,7 +342,7 @@ static void appendNamespace(Vector<UChar>& result, const AtomicString& prefix, c
AtomicStringImpl* foundNS = namespaces.get(pre);
if (foundNS != ns.impl()) {
namespaces.set(pre, ns.impl());
static const String& xmlns = *new String("xmlns");
static const String xmlns("xmlns");
result.append(' ');
append(result, xmlns);
if (!prefix.isEmpty()) {
......@@ -501,7 +501,7 @@ static void appendStartMarkup(Vector<UChar>& result, const Node *node, const Ran
if (convert)
style->setProperty(CSSPropertyDisplay, CSSValueInline, true);
if (style->length() > 0) {
static const String& stylePrefix = *new String(" style=\"");
static const String stylePrefix(" style=\"");
append(result, stylePrefix);
appendAttributeValue(result, style->cssText(), documentIsHTML);
result.append('\"');
......@@ -702,7 +702,7 @@ String joinMarkups(const Vector<String> preMarkups, const Vector<String>& postMa
// FIXME: At least, annotation and style info should probably not be included in range.markupString()
String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterchange annotate, bool convertBlocksToInlines)
{
static const String& interchangeNewlineString = *new String("<br class=\"" AppleInterchangeNewline "\">");
static const String interchangeNewlineString = String("<br class=\"") + AppleInterchangeNewline + "\">";
if (!range)
return "";
......@@ -905,14 +905,14 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc
if (style->length()) {
Vector<UChar> openTag;
static const String& divStyle = *new String("<div style=\"");
static const String divStyle("<div style=\"");
append(openTag, divStyle);
appendAttributeValue(openTag, style->cssText(), documentIsHTML);
openTag.append('\"');
openTag.append('>');
preMarkups.append(String::adopt(openTag));
static const String& divCloseTag = *new String("</div>");
static const String divCloseTag("</div>");
markups.append(divCloseTag);
}
} else {
......@@ -929,8 +929,8 @@ String createMarkup(const Range* range, Vector<Node*>* nodes, EAnnotateForInterc
}
}
static const String& styleSpanOpen = *new String("<span class=\"" AppleStyleSpanClass "\" style=\"");
static const String& styleSpanClose = *new String("</span>");
static const String styleSpanOpen = String("<span class=\"" AppleStyleSpanClass "\" style=\"");
static const String styleSpanClose("</span>");
// Add a wrapper span with the styles that all of the nodes in the markup inherit.
Node* parentOfLastClosed = lastClosed ? lastClosed->parentNode() : 0;
......
......@@ -57,15 +57,15 @@ const AtomicString& HTMLButtonElement::type() const
{
switch (m_type) {
case SUBMIT: {
static const AtomicString& submit = *new AtomicString("submit");
static const AtomicString submit("submit");
return submit;
}
case BUTTON: {
static const AtomicString& button = *new AtomicString("button");
static const AtomicString button("button");
return button;
}
case RESET: {
static const AtomicString& reset = *new AtomicString("reset");
static const AtomicString reset("reset");
return reset;
}
}
......
......@@ -808,7 +808,7 @@ bool HTMLElement::childAllowed(Node *newChild)
// This unfortunate function is only needed when checking against the DTD. Other languages (like SVG) won't need this.
bool HTMLElement::isRecognizedTagName(const QualifiedName& tagName)
{
static HashSet<AtomicStringImpl*>& tagList = *new HashSet<AtomicStringImpl*>;
static HashSet<AtomicStringImpl*> tagList;
if (tagList.isEmpty()) {
size_t tagCount = 0;
WebCore::QualifiedName** tags = HTMLNames::getHTMLTags(&tagCount);
......@@ -822,7 +822,7 @@ bool HTMLElement::isRecognizedTagName(const QualifiedName& tagName)
// need to be in these two lists.
HashSet<AtomicStringImpl*>* inlineTagList()
{
static HashSet<AtomicStringImpl*>& tagList = *new HashSet<AtomicStringImpl*>;
static HashSet<AtomicStringImpl*> tagList;
if (tagList.isEmpty()) {
tagList.add(ttTag.localName().impl());
tagList.add(iTag.localName().impl());
......@@ -881,7 +881,7 @@ HashSet<AtomicStringImpl*>* inlineTagList()
HashSet<AtomicStringImpl*>* blockTagList()
{
static HashSet<AtomicStringImpl*>& tagList = *new HashSet<AtomicStringImpl*>;
static HashSet<AtomicStringImpl*> tagList;
if (tagList.isEmpty()) {
tagList.add(addressTag.localName().impl());
tagList.add(blockquoteTag.localName().impl());
......
......@@ -55,7 +55,7 @@ bool HTMLFieldSetElement::isFocusable() const
const AtomicString& HTMLFieldSetElement::type() const
{
static const AtomicString& fieldset = *new AtomicString("fieldset");
static const AtomicString fieldset("fieldset");
return fieldset;
}
......
......@@ -373,53 +373,53 @@ const AtomicString& HTMLInputElement::type() const
// needs to be lowercase according to DOM spec
switch (inputType()) {
case BUTTON: {
static const AtomicString& button = *new AtomicString("button");
static const AtomicString button("button");
return button;
}
case CHECKBOX: {
static const AtomicString& checkbox = *new AtomicString("checkbox");
static const AtomicString checkbox("checkbox");
return checkbox;
}
case FILE: {
static const AtomicString& file = *new AtomicString("file");
static const AtomicString file("file");
return file;
}
case HIDDEN: {
static const AtomicString& hidden = *new AtomicString("hidden");
static const AtomicString hidden("hidden");
return hidden;
}
case IMAGE: {
static const AtomicString& image = *new AtomicString("image");
static const AtomicString image("image");
return image;