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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 1878943011: CL for perf tryjob on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 { 117 {
118 return draggable == o.draggable && bounds == o.bounds; 118 return draggable == o.draggable && bounds == o.bounds;
119 } 119 }
120 120
121 LayoutRect bounds; 121 LayoutRect bounds;
122 bool draggable; 122 bool draggable;
123 }; 123 };
124 124
125 typedef WTF::HashMap<const PaintLayer*, Vector<LayoutRect>> LayerHitTestRects; 125 typedef WTF::HashMap<const PaintLayer*, Vector<LayoutRect>> LayerHitTestRects;
126 126
127 #ifndef NDEBUG 127 //#ifndef NDEBUG
128 const int showTreeCharacterOffset = 39; 128 const int showTreeCharacterOffset = 39;
129 #endif 129 //#endif
130 130
131 // LayoutObject is the base class for all layout tree objects. 131 // LayoutObject is the base class for all layout tree objects.
132 // 132 //
133 // LayoutObjects form a tree structure that is a close mapping of the DOM tree. 133 // LayoutObjects form a tree structure that is a close mapping of the DOM tree.
134 // The root of the LayoutObject tree is the LayoutView, which is 134 // The root of the LayoutObject tree is the LayoutView, which is
135 // the LayoutObject associated with the Document. 135 // the LayoutObject associated with the Document.
136 // 136 //
137 // Some LayoutObjects don't have an associated Node and are called "anonymous" 137 // Some LayoutObjects don't have an associated Node and are called "anonymous"
138 // (see the constructor below). Anonymous LayoutObjects exist for several 138 // (see the constructor below). Anonymous LayoutObjects exist for several
139 // purposes but are usually required by CSS. A good example is anonymous table 139 // purposes but are usually required by CSS. A good example is anonymous table
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 void addAbsoluteRectForLayer(IntRect& result); 433 void addAbsoluteRectForLayer(IntRect& result);
434 bool requiresAnonymousTableWrappers(const LayoutObject*) const; 434 bool requiresAnonymousTableWrappers(const LayoutObject*) const;
435 435
436 // Gets pseudoStyle from Shadow host(in case of input elements) 436 // Gets pseudoStyle from Shadow host(in case of input elements)
437 // or from Parent element. 437 // or from Parent element.
438 PassRefPtr<ComputedStyle> getUncachedPseudoStyleFromParentOrShadowHost() con st; 438 PassRefPtr<ComputedStyle> getUncachedPseudoStyleFromParentOrShadowHost() con st;
439 439
440 bool skipInvalidationWhenLaidOutChildren() const; 440 bool skipInvalidationWhenLaidOutChildren() const;
441 441
442 public: 442 public:
443 #ifndef NDEBUG 443 //#ifndef NDEBUG
444 void showTreeForThis() const; 444 void showTreeForThis() const;
445 void showLayoutTreeForThis() const; 445 void showLayoutTreeForThis() const;
446 void showLineTreeForThis() const; 446 void showLineTreeForThis() const;
447 447
448 void showLayoutObject() const; 448 void showLayoutObject() const;
449 // We don't make printedCharacters an optional parameter so that 449 // We don't make printedCharacters an optional parameter so that
450 // showLayoutObject can be called from gdb easily. 450 // showLayoutObject can be called from gdb easily.
451 void showLayoutObject(int printedCharacters) const; 451 void showLayoutObject(int printedCharacters) const;
452 void showLayoutTreeAndMark(const LayoutObject* markedObject1 = nullptr, cons t char* markedLabel1 = nullptr, const LayoutObject* markedObject2 = nullptr, con st char* markedLabel2 = nullptr, int depth = 0) const; 452 void showLayoutTreeAndMark(const LayoutObject* markedObject1 = nullptr, cons t char* markedLabel1 = nullptr, const LayoutObject* markedObject2 = nullptr, con st char* markedLabel2 = nullptr, int depth = 0) const;
453 #endif 453 //#endif
454 454
455 // This function is used to create the appropriate LayoutObject based 455 // This function is used to create the appropriate LayoutObject based
456 // on the style, in particular 'display' and 'content'. 456 // on the style, in particular 'display' and 'content'.
457 // "display: none" is the only time this function will return nullptr. 457 // "display: none" is the only time this function will return nullptr.
458 // 458 //
459 // For renderer creation, the inline-* values create the same renderer 459 // For renderer creation, the inline-* values create the same renderer
460 // as the non-inline version. The difference is that inline-* sets 460 // as the non-inline version. The difference is that inline-* sets
461 // m_isInline during initialization. This means that 461 // m_isInline during initialization. This means that
462 // "display: inline-table" creates a LayoutTable, like "display: table". 462 // "display: inline-table" creates a LayoutTable, like "display: table".
463 // 463 //
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 { 2162 {
2163 ASSERT(layoutObject.style()); 2163 ASSERT(layoutObject.style());
2164 return adjustScrollForAbsoluteZoom(value, *layoutObject.style()); 2164 return adjustScrollForAbsoluteZoom(value, *layoutObject.style());
2165 } 2165 }
2166 2166
2167 #define DEFINE_LAYOUT_OBJECT_TYPE_CASTS(thisType, predicate) \ 2167 #define DEFINE_LAYOUT_OBJECT_TYPE_CASTS(thisType, predicate) \
2168 DEFINE_TYPE_CASTS(thisType, LayoutObject, object, object->predicate, object. predicate) 2168 DEFINE_TYPE_CASTS(thisType, LayoutObject, object, object->predicate, object. predicate)
2169 2169
2170 } // namespace blink 2170 } // namespace blink
2171 2171
2172 #ifndef NDEBUG 2172 //#ifndef NDEBUG
2173 // Outside the WebCore namespace for ease of invocation from gdb. 2173 // Outside the WebCore namespace for ease of invocation from gdb.
2174 void showTree(const blink::LayoutObject*); 2174 void showTree(const blink::LayoutObject*);
2175 void showLineTree(const blink::LayoutObject*); 2175 void showLineTree(const blink::LayoutObject*);
2176 void showLayoutTree(const blink::LayoutObject* object1); 2176 void showLayoutTree(const blink::LayoutObject* object1);
2177 // We don't make object2 an optional parameter so that showLayoutTree 2177 // We don't make object2 an optional parameter so that showLayoutTree
2178 // can be called from gdb easily. 2178 // can be called from gdb easily.
2179 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2179 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2180 2180
2181 #endif 2181 //#endif
2182 2182
2183 #endif // LayoutObject_h 2183 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698