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

Side by Side Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 253843007: [DevTools] Clean up text autosizing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test Created 6 years, 7 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 | « LayoutTests/inspector/text-autosizing-override-expected.txt ('k') | no next file » | 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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 Document* document = mainFrame()->document(); 1152 Document* document = mainFrame()->document();
1153 if (document) { 1153 if (document) {
1154 document->styleResolverChanged(RecalcStyleImmediately); 1154 document->styleResolverChanged(RecalcStyleImmediately);
1155 document->mediaQueryAffectingValueChanged(); 1155 document->mediaQueryAffectingValueChanged();
1156 } 1156 }
1157 InspectorInstrumentation::mediaQueryResultChanged(document); 1157 InspectorInstrumentation::mediaQueryResultChanged(document);
1158 1158
1159 if (m_deviceMetricsOverridden) { 1159 if (m_deviceMetricsOverridden) {
1160 m_page->settings().setTextAutosizingEnabled(textAutosizingEnabled); 1160 m_page->settings().setTextAutosizingEnabled(textAutosizingEnabled);
1161 m_page->settings().setDeviceScaleAdjustment(fontScaleFactor); 1161 m_page->settings().setDeviceScaleAdjustment(fontScaleFactor);
1162 } else {
1163 m_page->settings().setTextAutosizingEnabled(m_embedderTextAutosizingEnab led);
1164 m_page->settings().setDeviceScaleAdjustment(m_embedderFontScaleFactor);
1162 } 1165 }
1163 1166
1164 // FIXME: allow metrics override, fps counter and continuous painting at the same time: crbug.com/299837. 1167 // FIXME: allow metrics override, fps counter and continuous painting at the same time: crbug.com/299837.
1165 m_client->setShowFPSCounter(m_state->getBoolean(PageAgentState::pageAgentSho wFPSCounter) && !m_deviceMetricsOverridden); 1168 m_client->setShowFPSCounter(m_state->getBoolean(PageAgentState::pageAgentSho wFPSCounter) && !m_deviceMetricsOverridden);
1166 m_client->setContinuousPaintingEnabled(m_state->getBoolean(PageAgentState::p ageAgentContinuousPaintingEnabled) && !m_deviceMetricsOverridden); 1169 m_client->setContinuousPaintingEnabled(m_state->getBoolean(PageAgentState::p ageAgentContinuousPaintingEnabled) && !m_deviceMetricsOverridden);
1167 } 1170 }
1168 1171
1169 void InspectorPageAgent::updateTouchEventEmulationInPage(bool enabled) 1172 void InspectorPageAgent::updateTouchEventEmulationInPage(bool enabled)
1170 { 1173 {
1171 if (!m_touchEmulationEnabled) { 1174 if (!m_touchEmulationEnabled) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 } 1261 }
1259 1262
1260 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) 1263 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid)
1261 { 1264 {
1262 m_state->setBoolean(PageAgentState::showSizeOnResize, show); 1265 m_state->setBoolean(PageAgentState::showSizeOnResize, show);
1263 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; 1266 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ;
1264 } 1267 }
1265 1268
1266 } // namespace WebCore 1269 } // namespace WebCore
1267 1270
OLDNEW
« no previous file with comments | « LayoutTests/inspector/text-autosizing-override-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698