Have enclosingPositionedAncestor() detect whether it walked past a certain ancestor.

This is similar to what LayoutObject::container() does.

This simplifies the code in accumulateOffsetTowardsAncestor(), which previously
had to duplicate what enclosingPositionedAncestor() did.

Also cleaned up the other call site of enclosingPositionedAncestor(). No need
to call the method twice there.

No behavioral changes intended; this is just clean-up.

R=chrishtr@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@197846 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed
tree: 1c226d0ac0622d63484cceb6bfe119dea87e8f49
  1. third_party/