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

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

Issue 8222024: Merge 97114 - <rdar://problem/10246137> Duplicate ::after content when both ::before and ::after ... (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // change we recurse infinitely when trying to render the CSS2 test page : 310 // change we recurse infinitely when trying to render the CSS2 test page :
311 // http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/htmlbodyheadrender ing2.html. 311 // http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/htmlbodyheadrender ing2.html.
312 // See Radar 2925291. 312 // See Radar 2925291.
313 if (needsTable && isTableCell() && !children->firstChild() && !newChild- >isTableCell()) 313 if (needsTable && isTableCell() && !children->firstChild() && !newChild- >isTableCell())
314 needsTable = false; 314 needsTable = false;
315 } 315 }
316 316
317 if (needsTable) { 317 if (needsTable) {
318 RenderTable* table; 318 RenderTable* table;
319 RenderObject* afterChild = beforeChild ? beforeChild->previousSibling() : children->lastChild(); 319 RenderObject* afterChild = beforeChild ? beforeChild->previousSibling() : children->lastChild();
320 if (afterChild && afterChild->isAnonymous() && afterChild->isTable()) 320 if (afterChild && afterChild->isAnonymous() && afterChild->isTable() && !afterChild->isBeforeContent())
321 table = toRenderTable(afterChild); 321 table = toRenderTable(afterChild);
322 else { 322 else {
323 table = new (renderArena()) RenderTable(document() /* is anonymous * /); 323 table = new (renderArena()) RenderTable(document() /* is anonymous * /);
324 RefPtr<RenderStyle> newStyle = RenderStyle::create(); 324 RefPtr<RenderStyle> newStyle = RenderStyle::create();
325 newStyle->inheritFrom(style()); 325 newStyle->inheritFrom(style());
326 newStyle->setDisplay(TABLE); 326 newStyle->setDisplay(TABLE);
327 table->setStyle(newStyle.release()); 327 table->setStyle(newStyle.release());
328 addChild(table, beforeChild); 328 addChild(table, beforeChild);
329 } 329 }
330 table->addChild(newChild); 330 table->addChild(newChild);
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2716 { 2716 {
2717 if (object1) { 2717 if (object1) {
2718 const WebCore::RenderObject* root = object1; 2718 const WebCore::RenderObject* root = object1;
2719 while (root->parent()) 2719 while (root->parent())
2720 root = root->parent(); 2720 root = root->parent();
2721 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 2721 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2722 } 2722 }
2723 } 2723 }
2724 2724
2725 #endif 2725 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698