Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 1285703004: Update css styles after modifying display mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/DevToolsEmulator.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 if (!mainFrameImpl()->frameView()->needsLayout()) 1735 if (!mainFrameImpl()->frameView()->needsLayout())
1736 postLayoutResize(mainFrameImpl()); 1736 postLayoutResize(mainFrameImpl());
1737 } 1737 }
1738 1738
1739 // When device emulation is enabled, device size values may change - they ar e 1739 // When device emulation is enabled, device size values may change - they ar e
1740 // usually set equal to the view size. These values are not considered viewp ort-dependent 1740 // usually set equal to the view size. These values are not considered viewp ort-dependent
1741 // (see MediaQueryExp::isViewportDependent), since they are only viewport-de pendent in emulation mode, 1741 // (see MediaQueryExp::isViewportDependent), since they are only viewport-de pendent in emulation mode,
1742 // and thus will not be invalidated in |FrameView::performPreLayoutTasks|. 1742 // and thus will not be invalidated in |FrameView::performPreLayoutTasks|.
1743 // Therefore we should force explicit media queries invalidation here. 1743 // Therefore we should force explicit media queries invalidation here.
1744 if (m_devToolsEmulator->deviceEmulationEnabled()) { 1744 if (m_devToolsEmulator->deviceEmulationEnabled()) {
1745 if (Document* document = mainFrameImpl()->frame()->document()) { 1745 if (Document* document = mainFrameImpl()->frame()->document())
1746 document->styleResolverChanged();
1747 document->mediaQueryAffectingValueChanged(); 1746 document->mediaQueryAffectingValueChanged();
1748 }
1749 } 1747 }
1750 } 1748 }
1751 1749
1752 void WebViewImpl::setTopControlsHeight(float height, bool topControlsShrinkLayou tSize) 1750 void WebViewImpl::setTopControlsHeight(float height, bool topControlsShrinkLayou tSize)
1753 { 1751 {
1754 topControls().setHeight(height, topControlsShrinkLayoutSize); 1752 topControls().setHeight(height, topControlsShrinkLayoutSize);
1755 } 1753 }
1756 1754
1757 void WebViewImpl::updateTopControlsState(WebTopControlsState constraint, WebTopC ontrolsState current, bool animate) 1755 void WebViewImpl::updateTopControlsState(WebTopControlsState constraint, WebTopC ontrolsState current, bool animate)
1758 { 1756 {
(...skipping 2711 matching lines...) Expand 10 before | Expand all | Expand 10 after
4470 if (m_pageColorOverlay) 4468 if (m_pageColorOverlay)
4471 m_pageColorOverlay->update(); 4469 m_pageColorOverlay->update();
4472 if (m_inspectorOverlay) { 4470 if (m_inspectorOverlay) {
4473 PageOverlay* inspectorPageOverlay = m_inspectorOverlay->pageOverlay(); 4471 PageOverlay* inspectorPageOverlay = m_inspectorOverlay->pageOverlay();
4474 if (inspectorPageOverlay) 4472 if (inspectorPageOverlay)
4475 inspectorPageOverlay->update(); 4473 inspectorPageOverlay->update();
4476 } 4474 }
4477 } 4475 }
4478 4476
4479 } // namespace blink 4477 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/DevToolsEmulator.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698