| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 bool PaintLayerCompositor::preferCompositingToLCDTextEnabled() const { | 157 bool PaintLayerCompositor::preferCompositingToLCDTextEnabled() const { |
| 158 return m_layoutView.document() | 158 return m_layoutView.document() |
| 159 .settings() | 159 .settings() |
| 160 ->preferCompositingToLCDTextEnabled(); | 160 ->preferCompositingToLCDTextEnabled(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 static LayoutVideo* findFullscreenVideoLayoutObject(Document& document) { | 163 static LayoutVideo* findFullscreenVideoLayoutObject(Document& document) { |
| 164 // Recursively find the document that is in fullscreen. | 164 // Recursively find the document that is in fullscreen. |
| 165 Element* fullscreenElement = Fullscreen::fullscreenElementFrom(document); | 165 Element* fullscreenElement = Fullscreen::fullscreenElement(document); |
| 166 Document* contentDocument = &document; | 166 Document* contentDocument = &document; |
| 167 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { | 167 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { |
| 168 contentDocument = | 168 contentDocument = |
| 169 toHTMLFrameOwnerElement(fullscreenElement)->contentDocument(); | 169 toHTMLFrameOwnerElement(fullscreenElement)->contentDocument(); |
| 170 if (!contentDocument) | 170 if (!contentDocument) |
| 171 return nullptr; | 171 return nullptr; |
| 172 fullscreenElement = Fullscreen::fullscreenElementFrom(*contentDocument); | 172 fullscreenElement = Fullscreen::fullscreenElement(*contentDocument); |
| 173 } | 173 } |
| 174 // Get the current fullscreen element from the document. | |
| 175 // TODO(foolip): When |currentFullScreenElementFrom| is removed, this will | |
| 176 // become a no-op and can be removed. https://crbug.com/402421 | |
| 177 fullscreenElement = | |
| 178 Fullscreen::currentFullScreenElementFrom(*contentDocument); | |
| 179 if (!isHTMLVideoElement(fullscreenElement)) | 174 if (!isHTMLVideoElement(fullscreenElement)) |
| 180 return nullptr; | 175 return nullptr; |
| 181 LayoutObject* layoutObject = fullscreenElement->layoutObject(); | 176 LayoutObject* layoutObject = fullscreenElement->layoutObject(); |
| 182 if (!layoutObject) | 177 if (!layoutObject) |
| 183 return nullptr; | 178 return nullptr; |
| 184 return toLayoutVideo(layoutObject); | 179 return toLayoutVideo(layoutObject); |
| 185 } | 180 } |
| 186 | 181 |
| 187 // The descendant-dependent flags system is badly broken because we clean dirty | 182 // The descendant-dependent flags system is badly broken because we clean dirty |
| 188 // bits in upward tree walks, which means we need to call | 183 // bits in upward tree walks, which means we need to call |
| (...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 } else if (graphicsLayer == m_scrollLayer.get()) { | 1339 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 1345 name = "Frame Scrolling Layer"; | 1340 name = "Frame Scrolling Layer"; |
| 1346 } else { | 1341 } else { |
| 1347 ASSERT_NOT_REACHED(); | 1342 ASSERT_NOT_REACHED(); |
| 1348 } | 1343 } |
| 1349 | 1344 |
| 1350 return name; | 1345 return name; |
| 1351 } | 1346 } |
| 1352 | 1347 |
| 1353 } // namespace blink | 1348 } // namespace blink |
| OLD | NEW |