Revert "Revert "Remove unnecessary dependencies on StyleResolver""

This reverts commit 6989a664574eb282ccf7f7797064f569c87d2300.

This did not turn out to be the bot-breaking change.

TBR=ojan@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/15727006

git-svn-id: svn://svn.chromium.org/blink/trunk@151413 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert "DevTools: Do not automatically enable Canvas Profiler upon switching to the Profiles tab."

This reverts commit 62121cd1f6b5b5364afe629752ee52f34bad62b8.

    Review URL: https://codereview.chromium.org/15952011

    git-svn-id: svn://svn.chromium.org/blink/trunk@151396 bbb929c8-8fbe-4397-9dbb-9b2b20218538

This patch is potentially causing crashes on all platforms.

An example failure:
An example of the failure:
http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.6%20(dbg)/builds/4507

TBR=ojan@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/16205002

git-svn-id: svn://svn.chromium.org/blink/trunk@151414 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert "applyAuthorStyles and resetStyleInheritance should use shadow root's setNeedsStyleRecalc, not shadow host's."

This reverts commit 6631b7cdff92c6c3261e037936ae5213f0eebdf7.
    Review URL: https://chromiumcodereview.appspot.com/15536002

    git-svn-id: svn://svn.chromium.org/blink/trunk@151373 bbb929c8-8fbe-4397-9dbb-9b2b20218538

It also reverts commit f4ca343f54227610e4c80d1cd3ae1509d1b86947:
    Review URL: https://chromiumcodereview.appspot.com/15675006

    git-svn-id: svn://svn.chromium.org/blink/trunk@151374 bbb929c8-8fbe-4397-9dbb-9b2b20218538

The changes are potentially causing failures like the following:
http://build.chromium.org/p/tryserver.chromium/builders/mac_rel/builds/132591/steps/interactive_ui_tests

Please feel free to reland if you're sure that it's not related to these CLs.

TBR=eseidel@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/15675012

git-svn-id: svn://svn.chromium.org/blink/trunk@151416 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove ENABLE_SVG references from core/html/

Most references were already removed in r150629, this just cleans
up a few stragglers.

R=eseidel@chromium.org, pdr@chromium.org
BUG=240006

Review URL: https://codereview.chromium.org/15937013

git-svn-id: svn://svn.chromium.org/blink/trunk@151417 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Cleanup WebKit prefixed names for classes in css directory.

Make sure we don't use prefixed naming inside Blink. The features are still exposed prefixed
to the web, unprefixing them is a different story.

This is part one of the renaming.

R=eseidel@chromium.org, kenneth.r.christiansen@intel.com

Review URL: https://codereview.chromium.org/15797004

git-svn-id: svn://svn.chromium.org/blink/trunk@151418 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Mobile Gmail should use 400 kB less memory

According to my new telemetry-based benchmark, this CL reduces memory usage in
Mobile Gmail by 3 MB (at least as simulated by content_shell on Linux).
Specifically, the average of three runs dropped from 52.1 MB to 49.2 MB.

In looking at profiles of duplicated StringImpl objects from
https://src.chromium.org/viewvc/blink?revision=151336&view=revision, we noticed
that a large amount of duplicated StringImpl objects contained URLs
(particularly data URLs). This CL atomizes the underlying storage in KURL to
help us avoid storing duplicate URL strings.

Using STRING_STATS, the savings looks more like 400 kB of string data.  (The
total amount of string visible to STRING_STATS drops from 3305677 bytes to
2912873 bytes.)  A 400 kB savings sounds more realistic to me.  Here are the
before and after STRING_STATS:

== Before ==

