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 3816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3827 #if USE(DEFAULT_RENDER_THEME) | 3827 #if USE(DEFAULT_RENDER_THEME) |
3828 LayoutThemeDefault::setSelectionColors(activeBackgroundColor, activeForegrou ndColor, inactiveBackgroundColor, inactiveForegroundColor); | 3828 LayoutThemeDefault::setSelectionColors(activeBackgroundColor, activeForegrou ndColor, inactiveBackgroundColor, inactiveForegroundColor); |
3829 LayoutTheme::theme().platformColorsDidChange(); | 3829 LayoutTheme::theme().platformColorsDidChange(); |
3830 #endif | 3830 #endif |
3831 } | 3831 } |
3832 | 3832 |
3833 void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag e) | 3833 void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag e) |
3834 { | 3834 { |
3835 if (isNewNavigation && !isNavigationWithinPage) { | 3835 if (isNewNavigation && !isNavigationWithinPage) { |
3836 pageScaleConstraintsSet().setNeedsReset(true); | 3836 pageScaleConstraintsSet().setNeedsReset(true); |
3837 pageImportanceSignals().onCommitLoad(); | 3837 m_pageImportanceSignals.onCommitLoad(); |
3838 if (m_client) | |
3839 m_client->pageImportanceSignalsChanged(); | |
tkent
2015/09/15 23:16:42
Can we move the pageImportanceSignalsChanged call
| |
3838 } | 3840 } |
3839 | 3841 |
3840 // Give the visual viewport's scroll layer its initial size. | 3842 // Give the visual viewport's scroll layer its initial size. |
3841 page()->frameHost().visualViewport().mainFrameDidChangeSize(); | 3843 page()->frameHost().visualViewport().mainFrameDidChangeSize(); |
3842 | 3844 |
3843 // Make sure link highlight from previous page is cleared. | 3845 // Make sure link highlight from previous page is cleared. |
3844 m_linkHighlights.clear(); | 3846 m_linkHighlights.clear(); |
3845 endActiveFlingAnimation(); | 3847 endActiveFlingAnimation(); |
3846 m_userGestureObserved = false; | 3848 m_userGestureObserved = false; |
3847 } | 3849 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4013 if (m_pageColorOverlay) | 4015 if (m_pageColorOverlay) |
4014 m_pageColorOverlay.clear(); | 4016 m_pageColorOverlay.clear(); |
4015 | 4017 |
4016 if (color == Color::transparent) | 4018 if (color == Color::transparent) |
4017 return; | 4019 return; |
4018 | 4020 |
4019 m_pageColorOverlay = PageOverlay::create(this, new ColorOverlay(color)); | 4021 m_pageColorOverlay = PageOverlay::create(this, new ColorOverlay(color)); |
4020 m_pageColorOverlay->update(); | 4022 m_pageColorOverlay->update(); |
4021 } | 4023 } |
4022 | 4024 |
4025 WebPageImportanceSignals* WebViewImpl::pageImportanceSignals() | |
4026 { | |
4027 return &m_pageImportanceSignals; | |
4028 } | |
4029 | |
4023 Element* WebViewImpl::focusedElement() const | 4030 Element* WebViewImpl::focusedElement() const |
4024 { | 4031 { |
4025 Frame* frame = m_page->focusController().focusedFrame(); | 4032 Frame* frame = m_page->focusController().focusedFrame(); |
4026 if (!frame || !frame->isLocalFrame()) | 4033 if (!frame || !frame->isLocalFrame()) |
4027 return 0; | 4034 return 0; |
4028 | 4035 |
4029 Document* document = toLocalFrame(frame)->document(); | 4036 Document* document = toLocalFrame(frame)->document(); |
4030 if (!document) | 4037 if (!document) |
4031 return 0; | 4038 return 0; |
4032 | 4039 |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4419 if (m_pageColorOverlay) | 4426 if (m_pageColorOverlay) |
4420 m_pageColorOverlay->update(); | 4427 m_pageColorOverlay->update(); |
4421 if (InspectorOverlayImpl* overlay = inspectorOverlay()) { | 4428 if (InspectorOverlayImpl* overlay = inspectorOverlay()) { |
4422 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4429 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
4423 if (inspectorPageOverlay) | 4430 if (inspectorPageOverlay) |
4424 inspectorPageOverlay->update(); | 4431 inspectorPageOverlay->update(); |
4425 } | 4432 } |
4426 } | 4433 } |
4427 | 4434 |
4428 } // namespace blink | 4435 } // namespace blink |
OLD | NEW |