| 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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 LayoutView* rootView = m_element->document().view()->layoutView(); | 936 LayoutView* rootView = m_element->document().view()->layoutView(); |
| 937 while (rootView->frame()->ownerLayoutObject()) | 937 while (rootView->frame()->ownerLayoutObject()) |
| 938 rootView = rootView->frame()->ownerLayoutObject()->view(); | 938 rootView = rootView->frame()->ownerLayoutObject()->view(); |
| 939 | 939 |
| 940 LayoutBox* box = toLayoutBox(ownerElement->layoutObject()); | 940 LayoutBox* box = toLayoutBox(ownerElement->layoutObject()); |
| 941 | 941 |
| 942 // Plugin frameRects are in absolute space within their frame. | 942 // Plugin frameRects are in absolute space within their frame. |
| 943 FloatRect frameRectInOwnerElementSpace = box->absoluteToLocalQuad(FloatRect(
frameRect()), UseTransforms).boundingBox(); | 943 FloatRect frameRectInOwnerElementSpace = box->absoluteToLocalQuad(FloatRect(
frameRect()), UseTransforms).boundingBox(); |
| 944 | 944 |
| 945 LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace); | 945 LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace); |
| 946 box->mapToVisibleRectInAncestorSpace(rootView, unclippedAbsoluteRect, nullpt
r); | 946 box->mapToVisibleRectInAncestorSpace(rootView, unclippedAbsoluteRect); |
| 947 | 947 |
| 948 // The frameRect is already in absolute space of the local frame to the plug
in. | 948 // The frameRect is already in absolute space of the local frame to the plug
in. |
| 949 windowRect = frameRect(); | 949 windowRect = frameRect(); |
| 950 // Map up to the root frame. | 950 // Map up to the root frame. |
| 951 LayoutRect layoutWindowRect = | 951 LayoutRect layoutWindowRect = |
| 952 LayoutRect(m_element->document().view()->layoutView()->localToAbsoluteQu
ad(FloatQuad(FloatRect(frameRect())), TraverseDocumentBoundaries).boundingBox())
; | 952 LayoutRect(m_element->document().view()->layoutView()->localToAbsoluteQu
ad(FloatQuad(FloatRect(frameRect())), TraverseDocumentBoundaries).boundingBox())
; |
| 953 // Finally, adjust for scrolling of the root frame, which the above does not
take into account. | 953 // Finally, adjust for scrolling of the root frame, which the above does not
take into account. |
| 954 layoutWindowRect.moveBy(-rootView->viewRect().location()); | 954 layoutWindowRect.moveBy(-rootView->viewRect().location()); |
| 955 windowRect = pixelSnappedIntRect(layoutWindowRect); | 955 windowRect = pixelSnappedIntRect(layoutWindowRect); |
| 956 | 956 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 977 // frame view. | 977 // frame view. |
| 978 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); | 978 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); |
| 979 } | 979 } |
| 980 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 980 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
| 981 // Convert to the plugin position. | 981 // Convert to the plugin position. |
| 982 for (size_t i = 0; i < cutOutRects.size(); i++) | 982 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 983 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 983 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 984 } | 984 } |
| 985 | 985 |
| 986 } // namespace blink | 986 } // namespace blink |
| OLD | NEW |