Thanks!

I have uploaded the fix, it is now waiting for review in the queue:
https://launchpad.net/ubuntu/focal/+queue?queue_state=1
** Description changed:

  Ubuntu 20.04 LTS
+ 
+ [Impact]
  
  QtWebEngine bad chrome 77->69 cherry-pick bug broke live editing in Qt
  5.12.8 and Qt 5.12.9. The bad merge breaks styled markup traverse by
  accidentally inverting condition. Results in loss of content under
  certain conditions.
  
  Bug acknowledged: https://bugreports.qt.io/browse/QTBUG-85160
  
  Official patch-set to fix: https://codereview.qt-project.org/c/qt
  /qtwebengine-chromium/+/305139
  
  Please consider cherry-picking this official patch, so that the latest
  Ubuntu LTS release does not break apps that rely upon QtWebEngine's
  live-editing capabilities
  
  I co-maintain some open-source ebook editing software
  (https://github.com/sigil-ebook/pageedit) that allows users to make
  basic wysiwyg edits to local xhtml files loaded in a QWebEngineView
  using QWebEngine's live editing abilities. They basically highlight
  paragraphs and convert them to ordered/unordered lists via
  view->triggerPageAction(QWebEnginePage::InsertUnorderedList) and
  view->triggerPageAction(QWebEnginePage::InsertOrderedList) accordingly.
  
  This all works in Qt5.12.7 and earlier, but when using Ubuntu 20.04's
  5.12.8 QWebEngine packages, the highlighted content is deleted and an
  empty list is created (as per the aforementioned Qt bug confirmed and
  patched by Qt).
  
+ [Test Case]
+ 
  I've attached a small, focused, Qt project that clearly demonstrates the
  issue. It can be built with the standard qmake / make commands which
  will build a liveedit binary that loads a local xhtml file in a QWebView
- for editing. If you want to load your own local html file or a remote
- url, just pass the url as a parameter to ./liveedit:
+ for editing.
+ 
+ https://bugs.launchpad.net/ubuntu/+source/qtwebengine-opensource-
+ src/+bug/1884550/+attachment/5386530/+files/liveedit.tar.gz
+ 
+ If you want to load your own local html file or a remote url, just pass
+ the url as a parameter to ./liveedit:
  
  ./liveedit file:///home/user/localfile.html
  ./liveedit https://www.lipsum.com/feed/html
  
  Otherwise, no parameter means the included xhtml file will be loaded.
  
  Once loaded, highlight all the paragraphs and use the "Tools->Create
  List from selection" menu action to edit the rendered content.
  
  Qt5.12.7 and earlier will correctly create a list from the highlighted
  paragraphs (as will Qt5.14.x and later), but Qt5.12.8/9 will incorrectly
  delete the highlighted content and create an empty list (as per the
  aforementioned Qt bug confirmed and patched by Qt).
+ 
+ [Regression Potential]
+ 
+ This fixes the condition in the if/else block and restores the order
+ that was present in earlier Qt 5.12.x releases, e.g. in Ubuntu Eoan
+ which has 5.12.4. So the potential for regressions is minimal, and any
+ potential regression will be related to live edition.

** Description changed:

  Ubuntu 20.04 LTS
  
  [Impact]
  
  QtWebEngine bad chrome 77->69 cherry-pick bug broke live editing in Qt
  5.12.8 and Qt 5.12.9. The bad merge breaks styled markup traverse by
  accidentally inverting condition. Results in loss of content under
  certain conditions.
  
  Bug acknowledged: https://bugreports.qt.io/browse/QTBUG-85160
  
  Official patch-set to fix: https://codereview.qt-project.org/c/qt
  /qtwebengine-chromium/+/305139
  
  Please consider cherry-picking this official patch, so that the latest
  Ubuntu LTS release does not break apps that rely upon QtWebEngine's
  live-editing capabilities
  
  I co-maintain some open-source ebook editing software
  (https://github.com/sigil-ebook/pageedit) that allows users to make
  basic wysiwyg edits to local xhtml files loaded in a QWebEngineView
  using QWebEngine's live editing abilities. They basically highlight
  paragraphs and convert them to ordered/unordered lists via
  view->triggerPageAction(QWebEnginePage::InsertUnorderedList) and
  view->triggerPageAction(QWebEnginePage::InsertOrderedList) accordingly.
  
  This all works in Qt5.12.7 and earlier, but when using Ubuntu 20.04's
  5.12.8 QWebEngine packages, the highlighted content is deleted and an
  empty list is created (as per the aforementioned Qt bug confirmed and
  patched by Qt).
  
  [Test Case]
  
  I've attached a small, focused, Qt project that clearly demonstrates the
  issue. It can be built with the standard qmake / make commands which
  will build a liveedit binary that loads a local xhtml file in a QWebView
  for editing.
  
  https://bugs.launchpad.net/ubuntu/+source/qtwebengine-opensource-
  src/+bug/1884550/+attachment/5386530/+files/liveedit.tar.gz
  
  If you want to load your own local html file or a remote url, just pass
  the url as a parameter to ./liveedit:
  
  ./liveedit file:///home/user/localfile.html
  ./liveedit https://www.lipsum.com/feed/html
  
  Otherwise, no parameter means the included xhtml file will be loaded.
  
  Once loaded, highlight all the paragraphs and use the "Tools->Create
  List from selection" menu action to edit the rendered content.
  
  Qt5.12.7 and earlier will correctly create a list from the highlighted
  paragraphs (as will Qt5.14.x and later), but Qt5.12.8/9 will incorrectly
  delete the highlighted content and create an empty list (as per the
  aforementioned Qt bug confirmed and patched by Qt).
  
  [Regression Potential]
  
  This fixes the condition in the if/else block and restores the order
  that was present in earlier Qt 5.12.x releases, e.g. in Ubuntu Eoan
  which has 5.12.4. So the potential for regressions is minimal, and any
- potential regression will be related to live edition.
+ potential regression will be related to live editing.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1884550

Title:
  Live Editing broken in 5.12.8/9 upstream

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtwebengine-opensource-src/+bug/1884550/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to