Changeset 95574 in webkit
- Timestamp:
- Sep 20, 2011 3:33:48 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95571 r95574 1 2011-09-20 Ryosuke Niwa <rniwa@webkit.org> 2 3 Hit testing on margins of body and head elements doesn't recur 4 https://bugs.webkit.org/show_bug.cgi?id=40753 5 6 Reviewed by Darin Adler. 7 8 Add tests to click on margins of head and body elements. WebKit should not 9 (attempt to) place the caret after or before head and body elements. 10 11 * editing/selection/click-on-body-margin-expected.txt: Added. 12 * editing/selection/click-on-body-margin.html: Added. 13 * editing/selection/click-on-head-margin-expected.txt: Added. 14 * editing/selection/click-on-head-margin.html: Added. 15 1 16 2011-09-20 Alan Stearns <stearns@adobe.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r95573 r95574 1 2011-09-20 Ryosuke Niwa <rniwa@webkit.org> 2 3 Hit testing on margins of body and head elements doesn't recur 4 https://bugs.webkit.org/show_bug.cgi?id=40753 5 6 Reviewed by Darin Adler. 7 8 The bug was caused by positionForPointRespectingEditingBoundaries's comparing the editability 9 of head/body and html elements when hit testing was done inside margins of head and body elements. 10 11 Fixed the bug by special-casing html element since margins of head and body elements are special. 12 13 Tests: editing/selection/click-on-body-margin.html 14 editing/selection/click-on-head-margin.html 15 16 * rendering/RenderBlock.cpp: 17 (WebCore::positionForPointRespectingEditingBoundaries): 18 1 19 2011-09-20 David Hyatt <hyatt@apple.com> 2 20 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r95550 r95574 4210 4210 } 4211 4211 4212 static inline bool isEditingBoundary(RenderObject* ancestor, RenderObject* child) 4213 { 4214 ASSERT(!ancestor || ancestor->node()); 4215 ASSERT(child && child->node()); 4216 return !ancestor || !ancestor->parent() || (ancestor->hasLayer() && ancestor->parent()->isRenderView()) 4217 || ancestor->node()->rendererIsEditable() == child->node()->rendererIsEditable(); 4218 } 4219 4212 4220 // FIXME: This function should go on RenderObject as an instance method. Then 4213 4221 // all cases in which positionForPoint recurs could call this instead to … … 4233 4241 4234 4242 // If we can't find an ancestor to check editability on, or editability is unchanged, we recur like normal 4235 if ( !ancestor || ancestor->node()->rendererIsEditable() == childNode->rendererIsEditable())4243 if (isEditingBoundary(ancestor, child)) 4236 4244 return child->positionForPoint(pointInChildCoordinates); 4237 4245
Note: See TracChangeset
for help on using the changeset viewer.