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

Unified Diff: third_party/WebKit/WebCore/rendering/RenderTreeAsText.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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
Index: third_party/WebKit/WebCore/rendering/RenderTreeAsText.cpp
===================================================================
--- third_party/WebKit/WebCore/rendering/RenderTreeAsText.cpp (revision 9391)
+++ third_party/WebKit/WebCore/rendering/RenderTreeAsText.cpp (working copy)
@@ -192,21 +192,19 @@
r = IntRect(text.firstRunX(), text.firstRunY(), linesBox.width(), linesBox.height());
if (adjustForTableCells && !text.firstTextBox())
adjustForTableCells = false;
- } else if (o.isBox()) {
- if (o.isRenderInline()) {
- // FIXME: Would be better not to just dump 0, 0 as the x and y here.
- const RenderInline& inlineFlow = *toRenderInline(&o);
- r = IntRect(0, 0, inlineFlow.linesBoundingBox().width(), inlineFlow.linesBoundingBox().height());
- adjustForTableCells = false;
- } else if (o.isTableCell()) {
- // FIXME: Deliberately dump the "inner" box of table cells, since that is what current results reflect. We'd like
- // to clean up the results to dump both the outer box and the intrinsic padding so that both bits of information are
- // captured by the results.
- const RenderTableCell& cell = static_cast<const RenderTableCell&>(o);
- r = IntRect(cell.x(), cell.y() + cell.intrinsicPaddingTop(), cell.width(), cell.height() - cell.intrinsicPaddingTop() - cell.intrinsicPaddingBottom());
- } else
- r = toRenderBox(&o)->frameRect();
- }
+ } else if (o.isRenderInline()) {
+ // FIXME: Would be better not to just dump 0, 0 as the x and y here.
+ const RenderInline& inlineFlow = *toRenderInline(&o);
+ r = IntRect(0, 0, inlineFlow.linesBoundingBox().width(), inlineFlow.linesBoundingBox().height());
+ adjustForTableCells = false;
+ } else if (o.isTableCell()) {
+ // FIXME: Deliberately dump the "inner" box of table cells, since that is what current results reflect. We'd like
+ // to clean up the results to dump both the outer box and the intrinsic padding so that both bits of information are
+ // captured by the results.
+ const RenderTableCell& cell = static_cast<const RenderTableCell&>(o);
+ r = IntRect(cell.x(), cell.y() + cell.intrinsicPaddingTop(), cell.width(), cell.height() - cell.intrinsicPaddingTop() - cell.intrinsicPaddingBottom());
+ } else if (o.isBox())
+ r = toRenderBox(&o)->frameRect();
// FIXME: Temporary in order to ensure compatibility with existing layout test results.
if (adjustForTableCells)
@@ -237,10 +235,10 @@
o.style()->textStrokeWidth() > 0)
ts << " [textStrokeWidth=" << o.style()->textStrokeWidth() << "]";
- if (!o.isBox())
+ if (!o.isBoxModelObject())
return ts;
- const RenderBox& box = *toRenderBox(&o);
+ const RenderBoxModelObject& box = *toRenderBoxModelObject(&o);
if (box.borderTop() || box.borderRight() || box.borderBottom() || box.borderLeft()) {
ts << " [border:";
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderText.cpp ('k') | third_party/WebKit/WebCore/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698