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

Unified Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 25735003: Add text autosizing override in the inspector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typeo Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/core/page/Settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index 0438dc0809a8595fd6272069581ffbfdcf2f2bf2..ea8999452f5b1c5dbe1c867d22ea384cc49b86ba 100644
--- a/Source/core/inspector/InspectorPageAgent.cpp
+++ b/Source/core/inspector/InspectorPageAgent.cpp
@@ -1252,6 +1252,20 @@ void InspectorPageAgent::applyEmulatedMedia(String* media)
*media = emulatedMedia;
}
+void InspectorPageAgent::setTextAutosizingOverride(ErrorString*, bool enabled)
+{
+ Settings& settings = m_page->settings();
+ settings.setTextAutosizingEnabledOverride(enabled ? TextAutosizingOverride::TextAutosizingOverrideEnabled : TextAutosizingOverride::TextAutosizingOverrideDisabled);
+ m_overlay->setOverride(InspectorOverlay::TextAutosizingOverride, true);
+}
+
+void InspectorPageAgent::clearTextAutosizingOverride(ErrorString* errorString)
+{
+ Settings& settings = m_page->settings();
+ settings.setTextAutosizingEnabledOverride(TextAutosizingOverride::NoOverride);
+ m_overlay->setOverride(InspectorOverlay::TextAutosizingOverride, false);
+}
+
void InspectorPageAgent::setForceCompositingMode(ErrorString* errorString, bool force)
{
Settings& settings = m_page->settings();
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/core/page/Settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698