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

Side by Side Diff: Tools/DumpRenderTree/chromium/LayoutTestController.cpp

Issue 7121007: Merge 88174 - 2011-06-06 Shishir Agrawal <shishir@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 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 | « Tools/ChangeLog ('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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) 3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 } 1845 }
1846 1846
1847 void LayoutTestController::setPageVisibility(const CppArgumentList& arguments, C ppVariant* result) 1847 void LayoutTestController::setPageVisibility(const CppArgumentList& arguments, C ppVariant* result)
1848 { 1848 {
1849 if (arguments.size() > 0 && arguments[0].isString()) { 1849 if (arguments.size() > 0 && arguments[0].isString()) {
1850 string newVisibility = arguments[0].toString(); 1850 string newVisibility = arguments[0].toString();
1851 if (newVisibility == "visible") 1851 if (newVisibility == "visible")
1852 m_shell->webView()->setVisibilityState(WebPageVisibilityStateVisible , false); 1852 m_shell->webView()->setVisibilityState(WebPageVisibilityStateVisible , false);
1853 else if (newVisibility == "hidden") 1853 else if (newVisibility == "hidden")
1854 m_shell->webView()->setVisibilityState(WebPageVisibilityStateHidden, false); 1854 m_shell->webView()->setVisibilityState(WebPageVisibilityStateHidden, false);
1855 else if (newVisibility == "prerender")
1856 m_shell->webView()->setVisibilityState(WebPageVisibilityStatePrerend er, false);
1855 } 1857 }
1856 } 1858 }
1857 1859
1858 void LayoutTestController::setTextDirection(const CppArgumentList& arguments, Cp pVariant* result) 1860 void LayoutTestController::setTextDirection(const CppArgumentList& arguments, Cp pVariant* result)
1859 { 1861 {
1860 result->setNull(); 1862 result->setNull();
1861 if (arguments.size() != 1 || !arguments[0].isString()) 1863 if (arguments.size() != 1 || !arguments[0].isString())
1862 return; 1864 return;
1863 1865
1864 // Map a direction name to a WebTextDirection value. 1866 // Map a direction name to a WebTextDirection value.
1865 std::string directionName = arguments[0].toString(); 1867 std::string directionName = arguments[0].toString();
1866 WebKit::WebTextDirection direction; 1868 WebKit::WebTextDirection direction;
1867 if (directionName == "auto") 1869 if (directionName == "auto")
1868 direction = WebKit::WebTextDirectionDefault; 1870 direction = WebKit::WebTextDirectionDefault;
1869 else if (directionName == "rtl") 1871 else if (directionName == "rtl")
1870 direction = WebKit::WebTextDirectionRightToLeft; 1872 direction = WebKit::WebTextDirectionRightToLeft;
1871 else if (directionName == "ltr") 1873 else if (directionName == "ltr")
1872 direction = WebKit::WebTextDirectionLeftToRight; 1874 direction = WebKit::WebTextDirectionLeftToRight;
1873 else 1875 else
1874 return; 1876 return;
1875 1877
1876 m_shell->webView()->setTextDirection(direction); 1878 m_shell->webView()->setTextDirection(direction);
1877 } 1879 }
OLDNEW
« no previous file with comments | « Tools/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698