OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
161 return; | 161 return; |
162 if (WebViewClient* client = m_webViewImpl->client()) | 162 if (WebViewClient* client = m_webViewImpl->client()) |
163 client->exitFullScreen(); | 163 client->exitFullScreen(); |
164 } | 164 } |
165 | 165 |
166 void FullscreenController::updateSize() | 166 void FullscreenController::updateSize() |
167 { | 167 { |
168 if (!isFullscreen()) | 168 if (!isFullscreen()) |
169 return; | 169 return; |
170 | 170 |
171 RenderFullScreen* renderer = Fullscreen::from(*m_fullScreenFrame->document() ).fullScreenRenderer(); | 171 Document* document = m_fullScreenFrame->document(); |
172 if (renderer) | 172 Element* fullscreenElement = Fullscreen::currentFullScreenElementFrom(*docum ent); |
173 renderer->updateStyle(); | 173 if (fullscreenElement) |
174 document->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTr acing::create(StyleChangeReason::FullScreen)); | |
rune
2014/12/15 09:39:51
This looks like a really big cannon. Which style c
esprehn
2014/12/15 09:45:32
This is probably for -webkit-full-screen-ancestor,
Julien - ping for review
2014/12/15 17:02:53
FWIW this is copied from what Fullscreen is doing
rune
2014/12/16 14:22:14
But in Fullscreen (and Element) setNeedsStyleRecal
| |
174 } | 175 } |
175 | 176 |
176 void FullscreenController::trace(Visitor* visitor) | 177 void FullscreenController::trace(Visitor* visitor) |
177 { | 178 { |
178 visitor->trace(m_provisionalFullScreenElement); | 179 visitor->trace(m_provisionalFullScreenElement); |
179 visitor->trace(m_fullScreenFrame); | 180 visitor->trace(m_fullScreenFrame); |
180 } | 181 } |
181 | 182 |
182 } // namespace blink | 183 } // namespace blink |
183 | 184 |
OLD | NEW |