| OLD | NEW | 
|---|
| 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, 2010 Apple Inc. All rights reserv
      ed. | 6  * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
      ed. | 
| 7  * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7  * Copyright (C) 2013 Adobe Systems Incorporated. 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 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1195         // Check if we need to do anything at all. | 1195         // Check if we need to do anything at all. | 
| 1196         // If we have clipping, then we can't have any spillout. | 1196         // If we have clipping, then we can't have any spillout. | 
| 1197         LayoutRect overflowBox = hasOverflowClip() ? borderBoxRect() : visualOve
      rflowRect(); | 1197         LayoutRect overflowBox = hasOverflowClip() ? borderBoxRect() : visualOve
      rflowRect(); | 
| 1198         flipForWritingMode(overflowBox); | 1198         flipForWritingMode(overflowBox); | 
| 1199         overflowBox.moveBy(adjustedLocation); | 1199         overflowBox.moveBy(adjustedLocation); | 
| 1200         if (!locationInContainer.intersects(overflowBox)) | 1200         if (!locationInContainer.intersects(overflowBox)) | 
| 1201             return false; | 1201             return false; | 
| 1202     } | 1202     } | 
| 1203 | 1203 | 
| 1204     // TODO(pdr): We should also check for css clip in the !isSelfPaintingLayer | 1204     // TODO(pdr): We should also check for css clip in the !isSelfPaintingLayer | 
| 1205     //            case, similar to overflow clip in LayoutBlock::nodeAtPoint. | 1205     //            case, similar to overflow clip below. | 
|  | 1206     bool skipChildren = false; | 
|  | 1207     if (hasOverflowClip() && !hasSelfPaintingLayer()) { | 
|  | 1208         if (!locationInContainer.intersects(overflowClipRect(adjustedLocation, E
      xcludeOverlayScrollbarSizeForHitTesting))) { | 
|  | 1209             skipChildren = true; | 
|  | 1210         } else if (style()->hasBorderRadius()) { | 
|  | 1211             LayoutRect boundsRect(adjustedLocation, size()); | 
|  | 1212             skipChildren = !locationInContainer.intersects(style()->getRoundedIn
      nerBorderFor(boundsRect)); | 
|  | 1213         } | 
|  | 1214     } | 
|  | 1215 | 
|  | 1216     // A control clip can also clip out child hit testing. | 
|  | 1217     if (!skipChildren && hasControlClip() && !locationInContainer.intersects(con
      trolClipRect(adjustedLocation))) | 
|  | 1218         skipChildren = true; | 
| 1206 | 1219 | 
| 1207     // TODO(pdr): We should also include checks for hit testing border radius at | 1220     // TODO(pdr): We should also include checks for hit testing border radius at | 
| 1208     //            the layer level (see: crbug.com/568904). | 1221     //            the layer level (see: crbug.com/568904). | 
| 1209 | 1222 | 
| 1210     if (hitTestChildren(result, locationInContainer, adjustedLocation, action)) | 1223     if (!skipChildren && hitTestChildren(result, locationInContainer, adjustedLo
      cation, action)) | 
| 1211         return true; | 1224         return true; | 
| 1212 | 1225 | 
| 1213     if (hitTestClippedOutByRoundedBorder(locationInContainer, adjustedLocation)) | 1226     if (hitTestClippedOutByRoundedBorder(locationInContainer, adjustedLocation)) | 
| 1214         return false; | 1227         return false; | 
| 1215 | 1228 | 
| 1216     // Now hit test ourselves. | 1229     // Now hit test ourselves. | 
| 1217     if (isInSelfHitTestingPhase(action) && visibleToHitTestRequest(result.hitTes
      tRequest())) { | 1230     if (isInSelfHitTestingPhase(action) && visibleToHitTestRequest(result.hitTes
      tRequest())) { | 
| 1218         LayoutRect boundsRect(adjustedLocation, size()); | 1231         LayoutRect boundsRect(adjustedLocation, size()); | 
| 1219         if (locationInContainer.intersects(boundsRect)) { | 1232         if (locationInContainer.intersects(boundsRect)) { | 
| 1220             updateHitTestResult(result, flipForWritingMode(locationInContainer.p
      oint() - toLayoutSize(adjustedLocation))); | 1233             updateHitTestResult(result, flipForWritingMode(locationInContainer.p
      oint() - toLayoutSize(adjustedLocation))); | 
| (...skipping 3562 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4783 | 4796 | 
| 4784 void LayoutBox::clearPercentHeightDescendants() | 4797 void LayoutBox::clearPercentHeightDescendants() | 
| 4785 { | 4798 { | 
| 4786     for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
      r(this)) { | 4799     for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
      r(this)) { | 
| 4787         if (curr->isBox()) | 4800         if (curr->isBox()) | 
| 4788             toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4801             toLayoutBox(curr)->removeFromPercentHeightContainer(); | 
| 4789     } | 4802     } | 
| 4790 } | 4803 } | 
| 4791 | 4804 | 
| 4792 } // namespace blink | 4805 } // namespace blink | 
| OLD | NEW | 
|---|