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

Unified Diff: sky/engine/core/rendering/RenderParagraph.cpp

Issue 945223002: Fix painting of position:absolute inside display: paragraphs. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 10 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
« no previous file with comments | « no previous file | sky/tests/layout/position-absolute-pixels-expected.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderParagraph.cpp
diff --git a/sky/engine/core/rendering/RenderParagraph.cpp b/sky/engine/core/rendering/RenderParagraph.cpp
index 4af869ec705d6eee834089340a2ae33c1d5bbb0b..4d445a3cba52e44aeea4867db254fd9b5ed7b9d0 100644
--- a/sky/engine/core/rendering/RenderParagraph.cpp
+++ b/sky/engine/core/rendering/RenderParagraph.cpp
@@ -175,6 +175,17 @@ void RenderParagraph::simplifiedNormalFlowLayout()
void RenderParagraph::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers)
{
m_lineBoxes.paint(this, paintInfo, paintOffset, layers);
+
+ for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
+ // TODO(ojan): This is wrong at the moment. Inlines can have self painting
+ // layers as well. Either make inlines with self-painting layers work or
+ // don't allow inlines to be self painting.
+ if (child->isBox()) {
+ RenderBox* box = toRenderBox(child);
+ if (box->hasSelfPaintingLayer())
+ layers.append(box);
+ }
+ }
}
bool RenderParagraph::hitTestContents(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset)
« no previous file with comments | « no previous file | sky/tests/layout/position-absolute-pixels-expected.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698