Cleanup: Use std::string& instead of const char* in extension/api

TEST=compile

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226218 0039d316-1c4b-4281-b951-d872f2087c98
Allow clipping by scroll parents.

Previously, we had required that we inherit our clip from our direct ancestor or
our clip parent (which has to be an ancestor). This CL loosens that restriction
and allows clipping by our scroll parent, which will not be our ancestor.

In order for this to work, we must ensure that the scroll parent's clip is
computed before we compute the clip children's. This is accomplished by changing
the order in which we recur through the layer tree and sorting layer lists
afterward to ensure that we ultimately stack correctly.

NB: I have taken care to only sort the newly added layers, and to only sort when
the child order has actually changed, which should happen rarely.

Tests:
 1. LayerTreeHostCommonTest.ClippedByScrollParent
   - Checks that the simple case (where the scroll parent is naturally processed
     before the scroll child) results in the correct clips.
 2. LayerTreeHostCommonTest.ClippedByOutOfOrderScrollParent
   - Identical to (1) but checks that clips are still correct when the scroll
     parent needs to be visited out of order.
 3. LayerTreeHostCommonTest.ClippedByOutOfOrderScrollGrandparent
   - Similar to (2), but also checks that clips are set up correctly if the
     scroll parent has yet another scroll parent (sorting for recursion is a bit
     tougher in this case).
   - Also checks that despite visiting layers out of order, that the layer list
     ends up in paint order.
 4. LayerTreeHostCommonTest.OutOfOrderClippingRequiresRSLLSorting
   - Similar to (3), but includes several render surfaces in the tree and checks
     that the resulting render surface layer list is ordered correctly.
5. LayerTreeHostCommonTest.DoNotClobberSorting
   - Ensures that if we have to reorder layer list contributions that we do not break 3d sorting.

BUG=291413
R=danakj@chromium.org, enne@chromium.org, hartmanng@chromium.org

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=225858

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226219 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 226218
SVN changes up to revision 226219