Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 215843002: Dispel the myth that enclosingLayer can return zero (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698