Changeset 50207 in webkit
- Timestamp:
- Oct 28, 2009 3:16:51 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r50206 r50207 1 2009-10-27 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Simon Fraser. 4 5 Change HitTestResult methods to use (3d) transformation aware methods 6 https://bugs.webkit.org/show_bug.cgi?id=27347 7 8 The current HitTestResult methods are not using the (3d) 9 transformation aware routines. This can lead to an assertion 10 SVGRenderBase::mapLocalToContainer method. 11 12 Change HitTestResult::imageRect to use the (3d) transformation 13 aware RenderBox::absoluteContentQuad to avoid running into 14 an assertion with SVG content. 15 16 Remove HitTestResult::boundingBox() as it is only used in 17 two places and conceptually doesn't belong into a HitTest 18 which is operating on points. 19 20 A classic test case is not possible as the methods are not excercised 21 from within HTML/SVG but from the WebKit API Layer. A unittest 22 for Qt/Gtk+/Mac would need to be written but Qt/Gtk+ currently 23 do not support 3d transformations making it impossible to write 24 a reliable test case and the Mac port is currently not doing 25 unit testing. 26 27 28 * rendering/HitTestResult.cpp: Remove boundingBox() method 29 (WebCore::HitTestResult::imageRect): Use transformation aware method 30 * rendering/HitTestResult.h: Remove boundingBox() 31 1 32 2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org> 2 33 -
trunk/WebCore/rendering/HitTestResult.cpp
r47367 r50207 124 124 } 125 125 126 IntRect HitTestResult::boundingBox() const127 {128 if (m_innerNonSharedNode) {129 RenderObject* renderer = m_innerNonSharedNode->renderer();130 if (renderer)131 return renderer->absoluteBoundingBoxRect();132 }133 134 return IntRect();135 }136 137 126 bool HitTestResult::isSelected() const 138 127 { … … 247 236 if (!image()) 248 237 return IntRect(); 249 return m_innerNonSharedNode->renderBox()->absoluteContent Box();238 return m_innerNonSharedNode->renderBox()->absoluteContentQuad().enclosingBoundingBox(); 250 239 } 251 240 -
trunk/WebCore/rendering/HitTestResult.h
r45991 r50207 64 64 65 65 Frame* targetFrame() const; 66 IntRect boundingBox() const;67 66 bool isSelected() const; 68 67 String spellingToolTip(TextDirection&) const; -
trunk/WebKit/qt/Api/qwebframe.cpp
r50058 r50207 1430 1430 return; 1431 1431 pos = hitTest.point(); 1432 boundingRect = hitTest.boundingBox();1433 1432 WebCore::TextDirection dir; 1434 1433 title = hitTest.title(dir); … … 1440 1439 innerNode = hitTest.innerNode(); 1441 1440 innerNonSharedNode = hitTest.innerNonSharedNode(); 1441 boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect(true) : IntRect(); 1442 1442 WebCore::Image *img = hitTest.image(); 1443 1443 if (img) { -
trunk/WebKit/qt/ChangeLog
r50166 r50207 1 2009-10-27 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Simon Fraser. 4 5 Change HitTestResult methods to use (3d) transformation aware methods 6 https://bugs.webkit.org/show_bug.cgi?id=27347 7 8 The HitTestResult::boundingBox method was removed. The 9 RenderObject must be used directly. In contrast to the 10 old HitTestResult::boundingBox method this code must use 11 a (3d) transformation aware method to not run into an 12 assert in SVGRenderBase::mapLocalToContainer. 13 14 * Api/qwebframe.cpp: 15 (QWebHitTestResultPrivate::QWebHitTestResultPrivate): 16 1 17 2009-10-27 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 18 -
trunk/WebKit/win/ChangeLog
r50120 r50207 1 2009-10-27 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Simon Fraser. 4 5 Change HitTestResult methods to use (3d) transformation aware methods 6 https://bugs.webkit.org/show_bug.cgi?id=27347 7 8 The HitTestResult::boundingBox method was removed. The 9 RenderObject must be used directly. In contrast to the 10 old HitTestResult::boundingBox method this code must use 11 a (3d) transformation aware method to not run into an 12 assert in SVGRenderBase::mapLocalToContainer. 13 14 * WebElementPropertyBag.cpp: 15 (WebElementPropertyBag::Read): Replace HitTestResult::boundingBox() 16 1 17 2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 18 -
trunk/WebKit/win/WebElementPropertyBag.cpp
r45991 r50207 146 146 } else if (isEqual(WebElementImageRectKey, key)) { 147 147 V_VT(pVar) = VT_ARRAY; 148 V_ARRAY(pVar) = MarshallingHelpers::intRectToSafeArray(m_result->boundingBox()); 148 IntRect boundingBox = m_result->innerNonSharedNode() && m_result->innerNonSharedNode()->renderer() ? 149 m_result->innerNonSharedNode()->renderer()->absoluteBoundingBoxRect(true) : IntRect(); 150 V_ARRAY(pVar) = MarshallingHelpers::intRectToSafeArray(boundingBox); 149 151 return S_OK; 150 152 } else if (isEqual(WebElementImageURLKey, key))
Note: See TracChangeset
for help on using the changeset viewer.