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

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

Issue 682263003: Remove RenderWidget. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/RenderObject.h ('k') | sky/engine/core/rendering/RenderWidget.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 18 matching lines...) Expand all
29 #include "core/css/StylePropertySet.h" 29 #include "core/css/StylePropertySet.h"
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/editing/FrameSelection.h" 31 #include "core/editing/FrameSelection.h"
32 #include "core/frame/FrameView.h" 32 #include "core/frame/FrameView.h"
33 #include "core/frame/LocalFrame.h" 33 #include "core/frame/LocalFrame.h"
34 #include "core/html/HTMLElement.h" 34 #include "core/html/HTMLElement.h"
35 #include "core/rendering/InlineTextBox.h" 35 #include "core/rendering/InlineTextBox.h"
36 #include "core/rendering/RenderInline.h" 36 #include "core/rendering/RenderInline.h"
37 #include "core/rendering/RenderLayer.h" 37 #include "core/rendering/RenderLayer.h"
38 #include "core/rendering/RenderView.h" 38 #include "core/rendering/RenderView.h"
39 #include "core/rendering/RenderWidget.h"
40 #include "core/rendering/compositing/CompositedLayerMapping.h" 39 #include "core/rendering/compositing/CompositedLayerMapping.h"
41 #include "wtf/HexNumber.h" 40 #include "wtf/HexNumber.h"
42 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
43 #include "wtf/unicode/CharacterNames.h" 42 #include "wtf/unicode/CharacterNames.h"
44 43
45 namespace blink { 44 namespace blink {
46 45
47 static void printBorderStyle(TextStream& ts, const EBorderStyle borderStyle) 46 static void printBorderStyle(TextStream& ts, const EBorderStyle borderStyle)
48 { 47 {
49 switch (borderStyle) { 48 switch (borderStyle) {
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 writeIndent(ts, indent + 1); 325 writeIndent(ts, indent + 1);
327 writeTextRun(ts, text, *box); 326 writeTextRun(ts, text, *box);
328 } 327 }
329 } 328 }
330 329
331 for (RenderObject* child = o.slowFirstChild(); child; child = child->nextSib ling()) { 330 for (RenderObject* child = o.slowFirstChild(); child; child = child->nextSib ling()) {
332 if (child->hasLayer()) 331 if (child->hasLayer())
333 continue; 332 continue;
334 write(ts, *child, indent + 1, behavior); 333 write(ts, *child, indent + 1, behavior);
335 } 334 }
336
337 if (o.isWidget()) {
338 Widget* widget = toRenderWidget(o).widget();
339 if (widget && widget->isFrameView()) {
340 FrameView* view = toFrameView(widget);
341 RenderView* root = view->renderView();
342 if (root) {
343 view->layout();
344 RenderLayer* l = root->layer();
345 if (l)
346 RenderTreeAsText::writeLayers(ts, l, l, l->rect(), indent + 1, behavior);
347 }
348 }
349 }
350 } 335 }
351 336
352 enum LayerPaintPhase { 337 enum LayerPaintPhase {
353 LayerPaintPhaseAll = 0, 338 LayerPaintPhaseAll = 0,
354 LayerPaintPhaseBackground = -1, 339 LayerPaintPhaseBackground = -1,
355 LayerPaintPhaseForeground = 1 340 LayerPaintPhaseForeground = 1
356 }; 341 };
357 342
358 static void write(TextStream& ts, RenderLayer& l, 343 static void write(TextStream& ts, RenderLayer& l,
359 const LayoutRect& layerBounds, const LayoutRect& backgroundCli pRect, const LayoutRect& clipRect, const LayoutRect& outlineClipRect, 344 const LayoutRect& layerBounds, const LayoutRect& backgroundCli pRect, const LayoutRect& clipRect, const LayoutRect& outlineClipRect,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 element->document().updateLayout(); 555 element->document().updateLayout();
571 556
572 RenderObject* renderer = element->renderer(); 557 RenderObject* renderer = element->renderer();
573 if (!renderer || !renderer->isBox()) 558 if (!renderer || !renderer->isBox())
574 return String(); 559 return String();
575 560
576 return externalRepresentation(toRenderBox(renderer), behavior | RenderAsText ShowAllLayers); 561 return externalRepresentation(toRenderBox(renderer), behavior | RenderAsText ShowAllLayers);
577 } 562 }
578 563
579 } // namespace blink 564 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698