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

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

Issue 9565026: Merge 108109 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 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
« no previous file with comments | « LayoutTests/fast/css-generated-content/before-content-continuation-chain-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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 generatedContentContainer = RenderObject::createObject(owner->do cument(), pseudoElementStyle); 510 generatedContentContainer = RenderObject::createObject(owner->do cument(), pseudoElementStyle);
511 ASSERT(styledObject->node()); // The styled object cannot be ano nymous or else it could not have ':before' or ':after' pseudo elements. 511 ASSERT(styledObject->node()); // The styled object cannot be ano nymous or else it could not have ':before' or ':after' pseudo elements.
512 generatedContentContainer->setNode(styledObject->node()); // Thi s allows access to the generatingNode. 512 generatedContentContainer->setNode(styledObject->node()); // Thi s allows access to the generatingNode.
513 generatedContentContainer->setStyle(pseudoElementStyle); 513 generatedContentContainer->setStyle(pseudoElementStyle);
514 if (!owner->isChildAllowed(generatedContentContainer, pseudoElem entStyle)) { 514 if (!owner->isChildAllowed(generatedContentContainer, pseudoElem entStyle)) {
515 // The generated content container is not allowed here -> ab ort. 515 // The generated content container is not allowed here -> ab ort.
516 generatedContentContainer->destroy(); 516 generatedContentContainer->destroy();
517 renderer->destroy(); 517 renderer->destroy();
518 return; 518 return;
519 } 519 }
520 owner->addChild(generatedContentContainer, insertBefore); 520
521 // When we don't have a first child and are part of a continuati on chain,
522 // insertBefore is incorrectly set to zero above, which causes t he :before
523 // child to end up at the end of continuation chain.
524 // See https://bugs.webkit.org/show_bug.cgi?id=78380.
525 if (!insertBefore && type == BEFORE && owner->virtualContinuatio n())
526 owner->addChildIgnoringContinuation(generatedContentContaine r, 0);
527 else
528 owner->addChild(generatedContentContainer, insertBefore);
521 } 529 }
522 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen tStyle)) 530 if (generatedContentContainer->isChildAllowed(renderer, pseudoElemen tStyle))
523 generatedContentContainer->addChild(renderer); 531 generatedContentContainer->addChild(renderer);
524 else 532 else
525 renderer->destroy(); 533 renderer->destroy();
526 } 534 }
527 } 535 }
528 } 536 }
529 537
530 } // namespace WebCore 538 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-generated-content/before-content-continuation-chain-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698