Added support for appending an escaped SegmentedString to another.

Merge of blink r174725

This was previously an assert which triggers in the situation where the
HTMLEntityParser is parsing a potential named entity, but only has one or two
characters of data available due to being at the end of a network packet
boundary, so it 'unconsumes' them from the SegmentedString which has some
special handling when only one or two characters needs unconsuming to avoid
string creation. Next time the tokenizer is pumped, the SegmentedString is
then appended to the HTMLSourceTracker right before the actual parsing happens
(i.e. when we'd consume the previously unconsumed characters).
SegmentedString::append mostly assumes the parameter string hasn't been
consumed from and had an assert instead of handling this case, which hits.

Task-number:  QTBUG-40284
Change-Id: Ifcf9af6f6e2e5a9750af4297cfda2f55f3bb274e
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Avoid crash when hidePopup is called multiple times

If hidePopup is called twice it may cause access to a deleted version of itself

Task-number: QTBUG-38998
Change-Id: Iee967eb51c403420779ea502610b58383d07963f
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Do not override padding in textfields

We currently override any defined padding on textfields with the Qt
style framewidth.

This patch instead adds the framewidth to any existing fixed padding.
This fixes textfield text from overlapping icons absolutely placed in
its padding.

Task-number: QTBUG-40257
Change-Id: I73feb3f9e4630f7c7813a1b2a16f1c525c84386f
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Show placeholder text when focused

Change the default behavior of placeholder text, so that it continues
to be shown when the element has focus but is still empty.

Task-number: QTBUG-40171
Change-Id: Ide37c3b28488cb6c24f7823a41fb62c8920a71f6
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Do not use title as the primary text of dragged or copied links

In trying to preserve the link title, we set the title in the text part
of dragged or copied mimedata. This has caused a number of undesired
changes in behavior.

This patch reverts to placing the url in the text field, but instead
stores the rich part of the link as HTML. This is consistent with GTK,
and Chromium.

Task-number: QTBUG-39995
Change-Id: Id5f2587a93fb9721c728299340f2e3562f3456ca
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
[WK2] Update text upon item selection for menu lists

While RenderListBox repaints itself on selection changes, RenderMenuList
lacks this logic when it's used for multiple selections (acting as a listbox).
Make sure we properly update the element's text as the options are toggled.

Originally reported and proposed fix in http://wkb.ug/91862

Task-number: QTBUG-39675
Change-Id: I09f17ff03577fc6f65875674d632684b560fffb7
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Do not add QStyle padding on top of default padding

The recent change to follow CSS padding value, added the CSS padding
to the default QStyle. This however needlessly changes the default
size of input elements.

This change instead uses the maximum of CSS padding and QStyle padding.

Change-Id: I23a39c76db837409ea11915f69ebbfefa2d25548
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Fix case in documentation of qobjectbridge bindings

The method toDataURL does not work, but calling toDataUrl does. This
patch updates the documentation to match the exported method name.

Task-number: QTBUG-40268
Change-Id: Icf0ee233df141d43367da045834e6a42c9afb31a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix crash in DeviceOrientationController when !HAVE(QTSENSORS)

Regression introduced by QSensors leak fix (QTBUG-38857).

Change-Id: I22dd4f774012ef9b8af9ba8b59e1e4603a3ebbf4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Fix regression in QQuickWebView's transparent backgound

We need to set both setDrawsTransparentBackground and setDrawsBackground
to get the full correct behavior of transparent backgrounds.

Task-number: QTBUG-40063
Change-Id: Iaa276a6a12e3cff40d8bc2892fb0667242afb88b
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Fix fallback conversion of recognized objects

All objects are added the list of visited objects, but only those
that were not recognized more specific than 'Object' are removed before
trying the fallback conversion. This prevents the fallback from working
as the algorithm will assume we are looping.

Task-number: QTBUG-39951
Change-Id: I1d538c452092485b371c335e53f16db162bd4fb1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>