2011-01-30 Jeff Miller <jeffm@apple.com>

        Reviewed by Dan Bernstein.

        FindController::updateFindIndicator() crashes if selection isn't visible
        https://bugs.webkit.org/show_bug.cgi?id=53399

        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::updateFindIndicator): Return false if ShareableBitmap::createShareable() returns null (typically because the selection rect is empty).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c80464ba
2011-01-30 Jeff Miller <jeffm@apple.com>
Reviewed by Dan Bernstein.
FindController::updateFindIndicator() crashes if selection isn't visible
https://bugs.webkit.org/show_bug.cgi?id=53399
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator): Return false if ShareableBitmap::createShareable() returns null (typically because the selection rect is empty).
2011-01-30 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed.
......@@ -160,6 +160,9 @@ bool FindController::updateFindIndicator(Frame* selectedFrame, bool isShowingOve
// Create a backing store and paint the find indicator text into it.
RefPtr<ShareableBitmap> findIndicatorTextBackingStore = ShareableBitmap::createShareable(selectionRectInWindowCoordinates.size());
if (!findIndicatorTextBackingStore)
return false;
OwnPtr<GraphicsContext> graphicsContext = findIndicatorTextBackingStore->createGraphicsContext();
graphicsContext->translate(-selectionRectInWindowCoordinates.x(), -selectionRectInWindowCoordinates.y());
......
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