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

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

Issue 2443693003: Add parsing support for display: contents, and minimum behavior similar to display: none (Closed)
Patch Set: Add parsing support for display: contents, and minimum behavior similar to display: none 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 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. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // LayoutObject associated with the Document. 128 // LayoutObject associated with the Document.
129 // 129 //
130 // Some LayoutObjects don't have an associated Node and are called "anonymous" 130 // Some LayoutObjects don't have an associated Node and are called "anonymous"
131 // (see the constructor below). Anonymous LayoutObjects exist for several 131 // (see the constructor below). Anonymous LayoutObjects exist for several
132 // purposes but are usually required by CSS. A good example is anonymous table 132 // purposes but are usually required by CSS. A good example is anonymous table
133 // parts (see LayoutTable for the expected structure). Anonymous LayoutObjects 133 // parts (see LayoutTable for the expected structure). Anonymous LayoutObjects
134 // are generated when a new child is added to the tree in addChild(). See the 134 // are generated when a new child is added to the tree in addChild(). See the
135 // function for some important information on this. 135 // function for some important information on this.
136 // 136 //
137 // Also some Node don't have an associated LayoutObjects e.g. if display: none 137 // Also some Node don't have an associated LayoutObjects e.g. if display: none
138 // is set. For more detail, see LayoutObject::createObject that creates the 138 // or display: contents is set. For more detail, see LayoutObject::createObject
139 // right LayoutObject based on the style. 139 // that creates the right LayoutObject based on the style.
140 // 140 //
141 // Because the SVG and CSS classes both inherit from this object, functions can 141 // Because the SVG and CSS classes both inherit from this object, functions can
142 // belong to either realm and sometimes to both. 142 // belong to either realm and sometimes to both.
143 // 143 //
144 // The purpose of the layout tree is to do layout (aka reflow) and store its 144 // The purpose of the layout tree is to do layout (aka reflow) and store its
145 // results for painting and hit-testing. Layout is the process of sizing and 145 // results for painting and hit-testing. Layout is the process of sizing and
146 // positioning Nodes on the page. In Blink, layouts always start from a relayout 146 // positioning Nodes on the page. In Blink, layouts always start from a relayout
147 // boundary (see objectIsRelayoutBoundary in LayoutObject.cpp). As such, we 147 // boundary (see objectIsRelayoutBoundary in LayoutObject.cpp). As such, we
148 // need to mark the ancestors all the way to the enclosing relayout boundary in 148 // need to mark the ancestors all the way to the enclosing relayout boundary in
149 // order to do a correct layout. 149 // order to do a correct layout.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 void showLayoutObject(StringBuilder&) const; 467 void showLayoutObject(StringBuilder&) const;
468 void showLayoutTreeAndMark(const LayoutObject* markedObject1 = nullptr, 468 void showLayoutTreeAndMark(const LayoutObject* markedObject1 = nullptr,
469 const char* markedLabel1 = nullptr, 469 const char* markedLabel1 = nullptr,
470 const LayoutObject* markedObject2 = nullptr, 470 const LayoutObject* markedObject2 = nullptr,
471 const char* markedLabel2 = nullptr, 471 const char* markedLabel2 = nullptr,
472 unsigned depth = 0) const; 472 unsigned depth = 0) const;
473 #endif 473 #endif
474 474
475 // This function is used to create the appropriate LayoutObject based 475 // This function is used to create the appropriate LayoutObject based
476 // on the style, in particular 'display' and 'content'. 476 // on the style, in particular 'display' and 'content'.
477 // "display: none" is the only time this function will return nullptr. 477 // "display: none" or "display: contents" are the only times this function
478 // will return nullptr.
478 // 479 //
479 // For renderer creation, the inline-* values create the same renderer 480 // For renderer creation, the inline-* values create the same renderer
480 // as the non-inline version. The difference is that inline-* sets 481 // as the non-inline version. The difference is that inline-* sets
481 // m_isInline during initialization. This means that 482 // m_isInline during initialization. This means that
482 // "display: inline-table" creates a LayoutTable, like "display: table". 483 // "display: inline-table" creates a LayoutTable, like "display: table".
483 // 484 //
484 // Ideally every Element::createLayoutObject would call this function to 485 // Ideally every Element::createLayoutObject would call this function to
485 // respond to 'display' but there are deep rooted assumptions about 486 // respond to 'display' but there are deep rooted assumptions about
486 // which LayoutObject is created on a fair number of Elements. This 487 // which LayoutObject is created on a fair number of Elements. This
487 // function also doesn't handle the default association between a tag 488 // function also doesn't handle the default association between a tag
(...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 CORE_EXPORT void showLineTree(const blink::LayoutObject*); 2598 CORE_EXPORT void showLineTree(const blink::LayoutObject*);
2598 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); 2599 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1);
2599 // We don't make object2 an optional parameter so that showLayoutTree 2600 // We don't make object2 an optional parameter so that showLayoutTree
2600 // can be called from gdb easily. 2601 // can be called from gdb easily.
2601 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, 2602 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1,
2602 const blink::LayoutObject* object2); 2603 const blink::LayoutObject* object2);
2603 2604
2604 #endif 2605 #endif
2605 2606
2606 #endif // LayoutObject_h 2607 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.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