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)); | |
esprehn
2015/02/20 06:23:45
Doing a full document recalc every time we go in a
rune
2015/02/23 10:23:31
I prepared [1], but decided to await this CL since
| |
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 |