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

Side by Side 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 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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 ShadowRoot* shadowRootIfV1() const; 433 ShadowRoot* shadowRootIfV1() const;
434 434
435 ShadowRoot& ensureUserAgentShadowRoot(); 435 ShadowRoot& ensureUserAgentShadowRoot();
436 436
437 bool isInDescendantTreeOf(const Element* shadowHost) const; 437 bool isInDescendantTreeOf(const Element* shadowHost) const;
438 438
439 // Returns the Element’s ComputedStyle. If the ComputedStyle is not already 439 // Returns the Element’s ComputedStyle. If the ComputedStyle is not already
440 // stored on the Element, computes the ComputedStyle and stores it on the 440 // stored on the Element, computes the ComputedStyle and stores it on the
441 // Element’s ElementRareData. Used for getComputedStyle when Element is 441 // Element’s ElementRareData. Used for getComputedStyle when Element is
442 // display none. 442 // display none.
443 //
444 // Also, note that the same is used to store "display: contents" elements
445 // styles.
443 const ComputedStyle* ensureComputedStyle(PseudoId = PseudoIdNone); 446 const ComputedStyle* ensureComputedStyle(PseudoId = PseudoIdNone);
444 447
448 // Returns the display: contents style.
449 ComputedStyle* displayContentsStyle() const;
jfernandez 2016/10/27 17:08:01 I guess we want the return value to be const.
450
451 // Stores the "display: contents" style of the element.
452 void storeDisplayContentsStyle(ComputedStyle&);
453
445 // Methods for indicating the style is affected by dynamic updates (e.g., 454 // Methods for indicating the style is affected by dynamic updates (e.g.,
446 // children changing, our position changing in our sibling list, etc.) 455 // children changing, our position changing in our sibling list, etc.)
447 bool styleAffectedByEmpty() const { 456 bool styleAffectedByEmpty() const {
448 return hasElementFlag(StyleAffectedByEmpty); 457 return hasElementFlag(StyleAffectedByEmpty);
449 } 458 }
450 void setStyleAffectedByEmpty() { setElementFlag(StyleAffectedByEmpty); } 459 void setStyleAffectedByEmpty() { setElementFlag(StyleAffectedByEmpty); }
451 460
452 void setIsInCanvasSubtree(bool value) { 461 void setIsInCanvasSubtree(bool value) {
453 setElementFlag(IsInCanvasSubtree, value); 462 setElementFlag(IsInCanvasSubtree, value);
454 } 463 }
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1168 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1160 static T* create(const QualifiedName&, Document&) 1169 static T* create(const QualifiedName&, Document&)
1161 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1170 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1162 T* T::create(const QualifiedName& tagName, Document& document) { \ 1171 T* T::create(const QualifiedName& tagName, Document& document) { \
1163 return new T(tagName, document); \ 1172 return new T(tagName, document); \
1164 } 1173 }
1165 1174
1166 } // namespace blink 1175 } // namespace blink
1167 1176
1168 #endif // Element_h 1177 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698