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

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

Issue 2810873007: Replace LayoutPart::GetFrameViewBase with GetNodeFrameView (Closed)
Patch Set: No need for child_frame_view var Created 3 years, 8 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 502 }
503 503
504 for (LayoutObject* child = o.SlowFirstChild(); child; 504 for (LayoutObject* child = o.SlowFirstChild(); child;
505 child = child->NextSibling()) { 505 child = child->NextSibling()) {
506 if (child->HasLayer()) 506 if (child->HasLayer())
507 continue; 507 continue;
508 Write(ts, *child, indent + 1, behavior); 508 Write(ts, *child, indent + 1, behavior);
509 } 509 }
510 510
511 if (o.IsLayoutPart()) { 511 if (o.IsLayoutPart()) {
512 FrameViewBase* frame_view_base = ToLayoutPart(o).GetFrameViewBase(); 512 FrameView* frame_view = ToLayoutPart(o).ChildFrameView();
513 if (frame_view_base && frame_view_base->IsFrameView()) { 513 if (frame_view) {
514 FrameView* view = ToFrameView(frame_view_base); 514 LayoutViewItem root_item = frame_view->GetLayoutViewItem();
515 LayoutViewItem root_item = view->GetLayoutViewItem();
516 if (!root_item.IsNull()) { 515 if (!root_item.IsNull()) {
517 root_item.UpdateStyleAndLayout(); 516 root_item.UpdateStyleAndLayout();
518 PaintLayer* layer = root_item.Layer(); 517 PaintLayer* layer = root_item.Layer();
519 if (layer) 518 if (layer)
520 LayoutTreeAsText::WriteLayers(ts, layer, layer, layer->Rect(), 519 LayoutTreeAsText::WriteLayers(ts, layer, layer, layer->Rect(),
521 indent + 1, behavior); 520 indent + 1, behavior);
522 } 521 }
523 } 522 }
524 } 523 }
525 } 524 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 element->GetDocument().UpdateStyleAndLayout(); 874 element->GetDocument().UpdateStyleAndLayout();
876 875
877 LayoutObject* layout_object = element->GetLayoutObject(); 876 LayoutObject* layout_object = element->GetLayoutObject();
878 if (!layout_object || !layout_object->IsListItem()) 877 if (!layout_object || !layout_object->IsListItem())
879 return String(); 878 return String();
880 879
881 return ToLayoutListItem(layout_object)->MarkerText(); 880 return ToLayoutListItem(layout_object)->MarkerText();
882 } 881 }
883 882
884 } // namespace blink 883 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698