| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 Google Inc. All Rights Reserved. | 2 * Copyright 2007 Google Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * ***** BEGIN LICENSE BLOCK ***** | 6 * ***** BEGIN LICENSE BLOCK ***** |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1397 settings->setFontRenderingMode(NormalRenderingMode); | 1397 settings->setFontRenderingMode(NormalRenderingMode); |
| 1398 settings->setJavaEnabled(preferences.java_enabled); | 1398 settings->setJavaEnabled(preferences.java_enabled); |
| 1399 | 1399 |
| 1400 // Turn this on to cause WebCore to paint the resize corner for us. | 1400 // Turn this on to cause WebCore to paint the resize corner for us. |
| 1401 settings->setShouldPaintCustomScrollbars(true); | 1401 settings->setShouldPaintCustomScrollbars(true); |
| 1402 | 1402 |
| 1403 // Mitigate attacks from local HTML files by not granting file:// URLs | 1403 // Mitigate attacks from local HTML files by not granting file:// URLs |
| 1404 // universal access. | 1404 // universal access. |
| 1405 settings->setAllowUniversalAccessFromFileURLs(false); | 1405 settings->setAllowUniversalAccessFromFileURLs(false); |
| 1406 | 1406 |
| 1407 // We prevent WebKit from checking if it needs to add a "text direction" |
| 1408 // submenu to a context menu. it is not only because we don't need the result |
| 1409 // but also because it cause a possible crash in Editor::hasBidiSelection(). |
| 1410 settings->setTextDirectionSubmenuInclusionBehavior( |
| 1411 TextDirectionSubmenuNeverIncluded); |
| 1412 |
| 1407 #if defined(OS_WIN) | 1413 #if defined(OS_WIN) |
| 1408 // RenderTheme is a singleton that needs to know the default font size to | 1414 // RenderTheme is a singleton that needs to know the default font size to |
| 1409 // draw some form controls. We let it know each time the size changes. | 1415 // draw some form controls. We let it know each time the size changes. |
| 1410 WebCore::RenderThemeChromiumWin::setDefaultFontSize(preferences.default_font_s
ize); | 1416 WebCore::RenderThemeChromiumWin::setDefaultFontSize(preferences.default_font_s
ize); |
| 1411 #endif | 1417 #endif |
| 1412 } | 1418 } |
| 1413 | 1419 |
| 1414 const WebPreferences& WebViewImpl::GetPreferences() { | 1420 const WebPreferences& WebViewImpl::GetPreferences() { |
| 1415 return webprefs_; | 1421 return webprefs_; |
| 1416 } | 1422 } |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1812 | 1818 |
| 1813 return document->focusedNode(); | 1819 return document->focusedNode(); |
| 1814 } | 1820 } |
| 1815 | 1821 |
| 1816 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { | 1822 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { |
| 1817 IntPoint doc_point( | 1823 IntPoint doc_point( |
| 1818 page_->mainFrame()->view()->windowToContents(pos)); | 1824 page_->mainFrame()->view()->windowToContents(pos)); |
| 1819 return page_->mainFrame()->eventHandler()-> | 1825 return page_->mainFrame()->eventHandler()-> |
| 1820 hitTestResultAtPoint(doc_point, false); | 1826 hitTestResultAtPoint(doc_point, false); |
| 1821 } | 1827 } |
| OLD | NEW |