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

Unified Diff: Source/core/dom/MarkerPseudoElement.h

Issue 778003003: List marker pseudo elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/LayoutTreeBuilder.cpp ('k') | Source/core/dom/MarkerPseudoElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/MarkerPseudoElement.h
diff --git a/Source/core/dom/MarkerPseudoElement.h b/Source/core/dom/MarkerPseudoElement.h
new file mode 100644
index 0000000000000000000000000000000000000000..581e68fd0624c43870cd5cb5906a0f4d336e71f0
--- /dev/null
+++ b/Source/core/dom/MarkerPseudoElement.h
@@ -0,0 +1,47 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MarkerPseudoElement_h
+#define MarkerPseudoElement_h
+
+#include "core/dom/PseudoElement.h"
+
+namespace blink {
+
+class LayoutBlockFlow;
+class LayoutListMarker;
+
+class MarkerPseudoElement final : public PseudoElement {
+ WTF_MAKE_NONCOPYABLE(MarkerPseudoElement);
+public:
+ static PassRefPtrWillBeRawPtr<MarkerPseudoElement> create(Element* parent)
+ {
+ return adoptRefWillBeNoop(new MarkerPseudoElement(parent));
+ }
+
+ virtual ~MarkerPseudoElement();
+
+ void attach(const AttachContext& = AttachContext()) override;
+
+ LayoutObject* createLayoutObject(const ComputedStyle&) override;
+
+ // FIXME: Make these private and file static when old code is removed.
+ static LayoutObject* parentOfFirstLineBox(LayoutObject* curr, const LayoutObject* marker);
+ static LayoutObject* firstNonMarkerChild(LayoutObject* parent);
+
+ static PassRefPtr<ComputedStyle> styleForListMarker(LayoutObject&, const ComputedStyle*);
+
+ void attachListMarker();
+
+private:
+ explicit MarkerPseudoElement(Element*);
+
+ void didRecalcStyle(StyleRecalcChange) override;
+};
+
+DEFINE_ELEMENT_TYPE_CASTS(MarkerPseudoElement, isMarkerPseudoElement());
+
+} // namespace blink
+
+#endif // MarkerPseudoElement_h
« no previous file with comments | « Source/core/dom/LayoutTreeBuilder.cpp ('k') | Source/core/dom/MarkerPseudoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698