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

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

Issue 202853003: A follow-up cleanup for removing resetStyleInheritance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/shadow/InsertionPoint.h ('k') | Source/core/html/HTMLAttributeNames.in » ('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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 if (rootOwner) { 240 if (rootOwner) {
241 rootOwner->didAffectApplyAuthorStyles(); 241 rootOwner->didAffectApplyAuthorStyles();
242 if (canAffectSelector()) 242 if (canAffectSelector())
243 rootOwner->willAffectSelector(); 243 rootOwner->willAffectSelector();
244 } 244 }
245 } 245 }
246 246
247 HTMLElement::removedFrom(insertionPoint); 247 HTMLElement::removedFrom(insertionPoint);
248 } 248 }
249 249
250 void InsertionPoint::parseAttribute(const QualifiedName& name, const AtomicStrin g& value)
251 {
252 if (name == reset_style_inheritanceAttr) {
253 if (!inDocument() || !isActive())
254 return;
255 containingShadowRoot()->host()->setNeedsStyleRecalc(SubtreeStyleChange);
256 } else
257 HTMLElement::parseAttribute(name, value);
258 }
259
260 bool InsertionPoint::resetStyleInheritance() const
261 {
262 return fastHasAttribute(reset_style_inheritanceAttr);
263 }
264
265 void InsertionPoint::setResetStyleInheritance(bool value)
266 {
267 setBooleanAttribute(reset_style_inheritanceAttr, value);
268 }
269
270 const InsertionPoint* resolveReprojection(const Node* projectedNode) 250 const InsertionPoint* resolveReprojection(const Node* projectedNode)
271 { 251 {
272 ASSERT(projectedNode); 252 ASSERT(projectedNode);
273 const InsertionPoint* insertionPoint = 0; 253 const InsertionPoint* insertionPoint = 0;
274 const Node* current = projectedNode; 254 const Node* current = projectedNode;
275 ElementShadow* lastElementShadow = 0; 255 ElementShadow* lastElementShadow = 0;
276 while (true) { 256 while (true) {
277 ElementShadow* shadow = shadowWhereNodeCanBeDistributed(*current); 257 ElementShadow* shadow = shadowWhereNodeCanBeDistributed(*current);
278 if (!shadow || shadow == lastElementShadow) 258 if (!shadow || shadow == lastElementShadow)
279 break; 259 break;
(...skipping 21 matching lines...) Expand all
301 if (!insertionPoints) 281 if (!insertionPoints)
302 return; 282 return;
303 for (size_t i = 0; i < insertionPoints->size(); ++i) 283 for (size_t i = 0; i < insertionPoints->size(); ++i)
304 results.append(insertionPoints->at(i).get()); 284 results.append(insertionPoints->at(i).get());
305 ASSERT(current != insertionPoints->last().get()); 285 ASSERT(current != insertionPoints->last().get());
306 current = insertionPoints->last().get(); 286 current = insertionPoints->last().get();
307 } 287 }
308 } 288 }
309 289
310 } // namespace WebCore 290 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/InsertionPoint.h ('k') | Source/core/html/HTMLAttributeNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698