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

Side by Side Diff: Source/WebCore/rendering/RenderObjectChildList.cpp

Issue 8201005: Merge 96427 - <rdar://problem/10208291> first-letter in generated before content with display: ta... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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 | « LayoutTests/fast/css-generated-content/first-letter-in-nested-before-expected.txt ('k') | no next file » | 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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // When beforeAfterParent is not equal to child (e.g. in tables), 424 // When beforeAfterParent is not equal to child (e.g. in tables),
425 // we need to create new styles inheriting from pseudoElementStyle 425 // we need to create new styles inheriting from pseudoElementStyle
426 // on all the intermediate parents (leaving their display same). 426 // on all the intermediate parents (leaving their display same).
427 if (beforeAfterParent != child) { 427 if (beforeAfterParent != child) {
428 RenderObject* curr = beforeAfterParent; 428 RenderObject* curr = beforeAfterParent;
429 while (curr && curr != child) { 429 while (curr && curr != child) {
430 ASSERT(curr->isAnonymous()); 430 ASSERT(curr->isAnonymous());
431 RefPtr<RenderStyle> newStyle = RenderStyle::create(); 431 RefPtr<RenderStyle> newStyle = RenderStyle::create();
432 newStyle->inheritFrom(pseudoElementStyle); 432 newStyle->inheritFrom(pseudoElementStyle);
433 newStyle->setDisplay(curr->style()->display()); 433 newStyle->setDisplay(curr->style()->display());
434 newStyle->setStyleType(curr->style()->styleType());
434 curr->setStyle(newStyle); 435 curr->setStyle(newStyle);
435 curr = curr->parent(); 436 curr = curr->parent();
436 } 437 }
437 } 438 }
438 439
439 // Note that if we ever support additional types of generated conten t (which should be way off 440 // Note that if we ever support additional types of generated conten t (which should be way off
440 // in the future), this code will need to be patched. 441 // in the future), this code will need to be patched.
441 for (RenderObject* genChild = beforeAfterParent->firstChild(); genCh ild; genChild = genChild->nextSibling()) { 442 for (RenderObject* genChild = beforeAfterParent->firstChild(); genCh ild; genChild = genChild->nextSibling()) {
442 if (genChild->isText()) 443 if (genChild->isText())
443 // Generated text content is a child whose style also needs to be set to the pseudo-element style. 444 // Generated text content is a child whose style also needs to be set to the pseudo-element style.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 } 522 }
522 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen tStyle)) 523 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen tStyle))
523 generatedContentContainer->addChild(renderer); 524 generatedContentContainer->addChild(renderer);
524 else 525 else
525 renderer->destroy(); 526 renderer->destroy();
526 } 527 }
527 } 528 }
528 } 529 }
529 530
530 } // namespace WebCore 531 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-generated-content/first-letter-in-nested-before-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698