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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 // Always clear any existing highlight when this is invoked, even if we | 1176 // Always clear any existing highlight when this is invoked, even if we |
1177 // don't get a new target to highlight. | 1177 // don't get a new target to highlight. |
1178 m_linkHighlights.clear(); | 1178 m_linkHighlights.clear(); |
1179 | 1179 |
1180 // LinkHighlight reads out layout and compositing state, so we need to make
sure that's all up to date. | 1180 // LinkHighlight reads out layout and compositing state, so we need to make
sure that's all up to date. |
1181 layout(); | 1181 layout(); |
1182 | 1182 |
1183 for (size_t i = 0; i < highlightNodes.size(); ++i) { | 1183 for (size_t i = 0; i < highlightNodes.size(); ++i) { |
1184 Node* node = highlightNodes[i]; | 1184 Node* node = highlightNodes[i]; |
1185 | 1185 |
1186 if (!node || !node->renderer() || !node->renderer()->enclosingLayer()) | 1186 if (!node || !node->renderer()) |
1187 continue; | 1187 continue; |
1188 | 1188 |
1189 Color highlightColor = node->renderer()->style()->tapHighlightColor(); | 1189 Color highlightColor = node->renderer()->style()->tapHighlightColor(); |
1190 // Safari documentation for -webkit-tap-highlight-color says if the spec
ified color has 0 alpha, | 1190 // Safari documentation for -webkit-tap-highlight-color says if the spec
ified color has 0 alpha, |
1191 // then tap highlighting is disabled. | 1191 // then tap highlighting is disabled. |
1192 // http://developer.apple.com/library/safari/#documentation/appleapplica
tions/reference/safaricssref/articles/standardcssproperties.html | 1192 // http://developer.apple.com/library/safari/#documentation/appleapplica
tions/reference/safaricssref/articles/standardcssproperties.html |
1193 if (!highlightColor.alpha()) | 1193 if (!highlightColor.alpha()) |
1194 continue; | 1194 continue; |
1195 | 1195 |
1196 m_linkHighlights.append(LinkHighlight::create(node, this)); | 1196 m_linkHighlights.append(LinkHighlight::create(node, this)); |
(...skipping 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4003 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4003 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4004 | 4004 |
4005 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4005 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4006 return false; | 4006 return false; |
4007 | 4007 |
4008 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4008 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4009 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4009 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4010 } | 4010 } |
4011 | 4011 |
4012 } // namespace blink | 4012 } // namespace blink |
OLD | NEW |