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

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

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