[Webkit-unassigned] [Bug 73433] [Gtk][WK2] atk_text_get_text_at_offset() fails to provide the correct line for text which is wrapped

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 10 09:58:28 PDT 2013


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





--- Comment #1 from Mario Sanchez Prada <mario at webkit.org>  2013-04-10 09:56:43 PST ---
The problem, that only happens in WebKit2GTK+, seems to be related with this function:

  static PangoLayout* getPangoLayoutForAtk(AtkText* textObject)
  {
    AccessibilityObject* coreObject = core(textObject);

    Document* document = coreObject->document();
    if (!document)
        return 0;

    HostWindow* hostWindow = document->view()->hostWindow();
    if (!hostWindow)
        return 0;
    PlatformPageClient webView = hostWindow->platformPageClient();
    if (!webView)
        return 0;

    // Create a string with the layout as it appears on the screen
    PangoLayout* layout = gtk_widget_create_pango_layout(static_cast<GtkWidget*>(webView), textForObject(coreObject));
    return layout;
  }

As in WebKit2 this code is run from the WebProcess, webview there will be NULL, meaning that the PangoLayout returned here won't be associated to any widget as in the case of WebKit1, hence there's no way from GailUtil/Pango's perspective to realize whether the text is wrapped or not, and it will just see all the text in the paragraph as a whole.

So, I think that either we find a way to create a proper PangoLayout reflecting as well as possible the reality in the UI process or we just find a way to get the same result without using GailUtil + Pango at all, which is probably the best idea since we wanted to get rid of this APIs anyway, I think, and this might be a good reason to speed that up.

-- 
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