Title: [159909] trunk/Source/WebCore
- Revision
- 159909
- Author
- [email protected]
- Date
- 2013-12-01 19:36:42 -0800 (Sun, 01 Dec 2013)
Log Message
Unreviewed, rolling out r159764.
http://trac.webkit.org/changeset/159764
https://bugs.webkit.org/show_bug.cgi?id=125055
appears to hurt html5-full-render times (Requested by kling on
#webkit).
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertTextNode):
* html/parser/HTMLConstructionSite.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (159908 => 159909)
--- trunk/Source/WebCore/ChangeLog 2013-12-02 03:36:12 UTC (rev 159908)
+++ trunk/Source/WebCore/ChangeLog 2013-12-02 03:36:42 UTC (rev 159909)
@@ -1,3 +1,16 @@
+2013-12-01 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r159764.
+ http://trac.webkit.org/changeset/159764
+ https://bugs.webkit.org/show_bug.cgi?id=125055
+
+ appears to hurt html5-full-render times (Requested by kling on
+ #webkit).
+
+ * html/parser/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::insertTextNode):
+ * html/parser/HTMLConstructionSite.h:
+
2013-12-01 Andreas Kling <[email protected]>
Make more computed style helpers return PassRef.
Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp (159908 => 159909)
--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2013-12-02 03:36:12 UTC (rev 159908)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2013-12-02 03:36:42 UTC (rev 159909)
@@ -505,11 +505,11 @@
}
while (currentPosition < characters.length()) {
- RefPtr<Text> textNode = Text::createWithLengthLimit(task.parent->document(), stringForTextNode(characters, shouldUseAtomicString), currentPosition, lengthLimit);
+ RefPtr<Text> textNode = Text::createWithLengthLimit(task.parent->document(), shouldUseAtomicString ? AtomicString(characters).string() : characters, currentPosition, lengthLimit);
// If we have a whole string of unbreakable characters the above could lead to an infinite loop. Exceeding the length limit is the lesser evil.
if (!textNode->length()) {
String substring = characters.substring(currentPosition);
- textNode = Text::create(task.parent->document(), stringForTextNode(substring, shouldUseAtomicString));
+ textNode = Text::create(task.parent->document(), shouldUseAtomicString ? AtomicString(substring).string() : substring);
}
currentPosition += textNode->length();
@@ -666,14 +666,4 @@
m_attachmentQueue.append(task);
}
-String HTMLConstructionSite::stringForTextNode(const String& string, bool shouldUseAtomicString)
-{
- static const unsigned maximumLengthForDeduplication = 64;
- if (shouldUseAtomicString)
- return AtomicString(string).string();
- if (string.length() > maximumLengthForDeduplication)
- return string;
- return *m_stringsForDeduplication.add(string).iterator;
}
-
-}
Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.h (159908 => 159909)
--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.h 2013-12-02 03:36:12 UTC (rev 159908)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.h 2013-12-02 03:36:42 UTC (rev 159909)
@@ -170,8 +170,6 @@
void mergeAttributesFromTokenIntoElement(AtomicHTMLToken*, Element*);
void dispatchDocumentElementAvailableIfNeeded();
- String stringForTextNode(const String&, bool shouldUseAtomicString);
-
Document* m_document;
// This is the root ContainerNode to which the parser attaches all newly
@@ -198,8 +196,6 @@
unsigned m_maximumDOMTreeDepth;
bool m_inQuirksMode;
-
- HashSet<String> m_stringsForDeduplication;
};
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes