Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |