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

Side by Side Diff: sky/engine/core/rendering/RenderLayer.cpp

Issue 691223003: Remove some more assorted code from RenderBox. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 1 month 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 | « sky/engine/core/rendering/RenderInline.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 { 479 {
480 LayoutPoint localPoint; 480 LayoutPoint localPoint;
481 LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLaye r x/y for inlines, so we need to subtract it out when done. 481 LayoutSize inlineBoundingBoxOffset; // We don't put this into the RenderLaye r x/y for inlines, so we need to subtract it out when done.
482 482
483 if (renderer()->isInline() && renderer()->isRenderInline()) { 483 if (renderer()->isInline() && renderer()->isRenderInline()) {
484 RenderInline* inlineFlow = toRenderInline(renderer()); 484 RenderInline* inlineFlow = toRenderInline(renderer());
485 IntRect lineBox = inlineFlow->linesBoundingBox(); 485 IntRect lineBox = inlineFlow->linesBoundingBox();
486 inlineBoundingBoxOffset = toSize(lineBox.location()); 486 inlineBoundingBoxOffset = toSize(lineBox.location());
487 localPoint += inlineBoundingBoxOffset; 487 localPoint += inlineBoundingBoxOffset;
488 } else if (RenderBox* box = renderBox()) { 488 } else if (RenderBox* box = renderBox()) {
489 localPoint += box->topLeftLocationOffset(); 489 localPoint += box->locationOffset();
490 } 490 }
491 491
492 if (!renderer()->isOutOfFlowPositioned() && renderer()->parent()) { 492 if (!renderer()->isOutOfFlowPositioned() && renderer()->parent()) {
493 // We must adjust our position by walking up the render tree looking for the 493 // We must adjust our position by walking up the render tree looking for the
494 // nearest enclosing object with a layer. 494 // nearest enclosing object with a layer.
495 RenderObject* curr = renderer()->parent(); 495 RenderObject* curr = renderer()->parent();
496 while (curr && !curr->hasLayer()) { 496 while (curr && !curr->hasLayer()) {
497 if (curr->isBox()) { 497 if (curr->isBox()) {
498 // Rows and cells share the same coordinate space (that of the s ection). 498 // Rows and cells share the same coordinate space (that of the s ection).
499 // Omit them when computing our xpos/ypos. 499 // Omit them when computing our xpos/ypos.
500 localPoint += toRenderBox(curr)->topLeftLocationOffset(); 500 localPoint += toRenderBox(curr)->locationOffset();
501 } 501 }
502 curr = curr->parent(); 502 curr = curr->parent();
503 } 503 }
504 } 504 }
505 505
506 // Subtract our parent's scroll offset. 506 // Subtract our parent's scroll offset.
507 if (renderer()->isOutOfFlowPositioned() && enclosingPositionedAncestor()) { 507 if (renderer()->isOutOfFlowPositioned() && enclosingPositionedAncestor()) {
508 RenderLayer* positionedParent = enclosingPositionedAncestor(); 508 RenderLayer* positionedParent = enclosingPositionedAncestor();
509 509
510 // For positioned layers, we subtract out the enclosing positioned layer 's scroll offset. 510 // For positioned layers, we subtract out the enclosing positioned layer 's scroll offset.
(...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 } 2702 }
2703 } 2703 }
2704 2704
2705 void showLayerTree(const blink::RenderObject* renderer) 2705 void showLayerTree(const blink::RenderObject* renderer)
2706 { 2706 {
2707 if (!renderer) 2707 if (!renderer)
2708 return; 2708 return;
2709 showLayerTree(renderer->enclosingLayer()); 2709 showLayerTree(renderer->enclosingLayer());
2710 } 2710 }
2711 #endif 2711 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderInline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698