String stats for process id 28425:
    6319 (99.15%) 8 bit             2692439 chars       2692439 bytes  avg length  426.1
      54 ( 0.85%) 16 bit             300731 chars        601462 bytes  avg length 5569.1
      28 ( 0.44%) upconverted          5888 chars         11776 bytes  avg length  210.3
    6373 Total                      2993170 chars       3305677 bytes  avg length  469.7
         Total savings      2686551 bytes (44.83%)
       5 copies (0 atomic) of length    23530 (potential savings:    94120) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK...
      63 copies (0 atomic) of length      413 (potential savings:    25606) REPLACE INTO cached_conversation_headers (conversationId,isUnrea...
       3 copies (0 atomic) of length     9962 (potential savings:    19924) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA+CAYAAADgZd...
       3 copies (0 atomic) of length     9638 (potential savings:    19276) data:image/png;base64,R0lGODlhKAAoAPf/AB2pYP/STTuB+OBKPuFLPzh+9D...
       4 copies (0 atomic) of length     6230 (potential savings:    18690) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA+CAYAAADgZd...
       5 copies (0 atomic) of length     4418 (potential savings:    17672) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA+CAMAAADXuy...
       3 copies (0 atomic) of length     5518 (potential savings:    11036) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABYCAMAAACwAk...
       3 copies (0 atomic) of length     5146 (potential savings:    10292) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA+CAYAAADgZd...
       2 copies (0 atomic) of length     4890 (potential savings:     4890) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA+CAYAAADgZd...
       4 copies (0 atomic) of length     1598 (potential savings:     4794) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZb...
       2 copies (0 atomic) of length     4438 (potential savings:     4438) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qE...
       3 copies (0 atomic) of length     1954 (potential savings:     3908) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/N...
       3 copies (0 atomic) of length     1854 (potential savings:     3708) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0...
       3 copies (0 atomic) of length     1834 (potential savings:     3668) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0...
       3 copies (0 atomic) of length     1806 (potential savings:     3612) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0...
       2 copies (0 atomic) of length     3542 (potential savings:     3542) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qE...
       3 copies (0 atomic) of length     1770 (potential savings:     3540) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA9CAYAAABm8a...
       4 copies (0 atomic) of length     1134 (potential savings:     3402) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAA8CAYAAAANMh...
       3 copies (0 atomic) of length     1662 (potential savings:     3324) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH...
       3 copies (0 atomic) of length     1610 (potential savings:     3220) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0...

== After ==

String stats for process id 28148:
    5765 (99.23%) 8 bit             2390749 chars       2390749 bytes  avg length  414.7
      46 ( 0.79%) 16 bit             255622 chars        511244 bytes  avg length 5557.0
      26 ( 0.45%) upconverted          5440 chars         10880 bytes  avg length  209.2
    5810 Total                      2646371 chars       2912873 bytes  avg length  455.5
         Total savings      2385309 bytes (45.02%)
     161 copies (0 atomic) of length      413 (potential savings:    66080) REPLACE INTO cached_conversation_headers (conversationId,isUnrea...
     161 copies (0 atomic) of length       38 (potential savings:     6080) REPLACE INTO hit_to_data VALUES(?, ?);
      25 copies (0 atomic) of length      102 (potential savings:     2448) Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like ...
       9 copies (0 atomic) of length      101 (potential savings:      808) If you are unable to see this message, click here to viewTo ensu...
      38 copies (0 atomic) of length       20 (potential savings:      740) image/webp,*/*;q=0.8
     314 copies (0 atomic) of length        2 (potential savings:      626) []
      21 copies (0 atomic) of length       28 (potential savings:      560) response_code_set_by_backend
      35 copies (0 atomic) of length       14 (potential savings:      476) static-content
      49 copies (0 atomic) of length        9 (potential savings:      432) image/png
      15 copies (0 atomic) of length       24 (potential savings:      336) public, max-age=31536000
      35 copies (0 atomic) of length        9 (potential savings:      306) Yesterday
      16 copies (0 atomic) of length       19 (potential savings:      285) main:static-content
      22 copies (0 atomic) of length       13 (potential savings:      273) 1; mode=block
      11 copies (0 atomic) of length       24 (potential savings:      240) 2001:4860:4001:801::100f
       3 copies (0 atomic) of length      106 (potential savings:      212) XXXXXX REDACTED EMAIL TEXT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
       8 copies (0 atomic) of length       29 (potential savings:      203) Wed, 22 May 2013 01:15:48 GMT
       8 copies (0 atomic) of length       29 (potential savings:      203) Thu, 22 May 2014 01:15:48 GMT
       3 copies (0 atomic) of length      101 (potential savings:      202) XXXXXX REDACTED EMAIL TEXT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
       3 copies (0 atomic) of length      101 (potential savings:      202) XXXXXX REDACTED EMAIL TEXT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
       3 copies (0 atomic) of length      101 (potential savings:      202) XXXXXX REDACTED EMAIL TEXT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

From these stats, it appears that this CL is saving memory by reducing copies of
data URLs.  Notice that many of the remaining copies are of HTTP header values
and SQL queries.  I'll tackle those in future CLs.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/15962016

git-svn-id: svn://svn.chromium.org/blink/trunk@151419 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Put WebGL extensions in list so they can be operated on as a group.

BUG=244750
R=kbr@chromium.org

Review URL: https://codereview.chromium.org/16190004

git-svn-id: svn://svn.chromium.org/blink/trunk@151420 bbb929c8-8fbe-4397-9dbb-9b2b20218538
More tolerant about malformed GIF files

GIF image decoder had became more strict since M27. This caused some malformed
GIFs to regress.

This change matches Mozilla's handling of these malformed GIF files
terminating file parsing as if the file were correct. This allows those
malformed GIF files to show.

BUG=242957
R=jamesr@chromium.org, pkasting@chromium.org

Review URL: https://codereview.chromium.org/15914009

git-svn-id: svn://svn.chromium.org/blink/trunk@151421 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Improve error handling of uploading to the flakiness dashboard.

Have all the relevant methods return a string and a status_code.
I considered adding another failure abstraction in the middle, but
I didn't see any advantage over just using HTTP status codes since it's
the lower-level code that knows what the right error type is.

This is mainly so that the case of uploading a duplicate build number
returns a 409 instead of a 500. It's a client error and should be tracked
that way. I'm trying to make sure there are no 500s on the appengine server.

This also has the benefit of giving better error messages when uploads fail.

Also, removed the incremental_results.json handling code for layout-tests since
we no longer upload those.

Finally, made full_results.json uploads always update the results json. Right now
only layout-tests upload this file, but we want to switch all test types
to uploading this format instead of incremental_results.json.

R=dglazkov@chromium.org

Review URL: https://codereview.chromium.org/15817009

git-svn-id: svn://svn.chromium.org/blink/trunk@151422 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove dead code behind USE(PLATFORM_TEXT_TRACK_MENU)

Cleans up a few last bits leftover after the rest of the guarded
code was removed in r150284.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/16047004

git-svn-id: svn://svn.chromium.org/blink/trunk@151423 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Teach WebString about 8 bit strings

Previously we always upconverted strings backing WebString to have both a 16
bit and an 8 bit buffer whenever we converted a WebString to a string16.
There's no reason to store a shadow 16 bit buffer in the String for this use
case. It's just as fast to copy out an 8 bit buffer into a string16 as it is to
copy out a 16 bit buffer.

This CL removes the vast majority of the string up converstions for Mobile
Gmail. In a future CL, we should remove WebString::data() to prevent Chromium
code from accidentially upconverting the underlying String.

R=brettw@chromium.org, eseidel@chromium.org, jamesr@chromium.org

Review URL: https://codereview.chromium.org/15866003

git-svn-id: svn://svn.chromium.org/blink/trunk@151425 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Cleanup WebKit prefixed names for classes in css directory.

Make sure we don't use prefixed naming inside Blink. The features are still exposed prefixed
to the web, unprefixing them is a different story.

This is part two and last part of the renaming.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/15703005

git-svn-id: svn://svn.chromium.org/blink/trunk@151426 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reland "Centralize setting a ResourceRequest's cache policy."

This reverts commit 66c335c892cf280323f0ba4a865a3fa068d8b32f.

BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/14883010

git-svn-id: svn://svn.chromium.org/blink/trunk@151429 bbb929c8-8fbe-4397-9dbb-9b2b20218538
REGRESSION: Select listbox dispatches a change event on scroll.

wkrev.com/143560 fixed mouse events on scrollbars, and broke an
HTMLSelectElement assumption that mouseup event always happens on an
<option> element. So, listBoxOnChange() was called unexpectedly.

This patch avoids this problem by checking
m_lastOnChangeSelection.isEmpty(), which means we didn't start click
or drag in this <select> element.

BUG=244406
TEST=automated
R=keishi@chromium.org

Review URL: https://codereview.chromium.org/16184002

git-svn-id: svn://svn.chromium.org/blink/trunk@151430 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Update test expectation.

git-svn-id: svn://svn.chromium.org/blink/trunk@151431 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Test expectation update.

BUG=none
TBR=jochen@chromium.org

Review URL: https://codereview.chromium.org/16188007

git-svn-id: svn://svn.chromium.org/blink/trunk@151432 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Clean up the way layout tests force elements to opt in/out of composited scrolling.

Currently, we're toggling a global setting, but we should really be affecting
the opt in decision for individual elements. This patch cleans that up.

This is part of a larger plan to finish the opt-in checks. Here's the aggregate patch (it's getting stale, so YMMV): https://codereview.chromium.org/14741004/

The reason this patch is necessary, is that in subsequent patches, we will be reducing the number of times we update composited scrolling state; explicitly forcing a particular layer (and only one layer) to opt in or out will allow us to guarantee that the layer's state (in particular, its z-order lists) will be updated, even if we've optimized/reduced the frequency with which we update the composited scrolling state.

R=hartmanng@chromium.org, jchaffraix@chromium.org
BUG=None

Review URL: https://chromiumcodereview.appspot.com/14858004

git-svn-id: svn://svn.chromium.org/blink/trunk@151433 bbb929c8-8fbe-4397-9dbb-9b2b20218538
applyAuthorStyles and resetStyleInheritance should use shadow root's setNeedsStyleRecalc, not shadow host's.

- ShadowRoot::recalcStyle should see its styleChangeType. If FullStyleChange, use Force for its children's style recalc.
- Changed applyAuthorStyles and resetStyleInheritance to check whether the modified shadow root is inert or not. If inert, we don't need style recalc.

BUG=242151

Review URL: https://chromiumcodereview.appspot.com/15536002

git-svn-id: svn://svn.chromium.org/blink/trunk@151434 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement TreeScope::comparePosition.

TreeScope::comparePosition is a treescope version of Node::compareDocumentPosition.
This method will be used in the future version of DocumentStyleSheetCollection.

TEST=fast/dom/shadow/compare-treescope-position.html
BUG=244314

Review URL: https://chromiumcodereview.appspot.com/15675006

git-svn-id: svn://svn.chromium.org/blink/trunk@151435 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Removing SK_IGNORE_MAC_TEXT_BOUNDS_FIX and suppressing failing Mac tests in preparation for rebaselining.

TBR=bungeman@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16195006

git-svn-id: svn://svn.chromium.org/blink/trunk@151436 bbb929c8-8fbe-4397-9dbb-9b2b20218538