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

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

Issue 873983007: Remove negative z-index. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 // FIXME: Apply overflow to the root layer to not break every test. Complete hack. Sigh. 408 // FIXME: Apply overflow to the root layer to not break every test. Complete hack. Sigh.
409 if (rootLayer == layer) 409 if (rootLayer == layer)
410 layerBounds.setSize(layer->size().expandedTo(pixelSnappedIntSize(layer-> renderBox()->maxLayoutOverflow(), LayoutPoint(0, 0)))); 410 layerBounds.setSize(layer->size().expandedTo(pixelSnappedIntSize(layer-> renderBox()->maxLayoutOverflow(), LayoutPoint(0, 0))));
411 411
412 // Ensure our lists are up-to-date. 412 // Ensure our lists are up-to-date.
413 layer->stackingNode()->updateLayerListsIfNeeded(); 413 layer->stackingNode()->updateLayerListsIfNeeded();
414 414
415 bool shouldPaint = (behavior & RenderAsTextShowAllLayers) ? true : layer->in tersectsDamageRect(layerBounds, damageRect.rect(), rootLayer); 415 bool shouldPaint = (behavior & RenderAsTextShowAllLayers) ? true : layer->in tersectsDamageRect(layerBounds, damageRect.rect(), rootLayer);
416 416
417 Vector<RenderLayerStackingNode*>* negList = layer->stackingNode()->negZOrder List();
418 bool paintsBackgroundSeparately = negList && negList->size() > 0;
419 if (shouldPaint && paintsBackgroundSeparately)
420 write(ts, *layer, layerBounds, damageRect.rect(), clipRectToApply.rect() , outlineRect.rect(), LayerPaintPhaseBackground, indent, behavior);
421
422 if (negList) {
423 int currIndent = indent;
424 if (behavior & RenderAsTextShowLayerNesting) {
425 writeIndent(ts, indent);
426 ts << " negative z-order list(" << negList->size() << ")\n";
427 ++currIndent;
428 }
429 for (unsigned i = 0; i != negList->size(); ++i)
430 writeLayers(ts, rootLayer, negList->at(i)->layer(), paintDirtyRect, currIndent, behavior);
431 }
432
433 if (shouldPaint) 417 if (shouldPaint)
434 write(ts, *layer, layerBounds, damageRect.rect(), clipRectToApply.rect() , outlineRect.rect(), paintsBackgroundSeparately ? LayerPaintPhaseForeground : L ayerPaintPhaseAll, indent, behavior); 418 write(ts, *layer, layerBounds, damageRect.rect(), clipRectToApply.rect() , outlineRect.rect(), LayerPaintPhaseAll, indent, behavior);
435 419
436 if (Vector<RenderLayerStackingNode*>* normalFlowList = layer->stackingNode() ->normalFlowList()) { 420 if (Vector<RenderLayerStackingNode*>* normalFlowList = layer->stackingNode() ->normalFlowList()) {
437 int currIndent = indent; 421 int currIndent = indent;
438 if (behavior & RenderAsTextShowLayerNesting) { 422 if (behavior & RenderAsTextShowLayerNesting) {
439 writeIndent(ts, indent); 423 writeIndent(ts, indent);
440 ts << " normal flow list(" << normalFlowList->size() << ")\n"; 424 ts << " normal flow list(" << normalFlowList->size() << ")\n";
441 ++currIndent; 425 ++currIndent;
442 } 426 }
443 for (unsigned i = 0; i != normalFlowList->size(); ++i) 427 for (unsigned i = 0; i != normalFlowList->size(); ++i)
444 writeLayers(ts, rootLayer, normalFlowList->at(i)->layer(), paintDirt yRect, currIndent, behavior); 428 writeLayers(ts, rootLayer, normalFlowList->at(i)->layer(), paintDirt yRect, currIndent, behavior);
445 } 429 }
446 430
447 if (Vector<RenderLayerStackingNode*>* posList = layer->stackingNode()->posZO rderList()) { 431 if (Vector<RenderLayerStackingNode*>* posList = layer->stackingNode()->zOrde rList()) {
448 int currIndent = indent; 432 int currIndent = indent;
449 if (behavior & RenderAsTextShowLayerNesting) { 433 if (behavior & RenderAsTextShowLayerNesting) {
450 writeIndent(ts, indent); 434 writeIndent(ts, indent);
451 ts << " positive z-order list(" << posList->size() << ")\n"; 435 ts << " positive z-order list(" << posList->size() << ")\n";
452 ++currIndent; 436 ++currIndent;
453 } 437 }
454 for (unsigned i = 0; i != posList->size(); ++i) 438 for (unsigned i = 0; i != posList->size(); ++i)
455 writeLayers(ts, rootLayer, posList->at(i)->layer(), paintDirtyRect, currIndent, behavior); 439 writeLayers(ts, rootLayer, posList->at(i)->layer(), paintDirtyRect, currIndent, behavior);
456 } 440 }
457 } 441 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 element->document().updateLayout(); 522 element->document().updateLayout();
539 523
540 RenderObject* renderer = element->renderer(); 524 RenderObject* renderer = element->renderer();
541 if (!renderer || !renderer->isBox()) 525 if (!renderer || !renderer->isBox())
542 return String(); 526 return String();
543 527
544 return externalRepresentation(toRenderBox(renderer), behavior | RenderAsText ShowAllLayers); 528 return externalRepresentation(toRenderBox(renderer), behavior | RenderAsText ShowAllLayers);
545 } 529 }
546 530
547 } // namespace blink 531 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayerStackingNodeIterator.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698