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

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

Issue 2450093005: Support display: contents for elements, first-line and first-letter pseudos. (Closed)
Patch Set: Support display: contents for elements, first-line and first-letter pseudos. 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/Element.h
diff --git a/third_party/WebKit/Source/core/dom/Element.h b/third_party/WebKit/Source/core/dom/Element.h
index bf894d78d7eea157064b794058ce63c6e7e50d92..8b348c29d92e647dd3a56a72f929d20273ac54ae 100644
--- a/third_party/WebKit/Source/core/dom/Element.h
+++ b/third_party/WebKit/Source/core/dom/Element.h
@@ -440,8 +440,21 @@ class CORE_EXPORT Element : public ContainerNode {
// stored on the Element, computes the ComputedStyle and stores it on the
// Element’s ElementRareData. Used for getComputedStyle when Element is
// display none.
+ //
+ // Also, note that the same is used to store "display: contents" elements
+ // styles.
const ComputedStyle* ensureComputedStyle(PseudoId = PseudoIdNone);
+ // Returns the display: contents style.
+ const ComputedStyle* displayContentsStyle() const;
+
+ ComputedStyle* mutableDisplayContentsStyle() const {
+ return const_cast<ComputedStyle*>(displayContentsStyle());
+ }
+
+ // Stores the "display: contents" style of the element.
+ void storeDisplayContentsStyle(ComputedStyle&);
+
// Methods for indicating the style is affected by dynamic updates (e.g.,
// children changing, our position changing in our sibling list, etc.)
bool styleAffectedByEmpty() const {

Powered by Google App Engine
This is Rietveld 408576698