OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 3717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3728 | 3728 |
3729 void WebViewImpl::setPageOverlayColor(WebColor color) { | 3729 void WebViewImpl::setPageOverlayColor(WebColor color) { |
3730 if (m_pageColorOverlay) | 3730 if (m_pageColorOverlay) |
3731 m_pageColorOverlay.reset(); | 3731 m_pageColorOverlay.reset(); |
3732 | 3732 |
3733 if (color == Color::transparent) | 3733 if (color == Color::transparent) |
3734 return; | 3734 return; |
3735 | 3735 |
3736 m_pageColorOverlay = PageOverlay::create( | 3736 m_pageColorOverlay = PageOverlay::create( |
3737 mainFrameImpl(), WTF::makeUnique<ColorOverlay>(color)); | 3737 mainFrameImpl(), WTF::makeUnique<ColorOverlay>(color)); |
3738 m_pageColorOverlay->update(); | 3738 |
| 3739 // Run compositing update before calling updatePageOverlays. |
| 3740 mainFrameImpl() |
| 3741 ->frameView() |
| 3742 ->updateLifecycleToCompositingCleanPlusScrolling(); |
| 3743 |
| 3744 updatePageOverlays(); |
3739 } | 3745 } |
3740 | 3746 |
3741 WebPageImportanceSignals* WebViewImpl::pageImportanceSignals() { | 3747 WebPageImportanceSignals* WebViewImpl::pageImportanceSignals() { |
3742 return &m_pageImportanceSignals; | 3748 return &m_pageImportanceSignals; |
3743 } | 3749 } |
3744 | 3750 |
3745 Element* WebViewImpl::focusedElement() const { | 3751 Element* WebViewImpl::focusedElement() const { |
3746 LocalFrame* frame = m_page->focusController().focusedFrame(); | 3752 LocalFrame* frame = m_page->focusController().focusedFrame(); |
3747 if (!frame) | 3753 if (!frame) |
3748 return nullptr; | 3754 return nullptr; |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4168 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4174 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
4169 return nullptr; | 4175 return nullptr; |
4170 return focusedFrame; | 4176 return focusedFrame; |
4171 } | 4177 } |
4172 | 4178 |
4173 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4179 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
4174 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4180 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
4175 } | 4181 } |
4176 | 4182 |
4177 } // namespace blink | 4183 } // namespace blink |
OLD | NEW |