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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 2376453004: Stash ComputedStyles on new HeapHashMap on Document. (Closed)
Patch Set: Post LGTM with nits changes Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 Element* createElementNS(const AtomicString& namespaceURI, 321 Element* createElementNS(const AtomicString& namespaceURI,
322 const AtomicString& qualifiedName, 322 const AtomicString& qualifiedName,
323 ExceptionState&); 323 ExceptionState&);
324 Element* createElement(const QualifiedName&, CreateElementFlags); 324 Element* createElement(const QualifiedName&, CreateElementFlags);
325 325
326 Element* elementFromPoint(int x, int y) const; 326 Element* elementFromPoint(int x, int y) const;
327 HeapVector<Member<Element>> elementsFromPoint(int x, int y) const; 327 HeapVector<Member<Element>> elementsFromPoint(int x, int y) const;
328 Range* caretRangeFromPoint(int x, int y); 328 Range* caretRangeFromPoint(int x, int y);
329 Element* scrollingElement(); 329 Element* scrollingElement();
330 330
331 void addNonAttachedStyle(Element&, RefPtr<ComputedStyle>);
332 RefPtr<ComputedStyle> getNonAttachedStyle(Element&);
esprehn 2016/10/05 03:37:22 This should return ComputedStyle* btw, you're not
nainar 2016/10/05 04:33:12 Done.
333
331 String readyState() const; 334 String readyState() const;
332 335
333 AtomicString characterSet() const { return Document::encodingName(); } 336 AtomicString characterSet() const { return Document::encodingName(); }
334 337
335 AtomicString encodingName() const; 338 AtomicString encodingName() const;
336 339
337 void setContent(const String&); 340 void setContent(const String&);
338 341
339 String suggestedMIMEType() const; 342 String suggestedMIMEType() const;
340 void setMimeType(const AtomicString&); 343 void setMimeType(const AtomicString&);
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 PendingSheetLayout m_pendingSheetLayout; 1407 PendingSheetLayout m_pendingSheetLayout;
1405 1408
1406 Member<LocalFrame> m_frame; 1409 Member<LocalFrame> m_frame;
1407 Member<LocalDOMWindow> m_domWindow; 1410 Member<LocalDOMWindow> m_domWindow;
1408 Member<HTMLImportsController> m_importsController; 1411 Member<HTMLImportsController> m_importsController;
1409 1412
1410 Member<ResourceFetcher> m_fetcher; 1413 Member<ResourceFetcher> m_fetcher;
1411 Member<DocumentParser> m_parser; 1414 Member<DocumentParser> m_parser;
1412 Member<ContextFeatures> m_contextFeatures; 1415 Member<ContextFeatures> m_contextFeatures;
1413 1416
1417 HeapHashMap<Member<Element>, RefPtr<ComputedStyle>> m_nonAttachedStyle;
1418
1414 bool m_wellFormed; 1419 bool m_wellFormed;
1415 1420
1416 // Document URLs. 1421 // Document URLs.
1417 KURL m_url; // Document.URL: The URL from which this document was retrieved. 1422 KURL m_url; // Document.URL: The URL from which this document was retrieved.
1418 KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs. 1423 KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs.
1419 KURL m_baseURLOverride; // An alternative base URL that takes precedence over 1424 KURL m_baseURLOverride; // An alternative base URL that takes precedence over
1420 // m_baseURL (but not m_baseElementURL). 1425 // m_baseURL (but not m_baseElementURL).
1421 KURL m_baseElementURL; // The URL set by the <base> element. 1426 KURL m_baseElementURL; // The URL set by the <base> element.
1422 KURL m_cookieURL; // The URL to use for cookie access. 1427 KURL m_cookieURL; // The URL to use for cookie access.
1423 std::unique_ptr<OriginAccessEntry> m_accessEntryFromURL; 1428 std::unique_ptr<OriginAccessEntry> m_accessEntryFromURL;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1685 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1681 1686
1682 } // namespace blink 1687 } // namespace blink
1683 1688
1684 #ifndef NDEBUG 1689 #ifndef NDEBUG
1685 // Outside the WebCore namespace for ease of invocation from gdb. 1690 // Outside the WebCore namespace for ease of invocation from gdb.
1686 CORE_EXPORT void showLiveDocumentInstances(); 1691 CORE_EXPORT void showLiveDocumentInstances();
1687 #endif 1692 #endif
1688 1693
1689 #endif // Document_h 1694 #endif // Document_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | third_party/WebKit/Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698