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

Unified Diff: Source/core/rendering/RenderTreeAsText.cpp

Issue 134473008: Remove CSS regions support, keeping a bare minimum to support "region-based" multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 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
« no previous file with comments | « Source/core/rendering/RenderTableSection.cpp ('k') | Source/core/rendering/RenderView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTreeAsText.cpp
diff --git a/Source/core/rendering/RenderTreeAsText.cpp b/Source/core/rendering/RenderTreeAsText.cpp
index 0ed2fe31908d68272c395411bfd378cc5882bf92..6a639edc17c4048d2ca22dc6d39da9b2af224bb8 100644
--- a/Source/core/rendering/RenderTreeAsText.cpp
+++ b/Source/core/rendering/RenderTreeAsText.cpp
@@ -40,13 +40,12 @@
#include "core/rendering/RenderBR.h"
#include "core/rendering/RenderDetailsMarker.h"
#include "core/rendering/RenderFileUploadControl.h"
+#include "core/rendering/RenderFlowThread.h"
#include "core/rendering/RenderInline.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderListItem.h"
#include "core/rendering/RenderListMarker.h"
-#include "core/rendering/RenderNamedFlowThread.h"
#include "core/rendering/RenderPart.h"
-#include "core/rendering/RenderRegion.h"
#include "core/rendering/RenderTableCell.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/RenderWidget.h"
@@ -568,91 +567,6 @@ static void write(TextStream& ts, RenderLayer& l,
write(ts, *l.renderer(), indent + 1, behavior);
}
-static void writeRenderRegionList(const RenderRegionList& flowThreadRegionList, TextStream& ts, int indent)
-{
- for (RenderRegionList::const_iterator itRR = flowThreadRegionList.begin(); itRR != flowThreadRegionList.end(); ++itRR) {
- const RenderRegion* renderRegion = *itRR;
-
- writeIndent(ts, indent);
- ts << renderRegion->renderName();
-
- Node* generatingNodeForRegion = renderRegion->generatingNodeForRegion();
- if (generatingNodeForRegion) {
- if (renderRegion->hasCustomRegionStyle())
- ts << " region style: 1";
- if (renderRegion->hasAutoLogicalHeight())
- ts << " hasAutoLogicalHeight";
-
- bool isRenderNamedFlowFragment = renderRegion->isRenderNamedFlowFragment();
- if (isRenderNamedFlowFragment)
- ts << " (anonymous child of";
-
- StringBuilder tagName;
- tagName.append(generatingNodeForRegion->nodeName());
-
- Node* nodeForRegion = renderRegion->nodeForRegion();
- if (nodeForRegion->isPseudoElement()) {
- if (nodeForRegion->isBeforePseudoElement())
- tagName.append("::before");
- else if (nodeForRegion->isAfterPseudoElement())
- tagName.append("::after");
- }
-
- ts << " {" << tagName.toString() << "}";
-
- if (generatingNodeForRegion->isElementNode() && generatingNodeForRegion->hasID()) {
- Element* element = toElement(generatingNodeForRegion);
- ts << " #" << element->idForStyleResolution();
- }
-
- if (isRenderNamedFlowFragment)
- ts << ")";
- }
-
- if (!renderRegion->isValid())
- ts << " invalid";
-
- ts << "\n";
- }
-}
-
-static void writeRenderNamedFlowThreads(TextStream& ts, RenderView* renderView, const RenderLayer* rootLayer,
- const LayoutRect& paintRect, int indent, RenderAsTextBehavior behavior)
-{
- if (!renderView->hasRenderNamedFlowThreads())
- return;
-
- const RenderNamedFlowThreadList* list = renderView->flowThreadController()->renderNamedFlowThreadList();
-
- writeIndent(ts, indent);
- ts << "Named flows\n";
-
- for (RenderNamedFlowThreadList::const_iterator iter = list->begin(); iter != list->end(); ++iter) {
- const RenderNamedFlowThread* renderFlowThread = *iter;
-
- writeIndent(ts, indent + 1);
- ts << "Named flow '" << renderFlowThread->flowThreadName() << "'\n";
-
- RenderLayer* layer = renderFlowThread->layer();
- RenderTreeAsText::writeLayers(ts, rootLayer, layer, paintRect, indent + 2, behavior);
-
- // Display the valid and invalid render regions attached to this flow thread.
- const RenderRegionList& validRegionsList = renderFlowThread->renderRegionList();
- if (!validRegionsList.isEmpty()) {
- writeIndent(ts, indent + 2);
- ts << "Regions for named flow '" << renderFlowThread->flowThreadName() << "'\n";
- writeRenderRegionList(validRegionsList, ts, indent + 3);
- }
-
- const RenderRegionList& invalidRegionsList = renderFlowThread->invalidRenderRegionList();
- if (!invalidRegionsList.isEmpty()) {
- writeIndent(ts, indent + 2);
- ts << "Invalid regions for named flow '" << renderFlowThread->flowThreadName() << "'\n";
- writeRenderRegionList(invalidRegionsList, ts, indent + 3);
- }
- }
-}
-
void RenderTreeAsText::writeLayers(TextStream& ts, const RenderLayer* rootLayer, RenderLayer* layer,
const LayoutRect& paintRect, int indent, RenderAsTextBehavior behavior)
{
@@ -667,7 +581,7 @@ void RenderTreeAsText::writeLayers(TextStream& ts, const RenderLayer* rootLayer,
// Calculate the clip rects we should use.
LayoutRect layerBounds;
ClipRect damageRect, clipRectToApply, outlineRect;
- layer->clipper().calculateRects(ClipRectsContext(rootLayer, 0, TemporaryClipRects), paintDirtyRect, layerBounds, damageRect, clipRectToApply, outlineRect);
+ layer->clipper().calculateRects(ClipRectsContext(rootLayer, TemporaryClipRects), paintDirtyRect, layerBounds, damageRect, clipRectToApply, outlineRect);
// Ensure our lists are up-to-date.
layer->stackingNode()->updateLayerListsIfNeeded();
@@ -714,13 +628,6 @@ void RenderTreeAsText::writeLayers(TextStream& ts, const RenderLayer* rootLayer,
for (unsigned i = 0; i != posList->size(); ++i)
writeLayers(ts, rootLayer, posList->at(i)->layer(), paintDirtyRect, currIndent, behavior);
}
-
- // Altough the RenderFlowThread requires a layer, it is not collected by its parent,
- // so we have to treat it as a special case.
- if (layer->renderer()->isRenderView()) {
- RenderView* renderView = toRenderView(layer->renderer());
- writeRenderNamedFlowThreads(ts, renderView, rootLayer, paintDirtyRect, indent, behavior);
- }
}
static String nodePosition(Node* node)
« no previous file with comments | « Source/core/rendering/RenderTableSection.cpp ('k') | Source/core/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698