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

Unified Diff: Source/core/rendering/RenderTable.cpp

Issue 23628004: Tables with display:inline rendered in wrong position. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Creating inline table during render tree construction Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index ab88472d05ff44930884d2081698754713a09c9c..5c2d2b88c86904cfbe4a7b157e2b1acf8fc900ed 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -1422,7 +1422,11 @@ bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
RenderTable* RenderTable::createAnonymousWithParentRenderer(const RenderObject* parent)
{
- RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), TABLE);
+ RefPtr<RenderStyle> newStyle;
+ if (parent->isInline() && parent->isTableTag())
esprehn 2013/09/04 07:19:42 I don't think you should be checking tag names. Wh
a.suchit 2013/09/04 13:15:02 Right. isTableTag() check is not required here.
a.suchit 2013/09/04 13:15:02 Done.
+ newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), INLINE_TABLE);
+ else
+ newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), TABLE);
RenderTable* newTable = new RenderTable(0);
newTable->setDocumentForAnonymous(&parent->document());
newTable->setStyle(newStyle.release());
« Source/core/rendering/RenderObject.cpp ('K') | « Source/core/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698