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

Side by Side Diff: Source/core/dom/shadow/InsertionPoint.cpp

Issue 16599003: :hover style not applied on hover if its display property is different from original style's (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch (fixed test that was expected to fail and is now passing) Created 7 years, 6 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
« no previous file with comments | « Source/core/dom/shadow/InsertionPoint.h ('k') | Source/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 InsertionPoint::InsertionPoint(const QualifiedName& tagName, Document* document) 44 InsertionPoint::InsertionPoint(const QualifiedName& tagName, Document* document)
45 : HTMLElement(tagName, document, CreateInsertionPoint) 45 : HTMLElement(tagName, document, CreateInsertionPoint)
46 , m_registeredWithShadowRoot(false) 46 , m_registeredWithShadowRoot(false)
47 { 47 {
48 } 48 }
49 49
50 InsertionPoint::~InsertionPoint() 50 InsertionPoint::~InsertionPoint()
51 { 51 {
52 } 52 }
53 53
54 void InsertionPoint::attach() 54 void InsertionPoint::attach(const AttachContext& context)
55 { 55 {
56 if (ShadowRoot* shadowRoot = containingShadowRoot()) 56 if (ShadowRoot* shadowRoot = containingShadowRoot())
57 ContentDistributor::ensureDistribution(shadowRoot); 57 ContentDistributor::ensureDistribution(shadowRoot);
58 for (size_t i = 0; i < m_distribution.size(); ++i) { 58 for (size_t i = 0; i < m_distribution.size(); ++i) {
59 if (!m_distribution.at(i)->attached()) 59 if (!m_distribution.at(i)->attached())
60 m_distribution.at(i)->attach(); 60 m_distribution.at(i)->attach(context);
61 } 61 }
62 62
63 HTMLElement::attach(); 63 HTMLElement::attach(context);
64 } 64 }
65 65
66 void InsertionPoint::detach() 66 void InsertionPoint::detach(const AttachContext& context)
67 { 67 {
68 if (ShadowRoot* shadowRoot = containingShadowRoot()) 68 if (ShadowRoot* shadowRoot = containingShadowRoot())
69 ContentDistributor::ensureDistribution(shadowRoot); 69 ContentDistributor::ensureDistribution(shadowRoot);
70 70
71 for (size_t i = 0; i < m_distribution.size(); ++i) 71 for (size_t i = 0; i < m_distribution.size(); ++i)
72 m_distribution.at(i)->detach(); 72 m_distribution.at(i)->detach(context);
73 73
74 HTMLElement::detach(); 74 HTMLElement::detach(context);
75 } 75 }
76 76
77 bool InsertionPoint::shouldUseFallbackElements() const 77 bool InsertionPoint::shouldUseFallbackElements() const
78 { 78 {
79 return isActive() && !hasDistribution(); 79 return isActive() && !hasDistribution();
80 } 80 }
81 81
82 bool InsertionPoint::isShadowBoundary() const 82 bool InsertionPoint::isShadowBoundary() const
83 { 83 {
84 return treeScope()->rootNode()->isShadowRoot() && isActive(); 84 return treeScope()->rootNode()->isShadowRoot() && isActive();
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 current = insertedTo; 247 current = insertedTo;
248 results.append(insertedTo); 248 results.append(insertedTo);
249 continue; 249 continue;
250 } 250 }
251 } 251 }
252 return; 252 return;
253 } 253 }
254 } 254 }
255 255
256 } // namespace WebCore 256 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/InsertionPoint.h ('k') | Source/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698