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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h

Issue 1489433002: Support the essential part of Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit tests. Fixed a minor bug in distribution. Created 5 years 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/shadow/SlotAssignment.h
diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.h b/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h
similarity index 76%
copy from third_party/WebKit/Source/core/html/HTMLSlotElement.h
copy to third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h
index beb03d132fe4c8d2782f6b8b9ae1ec29a73647bc..84d0336a52fe4fa52792f1f0d2d675fade05ade9 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.h
+++ b/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h
@@ -28,28 +28,30 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLSlotElement_h
-#define HTMLSlotElement_h
+#ifndef SlotAssignment_h
+#define SlotAssignment_h
-#include "core/CoreExport.h"
-#include "core/html/HTMLElement.h"
+#include "platform/heap/Handle.h"
namespace blink {
-class CORE_EXPORT HTMLSlotElement final : public HTMLElement {
- DEFINE_WRAPPERTYPEINFO();
+class HTMLSlotElement;
+class Node;
+class ShadowRoot;
+
+class SlotAssignment final {
public:
- static PassRefPtrWillBeRawPtr<HTMLSlotElement> create(Document&);
- ~HTMLSlotElement() override;
+ SlotAssignment() { }
+ HTMLSlotElement* assignedSlotFor(const Node&) const;
+ void resolveAssignment(const ShadowRoot&);
- DECLARE_VIRTUAL_TRACE();
+ DECLARE_TRACE();
private:
- HTMLSlotElement(Document&);
-
- AtomicString m_name;
+ void assign(Node&, HTMLSlotElement&);
+ WillBeHeapHashMap<RawPtrWillBeMember<Node>, RawPtrWillBeMember<HTMLSlotElement>> m_assignment;
};
} // namespace blink
-#endif // HTMLSlotElement_h
+#endif // HTMLSlotAssignment_h
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h ('k') | third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698