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

Side by Side Diff: Source/core/dom/PseudoElement.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/PseudoElement.h ('k') | Source/core/dom/Text.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 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 PseudoElement::~PseudoElement() 67 PseudoElement::~PseudoElement()
68 { 68 {
69 InspectorInstrumentation::pseudoElementDestroyed(document()->page(), this); 69 InspectorInstrumentation::pseudoElementDestroyed(document()->page(), this);
70 } 70 }
71 71
72 PassRefPtr<RenderStyle> PseudoElement::customStyleForRenderer() 72 PassRefPtr<RenderStyle> PseudoElement::customStyleForRenderer()
73 { 73 {
74 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseud oId); 74 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseud oId);
75 } 75 }
76 76
77 void PseudoElement::attach() 77 void PseudoElement::attach(const AttachContext& context)
78 { 78 {
79 ASSERT(!renderer()); 79 ASSERT(!renderer());
80 80
81 Element::attach(); 81 Element::attach(context);
82 82
83 RenderObject* renderer = this->renderer(); 83 RenderObject* renderer = this->renderer();
84 if (!renderer || !renderer->style()->regionThread().isEmpty()) 84 if (!renderer || !renderer->style()->regionThread().isEmpty())
85 return; 85 return;
86 86
87 RenderStyle* style = renderer->style(); 87 RenderStyle* style = renderer->style();
88 ASSERT(style->contentData()); 88 ASSERT(style->contentData());
89 89
90 for (const ContentData* content = style->contentData(); content; content = c ontent->next()) { 90 for (const ContentData* content = style->contentData(); content; content = c ontent->next()) {
91 RenderObject* child = content->createRenderer(document(), style); 91 RenderObject* child = content->createRenderer(document(), style);
(...skipping 26 matching lines...) Expand all
118 118
119 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us. 119 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us.
120 if (child->style()->styleType() == FIRST_LETTER) 120 if (child->style()->styleType() == FIRST_LETTER)
121 continue; 121 continue;
122 122
123 child->setPseudoStyle(renderer->style()); 123 child->setPseudoStyle(renderer->style());
124 } 124 }
125 } 125 }
126 126
127 } // namespace 127 } // namespace
OLDNEW
« no previous file with comments | « Source/core/dom/PseudoElement.h ('k') | Source/core/dom/Text.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698