OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 const HashSet<RefPtr<Widget> >* children = parentFrameView->children(); | 137 const HashSet<RefPtr<Widget> >* children = parentFrameView->children(); |
138 for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(); it !=
children->end(); ++it) { | 138 for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(); it !=
children->end(); ++it) { |
139 // We only care about FrameView's because iframes show up as FrameViews. | 139 // We only care about FrameView's because iframes show up as FrameViews. |
140 if (!(*it)->isFrameView()) | 140 if (!(*it)->isFrameView()) |
141 continue; | 141 continue; |
142 | 142 |
143 const FrameView* frameView = toFrameView((*it).get()); | 143 const FrameView* frameView = toFrameView((*it).get()); |
144 // Check to make sure we can get both the element and the RenderObject | 144 // Check to make sure we can get both the element and the RenderObject |
145 // for this FrameView, if we can't just move on to the next object. | 145 // for this FrameView, if we can't just move on to the next object. |
146 if (!frameView->frame() || !frameView->frame()->ownerElement() | 146 if (!frameView->frame()->ownerElement() || !frameView->frame()->ownerEle
ment()->renderer()) |
147 || !frameView->frame()->ownerElement()->renderer()) | |
148 continue; | 147 continue; |
149 | 148 |
150 HTMLElement* element = frameView->frame()->ownerElement(); | 149 HTMLElement* element = frameView->frame()->ownerElement(); |
151 RenderObject* iframeRenderer = element->renderer(); | 150 RenderObject* iframeRenderer = element->renderer(); |
152 | 151 |
153 if (element->hasTagName(HTMLNames::iframeTag) | 152 if (element->hasTagName(HTMLNames::iframeTag) |
154 && iframeRenderer->absoluteBoundingBoxRectIgnoringTransforms().inter
sects(frameRect) | 153 && iframeRenderer->absoluteBoundingBoxRectIgnoringTransforms().inter
sects(frameRect) |
155 && (!iframeRenderer->style() || iframeRenderer->style()->visibility(
) == VISIBLE)) { | 154 && (!iframeRenderer->style() || iframeRenderer->style()->visibility(
) == VISIBLE)) { |
156 getObjectStack(iframeRenderer, &iframeZstack); | 155 getObjectStack(iframeRenderer, &iframeZstack); |
157 if (iframeIsAbovePlugin(iframeZstack, pluginZstack)) { | 156 if (iframeIsAbovePlugin(iframeZstack, pluginZstack)) { |
158 IntPoint point = roundedIntPoint(iframeRenderer->localToAbsolute
()); | 157 IntPoint point = roundedIntPoint(iframeRenderer->localToAbsolute
()); |
159 RenderBox* rbox = toRenderBox(iframeRenderer); | 158 RenderBox* rbox = toRenderBox(iframeRenderer); |
160 IntSize size(rbox->width(), rbox->height()); | 159 IntSize size(rbox->width(), rbox->height()); |
161 occlusions.append(IntRect(point, size)); | 160 occlusions.append(IntRect(point, size)); |
162 } | 161 } |
163 } | 162 } |
164 } | 163 } |
165 } | 164 } |
166 | 165 |
167 } // namespace WebCore | 166 } // namespace WebCore |
OLD | NEW |