| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 void WebViewImpl::enableTapHighlight(const PlatformGestureEvent& tapEvent) | 1235 void WebViewImpl::enableTapHighlight(const PlatformGestureEvent& tapEvent) |
| 1236 { | 1236 { |
| 1237 // Always clear any existing highlight when this is invoked, even if we don'
t get a new target to highlight. | 1237 // Always clear any existing highlight when this is invoked, even if we don'
t get a new target to highlight. |
| 1238 m_linkHighlight.clear(); | 1238 m_linkHighlight.clear(); |
| 1239 | 1239 |
| 1240 Node* touchNode = bestTapNode(tapEvent); | 1240 Node* touchNode = bestTapNode(tapEvent); |
| 1241 | 1241 |
| 1242 if (!touchNode || !touchNode->renderer() || !touchNode->renderer()->enclosin
gLayer()) | 1242 if (!touchNode || !touchNode->renderer() || !touchNode->renderer()->enclosin
gLayer()) |
| 1243 return; | 1243 return; |
| 1244 | 1244 |
| 1245 Color highlightColor = touchNode->renderer()->resolveColor(CSSPropertyWebkit
TapHighlightColor); | 1245 Color highlightColor = touchNode->renderer()->style()->tapHighlightColor(); |
| 1246 // Safari documentation for -webkit-tap-highlight-color says if the specifie
d color has 0 alpha, | 1246 // Safari documentation for -webkit-tap-highlight-color says if the specifie
d color has 0 alpha, |
| 1247 // then tap highlighting is disabled. | 1247 // then tap highlighting is disabled. |
| 1248 // http://developer.apple.com/library/safari/#documentation/appleapplication
s/reference/safaricssref/articles/standardcssproperties.html | 1248 // http://developer.apple.com/library/safari/#documentation/appleapplication
s/reference/safaricssref/articles/standardcssproperties.html |
| 1249 if (!highlightColor.alpha()) | 1249 if (!highlightColor.alpha()) |
| 1250 return; | 1250 return; |
| 1251 | 1251 |
| 1252 m_linkHighlight = LinkHighlight::create(touchNode, this); | 1252 m_linkHighlight = LinkHighlight::create(touchNode, this); |
| 1253 } | 1253 } |
| 1254 | 1254 |
| 1255 void WebViewImpl::animateDoubleTapZoom(const IntPoint& point) | 1255 void WebViewImpl::animateDoubleTapZoom(const IntPoint& point) |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2400 return false; | 2400 return false; |
| 2401 } | 2401 } |
| 2402 | 2402 |
| 2403 WebColor WebViewImpl::backgroundColor() const | 2403 WebColor WebViewImpl::backgroundColor() const |
| 2404 { | 2404 { |
| 2405 if (isTransparent()) | 2405 if (isTransparent()) |
| 2406 return Color::transparent; | 2406 return Color::transparent; |
| 2407 if (!m_page) | 2407 if (!m_page) |
| 2408 return m_baseBackgroundColor; | 2408 return m_baseBackgroundColor; |
| 2409 FrameView* view = m_page->mainFrame()->view(); | 2409 FrameView* view = m_page->mainFrame()->view(); |
| 2410 StyleColor backgroundColor = view->documentBackgroundColor(); | 2410 Color backgroundColor = view->documentBackgroundColor(); |
| 2411 if (!backgroundColor.isValid()) | 2411 if (!backgroundColor.isValid()) |
| 2412 return m_baseBackgroundColor; | 2412 return m_baseBackgroundColor; |
| 2413 return backgroundColor.rgb(); | 2413 return backgroundColor.rgb(); |
| 2414 } | 2414 } |
| 2415 | 2415 |
| 2416 bool WebViewImpl::caretOrSelectionRange(size_t* location, size_t* length) | 2416 bool WebViewImpl::caretOrSelectionRange(size_t* location, size_t* length) |
| 2417 { | 2417 { |
| 2418 const Frame* focused = focusedWebCoreFrame(); | 2418 const Frame* focused = focusedWebCoreFrame(); |
| 2419 if (!focused) | 2419 if (!focused) |
| 2420 return false; | 2420 return false; |
| (...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4105 } | 4105 } |
| 4106 | 4106 |
| 4107 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4107 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
| 4108 { | 4108 { |
| 4109 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); | 4109 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); |
| 4110 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom | 4110 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom |
| 4111 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); | 4111 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); |
| 4112 } | 4112 } |
| 4113 | 4113 |
| 4114 } // namespace WebKit | 4114 } // namespace WebKit |
| OLD | NEW |