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

Unified Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 2476163002: Fixed perf regression by removing tree traversal for text sibling. (Closed)
Patch Set: Rebased Created 4 years, 1 month 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/dom/Document.h
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index 659622b432c021e71531f588be40a87f81900efe..738c3fb5959da833230adce7b1d64dd00caac1ec 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -41,8 +41,10 @@
#include "core/dom/DocumentTiming.h"
#include "core/dom/ExecutionContext.h"
#include "core/dom/MutationObserver.h"
+#include "core/dom/StyleReattachData.h"
#include "core/dom/SynchronousMutationNotifier.h"
#include "core/dom/SynchronousMutationObserver.h"
+#include "core/dom/Text.h"
#include "core/dom/TextLinkColors.h"
#include "core/dom/TreeScope.h"
#include "core/dom/UserActionElementSet.h"
@@ -53,6 +55,7 @@
#include "core/frame/HostsUsingFeatures.h"
#include "core/html/parser/ParserSynchronizationPolicy.h"
#include "core/page/PageVisibilityState.h"
+#include "core/style/ComputedStyle.h"
#include "platform/Length.h"
#include "platform/Timer.h"
#include "platform/weborigin/KURL.h"
@@ -161,7 +164,6 @@ class StringOrDictionary;
class StyleEngine;
class StyleResolver;
class StyleSheetList;
-class Text;
class TextAutosizer;
class Touch;
class TouchList;
@@ -348,8 +350,8 @@ class CORE_EXPORT Document : public ContainerNode,
Range* caretRangeFromPoint(int x, int y);
Element* scrollingElement();
- void addNonAttachedStyle(Element&, RefPtr<ComputedStyle>);
- ComputedStyle* getNonAttachedStyle(Element&);
+ void addStyleReattachData(Element&, StyleReattachData&);
+ StyleReattachData getStyleReattachData(Element&);
String readyState() const;
@@ -1443,7 +1445,7 @@ class CORE_EXPORT Document : public ContainerNode,
Member<DocumentParser> m_parser;
Member<ContextFeatures> m_contextFeatures;
- HeapHashMap<Member<Element>, RefPtr<ComputedStyle>> m_nonAttachedStyle;
+ HeapHashMap<Member<Element>, StyleReattachData> m_styleReattachDataMap;
bool m_wellFormed;
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698