Webkit: HTML5 video playback enhancement

1) Only update/repaint media control when it is visible.
   In webkit, The internal media controler bar will auto hide, when it is
   hide/transparent, We need not repaint the control bar.

2) Avoid media control update(start/stop) when recv timeupdate message from
   java side on Android platform.

   In ICS, there are two timeupdate event timer for HTML5 video, One is in
   Jave side, One is in Webcore. when video start to play, two timers also
   start. Each timer event(java side) will post a message to Webcore, then
   Webcore will update the playback position and call mediaPlayerTimeChanged.
   In mediaPlayerTimeChanged, It will post a async tinmeupdate event and call
   updatePlayState to do media control start/stop.
   1) For fullscreen mode, We should avoid do any composition (include media
      control update) in browser.
   2) For inline mode, We shoud avoid update the playback state, since we
      only update the playback position, not do start/pause/stop/error
      state change.

With above two changes, we cut away 10+FPS unnecessary/duplicated composition
in browser. Thus the Webcore can handle more video frame and the CPU utilization
also reduced ~1%.

Change-Id: I4992870dc546f000ca6f02cd3c7690e642c8f3dd
Author: Xuefeng Deng <xuefeng.deng@intel.com>
Signed-off-by: Xuefeng Deng <xuefeng.deng@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 27526
Crash on Orange media portal

Visit orange.deezer.com, press tab marked "My Music".
Browser crashes every time.

Pressing the button will trigger a re-layout of the page.
This in turn will cause some rendering nodes of type
RenderLayer to be removed from the rendering tree.
When such a node is removed, it is important to also
update certain lists in ancestor nodes that may hold references
to this node. A node that may hold such a reference is
identified as being a "stacking context".

However, in Android, when the symbol ENABLE_COMPOSITED_FIXED_ELEMENTS
is defined, the definition of what is a stacking context
is expanded. In this case, a node that is a stacking context
and holds references to descendants, changes one of the conditions
that form part of Android's expanded stacking context definition.
So, now it is no longer a stacking context, but the reference list
is not deleted/updated. When the descendant node is removed a
search for an ancestral stacking context is made, but it will
not find this node since it is no longer a stacking context.

The solution is to make sure that the list of references is
updated/cleared whenever the node changes a condition that
may cause its status as a stacking context to also change.

Change-Id: If5a7b63715020bc3d23749a7c09003a86d90e28d
external/webkit: check element object for NULL

Change-Id: I11ff74169b4ec0017400e9ef9451868ae00c6b1b
(cherry picked from commit 03e1fe332f3634b6fc9f3b1eb55cec24109d6957)
[WebKit] Browsermark DomAdvSearch and DomSearch optimizations

        This patch is a combination of the following optimizations.

        Optimize appendCharactersReplacingEntities

        [Performance] Optimize innerHTML and outerHTML
        https://bugs.webkit.org/show_bug.cgi?id=81214

        Optimize Dromaeo/dom-query.html by caching NodeRareData on Document
        https://bugs.webkit.org/show_bug.cgi?id=90059

        Optimize Dromaeo/dom-attr.html by speeding up Element::getAttribute()
        https://bugs.webkit.org/show_bug.cgi?id=90174

        Change argument types of Element::getAttribute*() from String to AtomicString
        https://bugs.webkit.org/show_bug.cgi?id=90246

Change-Id: Icfb91db2dd02fad36e6ec5edf9c16138da8e6316
Null check to fix crash

Need to make sure that img is not zero.

bug: 6864545
Change-Id: I2a2c5440347681b462abaa5ac9101ddb6137c8c4
webkit: fix for perl 5.14+

Change-Id: Id740fff1824d11fef21995d0c472f923e70b3a46