Commit 428cde24 authored by thatcher's avatar thatcher
Browse files

Reviewed by Adam.

        <rdar://problem/5084400> -[DOMRange lineBoxRects] returns an empty array when the DOM nodes have just been created

        Do a updateLayoutIgnorePendingStylesheets before asking the Node or Range for it's box rects.

        * bindings/objc/DOM.mm:
        (-[DOMNode boundingBox]):
        (-[DOMNode lineBoxRects]):
        (-[DOMRange boundingBox]):
        (-[DOMRange lineBoxRects]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 151497a0
2007-05-21 Timothy Hatcher <timothy@apple.com>
Reviewed by Adam.
<rdar://problem/5084400> -[DOMRange lineBoxRects] returns an empty array when the DOM nodes have just been created
Do a updateLayoutIgnorePendingStylesheets before asking the Node or Range for it's box rects.
* bindings/objc/DOM.mm:
(-[DOMNode boundingBox]):
(-[DOMNode lineBoxRects]):
(-[DOMRange boundingBox]):
(-[DOMRange lineBoxRects]):
2007-05-21 Sam Weinig <sam@webkit.org>
 
Reviewed by George Staikos.
......@@ -399,6 +399,7 @@ static NSArray *kit(const Vector<IntRect>& rects)
// If it was, we could even autogenerate.
- (NSRect)boundingBox
{
[self _node]->document()->updateLayoutIgnorePendingStylesheets();
WebCore::RenderObject *renderer = [self _node]->renderer();
if (renderer)
return renderer->absoluteBoundingBoxRect();
......@@ -409,6 +410,7 @@ static NSArray *kit(const Vector<IntRect>& rects)
// If it was, we could even autogenerate.
- (NSArray *)lineBoxRects
{
[self _node]->document()->updateLayoutIgnorePendingStylesheets();
WebCore::RenderObject *renderer = [self _node]->renderer();
if (renderer) {
Vector<WebCore::IntRect> rects;
......@@ -424,12 +426,14 @@ static NSArray *kit(const Vector<IntRect>& rects)
- (NSRect)boundingBox
{
[self _range]->ownerDocument()->updateLayoutIgnorePendingStylesheets();
return [self _range]->boundingBox();
}
- (NSArray *)lineBoxRects
{
Vector<WebCore::IntRect> rects;
[self _range]->ownerDocument()->updateLayoutIgnorePendingStylesheets();
[self _range]->addLineBoxRects(rects);
return kit(rects);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment