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

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

Issue 1930363002: Avoid clobbering state in viewport tag initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review comments Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 DEFINE_ATTRIBUTE_EVENT_LISTENER(paste); 257 DEFINE_ATTRIBUTE_EVENT_LISTENER(paste);
258 DEFINE_ATTRIBUTE_EVENT_LISTENER(pointerlockchange); 258 DEFINE_ATTRIBUTE_EVENT_LISTENER(pointerlockchange);
259 DEFINE_ATTRIBUTE_EVENT_LISTENER(pointerlockerror); 259 DEFINE_ATTRIBUTE_EVENT_LISTENER(pointerlockerror);
260 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange); 260 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange);
261 DEFINE_ATTRIBUTE_EVENT_LISTENER(search); 261 DEFINE_ATTRIBUTE_EVENT_LISTENER(search);
262 DEFINE_ATTRIBUTE_EVENT_LISTENER(securitypolicyviolation); 262 DEFINE_ATTRIBUTE_EVENT_LISTENER(securitypolicyviolation);
263 DEFINE_ATTRIBUTE_EVENT_LISTENER(selectionchange); 263 DEFINE_ATTRIBUTE_EVENT_LISTENER(selectionchange);
264 DEFINE_ATTRIBUTE_EVENT_LISTENER(selectstart); 264 DEFINE_ATTRIBUTE_EVENT_LISTENER(selectstart);
265 DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel); 265 DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel);
266 266
267 bool shouldMergeWithLegacyDescription(ViewportDescription::Type); 267 bool shouldMergeWithLegacyDescription(ViewportDescription::Type) const;
268 bool shouldOverrideLegacyDescription(ViewportDescription::Type); 268 bool shouldOverrideLegacyDescription(ViewportDescription::Type) const;
269 void setViewportDescription(const ViewportDescription&); 269 void setViewportDescription(const ViewportDescription&);
270 const ViewportDescription& viewportDescription() const { return m_viewportDe scription; } 270 ViewportDescription viewportDescription() const;
271 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; } 271 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; }
272 272
273 String outgoingReferrer() const override; 273 String outgoingReferrer() const override;
274 274
275 void setDoctype(DocumentType*); 275 void setDoctype(DocumentType*);
276 DocumentType* doctype() const { return m_docType.get(); } 276 DocumentType* doctype() const { return m_docType.get(); }
277 277
278 DOMImplementation& implementation(); 278 DOMImplementation& implementation();
279 279
280 Element* documentElement() const 280 Element* documentElement() const
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 Member<IntersectionObserverController> m_intersectionObserverController; 1407 Member<IntersectionObserverController> m_intersectionObserverController;
1408 Member<NodeIntersectionObserverData> m_intersectionObserverData; 1408 Member<NodeIntersectionObserverData> m_intersectionObserverData;
1409 1409
1410 int m_nodeCount; 1410 int m_nodeCount;
1411 1411
1412 bool m_mayContainV0Shadow = false; 1412 bool m_mayContainV0Shadow = false;
1413 }; 1413 };
1414 1414
1415 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>; 1415 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>;
1416 1416
1417 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin) 1417 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin) const
1418 { 1418 {
1419 // The different (legacy) meta tags have different priorities based on the t ype 1419 // The different (legacy) meta tags have different priorities based on the t ype
1420 // regardless of which order they appear in the DOM. The priority is given b y the 1420 // regardless of which order they appear in the DOM. The priority is given b y the
1421 // ViewportDescription::Type enum. 1421 // ViewportDescription::Type enum.
1422 return origin >= m_legacyViewportDescription.type; 1422 return origin >= m_legacyViewportDescription.type;
1423 } 1423 }
1424 1424
1425 inline void Document::scheduleLayoutTreeUpdateIfNeeded() 1425 inline void Document::scheduleLayoutTreeUpdateIfNeeded()
1426 { 1426 {
1427 // Inline early out to avoid the function calls below. 1427 // Inline early out to avoid the function calls below.
(...skipping 24 matching lines...) Expand all
1452 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1452 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1453 1453
1454 } // namespace blink 1454 } // namespace blink
1455 1455
1456 #ifndef NDEBUG 1456 #ifndef NDEBUG
1457 // Outside the WebCore namespace for ease of invocation from gdb. 1457 // Outside the WebCore namespace for ease of invocation from gdb.
1458 CORE_EXPORT void showLiveDocumentInstances(); 1458 CORE_EXPORT void showLiveDocumentInstances();
1459 #endif 1459 #endif
1460 1460
1461 #endif // Document_h 1461 #endif // Document_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698