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

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

Issue 1995853003: [Layout API] Use FrameView::layoutViewItem() in LayoutTreeAsText.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/api/LayoutItem.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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 for (LayoutObject* child = o.slowFirstChild(); child; child = child->nextSib ling()) { 532 for (LayoutObject* child = o.slowFirstChild(); child; child = child->nextSib ling()) {
533 if (child->hasLayer()) 533 if (child->hasLayer())
534 continue; 534 continue;
535 write(ts, *child, indent + 1, behavior); 535 write(ts, *child, indent + 1, behavior);
536 } 536 }
537 537
538 if (o.isLayoutPart()) { 538 if (o.isLayoutPart()) {
539 Widget* widget = toLayoutPart(o).widget(); 539 Widget* widget = toLayoutPart(o).widget();
540 if (widget && widget->isFrameView()) { 540 if (widget && widget->isFrameView()) {
541 FrameView* view = toFrameView(widget); 541 FrameView* view = toFrameView(widget);
542 LayoutView* root = view->layoutView(); 542 LayoutViewItem rootItem = view->layoutViewItem();
543 if (root) { 543 if (!rootItem.isNull()) {
544 root->document().updateStyleAndLayout(); 544 rootItem.updateStyleAndLayout();
545 PaintLayer* layer = root->layer(); 545 PaintLayer* layer = rootItem.layer();
546 if (layer) 546 if (layer)
547 LayoutTreeAsText::writeLayers(ts, layer, layer, layer->rect( ), indent + 1, behavior); 547 LayoutTreeAsText::writeLayers(ts, layer, layer, layer->rect( ), indent + 1, behavior);
548 } 548 }
549 } 549 }
550 } 550 }
551 } 551 }
552 552
553 enum LayerPaintPhase { 553 enum LayerPaintPhase {
554 LayerPaintPhaseAll = 0, 554 LayerPaintPhaseAll = 0,
555 LayerPaintPhaseBackground = -1, 555 LayerPaintPhaseBackground = -1,
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 element->document().updateStyleAndLayout(); 846 element->document().updateStyleAndLayout();
847 847
848 LayoutObject* layoutObject = element->layoutObject(); 848 LayoutObject* layoutObject = element->layoutObject();
849 if (!layoutObject || !layoutObject->isListItem()) 849 if (!layoutObject || !layoutObject->isListItem())
850 return String(); 850 return String();
851 851
852 return toLayoutListItem(layoutObject)->markerText(); 852 return toLayoutListItem(layoutObject)->markerText();
853 } 853 }
854 854
855 } // namespace blink 855 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/api/LayoutItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698