| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 LayoutView* rootView = m_element->document().view()->layoutView(); | 925 LayoutView* rootView = m_element->document().view()->layoutView(); |
| 926 while (rootView->frame()->ownerLayoutObject()) | 926 while (rootView->frame()->ownerLayoutObject()) |
| 927 rootView = rootView->frame()->ownerLayoutObject()->view(); | 927 rootView = rootView->frame()->ownerLayoutObject()->view(); |
| 928 | 928 |
| 929 LayoutBox* box = toLayoutBox(ownerElement->layoutObject()); | 929 LayoutBox* box = toLayoutBox(ownerElement->layoutObject()); |
| 930 | 930 |
| 931 // Plugin frameRects are in absolute screen space. | 931 // Plugin frameRects are in absolute screen space. |
| 932 IntRect frameRectInOwnerElementSpace = box->absoluteToLocalQuad(FloatRect(fr
ameRect()), UseTransforms).enclosingBoundingBox(); | 932 IntRect frameRectInOwnerElementSpace = box->absoluteToLocalQuad(FloatRect(fr
ameRect()), UseTransforms).enclosingBoundingBox(); |
| 933 | 933 |
| 934 LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace); | 934 LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace); |
| 935 box->mapToVisibleRectInContainerSpace(rootView, unclippedAbsoluteRect, nullp
tr); | 935 box->mapToVisibleRectInAncestorSpace(rootView, unclippedAbsoluteRect, nullpt
r); |
| 936 | 936 |
| 937 // The frameRect is already in absolute space of the local frame to the plug
in. | 937 // The frameRect is already in absolute space of the local frame to the plug
in. |
| 938 windowRect = frameRect(); | 938 windowRect = frameRect(); |
| 939 // Map up to the root frame. | 939 // Map up to the root frame. |
| 940 windowRect = enclosingIntRect(m_element->document().view()->layoutView()->lo
calToAbsoluteQuad(FloatQuad(FloatRect(frameRect())), TraverseDocumentBoundaries)
.boundingBox()); | 940 windowRect = enclosingIntRect(m_element->document().view()->layoutView()->lo
calToAbsoluteQuad(FloatQuad(FloatRect(frameRect())), TraverseDocumentBoundaries)
.boundingBox()); |
| 941 // Finally, adjust for scrolling of the root frame, which the above does not
take into account. | 941 // Finally, adjust for scrolling of the root frame, which the above does not
take into account. |
| 942 windowRect.moveBy(roundedIntPoint(-rootView->viewRect().location())); | 942 windowRect.moveBy(roundedIntPoint(-rootView->viewRect().location())); |
| 943 | 943 |
| 944 clippedLocalRect = enclosingIntRect(unclippedAbsoluteRect); | 944 clippedLocalRect = enclosingIntRect(unclippedAbsoluteRect); |
| 945 unclippedIntLocalRect = clippedLocalRect; | 945 unclippedIntLocalRect = clippedLocalRect; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 960 // frame view. | 960 // frame view. |
| 961 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); | 961 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); |
| 962 } | 962 } |
| 963 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 963 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
| 964 // Convert to the plugin position. | 964 // Convert to the plugin position. |
| 965 for (size_t i = 0; i < cutOutRects.size(); i++) | 965 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 966 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 966 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 967 } | 967 } |
| 968 | 968 |
| 969 } // namespace blinkf | 969 } // namespace blinkf |
| OLD | NEW |