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 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 void WebViewImpl::enableTapHighlight(const PlatformGestureEvent& tapEvent) | 1253 void WebViewImpl::enableTapHighlight(const PlatformGestureEvent& tapEvent) |
1254 { | 1254 { |
1255 // Always clear any existing highlight when this is invoked, even if we don'
t get a new target to highlight. | 1255 // Always clear any existing highlight when this is invoked, even if we don'
t get a new target to highlight. |
1256 m_linkHighlight.clear(); | 1256 m_linkHighlight.clear(); |
1257 | 1257 |
1258 Node* touchNode = bestTapNode(tapEvent); | 1258 Node* touchNode = bestTapNode(tapEvent); |
1259 | 1259 |
1260 if (!touchNode || !touchNode->renderer() || !touchNode->renderer()->enclosin
gLayer()) | 1260 if (!touchNode || !touchNode->renderer() || !touchNode->renderer()->enclosin
gLayer()) |
1261 return; | 1261 return; |
1262 | 1262 |
1263 Color highlightColor = touchNode->renderer()->style()->tapHighlightColor(); | 1263 Color highlightColor = touchNode->renderer()->resolveColor(CSSPropertyWebkit
TapHighlightColor); |
1264 // Safari documentation for -webkit-tap-highlight-color says if the specifie
d color has 0 alpha, | 1264 // Safari documentation for -webkit-tap-highlight-color says if the specifie
d color has 0 alpha, |
1265 // then tap highlighting is disabled. | 1265 // then tap highlighting is disabled. |
1266 // http://developer.apple.com/library/safari/#documentation/appleapplication
s/reference/safaricssref/articles/standardcssproperties.html | 1266 // http://developer.apple.com/library/safari/#documentation/appleapplication
s/reference/safaricssref/articles/standardcssproperties.html |
1267 if (!highlightColor.alpha()) | 1267 if (!highlightColor.alpha()) |
1268 return; | 1268 return; |
1269 | 1269 |
1270 m_linkHighlight = LinkHighlight::create(touchNode, this); | 1270 m_linkHighlight = LinkHighlight::create(touchNode, this); |
1271 } | 1271 } |
1272 | 1272 |
1273 void WebViewImpl::animateZoomAroundPoint(const IntPoint& point, AutoZoomType zoo
mType) | 1273 void WebViewImpl::animateZoomAroundPoint(const IntPoint& point, AutoZoomType zoo
mType) |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2457 return frame->selection()->isContentEditable(); | 2457 return frame->selection()->isContentEditable(); |
2458 } | 2458 } |
2459 | 2459 |
2460 WebColor WebViewImpl::backgroundColor() const | 2460 WebColor WebViewImpl::backgroundColor() const |
2461 { | 2461 { |
2462 if (isTransparent()) | 2462 if (isTransparent()) |
2463 return Color::transparent; | 2463 return Color::transparent; |
2464 if (!m_page) | 2464 if (!m_page) |
2465 return Color::white; | 2465 return Color::white; |
2466 FrameView* view = m_page->mainFrame()->view(); | 2466 FrameView* view = m_page->mainFrame()->view(); |
2467 Color backgroundColor = view->documentBackgroundColor(); | 2467 StyleColor backgroundColor = view->documentBackgroundColor(); |
2468 if (!backgroundColor.isValid()) | 2468 if (!backgroundColor.isValid()) |
2469 return Color::white; | 2469 return Color::white; |
2470 return backgroundColor.rgb(); | 2470 return backgroundColor.rgb(); |
2471 } | 2471 } |
2472 | 2472 |
2473 bool WebViewImpl::caretOrSelectionRange(size_t* location, size_t* length) | 2473 bool WebViewImpl::caretOrSelectionRange(size_t* location, size_t* length) |
2474 { | 2474 { |
2475 const Frame* focused = focusedWebCoreFrame(); | 2475 const Frame* focused = focusedWebCoreFrame(); |
2476 if (!focused) | 2476 if (!focused) |
2477 return false; | 2477 return false; |
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4145 } | 4145 } |
4146 | 4146 |
4147 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4147 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
4148 { | 4148 { |
4149 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); | 4149 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); |
4150 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom | 4150 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom |
4151 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); | 4151 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); |
4152 } | 4152 } |
4153 | 4153 |
4154 } // namespace WebKit | 4154 } // namespace WebKit |
OLD | NEW |