Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Side by Side Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1516683002: Introducing LayoutObject::mapToVisibleRectInContainerSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix flipping logic Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 LayoutView* rootView = m_element->document().view()->layoutView(); 942 LayoutView* rootView = m_element->document().view()->layoutView();
943 while (rootView->frame()->ownerLayoutObject()) 943 while (rootView->frame()->ownerLayoutObject())
944 rootView = rootView->frame()->ownerLayoutObject()->view(); 944 rootView = rootView->frame()->ownerLayoutObject()->view();
945 945
946 LayoutBox* box = toLayoutBox(ownerElement->layoutObject()); 946 LayoutBox* box = toLayoutBox(ownerElement->layoutObject());
947 947
948 // Plugin frameRects are in absolute screen space. 948 // Plugin frameRects are in absolute screen space.
949 IntRect frameRectInOwnerElementSpace = box->absoluteToLocalQuad(FloatRect(fr ameRect()), UseTransforms).enclosingBoundingBox(); 949 IntRect frameRectInOwnerElementSpace = box->absoluteToLocalQuad(FloatRect(fr ameRect()), UseTransforms).enclosingBoundingBox();
950 950
951 LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace); 951 LayoutRect unclippedAbsoluteRect(frameRectInOwnerElementSpace);
952 box->mapRectToPaintInvalidationBacking(rootView, unclippedAbsoluteRect, null ptr); 952 box->mapToVisibleRectInContainerSpace(rootView, unclippedAbsoluteRect, nullp tr);
953 953
954 // The frameRect is already in absolute space, except for scrolling of the r oot frame. 954 // The frameRect is already in absolute space, except for scrolling of the r oot frame.
955 windowRect = frameRect(); 955 windowRect = frameRect();
956 windowRect = enclosingIntRect(m_element->document().view()->layoutView()->lo calToAbsoluteQuad(FloatQuad(FloatRect(frameRect())), TraverseDocumentBoundaries) .boundingBox()); 956 windowRect = enclosingIntRect(m_element->document().view()->layoutView()->lo calToAbsoluteQuad(FloatQuad(FloatRect(frameRect())), TraverseDocumentBoundaries) .boundingBox());
957 957
958 clippedLocalRect = enclosingIntRect(unclippedAbsoluteRect); 958 clippedLocalRect = enclosingIntRect(unclippedAbsoluteRect);
959 unclippedIntLocalRect = clippedLocalRect; 959 unclippedIntLocalRect = clippedLocalRect;
960 clippedLocalRect.intersect(rootView->frameView()->visibleContentRect()); 960 clippedLocalRect.intersect(rootView->frameView()->visibleContentRect());
961 961
962 // TODO(chrishtr): intentionally ignore transform, because the positioning o f frameRect() does also. This is probably wrong. 962 // TODO(chrishtr): intentionally ignore transform, because the positioning o f frameRect() does also. This is probably wrong.
(...skipping 11 matching lines...) Expand all
974 // frame view. 974 // frame view.
975 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t); 975 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t);
976 } 976 }
977 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 977 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
978 // Convert to the plugin position. 978 // Convert to the plugin position.
979 for (size_t i = 0; i < cutOutRects.size(); i++) 979 for (size_t i = 0; i < cutOutRects.size(); i++)
980 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 980 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
981 } 981 }
982 982
983 } // namespace blinkf 983 } // namespace blinkf
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698