Move calculateRects to RenderLayerClipper

The function is used to determine the different clip rects
used for painting.

BUG=307169

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164499 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Perl IDL parser: allow extended attributes to have more than 2 values

The (Perl) IDL parser has a bug, limiting extended attribute value lists
to being length at most 2.
This hasn't been a problem in the past, since this isn't used, but caused
a problem in a recent CL where arbitrarily long lists are common.
This fixes it; it's a 2-line fix.

Relevant CL:
Support IDL attributes limited to only known values.
https://codereview.chromium.org/124763002/

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

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

Some information can be shared between EventContexts whose TreeScope is the same.
Instead of storing such information in each EventContext (which is created per Node), store such information in newly introduced TreeScopeEventContext (which is created per TreeScope).

Though it might take some computation cost to share such information, the pros is much bigger than the cons.
We have to traverse only treeScopes, rather than nodes, when calculating some information, such as adjusted relatedTarget, adjusted event path, adjusted touch targets and so on.

We can get benefits both in time and space as follows:

1. Time
The result of the benchmarks are:

PerformanceTests/Events/EventDispatching.html
541 runs/s vs 594 runs/s  (10% better score)
    PerformanceTests/Events/EventDispatchingInShadowTrees.html
4625 runs/s vs 5741 runs/s (24% better score)

2. Space
We can reduce the memory footprint about 1.5 KBytes per an event.

BUG=329445

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164501 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Check for NULL pointer in partitionAllocGeneric fast path.

(Reland of a small piece of
http://src.chromium.org/viewvc/blink?revision=164447&view=revision
which was reverted.)

BUG=331699
TBR=tsepez@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164502 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make MeasureAs= attribute work for methods that are used in Workers too

Calling activeDOMWindow() in worker context makes the renderer crash (or fails in ASSERT in debug build)

BUG=330665
TEST=fast/files/workers/worker-file-last-modified.html shouldn't crash

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

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