зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1117227 part 1 - Add IntersectRect method to LogicalRect. r=jfkthame
--HG-- extra : source : 3c42cbab1f5087c5411984c69b2f06939b735e93
This commit is contained in:
Родитель
c454df3a32
Коммит
1d2d23191b
|
@ -1731,6 +1731,17 @@ public:
|
|||
aContainerWidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set *this to be the rectangle containing the intersection of aRect1
|
||||
* and aRect2, return whether the intersection is non-empty.
|
||||
*/
|
||||
bool IntersectRect(const LogicalRect& aRect1, const LogicalRect& aRect2)
|
||||
{
|
||||
CHECK_WRITING_MODE(aRect1.mWritingMode);
|
||||
CHECK_WRITING_MODE(aRect2.mWritingMode);
|
||||
return mRect.IntersectRect(aRect1.mRect, aRect2.mRect);
|
||||
}
|
||||
|
||||
private:
|
||||
LogicalRect() = delete;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче