Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85160

QtWebEngine bad chrome 77->69 cherry-pick bug broke live editing in Qt 5.12.8 and Qt 5.12.9

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.12.8, 5.12.9
    • Fix Version/s: 5.12.10
    • Component/s: WebEngine
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      1417835f7de301a9398cc889dac9337b8f14d859 (qt/qtwebengine-chromium/69-based)

      Description

      Live Editing of a webpage in QWebEngine was broken in Qt 5.12.8 and Qt 5.12.9 by a bad merge of Chrome 79 changes in qtwebengine chromium.

      The breakage was introduced into:

      qt-everywhere-src-5.12.8/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/editing/serializers/styled_markup_serializer.cc

      If you diff the working version from Qt 5.12.7 against the Qt 5.12.8 or Qt 5.12.9 versions of this file you can see the bad chunk here:

      @@ -358,10 +362,7 @@
               continue;
             }
       
      -      if (!n->GetLayoutObject() &&
      -          (!n->IsElementNode() || !ToElement(n)->HasDisplayContentsStyle()) &&
      -          !EnclosingElementWithTag(FirstPositionInOrBeforeNode(*n),
      -                                   selectTag)) {
      +      if (n->GetLayoutObject() || ShouldSerializeUnrenderedElement(*n)) {
               next = Strategy::NextSkippingChildren(*n);
               // Don't skip over pastEnd.
               if (past_end && Strategy::IsDescendantOf(*past_end, *n))
      
      
      

      To make the logic flow better, this change reverses the logic of the test but never swaps the "then" and "else" clauses. There are no later chunks that do the swap.

      This results in live editing breaking and actually losing code in some deletes and when trying to change a sequence of paragraphs to a list (ordered or unordered) and other related editing losses. The missing swap of the "then" and "else" part of the merge was left out and is NEEDED. If you compare the code to the 80 based branch, the missing swap is actually there (and so no bug in Qt 5.15).

      Please fix this bad merge of Chrome bug asap as Qt 5.12.8 and later are being used as the basis of Linux Mint 20 series, Ubuntu, etc.

      I will upload the patch that completes the merge properly just in case this helps.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qt_webengine_team Qt WebEngine Team
              Reporter:
              kevinhendricks Kevin B. Hendricks
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes