OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 const size_t frameSeparatorLength = WTF_ARRAY_LENGTH(frameSeparator); | 257 const size_t frameSeparatorLength = WTF_ARRAY_LENGTH(frameSeparator); |
258 | 258 |
259 // Recursively walk the children. | 259 // Recursively walk the children. |
260 const FrameTree& frameTree = frame->tree(); | 260 const FrameTree& frameTree = frame->tree(); |
261 for (Frame* curChild = frameTree.firstChild(); curChild; curChild = curChild
->tree().nextSibling()) { | 261 for (Frame* curChild = frameTree.firstChild(); curChild; curChild = curChild
->tree().nextSibling()) { |
262 if (!curChild->isLocalFrame()) | 262 if (!curChild->isLocalFrame()) |
263 continue; | 263 continue; |
264 LocalFrame* curLocalChild = toLocalFrame(curChild); | 264 LocalFrame* curLocalChild = toLocalFrame(curChild); |
265 // Ignore the text of non-visible frames. | 265 // Ignore the text of non-visible frames. |
266 RenderView* contentRenderer = curLocalChild->contentRenderer(); | 266 RenderView* contentRenderer = curLocalChild->contentRenderer(); |
267 RenderPart* ownerRenderer = curLocalChild->ownerRenderer(); | 267 LayoutPart* ownerRenderer = curLocalChild->ownerRenderer(); |
268 if (!contentRenderer || !contentRenderer->size().width() || !contentRend
erer->size().height() | 268 if (!contentRenderer || !contentRenderer->size().width() || !contentRend
erer->size().height() |
269 || (contentRenderer->location().x() + contentRenderer->size().width(
) <= 0) || (contentRenderer->location().y() + contentRenderer->size().height() <
= 0) | 269 || (contentRenderer->location().x() + contentRenderer->size().width(
) <= 0) || (contentRenderer->location().y() + contentRenderer->size().height() <
= 0) |
270 || (ownerRenderer && ownerRenderer->style() && ownerRenderer->style(
)->visibility() != VISIBLE)) { | 270 || (ownerRenderer && ownerRenderer->style() && ownerRenderer->style(
)->visibility() != VISIBLE)) { |
271 continue; | 271 continue; |
272 } | 272 } |
273 | 273 |
274 // Make sure the frame separator won't fill up the buffer, and give up i
f | 274 // Make sure the frame separator won't fill up the buffer, and give up i
f |
275 // it will. The danger is if the separator will make the buffer longer t
han | 275 // it will. The danger is if the separator will make the buffer longer t
han |
276 // maxChars. This will cause the computation above: | 276 // maxChars. This will cause the computation above: |
277 // maxChars - output->size() | 277 // maxChars - output->size() |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 624 |
625 WebSize WebLocalFrameImpl::contentsSize() const | 625 WebSize WebLocalFrameImpl::contentsSize() const |
626 { | 626 { |
627 if (FrameView* view = frameView()) | 627 if (FrameView* view = frameView()) |
628 return view->contentsSize(); | 628 return view->contentsSize(); |
629 return WebSize(); | 629 return WebSize(); |
630 } | 630 } |
631 | 631 |
632 bool WebLocalFrameImpl::hasVisibleContent() const | 632 bool WebLocalFrameImpl::hasVisibleContent() const |
633 { | 633 { |
634 if (RenderPart* renderer = frame()->ownerRenderer()) { | 634 if (LayoutPart* renderer = frame()->ownerRenderer()) { |
635 if (renderer->style()->visibility() != VISIBLE) | 635 if (renderer->style()->visibility() != VISIBLE) |
636 return false; | 636 return false; |
637 } | 637 } |
638 | 638 |
639 if (FrameView* view = frameView()) | 639 if (FrameView* view = frameView()) |
640 return view->visibleWidth() > 0 && view->visibleHeight() > 0; | 640 return view->visibleWidth() > 0 && view->visibleHeight() > 0; |
641 return false; | 641 return false; |
642 } | 642 } |
643 | 643 |
644 WebRect WebLocalFrameImpl::visibleContentRect() const | 644 WebRect WebLocalFrameImpl::visibleContentRect() const |
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2003 { | 2003 { |
2004 m_frameWidget = frameWidget; | 2004 m_frameWidget = frameWidget; |
2005 } | 2005 } |
2006 | 2006 |
2007 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2007 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
2008 { | 2008 { |
2009 return m_frameWidget; | 2009 return m_frameWidget; |
2010 } | 2010 } |
2011 | 2011 |
2012 } // namespace blink | 2012 } // namespace blink |
OLD | NEW |