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

Side by Side Diff: Source/core/layout/LayoutTreeAsText.cpp

Issue 1315303009: Cleanup DeprecatedPaintLayer::physicalBoundingBox() and derivatives (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/paint/DeprecatedPaintLayer.h » ('j') | 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) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 const LayoutRect& paintRect, int indent, LayoutAsTextBehavior behavior) 655 const LayoutRect& paintRect, int indent, LayoutAsTextBehavior behavior)
656 { 656 {
657 // Calculate the clip rects we should use. 657 // Calculate the clip rects we should use.
658 LayoutRect layerBounds; 658 LayoutRect layerBounds;
659 ClipRect damageRect, clipRectToApply, outlineRect; 659 ClipRect damageRect, clipRectToApply, outlineRect;
660 layer->clipper().calculateRects(ClipRectsContext(rootLayer, UncachedClipRect s), paintRect, layerBounds, damageRect, clipRectToApply, outlineRect); 660 layer->clipper().calculateRects(ClipRectsContext(rootLayer, UncachedClipRect s), paintRect, layerBounds, damageRect, clipRectToApply, outlineRect);
661 661
662 // Ensure our lists are up-to-date. 662 // Ensure our lists are up-to-date.
663 layer->stackingNode()->updateLayerListsIfNeeded(); 663 layer->stackingNode()->updateLayerListsIfNeeded();
664 664
665 bool shouldPaint = (behavior & LayoutAsTextShowAllLayers) ? true : layer->in tersectsDamageRect(layerBounds, damageRect.rect(), rootLayer); 665 LayoutPoint offsetFromRoot;
666 layer->convertToLayerCoords(rootLayer, offsetFromRoot);
667 bool shouldPaint = (behavior & LayoutAsTextShowAllLayers) ? true : layer->in tersectsDamageRect(layerBounds, damageRect.rect(), offsetFromRoot);
666 668
667 Vector<DeprecatedPaintLayerStackingNode*>* negList = layer->stackingNode()-> negZOrderList(); 669 Vector<DeprecatedPaintLayerStackingNode*>* negList = layer->stackingNode()-> negZOrderList();
668 bool paintsBackgroundSeparately = negList && negList->size() > 0; 670 bool paintsBackgroundSeparately = negList && negList->size() > 0;
669 if (shouldPaint && paintsBackgroundSeparately) 671 if (shouldPaint && paintsBackgroundSeparately)
670 write(ts, *layer, layerBounds, damageRect.rect(), clipRectToApply.rect() , outlineRect.rect(), LayerPaintPhaseBackground, indent, behavior); 672 write(ts, *layer, layerBounds, damageRect.rect(), clipRectToApply.rect() , outlineRect.rect(), LayerPaintPhaseBackground, indent, behavior);
671 673
672 if (negList) { 674 if (negList) {
673 int currIndent = indent; 675 int currIndent = indent;
674 if (behavior & LayoutAsTextShowLayerNesting) { 676 if (behavior & LayoutAsTextShowLayerNesting) {
675 writeIndent(ts, indent); 677 writeIndent(ts, indent);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 element->document().updateLayout(); 844 element->document().updateLayout();
843 845
844 LayoutObject* layoutObject = element->layoutObject(); 846 LayoutObject* layoutObject = element->layoutObject();
845 if (!layoutObject || !layoutObject->isListItem()) 847 if (!layoutObject || !layoutObject->isListItem())
846 return String(); 848 return String();
847 849
848 return toLayoutListItem(layoutObject)->markerText(); 850 return toLayoutListItem(layoutObject)->markerText();
849 } 851 }
850 852
851 } // namespace blink 853 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/DeprecatedPaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698