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

Side by Side Diff: third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 months 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
OLDNEW
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 return false; 113 return false;
114 } 114 }
115 } 115 }
116 return true; 116 return true;
117 } 117 }
118 118
119 static bool intersectsRect(const LayoutObject* renderer, const IntRect& rect) { 119 static bool intersectsRect(const LayoutObject* renderer, const IntRect& rect) {
120 return renderer->absoluteBoundingBoxRectIgnoringTransforms().intersects( 120 return renderer->absoluteBoundingBoxRectIgnoringTransforms().intersects(
121 rect) && 121 rect) &&
122 (!renderer->style() || 122 (!renderer->style() ||
123 renderer->style()->visibility() == EVisibility::Visible); 123 renderer->style()->visibility() == EVisibility::kVisible);
124 } 124 }
125 125
126 static void addToOcclusions(const LayoutBox* renderer, 126 static void addToOcclusions(const LayoutBox* renderer,
127 Vector<IntRect>& occlusions) { 127 Vector<IntRect>& occlusions) {
128 occlusions.push_back(IntRect(roundedIntPoint(renderer->localToAbsolute()), 128 occlusions.push_back(IntRect(roundedIntPoint(renderer->localToAbsolute()),
129 flooredIntSize(renderer->size()))); 129 flooredIntSize(renderer->size())));
130 } 130 }
131 131
132 static void addTreeToOcclusions(const LayoutObject* renderer, 132 static void addTreeToOcclusions(const LayoutObject* renderer,
133 const IntRect& frameRect, 133 const IntRect& frameRect,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // as being in the top layer. 202 // as being in the top layer.
203 const Element* ancestor = topLayerAncestor(element); 203 const Element* ancestor = topLayerAncestor(element);
204 Document* document = parentFrameView->frame().document(); 204 Document* document = parentFrameView->frame().document();
205 const HeapVector<Member<Element>>& elements = document->topLayerElements(); 205 const HeapVector<Member<Element>>& elements = document->topLayerElements();
206 size_t start = ancestor ? elements.find(ancestor) + 1 : 0; 206 size_t start = ancestor ? elements.find(ancestor) + 1 : 0;
207 for (size_t i = start; i < elements.size(); ++i) 207 for (size_t i = start; i < elements.size(); ++i)
208 addTreeToOcclusions(elements[i]->layoutObject(), frameRect, occlusions); 208 addTreeToOcclusions(elements[i]->layoutObject(), frameRect, occlusions);
209 } 209 }
210 210
211 } // namespace blink 211 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698