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

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

Issue 1086873002: Rename NodeRenderingTraversal to LayoutTreeBuilderTraversal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 10 matching lines...) Expand all
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 27
28 #include "web/LinkHighlight.h" 28 #include "web/LinkHighlight.h"
29 29
30 #include "SkMatrix44.h" 30 #include "SkMatrix44.h"
31 #include "core/dom/LayoutTreeBuilderTraversal.h"
31 #include "core/dom/Node.h" 32 #include "core/dom/Node.h"
32 #include "core/dom/NodeRenderingTraversal.h"
33 #include "core/frame/FrameView.h" 33 #include "core/frame/FrameView.h"
34 #include "core/frame/LocalFrame.h" 34 #include "core/frame/LocalFrame.h"
35 #include "core/layout/LayoutBoxModelObject.h" 35 #include "core/layout/LayoutBoxModelObject.h"
36 #include "core/layout/LayoutObject.h" 36 #include "core/layout/LayoutObject.h"
37 #include "core/layout/LayoutView.h" 37 #include "core/layout/LayoutView.h"
38 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" 38 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h"
39 #include "core/style/ShadowData.h" 39 #include "core/style/ShadowData.h"
40 #include "core/paint/DeprecatedPaintLayer.h" 40 #include "core/paint/DeprecatedPaintLayer.h"
41 #include "platform/graphics/Color.h" 41 #include "platform/graphics/Color.h"
42 #include "platform/graphics/paint/DrawingRecorder.h" 42 #include "platform/graphics/paint/DrawingRecorder.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 return; 172 return;
173 173
174 LayoutObject* renderer = node.layoutObject(); 174 LayoutObject* renderer = node.layoutObject();
175 175
176 // For inline elements, absoluteQuads will return a line box based on the li ne-height 176 // For inline elements, absoluteQuads will return a line box based on the li ne-height
177 // and font metrics, which is technically incorrect as replaced elements lik e images 177 // and font metrics, which is technically incorrect as replaced elements lik e images
178 // should use their intristic height and expand the linebox as needed. To g et an 178 // should use their intristic height and expand the linebox as needed. To g et an
179 // appropriately sized highlight we descend into the children and have them add their 179 // appropriately sized highlight we descend into the children and have them add their
180 // boxes. 180 // boxes.
181 if (renderer->isLayoutInline()) { 181 if (renderer->isLayoutInline()) {
182 for (Node* child = NodeRenderingTraversal::firstChild(node); child; chil d = NodeRenderingTraversal::nextSibling(*child)) 182 for (Node* child = LayoutTreeBuilderTraversal::firstChild(node); child; child = LayoutTreeBuilderTraversal::nextSibling(*child))
183 computeQuads(*child, outQuads); 183 computeQuads(*child, outQuads);
184 } else { 184 } else {
185 // FIXME: this does not need to be absolute, just in the paint invalidat ion container's space. 185 // FIXME: this does not need to be absolute, just in the paint invalidat ion container's space.
186 renderer->absoluteQuads(outQuads); 186 renderer->absoluteQuads(outQuads);
187 } 187 }
188 } 188 }
189 189
190 bool LinkHighlight::computeHighlightLayerPathAndPosition(const LayoutBoxModelObj ect* paintInvalidationContainer) 190 bool LinkHighlight::computeHighlightLayerPathAndPosition(const LayoutBoxModelObj ect* paintInvalidationContainer)
191 { 191 {
192 if (!m_node || !m_node->layoutObject() || !m_currentGraphicsLayer) 192 if (!m_node || !m_node->layoutObject() || !m_currentGraphicsLayer)
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Make sure we update geometry on the next callback from WebViewImpl::layou t(). 360 // Make sure we update geometry on the next callback from WebViewImpl::layou t().
361 m_geometryNeedsUpdate = true; 361 m_geometryNeedsUpdate = true;
362 } 362 }
363 363
364 WebLayer* LinkHighlight::layer() 364 WebLayer* LinkHighlight::layer()
365 { 365 {
366 return clipLayer(); 366 return clipLayer();
367 } 367 }
368 368
369 } // namespace blink 369 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698