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

Side by Side Diff: third_party/WebKit/Source/core/dom/ContainerNode.cpp

Issue 1903493003: Handle very large transforms in ContainerNode::boundingBox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/transforms/focus-on-transformed-node-expected.txt ('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) 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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 945
946 // If we've found one corner, but not the other, 946 // If we've found one corner, but not the other,
947 // then we should just return a point at the corner that we did find. 947 // then we should just return a point at the corner that we did find.
948 if (foundUpperLeft != foundLowerRight) { 948 if (foundUpperLeft != foundLowerRight) {
949 if (foundUpperLeft) 949 if (foundUpperLeft)
950 lowerRight = upperLeft; 950 lowerRight = upperLeft;
951 else 951 else
952 upperLeft = lowerRight; 952 upperLeft = lowerRight;
953 } 953 }
954 954
955 return enclosingLayoutRect(FloatRect(upperLeft, lowerRight.expandedTo(upperL eft) - upperLeft)); 955 FloatSize size = lowerRight.expandedTo(upperLeft) - upperLeft;
956 if (std::isnan(size.width()) || std::isnan(size.height()))
957 return LayoutRect();
958
959 return enclosingLayoutRect(FloatRect(upperLeft, size));
956 } 960 }
957 961
958 // This is used by FrameSelection to denote when the active-state of the page ha s changed 962 // This is used by FrameSelection to denote when the active-state of the page ha s changed
959 // independent of the focused element changing. 963 // independent of the focused element changing.
960 void ContainerNode::focusStateChanged() 964 void ContainerNode::focusStateChanged()
961 { 965 {
962 // If we're just changing the window's active state and the focused node has no 966 // If we're just changing the window's active state and the focused node has no
963 // layoutObject we can just ignore the state change. 967 // layoutObject we can just ignore the state change.
964 if (!layoutObject()) 968 if (!layoutObject())
965 return; 969 return;
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 return true; 1378 return true;
1375 1379
1376 if (node->isElementNode() && toElement(node)->shadow()) 1380 if (node->isElementNode() && toElement(node)->shadow())
1377 return true; 1381 return true;
1378 1382
1379 return false; 1383 return false;
1380 } 1384 }
1381 #endif 1385 #endif
1382 1386
1383 } // namespace blink 1387 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/transforms/focus-on-transformed-node-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698