Remove explicit bounds check from CSSValueList::item

Currently CSSValueList::item does a bounds check and will return null if
the given index is out of range. This patch makes the interface slightly
more sane by removing the check, which is currently otherwise skipped by
calling itemWithoutBoundsCheck. Note that the vector access will perform
a bounds check (with release assert) anyway. The only caller where the
bounds check behaviour is useful is for the IDL binding so a separate
function itemWithBoundsCheck is created for this (already tested by
value-list-out-of-bounds-crash.html).

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177064 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Clean up usage of CSP functions

I was very confused by the ScriptLoader code which called
CSP::allowScriptNonce and the corresponding variable
which was called isValidScriptNonce.  I searched around
for nonce functions and found that they only checked
the nonce (not all policies) and I originally thought
this was an error!  However after further investigation
I found that allowScriptNonce actually checks all active
CSPs and returns true only if they all pass, thus making
the following line (which disables further CSP checks
on the load) OK.

I renamed these allowScriptNonce and allowStyleNonce
functions to have a 'With' in their name and added
a comment in the header explaining their behavior.

While making this change, I also reduced the verbosity
of several repeated uses of the string ContentSecurityPolicy.
I think most blink hackers would be able to look up that CSP
refers to ContentSecurityPolicy.

I removed several redundant calls to Document::contentSecurityPolicy
(again just caused the lines to be needlessly verbose).

Finally I made ScriptLoader::executeScript use the preferred
early-return pattern instead of a long indented block
for the !frame case.  I suspect that the !frame check
can actually be moved much earlier in the function
or even turned into an ASSERT.

This is still my long yack-shave to actually make the
preloader correct so I can fix the bugs which my
patch to make the HTML parser yield more agressively
(and thus not starve the preloader) possible to land:
https://codereview.chromium.org/258013009/

BUG=356292

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177065 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add move constructor and assignment operator to RefPtr class

Add move constructor and assignment operator to RefPtr class. As a result, we
can now use the implicitly defined move constructor and assignment operator for
Atomic String. Also, other classes with RefPtr data members like CString now
get a better default move constructor and assignment operator.

The release binary is ~21Kb smaller, there is no diff on the generated asm
for CString and AtomicString. However, there is a small diff for WTFString.o:
http://pastebin.com/RTzX23JV

The generated assembly for "CString WTF::String::latin1() const" and
"CString WTF::String::ascii() const" is slightly smaller, likely due to
CString's improved move copy constructor as these methods return CStrings.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177066 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove passing tests from OilpanLeakExpectations.

BUG=389042
TBR=kouhei@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@177067 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Draw focus ring on Mac OS X SDK 10.8+

BUG=328814

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

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