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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/tests/layout/position-absolute-pixels-expected.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/core/rendering/RenderParagraph.h" 6 #include "sky/engine/core/rendering/RenderParagraph.h"
7 7
8 #include "sky/engine/core/rendering/BidiRunForLine.h" 8 #include "sky/engine/core/rendering/BidiRunForLine.h"
9 #include "sky/engine/core/rendering/InlineIterator.h" 9 #include "sky/engine/core/rendering/InlineIterator.h"
10 #include "sky/engine/core/rendering/RenderLayer.h" 10 #include "sky/engine/core/rendering/RenderLayer.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 GlyphOverflowAndFallbackFontsMap textBoxDataMap; 168 GlyphOverflowAndFallbackFontsMap textBoxDataMap;
169 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); i t != lineBoxes.end(); ++it) { 169 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); i t != lineBoxes.end(); ++it) {
170 RootInlineBox* box = *it; 170 RootInlineBox* box = *it;
171 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap ); 171 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap );
172 } 172 }
173 } 173 }
174 174
175 void RenderParagraph::paintChildren(PaintInfo& paintInfo, const LayoutPoint& pai ntOffset, Vector<RenderBox*>& layers) 175 void RenderParagraph::paintChildren(PaintInfo& paintInfo, const LayoutPoint& pai ntOffset, Vector<RenderBox*>& layers)
176 { 176 {
177 m_lineBoxes.paint(this, paintInfo, paintOffset, layers); 177 m_lineBoxes.paint(this, paintInfo, paintOffset, layers);
178
179 for (RenderObject* child = firstChild(); child; child = child->nextSibling() ) {
180 // TODO(ojan): This is wrong at the moment. Inlines can have self painti ng
181 // layers as well. Either make inlines with self-painting layers work or
182 // don't allow inlines to be self painting.
183 if (child->isBox()) {
184 RenderBox* box = toRenderBox(child);
185 if (box->hasSelfPaintingLayer())
186 layers.append(box);
187 }
188 }
178 } 189 }
179 190
180 bool RenderParagraph::hitTestContents(const HitTestRequest& request, HitTestResu lt& result, const HitTestLocation& locationInContainer, const LayoutPoint& accum ulatedOffset) 191 bool RenderParagraph::hitTestContents(const HitTestRequest& request, HitTestResu lt& result, const HitTestLocation& locationInContainer, const LayoutPoint& accum ulatedOffset)
181 { 192 {
182 return m_lineBoxes.hitTest(this, request, result, locationInContainer, accum ulatedOffset); 193 return m_lineBoxes.hitTest(this, request, result, locationInContainer, accum ulatedOffset);
183 } 194 }
184 195
185 void RenderParagraph::markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUn it logicalBottom, RootInlineBox* highest) 196 void RenderParagraph::markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUn it logicalBottom, RootInlineBox* highest)
186 { 197 {
187 if (logicalTop >= logicalBottom) 198 if (logicalTop >= logicalBottom)
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 curr->adjustLogicalPosition(logicalLeft, 0); 1584 curr->adjustLogicalPosition(logicalLeft, 0);
1574 else 1585 else
1575 curr->adjustLogicalPosition(logicalLeft - (availableLogicalW idth - totalLogicalWidth), 0); 1586 curr->adjustLogicalPosition(logicalLeft - (availableLogicalW idth - totalLogicalWidth), 0);
1576 } 1587 }
1577 } 1588 }
1578 firstLine = false; 1589 firstLine = false;
1579 } 1590 }
1580 } 1591 }
1581 1592
1582 } // namespace blink 1593 } // namespace blink
OLDNEW
« 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