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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 14408004: Fix incorrect evaluation of resolution media queries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 String Internals::pageSizeAndMarginsInPixels(int pageNumber, int width, int heig ht, int marginTop, int marginRight, int marginBottom, int marginLeft, ExceptionC ode& ec) const 1760 String Internals::pageSizeAndMarginsInPixels(int pageNumber, int width, int heig ht, int marginTop, int marginRight, int marginBottom, int marginLeft, ExceptionC ode& ec) const
1761 { 1761 {
1762 if (!frame()) { 1762 if (!frame()) {
1763 ec = INVALID_ACCESS_ERR; 1763 ec = INVALID_ACCESS_ERR;
1764 return String(); 1764 return String();
1765 } 1765 }
1766 1766
1767 return PrintContext::pageSizeAndMarginsInPixels(frame(), pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft); 1767 return PrintContext::pageSizeAndMarginsInPixels(frame(), pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft);
1768 } 1768 }
1769 1769
1770 void Internals::setDeviceScaleFactor(float scaleFactor, ExceptionCode& ec)
1771 {
1772 Document* document = contextDocument();
1773 if (!document || !document->page()) {
1774 ec = INVALID_ACCESS_ERR;
1775 return;
1776 }
1777 Page* page = document->page();
1778 page->setDeviceScaleFactor(scaleFactor);
johnme 2013/04/29 13:25:45 Shouldn't you restore the original device scale fa
1779 }
1780
1770 void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionCod e& ec) 1781 void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionCod e& ec)
1771 { 1782 {
1772 Document* document = contextDocument(); 1783 Document* document = contextDocument();
1773 if (!document || !document->page()) { 1784 if (!document || !document->page()) {
1774 ec = INVALID_ACCESS_ERR; 1785 ec = INVALID_ACCESS_ERR;
1775 return; 1786 return;
1776 } 1787 }
1777 Page* page = document->page(); 1788 Page* page = document->page();
1778 page->setPageScaleFactor(scaleFactor, IntPoint(x, y)); 1789 page->setPageScaleFactor(scaleFactor, IntPoint(x, y));
1779 } 1790 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 2006
1996 RenderObject* renderer = select->renderer(); 2007 RenderObject* renderer = select->renderer();
1997 if (!renderer->isMenuList()) 2008 if (!renderer->isMenuList())
1998 return false; 2009 return false;
1999 2010
2000 RenderMenuList* menuList = toRenderMenuList(renderer); 2011 RenderMenuList* menuList = toRenderMenuList(renderer);
2001 return menuList->popupIsVisible(); 2012 return menuList->popupIsVisible();
2002 } 2013 }
2003 2014
2004 } 2015 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698