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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 2789363002: Styling slot fallback content with ::slotted()
Patch Set: clean up Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/probe/CoreProbes.h" 44 #include "core/probe/CoreProbes.h"
45 45
46 namespace blink { 46 namespace blink {
47 47
48 using namespace HTMLNames; 48 using namespace HTMLNames;
49 49
50 inline HTMLSlotElement::HTMLSlotElement(Document& document) 50 inline HTMLSlotElement::HTMLSlotElement(Document& document)
51 : HTMLElement(slotTag, document) { 51 : HTMLElement(slotTag, document) {
52 UseCounter::Count(document, UseCounter::kHTMLSlotElement); 52 UseCounter::Count(document, UseCounter::kHTMLSlotElement);
53 SetHasCustomStyleCallbacks(); 53 SetHasCustomStyleCallbacks();
54 // TODO(kochi): This is required for slot fallback contents to be matched
55 // against ::slotted() pseudo element in a document tree. Remove this once
56 // Shadow DOM V0 code is removed.
57 document.SetShadowCascadeOrder(ShadowCascadeOrder::kShadowCascadeV1);
54 } 58 }
55 59
56 DEFINE_NODE_FACTORY(HTMLSlotElement); 60 DEFINE_NODE_FACTORY(HTMLSlotElement);
57 61
58 // static 62 // static
59 AtomicString HTMLSlotElement::NormalizeSlotName(const AtomicString& name) { 63 AtomicString HTMLSlotElement::NormalizeSlotName(const AtomicString& name) {
60 return (name.IsNull() || name.IsEmpty()) ? g_empty_atom : name; 64 return (name.IsNull() || name.IsEmpty()) ? g_empty_atom : name;
61 } 65 }
62 66
63 const HeapVector<Member<Node>>& HTMLSlotElement::AssignedNodes() { 67 const HeapVector<Member<Node>>& HTMLSlotElement::AssignedNodes() {
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 366
363 DEFINE_TRACE(HTMLSlotElement) { 367 DEFINE_TRACE(HTMLSlotElement) {
364 visitor->Trace(assigned_nodes_); 368 visitor->Trace(assigned_nodes_);
365 visitor->Trace(distributed_nodes_); 369 visitor->Trace(distributed_nodes_);
366 visitor->Trace(old_distributed_nodes_); 370 visitor->Trace(old_distributed_nodes_);
367 visitor->Trace(distributed_indices_); 371 visitor->Trace(distributed_indices_);
368 HTMLElement::Trace(visitor); 372 HTMLElement::Trace(visitor);
369 } 373 }
370 374
371 } // namespace blink 375 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698