| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 Vector<const LayoutObject*> pluginZstack; | 163 Vector<const LayoutObject*> pluginZstack; |
| 164 Vector<const LayoutObject*> iframeZstack; | 164 Vector<const LayoutObject*> iframeZstack; |
| 165 getObjectStack(pluginNode, &pluginZstack); | 165 getObjectStack(pluginNode, &pluginZstack); |
| 166 | 166 |
| 167 if (!parentFrameViewBase->isFrameView()) | 167 if (!parentFrameViewBase->isFrameView()) |
| 168 return; | 168 return; |
| 169 | 169 |
| 170 FrameView* parentFrameView = toFrameView(parentFrameViewBase); | 170 FrameView* parentFrameView = toFrameView(parentFrameViewBase); |
| 171 | 171 |
| 172 // Occlusions by iframes. | 172 // Occlusions by iframes. |
| 173 const FrameView::ChildrenWidgetSet* children = parentFrameView->children(); | 173 const FrameView::ChildrenFrameViewBaseSet* children = |
| 174 for (FrameView::ChildrenWidgetSet::const_iterator it = children->begin(); | 174 parentFrameView->children(); |
| 175 for (FrameView::ChildrenFrameViewBaseSet::const_iterator it = |
| 176 children->begin(); |
| 175 it != children->end(); ++it) { | 177 it != children->end(); ++it) { |
| 176 // We only care about FrameView's because iframes show up as FrameViews. | 178 // We only care about FrameView's because iframes show up as FrameViews. |
| 177 if (!(*it)->isFrameView()) | 179 if (!(*it)->isFrameView()) |
| 178 continue; | 180 continue; |
| 179 | 181 |
| 180 const FrameView* frameView = toFrameView(it->get()); | 182 const FrameView* frameView = toFrameView(it->get()); |
| 181 // Check to make sure we can get both the element and the LayoutObject | 183 // Check to make sure we can get both the element and the LayoutObject |
| 182 // for this FrameView, if we can't just move on to the next object. | 184 // for this FrameView, if we can't just move on to the next object. |
| 183 // FIXME: Plugin occlusion by remote frames is probably broken. | 185 // FIXME: Plugin occlusion by remote frames is probably broken. |
| 184 HTMLElement* element = frameView->frame().deprecatedLocalOwner(); | 186 HTMLElement* element = frameView->frame().deprecatedLocalOwner(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 202 // as being in the top layer. | 204 // as being in the top layer. |
| 203 const Element* ancestor = topLayerAncestor(element); | 205 const Element* ancestor = topLayerAncestor(element); |
| 204 Document* document = parentFrameView->frame().document(); | 206 Document* document = parentFrameView->frame().document(); |
| 205 const HeapVector<Member<Element>>& elements = document->topLayerElements(); | 207 const HeapVector<Member<Element>>& elements = document->topLayerElements(); |
| 206 size_t start = ancestor ? elements.find(ancestor) + 1 : 0; | 208 size_t start = ancestor ? elements.find(ancestor) + 1 : 0; |
| 207 for (size_t i = start; i < elements.size(); ++i) | 209 for (size_t i = start; i < elements.size(); ++i) |
| 208 addTreeToOcclusions(elements[i]->layoutObject(), frameRect, occlusions); | 210 addTreeToOcclusions(elements[i]->layoutObject(), frameRect, occlusions); |
| 209 } | 211 } |
| 210 | 212 |
| 211 } // namespace blink | 213 } // namespace blink |
| OLD | NEW |