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

Side by Side Diff: Source/core/layout/LayoutBoxModelObject.cpp

Issue 1303413004: Convert some call sites to use explicit LayoutRect->FloatRect conversion. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 void LayoutBoxModelObject::addOutlineRectsForDescendant(const LayoutObject& desc endant, Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset) const 398 void LayoutBoxModelObject::addOutlineRectsForDescendant(const LayoutObject& desc endant, Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset) const
399 { 399 {
400 if (descendant.isText() || descendant.isListMarker()) 400 if (descendant.isText() || descendant.isListMarker())
401 return; 401 return;
402 402
403 if (descendant.hasLayer()) { 403 if (descendant.hasLayer()) {
404 Vector<LayoutRect> layerOutlineRects; 404 Vector<LayoutRect> layerOutlineRects;
405 descendant.addOutlineRects(layerOutlineRects, LayoutPoint()); 405 descendant.addOutlineRects(layerOutlineRects, LayoutPoint());
406 for (size_t i = 0; i < layerOutlineRects.size(); ++i) { 406 for (size_t i = 0; i < layerOutlineRects.size(); ++i) {
407 FloatQuad quadInBox = toLayoutBoxModelObject(descendant).localToCont ainerQuad(FloatQuad(layerOutlineRects[i]), this); 407 FloatQuad quadInBox = toLayoutBoxModelObject(descendant).localToCont ainerQuad(FloatQuad(FloatRect(layerOutlineRects[i])), this);
408 LayoutRect rect = LayoutRect(quadInBox.boundingBox()); 408 LayoutRect rect = LayoutRect(quadInBox.boundingBox());
409 if (!rect.isEmpty()) { 409 if (!rect.isEmpty()) {
410 rect.moveBy(additionalOffset); 410 rect.moveBy(additionalOffset);
411 rects.append(rect); 411 rects.append(rect);
412 } 412 }
413 } 413 }
414 return; 414 return;
415 } 415 }
416 416
417 if (descendant.isBox()) { 417 if (descendant.isBox()) {
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 if (rootElementStyle->hasBackground()) 1017 if (rootElementStyle->hasBackground())
1018 return false; 1018 return false;
1019 1019
1020 if (node() != document().firstBodyElement()) 1020 if (node() != document().firstBodyElement())
1021 return false; 1021 return false;
1022 1022
1023 return true; 1023 return true;
1024 } 1024 }
1025 1025
1026 } // namespace blink 1026 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698