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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 String Internals::pageSizeAndMarginsInPixels(int pageNumber, int width, int heig
ht, int marginTop, int marginRight, int marginBottom, int marginLeft, ExceptionC
ode& ec) const | 1690 String Internals::pageSizeAndMarginsInPixels(int pageNumber, int width, int heig
ht, int marginTop, int marginRight, int marginBottom, int marginLeft, ExceptionC
ode& ec) const |
1691 { | 1691 { |
1692 if (!frame()) { | 1692 if (!frame()) { |
1693 ec = INVALID_ACCESS_ERR; | 1693 ec = INVALID_ACCESS_ERR; |
1694 return String(); | 1694 return String(); |
1695 } | 1695 } |
1696 | 1696 |
1697 return PrintContext::pageSizeAndMarginsInPixels(frame(), pageNumber, width,
height, marginTop, marginRight, marginBottom, marginLeft); | 1697 return PrintContext::pageSizeAndMarginsInPixels(frame(), pageNumber, width,
height, marginTop, marginRight, marginBottom, marginLeft); |
1698 } | 1698 } |
1699 | 1699 |
| 1700 void Internals::setDeviceScaleFactor(float scaleFactor, ExceptionCode& ec) |
| 1701 { |
| 1702 Document* document = contextDocument(); |
| 1703 if (!document || !document->page()) { |
| 1704 ec = INVALID_ACCESS_ERR; |
| 1705 return; |
| 1706 } |
| 1707 Page* page = document->page(); |
| 1708 page->setDeviceScaleFactor(scaleFactor); |
| 1709 } |
| 1710 |
1700 void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionCod
e& ec) | 1711 void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionCod
e& ec) |
1701 { | 1712 { |
1702 Document* document = contextDocument(); | 1713 Document* document = contextDocument(); |
1703 if (!document || !document->page()) { | 1714 if (!document || !document->page()) { |
1704 ec = INVALID_ACCESS_ERR; | 1715 ec = INVALID_ACCESS_ERR; |
1705 return; | 1716 return; |
1706 } | 1717 } |
1707 Page* page = document->page(); | 1718 Page* page = document->page(); |
1708 page->setPageScaleFactor(scaleFactor, IntPoint(x, y)); | 1719 page->setPageScaleFactor(scaleFactor, IntPoint(x, y)); |
1709 } | 1720 } |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 | 1936 |
1926 RenderObject* renderer = select->renderer(); | 1937 RenderObject* renderer = select->renderer(); |
1927 if (!renderer->isMenuList()) | 1938 if (!renderer->isMenuList()) |
1928 return false; | 1939 return false; |
1929 | 1940 |
1930 RenderMenuList* menuList = toRenderMenuList(renderer); | 1941 RenderMenuList* menuList = toRenderMenuList(renderer); |
1931 return menuList->popupIsVisible(); | 1942 return menuList->popupIsVisible(); |
1932 } | 1943 } |
1933 | 1944 |
1934 } | 1945 } |
OLD | NEW |