[Webkit-unassigned] [Bug 34573] [Qt] Implement layoutTestController.pageNumberForElementById

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 10 14:36:15 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=34573


Simon Hausmann <hausmann at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hausmann at webkit.org




--- Comment #4 from Simon Hausmann <hausmann at webkit.org>  2010-02-10 14:36:15 PST ---
(In reply to comment #2)
> (From update of attachment 48133 [details])
> > diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
> > index aeb7a22..bc00f1b 100644
> > --- a/WebKit/qt/Api/qwebframe.cpp
> > +++ b/WebKit/qt/Api/qwebframe.cpp
> > @@ -214,12 +214,23 @@ QString QWEBKIT_EXPORT qt_drt_counterValueForElementById(QWebFrame* qFrame, cons
> >  {
> >      Frame* frame = QWebFramePrivate::core(qFrame);
> >      if (Document* document = frame->document()) {
> > -        Element* element = document->getElementById(id);
> > -        return WebCore::counterValueForElement(element);
> > +        if (Element* element = document->getElementById(id))
> > +            return WebCore::counterValueForElement(element);
> 
> This change is not related to this change, but I think it's small enough to fix
> with the main change. This change avoids crash when a nonexistent element ID is
> specified. If a reviewer considers this should be done in a separate change,
> I'm happy to split.

No worries and good catch :)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list