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

Side by Side Diff: Source/web/tests/LayoutGeometryMapTest.cpp

Issue 945803004: Merge back LayoutLayerModelObject into RenderBoxModelObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Better rebasing. Created 5 years, 10 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/web/LinkHighlight.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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (!webViewImpl) 83 if (!webViewImpl)
84 return nullptr; 84 return nullptr;
85 LocalFrame* frame = webViewImpl->mainFrameImpl()->frame(); 85 LocalFrame* frame = webViewImpl->mainFrameImpl()->frame();
86 Document* doc = frame->document(); 86 Document* doc = frame->document();
87 Element* element = doc->getElementById(elementId); 87 Element* element = doc->getElementById(elementId);
88 if (!element) 88 if (!element)
89 return nullptr; 89 return nullptr;
90 return element->renderBox(); 90 return element->renderBox();
91 } 91 }
92 92
93 static const LayoutLayerModelObject* getRenderContainer(WebView* webView, co nst WTF::AtomicString &elementId) 93 static const LayoutBoxModelObject* getRenderContainer(WebView* webView, cons t WTF::AtomicString &elementId)
94 { 94 {
95 RenderBox* rb = getRenderBox(webView, elementId); 95 RenderBox* rb = getRenderBox(webView, elementId);
96 if (!rb) 96 if (!rb)
97 return nullptr; 97 return nullptr;
98 Layer* compositingLayer = rb->enclosingLayer()->enclosingLayerForPaintIn validation(); 98 Layer* compositingLayer = rb->enclosingLayer()->enclosingLayerForPaintIn validation();
99 if (!compositingLayer) 99 if (!compositingLayer)
100 return nullptr; 100 return nullptr;
101 return compositingLayer->renderer(); 101 return compositingLayer->renderer();
102 } 102 }
103 103
104 static const LayoutLayerModelObject* getFrameRenderContainer(const char* fra meId, WebView* webView, const WTF::AtomicString &elementId) 104 static const LayoutBoxModelObject* getFrameRenderContainer(const char* frame Id, WebView* webView, const WTF::AtomicString &elementId)
105 { 105 {
106 RenderBox* rb = getFrameElement(frameId, webView, elementId); 106 RenderBox* rb = getFrameElement(frameId, webView, elementId);
107 if (!rb) 107 if (!rb)
108 return nullptr; 108 return nullptr;
109 Layer* compositingLayer = rb->enclosingLayer()->enclosingLayerForPaintIn validation(); 109 Layer* compositingLayer = rb->enclosingLayer()->enclosingLayerForPaintIn validation();
110 if (!compositingLayer) 110 if (!compositingLayer)
111 return nullptr; 111 return nullptr;
112 return compositingLayer->renderer(); 112 return compositingLayer->renderer();
113 } 113 }
114 114
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 rgm.pushMappingsToAncestor(getRenderBox(webView, "Col3"), nullptr); 388 rgm.pushMappingsToAncestor(getRenderBox(webView, "Col3"), nullptr);
389 EXPECT_NEAR(8.0f + offset * 2.0f, rgm.mapToContainer(point, nullptr).x(), 0. 1f); 389 EXPECT_NEAR(8.0f + offset * 2.0f, rgm.mapToContainer(point, nullptr).x(), 0. 1f);
390 EXPECT_NEAR(8.0f, rgm.mapToContainer(point, nullptr).y(), 0.1f); 390 EXPECT_NEAR(8.0f, rgm.mapToContainer(point, nullptr).y(), 0.1f);
391 EXPECT_NEAR(8.0f + offset * 2.0f, rectFromQuad(rgm.mapToContainer(rect, null ptr)).x(), 0.1f); 391 EXPECT_NEAR(8.0f + offset * 2.0f, rectFromQuad(rgm.mapToContainer(rect, null ptr)).x(), 0.1f);
392 EXPECT_NEAR(8.0f, rectFromQuad(rgm.mapToContainer(rect, nullptr)).y(), 0.1f) ; 392 EXPECT_NEAR(8.0f, rectFromQuad(rgm.mapToContainer(rect, nullptr)).y(), 0.1f) ;
393 EXPECT_EQ(5.0f, rectFromQuad(rgm.mapToContainer(rect, nullptr)).width()); 393 EXPECT_EQ(5.0f, rectFromQuad(rgm.mapToContainer(rect, nullptr)).width());
394 EXPECT_EQ(3.0f, rectFromQuad(rgm.mapToContainer(rect, nullptr)).height()); 394 EXPECT_EQ(3.0f, rectFromQuad(rgm.mapToContainer(rect, nullptr)).height());
395 395
396 } 396 }
397 } // namespace :: 397 } // namespace ::
OLDNEW
« no previous file with comments | « Source/web/LinkHighlight.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698