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

Side by Side Diff: Source/core/rendering/RenderBoxModelObject.cpp

Issue 476223003: Use tighter typing for Document::ownerElement() return value (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderView.cpp » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 ASSERT_NOT_REACHED(); 559 ASSERT_NOT_REACHED();
560 break; 560 break;
561 } 561 }
562 562
563 // Only fill with a base color (e.g., white) if we're the root document, sin ce iframes/frames with 563 // Only fill with a base color (e.g., white) if we're the root document, sin ce iframes/frames with
564 // no background in the child document should show the parent's background. 564 // no background in the child document should show the parent's background.
565 bool isOpaqueRoot = false; 565 bool isOpaqueRoot = false;
566 if (isRoot) { 566 if (isRoot) {
567 isOpaqueRoot = true; 567 isOpaqueRoot = true;
568 if (!bgLayer.next() && bgColor.hasAlpha() && view()->frameView()) { 568 if (!bgLayer.next() && bgColor.hasAlpha() && view()->frameView()) {
569 Element* ownerElement = document().ownerElement(); 569 if (HTMLFrameOwnerElement* ownerElement = document().ownerElement()) {
570 if (ownerElement) {
571 if (!isHTMLFrameElement(*ownerElement)) { 570 if (!isHTMLFrameElement(*ownerElement)) {
572 // Locate the <body> element using the DOM. This is easier than trying 571 // Locate the <body> element using the DOM. This is easier than trying
573 // to crawl around a render tree with potential :before/:aft er content and 572 // to crawl around a render tree with potential :before/:aft er content and
574 // anonymous blocks created by inline <body> tags etc. We c an locate the <body> 573 // anonymous blocks created by inline <body> tags etc. We c an locate the <body>
575 // render object very easily via the DOM. 574 // render object very easily via the DOM.
576 HTMLElement* body = document().body(); 575 HTMLElement* body = document().body();
577 if (body) { 576 if (body) {
578 // Can't scroll a frameset document anyway. 577 // Can't scroll a frameset document anyway.
579 isOpaqueRoot = body->hasTagName(framesetTag); 578 isOpaqueRoot = body->hasTagName(framesetTag);
580 } else { 579 } else {
(...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2728 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2730 for (RenderObject* child = startChild; child && child != endChild; ) { 2729 for (RenderObject* child = startChild; child && child != endChild; ) {
2731 // Save our next sibling as moveChildTo will clear it. 2730 // Save our next sibling as moveChildTo will clear it.
2732 RenderObject* nextSibling = child->nextSibling(); 2731 RenderObject* nextSibling = child->nextSibling();
2733 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2732 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2734 child = nextSibling; 2733 child = nextSibling;
2735 } 2734 }
2736 } 2735 }
2737 2736
2738 } // namespace blink 2737 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698