Revert 167612 "Remove unused WebPrivatePtr::operator=(std::nullp..."

Results in undefined symbol on Linux.
http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20%28dbg%29/builds/17859

> Remove unused WebPrivatePtr::operator=(std::nullptr_t).
> 
> With std::nullptr_t constructors in place for the various Ptr types,
> this method is no longer needed.
> 
> Also revert some reset() uses that were introduced while waiting for
> the same nullptr change to land.
> 
> R=abarth@chromium.org
> BUG=
> 
> Review URL: https://codereview.chromium.org/173713008

TBR=sigbjornf@opera.com

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167615 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rename childNodeCount() / childNode() methods for clarity

Rename childNodeCount() / childNode() methods for clarity and to avoid bad
uses. They are now called countChildren() / traverseToChildAt() to make it
clear that these are doing work and are now simpler getters.

Also rename hasChildNodes() to hasChildren() for consistency.

R=eseidel, adamk

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167616 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix the crash bug about selecting a marquee element.

This assertion is in CompositeEditCommand::moveParagraphs, L1223.
The assertion error happens because VisibleSelection(destination, originalIsDirectional) returns default VisibleSelection value If desitination is a marquee element.
Inside the constructor,  VisiblePosition(position, _).deepPosition() returns default VisiblePosition value if position is a marquee element.
Because VisiblePosition::canonicalPosition(position) returns default Position value if position is a marquee element.
This is caused by that position.upstream() returns parent Node if position is a marquee element. This is wrong.
When a marquee element is moving, its upstream should be itself.

To fix this issue, this cl change endsOfNodeAreVisuallyDistinctPositions() called enclosingVisualBoundary() which is called from upstream().
This cl make endsOfNodeAreVisuallyDistinctPositions(node) return true if node is a marquee element.

BUG=338424

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167617 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove implicit conversion from Position to VisiblePosition.

Since VisiblePosition defines a non-explicit constructor which takes a Position
accompanied with an optional argument, an implicit conversion from Position to
VisiblePosition is defined based on this constructor.

It turned out that there are so many existing codes which rely on the conversion
(mostly inadvertently, I think), which is unfortunate as two different concepts
(Position and VisiblePosition) look interchangeable.

This change makes the constructor explicit and fixes all places that use the
conversion. Most of the fixes on the call sites are mechanical rewrites that
just add the call of the VisiblePosition constructor explicitly.

AXRenderObject, FrameSelection::modify(), and SpellChecker are treated
differently because using visibleXXX() functions from VisibleSelection seems
more appropriate than just appending the constructor call.

Just refactoring, no behavioral change expected.

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167618 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix ignored const qualifier in HashTraits.h

A new version of Clang was pointing out that it was being ignored:

..\..\third_party\WebKit\Source\wtf/HashTraits.h(149,16) :  warning(clang): 'const' qualifier on reference type 'IteratorReferenceType' (aka 'typename OwnPtr<P>::ValueType &') has no effect [-Wignored-qualifiers]
        typedef const IteratorReferenceType IteratorConstReferenceType;
                ^~~~~~

BUG=82385
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167619 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix JPEGDecode downsampled output size

Do not assume the desired decode size is supported by libjpeg.
Instead query jpeg_calc_output_dimensions and use the returned
decoded size instead.

BUG=345125

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167620 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make MediaKeySession.release() asynchronous

release() now works in the same manner as update().

BUG=334884
TEST=Updated EME content tests pass

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

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